@vellumai/web 0.10.2-dev.202606250318.5e7cfb0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{BundleConfirmPage-BtzL80Qk.js → BundleConfirmPage-B1RL5CT5.js} +1 -1
- package/dist/assets/{Combination-4Qc3vrtW.js → Combination-CDqVzelh.js} +1 -1
- package/dist/assets/about-page-B-yNJBih.js +1 -0
- package/dist/assets/{account-page-D33dplvt.js → account-page-CHiDb1yX.js} +1 -1
- package/dist/assets/{account-shell-DwNlgySJ.js → account-shell-BBL0HqTX.js} +1 -1
- package/dist/assets/{add-credits-modal-JV9bRykb.js → add-credits-modal-GSsxaybq.js} +1 -1
- package/dist/assets/{advanced-page-8ixlbCWp.js → advanced-page-9dJbjOiT.js} +1 -1
- package/dist/assets/ai-page-Du6k7XV_.js +1 -0
- package/dist/assets/{api-2kc3MHRz.js → api-CjVG_nMi.js} +1 -1
- package/dist/assets/{api-key-screen-BpRHt4Lt.js → api-key-screen-BBajxzG8.js} +1 -1
- package/dist/assets/archive-page-DDar_tND.js +1 -0
- package/dist/assets/assistant-api-BX_B1xSC.js +1 -0
- package/dist/assets/{assistant-feature-flag-store-JvmVqyKj.js → assistant-feature-flag-store-BD9zTDcP.js} +1 -1
- package/dist/assets/{assistant-identity-store-CKjnoLSp.js → assistant-identity-store-DaDnhbxy.js} +1 -1
- package/dist/assets/{assistant-status-panel-uT89KhYE.js → assistant-status-panel-CFhkAfJY.js} +1 -1
- package/dist/assets/auth-store-CbVvQiBR.js +7 -0
- package/dist/assets/billing-page-BByuYpJa.js +3 -0
- package/dist/assets/{bookmarks-page-CWQD9IL4.js → bookmarks-page-DyjSZPPW.js} +1 -1
- package/dist/assets/build-state-CMpEWWjf.js +1 -0
- package/dist/assets/cable-C0pEWbc5.js +1 -0
- package/dist/assets/{capture-error-Hr1Yo2kx.js → capture-error-AoUURkgi.js} +1 -1
- package/dist/assets/{checkbox-BqCzUvXM.js → checkbox-ChtGq7OI.js} +1 -1
- package/dist/assets/{client-feature-flag-store-CtxCu0Fm.js → client-feature-flag-store-DjN8fxHA.js} +1 -1
- package/dist/assets/client.gen-0CkwJ2Ya.js +6 -0
- package/dist/assets/{command-palette-CwwGq47h.js → command-palette-DJgHXop1.js} +1 -1
- package/dist/assets/command-palette-window-page-CSaRzD87.js +1 -0
- package/dist/assets/community-page-BuuYKT7i.js +1 -0
- package/dist/assets/{confirm-dialog-CfOXCE1N.js → confirm-dialog-SpCsmAdG.js} +1 -1
- package/dist/assets/{connect-page-BQzNnPDo.js → connect-page-B0Pym3dJ.js} +1 -1
- package/dist/assets/{consent-controls-Do5c-TEL.js → consent-controls-o06cSwWt.js} +1 -1
- package/dist/assets/{contacts-gateway-BUGZkpwV.js → contacts-gateway-11r4y5pQ.js} +1 -1
- package/dist/assets/contacts-page-route-YQf7Dxxo.js +1 -0
- package/dist/assets/conversation-queries-DF1Lujnm.js +1 -0
- package/dist/assets/{danger-zone-redirect-page-CyYcO_Bc.js → danger-zone-redirect-page-iCmRnyei.js} +1 -1
- package/dist/assets/debug-page-CXi6rNhS.js +2 -0
- package/dist/assets/{deploy-dialogs-CashIumn.js → deploy-dialogs-DygUf1og.js} +1 -1
- package/dist/assets/{detail-card-C5Y8BJ-M.js → detail-card-QPVpO5cj.js} +1 -1
- package/dist/assets/{developer-page-DL-fI0TO.js → developer-page-C5desNav.js} +1 -1
- package/dist/assets/devices-page-mF5RECdQ.js +1 -0
- package/dist/assets/dictation-overlay-page-DL5K7HYW.js +1 -0
- package/dist/assets/{dist-B0Gf-knw.js → dist-cZPU9ZZL.js} +1 -1
- package/dist/assets/document-viewer-page-C2oFS1wI.js +1 -0
- package/dist/assets/dollar-sign-D_XmiHA-.js +1 -0
- package/dist/assets/dropdown-yOV5eJnU.js +1 -0
- package/dist/assets/earn-credits-modal-DsuqrJTY.js +1 -0
- package/dist/assets/{emails-page-DG9jcRgR.js → emails-page-Duy9jhr6.js} +1 -1
- package/dist/assets/{esm-DLfKHBEV.js → esm-B9FuN3Io.js} +2 -2
- package/dist/assets/esm-BIUrrGWd.js +2 -0
- package/dist/assets/esm-BT7uz_mC.js +2 -0
- package/dist/assets/esm-BU45yXtJ.js +2 -0
- package/dist/assets/esm-D51SsTmc.js +2 -0
- package/dist/assets/esm-KT7CwnAY.js +1 -0
- package/dist/assets/feature-flag-catalog-RZLmDa1F.js +1 -0
- package/dist/assets/file-editor-n2sYGdD-.js +1 -0
- package/dist/assets/general-page-BSdbq26O.js +1 -0
- package/dist/assets/google-logo-DNkI-jCf.js +1 -0
- package/dist/assets/hatching-screen-BRgjqSLd.js +1 -0
- package/dist/assets/home-page-route-CV_mh2wJ.js +1 -0
- package/dist/assets/hosting-screen--kBc2JgZ.js +1 -0
- package/dist/assets/identity-page-route-CDcFNfWw.js +1 -0
- package/dist/assets/index-BvIwFdLE.css +2 -0
- package/dist/assets/index-Cx6vyW7T.js +155 -0
- package/dist/assets/inspect-page-D03CXXMs.js +7 -0
- package/dist/assets/install-JGbHHiCV.js +1 -0
- package/dist/assets/integrations-page-BFPmyQdR.js +1 -0
- package/dist/assets/{intelligence-layout-DMzihErM.js → intelligence-layout-DgkmPrJl.js} +1 -1
- package/dist/assets/{keyboard-shortcuts-page-fVu9o-yV.js → keyboard-shortcuts-page-waVolRQN.js} +1 -1
- package/dist/assets/{library-detail-page-DP0yxH0U.js → library-detail-page-eMzOqx_B.js} +1 -1
- package/dist/assets/library-page-BwoQ9K34.js +1 -0
- package/dist/assets/{local-mode-CvrNMtPF.js → local-mode-BD2zqd9I.js} +3 -3
- package/dist/assets/{login-flow-BwciK6K2.js → login-flow-DVsR7fEC.js} +1 -1
- package/dist/assets/login-page-DYLjbG5w.js +1 -0
- package/dist/assets/{logout-page-C40-avfZ.js → logout-page-DRRS14hP.js} +1 -1
- package/dist/assets/{logs-layout-DZg-AWem.js → logs-layout-CSvew4_d.js} +1 -1
- package/dist/assets/mcp-page-CUehr_wQ.js +1 -0
- package/dist/assets/{memory-router-playground-page-Cm012A6P.js → memory-router-playground-page-A2zlGskJ.js} +1 -1
- package/dist/assets/menu-CdoNX1qx.js +1 -0
- package/dist/assets/{metric-card-CWmHKgJ1.js → metric-card-CgO1F06f.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-DZh7gvAM.js → mobile-sidebar-drawer-R6nyuXZ1.js} +1 -1
- package/dist/assets/{modal-D0Q3UWD0.js → modal-CHuPOsJJ.js} +1 -1
- package/dist/assets/mutation-error-BjiE6W0q.js +1 -0
- package/dist/assets/{native-file-CiaHiLEO.js → native-file-LJQTmnKy.js} +2 -2
- package/dist/assets/{notice-CqRgVmeL.js → notice-CynJKEow.js} +1 -1
- package/dist/assets/notifications-page-DcIQm_jh.js +1 -0
- package/dist/assets/{oauth-complete-page-B1kWw2Og.js → oauth-complete-page-BJudfLeY.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-DDq7jGu3.js → oauth-popup-complete-page-HRhzTWe_.js} +1 -1
- package/dist/assets/{page-shell-Cjnz9wcY.js → page-shell-W5IMIXQq.js} +1 -1
- package/dist/assets/{pairing-page-9gPAG9Bp.js → pairing-page-DS3k_UyF.js} +1 -1
- package/dist/assets/panel-item-BLQE_l-g.js +1 -0
- package/dist/assets/{password-reset-page-0JJf9uQW.js → password-reset-page-CDvLTa8S.js} +1 -1
- package/dist/assets/{platform-loopback-page-VubtH5VQ.js → platform-loopback-page-CKI-92-q.js} +1 -1
- package/dist/assets/plugin-detail-page-THfWbuJx.js +1 -0
- package/dist/assets/{plugins-page-BZU8D9K8.js → plugins-page-BxfKs2Np.js} +1 -1
- package/dist/assets/{popover-CL-JL6vG.js → popover-BsF65jZY.js} +1 -1
- package/dist/assets/prechat-route-uavNUOzg.js +1 -0
- package/dist/assets/{prefs-BZXZwawX.js → prefs-DP4g-Qgi.js} +1 -1
- package/dist/assets/privacy-page-Vq50i0Wv.js +1 -0
- package/dist/assets/privacy-screen-1ITDKJ6D.js +1 -0
- package/dist/assets/{provider-callback-page-DvABuAK6.js → provider-callback-page-tWLMyImI.js} +1 -1
- package/dist/assets/{provider-key-CQHnRygW.js → provider-key-g87caUSW.js} +1 -1
- package/dist/assets/{provider-signup-page-D1frFoUo.js → provider-signup-page-CBPV-1Ih.js} +1 -1
- package/dist/assets/proxy-l3iqYpig.js +1 -0
- package/dist/assets/{quick-input-page-DM-2Bywe.js → quick-input-page-CEPPTVs7.js} +1 -1
- package/dist/assets/react-query.gen-4ZMhZ-fj.js +1 -0
- package/dist/assets/{react-query.gen-rp6Krcco.js → react-query.gen-CRARj4mG.js} +1 -1
- package/dist/assets/{research-mock-page-BkfWYYvv.js → research-mock-page-Dln6TeKV.js} +1 -1
- package/dist/assets/research-onboarding-route-HWXEnr-H.js +30 -0
- package/dist/assets/{resize-errors-DnJEbHn4.js → resize-errors-CXz-pd2h.js} +1 -1
- package/dist/assets/{resolved-assistants-store-Cp4J43BK.js → resolved-assistants-store-DLNFVaZL.js} +1 -1
- package/dist/assets/return-to-DxTXKF-C.js +1 -0
- package/dist/assets/{review-terms-screen-CU2ewaCh.js → review-terms-screen-DuORfqOE.js} +1 -1
- package/dist/assets/{schedules-BrM_F49t.js → schedules-MF0cMAPX.js} +1 -1
- package/dist/assets/{sdk.gen-D-_js_oC.js → sdk.gen-0RzHFsEa.js} +1 -1
- package/dist/assets/sdk.gen-DtKkd6hs.js +1 -0
- package/dist/assets/select-assistant-screen-C2pCQCeh.js +1 -0
- package/dist/assets/{setting-row-zXvvnio2.js → setting-row-BHlMSre_.js} +1 -1
- package/dist/assets/settings-layout-Co57Zw8f.js +1 -0
- package/dist/assets/share-feedback-modal-C4yo471J.js +1 -0
- package/dist/assets/{sidebar-tree-DqbWGjtc.js → sidebar-tree-D0lNnpA6.js} +1 -1
- package/dist/assets/signup-page-P4juei29.js +1 -0
- package/dist/assets/{signup-shell-BXHsln7h.js → signup-shell-CEJE1QSw.js} +1 -1
- package/dist/assets/skill-row-DDoJmniT.js +1 -0
- package/dist/assets/skills-page-KI_k-igb.js +1 -0
- package/dist/assets/{sound-manager-CzslfzDO.js → sound-manager-RQj5g2kL.js} +1 -1
- package/dist/assets/{sounds-page-DUqhtO8H.js → sounds-page-DFXhvf_o.js} +1 -1
- package/dist/assets/{src-CK6bncSg.js → src-BJj2O5XB.js} +39 -39
- package/dist/assets/{step-indicator-dots-GevsigEl.js → step-indicator-dots-Bx_0xTIr.js} +1 -1
- package/dist/assets/subagent-detail-panel-eXMmoVu4.js +4 -0
- package/dist/assets/subagent-status-DOJQZKTk.js +1 -0
- package/dist/assets/{system-events-page-qmixkQCI.js → system-events-page-BJJteZri.js} +1 -1
- package/dist/assets/{system-events-redirect-page-CE7VT7tY.js → system-events-redirect-page-CheSz42h.js} +1 -1
- package/dist/assets/{tag-B_-QAvJF.js → tag-CE_o2aao.js} +1 -1
- package/dist/assets/{tiptap-document-editor-BxjVeJVY.js → tiptap-document-editor-C8FlNAsc.js} +1 -1
- package/dist/assets/{toast-2TW5tj1Y.js → toast-CxaZ5f1d.js} +1 -1
- package/dist/assets/tool-detail-panel-DgVn-kKw.js +2 -0
- package/dist/assets/trace-page-CZICq31J.js +1 -0
- package/dist/assets/{upgrade-cancel-page-B2zxTHF3.js → upgrade-cancel-page-BQJOrigy.js} +1 -1
- package/dist/assets/{upgrade-success-page-CG6kLAG_.js → upgrade-success-page-BPRZMLDu.js} +1 -1
- package/dist/assets/{usage-page-CBNfUQ73.js → usage-page-DU36h2RZ.js} +1 -1
- package/dist/assets/{use-active-assistant-id-Dyfjqq4l.js → use-active-assistant-id-BlwRimQH.js} +1 -1
- package/dist/assets/{use-bus-subscription-BbiZXm1u.js → use-bus-subscription-D-1qIPnj.js} +1 -1
- package/dist/assets/use-is-org-ready-CRkh60tU.js +1 -0
- package/dist/assets/{use-onboarding-login-CyxtWkbT.js → use-onboarding-login-BZ4ismb6.js} +1 -1
- package/dist/assets/{use-plugin-drift-BozvaLNX.js → use-plugin-drift-C3gz_rng.js} +1 -1
- package/dist/assets/{use-reduced-motion-ChB7nOGe.js → use-reduced-motion-DgX4o6QR.js} +1 -1
- package/dist/assets/{utils-IBnUZTqY.js → utils-DugRzWBW.js} +1 -1
- package/dist/assets/{viewer-store-Dead64xY.js → viewer-store-9Ag85lFC.js} +1 -1
- package/dist/assets/{voice-page-Bb2WNf7q.js → voice-page-DB2h9uqJ.js} +1 -1
- package/dist/assets/{weather-forecast-display-BhdnLeQO.js → weather-forecast-display-DoCG5fqI.js} +1 -1
- package/dist/assets/{web-Dd6cS3PL.js → web-B4ULoQq5.js} +1 -1
- package/dist/assets/{web-DfbsgY66.js → web-ByMNu3A_.js} +1 -1
- package/dist/assets/{web-DbJBgRfO.js → web-CUTiBnsF.js} +1 -1
- package/dist/assets/{web-Dy2Asku5.js → web-CvCsdCeT.js} +1 -1
- package/dist/assets/{web-vUgUvidH.js → web-CyTCBnAZ.js} +1 -1
- package/dist/assets/{web-DU1iYtUx.js → web-DTFLfPeG.js} +1 -1
- package/dist/assets/{web-Drsd2-VM.js → web-DuA0h7oK.js} +1 -1
- package/dist/assets/{welcome-screen-BW3r0TgV.js → welcome-screen-z3RULgvo.js} +1 -1
- package/dist/assets/workflow-detail-panel-uiydoHie.js +1 -0
- package/dist/assets/workspace-page-9B98Z90n.js +1 -0
- package/dist/index.html +102 -112
- package/package.json +1 -1
- package/dist/assets/AnimatePresence-CgXwEO42.js +0 -9
- package/dist/assets/about-page-TvZeB1h8.js +0 -1
- package/dist/assets/ai-page-CGbDX-B6.js +0 -1
- package/dist/assets/app-info-DENEBxVU.js +0 -1
- package/dist/assets/archive-page-CzonAJC7.js +0 -1
- package/dist/assets/assistant-api-DROTS3Y9.js +0 -1
- package/dist/assets/auth-store-oJs_d4fj.js +0 -7
- package/dist/assets/billing-page-UyY01h_-.js +0 -3
- package/dist/assets/brain-Bs6LnfHO.js +0 -1
- package/dist/assets/browser-CcFF_rkO.js +0 -2
- package/dist/assets/build-state-FmoCmv9I.js +0 -1
- package/dist/assets/check-D6WkI0gF.js +0 -1
- package/dist/assets/command-palette-window-page-BSbqaBai.js +0 -1
- package/dist/assets/community-page-9po3ZChS.js +0 -1
- package/dist/assets/contacts-page-route-Bt_HKZmG.js +0 -9
- package/dist/assets/conversation-list-fetchers-UPVZq_6O.js +0 -1
- package/dist/assets/debug-page-Bftf5PaV.js +0 -2
- package/dist/assets/devices-page-CEV_io5z.js +0 -1
- package/dist/assets/diagnostics-BEB4VPwC.js +0 -1
- package/dist/assets/dictation-overlay-page-CRMcpxKx.js +0 -1
- package/dist/assets/document-viewer-page-JNmadcmx.js +0 -1
- package/dist/assets/dropdown-CL8VmqrY.js +0 -1
- package/dist/assets/earn-credits-modal-CoTxub53.js +0 -1
- package/dist/assets/esm-5gU3bjzq.js +0 -2
- package/dist/assets/esm-BCyLKT7G.js +0 -2
- package/dist/assets/esm-DjoRMdid.js +0 -2
- package/dist/assets/esm-THPAbEDt.js +0 -1
- package/dist/assets/esm-hCttZxWP.js +0 -2
- package/dist/assets/feature-flag-catalog-Cr353pcn.js +0 -1
- package/dist/assets/file-editor-BdxfXSj6.js +0 -1
- package/dist/assets/file-text-CmK9LY1p.js +0 -1
- package/dist/assets/general-page-CWqTFVxM.js +0 -1
- package/dist/assets/hatching-screen-CayA9Vsx.js +0 -1
- package/dist/assets/home-page-route-laqREkAr.js +0 -1
- package/dist/assets/hosting-screen-DJpdv7M5.js +0 -1
- package/dist/assets/identity-page-route-Cmu3jHD3.js +0 -1
- package/dist/assets/index-B52_AvAi.js +0 -132
- package/dist/assets/index-CopBy7jJ.css +0 -2
- package/dist/assets/inspect-page-BEwMECUP.js +0 -7
- package/dist/assets/install-DQhnhtoH.js +0 -1
- package/dist/assets/integrations-page-d5DqM7om.js +0 -1
- package/dist/assets/library-page-BCkENeDl.js +0 -1
- package/dist/assets/list-row-Cw9JYESP.js +0 -1
- package/dist/assets/login-page-B5CkEj5Q.js +0 -1
- package/dist/assets/menu-C_97pis4.js +0 -1
- package/dist/assets/messages-DHDZ32NT.js +0 -13
- package/dist/assets/monitor-D2okHi8o.js +0 -1
- package/dist/assets/mutation-error-CAcai9_z.js +0 -1
- package/dist/assets/notifications-page-CMTpDQzF.js +0 -1
- package/dist/assets/panel-item-nGTDevWP.js +0 -1
- package/dist/assets/plugin-detail-page-C0psVffK.js +0 -1
- package/dist/assets/prechat-B28Vzu55.js +0 -1
- package/dist/assets/prechat-route-B7Vm4Fu2.js +0 -1
- package/dist/assets/privacy-page-Cc2mPB0h.js +0 -1
- package/dist/assets/privacy-screen-BAr2D23N.js +0 -1
- package/dist/assets/proxy-DmIh4F51.js +0 -1
- package/dist/assets/react-query.gen-CQLyoqYk.js +0 -1
- package/dist/assets/research-onboarding-route-Cm6mHD6K.js +0 -36
- package/dist/assets/return-to-ByvaXBKr.js +0 -1
- package/dist/assets/risk-badge-6lK01djG.js +0 -1
- package/dist/assets/sdk.gen-1aYqVbMj.js +0 -6
- package/dist/assets/select-assistant-screen-Dbm7kkaQ.js +0 -1
- package/dist/assets/settings-layout-CXVDa9KM.js +0 -1
- package/dist/assets/share-feedback-modal-CSoSZKjm.js +0 -1
- package/dist/assets/signup-page-nqQCQjvy.js +0 -1
- package/dist/assets/skills-page-DJdy4T79.js +0 -1
- package/dist/assets/subagent-detail-panel-D8Q1FKeS.js +0 -4
- package/dist/assets/subagent-store-BLHGkTJR.js +0 -3
- package/dist/assets/tool-call-status-DTV5jmaU.js +0 -1
- package/dist/assets/tool-detail-panel-DzjYj94Q.js +0 -2
- package/dist/assets/trace-page-Dm5wvHA1.js +0 -1
- package/dist/assets/use-is-org-ready-Cca4wJgu.js +0 -1
- package/dist/assets/user-plus-C0OyQU83.js +0 -1
- package/dist/assets/workflow-detail-panel-BmAI3B0U.js +0 -1
- package/dist/assets/workflow-status-DmbjJPT4.js +0 -1
- package/dist/assets/workspace-page-CNdY5o6o.js +0 -1
- /package/dist/assets/{api-errors-CveHbhgb.js → api-errors-D3EsNrwn.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-DQodAnJD.js → avatar-bundled-components-f4-fradg.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-CEmN7KGI.js → avatar-svg-compositor-DMT4wmUm.js} +0 -0
- /package/dist/assets/{bookmark-C3S-p0MQ.js → bookmark-C8arQ3wm.js} +0 -0
- /package/dist/assets/{bug-DDcuQ3au.js → bug-BuL3O3_2.js} +0 -0
- /package/dist/assets/{build.umd-BrOC7S1V.js → build.umd-CPG-O6Se.js} +0 -0
- /package/dist/assets/{calendar-CpgH8CqM.js → calendar-BCNBN7PC.js} +0 -0
- /package/dist/assets/{chevron-left-DghyKSEE.js → chevron-left-o_oJAd6A.js} +0 -0
- /package/dist/assets/{chevron-right-B6vEpVY0.js → chevron-right-BNHlGCTg.js} +0 -0
- /package/dist/assets/{chevron-up-BRZN6p_l.js → chevron-up-BnW-hcOL.js} +0 -0
- /package/dist/assets/{circle-alert-DvNg50UK.js → circle-alert-bz1ccYRI.js} +0 -0
- /package/dist/assets/{circle-check-DzlJxj_M.js → circle-check-DBzb54Kz.js} +0 -0
- /package/dist/assets/{client.gen-Cs6pCK0s.js → client.gen-DzaL5PKF.js} +0 -0
- /package/dist/assets/{cloud-off-rAv4OHmv.js → cloud-off-BWmMU3G-.js} +0 -0
- /package/dist/assets/{code-aMX9iMYa.js → code-Bju_p7d-.js} +0 -0
- /package/dist/assets/{composer-focus-Bp1AiP29.js → composer-focus-D-P0cGAF.js} +0 -0
- /package/dist/assets/{conversation-selection-CtKjA5Ni.js → conversation-selection-CrdMTnwx.js} +0 -0
- /package/dist/assets/{conversation-store-DK-7gFAt.js → conversation-store-I2d3A6Tv.js} +0 -0
- /package/dist/assets/{cpu-CiHv3fhs.js → cpu-DpzMm9_m.js} +0 -0
- /package/dist/assets/{credit-card-BKRB1ZIi.js → credit-card-CN7yFHhB.js} +0 -0
- /package/dist/assets/{definitions-BVEXXekp.js → definitions-B4RRVbRh.js} +0 -0
- /package/dist/assets/{dist-BTp54SIT.js → dist-3i_EPbLt.js} +0 -0
- /package/dist/assets/{dist-cApvLul2.js → dist-BQHdyjQ3.js} +0 -0
- /package/dist/assets/{domain-field-DYwuCpup.js → domain-field-ChoXVdlk.js} +0 -0
- /package/dist/assets/{edit-chat-session-DJpqkkos.js → edit-chat-session-DXSCprPw.js} +0 -0
- /package/dist/assets/{effective-timezone-DrYGH2Lb.js → effective-timezone-DBaPUyaX.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-D9cXGKYH.js → emoji-catalog-data-C0EjtsOi.js} +0 -0
- /package/dist/assets/{environment-store-DXSuX0CL.js → environment-store-DoO5ZqXZ.js} +0 -0
- /package/dist/assets/{event-bus-Dl7-I4aL.js → event-bus-CFhOgvB8.js} +0 -0
- /package/dist/assets/{external-link-DPAtkBJ2.js → external-link-DAovIsxF.js} +0 -0
- /package/dist/assets/{format-0qTDTDhA.js → format-B2A6k4bb.js} +0 -0
- /package/dist/assets/{format-date-C-eCaBOj.js → format-date-Cx9GZ7-D.js} +0 -0
- /package/dist/assets/{format-file-size-Cnq-CdFe.js → format-file-size-Br1LCKQi.js} +0 -0
- /package/dist/assets/{globe-DYF_lSGm.js → globe-CfKniRIP.js} +0 -0
- /package/dist/assets/{haptics-CXHZxyAg.js → haptics-BCTVEX6s.js} +0 -0
- /package/dist/assets/{hard-drive-D7_5VMhi.js → hard-drive-DggmyfjR.js} +0 -0
- /package/dist/assets/{impersonate-version-flag-n-4oNLiO.js → impersonate-version-flag-BksY65Mo.js} +0 -0
- /package/dist/assets/{info-_OtUK1cX.js → info-DXbzDupm.js} +0 -0
- /package/dist/assets/{input-C8kfrq9r.js → input-Ch7OC6ME.js} +0 -0
- /package/dist/assets/{lib-CqoczjxJ.js → lib-BVvJNDCQ.js} +0 -0
- /package/dist/assets/{link-2-CaszbD7P.js → link-2-Dmka5LJV.js} +0 -0
- /package/dist/assets/{llm-dimension-Db-cwepb.js → llm-dimension-ovOt_D6t.js} +0 -0
- /package/dist/assets/{loader-circle-IIzBGiwm.js → loader-circle-Cw1KvvLK.js} +0 -0
- /package/dist/assets/{log-in-2iOsufxq.js → log-in-CUDpYpYW.js} +0 -0
- /package/dist/assets/{minimize-2-JE_UHZlJ.js → minimize-2-CPmn1RIm.js} +0 -0
- /package/dist/assets/{misc-BN2o2MEB.js → misc-Dm72afTZ.js} +0 -0
- /package/dist/assets/{moon-CK8MXzOo.js → moon-Be4Pgk5X.js} +0 -0
- /package/dist/assets/{native-deep-link-BYNI6pkW.js → native-deep-link-CYaeyOfj.js} +0 -0
- /package/dist/assets/{pdf-BJGZkYgE.js → pdf-DhvXjkis.js} +0 -0
- /package/dist/assets/{pencil-DbB9rxpY.js → pencil-Dm2eFMe3.js} +0 -0
- /package/dist/assets/{prechat-names-De-dVGbT.js → prechat-names-CkLrL-Jh.js} +0 -0
- /package/dist/assets/{progress-bar-DIFlWPPg.js → progress-bar-DFH5aT1D.js} +0 -0
- /package/dist/assets/{public-asset-Fx_laYnf.js → public-asset-CH9GPeL_.js} +0 -0
- /package/dist/assets/{reduced-motion-DYlLlcUm.js → reduced-motion-8QnGN6lg.js} +0 -0
- /package/dist/assets/{refresh-cw-Bf6LV0kG.js → refresh-cw-YXbpNg95.js} +0 -0
- /package/dist/assets/{routes-DVqkwUEe.js → routes-B9xcBuuC.js} +0 -0
- /package/dist/assets/{save-DEBQ_gbb.js → save-CQ2-kSlv.js} +0 -0
- /package/dist/assets/{semver-yC_Iq9co.js → semver-aan9RUyA.js} +0 -0
- /package/dist/assets/{sparkles-BICoewVE.js → sparkles-C8hCShdb.js} +0 -0
- /package/dist/assets/{stat-square-B0S3fO7O.js → stat-square-CraPxMcl.js} +0 -0
- /package/dist/assets/{toggle-X_kQW5my.js → toggle-95p73HGd.js} +0 -0
- /package/dist/assets/{triangle-alert-DKOyShqD.js → triangle-alert-AqQQTwUZ.js} +0 -0
- /package/dist/assets/{triangle-alert-Bz1PpciW.js → triangle-alert-DnZC45c-.js} +0 -0
- /package/dist/assets/{typed-storage-Dctd_K9F.js → typed-storage-qVehRaS3.js} +0 -0
- /package/dist/assets/{usage-window-FKG0JDAT.js → usage-window-DbWHZkbr.js} +0 -0
- /package/dist/assets/{use-is-mobile-Cy10kl9u.js → use-is-mobile-D_0cze0t.js} +0 -0
- /package/dist/assets/{x-KVxA2ZL0.js → x-BeVbiDS2.js} +0 -0
- /package/dist/assets/{x-C8bCmIhD.js → x-DE8JhiDZ.js} +0 -0
- /package/dist/assets/{xterm-7Iq3jX3h.js → xterm-B74sC241.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-XFgHFTPw.js → xterm-addon-fit-By7PlC-c.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D7s2Q_uG.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{f as o}from"./local-mode-CvrNMtPF.js";import{t as s}from"./is-electron-C_ZTVhv8.js";import{M as c,d as l,i as u,n as d}from"./auth-store-oJs_d4fj.js";import{a as f}from"./routes-DVqkwUEe.js";import{d as p,f as m,l as h,u as g}from"./prefs-BZXZwawX.js";import{t as _}from"./client-feature-flag-store-CtxCu0Fm.js";import{jt as v}from"./index-B52_AvAi.js";import{a as y,c as b,i as x,n as S,o as C,t as w}from"./step-indicator-dots-GevsigEl.js";import{n as T,t as E}from"./consent-controls-Do5c-TEL.js";var D=e(t(),1);function O({researchOnboardingEnabled:e,isNative:t,isLocalMode:n}){return e&&!t&&!n?f.onboarding.research:f.onboarding.hatching}var k=a();function A(){let e=r(),[t]=i(),a=d.use.user()?.id??null,A=s(),j=c(),M=_.use.stringFlags().preChatOnboardingExperiment20260606??`control`,N=_.use.researchOnboarding(),P=C(M),[F,I]=g(),[L,R]=p(),[z,B]=m(),[V,H]=h(),U=u();(0,D.useEffect)(()=>{j||y()},[j]);let W=t.get(`preview`)===`true`,G=(0,D.useCallback)(e=>{},[]),K=W?G:I,q=W?G:R,J=W?G:B,Y=W?G:H,X=(0,D.useCallback)(()=>{if(W){e(`${f.onboarding.prechat}?preview=true`);return}if(l({userId:a,tos:z,privacy:V,shareAnalytics:F,shareDiagnostics:L,hasPlatformSession:U}),!j){let e=b(P);x(S.privacyTos,{userId:a,variant:e})}let n=t.get(`hosting`),r=new URLSearchParams;n&&r.set(`hosting`,n);let i=r.toString();e(`${O({researchOnboardingEnabled:N,isNative:j,isLocalMode:o()})}${i?`?${i}`:``}`)},[V,U,j,W,e,P,N,t,F,L,z,a]);return(0,k.jsx)(v,{children:(0,k.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${A?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[j&&(0,k.jsx)(`div`,{className:`mb-8 flex w-full justify-center`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:(0,k.jsx)(w,{current:2,total:3})}),(0,k.jsx)(`h1`,{className:A?`text-title-large`:`text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.5s ease-out 0.1s both`},children:`Before You Start`}),(0,k.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${A?`mt-3.5`:`mt-4`}`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:`Choose your privacy preferences. You can update these anytime in the Settings.`}),(0,k.jsx)(T,{electron:A,shareAnalytics:F,shareDiagnostics:L,onShareAnalyticsChange:K,onShareDiagnosticsChange:q,className:`mt-8 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.4s both`}}),(0,k.jsx)(E,{electron:A,privacyConsent:V,tosAccepted:z,onPrivacyChange:Y,onTosChange:J,className:`mt-6 w-full`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`}}),(0,k.jsxs)(`div`,{className:`mt-8 flex w-full flex-col ${A?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.55s both`},children:[(0,k.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:!z||!V,onClick:X,className:A?void 0:`h-11 text-base`,children:`Start`}),(0,k.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:()=>e(-1),className:A?void 0:`h-11 text-base`,children:`Back`})]})]})})}export{A as PrivacyScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,n as t,o as n,r}from"./chunk-jRWAZmH_.js";import{t as i}from"./react-DJZBPgpf.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{n as o,r as s,t as c}from"./reduced-motion-DYlLlcUm.js";var l=a(),u=n(i(),1),d=(0,u.createContext)({});function f(e){let t=(0,u.useRef)(null);return t.current===null&&(t.current=e()),t.current}var p=typeof window<`u`?u.useLayoutEffect:u.useEffect,m=(0,u.createContext)(null);function h(e,t){e.indexOf(t)===-1&&e.push(t)}function g(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var _=(e,t,n)=>n>t?t:n<e?e:n,v=()=>{},y=()=>{},b={},x=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),S=e=>typeof e==`object`&&!!e,C=e=>/^0[^.\s]+$/u.test(e);function ee(e){let t;return()=>(t===void 0&&(t=e()),t)}var w=e=>e,T=(...e)=>e.reduce((e,t)=>n=>t(e(n))),E=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},te=class{constructor(){this.subscriptions=[]}add(e){return h(this.subscriptions,e),()=>g(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}},D=e=>e*1e3,O=e=>e/1e3,ne=(e,t)=>t?1e3/t*e:0,re=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ie=1e-7,ae=12;function oe(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=re(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ie&&++s<ae);return o}function se(e,t,n,r){if(e===t&&n===r)return w;let i=t=>oe(t,0,1,e,n);return e=>e===0||e===1?e:re(i(e),t,r)}var ce=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,le=e=>t=>1-e(1-t),ue=se(.33,1.53,.69,.99),de=le(ue),fe=ce(de),pe=e=>e>=1?1:(e*=2)<1?.5*de(e):.5*(2-2**(-10*(e-1))),me=e=>1-Math.sin(Math.acos(e)),he=le(me),ge=ce(me),_e=se(.42,0,1,1),ve=se(0,0,.58,1),ye=se(.42,0,.58,1),be=e=>Array.isArray(e)&&typeof e[0]!=`number`,xe=e=>Array.isArray(e)&&typeof e[0]==`number`,Se={linear:w,easeIn:_e,easeInOut:ye,easeOut:ve,circIn:me,circInOut:ge,circOut:he,backIn:de,backInOut:fe,backOut:ue,anticipate:pe},Ce=e=>typeof e==`string`,we=e=>{if(xe(e)){e.length;let[t,n,r,i]=e;return se(t,n,r,i)}else if(Ce(e))return Se[e],`${e}`,Se[e];return e},Te=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`],k={value:null,addProjectionMetrics:null};function Ee(e,t){let n=new Set,r=new Set,i=!1,a=!1,o=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},c=0;function l(t){o.has(t)&&(u.schedule(t),e()),c++,t(s)}let u={schedule:(e,t=!1,a=!1)=>{let s=a&&i?n:r;return t&&o.add(e),s.add(e),e},cancel:e=>{r.delete(e),o.delete(e)},process:e=>{if(s=e,i){a=!0;return}i=!0;let o=n;n=r,r=o,n.forEach(l),t&&k.value&&k.value.frameloop[t].push(c),c=0,n.clear(),i=!1,a&&(a=!1,u.process(e))}};return u}var De=40;function Oe(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Te.reduce((e,n)=>(e[n]=Ee(a,t?n:void 0),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=b.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,De),1)),i.timestamp=o,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),p.process(i),m.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(h))},g=()=>{n=!0,r=!0,i.isProcessing||e(h)};return{schedule:Te.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||g(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<Te.length;t++)o[Te[t]].cancel(e)},state:i,steps:o}}var{schedule:A,cancel:j,state:M,steps:ke}=Oe(typeof requestAnimationFrame<`u`?requestAnimationFrame:w,!0),Ae;function je(){Ae=void 0}var N={now:()=>(Ae===void 0&&N.set(M.isProcessing||b.useManualTiming?M.timestamp:performance.now()),Ae),set:e=>{Ae=e,queueMicrotask(je)}},Me={layout:0,mainThread:0,waapi:0},Ne=e=>t=>typeof t==`string`&&t.startsWith(e),Pe=Ne(`--`),Fe=Ne(`var(--`),Ie=e=>Fe(e)?Le.test(e.split(`/*`)[0].trim()):!1,Le=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Re(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var ze={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Be={...ze,transform:e=>_(0,1,e)},Ve={...ze,default:1},He=e=>Math.round(e*1e5)/1e5,Ue=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function We(e){return e==null}var Ge=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ke=(e,t)=>n=>!!(typeof n==`string`&&Ge.test(n)&&n.startsWith(e)||t&&!We(n)&&Object.prototype.hasOwnProperty.call(n,t)),qe=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Ue);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Je=e=>_(0,255,e),Ye={...ze,transform:e=>Math.round(Je(e))},Xe={test:Ke(`rgb`,`red`),parse:qe(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ye.transform(e)+`, `+Ye.transform(t)+`, `+Ye.transform(n)+`, `+He(Be.transform(r))+`)`};function Ze(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Qe={test:Ke(`#`),parse:Ze,transform:Xe.transform},$e=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),P=$e(`deg`),F=$e(`%`),I=$e(`px`),et=$e(`vh`),tt=$e(`vw`),nt={...F,parse:e=>F.parse(e)/100,transform:e=>F.transform(e*100)},rt={test:Ke(`hsl`,`hue`),parse:qe(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+F.transform(He(t))+`, `+F.transform(He(n))+`, `+He(Be.transform(r))+`)`},L={test:e=>Xe.test(e)||Qe.test(e)||rt.test(e),parse:e=>Xe.test(e)?Xe.parse(e):rt.test(e)?rt.parse(e):Qe.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?Xe.transform(e):rt.transform(e),getAnimatableNone:e=>{let t=L.parse(e);return t.alpha=0,L.transform(t)}},it=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function at(e){return isNaN(e)&&typeof e==`string`&&(e.match(Ue)?.length||0)+(e.match(it)?.length||0)>0}var ot=`number`,st=`color`,ct=`var`,lt=`var(`,ut="${}",dt=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function ft(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(dt,e=>(L.test(e)?(r.color.push(a),i.push(st),n.push(L.parse(e))):e.startsWith(lt)?(r.var.push(a),i.push(ct),n.push(e)):(r.number.push(a),i.push(ot),n.push(parseFloat(e))),++a,ut)).split(ut),indexes:r,types:i}}function pt(e){return ft(e).values}function mt({split:e,types:t}){let n=e.length;return r=>{let i=``;for(let a=0;a<n;a++)if(i+=e[a],r[a]!==void 0){let e=t[a];e===ot?i+=He(r[a]):e===st?i+=L.transform(r[a]):i+=r[a]}return i}}function ht(e){return mt(ft(e))}var gt=e=>typeof e==`number`?0:L.test(e)?L.getAnimatableNone(e):e,_t=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:gt(e);function vt(e){let t=ft(e);return mt(t)(t.values.map((e,n)=>_t(e,t.split[n])))}var R={test:at,parse:pt,createTransformer:ht,getAnimatableNone:vt};function yt(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function bt({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=yt(s,r,e+1/3),a=yt(s,r,e),o=yt(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function xt(e,t){return n=>n>0?t:e}var z=(e,t,n)=>e+(t-e)*n,St=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},Ct=[Qe,Xe,rt],wt=e=>Ct.find(t=>t.test(e));function Tt(e){let t=wt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===rt&&(n=bt(n)),n}var Et=(e,t)=>{let n=Tt(e),r=Tt(t);if(!n||!r)return xt(e,t);let i={...n};return e=>(i.red=St(n.red,r.red,e),i.green=St(n.green,r.green,e),i.blue=St(n.blue,r.blue,e),i.alpha=z(n.alpha,r.alpha,e),Xe.transform(i))},Dt=new Set([`none`,`hidden`]);function Ot(e,t){return Dt.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kt(e,t){return n=>z(e,t,n)}function At(e){return typeof e==`number`?kt:typeof e==`string`?Ie(e)?xt:L.test(e)?Et:Pt:Array.isArray(e)?jt:typeof e==`object`?L.test(e)?Et:Mt:xt}function jt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>At(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Mt(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=At(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function Nt(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]];n[i]=e.values[o]??0,r[a]++}return n}var Pt=(e,t)=>{let n=R.createTransformer(t),r=ft(e),i=ft(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?Dt.has(e)&&!i.values.length||Dt.has(t)&&!r.values.length?Ot(e,t):T(jt(Nt(r,i),i.values),n):(`${e}${t}`,xt(e,t))};function Ft(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?z(e,t,n):At(e)(e,t)}var It=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>A.update(t,e),stop:()=>j(t),now:()=>M.isProcessing?M.timestamp:N.now()}},Lt=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=Math.round(e(t/(i-1))*1e4)/1e4+`, `;return`linear(${r.substring(0,r.length-2)})`},Rt=2e4;function zt(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Bt(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(zt(r),Rt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:O(i)}}var B={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function Vt(e,t){return e*Math.sqrt(1-t*t)}var Ht=12;function Ut(e,t,n){let r=n;for(let n=1;n<Ht;n++)r-=e(r)/t(r);return r}var Wt=.001;function Gt({duration:e=B.duration,bounce:t=B.bounce,velocity:n=B.velocity,mass:r=B.mass}){let i,a;B.maxDuration;let o=1-t;o=_(B.minDamping,B.maxDamping,o),e=_(B.minDuration,B.maxDuration,O(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Vt(t,o),c=Math.exp(-i);return Wt-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=Vt(t**2,o);return(-i(t)+Wt>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Wt+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=Ut(i,a,s);if(e=D(e),isNaN(c))return{stiffness:B.stiffness,damping:B.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Kt=[`duration`,`bounce`],qt=[`stiffness`,`damping`,`mass`];function Jt(e,t){return t.some(t=>e[t]!==void 0)}function Yt(e){let t={velocity:B.velocity,stiffness:B.stiffness,damping:B.damping,mass:B.mass,isResolvedFromDuration:!1,...e};if(!Jt(e,qt)&&Jt(e,Kt))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*_(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:B.mass,stiffness:i,damping:a}}else{let n=Gt({...e,velocity:0});t={...t,...n,mass:B.mass},t.isResolvedFromDuration=!0}return t}function Xt(e=B.visualDuration,t=B.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=Yt({...n,velocity:-O(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=O(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?B.restSpeed.granular:B.restSpeed.default,i||=v?B.restDelta.granular:B.restDelta.default;let y,b,x,S,C,ee;if(h<1)x=Vt(_,h),S=(m+h*_*g)/x,y=e=>o-Math.exp(-h*_*e)*(S*Math.sin(x*e)+g*Math.cos(x*e)),C=h*_*S+g*x,ee=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+ee*Math.cos(x*e));else if(h===1){y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);let e=m+_*g;b=t=>Math.exp(-_*t)*(_*e*t-m)}else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e};let t=(m+h*_*g)/e,n=h*_*t-g*e,r=h*_*g-t*e;b=t=>{let i=Math.exp(-h*_*t),a=Math.min(e*t,300);return i*(n*Math.sinh(a)+r*Math.cosh(a))}}let w={calculatedDuration:p&&d||null,velocity:e=>D(b(e)),next:e=>{if(!p&&h<1){let t=Math.exp(-h*_*e),n=Math.sin(x*e),a=Math.cos(x*e),c=o-t*(S*n+g*a),l=D(t*(C*n+ee*a));return s.done=Math.abs(l)<=r&&Math.abs(o-c)<=i,s.value=s.done?o:c,s}let t=y(e);if(p)s.done=e>=d;else{let n=D(b(e));s.done=Math.abs(n)<=r&&Math.abs(o-t)<=i}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(zt(w),Rt),t=Lt(t=>w.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return w}Xt.applyToOptions=e=>{let t=Bt(e,100,Xt);return e.ease=t.ease,e.duration=D(t.duration),e.type=`keyframes`,e};var Zt=5;function Qt(e,t,n){let r=Math.max(t-Zt,0);return ne(n-e(r),t-r)}function $t({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=Xt({keyframes:[f.value,m(f.value)],velocity:Qt(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}function en(e,t,n){let r=[],i=n||b.mix||Ft,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=T(Array.isArray(t)?t[n]||w:t,a)),r.push(a)}return r}function tn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(t.length,a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=en(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=E(e[r],e[r+1],n);return s[r](i)};return n?t=>l(_(e[0],e[a-1],t)):l}function nn(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=E(0,t,r);e.push(z(n,1,i))}}function rn(e){let t=[0];return nn(t,e.length-1),t}function an(e,t){return e.map(e=>e*t)}function on(e,t){return e.map(()=>t||ye).splice(0,e.length-1)}function sn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=be(r)?r.map(we):we(r),a={done:!1,value:t[0]},o=tn(an(n&&n.length===t.length?n:rn(t),e),t,{ease:Array.isArray(i)?i:on(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var cn=e=>e!==null;function ln(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(cn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var un={decay:$t,inertia:$t,tween:sn,keyframes:sn,spring:Xt};function dn(e){typeof e.type==`string`&&(e.type=un[e.type])}var fn=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}},pn=e=>e/100,mn=class extends fn{constructor(e){super(),this.state=`idle`,this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==N.now()&&this.tick(N.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},Me.mainThread++,this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;dn(e);let{type:t=sn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||sn;s!==sn&&typeof o[0]!=`number`&&(this.mixKeyframes=T(pn,Ft(o[0],o[1])),o=[0,100]);let c=s({...e,keyframes:o});i===`mirror`&&(this.mirroredGenerator=s({...e,keyframes:[...o].reverse(),velocity:-a})),c.calculatedDuration===null&&(c.calculatedDuration=zt(c));let{calculatedDuration:l}=c;this.calculatedDuration=l,this.resolvedDuration=l+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime===null?this.currentTime=t:this.currentTime=this.holdTime}tick(e,t=!1){let{generator:n,totalDuration:r,mixKeyframes:i,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:s}=this;if(this.startTime===null)return n.next(0);let{delay:c=0,keyframes:l,repeat:u,repeatType:d,repeatDelay:f,type:p,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=r);let y=this.currentTime,b=n;if(u){let e=Math.min(this.currentTime,r)/o,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,u+1),t%2&&(d===`reverse`?(n=1-n,f&&(n-=f/o)):d===`mirror`&&(b=a)),y=_(0,1,n)*o}let x;v?(this.delayState.value=l[0],x=this.delayState):x=b.next(y),i&&!v&&(x.value=i(x.value));let{done:S}=x;!v&&s!==null&&(S=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);let C=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&S);return C&&p!==$t&&(x.value=ln(l,this.options,h,this.speed)),m&&m(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return O(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(this.currentTime)}set time(e){e=D(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state=`paused`,this.holdTime=e,this.tick(e))}getGeneratorVelocity(){let e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);let t=this.generator.next(e).value;return Qt(e=>this.generator.next(e).value,e,t)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;t&&this.driver&&this.updateTime(N.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=O(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=It,startTime:t}=this.options;this.driver||=e(e=>this.tick(e)),this.options.onPlay?.();let n=this.driver.now();this.state===`finished`?(this.updateFinished(),this.startTime=n):this.holdTime===null?this.startTime||=t??n:this.startTime=n-this.holdTime,this.state===`finished`&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state=`running`,this.driver.start()}pause(){this.state=`paused`,this.updateTime(N.now()),this.holdTime=this.currentTime}complete(){this.state!==`running`&&this.play(),this.state=`finished`,this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state=`finished`,this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state=`idle`,this.stopDriver(),this.startTime=this.holdTime=null,Me.mainThread--}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type=`keyframes`,this.options.ease=`linear`,this.initAnimation()),this.driver?.stop(),e.observe(this)}};function hn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var V=e=>e*180/Math.PI,gn=e=>vn(V(Math.atan2(e[1],e[0]))),_n={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:gn,rotateZ:gn,skewX:e=>V(Math.atan(e[1])),skewY:e=>V(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},vn=e=>(e%=360,e<0&&(e+=360),e),yn=gn,bn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),xn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Sn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:bn,scaleY:xn,scale:e=>(bn(e)+xn(e))/2,rotateX:e=>vn(V(Math.atan2(e[6],e[5]))),rotateY:e=>vn(V(Math.atan2(-e[2],e[0]))),rotateZ:yn,rotate:yn,skewX:e=>V(Math.atan(e[4])),skewY:e=>V(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Cn(e){return+!!e.includes(`scale`)}function wn(e,t){if(!e||e===`none`)return Cn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=Sn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=_n,i=t}if(!i)return Cn(t);let a=r[t],o=i[1].split(`,`).map(En);return typeof a==`function`?a(o):o[a]}var Tn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return wn(n,t)};function En(e){return parseFloat(e.trim())}var Dn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],On=new Set([...Dn,`pathRotation`]),kn=e=>e===ze||e===I,An=new Set([`x`,`y`,`z`]),jn=Dn.filter(e=>!An.has(e));function Mn(e){let t=[];return jn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var H={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`,boxSizing:r})=>{let i=e.max-e.min;return r===`border-box`?i:i-parseFloat(t)-parseFloat(n)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>wn(t,`x`),y:(e,{transform:t})=>wn(t,`y`)};H.translateX=H.x,H.translateY=H.y;var U=new Set,Nn=!1,Pn=!1,Fn=!1;function In(){if(Pn){let e=Array.from(U).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Mn(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{e.getValue(t)?.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Pn=!1,Nn=!1,U.forEach(e=>e.complete(Fn)),U.clear()}function Ln(){U.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Pn=!0)})}function Rn(){Fn=!0,Ln(),In(),Fn=!1}var zn=class{constructor(e,t,n,r,i,a=!1){this.state=`pending`,this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.state=`scheduled`,this.isAsync?(U.add(this),Nn||(Nn=!0,A.read(Ln),A.resolveKeyframes(In))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(e[0]===null){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}hn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),U.delete(this)}cancel(){this.state===`scheduled`&&(U.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},Bn=e=>e.startsWith(`--`);function Vn(e,t,n){Bn(t)?e.style.setProperty(t,n):e.style[t]=n}var Hn={};function Un(e,t){let n=ee(e);return()=>Hn[t]??n()}var Wn=Un(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Gn=Un(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Kn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,qn={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Kn([0,.65,.55,1]),circOut:Kn([.55,0,1,.45]),backIn:Kn([.31,.01,.66,-.59]),backOut:Kn([.33,1.53,.69,.99])};function Jn(e,t){if(e)return typeof e==`function`?Gn()?Lt(e,t):`ease-out`:xe(e)?Kn(e):Array.isArray(e)?e.map(e=>Jn(e,t)||qn.easeOut):qn[e]}function Yn(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:o=`loop`,ease:s=`easeOut`,times:c}={},l=void 0){let u={[t]:n};c&&(u.offset=c);let d=Jn(s,i);Array.isArray(d)&&(u.easing=d),k.value&&Me.waapi++;let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};l&&(f.pseudoElement=l);let p=e.animate(u,f);return k.value&&p.finished.finally(()=>{Me.waapi--}),p}function Xn(e){return typeof e==`function`&&`applyToOptions`in e}function Zn({type:e,...t}){return Xn(e)&&Gn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Qn=class extends fn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;let{element:t,name:n,keyframes:r,pseudoElement:i,allowFlatten:a=!1,finalKeyframe:o,onComplete:s}=e;this.isPseudoElement=!!i,this.allowFlatten=a,this.options=e,e.type;let c=Zn(e);this.animation=Yn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=ln(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Vn(t,n,e),this.animation.cancel()}s?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state===`finished`&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;e===`idle`||e===`finished`||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return O(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+O(e)}get time(){return O(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=D(e),t&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime===null?this.animation.playState:`finished`}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:t,rangeEnd:n,observe:r}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:`linear`}),this.animation.onfinish=null,e&&Wn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),w):r(this)}},$n={anticipate:pe,backInOut:fe,circInOut:ge};function er(e){return e in $n}function tr(e){typeof e.ease==`string`&&er(e.ease)&&(e.ease=$n[e.ease])}var nr=10,rr=class extends Qn{constructor(e){tr(e),dn(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:n,onComplete:r,element:i,...a}=this.options;if(!t)return;if(e!==void 0){t.set(e);return}let o=new mn({...a,autoplay:!1}),s=Math.max(nr,N.now()-this.startTime),c=_(0,nr,s-nr),l=o.sample(s).value,{name:u}=this.options;i&&u&&Vn(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},ir=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(R.test(e)||e===`0`)&&!e.startsWith(`url(`));function ar(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function or(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=ir(i,t),s=ir(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:ar(e)||(n===`spring`||Xn(n))&&r}function sr(e){e.duration=0,e.type=`keyframes`}var cr=new Set([`opacity`,`clipPath`,`filter`,`transform`]),lr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function ur(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&lr.test(e[t]))return!0;return!1}var dr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),fr=ee(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function pr(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:c,transformTemplate:l}=t.owner.getProps();return fr()&&n&&(cr.has(n)||dr.has(n)&&ur(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var mr=40,hr=class extends fn{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,keyframes:o,name:s,motionValue:c,element:l,...u}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=N.now();let d={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,name:s,motionValue:c,element:l,...u},f=l?.KeyframeResolver||zn;this.keyframeResolver=new f(o,(e,t,n)=>this.onKeyframesResolved(e,t,d,!n),s,c,l),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,t,n,r){this.keyframeResolver=void 0;let{name:i,type:a,velocity:o,delay:s,isHandoff:c,onUpdate:l}=n;this.resolvedAt=N.now();let u=!0;or(e,i,a,o)||(u=!1,(b.instantAnimations||!s)&&l?.(ln(e,n,t)),e[0]=e[e.length-1],sr(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>mr?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&pr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new rr({...d,element:p})}catch{m=new mn(d)}else m=new mn(d);m.finished.then(()=>{this.notifyFinished()}).catch(w),this.pendingTimeline&&=(this.stopTimeline=m.attachTimeline(this.pendingTimeline),void 0),this._animation=m}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),Rn()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function gr(e,t,n,r=0,i=1){let a=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),o=e.size,s=(o-1)*r;return typeof n==`function`?n(a,o):i===1?a*r:s-a*r}var _r=30,vr=e=>!isNaN(parseFloat(e)),yr={current:void 0},br=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=N.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=N.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=vr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new te);let n=this.events[e].add(t);return e===`change`?()=>{n(),A.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||=new Set,this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return yr.current&&yr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=N.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>_r)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,_r);return ne(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function W(e,t){return new br(e,t)}function xr(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function Sr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:xr(n,e)}var Cr={type:`spring`,stiffness:500,damping:25,restSpeed:10},wr=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Tr={type:`keyframes`,duration:.8},Er={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Dr=(e,{keyframes:t})=>t.length>2?Tr:On.has(e)?e.startsWith(`scale`)?wr(t[1]):Cr:Er,Or=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function kr(e){for(let t in e)if(!Or.has(t))return!0;return!1}var Ar=(e,t,n,r={},i,a)=>o=>{let s=Sr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=D(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};kr(s)||Object.assign(u,Dr(e,u)),u.duration&&=D(u.duration),u.repeatDelay&&=D(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(sr(u),u.delay===0&&(d=!0)),(b.instantAnimations||b.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,sr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=ln(u.keyframes,s);if(e!==void 0){A.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new mn(u):new hr(u)},jr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Mr(e){let t=jr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function Nr(e,t,n=1){`${e}`;let[r,i]=Mr(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return x(e)?parseFloat(e):e}return Ie(i)?Nr(i,t,n+1):i}function Pr(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Fr(e,t,n,r){if(typeof t==`function`){let[i,a]=Pr(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Pr(r);t=t(n===void 0?e.custom:n,i,a)}return t}function G(e,t,n){let r=e.getProps();return Fr(r,t,n===void 0?r.custom:n,e)}var Ir=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Dn]),Lr=e=>Array.isArray(e);function Rr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,W(n))}function zr(e){return Lr(e)?e[e.length-1]||0:e}function Br(e,t){let{transitionEnd:n={},transition:r={},...i}=G(e,t)||{};i={...i,...n};for(let t in i)Rr(e,t,zr(i[t]))}var K=e=>!!(e&&e.getVelocity);function Vr(e){return!!(K(e)&&e.add)}function Hr(e,t){let n=e.getValue(`willChange`);if(Vr(n))return n.add(t);if(!n&&b.WillChange){let n=new b.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function Ur(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Wr=`data-`+Ur(`framerAppearId`);function Gr(e){return e.props[Wr]}function Kr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function qr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?xr(a,c):c;let l=a?.reduceMotion,u=a?.skipAnimations;r&&(a=r);let d=[],f=i&&e.animationState&&e.animationState.getState()[i],p=a?.path;p&&p.animateVisualElement(e,s,a,n,d);for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||f&&Kr(f,t))continue;let o={delay:n,...Sr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){A.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=Gr(e);if(n){let e=window.MotionHandoffAnimation(n,t,A);e!==null&&(o.startTime=e,p=!0)}}Hr(e,t);let m=l??e.shouldReduceMotion;r.start(Ar(t,r,i,m&&Ir.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>A.update(()=>{o&&Br(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Jr(e,t,n={}){let r=G(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(qr(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Yr(e,t,r,a,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}else return Promise.all([a(),o(n.delay)])}function Yr(e,t,n=0,r=0,i=0,a=1,o){let s=[];for(let c of e.variantChildren)c.notify(`AnimationStart`,t),s.push(Jr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+gr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Xr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Jr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Jr(e,t,n);else{let i=typeof t==`function`?G(e,t,n.custom):t;r=Promise.all(qr(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var Zr={test:e=>e===`auto`,parse:e=>e},Qr=e=>t=>t.test(e),$r=[ze,I,F,P,tt,et,Zr],ei=e=>$r.find(Qr(e));function ti(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||C(e)}var ni=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function ri(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ue)||[];if(!r)return e;let i=n.replace(r,``),a=+!!ni.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ii=/\b([a-z-]*)\(.*?\)/gu,ai={...R,getAnimatableNone:e=>{let t=e.match(ii);return t?t.map(ri).join(` `):e}},oi={...R,getAnimatableNone:e=>{let t=R.parse(e);return R.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},si={...ze,transform:Math.round},ci={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,inset:I,insetBlock:I,insetBlockStart:I,insetBlockEnd:I,insetInline:I,insetInlineStart:I,insetInlineEnd:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,paddingBlock:I,paddingBlockStart:I,paddingBlockEnd:I,paddingInline:I,paddingInlineStart:I,paddingInlineEnd:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,marginBlock:I,marginBlockStart:I,marginBlockEnd:I,marginInline:I,marginInlineStart:I,marginInlineEnd:I,fontSize:I,backgroundPositionX:I,backgroundPositionY:I,rotate:P,pathRotation:P,rotateX:P,rotateY:P,rotateZ:P,scale:Ve,scaleX:Ve,scaleY:Ve,scaleZ:Ve,skew:P,skewX:P,skewY:P,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:Be,originX:nt,originY:nt,originZ:I,zIndex:si,fillOpacity:Be,strokeOpacity:Be,numOctaves:si},li={...ci,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:ai,WebkitFilter:ai,mask:oi,WebkitMask:oi},ui=e=>li[e],di=new Set([ai,oi]);function fi(e,t){let n=ui(e);return di.has(n)||(n=R),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var pi=new Set([`auto`,`none`,`0`]);function mi(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!pi.has(t)&&ft(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=fi(n,i)}var hi=class extends zn{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Ie(r))){let i=Nr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Ir.has(n)||e.length!==2)return;let[r,i]=e,a=ei(r),o=ei(i);if(Re(r)!==Re(i)&&H[n]){this.needsMeasurement=!0;return}if(a!==o)if(kn(a)&&kn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else H[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||ti(e[t]))&&n.push(t);n.length&&mi(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=H[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=H[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}};function gi(e,t,n){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>e!=null)}var _i=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function vi(e){return S(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:yi,cancel:bi}=Oe(queueMicrotask,!1),q={x:!1,y:!1};function xi(){return q.x||q.y}function Si(e){return e===`x`||e===`y`?q[e]?null:(q[e]=!0,()=>{q[e]=!1}):q.x||q.y?null:(q.x=q.y=!0,()=>{q.x=q.y=!1})}function Ci(e,t){let n=gi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function wi(e){return!(e.pointerType===`touch`||xi())}function Ti(e,t,n={}){let[r,i,a]=Ci(e,n);return r.forEach(e=>{let n=!1,r=!1,a,o=()=>{e.removeEventListener(`pointerleave`,u)},s=e=>{a&&=(a(e),void 0),o()},c=e=>{n=!1,window.removeEventListener(`pointerup`,c),window.removeEventListener(`pointercancel`,c),r&&(r=!1,s(e))},l=()=>{n=!0,window.addEventListener(`pointerup`,c,i),window.addEventListener(`pointercancel`,c,i)},u=e=>{if(e.pointerType!==`touch`){if(n){r=!0;return}s(e)}};e.addEventListener(`pointerenter`,n=>{if(!wi(n))return;r=!1;let o=t(e,n);typeof o==`function`&&(a=o,e.addEventListener(`pointerleave`,u,i))},i),e.addEventListener(`pointerdown`,l,i)}),a}var Ei=(e,t)=>t?e===t?!0:Ei(e,t.parentElement):!1,Di=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Oi=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function ki(e){return Oi.has(e.tagName)||e.isContentEditable===!0}var Ai=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function ji(e){return Ai.has(e.tagName)||e.isContentEditable===!0}var Mi=new WeakSet;function Ni(e){return t=>{t.key===`Enter`&&e(t)}}function Pi(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Fi=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ni(()=>{if(Mi.has(n))return;Pi(n,`down`);let e=Ni(()=>{Pi(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>Pi(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ii(e){return Di(e)&&!xi()}var Li=new WeakSet;function Ri(e,t,n={}){let[r,i,a]=Ci(e,n),o=e=>{let r=e.currentTarget;if(!Ii(e)||Li.has(e))return;Mi.add(r),n.stopPropagation&&Li.add(e);let a=t(r,e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),Mi.has(r)&&Mi.delete(r),Ii(e)&&typeof a==`function`&&a(e,{success:t})},s=e=>{o(e,r===window||r===document||n.useGlobalTarget||Ei(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),vi(e)&&(e.addEventListener(`focus`,e=>Fi(e,i)),!ki(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function zi(e){return S(e)&&`ownerSVGElement`in e}var Bi=new WeakMap,Vi,Hi=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:zi(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Ui=Hi(`inline`,`width`,`offsetWidth`),Wi=Hi(`block`,`height`,`offsetHeight`);function Gi({target:e,borderBoxSize:t}){Bi.get(e)?.forEach(n=>{n(e,{get width(){return Ui(e,t)},get height(){return Wi(e,t)}})})}function Ki(e){e.forEach(Gi)}function qi(){typeof ResizeObserver>`u`||(Vi=new ResizeObserver(Ki))}function Ji(e,t){Vi||qi();let n=gi(e);return n.forEach(e=>{let n=Bi.get(e);n||(n=new Set,Bi.set(e,n)),n.add(t),Vi?.observe(e)}),()=>{n.forEach(e=>{let n=Bi.get(e);n?.delete(t),n?.size||Vi?.unobserve(e)})}}var Yi=new Set,Xi;function Zi(){Xi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Yi.forEach(t=>t(e))},window.addEventListener(`resize`,Xi)}function Qi(e){return Yi.add(e),Xi||Zi(),()=>{Yi.delete(e),!Yi.size&&typeof Xi==`function`&&(window.removeEventListener(`resize`,Xi),Xi=void 0)}}function $i(e,t){return typeof e==`function`?Qi(e):Ji(e,t)}function ea(e){return zi(e)&&e.tagName===`svg`}var ta=[...$r,L,R],na=e=>ta.find(Qr(e)),ra=()=>({translate:0,scale:1,origin:0,originPoint:0}),ia=()=>({x:ra(),y:ra()}),aa=()=>({min:0,max:0}),J=()=>({x:aa(),y:aa()}),oa=new WeakMap;function sa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function ca(e){return typeof e==`string`||Array.isArray(e)}var la=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ua=[`initial`,...la];function da(e){return sa(e.animate)||ua.some(t=>ca(e[t]))}function fa(e){return!!(da(e)||e.variants)}function pa(e,t,n){for(let r in t){let i=t[r],a=n[r];if(K(i))e.addValue(r,i);else if(K(a))e.addValue(r,W(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,W(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var ma=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],ha={};function ga(e){ha=e}function _a(){return ha}var va=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,skipAnimations:i,blockInitialAnimation:a,visualState:o},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=zn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=N.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,A.render(this.render,!1,!0))};let{latestValues:c,renderState:l}=o;this.latestValues=c,this.baseTarget={...c},this.initialValues=t.initial?{...c}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.skipAnimationsConfig=i,this.options=s,this.blockInitialAnimation=!!a,this.isControllingVariants=da(t),this.isVariantNode=fa(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];c[e]!==void 0&&K(t)&&t.set(c[e])}}mount(e){if(this.hasBeenMounted)for(let e in this.initialValues)this.values.get(e)?.jump(this.initialValues[e]),this.latestValues[e]=this.initialValues[e];this.current=e,oa.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),this.reducedMotionConfig===`never`?this.shouldReduceMotion=!1:this.reducedMotionConfig===`always`?this.shouldReduceMotion=!0:(o.current||c(),this.shouldReduceMotion=s.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),j(this.notifyUpdate),j(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??=new Set,this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&cr.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Qn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:D(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=On.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&A.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),i;typeof window<`u`&&window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i&&i()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in ha){let t=ha[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):J()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<ma.length;t++){let n=ma[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=pa(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=W(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(x(n)||C(n))?n=parseFloat(n):!na(n)&&R.test(t)&&(n=fi(e,t)),this.setBaseTarget(e,K(n)?n.get():n)),K(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Fr(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!K(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new te),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){yi.render(this.render)}},ya=class extends va{constructor(){super(...arguments),this.KeyframeResolver=hi}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){let n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;K(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},Y=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function ba({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function xa({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Sa(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Ca(e){return e===void 0||e===1}function wa({scale:e,scaleX:t,scaleY:n}){return!Ca(e)||!Ca(t)||!Ca(n)}function Ta(e){return wa(e)||Ea(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ea(e){return Da(e.x)||Da(e.y)}function Da(e){return e&&e!==`0%`}function Oa(e,t,n){return n+t*(e-n)}function ka(e,t,n,r,i){return i!==void 0&&(e=Oa(e,i,r)),Oa(e,n,r)+t}function Aa(e,t=0,n=1,r,i){e.min=ka(e.min,t,n,r,i),e.max=ka(e.max,t,n,r,i)}function ja(e,{x:t,y:n}){Aa(e.x,t.translate,t.scale,t.originPoint),Aa(e.y,n.translate,n.scale,n.originPoint)}var Ma=.999999999999,Na=1.0000000000001;function Pa(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(X(e.x,-a.scroll.offset.x),X(e.y,-a.scroll.offset.y)),o&&(t.x*=o.x.scale,t.y*=o.y.scale,ja(e,o)),r&&Ta(a.latestValues)&&La(e,a.latestValues,a.layout?.layoutBox))}t.x<Na&&t.x>Ma&&(t.x=1),t.y<Na&&t.y>Ma&&(t.y=1)}function X(e,t){e.min+=t,e.max+=t}function Fa(e,t,n,r,i=.5){Aa(e,t,n,z(e.min,e.max,i),r)}function Ia(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function La(e,t,n){let r=n??e;Fa(e.x,Ia(t.x,r.x),t.scaleX,t.scale,t.originX),Fa(e.y,Ia(t.y,r.y),t.scaleY,t.scale,t.originY)}function Ra(e,t){return ba(Sa(e.getBoundingClientRect(),t))}function za(e,t,n){let r=Ra(e,n),{scroll:i}=t;return i&&(X(r.x,i.offset.x),X(r.y,i.offset.y)),r}var Ba={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Va=Dn.length;function Ha(e,t,n){let r=``,i=!0;for(let a=0;a<Va;a++){let o=Dn[a],s=e[o];if(s===void 0)continue;let c=!0;if(typeof s==`number`)c=s===+!!o.startsWith(`scale`);else{let e=parseFloat(s);c=o.startsWith(`scale`)?e===1:e===0}if(!c||n){let e=_i(s,ci[o]);if(!c){i=!1;let t=Ba[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${_i(a,ci.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Ua(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(On.has(e)){o=!0;continue}else if(Pe(e)){i[e]=n;continue}else{let t=_i(n,ci[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ha(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}function Wa(e,{style:t,vars:n},r,i){let a=e.style,o;for(o in t)a[o]=t[o];for(o in i?.applyProjectionStyles(a,r),n)a.setProperty(o,n[o])}function Ga(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ka={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(I.test(e))e=parseFloat(e);else return e;return`${Ga(e,t.target.x)}% ${Ga(e,t.target.y)}%`}},qa={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=R.parse(e);if(i.length>5)return r;let a=R.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=z(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Ja={borderRadius:{...Ka,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:Ka,borderTopRightRadius:Ka,borderBottomLeftRadius:Ka,borderBottomRightRadius:Ka,boxShadow:qa};function Ya(e,{layout:t,layoutId:n}){return On.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Ja[e]||e===`opacity`)}function Xa(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(K(r[t])||i&&K(i[t])||Ya(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Za(e){return window.getComputedStyle(e)}var Qa=class extends ya{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Wa}readValueFromInstance(e,t){if(On.has(t))return this.projection?.isProjecting?Cn(t):Tn(e,t);{let n=Za(e),r=(Pe(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ra(e,t)}build(e,t,n){Ua(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Xa(e,t,n)}},$a={offset:`stroke-dashoffset`,array:`stroke-dasharray`},eo={offset:`strokeDashoffset`,array:`strokeDasharray`};function to(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?$a:eo;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var no=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function ro(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Ua(e,s,l),c){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:d,style:f}=e;d.transform&&(f.transform=d.transform,delete d.transform),(f.transform||d.transformOrigin)&&(f.transformOrigin=d.transformOrigin??`50% 50%`,delete d.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??`fill-box`,delete d.transformBox);for(let e of no)d[e]!==void 0&&(f[e]=d[e],delete d[e]);t!==void 0&&(d.x=t),n!==void 0&&(d.y=n),r!==void 0&&(d.scale=r),i!==void 0&&to(d,i,a,o,!1)}var io=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]),ao=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function oo(e,t,n,r){Wa(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(io.has(n)?n:Ur(n),t.attrs[n])}function so(e,t,n){let r=Xa(e,t,n);for(let n in e)if(K(e[n])||K(t[n])){let t=Dn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var co=class extends ya{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=J}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(On.has(t)){let e=ui(t);return e&&e.default||0}return t=io.has(t)?t:Ur(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return so(e,t,n)}build(e,t,n){ro(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){oo(e,t,n,r)}mount(e){this.isSVGTag=ao(e.tagName),super.mount(e)}},lo=ua.length;function uo(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&uo(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<lo;n++){let r=ua[n],i=e.props[r];(ca(i)||i===!1)&&(t[r]=i)}return t}function fo(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var po=[...la].reverse(),mo=la.length;function ho(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Xr(e,t,n)))}function go(e){let t=ho(e),n=yo(),r=!0,i=!1,a=t=>(n,r)=>{let i=G(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function o(n){t=n(e)}function s(o){let{props:s}=e,c=uo(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<mo;t++){let p=po[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=ca(h),_=p===o?m.isActive:null;_===!1&&(f=t);let v=h===c[p]&&h!==s[p]&&g;if(v&&(r||i)&&e.manuallyAnimateOnMount&&(v=!1),m.protectedKeys={...d},!m.isActive&&_===null||!h&&!m.prevProp||sa(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=_o(m.prevProp,h),b=y||p===o&&m.isActive&&!v&&g||t>f&&g,x=!1,S=Array.isArray(h)?h:[h],C=S.reduce(a(p),{});_===!1&&(C={});let{prevResolvedValues:ee={}}=m,w={...ee,...C},T=t=>{b=!0,u.has(t)&&(x=!0,u.delete(t)),m.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=C[e],n=ee[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Lr(t)&&Lr(n)?!fo(t,n)||y:t!==n,r?t==null?u.add(e):T(e):t!==void 0&&u.has(e)?T(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let E=v&&y;b&&(!E||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!E&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=G(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=gr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=G(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),l.push({animation:t})}let p=!!l.length;return r&&(s.initial===!1||s.initial===s.animate)&&!e.manuallyAnimateOnMount&&(p=!1),r=!1,i=!1,p?t(l):Promise.resolve()}function c(t,r){if(n[t].isActive===r)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let i=s(t);for(let e in n)n[e].protectedKeys={};return i}return{animateChanges:s,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=yo(),i=!0}}}function _o(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!fo(t,e):!1}function vo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function yo(){return{animate:vo(!0),whileInView:vo(),whileHover:vo(),whileTap:vo(),whileDrag:vo(),whileFocus:vo(),exit:vo()}}function bo(e,t){e.min=t.min,e.max=t.max}function Z(e,t){bo(e.x,t.x),bo(e.y,t.y)}function xo(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var So=1e-4,Co=1-So,wo=1+So,To=.01,Eo=0-To,Do=0+To;function Q(e){return e.max-e.min}function Oo(e,t,n){return Math.abs(e-t)<=n}function ko(e,t,n,r=.5){e.origin=r,e.originPoint=z(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=z(n.min,n.max,e.origin)-e.originPoint,(e.scale>=Co&&e.scale<=wo||isNaN(e.scale))&&(e.scale=1),(e.translate>=Eo&&e.translate<=Do||isNaN(e.translate))&&(e.translate=0)}function Ao(e,t,n,r){ko(e.x,t.x,n.x,r?r.originX:void 0),ko(e.y,t.y,n.y,r?r.originY:void 0)}function jo(e,t,n,r=0){e.min=(r?z(n.min,n.max,r):n.min)+t.min,e.max=e.min+Q(t)}function Mo(e,t,n,r){jo(e.x,t.x,n.x,r?.x),jo(e.y,t.y,n.y,r?.y)}function No(e,t,n,r=0){let i=r?z(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Q(t)}function Po(e,t,n,r){No(e.x,t.x,n.x,r?.x),No(e.y,t.y,n.y,r?.y)}function Fo(e,t,n,r,i){return e-=t,e=Oa(e,1/n,r),i!==void 0&&(e=Oa(e,1/i,r)),e}function Io(e,t=0,n=1,r=.5,i,a=e,o=e){if(F.test(t)&&(t=parseFloat(t),t=z(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=z(a.min,a.max,r);e===a&&(s-=t),e.min=Fo(e.min,t,n,s,i),e.max=Fo(e.max,t,n,s,i)}function Lo(e,t,[n,r,i],a,o){Io(e,t[n],t[r],t[i],t.scale,a,o)}var Ro=[`x`,`scaleX`,`originX`],zo=[`y`,`scaleY`,`originY`];function Bo(e,t,n,r){Lo(e.x,t,Ro,n?n.x:void 0,r?r.x:void 0),Lo(e.y,t,zo,n?n.y:void 0,r?r.y:void 0)}function Vo(e){return e.translate===0&&e.scale===1}function Ho(e){return Vo(e.x)&&Vo(e.y)}function Uo(e,t){return e.min===t.min&&e.max===t.max}function Wo(e,t){return Uo(e.x,t.x)&&Uo(e.y,t.y)}function Go(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ko(e,t){return Go(e.x,t.x)&&Go(e.y,t.y)}function qo(e){return Q(e.x)/Q(e.y)}function Jo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $(e){return[e(`x`),e(`y`)]}function Yo(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,pathRotation:i,rotateX:a,rotateY:o,skewX:s,skewY:c}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotate(${i}deg) `),a&&(r+=`rotateX(${a}deg) `),o&&(r+=`rotateY(${o}deg) `),s&&(r+=`skewX(${s}deg) `),c&&(r+=`skewY(${c}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var Xo=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`],Zo=Xo.length,Qo=e=>typeof e==`string`?parseFloat(e):e,$o=e=>typeof e==`number`||I.test(e);function es(e,t,n,r,i,a){i?(e.opacity=z(0,n.opacity??1,ns(r)),e.opacityExit=z(t.opacity??1,0,rs(r))):a&&(e.opacity=z(t.opacity??1,n.opacity??1,r));for(let i=0;i<Zo;i++){let a=Xo[i],o=ts(t,a),s=ts(n,a);o===void 0&&s===void 0||(o||=0,s||=0,o===0||s===0||$o(o)===$o(s)?(e[a]=Math.max(z(Qo(o),Qo(s),r),0),(F.test(s)||F.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=z(t.rotate||0,n.rotate||0,r))}function ts(e,t){return e[t]===void 0?e.borderRadius:e[t]}var ns=is(0,.5,he),rs=is(.5,.95,w);function is(e,t,n){return r=>r<e?0:r>t?1:n(E(e,t,r))}function as(e,t,n){let r=K(e)?e:W(e);return r.start(Ar(``,r,t,n)),r.animation}function os(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}var ss=(e,t)=>e.depth-t.depth,cs=class{constructor(){this.children=[],this.isDirty=!1}add(e){h(this.children,e),this.isDirty=!0}remove(e){g(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ss),this.isDirty=!1,this.children.forEach(e)}};function ls(e,t){let n=N.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(j(r),e(a-t))};return A.setup(r,!0),()=>j(r)}function us(e){return K(e)?e.get():e}var ds=class{constructor(){this.members=[]}add(e){h(this.members,e);for(let t=this.members.length-1;t>=0;t--){let n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;let r=n.instance;(!r||r.isConnected===!1)&&!n.snapshot&&(g(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(g(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){for(let t=this.members.indexOf(e)-1;t>=0;t--){let e=this.members[t];if(e.isPresent!==!1&&e.instance?.isConnected!==!1)return this.promote(e),!0}return!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.updateSnapshot(),e.scheduleRender();let{layoutDependency:r}=n.options,{layoutDependency:i}=e.options;(r===void 0||r!==i)&&(e.resumeFrom=n,t&&(n.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}},fs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ps={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},ms=[``,`X`,`Y`,`Z`],hs=1e3,gs=0;function _s(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function vs(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Gr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,A,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&vs(r)}function ys({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=gs++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,k.value&&(ps.nodes=ps.calculatedTargetDeltas=ps.calculatedProjections=0),this.nodes.forEach(Ss),this.nodes.forEach(js),this.nodes.forEach(Ms),this.nodes.forEach(Cs),k.addProjectionMetrics&&k.addProjectionMetrics(ps)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new cs)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new te),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t){if(this.instance)return;this.isSVG=zi(t)&&!ea(t),this.instance=t;let{layoutId:n,layout:r,visualElement:i}=this.options;if(i&&!i.current&&i.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(r||n)&&(this.isLayoutDirty=!0),e){let n,r=0,i=()=>this.root.updateBlockedByResize=!1;A.read(()=>{r=window.innerWidth}),e(t,()=>{let e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=ls(i,250),fs.hasAnimatedSinceResize&&(fs.hasAnimatedSinceResize=!1,this.nodes.forEach(As)))})}n&&this.root.registerSharedNode(n,this),this.options.animate!==!1&&i&&(n||r)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeLayoutChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let a=this.options.transition||i.getDefaultTransition()||zs,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=i.getProps(),c=!this.targetLayout||!Ko(this.targetLayout,r),l=!t&&n;if(this.options.layoutRoot||this.resumeFrom||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let t={...Sr(a,`layout`),onPlay:o,onComplete:s};(i.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t),this.setAnimationOrigin(e,l,t.path)}else t||As(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),j(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ns),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&vs(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,(typeof t.latestValues.x==`string`||typeof t.latestValues.y==`string`)&&(t.isLayoutDirty=!0),t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let e=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),e&&this.nodes.forEach(Es),this.nodes.forEach(Ts);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(Ds);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(Os),this.nodes.forEach(ks),this.nodes.forEach(bs),this.nodes.forEach(xs)):this.nodes.forEach(Ds),this.clearAllSnapshots();let e=N.now();M.delta=_(0,1e3/60,e-M.timestamp),M.timestamp=e,M.isProcessing=!0,ke.update.process(M),ke.preRender.process(M),ke.render.process(M),M.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ws),this.sharedNodes.forEach(Ps)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,A.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){A.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Q(this.snapshot.measuredBox.x)&&!Q(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||=J(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Ho(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Ta(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),Us(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return J();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Gs))){let{scroll:e}=this.root;e&&(X(t.x,e.offset.x),X(t.y,e.offset.y))}return t}removeElementScroll(e){let t=J();if(Z(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&Z(t,e),X(t.x,i.offset.x),X(t.y,i.offset.y))}return t}applyTransform(e,t=!1,n){let r=n||J();Z(r,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];!t&&n.options.layoutScroll&&n.scroll&&n!==n.root&&(X(r.x,-n.scroll.offset.x),X(r.y,-n.scroll.offset.y)),Ta(n.latestValues)&&La(r,n.latestValues,n.layout?.layoutBox)}return Ta(this.latestValues)&&La(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=J();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Ta(n.latestValues))continue;let r;n.instance&&(wa(n.latestValues)&&n.updateSnapshot(),r=J(),Z(r,n.measurePageBox())),Bo(t,n.latestValues,n.snapshot?.layoutBox,r)}return Ta(this.latestValues)&&Bo(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0?!0:e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==M.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;if(!this.layout||!(r||i))return;this.resolvedRelativeTargetAt=M.timestamp;let a=this.getClosestProjectingParent();a&&this.linkedParentVersion!==a.layoutVersion&&!a.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&a&&a.layout?this.createRelativeTarget(a,this.layout.layoutBox,a.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=J(),this.targetWithTransforms=J()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Mo(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):Z(this.target,this.layout.layoutBox),ja(this.target,this.targetDelta)):Z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&a&&!!a.resumingFrom==!!this.resumingFrom&&!a.options.layoutScroll&&a.target&&this.animationProgress!==1?this.createRelativeTarget(a,this.target,a.target):this.relativeParent=this.relativeTarget=void 0),k.value&&ps.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||wa(this.parent.latestValues)||Ea(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=J(),this.relativeTargetOrigin=J(),Po(this.relativeTargetOrigin,t,n,this.options.layoutAnchor||void 0),Z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===M.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;Z(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Pa(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=J());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(xo(this.prevProjectionDelta.x,this.projectionDelta.x),xo(this.prevProjectionDelta.y,this.projectionDelta.y)),Ao(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Jo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Jo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),k.value&&ps.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.visualElement?.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ia(),this.projectionDelta=ia(),this.projectionDeltaWithTransform=ia()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=ia();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=J(),c=(r?r.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,d=!!(c&&!u&&this.options.crossfade===!0&&!this.path.some(Rs));this.animationProgress=0;let f,p=n?.interpolateProjection(e);this.mixTargetDelta=t=>{let n=t/1e3,r=p?.(n);r?(o.x.translate=r.x,o.x.scale=z(e.x.scale,1,n),o.x.origin=e.x.origin,o.x.originPoint=e.x.originPoint,o.y.translate=r.y,o.y.scale=z(e.y.scale,1,n),o.y.origin=e.y.origin,o.y.originPoint=e.y.originPoint):(Fs(o.x,e.x,n),Fs(o.y,e.y,n)),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Po(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ls(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Wo(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=J(),Z(f,this.relativeTarget)),c&&(this.animationValues=a,es(a,i,this.latestValues,n,d,u)),r&&r.rotate!==void 0&&(this.animationValues||=a,this.animationValues.pathRotation=r.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&=(j(this.pendingAnimation),void 0),this.pendingAnimation=A.update(()=>{fs.hasAnimatedSinceResize=!0,Me.layout++,this.motionValue||=W(0),this.motionValue.jump(0,!1),this.currentAnimation=as(this.motionValue,[0,1e3],{...e,velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Me.layout--},onComplete:()=>{Me.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(hs),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&Ws(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||J();let t=Q(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=Q(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Z(t,n),La(t,i),Ao(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new ds),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return e?e.lead===this:!0}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&_s(`z`,e,r,this.animationValues);for(let t=0;t<ms.length;t++)_s(`rotate${ms[t]}`,e,r,this.animationValues),_s(`skew${ms[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible){e.visibility=`hidden`;return}let n=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,e.visibility=``,e.opacity=``,e.pointerEvents=us(t?.pointerEvents)||``,e.transform=n?n(this.latestValues,``):`none`;return}let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){this.options.layoutId&&(e.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,e.pointerEvents=us(t?.pointerEvents)||``),this.hasProjected&&!Ta(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Yo(this.projectionDeltaWithTransform,this.treeScale,i);n&&(a=n(i,a)),e.transform=a;let{x:o,y:s}=this.projectionDelta;e.transformOrigin=`${o.origin*100}% ${s.origin*100}% 0`,r.animationValues?e.opacity=r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:e.opacity=r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let t in Ja){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Ja[t],c=a===`none`?i[t]:n(i[t],r);if(o){let t=o.length;for(let n=0;n<t;n++)e[o[n]]=c}else s?this.options.visualElement.renderState.vars[t]=c:e[t]=c}this.options.layoutId&&(e.pointerEvents=r===this?us(t?.pointerEvents)||``:`none`)}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function bs(e){e.updateLayout()}function xs(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;if(i===`size`)$(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=Q(r);r.min=n[e].min,r.max=r.min+i});else if(i===`x`||i===`y`){let e=i===`x`?`y`:`x`;bo(a?t.measuredBox[e]:t.layoutBox[e],n[e])}else Ws(i,t.layoutBox,n)&&$(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=Q(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ia();Ao(o,n,t.layoutBox);let s=ia();a?Ao(s,e.applyTransform(r,!0),t.measuredBox):Ao(s,n,t.layoutBox);let c=!Ho(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=e.options.layoutAnchor||void 0,s=J();Po(s,t.layoutBox,i.layoutBox,o);let c=J();Po(c,n,a.layoutBox,o),Ko(s,c)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=c,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeLayoutChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ss(e){k.value&&ps.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function Cs(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ws(e){e.clearSnapshot()}function Ts(e){e.clearMeasurements()}function Es(e){e.isLayoutDirty=!0,e.updateLayout()}function Ds(e){e.isLayoutDirty=!1}function Os(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function ks(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function As(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function js(e){e.resolveTargetDelta()}function Ms(e){e.calcProjection()}function Ns(e){e.resetSkewAndRotation()}function Ps(e){e.removeLeadSnapshot()}function Fs(e,t,n){e.translate=z(t.translate,0,n),e.scale=z(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Is(e,t,n,r){e.min=z(t.min,n.min,r),e.max=z(t.max,n.max,r)}function Ls(e,t,n,r){Is(e.x,t.x,n.x,r),Is(e.y,t.y,n.y,r)}function Rs(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var zs={duration:.45,ease:[.4,0,.1,1]},Bs=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Vs=Bs(`applewebkit/`)&&!Bs(`chrome/`)?Math.round:w;function Hs(e){e.min=Vs(e.min),e.max=Vs(e.max)}function Us(e){Hs(e.x),Hs(e.y)}function Ws(e,t,n){return e===`position`||e===`preserve-aspect`&&!Oo(qo(t),qo(n),.2)}function Gs(e){return e!==e.root&&e.scroll?.wasRoot}var Ks=ys({attachResizeListener:(e,t)=>os(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),qs={current:void 0},Js=ys({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qs.current){let e=new Ks({});e.mount(window),e.setOptions({layoutScroll:!0}),qs.current=e}return qs.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),Ys=(0,u.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Xs(e=!0){let t=(0,u.useContext)(m);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,u.useId)();(0,u.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,u.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Zs=(0,u.createContext)({strict:!1}),Qs={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},$s=!1;function ec(){if($s)return;let e={};for(let t in Qs)e[t]={isEnabled:e=>Qs[t].some(t=>!!e[t])};ga(e),$s=!0}function tc(){return ec(),_a()}function nc(e){let t=tc();for(let n in e)t[n]={...t[n],...e[n]};ga(t)}var rc=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.propagate.ignoreStrict.viewport`.split(`.`));function ic(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||rc.has(e)}var ac=r({default:()=>oc}),oc,sc=t((()=>{throw oc={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),cc=e=>!ic(e);function lc(e){typeof e==`function`&&(cc=t=>t.startsWith(`on`)?!ic(t):e(t))}try{lc((sc(),e(ac)).default)}catch{}function uc(e,t,n){let r={};for(let i in e)i===`values`&&typeof e.values==`object`||K(e[i])||(cc(i)||n===!0&&ic(i)||!t&&!ic(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}var dc=(0,u.createContext)({});function fc(e,t){if(da(e)){let{initial:t,animate:n}=e;return{initial:t===!1||ca(t)?t:void 0,animate:ca(n)?n:void 0}}return e.inherit===!1?{}:t}function pc(e){let{initial:t,animate:n}=fc(e,(0,u.useContext)(dc));return(0,u.useMemo)(()=>({initial:t,animate:n}),[mc(t),mc(n)])}function mc(e){return Array.isArray(e)?e.join(` `):e}var hc=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function gc(e,t,n){for(let r in t)!K(t[r])&&!Ya(r,n)&&(e[r]=t[r])}function _c({transformTemplate:e},t){return(0,u.useMemo)(()=>{let n=hc();return Ua(n,t,e),Object.assign({},n.vars,n.style)},[t])}function vc(e,t){let n=e.style||{},r={};return gc(r,n,e),Object.assign(r,_c(e,t)),r}function yc(e,t){let n={},r=vc(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var bc=()=>({...hc(),attrs:{}});function xc(e,t,n,r){let i=(0,u.useMemo)(()=>{let n=bc();return ro(n,t,ao(r),e.transformTemplate,e.style),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};gc(t,e.style,e),i.style={...t,...i.style}}return i}var Sc=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function Cc(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(Sc.indexOf(e)>-1||/[A-Z]/u.test(e))}function wc(e,t,n,{latestValues:r},i,a=!1,o){let s=(o??Cc(e)?xc:yc)(t,r,i,e),c=uc(t,typeof e==`string`,a),l=e===u.Fragment?{}:{...c,...s,ref:n},{children:d}=t,f=(0,u.useMemo)(()=>K(d)?d.get():d,[d]);return(0,u.createElement)(e,{...l,children:f})}function Tc({scrapeMotionValuesFromProps:e,createRenderState:t},n,r,i){return{latestValues:Ec(n,r,i,e),renderState:t()}}function Ec(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=us(a[e]);let{initial:o,animate:s}=e,c=da(e),l=fa(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!sa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Fr(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Dc=e=>(t,n)=>{let r=(0,u.useContext)(dc),i=(0,u.useContext)(m),a=()=>Tc(e,t,r,i);return n?a():f(a)},Oc=Dc({scrapeMotionValuesFromProps:Xa,createRenderState:hc}),kc=Dc({scrapeMotionValuesFromProps:so,createRenderState:bc}),Ac=Symbol.for(`motionComponentSymbol`);function jc(e,t,n){let r=(0,u.useRef)(n);(0,u.useInsertionEffect)(()=>{r.current=n});let i=(0,u.useRef)(null);return(0,u.useCallback)(n=>{n&&e.onMount?.(n),t&&(n?t.mount(n):t.unmount());let a=r.current;if(typeof a==`function`)if(n){let e=a(n);typeof e==`function`&&(i.current=e)}else i.current?(i.current(),i.current=null):a(n);else a&&(a.current=n)},[t])}var Mc=(0,u.createContext)({});function Nc(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function Pc(e,t,n,r,i,a){let{visualElement:o}=(0,u.useContext)(dc),s=(0,u.useContext)(Zs),c=(0,u.useContext)(m),l=(0,u.useContext)(Ys),d=l.reducedMotion,f=l.skipAnimations,h=(0,u.useRef)(null),g=(0,u.useRef)(!1);r||=s.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d,skipAnimations:f,isSVG:a}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let _=h.current,v=(0,u.useContext)(Mc);_&&!_.projection&&i&&(_.type===`html`||_.type===`svg`)&&Fc(h.current,n,i,v);let y=(0,u.useRef)(!1);(0,u.useInsertionEffect)(()=>{_&&y.current&&_.update(n,c)});let b=n[Wr],x=(0,u.useRef)(!!b&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return p(()=>{g.current=!0,_&&(y.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),x.current&&_.animationState&&_.animationState.animateChanges())}),(0,u.useEffect)(()=>{_&&(!x.current&&_.animationState&&_.animationState.animateChanges(),x.current&&=(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(b)}),!1),_.enteringChildren=void 0)}),_}function Fc(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l,layoutAnchor:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:Ic(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&Nc(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,crossfade:d,layoutScroll:c,layoutRoot:l,layoutAnchor:u})}function Ic(e){if(e)return e.options.allowProjection===!1?Ic(e.parent):e.projection}function Lc(e,{forwardMotionProps:t=!1,type:n}={},r,i){r&&nc(r);let a=n?n===`svg`:Cc(e),o=a?kc:Oc;function s(n,s){let c,d={...(0,u.useContext)(Ys),...n,layoutId:Rc(n)},{isStatic:f}=d,p=pc(n),m=o(n,f);if(!f&&typeof window<`u`){zc(d,r);let t=Bc(d);c=t.MeasureLayout,p.visualElement=Pc(e,m,d,i,t.ProjectionNode,a)}return(0,l.jsxs)(dc.Provider,{value:p,children:[c&&p.visualElement?(0,l.jsx)(c,{visualElement:p.visualElement,...d}):null,wc(e,n,jc(m,p.visualElement,s),m,f,t,a)]})}s.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let c=(0,u.forwardRef)(s);return c[Ac]=e,c}function Rc({layoutId:e}){let t=(0,u.useContext)(d).id;return t&&e!==void 0?t+`-`+e:e}function zc(e,t){(0,u.useContext)(Zs).strict}function Bc(e){let{drag:t,layout:n}=tc();if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}function Vc(e,t){if(typeof Proxy>`u`)return Lc;let n=new Map,r=(n,r)=>Lc(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(i,a)=>a===`create`?r:(n.has(a)||n.set(a,Lc(a,void 0,e,t)),n.get(a))})}var Hc=(e,t)=>t.isSVG??Cc(e)?new co(t):new Qa(t,{allowProjection:e!==u.Fragment}),Uc=class extends Y{constructor(e){super(e),e.animationState||=go(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();sa(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}},Wc=0,Gc={animation:{Feature:Uc},exit:{Feature:class extends Y{constructor(){super(...arguments),this.id=Wc++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;if(e&&n===!1){if(this.isExitComplete){let{initial:e,custom:t}=this.node.getProps();if(typeof e==`string`||typeof e==`object`&&e&&!Array.isArray(e)){let n=G(this.node,e,t);if(n){let{transition:e,transitionEnd:t,...r}=n;for(let e in r)this.node.getValue(e)?.jump(r[e])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive(`exit`,!1);this.isExitComplete=!1;return}let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>{this.isExitComplete=!0,t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}};function Kc(e){return{point:{x:e.pageX,y:e.pageY}}}var qc=e=>t=>Di(t)&&e(t,Kc(t));function Jc(e,t,n,r){return os(e,t,qc(n),r)}var Yc=({current:e})=>e?e.ownerDocument.defaultView:null,Xc=(e,t)=>Math.abs(e-t);function Zc(e,t){let n=Xc(e.x,t.x),r=Xc(e.y,t.y);return Math.sqrt(n**2+r**2)}var Qc=new Set([`auto`,`scroll`]),$c=class{constructor(e,t,{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:i=!1,distanceThreshold:a=3,element:o}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=el(this.lastRawMoveEventInfo,this.transformPagePoint));let e=nl(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=Zc(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=M;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastRawMoveEventInfo=t,this.lastMoveEventInfo=el(t,this.transformPagePoint),A.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=nl(e.type===`pointercancel`?this.lastMoveEventInfo:el(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!Di(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=a,this.contextWindow=r||window;let s=el(Kc(e),this.transformPagePoint),{point:c}=s,{timestamp:l}=M;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,nl(s,this.history)),this.removeListeners=T(Jc(this.contextWindow,`pointermove`,this.handlePointerMove),Jc(this.contextWindow,`pointerup`,this.handlePointerUp),Jc(this.contextWindow,`pointercancel`,this.handlePointerUp)),o&&this.startScrollTracking(o)}startScrollTracking(e){let t=e.parentElement;for(;t;){let e=getComputedStyle(t);(Qc.has(e.overflowX)||Qc.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.addEventListener(`scroll`,this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener(`scroll`,this.onElementScroll,{capture:!0}),window.removeEventListener(`scroll`,this.onWindowScroll)}}handleScroll(e){let t=this.scrollPositions.get(e);if(!t)return;let n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},i={x:r.x-t.x,y:r.y-t.y};i.x===0&&i.y===0||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=i.x,this.lastMoveEventInfo.point.y+=i.y):this.history.length>0&&(this.history[0].x-=i.x,this.history[0].y-=i.y),this.scrollPositions.set(e,r),A.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),j(this.updatePoint)}};function el(e,t){return t?{point:t(e.point)}:e}function tl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function nl({point:e},t){return{point:e,delta:tl(e,il(t)),offset:tl(e,rl(t)),velocity:al(t,.1)}}function rl(e){return e[0]}function il(e){return e[e.length-1]}function al(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=il(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>D(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>D(t)*2&&(r=e[1]);let a=O(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function ol(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?z(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?z(n,e,r.max):Math.min(e,n)),e}function sl(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function cl(e,{top:t,left:n,bottom:r,right:i}){return{x:sl(e.x,n,i),y:sl(e.y,t,r)}}function ll(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function ul(e,t){return{x:ll(e.x,t.x),y:ll(e.y,t.y)}}function dl(e,t){let n=.5,r=Q(e),i=Q(t);return i>r?n=E(t.min,t.max-r,e.min):r>i&&(n=E(e.min,e.max-i,t.min)),_(0,1,n)}function fl(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var pl=.35;function ml(e=pl){return e===!1?e=0:e===!0&&(e=pl),{x:hl(e,`left`,`right`),y:hl(e,`top`,`bottom`)}}function hl(e,t,n){return{min:gl(e,t),max:gl(e,n)}}function gl(e,t){return typeof e==`number`?e:e[t]||0}var _l=new WeakMap,vl=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=J(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:t=!1,distanceThreshold:n}={}){let{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;let i=e=>{t&&this.snapToCursor(Kc(e).point),this.stopAnimation()},a=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Si(n),!this.openDragLock))return;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),$(e=>{let t=this.getAxisMotionValue(e).get()||0;if(F.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=Q(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&A.update(()=>i(e,t),!1,!0),Hr(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},o=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t;let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Sl(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&A.update(()=>a(e,t),!1,!0)},s=(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},c=()=>{let{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:l}=this.getProps();this.panSession=new $c(e,{onSessionStart:i,onStart:a,onMove:o,onSessionEnd:s,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:l,distanceThreshold:n,contextWindow:Yc(this.visualElement),element:this.visualElement.current})}stop(e,t){let n=e||this.latestPointerEvent,r=t||this.latestPanInfo,i=this.isDragging;if(this.cancel(),!i||!r||!n)return;let{velocity:a}=r;this.startAnimation(a);let{onDragEnd:o}=this.getProps();o&&A.postRender(()=>o(n,r))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!xl(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=ol(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&Nc(e)?this.constraints||=this.resolveRefConstraints():e&&n?this.constraints=cl(n.layoutBox,e):this.constraints=!1,this.elastic=ml(t),r!==this.constraints&&!Nc(e)&&n&&this.constraints&&!this.hasMutatedConstraints&&$(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=fl(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Nc(e))return!1;let n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;r.root&&(r.root.scroll=void 0,r.root.updateScroll());let i=za(n,r.root,this.visualElement.getTransformPagePoint()),a=ul(r.layout.layoutBox,i);if(t){let e=t(xa(a));this.hasMutatedConstraints=!!e,e&&(a=ba(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=$(o=>{if(!xl(o,t,this.currentDirection))return;let c=s&&s[o]||{};(a===!0||a===o)&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return Hr(this.visualElement,e),n.start(Ar(e,n,0,t,this.visualElement,!1))}stopAnimation(){$(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`;return this.visualElement.getProps()[t]||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){$(t=>{let{drag:n}=this.getProps();if(!xl(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t],o=i.get()||0;i.set(e[t]-z(n,a,.5)+o)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Nc(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};$(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=dl({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),$(t=>{if(!xl(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(z(i,a,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;_l.set(this.visualElement,this);let e=this.visualElement.current,t=Jc(e,`pointerdown`,t=>{let{drag:n,dragListener:r=!0}=this.getProps(),i=t.target,a=i!==e&&ji(i);n&&r&&!a&&this.start(t)}),n,r=()=>{let{dragConstraints:t}=this.getProps();Nc(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||=bl(e,t.current,()=>this.scalePositionWithinConstraints()))},{projection:i}=this.visualElement,a=i.addEventListener(`measure`,r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),A.read(r);let o=os(window,`resize`,()=>this.scalePositionWithinConstraints()),s=i.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&($(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{o(),t(),a(),s&&s(),n&&n()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=pl,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function yl(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function bl(e,t,n){let r=$i(e,yl(n)),i=$i(t,yl(n));return()=>{r(),i()}}function xl(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Sl(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var Cl=class extends Y{constructor(e){super(e),this.removeGroupControls=w,this.removeListeners=w,this.controls=new vl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||w}update(){let{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},wl=e=>(t,n)=>{e&&A.update(()=>e(t,n),!1,!0)},Tl=class extends Y{constructor(){super(...arguments),this.removePointerDownListener=w}onPointerDown(e){this.session=new $c(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yc(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:wl(e),onStart:wl(t),onMove:wl(n),onEnd:(e,t)=>{delete this.session,r&&A.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=Jc(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},El=!1,Dl=class extends u.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),El&&i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),fs.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,{projection:a}=n;return a?(a.isPresent=i,e.layoutDependency!==t&&a.setOptions({...a.options,layoutDependency:t}),El=!0,r||e.layoutDependency!==t||t===void 0||e.isPresent!==i?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||A.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{visualElement:e,layoutAnchor:t}=this.props,{projection:n}=e;n&&(n.options.layoutAnchor=t,n.root.didUpdate(),yi.postRender(()=>{!n.currentAnimation&&n.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;El=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function Ol(e){let[t,n]=Xs(),r=(0,u.useContext)(d);return(0,l.jsx)(Dl,{...e,layoutGroup:r,switchLayoutGroup:(0,u.useContext)(Mc),isPresent:t,safeToRemove:n})}var kl={pan:{Feature:Tl},drag:{Feature:Cl,ProjectionNode:Js,MeasureLayout:Ol}};function Al(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&A.postRender(()=>i(t,Kc(t)))}var jl=class extends Y{mount(){let{current:e}=this.node;e&&(this.unmount=Ti(e,(e,t)=>(Al(this.node,t,`Start`),e=>Al(this.node,e,`End`))))}unmount(){}},Ml=class extends Y{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=T(os(this.node.current,`focus`,()=>this.onFocus()),os(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function Nl(e,t,n){let{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&A.postRender(()=>i(t,Kc(t)))}var Pl=class extends Y{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Ri(e,(e,t)=>(Nl(this.node,t,`Start`),(e,{success:t})=>Nl(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:t,stopPropagation:n?.tap===!1})}unmount(){}},Fl=new WeakMap,Il=new WeakMap,Ll=e=>{let t=Fl.get(e.target);t&&t(e)},Rl=e=>{e.forEach(Ll)};function zl({root:e,...t}){let n=e||document;Il.has(n)||Il.set(n,{});let r=Il.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Rl,{root:e,...t})),r[i]}function Bl(e,t,n){let r=zl(t);return Fl.set(e,n),r.observe(e),()=>{Fl.delete(e),r.unobserve(e)}}var Vl={some:0,all:1},Hl=class extends Y{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:Vl[r]},o=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)};this.stopObserver=Bl(this.node.current,a,o)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(Ul(e,t))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function Ul({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var Wl={inView:{Feature:Hl},tap:{Feature:Pl},focus:{Feature:Ml},hover:{Feature:jl}},Gl={layout:{ProjectionNode:Js,MeasureLayout:Ol}},Kl=Vc({...Gc,...Wl,...kl,...Gl},Hc);export{le as A,tn as C,j as D,z as E,g as F,m as I,p as L,E as M,y as N,A as O,v as P,f as R,nn as S,Bt as T,Br as _,co as a,Xn as b,oa as c,zi as d,vi as f,K as g,qr as h,as as i,D as j,be as k,J as l,Xr as m,Xs as n,Qa as o,gi as p,Ys as r,va as s,Kl as t,ea as u,yr as v,Xt as w,rn as x,W as y,d as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./useMutation-Lj4VunQV.js";import{t}from"./queryOptions-BtNi-_9H.js";import{t as n}from"./infiniteQueryOptions-C6p49ZmI.js";import{A as r,B as i,Bn as a,C as o,Ct as s,Dt as ee,E as te,Et as ne,Fn as re,Ft as ie,Gn as ae,Hn as oe,Kn as se,Lt as ce,M as le,N as ue,Nt as de,O as fe,Rn as pe,Rt as me,S as he,Sn as ge,St as _e,T as ve,Tn as c,Vn as ye,Wn as be,Xt as xe,Zt as Se,_n as Ce,_t as we,bt as Te,cn as Ee,dn as De,er as Oe,fn as ke,gn as Ae,gt as je,hr as Me,ht as l,ir as u,j as d,k as f,ln as p,mr as m,nr as h,o as g,on as _,pn as v,pt as y,rr as b,sn as x,tt as Ne,un as Pe,vn as Fe,vt as Ie,w as Le,wn as Re,x as ze,xn as Be,xt as Ve,y as He,yn as Ue,zn as We}from"./sdk.gen-1aYqVbMj.js";var S=(e,t,n,r)=>{let i={_id:e,baseUrl:t?.baseUrl||(t?.client??Me).getConfig().baseUrl};return n&&(i._infinite=n),r&&(i.tags=r),t?.body&&(i.body=t.body),t?.headers&&(i.headers=t.headers),t?.path&&(i.path=t.path),t?.query&&(i.query=t.query),[i]},C=e=>S(`appsGet`,e),Ge=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await g({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:C(e)}),w=e=>S(`bookmarksGet`,e),Ke=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await He({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:w(e)}),qe=e=>S(`channelsAvailableGet`,e),Je=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ze({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:qe(e)}),T=e=>S(`channelsReadinessGet`,e),Ye=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await he({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:T(e)}),E=e=>S(`configGet`,e),D=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await o({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:E(e)}),Xe=(e,t,n)=>e.setQueryData(D(t).queryKey,n),Ze=e=>({mutationFn:async t=>{let{data:n}=await te({...e,...t,throwOnError:!0});return n}}),Qe=t=>e({...Ze(),...t}),$e=e=>S(`configLlmCallsitesGet`,e),et=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Le({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:$e(e)}),tt=e=>S(`configLlmProfilesGet`,e),nt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ve({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:tt(e)}),rt=e=>S(`consolidationConfigGet`,e),it=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await fe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:rt(e)}),at=e=>({mutationFn:async t=>{let{data:n}=await f({...e,...t,throwOnError:!0});return n}}),ot=t=>e({...at(),...t}),st=e=>S(`consolidationRunsGet`,e),ct=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:i}=await r({...e,...t[0],signal:n,throwOnError:!0});return i},queryKey:st(e)}),O=(e,t)=>{let n={...e[0]};return t.body&&(n.body={...e[0].body,...t.body}),t.headers&&(n.headers={...e[0].headers,...t.headers}),t.path&&(n.path={...e[0].path,...t.path}),t.query&&(n.query={...e[0].query,...t.query}),n},k=e=>S(`consolidationRunsGet`,e,!0),lt=e=>n({queryFn:async({pageParam:t,queryKey:n,signal:i})=>{let a=O(n,typeof t==`object`?t:{query:{before:t}}),{data:o}=await r({...e,...a,signal:i,throwOnError:!0});return o},queryKey:k(e)}),ut=e=>({mutationFn:async t=>{let{data:n}=await d({...e,...t,throwOnError:!0});return n}}),dt=t=>e({...ut(),...t}),A=e=>S(`contactsGet`,e),j=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await le({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:A(e)}),ft=(e,t,n)=>e.setQueryData(j(t).queryKey,n),pt=e=>({mutationFn:async t=>{let{data:n}=await ue({...e,...t,throwOnError:!0});return n}}),mt=t=>e({...pt(),...t}),ht=e=>S(`conversationstartersGet`,e),gt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Ne({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:ht(e)}),M=e=>S(`conversationsByIdGet`,e),_t=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await i({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:M(e)}),N=e=>S(`documentsGet`,e),vt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await y({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:N(e)}),P=e=>S(`groupsGet`,e),F=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await we({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:P(e)}),yt=(e,t,n)=>e.setQueryData(F(t).queryKey,n),bt=e=>({mutationFn:async t=>{let{data:n}=await Ie({...e,...t,throwOnError:!0});return n}}),xt=t=>e({...bt(),...t}),St=e=>({mutationFn:async t=>{let{data:n}=await l({...e,...t,throwOnError:!0});return n}}),Ct=t=>e({...St(),...t}),wt=e=>({mutationFn:async t=>{let{data:n}=await je({...e,...t,throwOnError:!0});return n}}),Tt=t=>e({...wt(),...t}),I=e=>S(`heartbeatConfigGet`,e),L=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Te({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:I(e)}),Et=(e,t,n)=>e.setQueryData(L(t).queryKey,n),Dt=e=>({mutationFn:async t=>{let{data:n}=await Ve({...e,...t,throwOnError:!0});return n}}),Ot=t=>e({...Dt(),...t}),kt=e=>({mutationFn:async t=>{let{data:n}=await _e({...e,...t,throwOnError:!0});return n}}),At=t=>e({...kt(),...t}),jt=e=>S(`heartbeatRunsGet`,e),Mt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await s({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:jt(e)}),R=e=>S(`heartbeatRunsGet`,e,!0),Nt=e=>n({queryFn:async({pageParam:t,queryKey:n,signal:r})=>{let i=O(n,typeof t==`object`?t:{query:{before:t}}),{data:a}=await s({...e,...i,signal:r,throwOnError:!0});return a},queryKey:R(e)}),z=e=>S(`homeFeedGet`,e),Pt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ne({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:z(e)}),Ft=(e,t,n)=>e.setQueryData(Pt(t).queryKey,n),B=e=>S(`homeStateGet`,e),It=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ee({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:B(e)}),Lt=e=>S(`identityGet`,e),V=e=>S(`inferenceProviderconnectionsGet`,e),Rt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await de({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:V(e)}),zt=e=>({mutationFn:async t=>{let{data:n}=await ie({...e,...t,throwOnError:!0});return n}}),H=e=>S(`integrationsSlackChannelConfigGet`,e),Bt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ce({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:H(e)}),Vt=e=>({mutationFn:async t=>{let{data:n}=await me({...e,...t,throwOnError:!0});return n}}),Ht=e=>S(`memoryV2NowtextGet`,e),Ut=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await xe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Ht(e)}),Wt=e=>S(`memoryV2RouterprompttemplateGet`,e),Gt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Se({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Wt(e)}),U=e=>S(`oauthAppsGet`,e),Kt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await p({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:U(e)}),qt=e=>({mutationFn:async t=>{let{data:n}=await Pe({...e,...t,throwOnError:!0});return n}}),Jt=t=>e({...qt(),...t}),Yt=e=>({mutationFn:async t=>{let{data:n}=await _({...e,...t,throwOnError:!0});return n}}),Xt=t=>e({...Yt(),...t}),W=e=>S(`oauthAppsByAppIdConnectionsGet`,e),Zt=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await x({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:W(e)}),Qt=e=>({mutationFn:async t=>{let{data:n}=await Ee({...e,...t,throwOnError:!0});return n}}),$t=t=>e({...Qt(),...t}),en=e=>({mutationFn:async t=>{let{data:n}=await De({...e,...t,throwOnError:!0});return n}}),tn=t=>e({...en(),...t}),nn=e=>S(`oauthProvidersGet`,e),rn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await v({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:nn(e)}),an=e=>S(`oauthProvidersByProviderKeyGet`,e),on=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ke({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:an(e)}),sn=e=>S(`pluginsGet`,e),cn=e=>({mutationFn:async t=>{let{data:n}=await Ae({...e,...t,throwOnError:!0});return n}}),ln=t=>e({...cn(),...t}),G=e=>S(`pluginsByNameGet`,e),un=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Ce({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:G(e)}),K=e=>S(`pluginsByNameInspectGet`,e),dn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Fe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:K(e)}),fn=e=>({mutationFn:async t=>{let{data:n}=await Ue({...e,...t,throwOnError:!0});return n}}),pn=t=>e({...fn(),...t}),mn=e=>({mutationFn:async t=>{let{data:n}=await Be({...e,...t,throwOnError:!0});return n}}),hn=t=>e({...mn(),...t}),q=e=>S(`pluginsSearchGet`,e),gn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ge({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:q(e)}),_n=e=>S(`retrospectiveConfigGet`,e),vn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Re({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:_n(e)}),yn=e=>S(`retrospectiveRunsGet`,e),bn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await c({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:yn(e)}),J=e=>S(`retrospectiveRunsGet`,e,!0),xn=e=>n({queryFn:async({pageParam:t,queryKey:n,signal:r})=>{let i=O(n,typeof t==`object`?t:{query:{before:t}}),{data:a}=await c({...e,...i,signal:r,throwOnError:!0});return a},queryKey:J(e)}),Sn=e=>S(`schedulesGet`,e),Cn=e=>S(`schedulesByIdRunsGet`,e),Y=e=>S(`secretsGet`,e),wn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await re({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Y(e)}),X=e=>S(`skillsGet`,e),Tn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await oe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:X(e)}),En=e=>({mutationFn:async t=>{let{data:n}=await pe({...e,...t,throwOnError:!0});return n}}),Dn=t=>e({...En(),...t}),On=e=>S(`skillsByIdFilesGet`,e),kn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await a({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:On(e)}),An=e=>S(`skillsByIdFilesContentGet`,e),jn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await We({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:An(e)}),Mn=e=>S(`skillsCategoriesGet`,e),Nn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ye({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Mn(e)}),Z=e=>S(`soundsAvailableGet`,e),Pn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await be({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Z(e)}),Q=e=>S(`soundsConfigGet`,e),$=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await ae({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Q(e)}),Fn=(e,t,n)=>e.setQueryData($(t).queryKey,n),In=e=>({mutationFn:async t=>{let{data:n}=await se({...e,...t,throwOnError:!0});return n}}),Ln=e=>S(`ttsProvidersGet`,e),Rn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await Oe({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Ln(e)}),zn=e=>S(`usageBreakdownGet`,e),Bn=e=>S(`usageDailyGet`,e),Vn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await h({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Bn(e)}),Hn=e=>S(`usageSeriesGet`,e),Un=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await b({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Hn(e)}),Wn=e=>S(`usageTotalsGet`,e),Gn=e=>t({queryFn:async({queryKey:t,signal:n})=>{let{data:r}=await u({...e,...t[0],signal:n,throwOnError:!0});return r},queryKey:Wn(e)}),Kn=e=>({mutationFn:async t=>{let{data:n}=await m({...e,...t,throwOnError:!0});return n}}),qn=t=>e({...Kn(),...t});export{G as $,Nt as A,ot as At,zt as B,Jt as Bt,vt as C,In as Ct,yt as D,Un as Dt,P as E,Vn as Et,It as F,xt as Ft,Gt as G,Dn as Gt,H,ln as Ht,B as I,Ot as It,Kt as J,Zt as K,qn as Kt,Lt as L,At as Lt,Mt as M,mt as Mt,z as N,Ct as Nt,L as O,Gn as Ot,Ft as P,Tt as Pt,un as Q,Rt as R,Xt as Rt,gt as S,Fn as St,F as T,zn as Tt,Vt as U,pn as Ut,Bt as V,tn as Vt,Ut as W,hn as Wt,on as X,U as Y,rn as Z,j as _,X as _t,Je as a,vn as at,_t as b,$ as bt,D as c,bn as ct,et as d,wn as dt,dn as et,nt as f,Y as ft,ct as g,Tn as gt,k as h,Nn as ht,w as i,q as it,R as j,dt as jt,Et as k,Qe as kt,E as l,Cn as lt,lt as m,kn as mt,C as n,sn as nt,Ye as o,xn as ot,it as p,jn as pt,W as q,Ke as r,gn as rt,T as s,J as st,Ge as t,K as tt,Xe as u,Sn as ut,A as v,Pn as vt,N as w,Rn as wt,M as x,Q as xt,ft as y,Z as yt,V as z,$t as zt};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-Hr1Yo2kx.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-D7s2Q_uG.js";import{d as i,r 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-DvW5mxZR.js";import{t as l}from"./tag-B_-QAvJF.js";import{t as u}from"./input-C8kfrq9r.js";import{n as d,t as f}from"./create-selectors-BE0_e_Ed.js";import{t as p}from"./arrow-left-CP-EhDNF.js";import{t as m}from"./chevron-left-DghyKSEE.js";import{t as h}from"./chevron-right-B6vEpVY0.js";import{t as g}from"./loader-circle-IIzBGiwm.js";import{t as _}from"./pencil-DbB9rxpY.js";import{t as v}from"./x-KVxA2ZL0.js";import{L as y,Sn as b,X as x,en as S,tn as C,xn as w}from"./sdk.gen-1aYqVbMj.js";import{r as T}from"./api-errors-CveHbhgb.js";import{Q as E,at as D,ct as O,n as k,ot as A,st as j}from"./auth-store-oJs_d4fj.js";import{a as ee,o as te,r as ne}from"./api-2kc3MHRz.js";import{a as re}from"./routes-DVqkwUEe.js";import{t as ie}from"./client-feature-flag-store-CtxCu0Fm.js";import{t as M}from"./assistant-feature-flag-store-JvmVqyKj.js";import{c as ae,l as oe}from"./prechat-B28Vzu55.js";import{A as se,C as N,D as ce,E as P,F,L as I,M as L,N as R,O as le,P as ue,R as z,S as de,T as fe,_ as pe,a as me,b as he,c as ge,d as _e,g as ve,h as ye,i as be,j as xe,k as Se,l as Ce,m as we,o as Te,p as Ee,r as De,s as Oe,t as B,u as ke,v as Ae,w as je,x as Me,y as Ne}from"./proxy-DmIh4F51.js";import{t as Pe}from"./AnimatePresence-CgXwEO42.js";import{t as V}from"./use-reduced-motion-ChB7nOGe.js";import{Ft as Fe,Mt as Ie,Pt as Le,Ut as Re,aa as H,at as U,dt as W,jn as ze,jt as Be,xt as Ve}from"./index-B52_AvAi.js";import{t as He}from"./prechat-names-De-dVGbT.js";var Ue=(e,t,n)=>{let r=t-e;return((n-e)%r+r)%r+e};function We(e,t){return Se(e)?e[Ue(0,e.length,t)]:e}var Ge=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 Ke(this.animations,`duration`)}get iterationDuration(){return Ke(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 Ke(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 qe=class extends Ge{then(e,t){return this.finished.finally(e).then(()=>{})}};function Je(...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=N(i,a,o);return t?s(r):s}function Ye(e,t){return e in t}var Xe=class extends Oe{constructor(){super(...arguments),this.type=`object`}readValueFromInstance(e,t){if(Ye(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 Ce()}build(e,t){Object.assign(e.output,t)}renderInstance(e,{output:t}){Object.assign(e,t)}sortInstanceNodePosition(){return 0}},G=e(n(),1);function Ze(e){let t=z(()=>Ne(e)),{isStatic:n}=(0,G.useContext)(De);if(n){let[,n]=(0,G.useState)(e);(0,G.useEffect)(()=>t.on(`change`,n),[])}return t}function Qe(e,t){let n=Ze(t()),r=()=>n.set(t());return r(),I(()=>{let t=()=>le.preRender(r,!1,!0),n=e.map(e=>e.on(`change`,t));return()=>{n.forEach(e=>e()),ce(r)}}),n}function $e(e){Ae.current=[],e();let t=Qe(Ae.current,e);return Ae.current=void 0,t}function et(e,t,n,r){if(typeof e==`function`)return $e(e);if(n!==void 0&&!Array.isArray(n)&&typeof t!=`function`)return nt(e,t,n,r);let i=typeof t==`function`?t:Je(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=z(()=>[]);return Qe(e,()=>{n.length=0;let r=e.length;for(let t=0;t<r;t++)n[t]=e[t].get();return t(n)})}function nt(e,t,n,r){let i=z(()=>Object.keys(n)),a=z(()=>({}));for(let o of i)a[o]=et(e,t,n[o],r);return a}function rt(e){e.values.forEach(e=>e.stop())}function it(e,t){[...t].reverse().forEach(n=>{let r=e.getVariant(n);r&&pe(e,r),e.variantChildren&&e.variantChildren.forEach(e=>{it(e,t)})})}function at(e,t){if(Array.isArray(t))return it(e,t);if(typeof t==`string`)return it(e,[t]);pe(e,t)}function ot(){let e=!1,t=new Set,n={subscribe(e){return t.add(e),()=>void t.delete(e)},start(n,r){R(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(we(e,n,{transitionOverride:r}))}),Promise.all(i)},set(n){return R(e,`controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.`),t.forEach(e=>{at(e,n)})},stop(){t.forEach(e=>{rt(e)})},mount(){return e=!0,()=>{e=!1,n.stop()}}};return n}function st(e){return typeof e==`object`&&!Array.isArray(e)}function ct(e,t,n,r){return e==null?[]:typeof e==`string`&&st(t)?Ee(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e.filter(e=>e!=null):[e]}function lt(e,t,n){return e*(t+1)+n*t}function ut(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 dt(e,t,n){for(let r=0;r<e.length;r++){let i=e[r];i.at>t&&i.at<n&&(F(e,i),r--)}}function ft(e,t,n,r,i,a){dt(e,i,a);for(let o=0;o<t.length;o++)e.push({value:t[o],at:P(i,a,r[o]),easing:We(n,o)})}function pt(e,t,n=0){let r=t+1+t*n;for(let t=0;t<e.length;t++)e[t]=e[t]/r}function mt(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}var ht=`easeInOut`,gt=20;function _t(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,ut(d,o.at,u,l));continue}let[p,m,h={}]=o;h.at!==void 0&&(d=ut(d,h.at,u,l));let g=0,_=(e,n,r,o=0,s=0)=>{let c=bt(e),{delay:l=0,times:u=Me(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=he(p)?p:i?.[p||`keyframes`];if(S<=2&&C){let e=100;if(S===2&&Ct(c)){let t=c[1]-c[0];e=Math.abs(t)}let n={...t,...v};b!==void 0&&(n.duration=xe(b));let r=fe(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&&de(u,T),c.length===1&&c.unshift(null),m&&ue(m<gt,`Sequence segments can't repeat ${m} times — ignoring repeat option. Use a value below ${gt} or apply repeat at the sequence level instead.`),m&&m<gt){let e=b>0?_/b:0;b=lt(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`?se(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`:We(f,e-1))}pt(u,m,e)}let E=w+b;ft(r,c,y,u,w,E),g=Math.max(x+b,g),f=Math.max(E,f)};if(ve(p)){let e=vt(p,s);_(m,h,yt(`default`,e))}else{let e=ct(p,m,r,c),t=e.length;for(let n=0;n<t;n++){m=m,h=h;let r=e[n],i=vt(r,s);for(let e in m)_(m[e],xt(h,e),yt(e,i),n,t)}}u=d,d+=g}return s.forEach((e,r)=>{for(let i in e){let a=e[i];a.sort(mt);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(L(0,f,t)),l.push(r||`easeOut`)}c[0]!==0&&(c.unshift(0),s.unshift(s[0]),l.unshift(ht)),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 vt(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function yt(e,t){return t[e]||(t[e]=[]),t[e]}function bt(e){return Array.isArray(e)?e:[e]}function xt(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}var St=e=>typeof e==`number`,Ct=e=>e.every(St);function wt(e){let t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=_e(e)&&!ke(e)?new me(t):new Te(t);n.mount(e),ge.set(e,n)}function Tt(e){let t=new Xe({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});t.mount(e),ge.set(e,t)}function Et(e,t){return ve(e)||typeof e==`number`||typeof e==`string`&&!st(t)}function Dt(e,t,n,r){let i=[];if(Et(e,t))i.push(be(e,st(t)&&t.default||t,n&&(n.default||n)));else{if(e==null)return i;let a=ct(e,t,r),o=a.length;R(!!o,`No valid elements provided.`,`no-valid-elements`);for(let e=0;e<o;e++){let r=a[e],s=r instanceof Element?wt:Tt;ge.has(r)||s(r);let c=ge.get(r),l={...n};`delay`in l&&typeof l.delay==`function`&&(l.delay=l.delay(e,o)),i.push(...ye(c,{...t,transition:l},{}))}}return i}function Ot(e,t,n){let r=[];return _t(e.map(e=>{if(Array.isArray(e)&&typeof e[0]==`function`){let t=e[0],n=Ne(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:je}).forEach(({keyframes:e,transition:t},n)=>{r.push(...Dt(n,e,t))}),r}function kt(e){return Array.isArray(e)&&e.some(Array.isArray)}function At(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),kt(e)){let{onComplete:n,...r}=i||{};typeof n==`function`&&(s=n),o=Ot(e,{...c,...r},t)}else{let{onComplete:n,...r}=a||{};typeof n==`function`&&(s=n),o=Dt(e,i,{...c,...r},t)}let l=new qe(o);return s&&l.finished.then(s),t&&(t.animations.push(l),l.finished.then(()=>{F(t.animations,l)})),l}return i}var K=At();function jt(){let e=z(ot);return I(e.mount,[]),e}var Mt=12;function Nt(e){let t=e.slice(0,Mt).map(e=>`- ${e.name} — ${e.description}`).join(`
|
|
2
|
-
`);return t?`
|
|
3
|
-
Capabilities you can offer me — specialized skillsets you can invoke on my behalf, not generic chat:
|
|
4
|
-
${t}
|
|
5
|
-
|
|
6
|
-
Add a "plugins" array as the FIRST key in your JSON object, before "claims" and "suggestions": the 1-2 capabilities from the list above (exact names) that best fit who I am — judged by what you researched about my real role, stack, and day-to-day work. (Emit it first so setup can start while you finish the rest.) These get set up for me automatically as part of getting started, so pick by overall fit to ME, not to any single suggestion. Prefer fewer over forcing a match; use [] if nothing clearly fits. Example: "plugins": ["<exact name from the list above>"]. Don't reference the setup in the claims or suggestions text.
|
|
7
|
-
`:``}function Pt({firstName:e,lastName:t,occupation:n,hobby:r},i=[]){let a=[e.trim(),t.trim()].filter(Boolean).join(` `),o=n.trim(),s=r?.trim()??``,c=Nt(i),l=c?`"plugins": ["<exact name from the list above>"], `:``;return`${[a?`My name is ${a}.`:``,o?`I work as ${o}.`:``,s?`My hobby is ${s}.`:``].filter(Boolean).join(` `)||`I'd like you to get to know me before we start working together.`}
|
|
8
|
-
|
|
9
|
-
Get to know me. Search the web for what's publicly known about the person matching my name and role, and infer a handful of things about who I am: what I do, my role, where I'm based, what I'm into, anything that would help you assist me better. Lean on public sources (LinkedIn, company pages, social profiles, articles, personal sites, GitHub). It's fine to make reasonable inferences and label them honestly.
|
|
10
|
-
|
|
11
|
-
CRITICAL: your final reply must be ONLY a JSON object. No preamble, no explanation, no prose, nothing before or after it. Do your thinking and searching, then respond with exactly this shape and nothing else:
|
|
12
|
-
|
|
13
|
-
{ ${l}"claims": [ { "claim": "Senior engineer at an AI infra startup", "confidence": "confident", "sources": ["https://linkedin.com/in/example-user"] }, { "claim": "Based in Boulder, CO", "confidence": "confident", "sources": ["https://linkedin.com/in/example-user"] }, { "claim": "Active climber on Mountain Project", "confidence": "maybe", "sources": [] }, { "claim": "Focused on evals or model serving infrastructure", "confidence": "guessing", "sources": ["https://github.com/example-user"] } ], "suggestions": [ { "suggestion": "I'll build you a dashboard for your eval runs", "prompt": "Build me a dashboard to track my eval runs." }, { "suggestion": "I'll watch arXiv for new eval papers and brief you weekly", "prompt": "Send me a weekly brief on new eval papers from arXiv." }, { "suggestion": "Connect GitHub and I'll triage your stalest issues", "prompt": "Connect to GitHub and triage my oldest open issues." }, { "suggestion": "I'll plan a weekend climbing trip near Boulder", "prompt": "Plan me a weekend climbing trip near Boulder." } ] }
|
|
14
|
-
|
|
15
|
-
Rules for "claims":
|
|
16
|
-
|
|
17
|
-
AT MOST 5 claims, typically 3 to 4. Aim for at least one "confident" and at least one "guessing"; the rest "maybe".
|
|
18
|
-
Phrase each claim in third person as a short headline ("Senior engineer at an AI infra startup", "Based in Boulder, CO", "Active climber on Mountain Project"). No multi-clause sentences, no em-dash asides, no explanations. Good: "Contributed to Chirps (vector-DB security)". Bad: "You've done real work in vector database security. You contributed to Chirps, a tool for scanning vector DBs for sensitive data".
|
|
19
|
-
Each claim must be independently true-or-false so I can remove the ones that are wrong.
|
|
20
|
-
"confidence" is one of: "confident" (well supported by what you found), "maybe" (plausible but unverified), "guessing" (a hunch from limited signal).
|
|
21
|
-
"sources": 0 to 3 URLs you actually used as evidence for that specific claim. Use [] for pure inferences.
|
|
22
|
-
Rules for "suggestions":
|
|
23
|
-
|
|
24
|
-
Each suggestion is an object with two fields:
|
|
25
|
-
"suggestion": the offer spoken in YOUR voice (the assistant), exactly as it appears on the clickable card. First-person "I" here refers to you. This is what the user reads.
|
|
26
|
-
"prompt": the message that is sent on the user's behalf when they click that card, written from the USER's perspective in their first person — what they'd say to take you up on the offer. First-person "I"/"my" here refers to the user. Same intent as the suggestion, re-voiced as a request TO you (e.g. suggestion "I'll build you a training plan" → prompt "Build me a training plan for my next climbing trip"). Never echo the assistant-voiced wording in the prompt. Don't ask the user a question back in the prompt — it's their opening message, so state the request. Keep it natural and concise.
|
|
27
|
-
|
|
28
|
-
Generate EXACTLY 4 suggestions, each teaching me something you can do — aim to make me think "wait, you can do that?" Cover four DIFFERENT capabilities; don't repeat the same kind of task. Draw on your range: build a small app or dashboard, set up a recurring brief or monitor, draft a doc in a live editor, connect an integration (GitHub, Gmail, Calendar, Slack, Linear) and take a first action, or lean on a hobby/personal hook if research surfaced one. Pick whatever genuinely fits — don't force a fixed set of themes.
|
|
29
|
-
Ground every suggestion in what you actually learned about me during research — my real role, stack, industry, and (if given) hobby. Specific to me, not generic LLM-assistant stuff. Avoid "summarize" or "draft a post" as standalone suggestions; favor the surprising, specific capabilities (apps, monitors, doc editor, integrations).
|
|
30
|
-
Keep each suggestion SHORT and skimmable: aim for under 10 words, ONE clause, ONE artifact. No lists of three ("X, Y, and Z"), no intake question stacked in front of the offer. The reader scans four cards in a couple of seconds — a long line loses them.
|
|
31
|
-
Favor easy, fast-to-first-output tasks over big builds, so my first reply lands quickly. Prefer "I'll set up a morning brief for today's sales calls" over "I'll build a CRM to manage your deals"; prefer one weekly digest, a short plan, or a single connected action over a multi-part system. The ambitious build can come later in the conversation, not on the first card.
|
|
32
|
-
Each suggestion should be spoken in your voice, offering a service. First-person "I" in the suggestion refers to you, regardless of your name. Core sentence pattern: "I'll [verb] [specific artifact]" or "Connect me to [integration] and I'll [verb] [artifact]." Lead with the offer itself — no intake question in front of it; you gather the details in the follow-up conversation after the click. Suggestions render as clickable; clicking indicates the user wants to proceed. Refinement happens in follow-up conversation, not through the click itself.
|
|
33
|
-
${c}
|
|
34
|
-
Don't include anything sensitive or private. If you found very little, lean on "guessing" claims and broadly useful suggestions for my role.
|
|
35
|
-
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.`}var Ft=3e3,It=3e5,Lt=`Failed to start your assistant. Please try again.`,Rt=`Your assistant is taking longer than expected. Please try again.`,zt=e=>new Promise(t=>setTimeout(t,e));function Bt(){let[e,n]=(0,G.useState)(!1),[r,i]=(0,G.useState)(null),[a,o]=(0,G.useState)(null),s=(0,G.useRef)(!1),c=(0,G.useRef)([]),l=(0,G.useRef)(null),u=(0,G.useCallback)(e=>{if(!l.current){l.current={kind:`ready`,id:e},n(!0);for(let t of c.current)t.resolve(e);c.current=[]}},[]),d=(0,G.useCallback)(e=>{if(l.current)return;l.current={kind:`error`,message:e},o(e);let t=Error(e);for(let e of c.current)e.reject(t);c.current=[]},[]);return{start:(0,G.useCallback)(()=>{if(s.current)return;s.current=!0;let e=Date.now(),n=()=>Date.now()-e>=It;(async()=>{let e;try{let t=await te();if(t.ok)e=t.data.id,i(t.data.id);else{if(A(t.status,t.error)){d(D);return}if(!O(t.status)){d(T(t.error,void 0,Lt));return}}}catch(e){t(e,{context:`research_background_hatch`})}let r;for(;!r;){if(n()){d(Rt);return}try{let t=await ne(e);e&&!t.ok&&t.status===404&&(e=void 0,t=await ne());let n=j(t);if(n.kind===`active`&&t.ok){r=t.data.id,i(r);break}if(n.kind===`error`){d(n.message);return}}catch(e){t(e,{context:`research_background_hatch_poll`})}await zt(Ft)}for(;;){try{if((await ee(r)).ok)break}catch{}if(n()){d(Rt);return}await zt(Ft)}u(r)})()},[d,u]),ready:e,assistantId:r,error:a,awaitReady:(0,G.useCallback)(()=>{let e=l.current;return e?.kind===`ready`?Promise.resolve(e.id):e?.kind===`error`?Promise.reject(Error(e.message)):new Promise((e,t)=>{c.current.push({resolve:e,reject:t})})},[])}}async function Vt(e,n){try{await y({path:{assistant_id:e,id:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_archive`})}}var Ht=[`admin-copilot`],Ut=[{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 Wt(e){return` ${e.toLowerCase().replace(/[^a-z0-9]+/g,` `).trim()} `}function Gt(e,t){return e.includes(` ${t} `)}function Kt(e){let t=Wt(e),n=[];for(let{plugin:e,keywords:r}of Ut)r.some(e=>Gt(t,e))&&n.push(e);return n}function qt(e,t){let n=[...Ht,...Kt(e)],r=new Set,i=[];for(let e of n)!t.has(e)||r.has(e)||(r.add(e),i.push(e));return i}var Jt=1500,Yt=12e4,Xt=2;function Zt({complete:e,stableReads:t}){return e&&t>=Xt}var Qt=`vellum-ai`,$t=new Set([`simple-memory`,`level-up`]);function en(e){let t=e.trim().split(/(?<=\.)\s/)[0]?.trim()??e.trim();return t.length>100?`${t.slice(0,97).trimEnd()}…`:t}function tn(e){return e?.split(`/`)[0]?.trim()??``}function nn(e){let t=[],n=new Set;for(let r of e){let e=r.name?.trim(),i=r.description?.trim();!e||!i||tn(r.source?.repo)===Qt&&($t.has(e)||(n.add(e),t.push({name:e,description:en(i)})))}return{capabilities:t,validNames:n}}var rn={capabilities:[],validNames:new Set};async function an(e){try{return nn((await b({path:{assistant_id:e},throwOnError:!1})).data?.matches??[])}catch(e){return t(e,{context:`research_onboarding_catalog`}),{capabilities:[],validNames:new Set}}}async function on(e,n){try{await w({path:{assistant_id:e},body:{name:n},throwOnError:!1})}catch(e){t(e,{context:`research_onboarding_install`})}}var sn=e=>new Promise(t=>setTimeout(t,e)),cn=8e3;async function ln(e){let t=Date.now()+cn;for(;!M.getState().hasHydrated&&Date.now()<t;)if(await sn(250),e())return!1;return M.getState().externalPlugins===!0}function un(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(!n||n.role!==`assistant`)continue;let r=n.contentBlocks;if(r&&r.length>0){let e=r.filter(e=>e.type===`text`).map(e=>e.text).join(`
|
|
36
|
-
`).trim();if(e)return e}return(n.content??``).trim()}return``}function dn(){let[e,n]=(0,G.useState)({status:`idle`,claims:[],suggestions:[],installedPlugins:[]}),r=(0,G.useRef)(0),i=(0,G.useRef)(null),a=(0,G.useRef)(new Map),s=(0,G.useRef)(Promise.resolve()),c=o(),l=(0,G.useCallback)(({awaitAssistantId:e,subject:o,conversationTitle:l})=>{let u=JSON.stringify(o);if(i.current===u)return;i.current=u;let d=r.current+1;r.current=d;let f=()=>r.current!==d,p=()=>{};s.current=new Promise(e=>{p=e}),a.current.clear(),n({status:`running`,claims:[],suggestions:[],installedPlugins:[]}),(async()=>{let r,i;try{let t=await e();if(r=t,f())return;let s=await ln(f);if(f())return;let{capabilities:c,validNames:u}=s?await an(t):rn;if(f())return;u.size===0&&p();let d=a.current,m=qt(o.occupation,u);for(let e of m)d.has(e)||d.set(e,on(t,e));m.length>0&&n(e=>({...e,installedPlugins:m}));let h=await x({path:{assistant_id:t},body:{conversationType:`standard`,...l?{title:l}:{}},throwOnError:!1});if(i=h.data?.id,f())return;let g=h.data?.id;if(!h.response?.ok||!g){n(e=>({...e,status:`error`}));return}let _={conversationId:g,content:Pt(o,c),sourceChannel:`vellum`,interface:`vellum`,clientMessageId:crypto.randomUUID()};try{let e=Intl.DateTimeFormat().resolvedOptions().timeZone;e&&(_.clientTimezone=e)}catch{}let v=await C({path:{assistant_id:t},body:_,throwOnError:!1});if(f())return;if(!v.response?.ok){n(e=>({...e,status:`error`}));return}let y=Date.now()+Yt,b=``,w=0;for(;Date.now()<y;){if(await sn(Jt),f())return;let e=await S({path:{assistant_id:t},query:{conversationId:g},throwOnError:!1});if(f())return;let r=un(e.data?.messages??[]);if(r){let{claims:e,suggestions:i,plugins:a,pluginsResolved:o,complete:s}=Le(r),c=a.filter(e=>u.has(e));for(let e of c)d.has(e)||d.set(e,on(t,e));if(o&&p(),n({status:`running`,claims:e,suggestions:i,installedPlugins:[...new Set([...m,...c])]}),w=r===b?w+1:0,b=r,Zt({complete:s,stableReads:w}))break}}if(f())return;n(e=>({...e,status:`done`}))}catch(e){if(f())return;t(e,{context:`research_onboarding_runner`}),n(e=>({...e,status:`error`}))}finally{p(),r&&i&&(await Vt(r,i),ze(c,r))}})()},[c]),u=(0,G.useCallback)(async()=>{await s.current,await Promise.all([...a.current.values()])},[]);return{...e,start:l,awaitPluginInstalls:u}}function fn(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(),pn={x:.5,y:.4},mn=[-8,6,9,0,7,-6,5,0,-7,4,-5,6];function hn(e){return mn[e%mn.length]??0}function gn(e,t){return Math.round(Math.max(130,Math.min(Math.min(e,t)*.4,420)))}function _n(e,t){return Math.round(Math.max(110,Math.min(Math.min(e,t)*.21,205)))}function vn(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 yn(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 bn(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function xn({components:e,characters:t,centerChar:n,edgeOrder:r,entering:i,exiting:a,onEnterComplete:o,onSelectChar:s}){let{w:c,h:l}=bn(),u=V(),d=c<640,f=new Set([4,7,8,9,10]),p=e=>d&&f.has(e),m=gn(c,l),h=m/2,g=m/2,_=_n(c,l)/m,v=_n(c,l),y=(0,G.useMemo)(()=>{let e=new Map;return r.forEach((t,n)=>e.set(t,n)),e},[r]),b=pn.x*c,x=pn.y*l,S=b-h,C=x-h,w=(0,G.useMemo)(()=>vn(c,l,g),[c,l,g]);return(0,q.jsxs)(`div`,{"aria-hidden":`true`,className:`pointer-events-none fixed 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:v*.62,height:16,left:b-v*.31,top:x+v*.4}}),t.map((t,r)=>{let d=r===n,f=!u&&i?.char===r,g=!u&&a?.char===r;if(f){let n=w[i.fromSlot],a=yn(n,b,x,c,l);return(0,q.jsx)(B.div,{className:`absolute left-0 top-0`,style:{width:m,height:m},initial:!1,animate:{x:[n.x-h,a.x-h,a.x-h,S,S,S],y:[n.y-h,a.y-h,a.y-h,C,C,C],scale:[1,1,1,_*.7,_*1.08,_],opacity:[1,1,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)(W,{components:e,traits:t,size:m})},r)}if(g){if(p(a.toSlot))return null;let n=w[a.toSlot],i=yn(n,b,x,c,l);return(0,q.jsx)(B.div,{className:`absolute left-0 top-0`,style:{width:m,height:m},initial:!1,animate:{x:[S,S,i.x-h,i.x-h,n.x-h,n.x-h],y:[C,C,i.y-h,i.y-h,n.y-h,n.y-h],scale:[_,_*.6,1,1,1.1,1],opacity:[1,0,0,1,1,1]},transition:{duration:.85,times:[0,.28,.34,.45,.78,1],ease:[`easeIn`,`linear`,`linear`,`easeOut`,`easeOut`]},children:(0,q.jsx)(`div`,{style:{transform:`rotate(${hn(a.toSlot)}deg)`},children:(0,q.jsx)(W,{components:e,traits:t,size:m,breathe:!1})})},r)}let v=y.get(r)??0;if(!d&&p(v))return null;let T=d?{x:b,y:x}:w[v];return(0,q.jsx)(B.div,{className:`absolute left-0 top-0 ${d?``:`pointer-events-auto cursor-pointer`}`,style:{width:m,height:m},initial:!1,animate:{x:T.x-h,y:T.y-h,scale:d?_:1,opacity:1},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(${hn(y.get(r)??0)}deg)`},children:(0,q.jsx)(W,{components:e,traits:t,size:m,breathe:d})})},r)})]})}var Sn=[{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=f(d((e,t)=>({characters:[],selectedIndex:0,ensureGenerated:()=>{t().characters.length>0||e({characters:Sn,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 Cn(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function wn(){let e=U(),t=J.use.characters(),n=J.use.ensureGenerated(),r=V(),{w:i,h:a}=Cn();(0,G.useEffect)(()=>{e&&n(e)},[e,n]);let o=gn(i,a),s=(0,G.useMemo)(()=>vn(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=mn[i%mn.length]??0;return(0,q.jsx)(`div`,{className:`absolute`,style:{left:a.x-o/2,top:a.y-o/2,width:o,height:o,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:{transform:`rotate(${u}deg)`},children:(0,q.jsx)(W,{components:e,traits:t,size:o,breathe:!1})})},n)})})}var Tn=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)]`),En=c(`min-w-0 flex-1 bg-transparent text-body-medium-lighter text-[var(--content-default)]`,`placeholder:text-[var(--content-tertiary)] outline-none`);function Y(e){return e.trim().toLowerCase()}function Dn(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 On({id:e,items:t,highlighted:n,onPick:r,onHover:i}){return(0,q.jsx)(`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,a)=>(0,q.jsx)(`li`,{id:`${e}-opt-${a}`,role:`option`,"aria-selected":a===n,onMouseDown:e=>{e.preventDefault(),r(t)},onMouseEnter:()=>i(a),className:c(`cursor-pointer rounded-md px-2.5 py-1.5 text-body-medium-lighter`,`text-[var(--content-default)]`,a===n?`bg-[var(--surface-base)]`:`bg-transparent`),children:t},t))})}function kn({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 An(e,t){(0,G.useEffect)(()=>{function n(n){e.current&&!e.current.contains(n.target)&&t()}return document.addEventListener(`mousedown`,n),()=>document.removeEventListener(`mousedown`,n)},[e,t])}function jn({label:e,placeholder:t,value:n,onChange:r,suggestions:i,autoFocus:a,required:o}){let s=(0,G.useId)(),l=`ac-${s}`,u=`ac-list-${s}`,d=(0,G.useRef)(null),[f,p]=(0,G.useState)(!1),[m,h]=(0,G.useState)(-1),g=(0,G.useMemo)(()=>Dn(i,n),[i,n]);An(d,()=>p(!1)),(0,G.useEffect)(()=>{h(e=>e>=g.length?g.length-1:e)},[g.length]);let _=f&&g.length>0;function v(e){r(e),p(!1),h(-1)}function y(e){e.key===`ArrowDown`?(e.preventDefault(),p(!0),h(e=>Math.min(e+1,g.length-1))):e.key===`ArrowUp`?(e.preventDefault(),h(e=>Math.max(e-1,0))):e.key===`Enter`&&_&&m>=0?(e.preventDefault(),v(g[m])):e.key===`Escape`&&p(!1)}return(0,q.jsxs)(`div`,{ref:d,className:`relative flex flex-col gap-1.5`,children:[(0,q.jsx)(kn,{htmlFor:l,required:o,children:e}),(0,q.jsx)(`div`,{className:c(Tn,`h-9`),children:(0,q.jsx)(`input`,{id:l,role:`combobox`,"aria-required":o,"aria-expanded":_,"aria-controls":u,"aria-autocomplete":`list`,"aria-activedescendant":m>=0?`${u}-opt-${m}`:void 0,autoComplete:`off`,autoFocus:a,className:En,placeholder:t,value:n,onChange:e=>{r(e.target.value),p(!0)},onFocus:()=>p(!0),onKeyDown:y})}),_&&(0,q.jsx)(On,{id:u,items:g,highlighted:m,onPick:v,onHover:h})]})}function Mn({label:e,placeholder:t,values:n,onChange:r,suggestions:i}){let a=(0,G.useId)(),o=`tac-${a}`,s=`tac-list-${a}`,u=(0,G.useRef)(null),[d,f]=(0,G.useState)(``),[p,m]=(0,G.useState)(!1),[h,g]=(0,G.useState)(-1),_=(0,G.useMemo)(()=>Dn(i,d,n),[i,d,n]);An(u,()=>m(!1)),(0,G.useEffect)(()=>{g(e=>e>=_.length?_.length-1:e)},[_.length]);let v=p&&_.length>0;function y(e){let t=e.trim();t&&(n.some(e=>Y(e)===Y(t))||r([...n,t]),f(``),g(-1))}function b(e){r(n.filter(t=>t!==e))}function x(e){e.key===`ArrowDown`?(e.preventDefault(),m(!0),g(e=>Math.min(e+1,_.length-1))):e.key===`ArrowUp`?(e.preventDefault(),g(e=>Math.max(e-1,0))):e.key===`Enter`?v&&h>=0?(e.preventDefault(),y(_[h])):d.trim()&&(e.preventDefault(),y(d)):e.key===`,`?(e.preventDefault(),y(d)):e.key===`Backspace`&&d.length===0&&n.length>0?b(n[n.length-1]):e.key===`Escape`&&m(!1)}return(0,q.jsxs)(`div`,{ref:u,className:`relative flex flex-col gap-1.5`,children:[(0,q.jsx)(kn,{htmlFor:o,children:e}),(0,q.jsxs)(`div`,{className:c(Tn,`min-h-9 flex-wrap py-1.5`),children:[n.map(e=>(0,q.jsx)(l,{onRemove:()=>b(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":v,"aria-controls":s,"aria-autocomplete":`list`,"aria-activedescendant":h>=0?`${s}-opt-${h}`:void 0,autoComplete:`off`,className:c(En,`h-6 w-24`),placeholder:n.length===0?t:``,value:d,onChange:e=>{f(e.target.value),m(!0)},onFocus:()=>m(!0),onKeyDown:x})]}),v&&(0,q.jsx)(On,{id:s,items:_,highlighted:h,onPick:y,onHover:g})]})}var Nn=`Software Engineer.Product Manager.Product Designer.Founder / CEO.Engineering Manager.Data Scientist.Marketing Manager.Growth Marketer.Content Writer.Sales Representative.Account Executive.Customer Success Manager.Operations Manager.Project Manager.Program Manager.Business Analyst.Data Engineer.Machine Learning Engineer.DevOps Engineer.Solutions Architect.UX Researcher.Graphic Designer.Recruiter.HR Manager.Financial Analyst.Accountant.Consultant.Investor / VC.Lawyer.Teacher.Professor.Researcher.Doctor / Physician.Nurse.Real Estate Agent.Executive Assistant.Entrepreneur.Freelancer.Student`.split(`.`),Pn=`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 Fn({initialFirstName:e=``,initialLastName:t=``,onSubmit:n}){let[i,a]=(0,G.useState)(e),[o,s]=(0,G.useState)(t),[c,l]=(0,G.useState)(``),[d,f]=(0,G.useState)([]),p=i.trim().length>0&&c.trim().length>0;function m(){p&&n({firstName:i,lastName:o,role:c,hobbies:d})}return(0,q.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,children:(0,q.jsxs)(Be,{showCreatureFooter:!1,children:[(0,q.jsx)(wn,{}),(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(),m()},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)(u,{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),autoFocus:!0,required:!0,fullWidth:!0})}),(0,q.jsx)(`div`,{style:X(.27,30),children:(0,q.jsx)(u,{label:`And your last name?`,placeholder:`Your last name (optional)`,value:o,onChange:e=>s(e.target.value),fullWidth:!0})}),(0,q.jsx)(`div`,{style:X(.34,20),children:(0,q.jsx)(jn,{label:`Your role`,placeholder:`What do you do for work?`,value:c,onChange:l,suggestions:Nn,required:!0})}),(0,q.jsx)(`div`,{style:X(.41,10),children:(0,q.jsx)(Mn,{label:`Any hobbies?`,placeholder:`Cars, books, growing tomatoes?`,values:d,onChange:f,suggestions:Pn})})]}),(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)(H,{size:16}),fullWidth:!0,disabled:!p,className:`h-11 text-base`,children:`Continue`})})]})]})})}var In=`#1A1A1A`,Ln=`#FFFFFF`;function Rn(e){let t=/^#?([0-9a-f]{6})$/i.exec(e);if(!t)return 0;let n=parseInt(t[1],16),r=n>>16&255,i=n>>8&255,a=n&255;return(r*299+i*587+a*114)/1e3/255}function zn(e,t){let n=/^#?([0-9a-f]{6})$/i.exec(e);if(!n)return e;let r=parseInt(n[1],16),i=e=>Math.max(0,Math.min(255,Math.round((r>>e&255)*t)));return`#${(1<<24|i(16)<<16|i(8)<<8|i(0)).toString(16).slice(1)}`}function Bn(e){let t=Rn(e)>.6;return{bg:e,isLight:t,fg:t?In:Ln,fgDeep:zn(e,.6),fgMuted:t?`rgba(0,0,0,0.6)`:`rgba(255,255,255,0.65)`,wash:t?`rgba(0,0,0,0.08)`:`rgba(255,255,255,0.12)`}}function Z(){let e=U(),t=J.use.characters(),n=J.use.selectedIndex();return(0,G.useMemo)(()=>{let r=t[n],i=e?.colors.find(e=>e.id===r?.color)?.hex;return Bn(i??`var(--surface-base)`)},[e,t,n])}function Q({onBack:e,onNext:t,tone:n}){let r=Z(),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 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)(m,{className:`h-5 w-5`})}),t?(0,q.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Forward`,className:`flex 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)(h,{className:`h-5 w-5`})}):null]})}var Vn=[`Ziggy`,`Quill`,`Luna`,`Remy`,`Cleo`,`Cade`];function Hn(e,t){let n=[];for(let r=0;r<e;r++)r!==t&&n.push(r);return{centerChar:t,edgeOrder:n}}function Un({onContinue:e,onBack:t,onForward:n}){let i=U(),a=J.use.characters(),o=J.use.ensureGenerated(),s=J.use.selectedIndex(),c=J.use.setSelectedIndex();(0,G.useEffect)(()=>{i&&o(i)},[i,o]);let l=a.length,[u,d]=(0,G.useState)(null),[f,m]=(0,G.useState)(``),[h,g]=(0,G.useState)(!1),v=(0,G.useRef)(!1),y=(0,G.useRef)(null),[b,x]=(0,G.useState)(null);(0,G.useEffect)(()=>{l>0&&u===null&&d(Hn(l,s))},[l,s,u]),(0,G.useEffect)(()=>{u&&c(u.centerChar)},[u,c]);let S=u?.centerChar;(0,G.useEffect)(()=>{S!=null&&!v.current&&m(Vn[S%Vn.length])},[S]),(0,G.useEffect)(()=>{h&&(y.current?.focus(),y.current?.select())},[h]);function C(e){if(!u||e===u.centerChar)return;let t=u.edgeOrder.indexOf(e);if(t<0)return;let n=[...u.edgeOrder];n[t]=u.centerChar,x({entering:{char:e,fromSlot:t},exiting:{char:u.centerChar,toSlot:t}}),d({centerChar:e,edgeOrder:n})}let w=()=>u&&C((u.centerChar+1)%l),T=()=>u&&C((u.centerChar-1+l)%l),E=(0,G.useMemo)(()=>u?a[u.centerChar]:void 0,[u,a]),D=!!i&&!!u&&!!E;function O(){E&&e({traits:E,name:f.trim()})}let k=`pointer-events-auto z-10 flex 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.jsxs)(`div`,{"data-theme":`dark`,className:`relative h-full overflow-hidden bg-[var(--surface-base)] text-[var(--content-default)]`,children:[D&&(0,q.jsx)(xn,{components:i,characters:a,centerChar:u.centerChar,edgeOrder:u.edgeOrder,entering:b?.entering??null,exiting:b?.exiting??null,onEnterComplete:e=>x(t=>t?.entering.char===e?null:t),onSelectChar:C}),(0,q.jsx)(Q,{tone:`light`,onBack:t,onNext:n?O: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:T,className:`absolute left-[calc(50%-170px)] top-[40%] -translate-y-1/2 ${k}`,children:(0,q.jsx)(p,{className:`h-4 w-4`})}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`Next character`,onClick:w,className:`absolute right-[calc(50%-170px)] top-[40%] -translate-y-1/2 ${k}`,children:(0,q.jsx)(H,{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:[h?(0,q.jsx)(`input`,{ref:y,value:f,onChange:e=>{v.current=!0,m(e.target.value)},onBlur:()=>g(!1),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),g(!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)(`button`,{type:`button`,onClick:()=>g(!0),"aria-label":`Edit name`,className:`flex items-center gap-2.5`,children:[(0,q.jsx)(`span`,{className:`text-3xl font-medium ${f?`text-[var(--content-default)]`:`text-[var(--content-tertiary)]`}`,children:f||`Name your assistant`}),(0,q.jsx)(_,{className:`h-5 w-5 text-[var(--content-tertiary)]`})]}),(0,q.jsx)(r,{type:`button`,variant:`primary`,size:`regular`,rightIcon:(0,q.jsx)(H,{size:16}),disabled:!D,onClick:O,className:`h-11 w-[234px] text-base`,children:`Continue`})]})]})}var Wn=`absolute left-1/2 top-[30%] z-10 flex w-full -translate-x-1/2 flex-col items-center gap-8 px-6 text-center`;function Gn(e){let t=1/0,n=1/0,r=-1/0,i=-1/0,a=e.match(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi)?.map(Number)??[];for(let e=0;e+1<a.length;e+=2){let o=a[e],s=a[e+1];o<t&&(t=o),s<n&&(n=s),o>r&&(r=o),s>i&&(i=s)}return{x:t,y:n,w:r-t,h:i-n}}function Kn(e){let t=Math.min(...e.map(e=>e.x)),n=Math.min(...e.map(e=>e.y)),r=Math.max(...e.map(e=>e.x+e.w)),i=Math.max(...e.map(e=>e.y+e.h));return{x:t,y:n,w:r-t,h:i-n}}var qn=.25,Jn=.46,Yn=.3,Xn=.85,Zn=40,Qn=14,$n=8;function er(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function tr({entrance:e=!1,entranceDelay:t=0,bumpNonce:n=0,settleBlink:r=!0}){let i=U(),a=J.use.characters(),o=J.use.selectedIndex(),s=V(),{w:c,h:l}=er(),[u,d]=(0,G.useState)({x:0,y:0});(0,G.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=jt();(0,G.useEffect)(()=>{n>0&&!s&&p.start({y:[0,-34,8,0],transition:{duration:.45,ease:`easeOut`}})},[n,s,p]);let[m,h]=(0,G.useState)(!1),[g,_]=(0,G.useState)(!e);(0,G.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,G.useMemo)(()=>{if(!i||!v)return null;let e=i.eyeStyles.find(e=>e.id===v.eyeStyle);return e?{paths:e.paths,bbox:Kn(e.paths.map(e=>Gn(e.svgPath)))}:null},[i,v]);if(!y)return null;let b=c*Xn,x=Math.min(Math.min(c,l)*Yn,b*y.bbox.h/y.bbox.w),S=x*y.bbox.w/y.bbox.h,C=(c-S)/2,w=l-(1-qn)*x,T=Zn/100*l-(w+x/2),E=(Jn-qn)*x,D=y.bbox.x+y.bbox.w/2,O=y.bbox.y+y.bbox.h/2;return(0,q.jsx)(B.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)(B.div,{animate:p,children:(0,q.jsx)(`div`,{style:{transform:`translate(${u.x*Qn}px, ${u.y*$n}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 nr=200,rr=40;function ir(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function ar({firstName:e,assistantName:t,onContinue:n,onBack:r,onForward:i}){let a=U(),o=J.use.characters(),s=J.use.selectedIndex(),c=V(),{w:l,h:u}=ir(),d=Z(),f=o.length>0?o[s]:void 0,p=(0,G.useMemo)(()=>{if(!a||!f)return null;let e=a.bodyShapes.find(e=>e.id===f.bodyShape),t=a.colors.find(e=>e.id===f.color);return!e||!t?null:{body:e,color:t.hex}},[a,f]),m=e.trim()?`Hey, ${e.trim()}!`:`Hey!`,h=t?.trim()?`I’m ${t.trim()}, your new AI assistant`:`I’m your new AI assistant`;if(!p)return(0,q.jsx)(`div`,{"data-theme":`dark`,className:`h-full`,style:{backgroundColor:`var(--surface-base)`}});let g=1.25*Math.max(l,u),_=g*p.body.viewBox.height/p.body.viewBox.width,v=(l-g)/2,y=(u-_)/2,b=nr/g,x=(rr/100-.5)*u;return(0,q.jsxs)(`div`,{"data-theme":`dark`,className:`relative h-full overflow-hidden`,style:{backgroundColor:`var(--surface-base)`},children:[(0,q.jsx)(B.div,{className:`absolute inset-0 z-0`,style:{backgroundColor:p.color},initial:c?!1:{opacity:0},animate:{opacity:1},transition:c?{duration:0}:{duration:.6,delay:.35}}),(0,q.jsx)(B.svg,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,viewBox:`0 0 ${p.body.viewBox.width} ${p.body.viewBox.height}`,width:g,height:_,style:{left:v,top:y,transformOrigin:`center`},initial:c?!1:{scale:b,y:x},animate:{scale:1,y:0},transition:c?{duration:0}:{type:`spring`,stiffness:78,damping:18,mass:1},children:(0,q.jsx)(`path`,{d:p.body.svgPath,fill:p.color})}),(0,q.jsx)(tr,{entrance:!0}),(0,q.jsx)(B.div,{initial:c?!1:{opacity:0},animate:{opacity:1},transition:c?{duration:0}:{duration:.4,delay:1},children:(0,q.jsx)(Q,{onBack:r,onNext:i})}),(0,q.jsxs)(`div`,{className:Wn,children:[(0,q.jsxs)(B.h1,{className:`text-center leading-[1.05]`,style:{fontFamily:`var(--font-serif)`},initial:c?!1:{scale:.9,opacity:0},animate:{scale:1,opacity:1},transition:c?{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:d.fgDeep},children:m}),(0,q.jsx)(`span`,{className:`block text-[clamp(2.5rem,6vw,5rem)]`,style:{color:d.fg},children:h})]}),(0,q.jsxs)(B.button,{type:`button`,onClick:n,className:`flex h-11 w-[234px] items-center justify-center gap-2 rounded-[10px] bg-black text-body-medium-default text-white transition-transform duration-150 active:scale-[0.97]`,initial:c?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:c?{duration:0}:{duration:.4,delay:1.15},children:[`Continue`,(0,q.jsx)(H,{className:`h-4 w-4`})]})]})]})}var or=.3,sr=.85,cr=.25;function lr(e){let t=1/0,n=1/0,r=-1/0,i=-1/0,a=e.match(/-?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi)?.map(Number)??[];for(let e=0;e+1<a.length;e+=2){let o=a[e],s=a[e+1];o<t&&(t=o),s<n&&(n=s),o>r&&(r=o),s>i&&(i=s)}return{x:t,y:n,w:r-t,h:i-n}}function ur(e){let t=Math.min(...e.map(e=>e.x)),n=Math.min(...e.map(e=>e.y)),r=Math.max(...e.map(e=>e.x+e.w)),i=Math.max(...e.map(e=>e.y+e.h));return{x:t,y:n,w:r-t,h:i-n}}function dr(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function fr(){let e=U(),t=J.use.characters(),n=J.use.selectedIndex(),r=t.length>0?t[n]:void 0,{w:i,h:a}=dr(),o=(0,G.useMemo)(()=>{if(!e||!r)return null;let t=e.eyeStyles.find(e=>e.id===r.eyeStyle);return t?{paths:t.paths,bbox:ur(t.paths.map(e=>lr(e.svgPath)))}:null},[e,r]),s=o?Math.min(Math.min(i,a)*or,i*sr*o.bbox.h/o.bbox.w):0;return{art:o,eyesW:o?s*o.bbox.w/o.bbox.h:0,eyesH:s,restCy:a-cr*s,centerX:i/2,w:i,h:a}}function pr({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=et(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)(B.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 mr={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 hr(e,t){let n=mr[e];return n&&n.length>0?n:t.filter(t=>t!==e)}var gr=new Set([`orange`,`pink`,`red`]);function _r(e,t){return gr.has(e)&&gr.has(t)}function vr(e,t,n){let r=hr(e,t),i=[];for(let e of r){if(i.length>=n)break;i.some(t=>_r(t,e))||i.push(e)}for(let e of r){if(i.length>=n)break;i.includes(e)||i.push(e)}return i}var yr=`You’ve used AI that just answers questions`,br=`The more I help`,xr=`I’m different`,Sr=`The better I get`,Cr=`and the less you have to do`,wr=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],Tr=290;function Er({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)(B.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)(B.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)(B.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 Dr({onContinue:e,onBack:t,onForward:n}){let r=Z(),i=V(),{art:a,eyesW:o,eyesH:s,restCy:c,centerX:l,w:u,h:d}=fr(),f=U(),p=J.use.characters(),m=J.use.selectedIndex(),h=p.length>0?p[m]:void 0,g=d>0&&d<=800,_=g?.12:.22,v=g?`top-[12%]`:`top-[22%]`,y=Ze(0),b=Ze(1),x=(0,G.useMemo)(()=>!f||!h?`orange`:vr(h.color,f.colors.map(e=>e.id),1)[0]??`orange`,[f,h]),S=Math.min(220,Math.max(150,u*.16)),C=-S,w=-S*.4,T=Ze(-220),E=(0,G.useMemo)(()=>!f||!h?[]:vr(h.color,f.colors.map(e=>e.id),3),[f,h]),D=Math.max(.42,Math.min(u/1100,1)),O=Math.round(Tr*D),k=-O*1.1,A=-O*.42,j=Ze(-320),[ee,te]=(0,G.useState)(!!i),[ne,re]=(0,G.useState)(!!i),[ie,M]=(0,G.useState)(!1),[ae,oe]=(0,G.useState)(!1),[se,N]=(0,G.useState)(!1),[ce,P]=(0,G.useState)(!1),[F,I]=(0,G.useState)(!!i),L=Math.min(u,768)-48,R=(0,G.useRef)(null),le=(0,G.useRef)(null),ue=(0,G.useRef)(null),z=(0,G.useRef)(null),de=(0,G.useRef)(null),[fe,pe]=(0,G.useState)(0),[me,he]=(0,G.useState)(0),[ge,_e]=(0,G.useState)(0),[ve,ye]=(0,G.useState)(0),[be,xe]=(0,G.useState)(0);return(0,G.useLayoutEffect)(()=>{R.current?.offsetHeight&&pe(R.current.offsetHeight),le.current?.offsetHeight&&he(le.current.offsetHeight),ue.current?.offsetHeight&&_e(ue.current.offsetHeight),z.current?.offsetHeight&&ye(z.current.offsetHeight),de.current?.offsetHeight&&xe(de.current.offsetHeight)},[L]),(0,G.useEffect)(()=>{y.set(c),P(!0)},[c,y]),(0,G.useEffect)(()=>{if(!i)return;let e=setTimeout(()=>{M(!0),oe(!0),N(!0)},1400);return()=>clearTimeout(e)},[i]),(0,G.useEffect)(()=>{if(i||!a)return;y.set(c),b.set(1),T.set(C),j.set(k),te(!1),re(!1),M(!1),oe(!1);let e=Math.max(s*.5,d*_-36),t=[],n=[],r=!1,o=e=>(t.push(e),e),l=e=>new Promise(t=>{n.push(setTimeout(t,e))});return(async()=>{if(await l(200),r||(te(!0),await Promise.all([o(K(y,e,{duration:.55,ease:`easeOut`})),o(K(b,.55,{duration:.55,ease:`easeOut`}))]),r)||(re(!0),await Promise.all([o(K(y,c,{type:`spring`,stiffness:210,damping:15})),o(K(b,1,{duration:.45,ease:`easeOut`}))]),r)||(await l(900),r)||(M(!0),oe(!0),await o(K(T,[C,w,w,C],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`})),r)||(await l(150),r))return;N(!0);let t=o(K(j,[k,A,A,k],{duration:1.5,times:[0,.28,.62,1],ease:`easeInOut`}));await l(700),!r&&(I(!0),await t)})(),()=>{r=!0,t.forEach(e=>e.stop()),n.forEach(clearTimeout)}},[i,a,d,_,s,c,y,b,T,C,w,j,k,A]),(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden`,style:{color:r.fg},children:[(0,q.jsx)(Q,{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:L,fontFamily:`var(--font-serif)`},children:[(0,q.jsx)(`span`,{ref:R,className:`block`,children:yr}),(0,q.jsx)(`span`,{ref:le,className:`block`,children:br}),(0,q.jsx)(`span`,{ref:ue,className:`block`,children:xr}),(0,q.jsx)(`span`,{ref:z,className:`block`,children:Sr}),(0,q.jsx)(`span`,{ref:de,className:`block`,children:Cr})]}),ce&&a&&(0,q.jsx)(pr,{art:a,eyesW:o,eyesH:s,centerX:l,eyeCy:y,eyeScale:b,blinking:!1}),!i&&f&&(0,q.jsx)(B.div,{"aria-hidden":`true`,className:`pointer-events-none absolute z-[1]`,style:{left:Math.max(16,u*.05),top:0,y:T,width:S,height:S},children:(0,q.jsx)(W,{components:f,traits:{bodyShape:`blob`,eyeStyle:`goofy`,color:x},size:S,breathe:!1})}),!i&&f&&(0,q.jsx)(B.div,{"aria-hidden":`true`,className:`pointer-events-none absolute right-0 top-0 z-[1] flex items-start`,style:{right:-Math.round(O*.12),y:j},children:wr.map((e,t)=>(0,q.jsx)(`div`,{style:{width:O,height:O,marginLeft:t===0?0:-O*.34,zIndex:wr.length-t},children:(0,q.jsx)(W,{components:f,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:E[t]??`teal`},size:O,breathe:!1})},e.bodyShape))}),(0,q.jsxs)(`div`,{className:`${Wn.replace(`top-[30%]`,v)} 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)(Er,{firstH:fe,secondH:me,color:r.fgDeep,firstText:yr,secondText:br,revealed:ee,carouseled:ie,revealFrom:`bottom`,revealDuration:.55,reduce:!!i}),(0,q.jsx)(Er,{firstH:ge,secondH:ve,color:r.fg,firstText:xr,secondText:Sr,revealed:ne,carouseled:ae,revealFrom:`top`,revealDuration:.45,reduce:!!i}),(0,q.jsx)(B.div,{className:`relative w-full overflow-hidden`,style:{color:r.fg},initial:!1,animate:{height:se?be:0},transition:i?{duration:0}:{duration:.5,ease:`easeInOut`},children:be>0&&(0,q.jsx)(`div`,{className:`flex items-center justify-center`,style:{height:be},children:(0,q.jsx)(B.span,{className:`block`,initial:!1,animate:{clipPath:se?`inset(0% 0 0% 0)`:`inset(100% 0 0 0)`},transition:i?{duration:0}:{duration:.5,ease:`easeOut`},children:Cr})})})]}),F&&(0,q.jsxs)(B.button,{type:`button`,onClick:e,className:`flex h-11 w-[234px] items-center justify-center gap-2 rounded-[10px] bg-black text-body-medium-default text-white transition-transform duration-150 active:scale-[0.97]`,initial:i?!1:{opacity:0,y:8},animate:{opacity:1,y:0},transition:i?{duration:0}:{duration:.4},children:[`Continue`,(0,q.jsx)(H,{className:`h-4 w-4`})]})]})]})}function Or({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`,dominantBaseline:`central`,children:[(0,q.jsx)(`text`,{x:`50`,y:`52`,fill:`#C88E16`,transform:`translate(1.3 1.6)`,children:`$`}),(0,q.jsx)(`text`,{x:`50`,y:`52`,fill:`#FFF6CF`,opacity:`0.7`,transform:`translate(-1.3 -1.5)`,children:`$`}),(0,q.jsx)(`text`,{x:`50`,y:`52`,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 kr({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)(B.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)(Or,{idSuffix:`front`})}),(0,q.jsx)(`div`,{style:{position:`absolute`,inset:0,backfaceVisibility:`hidden`,transform:`translateZ(-0.5px) rotateY(180deg)`},children:(0,q.jsx)(Or,{idSuffix:`back`})})]})})]})}var Ar=.3,jr=.95;function Mr({onClaim:e,onBumpEyes:t,onBack:n,onForward:r}){let i=V(),a=Z(),[o,s]=(0,G.useState)(!1);function c(){if(!o){if(s(!0),i){e();return}window.setTimeout(t,Ar*1e3)}}let l=typeof window>`u`?800:window.innerHeight,u=l*.42,d=-l*.08,f=l*.9;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,q.jsx)(Q,{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)(B.div,{animate:o&&!i?{y:[0,u,d,f],scale:[1,1,1,.2],opacity:[1,1,1,0]}:{},transition:{duration:jr,times:[0,Ar/jr,.62,1],ease:[`easeIn`,`easeOut`,`easeIn`]},onAnimationComplete:()=>{o&&e()},children:(0,q.jsx)(kr,{size:88,spinning:o&&!i})})}),!o&&(0,q.jsxs)(`button`,{type:`button`,onClick:c,className:`mt-6 flex 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)(H,{className:`h-4 w-4`})]})]})]})}function Nr({assistantId:e,assistantReady:t,onConnected:n,onSkip:r,onBack:i,onForward:a,missingCalendarScope:o=!1,onRetry:s}){let c=Z(),{handleConnect:l,oauthInProgress:u}=Ve({assistantId:e??``,onConnect:n}),d=()=>{s?.(),l()},f=!e||!t,p=f||u;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:c.fg},children:[(0,q.jsx)(Q,{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:f?`Almost ready`:o?`Access not enabled`:`Let me make this easy`}),(0,q.jsx)(`p`,{className:`text-[16px]`,style:{color:c.fgMuted},children:f?`Your assistant is still getting ready. Calendar setup will be available in a moment.`: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:d,disabled:p,className:`flex 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:c.isLight?`#1A1A1A`:`#FFFFFF`,color:c.isLight?`#FFFFFF`:`#1A1A1A`},children:f?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Starting assistant…`]}):u?(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(g,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Waiting for authorization…`]}):o?`Try again`:`Connect Calendar →`}),(0,q.jsx)(`button`,{type:`button`,onClick:r,disabled:u,className:`text-body-small-default transition-opacity hover:opacity-100 disabled:opacity-60`,style:{color:c.fgMuted},children:`Skip for now`})]})]})]})}var Pr=Bn(`#17191C`);function Fr(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}function Ir(){let e=U(),t=J.use.characters(),n=J.use.selectedIndex();return{components:e,chosen:t.length>0?t[n]:void 0}}function Lr({size:e=64,isStreaming:t=!1}){let{components:n,chosen:r}=Ir();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)(W,{components:n,traits:r,size:e,isStreaming:t})})}var Rr=64,zr=4500,Br=7e3;function Vr({onDone:e,onBack:t,onForward:n,scheduledTime:r,awaitingTime:i}){let{components:a,chosen:o}=Ir(),s=V(),{w:c,h:l}=Fr(),u=r?`Check-in scheduled for tomorrow at ${r}!`:`Check-in scheduled!`;(0,G.useEffect)(()=>{let t=setTimeout(e,i&&!r?Br:zr);return()=>clearTimeout(t)},[e,i,r]);let d=(0,G.useRef)(null),[f,p]=(0,G.useState)(null);(0,G.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 m=1.3*Math.max(c,l)/Rr,h=f?c/2-f.cx:0,g=f?l*.88-f.cy:0,_=l*.05;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10 overflow-hidden text-white`,children:[(0,q.jsx)(Q,{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:Rr,height:Rr},children:a&&o&&f&&(0,q.jsx)(B.div,{className:`absolute inset-0`,style:{transformOrigin:`center`},initial:s?!1:{scale:m,x:h,y:g},animate:{x:[h,h,0,0],y:[g,g+_,0,0],scale:[m,m,1.07,1]},transition:s?{duration:0}:{duration:1.1,times:[0,.18,.82,1],ease:[`easeOut`,`easeIn`,`easeOut`]},children:(0,q.jsx)(W,{components:a,traits:o,size:Rr})})}),(0,q.jsx)(B.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 Hr=[`Searching the web to get to know you…`,`Reading public profiles…`,`Connecting the dots…`,`Almost there…`],Ur=2800;function Wr({onDone:e,onBack:t,onAdvance:n,onForward:r,ready:i}){let a=Pr,[o,s]=(0,G.useState)(0);return(0,G.useEffect)(()=>{n?.(o);let t=o>=Hr.length-1;if(i&&t){let t=setTimeout(e,Ur);return()=>clearTimeout(t)}let r=setTimeout(()=>s(e=>(e+1)%Hr.length),Ur);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)(Q,{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)(Lr,{isStreaming:!0}),(0,q.jsx)(Pe,{mode:`wait`,children:(0,q.jsx)(B.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:Hr[o]},o)})]})]})}function Gr({claims:e,loading:t,onContinue:n,onBack:r,onForward:i}){let a=Pr,o=V(),[s,c]=(0,G.useState)(()=>new Set),l=e.filter(e=>!s.has(e.claim)),u=l.length>0,d=!t;return(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:a.fg},children:[(0,q.jsx)(Q,{onBack:r,onNext:i}),(0,q.jsxs)(`div`,{className:`absolute left-1/2 top-[14%] sm:top-[26%] z-10 flex w-full max-w-xl -translate-x-1/2 flex-col px-6`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)(Lr,{}),(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:a.fgMuted},children:u?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)(Pe,{children:l.map(e=>(0,q.jsxs)(B.div,{layout:!0,initial:o?!1:{opacity:0,y:10},animate:{opacity:1,y:0},exit:o?void 0:{opacity:0,scale:.95},className:`flex items-center justify-between gap-3 rounded-2xl px-5 py-4 text-[15px]`,style:{backgroundColor:a.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:()=>c(t=>new Set(t).add(e.claim)),className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-full transition-opacity hover:opacity-100`,style:{color:a.fgMuted},children:(0,q.jsx)(v,{className:`h-4 w-4`})})]},e.claim))})}),(0,q.jsxs)(`button`,{type:`button`,onClick:n,disabled:!d,className:`mt-8 flex 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:[d?`Continue`:`Still searching…`,d&&(0,q.jsx)(H,{className:`h-4 w-4`})]})]})]})}var Kr=[{suggestion:`I'll build you a live dashboard to track what matters to you`,prompt:`Build me a live dashboard to track what matters to me.`},{suggestion:`I'll send a weekly briefing on news in your space`,prompt:`Set up a weekly briefing on news in my space.`},{suggestion:`I'll help you get on top of your week`,prompt:`Help me get on top of my week.`},{suggestion:`I'll draft something from a few rough notes`,prompt:`Draft something from a few rough notes I'll give you.`}];function qr({label:e,tone:t}){return(0,q.jsx)(`span`,{className:`inline-flex items-center whitespace-nowrap rounded-full px-2.5 py-[3px] text-[12px] font-medium align-middle`,style:{backgroundColor:t.bg,color:t.fg},children:e})}function Jr(e,t){return e.map((n,r)=>{let i=``;return r>0&&(i=r===e.length-1?e.length===2?` and `:`, and `:`, `),(0,q.jsxs)(G.Fragment,{children:[i,(0,q.jsx)(qr,{label:n,tone:t})]},n)})}var $=64,Yr=$;function Xr({pluginLabels:e,tone:t,pillTone:n,reduce:r,slotRef:i,revealed:a}){let o=e.length>1;return(0,q.jsxs)(`div`,{className:`mt-12 flex items-center gap-3`,children:[(0,q.jsx)(`div`,{ref:i,className:`shrink-0`,style:{width:Yr,height:Yr}}),(0,q.jsxs)(B.p,{className:`text-[14px]`,style:{color:t.fg},initial:!1,animate:{opacity:+!!a,x:a?0:-6},transition:r?{duration:0}:{duration:.35},children:[`Already set up the `,Jr(e,n),` plugin`,o?`s`:``,` `,`to help with your work`]})]})}function Zr({head:e,note:t,flyToNote:n,reduce:r,onLanded:i}){let{components:a,chosen:o}=Ir();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)(B.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)(W,{components:a,traits:o,size:$})})}function Qr({suggestions:e,loading:t,installedPlugins:n=[],onSuggestionClick:r,onSkip:i,onBack:a,onForward:o}){let s=Pr,c=Z(),l=V(),u=e.length>0?e:t?[]:Kr,d=n.map(Fe).filter(e=>e.length>0),f=d.length>0,p=(0,G.useRef)(null),m=(0,G.useRef)(null),h=(0,G.useRef)(null),[g,_]=(0,G.useState)(null),[v,y]=(0,G.useState)(!1),[b,x]=(0,G.useState)(!1);(0,G.useLayoutEffect)(()=>{let e=()=>{let e=p.current,t=m.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=h.current;_({head:r(t.getBoundingClientRect()),note:i?r(i.getBoundingClientRect()):void 0})};return e(),window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[u.length,f]);let S=g?.note?.y;return(0,G.useEffect)(()=>{!f||S===void 0||v||y(!0)},[f,S,v]),(0,q.jsxs)(`div`,{className:`absolute inset-0 z-10`,style:{color:s.fg},children:[(0,q.jsx)(Q,{onBack:a,onNext:o}),(0,q.jsxs)(`div`,{ref:p,className:`absolute left-1/2 top-[14%] sm:top-[26%] z-10 flex w-full max-w-xl -translate-x-1/2 flex-col px-6`,children:[(0,q.jsxs)(`div`,{className:`flex items-center`,children:[(0,q.jsx)(B.div,{ref:m,className:`shrink-0`,style:{height:$},initial:!1,animate:v?{width:0,marginRight:0}:{width:$,marginRight:12},transition:l?{duration:0}:{duration:.5,ease:`easeInOut`}}),(0,q.jsx)(`h1`,{className:`text-[2.2rem] leading-none`,style:{fontFamily:`var(--font-serif)`},children:`Here’s what we could do first`})]}),(0,q.jsx)(`p`,{className:`mb-7 mt-2 text-[15px]`,style:{color:s.fgMuted},children:u.length>0?(0,q.jsxs)(q.Fragment,{children:[`Pick one to jump in — or start your own thing.`,` `,(0,q.jsx)(`button`,{type:`button`,onClick:i,className:`underline underline-offset-2 transition-opacity hover:opacity-80`,style:{color:s.fg},children:`Skip to Chat`})]}):`Putting together a few ideas…`}),(0,q.jsx)(`div`,{className:`flex flex-col gap-3`,children:u.map((e,t)=>(0,q.jsx)(B.button,{type:`button`,onClick:()=>r(e),initial:l?!1:{opacity:0,y:10},animate:{opacity:1,y:0},transition:l?{duration:0}:{duration:.3,delay:t*.06},className:`rounded-2xl px-5 py-4 text-left text-[15px] transition-transform duration-150 hover:scale-[1.01] active:scale-[0.99]`,style:{backgroundColor:s.isLight?`rgba(0,0,0,0.06)`:`rgba(255,255,255,0.1)`},children:(0,q.jsx)(`span`,{children:e.suggestion})},`${t}-${e.suggestion}`))}),f&&(0,q.jsx)(Xr,{pluginLabels:d,tone:s,pillTone:c,reduce:l,slotRef:h,revealed:b}),g&&(0,q.jsx)(Zr,{head:g.head,note:g.note,flyToNote:v&&f&&g.note!==void 0,reduce:l,onLanded:()=>x(!0)})]})]})}function $r(){let[e,t]=(0,G.useState)(()=>({w:typeof window>`u`?1280:window.innerWidth,h:typeof window>`u`?800:window.innerHeight}));return(0,G.useEffect)(()=>{let e=()=>t({w:window.innerWidth,h:window.innerHeight});return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var ei=[{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})}],ti=`#17191C`,ni=[{bodyShape:`blob`,eyeStyle:`gentle`},{bodyShape:`urchin`,eyeStyle:`curious`},{bodyShape:`star`,eyeStyle:`goofy`}],ri=290;function ii({peekLevel:e=0,eyesBumpNonce:t=0,darkBg:n=!1,showBottomEyes:r=!0,showTopTeam:i=!1}){let a=U(),o=J.use.characters(),s=J.use.selectedIndex(),c=V(),{w:l}=$r(),u=Math.max(.42,Math.min(l/1100,1)),d=l<640,f=o.length>0?o[s]:void 0,{bg:p,peekColors:m}=(0,G.useMemo)(()=>!a||!f?{bg:`var(--surface-base)`,peekColors:[]}:{bg:a.colors.find(e=>e.id===f.color)?.hex??`var(--surface-base)`,peekColors:vr(f.color,a.colors.map(e=>e.id),3)},[a,f]);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(B.div,{className:`absolute inset-0 z-0`,initial:!1,animate:{backgroundColor:n?ti:p},transition:c?{duration:0}:{duration:1,ease:`easeInOut`}}),r&&(0,q.jsx)(tr,{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(ri*u)*.42,right:-Math.round(ri*u)*.12},children:ni.map((e,t)=>{let n=Math.round(ri*u);return(0,q.jsx)(B.div,{style:{width:n,height:n,marginLeft:t===0?0:-n*.34,zIndex:ni.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)(W,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:m[t]??`teal`},size:n,breathe:!1})},e.bodyShape)})}),a&&(0,q.jsx)(Pe,{children:(d?ei.filter(e=>e.mobile):ei).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)(B.div,{"aria-hidden":`true`,className:`pointer-events-none fixed 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)(W,{components:a,traits:{bodyShape:e.bodyShape,eyeStyle:e.eyeStyle,color:m[e.colorIdx]??`teal`},size:n,breathe:!1})},`peek-${t}`)})})]})}function ai(){let e=i(),t=k.use.user(),n=Re.use.enterFocus(),r=Re.use.exitFocus(),o=Re.use.setPendingAvatarTraits(),s=Re.use.requestSidebarCollapse(),c=ie.use.researchOnboarding(),l=ie.use.hydrated(),[u,d]=(0,G.useState)(`form`),[f,p]=(0,G.useState)([]);function m(e){d(e)}function h(e){p([]),m(e)}function g(e){p(e=>[...e,u]),m(e)}function _(){let e=f[f.length-1];e&&(p(e=>e.slice(0,-1)),m(e))}let v=f.length>0?_:void 0,[y,b]=(0,G.useState)(null),[x,S]=(0,G.useState)(null),[C,w]=(0,G.useState)(null),[T,D]=(0,G.useState)(!1),[O,A]=(0,G.useState)(!1),[j,ee]=(0,G.useState)(0),[te,ne]=(0,G.useState)(0),{start:M,ready:se,assistantId:N,awaitReady:ce}=Bt(),P=dn(),F=P.status===`idle`||P.status===`running`,I=!F&&P.claims.length===0;(0,G.useEffect)(()=>{r(),o(null),c&&l&&M()},[r,o,M,c,l]),(0,G.useEffect)(()=>{u===`results`&&I&&(p([]),d(`suggestions`))},[u,I]);function L(t,r,i,{skip:a=!1}={}){let{firstName:c,lastName:l,role:u,hobbies:d}=t,f=[c.trim(),l.trim()].filter(Boolean).join(` `),p=c.trim(),m=!a&&i===void 0;oe({tools:[],tasks:[],tone:He,...f?{userName:f}:{},...u.trim()?{occupation:u.trim()}:{},...a?{}:{initialMessage:i??Pt({firstName:c,lastName:l,occupation:u,hobby:d.join(`, `)})},...m?{title:p?`Getting to know ${p}`:`Getting to know you`}:{},...r?.name?.trim()?{assistantName:r.name.trim()}:{}});let h=r?.name?.trim();h&&ae(h),o(r?.traits??null),m&&n(),a||E.markExpectingFirstMessage(),s(),E.checkAssistant(N??void 0).finally(()=>{e(`${re.assistant}?onboarding=1`,{replace:!0})})}function R(e){b(e);let t=e.firstName.trim();P.start({awaitAssistantId:ce,subject:{firstName:e.firstName,lastName:e.lastName,occupation:e.role,hobby:e.hobbies.join(`, `)},conversationTitle:t?`Getting to know ${t}`:`Getting to know you`}),h(`face`)}function le(e){if(e.length>0&&!e.includes(`https://www.googleapis.com/auth/calendar.events`)){A(!0);return}if(A(!1),N&&y){let e=[y.firstName.trim(),y.lastName.trim()].filter(Boolean).join(` `);w(null),D(!0),Ie({assistantId:N,userName:e||void 0,assistantName:x?.name?.trim()||void 0}).then(e=>{e.scheduled&&w(fn(e.start,e.timeZone))}).finally(()=>D(!1))}h(`meeting`)}if(!c)return l?(0,q.jsx)(a,{to:re.assistant,replace:!0}):null;if([`different`,`integration`,`letschat`,`meeting`,`looking`,`results`,`suggestions`].includes(u)&&y){let e=[`meeting`,`looking`,`results`,`suggestions`].includes(u);return(0,q.jsxs)(`div`,{"data-theme":`dark`,className:`relative h-full overflow-hidden`,children:[(0,q.jsx)(ii,{eyesBumpNonce:j,peekLevel:[`looking`,`results`,`suggestions`].includes(u)?te:0,darkBg:e,showBottomEyes:!e&&u!==`different`}),u===`different`&&(0,q.jsx)(Dr,{onContinue:()=>h(`integration`),onBack:()=>g(`intro`),onForward:v}),u===`integration`&&(0,q.jsx)(Mr,{onClaim:()=>h(`letschat`),onBumpEyes:()=>ee(e=>e+1),onBack:()=>g(`different`),onForward:v}),u===`letschat`&&(0,q.jsx)(Nr,{assistantId:N,assistantReady:se,onConnected:le,missingCalendarScope:O,onRetry:()=>A(!1),onSkip:()=>{A(!1),h(`looking`)},onBack:()=>g(`integration`),onForward:v}),u===`meeting`&&(0,q.jsx)(Vr,{scheduledTime:C??void 0,awaitingTime:T,onDone:()=>h(`looking`),onBack:()=>g(`letschat`),onForward:v}),u===`looking`&&(0,q.jsx)(Wr,{onDone:()=>h(I?`suggestions`:`results`),onBack:()=>g(`letschat`),onAdvance:e=>ne(Math.min(e+1,4)),onForward:v,ready:!F}),u===`results`&&(0,q.jsx)(Gr,{claims:P.claims,loading:F,onContinue:()=>h(`suggestions`),onBack:()=>g(`looking`),onForward:v}),u===`suggestions`&&(0,q.jsx)(Qr,{suggestions:P.suggestions,loading:F,installedPlugins:P.installedPlugins,onSuggestionClick:async e=>{await P.awaitPluginInstalls(),L(y,x,e.prompt)},onSkip:async()=>{await P.awaitPluginInstalls(),L(y,x,void 0,{skip:!0})},onBack:()=>g(I?`looking`:`results`),onForward:v})]})}return u===`intro`&&y?(0,q.jsx)(ar,{firstName:y.firstName,assistantName:x?.name,onContinue:()=>h(`different`),onBack:()=>g(`face`),onForward:v}):u===`face`&&y?(0,q.jsx)(Un,{onContinue:e=>{S(e),h(`intro`)},onBack:()=>g(`form`),onForward:v}):(0,q.jsx)(Fn,{initialFirstName:t?.firstName??``,initialLastName:t?.lastName??``,onSubmit:R})}export{ai as ResearchOnboardingRoute};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as e,nt as t,st as n}from"./local-mode-CvrNMtPF.js";var r=`/v1/remote-web/pairing-token`,i=`/v1/remote-web/pairing-challenge`,a=`/v1/guardian/refresh`,o=5,s=5e3,c=`vellum:remote-gateway:refresh-lock`,l=`vellum-remote-gateway-refresh`,u=2e4,d=2e4,f=100,p=0,m=null,h=class extends Error{status;constructor(e,t){super(t),this.name=`RemoteWebPairingError`,this.status=e}};function g(e,...t){for(let n of t){let t=e.get(n)?.trim();if(t)return t}return null}function _(e){let t=new URLSearchParams(e.search),n=e.hash.startsWith(`#`)?e.hash.slice(1):e.hash;if(n){let e=new URLSearchParams(n);for(let[n,r]of e)t.has(n)||t.set(n,r)}return t}function v(e){let t=_(typeof e==`string`?new URL(e,window.location.origin):e);return{deviceCode:g(t,`deviceCode`,`device_code`),userCode:g(t,`userCode`,`user_code`)}}function y(e=window.location){let t=/\/assistant(?:\/|$)/.exec(e.pathname);return t&&t.index>0?e.pathname.slice(0,t.index).replace(/\/+$/,``):``}function b(e,t=window.location){return`${y(t)}${e}`}function x(){return`${window.location.origin}${y()}`}function S(e){if(typeof e==`string`){let t=Date.parse(e);return Number.isFinite(t)?t:0}return e>0xe8d4a51000?e:e*1e3}function C(){return!t()||p<=0?!0:Date.now()>=p-s}function w(e){let t=e;return t?.status===`approved`&&typeof t.accessToken==`string`&&(typeof t.accessTokenExpiresAt==`string`||typeof t.accessTokenExpiresAt==`number`)&&(typeof t.refreshAfter==`string`||typeof t.refreshAfter==`number`)}function T(e){let t=e;return typeof t?.deviceCode==`string`&&typeof t.userCode==`string`&&typeof t.verificationUri==`string`&&typeof t.expiresAt==`string`&&typeof t.expiresInSeconds==`number`&&typeof t.intervalSeconds==`number`}function E(e){return new Promise(t=>setTimeout(t,e))}function D(){try{let e=localStorage.getItem(c);if(!e)return null;let t=JSON.parse(e);return typeof t.owner!=`string`||typeof t.expiresAt!=`number`?null:{owner:t.owner,expiresAt:t.expiresAt}}catch{return null}}function O(e){try{let t=D();return t&&t.expiresAt>Date.now()?!1:(localStorage.setItem(c,JSON.stringify({owner:e,expiresAt:Date.now()+u})),D()?.owner===e)}catch{return!0}}function k(e){try{D()?.owner===e&&localStorage.removeItem(c)}catch{}}async function A(e){let t=`${Date.now()}:${Math.random().toString(36).slice(2)}`,n=Date.now()+d;for(;!O(t);){if(Date.now()>=n)return e();await E(f)}try{return await e()}finally{k(t)}}async function j(e){let t=typeof navigator<`u`?navigator.locks??null:null;return t?t.request(l,e):A(e)}function M(t){p=S(t.refreshAfter),n({accessToken:t.accessToken,accessTokenExpiresAt:t.accessTokenExpiresAt}),e({url:`${window.location.origin}${y()}`,token:t.accessToken})}async function N(e,t){let n=await fetch(b(r),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({deviceCode:e}),signal:t}),i=await n.json().catch(()=>null);if(n.status===202){let e=i??{};return{status:`pending`,expiresAt:typeof e.expiresAt==`string`?e.expiresAt:``,intervalSeconds:typeof e.intervalSeconds==`number`&&e.intervalSeconds>0?e.intervalSeconds:o}}if(!n.ok)throw new h(n.status,`Pairing token exchange failed: ${n.status}`);if(!w(i))throw new h(502,`Pairing token exchange returned an invalid response`);return i}async function P(e){let t=await fetch(b(i),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:JSON.stringify({publicBaseUrl:x()}),signal:e}),n=await t.json().catch(()=>null);if(!t.ok)throw new h(t.status,`Pairing challenge creation failed: ${t.status}`);if(!T(n))throw new h(502,`Pairing challenge creation returned an invalid response`);return n}async function F(){if(!C())return!0;let e=await fetch(b(a),{method:`POST`,credentials:`include`,headers:{"Content-Type":`application/json`},body:`{}`});if(!e.ok)return!1;let t=await e.json().catch(()=>null);return w({...t,status:`approved`})?(M({...t,status:`approved`}),!0):!1}async function I(){return C()?(m??=j(F).finally(()=>{m=null}),m):!0}function L(e){return e===`vellum.ai`||e.endsWith(`.vellum.ai`)}var R=/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//;function z(e,t){if(!e)return t;if(R.test(e)){try{let t=new URL(e);if(t.protocol===`https:`&&L(t.hostname))return e}catch{}return t}return e.startsWith(`//`)||e.includes(`\\`)||!e.startsWith(`/`)?t:e}export{N as a,y as c,P as i,h as n,v as o,M as r,I as s,z as t};
|