@vellumai/web 0.10.5 → 0.10.6-dev.202607062124.26c976d

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.
Files changed (361) hide show
  1. package/dist/assets/{AnimatePresence-uY0BR2n2.js → AnimatePresence-CmYDLs_U.js} +2 -2
  2. package/dist/assets/{BundleConfirmPage-BEQyQVeN.js → BundleConfirmPage-q_7aXvmQ.js} +1 -1
  3. package/dist/assets/Combination-CK5npQNU.js +41 -0
  4. package/dist/assets/a2a-invite-FxL85rJe.js +1 -0
  5. package/dist/assets/{about-page-Ck4iLq7E.js → about-page-DuS6wGUi.js} +1 -1
  6. package/dist/assets/{account-page-B4_qrJXM.js → account-page-CUvsoaRy.js} +1 -1
  7. package/dist/assets/{account-shell-PzFH1_ZC.js → account-shell-BsiVwmJ2.js} +1 -1
  8. package/dist/assets/acp-run-detail-panel-Cdllj9Yr.js +5 -0
  9. package/dist/assets/{add-credits-modal-BnXqKqkz.js → add-credits-modal-Dh_-nMUW.js} +1 -1
  10. package/dist/assets/advanced-page-DtQuigb2.js +1 -0
  11. package/dist/assets/ai-page-CnuoMAmb.js +1 -0
  12. package/dist/assets/{animated-avatar-CEC1DGcI.js → animated-avatar-4Ev_wkO5.js} +1 -1
  13. package/dist/assets/api-CNplN3yq.js +1 -0
  14. package/dist/assets/api-key-screen-BlIbjOWY.js +1 -0
  15. package/dist/assets/api-y7YZhKda.js +1 -0
  16. package/dist/assets/{app-info-DJQFoVxX.js → app-info-BsHofcBL.js} +1 -1
  17. package/dist/assets/{archive-BFILUl9x.js → archive-0aqysuyd.js} +1 -1
  18. package/dist/assets/{archive-page-DZ_8uaQt.js → archive-page-DLIRYA5c.js} +1 -1
  19. package/dist/assets/arrow-left-DI9551VI.js +1 -0
  20. package/dist/assets/arrow-up-BxoccrRI.js +1 -0
  21. package/dist/assets/assistant-feature-flag-store-zwNNlDAc.js +1 -0
  22. package/dist/assets/assistant-identity-store-DtpjmfyA.js +1 -0
  23. package/dist/assets/{assistant-status-panel-D-XT9dcW.js → assistant-status-panel-BE7toFwn.js} +1 -1
  24. package/dist/assets/{auth-store-B1y6dgYQ.js → auth-store-kfUKGlLs.js} +2 -2
  25. package/dist/assets/background-task-detail-panel-CnA96eFQ.js +1 -0
  26. package/dist/assets/ban-CVKGuUAQ.js +1 -0
  27. package/dist/assets/{bell-DB1SrBre.js → bell-BQLonLMp.js} +1 -1
  28. package/dist/assets/billing-page-Bt1nMWP9.js +3 -0
  29. package/dist/assets/{bookmark-C3S-p0MQ.js → bookmark-CNrithFf.js} +1 -1
  30. package/dist/assets/{bookmarks-page-DmPcHyC_.js → bookmarks-page-BOodPYP6.js} +1 -1
  31. package/dist/assets/{brain-Bs6LnfHO.js → brain-BLDXGaUy.js} +1 -1
  32. package/dist/assets/{browser-DM38C5zq.js → browser-CVdfGb5o.js} +2 -2
  33. package/dist/assets/{bug-DDcuQ3au.js → bug-BsuQ5ciQ.js} +1 -1
  34. package/dist/assets/{build-state-B-RL-LxH.js → build-state-BmrkJ9vg.js} +1 -1
  35. package/dist/assets/{misc-CFzLzLPH.js → bundle-mjs-BZt35okJ.js} +1 -1
  36. package/dist/assets/button-BinV5-9D.js +1 -0
  37. package/dist/assets/{calendar-CpgH8CqM.js → calendar-h-mv1itX.js} +1 -1
  38. package/dist/assets/{capture-error-BG-GkiMq.js → capture-error-CmeVLfq0.js} +1 -1
  39. package/dist/assets/{card-BibIM9x3.js → card-Bv5O5juh.js} +1 -1
  40. package/dist/assets/channels-page-route-p9WV8E-A.js +1 -0
  41. package/dist/assets/check-DFNrQERi.js +1 -0
  42. package/dist/assets/checkbox-CMjprLL7.js +1 -0
  43. package/dist/assets/chevron-down-qD-re7AW.js +1 -0
  44. package/dist/assets/chevron-left-BMF1xNfR.js +1 -0
  45. package/dist/assets/{chevron-up-BRZN6p_l.js → chevron-up-3jCod9LW.js} +1 -1
  46. package/dist/assets/{circle-alert-DvNg50UK.js → circle-alert-zOqdmf25.js} +1 -1
  47. package/dist/assets/circle-check-VSiny8yl.js +1 -0
  48. package/dist/assets/{client-feature-flag-store-CHA6YxVq.js → client-feature-flag-store-D7egY4Pc.js} +1 -1
  49. package/dist/assets/clipboard-copy-DF6K1xc6.js +1 -0
  50. package/dist/assets/{cloud-off-rAv4OHmv.js → cloud-off-Db1nySkc.js} +1 -1
  51. package/dist/assets/cn-C36Yvcac.js +1 -0
  52. package/dist/assets/code-Czx7d7SK.js +1 -0
  53. package/dist/assets/{command-palette-DkJaPl6x.js → command-palette-CD-7D1GQ.js} +1 -1
  54. package/dist/assets/{command-palette-window-page-v-j032zP.js → command-palette-window-page-N8sr45Go.js} +1 -1
  55. package/dist/assets/{community-page-BZ9IruGQ.js → community-page-DLErAPGF.js} +1 -1
  56. package/dist/assets/confirm-dialog-Cksd-B_t.js +1 -0
  57. package/dist/assets/connect-page-C412v8dP.js +1 -0
  58. package/dist/assets/consent-controls-R2e9umlF.js +1 -0
  59. package/dist/assets/contacts-gateway-B_SghSR9.js +1 -0
  60. package/dist/assets/contacts-page-route-DjI65gnp.js +1 -0
  61. package/dist/assets/{conversation-list-fetchers-COStMaVO.js → conversation-list-fetchers-CUm3HmAi.js} +1 -1
  62. package/dist/assets/{conversation-store-B8D6wE18.js → conversation-store-DxpEce_h.js} +1 -1
  63. package/dist/assets/copy-Cn1FKrEp.js +1 -0
  64. package/dist/assets/{cpu-CiHv3fhs.js → cpu-BJuB2Khn.js} +1 -1
  65. package/dist/assets/{credit-card-BKRB1ZIi.js → credit-card-BuyWdO9t.js} +1 -1
  66. package/dist/assets/{danger-zone-redirect-page-DK4QwO4q.js → danger-zone-redirect-page-d2aq6N4V.js} +1 -1
  67. package/dist/assets/debug-page-Csiu2KSk.js +4 -0
  68. package/dist/assets/{deploy-dialogs-Cbti_xsn.js → deploy-dialogs-ButfR2sL.js} +1 -1
  69. package/dist/assets/{detail-card-EsA9SOvZ.js → detail-card-DlS6UQSn.js} +1 -1
  70. package/dist/assets/{detail-panel-stop-button-BHEQd627.js → detail-panel-stop-button-CKhDDuHa.js} +1 -1
  71. package/dist/assets/{detail-shell-CPp3KhI8.js → detail-shell-DgMRkmTg.js} +3 -3
  72. package/dist/assets/developer-page-CVgwFH3-.js +1 -0
  73. package/dist/assets/devices-page-1rxRzpL6.js +1 -0
  74. package/dist/assets/{diagnostics-BAjanSbk.js → diagnostics-DI05VzcS.js} +1 -1
  75. package/dist/assets/{dictation-overlay-page-BHrUGwJK.js → dictation-overlay-page-wprG-71y.js} +1 -1
  76. package/dist/assets/dist-5Zbn0doJ.js +1 -0
  77. package/dist/assets/dist-BfGSvuyt.js +1 -0
  78. package/dist/assets/dist-BplNsQ6a.js +1 -0
  79. package/dist/assets/dist-CHoxBrHS.js +5 -0
  80. package/dist/assets/dist-CUy-owBQ.js +1 -0
  81. package/dist/assets/dist-HApDfHwW.js +1 -0
  82. package/dist/assets/{document-viewer-page-CnFgbOqH.js → document-viewer-page-CwRkDVEf.js} +1 -1
  83. package/dist/assets/{domain-field-DYwuCpup.js → domain-field-C5a2iMot.js} +1 -1
  84. package/dist/assets/dropdown-Cw3yc6ft.js +1 -0
  85. package/dist/assets/earn-credits-modal-CxIWhlKt.js +1 -0
  86. package/dist/assets/{emails-page-B0bc-Gj2.js → emails-page-BMOnnrWT.js} +1 -1
  87. package/dist/assets/{environment-store-CnVyTyZ7.js → environment-store-C4onsfxS.js} +1 -1
  88. package/dist/assets/{esm-O9mDOR47.js → esm--l3gbjvV.js} +2 -2
  89. package/dist/assets/esm-BRM4o7fs.js +2 -0
  90. package/dist/assets/esm-CRkjZLKu.js +2 -0
  91. package/dist/assets/esm-Carr60zV.js +2 -0
  92. package/dist/assets/esm-PDP5QQ6o.js +2 -0
  93. package/dist/assets/esm-dug5b5d_.js +1 -0
  94. package/dist/assets/{external-link-RJkZLlff.js → external-link-CfkE0LZW.js} +1 -1
  95. package/dist/assets/{feature-flag-catalog-qaNLg85h.js → feature-flag-catalog-Cx3Mt6NL.js} +1 -1
  96. package/dist/assets/file-editor-DipKELZ_.js +1 -0
  97. package/dist/assets/{file-text-ClqzuFsu.js → file-text-DDcypanB.js} +1 -1
  98. package/dist/assets/general-page-Zw3w7Mw-.js +1 -0
  99. package/dist/assets/{globe-D3P5sSKJ.js → globe-BgFbM_BQ.js} +1 -1
  100. package/dist/assets/{hard-drive-CZEg1Cqc.js → hard-drive-8yxasJWm.js} +1 -1
  101. package/dist/assets/{hatching-screen-CENPVFoZ.js → hatching-screen-DjF3uLjQ.js} +1 -1
  102. package/dist/assets/home-page-route-B4L3Gw1q.js +1 -0
  103. package/dist/assets/{hosting-screen-I6v4dE5d.js → hosting-screen-DZVodbl9.js} +1 -1
  104. package/dist/assets/identity-page-route-BM03xm-k.js +1 -0
  105. package/dist/assets/index-DHkdyqF-.css +2 -0
  106. package/dist/assets/index-UOKO4wgc.js +114 -0
  107. package/dist/assets/{info-ciQS_i3y.js → info-DZoiK09u.js} +1 -1
  108. package/dist/assets/{input-D4W4p0pZ.js → input-B4po_5Zc.js} +1 -1
  109. package/dist/assets/{inspect-page-BIEfENnw.js → inspect-page-cfe5AZnb.js} +4 -4
  110. package/dist/assets/{install-lYdVLxh2.js → install-DMb9MuK1.js} +1 -1
  111. package/dist/assets/integrations-page-Dr_xFBO7.js +1 -0
  112. package/dist/assets/intelligence-layout-COKdm3_r.js +1 -0
  113. package/dist/assets/{keyboard-shortcuts-page-H4mn2-og.js → keyboard-shortcuts-page-DiWE4ryU.js} +1 -1
  114. package/dist/assets/{library-detail-page-DTbtqnJW.js → library-detail-page-CeTIoMnU.js} +1 -1
  115. package/dist/assets/{library-page-CtniKYuA.js → library-page-v3wUFnTF.js} +1 -1
  116. package/dist/assets/{link-2-r_QPxX18.js → link-2-C4ZDIIu1.js} +1 -1
  117. package/dist/assets/{list-row-Di0MK3wu.js → list-row-53wN6jRo.js} +1 -1
  118. package/dist/assets/loader-circle-D1pLQlMh.js +1 -0
  119. package/dist/assets/{local-mode-CgrENuVf.js → local-mode-ByJrKmF5.js} +1 -1
  120. package/dist/assets/{log-in-CEw63CGU.js → log-in-B8e230E5.js} +1 -1
  121. package/dist/assets/{login-flow-DB9qs18f.js → login-flow-CQBOuxLF.js} +1 -1
  122. package/dist/assets/{login-page-CA6jFCFt.js → login-page-vnpqBIhB.js} +1 -1
  123. package/dist/assets/logout-page-vtr9tiRt.js +1 -0
  124. package/dist/assets/logs-layout-CkcqQspC.js +1 -0
  125. package/dist/assets/{memory-router-playground-page-BhFJ0lwa.js → memory-router-playground-page-CxqC3pgE.js} +1 -1
  126. package/dist/assets/menu-DcXGi1Cz.js +1 -0
  127. package/dist/assets/{messages-ChEiS3wF.js → messages-DUC4TrxC.js} +1 -1
  128. package/dist/assets/{metric-card-UcIagS0r.js → metric-card-BF92fZKe.js} +1 -1
  129. package/dist/assets/{minimize-2-dKm10qRD.js → minimize-2-CFC-s4Kc.js} +1 -1
  130. package/dist/assets/misc-C_B9HCzK.js +1 -0
  131. package/dist/assets/{mobile-sidebar-drawer-BA9ERuJ7.js → mobile-sidebar-drawer-foVJV3JT.js} +1 -1
  132. package/dist/assets/{modal-BNAVT2FK.js → modal-BNmNSj72.js} +1 -1
  133. package/dist/assets/{monitor-CXU19mVX.js → monitor-1EOPw3PW.js} +1 -1
  134. package/dist/assets/{moon-CKINz50a.js → moon-DJbF6ItW.js} +1 -1
  135. package/dist/assets/mutation-error-BRenzb4b.js +1 -0
  136. package/dist/assets/{native-biometric-BK6_QtW5.js → native-biometric-Dd06YRUN.js} +1 -1
  137. package/dist/assets/{native-file-DIJL6af-.js → native-file-CYyPec06.js} +2 -2
  138. package/dist/assets/notice-DmdksIEX.js +1 -0
  139. package/dist/assets/{notifications-page-BSwHh8Mx.js → notifications-page-D_3j0fHD.js} +1 -1
  140. package/dist/assets/{oauth-complete-page-KFGDIl3q.js → oauth-complete-page-DGw6Qeh-.js} +1 -1
  141. package/dist/assets/{oauth-popup-complete-page-C9FKG9VY.js → oauth-popup-complete-page-DL14sxDo.js} +1 -1
  142. package/dist/assets/onboarding-step-layout-CKZDwtBr.js +1 -0
  143. package/dist/assets/{page-shell-WuVNE2W8.js → page-shell-DDW0YUMS.js} +1 -1
  144. package/dist/assets/{pairing-page-CT45DoH8.js → pairing-page-B2qikExD.js} +1 -1
  145. package/dist/assets/panel-item-DSW2OkcO.js +1 -0
  146. package/dist/assets/{password-reset-page-T_0pamrF.js → password-reset-page-DTfR96bR.js} +1 -1
  147. package/dist/assets/{pencil-B90pDI55.js → pencil-CrkZsWQ_.js} +1 -1
  148. package/dist/assets/{platform-detection-Ceodt3Hu.js → platform-detection-B2Y_NICI.js} +1 -1
  149. package/dist/assets/{platform-loopback-page-BXnADBto.js → platform-loopback-page-DKWhbX8d.js} +1 -1
  150. package/dist/assets/{plugin-detail-page-3mf9oR80.js → plugin-detail-page-BIJldnli.js} +1 -1
  151. package/dist/assets/plugins-page-DPlZgMvV.js +1 -0
  152. package/dist/assets/plugins-surface-CaLXg0nC.js +1 -0
  153. package/dist/assets/plus-DhlA_9wV.js +1 -0
  154. package/dist/assets/popover-CwWUSNWB.js +1 -0
  155. package/dist/assets/prechat-route-_SMtEUnE.js +1 -0
  156. package/dist/assets/{prefs-Ds__U7Hi.js → prefs-Lb7fewxF.js} +1 -1
  157. package/dist/assets/privacy-page-CliCimhi.js +1 -0
  158. package/dist/assets/{privacy-screen-DWLF6KuW.js → privacy-screen-LvejadCA.js} +1 -1
  159. package/dist/assets/{progress-bar-DIFlWPPg.js → progress-bar-CUG04P92.js} +1 -1
  160. package/dist/assets/{provider-callback-page-UAlBgfqn.js → provider-callback-page-UzLeo0MW.js} +1 -1
  161. package/dist/assets/provider-key-DKwBeieX.js +1 -0
  162. package/dist/assets/{provider-signup-page-B1fLCCUD.js → provider-signup-page-B4oArUl0.js} +1 -1
  163. package/dist/assets/proxy-CcvD-YbW.js +1 -0
  164. package/dist/assets/{quick-input-page-CyO-UVOQ.js → quick-input-page-Djdfcs-z.js} +1 -1
  165. package/dist/assets/{react-query.gen-BwkZCSTW.js → react-query.gen-4i35OX_K.js} +1 -1
  166. package/dist/assets/react-query.gen-DeuOWE_w.js +1 -0
  167. package/dist/assets/{refresh-cw-Dui3Ymsb.js → refresh-cw-BmNgSiel.js} +1 -1
  168. package/dist/assets/{remote-gateway-session-BigLiDPm.js → remote-gateway-session-BJ4rQ0kh.js} +1 -1
  169. package/dist/assets/{repeat-nCGBxntG.js → repeat-Bms5wrYv.js} +1 -1
  170. package/dist/assets/research-mock-page-BrW0tUxf.js +1 -0
  171. package/dist/assets/research-onboarding-route-Dm0YxbfE.js +61 -0
  172. package/dist/assets/{resize-errors-D1myE8D_.js → resize-errors-DQaZhn9s.js} +1 -1
  173. package/dist/assets/{resolved-assistants-store-Dqf0LJrA.js → resolved-assistants-store-0aOnrg0j.js} +1 -1
  174. package/dist/assets/{review-terms-screen-BqGwop2y.js → review-terms-screen-AIVxgFXv.js} +1 -1
  175. package/dist/assets/{routes-C6gxiCrz.js → routes-yOZYxf4R.js} +1 -1
  176. package/dist/assets/{save-BpAesNEP.js → save-BZ19CVY3.js} +1 -1
  177. package/dist/assets/{schedules-D_sclJNA.js → schedules-BIDAVwQW.js} +1 -1
  178. package/dist/assets/sdk.gen-CaWxEYUf.js +6 -0
  179. package/dist/assets/{sdk.gen-zA5ns5LT.js → sdk.gen-CoVGgJJ_.js} +1 -1
  180. package/dist/assets/{sdk.gen-DmWuY0SL.js → sdk.gen-DOzg5Wz4.js} +1 -1
  181. package/dist/assets/select-assistant-screen-B1oVdPpp.js +1 -0
  182. package/dist/assets/{setting-row-BGQgDyhv.js → setting-row-BRXi6GAS.js} +1 -1
  183. package/dist/assets/{settings-layout-D_5HXQhT.js → settings-layout-BZ5A4jtJ.js} +1 -1
  184. package/dist/assets/share-feedback-modal-Gkoafo7I.js +1 -0
  185. package/dist/assets/{shortcut-keys-vM6sNj7W.js → shortcut-keys-DKqAVRjB.js} +1 -1
  186. package/dist/assets/sidebar-tree-BK_a6kFp.js +1 -0
  187. package/dist/assets/{signup-page-DlqG9kP3.js → signup-page-UvrLAYXr.js} +1 -1
  188. package/dist/assets/{signup-shell-DMX1tgqB.js → signup-shell-OBT4B7na.js} +1 -1
  189. package/dist/assets/skills-page-UBTbEUwV.js +1 -0
  190. package/dist/assets/{sound-manager-45n1b-Bl.js → sound-manager-pCOlKYij.js} +1 -1
  191. package/dist/assets/sounds-page-CLwjSevt.js +1 -0
  192. package/dist/assets/{sparkles-Bla177ar.js → sparkles-CJZo_y1W.js} +1 -1
  193. package/dist/assets/src-DqVHFruJ.js +293 -0
  194. package/dist/assets/{stat-square-8mff1dLC.js → stat-square-BviJ7OG0.js} +1 -1
  195. package/dist/assets/subagent-detail-panel-ST006CjR.js +4 -0
  196. package/dist/assets/{subagent-store-DWKZ9Yt3.js → subagent-store-DO5AGqId.js} +1 -1
  197. package/dist/assets/system-events-page-DC15vvAx.js +1 -0
  198. package/dist/assets/{system-events-redirect-page-C16Xg1C_.js → system-events-redirect-page-DdbVeGCY.js} +1 -1
  199. package/dist/assets/{tag-CW6WC4fE.js → tag-DzhHogpl.js} +1 -1
  200. package/dist/assets/tiptap-document-editor-BO6qegnk.js +282 -0
  201. package/dist/assets/toast-DRYTs5Gs.js +1 -0
  202. package/dist/assets/{toggle-X_kQW5my.js → toggle-BILuLR9Q.js} +1 -1
  203. package/dist/assets/{tool-detail-panel-CG9Wp2NK.js → tool-detail-panel-FQOkcZGW.js} +2 -2
  204. package/dist/assets/trace-page-CRKz6QbM.js +1 -0
  205. package/dist/assets/{triangle-alert-Bz1PpciW.js → triangle-alert-BRr1dMg2.js} +1 -1
  206. package/dist/assets/{typography-BscuIPxA.js → typography-D5f7kt80.js} +1 -1
  207. package/dist/assets/{upgrade-cancel-page-KGY9H9Mg.js → upgrade-cancel-page-DF00BPfz.js} +1 -1
  208. package/dist/assets/{upgrade-success-page-9MHgGZFb.js → upgrade-success-page-DA6Tr9zI.js} +1 -1
  209. package/dist/assets/{usage-page-CVI5PvbA.js → usage-page-BSr9uTna.js} +1 -1
  210. package/dist/assets/{use-active-assistant-id-BVzVN4_g.js → use-active-assistant-id-BFSF7mIc.js} +1 -1
  211. package/dist/assets/{use-bus-subscription-BNaztnO7.js → use-bus-subscription-S-_VPr99.js} +1 -1
  212. package/dist/assets/use-is-org-ready-HO0jGSDM.js +1 -0
  213. package/dist/assets/use-onboarding-login-Y4XzgpYx.js +1 -0
  214. package/dist/assets/{use-reduced-motion-BG6r0Z46.js → use-reduced-motion-Bs2JODRV.js} +1 -1
  215. package/dist/assets/use-setup-channel-param-BtLFG7nE.js +9 -0
  216. package/dist/assets/{use-skill-categories-nKUbiuQn.js → use-skill-categories-nj_5s-gY.js} +1 -1
  217. package/dist/assets/{user-plus-COoYKnWs.js → user-plus-DVhzCH-K.js} +1 -1
  218. package/dist/assets/{utils-P-AuKiE9.js → utils-CfW86dls.js} +1 -1
  219. package/dist/assets/{viewer-store-BR99G-Ii.js → viewer-store-DM537boU.js} +1 -1
  220. package/dist/assets/{voice-page-ChYDqNwz.js → voice-page-CS6g82zt.js} +1 -1
  221. package/dist/assets/{weather-forecast-display-DaU-H5wf.js → weather-forecast-display-BxntNpic.js} +1 -1
  222. package/dist/assets/{web-DFw1Yfb1.js → web-B8bdfU9h.js} +1 -1
  223. package/dist/assets/{web-lNls6p99.js → web-CqJJF0XN.js} +1 -1
  224. package/dist/assets/{web-b9SjJqdc.js → web-DM31uNv_.js} +1 -1
  225. package/dist/assets/{web-YggPvEM4.js → web-DY5e1oFS.js} +1 -1
  226. package/dist/assets/{web-GWxiW7or.js → web-Da1ei1s9.js} +1 -1
  227. package/dist/assets/{web-DGDlV45i.js → web-jPnBkByF.js} +1 -1
  228. package/dist/assets/{web-CxyEb7Lp.js → web-xmESnXnK.js} +1 -1
  229. package/dist/assets/{welcome-screen-1tj61zH7.js → welcome-screen-DzdrFm8z.js} +1 -1
  230. package/dist/assets/workflow-detail-panel-uvOn21N8.js +1 -0
  231. package/dist/assets/workspace-page-CJRJ-P_X.js +1 -0
  232. package/dist/assets/x-Cv9j6rBZ.js +1 -0
  233. package/dist/index.html +141 -138
  234. package/package.json +1 -1
  235. package/dist/assets/Combination-UBPhVLWy.js +0 -41
  236. package/dist/assets/acp-run-detail-panel-ZJb9mPFf.js +0 -5
  237. package/dist/assets/advanced-page-BsF8JW-4.js +0 -1
  238. package/dist/assets/ai-page-BNaD9M7D.js +0 -1
  239. package/dist/assets/api-1X5EQzNF.js +0 -1
  240. package/dist/assets/api-key-screen-DiW5rDSM.js +0 -1
  241. package/dist/assets/arrow-left-CP-EhDNF.js +0 -1
  242. package/dist/assets/arrow-up-nBfZxfhi.js +0 -1
  243. package/dist/assets/assistant-api-B17nD3D6.js +0 -1
  244. package/dist/assets/assistant-feature-flag-store-Btrsn1VW.js +0 -6
  245. package/dist/assets/assistant-identity-store-cODRsfVo.js +0 -1
  246. package/dist/assets/background-task-detail-panel-DRBcuGts.js +0 -1
  247. package/dist/assets/ban-BpBuRCKI.js +0 -1
  248. package/dist/assets/billing-page-Rw3ECU55.js +0 -3
  249. package/dist/assets/button-D-AX8Voo.js +0 -1
  250. package/dist/assets/check-CW0KmV0o.js +0 -1
  251. package/dist/assets/check-D6WkI0gF.js +0 -1
  252. package/dist/assets/checkbox-ueHEk2G-.js +0 -1
  253. package/dist/assets/chevron-left-DghyKSEE.js +0 -1
  254. package/dist/assets/chevron-right-B6vEpVY0.js +0 -1
  255. package/dist/assets/circle-check-DzlJxj_M.js +0 -1
  256. package/dist/assets/cn-DvW5mxZR.js +0 -1
  257. package/dist/assets/code-aMX9iMYa.js +0 -1
  258. package/dist/assets/confirm-dialog-bfBx6UYv.js +0 -1
  259. package/dist/assets/connect-page-iwfq05E5.js +0 -1
  260. package/dist/assets/consent-controls-BzFFpG2p.js +0 -1
  261. package/dist/assets/contacts-gateway-BDJYh797.js +0 -1
  262. package/dist/assets/contacts-page-route-iggE95MQ.js +0 -9
  263. package/dist/assets/createLucideIcon-BlMXrA59.js +0 -1
  264. package/dist/assets/debug-page-DhYoaQMd.js +0 -4
  265. package/dist/assets/developer-page-D0Ttwt5o.js +0 -1
  266. package/dist/assets/devices-page-CkA_1aNA.js +0 -1
  267. package/dist/assets/dist-CGS5MDkK.js +0 -5
  268. package/dist/assets/dist-Ddn3FnfV.js +0 -1
  269. package/dist/assets/dropdown-ChWAdhLG.js +0 -1
  270. package/dist/assets/earn-credits-modal-DOIDaArW.js +0 -1
  271. package/dist/assets/esm--RA963YO.js +0 -2
  272. package/dist/assets/esm-BSRBg0oR.js +0 -2
  273. package/dist/assets/esm-CJ8uY1wn.js +0 -2
  274. package/dist/assets/esm-DTj81fJQ.js +0 -1
  275. package/dist/assets/esm-cB02a8J9.js +0 -2
  276. package/dist/assets/file-editor-Bm5LJXwA.js +0 -1
  277. package/dist/assets/general-page-Df1AoP_V.js +0 -1
  278. package/dist/assets/home-page-route-mQBcsrfW.js +0 -1
  279. package/dist/assets/identity-page-route-DlM3U1hC.js +0 -1
  280. package/dist/assets/index-B-S-gNKm.js +0 -131
  281. package/dist/assets/index-Ceh6erpc.css +0 -2
  282. package/dist/assets/info-BGLlcyt6.js +0 -1
  283. package/dist/assets/integrations-page-BBZ2VFVI.js +0 -1
  284. package/dist/assets/intelligence-layout-zqIx7Q-I.js +0 -1
  285. package/dist/assets/lib-BNGjysgr.js +0 -14
  286. package/dist/assets/loader-circle-BFRVtR3K.js +0 -1
  287. package/dist/assets/logout-page-BbQCJKwL.js +0 -1
  288. package/dist/assets/logs-layout-xXeY2t6B.js +0 -1
  289. package/dist/assets/menu-BLJEjTFD.js +0 -1
  290. package/dist/assets/mutation-error-Iab5I7oz.js +0 -1
  291. package/dist/assets/notice-CqRgVmeL.js +0 -1
  292. package/dist/assets/panel-item-Q1g7DFJw.js +0 -1
  293. package/dist/assets/plugins-page-H6DAm3HM.js +0 -1
  294. package/dist/assets/plugins-surface-gCrqfOas.js +0 -1
  295. package/dist/assets/popover-BUj2v1xo.js +0 -1
  296. package/dist/assets/prechat-route-BfQPMYu8.js +0 -1
  297. package/dist/assets/privacy-page-CLJnEPBh.js +0 -1
  298. package/dist/assets/provider-key-Ba5Bw5MO.js +0 -1
  299. package/dist/assets/proxy-BgtfAoJj.js +0 -1
  300. package/dist/assets/react-query.gen-gQ1_8EHv.js +0 -1
  301. package/dist/assets/research-mock-page-5ewHxOuJ.js +0 -1
  302. package/dist/assets/research-onboarding-route-RxDDgsKx.js +0 -61
  303. package/dist/assets/select-assistant-screen-BfhDJw-S.js +0 -1
  304. package/dist/assets/share-feedback-modal-B3axmWXR.js +0 -1
  305. package/dist/assets/sidebar-tree-DM30_BN8.js +0 -1
  306. package/dist/assets/skills-page-C303uEzv.js +0 -1
  307. package/dist/assets/sounds-page-DC_yF186.js +0 -1
  308. package/dist/assets/src-SCpl1O1B.js +0 -293
  309. package/dist/assets/subagent-detail-panel-B69kOmY_.js +0 -4
  310. package/dist/assets/system-events-page-CMXtS3Lt.js +0 -1
  311. package/dist/assets/tiptap-document-editor-BILtD2S2.js +0 -281
  312. package/dist/assets/toast-sdJJ6aTV.js +0 -1
  313. package/dist/assets/trace-page-k0cYj2Bt.js +0 -1
  314. package/dist/assets/triangle-alert-C3aHZq1F.js +0 -1
  315. package/dist/assets/use-is-org-ready-BviznO9P.js +0 -1
  316. package/dist/assets/use-onboarding-login-Da1r3M06.js +0 -1
  317. package/dist/assets/workflow-detail-panel-Di63Av9t.js +0 -1
  318. package/dist/assets/workspace-page-C5nupXN6.js +0 -1
  319. package/dist/assets/x-C8bCmIhD.js +0 -1
  320. package/dist/assets/x-DxL-bCuT.js +0 -1
  321. /package/dist/assets/{api-errors-DPruG7q9.js → api-errors-DZ6ckXtC.js} +0 -0
  322. /package/dist/assets/{avatar-bundled-components-w37NPF4o.js → avatar-bundled-components-BgAkdy0n.js} +0 -0
  323. /package/dist/assets/{avatar-svg-compositor-CNy1XmWD.js → avatar-svg-compositor-CBFYpg9m.js} +0 -0
  324. /package/dist/assets/{build.umd-4R02MPXx.js → build.umd-C5MOmzrf.js} +0 -0
  325. /package/dist/assets/{by-tool-use-id-index-Dbdu-8Kf.js → by-tool-use-id-index-CgjEry0R.js} +0 -0
  326. /package/dist/assets/{chat-rA5AbKPD.js → chat-CAcMTcde.js} +0 -0
  327. /package/dist/assets/{client-identity-KGlckm6M.js → client-identity-BMQpIS2A.js} +0 -0
  328. /package/dist/assets/{client.gen-BHupOCJH.js → client.gen-AQhSugfA.js} +0 -0
  329. /package/dist/assets/{client.gen-DU1JkKSB.js → client.gen-V_HNquaL.js} +0 -0
  330. /package/dist/assets/{composer-focus-n921WsjZ.js → composer-focus-CuAG8hXP.js} +0 -0
  331. /package/dist/assets/{conversation-selection-CNssqGbG.js → conversation-selection-BBHkzcfy.js} +0 -0
  332. /package/dist/assets/{create-selectors-BE0_e_Ed.js → create-selectors-DxrPZQND.js} +0 -0
  333. /package/dist/assets/{createLucideIcon-Bjb-Kuq7.js → createLucideIcon-IRfcSUxS.js} +0 -0
  334. /package/dist/assets/{definitions-BughTGuV.js → definitions-CJ7YHLIq.js} +0 -0
  335. /package/dist/assets/{dist-Ztj3rqLK.js → dist-CFFDykfn.js} +0 -0
  336. /package/dist/assets/{edit-chat-session-DcCgw5Qy.js → edit-chat-session-BLO0v3Pn.js} +0 -0
  337. /package/dist/assets/{effective-timezone-B99h9zr7.js → effective-timezone-3jhgb2F9.js} +0 -0
  338. /package/dist/assets/{emoji-catalog-data-D8lRMt3A.js → emoji-catalog-data-D4AV77ax.js} +0 -0
  339. /package/dist/assets/{event-bus-B3E3w-q2.js → event-bus-BXKLAX-e.js} +0 -0
  340. /package/dist/assets/{format-BDkwdD2m.js → format-0qTDTDhA.js} +0 -0
  341. /package/dist/assets/{format-date-D4tzd1DT.js → format-date-C-eCaBOj.js} +0 -0
  342. /package/dist/assets/{format-file-size-BflZ4oxc.js → format-file-size-BfZOpPdu.js} +0 -0
  343. /package/dist/assets/{haptics-BE_0g4mc.js → haptics-CIfXIgsW.js} +0 -0
  344. /package/dist/assets/{impersonate-version-flag-DyVWQf97.js → impersonate-version-flag-KQSiSpL6.js} +0 -0
  345. /package/dist/assets/{is-electron-C_ZTVhv8.js → is-electron-LEymSS4C.js} +0 -0
  346. /package/dist/assets/{llm-dimension-8g-Go8uq.js → llm-dimension-Db-cwepb.js} +0 -0
  347. /package/dist/assets/{native-deep-link-C2-dXaz_.js → native-deep-link-Dd6T5Ttd.js} +0 -0
  348. /package/dist/assets/{pdf-B-YWzK66.js → pdf-DGDlrU1i.js} +0 -0
  349. /package/dist/assets/{prechat-RG0Q0UrS.js → prechat-CUGqnJco.js} +0 -0
  350. /package/dist/assets/{prechat-names-NPlBAwCy.js → prechat-names-De-dVGbT.js} +0 -0
  351. /package/dist/assets/{public-asset-C2P77n3W.js → public-asset-CsdLlNtA.js} +0 -0
  352. /package/dist/assets/{return-to-yMLvlnXN.js → return-to-BbdJZupb.js} +0 -0
  353. /package/dist/assets/{semver-0cyB3qXO.js → semver-D_yikuJ1.js} +0 -0
  354. /package/dist/assets/{status-badge-pill-j3ke1d9o.js → status-badge-pill-Bv4itxJX.js} +0 -0
  355. /package/dist/assets/{step-indicator-dots-Bc6X141I.js → step-indicator-dots-CHroyD_f.js} +0 -0
  356. /package/dist/assets/{typed-storage-DjORmu8t.js → typed-storage-T9jtK5c0.js} +0 -0
  357. /package/dist/assets/{usage-window-B-YOzKJi.js → usage-window-FKG0JDAT.js} +0 -0
  358. /package/dist/assets/{use-is-mobile-jACt_z2d.js → use-is-mobile-Bi5fXSl0.js} +0 -0
  359. /package/dist/assets/{workflow-status-ByHycBJ_.js → workflow-status-BFiDUqYT.js} +0 -0
  360. /package/dist/assets/{xterm-B8LaLTHh.js → xterm-ClHs86Ut.js} +0 -0
  361. /package/dist/assets/{xterm-addon-fit--RE59D-m.js → xterm-addon-fit-B-HVOsbO.js} +0 -0
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BinV5-9D.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as a}from"./QueryClientProvider-DKhXIxGb.js";import{t as o}from"./useQuery-B45lW1Kk.js";import{t as s}from"./jsx-runtime-CVSDxk6A.js";import{t as c}from"./card-Bv5O5juh.js";import{t as l}from"./check-DFNrQERi.js";import{t as u}from"./chevron-left-BMF1xNfR.js";import{t as d}from"./loader-circle-D1pLQlMh.js";import{t as f}from"./pencil-CrkZsWQ_.js";import{t as p}from"./x-Cv9j6rBZ.js";import{t as m}from"./input-B4po_5Zc.js";import{c as h,f as g,o as _}from"./local-mode-ByJrKmF5.js";import{t as v}from"./is-electron-LEymSS4C.js";import{n as y}from"./resolved-assistants-store-0aOnrg0j.js";import{A as b,C as ee,a as x,j as S,n as C,o as w}from"./auth-store-kfUKGlLs.js";import{t as T}from"./client.gen-AQhSugfA.js";import{m as E}from"./native-biometric-Dd06YRUN.js";import{o as D}from"./routes-yOZYxf4R.js";import{r as O}from"./platform-detection-B2Y_NICI.js";import{o as k,r as A}from"./prefs-Lb7fewxF.js";import{t as j}from"./client-feature-flag-store-D7egY4Pc.js";import{c as M,l as te,n as N,t as ne}from"./prechat-CUGqnJco.js";import{Ct as re,b as ie,r as ae}from"./react-query.gen-DeuOWE_w.js";import{n as oe,t as P}from"./browser-CVdfGb5o.js";import{t as F}from"./public-asset-CsdLlNtA.js";import{$t as I,Et as se,J as ce,Qt as le,Tt as ue,Y as de,ca as L,d as fe,en as R,f as pe,in as z,p as B,rn as me,tn as V,vt as H,wt as he,xt as ge,yt as _e}from"./index-UOKO4wgc.js";import{t as U}from"./onboarding-step-layout-CKZDwtBr.js";import{n as ve,r as ye}from"./prechat-names-De-dVGbT.js";import{t as be}from"./step-indicator-dots-CHroyD_f.js";var W=e(t(),1);async function xe(){try{let{data:e,response:t}=await T.get({url:`/v1/onboarding/recipe/`,throwOnError:!1});if(!t?.ok||!e)return null;let n=e;return typeof n.cohort!=`string`||!Array.isArray(n.tasks)||typeof n.tone!=`string`||typeof n.bootstrap_template!=`string`||typeof n.initial_message!=`string`||!Array.isArray(n.skills)||typeof n.skip_prechat!=`boolean`?null:{cohort:n.cohort,tasks:n.tasks,tone:n.tone,bootstrapTemplate:n.bootstrap_template,initialMessage:n.initial_message,skills:n.skills,skipPrechat:n.skip_prechat}}catch{return null}}var G=s(),Se=[{label:`Push notifications`,detail:`stay in the loop even when the browser is closed`},{label:`Biometric login`,detail:`Face ID & Touch ID for instant, secure access`},{label:`Native haptics`,detail:`tactile feedback that feels part of the device`},{label:`Home screen access`,detail:`launch your assistant with a single tap`}];function Ce({onComplete:e}){function t(){B(),fe(),e()}return(0,G.jsx)(z,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col items-center justify-center px-6 pb-40 text-center`,children:[(0,G.jsx)(`div`,{className:`mb-8 flex size-16 items-center justify-center rounded-2xl border`,style:{background:`var(--surface-overlay)`,borderColor:`var(--border-element)`,boxShadow:`0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.04)`,animation:`fadeInUp 0.3s ease-out both`},children:(0,G.jsxs)(`svg`,{width:`28`,height:`28`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,style:{color:`var(--content-default)`},"aria-hidden":!0,children:[(0,G.jsx)(`rect`,{x:`5`,y:`2`,width:`14`,height:`20`,rx:`3`}),(0,G.jsx)(`line`,{x1:`12`,y1:`18`,x2:`12`,y2:`18.01`})]})}),(0,G.jsx)(`p`,{className:`text-label-small-default mb-3 uppercase tracking-[0.2em]`,style:{color:`var(--content-tertiary)`,animation:`fadeInUp 0.3s ease-out 0.05s both`},children:`One more thing`}),(0,G.jsx)(`h1`,{className:`mb-3 text-3xl font-semibold tracking-tight`,style:{color:`var(--content-default)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`Your assistant, in your pocket.`}),(0,G.jsx)(`p`,{className:`text-body-medium-lighter mb-10 max-w-sm`,style:{color:`var(--content-secondary)`,animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`The iOS app keeps your assistant a tap away — with push notifications, biometric login, and native haptics.`}),(0,G.jsx)(`div`,{className:`mb-10 w-full rounded-xl border px-5 py-4`,style:{background:`var(--surface-overlay)`,borderColor:`var(--border-element)`,animation:`fadeInUp 0.3s ease-out 0.2s both`},children:(0,G.jsx)(`ul`,{className:`space-y-4`,children:Se.map((e,t)=>(0,G.jsxs)(`li`,{className:`flex items-start gap-3`,style:{animation:`fadeInUp 0.3s ease-out ${.25+t*.05}s both`},children:[(0,G.jsx)(`span`,{className:`mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full`,style:{background:`var(--system-positive-weak)`},children:(0,G.jsx)(l,{size:12,style:{color:`var(--system-positive-strong)`}})}),(0,G.jsxs)(`span`,{className:`text-left`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-default)`},children:e.label}),(0,G.jsxs)(`span`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:[` — `,e.detail]})]})]},e.label))})}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.45s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:t,className:`h-11 text-base`,children:`Download on the App Store`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:e,className:`h-11 text-base`,children:`Continue in browser`})]})]})})}var K=`google`,we=[{id:`gmail`,label:`Gmail`,logoSrc:F(`/images/integrations/gmail.svg`)},{id:`google-calendar`,label:`Google Calendar`,logoSrc:F(`/images/integrations/google-calendar.svg`)},{id:`google-drive`,label:`Google Drive`,logoSrc:F(`/images/integrations/google-drive.svg`)}];function Te({assistantId:e,assistantName:t,onConnect:r,onSkip:i,onBack:o}){let s=v(),c=a(),l=E(),f=(0,W.useRef)(null),p=(0,W.useRef)(null),m=(0,W.useRef)(null),h=(0,W.useRef)(null),g=(0,W.useRef)(null),_=(0,W.useRef)(null),y=(0,W.useRef)(null),[b,x]=(0,W.useState)(!1),S=(0,W.useCallback)(()=>{p.current=null,x(!1)},[]),C=(0,W.useCallback)(()=>{g.current&&=(window.removeEventListener(`message`,g.current),null),_.current&&=(window.removeEventListener(`storage`,_.current),null)},[]),w=(0,W.useCallback)(()=>{f.current&&!f.current.closed&&f.current.close(),f.current=null,m.current&&=(clearInterval(m.current),null),h.current&&=(clearTimeout(h.current),null)},[]),T=re();(0,W.useEffect)(()=>()=>{m.current&&clearInterval(m.current),h.current&&clearTimeout(h.current),f.current&&!f.current.closed&&f.current.close(),g.current&&window.removeEventListener(`message`,g.current),_.current&&window.removeEventListener(`storage`,_.current),y.current&&=(y.current(),null)},[]);let O=(0,W.useCallback)(async e=>{try{return(await c.fetchQuery({...ie({path:{assistant_id:e}}),staleTime:0})).find(e=>e.provider===K&&e.connected)??null}catch{return null}},[c]),k=(0,W.useCallback)(async()=>{let e=p.current?.platformAssistantId;w(),S(),r((e?await O(e):null)?.scopes_granted??[])},[S,w,O,r]),A=(0,W.useCallback)(e=>{e.type===`vellum:oauth-complete`&&(!p.current||e.requestId!==p.current.requestId||(e.oauthStatus===`connected`?k():(w(),S())))},[S,w,k]),j=(0,W.useCallback)(e=>{let t=p.current;if(!t)return;let n=le(e,window.location.origin,t.requestId);n&&A(n)},[A]),M=(0,W.useCallback)(e=>{let t=p.current;if(!t)return;let n=I(e,t.requestId);n&&(A(n),window.localStorage.removeItem(V(t.requestId)))},[A]);me((0,W.useCallback)(e=>{let t=p.current;t&&e.requestId===t.requestId&&A({type:`vellum:oauth-complete`,requestId:e.requestId,oauthStatus:e.oauthStatus,oauthProvider:e.oauthProvider,oauthCode:e.oauthCode})},[A]));let te=(0,W.useCallback)(()=>{let t=crypto.randomUUID();if(C(),g.current=j,_.current=M,l){x(!0),(async()=>{let n;try{n=await ee(e)}catch{S();return}p.current={requestId:t,platformAssistantId:n},T.mutate({path:{assistant_id:n,provider:K},body:{requested_scopes:[],redirect_after_connect:`${D.account.oauth.popupComplete}?requestId=${t}&native=1`}},{onSuccess(e){P(e.connect_url)},onError(){S()}})})(),window.addEventListener(`message`,j),window.addEventListener(`storage`,M),y.current&&y.current();let n=oe(()=>{let e=p.current;if(!e){n(),y.current=null;return}(async()=>{let t=await O(e.platformAssistantId);p.current&&(t?await k():S(),C(),n(),y.current=null)})()});y.current=n;return}let n=window.open(``,`_blank`,`width=500,height=600`);if(n===null){C();return}f.current=n,x(!0),window.addEventListener(`message`,j),window.addEventListener(`storage`,M),m.current=setInterval(()=>{f.current&&f.current.closed&&p.current&&!h.current&&(h.current=setTimeout(async()=>{h.current=null;let e=p.current;if(!e)return;let t=window.localStorage.getItem(V(e.requestId));if(t)try{let n=JSON.parse(t);if(R(n,e.requestId)){A(n),window.localStorage.removeItem(V(e.requestId)),C();return}}catch{}let n=await O(e.platformAssistantId);p.current&&(n?await k():(w(),S()),C())},1e3))},100),(async()=>{let n;try{n=await ee(e)}catch{w(),S(),C();return}p.current={requestId:t,platformAssistantId:n},T.mutate({path:{assistant_id:n,provider:K},body:{requested_scopes:[],redirect_after_connect:`${D.account.oauth.popupComplete}?requestId=${t}`}},{onSuccess(e){f.current&&!f.current.closed?f.current.location.href=e.connect_url:p.current&&(w(),S(),C())},onError(){w(),S(),C()}})})()},[e,S,w,O,A,j,M,k,l,C,T]),N=t||`your assistant`,ne=t||`Your assistant`;return(0,G.jsx)(z,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-md flex-col items-center ${s?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:o,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${s?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Connect Google`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`mt-4 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`If you use Google, ${N} can use Gmail, Calendar, and Drive with your permission.`}),(0,G.jsx)(`div`,{className:`mt-6 flex items-stretch justify-center gap-3`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:we.map(e=>(0,G.jsxs)(`div`,{className:`flex w-24 flex-col items-center gap-2.5 rounded-2xl bg-[var(--surface-lift)] px-3 pb-3 pt-4`,children:[(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:28,height:28,className:`h-7 w-7 object-contain`,loading:`eager`}),(0,G.jsx)(`span`,{className:`text-center text-xs leading-tight text-[var(--content-tertiary)]`,children:e.label})]},e.id))}),(0,G.jsx)(`p`,{className:`mt-8 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.25s both`},children:`${ne} will never send email, change calendar events, or edit files without your permission. You can disconnect at any time.`}),(0,G.jsxs)(`div`,{className:`${s?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.35s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:te,disabled:b||T.isPending,className:`${s?`h-9`:`h-11 text-base`}`,children:b||T.isPending?(0,G.jsxs)(`span`,{className:`flex items-center justify-center gap-2`,children:[(0,G.jsx)(d,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}),`Waiting for authorization...`]}):`Connect Google`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:i,disabled:b||T.isPending,className:`${s?`h-9`:`h-11 text-base`}`,children:`Skip for now`})]})]})})}function Ee({userName:e,assistantName:t,selectedGroupId:r,displayedAssistantNames:i,onUserNameChange:a,onAssistantNameChange:o,onGroupChange:s,onBack:c,onComplete:l,onSkip:d}){let f=v();return(0,G.jsx)(z,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-md flex-col items-center ${f?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center ${c?`grid-cols-[auto_1fr_auto]`:``}`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[c?(0,G.jsx)(`button`,{type:`button`,onClick:c,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}):null,(0,G.jsx)(`h1`,{className:`text-center ${f?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Let's get to know each other.`}),c?(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}):null]}),(0,G.jsx)(`p`,{className:`mt-2 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change these any time.`}),(0,G.jsxs)(`div`,{className:`${f?`mt-6`:`mt-8`} flex w-full flex-col ${f?`gap-4`:`gap-6`}`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(m,{label:`Your name`,placeholder:`Your name`,value:e,onChange:e=>a(e.target.value),className:U,fullWidth:!0}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(m,{label:`What should I go by?`,placeholder:`Assistant name`,value:t,onChange:e=>o(e.target.value),className:U,fullWidth:!0}),(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`A few to try`}),(0,G.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:i.map(e=>{let n=e===t;return(0,G.jsx)(`button`,{type:`button`,onClick:()=>o(e),"aria-pressed":n,className:`cursor-pointer rounded-full border px-3 py-1 text-label-small-default transition-colors ${n?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] text-[var(--content-secondary)] hover:bg-[var(--surface-base)]`}`,children:e},e)})})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-secondary)]`,children:`Pick a vibe`}),(0,G.jsx)(`div`,{className:`grid grid-cols-2 gap-2`,children:ve.map(e=>(0,G.jsx)(De,{group:e,isActive:r===e.id,onToggle:()=>s(r===e.id?null:e.id)},e.id))})]})]}),(0,G.jsxs)(`div`,{className:`${f?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:l,className:`${f?`h-9`:`h-11 text-base`}`,children:`Let's go`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:d,className:`${f?`h-9`:`h-11 text-base`}`,children:`Skip`})]})]})})}function De({group:e,isActive:t,onToggle:n}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":`${e.label}, ${e.descriptor}`,className:`flex cursor-pointer flex-col items-start gap-0.5 rounded-lg border p-3 text-left transition-colors ${t?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default ${t?`text-[var(--content-inset)]`:`text-[var(--content-default)]`}`,children:e.descriptor}),(0,G.jsx)(`span`,{className:`text-body-small-default ${t?`text-[var(--content-inset)] opacity-60`:`text-[var(--content-tertiary)]`}`,children:e.tagline})]})}function Oe({userName:e,assistantName:t,displayedAssistantNames:r,onUserNameChange:i,onAssistantNameChange:a,onBack:o,onContinue:s,onSkip:c,currentStep:l,totalSteps:d}){return(0,G.jsx)(z,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col px-6 pb-40 text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center pb-4`,style:{paddingTop:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[o?(0,G.jsx)(n,{variant:`ghost`,size:`compact`,iconOnly:(0,G.jsx)(u,{}),onClick:o,"aria-label":`Back`}):(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}),(0,G.jsx)(`div`,{className:`flex justify-center`,children:(0,G.jsx)(be,{current:l,total:d})}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center pt-4`,children:[(0,G.jsx)(`h1`,{className:`text-center text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`Let's get to know each other.`}),(0,G.jsx)(`p`,{className:`mt-2 text-center text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change these any time.`}),(0,G.jsxs)(`div`,{className:`mt-8 flex w-full flex-col gap-6`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(m,{label:`Your name`,placeholder:`Your name`,value:e,onChange:e=>i(e.target.value),className:U,fullWidth:!0}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(m,{label:`What should I go by?`,placeholder:`Assistant name`,value:t,onChange:e=>a(e.target.value),className:U,fullWidth:!0}),(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`A few to try`}),(0,G.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:r.map(e=>{let n=e===t;return(0,G.jsx)(`button`,{type:`button`,onClick:()=>a(e),"aria-pressed":n,className:`cursor-pointer rounded-full border px-3 py-1 text-label-small-default transition-colors ${n?`border-[var(--primary-base)] bg-[var(--primary-base)] text-[var(--content-inset)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] text-[var(--content-secondary)] hover:bg-[var(--surface-base)]`}`,children:e},e)})})]})]})]}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:s,className:`h-11 text-base`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:c,className:`h-11 text-base`,children:`Skip`})]})]})})}var ke=[{id:`chatgpt`,label:`ChatGPT`,logoSrc:F(`/images/prior-assistants/chatgpt.svg`)},{id:`claude`,label:`Claude`,logoSrc:F(`/images/prior-assistants/claude.svg`)},{id:`openclaw`,label:`OpenClaw`,logoSrc:F(`/images/prior-assistants/openclaw.png`)},{id:`hermes`,label:`Hermes`,logoSrc:F(`/images/prior-assistants/hermes.png`)},{id:`manus`,label:`Manus`,logoSrc:F(`/images/prior-assistants/manus.svg`)},{id:`gemini`,label:`Gemini`,logoSrc:F(`/images/prior-assistants/gemini.svg`)},{id:`copilot`,label:`Copilot`,logoSrc:F(`/images/prior-assistants/copilot.svg`)}];function Ae({selectedAssistants:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),[s,l]=(0,W.useState)(()=>J(e)),[d,h]=(0,W.useState)(()=>s.length>0),g=(0,W.useRef)(Y(e));(0,W.useEffect)(()=>{let t=Y(e);if(t===g.current)return;let n=J(e);l(n),h(e=>e||n.length>0),g.current=t},[e]),(0,W.useEffect)(()=>{let n=new Set([...e].filter(e=>!e.startsWith(`other:`))),r=new Set;for(let e of s.split(`,`)){let t=e.trim();t&&(r.has(t)||(r.add(t),n.add(`other:${t}`)))}q(n,e)||(g.current=Y(n),t(n))},[s]);let _=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)},y=(0,W.useMemo)(()=>{let e=new Set;return s.split(`,`).map(e=>e.trim()).filter(t=>!t||e.has(t)?!1:(e.add(t),!0))},[s]),b=e.size===0?`Continue`:`Continue · ${e.size} selected`;return(0,G.jsx)(z,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center grid-cols-[auto_1fr_auto]`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`Have you used any of these?`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`${o?`mt-3`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`If you've built anything with another assistant, I can help you bring it over.`}),(0,G.jsxs)(`div`,{className:`${o?`mt-4`:`mt-8`} grid w-full grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:[ke.map(t=>(0,G.jsx)(je,{assistant:t,selected:e.has(t.id),onToggle:()=>_(t.id)},t.id)),d?null:(0,G.jsx)(Me,{onClick:()=>h(!0)})]}),d?(0,G.jsx)(c,{padding:`md`,className:`mt-3 w-full border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_8%,transparent)]`,children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(f,{className:`h-3.5 w-3.5 text-[var(--content-secondary)]`,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:`Something else`}),(0,G.jsx)(`button`,{type:`button`,onClick:()=>{h(!1),l(``)},"aria-label":`Dismiss custom assistants`,className:`ml-auto inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-md text-[var(--content-tertiary)] hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(p,{className:`h-3 w-3`,"aria-hidden":`true`})})]}),(0,G.jsx)(m,{"aria-label":`Other assistants`,placeholder:`e.g. Perplexity, Poe, Character.AI...`,value:s,onChange:e=>l(e.target.value),helperText:`Separate multiple assistants with commas`,className:U,fullWidth:!0}),y.length>0?(0,G.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:y.map(e=>(0,G.jsx)(`span`,{className:`rounded-full bg-[var(--primary-base)] px-3 py-1 text-label-small-default text-[var(--content-inset)]`,children:e},e))}):null]})}):null,(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:b}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I haven't used any`})]})]})})}function q(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function J(e){return[...e].filter(e=>e.startsWith(`other:`)).map(e=>e.slice(6)).sort().join(`, `)}function Y(e){return[...e].filter(e=>e.startsWith(`other:`)).sort().join(`|`)}function je({assistant:e,selected:t,onToggle:n}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":e.label,className:`relative flex h-[88px] w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border p-2 transition-colors ${t?`border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_10%,transparent)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(Ne,{assistant:e,size:32}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:e.label}),t?(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute right-2 top-2 flex h-4 w-4 items-center justify-center rounded-full bg-[var(--primary-base)]`,children:(0,G.jsx)(l,{className:`h-2.5 w-2.5 text-[var(--content-inset)]`,"aria-hidden":`true`})}):null]})}function Me({onClick:e}){return(0,G.jsxs)(`button`,{type:`button`,onClick:e,"aria-label":`Something else`,className:`flex h-[88px] w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border border-[var(--border-element)] bg-[var(--surface-lift)] p-2 transition-colors hover:bg-[var(--surface-base)]`,children:[(0,G.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,G.jsx)(L,{className:`h-4 w-4 text-[var(--content-secondary)]`,"aria-hidden":`true`})}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:`Something else`})]})}function Ne({assistant:e,size:t}){if(e.logoSrc)return e.logoSrcDark?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`flex items-center justify-center dark:hidden`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})}),(0,G.jsx)(`span`,{className:`hidden items-center justify-center dark:flex`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrcDark,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})})]}):(0,G.jsx)(`span`,{className:`flex items-center justify-center`,style:{width:t,height:t},children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})});let n=e.label.slice(0,2).toUpperCase();return(0,G.jsx)(`span`,{className:`flex items-center justify-center rounded-full bg-[var(--surface-base)] text-label-small-default text-[var(--content-default)]`,style:{width:t,height:t},"aria-hidden":`true`,children:n})}function Pe({selectedTasks:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),s=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)};return(0,G.jsx)(z,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}),(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`What are you working on?`}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsx)(`p`,{className:`${o?`mt-2`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`Pick the one or two you do most — you can select more if it really is all of it.`}),(0,G.jsx)(`div`,{className:`${o?`mt-6`:`mt-8`} flex w-full flex-col ${o?`gap-1`:`gap-2`}`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:ce.map(t=>{let n=de[t.iconKey],r=e.has(t.id);return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>s(t.id),"aria-pressed":r,className:`group flex w-full cursor-pointer items-center ${o?`gap-2 p-3`:`gap-3 px-4 py-3`} rounded-lg border text-left transition-colors ${r?`border-[var(--primary-base)] bg-[var(--primary-base)]/10`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`div`,{className:`flex w-6 shrink-0 items-center justify-center text-[var(--content-secondary)]`,children:n?(0,G.jsx)(n,{className:`h-4 w-4`}):null}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsx)(`div`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:t.label}),(0,G.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:t.sublabel})]}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`flex h-5 w-5 shrink-0 items-center justify-center rounded-md ${r?`bg-[var(--primary-base)]`:`border-[1.5px] border-[var(--border-element)]`}`,children:r?(0,G.jsx)(l,{className:`h-3 w-3 text-[var(--content-inset)]`}):null})]},t.id)})}),(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I'll set this up later`})]})]})})}var Fe=new Set([`gmail`,`google-calendar`,`google-drive`]),Ie=[{id:`gmail`,label:`Gmail`,logoSrc:F(`/images/integrations/gmail.svg`)},{id:`outlook`,label:`Outlook`,logoSrc:F(`/images/integrations/outlook.png`)},{id:`google-calendar`,label:`Google Calendar`,logoSrc:F(`/images/integrations/google-calendar.svg`)},{id:`slack`,label:`Slack`,logoSrc:F(`/images/integrations/slack.svg`)},{id:`notion`,label:`Notion`,logoSrc:F(`/images/integrations/notion.svg`)},{id:`linear`,label:`Linear`,logoSrc:F(`/images/integrations/linear-light-logo.svg`)},{id:`jira`,label:`Jira`,logoSrc:F(`/images/integrations/jira.svg`)},{id:`github`,label:`GitHub`,logoSrc:F(`/images/integrations/github.svg`),logoSrcDark:F(`/images/integrations/github-dark.svg`)},{id:`figma`,label:`Figma`,logoSrc:F(`/images/integrations/figma.svg`)},{id:`google-drive`,label:`Google Drive`,logoSrc:F(`/images/integrations/google-drive.svg`)},{id:`excel`,label:`Excel`,logoSrc:F(`/images/integrations/excel.svg`)},{id:`apple-notes`,label:`Apple Notes`,logoSrc:F(`/images/integrations/apple-notes.svg`)}];function Le(e){let t=e.map(e=>e.startsWith(`other:`)?e.slice(6):e);return Array.from(new Set(t)).sort()}function Re({selectedTools:e,onChange:t,onBack:r,onContinue:i,onSkip:a}){let o=v(),[s,l]=(0,W.useState)(()=>ze(e)),[d,h]=(0,W.useState)(()=>s.length>0),g=(0,W.useRef)(Z(e));(0,W.useEffect)(()=>{let t=Z(e);if(t===g.current)return;let n=ze(e);l(n),h(e=>e||n.length>0),g.current=t},[e]),(0,W.useEffect)(()=>{let n=new Set([...e].filter(e=>!e.startsWith(`other:`))),r=new Set;for(let e of s.split(`,`)){let t=e.trim();t&&(r.has(t)||(r.add(t),n.add(`other:${t}`)))}X(n,e)||(g.current=Z(n),t(n))},[s]);let _=n=>{let r=new Set(e);r.has(n)?r.delete(n):r.add(n),t(r)},y=(0,W.useMemo)(()=>{let e=new Set;return s.split(`,`).map(e=>e.trim()).filter(t=>!t||e.has(t)?!1:(e.add(t),!0))},[s]),b=e.size===0?`Continue`:`Continue · ${e.size} selected`;return(0,G.jsx)(z,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex w-full max-w-2xl flex-col items-center ${o?`min-h-full px-8 pt-11 pb-8 electron-prechat-type`:`px-6 pt-12 pb-40`} text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full items-center ${r?`grid-cols-[auto_1fr_auto]`:``}`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[r?(0,G.jsx)(`button`,{type:`button`,onClick:r,"aria-label":`Back`,className:`flex h-8 w-8 cursor-pointer items-center justify-center rounded-md text-[var(--content-secondary)] transition-colors hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(u,{className:`h-4 w-4`})}):null,(0,G.jsx)(`h1`,{className:`text-center ${o?`text-title-large`:`text-3xl font-semibold tracking-tight`}`,children:`What do you use?`}),r?(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`}):null]}),(0,G.jsx)(`p`,{className:`${o?`mt-3`:`mt-4`} text-center text-body-medium-lighter text-[var(--content-${o?`secondary`:`tertiary`})]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`This helps me tailor how I assist you. No connections needed — you can set those up later.`}),(0,G.jsxs)(`div`,{className:`grid w-full gap-2 ${o?`mt-4 grid-cols-4`:`mt-8 grid-cols-2 sm:grid-cols-3 md:grid-cols-4`}`,style:{animation:`fadeInUp 0.3s ease-out 0.2s both`},children:[Ie.map(t=>(0,G.jsx)(Q,{tool:t,selected:e.has(t.id),onToggle:()=>_(t.id),electron:o},t.id)),d?null:(0,G.jsx)($,{onClick:()=>h(!0),electron:o})]}),d?(0,G.jsx)(c,{padding:o?`sm`:`md`,className:`mt-3 w-full border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_8%,transparent)]`,children:(0,G.jsxs)(`div`,{className:`flex flex-col ${o?`gap-2`:`gap-3`}`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(f,{className:`h-3.5 w-3.5 text-[var(--content-secondary)]`,"aria-hidden":`true`}),(0,G.jsx)(`span`,{className:`text-body-medium-default prechat-md-regular text-[var(--content-default)]`,children:`Something else`}),(0,G.jsx)(`button`,{type:`button`,onClick:()=>{h(!1),l(``)},"aria-label":`Dismiss custom tools`,className:`ml-auto inline-flex h-6 w-6 cursor-pointer items-center justify-center rounded-md text-[var(--content-tertiary)] hover:bg-[var(--surface-base)]`,children:(0,G.jsx)(p,{className:`h-3 w-3`,"aria-hidden":`true`})})]}),(0,G.jsx)(m,{"aria-label":`Other tools`,placeholder:`e.g. Trello, Basecamp, Asana...`,value:s,onChange:e=>l(e.target.value),helperText:`Separate multiple tools with commas`,className:U,fullWidth:!0}),y.length>0?(0,G.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:y.map(e=>(0,G.jsx)(`span`,{className:`rounded-full bg-[var(--primary-base)] px-3 py-1 text-label-small-default text-[var(--content-inset)]`,children:e},e))}):null]})}):null,(0,G.jsxs)(`div`,{className:`${o?`mt-auto`:`mt-8`} flex w-full flex-col gap-2`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:e.size===0,onClick:i,className:`${o?`h-9`:`h-11 text-base`}`,children:b}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`${o?`h-9`:`h-11 text-base`}`,children:`I'll set this up later`})]})]})})}function X(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ze(e){return[...e].filter(e=>e.startsWith(`other:`)).map(e=>e.slice(6)).sort().join(`, `)}function Z(e){return[...e].filter(e=>e.startsWith(`other:`)).sort().join(`|`)}function Q({tool:e,selected:t,onToggle:n,electron:r}){return(0,G.jsxs)(`button`,{type:`button`,onClick:n,"aria-pressed":t,"aria-label":e.label,className:`relative flex ${r?`h-[72px]`:`h-[88px]`} w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border p-2 transition-colors ${t?`border-[var(--primary-base)] bg-[color-mix(in_srgb,var(--primary-base)_10%,transparent)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(Be,{tool:e,size:32}),(0,G.jsx)(`span`,{className:`${r?`w-full truncate`:`line-clamp-2`} text-center text-label-medium-default text-[var(--content-default)]`,children:e.label}),t?(0,G.jsx)(`span`,{"aria-hidden":`true`,className:`absolute right-2 top-2 flex h-4 w-4 items-center justify-center rounded-full bg-[var(--primary-base)]`,children:(0,G.jsx)(l,{className:`h-2.5 w-2.5 text-[var(--content-inset)]`,"aria-hidden":`true`})}):null]})}function $({onClick:e,electron:t}){return(0,G.jsxs)(`button`,{type:`button`,onClick:e,"aria-label":`Something else`,className:`flex ${t?`min-h-[72px]`:`h-[88px]`} w-full cursor-pointer flex-col items-center justify-center gap-1.5 rounded-lg border border-[var(--border-element)] bg-[var(--surface-lift)] p-2 transition-colors hover:bg-[var(--surface-base)]`,children:[(0,G.jsx)(`span`,{className:`flex h-8 w-8 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,G.jsx)(L,{className:`h-4 w-4 text-[var(--content-secondary)]`,"aria-hidden":`true`})}),(0,G.jsx)(`span`,{className:`line-clamp-2 text-center text-label-medium-default text-[var(--content-default)]`,children:`Something else`})]})}function Be({tool:e,size:t}){if(e.logoSrc)return e.logoSrcDark?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{className:`flex items-center justify-center dark:hidden`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})}),(0,G.jsx)(`span`,{className:`hidden items-center justify-center dark:flex`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,G.jsx)(`img`,{src:e.logoSrcDark,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})})]}):(0,G.jsx)(`span`,{className:`flex items-center justify-center`,style:{width:t,height:t},children:(0,G.jsx)(`img`,{src:e.logoSrc,alt:``,width:t,height:t,className:`max-h-full max-w-full object-contain`,loading:`eager`})});let n=e.label.slice(0,2).toUpperCase();return(0,G.jsx)(`span`,{className:`flex items-center justify-center rounded-full bg-[var(--surface-base)] text-label-small-default text-[var(--content-default)]`,style:{width:t,height:t},"aria-hidden":`true`,children:n})}function Ve({selectedGroupId:e,onGroupChange:t,onBack:r,onContinue:i,onSkip:a,currentStep:o,totalSteps:s}){return(0,G.jsx)(z,{showCreatureFooter:!1,children:(0,G.jsxs)(`div`,{className:`mx-auto flex min-h-screen w-full max-w-md flex-col px-6 pb-40 text-[var(--content-default)]`,children:[(0,G.jsxs)(`div`,{className:`grid w-full grid-cols-[auto_1fr_auto] items-center pb-4`,style:{paddingTop:`calc(var(--safe-area-inset-top, env(safe-area-inset-top, 0px)) + 1rem)`,animation:`fadeInUp 0.3s ease-out 0.1s both`},children:[(0,G.jsx)(n,{variant:`ghost`,size:`compact`,iconOnly:(0,G.jsx)(u,{}),onClick:r,"aria-label":`Back`}),(0,G.jsx)(`div`,{className:`flex justify-center`,children:(0,G.jsx)(be,{current:o,total:s})}),(0,G.jsx)(`div`,{"aria-hidden":`true`,className:`h-8 w-8`})]}),(0,G.jsxs)(`div`,{className:`flex flex-1 flex-col items-center pt-4`,children:[(0,G.jsx)(`h1`,{className:`w-full text-left text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.3s ease-out 0.1s both`},children:`What's my vibe?`}),(0,G.jsx)(`p`,{className:`mt-2 w-full text-left text-body-medium-lighter text-[var(--content-secondary)]`,style:{animation:`fadeInUp 0.3s ease-out 0.15s both`},children:`You can change this any time.`}),(0,G.jsx)(`div`,{className:`mt-8 flex w-full flex-col gap-3`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:ve.map(n=>{let r=e===n.id;return(0,G.jsxs)(`button`,{type:`button`,onClick:()=>t(r?null:n.id),"aria-pressed":r,className:`flex cursor-pointer items-center justify-between rounded-xl border px-4 py-4 text-left transition-colors ${r?`border-[var(--content-default)] bg-[var(--surface-lift)]`:`border-[var(--border-element)] bg-[var(--surface-lift)] hover:bg-[var(--surface-base)]`}`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:n.descriptor}),(0,G.jsx)(`span`,{className:`flex h-5 w-5 items-center justify-center rounded-full border-2 transition-colors ${r?`border-[var(--content-default)]`:`border-[var(--content-disabled)]`}`,children:r&&(0,G.jsx)(`span`,{className:`h-2.5 w-2.5 rounded-full bg-[var(--content-default)]`})})]},n.id)})})]}),(0,G.jsxs)(`div`,{className:`flex w-full flex-col gap-2 pb-4`,style:{animation:`fadeInUp 0.3s ease-out 0.3s both`},children:[(0,G.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,onClick:i,className:`h-11 text-base`,children:`Continue`}),(0,G.jsx)(n,{variant:`ghost`,size:`regular`,fullWidth:!0,onClick:a,className:`h-11 text-base`,children:`Skip`})]})]})})}function He(e){let[t,n]=(0,W.useState)(()=>(e??``).trim()),r=(0,W.useRef)(!1);return(0,W.useEffect)(()=>{if(r.current)return;let t=(e??``).trim();t&&n(e=>e||t)},[e]),{value:t,onChange:(0,W.useCallback)(e=>{r.current=!0,n(e)},[])}}var Ue=[`gmail`,`google-calendar`,`google-drive`],We=`experiment-activation-flow-2026-06-03`,Ge=`BOOTSTRAP-ACTIVATION-RAIL.md`;function Ke(e,t,n){return t?.initialMessage?t.initialMessage:n?N(e):ne}function qe(e){let{mode:t,recipe:n}=e,r=e.connectedScopes!==void 0,i;i=t===`native`?{tools:[],tasks:[],tone:e.tone,googleConnected:!1}:t===`paredDown`?{tools:r?[...Ue]:[],tasks:n?.tasks??[],tone:e.tone,googleConnected:r}:{tools:Le([...e.selectedTools]),tasks:[...e.selectedTasks].sort(),tone:e.tone},n&&(i.cohort=n.cohort,i.bootstrapTemplate=n.bootstrapTemplate,i.skills=n.skills),e.activationFlowEnabled&&(i.cohort=We,i.bootstrapTemplate=Ge);let a=e.userName.trim();a&&(i.userName=a);let o=e.occupation?.trim();o&&(i.occupation=o);let s=e.assistantName.trim();return s&&(i.assistantName=s),t===`paredDown`?r&&(i.googleScopes=e.connectedScopes):t===`control`&&(r?(i.googleConnected=!0,i.googleScopes=e.connectedScopes):e.googleConnected?(i.googleConnected=!0,i.googleScopes=e.googleScopes):i.googleConnected=!1),t===`control`&&e.selectedPriorAssistants.size>0&&(i.priorAssistants=Le([...e.selectedPriorAssistants])),i.initialMessage=Ke(i,e.activationFlowEnabled?null:n,e.selfIntroGreetingEnabled),i}function Je(e){return!e.localMode||e.platformSession===`present`?!0:e.platformSession===`unknown`&&e.hasCachedPlatformAssistant}function Ye(e){let{paredDown:t}=e;return[{id:`name`,funnelStep:H.nameVibe,enabled:!0},{id:`taskTone`,funnelStep:H.controlWorkType,enabled:!t},{id:`tools`,funnelStep:H.controlTools,enabled:!t},{id:`priorAssistants`,funnelStep:H.controlPriorAssistants,enabled:!t&&e.canOfferPriorAssistants},{id:`google`,funnelStep:t?H.gmailConnect:H.controlGmailConnect,enabled:e.canOfferGoogleStep&&(t||e.hasGoogleTool)},{id:`iosApp`,funnelStep:H.controlGetApp,enabled:!t&&e.showIOSAppStep}].filter(e=>e.enabled).map(({enabled:e,...t})=>t)}function Xe(){return[{id:`nativeName`,funnelStep:null},{id:`nativeVibe`,funnelStep:null}]}var Ze=`1`;function Qe(e){return e===`nativeVibe`||e===Ze?`nativeVibe`:null}function $e(e,t){let n=e.findIndex(e=>e.id===t);return n<0?null:e[n+1]?.id??null}function et(e,t){let n=e.findIndex(e=>e.id===t);return n<=0?null:e[n-1]?.id??null}function tt(){let e=r(),t=E(),n=k()&&A();return(0,W.useEffect)(()=>{!n&&!t&&e(D.onboarding.privacy,{replace:!0})},[n,t,e]),t||n}function nt(e,t){let n=e?`prechat_native_screen:${e}`:null,[r,i]=(0,W.useState)(()=>t?`nativeName`:`name`),a=(0,W.useCallback)(e=>{if(n)try{e===null?sessionStorage.removeItem(n):sessionStorage.setItem(n,e)}catch{}},[n]);return(0,W.useLayoutEffect)(()=>{if(n)try{let e=Qe(sessionStorage.getItem(n));e&&i(e)}catch{}},[n]),(0,W.useEffect)(()=>{t&&a(r===`nativeVibe`?`nativeVibe`:null)},[t,r,a]),{currentStep:r,setCurrentStep:i,clearPersistedStep:(0,W.useCallback)(()=>{a(null)},[a])}}var rt=3;function it(){let e=h();return e?.cloud===`vellum`?e.assistantId:_()[0]?.assistantId??null}function at(){let e=r(),[t]=i(),n=t.get(`preview`)===`true`,a=C.use.user(),s=x(),c=w(),l=a?.id??null,u=a?.firstName??``,d=a?.lastName??``,f=E(),p=y.use.activeAssistantId(),m=g(),h=O()&&!pe(),_=j.use.stringFlags().preChatOnboardingExperiment20260606??`control`,v=(j.use.stringFlags().experimentActivationFlow20260603??`control`)===`variant-a`,ee=j.use.selfIntroGreeting(),T=he(_),k=ue()??T,A=k===_e.paredDown,N=m?it():null,ne=tt(),{currentStep:re,setCurrentStep:ie,clearPersistedStep:oe}=nt(l,f),P=C.use.platformSession(),F=S(P),[I,ce]=(0,W.useState)(()=>new Set),[le,de]=(0,W.useState)(()=>new Set),[L,fe]=(0,W.useState)(()=>new Set),{value:R,onChange:z}=He(m&&!F?``:u||d),[B,me]=(0,W.useState)(null),[V]=(0,W.useState)(()=>ye()),[H,U]=(0,W.useState)(``),[ve,be]=(0,W.useState)(!1),[Se,K]=(0,W.useState)([]),{data:we}=o({...ae(),enabled:!c&&s&&(!m||F)}),{data:De,isLoading:ke}=o({queryKey:[`onboarding-recipe`,l],queryFn:xe,enabled:!c&&s&&!f&&!m,staleTime:1/0}),q=De??null,J=we?.id??p??N,Y=Je({localMode:m,platformSession:P,hasCachedPlatformAssistant:N!==null}),je=Y,Me=Y,Ne=async()=>{await b.checkAssistant(),e(`${D.assistant}?onboarding=1`,{replace:!0})};function Ie(e,t=k){n||ge(e,{userId:l,variant:se(t)})}let Le=[...I].some(e=>Fe.has(e)),X=f?Xe():Ye({paredDown:A,canOfferPriorAssistants:Me,canOfferGoogleStep:n?!1:je,hasGoogleTool:Le,showIOSAppStep:h});function ze(t){if(n){e(-1);return}te(qe({mode:f?`native`:A?`paredDown`:`control`,recipe:f?null:q,selectedTools:I,selectedTasks:le,selectedPriorAssistants:t?.selectedPriorAssistants??L,tone:B??q?.tone??`grounded`,userName:R,assistantName:H,selfIntroGreetingEnabled:ee,activationFlowEnabled:f?void 0:v,googleConnected:ve,googleScopes:Se,connectedScopes:t?.connectedScopes}));let r=H.trim();r&&M(r),f?(oe(),e(D.onboarding.privacy)):(b.markExpectingFirstMessage(),Ne())}let Z=(e,t)=>{e.funnelStep&&Ie(e.funnelStep);let n=$e(X,e.id);n?ie(n):ze(t)},Q=e=>{let t=et(X,e.id);t&&ie(t)};if(!ne||ke)return null;let $=X.find(e=>e.id===re)??X[0];return $?$.id===`nativeName`?(0,G.jsx)(Oe,{userName:R,assistantName:H,displayedAssistantNames:V,onUserNameChange:z,onAssistantNameChange:U,onContinue:()=>Z($),onSkip:()=>Z($),currentStep:0,totalSteps:rt}):$.id===`nativeVibe`?(0,G.jsx)(Ve,{selectedGroupId:B,onGroupChange:me,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($),currentStep:1,totalSteps:rt}):$.id===`name`?(0,G.jsx)(Ee,{userName:R,assistantName:H,selectedGroupId:B,displayedAssistantNames:V,onUserNameChange:z,onAssistantNameChange:U,onGroupChange:me,onComplete:()=>Z($),onSkip:()=>Z($)}):$.id===`taskTone`?(0,G.jsx)(Pe,{selectedTasks:le,onChange:de,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($)}):$.id===`tools`?(0,G.jsx)(Re,{selectedTools:I,onChange:ce,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>Z($)}):$.id===`priorAssistants`?(0,G.jsx)(Ae,{selectedAssistants:L,onChange:fe,onBack:()=>Q($),onContinue:()=>Z($),onSkip:()=>{let e=new Set;fe(e),Z($,{selectedPriorAssistants:e})}}):$.id===`google`?J?(0,G.jsx)(Te,{assistantId:J,assistantName:H,onConnect:e=>{be(!0),K(e),Z($,{connectedScopes:e})},onSkip:()=>Z($),onBack:()=>Q($)}):null:$.id===`iosApp`?(0,G.jsx)(Ce,{onComplete:()=>Z($)}):null:null}function ot(){return(0,G.jsx)(at,{})}export{ot as PreChatRoute};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,r as n,s as r}from"./local-settings-lVNyIOJ_.js";import{n as i}from"./device-settings-BBwtGKJb.js";import{t as a}from"./react-DJZBPgpf.js";import{p as o}from"./auth-store-B1y6dgYQ.js";var s=e(a(),1),c=`vellum:onboarding:selectedVersion`;function l(){return[o.use.shareAnalytics(),(0,s.useCallback)(e=>{o.getState().setShareAnalytics(e)},[])]}function u(){return[o.use.shareDiagnostics(),(0,s.useCallback)(e=>{o.getState().setShareDiagnostics(e)},[])]}function d(){return[o.use.tosAccepted(),(0,s.useCallback)(e=>{o.getState().setTosAccepted(e)},[])]}function f(){return[o.use.privacyConsent(),(0,s.useCallback)(e=>{o.getState().setPrivacyConsent(e)},[])]}function p(){return[o.use.analyticsConsentCurrent(),(0,s.useCallback)(e=>{o.getState().setAnalyticsConsentCurrent(e)},[])]}function m(){return[o.use.diagnosticsConsentCurrent(),(0,s.useCallback)(e=>{o.getState().setDiagnosticsConsentCurrent(e)},[])]}function h(){return o.getState().tosAccepted}function g(){return o.getState().privacyConsent}function _(){return o.getState().analyticsConsentCurrent}function v(){return o.getState().diagnosticsConsentCurrent}function y(){return o.getState().shareAnalytics&&i(`shareAnalytics`,!1)}function b(){if(typeof window>`u`)return``;try{return n(c,``)}catch{return``}}function x(e){if(!(typeof window>`u`))try{e===``?t(c):r(c,e)}catch{}}export{y as a,m as c,u as d,d as f,b as i,f as l,v as n,h as o,x as p,g as r,p as s,_ as t,l as u};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{i as t,r as n,s as r}from"./local-settings-lVNyIOJ_.js";import{n as i}from"./device-settings-BBwtGKJb.js";import{t as a}from"./react-DJZBPgpf.js";import{p as o}from"./auth-store-kfUKGlLs.js";var s=e(a(),1),c=`vellum:onboarding:selectedVersion`;function l(){return[o.use.shareAnalytics(),(0,s.useCallback)(e=>{o.getState().setShareAnalytics(e)},[])]}function u(){return[o.use.shareDiagnostics(),(0,s.useCallback)(e=>{o.getState().setShareDiagnostics(e)},[])]}function d(){return[o.use.tosAccepted(),(0,s.useCallback)(e=>{o.getState().setTosAccepted(e)},[])]}function f(){return[o.use.privacyConsent(),(0,s.useCallback)(e=>{o.getState().setPrivacyConsent(e)},[])]}function p(){return[o.use.analyticsConsentCurrent(),(0,s.useCallback)(e=>{o.getState().setAnalyticsConsentCurrent(e)},[])]}function m(){return[o.use.diagnosticsConsentCurrent(),(0,s.useCallback)(e=>{o.getState().setDiagnosticsConsentCurrent(e)},[])]}function h(){return o.getState().tosAccepted}function g(){return o.getState().privacyConsent}function _(){return o.getState().analyticsConsentCurrent}function v(){return o.getState().diagnosticsConsentCurrent}function y(){return o.getState().shareAnalytics&&i(`shareAnalytics`,!1)}function b(){if(typeof window>`u`)return``;try{return n(c,``)}catch{return``}}function x(e){if(!(typeof window>`u`))try{e===``?t(c):r(c,e)}catch{}}export{y as a,m as c,u as d,d as f,b as i,f as l,v as n,h as o,x as p,g as r,p as s,_ as t,l as u};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{a as t,n,o as r,r as i,s as a}from"./device-settings-BBwtGKJb.js";import{t as o}from"./react-DJZBPgpf.js";import{R as s,t as c}from"./button-BinV5-9D.js";import{n as l}from"./QueryClientProvider-DKhXIxGb.js";import{t as u}from"./useQuery-B45lW1Kk.js";import{t as d}from"./useMutation-Lj4VunQV.js";import{t as f}from"./jsx-runtime-CVSDxk6A.js";import{t as p}from"./cn-C36Yvcac.js";import{t as m}from"./card-Bv5O5juh.js";import{t as h}from"./chevron-down-qD-re7AW.js";import{r as g}from"./dist-5Zbn0doJ.js";import{t as _}from"./loader-circle-D1pLQlMh.js";import{t as v}from"./pencil-CrkZsWQ_.js";import{t as y}from"./x-Cv9j6rBZ.js";import{t as b}from"./notice-DmdksIEX.js";import{t as x}from"./tag-DzhHogpl.js";import{t as S}from"./input-B4po_5Zc.js";import{t as C}from"./toggle-BILuLR9Q.js";import{n as w}from"./toast-DRYTs5Gs.js";import{t as T}from"./confirm-dialog-Cksd-B_t.js";import{t as E}from"./dropdown-Cw3yc6ft.js";import{f as D,n as O,r as k}from"./auth-store-kfUKGlLs.js";import{t as A}from"./sdk.gen-DOzg5Wz4.js";import{c as j,i as ee,m as te,n as M,o as N,r as ne,s as re,t as ie}from"./native-biometric-Dd06YRUN.js";import{a as ae,o as oe}from"./routes-yOZYxf4R.js";import{n as se,t as ce}from"./react-query.gen-DeuOWE_w.js";import{C as le,En as ue,Fr as de,H as P,Ir as F,Mn as fe,Nn as pe,Pn as me,Pr as I,U as L,V as R,_ as z,bi as B,di as he,g as V,h as H,v as ge}from"./index-UOKO4wgc.js";import{t as U}from"./use-active-assistant-id-BFSF7mIc.js";import{t as W}from"./detail-card-DlS6UQSn.js";import{t as G}from"./setting-row-BRXi6GAS.js";var K=e(o(),1),q=f(),J=[{id:`accessibility`,type:`system`,sourceKind:`accessibility`,label:`Accessibility`,description:`Allows your assistant to click, type, and control apps on your behalf.`},{id:`screen`,type:`system`,sourceKind:`screen`,label:`Screen Recording`,description:`Allows your assistant to capture screen context during computer-use tasks.`},{id:`microphone`,type:`system`,sourceKind:`microphone`,label:`Microphone`,description:`Allows your assistant to capture audio for voice input and recordings.`},{id:`speechRecognition`,type:`system`,sourceKind:`speechRecognition`,label:`Speech Recognition`,description:`Allows your assistant to transcribe your speech into text on-device.`},{id:`notifications`,type:`system`,sourceKind:`notifications`,label:`Notifications`,description:`Allows your assistant to send macOS alerts for approvals, messages, and task updates.`}],_e=[{id:`notificationBadges`,type:`local`,label:`Notification Badges`,description:`Allows your assistant to show unseen conversation counts on the Dock icon.`}];function ve(){let[e,t]=(0,K.useState)(null);return{pendingKind:e,run:async(e,n)=>{t(e);try{await n()}catch{}finally{t(t=>t===e?null:t)}}}}function ye(){let[e,r]=(0,K.useState)(()=>n(`dockBadgesEnabled`,!0));return(0,K.useEffect)(()=>a(`dockBadgesEnabled`,()=>{r(n(`dockBadgesEnabled`,!0))}),[]),[e,e=>{r(e),t(`dockBadgesEnabled`,e),e||ue(0)}]}function be({row:e,onToggle:t}){return(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,q.jsx)(C,{checked:e.checked,disabled:e.disabled,"aria-label":e.label,onChange:()=>t(e.id)}),(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`button`,{type:`button`,disabled:e.disabled,onClick:()=>t(e.id),className:p(`block w-full text-left`,e.disabled?`cursor-not-allowed`:`cursor-pointer`),children:[(0,q.jsx)(`span`,{className:`block text-[14px] font-semibold leading-[18px] text-[var(--content-emphasised)]`,children:e.label}),(0,q.jsx)(`span`,{className:`mt-1 block text-[13px] font-medium leading-[18px] text-[var(--content-tertiary)]`,children:e.description})]}),e.error&&(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:e.error})]})]})}function xe(){return(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin rounded-full border-2 border-[var(--border-base)] border-t-[var(--content-tertiary)]`})}function Se({compact:e=!1}){let{state:t,loading:n,error:r,supported:i,refresh:a}=me(),{pendingKind:o,run:s}=ve(),[c,l]=ye(),u=(0,K.useMemo)(()=>{let e=new Map;if(!t)return e;for(let n of J){let r=t[n.sourceKind];r&&e.set(n.id,{meta:n,item:r})}return e},[t]),d=(0,K.useMemo)(()=>{let e=J.map(e=>{let t=u.get(e.id)?.item;return t?{id:e.id,label:e.label,description:e.description,checked:t.status===`granted`,disabled:o===e.id||t.status===`restricted`,...t.error?{error:t.error}:{}}:null}).filter(Boolean),t=_e.map(e=>({id:e.id,label:e.label,description:e.description,checked:c,disabled:o===e.id}));return[...e,...t]},[c,o,u]);if(!i)return null;let f=async(e,t)=>{t.status===`granted`||t.status===`denied`||!t.canRequest?await fe(e.sourceKind):await pe(e.sourceKind),await a()},p=e=>{let t=u.get(e);if(t){s(e,()=>f(t.meta,t.item));return}e===`notificationBadges`&&s(e,async()=>{l(!c)})};return(0,q.jsxs)(`section`,{className:`w-full rounded-[20px] border border-[var(--border-hover)] bg-[var(--surface-lift)] px-4 pb-3 pt-5`,children:[(0,q.jsx)(`h2`,{className:`text-[18px] font-semibold leading-[22px] text-[var(--content-emphasised)]`,children:`System Permissions`}),n&&d.length===0?(0,q.jsxs)(`div`,{className:`mt-6 flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,q.jsx)(xe,{}),`Checking permissions...`]}):(0,q.jsx)(`div`,{className:`mt-3 space-y-2`,children:d.map(e=>(0,q.jsx)(be,{row:e,onToggle:p},e.id))}),r&&(0,q.jsx)(`div`,{role:`alert`,className:`mt-6 rounded-lg border border-[color-mix(in_srgb,var(--system-negative-strong)_25%,transparent)] bg-[var(--system-negative-weak)] p-3 text-body-medium-lighter text-[var(--content-secondary)]`,children:r})]})}function Ce(){let e=F({platformHostedOnly:!0}),t=I(),n=de(),r=l(),{data:i,isLoading:a,isError:o}=u({...ce(),enabled:e===`full`&&t}),s=d({mutationFn:async e=>{let{data:t}=await A({body:{access_consented:e},throwOnError:!0});return t},onSuccess:e=>{se(r,void 0,e),w.success(e?.access_consented?`Admin data access enabled.`:`Admin data access disabled.`)},onError:()=>{w.error(`Failed to update log access consent.`)}});if(e===`gated`)return null;let c=e===`full`&&n,f=i?.access_consented??!1,p=e!==`full`||!t||a||o||s.isPending;return(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Allow Staff Access`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--content-tertiary)]`,children:`When enabled, Vellum Staff will be able to access your assistant and its data for debugging purposes. It's suggested that you leave this off and only turn it on temporarily if you need Vellum Support's help in investigating an issue.`}),e===`full`&&o&&(0,q.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:`Failed to load consent setting.`})]}),(0,q.jsx)(`div`,{className:`flex items-center gap-2`,children:e===`disabled`?null:(0,q.jsxs)(q.Fragment,{children:[(s.isPending||c)&&(0,q.jsx)(_,{className:`h-4 w-4 animate-spin text-[var(--content-tertiary)]`}),(0,q.jsx)(C,{checked:f,disabled:p,onChange:()=>s.mutate(!f)})]})})]}),e===`disabled`&&(0,q.jsx)(le,{className:`mt-3`,children:`Log in to the Vellum platform to manage admin data access.`})]})}function we(){let e=te(),[t,n]=(0,K.useState)(()=>ee()),[r,i]=(0,K.useState)(!1),[a,o]=(0,K.useState)(`Face ID`),[s,c]=(0,K.useState)(!1);if((0,K.useEffect)(()=>{e&&(ne().then(i),M().then(o))},[e]),!e||!r)return null;let l=async()=>{c(!0);try{if(t)N(!1),await ie(),n(!1);else{let e=j();e&&await re(e),N(!0),n(!0)}}finally{c(!1)}};return(0,q.jsx)(W,{title:`Security`,children:(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsxs)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:[`Use `,a,` for sign-in`]}),(0,q.jsxs)(`p`,{className:`mt-1 text-body-small-default text-[var(--content-tertiary)]`,children:[`When your session expires, verify with `,a,` or your device passcode instead of signing in again.`]})]}),(0,q.jsx)(C,{checked:t,onChange:()=>void l(),disabled:s})]})})}function Y(){return(0,q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)] dark:bg-[var(--surface-lift)]`})}var X=H.map(e=>({value:e.id,label:e.label,icon:(0,q.jsx)(e.icon,{className:`h-3.5 w-3.5`})}));function Te(){let e=U(),t=l(),{data:n,isError:r}=u({queryKey:[`thresholds`,e],queryFn:()=>z(e),staleTime:3e4}),[i,a]=(0,K.useState)(`relaxed`),[o,s]=(0,K.useState)(`conservative`),[c,d]=(0,K.useState)(`strict`),[f,p]=(0,K.useState)(!1),_=(0,K.useRef)(!1),[v,y]=(0,K.useState)(!1),b=(0,K.useRef)(null),x=(0,K.useRef)(null);(0,K.useEffect)(()=>{!n||_.current||(a(V(n.interactive).id),s(V(n.autonomous).id),d(V(n.headless).id),y(!0))},[n]),(0,K.useEffect)(()=>()=>{b.current!==null&&(clearTimeout(b.current),b.current=null,x.current?.(),x.current=null)},[]);let S=(0,K.useCallback)((n,r,i)=>{if(!e||!v)return;let a=H.find(e=>e.id===n)?.riskThreshold,o=H.find(e=>e.id===r)?.riskThreshold,s=H.find(e=>e.id===i)?.riskThreshold;!a||!o||!s||ge(e,{interactive:a,autonomous:o,headless:s}).then(()=>{t.invalidateQueries({queryKey:[`thresholds`,e]})}).catch(()=>{})},[e,v,t]),C=(0,K.useCallback)((e,t,n)=>{b.current!==null&&clearTimeout(b.current),x.current=()=>S(e,t,n),b.current=setTimeout(()=>{x.current?.(),b.current=null,x.current=null},500)},[S]),w=(0,K.useCallback)(e=>{_.current=!0,a(e),C(e,o,c)},[o,c,C]),T=(0,K.useCallback)(e=>{_.current=!0,s(e),C(i,e,c)},[i,c,C]),D=(0,K.useCallback)(e=>{_.current=!0,d(e),C(i,o,e)},[i,o,C]),O=H.find(e=>e.id===i),k=H.find(e=>e.id===o),A=H.find(e=>e.id===c),j=!e||!v;return(0,q.jsxs)(m,{children:[(0,q.jsx)(`h2`,{className:`text-title-medium text-[var(--content-default)]`,children:`Risk Tolerance`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Control which actions your assistant can take without asking first. Each action is classified by risk level — your tolerance determines which levels auto-approve.`}),r&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--system-negative-strong)]`,children:`Could not load threshold settings. Check your connection and reload.`}),(0,q.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Conversations`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When you're chatting with your assistant directly.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:i,onChange:w,options:X,disabled:j})}),O&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:O.description})]}),(0,q.jsx)(Y,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsxs)(`button`,{type:`button`,onClick:()=>p(e=>!e),className:`flex items-center gap-1 text-[var(--content-secondary)] hover:text-[var(--content-default)] transition-colors`,"aria-expanded":f,children:[f?(0,q.jsx)(h,{className:`h-4 w-4`}):(0,q.jsx)(g,{className:`h-4 w-4`}),(0,q.jsx)(`span`,{className:`text-body-medium-default`,children:`Advanced`})]}),(0,q.jsxs)(`div`,{className:f?`mt-4 space-y-4`:`hidden`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Background`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When your assistant acts without you — scheduled tasks, background jobs, and external triggers.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:o,onChange:T,options:X,disabled:j})}),k&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:k.description})]}),(0,q.jsx)(Y,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Headless`}),(0,q.jsx)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:`When triggered externally with no interactive client.`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:c,onChange:D,options:X,disabled:j})}),A&&(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:A.description})]})]})]})]})]})}var Z=e(s(),1),Ee=[`bash`,`file_read`,`file_write`,`file_edit`,`web_fetch`,`skill_load`],De=[{value:`low`,label:`Low`,description:`Auto-approve without prompting`},{value:`medium`,label:`Medium`,description:`Prompt before executing`},{value:`high`,label:`High`,description:`Always require explicit approval`}];function Oe({assistantId:e,existingRule:t,onClose:n,onSaved:r}){let i=(0,K.useRef)(null),[a,o]=(0,K.useState)(t.tool),[s,c]=(0,K.useState)(t.pattern),[l,u]=(0,K.useState)(t.risk),[d,f]=(0,K.useState)(t.description??``),[p,m]=(0,K.useState)(!1),[h,g]=(0,K.useState)(null),_=s.trim(),v=_.length>0&&!p,x=(0,K.useCallback)(async n=>{if(n.preventDefault(),!v)return;let i=d.trim()||`${a} — ${_}`;m(!0),g(null);try{await L(e,t.id,{risk:l,description:i}),r()}catch(e){g(e instanceof Error?e.message:`Failed to save trust rule.`)}finally{m(!1)}},[e,v,d,t,r,l,a,_]);return(0,Z.createPortal)((0,q.jsx)(`div`,{ref:i,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`trust-rule-form-title`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:(0,K.useCallback)(e=>{e.key===`Escape`&&n()},[n]),onClick:(0,K.useCallback)(e=>{e.target===i.current&&n()},[n]),children:(0,q.jsxs)(`div`,{className:`mx-4 flex max-h-[calc(100vh-2rem)] w-full max-w-md flex-col rounded-xl border border-[var(--border-base)] bg-[var(--surface-lift)] shadow-xl`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-[var(--border-base)] px-6 py-4`,children:[(0,q.jsx)(`h2`,{id:`trust-rule-form-title`,className:`text-title-medium text-[var(--content-default)]`,children:`Edit Trust Rule`}),(0,q.jsx)(`button`,{type:`button`,onClick:n,"aria-label":`Close`,className:`rounded-lg p-1.5 text-[var(--content-tertiary)] transition-colors hover:bg-[var(--surface-base)] hover:text-[var(--content-default)]`,children:(0,q.jsx)(y,{className:`h-4 w-4`})})]}),(0,q.jsxs)(`form`,{onSubmit:e=>void x(e),className:`min-h-0 flex-1 space-y-4 overflow-y-auto px-6 py-4`,children:[h&&(0,q.jsx)(b,{tone:`error`,children:h}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{htmlFor:`trust-rule-tool`,className:`block text-body-medium-default text-[var(--content-default)]`,children:`Tool`}),(0,q.jsx)(`div`,{className:`mt-1`,children:(0,q.jsx)(E,{value:a,onChange:o,disabled:!0,options:Ee.map(e=>({value:e,label:e}))})})]}),(0,q.jsx)(S,{label:`Pattern`,type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:`e.g., git *`,disabled:!0}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`span`,{className:`block text-body-medium-default text-[var(--content-default)]`,children:`Risk Level`}),(0,q.jsx)(`div`,{className:`mt-2 flex gap-2`,children:De.map(e=>(0,q.jsxs)(`button`,{type:`button`,onClick:()=>u(e.value),className:`flex-1 rounded-lg border px-3 py-2 text-left text-body-small-default transition-colors ${l===e.value?e.value===`low`?`border-[var(--system-positive-strong)] bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`:e.value===`medium`?`border-[var(--system-warning-strong)] bg-[var(--system-warning-weak)] text-[var(--system-warning-strong)]`:`border-[var(--system-negative-strong)] bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`:`border-[var(--border-element)] text-[var(--content-default)] hover:bg-[var(--surface-base)]`}`,children:[(0,q.jsx)(`div`,{children:e.label}),(0,q.jsx)(`div`,{className:`mt-0.5 text-label-medium-default leading-tight opacity-70`,children:e.description})]},e.value))})]}),(0,q.jsx)(S,{label:`Description (optional)`,type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`${a} — ${_||`pattern`}`}),(0,q.jsxs)(`div`,{className:`flex justify-end gap-2 pt-2`,children:[(0,q.jsx)(`button`,{type:`button`,onClick:n,className:`rounded-lg border border-[var(--border-element)] bg-white px-4 py-2 text-body-medium-default text-[var(--content-default)] transition-colors hover:bg-[var(--surface-base)] dark:border-[var(--border-base)] dark:bg-[var(--surface-lift)] dark:hover:bg-[var(--ghost-hover)]`,children:`Cancel`}),(0,q.jsx)(`button`,{type:`submit`,disabled:!v,className:`rounded-lg bg-[var(--system-positive-strong)] px-4 py-2 text-body-medium-default text-white transition-colors hover:bg-[var(--system-positive-strong)] disabled:cursor-not-allowed disabled:opacity-50`,children:p?`Saving…`:`Save`})]})]})]})}),document.body)}function ke(e){return e.origin===`default`&&!e.userModified}function Ae(e,t){let n=new Set,r=[];for(let t of e)n.has(t.id)||(n.add(t.id),r.push(t));for(let e of t)n.has(e.id)||(n.add(e.id),r.push(e));return r.sort((e,t)=>e.tool===t.tool?e.description.localeCompare(t.description):e.tool.localeCompare(t.tool))}function je(e){switch(e){case`low`:return`positive`;case`medium`:return`warning`;case`high`:return`negative`}}function Q(e){return e.charAt(0).toUpperCase()+e.slice(1)}function Me({assistantId:e,onClose:t}){let n=(0,K.useRef)(null),[r,i]=(0,K.useState)([]),[a,o]=(0,K.useState)(!0),[s,l]=(0,K.useState)(null),[u,d]=(0,K.useState)(null),[f,p]=(0,K.useState)(null),[m,h]=(0,K.useState)(!1),g=(0,K.useCallback)(async t=>{if(t){let[t,n]=await Promise.all([P(e),P(e,{origin:`default`})]);return Ae(t,n)}return P(e)},[e]),_=(0,K.useCallback)(async()=>{o(!0);try{i(await g(m)),l(null)}catch(e){l(e instanceof Error?e.message:`Failed to load trust rules.`)}finally{o(!1)}},[g,m]);(0,K.useEffect)(()=>{let e=!1;return(async()=>{o(!0);try{let t=await g(m);e||(i(t),l(null))}catch(t){e||l(t instanceof Error?t.message:`Failed to load trust rules.`)}finally{e||o(!1)}})(),()=>{e=!0}},[g,m]);let y=(0,K.useCallback)(async()=>{if(f)try{await R(e,f.id),_()}catch(e){l(e instanceof Error?e.message:`Failed to delete trust rule.`)}finally{p(null)}},[e,f,_]);return(0,Z.createPortal)((0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`div`,{ref:n,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`trust-rules-title`,className:`fixed inset-0 z-50 flex items-center justify-center bg-black/50`,onKeyDown:(0,K.useCallback)(e=>{e.key===`Escape`&&t()},[t]),onClick:(0,K.useCallback)(e=>{e.target===n.current&&t()},[t]),children:(0,q.jsxs)(`div`,{className:`mx-4 flex max-h-[80vh] w-full max-w-2xl flex-col rounded-xl border border-[var(--border-base)] bg-[var(--surface-lift)] shadow-xl`,children:[(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b border-[var(--border-base)] px-6 py-4`,children:[(0,q.jsx)(`h2`,{id:`trust-rules-title`,className:`text-title-medium text-[var(--content-default)]`,children:`Trust Rules`}),(0,q.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,q.jsx)(C,{checked:m,onChange:h,label:`Show all defaults`}),(0,q.jsx)(c,{variant:`outlined`,onClick:t,children:`Done`})]})]}),(0,q.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-6 py-4`,children:[s&&(0,q.jsx)(`div`,{className:`mb-3`,children:(0,q.jsx)(b,{tone:`error`,children:s})}),a?(0,q.jsx)(`div`,{className:`flex h-48 items-center justify-center text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Loading…`}):r.length===0?(0,q.jsxs)(`div`,{className:`flex h-48 flex-col items-center justify-center gap-2 px-6 text-[var(--content-tertiary)]`,children:[(0,q.jsx)(B,{className:`h-8 w-8`}),(0,q.jsx)(`p`,{className:`max-w-xs text-center text-body-medium-lighter`,children:`No trust rules yet. Rules are created when you classify actions from permission prompts.`})]}):(0,q.jsx)(`ul`,{className:`divide-y divide-[var(--border-base)]`,children:r.map(e=>{let t=ke(e);return(0,q.jsxs)(`li`,{className:`flex items-start gap-3 py-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-default)]`,children:e.tool}),(0,q.jsx)(x,{tone:je(e.risk),children:Q(e.risk)}),e.origin===`default`&&(0,q.jsx)(x,{tone:`neutral`,children:`Default`}),e.userModified&&(0,q.jsx)(x,{tone:`warning`,children:`Modified`})]}),(0,q.jsx)(`div`,{className:`mt-1 truncate font-mono text-body-small-default text-[var(--content-secondary)]`,children:e.pattern}),e.description&&(0,q.jsx)(`div`,{className:`mt-0.5 truncate text-body-small-default text-[var(--content-tertiary)]`,children:e.description})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[(0,q.jsx)(`button`,{type:`button`,"aria-label":`Edit ${e.tool} rule`,onClick:()=>d(e),className:`rounded-lg p-1.5 text-[var(--content-tertiary)] transition-colors hover:bg-[var(--surface-base)] hover:text-[var(--content-default)]`,children:(0,q.jsx)(v,{className:`h-4 w-4`})}),(!t||e.userModified)&&(0,q.jsx)(`button`,{type:`button`,"aria-label":`Delete ${e.tool} rule`,onClick:()=>p(e),className:`rounded-lg p-1.5 text-[var(--system-negative-strong)] transition-colors hover:bg-[var(--system-negative-weak)]`,children:(0,q.jsx)(he,{className:`h-4 w-4`})})]})]},e.id)})})]})]})}),u&&(0,q.jsx)(Oe,{assistantId:e,existingRule:u,onClose:()=>d(null),onSaved:()=>{d(null),_()}}),(0,q.jsx)(T,{open:f!==null,title:`Delete Trust Rule?`,message:f?`Remove the ${Q(f.risk).toLowerCase()}-risk rule for ${f.tool} matching "${f.pattern}"?`:``,confirmLabel:`Delete`,cancelLabel:`Cancel`,destructive:!0,onConfirm:()=>void y(),onCancel:()=>p(null)})]}),document.body)}function Ne(){let e=U(),[t,n]=(0,K.useState)(!1);return(0,q.jsxs)(m,{children:[(0,q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,q.jsx)(B,{className:`mt-0.5 h-5 w-5 shrink-0 text-[var(--content-secondary)]`}),(0,q.jsxs)(`div`,{className:`flex-1`,children:[(0,q.jsx)(`h2`,{className:`text-title-medium text-[var(--content-default)]`,children:`Trust Rules`}),(0,q.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Manage per-tool rules that control which actions auto-approve and which require your explicit permission.`})]}),(0,q.jsx)(c,{variant:`outlined`,onClick:()=>n(!0),children:`Manage`})]}),t&&(0,q.jsx)(Me,{assistantId:e,onClose:()=>n(!1)})]})}var Pe=[{value:`dontRetain`,label:`Don't retain`},{value:`oneHour`,label:`1 hour`},{value:`oneDay`,label:`1 day`},{value:`sevenDays`,label:`7 days`},{value:`thirtyDays`,label:`30 days`},{value:`ninetyDays`,label:`90 days`},{value:`keepForever`,label:`Keep forever`}],Fe=`thirtyDays`;function $(){return(0,q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)] dark:bg-[var(--surface-lift)]`})}function Ie(){let e=F({platformHostedOnly:!0}),t=k(),a=t,o=O.use.user()?.id??null,[s,c]=(0,K.useState)(()=>n(`shareAnalytics`,!0)),[l,u]=(0,K.useState)(()=>n(`shareDiagnostics`,!0)),[d,f]=(0,K.useState)(()=>i(`llmLogRetention`,Fe));return(0,q.jsxs)(`div`,{className:`space-y-4`,children:[(0,q.jsx)(we,{}),(0,q.jsx)(Se,{}),(0,q.jsx)(Ne,{}),(0,q.jsx)(Te,{}),(0,q.jsx)(W,{title:`Privacy`,subtitle:t?(0,q.jsxs)(q.Fragment,{children:[`View details about what data we collect and how it's used in our`,` `,(0,q.jsx)(`a`,{href:ae(oe.docs.legal.privacyPolicy),target:`_blank`,rel:`noreferrer`,className:`underline`,children:`privacy policy`}),`.`]}):void 0,children:(0,q.jsxs)(`div`,{className:`space-y-4`,children:[a&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(G,{label:`Share Analytics`,helperText:`Send aggregated product usage data`,checked:s,onChange:()=>{let e=!s;c(e),D(`share_analytics`,e,{userId:o,hasPlatformSession:t})},variant:`toggle-trailing`}),(0,q.jsx)($,{}),(0,q.jsx)(G,{label:`Share Diagnostics`,helperText:`Send crash reports, conversation traces, and session replay data`,checked:l,onChange:()=>{let e=!l;u(e),D(`share_diagnostics`,e,{userId:o,hasPlatformSession:t})},variant:`toggle-trailing`}),(0,q.jsx)($,{})]}),(0,q.jsx)(Ce,{}),e!==`gated`&&(0,q.jsx)($,{}),(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`label`,{htmlFor:`llm-log-retention`,className:`block text-body-medium-default text-[var(--content-default)]`,children:`LLM Request Log Retention`}),(0,q.jsx)(`div`,{className:`mt-2`,style:{maxWidth:280},children:(0,q.jsx)(E,{value:d,onChange:e=>{f(e),r(`llmLogRetention`,e)},options:Pe})}),(0,q.jsx)(`p`,{className:`mt-2 text-body-small-default text-[var(--content-tertiary)]`,children:`How long to keep LLM request and response logs on this device. These logs record the prompts and completions sent to model providers and are used for debugging. Shorter retention improves privacy; longer retention helps troubleshoot issues.`})]})]})})]})}export{Ie as PrivacyPage};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-D-AX8Voo.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-CgrENuVf.js";import{t as s}from"./is-electron-C_ZTVhv8.js";import{d as c,i as l,n as u}from"./auth-store-B1y6dgYQ.js";import{m as d}from"./native-biometric-BK6_QtW5.js";import{a as f}from"./routes-C6gxiCrz.js";import{d as p,f as m,l as h,u as g}from"./prefs-Ds__U7Hi.js";import{t as _}from"./client-feature-flag-store-CHA6YxVq.js";import{Ct as v,St as y,Tt as b,_t as x,bt as S,rn as C}from"./index-B-S-gNKm.js";import{t as w}from"./step-indicator-dots-Bc6X141I.js";import{n as T,t as E}from"./consent-controls-BzFFpG2p.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=u.use.user()?.id??null,A=s(),j=d(),M=_.use.stringFlags().preChatOnboardingExperiment20260606??`control`,N=_.use.researchOnboarding(),P=v(M),[F,I]=g(),[L,R]=p(),[z,B]=m(),[V,H]=h(),U=l();(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(c({userId:a,tos:z,privacy:V,shareAnalytics:F,shareDiagnostics:L,hasPlatformSession:U}),!j){let e=b(P);S(x.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)(C,{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
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BinV5-9D.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-ByJrKmF5.js";import{t as s}from"./is-electron-LEymSS4C.js";import{d as c,i as l,n as u}from"./auth-store-kfUKGlLs.js";import{m as d}from"./native-biometric-Dd06YRUN.js";import{o as f}from"./routes-yOZYxf4R.js";import{d as p,f as m,l as h,u as g}from"./prefs-Lb7fewxF.js";import{t as _}from"./client-feature-flag-store-D7egY4Pc.js";import{Ct as v,Et as y,in as b,vt as x,wt as S,xt as C}from"./index-UOKO4wgc.js";import{t as w}from"./step-indicator-dots-CHroyD_f.js";import{n as T,t as E}from"./consent-controls-R2e9umlF.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=u.use.user()?.id??null,A=s(),j=d(),M=_.use.stringFlags().preChatOnboardingExperiment20260606??`control`,N=_.use.researchOnboarding(),P=S(M),[F,I]=g(),[L,R]=p(),[z,B]=m(),[V,H]=h(),U=l();(0,D.useEffect)(()=>{j||v()},[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(c({userId:a,tos:z,privacy:V,shareAnalytics:F,shareDiagnostics:L,hasPlatformSession:U}),!j){let e=y(P);C(x.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)(b,{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 +1 @@
1
- import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./cn-DvW5mxZR.js";var n=e();function r(e){return Number.isNaN(e)||e<0?0:e>1?1:e}function i({value:e,"aria-label":i,className:a,height:o=6,ref:s}){let c=r(e)*100;return(0,n.jsx)(`div`,{ref:s,role:`progressbar`,"aria-label":i,"aria-valuenow":Math.round(c),"aria-valuemin":0,"aria-valuemax":100,"data-slot":`progress-bar`,className:t(`rounded-full overflow-hidden bg-[var(--surface-lift)]`,a),style:{height:o},children:(0,n.jsx)(`div`,{className:`h-full bg-[var(--content-default)] rounded-full`,style:{width:`${c}%`,transition:`width 400ms cubic-bezier(0.22, 1, 0.36, 1)`}})})}export{i as t};
1
+ import{t as e}from"./jsx-runtime-CVSDxk6A.js";import{t}from"./cn-C36Yvcac.js";var n=e();function r(e){return Number.isNaN(e)||e<0?0:e>1?1:e}function i({value:e,"aria-label":i,className:a,height:o=6,ref:s}){let c=r(e)*100;return(0,n.jsx)(`div`,{ref:s,role:`progressbar`,"aria-label":i,"aria-valuenow":Math.round(c),"aria-valuemin":0,"aria-valuemax":100,"data-slot":`progress-bar`,className:t(`rounded-full overflow-hidden bg-[var(--surface-lift)]`,a),style:{height:o},children:(0,n.jsx)(`div`,{className:`h-full bg-[var(--content-default)] rounded-full`,style:{width:`${c}%`,transition:`width 400ms cubic-bezier(0.22, 1, 0.36, 1)`}})})}export{i as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-BG-GkiMq.js";import{t as n}from"./react-DJZBPgpf.js";import{d as r,h as i,t as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{S as s,f as c}from"./local-mode-CgrENuVf.js";import{D as l,n as u}from"./auth-store-B1y6dgYQ.js";import{c as d}from"./api-1X5EQzNF.js";import{S as f,_ as p}from"./native-biometric-BK6_QtW5.js";import{a as m}from"./routes-C6gxiCrz.js";import{a as h,i as g}from"./login-flow-DB9qs18f.js";import{n as _}from"./index-B-S-gNKm.js";import{r as v,t as y}from"./account-shell-PzFH1_ZC.js";var b=e(n(),1),x=o();function S(){let[e]=i(),n=r(),o=u.use.refreshSession(),S=e.get(`error`),[C,w]=(0,b.useState)(null),T=(0,b.useRef)(!1),E=e.get(`returnTo`),D=g(e);return(0,b.useEffect)(()=>{T.current||S||(T.current=!0,(async()=>{try{let t=await f(),r=p(t.ok&&!!t.data.user,t.ok?[]:t.flows??[]);switch(r.kind){case`authenticated`:{if(await o(),c())try{let e=await d();if(e.ok&&e.data.length>0&&(await s(e.data,l.getState().currentOrganizationId??void 0),!E)){n(m.assistant,{replace:!0});break}}catch{}let e=m.assistant,{destination:t,requiresFullPageNavigation:r}=h({returnTo:E,fallback:e,authIntent:D});r?window.location.href=t:n(t,{replace:!0});break}case`provider_signup`:{let t=e.get(`returnTo`);n(t?`${m.account.providerSignup}?returnTo=${encodeURIComponent(t)}`:m.account.providerSignup,{replace:!0});break}case`error`:w(r.message);break}}catch(e){t(e,{context:`provider_callback`}),w(`Something went wrong. Please try signing in again.`)}})())},[D,S,o,E,n,e]),S===`signup_closed`?(0,x.jsxs)(y,{children:[(0,x.jsx)(v,{title:`Signups are currently closed`,subtitle:`Join the community to request access or learn when signups reopen.`}),(0,x.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,x.jsx)(`a`,{href:_,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Join the community`}),(0,x.jsx)(a,{to:m.account.login,className:`text-sm font-medium text-[var(--content-emphasised)] hover:underline`,children:`Back to sign in`})]})]}):S||C?(0,x.jsxs)(y,{children:[(0,x.jsx)(v,{title:`Authentication failed`,subtitle:C??`Something went wrong during social sign-in. Please try again or use a different method.`}),(0,x.jsx)(`div`,{className:`flex flex-col items-center gap-4`,children:(0,x.jsx)(a,{to:m.account.login,className:`inline-flex items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Back to sign in`})})]}):(0,x.jsx)(y,{children:(0,x.jsx)(v,{title:`Completing sign-in...`,subtitle:`Please wait while we finish authenticating you.`})})}export{S as ProviderCallbackPage};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-CmeVLfq0.js";import{t as n}from"./react-DJZBPgpf.js";import{d as r,h as i,t as a}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{S as s,f as c}from"./local-mode-ByJrKmF5.js";import{D as l,n as u}from"./auth-store-kfUKGlLs.js";import{c as d}from"./api-y7YZhKda.js";import{S as f,_ as p}from"./native-biometric-Dd06YRUN.js";import{o as m}from"./routes-yOZYxf4R.js";import{a as h,i as g}from"./login-flow-CQBOuxLF.js";import{n as _}from"./index-UOKO4wgc.js";import{r as v,t as y}from"./account-shell-BsiVwmJ2.js";var b=e(n(),1),x=o();function S(){let[e]=i(),n=r(),o=u.use.refreshSession(),S=e.get(`error`),[C,w]=(0,b.useState)(null),T=(0,b.useRef)(!1),E=e.get(`returnTo`),D=g(e);return(0,b.useEffect)(()=>{T.current||S||(T.current=!0,(async()=>{try{let t=await f(),r=p(t.ok&&!!t.data.user,t.ok?[]:t.flows??[]);switch(r.kind){case`authenticated`:{if(await o(),c())try{let e=await d();if(e.ok&&e.data.length>0&&(await s(e.data,l.getState().currentOrganizationId??void 0),!E)){n(m.assistant,{replace:!0});break}}catch{}let e=m.assistant,{destination:t,requiresFullPageNavigation:r}=h({returnTo:E,fallback:e,authIntent:D});r?window.location.href=t:n(t,{replace:!0});break}case`provider_signup`:{let t=e.get(`returnTo`);n(t?`${m.account.providerSignup}?returnTo=${encodeURIComponent(t)}`:m.account.providerSignup,{replace:!0});break}case`error`:w(r.message);break}}catch(e){t(e,{context:`provider_callback`}),w(`Something went wrong. Please try signing in again.`)}})())},[D,S,o,E,n,e]),S===`signup_closed`?(0,x.jsxs)(y,{children:[(0,x.jsx)(v,{title:`Signups are currently closed`,subtitle:`Join the community to request access or learn when signups reopen.`}),(0,x.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,x.jsx)(`a`,{href:_,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Join the community`}),(0,x.jsx)(a,{to:m.account.login,className:`text-sm font-medium text-[var(--content-emphasised)] hover:underline`,children:`Back to sign in`})]})]}):S||C?(0,x.jsxs)(y,{children:[(0,x.jsx)(v,{title:`Authentication failed`,subtitle:C??`Something went wrong during social sign-in. Please try again or use a different method.`}),(0,x.jsx)(`div`,{className:`flex flex-col items-center gap-4`,children:(0,x.jsx)(a,{to:m.account.login,className:`inline-flex items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] no-underline transition-colors hover:bg-[var(--primary-hover)]`,children:`Back to sign in`})})]}):(0,x.jsx)(y,{children:(0,x.jsx)(v,{title:`Completing sign-in...`,subtitle:`Please wait while we finish authenticating you.`})})}export{S as ProviderCallbackPage};
@@ -0,0 +1 @@
1
+ import{D as e,Gn as t,Rt as n,k as r}from"./sdk.gen-CoVGgJJ_.js";var i=[{id:`anthropic`,displayName:`Anthropic`,apiKeyPlaceholder:`sk-ant-api03-...`,docsUrl:`https://console.anthropic.com/settings/keys`,requiresKey:!0,defaultModel:`claude-sonnet-4-6`},{id:`openai`,displayName:`OpenAI`,apiKeyPlaceholder:`sk-proj-...`,docsUrl:`https://platform.openai.com/api-keys`,requiresKey:!0,defaultModel:`gpt-5.4-mini`},{id:`gemini`,displayName:`Google Gemini`,apiKeyPlaceholder:`AIza...`,docsUrl:`https://aistudio.google.com/apikey`,requiresKey:!0,defaultModel:`gemini-3-flash-preview`},{id:`ollama`,displayName:`Ollama`,apiKeyPlaceholder:null,docsUrl:`https://ollama.com/download`,requiresKey:!1,defaultModel:`llama3.2`,models:[{id:`llama3.2`,displayName:`Llama 3.2`,contextWindowTokens:128e3,maxOutputTokens:4096},{id:`mistral`,displayName:`Mistral`,contextWindowTokens:32768,maxOutputTokens:4096}]},{id:`fireworks`,displayName:`Fireworks`,apiKeyPlaceholder:`fw_...`,docsUrl:`https://fireworks.ai/account/api-keys`,requiresKey:!0,defaultModel:`accounts/fireworks/models/minimax-m3`},{id:`openrouter`,displayName:`OpenRouter`,apiKeyPlaceholder:`sk-or-v1-...`,docsUrl:`https://openrouter.ai/keys`,requiresKey:!0,defaultModel:`anthropic/claude-sonnet-4.6`,models:[{id:`anthropic/claude-sonnet-4.6`,displayName:`Claude Sonnet 4.6`,contextWindowTokens:2e5,maxOutputTokens:64e3},{id:`anthropic/claude-opus-4.8`,displayName:`Claude Opus 4.8`,contextWindowTokens:2e5,maxOutputTokens:128e3},{id:`x-ai/grok-4.20-beta`,displayName:`Grok 4.20 Beta`,contextWindowTokens:2e5,maxOutputTokens:16e3},{id:`deepseek/deepseek-r1-0528`,displayName:`DeepSeek R1`,contextWindowTokens:163840,maxOutputTokens:32e3}]},{id:`openai-compatible`,displayName:`OpenAI-compatible`,apiKeyPlaceholder:`Your provider's API key (optional)`,docsUrl:null,requiresKey:!0}],a=i[0];function o(e){return i.find(t=>t.id===e)}function s(e){let t=o(e);return t?.defaultModel??t?.models?.[0]?.id}var c=`onboarding.providerKey`,l=`custom-balanced`,u=2e5;function d(e){try{if(e===null){sessionStorage.removeItem(c);return}sessionStorage.setItem(c,JSON.stringify(e))}catch{}}function f(e){return typeof e==`object`&&!!e&&`provider`in e&&typeof e.provider==`string`&&`key`in e&&typeof e.key==`string`&&(!(`model`in e)||typeof e.model==`string`)&&(!(`baseUrl`in e)||typeof e.baseUrl==`string`)&&(!(`customModels`in e)||typeof e.customModels==`string`)}function p(){try{let e=sessionStorage.getItem(c);if(!e)return null;let t=JSON.parse(e);return f(t)?t:null}catch{return null}}function m(){let e=p();try{sessionStorage.removeItem(c)}catch{}return e}async function h(e,n,r){let{response:i}=await t({path:{assistant_id:e},body:{type:`api_key`,name:n,value:r},throwOnError:!1});if(!i?.ok)throw Object.assign(Error(`Failed to write provider secret`),{status:i?.status})}async function g(e,t,r,i){let a=t===`openai-compatible`,o=r||a?{type:`api_key`,credential:`credential/${t}/api_key`}:{type:`none`},s=a&&i?.baseUrl?i.baseUrl:void 0,c=a&&i?.customModels?i.customModels.split(`,`).map(e=>({id:e.trim()})).filter(e=>e.id):void 0,{response:l}=await n({path:{assistant_id:e},body:{name:t,provider:t,auth:o,...s===void 0?{}:{base_url:s},...c===void 0?{}:{models:c}},throwOnError:!1});if(!l?.ok&&l?.status!==409)throw Object.assign(Error(`Failed to create provider connection`),{status:l?.status})}function _(e,t){let n=o(e)?.models?.find(e=>e.id===t),r={provider:e,model:t,provider_connection:e,source:`user`,label:`Balanced`,description:`Good balance of quality, cost, and speed`,maxTokens:n?.maxOutputTokens??16e3,contextWindow:{maxInputTokens:n?.contextWindowTokens??u}};return e===`ollama`?(r.effort=`none`,r.thinking={enabled:!1,streamThinking:!1}):(r.effort=`high`,r.thinking={enabled:!0,streamThinking:!0}),r}async function v(t,n,r){let{response:i}=await e({path:{assistant_id:t,name:l},body:_(n,r),throwOnError:!1});if(!i?.ok)throw Object.assign(Error(`Failed to set provider profile`),{status:i?.status})}async function y(e){let{response:t}=await r({path:{assistant_id:e},body:{llm:{activeProfile:l}},throwOnError:!1});if(!t?.ok)throw Object.assign(Error(`Failed to activate provider profile`),{status:t?.status})}async function b(e){let t=m();if(!t)return;let n=t.key.trim(),r=n.length>0,i=t.provider===`openai-compatible`;(r||i)&&await h(e,t.provider,n),await g(e,t.provider,r,{baseUrl:t.baseUrl,customModels:t.customModels});let a=t.model?.trim(),o=t.customModels?.split(`,`).map(e=>e.trim()).find(e=>e),c=a||o||s(t.provider);c&&(await v(e,t.provider,c),await y(e))}export{i as a,a as i,p as n,s as o,d as r,o as s,b as t};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,h as r,t as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{n as o}from"./auth-store-B1y6dgYQ.js";import{C as s,T as c,x as l}from"./native-biometric-BK6_QtW5.js";import{a as u}from"./routes-C6gxiCrz.js";import{a as d,o as f}from"./login-flow-DB9qs18f.js";import{i as p,n as m,r as h,t as g}from"./account-shell-PzFH1_ZC.js";import{t as _}from"./signup-shell-DMX1tgqB.js";var v=e(t(),1),y=a();function b(){let e=n(),[t]=r(),a=o.use.refreshSession(),b=t.get(`returnTo`),[x,S]=(0,v.useState)(``),[C,w]=(0,v.useState)(``),[T,E]=(0,v.useState)(``),[D,O]=(0,v.useState)(``),[k,A]=(0,v.useState)(``),[j,M]=(0,v.useState)(null),[N,P]=(0,v.useState)(!1),[F,I]=(0,v.useState)(!0),L=(0,v.useRef)(!1);(0,v.useEffect)(()=>{L.current||(L.current=!0,(async()=>{try{let t=await l();if(!t.ok){e(u.account.login,{replace:!0});return}S(t.data.user.email??``),w(t.data.user.username??``),E(t.data.user.first_name??``),O(t.data.user.last_name??``),I(!1)}catch{e(u.account.login,{replace:!0})}})())},[e]);let R=async()=>{let t=await c({email:x,username:C});if(!t.ok){if(s(t)){await a();let t=f(b,u.account.root);t.requiresFullPageNavigation?window.location.href=t.destination:e(t.destination);return}M(t.errors[0]?.message??`Failed to complete signup.`);return}await a();let n=d({returnTo:b,fallback:u.account.root,authIntent:`signup`});n.requiresFullPageNavigation?window.location.href=n.destination:e(n.destination)},z=async e=>{e.preventDefault(),M(null),P(!0);try{await R()}catch{M(`Something went wrong. Please try again.`)}finally{P(!1)}},B=async e=>{if(e.preventDefault(),k.trim()){M(null),P(!0);try{await R()}catch{M(`Something went wrong. Please try again.`)}finally{P(!1)}}};if(F)return(0,y.jsx)(g,{children:(0,y.jsx)(h,{title:`Completing signup...`,subtitle:`Please wait while we load your information.`})});if(x&&C){let e=k.trim().length>0&&!N;return(0,y.jsx)(_,{children:(0,y.jsxs)(`form`,{onSubmit:B,className:`signup-details__thread`,children:[(0,y.jsxs)(`h2`,{className:`signup-details__heading`,children:[`Almost there,`,(0,y.jsx)(`br`,{}),`one more detail`]}),j&&(0,y.jsx)(`p`,{className:`signup-details__error`,children:j}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`What should I call you? `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,placeholder:`First name`,value:T,readOnly:!0,disabled:!0})]}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`And your last name? `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,placeholder:`Last name`,value:D,readOnly:!0,disabled:!0})]}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`Your role `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,autoComplete:`organization-title`,placeholder:`e.g. Software Engineer`,value:k,onChange:e=>A(e.target.value),autoFocus:!0})]}),(0,y.jsx)(`div`,{className:`signup-details__step`,children:(0,y.jsx)(`button`,{type:`submit`,className:`signup-details__continue`,disabled:!e,children:N?`Setting up…`:`Continue →`})})]})})}return(0,y.jsxs)(g,{children:[(0,y.jsx)(h,{title:`Complete your account`,subtitle:`We need a few more details to finish setting up your account.`}),(0,y.jsxs)(m,{onSubmit:z,error:j,submitLabel:`Complete signup`,submittingLabel:`Completing...`,isSubmitting:N,footer:(0,y.jsx)(i,{to:u.account.login,className:`text-sm text-[var(--content-secondary)] hover:text-[var(--content-default)]`,children:`← Back to sign in`}),children:[(0,y.jsx)(p,{id:`email`,type:`email`,autoComplete:`email`,placeholder:`Email`,value:x,onChange:e=>S(e.target.value),required:!0}),(0,y.jsx)(p,{id:`username`,type:`text`,autoComplete:`username`,placeholder:`Username`,value:C,onChange:e=>w(e.target.value),required:!0})]})]})}export{b as ProviderSignupPage};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{d as n,h as r,t as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-CVSDxk6A.js";import{n as o}from"./auth-store-kfUKGlLs.js";import{C as s,T as c,x as l}from"./native-biometric-Dd06YRUN.js";import{o as u}from"./routes-yOZYxf4R.js";import{a as d,o as f}from"./login-flow-CQBOuxLF.js";import{i as p,n as m,r as h,t as g}from"./account-shell-BsiVwmJ2.js";import{t as _}from"./signup-shell-OBT4B7na.js";var v=e(t(),1),y=a();function b(){let e=n(),[t]=r(),a=o.use.refreshSession(),b=t.get(`returnTo`),[x,S]=(0,v.useState)(``),[C,w]=(0,v.useState)(``),[T,E]=(0,v.useState)(``),[D,O]=(0,v.useState)(``),[k,A]=(0,v.useState)(``),[j,M]=(0,v.useState)(null),[N,P]=(0,v.useState)(!1),[F,I]=(0,v.useState)(!0),L=(0,v.useRef)(!1);(0,v.useEffect)(()=>{L.current||(L.current=!0,(async()=>{try{let t=await l();if(!t.ok){e(u.account.login,{replace:!0});return}S(t.data.user.email??``),w(t.data.user.username??``),E(t.data.user.first_name??``),O(t.data.user.last_name??``),I(!1)}catch{e(u.account.login,{replace:!0})}})())},[e]);let R=async()=>{let t=await c({email:x,username:C});if(!t.ok){if(s(t)){await a();let t=f(b,u.account.root);t.requiresFullPageNavigation?window.location.href=t.destination:e(t.destination);return}M(t.errors[0]?.message??`Failed to complete signup.`);return}await a();let n=d({returnTo:b,fallback:u.account.root,authIntent:`signup`});n.requiresFullPageNavigation?window.location.href=n.destination:e(n.destination)},z=async e=>{e.preventDefault(),M(null),P(!0);try{await R()}catch{M(`Something went wrong. Please try again.`)}finally{P(!1)}},B=async e=>{if(e.preventDefault(),k.trim()){M(null),P(!0);try{await R()}catch{M(`Something went wrong. Please try again.`)}finally{P(!1)}}};if(F)return(0,y.jsx)(g,{children:(0,y.jsx)(h,{title:`Completing signup...`,subtitle:`Please wait while we load your information.`})});if(x&&C){let e=k.trim().length>0&&!N;return(0,y.jsx)(_,{children:(0,y.jsxs)(`form`,{onSubmit:B,className:`signup-details__thread`,children:[(0,y.jsxs)(`h2`,{className:`signup-details__heading`,children:[`Almost there,`,(0,y.jsx)(`br`,{}),`one more detail`]}),j&&(0,y.jsx)(`p`,{className:`signup-details__error`,children:j}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`What should I call you? `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,placeholder:`First name`,value:T,readOnly:!0,disabled:!0})]}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`And your last name? `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,placeholder:`Last name`,value:D,readOnly:!0,disabled:!0})]}),(0,y.jsxs)(`div`,{className:`signup-details__step`,children:[(0,y.jsxs)(`span`,{className:`signup-details__label`,children:[`Your role `,(0,y.jsx)(`span`,{className:`signup-details__req`,children:`*`})]}),(0,y.jsx)(`input`,{className:`signup-details__input`,type:`text`,autoComplete:`organization-title`,placeholder:`e.g. Software Engineer`,value:k,onChange:e=>A(e.target.value),autoFocus:!0})]}),(0,y.jsx)(`div`,{className:`signup-details__step`,children:(0,y.jsx)(`button`,{type:`submit`,className:`signup-details__continue`,disabled:!e,children:N?`Setting up…`:`Continue →`})})]})})}return(0,y.jsxs)(g,{children:[(0,y.jsx)(h,{title:`Complete your account`,subtitle:`We need a few more details to finish setting up your account.`}),(0,y.jsxs)(m,{onSubmit:z,error:j,submitLabel:`Complete signup`,submittingLabel:`Completing...`,isSubmitting:N,footer:(0,y.jsx)(i,{to:u.account.login,className:`text-sm text-[var(--content-secondary)] hover:text-[var(--content-default)]`,children:`← Back to sign in`}),children:[(0,y.jsx)(p,{id:`email`,type:`email`,autoComplete:`email`,placeholder:`Email`,value:x,onChange:e=>S(e.target.value),required:!0}),(0,y.jsx)(p,{id:`username`,type:`text`,autoComplete:`username`,placeholder:`Username`,value:C,onChange:e=>w(e.target.value),required:!0})]})]})}export{b as ProviderSignupPage};
@@ -0,0 +1 @@
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";var o=a(),s=n(i(),1),c=(0,s.createContext)({});function l(e){let t=(0,s.useRef)(null);return t.current===null&&(t.current=e()),t.current}var u=typeof window<`u`?s.useLayoutEffect:s.useEffect,d=(0,s.createContext)(null);function f(e,t){e.indexOf(t)===-1&&e.push(t)}function p(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var m=(e,t,n)=>n>t?t:n<e?e:n,h=()=>{},g=()=>{},_={},v=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),y=e=>typeof e==`object`&&!!e,b=e=>/^0[^.\s]+$/u.test(e);function x(e){let t;return()=>(t===void 0&&(t=e()),t)}var S=e=>e,C=(...e)=>e.reduce((e,t)=>n=>t(e(n))),w=(e,t,n)=>{let r=t-e;return r?(n-e)/r:1},T=class{constructor(){this.subscriptions=[]}add(e){return f(this.subscriptions,e),()=>p(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}},E=e=>e*1e3,D=e=>e/1e3,ee=(e,t)=>t?1e3/t*e:0,te=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,ne=1e-7,re=12;function ie(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=te(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>ne&&++s<re);return o}function ae(e,t,n,r){if(e===t&&n===r)return S;let i=t=>ie(t,0,1,e,n);return e=>e===0||e===1?e:te(i(e),t,r)}var oe=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,se=e=>t=>1-e(1-t),ce=ae(.33,1.53,.69,.99),le=se(ce),ue=oe(le),de=e=>e>=1?1:(e*=2)<1?.5*le(e):.5*(2-2**(-10*(e-1))),fe=e=>1-Math.sin(Math.acos(e)),pe=se(fe),me=oe(fe),he=ae(.42,0,1,1),ge=ae(0,0,.58,1),_e=ae(.42,0,.58,1),ve=e=>Array.isArray(e)&&typeof e[0]!=`number`,ye=e=>Array.isArray(e)&&typeof e[0]==`number`,be={linear:S,easeIn:he,easeInOut:_e,easeOut:ge,circIn:fe,circInOut:me,circOut:pe,backIn:le,backInOut:ue,backOut:ce,anticipate:de},xe=e=>typeof e==`string`,Se=e=>{if(ye(e)){e.length;let[t,n,r,i]=e;return ae(t,n,r,i)}else if(xe(e))return be[e],`${e}`,be[e];return e},Ce=[`setup`,`read`,`resolveKeyframes`,`preUpdate`,`update`,`preRender`,`render`,`postRender`];function we(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0;let a=t;t=n,n=a,t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var Te=40;function Ee(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=Ce.reduce((e,t)=>(e[t]=we(a),e),{}),{setup:s,read:c,resolveKeyframes:l,preUpdate:u,update:d,preRender:f,render:p,postRender:m}=o,h=()=>{let a=_.useManualTiming,o=a?i.timestamp:performance.now();n=!1,a||(i.delta=r?1e3/60:Math.max(Math.min(o-i.timestamp,Te),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:Ce.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<Ce.length;t++)o[Ce[t]].cancel(e)},state:i,steps:o}}var{schedule:O,cancel:k,state:A,steps:De}=Ee(typeof requestAnimationFrame<`u`?requestAnimationFrame:S,!0),Oe;function ke(){Oe=void 0}var j={now:()=>(Oe===void 0&&j.set(A.isProcessing||_.useManualTiming?A.timestamp:performance.now()),Oe),set:e=>{Oe=e,queueMicrotask(ke)}},Ae=e=>t=>typeof t==`string`&&t.startsWith(e),je=Ae(`--`),Me=Ae(`var(--`),Ne=e=>Me(e)?Pe.test(e.split(`/*`)[0].trim()):!1,Pe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Fe(e){return typeof e==`string`?e.split(`/*`)[0].includes(`var(--`):!1}var Ie={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Le={...Ie,transform:e=>m(0,1,e)},Re={...Ie,default:1},ze=e=>Math.round(e*1e5)/1e5,Be=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ve(e){return e==null}var He=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ue=(e,t)=>n=>!!(typeof n==`string`&&He.test(n)&&n.startsWith(e)||t&&!Ve(n)&&Object.prototype.hasOwnProperty.call(n,t)),We=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Be);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},Ge=e=>m(0,255,e),Ke={...Ie,transform:e=>Math.round(Ge(e))},M={test:Ue(`rgb`,`red`),parse:We(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ke.transform(e)+`, `+Ke.transform(t)+`, `+Ke.transform(n)+`, `+ze(Le.transform(r))+`)`};function qe(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 Je={test:Ue(`#`),parse:qe,transform:M.transform},Ye=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),N=Ye(`deg`),P=Ye(`%`),F=Ye(`px`),Xe=Ye(`vh`),Ze=Ye(`vw`),Qe={...P,parse:e=>P.parse(e)/100,transform:e=>P.transform(e*100)},$e={test:Ue(`hsl`,`hue`),parse:We(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+P.transform(ze(t))+`, `+P.transform(ze(n))+`, `+ze(Le.transform(r))+`)`},I={test:e=>M.test(e)||Je.test(e)||$e.test(e),parse:e=>M.test(e)?M.parse(e):$e.test(e)?$e.parse(e):Je.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?M.transform(e):$e.transform(e),getAnimatableNone:e=>{let t=I.parse(e);return t.alpha=0,I.transform(t)}},et=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function tt(e){return isNaN(e)&&typeof e==`string`&&(e.match(Be)?.length||0)+(e.match(et)?.length||0)>0}var nt=`number`,rt=`color`,it=`var`,at=`var(`,ot="${}",st=/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 ct(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(st,e=>(I.test(e)?(r.color.push(a),i.push(rt),n.push(I.parse(e))):e.startsWith(at)?(r.var.push(a),i.push(it),n.push(e)):(r.number.push(a),i.push(nt),n.push(parseFloat(e))),++a,ot)).split(ot),indexes:r,types:i}}function lt(e){return ct(e).values}function ut({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===nt?i+=ze(r[a]):e===rt?i+=I.transform(r[a]):i+=r[a]}return i}}function dt(e){return ut(ct(e))}var ft=e=>typeof e==`number`?0:I.test(e)?I.getAnimatableNone(e):e,pt=(e,t)=>typeof e==`number`?t?.trim().endsWith(`/`)?e:0:ft(e);function mt(e){let t=ct(e);return ut(t)(t.values.map((e,n)=>pt(e,t.split[n])))}var L={test:tt,parse:lt,createTransformer:dt,getAnimatableNone:mt};function ht(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 gt({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=ht(s,r,e+1/3),a=ht(s,r,e),o=ht(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function _t(e,t){return n=>n>0?t:e}var R=(e,t,n)=>e+(t-e)*n,vt=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},yt=[Je,M,$e],bt=e=>yt.find(t=>t.test(e));function xt(e){let t=bt(e);if(`${e}`,!t)return!1;let n=t.parse(e);return t===$e&&(n=gt(n)),n}var St=(e,t)=>{let n=xt(e),r=xt(t);if(!n||!r)return _t(e,t);let i={...n};return e=>(i.red=vt(n.red,r.red,e),i.green=vt(n.green,r.green,e),i.blue=vt(n.blue,r.blue,e),i.alpha=R(n.alpha,r.alpha,e),M.transform(i))},Ct=new Set([`none`,`hidden`]);function wt(e,t){return Ct.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function Tt(e,t){return n=>R(e,t,n)}function Et(e){return typeof e==`number`?Tt:typeof e==`string`?Ne(e)?_t:I.test(e)?St:At:Array.isArray(e)?Dt:typeof e==`object`?I.test(e)?St:Ot:_t}function Dt(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>Et(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function Ot(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=Et(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function kt(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 At=(e,t)=>{let n=L.createTransformer(t),r=ct(e),i=ct(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?Ct.has(e)&&!i.values.length||Ct.has(t)&&!r.values.length?wt(e,t):C(Dt(kt(r,i),i.values),n):(`${e}${t}`,_t(e,t))};function jt(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`number`?R(e,t,n):Et(e)(e,t)}var Mt=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>O.update(t,e),stop:()=>k(t),now:()=>A.isProcessing?A.timestamp:j.now()}},Nt=(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)})`},Pt=2e4;function Ft(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 It(e,t=100,n){let r=n({...e,keyframes:[0,t]}),i=Math.min(Ft(r),Pt);return{type:`keyframes`,ease:e=>r.next(i*e).value/t,duration:D(i)}}var z={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 Lt(e,t){return e*Math.sqrt(1-t*t)}var Rt=12;function zt(e,t,n){let r=n;for(let n=1;n<Rt;n++)r-=e(r)/t(r);return r}var Bt=.001;function Vt({duration:e=z.duration,bounce:t=z.bounce,velocity:n=z.velocity,mass:r=z.mass}){let i,a;z.maxDuration;let o=1-t;o=m(z.minDamping,z.maxDamping,o),e=m(z.minDuration,z.maxDuration,D(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=Lt(t,o),c=Math.exp(-i);return Bt-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=Lt(t**2,o);return(-i(t)+Bt>0?-1:1)*((a-s)*c)/l}):(i=t=>{let r=Math.exp(-t*e),i=(t-n)*e+1;return-Bt+r*i},a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=zt(i,a,s);if(e=E(e),isNaN(c))return{stiffness:z.stiffness,damping:z.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var Ht=[`duration`,`bounce`],Ut=[`stiffness`,`damping`,`mass`];function Wt(e,t){return t.some(t=>e[t]!==void 0)}function Gt(e){let t={velocity:z.velocity,stiffness:z.stiffness,damping:z.damping,mass:z.mass,isResolvedFromDuration:!1,...e};if(!Wt(e,Ut)&&Wt(e,Ht))if(t.velocity=0,e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*m(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:z.mass,stiffness:i,damping:a}}else{let n=Vt({...e,velocity:0});t={...t,...n,mass:z.mass},t.isResolvedFromDuration=!0}return t}function Kt(e=z.visualDuration,t=z.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}=Gt({...n,velocity:-D(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=D(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?z.restSpeed.granular:z.restSpeed.default,i||=v?z.restDelta.granular:z.restDelta.default;let y,b,x,S,C,w;if(h<1)x=Lt(_,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,w=h*_*g-S*x,b=e=>Math.exp(-h*_*e)*(C*Math.sin(x*e)+w*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 T={calculatedDuration:p&&d||null,velocity:e=>E(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=E(t*(C*n+w*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=E(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(Ft(T),Pt),t=Nt(t=>T.next(e*t).value,e,30);return e+`ms `+t},toTransition:()=>{}};return T}Kt.applyToOptions=e=>{let t=It(e,100,Kt);return e.ease=t.ease,e.duration=E(t.duration),e.type=`keyframes`,e};var qt=5;function Jt(e,t,n){let r=Math.max(t-qt,0);return ee(n-e(r),t-r)}function Yt({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=Kt({keyframes:[f.value,m(f.value)],velocity:Jt(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 Xt(e,t,n){let r=[],i=n||_.mix||jt,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=C(Array.isArray(t)?t[n]||S:t,a)),r.push(a)}return r}function Zt(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=Xt(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=w(e[r],e[r+1],n);return s[r](i)};return n?t=>l(m(e[0],e[a-1],t)):l}function Qt(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=w(0,t,r);e.push(R(n,1,i))}}function $t(e){let t=[0];return Qt(t,e.length-1),t}function en(e,t){return e.map(e=>e*t)}function tn(e,t){return e.map(()=>t||_e).splice(0,e.length-1)}function nn({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=ve(r)?r.map(Se):Se(r),a={done:!1,value:t[0]},o=Zt(en(n&&n.length===t.length?n:$t(t),e),t,{ease:Array.isArray(i)?i:tn(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var rn=e=>e!==null;function an(e,{repeat:t,repeatType:n=`loop`},r,i=1){let a=e.filter(rn),o=i<0||t&&n!==`loop`&&t%2==1?0:a.length-1;return!o||r===void 0?a[o]:r}var on={decay:Yt,inertia:Yt,tween:nn,keyframes:nn,spring:Kt};function sn(e){typeof e.type==`string`&&(e.type=on[e.type])}var cn=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)}},ln=e=>e/100,un=class extends cn{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!==j.now()&&this.tick(j.now()),this.isStopped=!0,this.state!==`idle`&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){let{options:e}=this;sn(e);let{type:t=nn,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=e,{keyframes:o}=e,s=t||nn;s!==nn&&typeof o[0]!=`number`&&(this.mixKeyframes=C(ln,jt(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=Ft(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:h,finalKeyframe:g}=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 _=this.currentTime-c*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?_<0:_>r;this.currentTime=Math.max(_,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=m(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!==Yt&&(x.value=an(l,this.options,g,this.speed)),h&&h(x.value),C&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return D(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+D(e)}get time(){return D(this.currentTime)}set time(e){e=E(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 Jt(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(j.now()),this.playbackSpeed=e,t&&this.driver&&(this.time=D(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=Mt,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(j.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}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 dn(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var B=e=>e*180/Math.PI,fn=e=>mn(B(Math.atan2(e[1],e[0]))),pn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:fn,rotateZ:fn,skewX:e=>B(Math.atan(e[1])),skewY:e=>B(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},mn=e=>(e%=360,e<0&&(e+=360),e),hn=fn,gn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),_n=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),vn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:gn,scaleY:_n,scale:e=>(gn(e)+_n(e))/2,rotateX:e=>mn(B(Math.atan2(e[6],e[5]))),rotateY:e=>mn(B(Math.atan2(-e[2],e[0]))),rotateZ:hn,rotate:hn,skewX:e=>B(Math.atan(e[4])),skewY:e=>B(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function yn(e){return+!!e.includes(`scale`)}function bn(e,t){if(!e||e===`none`)return yn(t);let n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),r,i;if(n)r=vn,i=n;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=pn,i=t}if(!i)return yn(t);let a=r[t],o=i[1].split(`,`).map(Sn);return typeof a==`function`?a(o):o[a]}var xn=(e,t)=>{let{transform:n=`none`}=getComputedStyle(e);return bn(n,t)};function Sn(e){return parseFloat(e.trim())}var Cn=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],wn=new Set([...Cn,`pathRotation`]),Tn=e=>e===Ie||e===F,En=new Set([`x`,`y`,`z`]),Dn=Cn.filter(e=>!En.has(e));function On(e){let t=[];return Dn.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var V={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})=>bn(t,`x`),y:(e,{transform:t})=>bn(t,`y`)};V.translateX=V.x,V.translateY=V.y;var H=new Set,kn=!1,An=!1,jn=!1;function Mn(){if(An){let e=Array.from(H).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=On(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)})}An=!1,kn=!1,H.forEach(e=>e.complete(jn)),H.clear()}function Nn(){H.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(An=!0)})}function Pn(){jn=!0,Nn(),Mn(),jn=!1}var Fn=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?(H.add(this),kn||(kn=!0,O.read(Nn),O.resolveKeyframes(Mn))):(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])}dn(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state=`complete`,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),H.delete(this)}cancel(){this.state===`scheduled`&&(H.delete(this),this.state=`pending`)}resume(){this.state===`pending`&&this.scheduleResolve()}},In=e=>e.startsWith(`--`);function Ln(e,t,n){In(t)?e.style.setProperty(t,n):e.style[t]=n}var Rn={};function zn(e,t){let n=x(e);return()=>Rn[t]??n()}var Bn=zn(()=>window.ScrollTimeline!==void 0,`scrollTimeline`),Vn=zn(()=>{try{document.createElement(`div`).animate({opacity:0},{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),Hn=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Un={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Hn([0,.65,.55,1]),circOut:Hn([.55,0,1,.45]),backIn:Hn([.31,.01,.66,-.59]),backOut:Hn([.33,1.53,.69,.99])};function Wn(e,t){if(e)return typeof e==`function`?Vn()?Nt(e,t):`ease-out`:ye(e)?Hn(e):Array.isArray(e)?e.map(e=>Wn(e,t)||Un.easeOut):Un[e]}function Gn(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=Wn(s,i);Array.isArray(d)&&(u.easing=d);let f={delay:r,duration:i,easing:Array.isArray(d)?`linear`:d,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`};return l&&(f.pseudoElement=l),e.animate(u,f)}function Kn(e){return typeof e==`function`&&`applyToOptions`in e}function qn({type:e,...t}){return Kn(e)&&Vn()?e.applyToOptions(t):(t.duration??=300,t.ease??=`easeOut`,t)}var Jn=class extends cn{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=qn(e);this.animation=Gn(t,n,r,c,i),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!i){let e=an(r,this.options,o,this.speed);this.updateMotionValue&&this.updateMotionValue(e),Ln(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 D(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+D(e)}get time(){return D(Number(this.animation.currentTime)||0)}set time(e){let t=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=E(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&&Bn()?(this.animation.timeline=e,t&&(this.animation.rangeStart=t),n&&(this.animation.rangeEnd=n),S):r(this)}},Yn={anticipate:de,backInOut:ue,circInOut:me};function Xn(e){return e in Yn}function Zn(e){typeof e.ease==`string`&&Xn(e.ease)&&(e.ease=Yn[e.ease])}var Qn=10,$n=class extends Jn{constructor(e){Zn(e),sn(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 un({...a,autoplay:!1}),s=Math.max(Qn,j.now()-this.startTime),c=m(0,Qn,s-Qn),l=o.sample(s).value,{name:u}=this.options;i&&u&&Ln(i,u,l),t.setWithVelocity(o.sample(Math.max(0,s-c)).value,l,c),o.stop()}},er=(e,t)=>t===`zIndex`?!1:!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(L.test(e)||e===`0`)&&!e.startsWith(`url(`));function tr(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 nr(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=er(i,t),s=er(a,t);return`${t}${i}${a}${o?a:i}`,!o||!s?!1:tr(e)||(n===`spring`||Kn(n))&&r}function rr(e){e.duration=0,e.type=`keyframes`}var ir=new Set([`opacity`,`clipPath`,`filter`,`transform`]),ar=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function or(e){for(let t=0;t<e.length;t++)if(typeof e[t]==`string`&&ar.test(e[t]))return!0;return!1}var sr=new Set([`color`,`backgroundColor`,`outlineColor`,`fill`,`stroke`,`borderColor`,`borderTopColor`,`borderRightColor`,`borderBottomColor`,`borderLeftColor`]),cr=x(()=>Object.hasOwnProperty.call(Element.prototype,`animate`));function lr(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 cr()&&n&&(ir.has(n)||sr.has(n)&&or(s))&&(n!==`transform`||!l)&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}var ur=40,dr=class extends cn{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=j.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||Fn;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=j.now();let u=!0;nr(e,i,a,o)||(u=!1,(_.instantAnimations||!s)&&l?.(an(e,n,t)),e[0]=e[e.length-1],rr(n),n.repeat=0);let d={startTime:r?this.resolvedAt&&this.resolvedAt-this.createdAt>ur?this.resolvedAt:this.createdAt:void 0,finalKeyframe:t,...n,keyframes:e},f=u&&!c&&lr(d),p=d.motionValue?.owner?.current,m;if(f)try{m=new $n({...d,element:p})}catch{m=new un(d)}else m=new un(d);m.finished.then(()=>{this.notifyFinished()}).catch(S),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(),Pn()),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 fr(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 pr=30,mr=e=>!isNaN(parseFloat(e)),hr={current:void 0},gr=class{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=j.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=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=mr(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 T);let n=this.events[e].add(t);return e===`change`?()=>{n(),O.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 hr.current&&hr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>pr)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,pr);return ee(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 U(e,t){return new gr(e,t)}function _r(e,t){if(e?.inherit&&t){let{inherit:n,...r}=e;return{...t,...r}}return e}function vr(e,t){let n=e?.[t]??e?.default??e;return n===e?n:_r(n,e)}var yr={type:`spring`,stiffness:500,damping:25,restSpeed:10},br=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),xr={type:`keyframes`,duration:.8},Sr={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},Cr=(e,{keyframes:t})=>t.length>2?xr:wn.has(e)?e.startsWith(`scale`)?br(t[1]):yr:Sr,wr=new Set([`when`,`delay`,`delayChildren`,`staggerChildren`,`staggerDirection`,`repeat`,`repeatType`,`repeatDelay`,`from`,`elapsed`]);function Tr(e){for(let t in e)if(!wr.has(t))return!0;return!1}var Er=(e,t,n,r={},i,a)=>o=>{let s=vr(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=E(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};Tr(s)||Object.assign(u,Cr(e,u)),u.duration&&=E(u.duration),u.repeatDelay&&=E(u.repeatDelay),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(rr(u),u.delay===0&&(d=!0)),(_.instantAnimations||_.skipAnimations||i?.shouldSkipAnimations||s.skipAnimations)&&(d=!0,rr(u),u.delay=0),u.allowFlatten=!s.type&&!s.ease,d&&!a&&t.get()!==void 0){let e=an(u.keyframes,s);if(e!==void 0){O.update(()=>{u.onUpdate(e),u.onComplete()});return}}return s.isSync?new un(u):new dr(u)},Dr=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Or(e){let t=Dr.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}function kr(e,t,n=1){`${e}`;let[r,i]=Or(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return v(e)?parseFloat(e):e}return Ne(i)?kr(i,t,n+1):i}function Ar(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function jr(e,t,n,r){if(typeof t==`function`){let[i,a]=Ar(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]=Ar(r);t=t(n===void 0?e.custom:n,i,a)}return t}function W(e,t,n){let r=e.getProps();return jr(r,t,n===void 0?r.custom:n,e)}var Mr=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Cn]),Nr=e=>Array.isArray(e);function Pr(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,U(n))}function Fr(e){return Nr(e)?e[e.length-1]||0:e}function Ir(e,t){let{transitionEnd:n={},transition:r={},...i}=W(e,t)||{};i={...i,...n};for(let t in i)Pr(e,t,Fr(i[t]))}var G=e=>!!(e&&e.getVelocity);function Lr(e){return!!(G(e)&&e.add)}function Rr(e,t){let n=e.getValue(`willChange`);if(Lr(n))return n.add(t);if(!n&&_.WillChange){let n=new _.WillChange(`auto`);e.addValue(`willChange`,n),n.add(t)}}function zr(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}var Br=`data-`+zr(`framerAppearId`);function Vr(e){return e.props[Br]}function Hr({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ur(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a,transitionEnd:o,...s}=t,c=e.getDefaultTransition();a=a?_r(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&&Hr(f,t))continue;let o={delay:n,...vr(a||{},t)};u&&(o.skipAnimations=!0);let c=r.get();if(c!==void 0&&!r.isAnimating()&&!Array.isArray(i)&&i===c&&!o.velocity){O.update(()=>r.set(i));continue}let p=!1;if(window.MotionHandoffAnimation){let n=Vr(e);if(n){let e=window.MotionHandoffAnimation(n,t,O);e!==null&&(o.startTime=e,p=!0)}}Rr(e,t);let m=l??e.shouldReduceMotion;r.start(Er(t,r,i,m&&Mr.has(t)?{type:!1}:o,e,p));let h=r.animation;h&&d.push(h)}if(o){let t=()=>O.update(()=>{o&&Ir(e,o)});d.length?Promise.all(d).then(t):t()}return d}function Wr(e,t,n={}){let r=W(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(Ur(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return Gr(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 Gr(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(Wr(c,t,{...o,delay:n+(typeof r==`function`?0:r)+fr(e.variantChildren,c,r,i,a)}).then(()=>c.notify(`AnimationComplete`,t)));return Promise.all(s)}function Kr(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>Wr(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=Wr(e,t,n);else{let i=typeof t==`function`?W(e,t,n.custom):t;r=Promise.all(Ur(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var qr={test:e=>e===`auto`,parse:e=>e},Jr=e=>t=>t.test(e),Yr=[Ie,F,P,N,Ze,Xe,qr],Xr=e=>Yr.find(Jr(e));function Zr(e){return typeof e==`number`?e===0:e===null?!0:e===`none`||e===`0`||b(e)}var Qr=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function $r(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Be)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Qr.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var ei=/\b([a-z-]*)\(.*?\)/gu,ti={...L,getAnimatableNone:e=>{let t=e.match(ei);return t?t.map($r).join(` `):e}},ni={...L,getAnimatableNone:e=>{let t=L.parse(e);return L.createTransformer(e)(t.map(e=>typeof e==`number`?0:typeof e==`object`?{...e,alpha:1}:e))}},ri={...Ie,transform:Math.round},ii={borderWidth:F,borderTopWidth:F,borderRightWidth:F,borderBottomWidth:F,borderLeftWidth:F,borderRadius:F,borderTopLeftRadius:F,borderTopRightRadius:F,borderBottomRightRadius:F,borderBottomLeftRadius:F,width:F,maxWidth:F,height:F,maxHeight:F,top:F,right:F,bottom:F,left:F,inset:F,insetBlock:F,insetBlockStart:F,insetBlockEnd:F,insetInline:F,insetInlineStart:F,insetInlineEnd:F,padding:F,paddingTop:F,paddingRight:F,paddingBottom:F,paddingLeft:F,paddingBlock:F,paddingBlockStart:F,paddingBlockEnd:F,paddingInline:F,paddingInlineStart:F,paddingInlineEnd:F,margin:F,marginTop:F,marginRight:F,marginBottom:F,marginLeft:F,marginBlock:F,marginBlockStart:F,marginBlockEnd:F,marginInline:F,marginInlineStart:F,marginInlineEnd:F,fontSize:F,backgroundPositionX:F,backgroundPositionY:F,rotate:N,pathRotation:N,rotateX:N,rotateY:N,rotateZ:N,scale:Re,scaleX:Re,scaleY:Re,scaleZ:Re,skew:N,skewX:N,skewY:N,distance:F,translateX:F,translateY:F,translateZ:F,x:F,y:F,z:F,perspective:F,transformPerspective:F,opacity:Le,originX:Qe,originY:Qe,originZ:F,zIndex:ri,fillOpacity:Le,strokeOpacity:Le,numOctaves:ri},ai={...ii,color:I,backgroundColor:I,outlineColor:I,fill:I,stroke:I,borderColor:I,borderTopColor:I,borderRightColor:I,borderBottomColor:I,borderLeftColor:I,filter:ti,WebkitFilter:ti,mask:ni,WebkitMask:ni},oi=e=>ai[e],si=new Set([ti,ni]);function ci(e,t){let n=oi(e);return si.has(n)||(n=L),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var li=new Set([`auto`,`none`,`0`]);function ui(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!li.has(t)&&ct(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=ci(n,i)}var di=class extends Fn{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(),Ne(r))){let i=kr(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!Mr.has(n)||e.length!==2)return;let[r,i]=e,a=Xr(r),o=Xr(i);if(Fe(r)!==Fe(i)&&V[n]){this.needsMeasurement=!0;return}if(a!==o)if(Tn(a)&&Tn(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else V[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)(e[t]===null||Zr(e[t]))&&n.push(t);n.length&&ui(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=V[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]=V[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()}},fi=[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomRightRadius`,`borderBottomLeftRadius`];function pi(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 mi=(e,t)=>t&&typeof e==`number`?t.transform(e):e;function hi(e){return y(e)&&`offsetHeight`in e&&!(`ownerSVGElement`in e)}var{schedule:gi,cancel:_i}=Ee(queueMicrotask,!1),K={x:!1,y:!1};function vi(){return K.x||K.y}function yi(e){return e===`x`||e===`y`?K[e]?null:(K[e]=!0,()=>{K[e]=!1}):K.x||K.y?null:(K.x=K.y=!0,()=>{K.x=K.y=!1})}function bi(e,t){let n=pi(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function xi(e){return!(e.pointerType===`touch`||vi())}function Si(e,t,n={}){let[r,i,a]=bi(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(!xi(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 Ci=(e,t)=>t?e===t?!0:Ci(e,t.parentElement):!1,wi=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,Ti=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function Ei(e){return Ti.has(e.tagName)||e.isContentEditable===!0}var Di=new Set([`INPUT`,`SELECT`,`TEXTAREA`]);function Oi(e){return Di.has(e.tagName)||e.isContentEditable===!0}var ki=new WeakSet;function Ai(e){return t=>{t.key===`Enter`&&e(t)}}function ji(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var Mi=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=Ai(()=>{if(ki.has(n))return;ji(n,`down`);let e=Ai(()=>{ji(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ji(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function Ni(e){return wi(e)&&!vi()}var Pi=new WeakSet;function Fi(e,t,n={}){let[r,i,a]=bi(e,n),o=e=>{let r=e.currentTarget;if(!Ni(e)||Pi.has(e))return;ki.add(r),n.stopPropagation&&Pi.add(e);let a=t(r,e),o={...i,capture:!0},s=(e,t)=>{window.removeEventListener(`pointerup`,c,o),window.removeEventListener(`pointercancel`,l,o),ki.has(r)&&ki.delete(r),Ni(e)&&typeof a==`function`&&a(e,{success:t})},c=e=>{s(e,r===window||r===document||n.useGlobalTarget||Ci(r,e.target))},l=e=>{s(e,!1)};window.addEventListener(`pointerup`,c,o),window.addEventListener(`pointercancel`,l,o)};return r.forEach(e=>{(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),hi(e)&&(e.addEventListener(`focus`,e=>Mi(e,i)),!Ei(e)&&!e.hasAttribute(`tabindex`)&&(e.tabIndex=0))}),a}function Ii(e){return y(e)&&`ownerSVGElement`in e}var Li=new WeakMap,Ri,zi=(e,t,n)=>(r,i)=>i&&i[0]?i[0][e+`Size`]:Ii(r)&&`getBBox`in r?r.getBBox()[t]:r[n],Bi=zi(`inline`,`width`,`offsetWidth`),Vi=zi(`block`,`height`,`offsetHeight`);function Hi({target:e,borderBoxSize:t}){Li.get(e)?.forEach(n=>{n(e,{get width(){return Bi(e,t)},get height(){return Vi(e,t)}})})}function Ui(e){e.forEach(Hi)}function Wi(){typeof ResizeObserver>`u`||(Ri=new ResizeObserver(Ui))}function Gi(e,t){Ri||Wi();let n=pi(e);return n.forEach(e=>{let n=Li.get(e);n||(n=new Set,Li.set(e,n)),n.add(t),Ri?.observe(e)}),()=>{n.forEach(e=>{let n=Li.get(e);n?.delete(t),n?.size||Ri?.unobserve(e)})}}var Ki=new Set,qi;function Ji(){qi=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Ki.forEach(t=>t(e))},window.addEventListener(`resize`,qi)}function Yi(e){return Ki.add(e),qi||Ji(),()=>{Ki.delete(e),!Ki.size&&typeof qi==`function`&&(window.removeEventListener(`resize`,qi),qi=void 0)}}function Xi(e,t){return typeof e==`function`?Yi(e):Gi(e,t)}var Zi={value:null,addProjectionMetrics:null};function Qi(e){return Ii(e)&&e.tagName===`svg`}var $i=[...Yr,I,L],ea=e=>$i.find(Jr(e)),ta=()=>({translate:0,scale:1,origin:0,originPoint:0}),na=()=>({x:ta(),y:ta()}),ra=()=>({min:0,max:0}),q=()=>({x:ra(),y:ra()}),ia=new WeakMap;function aa(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}function oa(e){return typeof e==`string`||Array.isArray(e)}var sa=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],ca=[`initial`,...sa];function la(e){return aa(e.animate)||ca.some(t=>oa(e[t]))}function ua(e){return!!(la(e)||e.variants)}function da(e,t,n){for(let r in t){let i=t[r],a=n[r];if(G(i))e.addValue(r,i);else if(G(a))e.addValue(r,U(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,U(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var fa={current:null},pa={current:!1},ma=typeof window<`u`;function ha(){if(pa.current=!0,ma)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>fa.current=e.matches;e.addEventListener(`change`,t),t()}else fa.current=!1}var ga=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],_a={};function va(e){_a=e}function ya(){return _a}var ba=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=Fn,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=j.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,O.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=la(t),this.isVariantNode=ua(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&&G(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,ia.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:(pa.current||ha(),this.shouldReduceMotion=fa.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(),k(this.notifyUpdate),k(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&&ir.has(e)&&this.current instanceof HTMLElement){let{factory:n,keyframes:r,times:i,ease:a,duration:o}=t.accelerate,s=new Jn({element:this.current,name:e,keyframes:r,times:i,ease:a,duration:E(o)}),c=n(s);this.valueSubscriptions.set(e,()=>{c(),s.cancel()});return}let n=wn.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&O.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 _a){let t=_a[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):q()}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<ga.length;t++){let n=ga[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=da(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=U(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`&&(v(n)||b(n))?n=parseFloat(n):!ea(n)&&L.test(t)&&(n=ci(e,t)),this.setBaseTarget(e,G(n)?n.get():n)),G(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=jr(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&&!G(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 T),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){gi.render(this.render)}},xa=class extends ba{constructor(){super(...arguments),this.KeyframeResolver=di}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;G(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}},J=class{constructor(e){this.isMounted=!1,this.node=e}update(){}};function Sa({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Ca({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function wa(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 Ta(e){return e===void 0||e===1}function Ea({scale:e,scaleX:t,scaleY:n}){return!Ta(e)||!Ta(t)||!Ta(n)}function Y(e){return Ea(e)||Da(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Da(e){return Oa(e.x)||Oa(e.y)}function Oa(e){return e&&e!==`0%`}function ka(e,t,n){return n+t*(e-n)}function Aa(e,t,n,r,i){return i!==void 0&&(e=ka(e,i,r)),ka(e,n,r)+t}function ja(e,t=0,n=1,r,i){e.min=Aa(e.min,t,n,r,i),e.max=Aa(e.max,t,n,r,i)}function Ma(e,{x:t,y:n}){ja(e.x,t.translate,t.scale,t.originPoint),ja(e.y,n.translate,n.scale,n.originPoint)}var Na=.999999999999,Pa=1.0000000000001;function Fa(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,Ma(e,o)),r&&Y(a.latestValues)&&Ra(e,a.latestValues,a.layout?.layoutBox))}t.x<Pa&&t.x>Na&&(t.x=1),t.y<Pa&&t.y>Na&&(t.y=1)}function X(e,t){e.min+=t,e.max+=t}function Ia(e,t,n,r,i=.5){ja(e,t,n,R(e.min,e.max,i),r)}function La(e,t){return typeof e==`string`?parseFloat(e)/100*(t.max-t.min):e}function Ra(e,t,n){let r=n??e;Ia(e.x,La(t.x,r.x),t.scaleX,t.scale,t.originX),Ia(e.y,La(t.y,r.y),t.scaleY,t.scale,t.originY)}function za(e,t){return Sa(wa(e.getBoundingClientRect(),t))}function Ba(e,t,n){let r=za(e,n),{scroll:i}=t;return i&&(X(r.x,i.offset.x),X(r.y,i.offset.y)),r}var Va={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},Ha=Cn.length;function Ua(e,t,n){let r=``,i=!0;for(let a=0;a<Ha;a++){let o=Cn[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=mi(s,ii[o]);if(!c){i=!1;let t=Va[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}let a=e.pathRotation;return a&&(i=!1,r+=`rotate(${mi(a,ii.pathRotation)}) `),r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function Wa(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(wn.has(e)){o=!0;continue}else if(je(e)){i[e]=n;continue}else{let t=mi(n,ii[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=Ua(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 Ga(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 Ka(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var qa={correct:(e,t)=>{if(!t.target)return e;if(typeof e==`string`)if(F.test(e))e=parseFloat(e);else return e;return`${Ka(e,t.target.x)}% ${Ka(e,t.target.y)}%`}},Ja={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=L.parse(e);if(i.length>5)return r;let a=L.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=R(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},Ya={borderRadius:{...qa,applyTo:[...fi]},borderTopLeftRadius:qa,borderTopRightRadius:qa,borderBottomLeftRadius:qa,borderBottomRightRadius:qa,boxShadow:Ja};function Xa(e,{layout:t,layoutId:n}){return wn.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!Ya[e]||e===`opacity`)}function Za(e,t,n){let r=e.style,i=t?.style,a={};if(!r)return a;for(let t in r)(G(r[t])||i&&G(i[t])||Xa(t,e)||n?.getValue(t)?.liveStyle!==void 0)&&(a[t]=r[t]);return a}function Qa(e){return window.getComputedStyle(e)}var $a=class extends xa{constructor(){super(...arguments),this.type=`html`,this.renderInstance=Ga}readValueFromInstance(e,t){if(wn.has(t))return this.projection?.isProjecting?yn(t):xn(e,t);{let n=Qa(e),r=(je(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return za(e,t)}build(e,t,n){Wa(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Za(e,t,n)}},eo={offset:`stroke-dashoffset`,array:`stroke-dasharray`},to={offset:`strokeDashoffset`,array:`strokeDasharray`};function no(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?eo:to;e[a.offset]=`${-r}`,e[a.array]=`${t} ${n}`}var ro=[`offsetDistance`,`offsetPath`,`offsetRotate`,`offsetAnchor`];function io(e,{attrX:t,attrY:n,attrScale:r,pathLength:i,pathSpacing:a=1,pathOffset:o=0,...s},c,l,u){if(Wa(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 ro)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&&no(d,i,a,o,!1)}var ao=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`]),oo=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function so(e,t,n,r){Ga(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(ao.has(n)?n:zr(n),t.attrs[n])}function co(e,t,n){let r=Za(e,t,n);for(let n in e)if(G(e[n])||G(t[n])){let t=Cn.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}var lo=class extends xa{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=q}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(wn.has(t)){let e=oi(t);return e&&e.default||0}return t=ao.has(t)?t:zr(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return co(e,t,n)}build(e,t,n){io(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){so(e,t,n,r)}mount(e){this.isSVGTag=oo(e.tagName),super.mount(e)}},uo=ca.length;function fo(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&fo(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<uo;n++){let r=ca[n],i=e.props[r];(oa(i)||i===!1)&&(t[r]=i)}return t}function po(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 mo=[...sa].reverse(),ho=sa.length;function go(e){return t=>Promise.all(t.map(({animation:t,options:n})=>Kr(e,t,n)))}function _o(e){let t=go(e),n=bo(),r=!0,i=!1,a=t=>(n,r)=>{let i=W(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=fo(e.parent)||{},l=[],u=new Set,d={},f=1/0;for(let t=0;t<ho;t++){let p=mo[t],m=n[p],h=s[p]===void 0?c[p]:s[p],g=oa(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||aa(h)||typeof h==`boolean`)continue;if(p===`exit`&&m.isActive&&_!==!0){m.prevResolvedValues&&(d={...d,...m.prevResolvedValues});continue}let y=vo(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:w={}}=m,T={...w,...C},E=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 T){let t=C[e],n=w[e];if(d.hasOwnProperty(e))continue;let r=!1;r=Nr(t)&&Nr(n)?!po(t,n)||y:t!==n,r?t==null?u.add(e):E(e):t!==void 0&&u.has(e)?E(e):m.protectedKeys[e]=!0}m.prevProp=h,m.prevResolvedValues=C,m.isActive&&(d={...d,...C}),(r||i)&&e.blockInitialAnimation&&(b=!1);let D=v&&y;b&&(!D||x)&&l.push(...S.map(t=>{let n={type:p};if(typeof t==`string`&&(r||i)&&!D&&e.manuallyAnimateOnMount&&e.parent){let{parent:r}=e,i=W(r,t);if(r.enteringChildren&&i){let{delayChildren:t}=i.transition||{};n.delay=fr(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){let t={};if(typeof s.initial!=`boolean`){let n=W(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=bo(),i=!0}}}function vo(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!po(t,e):!1}function yo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function bo(){return{animate:yo(!0),whileInView:yo(),whileHover:yo(),whileTap:yo(),whileDrag:yo(),whileFocus:yo(),exit:yo()}}function xo(e,t){e.min=t.min,e.max=t.max}function Z(e,t){xo(e.x,t.x),xo(e.y,t.y)}function So(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var Co=1e-4,wo=1-Co,To=1+Co,Eo=.01,Do=0-Eo,Oo=0+Eo;function Q(e){return e.max-e.min}function ko(e,t,n){return Math.abs(e-t)<=n}function Ao(e,t,n,r=.5){e.origin=r,e.originPoint=R(t.min,t.max,e.origin),e.scale=Q(n)/Q(t),e.translate=R(n.min,n.max,e.origin)-e.originPoint,(e.scale>=wo&&e.scale<=To||isNaN(e.scale))&&(e.scale=1),(e.translate>=Do&&e.translate<=Oo||isNaN(e.translate))&&(e.translate=0)}function jo(e,t,n,r){Ao(e.x,t.x,n.x,r?r.originX:void 0),Ao(e.y,t.y,n.y,r?r.originY:void 0)}function Mo(e,t,n,r=0){e.min=(r?R(n.min,n.max,r):n.min)+t.min,e.max=e.min+Q(t)}function No(e,t,n,r){Mo(e.x,t.x,n.x,r?.x),Mo(e.y,t.y,n.y,r?.y)}function Po(e,t,n,r=0){let i=r?R(n.min,n.max,r):n.min;e.min=t.min-i,e.max=e.min+Q(t)}function Fo(e,t,n,r){Po(e.x,t.x,n.x,r?.x),Po(e.y,t.y,n.y,r?.y)}function Io(e,t,n,r,i){return e-=t,e=ka(e,1/n,r),i!==void 0&&(e=ka(e,1/i,r)),e}function Lo(e,t=0,n=1,r=.5,i,a=e,o=e){if(P.test(t)&&(t=parseFloat(t),t=R(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=R(a.min,a.max,r);e===a&&(s-=t),e.min=Io(e.min,t,n,s,i),e.max=Io(e.max,t,n,s,i)}function Ro(e,t,[n,r,i],a,o){Lo(e,t[n],t[r],t[i],t.scale,a,o)}var zo=[`x`,`scaleX`,`originX`],Bo=[`y`,`scaleY`,`originY`];function Vo(e,t,n,r){Ro(e.x,t,zo,n?n.x:void 0,r?r.x:void 0),Ro(e.y,t,Bo,n?n.y:void 0,r?r.y:void 0)}function Ho(e){return e.translate===0&&e.scale===1}function Uo(e){return Ho(e.x)&&Ho(e.y)}function Wo(e,t){return e.min===t.min&&e.max===t.max}function Go(e,t){return Wo(e.x,t.x)&&Wo(e.y,t.y)}function Ko(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function qo(e,t){return Ko(e.x,t.x)&&Ko(e.y,t.y)}function Jo(e){return Q(e.x)/Q(e.y)}function Yo(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function $(e){return[e(`x`),e(`y`)]}function Xo(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 Zo=fi.length,Qo=e=>typeof e==`string`?parseFloat(e):e,$o=e=>typeof e==`number`||F.test(e);function es(e,t,n,r,i,a){i?(e.opacity=R(0,n.opacity??1,ns(r)),e.opacityExit=R(t.opacity??1,0,rs(r))):a&&(e.opacity=R(t.opacity??1,n.opacity??1,r));for(let i=0;i<Zo;i++){let a=fi[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(R(Qo(o),Qo(s),r),0),(P.test(s)||P.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=R(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,pe),rs=is(.5,.95,S);function is(e,t,n){return r=>r<e?0:r>t?1:n(w(e,t,r))}function as(e,t,n){let r=G(e)?e:U(e);return r.start(Er(``,r,t,n)),r.animation}function os(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)}var ss=(e,t)=>e.depth-t.depth,cs=class{constructor(){this.children=[],this.isDirty=!1}add(e){f(this.children,e),this.isDirty=!0}remove(e){p(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=j.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(k(r),e(a-t))};return O.setup(r,!0),()=>k(r)}function us(e){return G(e)?e.get():e}var ds=class{constructor(){this.members=[]}add(e){f(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&&(p(this.members,n),n.unmount())}e.scheduleRender()}remove(e){if(p(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=Vr(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,O,!(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,Zi.value&&(ps.nodes=ps.calculatedTargetDeltas=ps.calculatedProjections=0),this.nodes.forEach(Ss),this.nodes.forEach(js),this.nodes.forEach(Ms),this.nodes.forEach(Cs),Zi.addProjectionMetrics&&Zi.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 T),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=Ii(t)&&!Qi(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;O.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||!qo(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={...vr(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(),k(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=j.now();A.delta=m(0,1e3/60,e-A.timestamp),A.timestamp=e,A.isProcessing=!0,De.update.process(A),De.preRender.process(A),De.render.process(A),A.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,gi.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ws),this.sharedNodes.forEach(Ps)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,O.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){O.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||=q(),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&&!Uo(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Y(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 q();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=q();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||q();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)),Y(n.latestValues)&&Ra(r,n.latestValues,n.layout?.layoutBox)}return Y(this.latestValues)&&Ra(r,this.latestValues,this.layout?.layoutBox),r}removeTransform(e){let t=q();Z(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!Y(n.latestValues))continue;let r;n.instance&&(Ea(n.latestValues)&&n.updateSnapshot(),r=q(),Z(r,n.measurePageBox())),Vo(t,n.latestValues,n.snapshot?.layoutBox,r)}return Y(this.latestValues)&&Vo(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!==A.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=A.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=q(),this.targetWithTransforms=q()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),No(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),Ma(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),Zi.value&&ps.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||Ea(this.parent.latestValues)||Da(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=q(),this.relativeTargetOrigin=q(),Fo(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===A.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;Fa(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=q());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(So(this.prevProjectionDelta.x,this.projectionDelta.x),So(this.prevProjectionDelta.y,this.projectionDelta.y)),jo(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!Yo(this.projectionDelta.x,this.prevProjectionDelta.x)||!Yo(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),Zi.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=na(),this.projectionDelta=na(),this.projectionDeltaWithTransform=na()}setAnimationOrigin(e,t=!1,n){let r=this.snapshot,i=r?r.latestValues:{},a={...this.latestValues},o=na();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let s=q(),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=R(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=R(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&&(Fo(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),Ls(this.relativeTarget,this.relativeTargetOrigin,s,n),f&&Go(this.relativeTarget,f)&&(this.isProjectionDirty=!1),f||=q(),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&&=(k(this.pendingAnimation),void 0),this.pendingAnimation=O.update(()=>{fs.hasAnimatedSinceResize=!0,this.motionValue||=U(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)},onComplete:()=>{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||q();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),Ra(t,i),jo(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&&!Y(this.latestValues)&&(e.transform=n?n({},``):`none`,this.hasProjected=!1);return}e.visibility=``;let i=r.animationValues||r.latestValues;this.applyTransformsToTarget();let a=Xo(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 Ya){if(i[t]===void 0)continue;let{correct:n,applyTo:o,isCSSVariable:s}=Ya[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`;xo(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=na();jo(o,n,t.layoutBox);let s=na();a?jo(s,e.applyTransform(r,!0),t.measuredBox):jo(s,n,t.layoutBox);let c=!Uo(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=q();Fo(s,t.layoutBox,i.layoutBox,o);let c=q();Fo(c,n,a.layoutBox,o),qo(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){Zi.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=R(t.translate,0,n),e.scale=R(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Is(e,t,n,r){e.min=R(t.min,n.min,r),e.max=R(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:S;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`&&!ko(Jo(t),Jo(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,s.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`});function Xs(e=!0){let t=(0,s.useContext)(d);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,s.useId)();(0,s.useEffect)(()=>{if(e)return i(a)},[e]);let o=(0,s.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var Zs=(0,s.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])};va(e),$s=!0}function tc(){return ec(),ya()}function nc(e){let t=tc();for(let n in e)t[n]={...t[n],...e[n]};va(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`||G(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,s.createContext)({});function fc(e,t){if(la(e)){let{initial:t,animate:n}=e;return{initial:t===!1||oa(t)?t:void 0,animate:oa(n)?n:void 0}}return e.inherit===!1?{}:t}function pc(e){let{initial:t,animate:n}=fc(e,(0,s.useContext)(dc));return(0,s.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)!G(t[r])&&!Xa(r,n)&&(e[r]=t[r])}function _c({transformTemplate:e},t){return(0,s.useMemo)(()=>{let n=hc();return Wa(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,s.useMemo)(()=>{let n=bc();return io(n,t,oo(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 c=(o??Cc(e)?xc:yc)(t,r,i,e),l=uc(t,typeof e==`string`,a),u=e===s.Fragment?{}:{...l,...c,ref:n},{children:d}=t,f=(0,s.useMemo)(()=>G(d)?d.get():d,[d]);return(0,s.createElement)(e,{...u,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=la(e),l=ua(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`&&!aa(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=jr(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,s.useContext)(dc),i=(0,s.useContext)(d),a=()=>Tc(e,t,r,i);return n?a():l(a)},Oc=Dc({scrapeMotionValuesFromProps:Za,createRenderState:hc}),kc=Dc({scrapeMotionValuesFromProps:co,createRenderState:bc}),Ac=Symbol.for(`motionComponentSymbol`);function jc(e,t,n){let r=(0,s.useRef)(n);(0,s.useInsertionEffect)(()=>{r.current=n});let i=(0,s.useRef)(null);return(0,s.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,s.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,s.useContext)(dc),c=(0,s.useContext)(Zs),l=(0,s.useContext)(d),f=(0,s.useContext)(Ys),p=f.reducedMotion,m=f.skipAnimations,h=(0,s.useRef)(null),g=(0,s.useRef)(!1);r||=c.renderer,!h.current&&r&&(h.current=r(e,{visualState:t,parent:o,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:p,skipAnimations:m,isSVG:a}),g.current&&h.current&&(h.current.manuallyAnimateOnMount=!0));let _=h.current,v=(0,s.useContext)(Mc);_&&!_.projection&&i&&(_.type===`html`||_.type===`svg`)&&Fc(h.current,n,i,v);let y=(0,s.useRef)(!1);(0,s.useInsertionEffect)(()=>{_&&y.current&&_.update(n,l)});let b=n[Br],x=(0,s.useRef)(!!b&&typeof window<`u`&&!window.MotionHandoffIsComplete?.(b)&&window.MotionHasOptimisedAnimation?.(b));return u(()=>{g.current=!0,_&&(y.current=!0,window.MotionIsMounted=!0,_.updateFeatures(),_.scheduleRenderMicrotask(),x.current&&_.animationState&&_.animationState.animateChanges())}),(0,s.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),c=a?kc:Oc;function l(n,l){let u,d={...(0,s.useContext)(Ys),...n,layoutId:Rc(n)},{isStatic:f}=d,p=pc(n),m=c(n,f);if(!f&&typeof window<`u`){zc(d,r);let t=Bc(d);u=t.MeasureLayout,p.visualElement=Pc(e,m,d,i,t.ProjectionNode,a)}return(0,o.jsxs)(dc.Provider,{value:p,children:[u&&p.visualElement?(0,o.jsx)(u,{visualElement:p.visualElement,...d}):null,wc(e,n,jc(m,p.visualElement,l),m,f,t,a)]})}l.displayName=`motion.${typeof e==`string`?e:`create(${e.displayName??e.name??``})`}`;let u=(0,s.forwardRef)(l);return u[Ac]=e,u}function Rc({layoutId:e}){let t=(0,s.useContext)(c).id;return t&&e!==void 0?t+`-`+e:e}function zc(e,t){(0,s.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 lo(t):new $a(t,{allowProjection:e!==s.Fragment}),Uc=class extends J{constructor(e){super(e),e.animationState||=_o(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();aa(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 J{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=W(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=>wi(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}=A;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),O.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)},!wi(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}=A;this.history=[{...c,timestamp:l}];let{onSessionStart:u}=t;u&&u(e,nl(s,this.history));let d={passive:!0,capture:!0};this.removeListeners=C(Jc(this.contextWindow,`pointermove`,this.handlePointerMove,d),Jc(this.contextWindow,`pointerup`,this.handlePointerUp,d),Jc(this.contextWindow,`pointercancel`,this.handlePointerUp,d)),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),O.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),k(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>E(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&i.timestamp-r.timestamp>E(t)*2&&(r=e[1]);let a=D(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?R(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?R(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=w(t.min,t.max-r,e.min):r>i&&(n=w(e.min,e.max-i,t.min)),m(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=q(),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=yi(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(P.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&&O.update(()=>i(e,t),!1,!0),Rr(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&&O.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&&O.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=Ba(n,r.root,this.visualElement.getTransformPagePoint()),a=ul(r.layout.layoutBox,i);if(t){let e=t(Ca(a));this.hasMutatedConstraints=!!e,e&&(a=Sa(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 Rr(this.visualElement,e),n.start(Er(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]-R(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(R(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&&Oi(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()),O.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=Xi(e,yl(n)),i=Xi(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 J{constructor(e){super(e),this.removeGroupControls=S,this.removeListeners=S,this.controls=new vl(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||S}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&&O.update(()=>e(t,n),!1,!0)},Tl=class extends J{constructor(){super(...arguments),this.removePointerDownListener=S}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&&O.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 s.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()||O.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(),gi.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,s.useContext)(c);return(0,o.jsx)(Dl,{...e,layoutGroup:r,switchLayoutGroup:(0,s.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&&O.postRender(()=>i(t,Kc(t)))}var jl=class extends J{mount(){let{current:e}=this.node;e&&(this.unmount=Si(e,(e,t)=>(Al(this.node,t,`Start`),e=>Al(this.node,e,`End`))))}unmount(){}},Ml=class extends J{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=C(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&&O.postRender(()=>i(t,Kc(t)))}var Pl=class extends J{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Fi(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 J{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{k as A,u as B,Kn as C,Kt as D,Zt as E,w as F,c as H,g as I,h as L,ve as M,se as N,It as O,E as P,p as R,U as S,Qt as T,l as V,Kr as _,lo as a,Ir as b,ha as c,ia as d,q as f,pi as g,hi as h,as as i,O as j,R as k,pa as l,Ii as m,Xs as n,$a as o,Qi as p,Ys as r,ba as s,Kl as t,fa as u,Ur as v,$t as w,hr as x,G as y,d as z};
@@ -1 +1 @@
1
- import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./is-electron-C_ZTVhv8.js";import{t as i}from"./arrow-up-nBfZxfhi.js";import{t as a}from"./public-asset-C2P77n3W.js";var o=e(t(),1);async function s(e){r()&&await window.vellum?.quickInput?.submit(e)}async function c(){r()&&await window.vellum?.quickInput?.dismiss()}var l=n();function u(){let[e,t]=(0,o.useState)(``),n=(0,o.useRef)(null);(0,o.useEffect)(()=>{n.current?.focus()},[]);let r=(0,o.useCallback)(n=>{n.preventDefault();let r=e.trim();r&&(s(r),t(``))},[e]),u=(0,o.useCallback)(e=>{e.key===`Escape`&&(e.preventDefault(),c())},[]);return(0,l.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center bg-transparent p-2`,children:(0,l.jsxs)(`form`,{onSubmit:r,className:`flex w-full items-center gap-3 rounded-2xl border border-[var(--border-default)] bg-[var(--surface-base)] px-4 py-3 shadow-lg`,children:[(0,l.jsx)(`img`,{src:a(`/vellum-logo.svg`),alt:`Vellum`,width:24,height:24,className:`shrink-0 dark:hidden`,draggable:!1}),(0,l.jsx)(`img`,{src:a(`/vellum-logo-white.svg`),alt:`Vellum`,width:24,height:24,className:`hidden shrink-0 dark:block`,draggable:!1}),(0,l.jsx)(`input`,{ref:n,type:`text`,value:e,onChange:e=>t(e.target.value),onKeyDown:u,placeholder:`Ask Vellum anything...`,className:`min-w-0 flex-1 bg-transparent text-sm text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none`}),(0,l.jsx)(`button`,{type:`submit`,disabled:!e.trim(),className:`flex size-7 shrink-0 items-center justify-center rounded-full bg-[var(--surface-accent)] text-[var(--content-on-accent)] transition-opacity disabled:opacity-30`,children:(0,l.jsx)(i,{size:16})})]})})}export{u as QuickInputPage};
1
+ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-CVSDxk6A.js";import{t as r}from"./arrow-up-BxoccrRI.js";import{t as i}from"./is-electron-LEymSS4C.js";import{t as a}from"./public-asset-CsdLlNtA.js";var o=e(t(),1);async function s(e){i()&&await window.vellum?.quickInput?.submit(e)}async function c(){i()&&await window.vellum?.quickInput?.dismiss()}var l=n();function u(){let[e,t]=(0,o.useState)(``),n=(0,o.useRef)(null);(0,o.useEffect)(()=>{n.current?.focus()},[]);let i=(0,o.useCallback)(n=>{n.preventDefault();let r=e.trim();r&&(s(r),t(``))},[e]),u=(0,o.useCallback)(e=>{e.key===`Escape`&&(e.preventDefault(),c())},[]);return(0,l.jsx)(`div`,{className:`flex h-screen w-screen items-center justify-center bg-transparent p-2`,children:(0,l.jsxs)(`form`,{onSubmit:i,className:`flex w-full items-center gap-3 rounded-2xl border border-[var(--border-default)] bg-[var(--surface-base)] px-4 py-3 shadow-lg`,children:[(0,l.jsx)(`img`,{src:a(`/vellum-logo.svg`),alt:`Vellum`,width:24,height:24,className:`shrink-0 dark:hidden`,draggable:!1}),(0,l.jsx)(`img`,{src:a(`/vellum-logo-white.svg`),alt:`Vellum`,width:24,height:24,className:`hidden shrink-0 dark:block`,draggable:!1}),(0,l.jsx)(`input`,{ref:n,type:`text`,value:e,onChange:e=>t(e.target.value),onKeyDown:u,placeholder:`Ask Vellum anything...`,className:`min-w-0 flex-1 bg-transparent text-sm text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none`}),(0,l.jsx)(`button`,{type:`submit`,disabled:!e.trim(),className:`flex size-7 shrink-0 items-center justify-center rounded-full bg-[var(--surface-accent)] text-[var(--content-on-accent)] transition-opacity disabled:opacity-30`,children:(0,l.jsx)(r,{size:16})})]})})}export{u as QuickInputPage};