@vellumai/web 0.10.8-dev.202607142125.4cfef21 → 0.10.8-dev.202607142322.265489c
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/{AnimatePresence-TZWSGjkI.js → AnimatePresence-C8APSgIu.js} +1 -1
- package/dist/assets/{BundleConfirmPage-DwVI7U0b.js → BundleConfirmPage-csl_-Nye.js} +1 -1
- package/dist/assets/{a2a-invite-CwD3hY_-.js → a2a-invite-fHwl0Epx.js} +1 -1
- package/dist/assets/{about-page-vayMMPxH.js → about-page-CTqRcFvb.js} +1 -1
- package/dist/assets/{account-page-uVMhWTmh.js → account-page-CREIbo8r.js} +1 -1
- package/dist/assets/{account-shell-DaECsri2.js → account-shell-DQw5Mu9M.js} +1 -1
- package/dist/assets/{acp-run-detail-panel-DKXp8jTf.js → acp-run-detail-panel-BQ7oB3Kz.js} +4 -4
- package/dist/assets/{activity-steps-panel-Bq9yj1qu.js → activity-steps-panel-BuLfnLrL.js} +1 -1
- package/dist/assets/{add-credits-modal-DjQdNLWh.js → add-credits-modal-DCjjbsdC.js} +1 -1
- package/dist/assets/advanced-page-BNtmbTE9.js +1 -0
- package/dist/assets/ai-page-BdTGKtrn.js +1 -0
- package/dist/assets/{animated-avatar-DMwzREGQ.js → animated-avatar-sv1Uybgk.js} +1 -1
- package/dist/assets/{api-DHuLwcqq.js → api-Bevr0pGX.js} +1 -1
- package/dist/assets/{api-Dfrm6N2I.js → api-DkSxu9mt.js} +1 -1
- package/dist/assets/{api-key-screen-DhFeDT-n.js → api-key-screen-BQ6XB3zX.js} +1 -1
- package/dist/assets/{app-info-BxdEjcok.js → app-info-BezApPMu.js} +1 -1
- package/dist/assets/{archive-page-BLEqhIZ8.js → archive-page-B9BC21rD.js} +1 -1
- package/dist/assets/{assistant-feature-flag-store-BA3GR2m5.js → assistant-feature-flag-store-C6uBkduo.js} +1 -1
- package/dist/assets/assistant-identity-store-BYhArr-D.js +1 -0
- package/dist/assets/{assistant-status-panel-CW7lTRBE.js → assistant-status-panel-C7kL3Fc9.js} +1 -1
- package/dist/assets/{auth-store-65JKPW7C.js → auth-store-g_yS_oCN.js} +2 -2
- package/dist/assets/{background-task-detail-panel-ChfmmS5C.js → background-task-detail-panel-CP-u3R1_.js} +1 -1
- package/dist/assets/billing-page-CBJTzlrQ.js +3 -0
- package/dist/assets/{bookmarks-page-BdcnBpJK.js → bookmarks-page-DkfushU5.js} +1 -1
- package/dist/assets/{browser-Cnr7iqbJ.js → browser-CVeP58LI.js} +2 -2
- package/dist/assets/{build-state-D-aPe0DY.js → build-state-t-JUBX2c.js} +1 -1
- package/dist/assets/{capture-error-Dhiismgm.js → capture-error-DVAJKNAr.js} +1 -1
- package/dist/assets/channels-page-route-BOXNIXmJ.js +9 -0
- package/dist/assets/chat-markdown-message-DCX0m-SI.js +2 -0
- package/dist/assets/{client-feature-flag-store-Ri-a_LuI.js → client-feature-flag-store-DNBCLZIZ.js} +1 -1
- package/dist/assets/{client-identity-DfC94VQ4.js → client-identity-CwQmFQji.js} +1 -1
- package/dist/assets/{command-palette-Bu2Qjyle.js → command-palette-BMG34zf3.js} +1 -1
- package/dist/assets/{command-palette-window-page-CtQ40jMw.js → command-palette-window-page-p_F6cb4w.js} +1 -1
- package/dist/assets/{community-page-DL_oR63v.js → community-page-HxmWdthP.js} +1 -1
- package/dist/assets/{confirm-dialog-CSkhRFRk.js → confirm-dialog-BZvq8PhO.js} +1 -1
- package/dist/assets/{connect-page-BCb6nr8x.js → connect-page-CN1z98GY.js} +1 -1
- package/dist/assets/{consent-controls-udcijSAB.js → consent-controls-DfdDxos6.js} +1 -1
- package/dist/assets/{contacts-gateway-DfyjoqNo.js → contacts-gateway-Blx1MZT7.js} +1 -1
- package/dist/assets/contacts-page-route-2j45PY23.js +1 -0
- package/dist/assets/{conversation-list-fetchers-_PUdRqRZ.js → conversation-list-fetchers-Bj9nBKoX.js} +1 -1
- package/dist/assets/{conversation-store-CynXqAcO.js → conversation-store-CGnszPFj.js} +1 -1
- package/dist/assets/{credential-entry-page-CRTZY2VD.js → credential-entry-page-BrU5f0Ot.js} +1 -1
- package/dist/assets/credentials-page-BYKLlQ44.js +1 -0
- package/dist/assets/{danger-zone-redirect-page-BpM01x_c.js → danger-zone-redirect-page-k8Yz0X-5.js} +1 -1
- package/dist/assets/debug-page-BvplcBeV.js +4 -0
- package/dist/assets/{deploy-dialogs-C6pCnoVj.js → deploy-dialogs-CGm52wDM.js} +1 -1
- package/dist/assets/{detail-card-GPqFZVmX.js → detail-card-B5I6aXNi.js} +1 -1
- package/dist/assets/{detail-panel-stop-button-H9sXvWGa.js → detail-panel-stop-button-CHbxMggg.js} +1 -1
- package/dist/assets/{developer-page-DZdwzLQu.js → developer-page-DR5YhfNd.js} +1 -1
- package/dist/assets/{devices-page-ChwagiFL.js → devices-page-CHW1sKFf.js} +1 -1
- package/dist/assets/{diagnostics-CUmYxbmM.js → diagnostics-CQZr8zYd.js} +1 -1
- package/dist/assets/{dictation-overlay-page-BmLNyGeD.js → dictation-overlay-page-ysmM3hSl.js} +1 -1
- package/dist/assets/document-viewer-page-BN-X2IUi.js +1 -0
- package/dist/assets/earn-credits-modal-CWzv3Fjx.js +1 -0
- package/dist/assets/{edge-swipe-arbiter-store-VEaUoy3F.js → edge-swipe-arbiter-store-C5XmK_JQ.js} +1 -1
- package/dist/assets/effective-timezone-C7oLHXZe.js +1 -0
- package/dist/assets/{emails-page-D_ZdkIHT.js → emails-page-CYyH_pYA.js} +1 -1
- package/dist/assets/{environment-store-Bxe2pTvW.js → environment-store-DyMUUr1E.js} +1 -1
- package/dist/assets/esm--MFihM2h.js +2 -0
- package/dist/assets/{esm-CE4Ehw9K.js → esm-BIArZ03C.js} +2 -2
- package/dist/assets/esm-BT8CmhPM.js +2 -0
- package/dist/assets/esm-BjWZJD7k.js +2 -0
- package/dist/assets/esm-CxJJMk-j.js +2 -0
- package/dist/assets/esm-DtkJfG7y.js +2 -0
- package/dist/assets/esm-JoFZb0u6.js +1 -0
- package/dist/assets/file-editor-B5TY0UEr.js +1 -0
- package/dist/assets/file-markdown-Cup-RHth.js +2 -0
- package/dist/assets/general-page-CaJ4KOpT.js +1 -0
- package/dist/assets/{haptics-BOswdY5A.js → haptics-DWu_sa-d.js} +2 -2
- package/dist/assets/{hatching-screen-DiUygZtk.js → hatching-screen-CjnpNzIg.js} +1 -1
- package/dist/assets/home-page-route-DoRSHbpu.js +1 -0
- package/dist/assets/{hosting-screen-nru73FGU.js → hosting-screen-GEFIG0JZ.js} +1 -1
- package/dist/assets/{identity-page-route-CbHcVb6m.js → identity-page-route-__qpnxPT.js} +1 -1
- package/dist/assets/index-B80w6ZQS.css +2 -0
- package/dist/assets/index-KzfXKHkT.js +209 -0
- package/dist/assets/{inspect-page-DoA1sfxg.js → inspect-page-DzSo6xjZ.js} +4 -4
- package/dist/assets/integrations-page-Dezw6v3C.js +1 -0
- package/dist/assets/{intelligence-layout-oIGPC8W1.js → intelligence-layout-CJvaBuNa.js} +1 -1
- package/dist/assets/{keyboard-shortcuts-page-BzeIMUpj.js → keyboard-shortcuts-page-BJo7kTtr.js} +1 -1
- package/dist/assets/{library-detail-page-D0Dv3ZLJ.js → library-detail-page-DfbyncHP.js} +1 -1
- package/dist/assets/{library-page-D7I-sk41.js → library-page-CZhpOdhW.js} +1 -1
- package/dist/assets/list-row-BZaww4d3.js +1 -0
- package/dist/assets/{local-mode-Bskd5bsT.js → local-mode-EJ8VbJUL.js} +1 -1
- package/dist/assets/{login-flow-DYLpX6IU.js → login-flow-BIkFfhNZ.js} +1 -1
- package/dist/assets/{login-page-UotBWZu9.js → login-page-OePvFtAB.js} +1 -1
- package/dist/assets/{logout-page-xucijGcq.js → logout-page-DI9LSGC0.js} +1 -1
- package/dist/assets/logs-layout-DrKcGO_f.js +1 -0
- package/dist/assets/{memory-page-route-DqM6EMFu.js → memory-page-route-Dmx49_kB.js} +1 -1
- package/dist/assets/{memory-router-playground-page-DikxzmKT.js → memory-router-playground-page-C3KZOfYP.js} +1 -1
- package/dist/assets/{messages-B2CZAuPN.js → messages-BW1vovEU.js} +1 -1
- package/dist/assets/{metric-card-cvhtzRdM.js → metric-card---E9LVV5.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-BaL8el3Y.js → mobile-sidebar-drawer-BfjXol2z.js} +1 -1
- package/dist/assets/{modal-D5nLWNN9.js → modal-DrypPaMu.js} +1 -1
- package/dist/assets/mutation-error-Bcu_RZRD.js +1 -0
- package/dist/assets/{native-biometric-B2cBAQ1U.js → native-biometric-CJRgzVOl.js} +1 -1
- package/dist/assets/{native-file-BZDk5eyB.js → native-file-B7-DBeYw.js} +2 -2
- package/dist/assets/{notifications-page-BISnBOYH.js → notifications-page-BuA7SRAr.js} +1 -1
- package/dist/assets/{oauth-complete-page-SfFEsa_M.js → oauth-complete-page-DtkQw59b.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-D4Xoa-Gr.js → oauth-popup-complete-page-D40C_YJg.js} +1 -1
- package/dist/assets/{page-shell-1qU5DIUF.js → page-shell-DisoNeSZ.js} +1 -1
- package/dist/assets/{pairing-page-B5xnM6XX.js → pairing-page-BGHV9d66.js} +1 -1
- package/dist/assets/{panel-item-CouW2A55.js → panel-item-D2T7lXtD.js} +1 -1
- package/dist/assets/{password-reset-page-NF13YMiM.js → password-reset-page-DfvTWbbN.js} +1 -1
- package/dist/assets/{platform-detection-DGxL0AsS.js → platform-detection-0_8aW1uL.js} +1 -1
- package/dist/assets/{platform-loopback-page-_IbNDHN2.js → platform-loopback-page-sckhr8jw.js} +1 -1
- package/dist/assets/{plugin-detail-page-_iCqtxl9.js → plugin-detail-page-ho7nwryp.js} +1 -1
- package/dist/assets/plugins-page--AVY_OkR.js +1 -0
- package/dist/assets/plugins-surface-CVS7-9P3.js +1 -0
- package/dist/assets/prechat-route-Bdr1J7gt.js +1 -0
- package/dist/assets/{prefs-DNYLVDvB.js → prefs-Dl-v2TTW.js} +1 -1
- package/dist/assets/{privacy-page-DhxWA9mA.js → privacy-page-DRwQJo_a.js} +1 -1
- package/dist/assets/{privacy-screen-DRGDGj0W.js → privacy-screen-B-wAXquF.js} +1 -1
- package/dist/assets/{provider-callback-page-BoO2JgZt.js → provider-callback-page--508KjeJ.js} +1 -1
- package/dist/assets/{provider-key-B-hx1r3c.js → provider-key-BEtsSmaI.js} +1 -1
- package/dist/assets/{provider-signup-page-DLVKMYZh.js → provider-signup-page-CJMx_8yH.js} +1 -1
- package/dist/assets/{quick-input-page-7z8Ti2GI.js → quick-input-page-Cyrc0KfM.js} +1 -1
- package/dist/assets/{react-query.gen-DV9K_z-o.js → react-query.gen-D_KTCpc9.js} +1 -1
- package/dist/assets/{react-query.gen-LsPzqPq6.js → react-query.gen-DuTdhK0R.js} +1 -1
- package/dist/assets/{remote-gateway-session-CBKZhJak.js → remote-gateway-session-C2KbM_ll.js} +1 -1
- package/dist/assets/{research-mock-page-CoMthbl4.js → research-mock-page-D2fVQRbG.js} +1 -1
- package/dist/assets/{research-onboarding-persistence-D_h0dT1o.js → research-onboarding-persistence-1pcoMo9a.js} +1 -1
- package/dist/assets/{research-onboarding-route-CeTflgoE.js → research-onboarding-route-CdI5h2LV.js} +3 -3
- package/dist/assets/{resize-errors-DqIkO0UI.js → resize-errors-C2tL2tLQ.js} +1 -1
- package/dist/assets/{resolved-assistants-store-DAzPZ1eV.js → resolved-assistants-store-DlAmO-LO.js} +1 -1
- package/dist/assets/{return-to-ugSGJ0dm.js → return-to-Xo7wdaST.js} +1 -1
- package/dist/assets/{review-terms-screen-DAZ66rIh.js → review-terms-screen-tMesMZNH.js} +1 -1
- package/dist/assets/{risk-BQ3NV8r8.js → risk-5ua-xzrm.js} +1 -1
- package/dist/assets/routes-CPNLHbhb.js +1 -0
- package/dist/assets/schedules-DcRg_Puh.js +1 -0
- package/dist/assets/{sdk.gen-9Cdt87h5.js → sdk.gen-CTNNX-UL.js} +1 -1
- package/dist/assets/security-page-DhLynKYh.js +1 -0
- package/dist/assets/select-assistant-screen-E2gZ_Y5q.js +1 -0
- package/dist/assets/settings-layout-CPH7hvjC.js +1 -0
- package/dist/assets/share-feedback-modal-BgbddjVD.js +1 -0
- package/dist/assets/{sidebar-tree-DWJkYLPh.js → sidebar-tree-CEUIFF6o.js} +1 -1
- package/dist/assets/{signup-page-D2LQXMnG.js → signup-page-BSoxHalt.js} +1 -1
- package/dist/assets/{signup-shell-DCGARCES.js → signup-shell-Cdfe8uQF.js} +1 -1
- package/dist/assets/{site-favicon-DsYdnaxV.js → site-favicon-CQ3uzYnv.js} +1 -1
- package/dist/assets/skill-detail-page-BS26FjK6.js +1 -0
- package/dist/assets/{skill-detail-panel-B4WEYtK9.js → skill-detail-panel-C24If6zU.js} +1 -1
- package/dist/assets/{skills-D0rhLW1_.js → skills-DjZ74JzZ.js} +1 -1
- package/dist/assets/{skills-page-Di8dGQGo.js → skills-page-Cai_B8_L.js} +1 -1
- package/dist/assets/{sound-manager-CRFoAxE4.js → sound-manager-BzHxsxwE.js} +1 -1
- package/dist/assets/{sounds-page-CF3gwgc9.js → sounds-page-ruMF0AFV.js} +1 -1
- package/dist/assets/{src-DZbMXyC2.js → src-0Ri4-JTJ.js} +39 -39
- package/dist/assets/{subagent-detail-panel-BqYWP0b9.js → subagent-detail-panel-mVIamthD.js} +1 -1
- package/dist/assets/{subagent-store-B4PMGakL.js → subagent-store-CfHKY8RS.js} +1 -1
- package/dist/assets/{system-events-page-DdvtYv0_.js → system-events-page-DWD635bu.js} +1 -1
- package/dist/assets/{system-events-redirect-page-HeBGwZCZ.js → system-events-redirect-page-C2oGI3lp.js} +1 -1
- package/dist/assets/{theme-stage-page-8v_hsKXd.js → theme-stage-page-D07NYuPe.js} +1 -1
- package/dist/assets/{tiptap-document-editor-1QvKHdlQ.js → tiptap-document-editor-DdrsnBde.js} +2 -2
- package/dist/assets/{tool-detail-panel-DarSpKEx.js → tool-detail-panel-Dh4aTVQ0.js} +1 -1
- package/dist/assets/{upgrade-cancel-page-wop4boqC.js → upgrade-cancel-page-DD3tPK9p.js} +1 -1
- package/dist/assets/{upgrade-success-page-DWPEHzlo.js → upgrade-success-page-BGOvHvVM.js} +1 -1
- package/dist/assets/usage-redirect-page-BwncBpry.js +1 -0
- package/dist/assets/{use-active-assistant-id-CGeH4Gl6.js → use-active-assistant-id-Cv36_-K3.js} +1 -1
- package/dist/assets/{use-edge-swipe-back-R9ItWgTp.js → use-edge-swipe-back-7ZhMAAQC.js} +1 -1
- package/dist/assets/use-invite-link-dialog-CnKlbE7X.js +1 -0
- package/dist/assets/use-is-org-ready-Cc0sitDm.js +1 -0
- package/dist/assets/{use-onboarding-login-BHrngniO.js → use-onboarding-login-Cl8GCPuG.js} +1 -1
- package/dist/assets/{use-reduced-motion-BPBlq9_a.js → use-reduced-motion-CcGT6CHV.js} +1 -1
- package/dist/assets/{use-skill-actions-mJaMNpfO.js → use-skill-actions-DRqoGSoQ.js} +1 -1
- package/dist/assets/{use-skill-categories-Bit2V2fA.js → use-skill-categories-Dlmd1O2g.js} +1 -1
- package/dist/assets/{use-skill-detail-files-DDUUobr0.js → use-skill-detail-files-C40aywhH.js} +1 -1
- package/dist/assets/{utils-xg2dl_KJ.js → utils-Bfz_XJ3g.js} +1 -1
- package/dist/assets/{viewer-store-90zmUKZ4.js → viewer-store-BRH-haIp.js} +1 -1
- package/dist/assets/voice-page-Kb6g92Ge.js +1 -0
- package/dist/assets/{weather-forecast-display-DOXofTcV.js → weather-forecast-display-CCYIMcwL.js} +1 -1
- package/dist/assets/{web-6YTn0Mpt.js → web-4aYn9b05.js} +1 -1
- package/dist/assets/{web-B6BDTvZe.js → web-BHpRMJ3m.js} +1 -1
- package/dist/assets/{web-BEtTYpif.js → web-BeG87uLU.js} +1 -1
- package/dist/assets/{web-DGaEiOw7.js → web-CdRSUz1G.js} +1 -1
- package/dist/assets/{web-C3rsbCeg.js → web-DD1EXkfh.js} +1 -1
- package/dist/assets/{web-CIdUPUaN.js → web-DDr-E3WZ.js} +1 -1
- package/dist/assets/{web-CBHy41qN.js → web-DcCrDga4.js} +1 -1
- package/dist/assets/{web-BrbVmY32.js → web-Lfycvuw7.js} +1 -1
- package/dist/assets/{welcome-screen-kc41a0yS.js → welcome-screen-t1wAFPFR.js} +1 -1
- package/dist/assets/{workflow-detail-panel-Dctg7w-3.js → workflow-detail-panel-mO7E5EIN.js} +1 -1
- package/dist/assets/{workflow-store-CDrDxW5J.js → workflow-store-DfexPIHb.js} +1 -1
- package/dist/assets/workspace-page-CifXW0ga.js +1 -0
- package/dist/index.html +87 -90
- package/package.json +1 -1
- package/dist/assets/advanced-page-CQPwr2B4.js +0 -1
- package/dist/assets/ai-page-CO4dBJpg.js +0 -1
- package/dist/assets/assistant-identity-store-CX03CK8q.js +0 -1
- package/dist/assets/billing-page-CaP8_CF9.js +0 -3
- package/dist/assets/channels-page-route-DKkdGS4b.js +0 -9
- package/dist/assets/chat-markdown-message-Cp8stHaU.js +0 -2
- package/dist/assets/contacts-page-route-CicU-jSI.js +0 -1
- package/dist/assets/copy-Cn1FKrEp.js +0 -1
- package/dist/assets/credentials-page-DDM2V8iZ.js +0 -1
- package/dist/assets/debug-page-BGhdwv9M.js +0 -4
- package/dist/assets/document-viewer-page-B-ShLH6Y.js +0 -1
- package/dist/assets/earn-credits-modal-BILKTI_F.js +0 -1
- package/dist/assets/effective-timezone-DYvVVpXt.js +0 -1
- package/dist/assets/esm-BC-IlNg6.js +0 -2
- package/dist/assets/esm-BVzHqFEK.js +0 -2
- package/dist/assets/esm-D4S5VlIC.js +0 -2
- package/dist/assets/esm-Ddwl5DWt.js +0 -2
- package/dist/assets/esm-ZgeaRH-O.js +0 -2
- package/dist/assets/esm-wMYgN14J.js +0 -1
- package/dist/assets/file-editor-CgjwckHX.js +0 -1
- package/dist/assets/file-markdown-ZKvQUuGy.js +0 -2
- package/dist/assets/general-page-61s8VehJ.js +0 -1
- package/dist/assets/home-page-route-1hEkRjdv.js +0 -1
- package/dist/assets/index-B4Qq7TL7.js +0 -209
- package/dist/assets/index-CCPsEVwr.css +0 -2
- package/dist/assets/integrations-page-vFP_lh3w.js +0 -1
- package/dist/assets/list-row-D5MFdbkH.js +0 -1
- package/dist/assets/llm-dimension-Tz2Fx8qB.js +0 -1
- package/dist/assets/logs-layout-JUd7Ag6q.js +0 -1
- package/dist/assets/mutation-error-Bk_4pjgm.js +0 -1
- package/dist/assets/plugins-page-DHiFqgxf.js +0 -1
- package/dist/assets/plugins-surface-B3Ro34dC.js +0 -1
- package/dist/assets/prechat-route-BwML3ZL1.js +0 -1
- package/dist/assets/routes-BXlWEOF0.js +0 -1
- package/dist/assets/schedules-Dz6392n3.js +0 -1
- package/dist/assets/security-page-BS1WxY0d.js +0 -1
- package/dist/assets/select-assistant-screen-z3B8ngdP.js +0 -1
- package/dist/assets/settings-layout-DFzwR63d.js +0 -1
- package/dist/assets/share-feedback-modal-DH2dhWbo.js +0 -1
- package/dist/assets/skill-detail-page-CcZFUjdw.js +0 -1
- package/dist/assets/stat-square-CTHnQ1jc.js +0 -1
- package/dist/assets/usage-page-CB5oigmL.js +0 -1
- package/dist/assets/usage-window-CCdJWJ0U.js +0 -1
- package/dist/assets/use-bus-subscription-Cslzk2dW.js +0 -1
- package/dist/assets/use-invite-link-dialog-_LChrtmw.js +0 -1
- package/dist/assets/use-is-org-ready-1Xighdsa.js +0 -1
- package/dist/assets/voice-page-Dfl4T4_g.js +0 -1
- package/dist/assets/workspace-page-BWn-Je40.js +0 -1
- /package/dist/assets/{api-errors-CrWDzVca.js → api-errors-0nSIbmmG.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-CMIiT9CS.js → avatar-bundled-components-ELDcio1Z.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-DQyPgWSC.js → avatar-svg-compositor-D7Dy9s1k.js} +0 -0
- /package/dist/assets/{browser-timezone-B2VEIYkv.js → browser-timezone-viO2H3SD.js} +0 -0
- /package/dist/assets/{build.umd-t16r8k1T.js → build.umd-CxdKgGWo.js} +0 -0
- /package/dist/assets/{by-tool-use-id-index-C6QlfuXA.js → by-tool-use-id-index-D9Ubci08.js} +0 -0
- /package/dist/assets/{chat-0L0NBUcq.js → chat-Rlp5eStK.js} +0 -0
- /package/dist/assets/{client.gen-DVfIRXUZ.js → client.gen-D41nX-pp.js} +0 -0
- /package/dist/assets/{composer-focus-8EISjLd_.js → composer-focus-2n-cfJJQ.js} +0 -0
- /package/dist/assets/{constants-BQVXM0At.js → constants-BoX4fzt0.js} +0 -0
- /package/dist/assets/{conversation-selection-CfSCgJxD.js → conversation-selection-C5YNfBdw.js} +0 -0
- /package/dist/assets/{create-selectors-8NePGNlX.js → create-selectors-DDPM3N-z.js} +0 -0
- /package/dist/assets/{definitions-CK0CSdwt.js → definitions-CaYcW4Yq.js} +0 -0
- /package/dist/assets/{definitions-Dj7uajgZ.js → definitions-DScTW2c-.js} +0 -0
- /package/dist/assets/{dist-RkT480s0.js → dist-BvZlbxlW.js} +0 -0
- /package/dist/assets/{dist-DqmYHxdg.js → dist-UKPLRFjY.js} +0 -0
- /package/dist/assets/{domains-CIIVdIa8.js → domains-Cppe2cjB.js} +0 -0
- /package/dist/assets/{dropdown-ByHOpeOU.js → dropdown-CQxYW9Pf.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-Cp4IpzLe.js → emoji-catalog-data-D8lRMt3A.js} +0 -0
- /package/dist/assets/{event-bus-BNx4a0Ds.js → event-bus-De_PCbQV.js} +0 -0
- /package/dist/assets/{feature-flag-catalog-DjfXrBPD.js → feature-flag-catalog-Bjc1LL65.js} +0 -0
- /package/dist/assets/{format-date-cTplgJ8P.js → format-date-CghpPTDc.js} +0 -0
- /package/dist/assets/{format-file-size-BLrV7wUA.js → format-file-size-tDC_9gZM.js} +0 -0
- /package/dist/assets/{impersonate-version-flag-BhxfH6iZ.js → impersonate-version-flag-Czs00oTq.js} +0 -0
- /package/dist/assets/{is-electron-y5bNUVyG.js → is-electron-DVNj-pbz.js} +0 -0
- /package/dist/assets/{misc-DnHIYCE9.js → misc-iHjpjkrj.js} +0 -0
- /package/dist/assets/{native-deep-link-CPCbJkSt.js → native-deep-link-CJGNy9bj.js} +0 -0
- /package/dist/assets/{onboarding-step-layout-Cup_f9lB.js → onboarding-step-layout-DqnFzQ2Q.js} +0 -0
- /package/dist/assets/{optimistic-lifecycle-C4YFdBr3.js → optimistic-lifecycle-DTggtDfs.js} +0 -0
- /package/dist/assets/{pdf-jCZ1S_t-.js → pdf-C3Qukw-J.js} +0 -0
- /package/dist/assets/{pointer-qy7F2Zff.js → pointer-DcD0Nt7Z.js} +0 -0
- /package/dist/assets/{prechat-BBwYr5Qb.js → prechat-DWZ8cBD9.js} +0 -0
- /package/dist/assets/{prechat-names-Cjl3JzzN.js → prechat-names-BrKNpAcz.js} +0 -0
- /package/dist/assets/{proxy-Cadlowdl.js → proxy-BzlH_XAe.js} +0 -0
- /package/dist/assets/{public-asset-WikBpVQd.js → public-asset-Di3QykUd.js} +0 -0
- /package/dist/assets/{sdk.gen-CenbOmmb.js → sdk.gen-8pCB8ehU.js} +0 -0
- /package/dist/assets/{sdk.gen-CFgJ4K6f.js → sdk.gen-B6w0Rx7D.js} +0 -0
- /package/dist/assets/{semver-DIkpaM51.js → semver-C4nKCHcy.js} +0 -0
- /package/dist/assets/{setting-row-imtQqr9o.js → setting-row-C_BDjy9H.js} +0 -0
- /package/dist/assets/{shortcut-keys-B2EE-634.js → shortcut-keys-ClleSjaq.js} +0 -0
- /package/dist/assets/{skill-icon-CgzIQCTT.js → skill-icon-cNkD2w1X.js} +0 -0
- /package/dist/assets/{status-badge-pill-B_ninpnM.js → status-badge-pill-0N6rTEBg.js} +0 -0
- /package/dist/assets/{step-indicator-dots-B-KCGh9e.js → step-indicator-dots-WPW5s3H9.js} +0 -0
- /package/dist/assets/{theme-preferences-D1vs2UH8.js → theme-preferences-DAllWLBa.js} +0 -0
- /package/dist/assets/{three-dot-indicator-BuZzHFUJ.js → three-dot-indicator-BVtP8eei.js} +0 -0
- /package/dist/assets/{toast-xTp-xwYL.js → toast-BoUAg5zA.js} +0 -0
- /package/dist/assets/{typed-storage-BRvgA7pX.js → typed-storage-BpxzR3Qf.js} +0 -0
- /package/dist/assets/{use-copy-to-clipboard-Ap1ESW2j.js → use-copy-to-clipboard-tXJpCn2M.js} +0 -0
- /package/dist/assets/{workflow-status-PqQ1OqJN.js → workflow-status-B53qU9DS.js} +0 -0
- /package/dist/assets/{xterm-CJZcgQLM.js → xterm-CBmd_y-b.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-BmGG02AS.js → xterm-addon-fit-THPW0uy0.js} +0 -0
package/dist/assets/{research-onboarding-route-CeTflgoE.js → research-onboarding-route-CdI5h2LV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-Dhiismgm.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-amTXFI-2.js";import{d as i,h as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as o}from"./QueryClientProvider-DKhXIxGb.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./cn-C36Yvcac.js";import{t as l}from"./arrow-left-DI9551VI.js";import{t as u}from"./chevron-left-BMF1xNfR.js";import{t as d}from"./chevron-right-DqqmezXC.js";import{n as f,r as p,t as m}from"./animated-avatar-DMwzREGQ.js";import{t as h}from"./loader-circle-Cz7opInR.js";import{t as g}from"./pencil-CUIr0IFo.js";import{t as _}from"./plus-DItfr5ux.js";import{t as v}from"./x-CkSVp1Ok.js";import{t as y}from"./tag-CV4v7fRF.js";import{t as b}from"./input-CoUmPnRU.js";import{i as x,r as S,t as C}from"./dist-CxHeCOEv.js";import{n as w,t as T}from"./create-selectors-8NePGNlX.js";import{b as E,ct as D,o as O,p as k}from"./local-mode-Bskd5bsT.js";import{Bn as A,V as j,Vn as M,_n as N,et as ee,gn as te,xr as ne}from"./sdk.gen-CFgJ4K6f.js";import{r as re}from"./api-errors-CrWDzVca.js";import{A as ie,B as P,L as ae,R as F,n as oe,z as se}from"./auth-store-65JKPW7C.js";import{a as ce,o as le,r as ue}from"./api-Dfrm6N2I.js";import{c as de}from"./routes-BXlWEOF0.js";import{n as I}from"./platform-detection-DGxL0AsS.js";import{c as fe,l as pe}from"./prechat-BBwYr5Qb.js";import{t as me}from"./browser-timezone-B2VEIYkv.js";import{c as L}from"./conversation-list-fetchers-_PUdRqRZ.js";import{i as he,n as ge,r as _e,t as ve}from"./research-onboarding-persistence-D_h0dT1o.js";import{A as ye,B as be,C as xe,D as Se,E as Ce,F as we,I as Te,L as Ee,M as De,N as Oe,O as R,P as ke,R as z,S as B,T as Ae,V,_ as je,a as Me,b as Ne,d as Pe,f as Fe,g as Ie,i as Le,j as Re,k as ze,m as Be,o as Ve,p as He,r as Ue,s as We,t as H,v as Ge,w as Ke,x as qe,y as Je}from"./proxy-Cadlowdl.js";import{t as Ye}from"./AnimatePresence-TZWSGjkI.js";import{t as U}from"./use-reduced-motion-BPBlq9_a.js";import{$ as Xe,Gt as Ze,Wt as Qe,Xt as $e,et as W,ft as et,ja as G,ji as tt,ln as nt,mt as rt,on as it,qt as at,sn as ot,un as st,ur as ct,xn as lt}from"./index-B4Qq7TL7.js";import{n as ut,t as dt}from"./onboarding-step-layout-Cup_f9lB.js";import{t as ft}from"./prechat-names-Cjl3JzzN.js";var pt=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function mt(e,t){return De(e)?e[pt(0,e.length,t)]:e}var ht=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return gt(this.animations,`duration`)}get iterationDuration(){return gt(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function gt(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var _t=class extends ht{then(e,t){return this.finished.finally(e).then(()=>{})}};function vt(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=Ce(i,a,o);return t?s(r):s}function yt(e,t){return e in t}var bt=class extends We{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(yt(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Fe()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},K=e(n(),1);function xt(e){let t=V(()=>B(e)),{isStatic:n}=(0,K.useContext)(Ue);if(n){let[,n]=(0,K.useState)(e);(0,K.useEffect)(()=>t.on(`change`,n),[])}return t}function St(e,t){let n=xt(t()),r=()=>n.set(t());return r(),be(()=>{let t=()=>Re.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),ye(r)}}),n}function Ct(e){qe.current=[],e();let t=St(qe.current,e);return qe.current=void 0,t}function wt(e,t,n,r){if(typeof e==`function`)return Ct(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Et(e,t,n,r);let i=typeof t==`function`?t:vt(t,n,r),a=Array.isArray(e)?Tt(e,i):Tt([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function Tt(e,t){let n=V(()=>[]);return St(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Et(e,t,n,r){let i=V(()=>Object.keys(n)),a=V(()=>({}));for(let o of i)a[o]=wt(e,t,n[o],r);return a}function Dt(e){e.values.forEach(e=>e.stop())}function Ot(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Ne(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{Ot(e,t)})})}function kt(e,t){if(Array.isArray(t))return Ot(e,t);if(typeof t==`string`)return Ot(e,[t]);Ne(e,t)}function At(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){Te(e,`controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.`);let i=[];return t.forEach(e=>{i.push(je(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return Te(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{kt(e,n)})},stop(){t.forEach(e=>{Dt(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function jt(e){return typeof e==`object`&&!Array.isArray(e)}function Mt(e,t,n,r){return e==null?[]:typeof e==`string`&&jt(t)?Ie(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Nt(e,t,n){return e*(t+1)+n*t}function Pt(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Ft(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(z(e,i),r--)}}function It(e,t,n,r,i,a){Ft(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:ze(i,a,r[o]),easing:mt(n,o)})}function Lt(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Rt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var zt=`easeInOut`,Bt=20;function Vt(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,Pt(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=Pt(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Wt(e),{delay:l=0,times:u=Ke(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=xe(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&qt(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=ke(b));let r=R(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&Ae(u,T),c.length===1&&c.unshift(null),m&&Ee(m<Bt,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Bt} or apply repeat at the sequence level instead.`),m&&m<Bt){let e=b>0?_/b:0;b=Nt(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?Oe(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:mt(f,e-1))}Lt(u,m,e)}let E=w+b;It(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(Je(p)){let e=Ht(p,s);_(m,h,Ut(`default`,e))}else{let e=Mt(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Ht(r,s);for(let e in m)_(m[e],Gt(h,e),Ut(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Rt);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(we(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(zt)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function Ht(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ut(e,t){return t[e]||(t[e]=[]),t[e]}function Wt(e){return Array.isArray(e)?e:[e]}function Gt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Kt=e=>typeof e==`number`,qt=e=>e.every(Kt);function Jt(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Be(e)&&!He(e)?new Me(t):new Ve(t);n.mount(e),Pe.set(e,n)}function Yt(e){let t=new bt({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),Pe.set(e,t)}function Xt(e,t){return Je(e)||typeof e==`number`||typeof e==`string`&&!jt(t)}function Zt(e,t,n,r){let i=[];if(Xt(e,t))i.push(Le(e,jt(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=Mt(e,t,r),o=a.length;Te(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?Jt:Yt;Pe.has(r)||s(r);let c=Pe.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...Ge(c,{...t,transition:l},{}))}}return i}function Qt(e,t,n){let r=[];return Vt(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=B(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:Se}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Zt(n,e,t))}),r}function $t(e){return Array.isArray(e)&&e.some(Array.isArray)}function en(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),$t(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Qt(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Zt(e,i,{...c,...r},t)}let l=new _t(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{z(t.animations,l)})),l}return i}var tn=en();function nn(){let e=V(At);return be(e.mount,[]),e}var rn=12;function an(e,t){let n=e.slice(0,rn).map(e=>`- ${e.name} — ${e.description}`).join(`
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-DVAJKNAr.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-amTXFI-2.js";import{d as i,h as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as o}from"./QueryClientProvider-DKhXIxGb.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./cn-C36Yvcac.js";import{t as l}from"./arrow-left-DI9551VI.js";import{t as u}from"./chevron-left-BMF1xNfR.js";import{t as d}from"./chevron-right-DqqmezXC.js";import{n as f,r as p,t as m}from"./animated-avatar-sv1Uybgk.js";import{t as h}from"./loader-circle-Cz7opInR.js";import{t as g}from"./pencil-CUIr0IFo.js";import{t as _}from"./plus-DItfr5ux.js";import{t as v}from"./x-CkSVp1Ok.js";import{t as y}from"./tag-CV4v7fRF.js";import{t as b}from"./input-CoUmPnRU.js";import{i as x,r as S,t as C}from"./dist-CxHeCOEv.js";import{n as w,t as T}from"./create-selectors-DDPM3N-z.js";import{b as E,ct as D,o as O,p as k}from"./local-mode-EJ8VbJUL.js";import{Bn as A,V as j,Vn as M,_n as N,et as ee,gn as te,xr as ne}from"./sdk.gen-B6w0Rx7D.js";import{r as re}from"./api-errors-0nSIbmmG.js";import{A as ie,B as P,L as ae,R as F,n as oe,z as se}from"./auth-store-g_yS_oCN.js";import{a as ce,o as le,r as ue}from"./api-DkSxu9mt.js";import{c as de}from"./routes-CPNLHbhb.js";import{n as I}from"./platform-detection-0_8aW1uL.js";import{c as fe,l as pe}from"./prechat-DWZ8cBD9.js";import{t as me}from"./browser-timezone-viO2H3SD.js";import{c as L}from"./conversation-list-fetchers-Bj9nBKoX.js";import{i as he,n as ge,r as _e,t as ve}from"./research-onboarding-persistence-1pcoMo9a.js";import{A as ye,B as be,C as xe,D as Se,E as Ce,F as we,I as Te,L as Ee,M as De,N as Oe,O as R,P as ke,R as z,S as B,T as Ae,V,_ as je,a as Me,b as Ne,d as Pe,f as Fe,g as Ie,i as Le,j as Re,k as ze,m as Be,o as Ve,p as He,r as Ue,s as We,t as H,v as Ge,w as Ke,x as qe,y as Je}from"./proxy-BzlH_XAe.js";import{t as Ye}from"./AnimatePresence-C8APSgIu.js";import{t as U}from"./use-reduced-motion-CcGT6CHV.js";import{$ as Xe,$t as Ze,Fi as Qe,Gt as $e,Pa as W,Wt as et,et as G,fn as tt,ft as nt,ln as rt,mt as it,pn as at,pr as ot,qt as st,un as ct,wn as lt}from"./index-KzfXKHkT.js";import{n as ut,t as dt}from"./onboarding-step-layout-DqnFzQ2Q.js";import{t as ft}from"./prechat-names-BrKNpAcz.js";var pt=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function mt(e,t){return De(e)?e[pt(0,e.length,t)]:e}var ht=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>e.finished))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e){let t=this.animations.map(t=>t.attachTimeline(e));return()=>{t.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get state(){return this.getAll(`state`)}get startTime(){return this.getAll(`startTime`)}get duration(){return gt(this.animations,`duration`)}get iterationDuration(){return gt(this.animations,`iterationDuration`)}runAll(e){this.animations.forEach(t=>t[e]())}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}};function gt(e,t){let n=0;for(let r=0;r<e.length;r++){let i=e[r][t];i!==null&&i>n&&(n=i)}return n}var _t=class extends ht{then(e,t){return this.finished.finally(e).then(()=>{})}};function vt(...e){let t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],i=e[1+n],a=e[2+n],o=e[3+n],s=Ce(i,a,o);return t?s(r):s}function yt(e,t){return e in t}var bt=class extends We{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(yt(t,e)){let n=e[t];if(typeof n==`string`||typeof n==`number`)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(e,t){delete t.output[e]}measureInstanceViewportBox(){return Fe()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},K=e(n(),1);function xt(e){let t=V(()=>B(e)),{isStatic:n}=(0,K.useContext)(Ue);if(n){let[,n]=(0,K.useState)(e);(0,K.useEffect)(()=>t.on(`change`,n),[])}return t}function St(e,t){let n=xt(t()),r=()=>n.set(t());return r(),be(()=>{let t=()=>Re.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),ye(r)}}),n}function Ct(e){qe.current=[],e();let t=St(qe.current,e);return qe.current=void 0,t}function wt(e,t,n,r){if(typeof e==`function`)return Ct(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return Et(e,t,n,r);let i=typeof t==`function`?t:vt(t,n,r),a=Array.isArray(e)?Tt(e,i):Tt([e],([e])=>i(e)),o=Array.isArray(e)?void 0:e.accelerate;return o&&!o.isTransformed&&typeof t!=`function`&&Array.isArray(n)&&r?.clamp!==!1&&(a.accelerate={...o,times:t,keyframes:n,isTransformed:!0,...r?.ease?{ease:r.ease}:{}}),a}function Tt(e,t){let n=V(()=>[]);return St(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function Et(e,t,n,r){let i=V(()=>Object.keys(n)),a=V(()=>({}));for(let o of i)a[o]=wt(e,t,n[o],r);return a}function Dt(e){e.values.forEach(e=>e.stop())}function Ot(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&Ne(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{Ot(e,t)})})}function kt(e,t){if(Array.isArray(t))return Ot(e,t);if(typeof t==`string`)return Ot(e,[t]);Ne(e,t)}function At(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){Te(e,`controls.start() should only be called after a component has mounted. Consider calling within a useEffect hook.`);let i=[];return t.forEach(e=>{i.push(je(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return Te(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{kt(e,n)})},stop(){t.forEach(e=>{Dt(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function jt(e){return typeof e==`object`&&!Array.isArray(e)}function Mt(e,t,n,r){return e==null?[]:typeof e==`string`&&jt(t)?Ie(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function Nt(e,t,n){return e*(t+1)+n*t}function Pt(e,t,n,r){return typeof t==`number`?t:t.startsWith(`-`)||t.startsWith(`+`)?Math.max(0,e+parseFloat(t)):t===`<`?n:t.startsWith(`<`)?Math.max(0,n+parseFloat(t.slice(1))):r.get(t)??e}function Ft(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(z(e,i),r--)}}function It(e,t,n,r,i,a){Ft(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:ze(i,a,r[o]),easing:mt(n,o)})}function Lt(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function Rt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var zt=`easeInOut`,Bt=20;function Vt(e,{defaultTransition:t={},...n}={},r,i){let a=t.duration||.3,o=new Map,s=new Map,c={},l=new Map,u=0,d=0,f=0;for(let n=0;n<e.length;n++){let o=e[n];if(typeof o==`string`){l.set(o,d);continue}else if(!Array.isArray(o)){l.set(o.name,Pt(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=Pt(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=Wt(e),{delay:l=0,times:u=Ke(c),type:p=t.type||`keyframes`,repeat:m,repeatType:h,repeatDelay:_=0,...v}=n,{ease:y=t.ease||`easeOut`,duration:b}=n,x=typeof l==`function`?l(o,s):l,S=c.length,C=xe(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&qt(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=ke(b));let r=R(n,e,C);y=r.ease,b=r.duration}b??=a;let w=d+x;u.length===1&&u[0]===0&&(u[1]=1);let T=u.length-c.length;if(T>0&&Ae(u,T),c.length===1&&c.unshift(null),m&&Ee(m<Bt,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${Bt} or apply repeat at the sequence level instead.`),m&&m<Bt){let e=b>0?_/b:0;b=Nt(b,m,_);let t=[...c],n=[...u];y=Array.isArray(y)?[...y]:[y];let r=[...y],i=h===`reverse`||h===`mirror`,a=t,o=r;i&&(a=[...t].reverse(),h===`reverse`&&(o=[...r].reverse().map(e=>typeof e==`function`?Oe(e):e)));for(let s=0;s<m;s++){let l=i&&s%2==0,d=l?a:t,f=l?o:r,p=(s+1)*(1+e);e>0&&(c.push(c[c.length-1]),u.push(p),y.push(`linear`)),c.push(...d);for(let e=0;e<d.length;e++)u.push(n[e]+p),y.push(e===0?`linear`:mt(f,e-1))}Lt(u,m,e)}let E=w+b;It(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(Je(p)){let e=Ht(p,s);_(m,h,Ut(`default`,e))}else{let e=Mt(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=Ht(r,s);for(let e in m)_(m[e],Gt(h,e),Ut(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(Rt);let s=[],c=[],l=[];for(let e=0;e<a.length;e++){let{at:t,value:n,easing:r}=a[e];s.push(n),c.push(we(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(zt)),c[c.length-1]!==1&&(c.push(1),s.push(null)),o.has(r)||o.set(r,{keyframes:{},transition:{}});let u=o.get(r);u.keyframes[i]=s;let{type:d,...p}=t;u.transition[i]={...p,duration:f,ease:l,times:c,...n}}}),o}function Ht(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ut(e,t){return t[e]||(t[e]=[]),t[e]}function Wt(e){return Array.isArray(e)?e:[e]}function Gt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var Kt=e=>typeof e==`number`,qt=e=>e.every(Kt);function Jt(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Be(e)&&!He(e)?new Me(t):new Ve(t);n.mount(e),Pe.set(e,n)}function Yt(e){let t=new bt({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),Pe.set(e,t)}function Xt(e,t){return Je(e)||typeof e==`number`||typeof e==`string`&&!jt(t)}function Zt(e,t,n,r){let i=[];if(Xt(e,t))i.push(Le(e,jt(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=Mt(e,t,r),o=a.length;Te(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?Jt:Yt;Pe.has(r)||s(r);let c=Pe.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...Ge(c,{...t,transition:l},{}))}}return i}function Qt(e,t,n){let r=[];return Vt(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=B(0);return n.on(`change`,t),e.length===1?[n,[0,1]]:e.length===2?[n,[0,1],e[1]]:[n,e[1],e[2]]}return e}),t,n,{spring:Se}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Zt(n,e,t))}),r}function $t(e){return Array.isArray(e)&&e.some(Array.isArray)}function en(e={}){let{scope:t,reduceMotion:n,skipAnimations:r}=e;function i(e,i,a){let o=[],s,c={};if(n!==void 0&&(c.reduceMotion=n),r!==void 0&&(c.skipAnimations=r),$t(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Qt(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Zt(e,i,{...c,...r},t)}let l=new _t(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{z(t.animations,l)})),l}return i}var tn=en();function nn(){let e=V(At);return be(e.mount,[]),e}var rn=12;function an(e,t){let n=e.slice(0,rn).map(e=>`- ${e.name} — ${e.description}`).join(`
|
|
2
2
|
`);return n?`
|
|
3
3
|
Capabilities you can offer me — specialized skillsets you can invoke on my behalf, not generic chat:
|
|
4
4
|
${n}
|
|
@@ -37,7 +37,7 @@ Keep each SHORT and skimmable: under 10 words, ONE clause, ONE artifact, no list
|
|
|
37
37
|
`:``}${d}
|
|
38
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
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 sn({hostingParam:e,localMode:t,gatewayAuthSession:n}){return t?e===null?n:e!==`vellum-cloud`:!1}var cn=3e3,ln=3e5,un=`Failed to start your assistant. Please try again.`,dn=`Your assistant is taking longer than expected. Please try again.`,fn=e=>new Promise(t=>setTimeout(t,e));function pn({adoptExisting:e=!1,adoptAssistantId:n}={}){let[r,i]=(0,K.useState)(!1),[a,o]=(0,K.useState)(null),[s,c]=(0,K.useState)(null),l=(0,K.useRef)(!1),u=(0,K.useRef)([]),d=(0,K.useRef)(null),f=(0,K.useCallback)(e=>{if(!d.current){d.current={kind:`ready`,id:e},i(!0);for(let t of u.current)t.resolve(e);u.current=[]}},[]),p=(0,K.useCallback)(e=>{if(d.current)return;d.current={kind:`error`,message:e},c(e);let t=Error(e);for(let e of u.current)e.reject(t);u.current=[]},[]);return{start:(0,K.useCallback)(()=>{if(l.current)return;l.current=!0;let r=Date.now(),i=()=>Date.now()-r>=ln;(async()=>{if(e&&n){let e=O(n);if(e){o(e.assistantId),f(e.assistantId);return}}let r=e?n:void 0;if(!e)try{let e=await le();if(e.ok)r=e.data.id,o(e.data.id);else{if(F(e.status,e.error)){p(ae);return}if(!P(e.status)){p(re(e.error,void 0,un));return}}}catch(e){t(e,{context:`research_background_hatch`})}let a;for(;!a;){if(i()){p(dn);return}try{let e=await ue(r);r&&!e.ok&&e.status===404&&(r=void 0,e=await ue());let t=se(e);if(t.kind===`active`&&e.ok){a=e.data.id,o(a);break}if(t.kind===`error`){p(t.message);return}}catch(e){t(e,{context:`research_background_hatch_poll`})}await fn(cn)}if(e)for(;!await E();){if(i()){p(dn);return}await fn(cn)}else for(;;){try{if((await ce(a)).ok)break}catch{}if(i()){p(dn);return}await fn(cn)}f(a)})()},[p,f,e,n]),ready:r,assistantId:a,error:s,awaitReady:(0,K.useCallback)(()=>{let e=d.current;return e?.kind===`ready`?Promise.resolve(e.id):e?.kind===`error`?Promise.reject(Error(e.message)):new Promise((e,t)=>{u.current.push({resolve:e,reject:t})})},[])}}async function mn(e,n){try{await j({path:{assistant_id:e,id:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_archive`})}}function hn(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(!(!n||n.role!==`assistant`))return(n.contentBlocks??[]).filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
40
|
-
`).trim()}return``}var gn=[`admin-copilot`],_n=[{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 vn(e){return` ${e.toLowerCase().replace(/[^a-z0-9]+/g,` `).trim()} `}function yn(e,t){return e.includes(` ${t} `)}function bn(e){let t=vn(e),n=[];for(let{plugin:e,keywords:r}of _n)r.some(e=>yn(t,e))&&n.push(e);return n}function xn(e,t){let n=[...gn,...bn(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 Sn=1500,Cn=12e4,wn=2;function Tn({complete:e,stableReads:t}){return e&&t>=wn}function En({sawCompletePayload:e}){return e?`done`:`error`}function Dn({sawCompletePayload:e}){return e}var On=`vellum-ai`,kn=new Set([`simple-memory`,`level-up`]);function An(e){let t=e.trim().split(/(?<=\.)\s/)[0]?.trim()??e.trim();return t.length>100?`${t.slice(0,97).trimEnd()}…`:t}function jn(e){return e?.split(`/`)[0]?.trim()??``}function Mn(e){let t=[],n=new Set;for(let r of e){let e=r.name?.trim(),i=r.description?.trim();!e||!i||jn(r.source?.repo)===On&&(kn.has(e)||(n.add(e),t.push({name:e,description:An(i)})))}return{capabilities:t,validNames:n}}async function Nn(e){try{return Mn((await M({path:{assistant_id:e},throwOnError:!1})).data?.matches??[])}catch(e){return t(e,{context:`research_onboarding_catalog`}),{capabilities:[],validNames:new Set}}}async function Pn(e,n){try{await A({path:{assistant_id:e},body:{name:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_install`})}}async function Fn({assistantId:e,conversationId:n,status:r,claims:i,suggestions:a,plugins:o,installedPlugins:s}){try{await ne({path:{assistant_id:e},body:{conversation_id:n,status:r,claims:i,suggestions:a,plugins:o,installed_plugins:s},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_telemetry`})}}var In=e=>new Promise(t=>setTimeout(t,e));function Ln({role:e,validNames:t,modelPlugins:n}){return[...new Set([...xn(e,t),...n.filter(e=>t.has(e))])]}function Rn(){let[e,n]=(0,K.useState)({status:`idle`,claims:[],suggestions:[],installedPlugins:[],pluginCatalog:{}}),r=(0,K.useRef)(0),i=(0,K.useRef)(null),a=(0,K.useRef)(new Map),s=(0,K.useRef)(Promise.resolve()),c=o(),l=(0,K.useCallback)(({awaitAssistantId:e,subject:o,conversationTitle:l,resumeConversationId:u,onConversationCreated:d,includeSuggestions:f=!0})=>{let p=JSON.stringify(o);if(i.current===p)return;i.current=p;let m=r.current+1;r.current=m;let h=()=>r.current!==m,g=()=>{};s.current=new Promise(e=>{g=e}),a.current.clear(),n({status:`running`,claims:[],suggestions:[],installedPlugins:[],pluginCatalog:{}}),(async()=>{let r,i,s=!1;try{let t=await e();if(r=t,h())return;let{capabilities:c,validNames:p}=await Nn(t);if(h())return;let m=Object.fromEntries(c.map(e=>[e.name,e.description]));n(e=>({...e,pluginCatalog:m})),p.size===0&&g();let _=a.current,v=xn(o.occupation,p);for(let e of v)_.has(e)||_.set(e,Pn(t,e));v.length>0&&n(e=>({...e,installedPlugins:v}));let y=async e=>{let n={conversationId:e,content:on(o,c,{includeSuggestions:f}),sourceChannel:`vellum`,interface:`web`,clientOs:I(),clientMessageId:crypto.randomUUID()};try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(n.clientTimezone=e)}catch{}return!!(await N({path:{assistant_id:t},body:n,throwOnError:!1})).response?.ok},b=async()=>{let e=await ee({path:{assistant_id:t},body:{conversationType:`standard`,...l?{title:l}:{}},throwOnError:!1});i=e.data?.id;let n=e.data?.id;if(!(!e.response?.ok||!n))return d?.(n),n},x;if(u){let e=await te({path:{assistant_id:t},query:{conversationId:u},throwOnError:!1});if(h())return;if(e.response?.ok&&(x=u,i=u,!(e.data?.messages??[]).some(e=>e.role===`user`))){if(!await y(x)){n(e=>({...e,status:`error`}));return}if(h())return}}if(!x){if(x=await b(),h())return;if(!x){n(e=>({...e,status:`error`}));return}if(!await y(x)){n(e=>({...e,status:`error`}));return}if(h())return}let S=Date.now()+Cn,C=``,w=0,T=!1,E=[],D=[],O=[],k=v;for(;Date.now()<S;){if(await In(Sn),h())return;let e=await te({path:{assistant_id:t},query:{conversationId:x},throwOnError:!1});if(h())return;let r=hn(e.data?.messages??[]);if(r){let{claims:e,suggestions:i,plugins:a,pluginsResolved:c,complete:l}=
|
|
40
|
+
`).trim()}return``}var gn=[`admin-copilot`],_n=[{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 vn(e){return` ${e.toLowerCase().replace(/[^a-z0-9]+/g,` `).trim()} `}function yn(e,t){return e.includes(` ${t} `)}function bn(e){let t=vn(e),n=[];for(let{plugin:e,keywords:r}of _n)r.some(e=>yn(t,e))&&n.push(e);return n}function xn(e,t){let n=[...gn,...bn(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 Sn=1500,Cn=12e4,wn=2;function Tn({complete:e,stableReads:t}){return e&&t>=wn}function En({sawCompletePayload:e}){return e?`done`:`error`}function Dn({sawCompletePayload:e}){return e}var On=`vellum-ai`,kn=new Set([`simple-memory`,`level-up`]);function An(e){let t=e.trim().split(/(?<=\.)\s/)[0]?.trim()??e.trim();return t.length>100?`${t.slice(0,97).trimEnd()}…`:t}function jn(e){return e?.split(`/`)[0]?.trim()??``}function Mn(e){let t=[],n=new Set;for(let r of e){let e=r.name?.trim(),i=r.description?.trim();!e||!i||jn(r.source?.repo)===On&&(kn.has(e)||(n.add(e),t.push({name:e,description:An(i)})))}return{capabilities:t,validNames:n}}async function Nn(e){try{return Mn((await M({path:{assistant_id:e},throwOnError:!1})).data?.matches??[])}catch(e){return t(e,{context:`research_onboarding_catalog`}),{capabilities:[],validNames:new Set}}}async function Pn(e,n){try{await A({path:{assistant_id:e},body:{name:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_install`})}}async function Fn({assistantId:e,conversationId:n,status:r,claims:i,suggestions:a,plugins:o,installedPlugins:s}){try{await ne({path:{assistant_id:e},body:{conversation_id:n,status:r,claims:i,suggestions:a,plugins:o,installed_plugins:s},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_telemetry`})}}var In=e=>new Promise(t=>setTimeout(t,e));function Ln({role:e,validNames:t,modelPlugins:n}){return[...new Set([...xn(e,t),...n.filter(e=>t.has(e))])]}function Rn(){let[e,n]=(0,K.useState)({status:`idle`,claims:[],suggestions:[],installedPlugins:[],pluginCatalog:{}}),r=(0,K.useRef)(0),i=(0,K.useRef)(null),a=(0,K.useRef)(new Map),s=(0,K.useRef)(Promise.resolve()),c=o(),l=(0,K.useCallback)(({awaitAssistantId:e,subject:o,conversationTitle:l,resumeConversationId:u,onConversationCreated:d,includeSuggestions:f=!0})=>{let p=JSON.stringify(o);if(i.current===p)return;i.current=p;let m=r.current+1;r.current=m;let h=()=>r.current!==m,g=()=>{};s.current=new Promise(e=>{g=e}),a.current.clear(),n({status:`running`,claims:[],suggestions:[],installedPlugins:[],pluginCatalog:{}}),(async()=>{let r,i,s=!1;try{let t=await e();if(r=t,h())return;let{capabilities:c,validNames:p}=await Nn(t);if(h())return;let m=Object.fromEntries(c.map(e=>[e.name,e.description]));n(e=>({...e,pluginCatalog:m})),p.size===0&&g();let _=a.current,v=xn(o.occupation,p);for(let e of v)_.has(e)||_.set(e,Pn(t,e));v.length>0&&n(e=>({...e,installedPlugins:v}));let y=async e=>{let n={conversationId:e,content:on(o,c,{includeSuggestions:f}),sourceChannel:`vellum`,interface:`web`,clientOs:I(),clientMessageId:crypto.randomUUID()};try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(n.clientTimezone=e)}catch{}return!!(await N({path:{assistant_id:t},body:n,throwOnError:!1})).response?.ok},b=async()=>{let e=await ee({path:{assistant_id:t},body:{conversationType:`standard`,...l?{title:l}:{}},throwOnError:!1});i=e.data?.id;let n=e.data?.id;if(!(!e.response?.ok||!n))return d?.(n),n},x;if(u){let e=await te({path:{assistant_id:t},query:{conversationId:u},throwOnError:!1});if(h())return;if(e.response?.ok&&(x=u,i=u,!(e.data?.messages??[]).some(e=>e.role===`user`))){if(!await y(x)){n(e=>({...e,status:`error`}));return}if(h())return}}if(!x){if(x=await b(),h())return;if(!x){n(e=>({...e,status:`error`}));return}if(!await y(x)){n(e=>({...e,status:`error`}));return}if(h())return}let S=Date.now()+Cn,C=``,w=0,T=!1,E=[],D=[],O=[],k=v;for(;Date.now()<S;){if(await In(Sn),h())return;let e=await te({path:{assistant_id:t},query:{conversationId:x},throwOnError:!1});if(h())return;let r=hn(e.data?.messages??[]);if(r){let{claims:e,suggestions:i,plugins:a,pluginsResolved:c,complete:l}=tt(r),u=a.filter(e=>p.has(e));for(let e of u)_.has(e)||_.set(e,Pn(t,e));c&&g();let d=Ln({role:o.occupation,validNames:p,modelPlugins:u});if(n({status:`running`,claims:e,suggestions:i,installedPlugins:d,pluginCatalog:m}),E=e,D=i,O=a,k=d,l&&(s=!0),l&&!T&&(T=!0,Fn({assistantId:t,conversationId:x,status:`done`,claims:e,suggestions:i,plugins:a,installedPlugins:d})),w=r===C?w+1:0,C=r,Tn({complete:l,stableReads:w}))break}}if(h())return;T||(T=!0,Fn({assistantId:t,conversationId:x,status:`error`,claims:E,suggestions:D,plugins:O,installedPlugins:k})),n(e=>({...e,status:En({sawCompletePayload:s})}))}catch(e){if(h())return;t(e,{context:`research_onboarding_runner`}),n(e=>({...e,status:`error`}))}finally{g(),Dn({sawCompletePayload:s})&&r&&i&&(await mn(r,i),ot(c,r))}})()},[c]),u=(0,K.useCallback)(async()=>{await s.current,await Promise.all([...a.current.values()])},[]),d=(0,K.useCallback)((e,t)=>{if(r.current+=1,n(e),t&&e.installedPlugins.length>0){let n=a.current;n.clear();for(let r of e.installedPlugins)n.set(r,(async()=>{try{await Pn(await t(),r)}catch{}})())}},[]);return{...e,start:l,awaitPluginInstalls:u,hydrate:d}}function zn({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(`
|
|
41
41
|
`)}async function Bn({assistantId:e,conversationId:n,removedClaims:r,rejectedAll:i}){let a=zn({removedClaims:r,rejectedAll:i});if(a){try{let t={conversationId:n,content:a,sourceChannel:`vellum`,interface:`web`,clientOs:I(),clientMessageId:crypto.randomUUID()};await N({path:{assistant_id:e},body:t,throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_correction`})}await mn(e,n)}}var Vn={companionCoworker:`companion-coworker`,genzBoomer:`genz-boomer`,executeCollaborate:`execute-collaborate`,playfulSerious:`playful-serious`,politeUnfiltered:`polite-unfiltered`},Hn=1500,Un=12e4,Wn=2;function Gn({processing:e,sawProcessing:t,hasReply:n,stableReads:r}){return e===void 0?n&&r>=Wn:!e&&(n||t)}var Kn=e=>new Promise(t=>setTimeout(t,e)),qn=e=>Math.max(0,Math.min(100,Math.round(e)));function Jn(e,t,n){let r=t=>qn(e[t]??50),i=r(Vn.companionCoworker),a=r(Vn.executeCollaborate),o=r(Vn.playfulSerious),s=r(Vn.politeUnfiltered),c=t?.trim()||`The user`,l=n?.trim(),u=l?`Your name is ${l}. Write exactly \`- **Name:** ${l}\` in IDENTITY.md — do not rename yourself or invent a different name, even if the file currently shows a placeholder or a different name. This changes your personality, not who you are.`:"Keep your existing name exactly as it is — this changes your personality, not who you are. Do not rename yourself, and if your name is already set, carry it through verbatim (don't treat it as a placeholder to fill). Whatever the name ends up being, keep it on IDENTITY.md's `- **Name:** …` line.";return`<system-message>
|
|
42
42
|
${c} wants to customize your personality.
|
|
43
43
|
This is what they want you to be:
|
|
@@ -60,4 +60,4 @@ ${u}
|
|
|
60
60
|
Each rewritten file must still be complete: SOUL.md keeps everything you operate by — how you use memory, your boundaries, your compliance stance — re-expressed in your new voice rather than dropped. When you finish, both files should read top-to-bottom as this new personality, with nothing left in the generic default voice.
|
|
61
61
|
</system-message>`}async function Yn({awaitAssistantId:e,values:n,userName:r,assistantName:i}){let a,o;try{a=await e();let t=await ee({path:{assistant_id:a},body:{conversationType:`standard`,title:`Updating personality`},throwOnError:!1});if(o=t.data?.id,!t.response?.ok||!o)return;let s={conversationId:o,content:Jn(n,r,i),sourceChannel:`vellum`,interface:`vellum`,clientMessageId:crypto.randomUUID()};if(!(await N({path:{assistant_id:a},body:s,throwOnError:!1})).response?.ok)return;let c=Date.now()+Un,l=``,u=0,d=!1;for(;Date.now()<c;){await Kn(Hn);let e=await te({path:{assistant_id:a},query:{conversationId:o},throwOnError:!1}),t=hn(e.data?.messages??[]);if(t&&(u=t===l?u+1:0,l=t),e.data?.processing===!0&&(d=!0),Gn({processing:e.data?.processing,sawProcessing:d,hasReply:t.length>0,stableReads:u}))break}}catch(e){t(e,{context:`research_onboarding_personality`})}finally{if(a&&o)try{await j({path:{assistant_id:a,id:o},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_personality_archive`})}}}function Xn(e){let t=e?.trim();return`You're about to begin your first conversation.${t?`\nYour name is ${t} — introduce yourself as ${t}.`:``}
|
|
62
62
|
Respond with a warm and engaging greeting. Be interesting, be real. This is your chance to get to know and impress the user.
|
|
63
|
-
Keep it short! For this opening greeting only, don't use \`recall\` or read any files — just say hello. (This applies to the greeting alone; use your tools normally for everything the user asks afterward.)`}function Zn(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 q=s(),Qn={w:1280,h:800};function $n(){return typeof window>`u`?Qn:{w:window.innerWidth,h:window.innerHeight}}function er(){let[e,t]=(0,K.useState)(null),[n,r]=(0,K.useState)(()=>$n());return(0,K.useLayoutEffect)(()=>{if(!e)return;let t=()=>{let t=e.getBoundingClientRect();r({w:t.width,h:t.height})};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[e]),{ref:t,size:n}}var tr=(0,K.createContext)(null);function nr({size:e,children:t}){return(0,q.jsx)(tr.Provider,{value:e,children:t})}function rr(){let e=(0,K.useContext)(tr),[t,n]=(0,K.useState)(()=>$n());return(0,K.useEffect)(()=>{if(e)return;let t=()=>n($n());return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),e??t}var ir={x:.5,y:.4},ar=[-8,6,9,0,7,-6,5,0,-7,4,-5,6];function or(e){return ar[e%ar.length]??0}var sr=[1,0,1,0,1,0,1,0,1,0,0],cr=[.72,1],lr=[.4,1],ur=[10,20],dr=50;function fr(e){return cr[sr[e]??1]??1}function pr(e){return lr[sr[e]??1]??1}function mr(e){return ur[sr[e]??1]??20}function hr(e,t){return Math.round(Math.max(130,Math.min(Math.min(e,t)*.4,420)))}function gr(e,t){return Math.round(Math.max(110,Math.min(Math.min(e,t)*.21,205)))}function _r(e,t,n){let r=n*.4,i=n*.48;return[{x:i,y:i},{x:e*.3,y:r},{x:e*.72,y:r},{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*.38,y:t-r},{x:e*.62,y:t-r}]}function vr(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 yr({components:e,characters:t,centerChar:n,edgeOrder:r,entering:i,exiting:a,onEnterComplete:o,onSelectChar:s}){let{w:c,h:l}=rr(),u=U(),d=c<640,f=new Set([4,7,8,9,10]),p=e=>d&&f.has(e),h=hr(c,l),g=h/2,_=h/2,v=gr(c,l)/h,y=gr(c,l),b=(0,K.useMemo)(()=>{let e=new Map;return r.forEach((t,n)=>e.set(t,n)),e},[r]),x=ir.x*c,S=ir.y*l,C=x-g,w=S-g,T=(0,K.useMemo)(()=>_r(c,l,_),[c,l,_]);return(0,q.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-0 overflow-hidden`,children:[(0,q.jsx)(`div`,{className:`absolute rounded-[50%] bg-[var(--aux-black,#000)] opacity-20 blur-md`,style:{width:y*.62,height:16,left:x-y*.31,top:S+y*.4}}),t.map((t,r)=>{let d=r===n,f=!u&&i?.char===r,_=!u&&a?.char===r;if(f){let n=T[i.fromSlot],a=vr(n,x,S,c,l),s=fr(i.fromSlot),u=pr(i.fromSlot);return(0,q.jsx)(H.div,{className:`absolute left-0 top-0`,style:{width:h,height:h,zIndex:dr},initial:!1,animate:{x:[n.x-g,a.x-g,a.x-g,C,C,C],y:[n.y-g,a.y-g,a.y-g,w,w,w],scale:[s,s,s,v*.7,v*1.08,v],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,q.jsx)(m,{components:e,traits:t,size:h})},r)}if(_){if(p(a.toSlot))return null;let n=T[a.toSlot],i=vr(n,x,S,c,l),o=fr(a.toSlot),s=pr(a.toSlot);return(0,q.jsx)(H.div,{className:`absolute left-0 top-0`,style:{width:h,height:h,zIndex:mr(a.toSlot)},initial:!1,animate:{x:[C,C,i.x-g,i.x-g,n.x-g,n.x-g],y:[w,w,i.y-g,i.y-g,n.y-g,n.y-g],scale:[v,v*.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,q.jsx)(`div`,{style:{transform:`rotate(${or(a.toSlot)}deg)`},children:(0,q.jsx)(m,{components:e,traits:t,size:h,breathe:!1})})},r)}let y=b.get(r)??0;if(!d&&p(y))return null;let E=d?{x,y:S}:T[y];return(0,q.jsx)(H.div,{className:`absolute left-0 top-0 ${d?``:`pointer-events-auto cursor-pointer`}`,style:{width:h,height:h,zIndex:d?dr:mr(y)},initial:!1,animate:{x:E.x-g,y:E.y-g,scale:d?v:fr(y),opacity:d?1:pr(y)},transition:u?{duration:0}:{type:`spring`,stiffness:230,damping:26},onClick:d?void 0:()=>s(r),children:(0,q.jsx)(`div`,{style:{transform:d?void 0:`rotate(${or(b.get(r)??0)}deg)`},children:(0,q.jsx)(m,{components:e,traits:t,size:h,breathe:d})})},r)})]})}var br=[{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`}],J=T(w((e,t)=>({characters:[],selectedIndex:0,ensureGenerated:()=>{t().characters.length>0||e({characters:br,selectedIndex:0})},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 xr(){let[e,t]=(0,K.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,K.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Sr(){let e=W(),t=J.use.characters(),n=J.use.ensureGenerated(),r=U(),{w:i,h:a}=xr();(0,K.useEffect)(()=>{e&&n(e)},[e,n]);let o=hr(i,a),s=(0,K.useMemo)(()=>_r(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,q.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=ar[i%ar.length]??0,d=o*fr(i),f=pr(i),p=mr(i);return(0,q.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,q.jsx)(`div`,{style:{opacity:f,transform:`rotate(${u}deg)`},children:(0,q.jsx)(m,{components:e,traits:t,size:d,breathe:!1})})},n)})})}var Cr=c(`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)]`),wr=c(`min-w-0 flex-1 bg-transparent text-body-medium-lighter text-[var(--content-default)]`,`placeholder:text-[var(--content-tertiary)] outline-none`,dt);function Y(e){return e.trim().toLowerCase()}function Tr(e,t,n=[],r=8){let i=Y(t),a=new Set(n.map(Y)),o=[];for(let t of e)if(!a.has(Y(t))&&((i.length===0||Y(t).includes(i))&&o.push(t),o.length>=r))break;return o}function Er({id:e,options:t,highlighted:n,showAddHint:r,onPick:i,onHover:a}){return(0,q.jsxs)(`ul`,{id:e,role:`listbox`,className:c(`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,r)=>(0,q.jsx)(`li`,{id:`${e}-opt-${r}`,role:`option`,"aria-selected":r===n,onMouseDown:e=>{e.preventDefault(),i(t.value)},onMouseEnter:()=>a(r),className:c(`flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5`,`text-body-medium-lighter text-[var(--content-default)]`,r===n?`bg-[var(--surface-base)]`:`bg-transparent`),children:t.isAdd?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(_,{size:15,className:`shrink-0 text-[var(--content-tertiary)]`}),(0,q.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`Add “`,t.value,`”`]}),(0,q.jsx)(`span`,{className:`ml-auto shrink-0 text-body-small-default text-[var(--content-tertiary)]`,children:`↵ Enter`})]}):t.value},t.isAdd?`__add__${t.value}`:t.value)),r&&(0,q.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:`Type anything and press ↵ to add your own`})]})}function Dr({htmlFor:e,required:t,children:n}){return(0,q.jsxs)(`label`,{htmlFor:e,className:`text-body-small-default text-[var(--content-secondary)]`,children:[n,t?(0,q.jsx)(`span`,{"aria-hidden":!0,className:`text-[var(--system-negative-strong)]`,children:` *`}):null]})}function Or(e,t){(0,K.useEffect)(()=>{function n(n){e.current&&!e.current.contains(n.target)&&t()}return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t])}function kr({label:e,placeholder:t,values:n,onChange:r,suggestions:i}){let a=(0,K.useId)(),o=`tac-${a}`,s=`tac-list-${a}`,l=(0,K.useRef)(null),[u,d]=(0,K.useState)(``),[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(-1),g=(0,K.useMemo)(()=>Tr(i,u,n),[i,u,n]),_=u.trim(),v=(0,K.useMemo)(()=>{if(!_)return!1;let e=Y(_);return!(n.some(t=>Y(t)===e)||g.some(t=>Y(t)===e))},[_,n,g]),b=(0,K.useMemo)(()=>{let e=g.map(e=>({value:e,isAdd:!1}));return v?[...e,{value:_,isAdd:!0}]:e},[g,v,_]);Or(l,()=>p(!1)),(0,K.useEffect)(()=>{h(e=>e>=b.length?b.length-1:e)},[b.length]);let x=f&&b.length>0,S=!v;function C(e){let t=e.trim();t&&(n.some(e=>Y(e)===Y(t))||r([...n,t]),d(``),h(-1))}function w(e){r(n.filter(t=>t!==e))}function T(e){e.key===`ArrowDown`?(e.preventDefault(),p(!0),h(e=>Math.min(e+1,b.length-1))):e.key===`ArrowUp`?(e.preventDefault(),h(e=>Math.max(e-1,0))):e.key===`Enter`?x&&m>=0?(e.preventDefault(),C(b[m].value)):u.trim()&&(e.preventDefault(),C(u)):e.key===`,`?(e.preventDefault(),C(u)):e.key===`Backspace`&&u.length===0&&n.length>0?w(n[n.length-1]):e.key===`Escape`&&p(!1)}return(0,q.jsxs)(`div`,{ref:l,className:`relative flex flex-col gap-1.5`,children:[(0,q.jsx)(Dr,{htmlFor:o,children:e}),(0,q.jsxs)(`div`,{className:c(Cr,`min-h-9 flex-wrap py-1.5`),children:[(0,q.jsx)(tt,{size:16,"aria-hidden":!0,className:`shrink-0 self-center text-[var(--content-tertiary)]`}),n.map(e=>(0,q.jsx)(y,{onRemove:()=>w(e),removeLabel:`Remove ${e}`,className:`border border-[var(--border-base)] bg-[var(--surface-base)]`,children:e},e)),(0,q.jsx)(`input`,{id:o,role:`combobox`,"aria-expanded":x,"aria-controls":s,"aria-autocomplete":`list`,"aria-activedescendant":m>=0?`${s}-opt-${m}`:void 0,autoComplete:`off`,className:c(wr,`h-6 w-24`),placeholder:n.length===0?t:``,value:u,onChange:e=>{d(e.target.value),p(!0)},onFocus:()=>p(!0),onKeyDown:T})]}),x&&(0,q.jsx)(Er,{id:s,options:b,highlighted:m,showAddHint:S,onPick:C,onHover:h})]})}var Ar=`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 X(e,t){return{animation:`fadeInUp 0.4s ease-out ${e}s both`,...t==null?{}:{position:`relative`,zIndex:t}}}function jr({initialFirstName:e=``,initialLastName:t=``,onSubmit:n}){let[i,a]=(0,K.useState)(e),[o,s]=(0,K.useState)(t),[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)([]),f=i.trim().length>0&&c.trim().length>0;function p(){f&&n({firstName:i,lastName:o,role:c,hobbies:u})}return(0,q.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,children:(0,q.jsxs)(it,{showCreatureFooter:!1,children:[(0,q.jsx)(Sr,{}),(0,q.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(),p()},children:[(0,q.jsx)(`h1`,{className:`text-center font-serif text-[2.75rem] leading-[1.05] tracking-tight`,style:X(.05),children:`Let's start with you.`}),(0,q.jsx)(`p`,{className:`mt-3 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:X(.12),children:`A few details so I can get to know you.`}),(0,q.jsxs)(`div`,{className:`mt-10 flex w-full flex-col gap-5`,children:[(0,q.jsx)(`div`,{style:X(.2,40),children:(0,q.jsx)(b,{label:(0,q.jsxs)(q.Fragment,{children:[`What should I call you?`,(0,q.jsx)(`span`,{"aria-hidden":!0,className:`text-[var(--system-negative-strong)]`,children:` *`})]}),placeholder:`Your name`,value:i,onChange:e=>a(e.target.value),className:dt,autoFocus:!0,required:!0,fullWidth:!0})}),(0,q.jsx)(`div`,{style:X(.27,30),children:(0,q.jsx)(b,{label:`And your last name?`,placeholder:`Your last name (optional)`,value:o,onChange:e=>s(e.target.value),className:dt,fullWidth:!0})}),(0,q.jsx)(`div`,{style:X(.34,20),children:(0,q.jsx)(b,{label:`Your role`,placeholder:`What do you do for work?`,value:c,onChange:e=>l(e.target.value),className:dt,required:!0,fullWidth:!0})}),(0,q.jsx)(`div`,{style:X(.41,10),children:(0,q.jsx)(kr,{label:`Any hobbies?`,placeholder:`Cars, books, growing tomatoes?`,values:u,onChange:d,suggestions:Ar})})]}),(0,q.jsx)(`div`,{className:`mt-10 w-full`,style:X(.5),children:(0,q.jsx)(r,{type:`submit`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(G,{size:16}),fullWidth:!0,disabled:!f,className:`h-11 text-base`,children:`Continue`})})]})]})})}function Mr(){let e=W(),t=J.use.characters(),n=J.use.selectedIndex();return(0,K.useMemo)(()=>{let r=t[n],i=e?.colors.find(e=>e.id===r?.color)?.hex;return at(i??`var(--surface-base)`)},[e,t,n])}function Z({onBack:e,onNext:t,tone:n}){let r=Mr(),i=n?n===`dark`?`#1A1A1A`:`#FFFFFF`:r.fg,a=n?n===`dark`?`rgba(0,0,0,0.08)`:`rgba(255,255,255,0.12)`:r.wash;return(0,q.jsxs)(`div`,{className:`absolute left-4 top-6 z-10 flex items-center gap-3`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:e,"aria-label":`Back`,className:`flex cursor-pointer h-8 w-8 items-center justify-center rounded-md transition-colors duration-150`,style:{color:i},onMouseEnter:e=>e.currentTarget.style.backgroundColor=a,onMouseLeave:e=>e.currentTarget.style.backgroundColor=`transparent`,children:(0,q.jsx)(u,{className:`h-5 w-5`})}),t?(0,q.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Forward`,className:`flex cursor-pointer h-8 w-8 items-center justify-center rounded-md transition-colors duration-150`,style:{color:i},onMouseEnter:e=>e.currentTarget.style.backgroundColor=a,onMouseLeave:e=>e.currentTarget.style.backgroundColor=`transparent`,children:(0,q.jsx)(d,{className:`h-5 w-5`})}):null]})}var Nr=[`Ziggy`,`Quill`,`Luna`,`Remy`,`Cleo`,`Cade`];function Pr(e,t){let n=[];for(let r=0;r<e;r++)r!==t&&n.push(r);return{centerChar:t,edgeOrder:n}}function Fr({onContinue:e,onBack:t,onForward:n}){let i=W(),a=J.use.characters(),o=J.use.ensureGenerated(),s=J.use.selectedIndex(),c=J.use.setSelectedIndex();(0,K.useEffect)(()=>{i&&o(i)},[i,o]);let u=a.length,[d,f]=(0,K.useState)(null),[m,h]=(0,K.useState)(``),[_,v]=(0,K.useState)(!1),y=(0,K.useRef)(!1),b=(0,K.useRef)(null),{ref:x,size:S}=er(),[C,w]=(0,K.useState)(null);(0,K.useEffect)(()=>{u>0&&d===null&&f(Pr(u,s))},[u,s,d]),(0,K.useEffect)(()=>{d&&c(d.centerChar)},[d,c]);let T=d?.centerChar;(0,K.useEffect)(()=>{T!=null&&!y.current&&h(Nr[T%Nr.length])},[T]),(0,K.useEffect)(()=>{_&&(b.current?.focus(),b.current?.select())},[_]);function E(e){if(!d||e===d.centerChar)return;let t=d.edgeOrder.indexOf(e);if(t<0)return;let n=[...d.edgeOrder];n[t]=d.centerChar,w({entering:{char:e,fromSlot:t},exiting:{char:d.centerChar,toSlot:t}}),f({centerChar:e,edgeOrder:n})}let D=()=>d&&E((d.centerChar+1)%u),O=()=>d&&E((d.centerChar-1+u)%u),k=(0,K.useMemo)(()=>d?a[d.centerChar]:void 0,[d,a]),A=!!i&&!!d&&!!k;function j(){k&&e({traits:k,name:m.trim()})}function M(){y.current=!0,h(e=>{let t=Nr.filter(t=>t!==e),n=t.length>0?t:Nr;return n[Math.floor(Math.random()*n.length)]})}let N=`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,q.jsx)(`div`,{ref:x,"data-theme":`dark`,className:`relative h-full overflow-hidden bg-[var(--surface-base)] text-[var(--content-default)]`,children:(0,q.jsxs)(nr,{size:S,children:[A&&(0,q.jsx)(yr,{components:i,characters:a,centerChar:d.centerChar,edgeOrder:d.edgeOrder,entering:C?.entering??null,exiting:C?.exiting??null,onEnterComplete:e=>w(t=>t?.entering.char===e?null:t),onSelectChar:E}),(0,q.jsx)(Z,{tone:`light`,onBack:t,onNext:n?j:void 0}),(0,q.jsx)(`h1`,{className:`absolute left-1/2 top-[19%] z-10 -translate-x-1/2 whitespace-nowrap text-center text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`,animation:`fadeInUp 0.4s ease-out both`},children:`Give me a face and a name`}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`Previous character`,onClick:O,className:`absolute left-[calc(50%-170px)] top-[40%] -translate-y-1/2 ${N}`,children:(0,q.jsx)(l,{className:`h-4 w-4`})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`Next character`,onClick:D,className:`absolute right-[calc(50%-170px)] top-[40%] -translate-y-1/2 ${N}`,children:(0,q.jsx)(G,{className:`h-4 w-4`})}),(0,q.jsxs)(`div`,{className:`absolute left-1/2 top-[51%] z-10 flex -translate-x-1/2 flex-col items-center gap-12`,children:[_?(0,q.jsx)(`input`,{ref:b,value:m,onChange:e=>{y.current=!0,h(e.target.value)},onBlur:()=>v(!1),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),v(!1))},placeholder:`Name your assistant`,"aria-label":`Assistant name`,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,q.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>v(!0),"aria-label":`Edit name`,className:`flex cursor-pointer items-center gap-2.5`,children:[(0,q.jsx)(`span`,{className:`text-3xl font-medium ${m?`text-[var(--content-default)]`:`text-[var(--content-tertiary)]`}`,children:m||`Name your assistant`}),(0,q.jsx)(g,{className:`h-5 w-5 text-[var(--content-tertiary)]`})]}),(0,q.jsx)(`button`,{type:`button`,onClick:M,"aria-label":`Shuffle name`,title:`Shuffle name`,className:`cursor-pointer text-[var(--content-tertiary)] transition-[transform,color] duration-300 hover:rotate-180 hover:text-[var(--content-default)]`,children:(0,q.jsx)(p,{className:`h-5 w-5`})})]}),(0,q.jsx)(r,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(G,{size:16}),disabled:!A,onClick:j,className:`h-11 w-[234px] text-base`,children:`Continue`})]})]})})}var Ir=.25,Lr=.46,Rr=.3,zr=.85,Br=40,Vr=14,Hr=8;function Ur({entrance:e=!1,entranceDelay:t=0,bumpNonce:n=0,settleBlink:r=!0}){let i=W(),a=J.use.characters(),o=J.use.selectedIndex(),s=U(),{w:c,h:l}=rr(),[u,d]=(0,K.useState)({x:0,y:0});(0,K.useEffect)(()=>{if(s)return;let e=e=>{d({x:(e.clientX/window.innerWidth-.5)*2,y:(e.clientY/window.innerHeight-.5)*2})};return window.addEventListener(`mousemove`,e),()=>window.removeEventListener(`mousemove`,e)},[s]);let f=e&&!s,p=nn();(0,K.useEffect)(()=>{n>0&&!s&&p.start({y:[0,-34,8,0],transition:{duration:.45,ease:`easeOut`}})},[n,s,p]);let[m,h]=(0,K.useState)(!1),[g,_]=(0,K.useState)(!e);(0,K.useEffect)(()=>{if(s||!g)return;let e=!1,t,n=n=>{e||(h(!0),t=setTimeout(()=>{e||(h(!1),t=setTimeout(n,140))},140))},i=()=>{t=setTimeout(()=>n(i),2500+Math.random()*4e3)};return r?n(()=>n(i)):i(),()=>{e=!0,clearTimeout(t)}},[s,g,r]);let v=a.length>0?a[o]:void 0,y=(0,K.useMemo)(()=>{if(!i||!v)return null;let e=i.eyeStyles.find(e=>e.id===v.eyeStyle);return e?{paths:e.paths,bbox:Ze(e.paths.map(e=>Qe(e.svgPath)))}:null},[i,v]);if(!y)return null;let b=c*zr,x=Math.min(Math.min(c,l)*Rr,b*y.bbox.h/y.bbox.w),S=x*y.bbox.w/y.bbox.h,C=(c-S)/2,w=l-(1-Ir)*x,T=Br/100*l-(w+x/2),E=(Lr-Ir)*x,D=y.bbox.x+y.bbox.w/2,O=y.bbox.y+y.bbox.h/2;return(0,q.jsx)(H.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[2]`,style:{left:C,top:w,width:S,height:x,transformOrigin:`center`},initial:f?{y:T,scale:.35}:!1,animate:f?{y:[T,E,0],scale:[.35,1,1]}:{y:0,scale:1},transition:f?{duration:1,delay:t,times:[0,.7,1],ease:`easeInOut`}:{duration:0},onAnimationComplete:()=>_(!0),children:(0,q.jsx)(H.div,{animate:p,children:(0,q.jsx)(`div`,{style:{transform:`translate(${u.x*Vr}px, ${u.y*Hr}px)`,transition:`transform 0.5s cubic-bezier(0.22, 1, 0.36, 1)`},children:(0,q.jsx)(`svg`,{viewBox:`${y.bbox.x} ${y.bbox.y} ${y.bbox.w} ${y.bbox.h}`,width:S,height:x,style:{overflow:`visible`,display:`block`},children:(0,q.jsx)(`g`,{style:{transform:m?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${D}px ${O}px`,transition:`transform 0.14s ease-in-out`},children:y.paths.map((e,t)=>(0,q.jsx)(`path`,{d:e.svgPath,fill:e.color},t))})})})})})}var Wr=200,Gr=40;function Kr({firstName:e,assistantName:t,onContinue:n,onBack:i,onForward:a}){let o=W(),s=J.use.characters(),c=J.use.selectedIndex(),l=U(),{ref:u,size:{w:d,h:f}}=er(),p=Mr(),m=s.length>0?s[c]:void 0,h=(0,K.useMemo)(()=>{if(!o||!m)return null;let e=o.bodyShapes.find(e=>e.id===m.bodyShape),t=o.colors.find(e=>e.id===m.color);return!e||!t?null:{body:e,color:t.hex}},[o,m]),g=e.trim()?`Hey, ${e.trim()}!`:`Hey!`,_=t?.trim()?`I’m ${t.trim()}, your new AI assistant`:`I’m your new AI assistant`;if(!h)return(0,q.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,style:{backgroundColor:`var(--surface-base)`}});let v=1.25*Math.max(d,f),y=v*h.body.viewBox.height/h.body.viewBox.width,b=(d-v)/2,x=(f-y)/2,S=Wr/v,C=(Gr/100-.5)*f;return(0,q.jsx)(`div`,{ref:u,"data-theme":`dark`,className:`relative h-full overflow-hidden`,style:{backgroundColor:`var(--surface-base)`},children:(0,q.jsxs)(nr,{size:{w:d,h:f},children:[(0,q.jsx)(H.div,{className:`absolute inset-0 z-0`,style:{backgroundColor:h.color},initial:l?!1:{opacity:0},animate:{opacity:1},transition:l?{duration:0}:{duration:.6,delay:.35}}),(0,q.jsx)(H.svg,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,viewBox:`0 0 ${h.body.viewBox.width} ${h.body.viewBox.height}`,width:v,height:y,style:{left:b,top:x,transformOrigin:`center`},initial:l?!1:{scale:S,y:C},animate:{scale:1,y:0},transition:l?{duration:0}:{type:`spring`,stiffness:78,damping:18,mass:1},children:(0,q.jsx)(`path`,{d:h.body.svgPath,fill:h.color})}),(0,q.jsx)(Ur,{entrance:!0}),(0,q.jsx)(H.div,{initial:l?!1:{opacity:0},animate:{opacity:1},transition:l?{duration:0}:{duration:.4,delay:1},children:(0,q.jsx)(Z,{onBack:i,onNext:a})}),(0,q.jsxs)(`div`,{className:ut,children:[(0,q.jsxs)(H.h1,{className:`text-center leading-[1.05]`,style:{fontFamily:`var(--font-serif)`},initial:l?!1:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:l?{duration:0}:{type:`spring`,stiffness:260,damping:11,delay:1},children:[(0,q.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:p.fgDeep},children:g}),(0,q.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:p.fg},children:_})]}),(0,q.jsx)(H.div,{initial:l?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:l?{duration:0}:{duration:.4,delay:1.15},children:(0,q.jsx)(r,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(G,{size:16}),onClick:n,className:`h-11 w-[234px] text-base`,children:`Continue`})})]})]})})}var qr=.3,Jr=.85,Yr=.25;function Xr(){let e=W(),t=J.use.characters(),n=J.use.selectedIndex(),r=t.length>0?t[n]:void 0,{w:i,h:a}=rr(),o=(0,K.useMemo)(()=>{if(!e||!r)return null;let t=e.eyeStyles.find(e=>e.id===r.eyeStyle);return t?{paths:t.paths,bbox:Ze(t.paths.map(e=>Qe(e.svgPath)))}:null},[e,r]),s=o?Math.min(Math.min(i,a)*qr,i*Jr*o.bbox.h/o.bbox.w):0;return{art:o,eyesW:o?s*o.bbox.w/o.bbox.h:0,eyesH:s,restCy:a-Yr*s,centerX:i/2,w:i,h:a}}function Zr({art:e,eyesW:t,eyesH:n,centerX:r,eyeCy:i,eyeScale:a,eyeX:o,blinking:s,className:c=`pointer-events-none absolute top-0 z-0`}){let l=wt(i,e=>e-n/2),u=e.bbox.x+e.bbox.w/2,d=e.bbox.y+e.bbox.h/2;return(0,q.jsx)(H.div,{"aria-hidden":`true`,className:c,style:{left:r-t/2,top:0,x:o,y:l,width:t,height:n,scale:a,transformOrigin:`center`},children:(0,q.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,q.jsx)(`g`,{style:{transform:s?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${u}px ${d}px`,transition:`transform 0.13s ease-in-out`},children:e.paths.map((e,t)=>(0,q.jsx)(`path`,{d:e.svgPath,fill:e.color},t))})})})}var Qr={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 $r(e,t){let n=Qr[e];return n&&n.length>0?n:t.filter(t=>t!==e)}var ei=new Set([`orange`,`pink`,`red`]);function ti(e,t){return ei.has(e)&&ei.has(t)}function ni(e,t,n){let r=$r(e,t),i=[];for(let e of r){if(i.length>=n)break;i.some(t=>ti(t,e))||i.push(e)}for(let e of r){if(i.length>=n)break;i.includes(e)||i.push(e)}return i}var ri=`You’ve used AI that just answers questions`,ii=`The more I help`,ai=`I’m different`,oi=`The better I get`,si=`and the less you have to do`,ci=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],li=290;function ui({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,q.jsx)(H.div,{className:`relative w-full overflow-hidden`,initial:!1,animate:{height:o?t:e},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`},children:(0,q.jsxs)(H.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,q.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:e},children:(0,q.jsx)(H.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,q.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:t},children:(0,q.jsx)(`span`,{className:`block`,children:i})})]})})}function di({onContinue:e,onBack:t,onForward:n}){let i=Mr(),a=U(),{art:o,eyesW:s,eyesH:c,restCy:l,centerX:u,w:d,h:f}=Xr(),p=W(),h=J.use.characters(),g=J.use.selectedIndex(),_=h.length>0?h[g]:void 0,v=f>0&&f<=800,y=v?.17:.22,b=v?`top-[17%]`:`top-[22%]`,x=xt(0),S=xt(1),C=(0,K.useMemo)(()=>!p||!_?`orange`:ni(_.color,p.colors.map(e=>e.id),1)[0]??`orange`,[p,_]),w=Math.min(220,Math.max(150,d*.16)),T=-w,E=-w*.4,D=xt(-220),O=(0,K.useMemo)(()=>!p||!_?[]:ni(_.color,p.colors.map(e=>e.id),3),[p,_]),k=Math.max(.42,Math.min(d/1100,1)),A=Math.round(li*k),j=-A*1.1,M=-A*.42,N=xt(-320),[ee,te]=(0,K.useState)(!!a),[ne,re]=(0,K.useState)(!!a),[ie,P]=(0,K.useState)(!1),[ae,F]=(0,K.useState)(!1),[oe,se]=(0,K.useState)(!1),[ce,le]=(0,K.useState)(!1),[ue,de]=(0,K.useState)(!!a),I=Math.min(d,768)-48,fe=(0,K.useRef)(null),pe=(0,K.useRef)(null),me=(0,K.useRef)(null),L=(0,K.useRef)(null),he=(0,K.useRef)(null),[ge,_e]=(0,K.useState)(0),[ve,ye]=(0,K.useState)(0),[be,xe]=(0,K.useState)(0),[Se,Ce]=(0,K.useState)(0),[we,Te]=(0,K.useState)(0);return(0,K.useLayoutEffect)(()=>{fe.current?.offsetHeight&&_e(fe.current.offsetHeight),pe.current?.offsetHeight&&ye(pe.current.offsetHeight),me.current?.offsetHeight&&xe(me.current.offsetHeight),L.current?.offsetHeight&&Ce(L.current.offsetHeight),he.current?.offsetHeight&&Te(he.current.offsetHeight)},[I]),(0,K.useEffect)(()=>{x.set(l),le(!0)},[l,x]),(0,K.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{P(!0),F(!0),se(!0)},1400);return()=>clearTimeout(e)},[a]),(0,K.useEffect)(()=>{if(a||!o)return;x.set(l),S.set(1),D.set(T),N.set(j),te(!1),re(!1),P(!1),F(!1);let e=Math.max(c*.5,f*y-36),t=[],n=[],r=!1,i=e=>(t.push(e),e),s=e=>new Promise(t=>{n.push(setTimeout(t,e))});return(async()=>{if(await s(200),r||(te(!0),await Promise.all([i(tn(x,e,{duration:.55,ease:`easeOut`})),i(tn(S,.55,{duration:.55,ease:`easeOut`}))]),r)||(re(!0),await Promise.all([i(tn(x,l,{type:`spring`,stiffness:210,damping:15})),i(tn(S,1,{duration:.45,ease:`easeOut`}))]),r)||(await s(900),r)||(P(!0),F(!0),await i(tn(D,[T,E,E,T],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`})),r)||(await s(150),r))return;se(!0);let t=i(tn(N,[j,M,M,j],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`}));await s(700),!r&&(de(!0),await t)})(),()=>{r=!0,t.forEach(e=>e.stop()),n.forEach(clearTimeout)}},[a,o,f,y,c,l,x,S,D,T,E,N,j,M]),(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:i.fg},children:[(0,q.jsx)(Z,{onBack:t,onNext:n}),(0,q.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:I,fontFamily:`var(--font-serif)`},children:[(0,q.jsx)(`span`,{ref:fe,className:`block`,children:ri}),(0,q.jsx)(`span`,{ref:pe,className:`block`,children:ii}),(0,q.jsx)(`span`,{ref:me,className:`block`,children:ai}),(0,q.jsx)(`span`,{ref:L,className:`block`,children:oi}),(0,q.jsx)(`span`,{ref:he,className:`block`,children:si})]}),ce&&o&&(0,q.jsx)(Zr,{art:o,eyesW:s,eyesH:c,centerX:u,eyeCy:x,eyeScale:S,blinking:!1}),!a&&p&&(0,q.jsx)(H.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{left:Math.max(16,d*.05),top:0,y:D,width:w,height:w},children:(0,q.jsx)(m,{components:p,traits:{bodyShape:`blob`,eyeStyle:`goofy`,color:C},size:w,breathe:!1})}),!a&&p&&(0,q.jsx)(H.div,{"aria-hidden":`true`,className:`pointer-events-none absolute right-0 top-0 z-[1] flex items-start`,style:{right:-Math.round(A*.12),y:N},children:ci.map((e,t)=>(0,q.jsx)(`div`,{style:{width:A,height:A,marginLeft:t===0?0:-A*.34,zIndex:ci.length-t},children:(0,q.jsx)(m,{components:p,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:O[t]??`teal`},size:A,breathe:!1})},e.bodyShape))}),(0,q.jsxs)(`div`,{className:`${ut.replace(`top-[30%]`,b)} max-w-3xl`,children:[(0,q.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,q.jsx)(ui,{firstH:ge,secondH:ve,color:i.fgDeep,firstText:ri,secondText:ii,revealed:ee,carouseled:ie,revealFrom:`bottom`,revealDuration:.55,reduce:!!a}),(0,q.jsx)(ui,{firstH:be,secondH:Se,color:i.fg,firstText:ai,secondText:oi,revealed:ne,carouseled:ae,revealFrom:`top`,revealDuration:.45,reduce:!!a}),(0,q.jsx)(H.div,{className:`relative w-full overflow-hidden`,style:{color:i.fg},initial:!1,animate:{height:oe?we:0},transition:a?{duration:0}:{duration:.5,ease:`easeInOut`},children:we>0&&(0,q.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:we},children:(0,q.jsx)(H.span,{className:`block`,initial:!1,animate:{clipPath:oe?`inset(0% 0 0% 0)`:`inset(100% 0 0 0)`},transition:a?{duration:0}:{duration:.5,ease:`easeOut`},children:si})})})]}),ue&&(0,q.jsx)(H.div,{initial:a?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:a?{duration:0}:{duration:.4},children:(0,q.jsx)(r,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(G,{size:16}),onClick:e,className:`h-11 w-[234px] text-base`,children:`Continue`})})]})]})}function fi({idSuffix:e}){let t=`cf-${e}`,n=`cr-${e}`,r=`cg-${e}`,i=`cs-${e}`;return(0,q.jsxs)(`svg`,{viewBox:`0 0 100 100`,width:`100%`,height:`100%`,style:{display:`block`,position:`absolute`,inset:0},children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsxs)(`linearGradient`,{id:n,x1:`0.12`,y1:`0.05`,x2:`0.85`,y2:`0.95`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF0AE`}),(0,q.jsx)(`stop`,{offset:`50%`,stopColor:`#F4C231`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`#D29B1A`})]}),(0,q.jsxs)(`radialGradient`,{id:t,cx:`42%`,cy:`36%`,r:`82%`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF6CE`}),(0,q.jsx)(`stop`,{offset:`55%`,stopColor:`#F8CB3E`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`#EEB52C`})]}),(0,q.jsxs)(`radialGradient`,{id:r,cx:`36%`,cy:`24%`,r:`44%`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`#FFFFFF`,stopOpacity:`0.85`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]}),(0,q.jsxs)(`radialGradient`,{id:i,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`#FFFFFF`,stopOpacity:`1`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]})]}),(0,q.jsx)(`circle`,{cx:`50`,cy:`50`,r:`49`,fill:`url(#${n})`}),(0,q.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,q.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`url(#${t})`}),(0,q.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`none`,stroke:`#C28F18`,strokeOpacity:`0.35`,strokeWidth:`1.4`}),(0,q.jsxs)(`g`,{fontFamily:`var(--font-sans), system-ui, sans-serif`,fontWeight:900,fontSize:`58`,textAnchor:`middle`,children:[(0,q.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#C88E16`,transform:`translate(1.3 1.6)`,children:`$`}),(0,q.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#FFF6CF`,opacity:`0.7`,transform:`translate(-1.3 -1.5)`,children:`$`}),(0,q.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#F4C12A`,children:`$`})]}),(0,q.jsx)(`ellipse`,{cx:`38`,cy:`28`,rx:`22`,ry:`14`,fill:`url(#${r})`}),(0,q.jsx)(`ellipse`,{cx:`34`,cy:`24`,rx:`7`,ry:`4.5`,fill:`url(#${i})`})]})}function pi({size:e,tiltX:t=0,tiltY:n=0,shadow:r=!0,spinning:i=!1,className:a}){return(0,q.jsxs)(`div`,{style:{position:`relative`,width:e,height:e},children:[r&&(0,q.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,q.jsx)(`div`,{style:{width:e,height:e,perspective:e*10},children:(0,q.jsxs)(H.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,q.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(0.5px)`},children:(0,q.jsx)(fi,{idSuffix:`front`})}),(0,q.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(-0.5px) rotateY(180deg)`},children:(0,q.jsx)(fi,{idSuffix:`back`})})]})})]})}var mi=.3,hi=.95;function gi({onClaim:e,onBumpEyes:t,onBack:n,onForward:r}){let i=U(),a=Mr(),{h:o}=rr(),[s,c]=(0,K.useState)(!1);function l(){if(!s){if(c(!0),i){e();return}window.setTimeout(t,mi*1e3)}}let u=o*.42,d=-o*.08,f=o*.9;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,q.jsx)(Z,{onBack:n,onNext:r}),(0,q.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,q.jsx)(`h1`,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`Here are some free credits to get started`}),(0,q.jsx)(`div`,{className:`mt-8 flex flex-col items-center gap-4`,children:(0,q.jsx)(H.div,{animate:s&&!i?{y:[0,u,d,f],scale:[1,1,1,.2],opacity:[1,1,1,0]}:{},transition:{duration:hi,times:[0,mi/hi,.62,1],ease:[`easeIn`,`easeOut`,`easeIn`]},onAnimationComplete:()=>{s&&e()},children:(0,q.jsx)(pi,{size:88,spinning:s&&!i})})}),!s&&(0,q.jsxs)(`button`,{type:`button`,onClick:l,className:`mt-6 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:{backgroundColor:a.isLight?`#1A1A1A`:`#FFFFFF`,color:a.isLight?`#FFFFFF`:`#1A1A1A`},children:[`Claim`,(0,q.jsx)(G,{className:`h-4 w-4`})]})]})]})}Xe();var _i=640,vi=[{id:`companion-coworker`,left:`Companion`,right:`Coworker`,leftAvatar:{bodyShape:`blob`,eyeStyle:`gentle`,color:`pink`},rightAvatar:{bodyShape:`ninja`,eyeStyle:`curious`,color:`purple`}},{id:`genz-boomer`,left:`Gen Z`,right:`Baby Boomer`,leftAvatar:{bodyShape:`burst`,eyeStyle:`quirky`,color:`yellow`},rightAvatar:{bodyShape:`cloud`,eyeStyle:`dazed`,color:`green`}},{id:`execute-collaborate`,left:`Independent`,right:`Collaborative`,leftAvatar:{bodyShape:`star`,eyeStyle:`angry`,color:`orange`},rightAvatar:{bodyShape:`flower`,eyeStyle:`goofy`,color:`teal`}},{id:`playful-serious`,left:`Playful`,right:`Serious`,leftAvatar:{bodyShape:`star`,eyeStyle:`goofy`,color:`yellow`},rightAvatar:{bodyShape:`blob`,eyeStyle:`grumpy`,color:`purple`}},{id:`polite-unfiltered`,left:`Polite`,right:`Unfiltered`,leftAvatar:{bodyShape:`sprout`,eyeStyle:`bashful`,color:`green`},rightAvatar:{bodyShape:`urchin`,eyeStyle:`surprised`,color:`orange`}}],yi=[`9%`,`27%`,`45%`,`62%`,`79%`],Q=50,bi=.3*.75,xi=`rgba(36, 41, 46, 0.2)`,Si=`#FDFDFC`,Ci=.16;function wi(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 Ti(){let[e,t]=(0,K.useState)(()=>typeof window>`u`?1280:window.innerWidth);return(0,K.useEffect)(()=>{let e=()=>t(window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Ei({components:e,traits:t,side:n,top:r,size:i,progress:a}){let o=Math.max(0,Math.min(1,a)),s=100+Ci*100,c=n===`left`?-100+s*o:100-s*o;return(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute`,style:{[n]:`calc(50% - 50vw)`,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,q.jsx)(m,{components:e,traits:t,size:i,breathe:!1})})}function Di({axis:e,value:t,onValueChange:n,fg:r,disabled:i}){return(0,q.jsxs)(`div`,{className:`flex w-full shrink-0 flex-wrap items-center gap-x-5 gap-y-1.5 sm:flex-nowrap`,style:{opacity:i?.7:1},children:[(0,q.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:r},children:e.left}),(0,q.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:r},children:e.right}),(0,q.jsxs)(C,{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:[t],onValueChange:e=>n(e[0]??Q),disabled:i,min:0,max:100,step:1,"aria-label":`${e.left} to ${e.right}`,children:[(0,q.jsx)(x,{className:`relative h-2 w-full grow rounded-full sm:h-3`,style:{backgroundColor:xi}}),(0,q.jsx)(S,{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:Si}})]})]})}function Oi({components:e,values:t,sideAvatars:n,size:r}){return(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 -z-10`,children:vi.map((i,a)=>{let o=t[i.id]??Q,s=Math.max(0,(Q-o)/Q),c=Math.max(0,(o-Q)/Q),l=yi[a]??`50%`,u=n[a];return u?(0,q.jsxs)(`div`,{children:[(0,q.jsx)(Ei,{components:e,traits:u.left,side:`left`,top:l,size:r,progress:s}),(0,q.jsx)(Ei,{components:e,traits:u.right,side:`right`,top:l,size:r,progress:c})]},i.id):null})})}function ki({values:e,onValueChange:t,locked:n,onContinue:r,onBack:i,onForward:a}){let o=Mr(),s=W(),c=Ti(),{w:l,h:u}=rr(),d=Math.round(bi*Math.min(l,u))+12,f=c>=_i,p=J.use.characters()[J.use.selectedIndex()]?.color,m=Math.round(Math.min(300,Math.max(160,c*.16))),h=(0,K.useMemo)(()=>{let e=s?.colors.map(e=>e.id)??[],t=wi(vi.map(e=>e.leftAvatar.color),p,e),n=wi(vi.map(e=>e.rightAvatar.color),p,e);return vi.map((e,r)=>({left:{...e.leftAvatar,color:t[r]??e.leftAvatar.color},right:{...e.rightAvatar,color:n[r]??e.rightAvatar.color}}))},[s,p]);return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:o.fg},children:[(0,q.jsx)(Z,{onBack:i,onNext:a}),f&&s&&(0,q.jsx)(Oi,{components:s,values:e,sideAvatars:h,size:m}),(0,q.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:d},children:[(0,q.jsx)(`div`,{className:`w-full min-h-14 shrink-[4]`,style:{flexBasis:Math.round(u*.14)}}),(0,q.jsxs)(`div`,{className:`flex shrink-0 flex-col items-center gap-2`,children:[(0,q.jsx)(`h1`,{className:`text-center text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`Create my personality`}),n?(0,q.jsx)(`p`,{className:`text-center text-[15px]`,style:{color:o.fgMuted},children:`Personality locked — chat with your assistant to make any more updates`}):(0,q.jsx)(`p`,{className:`hidden max-w-md text-center text-[15px] sm:block`,style:{color:o.fgMuted},children:`How do you want me to talk to you? You can always ask me to change my personality later.`})]}),(0,q.jsx)(`div`,{className:`w-full min-h-3 shrink-[2] basis-10`}),vi.map((r,i)=>(0,q.jsxs)(K.Fragment,{children:[i>0&&(0,q.jsx)(`div`,{className:`w-full min-h-2.5 shrink basis-8 sm:basis-11`}),(0,q.jsx)(Di,{axis:r,value:e[r.id]??Q,onValueChange:e=>t(r.id,e),fg:o.fg,disabled:n})]},r.id)),(0,q.jsx)(`div`,{className:`w-full min-h-3 shrink-[2] basis-14`}),(0,q.jsxs)(`button`,{type:`button`,onClick:r,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:o.isLight?`#1A1A1A`:`#FFFFFF`,color:o.isLight?`#FFFFFF`:`#1A1A1A`},children:[`Continue`,(0,q.jsx)(G,{className:`h-4 w-4`})]})]})]})}function Ai({assistantId:e,assistantReady:t,onConnected:n,onSkip:r,onBack:i,onForward:a,missingCalendarScope:o=!1,onRetry:s,hatchError:c=null}){let l=Mr(),{handleConnect:u,oauthInProgress:d}=$e({assistantId:e??``,onConnect:n}),f=()=>{s?.(),u()},p=!e||!t,m=p||d;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:l.fg},children:[(0,q.jsx)(Z,{onBack:i,onNext:a}),(0,q.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,q.jsx)(`h1`,{className:`text-[2.6rem] leading-tight`,style:{fontFamily:`var(--font-serif)`},children:p?`Waking up`:o?`Access not enabled`:`Let me make this easy`}),(0,q.jsx)(`p`,{className:`text-[16px]`,style:{color:l.fgMuted},children:p?`Your assistant is getting ready`:o?`Check the box next to the Google Calendar permission so I can book the check-in.`:`Connect your Google Calendar so I can find time to check in and start helping.`}),(0,q.jsxs)(`div`,{className:`mt-6 flex w-[234px] flex-col items-center gap-4`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:f,disabled:m,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:l.isLight?`#1A1A1A`:`#FFFFFF`,color:l.isLight?`#FFFFFF`:`#1A1A1A`},children:p?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(h,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Starting assistant…`]}):d?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(h,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Waiting for authorization…`]}):o?`Try again`:`Connect Calendar →`}),(!p||c)&&(0,q.jsx)(`button`,{type:`button`,onClick:r,disabled:d,className:`cursor-pointer text-body-small-default transition-opacity hover:opacity-100 disabled:opacity-60`,style:{color:l.fgMuted},children:`Skip for now`})]})]})]})}var ji=at(`#17191C`);function Mi(){let[e,t]=(0,K.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,K.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Ni(){let e=W(),t=J.use.characters(),n=J.use.selectedIndex();return{components:e,chosen:t.length>0?t[n]:void 0}}function Pi({size:e=64,isAssistantBusy:t=!1}){let{components:n,chosen:r}=Ni();return!n||!r?(0,q.jsx)(`div`,{style:{width:e,height:e}}):(0,q.jsx)(`div`,{className:`shrink-0`,style:{width:e,height:e},children:(0,q.jsx)(m,{components:n,traits:r,size:e,isAssistantBusy:t})})}var Fi=64,Ii=4500,Li=7e3;function Ri({onDone:e,onBack:t,onForward:n,scheduledTime:r,awaitingTime:i}){let{components:a,chosen:o}=Ni(),s=U(),{w:c,h:l}=Mi(),u=r?`Check-in scheduled for tomorrow at ${r}!`:`Check-in scheduled!`;(0,K.useEffect)(()=>{let t=setTimeout(e,i&&!r?Li:Ii);return()=>clearTimeout(t)},[e,i,r]);let d=(0,K.useRef)(null),[f,p]=(0,K.useState)(null);(0,K.useLayoutEffect)(()=>{let e=()=>{let e=d.current?.getBoundingClientRect();e&&p({cx:e.left+e.width/2,cy:e.top+e.height/2})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u]);let h=1.3*Math.max(c,l)/Fi,g=f?c/2-f.cx:0,_=f?l*.88-f.cy:0,v=l*.05;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden text-white`,children:[(0,q.jsx)(Z,{onBack:t,onNext:n,tone:`light`}),(0,q.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,q.jsx)(`div`,{ref:d,className:`relative shrink-0`,style:{width:Fi,height:Fi},children:a&&o&&f&&(0,q.jsx)(H.div,{className:`absolute inset-0`,style:{transformOrigin:`center`},initial:s?!1:{scale:h,x:g,y:_},animate:{x:[g,g,0,0],y:[_,_+v,0,0],scale:[h,h,1.07,1]},transition:s?{duration:0}:{duration:1.1,times:[0,.18,.82,1],ease:[`easeOut`,`easeIn`,`easeOut`]},children:(0,q.jsx)(m,{components:a,traits:o,size:Fi})})}),(0,q.jsx)(H.span,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:s?!1:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:s?{duration:0}:{duration:.4,delay:.9},children:u})]})]})}var zi=[`Searching the web to get to know you…`,`Reading public profiles…`,`Skimming the highlights…`,`Connecting the dots…`,`Piecing it together…`],Bi=[`Updating my personality…`,`Finding my voice…`,`Getting into character…`],Vi=`Almost there…`,Hi=[...zi,Vi],Ui=[...Bi,Vi],Wi=2800;function Gi({onDone:e,onBack:t,onAdvance:n,onForward:r,ready:i}){let a=ji,[o,s]=(0,K.useState)(0);return(0,K.useEffect)(()=>{n?.(o);let t=o>=Hi.length-1;if(i&&t){let t=setTimeout(e,Wi);return()=>clearTimeout(t)}let r=setTimeout(()=>s(e=>(e+1)%Hi.length),Wi);return()=>clearTimeout(r)},[o,i,e,n]),(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,q.jsx)(Z,{onBack:t,onNext:r}),(0,q.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,q.jsx)(Pi,{isAssistantBusy:!0}),(0,q.jsx)(Ye,{mode:`wait`,children:(0,q.jsx)(H.p,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},transition:{duration:.35},children:Hi[o]},o)})]})]})}function Ki({onDone:e,ready:t}){let n=ji,[r,i]=(0,K.useState)(0);return(0,K.useEffect)(()=>{let n=Ui.length-1;if(t){if(r!==n){i(n);return}let t=setTimeout(e,Wi);return()=>clearTimeout(t)}let a=setTimeout(()=>i(e=>(e+1)%Ui.length),Wi);return()=>clearTimeout(a)},[r,t,e]),(0,q.jsx)(`div`,{className:`absolute inset-0 z-10`,style:{color:n.fg},children:(0,q.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,q.jsx)(Pi,{isAssistantBusy:!0}),(0,q.jsx)(Ye,{mode:`wait`,children:(0,q.jsx)(H.p,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},transition:{duration:.35},children:Ui[r]},r)})]})})}function qi({claims:e,loading:t,onContinue:n,onRejectAll:r,onBack:i,onForward:a}){let o=ji,s=U(),[c,l]=(0,K.useState)(()=>new Set),u=e.filter(e=>!c.has(e.claim)),d=u.length>0,f=!t;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:o.fg},children:[(0,q.jsx)(Z,{onBack:i,onNext:a}),(0,q.jsxs)(`div`,{className:`absolute bottom-0 left-1/2 top-[14%] sm:top-[26%] z-10 flex w-full max-w-xl -translate-x-1/2 flex-col px-6 pb-8`,children:[(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-y-auto`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)(Pi,{}),(0,q.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`This is what I found about you`})]}),(0,q.jsx)(`p`,{className:`mb-7 mt-2 text-[15px]`,style:{color:o.fgMuted},children:d?t?`Still checking the rest. You can review these as they come in.`:`I searched the web. Feel free to remove anything that isn’t true`:t?`Still putting this together…`:`I didn’t turn up much — we can fill it in as we chat.`}),(0,q.jsx)(`div`,{className:`flex flex-col gap-3`,children:(0,q.jsx)(Ye,{children:u.map(e=>(0,q.jsxs)(H.div,{layout:!0,initial:s?!1:{opacity:0,y:10},animate:{opacity:1,y:0},exit:s?void 0:{opacity:0,scale:.95},className:`flex items-center justify-between gap-3 rounded-2xl px-5 py-4 text-[15px]`,style:{backgroundColor:o.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:[(0,q.jsx)(`span`,{children:e.claim}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`Remove "${e.claim}"`,onClick:()=>l(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:o.fgMuted},children:(0,q.jsx)(v,{className:`h-4 w-4`})})]},e.claim))})}),d&&f&&(0,q.jsx)(`button`,{type:`button`,onClick:r,className:`mt-5 self-start shrink-0 cursor-pointer text-[14px] underline underline-offset-2 transition-opacity hover:opacity-80`,style:{color:o.fgMuted},children:`This is not me`})]}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>n([...c]),disabled:!f,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:o.isLight?`#1A1A1A`:`#FFFFFF`,color:o.isLight?`#FFFFFF`:`#1A1A1A`},children:[f?`Continue`:`Still searching…`,f&&(0,q.jsx)(G,{className:`h-4 w-4`})]})]})]})}var $=64,Ji=$;function Yi({head:e,note:t,flyToNote:n,reduce:r,onLanded:i}){let{components:a,chosen:o}=Ni();if(!a||!o)return null;let s=$/2,c=n&&t?t:e,l={x:c.x-s,y:c.y-s};return(0,q.jsx)(H.div,{className:`pointer-events-none absolute left-0 top-0`,style:{width:$,height:$,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,q.jsx)(m,{components:a,traits:o,size:$})})}function Xi({installedPlugins:e=[],pluginCatalog:t={},onStart:n,onBack:r,onForward:i}){let a=ji,o=U(),[s,c]=(0,K.useState)(!1),l=e.map(e=>({name:e,displayName:st(e),description:t[e]?.trim()??``})).filter(e=>e.displayName.length>0),u=l.length>0,d=(0,K.useRef)(null),f=(0,K.useRef)(null),p=(0,K.useRef)(null),[m,h]=(0,K.useState)(null),[g,_]=(0,K.useState)(!1),[v,y]=(0,K.useState)(!1);(0,K.useLayoutEffect)(()=>{let e=()=>{let e=d.current,t=f.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=e=>({x:e.left-n.left+e.width/2,y:e.top-n.top+e.height/2}),i=p.current;h({head:r(t.getBoundingClientRect()),note:i?r(i.getBoundingClientRect()):void 0})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[l.length]);let b=m?.note?.y;return(0,K.useEffect)(()=>{b===void 0||g||_(!0)},[b,g]),(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,q.jsx)(Z,{onBack:r,onNext:i}),(0,q.jsxs)(`div`,{ref:d,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,q.jsxs)(`div`,{className:`flex items-center`,children:[(0,q.jsx)(H.div,{ref:f,className:`shrink-0`,style:{height:$},initial:!1,animate:g?{width:0,marginRight:0}:{width:$,marginRight:12},transition:o?{duration:0}:{duration:.5,ease:`easeInOut`}}),(0,q.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`You’re all set`})]}),u&&(0,q.jsx)(`div`,{className:`mt-4 flex flex-col gap-3`,children:l.map((e,t)=>(0,q.jsxs)(H.div,{initial:o?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:o?{duration:0}:{duration:.3,delay:t*.06},className:`rounded-2xl px-5 py-4`,style:{backgroundColor:a.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:[(0,q.jsx)(`div`,{className:`text-[15px] font-medium`,children:e.displayName}),e.description&&(0,q.jsx)(`div`,{className:`mt-1 text-[13px] leading-snug`,style:{color:a.fgMuted},children:e.description})]},e.name))}),(0,q.jsxs)(`div`,{className:`mt-16 flex items-center gap-3`,children:[(0,q.jsx)(`div`,{ref:p,className:`shrink-0`,style:{width:Ji}}),(0,q.jsx)(H.p,{className:`text-[15px]`,style:{color:a.fg},initial:!1,animate:{opacity:+!!v,x:v?0:-6},transition:o?{duration:0}:{duration:.35},children:`I’ve set myself up with plugins around who you are.`})]}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>{s||(c(!0),Promise.resolve().then(n).catch(()=>c(!1)))},disabled:s,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:a.isLight?`#1A1A1A`:`#FFFFFF`,color:a.isLight?`#FFFFFF`:`#1A1A1A`},children:[s?`Starting…`:`Let's chat`,!s&&(0,q.jsx)(G,{className:`h-4 w-4`})]}),m&&(0,q.jsx)(Yi,{head:m.head,note:m.note,flyToNote:g&&m.note!==void 0,reduce:o,onLanded:()=>y(!0)})]})]})}var Zi=[{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})}],Qi=`#17191C`,$i=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],ea=290;function ta({peekLevel:e=0,eyesBumpNonce:t=0,darkBg:n=!1,showBottomEyes:r=!0,showTopTeam:i=!1}){let a=W(),o=J.use.characters(),s=J.use.selectedIndex(),c=U(),{w:l}=rr(),u=Math.max(.42,Math.min(l/1100,1)),d=l<640,f=o.length>0?o[s]:void 0,{bg:p,peekColors:h}=(0,K.useMemo)(()=>!a||!f?{bg:`var(--surface-base)`,peekColors:[]}:{bg:a.colors.find(e=>e.id===f.color)?.hex??`var(--surface-base)`,peekColors:ni(f.color,a.colors.map(e=>e.id),3)},[a,f]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(H.div,{className:`absolute inset-0 z-0`,initial:!1,animate:{backgroundColor:n?Qi:p},transition:c?{duration:0}:{duration:1,ease:`easeInOut`}}),r&&(0,q.jsx)(Ur,{bumpNonce:t,settleBlink:!1}),i&&a&&(0,q.jsx)(`div`,{className:`pointer-events-none absolute right-0 z-[1] flex items-start`,style:{top:-Math.round(ea*u)*.42,right:-Math.round(ea*u)*.12},children:$i.map((e,t)=>{let n=Math.round(ea*u);return(0,q.jsx)(H.div,{style:{width:n,height:n,marginLeft:t===0?0:-n*.34,zIndex:$i.length-t},initial:c?!1:{y:-140,opacity:0},animate:{y:0,opacity:1},transition:c?{duration:0}:{type:`spring`,stiffness:200,damping:18,delay:t*.1},children:(0,q.jsx)(m,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:h[t]??`teal`},size:n,breathe:!1})},e.bodyShape)})}),a&&(0,q.jsx)(Ye,{children:(d?Zi.filter(e=>e.mobile):Zi).slice(0,Math.max(0,e)).map((e,t)=>{let n=Math.round(e.base*u),r=d&&e.mobilePos?e.mobilePos(n):e.pos(n);return(0,q.jsx)(H.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{...r,width:n,height:n},initial:c?!1:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:c?void 0:{scale:0,opacity:0},transition:c?{duration:0}:{type:`spring`,stiffness:220,damping:16,delay:.1},children:(0,q.jsx)(m,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:h[e.colorIdx]??`teal`},size:n,breathe:!1})},`peek-${t}`)})})]})}var na={established:!1,assistantName:null};async function ra(e,n={hasAnyActiveConversation:L,fetchAssistantIdentity:f}){try{if(!await n.hasAnyActiveConversation(e))return na}catch(e){return t(e,{context:`research_onboarding_established_check`}),na}let r=await n.fetchAssistantIdentity(e).catch(()=>null);return{established:!0,assistantName:(typeof r?.name==`string`?r.name.trim():``)||null}}function ia({assistantName:e,onKeep:t,onRedo:n,onBack:i}){let a=e?.trim()||``,o=a||`your assistant`,s=a?`${a}'s`:`its`;return(0,q.jsxs)(`div`,{"data-theme":`dark`,className:`relative h-full overflow-hidden`,style:{backgroundColor:`var(--surface-base)`,color:`var(--content-primary)`},children:[(0,q.jsx)(Z,{onBack:i,tone:`light`}),(0,q.jsxs)(`div`,{className:`${ut} max-w-xl`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,q.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:a?`${a} is already up and running`:`Your assistant is already up and running`}),(0,q.jsxs)(`p`,{className:`text-[15px]`,style:{color:`var(--content-secondary)`},children:[`You two have history — a personality, memories, and past conversations. Running setup again would overwrite who `,o,` is now.`]})]}),(0,q.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[(0,q.jsxs)(r,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:t,className:`h-11 text-base`,children:[`Keep `,o,` and start chatting`,(0,q.jsx)(G,{className:`h-4 w-4`})]}),(0,q.jsxs)(r,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:n,className:`h-11 text-base`,children:[`Start over and rebuild `,s,` personality`]})]})]})]})}var aa=4e3;function oa(e){return{firstName:e.firstName,lastName:e.lastName,occupation:e.role,hobby:e.hobbies.join(`, `),timezone:me()}}function sa(e){let t=e.firstName.trim();return t?`Getting to know ${t}`:`Getting to know you`}Xe();function ca(){let e=i(),t=oe.use.user(),n=t?.id??null,r=lt.use.enterFocus(),o=lt.use.exitFocus(),s=lt.use.setPendingAvatarTraits(),c=lt.use.requestSidebarCollapse(),[l,u]=(0,K.useState)(`form`),{ref:d,size:f}=er(),[p,m]=(0,K.useState)([]),[h,g]=(0,K.useState)(!1);function _(e){u(e)}function v(e,t=`completed`){rt(et[l],{userId:n,outcome:t}),m([]),_(e)}function y(e){m(e=>[...e,l]),_(e)}function b(){let e=p[p.length-1];e&&(m(e=>e.slice(0,-1)),_(e))}let x=p.length>0?b:void 0,[S,C]=(0,K.useState)(null),w=(0,K.useRef)(null),[T,E]=(0,K.useState)(null),[O,A]=(0,K.useState)(null),j=(0,K.useRef)(!1),[M,N]=(0,K.useState)(null),[ee,te]=(0,K.useState)({}),[ne,re]=(0,K.useState)(!1),[P,ae]=(0,K.useState)(null),[F,se]=(0,K.useState)(null),[ce,le]=(0,K.useState)(!1),[ue,I]=(0,K.useState)(!1),[me,L]=(0,K.useState)(!1),[ye,be]=(0,K.useState)(0),[xe,Se]=(0,K.useState)(0),[Ce]=a(),we=sn({hostingParam:Ce.get(`hosting`),localMode:k(),gatewayAuthSession:D()}),Te=Ce.get(`assistant`)??void 0,Ee=we,{start:De,ready:Oe,assistantId:R,error:ke,awaitReady:z}=pn({adoptExisting:we,adoptAssistantId:Te}),B=Rn(),{start:Ae,hydrate:V}=B,je=(0,K.useRef)(Promise.resolve()),Me=(0,K.useRef)(Promise.resolve()),[Ne,Pe]=(0,K.useState)(!1),Fe=B.status===`idle`||B.status===`running`,Ie=!Fe&&B.claims.length===0;(0,K.useEffect)(()=>{o(),s(null),De()},[o,s,De]),(0,K.useEffect)(()=>{if(w.current)return;let e=z().then(e=>ra(e)).catch(()=>na);w.current=e,e.then(E)},[z]),(0,K.useLayoutEffect)(()=>{if(h||!n)return;let e=ge(n);if(e?.formValues){C(e.formValues),N(e.faceValues),se(e.checkinTime),I(e.checkinBooked),ae(e.researchConversationId??null),e.research&&V({...e.research,pluginCatalog:e.research.pluginCatalog??{}},z);let t=_e(e);u(Ee&&(t===`letschat`||t===`meeting`)?`looking`:t),m([])}g(!0)},[h,n,V,z,Ee]),(0,K.useEffect)(()=>{!h||!S||he(n,{step:l,formValues:S,faceValues:M,checkinTime:F,checkinBooked:ue,research:B.status===`done`?{status:`done`,claims:B.claims,suggestions:B.suggestions,installedPlugins:B.installedPlugins,pluginCatalog:B.pluginCatalog}:null,...P?{researchConversationId:P}:{}})},[h,n,l,S,M,F,ue,P,B.status,B.claims,B.suggestions,B.installedPlugins,B.pluginCatalog]),(0,K.useEffect)(()=>{h&&(!S||B.status!==`idle`||Ae({awaitAssistantId:z,subject:oa(S),conversationTitle:sa(S),...P?{resumeConversationId:P}:{},onConversationCreated:ae,includeSuggestions:!1}))},[h,S,P,B.status,Ae,z,!0]),(0,K.useEffect)(()=>{l===`results`&&Ie&&(m([]),u(`suggestions`))},[l,Ie]);function Le(t,i,a,{skip:o=!1,hidden:l=!1}={}){ve(n);let{firstName:u,lastName:d,role:f,hobbies:p}=t,m=[u.trim(),d.trim()].filter(Boolean).join(` `),h=u.trim(),g=!o&&a===void 0;pe({tools:[],tasks:[],tone:ft,...m?{userName:m}:{},...f.trim()?{occupation:f.trim()}:{},...o?{}:{initialMessage:a??on({firstName:u,lastName:d,occupation:f,hobby:p.join(`, `)}),...l?{initialMessageHidden:!0}:{}},...g?{title:h?`Getting to know ${h}`:`Getting to know you`}:{},...i?.name?.trim()?{assistantName:i.name.trim()}:{}});let _=i?.name?.trim();_&&fe(_),s(i?.traits??null),g&&r(),o||ie.markExpectingFirstMessage(),c(),ie.checkAssistant(R??void 0).finally(()=>{e(`${de.assistant}?onboarding=1`,{replace:!0})})}async function Re(){S&&(await Promise.all([B.awaitPluginInstalls(),je.current,Me.current]),Le(S,M,Xn(M?.name),{hidden:!0}))}function ze(e){B.start({awaitAssistantId:z,subject:oa(e),conversationTitle:sa(e),onConversationCreated:ae,includeSuggestions:!1})}async function Be(e){if(!j.current&&(T??await Promise.race([w.current??Promise.resolve(null),new Promise(e=>{setTimeout(()=>e(null),aa)})]))?.established){A(e),v(`existing`);return}C(e),ze(e),v(`face`)}function Ve(e){if(e.length>0&&!e.includes(`https://www.googleapis.com/auth/calendar.events`)){L(!0);return}if(L(!1),R&&S){let e=[S.firstName.trim(),S.lastName.trim()].filter(Boolean).join(` `);se(null),I(!1),le(!0),ot({assistantId:R,userName:e||void 0,assistantName:M?.name?.trim()||void 0}).then(e=>{e.scheduled&&(I(!0),se(Zn(e.start,e.timeZone)))}).finally(()=>le(!1))}v(`meeting`)}if([`different`,`personality`,`integration`,`letschat`,`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(l)&&S){let e=[`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(l);return(0,q.jsx)(`div`,{ref:d,"data-theme":`dark`,className:`relative h-full overflow-hidden`,children:(0,q.jsxs)(nr,{size:f,children:[(0,q.jsx)(ta,{eyesBumpNonce:ye,peekLevel:[`looking`,`results`,`suggestions`,`finishing`].includes(l)?xe:0,darkBg:e,showBottomEyes:!e&&l!==`different`}),l===`different`&&(0,q.jsx)(di,{onContinue:()=>v(`personality`),onBack:()=>y(`intro`),onForward:x}),l===`personality`&&(0,q.jsx)(ki,{values:ee,onValueChange:(e,t)=>te(n=>({...n,[e]:t})),locked:ne,onContinue:()=>{ne||(Pe(!0),Me.current=Yn({awaitAssistantId:z,values:ee,userName:S?.firstName?.trim()||void 0,assistantName:M?.name?.trim()||void 0}).finally(()=>Pe(!1)),re(!0)),v(`integration`)},onBack:()=>y(`different`),onForward:x}),l===`integration`&&(0,q.jsx)(gi,{onClaim:()=>v(Ee?`looking`:`letschat`),onBumpEyes:()=>be(e=>e+1),onBack:()=>y(`personality`),onForward:x}),l===`letschat`&&(0,q.jsx)(Ai,{assistantId:R,assistantReady:Oe,hatchError:ke,onConnected:Ve,missingCalendarScope:me,onRetry:()=>L(!1),onSkip:()=>{L(!1),v(`looking`,`skipped`)},onBack:()=>y(`integration`),onForward:x}),l===`meeting`&&(0,q.jsx)(Ri,{scheduledTime:F??void 0,awaitingTime:ce,onDone:()=>v(`looking`),onBack:()=>y(`letschat`),onForward:x}),l===`looking`&&(0,q.jsx)(Gi,{onDone:()=>v(Ie?`suggestions`:`results`),onBack:()=>y(Ee?`integration`:`letschat`),onAdvance:e=>Se(Math.min(e+1,4)),onForward:x,ready:!Fe}),l===`results`&&(0,q.jsx)(qi,{claims:B.claims,loading:Fe,onContinue:e=>{P&&R&&e.length>0&&(je.current=Bn({assistantId:R,conversationId:P,removedClaims:e,rejectedAll:!1})),v(`suggestions`)},onRejectAll:()=>{P&&R&&(je.current=Bn({assistantId:R,conversationId:P,removedClaims:B.claims.map(e=>e.claim),rejectedAll:!0})),v(`suggestions`,`skipped`)},onBack:()=>y(`looking`),onForward:x}),l===`suggestions`&&(0,q.jsx)(Xi,{installedPlugins:B.installedPlugins,pluginCatalog:B.pluginCatalog,onStart:async()=>{if(rt(et.suggestions,{userId:n,outcome:`completed`}),Ne){m([]),u(`finishing`);return}await Re()},onBack:()=>y(Ie?`looking`:`results`),onForward:x}),l===`suggestions`&&!1,l===`finishing`&&(0,q.jsx)(Ki,{ready:!Ne,onDone:()=>void Re()})]})})}return l===`existing`?(0,q.jsx)(ia,{assistantName:T?.assistantName??null,onKeep:()=>{rt(et.existing,{userId:n,outcome:`completed`}),ve(n),ie.checkAssistant(R??void 0).finally(()=>{e(de.assistant,{replace:!0})})},onRedo:()=>{let e=O;e&&(j.current=!0,rt(et.existing,{userId:n,outcome:`skipped`}),C(e),ze(e),m([]),_(`face`))},onBack:()=>{A(null),y(`form`)}}):l===`intro`&&S?(0,q.jsx)(Kr,{firstName:S.firstName,assistantName:M?.name,onContinue:()=>v(`different`),onBack:()=>y(`face`),onForward:x}):l===`face`&&S?(0,q.jsx)(Fr,{onContinue:e=>{N(e),v(`intro`)},onBack:()=>y(`form`),onForward:x}):(0,q.jsx)(jr,{initialFirstName:t?.firstName??``,initialLastName:t?.lastName??``,onSubmit:Be})}export{ca as ResearchOnboardingRoute};
|
|
63
|
+
Keep it short! For this opening greeting only, don't use \`recall\` or read any files — just say hello. (This applies to the greeting alone; use your tools normally for everything the user asks afterward.)`}function Zn(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 q=s(),Qn={w:1280,h:800};function $n(){return typeof window>`u`?Qn:{w:window.innerWidth,h:window.innerHeight}}function er(){let[e,t]=(0,K.useState)(null),[n,r]=(0,K.useState)(()=>$n());return(0,K.useLayoutEffect)(()=>{if(!e)return;let t=()=>{let t=e.getBoundingClientRect();r({w:t.width,h:t.height})};t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[e]),{ref:t,size:n}}var tr=(0,K.createContext)(null);function nr({size:e,children:t}){return(0,q.jsx)(tr.Provider,{value:e,children:t})}function rr(){let e=(0,K.useContext)(tr),[t,n]=(0,K.useState)(()=>$n());return(0,K.useEffect)(()=>{if(e)return;let t=()=>n($n());return window.addEventListener(`resize`,t),()=>window.removeEventListener(`resize`,t)},[e]),e??t}var ir={x:.5,y:.4},ar=[-8,6,9,0,7,-6,5,0,-7,4,-5,6];function or(e){return ar[e%ar.length]??0}var sr=[1,0,1,0,1,0,1,0,1,0,0],cr=[.72,1],lr=[.4,1],ur=[10,20],dr=50;function fr(e){return cr[sr[e]??1]??1}function pr(e){return lr[sr[e]??1]??1}function mr(e){return ur[sr[e]??1]??20}function hr(e,t){return Math.round(Math.max(130,Math.min(Math.min(e,t)*.4,420)))}function gr(e,t){return Math.round(Math.max(110,Math.min(Math.min(e,t)*.21,205)))}function _r(e,t,n){let r=n*.4,i=n*.48;return[{x:i,y:i},{x:e*.3,y:r},{x:e*.72,y:r},{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*.38,y:t-r},{x:e*.62,y:t-r}]}function vr(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 yr({components:e,characters:t,centerChar:n,edgeOrder:r,entering:i,exiting:a,onEnterComplete:o,onSelectChar:s}){let{w:c,h:l}=rr(),u=U(),d=c<640,f=new Set([4,7,8,9,10]),p=e=>d&&f.has(e),h=hr(c,l),g=h/2,_=h/2,v=gr(c,l)/h,y=gr(c,l),b=(0,K.useMemo)(()=>{let e=new Map;return r.forEach((t,n)=>e.set(t,n)),e},[r]),x=ir.x*c,S=ir.y*l,C=x-g,w=S-g,T=(0,K.useMemo)(()=>_r(c,l,_),[c,l,_]);return(0,q.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 z-0 overflow-hidden`,children:[(0,q.jsx)(`div`,{className:`absolute rounded-[50%] bg-[var(--aux-black,#000)] opacity-20 blur-md`,style:{width:y*.62,height:16,left:x-y*.31,top:S+y*.4}}),t.map((t,r)=>{let d=r===n,f=!u&&i?.char===r,_=!u&&a?.char===r;if(f){let n=T[i.fromSlot],a=vr(n,x,S,c,l),s=fr(i.fromSlot),u=pr(i.fromSlot);return(0,q.jsx)(H.div,{className:`absolute left-0 top-0`,style:{width:h,height:h,zIndex:dr},initial:!1,animate:{x:[n.x-g,a.x-g,a.x-g,C,C,C],y:[n.y-g,a.y-g,a.y-g,w,w,w],scale:[s,s,s,v*.7,v*1.08,v],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,q.jsx)(m,{components:e,traits:t,size:h})},r)}if(_){if(p(a.toSlot))return null;let n=T[a.toSlot],i=vr(n,x,S,c,l),o=fr(a.toSlot),s=pr(a.toSlot);return(0,q.jsx)(H.div,{className:`absolute left-0 top-0`,style:{width:h,height:h,zIndex:mr(a.toSlot)},initial:!1,animate:{x:[C,C,i.x-g,i.x-g,n.x-g,n.x-g],y:[w,w,i.y-g,i.y-g,n.y-g,n.y-g],scale:[v,v*.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,q.jsx)(`div`,{style:{transform:`rotate(${or(a.toSlot)}deg)`},children:(0,q.jsx)(m,{components:e,traits:t,size:h,breathe:!1})})},r)}let y=b.get(r)??0;if(!d&&p(y))return null;let E=d?{x,y:S}:T[y];return(0,q.jsx)(H.div,{className:`absolute left-0 top-0 ${d?``:`pointer-events-auto cursor-pointer`}`,style:{width:h,height:h,zIndex:d?dr:mr(y)},initial:!1,animate:{x:E.x-g,y:E.y-g,scale:d?v:fr(y),opacity:d?1:pr(y)},transition:u?{duration:0}:{type:`spring`,stiffness:230,damping:26},onClick:d?void 0:()=>s(r),children:(0,q.jsx)(`div`,{style:{transform:d?void 0:`rotate(${or(b.get(r)??0)}deg)`},children:(0,q.jsx)(m,{components:e,traits:t,size:h,breathe:d})})},r)})]})}var br=[{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`}],J=T(w((e,t)=>({characters:[],selectedIndex:0,ensureGenerated:()=>{t().characters.length>0||e({characters:br,selectedIndex:0})},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 xr(){let[e,t]=(0,K.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,K.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Sr(){let e=G(),t=J.use.characters(),n=J.use.ensureGenerated(),r=U(),{w:i,h:a}=xr();(0,K.useEffect)(()=>{e&&n(e)},[e,n]);let o=hr(i,a),s=(0,K.useMemo)(()=>_r(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,q.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=ar[i%ar.length]??0,d=o*fr(i),f=pr(i),p=mr(i);return(0,q.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,q.jsx)(`div`,{style:{opacity:f,transform:`rotate(${u}deg)`},children:(0,q.jsx)(m,{components:e,traits:t,size:d,breathe:!1})})},n)})})}var Cr=c(`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)]`),wr=c(`min-w-0 flex-1 bg-transparent text-body-medium-lighter text-[var(--content-default)]`,`placeholder:text-[var(--content-tertiary)] outline-none`,dt);function Y(e){return e.trim().toLowerCase()}function Tr(e,t,n=[],r=8){let i=Y(t),a=new Set(n.map(Y)),o=[];for(let t of e)if(!a.has(Y(t))&&((i.length===0||Y(t).includes(i))&&o.push(t),o.length>=r))break;return o}function Er({id:e,options:t,highlighted:n,showAddHint:r,onPick:i,onHover:a}){return(0,q.jsxs)(`ul`,{id:e,role:`listbox`,className:c(`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,r)=>(0,q.jsx)(`li`,{id:`${e}-opt-${r}`,role:`option`,"aria-selected":r===n,onMouseDown:e=>{e.preventDefault(),i(t.value)},onMouseEnter:()=>a(r),className:c(`flex cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5`,`text-body-medium-lighter text-[var(--content-default)]`,r===n?`bg-[var(--surface-base)]`:`bg-transparent`),children:t.isAdd?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(_,{size:15,className:`shrink-0 text-[var(--content-tertiary)]`}),(0,q.jsxs)(`span`,{className:`min-w-0 truncate`,children:[`Add “`,t.value,`”`]}),(0,q.jsx)(`span`,{className:`ml-auto shrink-0 text-body-small-default text-[var(--content-tertiary)]`,children:`↵ Enter`})]}):t.value},t.isAdd?`__add__${t.value}`:t.value)),r&&(0,q.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:`Type anything and press ↵ to add your own`})]})}function Dr({htmlFor:e,required:t,children:n}){return(0,q.jsxs)(`label`,{htmlFor:e,className:`text-body-small-default text-[var(--content-secondary)]`,children:[n,t?(0,q.jsx)(`span`,{"aria-hidden":!0,className:`text-[var(--system-negative-strong)]`,children:` *`}):null]})}function Or(e,t){(0,K.useEffect)(()=>{function n(n){e.current&&!e.current.contains(n.target)&&t()}return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t])}function kr({label:e,placeholder:t,values:n,onChange:r,suggestions:i}){let a=(0,K.useId)(),o=`tac-${a}`,s=`tac-list-${a}`,l=(0,K.useRef)(null),[u,d]=(0,K.useState)(``),[f,p]=(0,K.useState)(!1),[m,h]=(0,K.useState)(-1),g=(0,K.useMemo)(()=>Tr(i,u,n),[i,u,n]),_=u.trim(),v=(0,K.useMemo)(()=>{if(!_)return!1;let e=Y(_);return!(n.some(t=>Y(t)===e)||g.some(t=>Y(t)===e))},[_,n,g]),b=(0,K.useMemo)(()=>{let e=g.map(e=>({value:e,isAdd:!1}));return v?[...e,{value:_,isAdd:!0}]:e},[g,v,_]);Or(l,()=>p(!1)),(0,K.useEffect)(()=>{h(e=>e>=b.length?b.length-1:e)},[b.length]);let x=f&&b.length>0,S=!v;function C(e){let t=e.trim();t&&(n.some(e=>Y(e)===Y(t))||r([...n,t]),d(``),h(-1))}function w(e){r(n.filter(t=>t!==e))}function T(e){e.key===`ArrowDown`?(e.preventDefault(),p(!0),h(e=>Math.min(e+1,b.length-1))):e.key===`ArrowUp`?(e.preventDefault(),h(e=>Math.max(e-1,0))):e.key===`Enter`?x&&m>=0?(e.preventDefault(),C(b[m].value)):u.trim()&&(e.preventDefault(),C(u)):e.key===`,`?(e.preventDefault(),C(u)):e.key===`Backspace`&&u.length===0&&n.length>0?w(n[n.length-1]):e.key===`Escape`&&p(!1)}return(0,q.jsxs)(`div`,{ref:l,className:`relative flex flex-col gap-1.5`,children:[(0,q.jsx)(Dr,{htmlFor:o,children:e}),(0,q.jsxs)(`div`,{className:c(Cr,`min-h-9 flex-wrap py-1.5`),children:[(0,q.jsx)(Qe,{size:16,"aria-hidden":!0,className:`shrink-0 self-center text-[var(--content-tertiary)]`}),n.map(e=>(0,q.jsx)(y,{onRemove:()=>w(e),removeLabel:`Remove ${e}`,className:`border border-[var(--border-base)] bg-[var(--surface-base)]`,children:e},e)),(0,q.jsx)(`input`,{id:o,role:`combobox`,"aria-expanded":x,"aria-controls":s,"aria-autocomplete":`list`,"aria-activedescendant":m>=0?`${s}-opt-${m}`:void 0,autoComplete:`off`,className:c(wr,`h-6 w-24`),placeholder:n.length===0?t:``,value:u,onChange:e=>{d(e.target.value),p(!0)},onFocus:()=>p(!0),onKeyDown:T})]}),x&&(0,q.jsx)(Er,{id:s,options:b,highlighted:m,showAddHint:S,onPick:C,onHover:h})]})}var Ar=`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 X(e,t){return{animation:`fadeInUp 0.4s ease-out ${e}s both`,...t==null?{}:{position:`relative`,zIndex:t}}}function jr({initialFirstName:e=``,initialLastName:t=``,onSubmit:n}){let[i,a]=(0,K.useState)(e),[o,s]=(0,K.useState)(t),[c,l]=(0,K.useState)(``),[u,d]=(0,K.useState)([]),f=i.trim().length>0&&c.trim().length>0;function p(){f&&n({firstName:i,lastName:o,role:c,hobbies:u})}return(0,q.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,children:(0,q.jsxs)(rt,{showCreatureFooter:!1,children:[(0,q.jsx)(Sr,{}),(0,q.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(),p()},children:[(0,q.jsx)(`h1`,{className:`text-center font-serif text-[2.75rem] leading-[1.05] tracking-tight`,style:X(.05),children:`Let's start with you.`}),(0,q.jsx)(`p`,{className:`mt-3 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:X(.12),children:`A few details so I can get to know you.`}),(0,q.jsxs)(`div`,{className:`mt-10 flex w-full flex-col gap-5`,children:[(0,q.jsx)(`div`,{style:X(.2,40),children:(0,q.jsx)(b,{label:(0,q.jsxs)(q.Fragment,{children:[`What should I call you?`,(0,q.jsx)(`span`,{"aria-hidden":!0,className:`text-[var(--system-negative-strong)]`,children:` *`})]}),placeholder:`Your name`,value:i,onChange:e=>a(e.target.value),className:dt,autoFocus:!0,required:!0,fullWidth:!0})}),(0,q.jsx)(`div`,{style:X(.27,30),children:(0,q.jsx)(b,{label:`And your last name?`,placeholder:`Your last name (optional)`,value:o,onChange:e=>s(e.target.value),className:dt,fullWidth:!0})}),(0,q.jsx)(`div`,{style:X(.34,20),children:(0,q.jsx)(b,{label:`Your role`,placeholder:`What do you do for work?`,value:c,onChange:e=>l(e.target.value),className:dt,required:!0,fullWidth:!0})}),(0,q.jsx)(`div`,{style:X(.41,10),children:(0,q.jsx)(kr,{label:`Any hobbies?`,placeholder:`Cars, books, growing tomatoes?`,values:u,onChange:d,suggestions:Ar})})]}),(0,q.jsx)(`div`,{className:`mt-10 w-full`,style:X(.5),children:(0,q.jsx)(r,{type:`submit`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(W,{size:16}),fullWidth:!0,disabled:!f,className:`h-11 text-base`,children:`Continue`})})]})]})})}function Mr(){let e=G(),t=J.use.characters(),n=J.use.selectedIndex();return(0,K.useMemo)(()=>{let r=t[n],i=e?.colors.find(e=>e.id===r?.color)?.hex;return st(i??`var(--surface-base)`)},[e,t,n])}function Z({onBack:e,onNext:t,tone:n}){let r=Mr(),i=n?n===`dark`?`#1A1A1A`:`#FFFFFF`:r.fg,a=n?n===`dark`?`rgba(0,0,0,0.08)`:`rgba(255,255,255,0.12)`:r.wash;return(0,q.jsxs)(`div`,{className:`absolute left-4 top-6 z-10 flex items-center gap-3`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:e,"aria-label":`Back`,className:`flex cursor-pointer h-8 w-8 items-center justify-center rounded-md transition-colors duration-150`,style:{color:i},onMouseEnter:e=>e.currentTarget.style.backgroundColor=a,onMouseLeave:e=>e.currentTarget.style.backgroundColor=`transparent`,children:(0,q.jsx)(u,{className:`h-5 w-5`})}),t?(0,q.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Forward`,className:`flex cursor-pointer h-8 w-8 items-center justify-center rounded-md transition-colors duration-150`,style:{color:i},onMouseEnter:e=>e.currentTarget.style.backgroundColor=a,onMouseLeave:e=>e.currentTarget.style.backgroundColor=`transparent`,children:(0,q.jsx)(d,{className:`h-5 w-5`})}):null]})}var Nr=[`Ziggy`,`Quill`,`Luna`,`Remy`,`Cleo`,`Cade`];function Pr(e,t){let n=[];for(let r=0;r<e;r++)r!==t&&n.push(r);return{centerChar:t,edgeOrder:n}}function Fr({onContinue:e,onBack:t,onForward:n}){let i=G(),a=J.use.characters(),o=J.use.ensureGenerated(),s=J.use.selectedIndex(),c=J.use.setSelectedIndex();(0,K.useEffect)(()=>{i&&o(i)},[i,o]);let u=a.length,[d,f]=(0,K.useState)(null),[m,h]=(0,K.useState)(``),[_,v]=(0,K.useState)(!1),y=(0,K.useRef)(!1),b=(0,K.useRef)(null),{ref:x,size:S}=er(),[C,w]=(0,K.useState)(null);(0,K.useEffect)(()=>{u>0&&d===null&&f(Pr(u,s))},[u,s,d]),(0,K.useEffect)(()=>{d&&c(d.centerChar)},[d,c]);let T=d?.centerChar;(0,K.useEffect)(()=>{T!=null&&!y.current&&h(Nr[T%Nr.length])},[T]),(0,K.useEffect)(()=>{_&&(b.current?.focus(),b.current?.select())},[_]);function E(e){if(!d||e===d.centerChar)return;let t=d.edgeOrder.indexOf(e);if(t<0)return;let n=[...d.edgeOrder];n[t]=d.centerChar,w({entering:{char:e,fromSlot:t},exiting:{char:d.centerChar,toSlot:t}}),f({centerChar:e,edgeOrder:n})}let D=()=>d&&E((d.centerChar+1)%u),O=()=>d&&E((d.centerChar-1+u)%u),k=(0,K.useMemo)(()=>d?a[d.centerChar]:void 0,[d,a]),A=!!i&&!!d&&!!k;function j(){k&&e({traits:k,name:m.trim()})}function M(){y.current=!0,h(e=>{let t=Nr.filter(t=>t!==e),n=t.length>0?t:Nr;return n[Math.floor(Math.random()*n.length)]})}let N=`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,q.jsx)(`div`,{ref:x,"data-theme":`dark`,className:`relative h-full overflow-hidden bg-[var(--surface-base)] text-[var(--content-default)]`,children:(0,q.jsxs)(nr,{size:S,children:[A&&(0,q.jsx)(yr,{components:i,characters:a,centerChar:d.centerChar,edgeOrder:d.edgeOrder,entering:C?.entering??null,exiting:C?.exiting??null,onEnterComplete:e=>w(t=>t?.entering.char===e?null:t),onSelectChar:E}),(0,q.jsx)(Z,{tone:`light`,onBack:t,onNext:n?j:void 0}),(0,q.jsx)(`h1`,{className:`absolute left-1/2 top-[19%] z-10 -translate-x-1/2 whitespace-nowrap text-center text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`,animation:`fadeInUp 0.4s ease-out both`},children:`Give me a face and a name`}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`Previous character`,onClick:O,className:`absolute left-[calc(50%-170px)] top-[40%] -translate-y-1/2 ${N}`,children:(0,q.jsx)(l,{className:`h-4 w-4`})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`Next character`,onClick:D,className:`absolute right-[calc(50%-170px)] top-[40%] -translate-y-1/2 ${N}`,children:(0,q.jsx)(W,{className:`h-4 w-4`})}),(0,q.jsxs)(`div`,{className:`absolute left-1/2 top-[51%] z-10 flex -translate-x-1/2 flex-col items-center gap-12`,children:[_?(0,q.jsx)(`input`,{ref:b,value:m,onChange:e=>{y.current=!0,h(e.target.value)},onBlur:()=>v(!1),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),v(!1))},placeholder:`Name your assistant`,"aria-label":`Assistant name`,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,q.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>v(!0),"aria-label":`Edit name`,className:`flex cursor-pointer items-center gap-2.5`,children:[(0,q.jsx)(`span`,{className:`text-3xl font-medium ${m?`text-[var(--content-default)]`:`text-[var(--content-tertiary)]`}`,children:m||`Name your assistant`}),(0,q.jsx)(g,{className:`h-5 w-5 text-[var(--content-tertiary)]`})]}),(0,q.jsx)(`button`,{type:`button`,onClick:M,"aria-label":`Shuffle name`,title:`Shuffle name`,className:`cursor-pointer text-[var(--content-tertiary)] transition-[transform,color] duration-300 hover:rotate-180 hover:text-[var(--content-default)]`,children:(0,q.jsx)(p,{className:`h-5 w-5`})})]}),(0,q.jsx)(r,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(W,{size:16}),disabled:!A,onClick:j,className:`h-11 w-[234px] text-base`,children:`Continue`})]})]})})}var Ir=.25,Lr=.46,Rr=.3,zr=.85,Br=40,Vr=14,Hr=8;function Ur({entrance:e=!1,entranceDelay:t=0,bumpNonce:n=0,settleBlink:r=!0}){let i=G(),a=J.use.characters(),o=J.use.selectedIndex(),s=U(),{w:c,h:l}=rr(),[u,d]=(0,K.useState)({x:0,y:0});(0,K.useEffect)(()=>{if(s)return;let e=e=>{d({x:(e.clientX/window.innerWidth-.5)*2,y:(e.clientY/window.innerHeight-.5)*2})};return window.addEventListener(`mousemove`,e),()=>window.removeEventListener(`mousemove`,e)},[s]);let f=e&&!s,p=nn();(0,K.useEffect)(()=>{n>0&&!s&&p.start({y:[0,-34,8,0],transition:{duration:.45,ease:`easeOut`}})},[n,s,p]);let[m,h]=(0,K.useState)(!1),[g,_]=(0,K.useState)(!e);(0,K.useEffect)(()=>{if(s||!g)return;let e=!1,t,n=n=>{e||(h(!0),t=setTimeout(()=>{e||(h(!1),t=setTimeout(n,140))},140))},i=()=>{t=setTimeout(()=>n(i),2500+Math.random()*4e3)};return r?n(()=>n(i)):i(),()=>{e=!0,clearTimeout(t)}},[s,g,r]);let v=a.length>0?a[o]:void 0,y=(0,K.useMemo)(()=>{if(!i||!v)return null;let e=i.eyeStyles.find(e=>e.id===v.eyeStyle);return e?{paths:e.paths,bbox:$e(e.paths.map(e=>et(e.svgPath)))}:null},[i,v]);if(!y)return null;let b=c*zr,x=Math.min(Math.min(c,l)*Rr,b*y.bbox.h/y.bbox.w),S=x*y.bbox.w/y.bbox.h,C=(c-S)/2,w=l-(1-Ir)*x,T=Br/100*l-(w+x/2),E=(Lr-Ir)*x,D=y.bbox.x+y.bbox.w/2,O=y.bbox.y+y.bbox.h/2;return(0,q.jsx)(H.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[2]`,style:{left:C,top:w,width:S,height:x,transformOrigin:`center`},initial:f?{y:T,scale:.35}:!1,animate:f?{y:[T,E,0],scale:[.35,1,1]}:{y:0,scale:1},transition:f?{duration:1,delay:t,times:[0,.7,1],ease:`easeInOut`}:{duration:0},onAnimationComplete:()=>_(!0),children:(0,q.jsx)(H.div,{animate:p,children:(0,q.jsx)(`div`,{style:{transform:`translate(${u.x*Vr}px, ${u.y*Hr}px)`,transition:`transform 0.5s cubic-bezier(0.22, 1, 0.36, 1)`},children:(0,q.jsx)(`svg`,{viewBox:`${y.bbox.x} ${y.bbox.y} ${y.bbox.w} ${y.bbox.h}`,width:S,height:x,style:{overflow:`visible`,display:`block`},children:(0,q.jsx)(`g`,{style:{transform:m?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${D}px ${O}px`,transition:`transform 0.14s ease-in-out`},children:y.paths.map((e,t)=>(0,q.jsx)(`path`,{d:e.svgPath,fill:e.color},t))})})})})})}var Wr=200,Gr=40;function Kr({firstName:e,assistantName:t,onContinue:n,onBack:i,onForward:a}){let o=G(),s=J.use.characters(),c=J.use.selectedIndex(),l=U(),{ref:u,size:{w:d,h:f}}=er(),p=Mr(),m=s.length>0?s[c]:void 0,h=(0,K.useMemo)(()=>{if(!o||!m)return null;let e=o.bodyShapes.find(e=>e.id===m.bodyShape),t=o.colors.find(e=>e.id===m.color);return!e||!t?null:{body:e,color:t.hex}},[o,m]),g=e.trim()?`Hey, ${e.trim()}!`:`Hey!`,_=t?.trim()?`I’m ${t.trim()}, your new AI assistant`:`I’m your new AI assistant`;if(!h)return(0,q.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,style:{backgroundColor:`var(--surface-base)`}});let v=1.25*Math.max(d,f),y=v*h.body.viewBox.height/h.body.viewBox.width,b=(d-v)/2,x=(f-y)/2,S=Wr/v,C=(Gr/100-.5)*f;return(0,q.jsx)(`div`,{ref:u,"data-theme":`dark`,className:`relative h-full overflow-hidden`,style:{backgroundColor:`var(--surface-base)`},children:(0,q.jsxs)(nr,{size:{w:d,h:f},children:[(0,q.jsx)(H.div,{className:`absolute inset-0 z-0`,style:{backgroundColor:h.color},initial:l?!1:{opacity:0},animate:{opacity:1},transition:l?{duration:0}:{duration:.6,delay:.35}}),(0,q.jsx)(H.svg,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,viewBox:`0 0 ${h.body.viewBox.width} ${h.body.viewBox.height}`,width:v,height:y,style:{left:b,top:x,transformOrigin:`center`},initial:l?!1:{scale:S,y:C},animate:{scale:1,y:0},transition:l?{duration:0}:{type:`spring`,stiffness:78,damping:18,mass:1},children:(0,q.jsx)(`path`,{d:h.body.svgPath,fill:h.color})}),(0,q.jsx)(Ur,{entrance:!0}),(0,q.jsx)(H.div,{initial:l?!1:{opacity:0},animate:{opacity:1},transition:l?{duration:0}:{duration:.4,delay:1},children:(0,q.jsx)(Z,{onBack:i,onNext:a})}),(0,q.jsxs)(`div`,{className:ut,children:[(0,q.jsxs)(H.h1,{className:`text-center leading-[1.05]`,style:{fontFamily:`var(--font-serif)`},initial:l?!1:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:l?{duration:0}:{type:`spring`,stiffness:260,damping:11,delay:1},children:[(0,q.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:p.fgDeep},children:g}),(0,q.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:p.fg},children:_})]}),(0,q.jsx)(H.div,{initial:l?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:l?{duration:0}:{duration:.4,delay:1.15},children:(0,q.jsx)(r,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(W,{size:16}),onClick:n,className:`h-11 w-[234px] text-base`,children:`Continue`})})]})]})})}var qr=.3,Jr=.85,Yr=.25;function Xr(){let e=G(),t=J.use.characters(),n=J.use.selectedIndex(),r=t.length>0?t[n]:void 0,{w:i,h:a}=rr(),o=(0,K.useMemo)(()=>{if(!e||!r)return null;let t=e.eyeStyles.find(e=>e.id===r.eyeStyle);return t?{paths:t.paths,bbox:$e(t.paths.map(e=>et(e.svgPath)))}:null},[e,r]),s=o?Math.min(Math.min(i,a)*qr,i*Jr*o.bbox.h/o.bbox.w):0;return{art:o,eyesW:o?s*o.bbox.w/o.bbox.h:0,eyesH:s,restCy:a-Yr*s,centerX:i/2,w:i,h:a}}function Zr({art:e,eyesW:t,eyesH:n,centerX:r,eyeCy:i,eyeScale:a,eyeX:o,blinking:s,className:c=`pointer-events-none absolute top-0 z-0`}){let l=wt(i,e=>e-n/2),u=e.bbox.x+e.bbox.w/2,d=e.bbox.y+e.bbox.h/2;return(0,q.jsx)(H.div,{"aria-hidden":`true`,className:c,style:{left:r-t/2,top:0,x:o,y:l,width:t,height:n,scale:a,transformOrigin:`center`},children:(0,q.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,q.jsx)(`g`,{style:{transform:s?`scaleY(0.1)`:`scaleY(1)`,transformOrigin:`${u}px ${d}px`,transition:`transform 0.13s ease-in-out`},children:e.paths.map((e,t)=>(0,q.jsx)(`path`,{d:e.svgPath,fill:e.color},t))})})})}var Qr={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 $r(e,t){let n=Qr[e];return n&&n.length>0?n:t.filter(t=>t!==e)}var ei=new Set([`orange`,`pink`,`red`]);function ti(e,t){return ei.has(e)&&ei.has(t)}function ni(e,t,n){let r=$r(e,t),i=[];for(let e of r){if(i.length>=n)break;i.some(t=>ti(t,e))||i.push(e)}for(let e of r){if(i.length>=n)break;i.includes(e)||i.push(e)}return i}var ri=`You’ve used AI that just answers questions`,ii=`The more I help`,ai=`I’m different`,oi=`The better I get`,si=`and the less you have to do`,ci=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],li=290;function ui({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,q.jsx)(H.div,{className:`relative w-full overflow-hidden`,initial:!1,animate:{height:o?t:e},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`},children:(0,q.jsxs)(H.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,q.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:e},children:(0,q.jsx)(H.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,q.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:t},children:(0,q.jsx)(`span`,{className:`block`,children:i})})]})})}function di({onContinue:e,onBack:t,onForward:n}){let i=Mr(),a=U(),{art:o,eyesW:s,eyesH:c,restCy:l,centerX:u,w:d,h:f}=Xr(),p=G(),h=J.use.characters(),g=J.use.selectedIndex(),_=h.length>0?h[g]:void 0,v=f>0&&f<=800,y=v?.17:.22,b=v?`top-[17%]`:`top-[22%]`,x=xt(0),S=xt(1),C=(0,K.useMemo)(()=>!p||!_?`orange`:ni(_.color,p.colors.map(e=>e.id),1)[0]??`orange`,[p,_]),w=Math.min(220,Math.max(150,d*.16)),T=-w,E=-w*.4,D=xt(-220),O=(0,K.useMemo)(()=>!p||!_?[]:ni(_.color,p.colors.map(e=>e.id),3),[p,_]),k=Math.max(.42,Math.min(d/1100,1)),A=Math.round(li*k),j=-A*1.1,M=-A*.42,N=xt(-320),[ee,te]=(0,K.useState)(!!a),[ne,re]=(0,K.useState)(!!a),[ie,P]=(0,K.useState)(!1),[ae,F]=(0,K.useState)(!1),[oe,se]=(0,K.useState)(!1),[ce,le]=(0,K.useState)(!1),[ue,de]=(0,K.useState)(!!a),I=Math.min(d,768)-48,fe=(0,K.useRef)(null),pe=(0,K.useRef)(null),me=(0,K.useRef)(null),L=(0,K.useRef)(null),he=(0,K.useRef)(null),[ge,_e]=(0,K.useState)(0),[ve,ye]=(0,K.useState)(0),[be,xe]=(0,K.useState)(0),[Se,Ce]=(0,K.useState)(0),[we,Te]=(0,K.useState)(0);return(0,K.useLayoutEffect)(()=>{fe.current?.offsetHeight&&_e(fe.current.offsetHeight),pe.current?.offsetHeight&&ye(pe.current.offsetHeight),me.current?.offsetHeight&&xe(me.current.offsetHeight),L.current?.offsetHeight&&Ce(L.current.offsetHeight),he.current?.offsetHeight&&Te(he.current.offsetHeight)},[I]),(0,K.useEffect)(()=>{x.set(l),le(!0)},[l,x]),(0,K.useEffect)(()=>{if(!a)return;let e=setTimeout(()=>{P(!0),F(!0),se(!0)},1400);return()=>clearTimeout(e)},[a]),(0,K.useEffect)(()=>{if(a||!o)return;x.set(l),S.set(1),D.set(T),N.set(j),te(!1),re(!1),P(!1),F(!1);let e=Math.max(c*.5,f*y-36),t=[],n=[],r=!1,i=e=>(t.push(e),e),s=e=>new Promise(t=>{n.push(setTimeout(t,e))});return(async()=>{if(await s(200),r||(te(!0),await Promise.all([i(tn(x,e,{duration:.55,ease:`easeOut`})),i(tn(S,.55,{duration:.55,ease:`easeOut`}))]),r)||(re(!0),await Promise.all([i(tn(x,l,{type:`spring`,stiffness:210,damping:15})),i(tn(S,1,{duration:.45,ease:`easeOut`}))]),r)||(await s(900),r)||(P(!0),F(!0),await i(tn(D,[T,E,E,T],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`})),r)||(await s(150),r))return;se(!0);let t=i(tn(N,[j,M,M,j],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`}));await s(700),!r&&(de(!0),await t)})(),()=>{r=!0,t.forEach(e=>e.stop()),n.forEach(clearTimeout)}},[a,o,f,y,c,l,x,S,D,T,E,N,j,M]),(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:i.fg},children:[(0,q.jsx)(Z,{onBack:t,onNext:n}),(0,q.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:I,fontFamily:`var(--font-serif)`},children:[(0,q.jsx)(`span`,{ref:fe,className:`block`,children:ri}),(0,q.jsx)(`span`,{ref:pe,className:`block`,children:ii}),(0,q.jsx)(`span`,{ref:me,className:`block`,children:ai}),(0,q.jsx)(`span`,{ref:L,className:`block`,children:oi}),(0,q.jsx)(`span`,{ref:he,className:`block`,children:si})]}),ce&&o&&(0,q.jsx)(Zr,{art:o,eyesW:s,eyesH:c,centerX:u,eyeCy:x,eyeScale:S,blinking:!1}),!a&&p&&(0,q.jsx)(H.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{left:Math.max(16,d*.05),top:0,y:D,width:w,height:w},children:(0,q.jsx)(m,{components:p,traits:{bodyShape:`blob`,eyeStyle:`goofy`,color:C},size:w,breathe:!1})}),!a&&p&&(0,q.jsx)(H.div,{"aria-hidden":`true`,className:`pointer-events-none absolute right-0 top-0 z-[1] flex items-start`,style:{right:-Math.round(A*.12),y:N},children:ci.map((e,t)=>(0,q.jsx)(`div`,{style:{width:A,height:A,marginLeft:t===0?0:-A*.34,zIndex:ci.length-t},children:(0,q.jsx)(m,{components:p,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:O[t]??`teal`},size:A,breathe:!1})},e.bodyShape))}),(0,q.jsxs)(`div`,{className:`${ut.replace(`top-[30%]`,b)} max-w-3xl`,children:[(0,q.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,q.jsx)(ui,{firstH:ge,secondH:ve,color:i.fgDeep,firstText:ri,secondText:ii,revealed:ee,carouseled:ie,revealFrom:`bottom`,revealDuration:.55,reduce:!!a}),(0,q.jsx)(ui,{firstH:be,secondH:Se,color:i.fg,firstText:ai,secondText:oi,revealed:ne,carouseled:ae,revealFrom:`top`,revealDuration:.45,reduce:!!a}),(0,q.jsx)(H.div,{className:`relative w-full overflow-hidden`,style:{color:i.fg},initial:!1,animate:{height:oe?we:0},transition:a?{duration:0}:{duration:.5,ease:`easeInOut`},children:we>0&&(0,q.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:we},children:(0,q.jsx)(H.span,{className:`block`,initial:!1,animate:{clipPath:oe?`inset(0% 0 0% 0)`:`inset(100% 0 0 0)`},transition:a?{duration:0}:{duration:.5,ease:`easeOut`},children:si})})})]}),ue&&(0,q.jsx)(H.div,{initial:a?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:a?{duration:0}:{duration:.4},children:(0,q.jsx)(r,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(W,{size:16}),onClick:e,className:`h-11 w-[234px] text-base`,children:`Continue`})})]})]})}function fi({idSuffix:e}){let t=`cf-${e}`,n=`cr-${e}`,r=`cg-${e}`,i=`cs-${e}`;return(0,q.jsxs)(`svg`,{viewBox:`0 0 100 100`,width:`100%`,height:`100%`,style:{display:`block`,position:`absolute`,inset:0},children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsxs)(`linearGradient`,{id:n,x1:`0.12`,y1:`0.05`,x2:`0.85`,y2:`0.95`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF0AE`}),(0,q.jsx)(`stop`,{offset:`50%`,stopColor:`#F4C231`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`#D29B1A`})]}),(0,q.jsxs)(`radialGradient`,{id:t,cx:`42%`,cy:`36%`,r:`82%`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`#FFF6CE`}),(0,q.jsx)(`stop`,{offset:`55%`,stopColor:`#F8CB3E`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`#EEB52C`})]}),(0,q.jsxs)(`radialGradient`,{id:r,cx:`36%`,cy:`24%`,r:`44%`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`#FFFFFF`,stopOpacity:`0.85`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]}),(0,q.jsxs)(`radialGradient`,{id:i,cx:`50%`,cy:`50%`,r:`50%`,children:[(0,q.jsx)(`stop`,{offset:`0%`,stopColor:`#FFFFFF`,stopOpacity:`1`}),(0,q.jsx)(`stop`,{offset:`100%`,stopColor:`#FFFFFF`,stopOpacity:`0`})]})]}),(0,q.jsx)(`circle`,{cx:`50`,cy:`50`,r:`49`,fill:`url(#${n})`}),(0,q.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,q.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`url(#${t})`}),(0,q.jsx)(`circle`,{cx:`50`,cy:`50`,r:`40`,fill:`none`,stroke:`#C28F18`,strokeOpacity:`0.35`,strokeWidth:`1.4`}),(0,q.jsxs)(`g`,{fontFamily:`var(--font-sans), system-ui, sans-serif`,fontWeight:900,fontSize:`58`,textAnchor:`middle`,children:[(0,q.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#C88E16`,transform:`translate(1.3 1.6)`,children:`$`}),(0,q.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#FFF6CF`,opacity:`0.7`,transform:`translate(-1.3 -1.5)`,children:`$`}),(0,q.jsx)(`text`,{x:`50`,y:`50`,dy:`0.355em`,fill:`#F4C12A`,children:`$`})]}),(0,q.jsx)(`ellipse`,{cx:`38`,cy:`28`,rx:`22`,ry:`14`,fill:`url(#${r})`}),(0,q.jsx)(`ellipse`,{cx:`34`,cy:`24`,rx:`7`,ry:`4.5`,fill:`url(#${i})`})]})}function pi({size:e,tiltX:t=0,tiltY:n=0,shadow:r=!0,spinning:i=!1,className:a}){return(0,q.jsxs)(`div`,{style:{position:`relative`,width:e,height:e},children:[r&&(0,q.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,q.jsx)(`div`,{style:{width:e,height:e,perspective:e*10},children:(0,q.jsxs)(H.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,q.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(0.5px)`},children:(0,q.jsx)(fi,{idSuffix:`front`})}),(0,q.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(-0.5px) rotateY(180deg)`},children:(0,q.jsx)(fi,{idSuffix:`back`})})]})})]})}var mi=.3,hi=.95;function gi({onClaim:e,onBumpEyes:t,onBack:n,onForward:r}){let i=U(),a=Mr(),{h:o}=rr(),[s,c]=(0,K.useState)(!1);function l(){if(!s){if(c(!0),i){e();return}window.setTimeout(t,mi*1e3)}}let u=o*.42,d=-o*.08,f=o*.9;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,q.jsx)(Z,{onBack:n,onNext:r}),(0,q.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,q.jsx)(`h1`,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`Here are some free credits to get started`}),(0,q.jsx)(`div`,{className:`mt-8 flex flex-col items-center gap-4`,children:(0,q.jsx)(H.div,{animate:s&&!i?{y:[0,u,d,f],scale:[1,1,1,.2],opacity:[1,1,1,0]}:{},transition:{duration:hi,times:[0,mi/hi,.62,1],ease:[`easeIn`,`easeOut`,`easeIn`]},onAnimationComplete:()=>{s&&e()},children:(0,q.jsx)(pi,{size:88,spinning:s&&!i})})}),!s&&(0,q.jsxs)(`button`,{type:`button`,onClick:l,className:`mt-6 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:{backgroundColor:a.isLight?`#1A1A1A`:`#FFFFFF`,color:a.isLight?`#FFFFFF`:`#1A1A1A`},children:[`Claim`,(0,q.jsx)(W,{className:`h-4 w-4`})]})]})]})}Xe();var _i=640,vi=[{id:`companion-coworker`,left:`Companion`,right:`Coworker`,leftAvatar:{bodyShape:`blob`,eyeStyle:`gentle`,color:`pink`},rightAvatar:{bodyShape:`ninja`,eyeStyle:`curious`,color:`purple`}},{id:`genz-boomer`,left:`Gen Z`,right:`Baby Boomer`,leftAvatar:{bodyShape:`burst`,eyeStyle:`quirky`,color:`yellow`},rightAvatar:{bodyShape:`cloud`,eyeStyle:`dazed`,color:`green`}},{id:`execute-collaborate`,left:`Independent`,right:`Collaborative`,leftAvatar:{bodyShape:`star`,eyeStyle:`angry`,color:`orange`},rightAvatar:{bodyShape:`flower`,eyeStyle:`goofy`,color:`teal`}},{id:`playful-serious`,left:`Playful`,right:`Serious`,leftAvatar:{bodyShape:`star`,eyeStyle:`goofy`,color:`yellow`},rightAvatar:{bodyShape:`blob`,eyeStyle:`grumpy`,color:`purple`}},{id:`polite-unfiltered`,left:`Polite`,right:`Unfiltered`,leftAvatar:{bodyShape:`sprout`,eyeStyle:`bashful`,color:`green`},rightAvatar:{bodyShape:`urchin`,eyeStyle:`surprised`,color:`orange`}}],yi=[`9%`,`27%`,`45%`,`62%`,`79%`],Q=50,bi=.3*.75,xi=`rgba(36, 41, 46, 0.2)`,Si=`#FDFDFC`,Ci=.16;function wi(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 Ti(){let[e,t]=(0,K.useState)(()=>typeof window>`u`?1280:window.innerWidth);return(0,K.useEffect)(()=>{let e=()=>t(window.innerWidth);return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Ei({components:e,traits:t,side:n,top:r,size:i,progress:a}){let o=Math.max(0,Math.min(1,a)),s=100+Ci*100,c=n===`left`?-100+s*o:100-s*o;return(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute`,style:{[n]:`calc(50% - 50vw)`,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,q.jsx)(m,{components:e,traits:t,size:i,breathe:!1})})}function Di({axis:e,value:t,onValueChange:n,fg:r,disabled:i}){return(0,q.jsxs)(`div`,{className:`flex w-full shrink-0 flex-wrap items-center gap-x-5 gap-y-1.5 sm:flex-nowrap`,style:{opacity:i?.7:1},children:[(0,q.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:r},children:e.left}),(0,q.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:r},children:e.right}),(0,q.jsxs)(C,{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:[t],onValueChange:e=>n(e[0]??Q),disabled:i,min:0,max:100,step:1,"aria-label":`${e.left} to ${e.right}`,children:[(0,q.jsx)(x,{className:`relative h-2 w-full grow rounded-full sm:h-3`,style:{backgroundColor:xi}}),(0,q.jsx)(S,{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:Si}})]})]})}function Oi({components:e,values:t,sideAvatars:n,size:r}){return(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`pointer-events-none absolute inset-0 -z-10`,children:vi.map((i,a)=>{let o=t[i.id]??Q,s=Math.max(0,(Q-o)/Q),c=Math.max(0,(o-Q)/Q),l=yi[a]??`50%`,u=n[a];return u?(0,q.jsxs)(`div`,{children:[(0,q.jsx)(Ei,{components:e,traits:u.left,side:`left`,top:l,size:r,progress:s}),(0,q.jsx)(Ei,{components:e,traits:u.right,side:`right`,top:l,size:r,progress:c})]},i.id):null})})}function ki({values:e,onValueChange:t,locked:n,onContinue:r,onBack:i,onForward:a}){let o=Mr(),s=G(),c=Ti(),{w:l,h:u}=rr(),d=Math.round(bi*Math.min(l,u))+12,f=c>=_i,p=J.use.characters()[J.use.selectedIndex()]?.color,m=Math.round(Math.min(300,Math.max(160,c*.16))),h=(0,K.useMemo)(()=>{let e=s?.colors.map(e=>e.id)??[],t=wi(vi.map(e=>e.leftAvatar.color),p,e),n=wi(vi.map(e=>e.rightAvatar.color),p,e);return vi.map((e,r)=>({left:{...e.leftAvatar,color:t[r]??e.leftAvatar.color},right:{...e.rightAvatar,color:n[r]??e.rightAvatar.color}}))},[s,p]);return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:o.fg},children:[(0,q.jsx)(Z,{onBack:i,onNext:a}),f&&s&&(0,q.jsx)(Oi,{components:s,values:e,sideAvatars:h,size:m}),(0,q.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:d},children:[(0,q.jsx)(`div`,{className:`w-full min-h-14 shrink-[4]`,style:{flexBasis:Math.round(u*.14)}}),(0,q.jsxs)(`div`,{className:`flex shrink-0 flex-col items-center gap-2`,children:[(0,q.jsx)(`h1`,{className:`text-center text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`Create my personality`}),n?(0,q.jsx)(`p`,{className:`text-center text-[15px]`,style:{color:o.fgMuted},children:`Personality locked — chat with your assistant to make any more updates`}):(0,q.jsx)(`p`,{className:`hidden max-w-md text-center text-[15px] sm:block`,style:{color:o.fgMuted},children:`How do you want me to talk to you? You can always ask me to change my personality later.`})]}),(0,q.jsx)(`div`,{className:`w-full min-h-3 shrink-[2] basis-10`}),vi.map((r,i)=>(0,q.jsxs)(K.Fragment,{children:[i>0&&(0,q.jsx)(`div`,{className:`w-full min-h-2.5 shrink basis-8 sm:basis-11`}),(0,q.jsx)(Di,{axis:r,value:e[r.id]??Q,onValueChange:e=>t(r.id,e),fg:o.fg,disabled:n})]},r.id)),(0,q.jsx)(`div`,{className:`w-full min-h-3 shrink-[2] basis-14`}),(0,q.jsxs)(`button`,{type:`button`,onClick:r,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:o.isLight?`#1A1A1A`:`#FFFFFF`,color:o.isLight?`#FFFFFF`:`#1A1A1A`},children:[`Continue`,(0,q.jsx)(W,{className:`h-4 w-4`})]})]})]})}function Ai({assistantId:e,assistantReady:t,onConnected:n,onSkip:r,onBack:i,onForward:a,missingCalendarScope:o=!1,onRetry:s,hatchError:c=null}){let l=Mr(),{handleConnect:u,oauthInProgress:d}=Ze({assistantId:e??``,onConnect:n}),f=()=>{s?.(),u()},p=!e||!t,m=p||d;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:l.fg},children:[(0,q.jsx)(Z,{onBack:i,onNext:a}),(0,q.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,q.jsx)(`h1`,{className:`text-[2.6rem] leading-tight`,style:{fontFamily:`var(--font-serif)`},children:p?`Waking up`:o?`Access not enabled`:`Let me make this easy`}),(0,q.jsx)(`p`,{className:`text-[16px]`,style:{color:l.fgMuted},children:p?`Your assistant is getting ready`:o?`Check the box next to the Google Calendar permission so I can book the check-in.`:`Connect your Google Calendar so I can find time to check in and start helping.`}),(0,q.jsxs)(`div`,{className:`mt-6 flex w-[234px] flex-col items-center gap-4`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:f,disabled:m,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:l.isLight?`#1A1A1A`:`#FFFFFF`,color:l.isLight?`#FFFFFF`:`#1A1A1A`},children:p?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(h,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Starting assistant…`]}):d?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(h,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Waiting for authorization…`]}):o?`Try again`:`Connect Calendar →`}),(!p||c)&&(0,q.jsx)(`button`,{type:`button`,onClick:r,disabled:d,className:`cursor-pointer text-body-small-default transition-opacity hover:opacity-100 disabled:opacity-60`,style:{color:l.fgMuted},children:`Skip for now`})]})]})]})}var ji=st(`#17191C`);function Mi(){let[e,t]=(0,K.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,K.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Ni(){let e=G(),t=J.use.characters(),n=J.use.selectedIndex();return{components:e,chosen:t.length>0?t[n]:void 0}}function Pi({size:e=64,isAssistantBusy:t=!1}){let{components:n,chosen:r}=Ni();return!n||!r?(0,q.jsx)(`div`,{style:{width:e,height:e}}):(0,q.jsx)(`div`,{className:`shrink-0`,style:{width:e,height:e},children:(0,q.jsx)(m,{components:n,traits:r,size:e,isAssistantBusy:t})})}var Fi=64,Ii=4500,Li=7e3;function Ri({onDone:e,onBack:t,onForward:n,scheduledTime:r,awaitingTime:i}){let{components:a,chosen:o}=Ni(),s=U(),{w:c,h:l}=Mi(),u=r?`Check-in scheduled for tomorrow at ${r}!`:`Check-in scheduled!`;(0,K.useEffect)(()=>{let t=setTimeout(e,i&&!r?Li:Ii);return()=>clearTimeout(t)},[e,i,r]);let d=(0,K.useRef)(null),[f,p]=(0,K.useState)(null);(0,K.useLayoutEffect)(()=>{let e=()=>{let e=d.current?.getBoundingClientRect();e&&p({cx:e.left+e.width/2,cy:e.top+e.height/2})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u]);let h=1.3*Math.max(c,l)/Fi,g=f?c/2-f.cx:0,_=f?l*.88-f.cy:0,v=l*.05;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden text-white`,children:[(0,q.jsx)(Z,{onBack:t,onNext:n,tone:`light`}),(0,q.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,q.jsx)(`div`,{ref:d,className:`relative shrink-0`,style:{width:Fi,height:Fi},children:a&&o&&f&&(0,q.jsx)(H.div,{className:`absolute inset-0`,style:{transformOrigin:`center`},initial:s?!1:{scale:h,x:g,y:_},animate:{x:[g,g,0,0],y:[_,_+v,0,0],scale:[h,h,1.07,1]},transition:s?{duration:0}:{duration:1.1,times:[0,.18,.82,1],ease:[`easeOut`,`easeIn`,`easeOut`]},children:(0,q.jsx)(m,{components:a,traits:o,size:Fi})})}),(0,q.jsx)(H.span,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:s?!1:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:s?{duration:0}:{duration:.4,delay:.9},children:u})]})]})}var zi=[`Searching the web to get to know you…`,`Reading public profiles…`,`Skimming the highlights…`,`Connecting the dots…`,`Piecing it together…`],Bi=[`Updating my personality…`,`Finding my voice…`,`Getting into character…`],Vi=`Almost there…`,Hi=[...zi,Vi],Ui=[...Bi,Vi],Wi=2800;function Gi({onDone:e,onBack:t,onAdvance:n,onForward:r,ready:i}){let a=ji,[o,s]=(0,K.useState)(0);return(0,K.useEffect)(()=>{n?.(o);let t=o>=Hi.length-1;if(i&&t){let t=setTimeout(e,Wi);return()=>clearTimeout(t)}let r=setTimeout(()=>s(e=>(e+1)%Hi.length),Wi);return()=>clearTimeout(r)},[o,i,e,n]),(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,q.jsx)(Z,{onBack:t,onNext:r}),(0,q.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,q.jsx)(Pi,{isAssistantBusy:!0}),(0,q.jsx)(Ye,{mode:`wait`,children:(0,q.jsx)(H.p,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},transition:{duration:.35},children:Hi[o]},o)})]})]})}function Ki({onDone:e,ready:t}){let n=ji,[r,i]=(0,K.useState)(0);return(0,K.useEffect)(()=>{let n=Ui.length-1;if(t){if(r!==n){i(n);return}let t=setTimeout(e,Wi);return()=>clearTimeout(t)}let a=setTimeout(()=>i(e=>(e+1)%Ui.length),Wi);return()=>clearTimeout(a)},[r,t,e]),(0,q.jsx)(`div`,{className:`absolute inset-0 z-10`,style:{color:n.fg},children:(0,q.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,q.jsx)(Pi,{isAssistantBusy:!0}),(0,q.jsx)(Ye,{mode:`wait`,children:(0,q.jsx)(H.p,{className:`text-[2.6rem] leading-none`,style:{fontFamily:`var(--font-serif)`},initial:{y:12,opacity:0},animate:{y:0,opacity:1},exit:{y:-12,opacity:0},transition:{duration:.35},children:Ui[r]},r)})]})})}function qi({claims:e,loading:t,onContinue:n,onRejectAll:r,onBack:i,onForward:a}){let o=ji,s=U(),[c,l]=(0,K.useState)(()=>new Set),u=e.filter(e=>!c.has(e.claim)),d=u.length>0,f=!t;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:o.fg},children:[(0,q.jsx)(Z,{onBack:i,onNext:a}),(0,q.jsxs)(`div`,{className:`absolute bottom-0 left-1/2 top-[14%] sm:top-[26%] z-10 flex w-full max-w-xl -translate-x-1/2 flex-col px-6 pb-8`,children:[(0,q.jsxs)(`div`,{className:`flex min-h-0 flex-col overflow-y-auto`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)(Pi,{}),(0,q.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`This is what I found about you`})]}),(0,q.jsx)(`p`,{className:`mb-7 mt-2 text-[15px]`,style:{color:o.fgMuted},children:d?t?`Still checking the rest. You can review these as they come in.`:`I searched the web. Feel free to remove anything that isn’t true`:t?`Still putting this together…`:`I didn’t turn up much — we can fill it in as we chat.`}),(0,q.jsx)(`div`,{className:`flex flex-col gap-3`,children:(0,q.jsx)(Ye,{children:u.map(e=>(0,q.jsxs)(H.div,{layout:!0,initial:s?!1:{opacity:0,y:10},animate:{opacity:1,y:0},exit:s?void 0:{opacity:0,scale:.95},className:`flex items-center justify-between gap-3 rounded-2xl px-5 py-4 text-[15px]`,style:{backgroundColor:o.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:[(0,q.jsx)(`span`,{children:e.claim}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`Remove "${e.claim}"`,onClick:()=>l(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:o.fgMuted},children:(0,q.jsx)(v,{className:`h-4 w-4`})})]},e.claim))})}),d&&f&&(0,q.jsx)(`button`,{type:`button`,onClick:r,className:`mt-5 self-start shrink-0 cursor-pointer text-[14px] underline underline-offset-2 transition-opacity hover:opacity-80`,style:{color:o.fgMuted},children:`This is not me`})]}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>n([...c]),disabled:!f,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:o.isLight?`#1A1A1A`:`#FFFFFF`,color:o.isLight?`#FFFFFF`:`#1A1A1A`},children:[f?`Continue`:`Still searching…`,f&&(0,q.jsx)(W,{className:`h-4 w-4`})]})]})]})}var $=64,Ji=$;function Yi({head:e,note:t,flyToNote:n,reduce:r,onLanded:i}){let{components:a,chosen:o}=Ni();if(!a||!o)return null;let s=$/2,c=n&&t?t:e,l={x:c.x-s,y:c.y-s};return(0,q.jsx)(H.div,{className:`pointer-events-none absolute left-0 top-0`,style:{width:$,height:$,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,q.jsx)(m,{components:a,traits:o,size:$})})}function Xi({installedPlugins:e=[],pluginCatalog:t={},onStart:n,onBack:r,onForward:i}){let a=ji,o=U(),[s,c]=(0,K.useState)(!1),l=e.map(e=>({name:e,displayName:at(e),description:t[e]?.trim()??``})).filter(e=>e.displayName.length>0),u=l.length>0,d=(0,K.useRef)(null),f=(0,K.useRef)(null),p=(0,K.useRef)(null),[m,h]=(0,K.useState)(null),[g,_]=(0,K.useState)(!1),[v,y]=(0,K.useState)(!1);(0,K.useLayoutEffect)(()=>{let e=()=>{let e=d.current,t=f.current;if(!e||!t)return;let n=e.getBoundingClientRect(),r=e=>({x:e.left-n.left+e.width/2,y:e.top-n.top+e.height/2}),i=p.current;h({head:r(t.getBoundingClientRect()),note:i?r(i.getBoundingClientRect()):void 0})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[l.length]);let b=m?.note?.y;return(0,K.useEffect)(()=>{b===void 0||g||_(!0)},[b,g]),(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,q.jsx)(Z,{onBack:r,onNext:i}),(0,q.jsxs)(`div`,{ref:d,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,q.jsxs)(`div`,{className:`flex items-center`,children:[(0,q.jsx)(H.div,{ref:f,className:`shrink-0`,style:{height:$},initial:!1,animate:g?{width:0,marginRight:0}:{width:$,marginRight:12},transition:o?{duration:0}:{duration:.5,ease:`easeInOut`}}),(0,q.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`You’re all set`})]}),u&&(0,q.jsx)(`div`,{className:`mt-4 flex flex-col gap-3`,children:l.map((e,t)=>(0,q.jsxs)(H.div,{initial:o?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:o?{duration:0}:{duration:.3,delay:t*.06},className:`rounded-2xl px-5 py-4`,style:{backgroundColor:a.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:[(0,q.jsx)(`div`,{className:`text-[15px] font-medium`,children:e.displayName}),e.description&&(0,q.jsx)(`div`,{className:`mt-1 text-[13px] leading-snug`,style:{color:a.fgMuted},children:e.description})]},e.name))}),(0,q.jsxs)(`div`,{className:`mt-16 flex items-center gap-3`,children:[(0,q.jsx)(`div`,{ref:p,className:`shrink-0`,style:{width:Ji}}),(0,q.jsx)(H.p,{className:`text-[15px]`,style:{color:a.fg},initial:!1,animate:{opacity:+!!v,x:v?0:-6},transition:o?{duration:0}:{duration:.35},children:`I’ve set myself up with plugins around who you are.`})]}),(0,q.jsxs)(`button`,{type:`button`,onClick:()=>{s||(c(!0),Promise.resolve().then(n).catch(()=>c(!1)))},disabled:s,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:a.isLight?`#1A1A1A`:`#FFFFFF`,color:a.isLight?`#FFFFFF`:`#1A1A1A`},children:[s?`Starting…`:`Let's chat`,!s&&(0,q.jsx)(W,{className:`h-4 w-4`})]}),m&&(0,q.jsx)(Yi,{head:m.head,note:m.note,flyToNote:g&&m.note!==void 0,reduce:o,onLanded:()=>y(!0)})]})]})}var Zi=[{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})}],Qi=`#17191C`,$i=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],ea=290;function ta({peekLevel:e=0,eyesBumpNonce:t=0,darkBg:n=!1,showBottomEyes:r=!0,showTopTeam:i=!1}){let a=G(),o=J.use.characters(),s=J.use.selectedIndex(),c=U(),{w:l}=rr(),u=Math.max(.42,Math.min(l/1100,1)),d=l<640,f=o.length>0?o[s]:void 0,{bg:p,peekColors:h}=(0,K.useMemo)(()=>!a||!f?{bg:`var(--surface-base)`,peekColors:[]}:{bg:a.colors.find(e=>e.id===f.color)?.hex??`var(--surface-base)`,peekColors:ni(f.color,a.colors.map(e=>e.id),3)},[a,f]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(H.div,{className:`absolute inset-0 z-0`,initial:!1,animate:{backgroundColor:n?Qi:p},transition:c?{duration:0}:{duration:1,ease:`easeInOut`}}),r&&(0,q.jsx)(Ur,{bumpNonce:t,settleBlink:!1}),i&&a&&(0,q.jsx)(`div`,{className:`pointer-events-none absolute right-0 z-[1] flex items-start`,style:{top:-Math.round(ea*u)*.42,right:-Math.round(ea*u)*.12},children:$i.map((e,t)=>{let n=Math.round(ea*u);return(0,q.jsx)(H.div,{style:{width:n,height:n,marginLeft:t===0?0:-n*.34,zIndex:$i.length-t},initial:c?!1:{y:-140,opacity:0},animate:{y:0,opacity:1},transition:c?{duration:0}:{type:`spring`,stiffness:200,damping:18,delay:t*.1},children:(0,q.jsx)(m,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:h[t]??`teal`},size:n,breathe:!1})},e.bodyShape)})}),a&&(0,q.jsx)(Ye,{children:(d?Zi.filter(e=>e.mobile):Zi).slice(0,Math.max(0,e)).map((e,t)=>{let n=Math.round(e.base*u),r=d&&e.mobilePos?e.mobilePos(n):e.pos(n);return(0,q.jsx)(H.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{...r,width:n,height:n},initial:c?!1:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:c?void 0:{scale:0,opacity:0},transition:c?{duration:0}:{type:`spring`,stiffness:220,damping:16,delay:.1},children:(0,q.jsx)(m,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:h[e.colorIdx]??`teal`},size:n,breathe:!1})},`peek-${t}`)})})]})}var na={established:!1,assistantName:null};async function ra(e,n={hasAnyActiveConversation:L,fetchAssistantIdentity:f}){try{if(!await n.hasAnyActiveConversation(e))return na}catch(e){return t(e,{context:`research_onboarding_established_check`}),na}let r=await n.fetchAssistantIdentity(e).catch(()=>null);return{established:!0,assistantName:(typeof r?.name==`string`?r.name.trim():``)||null}}function ia({assistantName:e,onKeep:t,onRedo:n,onBack:i}){let a=e?.trim()||``,o=a||`your assistant`,s=a?`${a}'s`:`its`;return(0,q.jsxs)(`div`,{"data-theme":`dark`,className:`relative h-full overflow-hidden`,style:{backgroundColor:`var(--surface-base)`,color:`var(--content-primary)`},children:[(0,q.jsx)(Z,{onBack:i,tone:`light`}),(0,q.jsxs)(`div`,{className:`${ut} max-w-xl`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col items-center gap-3`,children:[(0,q.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:a?`${a} is already up and running`:`Your assistant is already up and running`}),(0,q.jsxs)(`p`,{className:`text-[15px]`,style:{color:`var(--content-secondary)`},children:[`You two have history — a personality, memories, and past conversations. Running setup again would overwrite who `,o,` is now.`]})]}),(0,q.jsxs)(`div`,{className:`flex w-full max-w-sm flex-col items-center gap-3`,children:[(0,q.jsxs)(r,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:t,className:`h-11 text-base`,children:[`Keep `,o,` and start chatting`,(0,q.jsx)(W,{className:`h-4 w-4`})]}),(0,q.jsxs)(r,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:n,className:`h-11 text-base`,children:[`Start over and rebuild `,s,` personality`]})]})]})]})}var aa=4e3;function oa(e){return{firstName:e.firstName,lastName:e.lastName,occupation:e.role,hobby:e.hobbies.join(`, `),timezone:me()}}function sa(e){let t=e.firstName.trim();return t?`Getting to know ${t}`:`Getting to know you`}Xe();function ca(){let e=i(),t=oe.use.user(),n=t?.id??null,r=lt.use.enterFocus(),o=lt.use.exitFocus(),s=lt.use.setPendingAvatarTraits(),c=lt.use.requestSidebarCollapse(),[l,u]=(0,K.useState)(`form`),{ref:d,size:f}=er(),[p,m]=(0,K.useState)([]),[h,g]=(0,K.useState)(!1);function _(e){u(e)}function v(e,t=`completed`){it(nt[l],{userId:n,outcome:t}),m([]),_(e)}function y(e){m(e=>[...e,l]),_(e)}function b(){let e=p[p.length-1];e&&(m(e=>e.slice(0,-1)),_(e))}let x=p.length>0?b:void 0,[S,C]=(0,K.useState)(null),w=(0,K.useRef)(null),[T,E]=(0,K.useState)(null),[O,A]=(0,K.useState)(null),j=(0,K.useRef)(!1),[M,N]=(0,K.useState)(null),[ee,te]=(0,K.useState)({}),[ne,re]=(0,K.useState)(!1),[P,ae]=(0,K.useState)(null),[F,se]=(0,K.useState)(null),[ce,le]=(0,K.useState)(!1),[ue,I]=(0,K.useState)(!1),[me,L]=(0,K.useState)(!1),[ye,be]=(0,K.useState)(0),[xe,Se]=(0,K.useState)(0),[Ce]=a(),we=sn({hostingParam:Ce.get(`hosting`),localMode:k(),gatewayAuthSession:D()}),Te=Ce.get(`assistant`)??void 0,Ee=we,{start:De,ready:Oe,assistantId:R,error:ke,awaitReady:z}=pn({adoptExisting:we,adoptAssistantId:Te}),B=Rn(),{start:Ae,hydrate:V}=B,je=(0,K.useRef)(Promise.resolve()),Me=(0,K.useRef)(Promise.resolve()),[Ne,Pe]=(0,K.useState)(!1),Fe=B.status===`idle`||B.status===`running`,Ie=!Fe&&B.claims.length===0;(0,K.useEffect)(()=>{o(),s(null),De()},[o,s,De]),(0,K.useEffect)(()=>{if(w.current)return;let e=z().then(e=>ra(e)).catch(()=>na);w.current=e,e.then(E)},[z]),(0,K.useLayoutEffect)(()=>{if(h||!n)return;let e=ge(n);if(e?.formValues){C(e.formValues),N(e.faceValues),se(e.checkinTime),I(e.checkinBooked),ae(e.researchConversationId??null),e.research&&V({...e.research,pluginCatalog:e.research.pluginCatalog??{}},z);let t=_e(e);u(Ee&&(t===`letschat`||t===`meeting`)?`looking`:t),m([])}g(!0)},[h,n,V,z,Ee]),(0,K.useEffect)(()=>{!h||!S||he(n,{step:l,formValues:S,faceValues:M,checkinTime:F,checkinBooked:ue,research:B.status===`done`?{status:`done`,claims:B.claims,suggestions:B.suggestions,installedPlugins:B.installedPlugins,pluginCatalog:B.pluginCatalog}:null,...P?{researchConversationId:P}:{}})},[h,n,l,S,M,F,ue,P,B.status,B.claims,B.suggestions,B.installedPlugins,B.pluginCatalog]),(0,K.useEffect)(()=>{h&&(!S||B.status!==`idle`||Ae({awaitAssistantId:z,subject:oa(S),conversationTitle:sa(S),...P?{resumeConversationId:P}:{},onConversationCreated:ae,includeSuggestions:!1}))},[h,S,P,B.status,Ae,z,!0]),(0,K.useEffect)(()=>{l===`results`&&Ie&&(m([]),u(`suggestions`))},[l,Ie]);function Le(t,i,a,{skip:o=!1,hidden:l=!1}={}){ve(n);let{firstName:u,lastName:d,role:f,hobbies:p}=t,m=[u.trim(),d.trim()].filter(Boolean).join(` `),h=u.trim(),g=!o&&a===void 0;pe({tools:[],tasks:[],tone:ft,...m?{userName:m}:{},...f.trim()?{occupation:f.trim()}:{},...o?{}:{initialMessage:a??on({firstName:u,lastName:d,occupation:f,hobby:p.join(`, `)}),...l?{initialMessageHidden:!0}:{}},...g?{title:h?`Getting to know ${h}`:`Getting to know you`}:{},...i?.name?.trim()?{assistantName:i.name.trim()}:{}});let _=i?.name?.trim();_&&fe(_),s(i?.traits??null),g&&r(),o||ie.markExpectingFirstMessage(),c(),ie.checkAssistant(R??void 0).finally(()=>{e(`${de.assistant}?onboarding=1`,{replace:!0})})}async function Re(){S&&(await Promise.all([B.awaitPluginInstalls(),je.current,Me.current]),Le(S,M,Xn(M?.name),{hidden:!0}))}function ze(e){B.start({awaitAssistantId:z,subject:oa(e),conversationTitle:sa(e),onConversationCreated:ae,includeSuggestions:!1})}async function Be(e){if(!j.current&&(T??await Promise.race([w.current??Promise.resolve(null),new Promise(e=>{setTimeout(()=>e(null),aa)})]))?.established){A(e),v(`existing`);return}C(e),ze(e),v(`face`)}function Ve(e){if(e.length>0&&!e.includes(`https://www.googleapis.com/auth/calendar.events`)){L(!0);return}if(L(!1),R&&S){let e=[S.firstName.trim(),S.lastName.trim()].filter(Boolean).join(` `);se(null),I(!1),le(!0),ct({assistantId:R,userName:e||void 0,assistantName:M?.name?.trim()||void 0}).then(e=>{e.scheduled&&(I(!0),se(Zn(e.start,e.timeZone)))}).finally(()=>le(!1))}v(`meeting`)}if([`different`,`personality`,`integration`,`letschat`,`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(l)&&S){let e=[`meeting`,`looking`,`results`,`suggestions`,`finishing`].includes(l);return(0,q.jsx)(`div`,{ref:d,"data-theme":`dark`,className:`relative h-full overflow-hidden`,children:(0,q.jsxs)(nr,{size:f,children:[(0,q.jsx)(ta,{eyesBumpNonce:ye,peekLevel:[`looking`,`results`,`suggestions`,`finishing`].includes(l)?xe:0,darkBg:e,showBottomEyes:!e&&l!==`different`}),l===`different`&&(0,q.jsx)(di,{onContinue:()=>v(`personality`),onBack:()=>y(`intro`),onForward:x}),l===`personality`&&(0,q.jsx)(ki,{values:ee,onValueChange:(e,t)=>te(n=>({...n,[e]:t})),locked:ne,onContinue:()=>{ne||(Pe(!0),Me.current=Yn({awaitAssistantId:z,values:ee,userName:S?.firstName?.trim()||void 0,assistantName:M?.name?.trim()||void 0}).finally(()=>Pe(!1)),re(!0)),v(`integration`)},onBack:()=>y(`different`),onForward:x}),l===`integration`&&(0,q.jsx)(gi,{onClaim:()=>v(Ee?`looking`:`letschat`),onBumpEyes:()=>be(e=>e+1),onBack:()=>y(`personality`),onForward:x}),l===`letschat`&&(0,q.jsx)(Ai,{assistantId:R,assistantReady:Oe,hatchError:ke,onConnected:Ve,missingCalendarScope:me,onRetry:()=>L(!1),onSkip:()=>{L(!1),v(`looking`,`skipped`)},onBack:()=>y(`integration`),onForward:x}),l===`meeting`&&(0,q.jsx)(Ri,{scheduledTime:F??void 0,awaitingTime:ce,onDone:()=>v(`looking`),onBack:()=>y(`letschat`),onForward:x}),l===`looking`&&(0,q.jsx)(Gi,{onDone:()=>v(Ie?`suggestions`:`results`),onBack:()=>y(Ee?`integration`:`letschat`),onAdvance:e=>Se(Math.min(e+1,4)),onForward:x,ready:!Fe}),l===`results`&&(0,q.jsx)(qi,{claims:B.claims,loading:Fe,onContinue:e=>{P&&R&&e.length>0&&(je.current=Bn({assistantId:R,conversationId:P,removedClaims:e,rejectedAll:!1})),v(`suggestions`)},onRejectAll:()=>{P&&R&&(je.current=Bn({assistantId:R,conversationId:P,removedClaims:B.claims.map(e=>e.claim),rejectedAll:!0})),v(`suggestions`,`skipped`)},onBack:()=>y(`looking`),onForward:x}),l===`suggestions`&&(0,q.jsx)(Xi,{installedPlugins:B.installedPlugins,pluginCatalog:B.pluginCatalog,onStart:async()=>{if(it(nt.suggestions,{userId:n,outcome:`completed`}),Ne){m([]),u(`finishing`);return}await Re()},onBack:()=>y(Ie?`looking`:`results`),onForward:x}),l===`suggestions`&&!1,l===`finishing`&&(0,q.jsx)(Ki,{ready:!Ne,onDone:()=>void Re()})]})})}return l===`existing`?(0,q.jsx)(ia,{assistantName:T?.assistantName??null,onKeep:()=>{it(nt.existing,{userId:n,outcome:`completed`}),ve(n),ie.checkAssistant(R??void 0).finally(()=>{e(de.assistant,{replace:!0})})},onRedo:()=>{let e=O;e&&(j.current=!0,it(nt.existing,{userId:n,outcome:`skipped`}),C(e),ze(e),m([]),_(`face`))},onBack:()=>{A(null),y(`form`)}}):l===`intro`&&S?(0,q.jsx)(Kr,{firstName:S.firstName,assistantName:M?.name,onContinue:()=>v(`different`),onBack:()=>y(`face`),onForward:x}):l===`face`&&S?(0,q.jsx)(Fr,{onContinue:e=>{N(e),v(`intro`)},onBack:()=>y(`form`),onForward:x}):(0,q.jsx)(jr,{initialFirstName:t?.firstName??``,initialLastName:t?.lastName??``,onSubmit:Be})}export{ca as ResearchOnboardingRoute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-IRfcSUxS.js";import{r as t}from"./api-errors-
|
|
1
|
+
import{t as e}from"./createLucideIcon-IRfcSUxS.js";import{r as t}from"./api-errors-0nSIbmmG.js";var n=e(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),r={medium:[`small`,`medium`],large:[`small`,`medium`,`large`],xl:[`small`,`medium`,`large`,`extra_large`]};function i(e){return e?r[e]??[]:[]}var a={small:`Small`,medium:`Medium`,large:`Large`,extra_large:`Extra Large`},o={small:`2 vCPU, 3 GiB`,medium:`2.5 vCPU, 5 GiB`,large:`4 vCPU, 8 GiB`,extra_large:`4 vCPU, 16 GiB`},s=[`small`,`medium`,`large`,`extra_large`];function c(e){return s.indexOf(e)}function l(e,t,n){return e.map(e=>({value:e,label:`${a[e]} — ${o[e]}`,suffix:e===t?n:void 0}))}var u=new Set([`exceeds_machine_tier`,`exceeds_storage_tier`]);function d(e,n){return e&&typeof e==`object`&&!Array.isArray(e)&&`error`in e&&typeof e.error==`string`&&u.has(e.error)?`That size isn't available on your plan.`:t(e,void 0,n)}export{i as a,n as c,r as i,o as n,l as o,a as r,c as s,d as t};
|
package/dist/assets/{resolved-assistants-store-DAzPZ1eV.js → resolved-assistants-store-DlAmO-LO.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./create-selectors-
|
|
1
|
+
import{n as e,t}from"./create-selectors-DDPM3N-z.js";import{$ as n,f as r,ft as i,m as a,mt as o,p as s,pt as c}from"./local-mode-EJ8VbJUL.js";function l(e,t){return e.filter(e=>e.isLocal||e.organizationId==null||e.organizationId===t)}var u=e((e,t)=>({assistants:[],activeAssistantId:null,selectedAssistantId:c(),assistantsHydrated:!1,setFromLockfile:n=>{let i=m(n),o=new Map(t().assistants.map(e=>[e.id,e]));e({assistants:n.assistants.map(e=>({id:e.assistantId,name:e.name,hatchedAt:e.hatchedAt,cloud:e.cloud,runtimeVersion:e.resources?.runtimeVersion,currentReleaseVersion:o.get(e.assistantId)?.currentReleaseVersion,releaseChannel:o.get(e.assistantId)?.releaseChannel,isActiveLockfileAssistant:i===e.assistantId,isLocal:r(e),isPlatformHosted:a(e),organizationId:e.organizationId})),assistantsHydrated:!0}),d(t,e)},setFromApi:t=>e({assistantsHydrated:!0,assistants:t.map(e=>{let t=p(e.id);return{id:e.id,name:e.name,hatchedAt:e.created,cloud:t.cloud,runtimeVersion:t.runtimeVersion,currentReleaseVersion:e.current_release_version,releaseChannel:e.release_channel,isActiveLockfileAssistant:t.isActiveLockfileAssistant,isLocal:e.is_local,isPlatformHosted:!e.is_local}})}),markHydrated:()=>e({assistantsHydrated:!0}),upsertFromApi:t=>e(e=>{let n={id:t.id,name:t.name,hatchedAt:t.created,currentReleaseVersion:t.current_release_version,releaseChannel:t.release_channel,isLocal:t.is_local,isPlatformHosted:!t.is_local},r=e.assistants.findIndex(e=>e.id===t.id);if(r>=0){let i=[...e.assistants],a=p(t.id);return i[r]={...n,cloud:a.cloud??i[r].cloud,organizationId:i[r].organizationId,runtimeVersion:a.runtimeVersion??i[r].runtimeVersion,isActiveLockfileAssistant:a.isActiveLockfileAssistant??i[r].isActiveLockfileAssistant},{assistants:i}}let i=p(t.id);return{assistants:[...e.assistants,{...n,cloud:i.cloud,organizationId:i.organizationId,runtimeVersion:i.runtimeVersion,isActiveLockfileAssistant:i.isActiveLockfileAssistant}]}}),remove:t=>e(e=>({assistants:e.assistants.filter(e=>e.id!==t)})),clear:()=>e({assistants:[]}),setActiveAssistantId:t=>e({activeAssistantId:t}),setSelectedAssistant:t=>{t==null?i():o(t),e({selectedAssistantId:t})}}));function d(e,t){let{assistants:n,selectedAssistantId:r,assistantsHydrated:a}=e();!a||r==null||n.some(e=>e.id===r)||(i(),t({selectedAssistantId:null}))}var f=t(u);function p(e){let t=n.getState().lockfile,r=t?.assistants.find(t=>t.assistantId===e),i=t?m(t):null;return{cloud:r?.cloud,organizationId:r?.organizationId,runtimeVersion:r?.resources?.runtimeVersion,isActiveLockfileAssistant:t?i===e:void 0}}function m(e){return e.activeAssistant&&e.assistants.some(t=>t.assistantId===e.activeAssistant)?e.activeAssistant:e.assistants.length===1?e.assistants[0]?.assistantId??null:null}s()&&n.subscribe(e=>{e.lockfile&&e.committed&&u.getState().setFromLockfile(e.lockfile)}),typeof window<`u`&&window.addEventListener(`storage`,e=>{(e.key===null||e.key===`vellum:selectedAssistantId`)&&u.setState({selectedAssistantId:c()})});export{f as n,l as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./domains-
|
|
1
|
+
import{n as e}from"./domains-Cppe2cjB.js";var t=/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;function n(n,r){if(!n)return r;if(t.test(n)){try{let t=new URL(n);if(t.protocol===`https:`&&e(t.hostname))return n}catch{}return r}return n.startsWith(`//`)||n.includes(`\\`)||!n.startsWith(`/`)?r:n}export{n as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-amTXFI-2.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-amTXFI-2.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{t as o}from"./is-electron-DVNj-pbz.js";import{d as s,i as c,n as l}from"./auth-store-g_yS_oCN.js";import{t as u}from"./return-to-Xo7wdaST.js";import{c as d}from"./routes-CPNLHbhb.js";import{c as f,d as p,f as m,l as h,p as g,u as _}from"./prefs-Dl-v2TTW.js";import{Cr as v,Mi as y,ln as b}from"./index-KzfXKHkT.js";import{n as x,t as S}from"./consent-controls-DfdDxos6.js";var C=e(t(),1),w={},T={"2026-06-22":[`Introduces Together AI as a new managed model provider`]};function E(e){return w[e]??[]}function D(e){return T[e]??[]}var O=a();function k(){let e=r(),[t]=i(),a=l.use.user()?.id??null,w=l.use.logout(),T=o(),k=c(),[A,j]=g(),[M,N]=_(),[P,F]=p(),[I,L]=m(),[R]=f(),[z]=h(),[B]=(0,C.useState)(()=>!A),[V]=(0,C.useState)(()=>!M),[H]=(0,C.useState)(()=>!R),[U]=(0,C.useState)(()=>!z),W=!B&&!V&&!H&&!U,G=B||W,K=V||W,q=H||W,J=U||W,Y=!W&&!B&&!V,X=W?`Terms & privacy`:Y?`Review your privacy preferences`:`Updated terms`,Z=W?`Review your terms and privacy preferences anytime.`:Y?`Confirm your privacy preferences to continue.`:`We've updated our terms. Please review and accept to continue.`,Q=(0,C.useCallback)(()=>{s({userId:a,tos:A,privacy:M,shareAnalytics:q?P:null,shareDiagnostics:J?I:null,hasPlatformSession:k}),e(u(t.get(`returnTo`),d.assistant),{replace:!0})},[M,k,e,t,P,I,q,J,A,a]),$=(0,C.useCallback)(async()=>{await w(),v(d.account.login)},[w]),ee=G&&!A||K&&!M;return(0,O.jsx)(b,{showCreatureFooter:!1,children:(0,O.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${T?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[(0,O.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,O.jsx)(y,{className:`h-6 w-6 text-[var(--content-secondary)]`,strokeWidth:1.75})}),(0,O.jsx)(`h1`,{className:`mt-5 ${T?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,style:{animation:`fadeInUp 0.5s ease-out 0.12s both`},children:X}),(0,O.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${T?`mt-3`:`mt-3.5`}`,style:{animation:`fadeInUp 0.5s ease-out 0.2s both`},children:Z}),(q||J)&&(0,O.jsx)(x,{electron:T,showAnalytics:q,showDiagnostics:J,shareAnalytics:P,shareDiagnostics:I,onShareAnalyticsChange:F,onShareDiagnosticsChange:L,className:`mt-9 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.28s both`}}),(K||G)&&(0,O.jsx)(S,{electron:T,showPrivacy:K,showTos:G,privacyConsent:M,tosAccepted:A,onPrivacyChange:N,onTosChange:j,privacyNotes:K?D(`2026-06-22`):[],tosNotes:G?E(`2026-06-08`):[],className:`mt-6 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.36s both`}}),(0,O.jsxs)(`div`,{className:`mt-9 flex w-full flex-col ${T?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.44s both`},children:[(0,O.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:ee,onClick:Q,className:T?void 0:`h-11 text-base`,children:`Continue`}),(0,O.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:$,className:T?void 0:`h-11 text-base`,children:`Log out`})]})]})})}export{k as ReviewTermsScreen};
|