@vellumai/web 0.11.6 → 0.11.7-staging.2
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/assets/{a2a-invite-Dcxf1Lse.js → a2a-invite-CalxmT9U.js} +1 -1
- package/dist/assets/about-page-oelEgoKN.js +1 -0
- package/dist/assets/account-page-DoWCrccl.js +1 -0
- package/dist/assets/account-shell-D6h6YPdW.js +1 -0
- package/dist/assets/acp-run-detail-panel-BqBDl6QB.js +5 -0
- package/dist/assets/activity-steps-panel-C5Nlm1Ax.js +1 -0
- package/dist/assets/add-credits-modal-Clc-YWYG.js +1 -0
- package/dist/assets/ai-page-DtRit5K4.js +1 -0
- package/dist/assets/android-billing-handoff-D6KkZQcR.js +1 -0
- package/dist/assets/api-key-screen-BWXzfFaa.js +1 -0
- package/dist/assets/app-info-BzVdvgJM.js +1 -0
- package/dist/assets/archive-redirect-page-DD3q7S_q.js +1 -0
- package/dist/assets/assistant-status-panel-i2Q5Ng1C.js +1 -0
- package/dist/assets/auth-welcome-screen-ghh-qFOz.js +1 -0
- package/dist/assets/avatar-random-BEjqLOzH.js +1 -0
- package/dist/assets/background-task-detail-panel-igcj1myW.js +1 -0
- package/dist/assets/billing-page-BtVWtaxz.js +3 -0
- package/dist/assets/billing-redirect-page-DaIhDbvM.js +1 -0
- package/dist/assets/bookmarks-page-CvCqY1u_.js +1 -0
- package/dist/assets/{build.umd-DjyW4NzX.js → build.umd-CJjt7Lfj.js} +1 -1
- package/dist/assets/bundle-confirm-page-DuW3Ltpg.js +1 -0
- package/dist/assets/channel-transcript-panel-C5dxI2kC.js +1 -0
- package/dist/assets/channels-Dv8-4WT6.js +9 -0
- package/dist/assets/channels-NP4ODNxS.js +9 -0
- package/dist/assets/channels-page-route-CaZZgVvj.js +1 -0
- package/dist/assets/chat-CuSRAhBb.js +3 -0
- package/dist/assets/{chat-4LXYoAUR.js → chat-Dw-Xoh_r.js} +2 -2
- package/dist/assets/checkout-continuation-gyr3KRhJ.js +1 -0
- package/dist/assets/checkout-page-CpaWMY_L.js +1 -0
- package/dist/assets/checkout-return-target-uGUiSRvm.js +1 -0
- package/dist/assets/command-palette-Dqv1yvzc.js +1 -0
- package/dist/assets/command-palette-window-page-C4vKhArq.js +1 -0
- package/dist/assets/common-BZmEPLQq.js +1 -0
- package/dist/assets/common-wNADLj0r.js +1 -0
- package/dist/assets/community-page-xiwPgo2f.js +1 -0
- package/dist/assets/companion-layout-BgFk39Te.js +1 -0
- package/dist/assets/companion-surface-page-BE_GKIQH.js +1 -0
- package/dist/assets/connect-page-1WOW2Uyb.js +1 -0
- package/dist/assets/consent-controls-RsRyTWzn.js +1 -0
- package/dist/assets/contacts-DY80_acF.js +1 -0
- package/dist/assets/contacts-O_w2EdRt.js +1 -0
- package/dist/assets/contacts-gateway-aq64PPDs.js +1 -0
- package/dist/assets/contacts-page-route-fh_BygpY.js +1 -0
- package/dist/assets/credential-entry-page-CHyGUHNE.js +1 -0
- package/dist/assets/credentials-page-u4m5eB0e.js +1 -0
- package/dist/assets/{csv-preview-rpZix2b7.js → csv-preview-D1DFyAyk.js} +2 -2
- package/dist/assets/danger-zone-redirect-page-pm7xtA64.js +1 -0
- package/dist/assets/debug-page-BiRFASyO.js +4 -0
- package/dist/assets/deploy-dialogs-BQGFr3pp.js +1 -0
- package/dist/assets/detail-card-BTciodin.js +1 -0
- package/dist/assets/detail-drawer-svbxV7k9.js +1 -0
- package/dist/assets/detail-panel-stop-button-DvPi_A52.js +1 -0
- package/dist/assets/developer-page-YJ4ePRAY.js +1 -0
- package/dist/assets/devices-redirect-page-Bc3d-ANN.js +1 -0
- package/dist/assets/dictation-overlay-page-CV5-bWnC.js +1 -0
- package/dist/assets/diff-rows-DzBJ95DT.js +1 -0
- package/dist/assets/document-viewer-page-B9aeVcPf.js +1 -0
- package/dist/assets/ellipsis-vertical-npNyglhR.js +1 -0
- package/dist/assets/emails-page-DuxmJeBh.js +1 -0
- package/dist/assets/environment-store-Cb7OK6xz.js +1 -0
- package/dist/assets/esm-BFMxsKfC.js +2 -0
- package/dist/assets/esm-BWaPHKOl.js +2 -0
- package/dist/assets/esm-B_9x3_5A.js +2 -0
- package/dist/assets/esm-BmkPJcrm.js +1 -0
- package/dist/assets/esm-C8_GJq6u.js +1 -0
- package/dist/assets/esm-CvsVyyLL.js +2 -0
- package/dist/assets/esm-D8F0P9NS.js +1 -0
- package/dist/assets/esm-DLD7mc5e.js +2 -0
- package/dist/assets/esm-lFkAo6qR.js +2 -0
- package/dist/assets/file-editor-qyflOek_.js +1 -0
- package/dist/assets/folder-open-8sWiN1cw.js +1 -0
- package/dist/assets/format-countdown-Cge3iaM1.js +1 -0
- package/dist/assets/general-page-CplJ3sOI.js +1 -0
- package/dist/assets/hatching-screen-tqPPQDHG.js +1 -0
- package/dist/assets/home-page-route-CMsbxqsW.js +1 -0
- package/dist/assets/hosting-screen-7idZudJ8.js +1 -0
- package/dist/assets/icons-CSdHOix6.js +1 -0
- package/dist/assets/identity-page-route-C4EAb-ac.js +7 -0
- package/dist/assets/index-2ECSWhtU.css +2 -0
- package/dist/assets/index-7XDiAJ-A.js +357 -0
- package/dist/assets/inspect-page-DsXykArJ.js +9 -0
- package/dist/assets/integrations-page-CmMVSsvu.js +1 -0
- package/dist/assets/{intelligence-DNb2No5j.js → intelligence-DwVUW6jm.js} +1 -1
- package/dist/assets/{intelligence-cL2kPl3v.js → intelligence-JlruxYAh.js} +1 -1
- package/dist/assets/intelligence-layout-DKknlxHu.js +1 -0
- package/dist/assets/keyboard-shortcuts-redirect-page-CFu5x117.js +1 -0
- package/dist/assets/{latest-assistant-text-DCyUvxgH.js → latest-assistant-text-CVRVSoFg.js} +2 -2
- package/dist/assets/library-detail-page-CKFkI0QY.js +1 -0
- package/dist/assets/library-page-dIrR1lib.js +1 -0
- package/dist/assets/login-page-Bca-1DK6.js +1 -0
- package/dist/assets/logout-page-BzAORi0q.js +1 -0
- package/dist/assets/logs-layout-BsqrLQee.js +1 -0
- package/dist/assets/markdown-preview-DLXGytZI.js +1 -0
- package/dist/assets/media-preview-daMlnyj8.js +1 -0
- package/dist/assets/memory-page-route-CX1I7izG.js +2 -0
- package/dist/assets/memory-router-playground-page-Mk3rfyGO.js +1 -0
- package/dist/assets/message-files-panel-D-C9C2PJ.js +1 -0
- package/dist/assets/metric-card-Bij5WGzs.js +1 -0
- package/dist/assets/notifications-page-C6zUs2x1.js +1 -0
- package/dist/assets/{oauth-complete-page-Bh6VG8SS.js → oauth-complete-page-CuNDqPAt.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-6YLSOCV_.js → oauth-popup-complete-page-hRc3yLWH.js} +2 -2
- package/dist/assets/onboarding-BbtVI8KM.js +1 -0
- package/dist/assets/onboarding-BoaKLlZ5.js +1 -0
- package/dist/assets/page-empty-state-BrGkTMcK.js +1 -0
- package/dist/assets/page-shell-DtdXurhX.js +1 -0
- package/dist/assets/pairing-page-CwLe0EJV.js +1 -0
- package/dist/assets/password-reset-page-C7qvqEJQ.js +1 -0
- package/dist/assets/{pdf-a3pPuuVL.js → pdf-fWDhmWcw.js} +1 -1
- package/dist/assets/pdf-file-preview-DbwHMWey.js +1 -0
- package/dist/assets/pdf.worker.min-Dr1KORA9.mjs +31 -0
- package/dist/assets/personality-page-Ci_b1dH9.js +1 -0
- package/dist/assets/plans-page-CyqILV_j.js +1 -0
- package/dist/assets/platform-loopback-page-CgXx1oDQ.js +1 -0
- package/dist/assets/plugin-detail-page-CvC_LUz2.js +1 -0
- package/dist/assets/plugins-page-9LuPE9IY.js +1 -0
- package/dist/assets/preview-error-DbAQP8oG.js +1 -0
- package/dist/assets/privacy-page-OIOZKgWi.js +1 -0
- package/dist/assets/privacy-screen-DFnrbIrM.js +1 -0
- package/dist/assets/provider-callback-page-DGVehvIp.js +1 -0
- package/dist/assets/provider-key-CUAJZvaQ.js +1 -0
- package/dist/assets/provider-signup-page-B5gnrbym.js +1 -0
- package/dist/assets/{provisioning-targets-CE25g21J.js → provisioning-targets-BbLfumae.js} +1 -1
- package/dist/assets/quick-input-page-Ccy-FS5S.js +1 -0
- package/dist/assets/react-DPM_L_aA.js +12 -0
- package/dist/assets/repeat-DVEpBLT_.js +1 -0
- package/dist/assets/research-mock-page-DqfkGU9x.js +1 -0
- package/dist/assets/research-onboarding-route-D3qFv6SM.js +50 -0
- package/dist/assets/review-terms-screen-BD3wP3KC.js +1 -0
- package/dist/assets/schedules-B_SL_iV4.js +1 -0
- package/dist/assets/schedules-page-D64tvhuZ.js +1 -0
- package/dist/assets/security-redirect-page-CWR-HICc.js +1 -0
- package/dist/assets/select-assistant-screen-SfWB0oQ2.js +1 -0
- package/dist/assets/self-hosted-servers-BHF9gq8j.js +1 -0
- package/dist/assets/service-form-controls-DNfWnjSp.js +1 -0
- package/dist/assets/setting-row-DRwmii99.js +1 -0
- package/dist/assets/settings-divider-X9YnFIFQ.js +1 -0
- package/dist/assets/settings-gjWN0WQO.js +3 -0
- package/dist/assets/settings-iLTzqZW8.js +3 -0
- package/dist/assets/settings-layout-C2Um5qit.js +1 -0
- package/dist/assets/share-feedback-modal-BzV03dUO.js +2 -0
- package/dist/assets/sidebar-tree-C1t1xfKD.js +1 -0
- package/dist/assets/signup-page-Dyhm65FW.js +1 -0
- package/dist/assets/signup-shell-CSThcwPa.js +1 -0
- package/dist/assets/skill-detail-page-Cja0k8_e.js +2 -0
- package/dist/assets/skill-detail-panel-BIOL410z.js +1 -0
- package/dist/assets/skill-icon-Me8DDEMt.js +1 -0
- package/dist/assets/skill-removal-dialog-bN91N7f8.js +1 -0
- package/dist/assets/skills-page-CYogTXmH.js +1 -0
- package/dist/assets/sounds-page-DAy2o3wO.js +1 -0
- package/dist/assets/start-screen-DyyYavfM.js +1 -0
- package/dist/assets/status-badge-pill-BAkXhxwa.js +1 -0
- package/dist/assets/stt-language-picker-modal-CpGwbd4g.js +1 -0
- package/dist/assets/subagent-detail-panel-330bH7ee.js +4 -0
- package/dist/assets/superpowers-page-D6wv3GWO.js +1 -0
- package/dist/assets/system-events-page-CFN8tMUJ.js +1 -0
- package/dist/assets/system-events-redirect-page-BarOgFkA.js +1 -0
- package/dist/assets/text-preview-CZeqyzdw.js +1 -0
- package/dist/assets/theme-stage-page-Pcnh0PTQ.js +1 -0
- package/dist/assets/{tiptap-document-editor-sg7gdh_H.js → tiptap-document-editor-ZZmtZ799.js} +30 -30
- package/dist/assets/tool-detail-panel-BgCSb_m5.js +12 -0
- package/dist/assets/trait-cycle-row-BWNJ21g4.js +1 -0
- package/dist/assets/upgrade-cancel-page-ByVEWPeH.js +1 -0
- package/dist/assets/upgrade-success-page-iAPLJbee.js +1 -0
- package/dist/assets/usage-redirect-page-BHd-7in5.js +1 -0
- package/dist/assets/use-assistant-identity-details-oVmPdjVe.js +1 -0
- package/dist/assets/use-checkout-dismiss-refresh-BO2cN2i8.js +1 -0
- package/dist/assets/use-edge-swipe-back-CzESg8qG.js +2 -0
- package/dist/assets/use-hotkey-recorder-CY089_4p.js +1 -0
- package/dist/assets/use-invite-link-dialog-Ck-LquhT.js +1 -0
- package/dist/assets/use-platform-assistant-id-DcVWp7KY.js +1 -0
- package/dist/assets/use-return-to-short-circuit-NDSwANeI.js +1 -0
- package/dist/assets/use-side-list-room-DQbUPFcU.js +1 -0
- package/dist/assets/use-skill-actions-CNBx-WS1.js +1 -0
- package/dist/assets/use-skill-detail-files-BGIXJykk.js +1 -0
- package/dist/assets/use-supports-credentials-settings-C6S_OHMP.js +1 -0
- package/dist/assets/use-transcript-message-by-id-Dqm1PMu3.js +1 -0
- package/dist/assets/use-truncated-blob-text-DLF_hf3O.js +1 -0
- package/dist/assets/vendor-WUN87CSE.js +385 -0
- package/dist/assets/voice-page-nBfEMyWs.js +1 -0
- package/dist/assets/weather-forecast-display-B6j-V-yS.js +1 -0
- package/dist/assets/web-CE-RjE8i.js +1 -0
- package/dist/assets/web-Cv_J7__I.js +1 -0
- package/dist/assets/web-Cw24uxYA.js +1 -0
- package/dist/assets/web-DDFO9PaS.js +1 -0
- package/dist/assets/web-DL2rv-Fb.js +1 -0
- package/dist/assets/web-DPEGYPrR.js +1 -0
- package/dist/assets/web-Q8lSPj8Z.js +1 -0
- package/dist/assets/web-kKGZ0Pbn.js +1 -0
- package/dist/assets/web-pwf5Vh3V.js +1 -0
- package/dist/assets/welcome-screen-BrwdmDqM.js +1 -0
- package/dist/assets/workflow-detail-panel-DcTQSyju.js +1 -0
- package/dist/assets/workspace-page-Dwfwnkh5.js +1 -0
- package/dist/assets/{xterm-QkObDWKu.js → xterm-DfM4JBPp.js} +1 -1
- package/dist/assets/xterm-addon-fit-DuBTfuI9.js +1 -0
- package/dist/images/integrations/ATTRIBUTION.md +10 -5
- package/dist/images/integrations/calendly.svg +1 -0
- package/dist/images/integrations/eventbrite.svg +1 -0
- package/dist/images/integrations/monday.svg +1 -0
- package/dist/index.html +7 -336
- package/package.json +1 -1
- package/dist/assets/AnimatePresence-BkWQRluv.js +0 -9
- package/dist/assets/Combination-kHxEP36G.js +0 -41
- package/dist/assets/QueryClientProvider-BPZM68-A.js +0 -1
- package/dist/assets/Trans-CBhhVbOk.js +0 -1
- package/dist/assets/about-page-hURQzaZb.js +0 -1
- package/dist/assets/account-page-BUHRzIQn.js +0 -1
- package/dist/assets/account-shell-Y97PMm-a.js +0 -1
- package/dist/assets/acp-run-actions-DznGEBjQ.js +0 -1
- package/dist/assets/acp-run-detail-panel-CVPDXyP6.js +0 -5
- package/dist/assets/acp-run-store-D8roCscD.js +0 -1
- package/dist/assets/activity-steps-panel-BzTDFCQ4.js +0 -1
- package/dist/assets/add-credential-modal-aeUdZtSp.js +0 -1
- package/dist/assets/add-credits-modal-CtS-PzoH.js +0 -1
- package/dist/assets/ai-page-C6zXOVyP.js +0 -1
- package/dist/assets/android-billing-handoff-BoSQm4gg.js +0 -1
- package/dist/assets/animate-CuPjEtk6.js +0 -1
- package/dist/assets/animated-avatar-DAJHVYXE.js +0 -1
- package/dist/assets/api-BUuIGDig.js +0 -1
- package/dist/assets/api-key-screen-DauZKmq9.js +0 -1
- package/dist/assets/app-card-B5AFFdUO.js +0 -1
- package/dist/assets/app-info-CBSIGREh.js +0 -1
- package/dist/assets/apple-logo-GkgGOZWf.js +0 -1
- package/dist/assets/archive-DMKVAVAX.js +0 -1
- package/dist/assets/archive-redirect-page-DXqjPmpK.js +0 -1
- package/dist/assets/arrow-down-to-line-CJ0OBlcT.js +0 -1
- package/dist/assets/arrow-left-DUklm7Fd.js +0 -1
- package/dist/assets/arrow-right-De7tYwD7.js +0 -1
- package/dist/assets/arrow-up-CijF4S8i.js +0 -1
- package/dist/assets/assistant-feature-flag-store-Co_o5uD3.js +0 -1
- package/dist/assets/assistant-identity-store-DBkGjqzV.js +0 -1
- package/dist/assets/assistant-status-panel-DYkXgK0D.js +0 -1
- package/dist/assets/audio-context-YNIG4zMo.js +0 -1
- package/dist/assets/auth-store-BVjw4Y6z.js +0 -2
- package/dist/assets/auth-welcome-screen-DbDu2DKV.js +0 -1
- package/dist/assets/avatar-bundled-components-C1i6ys8w.js +0 -1
- package/dist/assets/avatar-random-BOjdaclE.js +0 -1
- package/dist/assets/avatar-renderer-CnJd2PqC.js +0 -1
- package/dist/assets/avatar-subagent-CdgpbwL0.js +0 -1
- package/dist/assets/avatar-svg-compositor-DxBmLeF3.js +0 -1
- package/dist/assets/avatar-tone-D_3T6CNS.js +0 -1
- package/dist/assets/background-task-actions-Cs3pTNVl.js +0 -1
- package/dist/assets/background-task-detail-panel-BWAwy3I3.js +0 -1
- package/dist/assets/background-task-store-Ba89lNRi.js +0 -1
- package/dist/assets/ban-JFtQ_88n.js +0 -1
- package/dist/assets/bell-B3GoRAIC.js +0 -1
- package/dist/assets/billing-page-FxI0W3-_.js +0 -3
- package/dist/assets/billing-redirect-page-l6nC_qa5.js +0 -1
- package/dist/assets/bookmarks-page-6p-UochF.js +0 -1
- package/dist/assets/brain-lgsb4JhV.js +0 -1
- package/dist/assets/browser-BaGW19xY.js +0 -2
- package/dist/assets/browser-timezone-DEQubHhx.js +0 -1
- package/dist/assets/bug-DJjWtfUu.js +0 -1
- package/dist/assets/build-state-ChDL0BPH.js +0 -1
- package/dist/assets/bundle-confirm-page-9jTfMrek.js +0 -1
- package/dist/assets/bundle-mjs-CctC_00U.js +0 -1
- package/dist/assets/button-B1kEAcLt.js +0 -1
- package/dist/assets/by-tool-use-id-index-DOOfRauy.js +0 -1
- package/dist/assets/calendar-Bbg9LoLZ.js +0 -1
- package/dist/assets/camera-DOhkFhC8.js +0 -1
- package/dist/assets/card-B4b9cF6X.js +0 -1
- package/dist/assets/channels-DU7UcoR_.js +0 -1
- package/dist/assets/channels-P8K1t248.js +0 -1
- package/dist/assets/channels-page-route-DBtIRtsL.js +0 -9
- package/dist/assets/chart-column-BSXp3tJF.js +0 -1
- package/dist/assets/chat-BG7p3zq1.js +0 -3
- package/dist/assets/chat-Bfo3dMB3.js +0 -1
- package/dist/assets/chat-avatar-DM2DBsml.js +0 -1
- package/dist/assets/chat-layout-slots-store-D_NI8Xtw.js +0 -1
- package/dist/assets/chat-markdown-message-CTuuKxjN.js +0 -1
- package/dist/assets/check-bDVYejGM.js +0 -1
- package/dist/assets/checkbox--DYEubRE.js +0 -1
- package/dist/assets/checkout-continuation-LLv0HLko.js +0 -1
- package/dist/assets/checkout-page-B14XHmIb.js +0 -1
- package/dist/assets/checkout-return-target-BX6588K4.js +0 -1
- package/dist/assets/chevron-down-D437oaYt.js +0 -1
- package/dist/assets/chevron-left-C51UUK4r.js +0 -1
- package/dist/assets/chevron-right-D5lPX854.js +0 -1
- package/dist/assets/chevron-up-B_I9Uakl.js +0 -1
- package/dist/assets/chunk-5KNZJZUH-CPFsMQoz.js +0 -4
- package/dist/assets/circle-alert-BaeJJrSp.js +0 -1
- package/dist/assets/circle-check-CnoFVsRZ.js +0 -1
- package/dist/assets/circle-check-big-CHpJAmSB.js +0 -1
- package/dist/assets/circle-minus--pYdZe0n.js +0 -1
- package/dist/assets/circle-x-BnqzdPia.js +0 -1
- package/dist/assets/client-feature-flag-store-BmjgGl9P.js +0 -1
- package/dist/assets/client-perf-CL-Sfpnu.js +0 -1
- package/dist/assets/client.gen-D1UKq9QZ.js +0 -6
- package/dist/assets/clipboard-copy-BFyCoPu3.js +0 -1
- package/dist/assets/clock-HLo0irRS.js +0 -1
- package/dist/assets/cloud-6GKvvsQ6.js +0 -1
- package/dist/assets/cloud-off-B8SagsfP.js +0 -1
- package/dist/assets/cn-naJKasky.js +0 -1
- package/dist/assets/code-B7j8vdg9.js +0 -1
- package/dist/assets/coins-S_-Fmv_r.js +0 -1
- package/dist/assets/command-palette-C0x3z7aQ.js +0 -1
- package/dist/assets/command-palette-window-page-BShi7rwo.js +0 -1
- package/dist/assets/common-C7YGlfJZ.js +0 -1
- package/dist/assets/common-DFfCPRFe.js +0 -1
- package/dist/assets/community-page-ChiOX6Op.js +0 -1
- package/dist/assets/companion-surface-BYj8yxCS.js +0 -1
- package/dist/assets/companion-surface-page-HYtLs0-t.js +0 -1
- package/dist/assets/composer-settings-BCehrZgj.js +0 -1
- package/dist/assets/confirm-dialog-EPYSBP_B.js +0 -1
- package/dist/assets/connect-page-tyHxf7TL.js +0 -1
- package/dist/assets/consent-controls-C7U2N-h8.js +0 -1
- package/dist/assets/consent-cuDRWUkB.js +0 -1
- package/dist/assets/contacts-CotcPejk.js +0 -1
- package/dist/assets/contacts-E-8UOrGK.js +0 -1
- package/dist/assets/contacts-gateway-BLGKdcif.js +0 -1
- package/dist/assets/contacts-page-route-KVjx4fqm.js +0 -1
- package/dist/assets/conversation-cache-CrybogTL.js +0 -1
- package/dist/assets/conversation-navigation-Ck_iLhjv.js +0 -1
- package/dist/assets/conversation-queries-Clrll8jF.js +0 -1
- package/dist/assets/conversation-selection-BVLi6RIL.js +0 -1
- package/dist/assets/conversation-store-BHWyRtQs.js +0 -1
- package/dist/assets/copy-to-clipboard-Blihejp9.js +0 -1
- package/dist/assets/cpu-KP1UdyS1.js +0 -1
- package/dist/assets/create-selectors-sLdtxUZQ.js +0 -1
- package/dist/assets/createLucideIcon-CMfEC_aW.js +0 -1
- package/dist/assets/credential-entry-page-Cs6FHnUn.js +0 -1
- package/dist/assets/credentials-page-D8G-44GI.js +0 -1
- package/dist/assets/danger-zone-redirect-page-Cds_krO3.js +0 -1
- package/dist/assets/debug-page-BMqKvkSo.js +0 -4
- package/dist/assets/deploy-dialogs-DqkTJUGk.js +0 -1
- package/dist/assets/deploy-store-FijtU8HL.js +0 -1
- package/dist/assets/desktop-voice-activity-DUGtHbRg.js +0 -1
- package/dist/assets/detail-card-D9EAxXI8.js +0 -1
- package/dist/assets/detail-drawer-D-CPwyBO.js +0 -1
- package/dist/assets/detail-panel-stop-button-ClfJeo-s.js +0 -1
- package/dist/assets/detail-shell-CNYbfTO7.js +0 -1
- package/dist/assets/developer-page-C7o31rYB.js +0 -1
- package/dist/assets/devices-redirect-page-CeKwKvN-.js +0 -1
- package/dist/assets/diagnostics-BC7vRbDB.js +0 -1
- package/dist/assets/dictation-overlay-C-whP7yL.js +0 -1
- package/dist/assets/dictation-overlay-page-sfEwzU14.js +0 -1
- package/dist/assets/diff-rows-D_K2ZMJ5.js +0 -1
- package/dist/assets/discord-logo-sC02ywjh.js +0 -1
- package/dist/assets/dist-BnrwumrD.js +0 -1
- package/dist/assets/dist-Cr8OiiXj.js +0 -1
- package/dist/assets/dist-Ct3qbbty.js +0 -1
- package/dist/assets/dist-Czhl4zX3.js +0 -1
- package/dist/assets/dist-D3VsKBK8.js +0 -1
- package/dist/assets/dist-DaY2OuMX.js +0 -1
- package/dist/assets/doctor-handoff-store-DEirTOZw.js +0 -1
- package/dist/assets/document-viewer-container-yyhVIyAB.js +0 -2
- package/dist/assets/document-viewer-page-Co_sxuvK.js +0 -1
- package/dist/assets/download-BIMKsVBw.js +0 -1
- package/dist/assets/edge-swipe-arbiter-store-ByePvbty.js +0 -1
- package/dist/assets/edit-chat-session-Cm8kKicc.js +0 -1
- package/dist/assets/effective-timezone-BW38Gdmx.js +0 -1
- package/dist/assets/ellipsis-DLGzVN7S.js +0 -1
- package/dist/assets/ellipsis-vertical-BJaOQqv_.js +0 -1
- package/dist/assets/emails-page-a1sfkbkL.js +0 -1
- package/dist/assets/environment-store-DKl9RR50.js +0 -1
- package/dist/assets/esm-BAE-_6f7.js +0 -1
- package/dist/assets/esm-BTQ42Hgz.js +0 -2
- package/dist/assets/esm-BnXPDdij.js +0 -2
- package/dist/assets/esm-CC077SPL.js +0 -2
- package/dist/assets/esm-CbZfwR7m.js +0 -2
- package/dist/assets/esm-DA5sciAy.js +0 -2
- package/dist/assets/esm-DbODHbQp.js +0 -2
- package/dist/assets/esm-Doko4a-G.js +0 -2
- package/dist/assets/esm-KUiHjb53.js +0 -1
- package/dist/assets/esm-uRwymN1a.js +0 -1
- package/dist/assets/event-bus-CN0zipw2.js +0 -1
- package/dist/assets/external-anchor-CJ2uCBN2.js +0 -1
- package/dist/assets/external-link-cVsOyP-B.js +0 -1
- package/dist/assets/external-urls-BE71Yb2T.js +0 -1
- package/dist/assets/eye-Bkw-NEUk.js +0 -1
- package/dist/assets/eye-bbox-crwIELLL.js +0 -1
- package/dist/assets/eye-off-BtRToWVw.js +0 -1
- package/dist/assets/feature-flag-catalog-DWnmasL0.js +0 -1
- package/dist/assets/feed-item-status-actions-Bw41rlaj.js +0 -1
- package/dist/assets/field-quMum4Ij.js +0 -1
- package/dist/assets/file-DukGjoT9.js +0 -1
- package/dist/assets/file-code-KOdjB_EC.js +0 -1
- package/dist/assets/file-editor-Cx3p3Rxf.js +0 -1
- package/dist/assets/file-markdown-D43Nsqm2.js +0 -2
- package/dist/assets/file-plus-BE5pS64_.js +0 -1
- package/dist/assets/file-text-CexzqcsX.js +0 -1
- package/dist/assets/first-run-scope-DITgHc6G.js +0 -1
- package/dist/assets/folder-BshXYSOQ.js +0 -1
- package/dist/assets/folder-open-Dp3CKxO5.js +0 -1
- package/dist/assets/format-date-C4mrDYY6.js +0 -1
- package/dist/assets/format-usd-Be34KtzB.js +0 -1
- package/dist/assets/funnel-events-Dl6Nt7nA.js +0 -1
- package/dist/assets/general-page-rg_u_yPE.js +0 -1
- package/dist/assets/get-memory-stats-DxspWLxk.js +0 -1
- package/dist/assets/globe-DJ3y3hQh.js +0 -1
- package/dist/assets/haptics-BS-glrYv.js +0 -2
- package/dist/assets/hard-drive-CXysKjuo.js +0 -1
- package/dist/assets/hard-navigate-BVv7q79D.js +0 -1
- package/dist/assets/hatching-screen-8lXCy9WG.js +0 -1
- package/dist/assets/heart-DF_JiyEl.js +0 -1
- package/dist/assets/home-page-route-QunjBmtS.js +0 -1
- package/dist/assets/hosting-screen-B-5gejYX.js +0 -1
- package/dist/assets/i18n-BtV8MCsZ.js +0 -15
- package/dist/assets/identity-_6tLszkL.js +0 -1
- package/dist/assets/identity-page-route-B0XGpYIE.js +0 -7
- package/dist/assets/image-B4sohCAa.js +0 -1
- package/dist/assets/inbox-D8dK1dMC.js +0 -1
- package/dist/assets/index-C9XKdblY.css +0 -2
- package/dist/assets/index-Gjnx86x6.js +0 -11
- package/dist/assets/infiniteQueryOptions-DTCCTa10.js +0 -1
- package/dist/assets/info-C-HjpKAE.js +0 -1
- package/dist/assets/ingest-OJG7HVUh.js +0 -1
- package/dist/assets/input-ChbJ2nzd.js +0 -1
- package/dist/assets/inspect-page-bs_j1c9j.js +0 -9
- package/dist/assets/installed-plugins-query-C8omZZV4.js +0 -1
- package/dist/assets/integration-icon-C6Y4VGkv.js +0 -1
- package/dist/assets/integrations-page-D7ENik74.js +0 -1
- package/dist/assets/intelligence-layout-gaexcakY.js +0 -1
- package/dist/assets/interactive-target-h9aYOKy2.js +0 -1
- package/dist/assets/internal-thread-actions-DkNfSArh.js +0 -1
- package/dist/assets/invalidate-memory-queries-DWuNUXFq.js +0 -1
- package/dist/assets/invalidate-plugin-queries-CBgy5O6i.js +0 -1
- package/dist/assets/is-electron-D45bjFI8.js +0 -1
- package/dist/assets/jsx-runtime-COOF1INC.js +0 -1
- package/dist/assets/key-round-BEQmZ4Ji.js +0 -1
- package/dist/assets/keyboard-shortcuts-redirect-page-BDuYwofA.js +0 -1
- package/dist/assets/laptop-XN6nYvdB.js +0 -1
- package/dist/assets/layout-grid-Cyrnt_YU.js +0 -1
- package/dist/assets/library-detail-page-DXCZhY4s.js +0 -1
- package/dist/assets/library-page-CKAu2a08.js +0 -1
- package/dist/assets/lightbulb-BSnKqAOd.js +0 -1
- package/dist/assets/link-2-Di62Fo_i.js +0 -1
- package/dist/assets/link-CbkkEBEX.js +0 -1
- package/dist/assets/list-Dtwz1hOH.js +0 -1
- package/dist/assets/list-row-BvCm9O6y.js +0 -1
- package/dist/assets/llm-model-catalog-Bk0q_XG4.js +0 -1
- package/dist/assets/loader-circle-DZ65N8bz.js +0 -1
- package/dist/assets/local-mode-BQ8gp0wB.js +0 -1
- package/dist/assets/local-runtime-upgrade-BXc9x-7Y.js +0 -1
- package/dist/assets/local-settings-D9SNRv4p.js +0 -1
- package/dist/assets/log-in-CGeZfDEs.js +0 -1
- package/dist/assets/log-out-DPkGVfNH.js +0 -1
- package/dist/assets/login-flow-CrSxmLFE.js +0 -1
- package/dist/assets/login-page-uUo0uRmJ.js +0 -1
- package/dist/assets/logout-page-BYZfOpa1.js +0 -1
- package/dist/assets/logs-layout-B34XKM-k.js +0 -1
- package/dist/assets/mail-CqdA6Y_p.js +0 -1
- package/dist/assets/markdown-preview-eCDa4paC.js +0 -1
- package/dist/assets/media-preview-1xn1SAn9.js +0 -1
- package/dist/assets/memory-page-route-DiVaW98S.js +0 -2
- package/dist/assets/memory-router-playground-page-DgILWgQu.js +0 -1
- package/dist/assets/menu-DPM2p9S5.js +0 -1
- package/dist/assets/message-circle-DBYzIjYB.js +0 -1
- package/dist/assets/message-content-uWZUlo6D.js +0 -1
- package/dist/assets/message-files-panel-Bv-5dvcD.js +0 -1
- package/dist/assets/message-square-XpKWNcyv.js +0 -1
- package/dist/assets/message-square-text-CvSl10LZ.js +0 -1
- package/dist/assets/messages-BXHTKK_v.js +0 -13
- package/dist/assets/metric-card-CTonLoYE.js +0 -1
- package/dist/assets/mic-DQbnjgmt.js +0 -1
- package/dist/assets/middleware-BmAQ4_8P.js +0 -1
- package/dist/assets/mime-sniff--WYdEIBE.js +0 -1
- package/dist/assets/minimize-2-DzL_lI8t.js +0 -1
- package/dist/assets/misc-dA4Wklt2.js +0 -1
- package/dist/assets/modal-_49mDK_d.js +0 -1
- package/dist/assets/monitor-BKwWxjph.js +0 -1
- package/dist/assets/moon-MfogEw5q.js +0 -1
- package/dist/assets/native-anchor-CmnMg6B6.js +0 -1
- package/dist/assets/native-biometric-DEP8Sr4X.js +0 -6
- package/dist/assets/native-deep-link--guFKiPO.js +0 -2
- package/dist/assets/native-file-DlQtjxJn.js +0 -2
- package/dist/assets/navigation-resolver-CRsrd5gh.js +0 -1
- package/dist/assets/not-found-BXR_4Uja.js +0 -1
- package/dist/assets/notice-BHeYlKvv.js +0 -1
- package/dist/assets/notifications-Dcgkgn8Q.js +0 -1
- package/dist/assets/notifications-page-CSH6gHaX.js +0 -1
- package/dist/assets/oauth-connection-utils-D_78dCYn.js +0 -1
- package/dist/assets/oauth-popup-DEDdbkj2.js +0 -1
- package/dist/assets/onboarding-D2bBWpx1.js +0 -1
- package/dist/assets/onboarding-DJeJhXd6.js +0 -1
- package/dist/assets/onboarding-layout-C9v6Q2QQ.js +0 -1
- package/dist/assets/onboarding-navigation-oNFNDeeW.js +0 -1
- package/dist/assets/onboarding-store-BhT1z8Wi.js +0 -1
- package/dist/assets/open-workspace-file-fIr0qcsc.js +0 -2
- package/dist/assets/operational-status-BdcYEcTh.js +0 -1
- package/dist/assets/optimistic-lifecycle-BlDyVYIt.js +0 -1
- package/dist/assets/page-empty-state-B_nQdAFR.js +0 -1
- package/dist/assets/page-shell-BHyGukA1.js +0 -1
- package/dist/assets/page-surface-store-D5IgLCtn.js +0 -1
- package/dist/assets/pairing-page-fVI54lsD.js +0 -1
- package/dist/assets/palette-BlX3XmVL.js +0 -1
- package/dist/assets/paperclip-Ce-wbj5L.js +0 -1
- package/dist/assets/password-reset-page-ClhMzYsx.js +0 -1
- package/dist/assets/pdf-file-preview-BjbSLoD9.js +0 -1
- package/dist/assets/pdf-preview-xa07R01f.js +0 -2
- package/dist/assets/pencil-1uDrqXvV.js +0 -1
- package/dist/assets/personality-page-CK3vkhkl.js +0 -1
- package/dist/assets/plans-page-CuZeAQhx.js +0 -1
- package/dist/assets/platform-detection-DUeD4WFO.js +0 -1
- package/dist/assets/platform-login-notice-B2ZwcEYp.js +0 -1
- package/dist/assets/platform-loopback-page-CMnaXj8y.js +0 -1
- package/dist/assets/play-D-HSCeZj.js +0 -1
- package/dist/assets/plug-AMxPbUcz.js +0 -1
- package/dist/assets/plugin-detail-page-D9Qk7GmS.js +0 -1
- package/dist/assets/plugins-page-Bm0hcoSf.js +0 -1
- package/dist/assets/plugins-surface-DB7dv9Hu.js +0 -1
- package/dist/assets/plus-rgqTRjE1.js +0 -1
- package/dist/assets/pointer-DktxhCd8.js +0 -1
- package/dist/assets/popover-GOTwOlgQ.js +0 -1
- package/dist/assets/prechat-Cl2-DnE_.js +0 -1
- package/dist/assets/prefs-CAMw44jD.js +0 -1
- package/dist/assets/preload-helper-BewR0kVT.js +0 -1
- package/dist/assets/preview-error-DW-EUl80.js +0 -1
- package/dist/assets/preview-skeleton-CLI9ptyu.js +0 -1
- package/dist/assets/privacy-page-D-a7l0YY.js +0 -1
- package/dist/assets/privacy-screen-CxwxgE4s.js +0 -1
- package/dist/assets/profile-pickers-D8XVv50L.js +0 -1
- package/dist/assets/progress-bar-C9zSzt4m.js +0 -1
- package/dist/assets/provider-callback-page-65a2DK0l.js +0 -1
- package/dist/assets/provider-key-CcPF1Zqp.js +0 -1
- package/dist/assets/provider-signup-page-BC86aF7W.js +0 -1
- package/dist/assets/proxy-CROyCGs8.js +0 -1
- package/dist/assets/public-asset-Dk1mdzbh.js +0 -1
- package/dist/assets/push-registration-D0zDMpTx.js +0 -2
- package/dist/assets/puzzle-PqInNnOi.js +0 -1
- package/dist/assets/queryOptions-DGyQTr3e.js +0 -1
- package/dist/assets/quick-input-page-DAf2lbri.js +0 -1
- package/dist/assets/react-DJZBPgpf.js +0 -1
- package/dist/assets/react-query.gen-C5widOeH.js +0 -1
- package/dist/assets/react-query.gen-C_GLKG7m.js +0 -1
- package/dist/assets/reduced-motion-B-KLzfs_.js +0 -1
- package/dist/assets/refresh-cw-BDh1a2sj.js +0 -1
- package/dist/assets/relative-time-COU7Zqre.js +0 -1
- package/dist/assets/remote-gateway-session-C3H0Oq0r.js +0 -1
- package/dist/assets/remove-from-device-dialog-CXmGFbKk.js +0 -1
- package/dist/assets/repeat-6uW-THNc.js +0 -1
- package/dist/assets/research-facts-gT4POsZw.js +0 -1
- package/dist/assets/research-mock-page-B41v4MzE.js +0 -1
- package/dist/assets/research-onboarding-persistence-Bnn7ljSq.js +0 -1
- package/dist/assets/research-onboarding-route-CbZ14lCf.js +0 -50
- package/dist/assets/research-results-view-BHXLkoKK.js +0 -3
- package/dist/assets/resolved-assistants-store-DEtotxhR.js +0 -1
- package/dist/assets/retire-confirm-dialog-1nxn6f4M.js +0 -1
- package/dist/assets/review-terms-screen-BsDHdmoO.js +0 -1
- package/dist/assets/rotate-ccw-BYcZOtjy.js +0 -1
- package/dist/assets/routes-C6ueuiMd.js +0 -1
- package/dist/assets/routes-Cly3ytK4.js +0 -24
- package/dist/assets/runtime-upgrade-banner-DC63rkQ7.js +0 -2
- package/dist/assets/sandbox-bridge-DSJSIgUC.js +0 -275
- package/dist/assets/schedules-BZzuRuQs.js +0 -1
- package/dist/assets/schedules-DVOFbt86.js +0 -1
- package/dist/assets/schedules-page-CjqAP78z.js +0 -1
- package/dist/assets/schemas-BNPZ_RzM.js +0 -39
- package/dist/assets/sdk.gen-BluU0h_N.js +0 -6
- package/dist/assets/sdk.gen-BuAyyHNm.js +0 -6
- package/dist/assets/sdk.gen-CrcsMCNX.js +0 -1
- package/dist/assets/search-DYHr3LM9.js +0 -1
- package/dist/assets/section-membership-Bma0R_Bn.js +0 -1
- package/dist/assets/security-redirect-page-C3VbbfyM.js +0 -1
- package/dist/assets/select-DmdFZj4l.js +0 -1
- package/dist/assets/select-assistant-screen-CV_3BKEH.js +0 -1
- package/dist/assets/self-hosted-servers-BMPYPayb.js +0 -1
- package/dist/assets/semver-CeGQrxWZ.js +0 -1
- package/dist/assets/send-1mFY4II3.js +0 -1
- package/dist/assets/setting-row-urcByt7n.js +0 -1
- package/dist/assets/settings-BggpKBtA.js +0 -3
- package/dist/assets/settings-C37vdp_B.js +0 -1
- package/dist/assets/settings-DSeJ7uGb.js +0 -3
- package/dist/assets/settings-divider-CYam_4yQ.js +0 -1
- package/dist/assets/settings-layout-CDRF6b06.js +0 -1
- package/dist/assets/settings-navigation-DyFIJJGF.js +0 -1
- package/dist/assets/share-feedback-modal-TnZsiNw9.js +0 -2
- package/dist/assets/shield-OLSnLaN7.js +0 -1
- package/dist/assets/shield-check-BuRfLkGi.js +0 -1
- package/dist/assets/sidebar-tree-Y1RDeJ9E.js +0 -1
- package/dist/assets/signup-page-DRzsOblS.js +0 -1
- package/dist/assets/signup-shell-DH0qR_2b.js +0 -1
- package/dist/assets/site-favicon-DLf2W4xi.js +0 -1
- package/dist/assets/skeleton-BV6nOVEl.js +0 -1
- package/dist/assets/skill-detail-page-3Wiz9A7q.js +0 -2
- package/dist/assets/skill-detail-panel-DbLFuSyn.js +0 -1
- package/dist/assets/skill-icon-D52BIuW4.js +0 -1
- package/dist/assets/skills-DASSBxT-.js +0 -1
- package/dist/assets/skills-page-DhKl7Mti.js +0 -1
- package/dist/assets/sliders-horizontal-BPa-_UE6.js +0 -1
- package/dist/assets/smartphone-P7vq0dcA.js +0 -1
- package/dist/assets/sound-manager-D8p3_c3W.js +0 -1
- package/dist/assets/sounds-page-CWBPL1YA.js +0 -1
- package/dist/assets/sparkles-D6kBPNlr.js +0 -1
- package/dist/assets/square-sQS2OW8v.js +0 -1
- package/dist/assets/src-BKET5Cno.js +0 -293
- package/dist/assets/star-C4JuiUip.js +0 -1
- package/dist/assets/start-screen-OMf-yHG3.js +0 -1
- package/dist/assets/status-badge-pill-MTA2Lfk-.js +0 -1
- package/dist/assets/stt-language-picker-modal-CmeO8yxD.js +0 -1
- package/dist/assets/subagent-detail-panel-CUW2rBET.js +0 -4
- package/dist/assets/subagent-store-BcbcFnS8.js +0 -3
- package/dist/assets/sun-Dtr03Yty.js +0 -1
- package/dist/assets/superpowers-page-CuvXfGPO.js +0 -1
- package/dist/assets/surface-parse-helpers-f-hT9LIR.js +0 -1
- package/dist/assets/swipe-action-reveal-BhA-hrfj.js +0 -1
- package/dist/assets/system-events-page-tEAEdDzA.js +0 -1
- package/dist/assets/system-events-redirect-page-BMSQQBAs.js +0 -1
- package/dist/assets/tag-DAsImP7W.js +0 -1
- package/dist/assets/target-zLlNzjMl.js +0 -1
- package/dist/assets/telegram-setup-wizard-BT6u6vcb.js +0 -1
- package/dist/assets/terminal-Bw8gHw-v.js +0 -1
- package/dist/assets/text-preview-qkra1xEh.js +0 -1
- package/dist/assets/theme-preferences-ysFQ1QCN.js +0 -1
- package/dist/assets/theme-stage-page-DiqUiOmJ.js +0 -1
- package/dist/assets/three-dot-indicator-rcDwZDFG.js +0 -1
- package/dist/assets/threshold-presets-DF7FTTlD.js +0 -1
- package/dist/assets/toast-BKrDuNtu.js +0 -1
- package/dist/assets/toggle-CdhdS_iC.js +0 -1
- package/dist/assets/tool-detail-panel-BR3PsmdK.js +0 -12
- package/dist/assets/transcript-message-body-shared-DWzxxSaD.js +0 -1
- package/dist/assets/trash-2-CVpEwOYZ.js +0 -1
- package/dist/assets/triangle-alert-B6J57Xfo.js +0 -1
- package/dist/assets/trust-rules-api-eZhPplXW.js +0 -1
- package/dist/assets/typed-storage-Bw4gW_Pk.js +0 -1
- package/dist/assets/typography-SdxpXI_m.js +0 -1
- package/dist/assets/upgrade-cancel-page-pljx8YOz.js +0 -1
- package/dist/assets/upgrade-success-page-CJUETwIe.js +0 -1
- package/dist/assets/upload-8ENnMpW_.js +0 -1
- package/dist/assets/usage-redirect-page-DBkOdl41.js +0 -1
- package/dist/assets/use-active-assistant-id-lxYJu99R.js +0 -1
- package/dist/assets/use-app-theme-CaWLhQW_.js +0 -1
- package/dist/assets/use-assistant-avatar-C2TgszRj.js +0 -1
- package/dist/assets/use-assistant-capability-De-35T6E.js +0 -1
- package/dist/assets/use-assistant-identity-details-rXIIiXr1.js +0 -1
- package/dist/assets/use-attachment-preview-BAX_ivri.js +0 -2
- package/dist/assets/use-attachment-squares-rU9s8st8.js +0 -1
- package/dist/assets/use-body-scroll-lock-8ObBdX00.js +0 -1
- package/dist/assets/use-bookmarks-BrjNq3T_.js +0 -1
- package/dist/assets/use-bundled-avatar-components-C6-AuQ2I.js +0 -2
- package/dist/assets/use-bus-subscription-DfxTm1-Q.js +0 -1
- package/dist/assets/use-checkout-dismiss-refresh-CjgC7Pck.js +0 -1
- package/dist/assets/use-command-palette-sections-tRUwMswg.js +0 -1
- package/dist/assets/use-copy-to-clipboard-B4c7SAc-.js +0 -1
- package/dist/assets/use-discord-nudge-BkpFjoOQ.js +0 -1
- package/dist/assets/use-edge-swipe-CCn4_Vm3.js +0 -1
- package/dist/assets/use-edge-swipe-back-xU9GuipH.js +0 -2
- package/dist/assets/use-edit-app-DDA6_WrI.js +0 -1
- package/dist/assets/use-effective-timezone-BfyKw5_H.js +0 -1
- package/dist/assets/use-element-size-CVF6o81H.js +0 -1
- package/dist/assets/use-hotkey-recorder-IMOc7G5D.js +0 -1
- package/dist/assets/use-invite-link-dialog-CvA_-72H.js +0 -1
- package/dist/assets/use-is-mobile-DYVRtRin.js +0 -1
- package/dist/assets/use-is-org-ready-B6oCKWeF.js +0 -1
- package/dist/assets/use-local-file-info-CSgzMBYt.js +0 -1
- package/dist/assets/use-media-query-BMHGif0t.js +0 -1
- package/dist/assets/use-obscure-credits-flag-CWxw1xHq.js +0 -1
- package/dist/assets/use-onboarding-login-CJ6HY3Pk.js +0 -1
- package/dist/assets/use-platform-assistant-id-DwSyMaOn.js +0 -1
- package/dist/assets/use-platform-gate-s29eeyq-.js +0 -1
- package/dist/assets/use-reduced-motion-CVyEdyEe.js +0 -1
- package/dist/assets/use-return-to-short-circuit-Bx5s2Syg.js +0 -1
- package/dist/assets/use-save-twilio-credentials-Zjhi1c0P.js +0 -1
- package/dist/assets/use-side-list-room-BT-2EM5d.js +0 -1
- package/dist/assets/use-skill-actions-BtnAACsE.js +0 -1
- package/dist/assets/use-skill-detail-files-B_E6xY9x.js +0 -1
- package/dist/assets/use-sticky-profiles-DpkWeMmN.js +0 -1
- package/dist/assets/use-stt-language-selection-BWJdaCRu.js +0 -1
- package/dist/assets/use-subagent-card-data-CfuRPesp.js +0 -1
- package/dist/assets/use-supports-bookmarks-Qhc5HpKD.js +0 -1
- package/dist/assets/use-supports-credentials-settings-BD0GXxL7.js +0 -1
- package/dist/assets/use-supports-inference-profiles-DS2ZLoNc.js +0 -1
- package/dist/assets/use-swipe-horizontal-B9YOWcB6.js +0 -1
- package/dist/assets/use-touch-mobile-hfZPfT1P.js +0 -1
- package/dist/assets/use-transcript-message-by-id-DfWH7JRN.js +0 -1
- package/dist/assets/use-transcript-messages-CFkvE46_.js +0 -3
- package/dist/assets/use-truncated-blob-text-DmnckNwK.js +0 -1
- package/dist/assets/use-voice-sample-preview-B8HUywXz.js +0 -1
- package/dist/assets/useInfiniteQuery-Dz6qbDTQ.js +0 -1
- package/dist/assets/useMutation-Cl7cazkm.js +0 -1
- package/dist/assets/useQueries-RuiDsyUH.js +0 -1
- package/dist/assets/useQuery-BtL9k7Sh.js +0 -1
- package/dist/assets/user-DqmJs6-I.js +0 -1
- package/dist/assets/user-plus-Bg01QRAF.js +0 -1
- package/dist/assets/users-DLjK4Ffo.js +0 -1
- package/dist/assets/utils-CAI1IDgW.js +0 -1
- package/dist/assets/viewer-store-CHptQmkY.js +0 -1
- package/dist/assets/voice-input-device-DsSHVzmw.js +0 -1
- package/dist/assets/voice-page-Dgcf5OOp.js +0 -1
- package/dist/assets/voice-providers-note-nJKW4coW.js +0 -1
- package/dist/assets/volume-2-DQKLkySB.js +0 -1
- package/dist/assets/weather-forecast-display-_NYO0wBC.js +0 -1
- package/dist/assets/web-8Dh87AZ1.js +0 -1
- package/dist/assets/web-BAQ66WKm.js +0 -1
- package/dist/assets/web-BFD28UZm.js +0 -1
- package/dist/assets/web-BcIK5wrq.js +0 -1
- package/dist/assets/web-C_sL6qhW.js +0 -1
- package/dist/assets/web-D0e5_5xl.js +0 -1
- package/dist/assets/web-D4Rr20FV.js +0 -1
- package/dist/assets/web-iI5WHtNC.js +0 -1
- package/dist/assets/web-qqG-3jDd.js +0 -1
- package/dist/assets/welcome-screen-DK4_01J3.js +0 -1
- package/dist/assets/widget-snapshot-OH8xHYY2.js +0 -1
- package/dist/assets/workflow-detail-panel-TqYAg0bB.js +0 -1
- package/dist/assets/workflow-kvRB4Mc5.js +0 -1
- package/dist/assets/workflow-status-B_zEZCnR.js +0 -1
- package/dist/assets/workflow-store-DH4q15s9.js +0 -1
- package/dist/assets/workspace-page-Dbwb2RCx.js +0 -1
- package/dist/assets/workspace-path-links-Y-WgBhhL.js +0 -1
- package/dist/assets/workspace-theme-tokens-DmrDqHwx.js +0 -1
- package/dist/assets/workspace-tree-query-DnEMWZ1K.js +0 -1
- package/dist/assets/wrench-ajjC5omI.js +0 -1
- package/dist/assets/x-nhRPd-Mz.js +0 -1
- package/dist/assets/xterm-addon-fit-DIrY4yvs.js +0 -1
- package/dist/assets/zap-Db0KA7N4.js +0 -1
- /package/dist/assets/{account-Cs9SXbU1.js → account-B6zEi6O8.js} +0 -0
- /package/dist/assets/{account-DWeaNEN6.js → account-WSklJ2-s.js} +0 -0
- /package/dist/assets/{app-types-CpnkPGh8.js → app-types-BSxLQFrc.js} +0 -0
- /package/dist/assets/{credential-requests-D74qo-et.js → credential-requests-DQ9WS6Rl.js} +0 -0
- /package/dist/assets/{credential-requests-BsHMMFoG.js → credential-requests-DUwvVpZo.js} +0 -0
- /package/dist/assets/{definitions-BKQ6A5IV.js → definitions-BTBjNf1i.js} +0 -0
- /package/dist/assets/{definitions-Bi8Nex3B.js → definitions-Dz0UVs0Z.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-81v3IYMV.js → emoji-catalog-data-a3DXKyhe.js} +0 -0
- /package/dist/assets/{format-file-size-gDJ7ppQ0.js → format-file-size-BCpFMv3k.js} +0 -0
- /package/dist/assets/{home-C5CVL0Ta.js → home-BWUNWNMl.js} +0 -0
- /package/dist/assets/{home-QpGM3cDE.js → home-DJ6q91Qp.js} +0 -0
- /package/dist/assets/{library-mD_34-zu.js → library-Bu_eLt14.js} +0 -0
- /package/dist/assets/{library-a7r2rPRX.js → library-Diqzwx-J.js} +0 -0
- /package/dist/assets/{link-click-LjKsC7uu.js → link-click-DpfLT-iQ.js} +0 -0
- /package/dist/assets/{logs-DYhiKdQ8.js → logs-Bs19Ze4Q.js} +0 -0
- /package/dist/assets/{logs-CwEMxFk_.js → logs-FJQpRVDW.js} +0 -0
- /package/dist/assets/{machine-sizes-DOMlCbKb.js → machine-sizes-C3ptouhz.js} +0 -0
- /package/dist/assets/{onboarding-step-layout-_Fbi43YU.js → onboarding-step-layout-BlSoa02H.js} +0 -0
- /package/dist/assets/{plugin-attribution-7tkVwdle.js → plugin-attribution-c6x0DrZM.js} +0 -0
- /package/dist/assets/{profile-metadata-BPGeIeNj.js → profile-metadata-Bk4pj7o_.js} +0 -0
- /package/dist/assets/{radio-card-nav-C67JvVkE.js → radio-card-nav-DlRweN3g.js} +0 -0
- /package/dist/assets/{remote-web-Btj-E-og.js → remote-web-9YsnKwue.js} +0 -0
- /package/dist/assets/{remote-web-yAGitwPt.js → remote-web-bapYzahN.js} +0 -0
- /package/dist/assets/{chunk-jRWAZmH_.js → rolldown-runtime-BM3Ffeng.js} +0 -0
- /package/dist/assets/{schedules-K8jULmC8.js → schedules-CYD1CzCP.js} +0 -0
- /package/dist/assets/{schedules-Dd44UKOx.js → schedules-DhwNRBkz.js} +0 -0
- /package/dist/assets/{terminal-CazBoirG.js → terminal-7pMYRiby.js} +0 -0
- /package/dist/assets/{terminal-DP646Xj3.js → terminal-BMbpDjYx.js} +0 -0
- /package/dist/assets/{src-CfUWwwYf.css → vendor-CfUWwwYf.css} +0 -0
- /package/dist/assets/{workspace-Dva7bu2g.js → workspace-BAHtR2RN.js} +0 -0
- /package/dist/assets/{workspace-xgS4oaDo.js → workspace-BnkQd2SU.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{xi as e}from"./icons-CSdHOix6.js";var t=e(`repeat`,[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{O as t}from"./vendor-WUN87CSE.js";import{b as n,f as r,r as i,t as a}from"./react-DPM_L_aA.js";import{uv as o}from"./index-7XDiAJ-A.js";var s=e(n(),1),c=a(),l=[{claim:`Software engineer based in Austin, TX`,confidence:`confident`,sources:[`https://github.com/example-dev`]},{claim:`Product engineer at an early-stage AI startup`,confidence:`confident`,sources:[`https://example.com/team`]},{claim:`Maintains an open-source CLI tool for local LLM evaluation and tooling`,confidence:`confident`,sources:[`https://github.com/example-dev`,`https://example.com/project`]},{claim:`Primarily writes TypeScript and Go`,confidence:`confident`,sources:[`https://github.com/example-dev`]},{claim:`Came up through a coding bootcamp rather than a CS degree`,confidence:`maybe`,sources:[]}];function u(){let{t:e}=t(`chat`);r();let[n,a]=(0,s.useState)(`results`),[u,d]=(0,s.useState)(()=>new Map);return l.map((e,t)=>({fact:e,index:t})),(0,c.jsx)(i,{to:o.assistant,replace:!0})}export{u as ResearchMockPage};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{A as t,O as n,Y as r,Yn as i,ar as a,c as o,d as s,f as c,in as l,l as u,m as d,on as f,p,sn as m}from"./vendor-WUN87CSE.js";import{b as h,f as g,g as _,t as v,y}from"./react-DPM_L_aA.js";import{A as b,J as x,Qn as S,_t as C,f as w,fi as T,i as E,pi as D,st as O,tn as k}from"./icons-CSdHOix6.js";import{$_ as A,Bm as j,Cm as ee,Cs as M,Di as N,Dy as P,Fm as te,Gf as ne,Gr as re,Gt as ie,Im as F,Io as I,Jr as ae,Jt as oe,Kr as L,L_ as se,Mh as R,Mr as z,Nm as B,O_ as ce,P_ as le,Pm as ue,Pr as de,Ps as fe,Ri as pe,Rm as me,Sr as he,Ss as ge,Th as _e,Ti as ve,Tm as ye,Tv as be,Uf as xe,Ur as Se,Wh as Ce,Xr as we,Yl as Te,Yr as Ee,Zm as V,b_ as De,ca as Oe,ci as ke,da as Ae,ev as je,fo as Me,hy as Ne,io as H,jh as U,jr as W,la as Pe,mi as G,no as Fe,nv as Ie,pa as Le,qf as Re,rp as ze,si as K,th as Be,ua as Ve,ui as q,uv as He,vv as J,vy as Ue,wh as We,wm as Ge,wo as Ke,ws as qe,wy as Y,xy as Je,zm as Ye,zv as Xe}from"./index-7XDiAJ-A.js";import{a as Ze,c as Qe,i as $e,l as et,n as tt,r as nt,t as rt,u as it}from"./latest-assistant-text-CVRVSoFg.js";import{n as at,r as ot,t as st}from"./onboarding-step-layout-BlSoa02H.js";import{a as ct,i as lt,n as ut,r as dt,t as ft}from"./avatar-random-BEjqLOzH.js";import{n as pt}from"./plugin-attribution-c6x0DrZM.js";var X=e(h(),1),mt=`grounded`,ht=12;function gt(e,t){let n=e.slice(0,ht).map(e=>`- ${e.name} — ${e.description}`).join(`
|
|
2
|
+
`);return n?`
|
|
3
|
+
Capabilities you can offer me — specialized skillsets you can invoke on my behalf, not generic chat:
|
|
4
|
+
${n}
|
|
5
|
+
|
|
6
|
+
Add a "plugins" array as the FIRST key in your JSON object, ${t?`before "claims" and "suggestions"`:`before "claims"`}: the 1-2 capabilities from the list above (exact names) that best fit who I am — judged by what you researched about my real role, stack, and day-to-day work. (Emit it first so setup can start while you finish the rest.) These get set up for me automatically as part of getting started, so pick by overall fit to ME, not to any single suggestion. Prefer fewer over forcing a match; use [] if nothing clearly fits. Example: "plugins": ["<exact name from the list above>"]. ${t?`Don't reference the setup in the claims or suggestions text.`:`Don't reference the setup in the claims text.`}
|
|
7
|
+
`:``}function _t({firstName:e,lastName:t,occupation:n,hobbies:r,timezone:i},a=[],{includeSuggestions:o=!0}={}){let s=[e.trim(),t.trim()].filter(Boolean).join(` `),c=n.trim(),l=(r??[]).map(e=>e.trim()).filter(Boolean).join(`, `),u=i?.trim()??``,d=gt(a,o),f=d?`"plugins": ["<exact name from the list above>"], `:``,p=[s?`My name is ${s}.`:``,c?`I work as ${c}.`:``,l?`My hobby is ${l}.`:``].filter(Boolean).join(` `),m=p?[p,u?`My timezone is ${u}.`:``].filter(Boolean).join(` `):`I'd like you to get to know me before we start working together.`,h=o?` "suggestions": [ { "suggestion": "I'll find the 3 newest arXiv eval papers worth your time", "prompt": "Find me the 3 newest arXiv eval papers worth reading." }, { "suggestion": "I'll draft a crisp summary of the latest model-serving trade-offs", "prompt": "Draft me a short summary of the latest model-serving trade-offs." }, { "suggestion": "Connect GitHub and I'll triage your stalest issues", "prompt": "Connect to GitHub and triage my oldest open issues." }, { "suggestion": "I'll plan a weekend climbing trip near Boulder", "prompt": "Plan me a weekend climbing trip near Boulder." } ]`:``,g=`{ ${f}"claims": [ { "claim": "Senior engineer at an AI infra startup", "confidence": "confident", "sources": ["https://linkedin.com/in/example-user", "https://example-infra.com/about"] }, { "claim": "Based in Boulder, CO", "confidence": "maybe", "sources": ["https://linkedin.com/in/example-user"] }, { "claim": "Into climbing and the outdoors", "confidence": "guessing", "sources": [] } ]${h?`,${h}`:``} }`;return`${m}
|
|
8
|
+
|
|
9
|
+
Get to know me. Search the web for what's publicly known about me, and infer a handful of things about who I am: what I do, my role, where I'm based, what I'm into, anything that would help you assist me better. Prefer sources people author about themselves — LinkedIn, a personal site, GitHub, an employer's team page, published work, public social profiles. Never fetch or cite people-search or background-check aggregators (Instant Checkmate, Spokeo, BeenVerified, TruePeopleSearch, Whitepages, and similar); data-broker directories (ZoomInfo, RocketReach, Apollo) may corroborate another source but must never be a claim's only basis.
|
|
10
|
+
|
|
11
|
+
IDENTITY GATE — decide who a page is about before you use it: a name match alone is NEVER enough to attribute a page to me. Attribute it to me only when it also corroborates something I stated — my role, my hobby, or a location consistent with my timezone if I gave one. If several people share my name and none clears that bar, or you find no verifiable match at all, then I have no public profile you can use: return ONLY inferences from what I stated above, each labeled "guessing" with "sources": []. An honest near-empty card beats a stranger's biography. If my details above read as placeholder or joke input rather than a real identity, skip the web search and return an empty claims array.
|
|
12
|
+
|
|
13
|
+
Treat the name, role, and hobby I provided above as first-party context from me. Use public sources to enrich that context, not to override or correct it. If public sources use a different title or omit part of my stated role, do not frame my stated role as wrong; mention the public title only as supporting nuance when it is useful, and keep ${o?`claims and suggestions`:`claims`} aligned with my stated role.
|
|
14
|
+
|
|
15
|
+
CRITICAL: your final reply must be ONLY a JSON object. No preamble, no explanation, no prose, nothing before or after it. Do your thinking and searching, then respond with exactly this shape and nothing else:
|
|
16
|
+
|
|
17
|
+
${g}
|
|
18
|
+
|
|
19
|
+
Rules for "claims":
|
|
20
|
+
|
|
21
|
+
AT MOST 5 claims, typically 3 to 4. Never pad the list or inflate a confidence tier to seem thorough.
|
|
22
|
+
Phrase each claim in third person as a short headline ("Senior engineer at an AI infra startup", "Based in Boulder, CO", "Active climber on Mountain Project"). No multi-clause sentences, no em-dash asides, no explanations. Good: "Contributed to Chirps (vector-DB security)". Bad: "You've done real work in vector database security. You contributed to Chirps, a tool for scanning vector DBs for sensitive data".
|
|
23
|
+
Each claim must be independently true-or-false so I can remove the ones that are wrong.
|
|
24
|
+
Every specific in a claim (employer, title, publication, city) must appear in a source you actually fetched this turn — never synthesize or embellish specifics a source doesn't state.
|
|
25
|
+
"confidence" is earned per the identity gate: "confident" needs 2+ independent gate-passing sources, "maybe" needs exactly one, and a claim with no sources is an inference from my stated details and must be "guessing".
|
|
26
|
+
"sources": 0 to 3 URLs you actually used as evidence for that specific claim. Use [] for pure inferences.
|
|
27
|
+
${o?`Rules for "suggestions":
|
|
28
|
+
|
|
29
|
+
Each suggestion is an object with two fields:
|
|
30
|
+
"suggestion": the offer in YOUR voice (the assistant), exactly as it appears on the clickable card — first-person "I" refers to you (whatever your name). Pattern: "I'll [verb] [specific artifact]" or "Connect me to [integration] and I'll [verb] [artifact]." Lead with the offer; no intake question in front of it — you gather the details in the follow-up conversation after the click.
|
|
31
|
+
"prompt": the same offer re-voiced as the message sent on the user's behalf when they click, in the USER's first person ("I"/"my" = the user) — what they'd say to take you up on it (suggestion "I'll find you 3 papers" → prompt "Find me 3 papers worth reading"). State the request; don't echo the assistant-voiced wording and don't ask a question back.
|
|
32
|
+
|
|
33
|
+
Generate EXACTLY 4 suggestions covering four DIFFERENT capabilities, each making me think "wait, you can do that?" Draw on your range — a quick researched answer, a recurring brief or monitor, a doc drafted in a live editor, an integration (GitHub, Gmail, Calendar, Slack, Linear) connected with a first action, or a hobby hook if research surfaced one — but pick what genuinely fits; don't force a fixed set.
|
|
34
|
+
Ground every suggestion in what you actually learned about me — my real role, stack, industry, and (if given) hobby. Specific to me, not generic assistant stuff; skip bare "summarize" or "draft a post."
|
|
35
|
+
CRITICAL: every suggestion must be a fast win you can deliver in the first reply, never a long-running build. NEVER suggest building an app, dashboard, tool, site, or tracker, or any multi-step "build me a ___" project — those kill the first impression. The ambitious build can come later in the conversation, never on the first card.
|
|
36
|
+
Keep each SHORT and skimmable: under 10 words, ONE clause, ONE artifact, no lists of three ("X, Y, and Z"). The reader scans four cards in seconds — a long line loses them.
|
|
37
|
+
`:``}${d}
|
|
38
|
+
${o?`Don't include anything sensitive or private. If the identity gate leaves you with very little, return only the honest "guessing" claims my stated details support, and lean on broadly useful suggestions for my role.`:`Don't include anything sensitive or private. If the identity gate leaves you with very little, return only the honest "guessing" claims my stated details support.`}
|
|
39
|
+
Keep every string value simple so the JSON always parses: one line, no line breaks inside a value, and NO double-quote characters inside a value — use single quotes (or none) for emphasis, quoted names, or tool names. Output ONLY the JSON object. No code fence, no extra text.`}function vt({hostingParam:e,localMode:t,gatewayAuthSession:n}){return t?e===null?n:e!==`vellum-cloud`:!1}var yt=`Failed to start your assistant. Please try again.`,bt=`Your assistant is taking longer than expected. Please try again.`,xt=`We couldn't confirm your organization. Please try again.`,St=100;function Ct({adoptExisting:e=!1,adoptAssistantId:t,postCheckoutReturn:n=!1}={}){let r=i(),[o,s]=(0,X.useState)(!1),[c,l]=(0,X.useState)(null),[u,d]=(0,X.useState)(null),f=(0,X.useRef)(!1),p=(0,X.useRef)([]),m=(0,X.useRef)(null),h=(0,X.useRef)(!1),g=(0,X.useRef)(null),_=(0,X.useRef)(!1);(0,X.useEffect)(()=>(h.current=!1,()=>{h.current=!0,g.current&&=(clearTimeout(g.current),null)}),[]);let v=(0,X.useCallback)(e=>{if(!(h.current||m.current)){m.current={kind:`ready`,id:e},s(!0);for(let t of p.current)t.resolve(e);p.current=[]}},[]),y=(0,X.useCallback)(e=>{if(h.current||m.current)return;m.current={kind:`error`,message:e},d(e);let t=Error(e);for(let e of p.current)e.reject(t);p.current=[]},[]),b=(0,X.useCallback)(()=>{if(f.current)return;f.current=!0;let i=_.current,o=Date.now(),s=()=>Date.now()-o>=ut,c=e=>new Promise(t=>{if(h.current){t();return}g.current=setTimeout(()=>{g.current=null,t()},e)}),u=async()=>{let e=Date.now(),t=!1;for(;;){if(h.current)return!1;let n=ze();if(n===`ready`)return!0;if(!t&&(n===`unavailable`||i))t=!0,Ge.getState().fetchOrganizations();else if(n===`unavailable`||Date.now()-e>=5e3)return y(xt),!1;await c(St)}};(async()=>{if(e&&t){let e=De(t);if(e){l(e.assistantId),v(e.assistantId);return}}let i=e?t:void 0;if(!e){if(!await u())return;ce()&&(A(),Ie(null));try{let e=await j();if(e.ok)i=e.data.id,l(e.data.id),n&&e.status===201&&ct(e.data.id,ft(Me),r);else{if(ue(e.status,e.error)){y(B);return}if(!F(e.status)){y(be(e.error,void 0,yt));return}}}catch(e){J(e,{context:`research_background_hatch`})}}let d;for(;!d;){if(h.current)return;if(s()){y(bt);return}try{let t=await me(i);if(h.current||i&&!t.ok&&t.status===404&&(i=void 0,t=await me(),h.current))return;let n=te(t);if(n.kind===`active`&&t.ok){d=t.data.id,l(d),!e&&ce()&&se(d,t.data.name,ee()??void 0);break}if(n.kind===`error`){y(n.message);return}}catch(e){J(e,{context:`research_background_hatch_poll`})}await c(dt)}if(e)for(;!await le();){if(h.current)return;if(s()){y(bt);return}await c(dt)}else for(;;){if(h.current)return;try{if((await Ye(d)).ok)break}catch{}if(s()){y(bt);return}await c(dt)}if(!e&&n){let e=await lt({assistantId:d,postCheckoutReturn:n,managedHatch:!0,hatchStartMs:o,isCancelled:()=>h.current,registerTimer:e=>{g.current=e}});if(h.current)return;if(e===`health_timeout`){a(`Onboarding hatch wait exceeded timeout`,{level:`warning`,extra:{maxWaitMs:ut,stage:`post_resize_health`}}),y(bt);return}}v(d)})()},[y,v,e,t,n,r]);return{start:b,retry:(0,X.useCallback)(()=>{_.current=!0,f.current=!1,m.current=null,d(null),s(!1),l(null),b()},[b]),ready:o,assistantId:c,error:u,awaitReady:(0,X.useCallback)(()=>{let e=m.current;return e?.kind===`ready`?Promise.resolve(e.id):e?.kind===`error`?Promise.reject(Error(e.message)):new Promise((e,t)=>{p.current.push({resolve:e,reject:t})})},[])}}async function wt(e,t){try{await V({path:{assistant_id:e,id:t},throwOnError:!1})}catch(e){J(e,{context:`research_onboarding_archive`})}}var Tt=[`admin-copilot`],Et=[{plugin:`marketing-expert`,keywords:[`founder`,`cofounder`,`co founder`,`ceo`,`cmo`,`chief executive`,`chief marketing`,`entrepreneur`,`marketing`,`marketer`,`growth`,`brand`,`content`,`copywriter`,`copywriting`,`seo`,`demand gen`,`demand generation`,`sales`,`account executive`,`business development`,`creator`,`social media`,`community manager`]},{plugin:`git-workflow`,keywords:`developer.swe.programmer.coder.devops.dev ops.sre.site reliability.software engineer.software architect.backend engineer.back end engineer.frontend engineer.front end engineer.full stack engineer.fullstack engineer.platform engineer.infrastructure engineer.data engineer.machine learning engineer.ml engineer.qa engineer.embedded engineer.security engineer.staff engineer.principal engineer.solutions architect.tech lead.technical lead.engineering manager.engineering lead.head of engineering.director of engineering.vp of engineering.vp engineering.cto`.split(`.`)}];function Dt(e){return` ${e.toLowerCase().replace(/[^a-z0-9]+/g,` `).trim()} `}function Ot(e,t){return e.includes(` ${t} `)}function kt(e){let t=Dt(e),n=[];for(let{plugin:e,keywords:r}of Et)r.some(e=>Ot(t,e))&&n.push(e);return n}function At(e,t){let n=[...Tt,...pt(),...kt(e)],r=new Set,i=[];for(let e of n)!t.has(e)||r.has(e)||(r.add(e),i.push(e));return i}var jt=1500,Mt=12e4,Nt=2;function Pt({complete:e,stableReads:t}){return e&&t>=Nt}function Ft({sawCompletePayload:e}){return e?`done`:`error`}var It=`vellum-ai`,Lt=new Set([`simple-memory`,`level-up`]);function Rt(e){let t=e.trim().split(/(?<=\.)\s/)[0]?.trim()??e.trim();return t.length>100?`${t.slice(0,97).trimEnd()}…`:t}function zt(e){return e?.split(`/`)[0]?.trim()??``}function Bt(e){let t=[],n=new Set;for(let r of e){let e=r.name?.trim(),i=r.description?.trim();!e||!i||zt(r.source?.repo)===It&&(Lt.has(e)||(n.add(e),t.push({name:e,description:Rt(i)})))}return{capabilities:t,validNames:n}}async function Vt(e){try{return Bt((await R({path:{assistant_id:e},throwOnError:!1})).data?.matches??[])}catch(e){return J(e,{context:`research_onboarding_catalog`}),{capabilities:[],validNames:new Set}}}async function Ht(e,t){try{await U({path:{assistant_id:e},body:{name:t},throwOnError:!1})}catch(e){J(e,{context:`research_onboarding_install`})}}var Ut=32;function Wt(e,t){return e.filter(e=>e.confidence===t).length}async function Gt({assistantId:e,conversationId:t,status:n,subject:r,claims:i,suggestions:a,plugins:o,installedPlugins:s}){try{await Ce({path:{assistant_id:e},body:{type:`onboarding_research`,...n===`done`?{daemon_event_id:`onboarding_research:${t}`}:{},fields:{conversation_id:t,status:n,self_reported_occupation:r.occupation,self_reported_hobbies:(r.hobbies??[]).slice(0,Ut),self_reported_timezone:r.timezone,claims:i,claim_count:i.length,claims_confident:Wt(i,`confident`),claims_maybe:Wt(i,`maybe`),claims_guessing:Wt(i,`guessing`),suggestions:a,suggestion_count:a.length,plugins:o,installed_plugins:s}},throwOnError:!1})}catch(e){J(e,{context:`research_onboarding_telemetry`})}}function Kt(e){return{status:e,claims:[],droppedClaims:[],suggestions:[],installedPlugins:[],pluginCatalog:{}}}var qt=e=>new Promise(t=>setTimeout(t,e));function Jt({role:e,validNames:t,modelPlugins:n}){return[...new Set([...At(e,t),...n.filter(e=>t.has(e))])]}function Yt(){let[e,t]=(0,X.useState)(()=>Kt(`idle`)),n=(0,X.useRef)(0),r=(0,X.useRef)(null),a=(0,X.useRef)(new Map),o=(0,X.useRef)(Promise.resolve()),s=i(),c=(0,X.useCallback)((e,t)=>{let n=a.current;n.clear();for(let r of e)n.set(r,(async()=>{try{await Ht(await t(),r)}catch{}})())},[]),l=(0,X.useCallback)(({awaitAssistantId:e,subject:i,conversationTitle:c,resumeConversationId:l,onConversationCreated:u,includeSuggestions:d=!0})=>{let f=JSON.stringify(i);if(r.current===f)return;r.current=f;let p=n.current+1;n.current=p;let m=()=>n.current!==p,h=()=>{};o.current=new Promise(e=>{h=e}),a.current.clear(),t(Kt(`running`)),(async()=>{let n,r,o=!1;try{let s=await e();if(n=s,m())return;let{capabilities:f,validNames:p}=await Vt(s);if(m())return;let g=Object.fromEntries(f.map(e=>[e.name,e.description]));t(e=>({...e,pluginCatalog:g})),p.size===0&&h();let _=a.current,v=At(i.occupation,p);for(let e of v)_.has(e)||_.set(e,Ht(s,e));v.length>0&&t(e=>({...e,installedPlugins:v}));let y=async e=>{let t=tt({conversationId:e,content:_t(i,f,{includeSuggestions:d}),transport:`web`});try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(t.clientTimezone=e)}catch{}return!!(await _e({path:{assistant_id:s},body:t,throwOnError:!1})).response?.ok},b=async()=>{let e=await Be({path:{assistant_id:s},body:{conversationType:`background`,...c?{title:c}:{}},throwOnError:!1});r=e.data?.id;let t=e.data?.id;if(!(!e.response?.ok||!t))return u?.(t),t},x;if(l){let e=await We({path:{assistant_id:s},query:{conversationId:l},throwOnError:!1});if(m())return;if(e.response?.ok&&(x=l,r=l,!(e.data?.processing===!0||(e.data?.messages??[]).length>0))){if(!await y(x)){t(e=>({...e,status:`error`}));return}if(m())return}}if(!x){if(x=await b(),m())return;if(!x){t(e=>({...e,status:`error`}));return}if(!await y(x)){t(e=>({...e,status:`error`}));return}if(m())return}let S=Date.now()+Mt,C=``,w=0,T=!1,E=[],D=[],O=[],k=v;for(;Date.now()<S;){if(await qt(jt),m())return;let e=await We({path:{assistant_id:s},query:{conversationId:x},throwOnError:!1});if(m())return;let n=rt(e.data?.messages??[]);if(n){let{claims:e,droppedClaims:r,suggestions:a,plugins:c,pluginsResolved:l,complete:u}=Ee(n),d=c.filter(e=>p.has(e));for(let e of d)_.has(e)||_.set(e,Ht(s,e));l&&h();let f=Jt({role:i.occupation,validNames:p,modelPlugins:d});if(t({status:`running`,claims:e,droppedClaims:r,suggestions:a,installedPlugins:f,pluginCatalog:g}),E=e,D=a,O=c,k=f,u&&(o=!0),u&&!T&&(T=!0,Gt({assistantId:s,conversationId:x,status:`done`,subject:i,claims:e,suggestions:a,plugins:c,installedPlugins:f})),w=n===C?w+1:0,C=n,Pt({complete:u,stableReads:w}))break}}if(m())return;T||(T=!0,Gt({assistantId:s,conversationId:x,status:`error`,subject:i,claims:E,suggestions:D,plugins:O,installedPlugins:k})),t(e=>({...e,status:Ft({sawCompletePayload:o})}))}catch(e){if(m())return;J(e,{context:`research_onboarding_runner`}),t(e=>({...e,status:`error`}))}finally{h(),n&&r&&(await wt(n,r),Ke(s,n))}})()},[s]),u=(0,X.useCallback)(()=>{n.current+=1,r.current=null,a.current.clear(),o.current=Promise.resolve(),t(Kt(`idle`))},[]),d=(0,X.useCallback)(async()=>{await o.current,await Promise.all([...a.current.values()])},[]),f=(0,X.useCallback)((e,r)=>{n.current+=1,t(e),r&&e.installedPlugins.length>0&&c(e.installedPlugins,r)},[c]);return{...e,start:l,awaitPluginInstalls:d,hydrate:f,reinstallPlugins:c,reset:u}}function Xt({removedClaims:e,rejectedAll:t}){if(t)return[`Correction: none of what you found in that web search is actually me —`,`it looks like you matched someone else with a similar name. Please`,`disregard everything from that search and don't remember any of it as`,`true about me. We'll build up what you actually know about me from here,`,`as we talk.`].join(` `);let n=e.map(e=>e.trim()).filter(Boolean);return n.length===0?null:[`Quick correction on what you found about me — these aren't true, so please`,`disregard them and don't remember them as facts about me:`,``,...n.map(e=>`- ${e}`)].join(`
|
|
40
|
+
`)}async function Zt({assistantId:e,conversationId:t,removedClaims:n,rejectedAll:r}){let i=Xt({removedClaims:n,rejectedAll:r});if(i){try{let n=tt({conversationId:t,content:i,transport:`web`});await _e({path:{assistant_id:e},body:n,throwOnError:!1})}catch(e){J(e,{context:`research_onboarding_correction`})}await wt(e,t)}}var Qt=1500,$t=12e4,en=e=>new Promise(t=>setTimeout(t,e));async function tn({awaitAssistantId:e,values:t,userName:n,assistantName:r}){let i,a;try{i=await e();let o=await Be({path:{assistant_id:i},body:{conversationType:`background`,title:`Updating personality`},throwOnError:!1});if(a=o.data?.id,!o.response?.ok||!a)return;let s=tt({conversationId:a,content:et(t,n,r),transport:`vellum`});if(!(await _e({path:{assistant_id:i},body:s,throwOnError:!1})).response?.ok)return;await Qe(i,Ze(t));let c=Date.now()+$t,l=``,u=0,d=!1;for(;Date.now()<c;){await en(Qt);let e=await We({path:{assistant_id:i},query:{conversationId:a},throwOnError:!1}),t=rt(e.data?.messages??[]);if(t&&(u=t===l?u+1:0,l=t),e.data?.processing===!0&&(d=!0),it({processing:e.data?.processing,sawProcessing:d,hasReply:t.length>0,stableReads:u}))break}}catch(e){J(e,{context:`research_onboarding_personality`})}finally{if(i&&a)try{await V({path:{assistant_id:i,id:a},throwOnError:!1})}catch(e){J(e,{context:`research_onboarding_personality_archive`})}}}function nn(e){return`id \`scope_${e}\`, \`data: {"${he}": "${e}"}\``}function rn(e){let t=e?.trim();return`You're about to begin your first conversation.${t?`\nYour name is ${t} — introduce yourself as ${t}.`:``}
|
|
41
|
+
Respond with a warm and engaging greeting. Be interesting, be real. This is your chance to get to know and impress the user.
|
|
42
|
+
End the greeting text with one short question asking where they'd like to start, phrased so nothing feels off the table (e.g. "…or is there anything else on your mind entirely?").
|
|
43
|
+
Then call the \`ui_show\` tool exactly once: \`surface_type: "choice"\`, \`data.selectionMode: "single"\`, no \`title\` (or a very short one), and exactly three options in this order:
|
|
44
|
+
1. ${nn(`work`)} — a concrete offer grounded in their work or role from your Onboarding Context (occupation, daily tools, work-related research findings).
|
|
45
|
+
2. ${nn(`personal`)} — a concrete offer grounded in their hobbies, interests, or personal research findings.
|
|
46
|
+
3. ${nn(`both`)} — an "all of the above" invitation.
|
|
47
|
+
An option's title becomes the user's visible reply bubble when they tap it, so every title must read naturally in the user's voice — imperative or neutral, six words or fewer (e.g. "Help me plan my next ride", never "I can plan your next ride"). Titles only: never set \`description\` on any option — the three options must scan in a single glance, and your greeting text already carries the color.
|
|
48
|
+
These options are conversation starters, not a menu: never imply the user is limited to them, and your closing question itself must invite free-form answers.
|
|
49
|
+
After the \`ui_show\` result comes back, stop — output no further text. If \`ui_show\` errors or is unavailable, just end with the text question alone; the user will type. Do not set \`await_action\` or \`persistent\`.
|
|
50
|
+
Keep it short! For this opening greeting only, don't use \`recall\`, don't read any files, and make no tool calls other than that single \`ui_show\`. (This applies to the greeting alone; use your tools normally for everything the user asks afterward.)`}function an(e,t){if(!e)return null;let n=new Date(e);if(Number.isNaN(n.getTime()))return null;try{return new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`,...t?{timeZone:t}:{}}).format(n)}catch{return new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(n)}}var Z=v(),on=(0,X.createContext)(null);function sn({size:e,children:t}){return(0,Z.jsx)(on.Provider,{value:e,children:t})}function cn(){let e=(0,X.useContext)(on),t=z(!e);return e??t}var ln={x:.5,y:.43},un=[-8,6,9,0,7,-6,5,0,-7,4,-5,6];function dn(e){return un[e%un.length]??0}var fn=[1,0,1,0,1,0,1,0,1,0,0],pn=[.72,1],mn=[.4,1],hn=[10,20],gn=50,_n={6:1.1};function vn(e){return(pn[fn[e]??1]??1)*(_n[e]??1)}function yn(e){return mn[fn[e]??1]??1}function bn(e){return hn[fn[e]??1]??20}function xn(e,t){return Math.round(Math.max(130,Math.min(Math.min(e,t)*.4,420)))}function Sn(e,t){return Math.round(Math.max(110,Math.min(Math.min(e,t)*.21,205)))}function Cn(e,t,n){let r=n*.4,i=n*.48;return[{x:i,y:i},{x:e*.3,y:r-t*.03},{x:e*.72,y:r-t*.1},{x:e-i,y:i},{x:e-r,y:t*.72},{x:e-i,y:t-i},{x:i,y:t-i},{x:r,y:t*.5},{x:e-r,y:t*.3},{x:e*.28,y:t-r+t*.05},{x:e*.77,y:t-r}]}function wn(e,t,n,r,i){let a=e.x-t,o=e.y-n,s=Math.hypot(a,o)||1,c=Math.max(r,i);return{x:e.x+a/s*c,y:e.y+o/s*c}}function Tn({components:e,characters:t,centerChar:n,edgeOrder:r,entering:i,exiting:a,onEnterComplete:o,onSelectChar:s}){let{w:c,h:l}=cn(),d=u(),f=c<640,m=new Set([4,7,8,9,10]),h=e=>f&&m.has(e),g=xn(c,l),_=g/2,v=g/2,y=Sn(c,l)/g,b=Sn(c,l),x=(0,X.useMemo)(()=>{let e=new Map;return r.forEach((t,n)=>e.set(t,n)),e},[r]),S=ln.x*c,C=ln.y*l,w=S-_,T=C-_,E=(0,X.useMemo)(()=>Cn(c,l,v),[c,l,v]);return(0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-0 overflow-hidden`,children:[(0,Z.jsx)(`div`,{className:`absolute rounded-[50%] bg-[var(--aux-black,#000)] opacity-20 blur-md`,style:{width:b*.62,height:16,left:S-b*.31,top:C+b*.4}}),t.map((t,r)=>{let u=r===n,f=!d&&i?.char===r,m=!d&&a?.char===r;if(f){let n=E[i.fromSlot],a=wn(n,S,C,c,l),s=vn(i.fromSlot),u=yn(i.fromSlot);return(0,Z.jsx)(p.div,{className:`absolute left-0 top-0`,style:{width:g,height:g,zIndex:gn},initial:!1,animate:{x:[n.x-_,a.x-_,a.x-_,w,w,w],y:[n.y-_,a.y-_,a.y-_,T,T,T],scale:[s,s,s,y*.7,y*1.08,y],opacity:[u,u,0,0,1,1]},transition:{duration:.85,times:[0,.28,.34,.42,.72,1],ease:[`easeIn`,`linear`,`linear`,`easeOut`,`easeOut`]},onAnimationComplete:()=>o(r),children:(0,Z.jsx)(K,{components:e,traits:t,size:g})},r)}if(m){if(h(a.toSlot))return null;let n=E[a.toSlot],i=wn(n,S,C,c,l),o=vn(a.toSlot),s=yn(a.toSlot);return(0,Z.jsx)(p.div,{className:`absolute left-0 top-0`,style:{width:g,height:g,zIndex:bn(a.toSlot)},initial:!1,animate:{x:[w,w,i.x-_,i.x-_,n.x-_,n.x-_],y:[T,T,i.y-_,i.y-_,n.y-_,n.y-_],scale:[y,y*.6,o,o,o*1.1,o],opacity:[1,0,0,s,s,s]},transition:{duration:.85,times:[0,.28,.34,.45,.78,1],ease:[`easeIn`,`linear`,`linear`,`easeOut`,`easeOut`]},children:(0,Z.jsx)(`div`,{style:{transform:`rotate(${dn(a.toSlot)}deg)`},children:(0,Z.jsx)(K,{components:e,traits:t,size:g,breathe:!1})})},r)}let v=x.get(r)??0;if(!u&&h(v))return null;let b=u?{x:S,y:C}:E[v];return(0,Z.jsx)(p.div,{className:`absolute left-0 top-0 ${u?``:`pointer-events-auto cursor-pointer`}`,style:{width:g,height:g,zIndex:u?gn:bn(v)},initial:!1,animate:{x:b.x-_,y:b.y-_,scale:u?y:vn(v),opacity:u?1:yn(v)},transition:d?{duration:0}:{type:`spring`,stiffness:230,damping:26},onClick:u?void 0:()=>s(r),children:(0,Z.jsx)(`div`,{style:{transform:u?void 0:`rotate(${dn(x.get(r)??0)}deg)`},children:(0,Z.jsx)(K,{components:e,traits:t,size:g,breathe:u})})},r)})]})}var En=[{bodyShape:`urchin`,eyeStyle:`goofy`,color:`teal`},{bodyShape:`blob`,eyeStyle:`grumpy`,color:`purple`},{bodyShape:`star`,eyeStyle:`surprised`,color:`orange`},{bodyShape:`blob`,eyeStyle:`gentle`,color:`pink`},{bodyShape:`ninja`,eyeStyle:`angry`,color:`yellow`},{bodyShape:`urchin`,eyeStyle:`curious`,color:`pink`},{bodyShape:`burst`,eyeStyle:`quirky`,color:`orange`},{bodyShape:`ghost`,eyeStyle:`bashful`,color:`green`},{bodyShape:`sprout`,eyeStyle:`dazed`,color:`orange`},{bodyShape:`star`,eyeStyle:`goofy`,color:`teal`},{bodyShape:`flower`,eyeStyle:`angry`,color:`pink`},{bodyShape:`cloud`,eyeStyle:`curious`,color:`yellow`}],Q=Xe(r((e,t)=>({characters:[],selectedIndex:0,ensureGenerated:()=>{t().characters.length>0||e({characters:En,selectedIndex:0})},setCharacterTraits:(t,n)=>e(e=>({characters:e.characters.map((e,r)=>r===t?n:e)})),setSelectedIndex:t=>e({selectedIndex:t}),selectNext:()=>e(e=>({selectedIndex:e.characters.length===0?0:(e.selectedIndex+1)%e.characters.length})),selectPrev:()=>e(e=>({selectedIndex:e.characters.length===0?0:(e.selectedIndex-1+e.characters.length)%e.characters.length}))})));function Dn(){let e=L(),t=Q.use.characters(),n=Q.use.ensureGenerated(),r=u(),{w:i,h:a}=z();(0,X.useEffect)(()=>{e&&n(e)},[e,n]);let o=xn(i,a),s=(0,X.useMemo)(()=>Cn(i,a,o/2),[i,a,o]),c=i<640,l=new Set([4,7,8,9,10]);return!e||t.length===0?null:(0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none fixed inset-0 z-0 overflow-hidden`,children:t.map((t,n)=>{if(n===0)return null;let i=n-1;if(c&&l.has(i))return null;let a=s[i];if(!a)return null;let u=un[i%un.length]??0,d=o*vn(i),f=yn(i),p=bn(i);return(0,Z.jsx)(`div`,{className:`absolute`,style:{left:a.x-d/2,top:a.y-d/2,width:d,height:d,zIndex:p,animation:r?void 0:`character-pop-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) ${.1+n*.05}s both`},children:(0,Z.jsx)(`div`,{style:{opacity:f,transform:`rotate(${u}deg)`},children:(0,Z.jsx)(K,{components:e,traits:t,size:d,breathe:!1})})},n)})})}var On=P(`flex w-full items-center gap-1.5 rounded-md border bg-[var(--field-bg)] px-3`,`border-[var(--field-border)] transition-[border-color,background-color] duration-150 ease-out`,`focus-within:border-[var(--border-active)]`),kn=P(`min-w-0 flex-1 bg-transparent text-body-medium-lighter text-[var(--content-default)]`,`placeholder:text-[var(--content-tertiary)] outline-none`,st);function An(e){return e.trim().toLowerCase()}function jn(e,t,n=[],r=8){let i=An(t),a=new Set(n.map(An)),o=[];for(let t of e)if(!a.has(An(t))&&((i.length===0||An(t).includes(i))&&o.push(t),o.length>=r))break;return o}function Mn({id:e,options:t,highlighted:r,showAddHint:i,onPick:a,onHover:o}){let{t:s}=n(`onboarding`);return(0,Z.jsxs)(`ul`,{id:e,role:`listbox`,className:P(`absolute left-0 right-0 top-full z-50 mt-1.5 max-h-60 overflow-auto`,`rounded-lg bg-[var(--surface-lift)] p-1 shadow-[var(--shadow-popover)]`,`animate-[fadeInUp_0.12s_ease-out]`),children:[t.map((t,n)=>(0,Z.jsx)(`li`,{id:`${e}-opt-${n}`,role:`option`,"aria-selected":n===r,onMouseDown:e=>{e.preventDefault(),a(t.value)},onMouseEnter:()=>o(n),className:P(`flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5`,`text-body-medium-lighter text-[var(--content-default)]`,n===r?`bg-[var(--surface-base)]`:`bg-transparent`),children:t.isAdd?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(O,{size:15,className:`shrink-0 text-[var(--content-tertiary)]`}),(0,Z.jsx)(`span`,{className:`min-w-0 truncate`,children:s(`onboardingAutocomplete.addOption`,{value:t.value})}),(0,Z.jsx)(`span`,{className:`ml-auto shrink-0 text-body-small-default text-[var(--content-tertiary)]`,children:s(`onboardingAutocomplete.enterHint`)})]}):t.value},t.isAdd?`__add__${t.value}`:t.value)),i&&(0,Z.jsx)(`li`,{role:`presentation`,className:`mt-0.5 border-t border-[var(--border-base)] px-2.5 pb-0.5 pt-1.5 text-body-small-default text-[var(--content-tertiary)]`,children:s(`onboardingAutocomplete.freeTextHint`)})]})}function Nn({htmlFor:e,required:t,children:n}){return(0,Z.jsxs)(`label`,{htmlFor:e,className:`text-body-small-default text-[var(--content-secondary)]`,children:[n,t?(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`text-[var(--system-negative-strong)]`,children:` *`}):null]})}function Pn(e,t){(0,X.useEffect)(()=>{function n(n){e.current&&!e.current.contains(n.target)&&t()}return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t])}function Fn({label:e,placeholder:t,values:r,onChange:i,suggestions:a}){let{t:o}=n(`onboarding`),s=(0,X.useId)(),c=`tac-${s}`,l=`tac-list-${s}`,u=(0,X.useRef)(null),[d,f]=(0,X.useState)(``),[p,m]=(0,X.useState)(!1),[h,g]=(0,X.useState)(-1),_=(0,X.useMemo)(()=>jn(a,d,r),[a,d,r]),v=d.trim(),y=(0,X.useMemo)(()=>{if(!v)return!1;let e=An(v);return!(r.some(t=>An(t)===e)||_.some(t=>An(t)===e))},[v,r,_]),b=(0,X.useMemo)(()=>{let e=_.map(e=>({value:e,isAdd:!1}));return y?[...e,{value:v,isAdd:!0}]:e},[_,y,v]);Pn(u,()=>m(!1)),(0,X.useEffect)(()=>{g(e=>e>=b.length?b.length-1:e)},[b.length]);let S=p&&b.length>0,C=!y;function w(e){let t=e.trim();t&&(r.some(e=>An(e)===An(t))||i([...r,t]),f(``),g(-1))}function T(e){i(r.filter(t=>t!==e))}function E(e){e.key===`ArrowDown`?(e.preventDefault(),m(!0),g(e=>Math.min(e+1,b.length-1))):e.key===`ArrowUp`?(e.preventDefault(),g(e=>Math.max(e-1,0))):e.key===`Enter`?S&&h>=0?(e.preventDefault(),w(b[h].value)):d.trim()&&(e.preventDefault(),w(d)):e.key===`,`?(e.preventDefault(),w(d)):e.key===`Backspace`&&d.length===0&&r.length>0?T(r[r.length-1]):e.key===`Escape`&&S&&(e.preventDefault(),m(!1))}return(0,Z.jsxs)(`div`,{ref:u,className:`relative flex flex-col gap-1.5`,children:[(0,Z.jsx)(Nn,{htmlFor:c,children:e}),(0,Z.jsxs)(`div`,{className:P(On,`min-h-9 flex-wrap py-1.5`),children:[(0,Z.jsx)(x,{size:16,"aria-hidden":!0,className:`shrink-0 self-center text-[var(--content-tertiary)]`}),r.map(e=>(0,Z.jsx)(Ue,{onRemove:()=>T(e),removeLabel:o(`actions.remove`,{value:e}),className:`border border-[var(--border-base)] bg-[var(--surface-base)]`,children:e},e)),(0,Z.jsx)(`input`,{id:c,role:`combobox`,"aria-expanded":S,"aria-controls":l,"aria-autocomplete":`list`,"aria-activedescendant":h>=0?`${l}-opt-${h}`:void 0,autoComplete:`off`,className:P(kn,`h-6 w-24`),placeholder:r.length===0?t:``,value:d,onChange:e=>{f(e.target.value),m(!0)},onFocus:()=>m(!0),onKeyDown:E})]}),S&&(0,Z.jsx)(Mn,{id:l,options:b,highlighted:h,showAddHint:C,onPick:w,onHover:g})]})}var In=`Reading.Writing.Cooking.Baking.Gardening.Photography.Painting.Drawing.Hiking.Running.Cycling.Swimming.Yoga.Climbing.Weightlifting.Gaming.Board games.Chess.Traveling.Cars.Woodworking.Knitting.Playing guitar.Playing piano.Singing.Dancing.Fishing.Camping.Surfing.Skiing.Snowboarding.Coffee.Wine.Birdwatching.Pottery.Investing.Podcasts.Movies.Soccer.Basketball.Tennis.Golf.Meditation.Volunteering.Astronomy.3D printing`.split(`.`);function Ln(e,t){return{animation:`fadeInUp 0.4s ease-out ${e}s both`,...t==null?{}:{position:`relative`,zIndex:t}}}function Rn({initialFirstName:e=``,initialLastName:t=``,onSubmit:r}){let{t:i}=n(`onboarding`);H(at);let[a,o]=(0,X.useState)(e),[s,c]=(0,X.useState)(t),[l,u]=(0,X.useState)(``),[d,f]=(0,X.useState)([]),p=a.trim().length>0&&l.trim().length>0;function m(){p&&r({firstName:a,lastName:s,role:l,hobbies:d})}return(0,Z.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,children:(0,Z.jsxs)(Se,{showCreatureFooter:!1,children:[(0,Z.jsx)(Dn,{}),(0,Z.jsxs)(`form`,{className:`relative z-10 mx-auto flex min-h-screen w-full max-w-sm flex-col items-center justify-center px-6 py-16 text-[var(--content-default)]`,onSubmit:e=>{e.preventDefault(),m()},children:[(0,Z.jsx)(`h1`,{className:`text-center font-serif text-[2.75rem] leading-[1.05] tracking-tight`,style:Ln(.05),children:i(`researchOnboardingScreen.title`)}),(0,Z.jsx)(`p`,{className:`mt-3 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:Ln(.12),children:i(`researchOnboardingScreen.body`)}),(0,Z.jsxs)(`div`,{className:`mt-10 flex w-full flex-col gap-5`,children:[(0,Z.jsx)(`div`,{style:Ln(.2,40),children:(0,Z.jsx)(Ne,{label:(0,Z.jsxs)(Z.Fragment,{children:[i(`researchOnboardingScreen.firstNameLabel`),(0,Z.jsx)(`span`,{"aria-hidden":!0,className:`text-[var(--system-negative-strong)]`,children:` *`})]}),placeholder:i(`researchOnboardingScreen.firstNamePlaceholder`),value:a,onChange:e=>o(e.target.value),className:st,autoFocus:!0,required:!0,fullWidth:!0})}),(0,Z.jsx)(`div`,{style:Ln(.27,30),children:(0,Z.jsx)(Ne,{label:i(`researchOnboardingScreen.lastNameLabel`),placeholder:i(`researchOnboardingScreen.lastNamePlaceholder`),value:s,onChange:e=>c(e.target.value),className:st,fullWidth:!0})}),(0,Z.jsx)(`div`,{style:Ln(.34,20),children:(0,Z.jsx)(Ne,{label:i(`researchOnboardingScreen.roleLabel`),placeholder:i(`researchOnboardingScreen.rolePlaceholder`),value:l,onChange:e=>u(e.target.value),className:st,required:!0,fullWidth:!0})}),(0,Z.jsx)(`div`,{style:Ln(.41,10),children:(0,Z.jsx)(Fn,{label:i(`researchOnboardingScreen.hobbiesLabel`),placeholder:i(`researchOnboardingScreen.hobbiesPlaceholder`),values:d,onChange:f,suggestions:In})})]}),(0,Z.jsx)(`div`,{className:`mt-10 w-full`,style:Ln(.5),children:(0,Z.jsx)(Y,{type:`submit`,variant:`primary`,size:`regular`,rightIcon:(0,Z.jsx)(T,{size:16}),fullWidth:!0,disabled:!p,className:`h-11 text-base`,children:i(`actions.continue`)})})]})]})})}function zn({className:e,surface:t=at,surfaceTransition:n,children:r}){let{ref:i,size:a}=W();return H(t,n??null),(0,Z.jsx)(`div`,{ref:i,"data-theme":`dark`,className:Le(`relative h-full overflow-hidden`,e),children:(0,Z.jsx)(sn,{size:a,children:r})})}function Bn(){let e=L(),t=Q.use.characters(),n=Q.use.selectedIndex();return(0,X.useMemo)(()=>{let r=t[n],i=e?.colors.find(e=>e.id===r?.color)?.hex;return G(i??`var(--surface-base)`)},[e,t,n])}function $({onBack:e,onNext:t,tone:r}){let{t:i}=n(`onboarding`),a=Bn(),o=r?r===`dark`?`#1A1A1A`:`#FFFFFF`:a.fg,s=`color-mix(in srgb, ${o} 10%, transparent)`,c=`color-mix(in srgb, ${o} 18%, transparent)`;return(0,Z.jsxs)(`div`,{className:`absolute left-4 top-6 z-10 flex items-center gap-3`,children:[(0,Z.jsx)(`button`,{type:`button`,onClick:e,"aria-label":i(`actions.back`),className:`flex cursor-pointer h-10 w-10 items-center justify-center rounded-full transition-colors duration-150`,style:{color:o,backgroundColor:s},onMouseEnter:e=>e.currentTarget.style.backgroundColor=c,onMouseLeave:e=>e.currentTarget.style.backgroundColor=s,children:(0,Z.jsx)(D,{className:`h-4 w-4`})}),t?(0,Z.jsx)(`button`,{type:`button`,onClick:t,"aria-label":i(`actions.forward`),className:`flex cursor-pointer h-10 w-10 items-center justify-center rounded-full transition-colors duration-150`,style:{color:o,backgroundColor:s},onMouseEnter:e=>e.currentTarget.style.backgroundColor=c,onMouseLeave:e=>e.currentTarget.style.backgroundColor=s,children:(0,Z.jsx)(T,{className:`h-4 w-4`})}):null]})}var Vn=[`EXAVITQu4vr4xnSDxMaL`,`onwK4e9ZLuTAKqWW03F9`,`TX3LPaxmHKxFdv7VOQHJ`,`aura-2-helena-en`,`pNInz6obpgDQGcFmaJgB`,`aura-2-luna-en`,`IKne3meq5aSn9XLyUdCD`,`aura-2-pandora-en`,`aura-2-apollo-en`,`aura-2-thalia-en`,`Xb7hH8MSUJpSbSDYk0k2`,`aura-2-theia-en`];function Hn(e,t){if(t.length===0)return null;let n=Vn[e%Vn.length];return t.find(e=>e.model===n)??t[e%t.length]??null}var Un=[`Ziggy`,`Quill`,`Luna`,`Remy`,`Cleo`,`Cade`];function Wn(e,t){let n=[];for(let r=0;r<e;r++)r!==t&&n.push(r);return{centerChar:t,edgeOrder:n}}function Gn({onContinue:e,onBack:t,onForward:r,canAuditionVoice:i=!0}){let{t:a}=n(`onboarding`),o=L(),s=Q.use.characters(),c=Q.use.ensureGenerated(),l=Q.use.selectedIndex(),u=Q.use.setSelectedIndex(),d=Q.use.setCharacterTraits();(0,X.useEffect)(()=>{o&&c(o)},[o,c]);let f=s.length,[p,m]=(0,X.useState)(null),[h,g]=(0,X.useState)(``),[_,v]=(0,X.useState)(!1),y=(0,X.useRef)(!1),x=(0,X.useRef)(null),[E,O]=(0,X.useState)(null);(0,X.useEffect)(()=>{f>0&&p===null&&m(Wn(f,l))},[f,l,p]),(0,X.useEffect)(()=>{p&&u(p.centerChar)},[p,u]);let A=p?.centerChar;(0,X.useEffect)(()=>{A!=null&&!y.current&&g(Un[A%Un.length])},[A]),(0,X.useEffect)(()=>{_&&(x.current?.focus(),x.current?.select())},[_]);let{voices:j,loading:ee}=oe({enabled:i}),M=(0,X.useMemo)(()=>A==null?null:Hn(A,j),[A,j]),{previewingModel:N,play:P,stop:te}=ie(),ne=M!==null&&N===M.model,re=!M&ⅇfunction F(){if(M){if(ne){te();return}P(M)}}function I(e){if(!p||e===p.centerChar)return;let t=p.edgeOrder.indexOf(e);if(t<0)return;te();let n=[...p.edgeOrder];n[t]=p.centerChar,O({entering:{char:e,fromSlot:t},exiting:{char:p.centerChar,toSlot:t}}),m({centerChar:e,edgeOrder:n})}let ae=()=>p&&I((p.centerChar+1)%f),se=()=>p&&I((p.centerChar-1+f)%f),R=(0,X.useMemo)(()=>p?s[p.centerChar]:void 0,[p,s]),z=!!o&&!!p&&!!R;function B(){R&&e({traits:R,name:h.trim(),voiceModel:M?.model??null})}function ce(){if(y.current=!0,g(e=>{let t=Un.filter(t=>t!==e),n=t.length>0?t:Un;return n[Math.floor(Math.random()*n.length)]}),o&&p&&R){let e=ft(o);for(;e.bodyShape===R.bodyShape&&e.eyeStyle===R.eyeStyle&&e.color===R.color;)e=ft(o);d(p.centerChar,e)}}let le=`pointer-events-auto z-10 flex cursor-pointer h-10 w-10 items-center justify-center rounded-full bg-[color-mix(in_srgb,var(--content-default)_10%,transparent)] text-[var(--content-default)] transition-colors duration-150 hover:bg-[color-mix(in_srgb,var(--content-default)_18%,transparent)]`;return(0,Z.jsxs)(zn,{className:`bg-[var(--surface-base)] text-[var(--content-default)]`,children:[z&&(0,Z.jsx)(Tn,{components:o,characters:s,centerChar:p.centerChar,edgeOrder:p.edgeOrder,entering:E?.entering??null,exiting:E?.exiting??null,onEnterComplete:e=>O(t=>t?.entering.char===e?null:t),onSelectChar:I}),(0,Z.jsx)($,{tone:`light`,onBack:t,onNext:r?B:void 0}),(0,Z.jsx)(`h1`,{className:`absolute left-1/2 top-[22%] z-10 -translate-x-1/2 whitespace-nowrap text-center text-[2.6rem] leading-none max-md:w-[90vw] max-md:whitespace-normal max-md:text-[2.08rem]`,style:{fontFamily:`var(--font-serif)`,animation:`fadeInUp 0.4s ease-out both`},children:a(`giveMeAFaceScreen.title`)}),(0,Z.jsx)(`button`,{type:`button`,"aria-label":a(`giveMeAFaceScreen.previousCharacter`),onClick:se,className:`absolute left-[calc(50%-170px)] top-[43%] -translate-y-1/2 ${le}`,children:(0,Z.jsx)(D,{className:`h-4 w-4`})}),(0,Z.jsx)(`button`,{type:`button`,"aria-label":a(`giveMeAFaceScreen.nextCharacter`),onClick:ae,className:`absolute right-[calc(50%-170px)] top-[43%] -translate-y-1/2 ${le}`,children:(0,Z.jsx)(T,{className:`h-4 w-4`})}),(0,Z.jsxs)(`div`,{className:`absolute left-1/2 top-[58%] z-10 flex -translate-x-1/2 flex-col items-center gap-10 max-md:top-[54%]`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[_?(0,Z.jsx)(`input`,{ref:x,value:h,onChange:e=>{y.current=!0,g(e.target.value)},onBlur:()=>v(!1),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),v(!1))},placeholder:a(`giveMeAFaceScreen.namePlaceholder`),"aria-label":a(`giveMeAFaceScreen.nameAriaLabel`),className:`w-[234px] rounded-2xl border border-[var(--border-element)] bg-transparent px-4 py-2.5 text-center text-lg text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none transition-colors duration-150 focus:border-[var(--border-active)]`}):(0,Z.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>v(!0),"aria-label":a(`giveMeAFaceScreen.editName`),className:`flex cursor-pointer items-center gap-2.5`,children:[(0,Z.jsx)(`span`,{className:`text-2xl font-medium ${h?`text-[var(--content-default)]`:`text-[var(--content-tertiary)]`}`,children:h||a(`giveMeAFaceScreen.namePlaceholder`)}),(0,Z.jsx)(C,{className:`h-5 w-5 text-[var(--content-tertiary)]`})]}),(0,Z.jsx)(`button`,{type:`button`,onClick:ce,"aria-label":a(`giveMeAFaceScreen.shuffle`),title:a(`giveMeAFaceScreen.shuffle`),className:`cursor-pointer text-[var(--content-tertiary)] transition-[transform,color] duration-300 hover:rotate-180 hover:text-[var(--content-default)]`,children:(0,Z.jsx)(S,{className:`h-5 w-5`})})]}),i&&(0,Z.jsxs)(`button`,{type:`button`,onClick:F,disabled:!M,title:a(`giveMeAFaceScreen.hearVoice`),"aria-label":a(ne?`giveMeAFaceScreen.stopVoice`:`giveMeAFaceScreen.hearVoice`),"aria-busy":re,className:`flex cursor-pointer items-center gap-2 rounded-full border border-[color-mix(in_srgb,var(--content-default)_22%,transparent)] px-4 py-2 text-sm text-[var(--content-default)] transition-colors duration-150 hover:bg-[color-mix(in_srgb,var(--content-default)_10%,transparent)] disabled:cursor-default ${re?`disabled:opacity-70`:`disabled:opacity-40`}`,children:[re?(0,Z.jsx)(k,{className:`h-4 w-4 animate-spin`}):ne?(0,Z.jsx)(b,{className:`h-4 w-4`}):(0,Z.jsx)(w,{className:`h-4 w-4`}),a(`giveMeAFaceScreen.hearVoice`)]})]}),(0,Z.jsx)(Y,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,Z.jsx)(T,{size:16}),disabled:!z,onClick:B,className:`h-11 w-[234px] text-base`,children:a(`actions.continue`)})]})]})}var Kn=.05;function qn({entrance:e=!1,entranceDelay:t=0,bumpNonce:n=0}){let r=L(),i=Q.use.characters(),a=Q.use.selectedIndex(),o=cn(),s=i.length>0?i[a]:void 0,c=(0,X.useMemo)(()=>{if(!r||!s)return null;let e=r.eyeStyles.find(e=>e.id===s.eyeStyle);return e?{paths:e.paths,bbox:q(e.paths.map(e=>ke(e.svgPath)))}:null},[r,s]);return c?(0,Z.jsx)($e,{art:c,stage:o,entrance:e,entranceDelay:t,restSinkFraction:Kn,bumpNonce:n}):null}var Jn=200,Yn=40;function Xn({art:e,reduce:t}){let{w:n,h:r}=cn(),i=1.25*Math.max(n,r),a=i*e.body.viewBox.height/e.body.viewBox.width,o=(n-i)/2,s=(r-a)/2,c=Jn/i,l=(Yn/100-.5)*r;return(0,Z.jsx)(p.svg,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,viewBox:`0 0 ${e.body.viewBox.width} ${e.body.viewBox.height}`,width:i,height:a,style:{left:o,top:s,transformOrigin:`center`},initial:t?!1:{scale:c,y:l},animate:{scale:1,y:0},transition:t?{duration:0}:{type:`spring`,stiffness:78,damping:18,mass:1},children:(0,Z.jsx)(`path`,{d:e.body.svgPath,fill:e.color})})}var Zn={duration:.6,delay:.35},Qn=Fe(Zn);function $n({firstName:e,assistantName:t,onContinue:r,onBack:i,onForward:a}){let{t:o}=n(`onboarding`),s=L(),c=Q.use.characters(),l=Q.use.selectedIndex(),d=u(),f=Bn(),m=c.length>0?c[l]:void 0,h=(0,X.useMemo)(()=>{if(!s||!m)return null;let e=s.bodyShapes.find(e=>e.id===m.bodyShape),t=s.colors.find(e=>e.id===m.color);return!e||!t?null:{body:e,color:t.hex}},[s,m]),[g,_]=(0,X.useState)(!1);(0,X.useEffect)(()=>{if(!h||d)return;let e=0,t=requestAnimationFrame(()=>{e=requestAnimationFrame(()=>_(!0))});return()=>{cancelAnimationFrame(t),cancelAnimationFrame(e)}},[h,d]);let v=!!d||g,y=e.trim(),b=t?.trim()??``,x=y?o(`introductionScreen.greetingNamed`,{name:y}):o(`introductionScreen.greeting`),S=b?o(`introductionScreen.introNamed`,{name:b}):o(`introductionScreen.intro`);return h?(0,Z.jsxs)(zn,{className:`bg-[var(--surface-base)]`,surface:v?h.color:at,surfaceTransition:g?Qn:void 0,children:[(0,Z.jsx)(p.div,{className:`absolute inset-0 z-0`,style:{backgroundColor:h.color},initial:d?!1:{opacity:0},animate:{opacity:+!!v},transition:d?{duration:0}:Zn}),(0,Z.jsx)(Xn,{art:h,reduce:d===!0}),(0,Z.jsx)(qn,{entrance:!0}),(0,Z.jsx)(p.div,{initial:d?!1:{opacity:0},animate:{opacity:1},transition:d?{duration:0}:{duration:.4,delay:1},children:(0,Z.jsx)($,{onBack:i,onNext:a})}),(0,Z.jsxs)(`div`,{className:ot,children:[(0,Z.jsxs)(p.h1,{className:`text-center leading-[1.15] max-md:leading-[1.25]`,style:{fontFamily:`var(--font-serif)`},initial:d?!1:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:d?{duration:0}:{type:`spring`,stiffness:260,damping:11,delay:1},children:[(0,Z.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:f.fgDeep},children:x}),(0,Z.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:f.fg},children:S})]}),(0,Z.jsx)(p.div,{initial:d?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:d?{duration:0}:{duration:.4,delay:1.15},children:(0,Z.jsx)(Y,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,Z.jsx)(T,{size:16}),onClick:r,className:`h-11 w-[234px] text-base`,children:o(`actions.continue`)})})]})]}):(0,Z.jsx)(zn,{className:`bg-[var(--surface-base)]`})}var er=.3,tr=.85,nr=.25;function rr(){let e=L(),t=Q.use.characters(),n=Q.use.selectedIndex(),r=t.length>0?t[n]:void 0,{w:i,h:a}=cn(),o=(0,X.useMemo)(()=>{if(!e||!r)return null;let t=e.eyeStyles.find(e=>e.id===r.eyeStyle);return t?{paths:t.paths,bbox:q(t.paths.map(e=>ke(e.svgPath)))}:null},[e,r]),s=o?Math.min(Math.min(i,a)*er,i*tr*o.bbox.h/o.bbox.w):0;return{art:o,eyesW:o?s*o.bbox.w/o.bbox.h:0,eyesH:s,restCy:a-nr*s,centerX:i/2,w:i,h:a}}function ir({art:e,eyesW:t,eyesH:n,centerX:r,eyeCy:i,eyeScale:a,eyeX:o,blinking:c,className:l=`pointer-events-none absolute top-0 z-0`}){let u=s(i,e=>e-n/2),d=e.bbox.x+e.bbox.w/2,f=e.bbox.y+e.bbox.h/2;return(0,Z.jsx)(p.div,{"aria-hidden":`true`,className:l,style:{left:r-t/2,top:0,x:o,y:u,width:t,height:n,scale:a,transformOrigin:`center`},children:(0,Z.jsx)(`svg`,{viewBox:`${e.bbox.x} ${e.bbox.y} ${e.bbox.w} ${e.bbox.h}`,width:t,height:n,style:{overflow:`visible`,display:`block`},children:(0,Z.jsx)(`g`,{style:{transform:c?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${d}px ${f}px`,transition:`transform 0.13s ease-in-out`},children:e.paths.map((e,t)=>(0,Z.jsx)(`path`,{d:e.svgPath,fill:e.color},t))})})})}var ar={green:[`pink`,`purple`,`orange`,`yellow`],orange:[`teal`,`purple`,`green`,`yellow`],pink:[`teal`,`green`,`yellow`,`purple`],purple:[`yellow`,`teal`,`green`,`orange`],teal:[`pink`,`orange`,`yellow`,`purple`],yellow:[`purple`,`teal`,`pink`,`green`]};function or(e,t){let n=ar[e];return n&&n.length>0?n:t.filter(t=>t!==e)}var sr=new Set([`orange`,`pink`,`red`]);function cr(e,t){return sr.has(e)&&sr.has(t)}function lr(e,t,n){let r=or(e,t),i=[];for(let e of r){if(i.length>=n)break;i.some(t=>cr(t,e))||i.push(e)}for(let e of r){if(i.length>=n)break;i.includes(e)||i.push(e)}return i}var ur=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],dr=290;function fr({firstH:e,secondH:t,color:n,firstText:r,secondText:i,revealed:a,carouseled:o,revealFrom:s,revealDuration:c,reduce:l}){let u=s===`bottom`?`inset(100% 0 0 0)`:`inset(0 0 100% 0)`;return!e||!t?null:(0,Z.jsx)(p.div,{className:`relative w-full overflow-hidden`,initial:!1,animate:{height:o?t:e},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`},children:(0,Z.jsxs)(p.div,{className:`flex flex-col`,style:{color:n},initial:!1,animate:{y:o?-e:0},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`},children:[(0,Z.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:e},children:(0,Z.jsx)(p.span,{className:`block`,initial:!1,animate:{clipPath:a?`inset(0% 0 0% 0)`:u},transition:l?{duration:0}:{duration:c,ease:`easeOut`},children:r})}),(0,Z.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:t},children:(0,Z.jsx)(`span`,{className:`block`,children:i})})]})})}function pr({onContinue:e,onBack:t,onForward:r}){let{t:i}=n(`onboarding`),a=i(`pitchStep.setupLine`),s=i(`pitchStep.helpLine`),l=i(`pitchStep.punchLine`),d=i(`pitchStep.betterLine`),f=i(`pitchStep.lessLine`),m=Bn(),h=u(),{art:g,eyesW:_,eyesH:v,restCy:y,centerX:b,w:x,h:S}=rr(),C=L(),w=Q.use.characters(),E=Q.use.selectedIndex(),D=w.length>0?w[E]:void 0,O=S>0&&S<=800,k=O?.17:.22,A=O?`top-[17%]`:`top-[22%]`,j=c(0),ee=c(1),M=(0,X.useMemo)(()=>!C||!D?`orange`:lr(D.color,C.colors.map(e=>e.id),1)[0]??`orange`,[C,D]),N=Math.min(220,Math.max(150,x*.16)),P=-N,te=-N*.4,ne=c(-220),re=(0,X.useMemo)(()=>!C||!D?[]:lr(D.color,C.colors.map(e=>e.id),3),[C,D]),ie=Math.max(.42,Math.min(x/1100,1)),F=Math.round(dr*ie),I=-F*1.1,ae=-F*.42,oe=c(-320),[se,R]=(0,X.useState)(!!h),[z,B]=(0,X.useState)(!!h),[ce,le]=(0,X.useState)(!1),[ue,de]=(0,X.useState)(!1),[fe,pe]=(0,X.useState)(!1),[me,he]=(0,X.useState)(!1),[ge,_e]=(0,X.useState)(!!h),ve=Math.min(x,768)-48,ye=(0,X.useRef)(null),be=(0,X.useRef)(null),xe=(0,X.useRef)(null),Se=(0,X.useRef)(null),Ce=(0,X.useRef)(null),[we,Te]=(0,X.useState)(0),[Ee,V]=(0,X.useState)(0),[De,Oe]=(0,X.useState)(0),[ke,Ae]=(0,X.useState)(0),[je,Me]=(0,X.useState)(0);return(0,X.useLayoutEffect)(()=>{ye.current?.offsetHeight&&Te(ye.current.offsetHeight),be.current?.offsetHeight&&V(be.current.offsetHeight),xe.current?.offsetHeight&&Oe(xe.current.offsetHeight),Se.current?.offsetHeight&&Ae(Se.current.offsetHeight),Ce.current?.offsetHeight&&Me(Ce.current.offsetHeight)},[ve]),(0,X.useEffect)(()=>{j.set(y),he(!0)},[y,j]),(0,X.useEffect)(()=>{if(!h)return;let e=setTimeout(()=>{le(!0),de(!0),pe(!0)},1400);return()=>clearTimeout(e)},[h]),(0,X.useEffect)(()=>{if(h||!g)return;j.set(y),ee.set(1),ne.set(P),oe.set(I),R(!1),B(!1),le(!1),de(!1);let e=Math.max(v*.5,S*k-36),t=[],n=[],r=!1,i=e=>(t.push(e),e),a=e=>new Promise(t=>{n.push(setTimeout(t,e))});return(async()=>{if(await a(200),r||(R(!0),await Promise.all([i(o(j,e,{duration:.55,ease:`easeOut`})),i(o(ee,.55,{duration:.55,ease:`easeOut`}))]),r)||(B(!0),await Promise.all([i(o(j,y,{type:`spring`,stiffness:210,damping:15})),i(o(ee,1,{duration:.45,ease:`easeOut`}))]),r)||(await a(900),r)||(le(!0),de(!0),await i(o(ne,[P,te,te,P],{duration:1.5,times:[0,.28,.62,1],ease:[`easeOut`,`easeInOut`,`easeInOut`]})),r)||(await a(150),r))return;pe(!0);let t=i(o(oe,[I,ae,ae,I],{duration:1.5,times:[0,.28,.62,1],ease:[`easeOut`,`easeInOut`,`easeInOut`]}));await a(700),!r&&(_e(!0),await t)})(),()=>{r=!0,t.forEach(e=>e.stop()),n.forEach(clearTimeout)}},[h,g,S,k,v,y,j,ee,ne,P,te,oe,I,ae]),(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:m.fg},children:[(0,Z.jsx)($,{onBack:t,onNext:r}),(0,Z.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none invisible absolute -left-[9999px] top-0 text-[clamp(2.25rem,5.5vw,4.5rem)] leading-[1.15]`,style:{width:ve,fontFamily:`var(--font-serif)`},children:[(0,Z.jsx)(`span`,{ref:ye,className:`block`,children:a}),(0,Z.jsx)(`span`,{ref:be,className:`block`,children:s}),(0,Z.jsx)(`span`,{ref:xe,className:`block`,children:l}),(0,Z.jsx)(`span`,{ref:Se,className:`block`,children:d}),(0,Z.jsx)(`span`,{ref:Ce,className:`block`,children:f})]}),me&&g&&(0,Z.jsx)(ir,{art:g,eyesW:_,eyesH:v,centerX:b,eyeCy:j,eyeScale:ee,blinking:!1}),!h&&C&&(0,Z.jsx)(p.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{left:Math.max(16,x*.05),top:0,y:ne,width:N,height:N},children:(0,Z.jsx)(K,{components:C,traits:{bodyShape:`blob`,eyeStyle:`goofy`,color:M},size:N,breathe:!1})}),!h&&C&&(0,Z.jsx)(p.div,{"aria-hidden":`true`,className:`pointer-events-none absolute right-0 top-0 z-[1] flex items-start`,style:{right:-Math.round(F*.12),y:oe},children:ur.map((e,t)=>(0,Z.jsx)(`div`,{style:{width:F,height:F,marginLeft:t===0?0:-F*.34,zIndex:ur.length-t},children:(0,Z.jsx)(K,{components:C,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:re[t]??`teal`},size:F,breathe:!1})},e.bodyShape))}),(0,Z.jsxs)(`div`,{className:`${ot.replace(`top-[30%]`,A)} max-w-3xl max-md:top-[34%]`,children:[(0,Z.jsxs)(`div`,{className:`flex w-full flex-col gap-3 text-[clamp(2.25rem,5.5vw,4.5rem)] leading-[1.15]`,style:{fontFamily:`var(--font-serif)`},children:[(0,Z.jsx)(fr,{firstH:we,secondH:Ee,color:m.fgDeep,firstText:a,secondText:s,revealed:se,carouseled:ce,revealFrom:`bottom`,revealDuration:.55,reduce:!!h}),(0,Z.jsx)(fr,{firstH:De,secondH:ke,color:m.fg,firstText:l,secondText:d,revealed:z,carouseled:ue,revealFrom:`top`,revealDuration:.45,reduce:!!h}),(0,Z.jsx)(p.div,{className:`relative w-full overflow-hidden`,style:{color:m.fg},initial:!1,animate:{height:fe?je:0},transition:h?{duration:0}:{duration:.5,ease:`easeInOut`},children:je>0&&(0,Z.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:je},children:(0,Z.jsx)(p.span,{className:`block`,initial:!1,animate:{clipPath:fe?`inset(0% 0 0% 0)`:`inset(100% 0 0 0)`},transition:h?{duration:0}:{duration:.5,ease:`easeOut`},children:f})})})]}),ge&&(0,Z.jsx)(p.div,{initial:h?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:h?{duration:0}:{duration:.4},children:(0,Z.jsx)(Y,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,Z.jsx)(T,{size:16}),onClick:e,className:`h-11 w-[234px] text-base`,children:i(`actions.continue`)})})]})]})}function mr({idSuffix:e}){let t=`cf-${e}`,n=`cr-${e}`,r=`cg-${e}`,i=`cs-${e}`;return(0,Z.jsxs)(`svg`,{viewBox:`0 0 100 100`,width:`100%`,height:`100%`,style:{display:`block`,position:`absolute`,inset:0},children:[(0,Z.jsxs)(`defs`,{children:[(0,Z.jsxs)(`linearGradient`,{id:n,x1:`0.12`,y1:`0.05`,x2:`0.85`,y2:`0.95`,children:[(0,Z.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF0AE`}),(0,Z.jsx)(`stop`,{offset:`50%`,stopColor:`#F4C231`}),(0,Z.jsx)(`stop`,{offset:`100%`,stopColor:`#D29B1A`})]}),(0,Z.jsxs)(`radialGradient`,{id:t,cx:`42%`,cy:`36%`,r:`82%`,children:[(0,Z.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF6CE`}),(0,Z.jsx)(`stop`,{offset:`55%`,stopColor:`#F8CB3E`}),(0,Z.jsx)(`stop`,{offset:`100%`,stopColor:`#EEB52C`})]}),(0,Z.jsxs)(`radialGradient`,{id:r,cx:`36%`,cy:`24%`,r:`44%`,children:[(0,Z.jsx)(`stop`,{offset:`0%`,stopColor:`#FFFFFF`,stopOpacity:`0.85`}),(0,Z.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]}),(0,Z.jsxs)(`radialGradient`,{id:i,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,Z.jsx)(`stop`,{offset:`0%`,stopColor:`#FFFFFF`,stopOpacity:`1`}),(0,Z.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]})]}),(0,Z.jsx)(`circle`,{cx:`50`,cy:`50`,r:`49`,fill:`url(#${n})`}),(0,Z.jsx)(`circle`,{cx:`50`,cy:`50`,r:`45.5`,fill:`none`,stroke:`#FFF6CF`,strokeOpacity:`0.6`,strokeWidth:`2.2`,strokeLinecap:`round`,strokeDasharray:`70 210`,transform:`rotate(-128 50 50)`}),(0,Z.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`url(#${t})`}),(0,Z.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`none`,stroke:`#C28F18`,strokeOpacity:`0.35`,strokeWidth:`1.4`}),(0,Z.jsxs)(`g`,{fontFamily:`var(--font-sans), system-ui, sans-serif`,fontWeight:900,fontSize:`58`,textAnchor:`middle`,children:[(0,Z.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#C88E16`,transform:`translate(1.3 1.6)`,children:`$`}),(0,Z.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#FFF6CF`,opacity:`0.7`,transform:`translate(-1.3 -1.5)`,children:`$`}),(0,Z.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#F4C12A`,children:`$`})]}),(0,Z.jsx)(`ellipse`,{cx:`38`,cy:`28`,rx:`22`,ry:`14`,fill:`url(#${r})`}),(0,Z.jsx)(`ellipse`,{cx:`34`,cy:`24`,rx:`7`,ry:`4.5`,fill:`url(#${i})`})]})}function hr({size:e,tiltX:t=0,tiltY:n=0,shadow:r=!0,spinning:i=!1,className:a}){return(0,Z.jsxs)(`div`,{style:{position:`relative`,width:e,height:e},children:[r&&(0,Z.jsx)(`div`,{"aria-hidden":`true`,style:{position:`absolute`,left:`50%`,bottom:-e*.14,width:e*.74,height:e*.16,transform:`translateX(-50%)`,background:`radial-gradient(ellipse at center, rgba(0,0,0,0.22), rgba(0,0,0,0) 70%)`,filter:`blur(2px)`}}),(0,Z.jsx)(`div`,{style:{width:e,height:e,perspective:e*10},children:(0,Z.jsxs)(p.div,{className:a,style:{width:e,height:e,position:`relative`,transformStyle:`preserve-3d`},initial:!1,animate:{rotateX:t,rotateY:i?[n,n+360,n+760,n+1180]:n},transition:i?{duration:.95,times:[0,.32,.62,1],ease:`easeInOut`}:{duration:0},children:[(0,Z.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(0.5px)`},children:(0,Z.jsx)(mr,{idSuffix:`front`})}),(0,Z.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(-0.5px) rotateY(180deg)`},children:(0,Z.jsx)(mr,{idSuffix:`back`})})]})})]})}var gr=.3,_r=.95;function vr({onClaim:e,onBumpEyes:r,onBack:i,onForward:a}){let{t:o}=n(`onboarding`),s=u(),c=Bn(),{h:l}=cn(),[d,f]=(0,X.useState)(!1);function m(){if(!d){if(f(!0),s){e();return}window.setTimeout(r,gr*1e3)}}let h=l*.42,g=-l*.08,_=l*.9;return(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:c.fg},children:[(0,Z.jsx)($,{onBack:i,onNext:a}),(0,Z.jsxs)(`div`,{className:`absolute left-1/2 top-[26%] flex w-full max-w-xl -translate-x-1/2 flex-col items-center gap-3 px-6 text-center`,children:[(0,Z.jsx)(`h1`,{className:`text-[2.6rem] leading-[1.1] max-md:max-w-[80vw]`,style:{fontFamily:`var(--font-serif)`},children:(0,Z.jsx)(t,{i18nKey:`integrationStep.title`,ns:`onboarding`,components:{br:(0,Z.jsx)(`br`,{className:`max-md:hidden`})}})}),(0,Z.jsx)(`div`,{className:`mt-10 flex flex-col items-center gap-4`,children:(0,Z.jsx)(p.div,{animate:d&&!s?{y:[0,h,g,_],scale:[1,1,1,.2],opacity:[1,1,1,0]}:{},transition:{duration:_r,times:[0,gr/_r,.62,1],ease:[`easeIn`,`easeOut`,`easeIn`]},onAnimationComplete:()=>{d&&e()},children:(0,Z.jsx)(hr,{size:88,spinning:d&&!s})})}),!d&&(0,Z.jsxs)(`button`,{type:`button`,onClick:m,className:`flex cursor-pointer h-11 w-[234px] items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition-transform duration-150 active:scale-[0.97]`,style:{marginTop:Math.round(24+l*.05),backgroundColor:c.isLight?`#1A1A1A`:`#FFFFFF`,color:c.isLight?`#FFFFFF`:`#1A1A1A`},children:[o(`actions.claim`),(0,Z.jsx)(T,{className:`h-4 w-4`})]})]})]})}re();var yr=640,br=[{id:`companion-coworker`,leftKey:`createPersonalityStep.axes.companionCoworker.left`,rightKey:`createPersonalityStep.axes.companionCoworker.right`,leftAvatar:{bodyShape:`blob`,eyeStyle:`gentle`,color:`pink`},rightAvatar:{bodyShape:`ninja`,eyeStyle:`curious`,color:`purple`}},{id:`genz-boomer`,leftKey:`createPersonalityStep.axes.genzBoomer.left`,rightKey:`createPersonalityStep.axes.genzBoomer.right`,leftAvatar:{bodyShape:`burst`,eyeStyle:`quirky`,color:`yellow`},rightAvatar:{bodyShape:`cloud`,eyeStyle:`dazed`,color:`green`}},{id:`execute-collaborate`,leftKey:`createPersonalityStep.axes.executeCollaborate.left`,rightKey:`createPersonalityStep.axes.executeCollaborate.right`,leftAvatar:{bodyShape:`star`,eyeStyle:`angry`,color:`orange`},rightAvatar:{bodyShape:`flower`,eyeStyle:`goofy`,color:`teal`}},{id:`playful-serious`,leftKey:`createPersonalityStep.axes.playfulSerious.left`,rightKey:`createPersonalityStep.axes.playfulSerious.right`,leftAvatar:{bodyShape:`star`,eyeStyle:`goofy`,color:`yellow`},rightAvatar:{bodyShape:`blob`,eyeStyle:`grumpy`,color:`purple`}},{id:`polite-unfiltered`,leftKey:`createPersonalityStep.axes.politeUnfiltered.left`,rightKey:`createPersonalityStep.axes.politeUnfiltered.right`,leftAvatar:{bodyShape:`sprout`,eyeStyle:`bashful`,color:`green`},rightAvatar:{bodyShape:`urchin`,eyeStyle:`surprised`,color:`orange`}}],xr=[`9%`,`27%`,`45%`,`62%`,`79%`],Sr=50,Cr=`rgba(36, 41, 46, 0.2)`,wr=`#FDFDFC`,Tr=.16;function Er(e,t,n){let r=[];for(let i=0;i<e.length;i++){let a=r[i-1],o=e[i+1],s=e[i]??``,c=e=>e===t||e===a;if(!c(s)){r.push(s);continue}let l=n.find(e=>!c(e)&&e!==o)??n.find(e=>!c(e))??s;r.push(l)}return r}function Dr({components:e,traits:t,side:n,top:r,size:i,progress:a}){let o=Math.max(0,Math.min(1,a)),s=100+Tr*100,c=n===`left`?-100+s*o:100-s*o;return(0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute`,style:{[n]:0,top:r,width:i,height:i,opacity:Math.min(1,o*1.6),transform:`translate(${c}%, -50%) scale(${.8+.2*o})`,transformOrigin:`${n} center`,transition:`transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease`,willChange:`transform, opacity`},children:(0,Z.jsx)(K,{components:e,traits:t,size:i,breathe:!1})})}function Or({leftLabel:e,rightLabel:t,ariaLabel:n,value:r,onValueChange:i,fg:a,disabled:o}){return(0,Z.jsxs)(`div`,{className:`flex w-full shrink-0 flex-wrap items-center gap-x-5 gap-y-1.5 sm:flex-nowrap`,style:{opacity:o?.7:1},children:[(0,Z.jsx)(`span`,{className:`order-1 flex-1 text-left text-sm sm:w-32 sm:flex-none sm:text-right sm:text-[17px]`,style:{color:a},children:e}),(0,Z.jsx)(`span`,{className:`order-2 flex-1 text-right text-sm sm:order-3 sm:w-32 sm:flex-none sm:text-left sm:text-[17px]`,style:{color:a},children:t}),(0,Z.jsxs)(l,{"data-owns-horizontal-drag":``,className:`relative order-3 flex h-6 w-full touch-none items-center select-none sm:order-2 sm:w-auto sm:flex-1`,value:[r],onValueChange:e=>i(e[0]??Sr),disabled:o,min:0,max:100,step:1,"aria-label":n,children:[(0,Z.jsx)(m,{className:`relative h-2 w-full grow rounded-full sm:h-3`,style:{backgroundColor:Cr}}),(0,Z.jsx)(f,{className:`block h-5 w-5 cursor-grab rounded-full shadow-sm transition-transform active:scale-95 active:cursor-grabbing keyboard-focus:outline-none keyboard-focus:ring-2 keyboard-focus:ring-white/70 data-[disabled]:cursor-not-allowed data-[disabled]:active:scale-100 sm:h-6 sm:w-6`,style:{backgroundColor:wr}})]})]})}function kr({components:e,values:t,sideAvatars:n,size:r}){return(0,Z.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 -z-10`,children:br.map((i,a)=>{let o=t[i.id]??Sr,s=Math.max(0,(Sr-o)/Sr),c=Math.max(0,(o-Sr)/Sr),l=xr[a]??`50%`,u=n[a];return u?(0,Z.jsxs)(`div`,{children:[(0,Z.jsx)(Dr,{components:e,traits:u.left,side:`left`,top:l,size:r,progress:s}),(0,Z.jsx)(Dr,{components:e,traits:u.right,side:`right`,top:l,size:r,progress:c})]},i.id):null})})}function Ar({values:e,onValueChange:t,locked:r,onContinue:i,onBack:a,onForward:o}){let{t:s}=n(`onboarding`),c=Bn(),l=L(),{w:u}=z(),{w:d,h:f}=cn(),p=Math.round(nt*Math.min(d,f))+12,m=u>=yr,h=Q.use.characters()[Q.use.selectedIndex()]?.color,g=Math.round(Math.min(300,Math.max(160,u*.16))),_=(0,X.useMemo)(()=>{let e=l?.colors.map(e=>e.id)??[],t=Er(br.map(e=>e.leftAvatar.color),h,e),n=Er(br.map(e=>e.rightAvatar.color),h,e);return br.map((e,r)=>({left:{...e.leftAvatar,color:t[r]??e.leftAvatar.color},right:{...e.rightAvatar,color:n[r]??e.rightAvatar.color}}))},[l,h]);return(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:c.fg},children:[(0,Z.jsx)($,{onBack:a,onNext:o}),m&&l&&(0,Z.jsx)(kr,{components:l,values:e,sideAvatars:_,size:g}),(0,Z.jsxs)(`div`,{className:`absolute inset-x-0 top-0 bottom-0 mx-auto flex w-full max-w-2xl flex-col items-center overflow-y-auto px-6`,style:{paddingBottom:p},children:[(0,Z.jsx)(`div`,{className:`w-full min-h-14 shrink-[4]`,style:{flexBasis:Math.round(f*.14)}}),(0,Z.jsxs)(`div`,{className:`flex shrink-0 flex-col items-center gap-4`,children:[(0,Z.jsx)(`h1`,{className:`text-center text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:s(`createPersonalityStep.title`)}),r?(0,Z.jsx)(`p`,{className:`text-center text-[15px]`,style:{color:c.fgMuted},children:s(`createPersonalityStep.lockedBody`)}):null]}),(0,Z.jsx)(`div`,{className:`w-full min-h-3 shrink-[2]`,style:{flexBasis:Math.round(40+f*.03)}}),br.map((n,i)=>{let a=s(n.leftKey),o=s(n.rightKey);return(0,Z.jsxs)(X.Fragment,{children:[i>0&&(0,Z.jsx)(`div`,{className:`w-full min-h-2.5 shrink basis-8 sm:basis-11`}),(0,Z.jsx)(Or,{leftLabel:a,rightLabel:o,ariaLabel:s(`createPersonalityStep.axisAriaLabel`,{left:a,right:o}),value:e[n.id]??Sr,onValueChange:e=>t(n.id,e),fg:c.fg,disabled:r})]},n.id)}),(0,Z.jsx)(`div`,{className:`w-full min-h-3 shrink-[2] basis-14`}),(0,Z.jsxs)(`button`,{type:`button`,onClick:i,className:`flex h-11 w-[234px] shrink-0 cursor-pointer items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition-transform duration-150 active:scale-[0.97]`,style:{backgroundColor:c.isLight?`#1A1A1A`:`#FFFFFF`,color:c.isLight?`#FFFFFF`:`#1A1A1A`},children:[s(`actions.continue`),(0,Z.jsx)(T,{className:`h-4 w-4`})]})]})]})}function jr({assistantId:e,assistantReady:t,onConnected:r,onSkip:i,onBack:a,onForward:o,missingCalendarScope:s=!1,onRetry:c,hatchError:l=null}){let{t:u}=n(`onboarding`),d=Bn(),{handleConnect:f,oauthInProgress:p}=de({assistantId:e??``,onConnect:r}),m=()=>{c?.(),f()},h=!e||!t,g=h||p;return(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:d.fg},children:[(0,Z.jsx)($,{onBack:a,onNext:o}),(0,Z.jsxs)(`div`,{className:`absolute left-1/2 top-[26%] flex w-[360px] -translate-x-1/2 flex-col items-center gap-5 text-center`,children:[(0,Z.jsx)(`h1`,{className:`text-[2.6rem] leading-tight`,style:{fontFamily:`var(--font-serif)`},children:u(h?`letsChatTomorrowStep.wakingTitle`:s?`letsChatTomorrowStep.missingScopeTitle`:`letsChatTomorrowStep.title`)}),(0,Z.jsx)(`p`,{className:`text-[16px]`,style:{color:d.fgMuted},children:u(h?`letsChatTomorrowStep.wakingBody`:s?`letsChatTomorrowStep.missingScopeBody`:`letsChatTomorrowStep.body`)}),(0,Z.jsxs)(`div`,{className:`mt-6 flex w-[234px] flex-col items-center gap-4`,children:[(0,Z.jsx)(`button`,{type:`button`,onClick:m,disabled:g,className:`flex cursor-pointer h-11 w-full items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition-transform duration-150 enabled:active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-60`,style:{backgroundColor:d.isLight?`#1A1A1A`:`#FFFFFF`,color:d.isLight?`#FFFFFF`:`#1A1A1A`},children:h?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(k,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),u(`letsChatTomorrowStep.startingAssistant`)]}):p?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(k,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),u(`letsChatTomorrowStep.waitingAuthorization`)]}):u(s?`actions.tryAgain`:`letsChatTomorrowStep.connectCalendar`)}),(!h||l)&&(0,Z.jsx)(`button`,{type:`button`,onClick:i,disabled:p,className:`cursor-pointer text-body-small-default transition-opacity hover:opacity-100 disabled:opacity-60`,style:{color:d.fgMuted},children:u(`actions.skipForNow`)})]})]})]})}var Mr=G(`#17191C`);function Nr(){let e=L(),t=Q.use.characters(),n=Q.use.selectedIndex();return{components:e,chosen:t.length>0?t[n]:void 0}}function Pr({size:e=64,isAssistantBusy:t=!1}){let{components:n,chosen:r}=Nr();return!n||!r?(0,Z.jsx)(`div`,{style:{width:e,height:e}}):(0,Z.jsx)(`div`,{className:`shrink-0`,style:{width:e,height:e},children:(0,Z.jsx)(K,{components:n,traits:r,size:e,isAssistantBusy:t})})}var Fr=`pt-[0.7rem] text-[2.6rem] leading-none`,Ir=64,Lr=4500,Rr=7e3;function zr({onDone:e,onBack:t,onForward:r,scheduledTime:i,awaitingTime:a}){let{t:o}=n(`onboarding`),{components:s,chosen:c}=Nr(),l=u(),{w:d,h:f}=z(),m=i?o(`meetingCreatedStep.titleWithTime`,{time:i}):o(`meetingCreatedStep.title`);(0,X.useEffect)(()=>{let t=setTimeout(e,a&&!i?Rr:Lr);return()=>clearTimeout(t)},[e,a,i]);let h=(0,X.useRef)(null),[g,_]=(0,X.useState)(null);(0,X.useLayoutEffect)(()=>{let e=()=>{let e=h.current?.getBoundingClientRect();e&&_({cx:e.left+e.width/2,cy:e.top+e.height/2})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[m]);let v=1.3*Math.max(d,f)/Ir,y=g?d/2-g.cx:0,b=g?f*.88-g.cy:0,x=f*.05;return(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden text-white`,children:[(0,Z.jsx)($,{onBack:t,onNext:r,tone:`light`}),(0,Z.jsxs)(`div`,{className:`absolute left-1/2 top-[14%] sm:top-[26%] flex w-full max-w-xl -translate-x-1/2 items-start gap-3 px-6`,children:[(0,Z.jsx)(`div`,{ref:h,className:`relative shrink-0`,style:{width:Ir,height:Ir},children:s&&c&&g&&(0,Z.jsx)(p.div,{className:`absolute inset-0`,style:{transformOrigin:`center`},initial:l?!1:{scale:v,x:y,y:b},animate:{x:[y,y,0,0],y:[b,b+x,0,0],scale:[v,v,1.07,1]},transition:l?{duration:0}:{duration:1.1,times:[0,.18,.82,1],ease:[`easeOut`,`easeIn`,`easeOut`]},children:(0,Z.jsx)(K,{components:s,traits:c,size:Ir})})}),(0,Z.jsx)(p.span,{className:Fr,style:{fontFamily:`var(--font-serif)`},initial:l?!1:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:l?{duration:0}:{duration:.4,delay:.9},children:m})]})]})}var Br=2800;function Vr({onDone:e,onBack:t,onAdvance:r,onForward:i,ready:a}){let{t:o}=n(`onboarding`),s=[o(`lookingYouUpStep.searching`),o(`lookingYouUpStep.readingProfiles`),o(`lookingYouUpStep.skimming`),o(`lookingYouUpStep.connectingDots`),o(`lookingYouUpStep.piecing`),o(`lookingYouUpStep.almostThere`)],c=Mr,[l,u]=(0,X.useState)(0);return(0,X.useEffect)(()=>{r?.(l);let t=l>=s.length-1;if(a&&t){let t=setTimeout(e,Br);return()=>clearTimeout(t)}let n=setTimeout(()=>u(e=>(e+1)%s.length),Br);return()=>clearTimeout(n)},[l,a,e,r,s.length]),(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:c.fg},children:[(0,Z.jsx)($,{onBack:t,onNext:i}),(0,Z.jsxs)(`div`,{className:`absolute left-1/2 top-1/2 flex w-full max-w-xl -translate-x-1/2 -translate-y-1/2 items-center gap-3 px-6`,children:[(0,Z.jsx)(Pr,{isAssistantBusy:!0}),(0,Z.jsx)(d,{mode:`wait`,children:(0,Z.jsx)(p.p,{className:`${Fr} flex min-h-[4.4rem] items-center !pt-0 !text-[2.08rem]`,style:{fontFamily:`var(--font-serif)`},initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},transition:{duration:.35},children:s[l]},l)})]})]})}function Hr({onDone:e,ready:t}){let{t:r}=n(`onboarding`),i=[r(`finishingUpStep.updatingPersonality`),r(`finishingUpStep.findingVoice`),r(`finishingUpStep.gettingIntoCharacter`),r(`finishingUpStep.almostThere`)],a=Mr,[o,s]=(0,X.useState)(0);return(0,X.useEffect)(()=>{let n=i.length-1;if(t){if(o!==n){s(n);return}let t=setTimeout(e,Br);return()=>clearTimeout(t)}let r=setTimeout(()=>s(e=>(e+1)%i.length),Br);return()=>clearTimeout(r)},[o,t,e,i.length]),(0,Z.jsx)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:(0,Z.jsxs)(`div`,{className:`absolute left-1/2 top-[14%] sm:top-[26%] flex w-full max-w-xl -translate-x-1/2 items-start gap-3 px-6`,children:[(0,Z.jsx)(Pr,{isAssistantBusy:!0}),(0,Z.jsx)(d,{mode:`wait`,children:(0,Z.jsx)(p.p,{className:Fr,style:{fontFamily:`var(--font-serif)`},initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},transition:{duration:.35},children:i[o]},o)})]})})}function Ur({claims:e,loading:t,onContinue:r,onRejectAll:i,onBack:a,onForward:o}){let{t:s}=n(`onboarding`),c=Mr,l=u(),[f,m]=(0,X.useState)(()=>new Set),h=e.filter(e=>!f.has(e.claim)),g=h.length>0,_=!t;return(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:c.fg},children:[(0,Z.jsx)($,{onBack:a,onNext:o}),(0,Z.jsxs)(`div`,{className:`absolute bottom-0 left-1/2 top-[11%] sm:top-[8%] z-10 flex w-full max-w-xl -translate-x-1/2 flex-col px-6 pb-8`,children:[(0,Z.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-y-auto [&::-webkit-scrollbar]:hidden [scrollbar-width:none]`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,Z.jsx)(Pr,{}),(0,Z.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:s(`researchResultsStep.title`)})]}),(0,Z.jsx)(`p`,{className:`mb-7 mt-2 text-[15px]`,style:{color:c.fgMuted},children:s(g?t?`researchResultsStep.bodyLoadingWithClaims`:`researchResultsStep.bodyReadyWithClaims`:t?`researchResultsStep.bodyLoadingEmpty`:`researchResultsStep.bodyReadyEmpty`)}),(0,Z.jsx)(`div`,{className:`flex flex-col gap-3`,children:(0,Z.jsx)(d,{children:h.map(e=>(0,Z.jsxs)(p.div,{layout:!0,initial:l?!1:{opacity:0,y:10},animate:{opacity:1,y:0},exit:l?void 0:{opacity:0,scale:.95},className:`flex items-center justify-between gap-3 rounded-2xl px-5 py-4 text-[15px]`,style:{backgroundColor:c.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:[(0,Z.jsx)(`span`,{children:e.claim}),(0,Z.jsx)(`button`,{type:`button`,"aria-label":s(`researchResultsStep.removeClaim`,{claim:e.claim}),onClick:()=>m(t=>new Set(t).add(e.claim)),className:`flex cursor-pointer h-6 w-6 shrink-0 items-center justify-center rounded-full transition-opacity hover:opacity-100`,style:{color:c.fgMuted},children:(0,Z.jsx)(E,{className:`h-4 w-4`})})]},e.claim))})}),g&&_&&(0,Z.jsx)(`button`,{type:`button`,onClick:i,className:`mt-5 self-start shrink-0 cursor-pointer text-[14px] underline underline-offset-2 transition-opacity hover:opacity-80`,style:{color:c.fgMuted},children:s(`researchResultsStep.notMe`)})]}),(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>r([...f]),disabled:!_,className:`mt-8 flex cursor-pointer h-11 w-[200px] shrink-0 items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition duration-150 enabled:active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-60`,style:{backgroundColor:c.isLight?`#1A1A1A`:`#FFFFFF`,color:c.isLight?`#FFFFFF`:`#1A1A1A`},children:[s(_?`actions.continue`:`researchResultsStep.stillSearching`),_&&(0,Z.jsx)(T,{className:`h-4 w-4`})]})]})]})}var Wr=38,Gr=Wr;function Kr({head:e,note:t,flyToNote:n,reduce:r,onLanded:i}){let{components:a,chosen:o}=Nr();if(!a||!o)return null;let s=Wr/2,c=n&&t?t:e,l={x:c.x-s,y:c.y-s};return(0,Z.jsx)(p.div,{className:`pointer-events-none absolute left-0 top-0`,style:{width:Wr,height:Wr,transformOrigin:`center`},initial:!1,animate:l,transition:r?{duration:0}:n&&t?{type:`spring`,duration:.9,bounce:.45}:{duration:.4},onAnimationComplete:()=>{n&&t&&i()},children:(0,Z.jsx)(K,{components:a,traits:o,size:Wr})})}function qr({installedPlugins:e=[],pluginCatalog:t={},onStart:r,onBack:i,onForward:a,disabled:o=!1}){let{t:s}=n(`onboarding`),c=Mr,l=u(),[d,f]=(0,X.useState)(!1),{components:m,chosen:h}=Nr(),{h:g}=z(),_=e.map(e=>({name:e,displayName:we(e),description:t[e]?.trim()??``})).filter(e=>e.displayName.length>0),v=_.length>0,y=(0,X.useRef)(null),b=(0,X.useRef)(null),x=(0,X.useRef)(null),[S,C]=(0,X.useState)(null),[w,E]=(0,X.useState)(!1),[D,O]=(0,X.useState)(!1),k=(0,X.useRef)(!1);(0,X.useEffect)(()=>{k.current=w},[w]),(0,X.useLayoutEffect)(()=>{let e=y.current,t=b.current;if(!e||!t)return;let n=()=>{if(k.current)return;let n=e.getBoundingClientRect(),r=e=>({x:e.left-n.left+e.width/2,y:e.top-n.top+e.height/2}),i=x.current;C({head:r(t.getBoundingClientRect()),note:i?r(i.getBoundingClientRect()):void 0})};n();let r=new ResizeObserver(n);return r.observe(e),window.addEventListener(`resize`,n),()=>{r.disconnect(),window.removeEventListener(`resize`,n)}},[]);let A=S?.note?.y;return(0,X.useEffect)(()=>{A===void 0||w||E(!0)},[A,w]),(0,Z.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:c.fg},children:[(0,Z.jsx)($,{onBack:i,onNext:a}),(0,Z.jsxs)(`div`,{ref:y,className:`absolute left-1/2 top-1/2 z-10 flex w-full max-w-xl -translate-x-1/2 -translate-y-1/2 flex-col px-6`,children:[(0,Z.jsxs)(`div`,{className:`flex items-center`,children:[(0,Z.jsx)(p.div,{ref:b,className:`shrink-0`,style:{height:Wr},initial:!1,animate:w?{width:0,marginRight:0}:{width:Wr,marginRight:12},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`}}),(0,Z.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:s(`letsChatReadyStep.title`)})]}),(0,Z.jsxs)(`div`,{className:`mt-4 flex items-center gap-3`,children:[D&&m&&h?(0,Z.jsx)(`div`,{className:`shrink-0`,children:(0,Z.jsx)(K,{components:m,traits:h,size:Gr})}):(0,Z.jsx)(`div`,{ref:x,className:`shrink-0`,style:{width:Gr,height:Gr}}),(0,Z.jsx)(p.p,{className:`text-[15px]`,style:{color:c.fg},initial:!1,animate:{opacity:+!!D,x:D?0:-6},transition:l?{duration:0}:{duration:.35},children:s(`letsChatReadyStep.setupNote`)})]}),v&&(0,Z.jsx)(`div`,{className:`flex flex-col gap-3`,style:{marginTop:Math.round(64-g*.02)},children:_.map((e,t)=>(0,Z.jsxs)(p.div,{initial:l?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:l?{duration:0}:{duration:.3,delay:t*.06},className:`rounded-2xl px-5 py-4`,style:{backgroundColor:c.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:[(0,Z.jsx)(`div`,{className:`text-[15px] font-medium`,children:e.displayName}),e.description&&(0,Z.jsx)(`div`,{className:`mt-1 text-[13px] leading-snug`,style:{color:c.fgMuted},children:e.description})]},e.name))}),(0,Z.jsxs)(`button`,{type:`button`,onClick:()=>{d||o||(f(!0),Promise.resolve().then(r).catch(()=>f(!1)))},disabled:d||o,className:`mt-16 flex cursor-pointer h-11 w-[200px] items-center justify-center gap-2 rounded-[10px] text-body-medium-default transition duration-150 enabled:active:scale-[0.97] disabled:cursor-not-allowed disabled:opacity-60`,style:{backgroundColor:c.isLight?`#1A1A1A`:`#FFFFFF`,color:c.isLight?`#FFFFFF`:`#1A1A1A`},children:[s(d?`actions.starting`:`letsChatReadyStep.letsChat`),!d&&(0,Z.jsx)(T,{className:`h-4 w-4`})]}),S&&!D&&(0,Z.jsx)(Kr,{head:S.head,note:S.note,flyToNote:w&&S.note!==void 0,reduce:l,onLanded:()=>O(!0)})]})]})}var Jr=[{bodyShape:`sprout`,eyeStyle:`curious`,colorIdx:0,base:230,pos:e=>({left:-e*.32,top:`40%`})},{bodyShape:`flower`,eyeStyle:`goofy`,colorIdx:1,base:230,pos:e=>({right:-e*.32,top:`40%`})},{bodyShape:`star`,eyeStyle:`dazed`,colorIdx:2,base:240,mobile:!0,pos:e=>({left:`16%`,bottom:-e*.42}),mobilePos:e=>({left:-e*.3,bottom:-e*.3})},{bodyShape:`burst`,eyeStyle:`angry`,colorIdx:0,base:240,mobile:!0,pos:e=>({right:`16%`,bottom:-e*.42}),mobilePos:e=>({right:-e*.3,bottom:-e*.3})},{bodyShape:`blob`,eyeStyle:`gentle`,colorIdx:1,base:220,pos:e=>({left:`42%`,bottom:-e*.5})},{bodyShape:`urchin`,eyeStyle:`curious`,colorIdx:2,base:220,mobile:!0,pos:e=>({left:-e*.28,bottom:`16%`}),mobilePos:e=>({left:-e*.3,top:-e*.3})},{bodyShape:`burst`,eyeStyle:`quirky`,colorIdx:0,base:220,mobile:!0,pos:e=>({right:-e*.28,bottom:`16%`}),mobilePos:e=>({right:-e*.3,top:-e*.3})},{bodyShape:`flower`,eyeStyle:`quirky`,colorIdx:1,base:230,pos:e=>({left:`30%`,bottom:-e*.4})}],Yr={duration:1,ease:`easeInOut`},Xr=Fe(Yr),Zr=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],Qr=290;function $r({peekLevel:e=0,eyesBumpNonce:t=0,darkBg:n=!1,showBottomEyes:r=!0,showTopTeam:i=!1,eyesEntrance:a=!1}){let o=L(),s=Q.use.characters(),c=Q.use.selectedIndex(),l=u(),{w:f}=cn(),m=Math.max(.42,Math.min(f/1100,1)),h=f<640,g=s.length>0?s[c]:void 0,{bg:_,peekColors:v}=(0,X.useMemo)(()=>!o||!g?{bg:at,peekColors:[]}:{bg:o.colors.find(e=>e.id===g.color)?.hex??`#17191C`,peekColors:lr(g.color,o.colors.map(e=>e.id),3)},[o,g]);return H(n?at:_,l?null:Xr),(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(p.div,{className:`absolute inset-0 z-0`,initial:!1,animate:{backgroundColor:n?at:_},transition:l?{duration:0}:Yr}),r&&(0,Z.jsx)(qn,{bumpNonce:t,entrance:a}),i&&o&&(0,Z.jsx)(`div`,{className:`pointer-events-none absolute right-0 z-[1] flex items-start`,style:{top:-Math.round(Qr*m)*.42,right:-Math.round(Qr*m)*.12},children:Zr.map((e,t)=>{let n=Math.round(Qr*m);return(0,Z.jsx)(p.div,{style:{width:n,height:n,marginLeft:t===0?0:-n*.34,zIndex:Zr.length-t},initial:l?!1:{y:-140,opacity:0},animate:{y:0,opacity:1},transition:l?{duration:0}:{type:`spring`,stiffness:200,damping:18,delay:t*.1},children:(0,Z.jsx)(K,{components:o,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:v[t]??`teal`},size:n,breathe:!1})},e.bodyShape)})}),o&&(0,Z.jsx)(d,{children:(h?Jr.filter(e=>e.mobile):Jr).slice(0,Math.max(0,e)).map((e,t)=>{let n=Math.round(e.base*m),r=h&&e.mobilePos?e.mobilePos(n):e.pos(n);return(0,Z.jsx)(p.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{...r,width:n,height:n},initial:l?!1:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:l?void 0:{scale:0,opacity:0},transition:l?{duration:0}:{type:`spring`,stiffness:220,damping:16,delay:.1},children:(0,Z.jsx)(K,{components:o,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:v[e.colorIdx]??`teal`},size:n,breathe:!1})},`peek-${t}`)})})]})}var ei=e(y(),1);function ti({error:e,onRetry:t}){let{t:r}=n(`onboarding`),i=e===B;return(0,ei.createPortal)((0,Z.jsx)(`div`,{className:`pointer-events-none fixed inset-x-0 top-0 z-50 flex justify-center px-4 pt-[calc(var(--safe-area-inset-top,env(safe-area-inset-top,0px))+5rem)]`,children:(0,Z.jsxs)(Je,{tone:`error`,title:r(`hatchingScreen.genericFailure`),className:`pointer-events-auto w-auto max-w-[480px] shadow-xl`,actions:i?(0,Z.jsx)(Y,{asChild:!0,variant:`primary`,size:`regular`,children:(0,Z.jsx)(`a`,{href:`${window.location.origin}/download`,children:r(`actions.downloadMacApp`)})}):(0,Z.jsx)(Y,{variant:`primary`,size:`regular`,onClick:t,children:r(`actions.tryAgain`)}),children:[e,i?(0,Z.jsx)(`p`,{className:`mt-1 text-[color:var(--content-default)]`,children:r(`hatchingScreen.localFallbackPitch`)}):null]})}),document.body)}var ni={established:!1,assistantName:null};async function ri(e,t={hasAnyActiveConversation:fe,fetchAssistantIdentity:I}){try{if(!await t.hasAnyActiveConversation(e))return ni}catch(e){return J(e,{context:`research_onboarding_established_check`}),ni}let n=await t.fetchAssistantIdentity(e).catch(()=>null);return{established:!0,assistantName:(typeof n?.name==`string`?n.name.trim():``)||null}}function ii({assistantName:e,onKeep:t,onRedo:r,onBack:i}){let{t:a}=n(`onboarding`);H(at);let o=e?.trim()||``,s=o.length>0;return(0,Z.jsxs)(`div`,{"data-theme":`dark`,className:`relative h-full overflow-hidden`,style:{backgroundColor:`var(--surface-base)`,color:`var(--content-primary)`},children:[(0,Z.jsx)($,{onBack:i,tone:`light`}),(0,Z.jsxs)(`div`,{className:`${ot} max-w-xl`,children:[(0,Z.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,Z.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:s?a(`existingAssistantStep.titleNamed`,{name:o}):a(`existingAssistantStep.title`)}),(0,Z.jsx)(`p`,{className:`text-[15px]`,style:{color:`var(--content-secondary)`},children:s?a(`existingAssistantStep.bodyNamed`,{name:o}):a(`existingAssistantStep.body`)})]}),(0,Z.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[(0,Z.jsxs)(Y,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:t,className:`h-11 text-base`,children:[s?a(`existingAssistantStep.keepNamed`,{name:o}):a(`existingAssistantStep.keep`),(0,Z.jsx)(T,{className:`h-4 w-4`})]}),(0,Z.jsx)(Y,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:r,className:`h-11 text-base`,children:s?a(`existingAssistantStep.redoNamed`,{name:o}):a(`existingAssistantStep.redo`)})]})]})]})}var ai=4e3;function oi(e){return{firstName:e.firstName,lastName:e.lastName,occupation:e.role,hobbies:e.hobbies,timezone:ge()}}function si(e){let t=e.firstName.trim();return t?`Getting to know ${t}`:`Getting to know you`}re();function ci(){let e=g(),t=xe.use.user(),n=t?.id??null,r=pe.use.enterFocus(),i=pe.use.exitFocus(),a=pe.use.setPendingAvatarTraits(),o=pe.use.setPendingAvatarVoice(),s=pe.use.requestSidebarCollapse(),[c,l]=(0,X.useState)(`form`),[u,d]=(0,X.useState)([]),[f,p]=(0,X.useState)(!1);function m(e){l(e)}function h(e,t=`completed`){N(ve[c],{userId:n,outcome:t}),d([]),m(e)}function v(e){d(e=>[...e,c]),m(e)}function y(){let e=u[u.length-1];e&&(d(e=>e.slice(0,-1)),m(e))}let b=u.length>0?y:void 0,[x,S]=(0,X.useState)(null),C=(0,X.useRef)(null),[w,T]=(0,X.useState)(null),[E,D]=(0,X.useState)(null),O=(0,X.useRef)(!1),[k,A]=(0,X.useState)(!1),[j,ee]=(0,X.useState)(null),[P,te]=(0,X.useState)({}),[re,ie]=(0,X.useState)(!1),[F,I]=(0,X.useState)(null),[oe,L]=(0,X.useState)(null),[se,R]=(0,X.useState)(!1),[z,B]=(0,X.useState)(!1),[le,ue]=(0,X.useState)(!1),[de,fe]=(0,X.useState)(0),[me,he]=(0,X.useState)(0),[ge]=_(),_e=vt({hostingParam:ge.get(`hosting`),localMode:ce(),gatewayAuthSession:je()}),be=ge.get(`assistant`)??void 0,Se=ge.get(Te)===`1`,Ce=_e,we=ne(),Ee=Re(),V=_e&&Ee&&!we,De=V?`looking`:`integration`;(0,X.useEffect)(()=>{V&&c===`integration`&&l(`looking`)},[V,c]);let{start:ke,retry:Me,ready:Ne,assistantId:H,error:U,awaitReady:W}=Ct({adoptExisting:_e,adoptAssistantId:be,postCheckoutReturn:Se}),G=Yt(),{start:Fe,hydrate:Ie}=G,Le=(0,X.useRef)(Promise.resolve()),ze=(0,X.useRef)(!1),[K,Be]=(0,X.useState)(!1),q=(0,X.useCallback)(e=>{ze.current=e,Be(e)},[]),[J,Ue]=(0,X.useState)(null),We=(0,X.useRef)(Promise.resolve()),[Ge,Ke]=(0,X.useState)(!1),Y=G.status===`idle`||G.status===`running`,Je=!Y&&G.claims.length===0;(0,X.useEffect)(()=>{i(),a(null),o(null),ke()},[i,a,o,ke]);let Ye=(0,X.useCallback)(()=>{if(C.current)return;let e=W().then(e=>ri(e)).catch(()=>ni);C.current=e,e.then(T)},[W]);(0,X.useEffect)(()=>{Ye()},[Ye]);let Xe=(0,X.useCallback)(()=>Promise.race([C.current??Promise.resolve(null),new Promise(e=>{setTimeout(()=>e(null),ai)})]),[]),Ze=(0,X.useCallback)(e=>{q(!1),Fe({awaitAssistantId:W,subject:oi(e),conversationTitle:si(e),...F?{resumeConversationId:F}:{},onConversationCreated:I,includeSuggestions:!1})},[q,Fe,W,F,!0]);(0,X.useLayoutEffect)(()=>{if(f||!n)return;let e=Pe(n);if(e?.formValues){S(e.formValues),ee(e.faceValues),L(e.checkinTime),B(e.checkinBooked),Ue(e.keptClaims??null),I(e.researchConversationId??null),e.research&&(Ie({...e.research,pluginCatalog:e.research.pluginCatalog??{},droppedClaims:e.research.droppedClaims??[]},W),q(e.droppedClaimsScrubbed??!1),A(!0));let t=Ve(e);l(Ce&&(t===`letschat`||t===`meeting`)||V&&t===`integration`?`looking`:t),d([])}p(!0)},[f,n,Ie,W,Ce,V,q]),(0,X.useEffect)(()=>{!f||!x||Ae(n,{step:c,formValues:x,faceValues:j,checkinTime:oe,checkinBooked:z,research:G.status===`done`?{status:`done`,claims:G.claims,droppedClaims:G.droppedClaims,suggestions:G.suggestions,installedPlugins:G.installedPlugins,pluginCatalog:G.pluginCatalog}:null,...F?{researchConversationId:F}:{},...J?{keptClaims:J}:{},...K?{droppedClaimsScrubbed:!0}:{}})},[f,n,c,J,x,j,oe,z,F,G.status,G.claims,G.droppedClaims,G.suggestions,G.installedPlugins,G.pluginCatalog,K]),(0,X.useEffect)(()=>{if(!f||!x||G.status!==`idle`&&G.status!==`done`)return;let e=G.status===`idle`,t=x,n=!1;return(async()=>{if(!O.current){let e=await Xe();if(n)return;if(e?.established){D(t),d([]),S(null),l(`existing`),A(!1);return}}A(!1),e&&Ze(t)})(),()=>{n=!0,A(!1)}},[f,x,G.status,Ze,Xe]),(0,X.useEffect)(()=>{c===`results`&&Je&&U===null&&(d([]),l(`suggestions`))},[c,Je,U]),(0,X.useEffect)(()=>{ze.current||Y||G.droppedClaims.length!==0&&(!F||!H||!Ne||G.claims.length>0&&c!==`suggestions`||(q(!0),Le.current=Zt({assistantId:H,conversationId:F,removedClaims:G.droppedClaims,rejectedAll:!1})))},[Y,G.claims.length,G.droppedClaims,F,H,Ne,c,q]);function Qe(t,i,c,{skip:l=!1,hidden:u=!1}={}){Oe(n);let{firstName:d,lastName:f,role:p,hobbies:m}=t,h=[d.trim(),f.trim()].filter(Boolean).join(` `),g=d.trim(),_=!l&&c===void 0;qe({tools:[],tasks:[],tone:mt,...h?{userName:h}:{},...p.trim()?{occupation:p.trim()}:{},...l?{}:{initialMessage:c??_t({firstName:d,lastName:f,occupation:p,hobbies:m}),...u?{initialMessageHidden:!0}:{}},..._?{title:g?`Getting to know ${g}`:`Getting to know you`}:{},...i?.name?.trim()?{assistantName:i.name.trim()}:{},...J?.length?{researchFindings:J}:{}});let v=i?.name?.trim();v&&M(v),a(i?.traits??null),o(i?.voiceModel??null),_&&r(),l||ye.markExpectingFirstMessage(),s(),ye.checkAssistant(H??void 0).finally(()=>{e(`${He.assistant}?onboarding=1`,{replace:!0})})}async function $e(){x&&(await Promise.all([G.awaitPluginInstalls(),Le.current,We.current]),Qe(x,j,rn(j?.name),{hidden:!0}))}function et(){Ke(!0),We.current=tn({awaitAssistantId:W,values:P,userName:x?.firstName?.trim()||void 0,assistantName:j?.name?.trim()||void 0}).finally(()=>Ke(!1))}async function tt(e){if(!O.current&&(await Xe())?.established){D(e),h(`existing`);return}S(e),Ze(e),h(`face`)}function nt(e){if(e.length>0&&!e.includes(`https://www.googleapis.com/auth/calendar.events`)){ue(!0);return}if(ue(!1),H&&x){let e=[x.firstName.trim(),x.lastName.trim()].filter(Boolean).join(` `);L(null),B(!1),R(!0),ae({assistantId:H,userName:e||void 0,assistantName:j?.name?.trim()||void 0}).then(e=>{e.scheduled&&(B(!0),L(an(e.start,e.timeZone)))}).finally(()=>R(!1))}h(`meeting`)}function rt(){C.current=null,Me(),Ye(),G.status===`error`&&x?(G.reset(),Ze(x)):G.status===`done`&&G.reinstallPlugins(G.installedPlugins,W),re&&et()}let it=e=>(0,Z.jsxs)(Z.Fragment,{children:[e,U!==null&&(0,Z.jsx)(ti,{error:U,onRetry:rt})]});if([`different`,`personality`,`integration`,`letschat`,`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(c)&&x){let e=[`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(c);return it((0,Z.jsxs)(zn,{surface:null,children:[(0,Z.jsx)($r,{eyesBumpNonce:de,peekLevel:[`looking`,`results`,`suggestions`,`finishing`].includes(c)?me:0,darkBg:e,showBottomEyes:!e&&c!==`different`,eyesEntrance:c===`personality`}),c===`different`&&(0,Z.jsx)(pr,{onContinue:()=>h(`personality`),onBack:()=>v(`intro`),onForward:b}),c===`personality`&&(0,Z.jsx)(Ar,{values:P,onValueChange:(e,t)=>te(n=>({...n,[e]:t})),locked:re,onContinue:()=>{re||(et(),ie(!0)),h(De)},onBack:()=>v(`different`),onForward:b}),c===`integration`&&(0,Z.jsx)(vr,{onClaim:()=>h(Ce?`looking`:`letschat`),onBumpEyes:()=>fe(e=>e+1),onBack:()=>v(`personality`),onForward:b}),c===`letschat`&&(0,Z.jsx)(jr,{assistantId:H,assistantReady:Ne,hatchError:U,onConnected:nt,missingCalendarScope:le,onRetry:()=>ue(!1),onSkip:()=>{ue(!1),h(`looking`,`skipped`)},onBack:()=>v(`integration`),onForward:b}),c===`meeting`&&(0,Z.jsx)(zr,{scheduledTime:oe??void 0,awaitingTime:se,onDone:()=>h(`looking`),onBack:()=>v(`letschat`),onForward:b}),c===`looking`&&(0,Z.jsx)(Vr,{onDone:()=>h(Je?`suggestions`:`results`),onBack:()=>v(V?`personality`:Ce?`integration`:`letschat`),onAdvance:e=>he(Math.min(e+1,4)),onForward:b,ready:!Y&&U===null}),c===`results`&&(0,Z.jsx)(Ur,{claims:G.claims,loading:Y,onContinue:e=>{let t=new Set(e);Ue(G.claims.filter(e=>!t.has(e.claim)).map(e=>e.claim));let n=ze.current?[]:G.droppedClaims,r=[...e,...n];F&&H&&r.length>0&&(n.length>0&&q(!0),Le.current=Zt({assistantId:H,conversationId:F,removedClaims:r,rejectedAll:!1})),h(`suggestions`)},onRejectAll:()=>{Ue([]),F&&H&&(q(!0),Le.current=Zt({assistantId:H,conversationId:F,removedClaims:G.claims.map(e=>e.claim),rejectedAll:!0})),h(`suggestions`,`skipped`)},onBack:()=>v(`looking`),onForward:b}),c===`suggestions`&&(0,Z.jsx)(qr,{installedPlugins:G.installedPlugins,pluginCatalog:G.pluginCatalog,disabled:k||U!==null||!Ne||H===null,onStart:async()=>{if(N(ve.suggestions,{userId:n,outcome:`completed`}),Ge){d([]),l(`finishing`);return}await $e()},onBack:()=>v(Je?`looking`:`results`),onForward:b}),c===`suggestions`&&!1,c===`finishing`&&(0,Z.jsx)(Hr,{ready:!Ge&&U===null,onDone:()=>void $e()})]}))}return it(c===`existing`?(0,Z.jsx)(ii,{assistantName:w?.assistantName??null,onKeep:()=>{N(ve.existing,{userId:n,outcome:`completed`}),Oe(n),ye.checkAssistant(H??void 0).finally(()=>{e(He.assistant,{replace:!0})})},onRedo:()=>{let e=E;e&&(O.current=!0,N(ve.existing,{userId:n,outcome:`skipped`}),S(e),Ze(e),d([]),m(`face`))},onBack:()=>{D(null),v(`form`)}}):c===`intro`&&x?(0,Z.jsx)($n,{firstName:x.firstName,assistantName:j?.name,onContinue:()=>h(`different`),onBack:()=>v(`face`),onForward:b}):c===`face`&&x?(0,Z.jsx)(Gn,{onContinue:e=>{ee(e),h(`intro`)},onBack:()=>v(`form`),onForward:b,canAuditionVoice:!_e}):(0,Z.jsx)(Rn,{initialFirstName:t?.firstName??``,initialLastName:t?.lastName??``,onSubmit:tt}))}export{ci as ResearchOnboardingRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{O as t}from"./vendor-WUN87CSE.js";import{b as n,f as r,g as i,t as a}from"./react-DPM_L_aA.js";import{U as ee}from"./icons-CSdHOix6.js";import{Gf as o,Uf as s,Ur as c,cu as l,du as te,dv as u,fm as d,fu as f,gs as p,lu as m,ou as h,su as g,uu as _,uv as v,wy as y,xp as b}from"./index-7XDiAJ-A.js";import{n as x,t as S}from"./consent-controls-RsRyTWzn.js";var C=e(n(),1),w={},T={"2026-06-22":[`Introduces Together AI as a new managed model provider`]};function ne(e){return w[e]??[]}function E(e){return T[e]??[]}var D=a();function O(){let{t:e}=t(`onboarding`),n=r(),[a]=i(),w=s.use.user()?.id??null,T=s.use.logout(),O=u(),k=o(),[A,j]=f(),[M,N]=m(),[P,F]=_(),[I,L]=te(),[R]=h(),[z]=g(),B=l(),V=P??!0,H=I??!0,[U]=(0,C.useState)(()=>!A),[W]=(0,C.useState)(()=>!M),[G]=(0,C.useState)(()=>!R),[K]=(0,C.useState)(()=>!z),q=!U&&!W&&!G&&!K,[J]=(0,C.useState)(()=>!B),Y=U||q,X=W||q,Z=G||q,Q=K||q||J,$=!q&&!U&&!W,re=q?`Terms & privacy`:$?`Review your privacy preferences`:J?`Before You Start`:`Updated terms`,ie=q?`Review your terms and privacy preferences anytime.`:$?`Confirm your privacy preferences to continue.`:J?`Review and accept the terms to start using your assistant. You can update your preferences anytime in Settings.`:`We've updated our terms. Please review and accept to continue.`,ae=(0,C.useCallback)(()=>{b({userId:w,tos:A,privacy:M,shareAnalytics:Z?V:null,shareDiagnostics:Q?H:null,hasPlatformSession:k}),n(d(a.get(`returnTo`),v.assistant),{replace:!0})},[M,k,n,a,V,H,Z,Q,A,w]),oe=(0,C.useCallback)(async()=>{await T(),p(v.account.login)},[T]),se=Y&&!A||X&&!M;return(0,D.jsx)(c,{showCreatureFooter:!1,children:(0,D.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${O?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[(0,D.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full border border-[var(--border-subtle)] bg-[var(--surface-lift)]`,style:{animation:`fadeInUp 0.5s ease-out 0.05s both`},children:(0,D.jsx)(ee,{className:`h-6 w-6 text-[var(--content-secondary)]`,strokeWidth:1.75})}),(0,D.jsx)(`h1`,{className:`mt-5 ${O?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,style:{animation:`fadeInUp 0.5s ease-out 0.12s both`},children:re}),(0,D.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${O?`mt-3`:`mt-3.5`}`,style:{animation:`fadeInUp 0.5s ease-out 0.2s both`},children:ie}),(Z||Q)&&(0,D.jsx)(x,{electron:O,showAnalytics:Z,showDiagnostics:Q,shareAnalytics:V,shareDiagnostics:H,onShareAnalyticsChange:F,onShareDiagnosticsChange:L,className:`mt-9 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.28s both`}}),(X||Y)&&(0,D.jsx)(S,{electron:O,showPrivacy:X,showTos:Y,privacyConsent:M,tosAccepted:A,onPrivacyChange:N,onTosChange:j,privacyNotes:X&&!J?E(`2026-06-22`):[],tosNotes:Y&&!J?ne(`2026-06-08`):[],className:`mt-6 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.36s both`}}),(0,D.jsxs)(`div`,{className:`mt-9 flex w-full flex-col ${O?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.44s both`},children:[(0,D.jsx)(y,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:se,onClick:ae,className:O?void 0:`h-11 text-base`,children:e(`actions.continue`)}),(0,D.jsx)(y,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:oe,className:O?void 0:`h-11 text-base`,children:e(`actions.logOut`)})]})]})})}export{O as ReviewTermsScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bh as e,Cv as t,Fh as n,Ih as r,Lh as i,Nh as a,Ph as o,Rh as s,Sv as c,Tv as l,zh as u}from"./index-7XDiAJ-A.js";async function d(e,n){let{error:r,response:i}=await s({path:{assistant_id:e},body:n,throwOnError:!1});if(t(i,r,`Failed to create schedule.`),!i.ok)throw new c(i.status,l(r,i,`Failed to create schedule.`))}async function f(e,n,r){let{error:i,response:a}=await o({path:{assistant_id:e,id:n},body:r,throwOnError:!1});if(t(a,i,`Failed to update schedule.`),!a.ok)throw new c(a.status,l(i,a,`Failed to update schedule.`))}var p=`Failed to move schedules to the selected profile.`;async function m(e,n,r){let{data:i,error:a,response:o}=await u({path:{assistant_id:e},body:{...n==null?{}:{from:n},to:r},throwOnError:!1});if(t(o,a,p),!o.ok)throw new c(o.status,l(a,o,p));return i?.reassigned??0}async function h(e,n,i=10,a){let{data:o,error:s,response:u}=await r({path:{assistant_id:e,id:n},query:{limit:i,before:a},throwOnError:!1});if(t(u,s,`Failed to load schedule runs.`),!u.ok)throw new c(u.status,l(s,u,`Failed to load schedule runs.`));return{runs:o?.runs??[],nextCursor:o?.nextCursor??null}}async function g(n,r){let{data:i,error:a,response:o}=await e({path:{assistant_id:n},query:{from:r.from,to:r.to},throwOnError:!1});if(t(o,a,`Failed to load schedule usage.`),!o.ok)throw new c(o.status,l(a,o,`Failed to load schedule usage.`));return i?.summaries??[]}async function _(e,n,r){let{error:a,response:o}=await i({path:{assistant_id:e,id:n},body:{enabled:r},throwOnError:!1});if(t(o,a,`Failed to toggle schedule.`),!o.ok)throw new c(o.status,l(a,o,`Failed to toggle schedule.`))}async function v(e,n){let{error:r,response:i}=await a({path:{assistant_id:e,id:n},throwOnError:!1});if(t(i,r,`Failed to delete schedule.`),!i.ok&&i.status!==204)throw new c(i.status,l(r,i,`Failed to delete schedule.`))}async function y(e,r){let{error:i,response:a}=await n({path:{assistant_id:e,id:r},throwOnError:!1});if(t(a,i,`Failed to run schedule.`),!a.ok)throw new c(a.status,l(i,a,`Failed to run schedule.`))}export{m as a,f as c,g as i,v as n,y as o,h as r,_ as s,d as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{A as t,Hn as n,Kn as r,N as i,O as a,Un as o,Yn as s}from"./vendor-WUN87CSE.js";import{b as c,f as l,m as u,t as d}from"./react-DPM_L_aA.js";import{Fr as f,Hr as p,K as m,Lr as h,ar as g,gr as _,lt as v,qr as y,tn as b,x,zr as S}from"./icons-CSdHOix6.js";import{t as C}from"./repeat-DVEpBLT_.js";import{$u as w,$v as T,Bd as E,Cy as D,Ds as O,Dy as k,Es as A,F as j,Gv as M,Jv as N,Ld as ee,Os as te,Qu as ne,Rd as re,Sy as ie,Ud as P,Ug as F,Vd as I,Wu as L,at as ae,ay as R,c as oe,cd as se,cf as ce,ct as le,ed as ue,ff as de,ft as fe,gy as pe,ho as me,hy as he,it as ge,iy as _e,jg as ve,ld as ye,lt as be,ly as xe,ma as Se,my as Ce,ny as we,od as Te,pf as Ee,qu as De,sd as Oe,st as ke,sy as z,td as Ae,ud as je,uv as B,vv as V,vy as Me,wy as H,xs as Ne,xy as U,zd as Pe}from"./index-7XDiAJ-A.js";import{t as Fe}from"./detail-card-BTciodin.js";import{n as Ie,t as Le}from"./detail-drawer-svbxV7k9.js";import{a as Re,c as ze,i as Be,n as Ve,o as He,r as Ue,s as We,t as Ge}from"./schedules-B_SL_iV4.js";import{i as Ke,n as qe,t as Je}from"./profile-metadata-Bk4pj7o_.js";import{t as Ye}from"./page-empty-state-BrGkTMcK.js";var W=e(c(),1),Xe={frequency:`daily`,minute:0,hour24:9,weekdays:[1],dayOfMonth:1},Ze=[{value:0,letter:`S`,short:`Sun`,full:`Sunday`},{value:1,letter:`M`,short:`Mon`,full:`Monday`},{value:2,letter:`T`,short:`Tue`,full:`Tuesday`},{value:3,letter:`W`,short:`Wed`,full:`Wednesday`},{value:4,letter:`T`,short:`Thu`,full:`Thursday`},{value:5,letter:`F`,short:`Fri`,full:`Friday`},{value:6,letter:`S`,short:`Sat`,full:`Saturday`}],Qe=[1,2,3,4,5];function G(e,t,n){return Number.isFinite(e)?Math.min(n,Math.max(t,Math.round(e))):t}function $e(e){let t=Array.from(new Set(e.map(e=>G(e,0,6)).filter(e=>Number.isInteger(e)))).sort((e,t)=>e-t);return t.length>0?t:[1]}function et(e){let t=G(e.minute,0,59),n=G(e.hour24,0,23);switch(e.frequency){case`hourly`:return`${t} * * * *`;case`daily`:return`${t} ${n} * * *`;case`weekly`:return`${t} ${n} * * ${$e(e.weekdays).join(`,`)}`;case`monthly`:return e.dayOfMonth===`last`?`${t} ${n} L * *`:`${t} ${n} ${G(e.dayOfMonth,1,28)} * *`}}function tt(e,t){let n=G(e,0,23),r=G(t,0,59),i=n<12?`AM`:`PM`;return`${n%12==0?12:n%12}:${String(r).padStart(2,`0`)} ${i}`}function nt(e){let t=[`th`,`st`,`nd`,`rd`],n=e%100;return`${e}${t[(n-20)%10]??t[n]??t[0]}`}function rt(e){let t=$e(e),n=new Set(t);if(t.length===7)return`every day`;if(t.length===5&&Qe.every(e=>n.has(e)))return`every weekday`;if(t.length===2&&n.has(0)&&n.has(6))return`every weekend`;if(t.length===1)return`every ${Ze[t[0]]?.full??`day`}`;let r=t.map(e=>Ze[e]?.short??``),i=r.pop();return`every ${r.join(`, `)} & ${i}`}function it(e){let t=tt(e.hour24,e.minute);switch(e.frequency){case`hourly`:{let t=G(e.minute,0,59);return`Runs every hour at :${String(t).padStart(2,`0`)}`}case`daily`:return`Runs every day at ${t}`;case`weekly`:return`Runs ${rt(e.weekdays)} at ${t}`;case`monthly`:return e.dayOfMonth===`last`?`Runs on the last day of every month at ${t}`:`Runs on the ${nt(G(e.dayOfMonth,1,28))} of every month at ${t}`}}var K=d(),at=Array.from({length:12},(e,t)=>{let n=t+1;return{value:String(n),label:String(n)}}),ot=Array.from({length:12},(e,t)=>{let n=t*5,r=String(n).padStart(2,`0`);return{value:r,label:r}});function st(e,t){let n=e%12;return t===`PM`?n+12:n}function ct(e){try{let t=new Intl.DateTimeFormat(`en-US`,{timeZone:e,timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value;return t&&t!==e?`${e} · ${t}`:e}catch{return e}}function lt({isOpen:e,assistantId:t,onClose:n,onCreated:r}){return(0,K.jsx)(z.Root,{open:e,onOpenChange:e=>{e||n()},children:e?(0,K.jsx)(ut,{assistantId:t,onClose:n,onCreated:r}):null})}function ut({assistantId:e,onClose:t,onCreated:n}){let{t:r}=a(`settings`),i=Se(),[o,s]=(0,W.useState)(``),[c,l]=(0,W.useState)(``),[u,d]=(0,W.useState)(``),[f,p]=(0,W.useState)(`simple`),[m,h]=(0,W.useState)(Xe),[g,_]=(0,W.useState)(``),[v,y]=(0,W.useState)(!1),[b,x]=(0,W.useState)(null),S=o.trim(),C=c.trim(),w=u.trim(),T=g.trim(),E=(0,W.useMemo)(()=>f===`simple`?et(m):T,[f,m,T]),D=(0,W.useMemo)(()=>f===`simple`?it(m):T||r(`createScheduleModal.cronContinuePrompt`),[f,m,T,r]),O=(0,W.useMemo)(()=>ct(i),[i]),k=S.length>0&&C.length>0&&w.length>0&&E.length>0&&!v;return(0,K.jsxs)(z.Content,{size:`md`,children:[(0,K.jsxs)(z.Header,{children:[(0,K.jsx)(z.Title,{children:r(`createScheduleModal.title`)}),(0,K.jsx)(z.Description,{children:r(`createScheduleModal.description`)})]}),(0,K.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),k){y(!0),x(null);try{await Ge(e,{name:S,description:C,expression:E,message:w,timezone:i}),y(!1),n()}catch(e){x(e instanceof Error?e.message:r(`createScheduleModal.createFailed`)),y(!1)}}},children:[(0,K.jsx)(z.Body,{children:(0,K.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,K.jsx)(he,{label:r(`createScheduleModal.nameLabel`),placeholder:r(`createScheduleModal.namePlaceholder`),value:o,onChange:e=>s(e.target.value),required:!0,autoFocus:!0,fullWidth:!0}),(0,K.jsx)(pe,{label:r(`createScheduleModal.descriptionLabel`),placeholder:r(`createScheduleModal.descriptionPlaceholder`),value:c,onChange:e=>l(e.target.value),required:!0,fullWidth:!0,rows:2}),(0,K.jsx)(ht,{label:r(`createScheduleModal.repeatLabel`),children:f===`simple`?(0,K.jsx)(dt,{cadence:m,onChange:h}):(0,K.jsx)(mt,{value:g,onChange:_,onUseSimple:()=>p(`simple`)})}),(0,K.jsx)(gt,{summary:D,mono:f===`advanced`&&T.length>0,timezoneLabel:O}),f===`simple`?(0,K.jsx)(`button`,{type:`button`,onClick:()=>{_(e=>e||et(m)),p(`advanced`)},className:`self-start text-body-small-default text-[var(--content-tertiary)] underline-offset-2 transition-colors hover:text-[var(--content-default)] hover:underline`,children:r(`createScheduleModal.advancedCron`)}):null,(0,K.jsx)(pe,{label:r(`createScheduleModal.messageLabel`),placeholder:r(`createScheduleModal.messagePlaceholder`),value:u,onChange:e=>d(e.target.value),required:!0,fullWidth:!0,rows:4}),b?(0,K.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:b}):null]})}),(0,K.jsxs)(z.Footer,{children:[(0,K.jsx)(H,{variant:`outlined`,onClick:t,type:`button`,children:r(`createScheduleModal.cancel`)}),(0,K.jsx)(H,{variant:`primary`,type:`submit`,disabled:!k,children:r(v?`createScheduleModal.creating`:`createScheduleModal.create`)})]})]})]})}function dt({cadence:e,onChange:t}){let{t:n}=a(`settings`),r=[{value:`hourly`,label:n(`createScheduleModal.frequencyHourly`)},{value:`daily`,label:n(`createScheduleModal.frequencyDaily`)},{value:`weekly`,label:n(`createScheduleModal.frequencyWeekly`)},{value:`monthly`,label:n(`createScheduleModal.frequencyMonthly`)}],i=[...Array.from({length:28},(e,t)=>{let n=t+1;return{value:String(n),label:nt(n)}}),{value:`last`,label:n(`createScheduleModal.lastDay`)}];return(0,K.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,K.jsx)(xe,{items:r,value:e.frequency,onChange:n=>t({...e,frequency:n}),ariaLabel:n(`createScheduleModal.frequencyAriaLabel`)}),e.frequency===`hourly`?(0,K.jsx)(q,{label:n(`createScheduleModal.atMinute`),children:(0,K.jsx)(T,{options:ot,value:String(e.minute).padStart(2,`0`),onChange:n=>t({...e,minute:Number(n)}),"aria-label":n(`createScheduleModal.minuteAriaLabel`),className:`w-24`})}):null,e.frequency===`weekly`?(0,K.jsx)(q,{label:n(`createScheduleModal.onTheseDays`),children:(0,K.jsx)(pt,{value:e.weekdays,onChange:n=>t({...e,weekdays:n})})}):null,e.frequency===`monthly`?(0,K.jsx)(q,{label:n(`createScheduleModal.onDay`),children:(0,K.jsx)(T,{options:i,value:e.dayOfMonth===`last`?`last`:String(e.dayOfMonth),onChange:n=>t({...e,dayOfMonth:n===`last`?`last`:Number(n)}),"aria-label":n(`createScheduleModal.dayOfMonthAriaLabel`),className:`w-32`})}):null,e.frequency===`hourly`?null:(0,K.jsx)(q,{label:n(`createScheduleModal.atTime`),children:(0,K.jsx)(ft,{hour24:e.hour24,minute:e.minute,onChange:(n,r)=>t({...e,hour24:n,minute:r})})})]})}function ft({hour24:e,minute:t,onChange:n}){let{t:r}=a(`settings`),i=e<12?`AM`:`PM`,o=e%12==0?12:e%12,s=[{value:`AM`,label:r(`createScheduleModal.periodAm`)},{value:`PM`,label:r(`createScheduleModal.periodPm`)}];return(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(T,{options:at,value:String(o),onChange:e=>n(st(Number(e),i),t),"aria-label":r(`createScheduleModal.hourAriaLabel`),className:`w-[72px]`}),(0,K.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:`:`}),(0,K.jsx)(T,{options:ot,value:String(t).padStart(2,`0`),onChange:t=>n(e,Number(t)),"aria-label":r(`createScheduleModal.minuteAriaLabel`),className:`w-[72px]`}),(0,K.jsx)(`div`,{className:`w-[112px]`,children:(0,K.jsx)(xe,{items:s,value:i,onChange:e=>n(st(o,e),t),ariaLabel:r(`createScheduleModal.periodAriaLabel`)})})]})}function pt({value:e,onChange:t}){let n=new Set(e),r=e=>{let r=new Set(n);r.has(e)?r.size>1&&r.delete(e):r.add(e),t([...r].sort((e,t)=>e-t))};return(0,K.jsx)(`div`,{className:`flex gap-1.5`,children:Ze.map(e=>{let t=n.has(e.value);return(0,K.jsx)(`button`,{type:`button`,onClick:()=>r(e.value),"aria-pressed":t,"aria-label":e.full,title:e.full,className:k(`flex h-9 w-9 items-center justify-center rounded-md border text-body-medium-default transition-colors`,t?`border-[var(--border-active)] bg-[var(--surface-active)] text-[var(--content-emphasised)]`:`border-[var(--field-border)] text-[var(--content-tertiary)] hover:border-[var(--border-active)] hover:text-[var(--content-default)]`),children:e.letter},e.value)})})}function mt({value:e,onChange:t,onUseSimple:n}){let{t:r}=a(`settings`);return(0,K.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,K.jsx)(he,{placeholder:`0 9 * * *`,value:e,onChange:e=>t(e.target.value),fullWidth:!0,className:`font-mono`,"aria-label":r(`createScheduleModal.cronAriaLabel`),helperText:r(`createScheduleModal.cronHelper`)}),(0,K.jsx)(`button`,{type:`button`,onClick:n,className:`self-start text-body-small-default text-[var(--content-tertiary)] underline-offset-2 transition-colors hover:text-[var(--content-default)] hover:underline`,children:r(`createScheduleModal.backToSimple`)})]})}function ht({label:e,children:t}){return(0,K.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:e}),t]})}function q({label:e,children:t}){return(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1.5`,children:[(0,K.jsx)(`span`,{className:`min-w-[88px] text-body-small-default text-[var(--content-tertiary)]`,children:e}),t]})}function gt({summary:e,mono:t,timezoneLabel:n}){let{t:r}=a(`settings`);return(0,K.jsxs)(`div`,{className:`flex items-start gap-3 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-lift)] px-3.5 py-3`,children:[(0,K.jsx)(_,{className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`p`,{className:k(`text-body-medium-default text-[var(--content-default)]`,t&&`break-all font-mono`),children:e}),(0,K.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:r(`createScheduleModal.timezoneNote`,{timezone:n})})]})]})}function _t(e=Ne(),t=Date.now()){return Ke(qe,e,t)}function J(e){return e?new Date(e).toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0}):`—`}function vt(e){return e==null?`—`:e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}var yt=new Intl.NumberFormat(void 0,{style:`currency`,currency:`USD`,minimumFractionDigits:2,maximumFractionDigits:2});function Y(e){return e==null||!Number.isFinite(e)?`—`:yt.format(e)}function bt(e){return`${e.toLocaleString()} ${e===1?`run`:`runs`}`}function xt(e){let t=Math.round(e/6e4);return t>=60&&t%60==0?`Every ${t/60} hr`:`Every ${t} min`}function St(e){if(!e)return;let t=new Set,n=[];for(let r of e)for(let e of r.runs)t.has(e.id)||(t.add(e.id),n.push(e));return n}function Ct(e){return!!e.conversationId&&e.conversationExists===!0&&e.conversationArchivedAt==null}function wt(e){return Ct(e)?e.conversationId??null:null}function X(e){return typeof e==`string`&&e.length>0}function Tt(e){return e.status===`pending`||e.status===`superseded`}function Et(e){return e.status!==`skipped`&&e.status!==`missed`&&!Tt(e)}var Dt={heartbeat:`system-heartbeat`,consolidation:`system-consolidation`,retrospective:`system-memory-retrospective`};function Ot(e){if(e.cronExpression)return e.timezone?`Cron: ${e.cronExpression} (${e.timezone})`:`Cron: ${e.cronExpression}`;let t=xt(e.intervalMs);return e.activeHoursStart!=null&&e.activeHoursEnd!=null&&(t+=` (${e.activeHoursStart}:00–${e.activeHoursEnd}:00)`),t}function kt(e){return xt(e.intervalMs)}var At=`After conversation activity`;function jt(e){return e.status!==`fired`&&e.status!==`cancelled`}function Mt(e,t){return jt(e)?e.status===`firing`?!1:e.nextRunAt==null||!e.enabled&&e.nextRunAt<=t:!0}function Nt(e,t){let n=[],r=[],i=[];for(let a of e)a.isOneShot?Mt(a,t)?i.push(a):r.push(a):n.push(a);return n.sort((e,t)=>e.enabled===t.enabled?(e.nextRunAt??1/0)-(t.nextRunAt??1/0):e.enabled?-1:1),r.sort((e,t)=>(e.nextRunAt??1/0)-(t.nextRunAt??1/0)),i.sort((e,t)=>{let n=e.lastRunAt??e.nextRunAt??0;return(t.lastRunAt??t.nextRunAt??0)-n}),{recurring:n,upcomingOneTime:r,pastOneTime:i}}function Pt(e,t,n=!0){return{queryKey:[{_id:`schedulesUsagesummaryGet`,path:{assistant_id:e??``},_tz:t}],queryFn:()=>e?Be(e,_t(t)):Promise.resolve([]),enabled:n,staleTime:1e4}}function Ft(e){return{scheduleId:e,runCount:0,totalEstimatedCostUsd:0,eventCount:0}}function It(e,t,n){let r=(t??[]).filter(e=>{let t=e.startedAt??e.createdAt;return Et(e)&&t>=n.from&&t<=n.to});return{scheduleId:e,runCount:r.length,totalEstimatedCostUsd:r.reduce((e,t)=>{let n=t.estimatedCostUsd;return typeof n==`number`&&Number.isFinite(n)?e+n:e},0),eventCount:0}}function Lt(e,t,n){let i=!!e&&n?.enabled!==!1,{data:a}=r({...De({path:{assistant_id:e}}),enabled:i,staleTime:6e4}),{data:o}=r({...L({path:{assistant_id:e}}),enabled:i,staleTime:6e4}),s=a?.callSites.find(e=>e.id===t)?.defaultProfile??null;return s==null?{key:null,label:null}:{key:s,label:(o?Je(o):{})[s]?.displayName??s}}function Rt(e,t,n){let{t:r}=a(`settings`),i=Lt(e,`mainAgent`),[s,c]=(0,W.useState)(!1),l=(0,W.useMemo)(()=>i.key?t.filter(e=>jt(e)&&e.inferenceProfile!==i.key).length:0,[i.key,t]),u=i.label,d=o({mutationFn:t=>Re(e,null,t),onSuccess:e=>{c(!1),n(),R.success(e===0?r(`scheduleProfileRebase.alreadyOnProfileToast`,{profile:u}):r(`scheduleProfileRebase.movedToast`,{count:e,profile:u}))},onError:e=>{V(e,{context:`schedules_rebase_inference_profile`}),R.error(r(`scheduleProfileRebase.moveFailedToast`))}});return{defaultProfileLabel:u,offDefaultCount:l,canRebase:l>0,requestRebase:()=>c(!0),dialogProps:{open:s&&i.key!=null,profileLabel:u,offDefaultCount:l,isPending:d.isPending,onConfirm:()=>{i.key&&d.mutate(i.key)},onCancel:()=>c(!1)}}}function zt({open:e,profileLabel:t,offDefaultCount:n,isPending:r,onConfirm:i,onCancel:o}){let{t:s}=a(`settings`);return(0,K.jsx)(_e,{open:e,title:s(`scheduleProfileRebase.dialogTitle`,{profile:t}),message:s(`scheduleProfileRebase.dialogMessage`,{count:n,profile:t}),confirmLabel:s(`scheduleProfileRebase.moveSchedules`),isPending:r,onConfirm:i,onCancel:o})}function Bt({status:e}){let{t}=a(`settings`);return(0,K.jsx)(`span`,{className:`inline-block h-2 w-2 rounded-full`,style:{backgroundColor:e===`ok`||e===`completed`?`var(--system-positive-strong)`:e===`error`||e===`failed`?`var(--system-negative-strong)`:`var(--content-tertiary)`},"aria-label":e??t(`scheduleSharedUi.unknownStatus`)})}function Vt({scheduleName:e,usage:t,onOpenUsage:n}){let{t:r}=a(`settings`);if(t.status===`loading`)return(0,K.jsxs)(`div`,{"aria-label":r(`scheduleSharedUi.loadingUsage`),className:`flex w-[156px] shrink-0 items-center justify-end gap-3`,children:[(0,K.jsx)(N,{as:`span`,className:`h-5 w-16`}),(0,K.jsx)(N,{as:`span`,className:`h-5 w-16`})]});let i=t.status===`error`,o=i?`--`:Y(t.summary.totalEstimatedCostUsd),s=i?`--`:bt(t.summary.runCount),c=t.status===`ready`&&!(t.summary.totalEstimatedCostUsd>0),l=t.status===`ready`&&t.summary.runCount===0,u=c?`text-[var(--content-tertiary)]`:`text-[var(--content-default)]`,d=l?`text-[var(--content-tertiary)]`:`text-[var(--content-default)]`;return(0,K.jsxs)(`div`,{className:`flex w-[156px] shrink-0 items-center justify-end gap-3 text-right text-body-small-default`,children:[n?(0,K.jsx)(`button`,{type:`button`,onClick:n,"aria-label":r(`scheduleSharedUi.viewUsageFor`,{name:e}),className:`min-w-[64px] cursor-pointer rounded px-1 py-0.5 text-right transition-colors hover:bg-[var(--surface-hover)] ${u}`,children:o}):(0,K.jsx)(`span`,{"aria-label":r(`scheduleSharedUi.costFor`,{name:e,cost:o}),className:`block min-w-[64px] px-1 py-0.5 ${u}`,children:o}),(0,K.jsx)(`span`,{"aria-label":r(`scheduleSharedUi.runsFor`,{name:e,runs:s}),className:`block min-w-[64px] px-1 py-0.5 ${d}`,children:s})]})}function Ht({name:e,subtitle:t,enabled:n,nextRunAt:r,lastRunAt:i,usage:o,helperText:s,statusLabel:c,statusTone:l=`neutral`,onClick:u}){let{t:d}=a(`settings`);return(0,K.jsx)(`div`,{className:`flex flex-wrap items-center gap-3 rounded-md px-2 py-3 transition-colors hover:bg-[var(--surface-hover)] [&+&]:border-t [&+&]:border-[var(--border-base)]`,children:(0,K.jsxs)(`button`,{type:`button`,onClick:u,"aria-label":d(`systemTasksSection.openAriaLabel`,{name:e}),className:`flex min-w-0 flex-1 cursor-pointer flex-wrap items-center gap-3 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]`,children:[(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,K.jsx)(`span`,{className:`truncate text-body-medium-default text-[var(--content-default)]`,children:e})}),(0,K.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:t}),s?(0,K.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-secondary)]`,children:s}):null,(0,K.jsxs)(`div`,{className:`mt-0.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-body-small-default text-[var(--content-tertiary)]`,children:[r?(0,K.jsx)(`span`,{children:d(`systemTasksSection.nextRun`,{time:J(r)})}):null,i?(0,K.jsx)(`span`,{children:d(`systemTasksSection.lastRun`,{time:J(i)})}):null]})]}),(0,K.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-end gap-3`,children:[(0,K.jsx)(Vt,{scheduleName:e,usage:o}),c?(0,K.jsx)(Me,{tone:l,children:c}):(0,K.jsx)(`span`,{className:`h-2 w-2 rounded-full`,style:{backgroundColor:n?`var(--system-positive-strong)`:`var(--content-disabled)`},"aria-label":d(n?`systemTasksSection.enabled`:`systemTasksSection.disabled`)}),(0,K.jsx)(h,{className:`h-4 w-4 text-[var(--content-tertiary)]`})]})]})})}function Ut({heartbeatConfig:e,consolidationConfig:n,retrospectiveConfig:r,heartbeatUsage:i,consolidationUsage:o,retrospectiveUsage:s,isLoading:c,hasError:l,onRetry:u,onSelectHeartbeat:d,onSelectConsolidation:f,onSelectRetrospective:p}){let{t:m}=a(`settings`),h=e!=null,g=n?.available===!0,_=r?.available===!0,v=h||g||_;if(!c&&!l&&!v)return null;let y=[...h?[i]:[],...g?[o]:[],..._?[s]:[]].filter(e=>e.status===`ready`),x=y.reduce((e,t)=>e+(t.summary.totalEstimatedCostUsd??0),0),C=c?(0,K.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,K.jsx)(b,{className:`h-5 w-5 animate-spin text-stone-400`})}):l&&!v?(0,K.jsx)(U,{tone:`error`,children:(0,K.jsx)(t,{ns:`settings`,i18nKey:`systemTasksSection.loadError`,components:{retryButton:(0,K.jsx)(`button`,{type:`button`,onClick:u,className:`cursor-pointer underline hover:no-underline`})}})}):(0,K.jsxs)(`div`,{children:[h?(0,K.jsx)(Ht,{name:m(`systemTasksSection.heartbeatName`),subtitle:Ot(e),enabled:e.enabled,nextRunAt:e.nextRunAt,lastRunAt:e.lastRunAt,usage:i,onClick:d}):null,g?(0,K.jsx)(Ht,{name:m(`systemTasksSection.consolidationName`),subtitle:kt(n),enabled:n.enabled,helperText:n.enabled?void 0:m(`systemTasksSection.consolidationPausedHelper`),nextRunAt:n.nextRunAt,lastRunAt:n.lastRunAt,usage:o,statusLabel:n.enabled?void 0:m(`systemTasksSection.paused`),statusTone:`warning`,onClick:f}):null,_?(0,K.jsx)(Ht,{name:m(`systemTasksSection.retrospectiveName`),subtitle:At,enabled:r.enabled,helperText:r.enabled?void 0:m(`systemTasksSection.retrospectivePausedHelper`),nextRunAt:r.nextRunAt,lastRunAt:r.lastRunAt,usage:s,statusLabel:r.enabled?void 0:m(`systemTasksSection.paused`),statusTone:`warning`,onClick:p}):null,l?(0,K.jsx)(`div`,{className:`pt-3 first:pt-0`,children:(0,K.jsx)(U,{tone:`error`,children:(0,K.jsx)(t,{ns:`settings`,i18nKey:`systemTasksSection.partialLoadError`,components:{retryButton:(0,K.jsx)(`button`,{type:`button`,onClick:u,className:`cursor-pointer underline hover:no-underline`})}})})}):null]});return(0,K.jsx)(Fe,{children:(0,K.jsx)(M.Root,{type:`multiple`,children:(0,K.jsxs)(M.Item,{value:`system-jobs`,children:[(0,K.jsxs)(M.Trigger,{className:`group justify-between gap-3`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-baseline gap-x-2 gap-y-1 text-left`,children:[(0,K.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-secondary)]`,children:m(`systemTasksSection.title`)}),(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:m(`systemTasksSection.subtitle`)})]}),(0,K.jsxs)(`span`,{className:`flex shrink-0 items-center gap-3`,children:[y.length>0?(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:m(`systemTasksSection.cost7d`,{cost:Y(x)})}):null,(0,K.jsx)(S,{className:`h-4 w-4 shrink-0 text-[var(--content-tertiary)] transition-transform group-data-[state=open]:rotate-180`})]})]}),(0,K.jsx)(M.Content,{children:(0,K.jsx)(`div`,{className:`mt-3`,children:C})})]})})})}var Wt={disabled:`heartbeat is disabled`,outside_active_hours:`outside active hours`,overlap:`previous run was still active`,pre_first_user_message:`waiting for the first conversation`,max_consecutive_runs:`consecutive-run cap reached`,max_daily_runs:`daily run cap reached`,quiesced:`assistant was shutting down`};function Gt(e){return e.status===`missed`?`Missed while the assistant was offline`:`skipReason`in e&&e.skipReason?`Skipped — ${Wt[e.skipReason]??e.skipReason}`:null}function Z(e,t){return{id:e.id,jobId:t,status:e.status,startedAt:e.startedAt??e.scheduledFor,finishedAt:e.finishedAt,durationMs:e.durationMs,output:Gt(e),error:e.error,conversationId:e.conversationId,conversationExists:e.conversationExists,conversationArchivedAt:e.conversationArchivedAt,estimatedCostUsd:e.estimatedCostUsd,createdAt:e.createdAt,...`title`in e?{title:e.title}:{}}}function Kt(e){return e.runs.filter(e=>!Tt(e)).map(e=>Z(e,`heartbeat`))}function qt(e){return e.runs.map(e=>Z(e,`consolidation`))}function Jt(e){return e.runs.map(e=>Z(e,`retrospective`))}var Q=1e4;function Yt(e,t,n,r,i){return e?{status:`loading`}:t?{status:`error`}:{status:`ready`,summary:It(n,r,i)}}function Xt(e,t){let n=s(),a={path:{assistant_id:e??``}},{data:o,isLoading:c,isError:l,refetch:u}=r({...Te(a),enabled:!!e,staleTime:Q}),{data:d,isLoading:f,isError:p,refetch:m}=r({...ne(a),enabled:!!e,staleTime:Q}),{data:h,isLoading:g,isError:_,refetch:v}=r({...ee(a),enabled:!!e,staleTime:Q}),y={path:{assistant_id:e??``},query:{limit:100}},{data:b,isLoading:x,isError:S,refetch:C}=r({...je(y),select:Kt,enabled:!!e&&o!=null,staleTime:Q}),{data:w,isLoading:T,isError:D,refetch:O}=r({...Ae(y),select:qt,enabled:!!e&&d?.available===!0,staleTime:Q}),{data:k,isLoading:A,isError:j,refetch:M}=r({...E(y),select:Jt,enabled:!!e&&h?.available===!0,staleTime:Q}),N=(0,W.useMemo)(()=>_t(t),[t]),te=(0,W.useMemo)(()=>Yt(x,S,Dt.heartbeat,b,N),[b,S,x,N]),re=(0,W.useMemo)(()=>Yt(T,D,Dt.consolidation,w,N),[w,D,T,N]),ie=(0,W.useMemo)(()=>Yt(A,j,Dt.retrospective,k,N),[k,j,A,N]),P=t=>{if(!e)return;let r={heartbeat:{config:Te(a).queryKey,runs:je(y).queryKey,infinite:ye(a)},consolidation:{config:ne(a).queryKey,runs:Ae(y).queryKey,infinite:ue(a)},retrospective:{config:ee(a).queryKey,runs:E(y).queryKey,infinite:Pe(a)}}[t];n.invalidateQueries({queryKey:r.config}),n.invalidateQueries({queryKey:r.runs}),n.invalidateQueries({queryKey:r.infinite})},F=Ee({onSuccess:e=>{e.ran?R.success(i(`settings:useSystemTasks.heartbeatStarted`)):R.info(i(`settings:useSystemTasks.heartbeatSkipped`))},onError:e=>{V(e,{context:`heartbeat_run_now`}),R.error(i(`settings:useSystemTasks.heartbeatRunFailed`))},onSettled:()=>P(`heartbeat`)}),I=ce({onSuccess:e=>{e.ran?R.success(i(`settings:useSystemTasks.consolidationQueued`)):R.info(i(`settings:useSystemTasks.consolidationAlreadyQueued`))},onError:e=>{V(e,{context:`consolidation_run_now`}),R.error(i(`settings:useSystemTasks.consolidationRunFailed`))},onSettled:()=>P(`consolidation`)}),L=de({onSuccess:e=>{Oe(n,a,e),R.success(e.enabled?i(`settings:useSystemTasks.heartbeatEnabled`):i(`settings:useSystemTasks.heartbeatDisabled`))},onError:e=>{V(e,{context:`heartbeat_toggle`}),R.error(i(`settings:useSystemTasks.heartbeatToggleFailed`))}});return{heartbeatConfig:o,consolidationConfig:d,retrospectiveConfig:h,heartbeatUsage:te,consolidationUsage:re,retrospectiveUsage:ie,isLoading:c||f||g,hasError:l||p||_,isHeartbeatRunning:F.isPending,isConsolidationRunning:I.isPending,isHeartbeatLoading:c,isHeartbeatError:l,isConsolidationLoading:f,isConsolidationError:p,isRetrospectiveLoading:g,isRetrospectiveError:_,refetchHeartbeat:u,refetchConsolidation:m,refetchRetrospective:v,runHeartbeatNow:()=>{e&&F.mutate({path:{assistant_id:e}})},runConsolidationNow:()=>{e&&I.mutate({path:{assistant_id:e}})},toggleHeartbeat:t=>{e&&L.mutate({body:{enabled:t},path:{assistant_id:e}})},refetchAll:()=>{u(),m(),v(),C(),O(),M()}}}function Zt({id:e,title:t,subtitle:n,accessory:r,children:i,className:a}){let o=!!(t||n||r);return(0,K.jsx)(ie,{asChild:!0,className:k(`rounded-lg`,a),children:(0,K.jsxs)(`section`,{id:e,children:[o&&(0,K.jsxs)(`div`,{className:`flex flex-row items-start justify-between gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[t&&(0,K.jsx)(D,{variant:`title-small`,as:`h2`,className:`text-[var(--content-emphasised)]`,children:t}),n&&(0,K.jsx)(D,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:n})]}),r&&(0,K.jsx)(`div`,{className:`shrink-0`,children:r})]}),i!=null&&(0,K.jsx)(`div`,{className:o?`mt-3`:``,children:i})]})})}function Qt(e){return/^plugin:([^/]+)\//.exec(e??``)?.[1]??null}var $t={user_disabled:`scheduleDisarmReason.userDisabled`,plugin_removed:`scheduleDisarmReason.pluginRemoved`,plugin_disabled:`scheduleDisarmReason.pluginDisabled`,declaration_removed:`scheduleDisarmReason.declarationRemoved`,declaration_disabled:`scheduleDisarmReason.declarationDisabled`};function en(e){return e.enabled||!e.disarmReason?null:$t[e.disarmReason]??null}function tn(e,t){return t?.[e]?.displayName??e}function nn({assistantId:e,pinnedProfile:t,defaultCallSite:n=`mainAgent`,fallbackLabel:i,respectCallSiteOverride:o=!1}){let{t:s}=a(`settings`),c=i??s(`modelProfileRow.defaultMainAgent`),l=(e,t)=>{if(e==null)return;if(e.provider!=null||e.model!=null)return s(`modelProfileRow.customCallSiteModel`);let n=e.profile?.trim();return n?s(`modelProfileRow.override`,{name:tn(n,t)}):void 0},u=t==null,{data:d}=r({...L({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4}),f=(0,W.useMemo)(()=>d?Je(d):{},[d]),{label:p}=Lt(e,n,{enabled:u}),m=u&&o?l(d?.llm?.callSites?.[n],f):void 0,h=t==null?m??(p==null?c:s(`modelProfileRow.defaultNamed`,{name:p})):tn(t,f);return(0,K.jsxs)(`div`,{className:`flex min-h-6 items-center justify-between gap-4`,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[var(--content-secondary)]`,children:s(`modelProfileRow.label`)}),(0,K.jsx)(`span`,{className:`min-w-0 truncate text-right`,title:h,children:h})]})}function rn(e,t,n){let r=F(e?.profiles??{},e?.profileOrder??[]);return[{value:null,label:`Default`},...le(r,[t],n).map(e=>{let t=ge(e,r,n);return{value:e.name,label:ae(e),...t?{issue:t}:{},...t===`undispatchable`?{reason:ke(e)}:{}}})]}function an(e,t){let{data:n}=r({...L({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4}),i=be();return(0,W.useMemo)(()=>rn(n?.llm,t,{requireOwnProviderAndModel:i}),[n?.llm,t,i])}function on({assistantId:e,value:t,onChange:n,disabled:r=!1,isSaving:i=!1,className:o,includeDefaultOption:s=!0,placeholder:c,variant:l,menuAlign:u}){let{t:d}=a(`settings`);return(0,K.jsx)(T,{value:t,onChange:n,onSelectNone:()=>n(null),options:an(e,t).filter(e=>s||e.value!=null).map(e=>({...e.issue===`undispatchable`?{icon:(0,K.jsx)(f,{className:`h-3.5 w-3.5 text-[var(--system-mid-strong)]`}),...e.reason?{tooltip:e.reason}:{}}:{},value:e.value,label:e.label})),disabled:r||i,placeholder:c,className:o,variant:l,menuAlign:u,"aria-label":d(`modelProfileSelect.ariaLabel`)})}function $({label:e,value:t}){return(0,K.jsxs)(`div`,{className:`flex min-h-6 items-center justify-between gap-4`,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-body-medium-lighter text-[var(--content-secondary)]`,children:e}),(0,K.jsx)(`span`,{className:`min-w-0 text-right text-body-medium-lighter text-[var(--content-default)]`,children:t})]})}function sn({schedule:e,assistantId:t,isPast:n}){let{t:r}=a(`schedules`),i=s(),c=P({path:{assistant_id:t}}),l=o({mutationFn:n=>ze(t,e.id,{inferenceProfile:n}),onMutate:async t=>{await i.cancelQueries({queryKey:c});let n=i.getQueryData(c)?.find(t=>t.id===e.id)?.inferenceProfile;return i.setQueryData(c,n=>n?.map(n=>n.id===e.id?{...n,inferenceProfile:t}:n)),{previousProfile:n}},onError:(t,n,a)=>{let o=a?.previousProfile;o!==void 0&&i.setQueryData(c,t=>t?.map(t=>t.id===e.id?{...t,inferenceProfile:o}:t)),V(t,{context:`schedule_update_inference_profile`}),R.error(r(`scheduleDetail.modelChangeFailed`))},onSettled:()=>i.invalidateQueries({queryKey:c})});return e.mode===`workflow`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)($,{label:r(`scheduleDetail.modelProfile`),value:r(`scheduleDetail.notUsedForWorkflow`)}),(0,K.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:r(`scheduleDetail.modelProfileWorkflowNote`)})]}):n?(0,K.jsx)(`div`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:(0,K.jsx)(nn,{assistantId:t,pinnedProfile:e.inferenceProfile})}):(0,K.jsx)($,{label:r(`scheduleDetail.modelProfile`),value:(0,K.jsx)(on,{assistantId:t,value:e.inferenceProfile,onChange:t=>{t&&t!==e.inferenceProfile&&l.mutate(t)},includeDefaultOption:!1,placeholder:r(`scheduleDetail.chooseModel`),isSaving:l.isPending,variant:`ghost`,menuAlign:`end`,className:`-my-1 -mr-2`})})}function cn({icon:e,value:t,label:n}){return(0,K.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg border border-[var(--border-base)] bg-[var(--surface-lift)] p-3`,children:[(0,K.jsx)(`span`,{className:`flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-[var(--surface-sunken)] text-[var(--content-secondary)]`,children:e}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`div`,{className:`truncate text-body-large-default text-[var(--content-default)]`,children:t}),(0,K.jsx)(`div`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:n})]})]})}function ln({usage:e}){let{t}=a(`schedules`);return e.status===`loading`?(0,K.jsx)(`div`,{className:`grid grid-cols-2 gap-3 pt-2`,children:Array.from({length:2},(e,t)=>(0,K.jsx)(N,{className:`h-[60px] rounded-lg`},t))}):e.status===`error`?null:(0,K.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 pt-2`,children:[(0,K.jsx)(cn,{icon:(0,K.jsx)(g,{className:`h-4 w-4`}),value:Y(e.summary.totalEstimatedCostUsd),label:t(`scheduleDetail.costLabel`,{days:7})}),(0,K.jsx)(cn,{icon:(0,K.jsx)(C,{className:`h-4 w-4`}),value:bt(e.summary.runCount),label:t(`scheduleDetail.runsLabel`,{days:7})})]})}function un(e){return e.exists&&e.archivedAt==null}function dn({run:e,index:t,isExpanded:n,disableDirectOpen:r,onOpenConversation:i,onToggleDetails:o}){let{t:s}=a(`schedules`),c=wt(e),l=e.conversations??(c?[{id:c,title:null,exists:!0,archivedAt:null}]:[]),u=X(e.output),d=X(e.error),f=!r&&l.length===1&&un(l[0])?l[0].id:null,p=!f&&(l.length>0||u||d),m=`schedule-run-details-${t}`,g=!!f||p,_=(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Bt,{status:e.status}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsx)(`div`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:J(e.startedAt)}),(0,K.jsxs)(`div`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:[vt(e.durationMs),` ·`,` `,Y(e.estimatedCostUsd)]}),e.status===`error`&&e.error?(0,K.jsxs)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--system-negative-strong)]`,children:[e.error.slice(0,120),e.error.length>120?`…`:``]}):null]}),g?(0,K.jsx)(h,{className:k(`h-4 w-4 shrink-0 text-[var(--content-tertiary)] transition-transform`,p&&n?`rotate-90`:``)}):null]}),v=p&&n?(0,K.jsx)(`div`,{id:m,className:`px-2 pb-3`,children:(0,K.jsxs)(`div`,{className:`space-y-3 rounded-md border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3`,children:[l.length>0?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-secondary)]`,children:s(`scheduleDetail.conversations`)}),(0,K.jsx)(`div`,{className:`space-y-1`,children:l.map(e=>un(e)?(0,K.jsx)(`button`,{type:`button`,onClick:()=>i(e.id),className:`block w-full truncate text-left text-body-small-default text-[var(--content-default)] hover:underline`,children:X(e.title)?e.title:s(`scheduleDetail.conversation`)},e.id):(0,K.jsxs)(`span`,{className:`block truncate text-body-small-default text-[var(--content-tertiary)] italic`,children:[X(e.title)?e.title:s(`scheduleDetail.conversation`),` `,e.exists?s(`scheduleDetail.conversationArchived`):s(`scheduleDetail.conversationUnavailable`)]},e.id))})]}):null,u?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-secondary)]`,children:s(`scheduleDetail.output`)}),(0,K.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words text-body-small-default font-mono text-[var(--content-default)]`,children:e.output})]}):null,d?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-secondary)]`,children:s(`scheduleDetail.error`)}),(0,K.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words text-body-small-default font-mono text-[var(--system-negative-strong)]`,children:e.error})]}):null]})}):null;return f?(0,K.jsx)(`div`,{children:(0,K.jsx)(`button`,{type:`button`,onClick:()=>i(f),"aria-label":s(`scheduleDetail.openRunConversationAria`,{time:J(e.startedAt)}),className:`flex w-full cursor-pointer items-center gap-3 px-2 py-3 text-left shadow-none transition-colors hover:bg-[var(--surface-hover)] focus:outline-none`,children:_})}):p?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`button`,{type:`button`,onClick:()=>o(e.id),"aria-label":s(`scheduleDetail.toggleRunDetailsAria`,{time:J(e.startedAt)}),"aria-expanded":n,"aria-controls":m,className:`flex w-full cursor-pointer items-center gap-3 px-2 py-3 text-left shadow-none transition-colors hover:bg-[var(--surface-hover)] focus:outline-none`,children:_}),v]}):(0,K.jsx)(`div`,{className:`flex items-center gap-3 px-2 py-3`,children:_})}function fn({runs:e,isLoading:t,disableDirectOpen:n,onOpenConversation:r}){let{t:i}=a(`schedules`),[o,s]=(0,W.useState)(null);return t?(0,K.jsx)(`div`,{className:`flex items-center justify-center py-6`,children:(0,K.jsx)(b,{className:`h-5 w-5 animate-spin text-stone-400`})}):!e||e.length===0?(0,K.jsx)(`p`,{className:`py-2 text-body-medium-lighter text-[var(--content-tertiary)] italic`,children:i(`scheduleDetail.noRunsYet`)}):(0,K.jsx)(`div`,{className:`-mx-2 divide-y divide-[var(--border-base)]`,children:e.map((e,t)=>(0,K.jsx)(dn,{run:e,index:t,isExpanded:o===e.id,disableDirectOpen:n,onOpenConversation:r,onToggleDetails:e=>s(t=>t===e?null:e)},e.id))})}function pn({schedule:e,assistantId:t,usage:n,isPast:i=!1,onClose:o,onDeleted:s}){let{t:c}=a(`schedules`),u=l(),{data:d,isLoading:f}=r({queryKey:I({path:{assistant_id:t,id:e.id}}),queryFn:()=>Ue(t,e.id),staleTime:1e4}),[m,h]=(0,W.useState)(!1),[g,_]=(0,W.useState)(!1),[v,y]=(0,W.useState)(!1),S=Qt(e.sourceKey),C=en(e),w=S!==null&&!e.enabled,T=async()=>{h(!0);try{await He(t,e.id)}catch(e){V(e,{context:`schedule_run_now`}),R.error(c(`scheduleDetail.runFailed`))}finally{h(!1)}},E=async()=>{y(!0);try{await Ve(t,e.id),s()}catch(e){V(e,{context:`schedule_delete`}),R.error(c(`scheduleDetail.deleteFailed`)),y(!1),_(!1)}};return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`flex h-full flex-col bg-[var(--surface-overlay)] md:rounded-[var(--radius-xl)] md:border md:border-[var(--border-base)]`,children:[(0,K.jsx)(j,{title:e.name,headerActions:S?void 0:(0,K.jsx)(H,{variant:`dangerOutline`,iconOnly:(0,K.jsx)(x,{}),"aria-label":c(`scheduleDetail.delete`),tooltip:c(`scheduleDetail.delete`),onClick:()=>_(!0)}),closeLabel:c(`scheduleDetail.closeAria`),closeTooltip:c(`scheduleDetail.close`),onClose:o}),(0,K.jsxs)(`div`,{className:`flex-1 space-y-6 overflow-y-auto px-[var(--app-spacing-lg)] py-[var(--app-spacing-lg)]`,children:[e.description?(0,K.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-secondary)]`,children:e.description}):null,(0,K.jsx)(Zt,{title:c(`scheduleDetail.details`),children:(0,K.jsxs)(`div`,{className:`space-y-2`,children:[e.cadenceDescription?(0,K.jsx)($,{label:c(`scheduleDetail.cadence`),value:e.cadenceDescription}):null,(0,K.jsx)($,{label:c(`scheduleDetail.mode`),value:e.mode}),(0,K.jsx)(sn,{schedule:e,assistantId:t,isPast:i}),(0,K.jsx)($,{label:c(`scheduleDetail.status`),value:e.enabled?c(`scheduleDetail.enabled`):c(`scheduleDetail.disabled`)}),(0,K.jsx)($,{label:c(`scheduleDetail.nextRun`),value:J(e.nextRunAt)}),e.lastRunAt?(0,K.jsx)($,{label:c(`scheduleDetail.lastRun`),value:(0,K.jsxs)(`span`,{className:`flex items-center justify-end gap-2`,children:[(0,K.jsx)(Bt,{status:e.lastStatus}),J(e.lastRunAt)]})}):null]})}),(0,K.jsx)(ln,{usage:n}),(0,K.jsx)(Zt,{title:c(`scheduleDetail.recentRuns`),children:(0,K.jsx)(fn,{runs:d?.runs,isLoading:f,disableDirectOpen:e.mode===`script`,onOpenConversation:e=>A(u,e)})})]}),(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-2 border-t border-[var(--border-hover)] p-[var(--app-spacing-lg)]`,children:[S?(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:C?c(`scheduleDetail.managedByPluginPaused`,{plugin:S,reason:c(C)}):c(`scheduleDetail.managedByPlugin`,{plugin:S})}):(0,K.jsx)(`span`,{}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(H,{variant:`outlined`,leftIcon:(0,K.jsx)(p,{className:`h-3.5 w-3.5`}),onClick:()=>u(B.settings.usageForSchedule(e.id)),children:c(`scheduleDetail.viewUsage`)}),e.mode===`script`?(0,K.jsxs)(K.Fragment,{children:[w?(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:c(`scheduleDetail.turnOnToRun`)}):null,(0,K.jsx)(H,{variant:`primary`,leftIcon:m?(0,K.jsx)(b,{className:`h-3.5 w-3.5 animate-spin`}):void 0,onClick:()=>void T(),disabled:m||w,children:c(m?`scheduleDetail.running`:`scheduleDetail.runNow`)})]}):null]})]})]}),(0,K.jsx)(_e,{open:g,title:c(`scheduleDetail.delete`),message:c(`scheduleDetail.deleteConfirmMessage`,{name:e.name}),confirmLabel:c(`scheduleDetail.confirmDelete`),cancelLabel:c(`scheduleDetail.cancel`),destructive:!0,isPending:v,onConfirm:()=>void E(),onCancel:()=>_(!1)})]})}function mn(e){if(e.status===`loading`)return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(N,{as:`span`,className:`h-4 w-12`}),(0,K.jsx)(N,{as:`span`,className:`h-4 w-10`})]});if(e.status===`error`)return(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`—`});let{summary:t}=e;return(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:Y(t.totalEstimatedCostUsd)}),(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:bt(t.runCount)})]})}function hn({name:e,badge:t,metaParts:n,usage:r,enabled:i,selected:a,onClick:o,onToggle:s,toggleAriaLabel:c}){return(0,K.jsxs)(`div`,{className:`flex items-center gap-3 rounded-md px-2 py-3 transition-colors [&+&]:border-t [&+&]:border-[var(--border-base)] ${a?`bg-[var(--surface-active)]`:`hover:bg-[var(--surface-hover)]`}`,children:[s?(0,K.jsx)(Ce,{checked:i,onChange:s,"aria-label":c}):null,(0,K.jsxs)(`button`,{type:`button`,onClick:o,className:`flex min-w-0 flex-1 cursor-pointer items-center gap-4 text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,K.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`truncate text-body-medium-default text-[var(--content-default)]`,children:e}),t]}),n.length>0?(0,K.jsx)(`span`,{className:`flex min-w-0 items-center gap-2 text-label-small-default text-[var(--content-tertiary)]`,children:n.map((e,t)=>(0,K.jsxs)(W.Fragment,{children:[t>0?(0,K.jsx)(`span`,{className:`h-[3px] w-[3px] shrink-0 rounded-full bg-[var(--content-tertiary)]`}):null,(0,K.jsx)(`span`,{className:`truncate`,children:e})]},t))}):null]}),(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center gap-4`,children:[mn(r),(0,K.jsx)(h,{className:`h-4 w-4 text-[var(--content-tertiary)]`})]})]})]})}function gn({schedule:e,usage:t,selected:n,onClick:r,onToggle:i}){let{t:o}=a(`schedules`),s=e.isOneShot?``:e.cadenceDescription.trim(),c=e.lastRunAt??e.nextRunAt,l=en(e),u=[l?o(l):``,s,c?J(c):``].filter(Boolean),d=Qt(e.sourceKey);return(0,K.jsx)(hn,{name:e.name,badge:d?(0,K.jsx)(Me,{tone:`info`,children:d}):void 0,metaParts:u,usage:t,enabled:e.enabled,selected:n,onClick:r,onToggle:i,toggleAriaLabel:i?o(`scheduleRow.toggleAria`,{name:e.name}):void 0})}function _n({recurring:e,oneTime:t,pastOneTime:n,usageForSchedule:r,isLoading:i,isError:o,refetch:s,onToggle:c,onSelectSchedule:l,selectedScheduleId:u,onStartNewChat:d,onCreateSchedule:f,pastOpen:p,onPastOpenChange:m,onRebaseProfiles:g,defaultProfileLabel:_,systemTasksSlot:v}){let{t:b}=a(`schedules`),x=e=>(0,K.jsx)(gn,{schedule:e,usage:r(e.id),selected:e.id===u,onClick:()=>l(e.id),onToggle:t=>c(e.id,t)},e.id),S=e=>(0,K.jsx)(gn,{schedule:e,usage:r(e.id),selected:e.id===u,onClick:()=>l(e.id)},e.id),C=n.length>0?(0,K.jsx)(M.Root,{type:`single`,collapsible:!0,className:`mt-3`,value:p?`past`:``,onValueChange:e=>m(e===`past`),children:(0,K.jsxs)(M.Item,{value:`past`,children:[(0,K.jsxs)(M.Trigger,{className:`group gap-[var(--app-spacing-xs)] px-2 text-label-small-default text-[var(--content-tertiary)]`,children:[(0,K.jsx)(h,{size:14,"aria-hidden":!0,className:`shrink-0 transition-transform group-data-[state=open]:rotate-90`}),(0,K.jsx)(`span`,{children:b(`schedulesPanel.pastToggle`,{count:n.length})})]}),(0,K.jsx)(M.Content,{children:(0,K.jsx)(`div`,{className:`pt-1`,children:n.map(S)})})]})}):null;return(0,K.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[i?(0,K.jsx)(`div`,{className:`space-y-3`,children:Array.from({length:2},(e,t)=>(0,K.jsx)(N,{className:`h-12 rounded-md`},t))}):o&&e.length===0?(0,K.jsx)(U,{tone:`error`,actions:(0,K.jsx)(`button`,{type:`button`,onClick:s,className:`cursor-pointer underline hover:no-underline`,children:b(`schedulesPanel.retry`)}),children:b(`schedulesPanel.loadFailed`)}):e.length===0&&t.length===0&&n.length===0?(0,K.jsx)(Ye,{icon:y,title:b(`schedulesPanel.emptyTitle`),description:b(`schedulesPanel.emptyDescription`),actions:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(H,{variant:`primary`,size:`regular`,onClick:d,children:b(`schedulesPanel.newConversation`)}),(0,K.jsx)(`span`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:b(`schedulesPanel.emptyActionsSeparator`)}),(0,K.jsx)(H,{variant:`outlined`,size:`regular`,onClick:f,children:b(`schedulesPanel.createSchedule`)})]})}):(0,K.jsxs)(`div`,{children:[g&&_?(0,K.jsx)(`div`,{className:`mb-1 flex min-w-0 justify-end`,children:(0,K.jsx)(H,{variant:`outlined`,size:`compact`,onClick:g,className:`max-w-full truncate`,children:b(`schedulesPanel.useProfileForAll`,{profile:_})})}):null,e.map(x),t.length>0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`p`,{className:`mt-3 px-2 text-label-small-default text-[var(--content-tertiary)]`,children:b(`schedulesPanel.oneTimeHeading`)}),t.map(S)]}):null,C]}),v?(0,K.jsx)(`div`,{className:`mt-[var(--app-spacing-lg)]`,children:v}):null]})}function vn({runs:e,isLoading:t,emptyMessage:n,hasMore:r=!1,isLoadingMore:i=!1,onLoadMore:o}){let{t:s}=a(`settings`),c=l(),[u,d]=(0,W.useState)(null),f=n??s(`recentRunsCard.emptyDefault`),p=r&&o?(0,K.jsx)(`div`,{className:`flex justify-center pt-3`,children:(0,K.jsx)(H,{variant:`outlined`,size:`compact`,onClick:o,disabled:i,leftIcon:i?(0,K.jsx)(b,{className:`h-3.5 w-3.5 animate-spin`}):void 0,children:s(i?`recentRunsCard.loadingMore`:`recentRunsCard.loadMore`)})}):null;return(0,K.jsx)(Zt,{title:s(`recentRunsCard.title`),children:t?(0,K.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,K.jsx)(b,{className:`h-5 w-5 animate-spin text-stone-400`})}):!e||e.length===0?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`p`,{className:`py-4 text-center text-body-medium-lighter text-[var(--content-tertiary)] italic`,children:f}),p]}):(0,K.jsxs)(`div`,{className:`divide-y divide-[var(--border-base)]`,children:[e.map((e,t)=>{let n=wt(e),r=X(e.output),i=X(e.error),a=e.status===`skipped`||e.status===`missed`,o=!n&&!a&&(r||i),l=u===e.id,f=`schedule-run-details-${t}`;return(0,K.jsxs)(`div`,{children:[(0,K.jsx)(we,{label:(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-center gap-3`,children:[(0,K.jsx)(Bt,{status:e.status}),(0,K.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,K.jsx)(`span`,{className:`block truncate text-body-medium-lighter text-[var(--content-default)]`,children:X(e.title)?e.title:J(e.startedAt)}),(0,K.jsxs)(`span`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:[X(e.title)?`${J(e.startedAt)} · `:``,a?(0,K.jsx)(K.Fragment,{children:r?e.output:e.status===`missed`?s(`recentRunsCard.missed`):s(`recentRunsCard.skipped`)}):(0,K.jsxs)(K.Fragment,{children:[vt(e.durationMs),` ·`,` `,Y(e.estimatedCostUsd)]}),e.status===`error`&&e.error&&(0,K.jsxs)(`span`,{className:`ml-2 text-[var(--system-negative-strong)]`,children:[e.error.slice(0,80),e.error.length>80?`…`:``]})]})]}),n||o?(0,K.jsx)(h,{className:`h-4 w-4 shrink-0 text-[var(--content-tertiary)] transition-transform ${l?`rotate-90`:``}`}):null]}),onSelect:n?()=>A(c,n):o?()=>d(l?null:e.id):void 0,"aria-label":s(`recentRunsCard.runAtAria`,{time:J(e.startedAt)}),"aria-expanded":o?l:void 0,"aria-controls":o?f:void 0,className:`h-auto py-2.5 gap-3 -mx-2 px-2`}),o&&l?(0,K.jsx)(`div`,{id:f,className:`px-2 pb-3`,children:(0,K.jsxs)(`div`,{className:`space-y-3 rounded-md border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3`,children:[r?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-secondary)]`,children:s(`recentRunsCard.output`)}),(0,K.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words text-body-small-default font-mono text-[var(--content-default)]`,children:e.output})]}):null,i?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`mb-1 text-body-small-default text-[var(--content-secondary)]`,children:s(`recentRunsCard.error`)}),(0,K.jsx)(`pre`,{className:`max-h-64 overflow-auto whitespace-pre-wrap break-words text-body-small-default font-mono text-[var(--system-negative-strong)]`,children:e.error})]}):null]})}):null]},e.id)}),p]})})}var yn={heartbeat:`heartbeatAgent`,consolidation:`memoryV2Consolidation`,retrospective:`memoryRetrospective`};function bn({label:e,value:t}){return(0,K.jsxs)(`div`,{className:`flex min-h-6 items-center justify-between gap-4`,children:[(0,K.jsx)(`span`,{className:`shrink-0 text-[var(--content-secondary)]`,children:e}),(0,K.jsx)(`span`,{className:`flex min-w-0 items-center justify-end gap-2 text-right text-[var(--content-default)]`,children:t})]})}function xn({kind:e,assistantId:t,systemTasks:r,canOpenMemorySettings:i,onClose:o}){let{t:s}=a(`schedules`),c=l(),{heartbeatConfig:u,consolidationConfig:d,retrospectiveConfig:f}=r,p,h,g,_,y,x,S;e===`heartbeat`?(p=s(`systemTaskDetail.nameHeartbeat`),h=u?Ot(u):``,g=u?.enabled??!1,_=u?.nextRunAt??null,y=u?.lastRunAt??null,x=r.isHeartbeatRunning,S=r.runHeartbeatNow):e===`consolidation`?(p=s(`systemTaskDetail.nameConsolidation`),h=d?kt(d):``,g=d?.enabled??!1,_=d?.nextRunAt??null,y=d?.lastRunAt??null,x=r.isConsolidationRunning,S=r.runConsolidationNow):(p=s(`systemTaskDetail.nameRetrospective`),h=At,g=f?.enabled??!1,_=f?.nextRunAt??null,y=f?.lastRunAt??null,x=!1,S=void 0);let C=e!==`heartbeat`,T=e===`retrospective`,E=C&&!g,D=x||E,O=s(C?g?`systemTaskDetail.statusManagedOn`:`systemTaskDetail.statusPaused`:g?`scheduleDetail.enabled`:`scheduleDetail.disabled`),k=T&&f?.available===!0,A=s(k?`systemTaskDetail.pausedRetrospectiveSwitchedOff`:T?`systemTaskDetail.pausedRetrospective`:`systemTaskDetail.pausedConsolidation`),M=C&&g&&i,N={path:{assistant_id:t},query:{limit:25}},ee=e===`heartbeat`?se(N):e===`consolidation`?w(N):re(N),{data:te,isLoading:ne,fetchNextPage:ie,hasNextPage:P,isFetchingNextPage:F}=n({queryKey:ee.queryKey,queryFn:ee.queryFn,initialPageParam:{path:N.path,query:{}},getNextPageParam:e=>e.nextCursor??void 0,staleTime:1e4}),I=St(te?.pages.map(t=>({runs:t.runs.filter(e=>!Tt(e)).map(t=>Z(t,e))}))),L=I?.find(e=>Et(e)&&e.status!==`running`),ae=y??L?.finishedAt??L?.startedAt??null;return(0,K.jsxs)(`div`,{className:`flex h-full flex-col bg-[var(--surface-overlay)] md:rounded-[var(--radius-xl)] md:border md:border-[var(--border-base)]`,children:[(0,K.jsx)(j,{title:p,closeLabel:s(`scheduleDetail.closeAria`),closeTooltip:s(`scheduleDetail.close`),onClose:o}),(0,K.jsxs)(`div`,{className:`flex-1 space-y-6 overflow-y-auto px-[var(--app-spacing-lg)] py-[var(--app-spacing-lg)]`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(Zt,{title:s(`scheduleDetail.details`),children:(0,K.jsxs)(`div`,{className:`space-y-2 text-body-medium-lighter`,children:[(0,K.jsx)(bn,{label:s(`scheduleDetail.status`),value:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`truncate`,children:O}),C?null:(0,K.jsx)(Ce,{size:`sm`,checked:g,onChange:r.toggleHeartbeat,"aria-label":s(`scheduleDetail.toggleAria`,{name:p})})]})}),(0,K.jsx)(nn,{assistantId:t,defaultCallSite:yn[e],fallbackLabel:s(`systemTaskDetail.fallbackModelProfile`),respectCallSiteOverride:!0}),h?(0,K.jsx)(bn,{label:s(`systemTaskDetail.repeats`),value:(0,K.jsx)(`span`,{className:`truncate`,children:h})}):null,T?null:(0,K.jsx)(bn,{label:s(`scheduleDetail.nextRun`),value:(0,K.jsx)(`span`,{className:`truncate`,children:J(_)})}),(0,K.jsx)(bn,{label:s(`scheduleDetail.lastRun`),value:(0,K.jsx)(`span`,{className:`truncate`,children:J(ae)})})]})}),E?(0,K.jsx)(U,{tone:`warning`,className:`mt-4`,actions:i?(0,K.jsx)(H,{variant:`outlined`,size:`compact`,onClick:()=>c(`${B.settings.developer}?tab=memory`),children:s(k?`systemTaskDetail.openMemorySettings`:`systemTaskDetail.turnOnMemory`)}):void 0,children:A}):null]}),(0,K.jsx)(vn,{runs:I,isLoading:ne,hasMore:P,isLoadingMore:F,onLoadMore:()=>void ie()})]}),M||S?(0,K.jsxs)(`div`,{className:`flex shrink-0 items-center justify-end gap-2 border-t border-[var(--border-hover)] p-[var(--app-spacing-lg)]`,children:[M?(0,K.jsx)(H,{variant:`outlined`,leftIcon:(0,K.jsx)(m,{className:`h-3.5 w-3.5`}),onClick:()=>c(`${B.settings.developer}?tab=memory`),children:s(`systemTaskDetail.memorySettings`)}):null,S?(0,K.jsx)(H,{variant:`primary`,leftIcon:x?(0,K.jsx)(b,{className:`h-3.5 w-3.5 animate-spin`}):(0,K.jsx)(v,{className:`h-3.5 w-3.5`}),onClick:S,disabled:D,children:s(x?`scheduleDetail.running`:`scheduleDetail.runNow`)}):null]}):null]})}function Sn(e){let t=Se(),[n]=(0,W.useState)(()=>Date.now()),{data:a,isLoading:o,isError:s,refetch:c}=r(oe(e)),{data:l,isLoading:u,isError:d}=r(Pt(e,t,!0)),{recurring:f,oneTime:p,pastOneTime:m}=(0,W.useMemo)(()=>{let e=Nt(a??[],n);return{recurring:e.recurring,oneTime:e.upcomingOneTime,pastOneTime:e.pastOneTime}},[n,a]),h=(0,W.useMemo)(()=>new Map((l??[]).map(e=>[e.scheduleId,e])),[l]);return{recurring:f,oneTime:p,pastOneTime:m,usageForSchedule:(0,W.useCallback)(e=>u?{status:`loading`}:d?{status:`error`}:{status:`ready`,summary:h.get(e)??Ft(e)},[d,u,h]),handleToggle:(0,W.useCallback)(async(t,n)=>{if(e)try{await We(e,t,n),c()}catch(e){V(e,{context:`schedule_toggle`}),R.error(i(`schedules:scheduleDetail.toggleFailed`))}},[e,c]),isLoading:o,isError:s,refetch:(0,W.useCallback)(()=>{c()},[c])}}function Cn(){let e=l(),{scheduleId:t}=u(),n=fe(),r=te(),i=Se(),a=Sn(n),o=Xt(n,i),s=me(`memoryOptOut`),c=ve.use.settingsDeveloperNav(),d=s&&c===!0,[f,p]=(0,W.useState)(!1),m=t??null,[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(!1),y=(0,W.useCallback)(t=>{e(t?B.schedules.detail(t):B.schedules.root)},[e]),b=m?a.recurring.find(e=>e.id===m)??a.oneTime.find(e=>e.id===m)??a.pastOneTime.find(e=>e.id===m)??null:null;(0,W.useEffect)(()=>{m&&!a.isLoading&&!a.isError&&!b&&y(null)},[m,b,a.isLoading,a.isError,y]);let x=h===`heartbeat`?o.heartbeatConfig!=null:h===`consolidation`?o.consolidationConfig?.available===!0:h===`retrospective`?o.retrospectiveConfig?.available===!0:!1;(0,W.useEffect)(()=>{h&&!o.isLoading&&!x&&g(null)},[h,x,o.isLoading]);let S=(0,W.useCallback)(e=>{g(null),y(e)},[y]),C=(0,W.useCallback)(e=>{m&&y(null),g(e)},[y,m]),w=(0,W.useCallback)(()=>{O(e)},[e]),T=Rt(n,(0,W.useMemo)(()=>[...a.recurring,...a.oneTime,...a.pastOneTime],[a.recurring,a.oneTime,a.pastOneTime]),a.refetch),E=(b?(0,K.jsx)(pn,{schedule:b,assistantId:n,usage:a.usageForSchedule(b.id),isPast:a.pastOneTime.some(e=>e.id===b.id),onClose:()=>y(null),onDeleted:()=>{y(null),a.refetch()}}):null)??(h&&x?(0,K.jsx)(xn,{kind:h,assistantId:n,systemTasks:o,canOpenMemorySettings:d,onClose:()=>g(null)}):null),D=(0,K.jsx)(_n,{recurring:a.recurring,oneTime:a.oneTime,pastOneTime:a.pastOneTime,usageForSchedule:a.usageForSchedule,isLoading:a.isLoading,isError:a.isError,refetch:a.refetch,onToggle:a.handleToggle,onSelectSchedule:S,selectedScheduleId:m,onStartNewChat:w,onCreateSchedule:()=>p(!0),pastOpen:_,onPastOpenChange:v,onRebaseProfiles:T.canRebase?T.requestRebase:void 0,defaultProfileLabel:T.defaultProfileLabel??void 0,systemTasksSlot:(0,K.jsx)(Ut,{heartbeatConfig:o.heartbeatConfig,consolidationConfig:o.consolidationConfig,retrospectiveConfig:o.retrospectiveConfig,heartbeatUsage:o.heartbeatUsage,consolidationUsage:o.consolidationUsage,retrospectiveUsage:o.retrospectiveUsage,isLoading:o.isLoading,hasError:o.hasError,onRetry:o.refetchAll,onSelectHeartbeat:()=>C(`heartbeat`),onSelectConsolidation:()=>C(`consolidation`),onSelectRetrospective:()=>C(`retrospective`)})}),k=(0,K.jsx)(zt,{...T.dialogProps});return E&&r?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(Ie,{children:E}),k]}):(0,K.jsxs)(K.Fragment,{children:[E&&!r?(0,K.jsx)(Le,{storageKey:`schedulesDetailDrawerWidth`,detailKey:m??h??void 0,section:D,detail:E}):D,(0,K.jsx)(lt,{isOpen:f,assistantId:n,onClose:()=>p(!1),onCreated:()=>{p(!1),a.refetch()}}),k]})}export{Cn as SchedulesPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{b as t,f as n}from"./react-DPM_L_aA.js";import{uv as r}from"./index-7XDiAJ-A.js";var i=e(t(),1);function a(){let e=n();return(0,i.useEffect)(()=>{e(r.settings.general,{replace:!0})},[e]),null}export{a as SecurityRedirectPage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{O as t,Yn as n}from"./vendor-WUN87CSE.js";import{b as r,f as i,g as a,t as o}from"./react-DPM_L_aA.js";import{Br as s,Cn as c,lr as l,on as u,st as d,un as f}from"./icons-CSdHOix6.js";import{t as p}from"./ellipsis-vertical-npNyglhR.js";import{$_ as m,A_ as ee,Ao as h,Bl as g,E_ as _,F_ as te,Fv as v,Gf as ne,Gp as y,Ho as re,Iv as b,K_ as x,Kr as S,M_ as ie,Mm as C,O_ as ae,Pv as oe,Rp as w,Rv as T,U_ as se,Ur as ce,Y_ as le,__ as ue,aa as de,bm as fe,dv as pe,g_ as me,h_ as he,hy as E,ia as ge,iv as _e,iy as D,k_ as ve,ko as ye,lo as O,m_ as be,nu as xe,oa as Se,ra as k,rv as Ce,ry as A,sa as we,sy as j,tv as Te,uv as M,w as Ee,wm as De,wy as N,xy as P,z_ as Oe,zn as F}from"./index-7XDiAJ-A.js";import{t as ke}from"./radio-card-nav-DlRweN3g.js";import{a as Ae,i as je,n as Me,o as I,r as L,t as Ne}from"./self-hosted-servers-BHF9gq8j.js";import{t as R}from"./format-countdown-Cge3iaM1.js";var z=e(r(),1),Pe=M.remotePair.slice(`${M.assistant}/`.length);async function Fe(e,t){let n=t?Ce(e.url,t):null,r=t&&n!==null?`${Pe}?${new URLSearchParams({device_code:t}).toString()}`:null,i=()=>window.location.assign(n??`${e.url}${M.assistant}`);if(!w()){i();return}(r===null?await Me(e.url):await L(e.url,r))||i()}function Ie(e){return Ae(ve()?C():window.location.origin)===e.url}var B=o();function Le({traits:e,imageUrl:n,size:r=48,fallback:i,className:a,decorative:o=!1,onImageError:s}){let{t:c}=t(),l=S();if(e){if(!l)return i;if(O(l,e.bodyShape,e.eyeStyle,e.color)){let t=(0,B.jsx)(F,{components:l,bodyShapeId:e.bodyShape,eyeStyleId:e.eyeStyle,colorId:e.color,size:r,className:a});return o?(0,B.jsx)(`span`,{"aria-hidden":`true`,children:t}):t}}return n?(0,B.jsx)(`img`,{src:n,alt:o?``:c(`chooserAvatarChip.alt`),width:r,height:r,className:`rounded-full object-cover ${a??``}`.trim(),style:{width:r,height:r,flexShrink:0},onError:s}):i}function Re(e){let t;try{t=v(e)}catch{return{ok:!1,reason:`unparseable`}}if(oe(t))return{ok:!1,reason:`service-website`};let n=Ae(t);return n===null?{ok:!1,reason:`non-https`}:{ok:!0,url:n,deviceCode:b(e).deviceCode}}function ze({open:e,onClose:n,onAdded:r}){let{t:i}=t(`onboarding`),[a,o]=(0,z.useState)(``),[s,l]=(0,z.useState)(!1),[u,d]=(0,z.useState)(null);(0,z.useEffect)(()=>{e&&(o(``),l(!1),d(null))},[e]);let f=()=>{s||n()},p=async()=>{if(!a.trim()||s)return;let e=Re(a);if(!e.ok){d(_e(e.reason,a));return}l(!0),d(null);try{let t=await I.getState().addOrigin({url:e.url});if(t.ok){r(t.origin,e.deviceCode);return}d(i(`addRemoteOriginDialog.addFailed`))}catch(e){console.error(`addRemoteOriginDialog.add failed`,e),d(i(`addRemoteOriginDialog.addFailed`))}l(!1)};return(0,B.jsx)(j.Root,{open:e,onOpenChange:e=>{e||f()},children:(0,B.jsxs)(j.Content,{size:`md`,children:[(0,B.jsxs)(j.Header,{icon:c,children:[(0,B.jsx)(j.Title,{children:i(`addRemoteOriginDialog.title`)}),(0,B.jsx)(j.Description,{children:i(`addRemoteOriginDialog.body`)})]}),(0,B.jsx)(j.Body,{children:(0,B.jsxs)(`div`,{className:`space-y-4`,children:[(0,B.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,B.jsx)(`label`,{className:`text-body-small-default text-[var(--content-secondary)]`,htmlFor:`add-remote-origin-url`,children:i(`addRemoteOriginDialog.addressLabel`)}),(0,B.jsx)(E,{id:`add-remote-origin-url`,type:`url`,value:a,onChange:e=>o(e.target.value),placeholder:`https://example.com/assistant-1`,fullWidth:!0,autoFocus:!0})]}),u&&(0,B.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:u})]})}),(0,B.jsxs)(j.Footer,{children:[(0,B.jsx)(N,{variant:`ghost`,onClick:f,disabled:s,children:i(`actions.cancel`)}),(0,B.jsx)(N,{variant:`primary`,onClick:()=>void p(),disabled:!a.trim()||s,children:i(s?`actions.adding`:`actions.add`)})]})]})})}var Be=e=>new Promise(t=>setTimeout(t,e)),V=30,H=e=>{let t=Date.parse(e);return Number.isFinite(t)&&Date.now()>=t};function Ve({open:e,initialAddress:n,guidanceKind:r,onClose:i,onImported:a}){let{t:o}=t(`onboarding`),[s,c]=(0,z.useState)(``),[l,d]=(0,z.useState)(``),[f,p]=(0,z.useState)(!1),[m,h]=(0,z.useState)(null),[g,_]=(0,z.useState)(null),[te,v]=(0,z.useState)(0),[ne,y]=(0,z.useState)(!1),[re,b]=(0,z.useState)(null),x=(0,z.useRef)(null),S=(0,z.useRef)({abandoned:!1}),C=()=>{let e=x.current;x.current=null,e&&ue(e)};(0,z.useEffect)(()=>{if(!e)return;c(n??``),d(``),p(!1),h(null),_(null),y(!1),b(null);let t={abandoned:!1};return S.current=t,()=>{t.abandoned=!0,C()}},[e,n]),(0,z.useEffect)(()=>{if(!g)return;let e=setInterval(()=>v(Date.parse(g.expiresAt)-Date.now()),1e3);return()=>clearInterval(e)},[g]);let ae=async()=>{let e=s.trim();if(!e||f)return;p(!0),h(null);let t=l.trim()||void 0,n=S.current;try{let r=await Oe(e);if(n.abandoned){r.ok&&ue(r.handle);return}if(!r.ok){h(r.rejection?{kind:`rejected-address`,rejection:r.rejection,address:e}:{kind:`message`,text:r.error}),p(!1);return}x.current=r.handle,r.userCode&&(_({userCode:r.userCode,expiresAt:r.expiresAt}),v(Date.parse(r.expiresAt)-Date.now()));let i=r.userCode!==null,s=r.expiresAt,c=r.intervalSeconds,l=0;for(;;){let e=await ie(r.handle,t);if(n.abandoned)return;if(!e.ok){let t=i&&ee(e);if(t&&!H(s)){if(l+=1,l===1&&y(!0),await Be(Math.min(c*l,V)*1e3),n.abandoned)return;continue}C(),_(null),y(!1),h({kind:`message`,text:t?o(`connectAssistantDialog.retryExpired`):e.error});break}if(l>0&&(l=0,y(!1)),e.status===`imported`){if(x.current=null,e.accessOnly){_(null),b(e.assistantId);break}a(e.assistantId);return}if(e.expiresAt!==s&&(_(t=>t&&{...t,expiresAt:e.expiresAt}),v(Date.parse(e.expiresAt)-Date.now())),s=e.expiresAt,c=e.intervalSeconds,await Be(c*1e3),n.abandoned)return}}catch(e){console.error(`connectAssistantDialog.pairing failed`,e),C(),_(null),y(!1),h({kind:`message`,text:o(`connectAssistantDialog.submitError`)})}p(!1)};return re==null?(0,B.jsx)(j.Root,{open:e,onOpenChange:e=>{e||i()},children:(0,B.jsxs)(j.Content,{size:`md`,children:[(0,B.jsxs)(j.Header,{icon:u,children:[(0,B.jsx)(j.Title,{children:o(`connectAssistantDialog.title`)}),(0,B.jsx)(j.Description,{children:o(`connectAssistantDialog.instruction`)})]}),(0,B.jsx)(j.Body,{children:(0,B.jsxs)(`div`,{className:`space-y-4`,children:[r&&(0,B.jsx)(P,{tone:`info`,children:o(r===`legacy`?`connectAssistantDialog.legacyLinkGuidance`:`connectAssistantDialog.linkGuidance`)}),g?(0,B.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,B.jsx)(`code`,{className:`w-fit rounded-md bg-[var(--surface-active)] px-3 py-2 text-title-medium tracking-wide text-[color:var(--content-emphasised)]`,children:g.userCode}),(0,B.jsx)(`p`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:o(`connectAssistantDialog.approveOnHost`)}),(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-x-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,B.jsx)(`span`,{className:ne?`text-[color:var(--system-warning-strong)]`:void 0,children:o(ne?`connectAssistantDialog.retrying`:`connectAssistantDialog.waitingForApproval`)}),(0,B.jsx)(`span`,{children:o(`connectAssistantDialog.expiresIn`,{time:R(te)})})]})]}):(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,B.jsx)(`label`,{className:`text-body-small-default text-[var(--content-secondary)]`,htmlFor:`connect-assistant-address`,children:o(`connectAssistantDialog.addressLabel`)}),(0,B.jsx)(E,{id:`connect-assistant-address`,type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:o(`connectAssistantDialog.addressPlaceholder`),fullWidth:!0,autoFocus:!0})]}),(0,B.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,B.jsx)(`label`,{className:`text-body-small-default text-[var(--content-secondary)]`,htmlFor:`connect-assistant-name`,children:o(`connectAssistantDialog.nameLabel`)}),(0,B.jsx)(E,{id:`connect-assistant-name`,type:`text`,value:l,onChange:e=>d(e.target.value),placeholder:`office-mac`,fullWidth:!0})]})]}),m&&(0,B.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:m.kind===`rejected-address`?_e(m.rejection,m.address):m.text})]})}),(0,B.jsxs)(j.Footer,{children:[(0,B.jsx)(N,{variant:`ghost`,onClick:i,children:o(`actions.cancel`)}),!g&&(0,B.jsx)(N,{variant:`primary`,onClick:()=>void ae(),disabled:!s.trim()||f,children:o(f?`actions.connecting`:`actions.connect`)})]})]})}):(0,B.jsx)(j.Root,{open:e,onOpenChange:e=>{e||i()},children:(0,B.jsxs)(j.Content,{size:`sm`,children:[(0,B.jsx)(j.Header,{icon:u,children:(0,B.jsx)(j.Title,{children:o(`connectAssistantDialog.importedTitle`)})}),(0,B.jsx)(j.Body,{children:(0,B.jsx)(P,{tone:`warning`,children:o(`connectAssistantDialog.importedBody`)})}),(0,B.jsx)(j.Footer,{children:(0,B.jsx)(N,{variant:`primary`,onClick:()=>a(re),children:o(`actions.continue`)})})]})})}function He({open:e,assistantName:n,isPending:r,errorMessage:i,onCancel:a,onRepair:o,onRetire:s}){let{t:c}=t(`onboarding`),[l,u]=(0,z.useState)(`menu`);(0,z.useEffect)(()=>{e&&u(`menu`)},[e]);let d=i?(0,B.jsx)(`span`,{className:`mt-3 block text-body-small-default text-[var(--system-negative-strong)]`,children:i}):null;return l===`confirm-repair`?(0,B.jsx)(D,{open:e,title:c(`connectRecoveryDialog.repairTitle`),message:(0,B.jsxs)(B.Fragment,{children:[c(`connectRecoveryDialog.repairBody`),d]}),confirmLabel:c(`connectRecoveryDialog.repairConfirm`),isPending:r,onConfirm:o,onCancel:()=>u(`menu`)}):l===`confirm-retire`?(0,B.jsx)(k,{open:e,isPending:r,extraMessage:d,onConfirm:s,onCancel:()=>u(`menu`)}):(0,B.jsx)(j.Root,{open:e,onOpenChange:e=>{!e&&!r&&a()},children:(0,B.jsxs)(j.Content,{size:`sm`,hideCloseButton:!0,onEscapeKeyDown:e=>{e.preventDefault(),e.stopPropagation(),r||a()},children:[(0,B.jsx)(j.Header,{children:(0,B.jsx)(j.Title,{children:c(`connectRecoveryDialog.authFailedTitle`)})}),(0,B.jsxs)(j.Body,{children:[(0,B.jsx)(j.Description,{children:c(`connectRecoveryDialog.authFailedBody`,{name:n})}),d,(0,B.jsxs)(`div`,{className:`mt-5 flex w-full flex-col gap-2`,children:[(0,B.jsx)(N,{variant:`primary`,fullWidth:!0,disabled:r,onClick:()=>u(`confirm-repair`),children:c(`connectRecoveryDialog.wakeAndRepair`)}),(0,B.jsx)(N,{variant:`dangerOutline`,fullWidth:!0,disabled:r,onClick:()=>u(`confirm-retire`),children:c(`connectRecoveryDialog.retire`)}),(0,B.jsx)(N,{variant:`outlined`,fullWidth:!0,disabled:r,onClick:a,children:c(`actions.cancel`)})]})]})]})})}function Ue(e){return e.name?e.name:e.isPaired?`Paired Assistant`:e.isLocal&&e.cloud===`local`?e.id:e.isLocal?`Local Assistant`:`Cloud Assistant`}function We(e,t){if(e)try{return t(`selectAssistantScreen.selfHostedWithHost`,{host:new URL(e).hostname})}catch{}return t(`selectAssistantScreen.selfHosted`)}function U(e,t){let n=e.isPaired?T(e.runtimeUrl):e.isLocal?ae()?`On this computer`:We(e.ingressUrl,t):`Cloud-hosted`;return e.hatchedAt?`${n} · Created ${Ee(e.hatchedAt)}`:n}function W(e){return new URL(e.url).hostname}function Ge(e){return e.name??W(e)}function G(e){return`origin:${e.url}`}var K=`origin:vellum-cloud`;function Ke(e){let t=new URLSearchParams(e);return t.delete(`register`),t.delete(`name`),t}function qe(){let{t:e}=t(`onboarding`),r=i(),o=n(),[s,f]=a(),p=s.get(`fromLogin`)===`1`,ee=s.get(`noAutoSkip`)===`1`,h=pe(),v=ae(),b=ne(),S=he.use.assistants(),ie=De.use.currentOrganizationId(),C=I.use.origins(),oe=I.use.hydrated(),w=y(),{loading:T,error:ue,login:E,cancel:_e}=re(),[D,ve]=(0,z.useState)(null),O=D===null?null:{url:D,name:`Vellum Cloud`},k=O!==null,Ce=e=>e.isPaired||e.isLocal&&v||b,A=S.filter(be),j=A.filter(Ce),Ee=j.length>0||C.length>0||O!==null,P=se(),Oe=!b&&P,[F,L]=(0,z.useState)(null),[R,Pe]=(0,z.useState)(!1),[Le,Re]=(0,z.useState)(!1),[Be,V]=(0,z.useState)(null),[H,We]=(0,z.useState)(null),[U,W]=(0,z.useState)(!1),[qe,q]=(0,z.useState)(null),[J,Y]=(0,z.useState)(null),[Qe,$e]=(0,z.useState)(!1),[et,X]=(0,z.useState)(null),[tt,nt]=(0,z.useState)(!1),[Z,rt]=(0,z.useState)(null),[it,at]=(0,z.useState)(!1),[ot,st]=(0,z.useState)(null),ct=g.use.open(),lt=g.use.initialAddress(),ut=g.use.guidanceKind(),dt=g.use.deepLinkDrainSettled(),Q=(0,z.useRef)(!1);(0,z.useEffect)(()=>{xe()},[]),(0,z.useEffect)(()=>{Ne(),I.getState().hydrate()},[]),(0,z.useEffect)(()=>{if(!w)return;let e=!1;return je().then(t=>{e||ve(t)}),()=>{e=!0}},[w]);let $=(0,z.useRef)(!1);(0,z.useEffect)(()=>{if($.current)return;$.current=!0;let e=s.get(`register`);if(e===null)return;let t=()=>f(Ke,{replace:!0}),n=Ae(e);if(n===null){t();return}I.getState().addOrigin({url:n,name:s.get(`name`)??void 0}).then(e=>{e.ok?t():$.current=!1}).catch(()=>{$.current=!1})},[s,f]),(0,z.useEffect)(()=>{if(F===K&&k||F!=null&&C.some(e=>G(e)===F))return;if(j.length===0){let e=C[0],t=e?G(e):k?K:null;F!==t&&L(t);return}if(F!=null&&j.some(e=>e.id===F))return;let e=fe(ie);L(j.find(t=>t.id===e)?.id??j[0].id)},[F,j,ie,C,k]);let ft=async e=>{Pe(!0),V(null);try{await Se(e),r(M.assistant,{replace:!0})}catch(t){console.error(`selectAssistant.handleConnect failed`,t),e.isLocal&&se()&&(x(t)||Te(t)||t instanceof me)&&_(e.id)?We(e):e.isPaired&&x(t)?V(`This pairing has expired. Run vellum pair on the assistant's machine and import it again with vellum connect import.`):V(`Failed to connect. Please try again.`),Pe(!1)}},pt=()=>{We(null),W(!1),q(null),Re(!1)},mt=async()=>{if(!(!H||U)){W(!0),q(null);try{let e=await le(H.id,{repairGuardian:!0});if(e.ok){m(),pt(),ft(H);return}q(e.error||`Repair failed. Please try again.`)}catch(e){console.error(`selectAssistant.recoveryRepair failed`,e),q(`Repair failed. Please try again.`)}W(!1)}},ht=async()=>{if(!(!H||U)){W(!0),q(null);try{let e=await we(o,H.id);if(e.ok){pt(),r(e.nextRoute,{replace:!0});return}q(e.error)}catch(e){console.error(`selectAssistant.recoveryRetire failed`,e),q(`Failed to retire assistant. Please try again.`)}W(!1)}},gt=()=>{Qe||(Y(null),X(null))},_t=async()=>{if(!(!J||Qe)){if($e(!0),X(null),J.isPaired){let e=await de(o,J.id);e.ok?(Q.current=!0,Y(null)):X(e.error),$e(!1);return}try{let e=await te(J.id);if(e.ok){let e=he.getState();e.activeAssistantId===J.id&&e.setActiveAssistantId(null),ye(o,J.id),Q.current=!0,Y(null)}else X(e.error??`Failed to remove. Please try again.`)}catch(e){console.error(`selectAssistant.removeFromDevice failed`,e),X(`Failed to remove. Please try again.`)}$e(!1)}},vt=()=>{it||(rt(null),st(null))},yt=async()=>{!Z||it||(at(!0),st(null),await I.getState().removeOrigin(Z.url),I.getState().origins.some(e=>e.url===Z.url)?st(`Failed to remove. Please try again.`):(Q.current=!0,rt(null)),at(!1))},bt=e=>{g.getState().closeConnectDialog(),ft(he.getState().assistants.find(t=>t.id===e)??{id:e,isLocal:!1,isPlatformHosted:!1,isPaired:!0})},xt=(e,t)=>{nt(!1),Fe(e,t??void 0)};(0,z.useEffect)(()=>{p||ee||Q.current||v&&oe&&(C.length>0||h&&!dt||R||Le||ct||A.length!==0&&A.length===1&&j.length===1&&(Re(!0),ft(j[0])))},[A.length,j.length,dt,v,C.length,oe]);let St=()=>{if(F===K){Me(null).then(e=>{!e&&D!==null&&window.location.assign(D)});return}let e=C.find(e=>G(e)===F);if(e){Ie(e)?r(M.assistant,{replace:!0}):Fe(e);return}let t=A.find(e=>e.id===F);t&&ft(t)},Ct=()=>{r(v?M.welcome:M.assistant)},wt=ue??Be;return Le&&!wt&&!H?(0,B.jsx)(Je,{}):(0,B.jsxs)(ce,{avatarWave:`beside`,children:[(0,B.jsx)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${h?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`min-h-screen px-6 pb-40 pt-6 md:min-h-full md:pb-6`} text-[var(--content-default)]`,children:(0,B.jsxs)(`div`,{className:`flex w-full flex-col items-center ${h?``:`flex-1 justify-center`}`,children:[(0,B.jsx)(`h1`,{className:`text-center text-5xl font-normal tracking-tight md:text-4xl lg:text-5xl`,style:{fontFamily:`var(--font-serif)`,animation:`fadeInUp 0.5s ease-out 0.1s both`},children:e(`selectAssistantScreen.title`)}),wt&&(0,B.jsx)(`p`,{className:`mt-4 text-body-small-default text-[var(--system-negative-strong)]`,children:wt}),(0,B.jsxs)(`div`,{role:`radiogroup`,"aria-label":e(`selectAssistantScreen.listAriaLabel`),onKeyDown:ke,className:`flex w-full flex-col ${h?`mt-8 gap-2`:`mt-10 gap-3`}`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:[A.map(t=>{let n=Ce(t);return(0,B.jsx)(Xe,{assistant:t,selected:F===t.id,locked:!n,tabStop:F==null?j[0]?.id===t.id:F===t.id,onSelect:()=>{n&&L(t.id)},loginLabel:e(T?`actions.cancel`:`actions.loginToUse`),loginDisabled:R,onLogin:!n&&(t.isPlatformHosted||t.isLocal)?T?_e:()=>void E():void 0,onRemove:t.isPlatformHosted&&Oe||t.isPaired&&P?()=>Y(t):void 0},t.id)}),C.map((e,t)=>{let n=G(e),r=Ie(e);return(0,B.jsx)(Ze,{origin:e,selected:F===n,current:r,tabStop:F==null?j.length===0&&t===0:F===n,onSelect:()=>L(n),onRemove:r&&w?void 0:()=>rt(e)},e.url)}),O&&(0,B.jsx)(Ze,{origin:O,icon:(0,B.jsx)(l,{className:`h-5 w-5`}),selected:F===K,current:!1,tabStop:F==null?j.length===0&&C.length===0:F===K,onSelect:()=>L(K)}),v&&(0,B.jsx)(Ye,{icon:(0,B.jsx)(d,{className:`h-4 w-4`}),label:e(`selectAssistantScreen.createNew`),disabled:R||T,onClick:()=>void r(`${M.onboarding.hosting}?from=select-assistant`)}),P&&(0,B.jsx)(Ye,{icon:(0,B.jsx)(u,{className:`h-4 w-4`}),label:e(`selectAssistantScreen.connectRemote`),disabled:R||T,onClick:()=>g.getState().openConnectDialog()}),!P&&(0,B.jsx)(Ye,{icon:(0,B.jsx)(c,{className:`h-4 w-4`}),label:e(`selectAssistantScreen.addRemote`),disabled:R||T,onClick:()=>nt(!0)})]}),Ee&&(0,B.jsx)(`div`,{className:`mt-8 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.4s both`},children:(0,B.jsx)(N,{variant:`primary`,size:`regular`,fullWidth:!0,className:h?void 0:`h-11 text-base`,onClick:St,disabled:!F||R,children:e(R?`actions.connecting`:`actions.continue`)})}),(0,B.jsx)(`div`,{className:Ee?`mt-3`:`mt-8`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`},children:(0,B.jsx)(N,{variant:`ghost`,size:`regular`,className:`text-[var(--content-tertiary)]`,onClick:Ct,disabled:R||T,children:e(`actions.back`)})})]})}),(0,B.jsx)(ze,{open:tt,onClose:()=>nt(!1),onAdded:xt}),(0,B.jsx)(Ve,{open:ct,initialAddress:lt??void 0,guidanceKind:ut??void 0,onClose:()=>g.getState().closeConnectDialog(),onImported:bt}),(0,B.jsx)(He,{open:H!=null,assistantName:H?Ue(H):``,isPending:U,errorMessage:qe??void 0,onCancel:pt,onRepair:()=>void mt(),onRetire:()=>void ht()}),(0,B.jsx)(ge,{open:J!=null,kind:J?.isPaired?`paired`:`platform`,assistantName:J?Ue(J):e(`selectAssistantScreen.unnamedAssistant`),errorMessage:et??void 0,isPending:Qe,onConfirm:()=>void _t(),onCancel:gt}),(0,B.jsx)(ge,{open:Z!=null,kind:`origin`,assistantName:Z?Ge(Z):e(`selectAssistantScreen.unnamedAssistant`),errorMessage:ot??void 0,isPending:it,onConfirm:()=>void yt(),onCancel:vt})]})}function Je(){let{t:e}=t(`onboarding`);return(0,B.jsx)(ce,{avatarWave:`beside`,children:(0,B.jsx)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-xl flex-col items-center justify-center px-6 text-[var(--content-default)]`,children:(0,B.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:e(`selectAssistantScreen.connectingToAssistant`)})})})}function Ye({icon:e,label:t,disabled:n,onClick:r}){let i=pe();return(0,B.jsxs)(`button`,{type:`button`,onClick:r,disabled:n,className:[`group flex w-full items-center justify-center gap-2 border border-dashed border-[var(--border-element)]/50 text-[var(--content-tertiary)]`,i?`rounded-lg px-3 py-2.5`:`rounded-xl px-5 py-3`,`cursor-pointer transition-all duration-200 ease-out`,`hover:border-[var(--border-element)] hover:bg-[var(--surface-hover)] hover:text-[var(--content-default)]`,`disabled:cursor-not-allowed disabled:opacity-50`].join(` `),children:[e,(0,B.jsx)(`span`,{className:i?`text-body-small-default`:`text-body-medium-default`,children:t})]})}function q({label:e,onRemove:n}){let{t:r}=t(`onboarding`);return(0,B.jsxs)(A.Root,{children:[(0,B.jsx)(A.Trigger,{asChild:!0,children:(0,B.jsx)(N,{variant:`ghost`,size:`regular`,className:`text-[var(--content-tertiary)]`,iconOnly:(0,B.jsx)(p,{}),"aria-label":r(`selectAssistantScreen.rowActionsAriaLabel`,{name:e})})}),(0,B.jsx)(A.Content,{align:`end`,sideOffset:4,children:(0,B.jsx)(A.Item,{onSelect:n,className:`text-[var(--system-negative-strong)] data-[highlighted]:text-[var(--system-negative-strong)]`,children:r(`selectAssistantScreen.removeFromDevice`)})})]})}function J({icon:e,title:t,subtitle:n,selected:r,locked:i=!1,tabStop:a,onSelect:o,action:c,removeMenu:l}){let u=pe();return(0,B.jsxs)(`div`,{role:i?void 0:`radio`,"aria-checked":i?void 0:r,tabIndex:i?void 0:a?0:-1,onClick:i?void 0:o,onKeyDown:i?void 0:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),o())},className:[`group flex w-full items-center border text-left`,u?`gap-3 rounded-lg px-[10px] py-3`:`gap-4 rounded-2xl px-[18px] py-4`,`transition-all duration-200 ease-out`,i?`border-[var(--border-base)] bg-[var(--surface-overlay)]`:`cursor-pointer focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--primary-base)]`,i?``:r?`border-[var(--primary-base)] bg-[var(--surface-lift)]`:`border-[var(--border-base)] bg-[var(--surface-lift)]/60 hover:border-[var(--border-element)] hover:bg-[var(--surface-lift)]`].join(` `),children:[(0,B.jsx)(`div`,{className:[`flex shrink-0 items-center justify-center transition-colors duration-200`,`h-12 w-12 rounded-[10px]`,r&&!i?`bg-[var(--primary-base)] text-[var(--surface-base)]`:`bg-[var(--surface-active)]/40 text-[var(--content-secondary)]`].join(` `),children:e}),(0,B.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,B.jsx)(`span`,{className:`block text-body-medium-default text-[var(--content-default)]`,children:t}),(0,B.jsx)(`span`,{className:`mt-1 block text-[var(--content-tertiary)] ${u?`text-label-medium-default font-normal`:`text-body-small-lighter`}`,children:n})]}),(0,B.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[c,l&&(i?l:(0,B.jsx)(`div`,{onClick:e=>e.stopPropagation(),onKeyDown:e=>e.stopPropagation(),children:l})),!i&&(0,B.jsx)(`div`,{className:[`flex h-5 w-5 shrink-0 items-center justify-center rounded-full border-2 transition-all duration-200`,r?`border-[var(--primary-base)] bg-[var(--primary-base)]`:`border-[var(--border-element)] group-hover:border-[var(--content-tertiary)]`].join(` `),children:r&&(0,B.jsx)(s,{className:`h-3 w-3 text-[var(--surface-base)]`,strokeWidth:3})})]})]})}function Xe({assistant:e,selected:n,locked:r,tabStop:i,onSelect:a,loginLabel:o,loginDisabled:s,onLogin:c,onRemove:d}){let{t:p}=t(`onboarding`),m=Ue(e),{traits:ee,imageUrl:g,onImageError:_}=h(e);return(0,B.jsx)(J,{icon:(0,B.jsx)(Le,{traits:ee,imageUrl:g,fallback:e.isPaired?(0,B.jsx)(u,{className:`h-5 w-5`}):e.isLocal?(0,B.jsx)(f,{className:`h-5 w-5`}):(0,B.jsx)(l,{className:`h-5 w-5`}),decorative:!0,onImageError:_}),title:m,subtitle:U(e,p),selected:n,locked:r,tabStop:i,onSelect:a,action:r&&c?(0,B.jsx)(N,{variant:`primary`,size:`regular`,onClick:c,disabled:s,children:o}):void 0,removeMenu:d&&(0,B.jsx)(q,{label:m,onRemove:d})})}function Ze({origin:e,icon:n,selected:r,current:i,tabStop:a,onSelect:o,onRemove:s}){let{t:l}=t(`onboarding`),u=Ge(e);return(0,B.jsx)(J,{icon:n??(0,B.jsx)(c,{className:`h-5 w-5`}),title:u,subtitle:l(i?`selectAssistantScreen.currentWithHost`:`selectAssistantScreen.remoteWithHost`,{host:W(e)}),selected:r,tabStop:a,onSelect:o,removeMenu:s&&(0,B.jsx)(q,{label:u,onRemove:s})})}export{qe as SelectAssistantScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,Y as t}from"./vendor-WUN87CSE.js";import{Mv as n,Op as r,Rp as i,hm as a,zv as o}from"./index-7XDiAJ-A.js";var s=`vellum:remembered-origins`;function c(e){let t=e.trim();if(t===``)return null;let n;try{n=new URL(t)}catch{return null}return n.protocol!==`https:`||n.hostname===``?null:`${n.origin}${n.pathname.replace(/\/+$/,``)}`}function l(e,t){let n=[],r=new Set,i=t??new Date().toISOString();for(let t of e){if(typeof t!=`object`||!t)continue;let{url:e,name:a,addedAt:o}=t;if(typeof e!=`string`)continue;let s=c(e);s===null||r.has(s)||(r.add(s),n.push({url:s,...typeof a==`string`&&a!==``?{name:a}:{},addedAt:typeof o==`string`?o:i}))}return n}function u(e){let t=JSON.parse(e);return Array.isArray(t)?l(t):null}var d=r({key:s,scope:`device`,parse:u,serialize:JSON.stringify,fallback:[]}),f={load:async()=>d.load(),save:async e=>{d.save(e)},watch:e=>n(s,e)},p=f,m=null,h=0,g=Promise.resolve(),_=`vellum:remembered-origins:mutate`;async function v(e){let t=typeof navigator>`u`?void 0:navigator.locks;return t?await t.request(_,e):e()}function y(e){let t=()=>v(e),n=g.then(t,t);return g=n.catch(()=>void 0),n}var b=null,x=!1;function S(e){return y(async()=>{try{let t=await p.load();if(e!==h)return;T.getState().hydrated?T.setState({origins:t}):m===null?T.getState().hydrate():x=!0}catch{}})}function C(){b?.();let e=h;b=p.watch?.(()=>void S(e))??null}function w(e){p=e,h+=1,m=null,x=!1,T.setState({hydrated:!1}),C(),T.getState().hydrate()}var T=t()((e,t)=>({origins:[],hydrated:!1,hydrate:()=>(m??=(async()=>{let t=h;await Promise.resolve();try{let n=await p.load();t===h&&(e({origins:n,hydrated:!0}),x&&(x=!1,S(t)))}catch{t===h&&(m=null)}})(),m),addOrigin:async({url:n,name:r})=>{let i=c(n);return i===null?{ok:!1}:y(async()=>{if(await t().hydrate(),!t().hydrated)return{ok:!1};let n=p,a=h,o;try{o=await n.load()}catch{return{ok:!1}}if(a!==h)return{ok:!1};let s=r?.trim(),c=o.find(e=>e.url===i),l=c??{url:i,addedAt:new Date().toISOString()},u=s?{...l,name:s}:l,d=c?o.map(e=>e.url===i?u:e):[...o,u];try{await n.save(d)}catch{return{ok:!1}}return a===h?(e({origins:d}),{ok:!0,origin:u}):{ok:!1}})},removeOrigin:async n=>{let r=c(n);r!==null&&await y(async()=>{if(await t().hydrate(),!t().hydrated)return;let n=p,i=h,a;try{a=await n.load()}catch{return}if(i!==h)return;let o=a.filter(e=>e.url!==r);if(o.length!==a.length)try{await n.save(o)}catch{return}i===h&&e({origins:o})})}}));C();var E=o(T),D=e(`SelfHostedServers`),O=`1970-01-01T00:00:00.000Z`;async function k(){try{return await D.list()}catch(e){return console.debug(`[self-hosted-servers] bridge unavailable:`,e),null}}var A=`vellum:remembered-origins:native-migrated`;function j(){try{return window.localStorage.getItem(A)===`true`}catch{return!0}}function M(){try{window.localStorage.setItem(A,`true`)}catch{}}async function N(e){if(j())return e;let t=[];try{t=await f.load()}catch{t=[]}let n=new Set(e.map(e=>e.url)),r=t.filter(e=>!n.has(e.url)),i=[];for(let t of r){try{await D.add({url:t.url,...t.name?{name:t.name}:{}})}catch(t){return console.debug(`[self-hosted-servers] migration add failed:`,t),[...e,...i]}i.push(t)}return M(),[...e,...i]}function P(){return{load:async()=>{let e=await k();return e===null?f.load():N(l(e.servers,O))},save:async e=>{let t=await k();if(t===null){await f.save(e);return}let n=new Map(l(t.servers,O).map(e=>[e.url,e.name])),r=new Set(e.map(e=>e.url));for(let e of n.keys())r.has(e)||await D.remove({url:e});for(let t of e)(!n.has(t.url)||t.name&&t.name!==n.get(t.url))&&await D.add({url:t.url,...t.name?{name:t.name}:{}})},watch:f.watch}}var F=!1;function I(){F||!i()||(F=!0,w(P()))}async function L(e,t){if(!i())return!1;await a();try{return await t(),!0}catch(t){return console.debug(`[self-hosted-servers] ${e} unavailable:`,t),!1}}async function R(e){return L(`switchTo`,()=>D.switchTo(e===null?{}:{url:e}))}async function z(e,t){return L(`switchToPath`,()=>D.switchToPath({...e===null?{}:{url:e},path:t}))}async function B(){if(!i())return null;let e=await k();return e===null||!e.activeUrl?null:e.bakedUrl?c(e.bakedUrl):null}export{c as a,B as i,R as n,E as o,z as r,I as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{O as e}from"./vendor-WUN87CSE.js";import{t}from"./react-DPM_L_aA.js";import{mn as n,qn as r}from"./icons-CSdHOix6.js";import{wy as i}from"./index-7XDiAJ-A.js";import{t as a}from"./detail-card-BTciodin.js";var o=t();function s({id:e,title:t,subtitle:n,children:r}){return(0,o.jsxs)(a,{id:e,title:t,subtitle:n,children:[(0,o.jsx)(`div`,{className:`h-px bg-[var(--surface-active)]`}),(0,o.jsx)(`div`,{className:`mt-4`,children:r})]})}function c({onClick:t,disabled:n}){let{t:r}=e();return(0,o.jsx)(i,{onClick:t,disabled:n,children:r(`serviceFormControls.save`)})}function l({onClick:t,filled:n=!1}){let{t:r}=e();return(0,o.jsx)(i,{variant:n?`danger`:`dangerGhost`,onClick:t,children:r(`serviceFormControls.reset`)})}function u({guide:e}){return(0,o.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,o.jsx)(n,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-positive-strong)]`}),(0,o.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,o.jsx)(`span`,{children:e.description}),(0,o.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[e.linkLabel,(0,o.jsx)(r,{className:`h-3 w-3`})]})]})]})}export{s as i,l as n,c as r,u as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{b as t,t as n}from"./react-DPM_L_aA.js";import{my as r}from"./index-7XDiAJ-A.js";var i=e(t(),1),a=n();function o({label:e,helperText:t,checked:n,onChange:o,variant:s=`toggle-leading`}){let c=(0,i.useId)(),l=(0,a.jsx)(r,{checked:n,onChange:o,id:c}),u=(0,a.jsxs)(`label`,{htmlFor:c,className:`min-w-0 flex-1 cursor-pointer`,children:[(0,a.jsx)(`span`,{className:`block text-body-medium-default text-[var(--content-default)]`,children:e}),(0,a.jsx)(`span`,{className:`mt-1 block text-body-small-default text-[var(--content-tertiary)]`,children:t})]});return s===`toggle-trailing`?(0,a.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[u,l]}):(0,a.jsxs)(`div`,{className:`flex items-center gap-4`,children:[l,u]})}export{o as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./react-DPM_L_aA.js";import{Dy as t}from"./index-7XDiAJ-A.js";var n=e();function r({className:e}){return(0,n.jsx)(`div`,{role:`presentation`,className:t(`h-px w-full bg-[var(--border-base)]`,e)})}export{r as t};
|