@vellumai/web 0.10.3 → 0.10.4-staging.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AnimatePresence-CgXwEO42.js → AnimatePresence-Dfn9OLfv.js} +2 -2
- package/dist/assets/{BundleConfirmPage-DpfvIcwl.js → BundleConfirmPage-cwBrFi1K.js} +1 -1
- package/dist/assets/{Combination-4Qc3vrtW.js → Combination-DRz6Ez-m.js} +1 -1
- package/dist/assets/{QueryClientProvider-DKhXIxGb.js → QueryClientProvider-DgWA3A3c.js} +1 -1
- package/dist/assets/{about-page-CuSnWJFo.js → about-page-6YWjIdZL.js} +1 -1
- package/dist/assets/{account-page-CCYCSy2-.js → account-page-bNvk8mIC.js} +1 -1
- package/dist/assets/{account-shell-b6GjlQ0u.js → account-shell-B1geYjoc.js} +1 -1
- package/dist/assets/{add-credits-modal-Dy3I3Har.js → add-credits-modal-D-5W9e8w.js} +1 -1
- package/dist/assets/{advanced-page-CVnT0zH-.js → advanced-page-CuerkFrp.js} +1 -1
- package/dist/assets/ai-page-CsqhZcSf.js +1 -0
- package/dist/assets/{api-2kc3MHRz.js → api-DXPKXkDj.js} +1 -1
- package/dist/assets/{api-key-screen-DGVn66y4.js → api-key-screen-QS5FdtlL.js} +1 -1
- package/dist/assets/{app-info-BZYaLxCg.js → app-info-oX9MaK2d.js} +1 -1
- package/dist/assets/{archive-BFILUl9x.js → archive-Ct5g6T4N.js} +1 -1
- package/dist/assets/{archive-page-Dl6HLIJt.js → archive-page-Bh0LTWRp.js} +1 -1
- package/dist/assets/arrow-left-BPsKoNcb.js +1 -0
- package/dist/assets/arrow-up-CkZMv0kb.js +1 -0
- package/dist/assets/{assistant-api-DROTS3Y9.js → assistant-api-BdlaVxiH.js} +1 -1
- package/dist/assets/{assistant-feature-flag-store-Dl92XRsM.js → assistant-feature-flag-store-Ceb6N94N.js} +1 -1
- package/dist/assets/assistant-identity-store-ESeBny_J.js +1 -0
- package/dist/assets/{assistant-status-panel-BkIkvMYw.js → assistant-status-panel-DRHanMan.js} +1 -1
- package/dist/assets/auth-store-BzL2lSd1.js +7 -0
- package/dist/assets/ban-BW0pQzvY.js +1 -0
- package/dist/assets/{bell-DB1SrBre.js → bell-B-09xFrv.js} +1 -1
- package/dist/assets/{billing-page-Cq_yLwUC.js → billing-page-CEArOabV.js} +3 -3
- package/dist/assets/{bookmark-C3S-p0MQ.js → bookmark-B_4Mr1qd.js} +1 -1
- package/dist/assets/{bookmarks-page-CANlE7hP.js → bookmarks-page-BvkvZ7uy.js} +1 -1
- package/dist/assets/{brain-Bs6LnfHO.js → brain-CamcLepK.js} +1 -1
- package/dist/assets/{browser-CKX_K5ev.js → browser-CDQJAXkC.js} +2 -2
- package/dist/assets/{bug-DDcuQ3au.js → bug-BiiqXpDy.js} +1 -1
- package/dist/assets/{build-state-VC4tL7sK.js → build-state-BIN8lPRx.js} +1 -1
- package/dist/assets/{button-D7s2Q_uG.js → button-BvHa6F59.js} +1 -1
- package/dist/assets/{calendar-CpgH8CqM.js → calendar-Ba3kkcG0.js} +1 -1
- package/dist/assets/{capture-error-Hr1Yo2kx.js → capture-error-BaKOqBjF.js} +1 -1
- package/dist/assets/{card-BibIM9x3.js → card-D9_3ngHI.js} +1 -1
- package/dist/assets/check-DwLoiFa9.js +1 -0
- package/dist/assets/check-DxBmXJus.js +1 -0
- package/dist/assets/{checkbox-BqCzUvXM.js → checkbox-DNfwi5Hy.js} +1 -1
- package/dist/assets/chevron-left-CgekgptJ.js +1 -0
- package/dist/assets/chevron-right-DP15nqFC.js +1 -0
- package/dist/assets/{chevron-up-BRZN6p_l.js → chevron-up-CNrKWpd3.js} +1 -1
- package/dist/assets/{circle-alert-DvNg50UK.js → circle-alert-BB_iJtM8.js} +1 -1
- package/dist/assets/circle-check-Cwv8JCfw.js +1 -0
- package/dist/assets/{client-feature-flag-store-C1kdd1EO.js → client-feature-flag-store-kWvb3vtZ.js} +1 -1
- package/dist/assets/{cloud-off-rAv4OHmv.js → cloud-off-DpkRXr7O.js} +1 -1
- package/dist/assets/{cn-DvW5mxZR.js → cn-CFvi8Z0K.js} +1 -1
- package/dist/assets/code-7vvpMPgo.js +1 -0
- package/dist/assets/{command-palette-GZu_zgQg.js → command-palette-D1nNMvVX.js} +1 -1
- package/dist/assets/{command-palette-window-page-CzWu42Ee.js → command-palette-window-page-DrZt0RaG.js} +1 -1
- package/dist/assets/{community-page-Dhgypa-h.js → community-page-A8lshdka.js} +1 -1
- package/dist/assets/{confirm-dialog-CfOXCE1N.js → confirm-dialog-BtxNY4WU.js} +1 -1
- package/dist/assets/{connect-page-CDOcgzzL.js → connect-page-CuSSRk9J.js} +1 -1
- package/dist/assets/{consent-controls-BSZV4rW3.js → consent-controls-CYj9WfJh.js} +1 -1
- package/dist/assets/{contacts-gateway-dxw1KMN2.js → contacts-gateway-CHNyL-NU.js} +1 -1
- package/dist/assets/{contacts-page-route-C3QiOxjO.js → contacts-page-route-qsIGsjpD.js} +2 -2
- package/dist/assets/{conversation-list-fetchers-UPVZq_6O.js → conversation-list-fetchers-Bcp_Zesn.js} +1 -1
- package/dist/assets/{conversation-store-DK-7gFAt.js → conversation-store-6tz67quR.js} +1 -1
- package/dist/assets/{cpu-CiHv3fhs.js → cpu-PmmoD4_K.js} +1 -1
- package/dist/assets/{credit-card-BKRB1ZIi.js → credit-card-yPLmY1JU.js} +1 -1
- package/dist/assets/{danger-zone-redirect-page-CjqUKhk9.js → danger-zone-redirect-page-Dhgk9mkr.js} +1 -1
- package/dist/assets/debug-page-Ddv9MlOm.js +4 -0
- package/dist/assets/{deploy-dialogs-jf5VL1UP.js → deploy-dialogs-qdH6GTjP.js} +1 -1
- package/dist/assets/{detail-card-BIwpXT5F.js → detail-card-5TPdhuZN.js} +1 -1
- package/dist/assets/{developer-page-iEL4eJ8x.js → developer-page-BXl0qAXX.js} +1 -1
- package/dist/assets/{devices-page-RMaPGcXe.js → devices-page-DaZR3FC4.js} +1 -1
- package/dist/assets/{diagnostics-BEB4VPwC.js → diagnostics-D5xXiLo-.js} +1 -1
- package/dist/assets/{dictation-overlay-page-BxQCzLMY.js → dictation-overlay-page-DOdZ_KIz.js} +1 -1
- package/dist/assets/{dist-B0Gf-knw.js → dist-BkSUb6s0.js} +1 -1
- package/dist/assets/{dist-cApvLul2.js → dist-Ble8OyWO.js} +1 -1
- package/dist/assets/{document-viewer-page-57OuXxYw.js → document-viewer-page-XzPSoPVb.js} +1 -1
- package/dist/assets/{domain-field-DYwuCpup.js → domain-field-BGp08c4L.js} +1 -1
- package/dist/assets/{dropdown-CL8VmqrY.js → dropdown-SUNHYFiy.js} +1 -1
- package/dist/assets/{earn-credits-modal-Nm1VymMp.js → earn-credits-modal-D7ioWvNh.js} +1 -1
- package/dist/assets/{emails-page-0gRZqa6y.js → emails-page-BRnVsJnR.js} +1 -1
- package/dist/assets/{emoji-catalog-data-Dlkuvec0.js → emoji-catalog-data-hHp74TCA.js} +1 -1
- package/dist/assets/{environment-store-CvH3J6fT.js → environment-store-B5EGAqzg.js} +1 -1
- package/dist/assets/esm-8Mv545sP.js +2 -0
- package/dist/assets/esm-B35SBKTx.js +2 -0
- package/dist/assets/esm-B9nLiq-2.js +1 -0
- package/dist/assets/{esm-B3Lr4Bv0.js → esm-DQXfMjvW.js} +2 -2
- package/dist/assets/esm-Dz9uwqjb.js +2 -0
- package/dist/assets/esm-TyKOKslC.js +2 -0
- package/dist/assets/{external-link-DPAtkBJ2.js → external-link-h3UAe8eX.js} +1 -1
- package/dist/assets/{file-editor-BNkJJbUv.js → file-editor-Cy1TZHJJ.js} +1 -1
- package/dist/assets/{file-text-CmK9LY1p.js → file-text-Bxj0xAst.js} +1 -1
- package/dist/assets/funnel-events-Dz_DLI0Q.js +1 -0
- package/dist/assets/general-page-Dl7IYYSf.js +1 -0
- package/dist/assets/{globe-DYF_lSGm.js → globe-D7wvOZaZ.js} +1 -1
- package/dist/assets/{hard-drive-D7_5VMhi.js → hard-drive-CO7i5o4z.js} +1 -1
- package/dist/assets/{hatching-screen-KPinlCES.js → hatching-screen-YvbZlnsV.js} +1 -1
- package/dist/assets/home-page-route-B7AJU1pr.js +1 -0
- package/dist/assets/{hosting-screen-C14KAJ6m.js → hosting-screen-CKlP38Z3.js} +1 -1
- package/dist/assets/{identity-page-route-C0BFcTAF.js → identity-page-route-CZQEWoJK.js} +1 -1
- package/dist/assets/index-3zpPFBeR.js +132 -0
- package/dist/assets/index-PRuqIn_u.css +2 -0
- package/dist/assets/{info-_OtUK1cX.js → info-B4DDA6uP.js} +1 -1
- package/dist/assets/{info-BGLlcyt6.js → info-CNTT4WCe.js} +1 -1
- package/dist/assets/{input-C8kfrq9r.js → input-BLN3wmw2.js} +1 -1
- package/dist/assets/{inspect-page-CWasyuSO.js → inspect-page-AldHg0Dz.js} +4 -4
- package/dist/assets/{install-C3xe8ARr.js → install-D_GSceot.js} +1 -1
- package/dist/assets/integrations-page-b3sE-PDS.js +1 -0
- package/dist/assets/{intelligence-layout-CvTumtjv.js → intelligence-layout-CsM_YjdB.js} +1 -1
- package/dist/assets/{keyboard-shortcuts-page-kiOEZKzE.js → keyboard-shortcuts-page-Capx1ICA.js} +1 -1
- package/dist/assets/{lib-BWRK7bT2.js → lib-Bexzcbsy.js} +1 -1
- package/dist/assets/library-detail-page-DrgMdBPq.js +1 -0
- package/dist/assets/{library-page-BHejhapZ.js → library-page-Catpu3p0.js} +1 -1
- package/dist/assets/{link-2-CaszbD7P.js → link-2-DW8ruMGH.js} +1 -1
- package/dist/assets/{list-row-Cw9JYESP.js → list-row-l7sxQ4Tj.js} +1 -1
- package/dist/assets/loader-circle-cYXxWP5B.js +1 -0
- package/dist/assets/{local-mode-CvrNMtPF.js → local-mode-Cez1weue.js} +1 -1
- package/dist/assets/{log-in-2iOsufxq.js → log-in-Ci5ja9sN.js} +1 -1
- package/dist/assets/{login-flow-DPi11n3h.js → login-flow-DeMU71_M.js} +1 -1
- package/dist/assets/{login-page-BGLVK82t.js → login-page-DkNb0F3s.js} +1 -1
- package/dist/assets/{logout-page-Bl6AD21S.js → logout-page-POyojlS1.js} +1 -1
- package/dist/assets/{logs-layout-C9eUE1Pt.js → logs-layout-qJmOLDZF.js} +1 -1
- package/dist/assets/{memory-router-playground-page-Dhi3uqxr.js → memory-router-playground-page-DD6t0kqe.js} +1 -1
- package/dist/assets/{menu-C_97pis4.js → menu-_JM4udVm.js} +1 -1
- package/dist/assets/{messages-DHDZ32NT.js → messages-DCNfjhgv.js} +2 -2
- package/dist/assets/{minimize-2-JE_UHZlJ.js → minimize-2-DmC6-Woz.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-DqXFL0Ke.js → mobile-sidebar-drawer-B4ol32hs.js} +1 -1
- package/dist/assets/{modal-D0Q3UWD0.js → modal-CH2iwSBx.js} +1 -1
- package/dist/assets/{monitor-D2okHi8o.js → monitor-B1YMXlZj.js} +1 -1
- package/dist/assets/{moon-CK8MXzOo.js → moon-DSWoApF5.js} +1 -1
- package/dist/assets/mutation-error-B5AKP6aC.js +1 -0
- package/dist/assets/{native-file-B-MK3Ngg.js → native-file-GuVJgNpB.js} +2 -2
- package/dist/assets/{notice-CqRgVmeL.js → notice-BhqKj_VM.js} +1 -1
- package/dist/assets/{notifications-page-pHiDPA0p.js → notifications-page-MRalDive.js} +1 -1
- package/dist/assets/{oauth-complete-page-DiGMWbOb.js → oauth-complete-page-DGOyh2u6.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-CwoZnzdc.js → oauth-popup-complete-page-BPxKmr_f.js} +1 -1
- package/dist/assets/{page-shell-cEGpH3P5.js → page-shell-cu3KBmqd.js} +1 -1
- package/dist/assets/{pairing-page-clFaUgzL.js → pairing-page-_ulPOW9r.js} +1 -1
- package/dist/assets/{panel-item-nGTDevWP.js → panel-item-DN2CyWOT.js} +1 -1
- package/dist/assets/{password-reset-page-DfYGL1Gv.js → password-reset-page-BfRXQpS_.js} +1 -1
- package/dist/assets/{pencil-DbB9rxpY.js → pencil-DUMCM9m-.js} +1 -1
- package/dist/assets/{platform-loopback-page-Df5bTTx8.js → platform-loopback-page-D3oAT6qE.js} +1 -1
- package/dist/assets/{plugin-detail-page-IRPeI4lP.js → plugin-detail-page-ClMMTrti.js} +1 -1
- package/dist/assets/{plugins-page-BaYp2QOe.js → plugins-page-y6Aom9qx.js} +1 -1
- package/dist/assets/{popover-CL-JL6vG.js → popover-BIr0nN9H.js} +1 -1
- package/dist/assets/prechat-route-MTnUk6MK.js +1 -0
- package/dist/assets/{prefs-C_oq5G87.js → prefs-C6e8pdrA.js} +1 -1
- package/dist/assets/{privacy-page-BUhxrIRn.js → privacy-page-gc352kAN.js} +1 -1
- package/dist/assets/privacy-screen-CQLPQPoM.js +1 -0
- package/dist/assets/{progress-bar-DIFlWPPg.js → progress-bar-ATg2lhDh.js} +1 -1
- package/dist/assets/{provider-callback-page-CxFC4PH1.js → provider-callback-page-BtYwaMxL.js} +1 -1
- package/dist/assets/{provider-key-nA35OC4Y.js → provider-key-BKR2QTfR.js} +1 -1
- package/dist/assets/{provider-signup-page-CdpT28xL.js → provider-signup-page-80V_D9ad.js} +1 -1
- package/dist/assets/proxy-T76Q62qP.js +1 -0
- package/dist/assets/{quick-input-page-C9jN8YtU.js → quick-input-page-B-7fTgJi.js} +1 -1
- package/dist/assets/{react-query.gen-CQLyoqYk.js → react-query.gen-BeTpj_Sy.js} +1 -1
- package/dist/assets/{react-query.gen-rp6Krcco.js → react-query.gen-breoeUVK.js} +1 -1
- package/dist/assets/{refresh-cw-Bf6LV0kG.js → refresh-cw-kmptQnpX.js} +1 -1
- package/dist/assets/{research-mock-page-ttrrPwo3.js → research-mock-page-DYPr-S2q.js} +1 -1
- package/dist/assets/research-onboarding-route-yYstHFq4.js +35 -0
- package/dist/assets/{resize-errors-DnJEbHn4.js → resize-errors-ocHCHRPn.js} +1 -1
- package/dist/assets/{resolved-assistants-store-Cp4J43BK.js → resolved-assistants-store-BrS8JBzC.js} +1 -1
- package/dist/assets/{return-to-ByvaXBKr.js → return-to-DlPFMVLx.js} +1 -1
- package/dist/assets/{review-terms-screen-DEiifDmK.js → review-terms-screen-DFlSm1tM.js} +1 -1
- package/dist/assets/risk-badge-CTIwePVV.js +1 -0
- package/dist/assets/{routes-DVqkwUEe.js → routes-Dzl0kj5j.js} +1 -1
- package/dist/assets/{save-DEBQ_gbb.js → save-DQyrotXP.js} +1 -1
- package/dist/assets/{schedules-D-4Rq6ZC.js → schedules-DZspBZ61.js} +1 -1
- package/dist/assets/{sdk.gen-D-_js_oC.js → sdk.gen-DSjI3deY.js} +1 -1
- package/dist/assets/{select-assistant-screen-UoixBMN2.js → select-assistant-screen-kcdnMYj7.js} +1 -1
- package/dist/assets/{setting-row-o44aWwYt.js → setting-row-DB3q3lgL.js} +1 -1
- package/dist/assets/settings-layout-DV4y_-8a.js +1 -0
- package/dist/assets/{share-feedback-modal-CTwByE7B.js → share-feedback-modal-CNGNLLDP.js} +1 -1
- package/dist/assets/{shortcut-keys-vM6sNj7W.js → shortcut-keys-D4E8qQgS.js} +1 -1
- package/dist/assets/{sidebar-tree-BJkXpCut.js → sidebar-tree-BCJVetMg.js} +1 -1
- package/dist/assets/{signup-page-CKDYl9Wb.js → signup-page-iM9szAKN.js} +1 -1
- package/dist/assets/{signup-shell-Bu5BM6II.js → signup-shell-GOG8-46O.js} +1 -1
- package/dist/assets/{skills-page-DVjqqfMw.js → skills-page-D3c3cuti.js} +1 -1
- package/dist/assets/{sound-manager-CzslfzDO.js → sound-manager-DwCzTycd.js} +1 -1
- package/dist/assets/{sounds-page-mens6EAJ.js → sounds-page-C3qbFW0l.js} +1 -1
- package/dist/assets/{sparkles-BICoewVE.js → sparkles-C8eL4LNF.js} +1 -1
- package/dist/assets/src-Dr68ou95.js +293 -0
- package/dist/assets/{stat-square-B0S3fO7O.js → stat-square-zBHENXcL.js} +1 -1
- package/dist/assets/{status-badge-pill-DYlAnX5m.js → status-badge-pill-CSitw8_5.js} +1 -1
- package/dist/assets/step-indicator-dots-D4A7eDFL.js +1 -0
- package/dist/assets/subagent-detail-panel-D3xm4yVF.js +4 -0
- package/dist/assets/{subagent-store-BLHGkTJR.js → subagent-store-CFwN6f1W.js} +1 -1
- package/dist/assets/system-events-page-CXlJ_J54.js +1 -0
- package/dist/assets/{system-events-redirect-page-C1hGE6n5.js → system-events-redirect-page-Bkigvq03.js} +1 -1
- package/dist/assets/{tag-B_-QAvJF.js → tag-64Evw5MO.js} +1 -1
- package/dist/assets/{three-dot-indicator-CLs7Rl-I.js → three-dot-indicator-DKd64wpF.js} +1 -1
- package/dist/assets/{tiptap-document-editor-D2t4qYzv.js → tiptap-document-editor-D031y5O7.js} +1 -1
- package/dist/assets/{toast-2TW5tj1Y.js → toast-VJ6jFKB9.js} +1 -1
- package/dist/assets/{toggle-X_kQW5my.js → toggle-zADptotB.js} +1 -1
- package/dist/assets/tool-detail-panel-Cq_SyoUG.js +2 -0
- package/dist/assets/{trace-page-DRWPaAuQ.js → trace-page-CEyVWa_4.js} +1 -1
- package/dist/assets/{triangle-alert-Bz1PpciW.js → triangle-alert-DqPPHRPD.js} +1 -1
- package/dist/assets/{triangle-alert-DKOyShqD.js → triangle-alert-eaW8jtCr.js} +1 -1
- package/dist/assets/{typography-BscuIPxA.js → typography-COqg6o2z.js} +1 -1
- package/dist/assets/{upgrade-cancel-page-Cwv5eMh9.js → upgrade-cancel-page-CM9JnbEO.js} +1 -1
- package/dist/assets/{upgrade-success-page-DnJ8Kyyj.js → upgrade-success-page-BxrXUjiP.js} +1 -1
- package/dist/assets/{usage-page-DJHRS0lZ.js → usage-page-DBmsLal7.js} +1 -1
- package/dist/assets/{use-active-assistant-id-C-RHQ9f6.js → use-active-assistant-id-jfqnc4T7.js} +1 -1
- package/dist/assets/{use-bus-subscription-BbiZXm1u.js → use-bus-subscription-CKWguMzy.js} +1 -1
- package/dist/assets/use-is-org-ready-DLZpD311.js +1 -0
- package/dist/assets/{use-onboarding-login-BEOH92mZ.js → use-onboarding-login-Cz1MgHw6.js} +1 -1
- package/dist/assets/use-plugin-drift-4-li_vW2.js +1 -0
- package/dist/assets/use-reduced-motion-DvKonyYy.js +1 -0
- package/dist/assets/{useQuery-B45lW1Kk.js → useBaseQuery-BOw_gWPH.js} +1 -1
- package/dist/assets/useInfiniteQuery-iPXlezAp.js +1 -0
- package/dist/assets/{useMutation-Lj4VunQV.js → useMutation-D3WkZnYg.js} +1 -1
- package/dist/assets/useQuery-cVuP8q1x.js +1 -0
- package/dist/assets/{user-plus-C0OyQU83.js → user-plus-CjFuXA3D.js} +1 -1
- package/dist/assets/{utils-IBnUZTqY.js → utils-Lep-7jRg.js} +1 -1
- package/dist/assets/{viewer-store-Dead64xY.js → viewer-store-Dened07w.js} +1 -1
- package/dist/assets/{voice-page-kQZ2ya5j.js → voice-page-C3zxM20t.js} +1 -1
- package/dist/assets/{weather-forecast-display-Cu3W6OZF.js → weather-forecast-display-DfsXEBSo.js} +1 -1
- package/dist/assets/{web-DOKyhuGQ.js → web-Broue3sZ.js} +1 -1
- package/dist/assets/{web-M3MS-KVB.js → web-C6Et8xNJ.js} +1 -1
- package/dist/assets/{web-B0S2ynRY.js → web-CNtrY6ZR.js} +1 -1
- package/dist/assets/{web-D0QcGl1O.js → web-CccL0uF5.js} +1 -1
- package/dist/assets/{web-Cg8gCWpB.js → web-CtAf2vJC.js} +1 -1
- package/dist/assets/{web-DJKnWTsF.js → web-Cygkn0vs.js} +1 -1
- package/dist/assets/{web-iUXw2JWQ.js → web-DuqCaaXx.js} +1 -1
- package/dist/assets/{welcome-screen-Bd7PCfAf.js → welcome-screen-RBmiq3Lq.js} +1 -1
- package/dist/assets/workflow-detail-panel-C2dD_hU2.js +1 -0
- package/dist/assets/{workspace-page-BR4pOxs5.js → workspace-page-lR8lzD2L.js} +1 -1
- package/dist/assets/x-649kPSQS.js +1 -0
- package/dist/assets/x-Bn5tweDc.js +1 -0
- package/dist/index.html +135 -134
- package/package.json +1 -1
- package/dist/assets/ai-page-kEbHR7cH.js +0 -1
- package/dist/assets/arrow-left-CP-EhDNF.js +0 -1
- package/dist/assets/arrow-up-nBfZxfhi.js +0 -1
- package/dist/assets/assistant-identity-store-CKjnoLSp.js +0 -1
- package/dist/assets/auth-store-Kfxhs2oI.js +0 -7
- package/dist/assets/ban-BpBuRCKI.js +0 -1
- package/dist/assets/check-CW0KmV0o.js +0 -1
- package/dist/assets/check-D6WkI0gF.js +0 -1
- package/dist/assets/chevron-left-DghyKSEE.js +0 -1
- package/dist/assets/chevron-right-B6vEpVY0.js +0 -1
- package/dist/assets/circle-check-DzlJxj_M.js +0 -1
- package/dist/assets/code-aMX9iMYa.js +0 -1
- package/dist/assets/debug-page-CBozmAQQ.js +0 -2
- package/dist/assets/esm-BVNBLzcW.js +0 -2
- package/dist/assets/esm-BtN-afz9.js +0 -1
- package/dist/assets/esm-D2xhPoyM.js +0 -2
- package/dist/assets/esm-DwNtkiSD.js +0 -2
- package/dist/assets/esm-pt1s0ryM.js +0 -2
- package/dist/assets/general-page-aZxTpnpI.js +0 -1
- package/dist/assets/home-page-route-CudtBGg1.js +0 -1
- package/dist/assets/index-Hcyzmz_5.css +0 -2
- package/dist/assets/index-PRnvH2Y1.js +0 -132
- package/dist/assets/integrations-page-WhBpTYP2.js +0 -1
- package/dist/assets/library-detail-page-rPvN9G1a.js +0 -1
- package/dist/assets/loader-circle-IIzBGiwm.js +0 -1
- package/dist/assets/mutation-error-CsyN8rYH.js +0 -1
- package/dist/assets/prechat-route-BaMWiiaf.js +0 -1
- package/dist/assets/privacy-screen-BaHYtKEt.js +0 -1
- package/dist/assets/proxy-DmIh4F51.js +0 -1
- package/dist/assets/reduced-motion-DYlLlcUm.js +0 -1
- package/dist/assets/research-onboarding-route-Cxai0fux.js +0 -36
- package/dist/assets/risk-badge-BA8R-HCI.js +0 -1
- package/dist/assets/settings-layout-CQ3Z9Raj.js +0 -1
- package/dist/assets/src-CK6bncSg.js +0 -293
- package/dist/assets/step-indicator-dots-CEVbsP8r.js +0 -1
- package/dist/assets/subagent-detail-panel-DVQAkMjF.js +0 -4
- package/dist/assets/system-events-page-Dro8iNrx.js +0 -1
- package/dist/assets/tool-detail-panel-DRD2DIMF.js +0 -2
- package/dist/assets/use-is-org-ready-BdtHeRV6.js +0 -1
- package/dist/assets/use-plugin-drift-Bj693x0f.js +0 -1
- package/dist/assets/use-reduced-motion-ChB7nOGe.js +0 -1
- package/dist/assets/workflow-detail-panel-CMmPPsuL.js +0 -1
- package/dist/assets/x-C8bCmIhD.js +0 -1
- package/dist/assets/x-KVxA2ZL0.js +0 -1
- /package/dist/assets/{api-errors-CveHbhgb.js → api-errors-B-g6gvNv.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-BgAkdy0n.js → avatar-bundled-components-DoxUXsZB.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-CEmN7KGI.js → avatar-svg-compositor-Bzno7teV.js} +0 -0
- /package/dist/assets/{build.umd-B3KuSWeo.js → build.umd-C56vswwO.js} +0 -0
- /package/dist/assets/{client.gen-Cs6pCK0s.js → client.gen-BnoNy2w0.js} +0 -0
- /package/dist/assets/{composer-focus-Bp1AiP29.js → composer-focus-BZr63Cvs.js} +0 -0
- /package/dist/assets/{conversation-selection-CtKjA5Ni.js → conversation-selection-BV7USWf2.js} +0 -0
- /package/dist/assets/{create-selectors-BE0_e_Ed.js → create-selectors-BTyhO-eS.js} +0 -0
- /package/dist/assets/{createLucideIcon-Bjb-Kuq7.js → createLucideIcon-6rJ6BdB7.js} +0 -0
- /package/dist/assets/{createLucideIcon-BlMXrA59.js → createLucideIcon-D8roAprb.js} +0 -0
- /package/dist/assets/{definitions-lQvEBMJT.js → definitions-CtVlh_R5.js} +0 -0
- /package/dist/assets/{dist-BTp54SIT.js → dist-CzyDxYAs.js} +0 -0
- /package/dist/assets/{edit-chat-session-DJpqkkos.js → edit-chat-session-BYvbyTwd.js} +0 -0
- /package/dist/assets/{effective-timezone-DrYGH2Lb.js → effective-timezone-DAkNzd21.js} +0 -0
- /package/dist/assets/{event-bus-Dl7-I4aL.js → event-bus-CBil9JQT.js} +0 -0
- /package/dist/assets/{feature-flag-catalog-RK3_Ckyw.js → feature-flag-catalog-Br-v70vR.js} +0 -0
- /package/dist/assets/{format-CPOur310.js → format-HKnibeVj.js} +0 -0
- /package/dist/assets/{format-date-CLlHK5gl.js → format-date-DyMQp2_m.js} +0 -0
- /package/dist/assets/{format-file-size-BfZOpPdu.js → format-file-size-DOcXaUaE.js} +0 -0
- /package/dist/assets/{haptics-CXHZxyAg.js → haptics-CKwMH4eq.js} +0 -0
- /package/dist/assets/{impersonate-version-flag-n-4oNLiO.js → impersonate-version-flag-XVa1Tm2F.js} +0 -0
- /package/dist/assets/{infiniteQueryOptions-C6p49ZmI.js → infiniteQueryOptions-DTCCTa10.js} +0 -0
- /package/dist/assets/{is-electron-C_ZTVhv8.js → is-electron-URCUw74P.js} +0 -0
- /package/dist/assets/{jsx-runtime-CVSDxk6A.js → jsx-runtime-B-mvcaJS.js} +0 -0
- /package/dist/assets/{llm-dimension-CQdmYu05.js → llm-dimension-Dx3xIzPP.js} +0 -0
- /package/dist/assets/{misc-BN2o2MEB.js → misc-CBD9JJCY.js} +0 -0
- /package/dist/assets/{native-deep-link-BYNI6pkW.js → native-deep-link-DmJ7Ty6z.js} +0 -0
- /package/dist/assets/{pdf-pz4ipUHd.js → pdf-DNWhOzmB.js} +0 -0
- /package/dist/assets/{prechat-B28Vzu55.js → prechat-BuuzFtal.js} +0 -0
- /package/dist/assets/{prechat-names-CRduluk-.js → prechat-names-Bo5bdzfH.js} +0 -0
- /package/dist/assets/{public-asset-Fx_laYnf.js → public-asset-BTisO-cB.js} +0 -0
- /package/dist/assets/{queryOptions-BtNi-_9H.js → queryOptions-DGyQTr3e.js} +0 -0
- /package/dist/assets/{sdk.gen-1aYqVbMj.js → sdk.gen-CC1iYdd0.js} +0 -0
- /package/dist/assets/{semver-yC_Iq9co.js → semver-DpADL11z.js} +0 -0
- /package/dist/assets/{tool-call-status-DTV5jmaU.js → tool-call-status-DNS6Y_vi.js} +0 -0
- /package/dist/assets/{typed-storage-Dctd_K9F.js → typed-storage-Chj38wph.js} +0 -0
- /package/dist/assets/{usage-window-Wgtgd-cv.js → usage-window-dm_mRqGo.js} +0 -0
- /package/dist/assets/{use-is-mobile-Cy10kl9u.js → use-is-mobile-BF5x8sr8.js} +0 -0
- /package/dist/assets/{workflow-status-DmbjJPT4.js → workflow-status-B53qU9DS.js} +0 -0
- /package/dist/assets/{xterm-MKaw0cT7.js → xterm-CQ7wuPsS.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-BFDQtfbG.js → xterm-addon-fit-CamgTlEH.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-B-mvcaJS.js";import{B as r,H as i,V as a,h as o,n as s,r as c,z as l}from"./proxy-T76Q62qP.js";var u=n(),d=e(t(),1);function f(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function p(...e){return t=>{let n=!1,r=e.map(e=>{let r=f(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():f(e[t],null)}}}}function m(...e){return d.useCallback(p(...e),e)}var h=class extends d.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(o(t)&&e.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let e=t.offsetParent,n=o(e)&&e.offsetWidth||0,r=o(e)&&e.offsetHeight||0,i=getComputedStyle(t),a=this.props.sizeRef.current;a.height=parseFloat(i.height),a.width=parseFloat(i.width),a.top=t.offsetTop,a.left=t.offsetLeft,a.right=n-a.width-a.left,a.bottom=r-a.height-a.top,a.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function g({children:e,isPresent:t,anchorX:n,anchorY:r,root:i,pop:a}){let o=(0,d.useId)(),s=(0,d.useRef)(null),l=(0,d.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:`ltr`}),{nonce:f}=(0,d.useContext)(c),p=m(s,e.props?.ref??e?.ref);return(0,d.useInsertionEffect)(()=>{let{width:e,height:c,top:u,left:d,right:p,bottom:m,direction:h}=l.current;if(t||a===!1||!s.current||!e||!c)return;let g=h===`rtl`,_=n===`left`?g?`right: ${p}`:`left: ${d}`:g?`left: ${d}`:`right: ${p}`,v=r===`bottom`?`bottom: ${m}`:`top: ${u}`;s.current.dataset.motionPopId=o;let y=document.createElement(`style`);f&&(y.nonce=f);let b=i??document.head;return b.appendChild(y),y.sheet&&y.sheet.insertRule(`
|
|
2
2
|
[data-motion-pop-id="${o}"] {
|
|
3
3
|
position: absolute !important;
|
|
4
4
|
width: ${e}px !important;
|
|
@@ -6,4 +6,4 @@ import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";impor
|
|
|
6
6
|
${_}px !important;
|
|
7
7
|
${v}px !important;
|
|
8
8
|
}
|
|
9
|
-
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,u.jsx)(h,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:a===!1?e:d.cloneElement(e,{ref:p})})}var _=({children:e,initial:t,isPresent:n,onExitComplete:
|
|
9
|
+
`),()=>{s.current?.removeAttribute(`data-motion-pop-id`),b.contains(y)&&b.removeChild(y)}},[t]),(0,u.jsx)(h,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:a===!1?e:d.cloneElement(e,{ref:p})})}var _=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:s,anchorX:c,anchorY:f,root:p})=>{let m=a(v),h=(0,d.useId)(),_=!0,y=(0,d.useMemo)(()=>(_=!1,{id:h,initial:t,isPresent:n,custom:i,onExitComplete:e=>{m.set(e,!0);for(let e of m.values())if(!e)return;r&&r()},register:e=>(m.set(e,!1),()=>m.delete(e))}),[n,m,r]);return o&&_&&(y={...y}),(0,d.useMemo)(()=>{m.forEach((e,t)=>m.set(t,!1))},[n]),d.useEffect(()=>{!n&&!m.size&&r&&r()},[n]),e=(0,u.jsx)(g,{pop:s===`popLayout`,isPresent:n,anchorX:c,anchorY:f,root:p,children:e}),(0,u.jsx)(l.Provider,{value:y,children:e})};function v(){return new Map}var y=e=>e.key||``;function b(e){let t=[];return d.Children.forEach(e,e=>{(0,d.isValidElement)(e)&&t.push(e)}),t}var x=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:c=!0,mode:l=`sync`,propagate:f=!1,anchorX:p=`left`,anchorY:m=`top`,root:h})=>{let[g,v]=s(f),x=(0,d.useMemo)(()=>b(e),[e]),S=f&&!g?[]:x.map(y),C=(0,d.useRef)(!0),w=(0,d.useRef)(x),T=a(()=>new Map),E=(0,d.useRef)(new Set),[D,O]=(0,d.useState)(x),[k,A]=(0,d.useState)(x);r(()=>{C.current=!1,w.current=x;for(let e=0;e<k.length;e++){let t=y(k[e]);S.includes(t)?(T.delete(t),E.current.delete(t)):T.get(t)!==!0&&T.set(t,!1)}},[k,S.length,S.join(`-`)]);let j=[];if(x!==D){let e=[...x];for(let t=0;t<k.length;t++){let n=k[t],r=y(n);S.includes(r)||(e.splice(t,0,n),j.push(n))}return l===`wait`&&j.length&&(e=j),A(b(e)),O(x),null}let{forceRender:M}=(0,d.useContext)(i);return(0,u.jsx)(u.Fragment,{children:k.map(e=>{let r=y(e),i=f&&!g?!1:x===k||S.includes(r);return(0,u.jsx)(_,{isPresent:i,initial:!C.current||n?void 0:!1,custom:t,presenceAffectsLayout:c,mode:l,root:h,onExitComplete:i?void 0:()=>{if(E.current.has(r))return;if(T.has(r))E.current.add(r),T.set(r,!0);else return;let e=!0;T.forEach(t=>{t||(e=!1)}),e&&(M?.(),A(w.current),f&&v?.(),o&&o())},anchorX:p,anchorY:m,children:e},r)})})};export{x as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-B-mvcaJS.js";import{t as r}from"./misc-CBD9JJCY.js";import{t as i}from"./format-file-size-DOcXaUaE.js";var a=e(t(),1),o=n(),s={verified:{label:`Verified`,className:`bg-[var(--system-positive-weak)] text-[var(--system-positive-strong)]`},signed:{label:`Signed`,className:`bg-[var(--system-info-weak)] text-[var(--system-info-strong)]`},unsigned:{label:`Unsigned`,className:`bg-[var(--surface-active)] text-[var(--content-secondary)]`},tampered:{label:`Tampered — signature invalid`,className:`bg-[var(--system-negative-weak)] text-[var(--system-negative-strong)]`}};function c(){let[e,t]=(0,a.useState)(null),[n,c]=(0,a.useState)(!1);if((0,a.useEffect)(()=>{window.vellum?.bundleConfirm?.getData().then(e=>{e&&t(e)})},[]),!e)return(0,o.jsx)(`div`,{className:`flex h-svh w-screen items-center justify-center bg-background text-muted-foreground select-none`,children:`Loading...`});let{manifest:l,scanResult:u,signatureResult:d,bundleSizeBytes:f}=e,p=s[d.trustTier],m=d.trustTier===`tampered`,h=u.warnings;return(0,o.jsxs)(`div`,{className:`flex h-svh w-screen flex-col bg-background px-6 pt-14 pb-6 text-foreground select-none`,children:[(0,o.jsxs)(`div`,{className:`flex items-start gap-3`,children:[l.icon?(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:l.icon}):(0,o.jsx)(`span`,{className:`text-5xl leading-none`,children:`📦`}),(0,o.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`h1`,{className:`truncate text-lg font-semibold`,children:l.name}),l.description&&(0,o.jsx)(`p`,{className:`text-muted-foreground mt-0.5 text-sm leading-snug`,children:l.description})]})]}),(0,o.jsxs)(`div`,{className:`mt-4 flex items-center gap-2`,children:[(0,o.jsx)(`span`,{className:r(`inline-block rounded-full px-2.5 py-0.5 text-xs font-medium`,p.className),children:p.label}),d.trustTier===`signed`&&d.signerDisplayName&&(0,o.jsxs)(`span`,{className:`text-muted-foreground text-xs`,children:[`by `,d.signerDisplayName]})]}),(0,o.jsxs)(`dl`,{className:`mt-4 grid grid-cols-[auto_1fr] gap-x-3 gap-y-1.5 text-sm`,children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Size`}),(0,o.jsx)(`dd`,{children:i(f)}),(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Created by`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.created_by}),l.capabilities.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`dt`,{className:`text-muted-foreground`,children:`Capabilities`}),(0,o.jsx)(`dd`,{className:`truncate`,children:l.capabilities.join(`, `)})]})]}),h.length>0&&(0,o.jsxs)(`div`,{className:`mt-4`,children:[(0,o.jsxs)(`button`,{type:`button`,className:`text-muted-foreground text-xs font-medium hover:underline`,onClick:()=>c(e=>!e),children:[n?`Hide`:`Show`,` Warnings (`,h.length,`)`]}),n&&(0,o.jsx)(`ul`,{className:`mt-1.5 space-y-1 text-xs`,children:h.map((e,t)=>(0,o.jsx)(`li`,{className:`rounded bg-[var(--system-mid-weak)] px-2 py-1 text-[var(--system-mid-strong)]`,children:e},t))})]}),(0,o.jsxs)(`div`,{className:`mt-auto flex items-center justify-end gap-3 pt-4`,children:[(0,o.jsx)(`button`,{type:`button`,className:`rounded-md border border-border px-4 py-1.5 text-sm font-medium text-foreground hover:bg-muted`,onClick:()=>window.vellum?.bundleConfirm?.respond(!1),children:`Cancel`}),(0,o.jsx)(`button`,{type:`button`,className:r(`rounded-md px-4 py-1.5 text-sm font-medium text-white`,m?`bg-red-600 hover:bg-red-700`:`bg-primary hover:bg-primary/90`),onClick:()=>window.vellum?.bundleConfirm?.respond(!0),children:m?`Install Anyway`:`Install`})]})]})}export{c as BundleConfirmPage};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{C as n,S as r,w as i,x as a}from"./button-D7s2Q_uG.js";import{t as o}from"./jsx-runtime-CVSDxk6A.js";import{o as s}from"./cn-DvW5mxZR.js";import{n as c}from"./dist-cApvLul2.js";var l=e(t(),1),u=o(),d=`DismissableLayer`,f=`dismissableLayer.update`,p=`dismissableLayer.pointerDownOutside`,m=`dismissableLayer.focusOutside`,h,g=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_=l.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d,onInteractOutside:p,onDismiss:m,..._}=e,v=l.useContext(g),[y,S]=l.useState(null),C=y?.ownerDocument??globalThis?.document,[,w]=l.useState({}),T=s(t,e=>S(e)),E=Array.from(v.layers),[D]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),O=E.indexOf(D),k=y?E.indexOf(y):-1,A=v.layersWithOutsidePointerEventsDisabled.size>0,j=k>=O,te=b(e=>{let t=e.target,n=[...v.branches].some(e=>e.contains(t));!j||n||(o?.(e),p?.(e),e.defaultPrevented||m?.())},C),M=ee(e=>{let t=e.target;[...v.branches].some(e=>e.contains(t))||(d?.(e),p?.(e),e.defaultPrevented||m?.())},C);return a(e=>{k===v.layers.size-1&&(i?.(e),!e.defaultPrevented&&m&&(e.preventDefault(),m()))},C),l.useEffect(()=>{if(y)return r&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(h=C.body.style.pointerEvents,C.body.style.pointerEvents=`none`),v.layersWithOutsidePointerEventsDisabled.add(y)),v.layers.add(y),x(),()=>{r&&v.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=h)}},[y,C,r,v]),l.useEffect(()=>()=>{y&&(v.layers.delete(y),v.layersWithOutsidePointerEventsDisabled.delete(y),x())},[y,v]),l.useEffect(()=>{let e=()=>w({});return document.addEventListener(f,e),()=>document.removeEventListener(f,e)},[]),(0,u.jsx)(n.div,{..._,ref:T,style:{pointerEvents:A?j?`auto`:`none`:void 0,...e.style},onFocusCapture:c(e.onFocusCapture,M.onFocusCapture),onBlurCapture:c(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:c(e.onPointerDownCapture,te.onPointerDownCapture)})});_.displayName=d;var v=`DismissableLayerBranch`,y=l.forwardRef((e,t)=>{let r=l.useContext(g),i=l.useRef(null),a=s(t,i);return l.useEffect(()=>{let e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,u.jsx)(n.div,{...e,ref:a})});y.displayName=v;function b(e,t=globalThis?.document){let n=r(e),i=l.useRef(!1),a=l.useRef(()=>{});return l.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let r=function(){S(p,n,i,{discrete:!0})},i={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,a.current),a.current=r,t.addEventListener(`click`,a.current,{once:!0})):r()}else t.removeEventListener(`click`,a.current);i.current=!1},r=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(r),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,a.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function ee(e,t=globalThis?.document){let n=r(e),i=l.useRef(!1);return l.useEffect(()=>{let e=e=>{e.target&&!i.current&&S(m,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function x(){let e=new CustomEvent(f);document.dispatchEvent(e)}function S(e,t,n,{discrete:r}){let a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?i(a,o):a.dispatchEvent(o)}var C=0;function w(){l.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??T()),document.body.insertAdjacentElement(`beforeend`,e[1]??T()),C++,()=>{C===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),C--}},[])}function T(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var E=`focusScope.autoFocusOnMount`,D=`focusScope.autoFocusOnUnmount`,O={bubbles:!1,cancelable:!0},k=`FocusScope`,A=l.forwardRef((e,t)=>{let{loop:i=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:c,...d}=e,[f,p]=l.useState(null),m=r(o),h=r(c),g=l.useRef(null),_=s(t,e=>p(e)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(a){let e=function(e){if(v.paused||!f)return;let t=e.target;f.contains(t)?g.current=t:P(g.current,{select:!0})},t=function(e){if(v.paused||!f)return;let t=e.relatedTarget;t!==null&&(f.contains(t)||P(g.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&P(f)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return f&&r.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[a,f,v.paused]),l.useEffect(()=>{if(f){ie.add(v);let e=document.activeElement;if(!f.contains(e)){let t=new CustomEvent(E,O);f.addEventListener(E,m),f.dispatchEvent(t),t.defaultPrevented||(j(se(M(f)),{select:!0}),document.activeElement===e&&P(f))}return()=>{f.removeEventListener(E,m),setTimeout(()=>{let t=new CustomEvent(D,O);f.addEventListener(D,h),f.dispatchEvent(t),t.defaultPrevented||P(e??document.body,{select:!0}),f.removeEventListener(D,h),ie.remove(v)},0)}}},[f,m,h,v]);let y=l.useCallback(e=>{if(!i&&!a||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,a]=te(t);r&&a?!e.shiftKey&&n===a?(e.preventDefault(),i&&P(r,{select:!0})):e.shiftKey&&n===r&&(e.preventDefault(),i&&P(a,{select:!0})):n===t&&e.preventDefault()}},[i,a,v.paused]);return(0,u.jsx)(n.div,{tabIndex:-1,...d,ref:_,onKeyDown:y})});A.displayName=k;function j(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(P(r,{select:t}),document.activeElement!==n)return}function te(e){let t=M(e);return[N(t,e),N(t.reverse(),e)]}function M(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function N(e,t){for(let n of e)if(!ne(n,{upTo:t}))return n}function ne(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function re(e){return e instanceof HTMLInputElement&&`select`in e}function P(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&re(e)&&t&&e.select()}}var ie=ae();function ae(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=oe(e,t),e.unshift(t)},remove(t){e=oe(e,t),e[0]?.resume()}}}function oe(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function se(e){return e.filter(e=>e.tagName!==`A`)}var ce=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},F=new WeakMap,I=new WeakMap,L={},R=0,le=function(e){return e&&(e.host||le(e.parentNode))},ue=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=le(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},de=function(e,t,n,r){var i=ue(t,Array.isArray(e)?e:[e]);L[n]||(L[n]=new WeakMap);var a=L[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(F.get(e)||0)+1,l=(a.get(e)||0)+1;F.set(e,c),a.set(e,l),o.push(e),c===1&&i&&I.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),R++,function(){o.forEach(function(e){var t=F.get(e)-1,i=a.get(e)-1;F.set(e,t),a.set(e,i),t||(I.has(e)||e.removeAttribute(r),I.delete(e)),i||e.removeAttribute(n)}),R--,R||(F=new WeakMap,F=new WeakMap,I=new WeakMap,L={})}},fe=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ce(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),de(r,i,n,`aria-hidden`)):function(){return null}},z=function(){return z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},z.apply(this,arguments)};function pe(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function me(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var B=`right-scroll-bar-position`,V=`width-before-scroll-bar`,he=`with-scroll-bars-hidden`,ge=`--removed-body-scroll-bar-size`;function H(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function _e(e,t){var n=(0,l.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ve=typeof window<`u`?l.useLayoutEffect:l.useEffect,ye=new WeakMap;function be(e,t){var n=_e(t||null,function(t){return e.forEach(function(e){return H(e,t)})});return ve(function(){var t=ye.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||H(e,null)}),i.forEach(function(e){r.has(e)||H(e,a)})}ye.set(n,e)},[e]),n}function xe(e){return e}function Se(e,t){t===void 0&&(t=xe);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ce(e){e===void 0&&(e={});var t=Se(null);return t.options=z({async:!0,ssr:!1},e),t}var we=function(e){var t=e.sideCar,n=pe(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return l.createElement(r,z({},n))};we.isSideCarExport=!0;function Te(e,t){return e.useMedium(t),we}var U=Ce(),W=function(){},G=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:W,onWheelCapture:W,onTouchMoveCapture:W}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,ee=pe(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=p,S=be([n,t]),C=z(z({},ee),i);return l.createElement(l.Fragment,null,d&&l.createElement(x,{sideCar:U,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?l.cloneElement(l.Children.only(s),z(z({},C),{ref:S})):l.createElement(y,z({},C,{className:c,ref:S}),s))});G.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},G.classNames={fullWidth:V,zeroRight:B};var K,Ee=function(){if(K)return K;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function De(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ee();return t&&e.setAttribute(`nonce`,t),e}function Oe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ke(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ae=function(){var e=0,t=null;return{add:function(n){e==0&&(t=De())&&(Oe(t,n),ke(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},je=function(){var e=Ae();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Me=function(){var e=je();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Ne={left:0,top:0,right:0,gap:0},q=function(e){return parseInt(e||``,10)||0},Pe=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[q(n),q(r),q(i)]},Fe=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Ne;var t=Pe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ie=Me(),J=`data-scroll-locked`,Le=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{C as n,S as r,w as i,x as a}from"./button-BvHa6F59.js";import{t as o}from"./jsx-runtime-B-mvcaJS.js";import{o as s}from"./cn-CFvi8Z0K.js";import{n as c}from"./dist-Ble8OyWO.js";var l=e(t(),1),u=o(),d=`DismissableLayer`,f=`dismissableLayer.update`,p=`dismissableLayer.pointerDownOutside`,m=`dismissableLayer.focusOutside`,h,g=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),_=l.forwardRef((e,t)=>{let{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:d,onInteractOutside:p,onDismiss:m,..._}=e,v=l.useContext(g),[y,S]=l.useState(null),C=y?.ownerDocument??globalThis?.document,[,w]=l.useState({}),T=s(t,e=>S(e)),E=Array.from(v.layers),[D]=[...v.layersWithOutsidePointerEventsDisabled].slice(-1),O=E.indexOf(D),k=y?E.indexOf(y):-1,A=v.layersWithOutsidePointerEventsDisabled.size>0,j=k>=O,te=b(e=>{let t=e.target,n=[...v.branches].some(e=>e.contains(t));!j||n||(o?.(e),p?.(e),e.defaultPrevented||m?.())},C),M=ee(e=>{let t=e.target;[...v.branches].some(e=>e.contains(t))||(d?.(e),p?.(e),e.defaultPrevented||m?.())},C);return a(e=>{k===v.layers.size-1&&(i?.(e),!e.defaultPrevented&&m&&(e.preventDefault(),m()))},C),l.useEffect(()=>{if(y)return r&&(v.layersWithOutsidePointerEventsDisabled.size===0&&(h=C.body.style.pointerEvents,C.body.style.pointerEvents=`none`),v.layersWithOutsidePointerEventsDisabled.add(y)),v.layers.add(y),x(),()=>{r&&v.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=h)}},[y,C,r,v]),l.useEffect(()=>()=>{y&&(v.layers.delete(y),v.layersWithOutsidePointerEventsDisabled.delete(y),x())},[y,v]),l.useEffect(()=>{let e=()=>w({});return document.addEventListener(f,e),()=>document.removeEventListener(f,e)},[]),(0,u.jsx)(n.div,{..._,ref:T,style:{pointerEvents:A?j?`auto`:`none`:void 0,...e.style},onFocusCapture:c(e.onFocusCapture,M.onFocusCapture),onBlurCapture:c(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:c(e.onPointerDownCapture,te.onPointerDownCapture)})});_.displayName=d;var v=`DismissableLayerBranch`,y=l.forwardRef((e,t)=>{let r=l.useContext(g),i=l.useRef(null),a=s(t,i);return l.useEffect(()=>{let e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),(0,u.jsx)(n.div,{...e,ref:a})});y.displayName=v;function b(e,t=globalThis?.document){let n=r(e),i=l.useRef(!1),a=l.useRef(()=>{});return l.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let r=function(){S(p,n,i,{discrete:!0})},i={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,a.current),a.current=r,t.addEventListener(`click`,a.current,{once:!0})):r()}else t.removeEventListener(`click`,a.current);i.current=!1},r=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(r),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,a.current)}},[t,n]),{onPointerDownCapture:()=>i.current=!0}}function ee(e,t=globalThis?.document){let n=r(e),i=l.useRef(!1);return l.useEffect(()=>{let e=e=>{e.target&&!i.current&&S(m,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}function x(){let e=new CustomEvent(f);document.dispatchEvent(e)}function S(e,t,n,{discrete:r}){let a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?i(a,o):a.dispatchEvent(o)}var C=0;function w(){l.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??T()),document.body.insertAdjacentElement(`beforeend`,e[1]??T()),C++,()=>{C===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),C--}},[])}function T(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var E=`focusScope.autoFocusOnMount`,D=`focusScope.autoFocusOnUnmount`,O={bubbles:!1,cancelable:!0},k=`FocusScope`,A=l.forwardRef((e,t)=>{let{loop:i=!1,trapped:a=!1,onMountAutoFocus:o,onUnmountAutoFocus:c,...d}=e,[f,p]=l.useState(null),m=r(o),h=r(c),g=l.useRef(null),_=s(t,e=>p(e)),v=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(a){let e=function(e){if(v.paused||!f)return;let t=e.target;f.contains(t)?g.current=t:P(g.current,{select:!0})},t=function(e){if(v.paused||!f)return;let t=e.relatedTarget;t!==null&&(f.contains(t)||P(g.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&P(f)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return f&&r.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[a,f,v.paused]),l.useEffect(()=>{if(f){ie.add(v);let e=document.activeElement;if(!f.contains(e)){let t=new CustomEvent(E,O);f.addEventListener(E,m),f.dispatchEvent(t),t.defaultPrevented||(j(se(M(f)),{select:!0}),document.activeElement===e&&P(f))}return()=>{f.removeEventListener(E,m),setTimeout(()=>{let t=new CustomEvent(D,O);f.addEventListener(D,h),f.dispatchEvent(t),t.defaultPrevented||P(e??document.body,{select:!0}),f.removeEventListener(D,h),ie.remove(v)},0)}}},[f,m,h,v]);let y=l.useCallback(e=>{if(!i&&!a||v.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){let t=e.currentTarget,[r,a]=te(t);r&&a?!e.shiftKey&&n===a?(e.preventDefault(),i&&P(r,{select:!0})):e.shiftKey&&n===r&&(e.preventDefault(),i&&P(a,{select:!0})):n===t&&e.preventDefault()}},[i,a,v.paused]);return(0,u.jsx)(n.div,{tabIndex:-1,...d,ref:_,onKeyDown:y})});A.displayName=k;function j(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(P(r,{select:t}),document.activeElement!==n)return}function te(e){let t=M(e);return[N(t,e),N(t.reverse(),e)]}function M(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function N(e,t){for(let n of e)if(!ne(n,{upTo:t}))return n}function ne(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function re(e){return e instanceof HTMLInputElement&&`select`in e}function P(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&re(e)&&t&&e.select()}}var ie=ae();function ae(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=oe(e,t),e.unshift(t)},remove(t){e=oe(e,t),e[0]?.resume()}}}function oe(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function se(e){return e.filter(e=>e.tagName!==`A`)}var ce=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},F=new WeakMap,I=new WeakMap,L={},R=0,le=function(e){return e&&(e.host||le(e.parentNode))},ue=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=le(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},de=function(e,t,n,r){var i=ue(t,Array.isArray(e)?e:[e]);L[n]||(L[n]=new WeakMap);var a=L[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(F.get(e)||0)+1,l=(a.get(e)||0)+1;F.set(e,c),a.set(e,l),o.push(e),c===1&&i&&I.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),R++,function(){o.forEach(function(e){var t=F.get(e)-1,i=a.get(e)-1;F.set(e,t),a.set(e,i),t||(I.has(e)||e.removeAttribute(r),I.delete(e)),i||e.removeAttribute(n)}),R--,R||(F=new WeakMap,F=new WeakMap,I=new WeakMap,L={})}},fe=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||ce(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),de(r,i,n,`aria-hidden`)):function(){return null}},z=function(){return z=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},z.apply(this,arguments)};function pe(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function me(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var B=`right-scroll-bar-position`,V=`width-before-scroll-bar`,he=`with-scroll-bars-hidden`,ge=`--removed-body-scroll-bar-size`;function H(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function _e(e,t){var n=(0,l.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var ve=typeof window<`u`?l.useLayoutEffect:l.useEffect,ye=new WeakMap;function be(e,t){var n=_e(t||null,function(t){return e.forEach(function(e){return H(e,t)})});return ve(function(){var t=ye.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||H(e,null)}),i.forEach(function(e){r.has(e)||H(e,a)})}ye.set(n,e)},[e]),n}function xe(e){return e}function Se(e,t){t===void 0&&(t=xe);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ce(e){e===void 0&&(e={});var t=Se(null);return t.options=z({async:!0,ssr:!1},e),t}var we=function(e){var t=e.sideCar,n=pe(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return l.createElement(r,z({},n))};we.isSideCarExport=!0;function Te(e,t){return e.useMedium(t),we}var U=Ce(),W=function(){},G=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:W,onWheelCapture:W,onTouchMoveCapture:W}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,ee=pe(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=p,S=be([n,t]),C=z(z({},ee),i);return l.createElement(l.Fragment,null,d&&l.createElement(x,{sideCar:U,removeScrollBar:u,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?l.cloneElement(l.Children.only(s),z(z({},C),{ref:S})):l.createElement(y,z({},C,{className:c,ref:S}),s))});G.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},G.classNames={fullWidth:V,zeroRight:B};var K,Ee=function(){if(K)return K;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function De(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ee();return t&&e.setAttribute(`nonce`,t),e}function Oe(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ke(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Ae=function(){var e=0,t=null;return{add:function(n){e==0&&(t=De())&&(Oe(t,n),ke(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},je=function(){var e=Ae();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Me=function(){var e=je();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Ne={left:0,top:0,right:0,gap:0},q=function(e){return parseInt(e||``,10)||0},Pe=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[q(n),q(r),q(i)]},Fe=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Ne;var t=Pe(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Ie=Me(),J=`data-scroll-locked`,Le=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
2
|
.${he} {
|
|
3
3
|
overflow: hidden ${r};
|
|
4
4
|
padding-right: ${s}px ${r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-B-mvcaJS.js";var r=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},i={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},a=new class{#e=i;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function o(e){setTimeout(e,0)}var s=typeof window>`u`||`Deno`in globalThis;function c(){}function l(e,t){return typeof e==`function`?e(t):e}function u(e){return typeof e==`number`&&e>=0&&e!==1/0}function d(e,t){return Math.max(e+(t||0)-Date.now(),0)}function f(e,t){return typeof e==`function`?e(t):e}function p(e,t){return typeof e==`function`?e(t):e}function m(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==g(o,t.options))return!1}else if(!v(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function h(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(_(t.options.mutationKey)!==_(a))return!1}else if(!v(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function g(e,t){return(t?.queryKeyHashFn||_)(e)}function _(e){return JSON.stringify(e,(e,t)=>C(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function v(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>v(e[n],t[n])):!1}var y=Object.prototype.hasOwnProperty;function b(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=S(e)&&S(t);if(!r&&!(C(e)&&C(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:y.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=b(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function x(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function S(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function C(e){if(!w(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!w(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function w(e){return Object.prototype.toString.call(e)===`[object Object]`}function T(e){return new Promise(t=>{a.setTimeout(t,e)})}function E(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:b(e,t)}function D(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function O(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var k=Symbol();function A(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===k?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function j(e,t){return typeof e==`function`?e(...t):!!e}function M(e,t,n){let r=!1,i;return Object.defineProperty(e,`signal`,{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var N=new class extends r{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!s&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function P(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var F=o;function I(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=F,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var L=I(),R=new class extends r{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!s&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function z(e){return Math.min(1e3*2**e,3e4)}function B(e){return(e??`online`)===`online`?R.isOnline():!0}var V=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function H(e){let t=!1,n=0,r,i=P(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new V(t);p(n),e.onCancel?.(n)}},c=()=>{t=!0},l=()=>{t=!1},u=()=>N.isFocused()&&(e.networkMode===`always`||R.isOnline())&&e.canRun(),d=()=>B(e.networkMode)&&e.canRun(),f=e=>{a()||(r?.(),i.resolve(e))},p=e=>{a()||(r?.(),i.reject(e))},m=()=>new Promise(t=>{r=e=>{(a()||u())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),h=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(f).catch(r=>{if(a())return;let i=e.retry??(s?0:3),o=e.retryDelay??z,c=typeof o==`function`?o(n,r):o,l=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!l){p(r);return}n++,e.onFail?.(n,r),T(c).then(()=>u()?void 0:m()).then(()=>{t?p(r):h()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:c,continueRetry:l,canStart:d,start:()=>(d()?h():m().then(h),i)}}var U=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),u(this.gcTime)&&(this.#e=a.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(s?1/0:300*1e3))}clearGcTimeout(){this.#e&&=(a.clearTimeout(this.#e),void 0)}},W=e(t(),1),G=n(),K=W.createContext(void 0),q=e=>{let t=W.useContext(K);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},J=({client:e,children:t})=>(W.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(K.Provider,{value:e,children:t}));export{k as A,v as C,f as D,p as E,a as M,r as N,x as O,c as S,b as T,g as _,B as a,h as b,L as c,M as d,D as f,_ as g,l as h,V as i,d as j,j as k,P as l,A as m,q as n,H as o,O as p,U as r,R as s,J as t,N as u,s as v,E as w,m as x,u as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./jsx-runtime-B-mvcaJS.js";import{t as r}from"./is-electron-URCUw74P.js";import{n as i,t as a}from"./app-info-oX9MaK2d.js";var o=e(t(),1),s=n();function c(){let[e,t]=(0,o.useState)(null);(0,o.useEffect)(()=>{a().then(t)},[]);let n=e??l;return(0,s.jsxs)(`div`,{className:`flex h-svh w-screen flex-col items-center justify-center bg-background px-8 pt-14 pb-8 text-center text-foreground select-none`,children:[(0,s.jsx)(`h1`,{className:`mt-4 text-2xl font-semibold`,children:n.appName}),(0,s.jsx)(`p`,{className:`text-muted-foreground mt-1 mb-7 text-xs`,children:`AI assistant for your Mac`}),(0,s.jsxs)(`dl`,{className:`mb-7 grid grid-cols-[auto_auto] gap-x-4 gap-y-1.5 text-sm`,children:[(0,s.jsx)(`dt`,{className:`text-muted-foreground text-right`,children:`Version`}),(0,s.jsx)(`dd`,{className:`text-left font-mono tabular-nums select-text`,children:n.version}),(0,s.jsx)(`dt`,{className:`text-muted-foreground text-right`,children:`Build`}),(0,s.jsx)(`dd`,{className:`text-left font-mono tabular-nums select-text`,children:n.commitSha})]}),(0,s.jsx)(`a`,{href:n.website,className:`text-primary text-sm hover:underline`,onClick:e=>{r()&&(e.preventDefault(),i())},children:new URL(n.website).host}),(0,s.jsx)(`div`,{className:`text-muted-foreground mt-auto pt-6 text-[11px]`,children:n.copyright})]})}var l={appName:`Vellum`,version:`—`,commitSha:`—`,copyright:`© ${new Date().getFullYear()} Vellum`,website:`https://vellum.ai`};export{c as AboutPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as r}from"./jsx-runtime-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as r}from"./jsx-runtime-B-mvcaJS.js";import{A as i,a,n as o,o as s}from"./auth-store-BzL2lSd1.js";import{a as c}from"./routes-Dzl0kj5j.js";import{n as l,t as u}from"./login-flow-DeMU71_M.js";import{Rn as d}from"./index-3zpPFBeR.js";import{r as f,t as p}from"./account-shell-B1geYjoc.js";var m=e(t(),1),h=r();function g(){let e=a(),t=s(),r=o.use.user(),g=o.use.logout(),[_,v]=(0,m.useState)(null),[y,b]=(0,m.useState)(!1),x=async()=>{v(null),b(!0);try{await i(l,u)}catch(e){console.error(`[account] auth flow failed:`,e),v(`Something went wrong. Please try again.`),b(!1)}};return t?(0,h.jsx)(p,{children:(0,h.jsx)(f,{title:`Loading...`})}):e?(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome${r?.username?`, ${r.username}`:``}!`,subtitle:`You are signed in.`}),(0,h.jsxs)(`div`,{className:`flex flex-col items-center gap-4`,children:[(0,h.jsx)(n,{to:c.assistant,className:`inline-flex w-full 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:`Go to your assistant`}),(0,h.jsx)(`button`,{type:`button`,onClick:async()=>{await g(),d(c.account.login)},className:`cursor-pointer bg-transparent text-sm font-normal text-[var(--content-secondary)] transition-colors hover:text-[var(--content-default)]`,children:`Sign out`})]})]}):(0,h.jsxs)(p,{children:[(0,h.jsx)(f,{title:`Welcome to Vellum`,subtitle:`Sign in to get started.`}),_&&(0,h.jsx)(`p`,{className:`text-center text-sm text-[var(--system-negative-strong)]`,children:_}),(0,h.jsx)(`div`,{className:`flex flex-col items-center gap-4`,children:(0,h.jsx)(`button`,{type:`button`,onClick:()=>void x(),disabled:y,className:`inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:opacity-50`,children:`Sign in`})})]})}export{g as AccountPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./jsx-runtime-
|
|
1
|
+
import{t as e}from"./jsx-runtime-B-mvcaJS.js";import"./src-Dr68ou95.js";import{t}from"./notice-BhqKj_VM.js";var n=e(),r=(0,n.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,n.jsx)(`path`,{d:`M7.5 15L12.5 10L7.5 5`,stroke:`currentColor`,strokeWidth:`1.67`,strokeLinecap:`round`,strokeLinejoin:`round`})});function i({onSubmit:e,error:i,children:a,submitLabel:o,submittingLabel:s,isSubmitting:c,footer:l}){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(`form`,{onSubmit:e,className:`flex flex-col gap-4`,children:[i&&(0,n.jsx)(t,{tone:`error`,children:i}),(0,n.jsx)(`div`,{className:`flex flex-col gap-3`,children:a}),(0,n.jsxs)(`button`,{type:`submit`,disabled:c,className:`mt-2 inline-flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg bg-[var(--primary-base)] px-6 py-3 text-sm font-medium text-[var(--content-inset)] transition-colors hover:bg-[var(--primary-hover)] disabled:cursor-wait disabled:opacity-50`,children:[c?s:o,r]})]}),l&&(0,n.jsx)(`div`,{className:`mt-8 text-center`,children:l})]})}function a(e){return(0,n.jsx)(`input`,{...e,className:`w-full rounded-lg border border-[var(--border-base)] bg-[var(--surface-overlay)] px-4 py-3 text-sm text-[var(--content-default)] outline-none placeholder:text-[var(--content-tertiary)] focus:border-[var(--primary-base)]/50`})}function o({title:e,subtitle:t}){return(0,n.jsxs)(`div`,{className:`mb-8 text-center`,children:[(0,n.jsx)(`h1`,{className:`mb-2 font-serif text-[2rem] font-bold italic text-[var(--content-default)]`,children:e}),t&&(0,n.jsx)(`p`,{className:`text-sm text-[var(--content-secondary)]`,children:t})]})}function s({children:e}){return(0,n.jsx)(`div`,{className:`flex min-h-screen items-center justify-center bg-[var(--surface-base)]`,children:(0,n.jsx)(`div`,{className:`w-full max-w-[480px] px-6`,children:(0,n.jsx)(`div`,{className:`flex flex-col items-center gap-10`,children:(0,n.jsx)(`div`,{className:`w-full`,children:e})})})})}export{a as i,i as n,o as r,s as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-
|
|
1
|
+
import{o as e,r as t}from"./chunk-jRWAZmH_.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BvHa6F59.js";import{h as i,t as a,u as o}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as s}from"./QueryClientProvider-DgWA3A3c.js";import{t as c}from"./useMutation-D3WkZnYg.js";import{t as l}from"./jsx-runtime-B-mvcaJS.js";import{t as u}from"./useQuery-cVuP8q1x.js";import{t as d}from"./dropdown-SUNHYFiy.js";import{t as f}from"./modal-CH2iwSBx.js";import{t as p}from"./circle-alert-BB_iJtM8.js";import{t as m}from"./credit-card-yPLmY1JU.js";import{t as h}from"./loader-circle-cYXxWP5B.js";import{at as g,rt as _}from"./react-query.gen-breoeUVK.js";import{n as v,t as y}from"./browser-CDQJAXkC.js";var b=t({AddCreditsModal:()=>E}),x=e(n(),1),S=l(),C=[`10.00`,`20.00`,`30.00`,`40.00`,`50.00`,`60.00`,`70.00`,`80.00`,`90.00`,`100.00`];function w(e){let t=parseFloat(e);if(Number.isNaN(t))return`0 credits`;let n=t.toLocaleString(`en-US`,{minimumFractionDigits:2,maximumFractionDigits:2});return`${n.endsWith(`.00`)?n.slice(0,-3):n} credits`}function T(e){if(e&&typeof e==`object`){let t=e.amount;if(Array.isArray(t)&&typeof t[0]==`string`)return t[0]}return`Failed to create checkout session. Please try again.`}function E({open:e,onOpenChange:t}){let n=s(),{pathname:l}=o(),[b]=i(),E=b.toString()?`${l}?${b.toString()}`:l,{data:D,isLoading:O}=u(_()),k=D?.allowed_top_up_amounts?.length?D.allowed_top_up_amounts:C,[A,j]=(0,x.useState)(null),M=A&&k.includes(A)?A:k[0]??C[0],N=c(g());return(0,x.useEffect)(()=>v(()=>{t(!1),n.invalidateQueries(_())}),[t,n]),(0,S.jsx)(f.Root,{open:e,onOpenChange:t,children:(0,S.jsxs)(f.Content,{size:`sm`,children:[(0,S.jsxs)(f.Header,{children:[(0,S.jsx)(f.Title,{icon:m,children:`Add Credits`}),(0,S.jsx)(f.Description,{children:`Purchase credits to continue using the assistant. You'll be redirected to Stripe to complete the payment.`})]}),(0,S.jsx)(f.Body,{children:(0,S.jsxs)(`div`,{className:`space-y-4`,children:[(0,S.jsxs)(`div`,{children:[(0,S.jsx)(`label`,{htmlFor:`add-credits-amount`,className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Amount`}),(0,S.jsx)(d,{id:`add-credits-amount`,value:M,onChange:e=>{j(e),N.isError&&N.reset()},disabled:O||!D,options:k.map(e=>({value:e,label:w(e)}))})]}),N.isError&&(0,S.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,S.jsx)(p,{className:`h-3.5 w-3.5 shrink-0`}),T(N.error)]}),(0,S.jsx)(a,{to:`/assistant/settings/billing`,className:`text-body-small-default text-[var(--content-tertiary)] underline hover:text-[var(--content-secondary)]`,onClick:()=>t(!1),children:`Configure Automatic Top-Ups →`})]})}),(0,S.jsxs)(f.Footer,{children:[(0,S.jsx)(f.Close,{asChild:!0,children:(0,S.jsx)(r,{variant:`outlined`,children:`Cancel`})}),(0,S.jsx)(r,{variant:`primary`,leftIcon:N.isPending?(0,S.jsx)(h,{className:`animate-spin`}):void 0,onClick:()=>{N.isPending||N.mutate({body:{amount:M,return_path:E}},{onSuccess:e=>{y(e.checkout_url)}})},disabled:N.isPending||O||!D,children:`Add credits`})]})]})})}export{b as n,E as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-BaKOqBjF.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BvHa6F59.js";import{n as i}from"./QueryClientProvider-DgWA3A3c.js";import{t as a}from"./useMutation-D3WkZnYg.js";import{t as o}from"./jsx-runtime-B-mvcaJS.js";import{t as s}from"./useQuery-cVuP8q1x.js";import{t as c}from"./input-BLN3wmw2.js";import{t as l}from"./toggle-zADptotB.js";import{n as u}from"./stat-square-zBHENXcL.js";import{n as d}from"./toast-VJ6jFKB9.js";import{t as f}from"./loader-circle-cYXxWP5B.js";import{c as p,kt as m,u as h}from"./react-query.gen-BeTpj_Sy.js";import{X as g}from"./sdk.gen-DSjI3deY.js";import{F as _,P as v}from"./react-query.gen-breoeUVK.js";import{in as y,x as b}from"./index-3zpPFBeR.js";import{t as x}from"./use-active-assistant-id-jfqnc4T7.js";import{t as S}from"./detail-card-5TPdhuZN.js";import{r as C}from"./assistant-status-panel-DRHanMan.js";var w=e(n(),1),T=o(),E=[[`Mon`,0],[`Tue`,1],[`Wed`,2],[`Thu`,3],[`Fri`,4],[`Sat`,5],[`Sun`,6]];function D(e){let[t,n]=e.split(`:`).map(Number),r=new Date,i=new Date(Date.UTC(r.getUTCFullYear(),r.getUTCMonth(),r.getUTCDate(),t,n));return`${i.getHours().toString().padStart(2,`0`)}:${i.getMinutes().toString().padStart(2,`0`)}`}function O(e){let[t,n]=e.split(`:`).map(Number),r=new Date,i=new Date(r.getFullYear(),r.getMonth(),r.getDate(),t,n);return`${i.getUTCHours().toString().padStart(2,`0`)}:${i.getUTCMinutes().toString().padStart(2,`0`)}`}function k(){return Intl.DateTimeFormat(void 0,{timeZoneName:`short`}).formatToParts(new Date).find(e=>e.type===`timeZoneName`)?.value??``}function A(e){let t=e?.schedule?.window.start??`06:00`,n=e?.schedule?.window.end??`08:00`;return{enabled:e?.enabled??!0,timezone:`UTC`,frequency:e?.schedule?.frequency??`weekly`,daysOfWeek:e?.schedule?.days_of_week??[0],daysOfMonth:e?.schedule?.days_of_month??[],windowStart:D(t),windowEnd:D(n)}}function j({assistantId:e}){let t=i(),{data:n,isLoading:o,isError:p}=s(v({path:{id:e}})),m=(0,w.useMemo)(()=>A(n),[n]),[h,y]=(0,w.useState)(null),b=h??m,x=h!==null,S=(0,w.useMemo)(()=>k(),[]),[C,D]=(0,w.useState)(null),j=C??b.daysOfMonth.join(`, `),M=a({mutationFn:async t=>{let{data:n}=await g({path:{id:e},body:t,throwOnError:!0});return n}}),N=e=>{y(t=>({...t??m,...e}))},P=e=>{N({daysOfWeek:b.daysOfWeek.includes(e)?b.daysOfWeek.filter(t=>t!==e):[...b.daysOfWeek,e].sort((e,t)=>e-t)})},F=e=>e.split(`,`).map(e=>parseInt(e.trim(),10)).filter(e=>!isNaN(e)&&e>=1&&e<=31);return o?(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,T.jsx)(f,{className:`h-4 w-4 animate-spin`}),`Loading update window settings...`]}):p?(0,T.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--system-negative-strong)]`,children:`Failed to load update window policy. Refresh the page to try again.`}):(0,T.jsxs)(`div`,{className:`space-y-6`,children:[(0,T.jsx)(l,{checked:b.enabled,onChange:e=>N({enabled:e}),label:`Automatic updates`,helperText:`Update automatically during a configured time window`}),b.enabled&&(0,T.jsxs)(`div`,{className:`space-y-5`,children:[(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-secondary)]`,children:`Frequency`}),(0,T.jsx)(`div`,{className:`max-w-[400px]`,children:(0,T.jsx)(u,{ariaLabel:`Frequency`,value:b.frequency,onChange:e=>{e!==`monthly`&&D(null),N({frequency:e})},items:[{value:`daily`,label:`Daily`},{value:`weekly`,label:`Weekly`},{value:`monthly`,label:`Monthly`}]})})]}),b.frequency===`weekly`&&(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-secondary)]`,children:`Day(s) of week`}),(0,T.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:E.map(([e,t])=>(0,T.jsx)(r,{variant:`outlined`,size:`compact`,active:b.daysOfWeek.includes(t),onClick:()=>P(t),children:e},t))})]}),b.frequency===`monthly`&&(0,T.jsx)(c,{label:`Day(s) of month`,type:`text`,value:j,onChange:e=>D(e.target.value),onBlur:e=>{let t=F(e.target.value);N({daysOfMonth:t}),D(t.join(`, `))},placeholder:`e.g. 1, 15`,helperText:`Comma-separated day numbers (1–31)`,className:`w-48`}),(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsxs)(`label`,{className:`block text-body-small-default text-[var(--content-secondary)]`,children:[`Update window`,S?` (${S})`:``]}),(0,T.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,T.jsx)(c,{type:`time`,value:b.windowStart,onChange:e=>N({windowStart:e.target.value})}),(0,T.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`to`}),(0,T.jsx)(c,{type:`time`,value:b.windowEnd,onChange:e=>N({windowEnd:e.target.value})})]})]})]}),(0,T.jsx)(r,{variant:`primary`,leftIcon:M.isPending?(0,T.jsx)(f,{className:`animate-spin`}):void 0,onClick:async()=>{let n=b.frequency===`monthly`&&C!==null?F(C):b.daysOfMonth;try{await M.mutateAsync({enabled:b.enabled,timezone:`UTC`,schedule:{frequency:b.frequency,days_of_week:b.frequency===`weekly`?b.daysOfWeek:[],days_of_month:b.frequency===`monthly`?n:[],window:{start:O(b.windowStart),end:O(b.windowEnd)}}}),d.success(`Auto-update policy saved.`),y(null),D(null),t.invalidateQueries({queryKey:_({path:{id:e}})})}catch{d.error(`Failed to save policy. Please try again.`)}},disabled:M.isPending||!x,children:`Save policy`})]})}function M(){let{assistant:e,healthz:n}=C(),r=y({platformHostedOnly:!0}),a=e?.is_local?null:e,o=x(),c=i(),u=n?.capabilities?.memoryOptOut===!0,{data:f}=s({...p({path:{assistant_id:o}}),staleTime:3e4,enabled:u}),g=m({onSuccess:e=>{h(c,{path:{assistant_id:o}},e)}}),_=f?.memory?.enabled!==!1,v=async e=>{try{await g.mutateAsync({path:{assistant_id:o},body:{memory:{enabled:e}}}),d.success(e?`Memory enabled.`:`Memory disabled.`)}catch(e){t(e,{context:`settings-memory-toggle`}),d.error(`Failed to update memory setting.`)}};return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[r===`full`&&a&&(0,T.jsx)(S,{title:`Update Window`,subtitle:`Configure when automatic updates are applied.`,children:(0,T.jsx)(j,{assistantId:a.id})}),r===`disabled`&&(0,T.jsx)(S,{title:`Update Window`,subtitle:`Configure when automatic updates are applied.`,children:(0,T.jsx)(b,{children:`Log in to the Vellum platform to manage update window policy.`})}),u?(0,T.jsx)(S,{title:`Memory`,subtitle:`Let your assistant remember information from past conversations. Turning this off also pauses memory consolidation.`,accessory:(0,T.jsx)(l,{checked:_,onChange:e=>void v(e),"aria-label":`Enable memory`,disabled:g.isPending}),compactAccessory:!0}):null]})}export{M as AdvancedPage};
|
|
@@ -0,0 +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{r as i,t as a}from"./capture-error-BaKOqBjF.js";import{t as o}from"./react-DJZBPgpf.js";import{t as s}from"./button-BvHa6F59.js";import{d as c,h as l}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{n as u}from"./QueryClientProvider-DgWA3A3c.js";import{t as d}from"./useMutation-D3WkZnYg.js";import{t as f}from"./jsx-runtime-B-mvcaJS.js";import{t as p}from"./useQuery-cVuP8q1x.js";import{t as m}from"./typography-COqg6o2z.js";import{t as h}from"./dropdown-SUNHYFiy.js";import{t as g}from"./confirm-dialog-BtxNY4WU.js";import{t as _}from"./notice-BhqKj_VM.js";import{t as v}from"./tag-64Evw5MO.js";import{t as y}from"./input-BLN3wmw2.js";import{t as b}from"./toggle-zADptotB.js";import{n as x}from"./stat-square-zBHENXcL.js";import{t as S}from"./modal-CH2iwSBx.js";import{n as C}from"./toast-VJ6jFKB9.js";import{t as w}from"./createLucideIcon-D8roAprb.js";import{t as T}from"./check-DwLoiFa9.js";import{t as E}from"./circle-alert-BB_iJtM8.js";import{t as D}from"./circle-check-Cwv8JCfw.js";import{n as O,t as k}from"./domain-field-BGp08c4L.js";import{t as A}from"./external-link-h3UAe8eX.js";import{t as j}from"./info-B4DDA6uP.js";import{t as M}from"./loader-circle-cYXxWP5B.js";import{t as N}from"./triangle-alert-DqPPHRPD.js";import{In as P,Mt as F,in as I,jt as L,nt as ee}from"./sdk.gen-CC1iYdd0.js";import{R,c as z,d as te,ft as ne,kt as B,l as V,u as H,wt as U,z as W}from"./react-query.gen-BeTpj_Sy.js";import{r as G}from"./api-errors-B-g6gvNv.js";import{a as re}from"./routes-Dzl0kj5j.js";import{t as K}from"./use-is-org-ready-DLZpD311.js";import{t as q}from"./assistant-identity-store-ESeBny_J.js";import{t as ie}from"./assistant-feature-flag-store-Ceb6N94N.js";import{c as ae,d as oe,et as se,f as ce,g as le,h as ue,l as de,m as fe,o as pe,p as me,s as he,u as ge,v as _e,y as ve}from"./react-query.gen-breoeUVK.js";import{$n as J,Cr as Y,Gi as ye,Ir as be,Jr as xe,Qn as Se,Sr as Ce,Tr as we,Xn as Te,Yn as Ee,Zn as De,_ as Oe,_r as ke,ar as Ae,b as je,br as Me,cr as Ne,dr as Pe,er as Fe,fr as Ie,gr as Le,hr as Re,in as ze,ir as Be,lr as Ve,mr as He,nr as Ue,or as We,pr as Ge,rr as Ke,sr as qe,tr as Je,ur as Ye,v as Xe,vr as Ze,wn as Qe,wr as $e,x as et,xr as tt,y as nt,yr as rt}from"./index-3zpPFBeR.js";import{t as X}from"./use-active-assistant-id-jfqnc4T7.js";import{t as it}from"./detail-card-5TPdhuZN.js";import{t as at}from"./environment-store-B5EGAqzg.js";var ot=w(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),Z=e(o(),1),Q=f();function st({mode:e,onChange:t}){return(0,Q.jsx)(`div`,{className:`max-w-[280px]`,children:(0,Q.jsx)(x,{ariaLabel:`Service mode`,value:e,onChange:t,items:[{value:`managed`,label:`Managed`},{value:`your-own`,label:`Your Own`}]})})}function ct({id:e,title:t,subtitle:n,mode:r,onModeChange:i,children:a}){return(0,Q.jsxs)(it,{id:e,title:t,subtitle:n,accessory:(0,Q.jsx)(st,{mode:r,onChange:i}),children:[(0,Q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)]`}),(0,Q.jsx)(`div`,{className:`mt-4`,children:a})]})}function $({onClick:e,disabled:t}){return(0,Q.jsx)(s,{onClick:e,disabled:t,children:`Save`})}function lt({onClick:e,filled:t=!1}){return(0,Q.jsx)(s,{variant:t?`danger`:`dangerGhost`,onClick:e,children:`Reset`})}function ut({id:e,title:t,subtitle:n,children:r}){return(0,Q.jsxs)(it,{id:e,title:t,subtitle:n,children:[(0,Q.jsx)(`div`,{className:`h-px bg-[var(--surface-active)]`}),(0,Q.jsx)(`div`,{className:`mt-4`,children:r})]})}function dt({guide:e}){return(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(j,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-positive-strong)]`}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Q.jsx)(`span`,{children:e.description}),(0,Q.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[e.linkLabel,(0,Q.jsx)(A,{className:`h-3 w-3`})]})]})]})}function ft({status:e,message:t,isLoading:n}){return n?(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2.5 py-0.5 text-body-small-default text-[var(--content-quiet)]`,children:[(0,Q.jsx)(M,{className:`h-3 w-3 animate-spin`}),`Checking domain…`]}):e?e===`verified`?(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-positive-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-positive-strong)]`,title:`DNS records have been verified. Your domain is ready to send and receive email.`,children:[(0,Q.jsx)(T,{className:`h-3 w-3`}),`Domain verified`]}):e===`pending`||e===`not_started`?(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-mid-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-mid-strong)]`,title:`DNS records have been provisioned. Waiting for the email provider to verify them — this usually takes a few minutes.`,children:[(0,Q.jsx)(ye,{className:`h-3 w-3`}),`Verifying domain…`]}):(0,Q.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--system-negative-weak)] px-2.5 py-0.5 text-body-small-default text-[var(--system-negative-strong)]`,title:`Domain verification failed. DNS records may not have propagated correctly. You could try releasing and re-registering the domain.`,children:[(0,Q.jsx)(E,{className:`h-3 w-3`}),`Verification failed`]}):(0,Q.jsx)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2.5 py-0.5 text-body-small-default text-[var(--content-quiet)]`,title:`Unable to retrieve domain verification status.`,children:`Unknown status`})}var pt=`__custom__`;function mt(e){return e?!!(e.profile||e.provider||e.model):!1}function ht(e,t){let n=mt(e);return n===mt(t)?n?(e?.profile??null)===(t?.profile??null)&&(e?.provider??null)===(t?.provider??null)&&(e?.model??null)===(t?.model??null):!0:!1}function gt({id:e,displayName:t,description:n,defaultProfileLabel:r,draft:i,profileOptions:a,onDraftChange:o,onToggle:s}){let c=mt(i),l=!i||!c?``:i.provider||i.model?pt:i.profile??``,u=l===pt,d=tt.find(e=>e===i?.provider)??tt[0],f=$e(d).map(e=>({value:e.id,label:e.displayName})),p=!!i?.provider&&!i?.model;function m(t){if(t===`__custom__`){let t=tt[0];o(e,{profile:null,provider:t,model:Y(t)??``})}else t===``?o(e,null):o(e,{profile:t,provider:null,model:null})}function g(t){let n=Y(t)??``;o(e,{...i??{},profile:null,provider:t,model:n})}function _(t){o(e,{...i??{},model:t})}return(0,Q.jsxs)(`div`,{className:`rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] p-3`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,Q.jsx)(`p`,{className:`text-body-medium-default font-medium text-[var(--content-default)]`,children:t}),n&&(0,Q.jsxs)(`p`,{className:`mt-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:[n,r&&(0,Q.jsxs)(`span`,{className:`ml-1.5 text-body-small-default text-[var(--content-tertiary)] opacity-60`,children:[`· Default: `,r]})]})]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[c&&(0,Q.jsx)(h,{value:l,onChange:m,options:a,className:`w-44`,menuMinWidth:280,menuAlign:`end`}),(0,Q.jsx)(b,{checked:c,onChange:t=>s(e,t),"aria-label":`Override ${t}`})]})]}),c&&u&&(0,Q.jsxs)(`div`,{className:`mt-3 space-y-2 border-t border-[var(--border-base)] pt-3`,children:[(0,Q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,Q.jsxs)(`div`,{className:`flex-1`,children:[(0,Q.jsx)(`label`,{className:`mb-1 block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:d??``,onChange:g,options:tt.map(e=>({value:e,label:Ce[e]??e}))})]}),(0,Q.jsxs)(`div`,{className:`flex-1`,children:[(0,Q.jsx)(`label`,{className:`mb-1 block text-body-small-default text-[var(--content-tertiary)]`,children:`Model`}),(0,Q.jsx)(h,{value:i?.model??``,onChange:_,options:f})]})]}),p&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:`Pick a model`})]})]})}function _t({isOpen:e,onClose:t,assistantId:n}){let r=(0,Z.useRef)(!1);return(0,Q.jsx)(S.Root,{open:e,onOpenChange:e=>{!e&&!r.current&&t()},children:e?(0,Q.jsx)(vt,{assistantId:n,onClose:t,onSavingChange:e=>{r.current=e}}):null})}function vt({assistantId:e,onClose:t,onSavingChange:n}){let r=u(),{data:i}=p({...z({path:{assistant_id:e}}),staleTime:3e4}),o=(0,Z.useMemo)(()=>i?.llm?.profiles??{},[i?.llm?.profiles]),c=(0,Z.useMemo)(()=>i?.llm?.profileOrder??[],[i?.llm?.profileOrder]),l=(0,Z.useMemo)(()=>i?.llm?.callSites??{},[i?.llm?.callSites]),d=(0,Z.useMemo)(()=>Ve(o,c),[o,c]),f=B({onSuccess:t=>{H(r,{path:{assistant_id:e}},t)}}),[m,h]=(0,Z.useState)(``),[_,v]=(0,Z.useState)({}),[b,x]=(0,Z.useState)(!1),[w,T]=(0,Z.useState)(!1),E=ie.use.analyzeConversation(),{data:D,isLoading:O,isError:k,refetch:A}=p({...te({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4,refetchOnWindowFocus:!1}),j=(0,Z.useMemo)(()=>{let e=(D?.callSites??[]).filter(e=>e.id!==`mainAgent`);return E||(e=e.filter(e=>e.id!==`analyzeConversation`)),e},[D,E]),N=!O&&!k&&!!D&&!!i,P=(0,Z.useMemo)(()=>j.map(e=>e.id),[j]),F=(0,Z.useMemo)(()=>{if(!N)return{};let e={};for(let t of P)if(t in _)e[t]=_[t];else{let n=l[t];e[t]=n?{...n}:{}}return e},[N,P,l,_]),I=(0,Z.useMemo)(()=>new Set(P),[P]),L=(0,Z.useMemo)(()=>Object.entries(l).some(([e,t])=>I.has(e)&&(t?.profile!=null||t?.provider!=null||t?.model!=null)),[l,I]),ee=(0,Z.useMemo)(()=>{if(!N)return!1;for(let e of Object.keys(F))if(!ht(F[e],l[e]))return!0;return!1},[N,F,l]),R=(0,Z.useMemo)(()=>Object.values(F).some(e=>mt(e)&&!!e?.provider&&!e?.model),[F]),ne=(0,Z.useCallback)(e=>[...je(d,[e]).map(e=>({value:e.name,label:Xe(e)})),{value:pt,label:`Custom`}],[d]),V=(0,Z.useMemo)(()=>{if(!m.trim())return j;let e=m.toLowerCase();return j.filter(t=>(t.displayName??``).toLowerCase().includes(e)||(t.description??``).toLowerCase().includes(e)||(t.domain??``).toLowerCase().includes(e))},[j,m]),U=(0,Z.useMemo)(()=>{if(!D)return[];let e=D.domains.map(e=>e.id),t=new Map(D.domains.map(e=>[e.id,e])),n=[];for(let r of e){let e=V.filter(e=>e.domain===r);e.length>0&&n.push({domain:t.get(r),sites:e})}let r=new Set(e),i=V.filter(e=>!r.has(e.domain));return i.length>0&&n.push({domain:{id:`other`,displayName:`Other`},sites:i}),n},[D,V]),W=(0,Z.useCallback)((e,t)=>{v(n=>({...n,[e]:t}))},[]),G=(0,Z.useCallback)((e,t)=>{if(!t){v(t=>({...t,[e]:null}));return}let n=nt(d,j.find(t=>t.id===e)?.defaultProfile);if(n)v(t=>({...t,[e]:{profile:n}}));else{let t=tt[0],n=Y(t)??``;v(r=>({...r,[e]:{provider:t,model:n}}))}},[j,d]),re=(0,Z.useCallback)(async()=>{x(!0),n?.(!0);try{let n={};for(let e of Object.keys(F)){let t=F[e]??null;n[e]=mt(t)?{profile:t?.profile??null,provider:t?.provider??null,model:t?.model??null}:null}await f.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),C.success(`Overrides saved.`)}catch(e){C.error(`Failed to save overrides. Please try again.`),a(e,{context:`call_site_overrides_save`})}finally{x(!1),n?.(!1)}},[F,t,f,n,e]),K=(0,Z.useCallback)(async()=>{x(!0),n?.(!0);try{let n={};for(let e of Object.keys(F))n[e]=null;await f.mutateAsync({path:{assistant_id:e},body:{llm:{callSites:n}}}),t(),C.success(`Overrides reset.`)}catch(e){C.error(`Failed to reset overrides. Please try again.`),a(e,{context:`call_site_overrides_reset`})}finally{x(!1),n?.(!1)}},[F,t,f,n,e]);return(0,Q.jsxs)(S.Content,{size:`lg`,hideCloseButton:!0,children:[(0,Q.jsxs)(S.Header,{children:[(0,Q.jsx)(S.Title,{children:`Action Overrides`}),(0,Q.jsx)(S.Description,{children:`Customize which model profile specific actions should use. Uses your default profile if no override is set.`})]}),(0,Q.jsxs)(S.Body,{children:[(0,Q.jsx)(`div`,{className:`mb-4`,children:(0,Q.jsx)(y,{type:`search`,value:m,onChange:e=>h(e.target.value),placeholder:`Search actions…`,leftIcon:(0,Q.jsx)(xe,{className:`h-4 w-4`}),fullWidth:!0})}),O&&(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Q.jsx)(M,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`})}),k&&(0,Q.jsxs)(`div`,{className:`flex flex-col items-center gap-3 py-12 text-center`,children:[(0,Q.jsx)(`p`,{className:`text-body-medium-default text-[var(--content-default)]`,children:`Couldn't load actions`}),(0,Q.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Make sure your assistant is running`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>void A(),children:`Retry`})]}),!O&&!k&&D&&(0,Q.jsx)(`div`,{className:`space-y-4`,children:U.length===0?(0,Q.jsx)(`p`,{className:`py-8 text-center text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No actions match your search.`}):U.map(({domain:e,sites:t})=>(0,Q.jsxs)(`div`,{children:[(0,Q.jsx)(`p`,{className:`mb-2 text-body-small-default font-semibold uppercase tracking-wider text-[var(--content-tertiary)]`,children:e.displayName}),(0,Q.jsx)(`div`,{className:`space-y-1`,children:t.map(e=>{let t=(()=>{let t=F[e.id]??null;return!t||!mt(t)?``:t.provider||t.model?`__custom__`:t.profile??``})(),n=e.defaultProfile?d.find(t=>t.name===e.defaultProfile)?.label??e.defaultProfile:null;return(0,Q.jsx)(gt,{id:e.id,displayName:e.displayName,description:e.description,defaultProfileLabel:n,draft:F[e.id]??null,profileOptions:ne(t===``||t===`__custom__`?null:t),onDraftChange:W,onToggle:G},e.id)})})]},e.id))})]}),(0,Q.jsxs)(S.Footer,{children:[L&&(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>T(!0),disabled:b||!N,tintColor:`var(--system-negative-strong)`,className:`mr-auto`,children:`Reset to Defaults`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:t,disabled:b,children:`Cancel`}),(0,Q.jsx)(s,{variant:`primary`,size:`compact`,onClick:()=>void re(),disabled:!ee||R||b,children:b?(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin`}):`Save`})]}),(0,Q.jsx)(g,{open:w,title:`Reset to Defaults`,message:`Every task override will be reset and will follow your active profile. This cannot be undone.`,confirmLabel:`Reset to Defaults`,destructive:!0,onConfirm:()=>{T(!1),K()},onCancel:()=>T(!1)})]})}function yt({blocked:e,availableReplacements:t,replacement:n,onReplacementChange:r,error:i,saving:a,onClose:o,onConfirm:c}){let l=``;if(e){let t=e.label||e.name;l=e.isActive&&e.callSiteIds.length>0?`"${t}" is the active profile and is used by ${e.callSiteIds.length} call site(s). Pick a replacement profile.`:e.isActive?`"${t}" is the active profile. Pick a different active profile before deleting, or select a replacement below.`:`"${t}" is used by ${e.callSiteIds.length} call site(s). Select a replacement profile to reassign them before deleting.`}return(0,Q.jsx)(S.Root,{open:e!==null,onOpenChange:e=>{e||o()},children:(0,Q.jsxs)(S.Content,{size:`sm`,children:[(0,Q.jsx)(S.Header,{children:(0,Q.jsx)(S.Title,{children:`Can't Delete Profile`})}),(0,Q.jsxs)(S.Body,{className:`space-y-4`,children:[(0,Q.jsx)(m,{variant:`body-medium-default`,as:`p`,children:l}),e&&e.callSiteIds.length>0&&(0,Q.jsx)(`ul`,{className:`space-y-1 pl-1`,children:e.callSiteIds.map(e=>(0,Q.jsxs)(`li`,{className:`text-body-small-default text-(--content-secondary)`,children:[`• `,(0,Q.jsx)(`code`,{children:e})]},e))}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Replacement profile`}),(0,Q.jsx)(h,{"aria-label":`Replacement profile`,value:n,onChange:r,options:[{value:``,label:`Select a replacement…`},...t.map(e=>({value:e.name,label:e.label??e.name}))]})]}),i&&(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:i})]}),(0,Q.jsxs)(S.Footer,{children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:o,children:`Cancel`}),(0,Q.jsx)(s,{variant:`primary`,size:`compact`,disabled:!n||a,onClick:c,children:a?`Saving…`:`Reassign and Delete`})]})]})})}function bt(e,t){if(e){let n=$e(e).find(e=>e.id===t);if(n)return n.displayName}let n=t.lastIndexOf(`/`);return n>=0?t.slice(n+1):t}function xt(e){let t=[];e.description&&t.push(e.description);let n=[];if(e.model&&n.push(bt(e.provider,e.model)),e.provider){let t=Ce[e.provider]??e.provider;n.push(`hosted by ${t}`)}return n.length>0&&t.push(n.join(` `)),t.join(` – `)}function St({profile:e,isDragging:t,dropTarget:n,isDeleting:r,deleteError:i,isToggling:a,onDragStart:o,onDragEnd:c,onDragOver:l,onDragLeave:u,onDrop:d,onEditClick:f,onDeleteClick:p,onStatusToggle:h}){let g=e.source===`managed`,_=e.status!==`disabled`;return(0,Q.jsxs)(`div`,{className:`relative`,children:[n?.name===e.name&&!n.after&&(0,Q.jsx)(`div`,{className:`mx-0 h-0.5 rounded-full bg-[var(--border-active)]`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg pr-2 py-2${t?` opacity-50`:``}`,draggable:!g,onDragStart:o,onDragEnd:c,onDragOver:l,onDragLeave:u,onDrop:d,children:[(0,Q.jsx)(ot,{className:`h-4 w-4 shrink-0 ${g?`invisible`:`cursor-grab text-[var(--content-tertiary)]`}`}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1${_?``:` opacity-55`}`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(m,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),g&&(0,Q.jsx)(v,{tone:`positive`,title:`Managed by Platform — auth is locked, but you can rename or disable this profile.`,children:`Platform`})]}),e.description||e.model||e.provider?(0,Q.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:xt(e)}):null]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,Q.jsx)(`div`,{className:`flex shrink-0 items-center`,title:_?`Active — toggle to hide from pickers`:`Disabled — toggle to show in pickers`,children:(0,Q.jsx)(b,{checked:_,onChange:e=>h(e),disabled:a,"aria-label":`${_?`Disable`:`Enable`} ${e.label??e.name}`})}),(0,Q.jsxs)(`div`,{className:`flex w-[92px] items-center justify-end gap-2`,children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:f,children:g?`View`:`Edit`}),(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(be,{}),"aria-label":`Delete ${e.label??e.name}`,disabled:g||r,title:g?`Managed profiles cannot be deleted`:void 0,onClick:p,tintColor:`var(--system-negative-strong)`})]})]})]}),n?.name===e.name&&n.after&&(0,Q.jsx)(`div`,{className:`mx-0 h-0.5 rounded-full bg-[var(--border-active)]`}),i?(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:i}):null]})}function Ct({isOpen:e,assistantId:t,onClose:n}){let r=u(),{data:i}=p({...z({path:{assistant_id:t}}),staleTime:3e4}),o=(0,Z.useMemo)(()=>i?.llm?.profiles??{},[i?.llm?.profiles]),s=(0,Z.useMemo)(()=>i?.llm?.profileOrder??[],[i?.llm?.profileOrder]),c=i?.llm?.activeProfile??null,l=i?.llm?.callSites??{},d=(0,Z.useMemo)(()=>Ve(o,s),[o,s]),f=B({onSuccess:e=>{H(r,{path:{assistant_id:t}},e)}}),[m,h]=(0,Z.useState)(!1),[g,_]=(0,Z.useState)(null),{data:v}=p({...R({path:{assistant_id:t}}),enabled:e}),y=v?.connections,b=Object.keys(o);async function x(e,n,r){let i=r?.mode??`replace`,c=!(e in o);if(i===`merge`&&!c){await f.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:n}}}}),h(!1),_(null);return}let l={profiles:{[e]:n}};if(c&&(l.profileOrder=s.includes(e)?s:[...s,e]),c)await f.mutateAsync({path:{assistant_id:t},body:{llm:l}});else{let n=o[e];await f.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:null}}}});try{await f.mutateAsync({path:{assistant_id:t},body:{llm:l}})}catch(r){throw a(r,{context:`settings-ai-profile-edit-recreate`}),n!=null&&await f.mutateAsync({path:{assistant_id:t},body:{llm:{profiles:{[e]:n}}}}).catch(()=>{}),r}}c&&C.success(`Profile "${n.label??e}" created`),h(!1),_(null)}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(S.Root,{open:e,onOpenChange:e=>{e||n()},children:e?(0,Q.jsx)(wt,{assistantId:t,profiles:o,profileOrder:s,orderedProfiles:d,activeProfile:c,callSiteOverrides:l,onClose:n,onEditClick:e=>{_(e),h(!0)},onNewClick:()=>{_(null),h(!0)}}):null}),(0,Q.jsx)(Ee,{isOpen:m,mode:g?g.source===`managed`?`view`:`edit`:`create`,profileName:g?.name,initialValues:g??void 0,existingNames:b,connections:y,assistantId:t,onSave:x,onCancel:()=>{h(!1),_(null)}})]})}function wt({assistantId:e,profiles:t,profileOrder:n,orderedProfiles:r,activeProfile:i,callSiteOverrides:o,onClose:c,onEditClick:l,onNewClick:d}){let f=u(),p=B({onSuccess:t=>{H(f,{path:{assistant_id:e}},t)}}),[h,g]=(0,Z.useState)({}),[_,v]=(0,Z.useState)({}),[y,b]=(0,Z.useState)(new Set),[x,C]=(0,Z.useState)(null),[w,T]=(0,Z.useState)(null),[E,D]=(0,Z.useState)(null),[O,k]=(0,Z.useState)(null),A=(0,Z.useRef)(null),j=(0,Z.useRef)(null),[M,N]=(0,Z.useState)(null),[P,F]=(0,Z.useState)(null),[I,L]=(0,Z.useState)(``),[ee,R]=(0,Z.useState)(!1),z=(0,Z.useMemo)(()=>r,[r]);async function te(n,r){if(y.has(n.name))return!1;b(e=>new Set(e).add(n.name)),C(null);let i=r?`active`:`disabled`;if(!t[n.name])return b(e=>{let t=new Set(e);return t.delete(n.name),t}),!1;try{return await p.mutateAsync({path:{assistant_id:e},body:{llm:{profiles:{[n.name]:{status:i}}}}}),!0}catch(e){return a(e,{context:`settings-ai-profile-toggle`}),C(`Couldn't update "${n.label??n.name}". Please try again.`),!1}finally{b(e=>{let t=new Set(e);return t.delete(n.name),t})}}async function ne(t){v(e=>({...e,[t]:!0})),g(e=>{let n={...e};return delete n[t],n});try{let r=n.filter(e=>e!==t);await p.mutateAsync({path:{assistant_id:e},body:{llm:{profiles:{[t]:null},profileOrder:r}}})}catch(e){a(e,{context:`settings-ai-profile-delete`}),g(e=>({...e,[t]:`Failed to delete profile. Please try again.`}))}finally{v(e=>{let n={...e};return delete n[t],n})}}function V(e){let t=z.find(t=>t.name===e)?.label??e,n=e===i,r=Object.entries(o).filter(([t,n])=>t!==`mainAgent`&&n?.profile===e).map(([e])=>e);if(n||r.length>0){N({name:e,label:t,isActive:n,callSiteIds:r}),L(``),F(null);return}ne(e)}async function U(){if(!M||!I)return;R(!0),F(null);let t={};if(M.isActive&&(t.activeProfile=I),M.callSiteIds.length>0){let e={};for(let t of M.callSiteIds)e[t]={profile:I};t.callSites=e}if(Object.keys(t).length>0)try{await p.mutateAsync({path:{assistant_id:e},body:{llm:t}})}catch(e){a(e,{context:`settings-ai-profile-reassign-delete`}),F(`Failed to reassign references. Please try again.`),R(!1);return}let n=M.name;N(null),R(!1),ne(n)}async function W(t,r){if(t===r.name)return;k(null);let i=n.filter(e=>e!==t),o=i.indexOf(r.name);if(o===-1)return;r.after&&(o+=1);let s=[...i.slice(0,o),t,...i.slice(o)];try{await p.mutateAsync({path:{assistant_id:e},body:{llm:{profileOrder:s}}})}catch(e){a(e,{context:`settings-ai-profile-reorder`}),k(`Failed to reorder profiles. Please try again.`)}}let G=z.filter(e=>e.name!==M?.name&&e.source!==`managed`),re=G.length>0?G:z.filter(e=>e.name!==M?.name);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(S.Content,{size:`md`,children:[(0,Q.jsxs)(S.Header,{children:[(0,Q.jsx)(S.Title,{children:`Model Profiles`}),(0,Q.jsx)(S.Description,{children:`Bundle a provider and model into a named profile. Assign profiles to specific actions or swap between them when chatting.`})]}),(0,Q.jsxs)(S.Body,{children:[z.length===0?(0,Q.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`py-4 text-center text-(--content-tertiary)`,children:`No profiles yet. Create one to get started.`}):(0,Q.jsx)(`div`,{className:`space-y-1`,children:z.map(e=>(0,Q.jsx)(St,{profile:e,isDragging:w===e.name,dropTarget:E,isDeleting:_[e.name]??!1,deleteError:h[e.name],isToggling:y.has(e.name),onDragStart:t=>{A.current=e.name,T(e.name),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`)},onDragEnd:()=>{A.current=null,j.current=null,T(null),D(null)},onDragOver:t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=t.clientY>n.top+n.height/2,i={name:e.name,after:r};j.current=i,D(i)},onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||(j.current=null,D(t=>t?.name===e.name?null:t))},onDrop:e=>{e.preventDefault();let t=A.current,n=j.current;A.current=null,j.current=null,T(null),D(null),t&&n&&W(t,n)},onEditClick:()=>l(e),onDeleteClick:()=>V(e.name),onStatusToggle:t=>void te(e,t)},e.name))}),O&&(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:O}),x&&(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:x})]}),(0,Q.jsxs)(S.Footer,{className:`justify-between`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:d,children:`+ New Profile`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:c,children:`Done`})]})]}),(0,Q.jsx)(yt,{blocked:M,availableReplacements:re,replacement:I,onReplacementChange:L,error:P,saving:ee,onClose:()=>{N(null),F(null)},onConfirm:()=>void U()})]})}function Tt({mode:e,connection:t,assistantId:n,existingNames:r,onSave:i,onCancel:a}){let[o,c]=(0,Z.useState)(e),[l,d]=(0,Z.useState)(void 0),f=o===`managed-edit`,[p,g]=(0,Z.useState)(t?.label??``),[_,v]=(0,Z.useState)(t?.name??``),[b,x]=(0,Z.useState)(t?.provider??`anthropic`),[C,w]=(0,Z.useState)(()=>t?t.auth.type:`platform`),[T,E]=(0,Z.useState)(()=>t?.auth.type===`api_key`?t.auth.credential:t?``:`credential/anthropic/api_key`),[D,O]=(0,Z.useState)(t?.baseUrl??``),[k,A]=(0,Z.useState)(()=>t?.models?t.models.map(e=>e.id).join(`, `):``),[j,M]=(0,Z.useState)(!1),[N,I]=(0,Z.useState)(null),L=b===`openai-compatible`,ee=(0,Z.useMemo)(()=>b&&!Je.includes(b)?[...Je,b]:Je,[b]),{handleLabelChange:R,resetDirty:z}=Se(o,g,v),[te,B]=(0,Z.useState)(``),[V,H]=(0,Z.useState)(!1),U=u(),W=(0,Z.useMemo)(()=>Ke(T),[T]),G=C===`api_key`&&W!==null,{hasStoredCredential:re,isLoading:K}=qe({assistantId:n,credentialKind:`credential`,credentialName:W?`${W.service}:${W.field}`:``,enabled:G}),{credentials:q}=De({assistantId:n,enabled:C===`api_key`});(0,Z.useEffect)(()=>{let e=t?.provider??`anthropic`;g(t?.label??``),v(t?.name??``),x(e),w(t?t.auth.type:`platform`),t?.auth.type===`api_key`?E(t.auth.credential):E(t?``:`credential/${e}/api_key`),z(),I(null),O(t?.baseUrl??``),A(t?.models?t.models.map(e=>e.id).join(`, `):``),B(``),H(!1)},[t,z]);function ie(){c(`create`),d(b===`ollama`?`none`:`api_key`)}let ae=_.trim().length>0;async function oe(){if(ae){M(!0),I(null);try{let e;if(C===`api_key`){let t=T.trim()||`credential/${b}/api_key`,r=te.trim();if(r){H(!0);try{let e=Ke(t);await P({path:{assistant_id:n},body:e?{type:`credential`,name:`${e.service}:${e.field}`,value:r}:{type:`api_key`,name:b,value:r},throwOnError:!0});let i=We(n,`credential`,e?`${e.service}:${e.field}`:``);U.setQueryData(i,!0),U.invalidateQueries({queryKey:ne({path:{assistant_id:n}})})}catch{I(`Failed to save API key. Please try again.`);return}finally{H(!1)}}e={type:`api_key`,credential:t}}else if(C===`oauth_subscription`)if(t?.auth.type===`oauth_subscription`)e=t.auth;else{I(`Use the "Sign in with ChatGPT" button to connect your subscription.`);return}else if(C===`service_account`)if(t?.auth.type===`service_account`)e=t.auth;else{I(`Service account connections cannot be created through this form.`);return}else e=C===`none`?{type:`none`}:{type:`platform`};let r=p.trim()||null,a={auth:e,label:r,...L&&{base_url:D.trim()||null,models:k.trim()?k.split(`,`).map(e=>({id:e.trim()})).filter(e=>e.id):null}},{data:o,response:s}=await F({path:{assistant_id:n,name:t?.name??_.trim()},body:a});if(!s?.ok){I(Ue(s?.status,_.trim()));return}if(!o){I(`Server returned an empty response. Please try again.`);return}i(o)}catch{I(`Failed to save connection. Please try again.`)}finally{M(!1)}}}let se=q.filter(e=>e.service===b),ce=o!==`create`&&t?.auth.type===`api_key`,le=se.length>0||ce,ue=J(`Enter your API key`,re);return o===`create`?(0,Q.jsx)(Te,{variant:`modal`,assistantId:n,existingNames:r,defaultProviderType:b,defaultAuthType:l,onCreated:i,onCancel:a},b):(0,Q.jsxs)(S.Content,{size:`md`,children:[(0,Q.jsxs)(S.Header,{children:[(0,Q.jsx)(S.Title,{children:`Edit Connection`}),(0,Q.jsx)(S.Description,{children:f?`Managed by Vellum — auth is locked, but you can rename "${t?.name}".`:`Editing "${t?.name}".`})]}),(0,Q.jsxs)(S.Body,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsxs)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:[`Display Name`,` `,(0,Q.jsx)(`span`,{className:`text-[var(--content-disabled)]`,children:`(optional)`})]}),(0,Q.jsx)(y,{value:p,onChange:e=>R(e.target.value),placeholder:`e.g. My Anthropic Key`,fullWidth:!0})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Key`}),(0,Q.jsx)(y,{value:_,placeholder:`e.g. anthropic-personal`,disabled:!0,fullWidth:!0})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{"aria-label":`Provider`,value:b,onChange:x,disabled:!0,options:ee.map(e=>({value:e,label:Ce[e]}))})]}),L&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Base URL`}),(0,Q.jsx)(y,{value:D,onChange:e=>O(e.target.value),placeholder:`https://api.example.com/v1`,disabled:f,fullWidth:!0})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Models`}),(0,Q.jsx)(y,{value:k,onChange:e=>A(e.target.value),placeholder:`model-1, model-2`,disabled:f,fullWidth:!0}),(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-[var(--content-tertiary)]`,children:`Comma-separated model identifiers exposed by your endpoint.`})]})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Auth Type`}),(0,Q.jsx)(h,{"aria-label":`Auth type`,value:C,onChange:e=>{w(e),I(null)},disabled:f||b===`ollama`,options:(()=>{let e;return e=b===`ollama`?[`none`]:we(b)?[`api_key`,`platform`]:[`api_key`],C&&!e.includes(C)&&e.push(C),e.map(e=>({value:e,label:Fe[e]}))})()})]}),C===`api_key`&&(0,Q.jsx)(Be,{apiKeyValue:te,onApiKeyChange:B,credential:T,onCredentialChange:E,isAuthLocked:f,isLoadingCredential:K,apiKeyPlaceholder:ue,provider:b,providerCredentials:se,showAdvancedSection:le,onError:I}),C===`oauth_subscription`&&(0,Q.jsx)(Ae,{assistantId:n,onConnected:i}),N&&(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:N})]}),(0,Q.jsxs)(S.Footer,{children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:a,children:`Cancel`}),o===`managed-edit`&&(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:ie,disabled:j||V,children:`Save as New`}),(0,Q.jsx)(s,{variant:`primary`,size:`compact`,disabled:!ae||j||V,onClick:()=>void oe(),children:j?`Saving…`:`Save`})]})]})}function Et(e){switch(e.type){case`api_key`:return`API key · ${e.credential}`;case`oauth_subscription`:return`ChatGPT Subscription`;case`platform`:return`Managed proxy`;case`none`:return`None (local)`;default:return e.type}}function Dt({isOpen:e,assistantId:t,onClose:n}){let[r,i]=(0,Z.useState)(!1),[a,o]=(0,Z.useState)(null),s=u(),{data:c,isLoading:l,isError:d}=p({...R({path:{assistant_id:t}}),enabled:e}),f=(0,Z.useMemo)(()=>c?.connections??[],[c]);function m(e){s.invalidateQueries({queryKey:W({path:{assistant_id:t}})}),i(!1),o(null)}let h=f.map(e=>e.name),g=()=>{i(!1),o(null)};return(0,Q.jsx)(S.Root,{open:e,onOpenChange:e=>{e||(r?g():n())},children:e?r?(0,Q.jsx)(Tt,{mode:a?a.isManaged?`managed-edit`:`edit`:`create`,connection:a??void 0,assistantId:t,existingNames:h,onSave:m,onCancel:g}):(0,Q.jsx)(Ot,{connections:f,loading:l,isError:d,assistantId:t,onClose:n,onEditClick:e=>{o(e),i(!0)},onNewClick:()=>{o(null),i(!0)},onConnectionDeleted:()=>{s.invalidateQueries({queryKey:W({path:{assistant_id:t}})})}}):null})}function Ot({connections:e,loading:t,isError:n,assistantId:r,onClose:i,onEditClick:a,onNewClick:o,onConnectionDeleted:c}){let[l,u]=(0,Z.useState)({}),[d,f]=(0,Z.useState)({});async function p(e){f(t=>({...t,[e]:!0})),u(t=>{let n={...t};return delete n[e],n});try{let{response:t}=await L({path:{assistant_id:r,name:e}});t?.ok||t?.status===404?c(e):t?.status===409?u(t=>({...t,[e]:`Connection is in use by one or more profiles. Remove those references first.`})):u(t=>({...t,[e]:`Failed to delete connection. Please try again.`}))}catch{u(t=>({...t,[e]:`Failed to delete connection. Please try again.`}))}finally{f(t=>{let n={...t};return delete n[e],n})}}return(0,Q.jsxs)(S.Content,{size:`md`,children:[(0,Q.jsxs)(S.Header,{children:[(0,Q.jsx)(S.Title,{children:`Provider Connections`}),(0,Q.jsx)(S.Description,{children:`Manage inference provider connections. Each connection binds a name to a provider and auth configuration.`})]}),(0,Q.jsx)(S.Body,{children:t?(0,Q.jsx)(`div`,{className:`space-y-2 py-2`,children:[1,2,3].map(e=>(0,Q.jsx)(`div`,{className:`h-10 animate-pulse rounded-lg bg-[var(--surface-active)]`},e))}):n?(0,Q.jsx)(m,{variant:`body-medium-default`,as:`p`,className:`py-4 text-center text-(--system-negative-strong)`,children:`Failed to load connections. Please try again.`}):e.length===0?(0,Q.jsx)(m,{variant:`body-medium-lighter`,as:`p`,className:`py-4 text-center text-(--content-tertiary)`,children:`No connections yet. Create one to get started.`}):(0,Q.jsx)(`div`,{className:`space-y-1`,children:e.map(e=>{let t=d[e.name]??!1,n=l[e.name],r=e.isManaged??!1;return(0,Q.jsxs)(`div`,{children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-3 rounded-lg px-2 py-2`,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)(m,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),r&&(0,Q.jsx)(v,{tone:`positive`,title:`Managed by Platform — auth is locked, but you can rename this connection.`,children:`Platform`})]}),(0,Q.jsxs)(m,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:[e.label?`${e.name} · `:``,Ce[e.provider]??e.provider,` · `,Et(e.auth)]})]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,onClick:()=>a(e),children:`Edit`}),(0,Q.jsx)(s,{variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(be,{}),"aria-label":`Delete ${e.name}`,disabled:r||t,title:r?`Managed connections cannot be deleted`:void 0,onClick:()=>void p(e.name),tintColor:`var(--system-negative-strong)`})]})]}),n?(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:n}):null]},e.name)})})}),(0,Q.jsxs)(S.Footer,{className:`justify-between`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:o,children:`+ New Connection`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:i,children:`Done`})]})]})}function kt(e){let[t,n]=(0,Z.useState)(void 0);return(0,Z.useEffect)(()=>{t!==void 0&&e===t.value&&n(void 0)},[e,t]),[t===void 0?e:t.value,(0,Z.useCallback)(e=>n(e===void 0?void 0:{value:e}),[])]}function At(){let e=X(),t=u(),{data:n}=p({...z({path:{assistant_id:e}}),staleTime:3e4}),r=n?.llm?.activeProfile??null,i=n?.llm?.advisorProfile??null,o=n?.llm?.callSites??{},{profiles:c,profileOrder:l}=Oe(n?.llm,e),d=(0,Z.useMemo)(()=>Ve(c,l),[c,l]),f=B({onSuccess:n=>{H(t,{path:{assistant_id:e}},n)}}),[g,_]=kt(r),[v,y]=kt(i),[b,x]=(0,Z.useState)(!1),[S,w]=(0,Z.useState)(!1),[T,E]=(0,Z.useState)(!1),D=(0,Z.useMemo)(()=>je(d,[g]),[d,g]),O=(0,Z.useMemo)(()=>je(d,[v]),[d,v]),k=Object.entries(o).filter(([e,t])=>e!==`mainAgent`&&(t?.profile!=null||t?.provider!=null||t?.model!=null)).length,A=k===1?`1 Override`:k>0?`${k} Overrides`:`Overrides`,j=g!==r,N=v!==i,P=(0,Z.useCallback)(async()=>{try{let t={};j&&(t.activeProfile=g),N&&(t.advisorProfile=v),await f.mutateAsync({path:{assistant_id:e},body:{llm:t}}),C.success(`Saved.`)}catch(e){C.error(`Failed to save. Please try again.`),a(e,{context:`settings-ai-language-model-save`})}},[j,N,g,v,f,e]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(ut,{title:`Language Model`,subtitle:`Configure the LLMs that power your assistant`,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Default Profile`}),(0,Q.jsx)(h,{value:g??``,onChange:e=>{_(e===``?null:e)},placeholder:`Select a default profile…`,options:D.map(e=>({value:e.name,label:Xe(e)}))}),D.length===0?(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-1 text-(--content-tertiary)`,children:`No profiles yet. Click Profiles below to create one.`}):null]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Advisor Profile`}),(0,Q.jsx)(h,{value:v??``,onChange:e=>{y(e===``?null:e)},placeholder:`Select an advisor profile…`,options:O.map(e=>({value:e.name,label:Xe(e)}))}),(0,Q.jsx)(m,{variant:`body-small-default`,as:`p`,className:`mt-1 text-(--content-tertiary)`,children:`Which model your assistant consults for a second opinion`})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>E(!0),children:`Providers`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>x(!0),children:`Profiles`}),(0,Q.jsx)(s,{variant:`outlined`,size:`compact`,onClick:()=>w(!0),children:A})]}),(j||N)&&(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:P,disabled:f.isPending}),f.isPending&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]})}),e&&(0,Q.jsx)(Ct,{isOpen:b,assistantId:e,onClose:()=>x(!1)}),e&&(0,Q.jsx)(_t,{isOpen:S,onClose:()=>w(!1),assistantId:e}),e&&(0,Q.jsx)(Dt,{isOpen:T,assistantId:e,onClose:()=>E(!1)})]})}var jt=`vellum:ai:imageGenMode`,Mt=`vellum:ai:imageGenModel`,Nt=`vellum:ai:webSearchMode`,Pt=`vellum:ai:webSearchProvider`,Ft=`vellum:ai:webFetchProvider`,It=`vellum:ai:emailMode`,Lt=`vellum:ai:emailByoProvider`,Rt=`vellum:voice:ttsProvider`,zt=`vellum:voice:ttsApiKey:`,Bt=`vellum:voice:ttsVoiceId:`,Vt=`vellum:voice:sttProvider`,Ht=`vellum:voice:sttApiKey:`;function Ut(){let e=X();return(0,Z.useCallback)(async(t,n)=>{try{let{data:r}=await P({path:{assistant_id:e},body:{value:n,type:`api_key`,name:t},throwOnError:!0});Ne(r)}catch(e){throw e instanceof Error&&e.message===`No assistant found`?C.error(`Assistant not ready. Please try again.`):C.error(`Failed to save ${t} API key. Please try again.`),a(e,{context:`provision_provider_key`}),e}},[e])}function Wt(){let e=X(),i=u(),{data:o}=p({...z({path:{assistant_id:e}}),staleTime:3e4}),s=B({onSuccess:t=>{H(i,{path:{assistant_id:e}},t)}}),c=Ut(),{serverWebSearchMode:l,serverWebSearchProvider:d}=(0,Z.useMemo)(()=>{if(!o)return{serverWebSearchMode:Ie(n(Nt,`your-own`),`your-own`),serverWebSearchProvider:n(Pt,`inference-provider-native`)};let e=o.services?.[`web-search`];return{serverWebSearchMode:Ie(e?.mode??n(`vellum:ai:webSearchMode`,`your-own`),`your-own`),serverWebSearchProvider:e?.provider||n(`vellum:ai:webSearchProvider`,`inference-provider-native`)}},[o]),[f,m]=(0,Z.useState)(!1),[g,_]=kt(l),[v,b]=kt(d),[x,S]=(0,Z.useState)(``),w=Ge.has(v),{hasStoredCredential:T}=qe({assistantId:e,credentialKind:`api_key`,credentialName:v,enabled:w}),E=x.trim().length>0,D=f||g===`your-own`&&w&&!T&&!E||!(g!==l||(g===`managed`?`inference-provider-native`:v)!==d)&&!E,O=J(Le[v]??`Enter your API key`,T),k=(0,Z.useCallback)(async()=>{m(!0);let t=x.trim(),n=g===`managed`?`inference-provider-native`:v,o=Pe(n),l=g===`your-own`&&w&&t.length>0;try{l&&await c(n,t),await s.mutateAsync({path:{assistant_id:e},body:{services:{"web-search":{mode:g,provider:n}}}}).catch(e=>{throw C.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e})}catch{m(!1);return}m(!1);try{if(r(Nt,g),r(Pt,n),l){o&&r(o,t);let n=We(e,`api_key`,v);i.setQueryData(n,!0),i.invalidateQueries({queryKey:n}),S(``)}C.success(`Web search settings saved.`)}catch(e){a(e,{context:`settings-ai-web-search-persist-local`}),C.error(`Saved, but local preferences could not be written.`)}},[w,s,c,i,e,x,g,v]),A=(0,Z.useCallback)(()=>{let e=Pe(v);e&&t(e),S(``),b(`inference-provider-native`),r(Pt,`inference-provider-native`)},[v,b]);return(0,Q.jsx)(ct,{title:`Web Search`,subtitle:`Configure how your assistant should search the web`,mode:g,onModeChange:e=>_(e),children:g===`managed`?(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Web search is included with managed inference.`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:k,disabled:D}),f&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:v,onChange:b,options:Re.map(e=>({value:e,label:He[e]??e}))})]}),w&&(0,Q.jsx)(y,{label:`API Key`,type:`password`,value:x,onChange:e=>S(e.target.value),placeholder:O,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:k,disabled:D}),f&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),w&&(0,Q.jsx)(lt,{onClick:A,filled:!0})]})]})})}var Gt=`default`;function Kt(){let e=X(),i=u(),{data:o}=p({...z({path:{assistant_id:e}}),staleTime:3e4}),s=B({onSuccess:t=>{H(i,{path:{assistant_id:e}},t)}}),c=Ut(),l=(0,Z.useMemo)(()=>o?o.services?.[`web-fetch`]?.provider||n(`vellum:ai:webFetchProvider`,Gt):n(Ft,Gt),[o]),[d,f]=(0,Z.useState)(!1),[m,g]=kt(l),[_,v]=(0,Z.useState)(``),b=ke.has(m),{hasStoredCredential:x}=qe({assistantId:e,credentialKind:`api_key`,credentialName:m,enabled:b}),S=_.trim().length>0,w=d||b&&!x&&!S||m===l&&!S,T=J(Me[m]??`Enter your API key`,x),E=(0,Z.useCallback)(async()=>{f(!0);let t=_.trim(),n=b&&t.length>0;try{n&&await c(m,t),await s.mutateAsync({path:{assistant_id:e},body:{services:{"web-fetch":{provider:m}}}}).catch(e=>{throw C.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e})}catch{f(!1);return}f(!1);try{if(r(Ft,m),n){let n=Ye(m);n&&r(n,t);let a=We(e,`api_key`,m);i.setQueryData(a,!0),i.invalidateQueries({queryKey:a}),v(``)}C.success(`Web fetch settings saved.`)}catch(e){a(e,{context:`settings-ai-web-fetch-persist-local`}),C.error(`Saved, but local preferences could not be written.`)}},[b,s,c,i,e,_,m]),D=(0,Z.useCallback)(()=>{let e=Ye(m);e&&t(e),v(``),g(Gt),r(Ft,Gt)},[m,g]);return(0,Q.jsx)(ut,{id:`web-fetch`,title:`Web Fetch`,subtitle:`Configure how your assistant reads individual web pages`,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:m,onChange:g,options:rt.map(e=>({value:e,label:Ze[e]??e}))})]}),b&&(0,Q.jsx)(y,{label:`API Key`,type:`password`,value:_,onChange:e=>v(e.target.value),placeholder:T,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:E,disabled:w}),d&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),b&&(0,Q.jsx)(lt,{onClick:D,filled:!0})]})]})})}var qt=[{id:`elevenlabs`,displayName:`ElevenLabs`,subtitle:`High-quality voice synthesis for conversations and read-aloud. Requires an ElevenLabs API key.`,supportsVoiceSelection:!0,apiKeyPlaceholder:`sk_…`,credentialsGuide:{description:`Sign in to ElevenLabs, go to your Profile, and copy your API key.`,url:`https://elevenlabs.io/app/settings/api-keys`,linkLabel:`Open ElevenLabs API Keys`}},{id:`fish-audio`,displayName:`Fish Audio`,subtitle:`Natural-sounding voice synthesis with custom voice cloning. Requires a Fish Audio API key and voice reference ID.`,supportsVoiceSelection:!0,apiKeyPlaceholder:`Enter your Fish Audio API key`,credentialsGuide:{description:`Sign in to Fish Audio, navigate to API Keys in your dashboard, and create a new key.`,url:`https://fish.audio/app/api-keys/`,linkLabel:`Open Fish Audio API Keys`}},{id:`deepgram`,displayName:`Deepgram`,subtitle:`Fast, accurate text-to-speech synthesis. Uses the same API key as Deepgram speech-to-text.`,supportsVoiceSelection:!1,apiKeyPlaceholder:`Enter your Deepgram API key`,credentialsGuide:{description:`Sign in to Deepgram, navigate to your API Keys page, and create or copy an existing key. This is the same key used for speech-to-text.`,url:`https://console.deepgram.com/`,linkLabel:`Open Deepgram Console`}},{id:`xai`,displayName:`xAI`,subtitle:`Text-to-speech from xAI with expressive voices (eve, ara, rex, sal, leo). Requires an xAI API key.`,supportsVoiceSelection:!1,apiKeyPlaceholder:`Enter your xAI API key`,credentialsGuide:{description:`Sign in to the xAI console, navigate to API Keys, and create a new key.`,url:`https://console.x.ai/`,linkLabel:`Open xAI Console`}}],Jt=[{id:`deepgram`,displayName:`Deepgram`,subtitle:`Fast, accurate speech-to-text transcription. Uses the same API key as Deepgram text-to-speech.`,apiKeyPlaceholder:`Enter your Deepgram API key`,credentialsGuide:{description:`Sign in to Deepgram, navigate to your API Keys page, and create or copy an existing key. This is the same key used for text-to-speech.`,url:`https://console.deepgram.com/`,linkLabel:`Open Deepgram Console`}},{id:`openai`,displayName:`OpenAI`,subtitle:`OpenAI Whisper transcription. Requires an OpenAI API key.`,apiKeyPlaceholder:`sk-…`,credentialsGuide:{description:`Sign in to the OpenAI platform, navigate to API Keys, and create a new secret key.`,url:`https://platform.openai.com/api-keys`,linkLabel:`Open OpenAI API Keys`}},{id:`macos-native`,displayName:`macOS Native Dictation`,subtitle:`Apple's on-device speech recognition, running locally through the macOS helper. Works offline and needs no API key.`,requiresNativeDictation:!0,setupWarning:`Requires macOS Dictation to be turned on: open System Settings → Keyboard, then enable Dictation. macOS downloads the on-device speech model the first time Dictation is enabled — without it, voice input produces no transcript.`}],Yt=[{id:`mailgun`,displayName:`Mailgun`,setupSkill:`mailgun-setup`,docsUrl:`https://www.mailgun.com/`},{id:`resend`,displayName:`Resend`,setupSkill:`resend-setup`,docsUrl:`https://resend.com/`}],Xt=[`gemini-3.1-flash-image-preview`,`gemini-3-pro-image-preview`],Zt={"gemini-3.1-flash-image-preview":`Nano Banana 2`,"gemini-3-pro-image-preview":`Nano Banana Pro`};function Qt({assistantId:e,assistantHandle:t,emailRootDomain:n}){let r=u(),i=c(),[o,f]=l(),[m,h]=(0,Z.useState)(``),[v,y]=(0,Z.useState)(!1),[b,x]=(0,Z.useState)(null),[S,w]=(0,Z.useState)(``),[T,E]=(0,Z.useState)(null),[D,A]=(0,Z.useState)(!1),[j,N]=(0,Z.useState)(!1),[P,F]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{v||!t||m||(h(t),y(!0))},[t,v,m]);let I=p({...se(),enabled:!0}),L=I.data,ee=L?.entitlements,R=ee?.managed_email===!0,z=!!ee&&!R,te=!L&&I.isError&&!I.isFetching,ne=p({...ae({path:{assistant_id:e}}),enabled:!z}),B=p({...me({path:{assistant_id:e}}),enabled:!z}),V=ne.data?.results?.[0],H=B.data?.results?.[0],U=V?`${V.subdomain}.${n}`:null,W=p({...ue({path:{assistant_id:e,id:H?.id??``}}),enabled:!!H?.id,refetchOnWindowFocus:!1}),K=p({...ge({path:{assistant_id:e,id:V?.id??``}}),enabled:!!V?.id,refetchInterval:e=>{let t=e.state.data?.status;return t===`verified`||t===`failed`?!1:1e4},refetchOnWindowFocus:!0});(0,Z.useEffect)(()=>{o.get(`release`)!==`1`||!V||H||(N(!0),f(e=>{let t=new URLSearchParams(e);return t.delete(`release`),t},{replace:!0}))},[H,V,o,f]);let q=d(pe()),ie=d(he()),_e=d(oe()),J=d(ce()),Y=(0,Z.useCallback)(()=>{let t={assistant_id:e};r.invalidateQueries({queryKey:de({path:t})}),r.invalidateQueries({queryKey:fe({path:t})}),H?.id&&r.invalidateQueries({queryKey:le({path:{...t,id:H.id}})}),r.invalidateQueries({queryKey:ve()})},[H?.id,e,r]),ye=(0,Z.useCallback)(async()=>{let t=m.trim().toLowerCase();if(!t){x(`Enter a subdomain.`);return}A(!1);try{await q.mutateAsync({path:{assistant_id:e},body:{subdomain:t}}),h(``),x(null),Y(),C.success(`Domain ${t}.${n} registered.`)}catch(e){x(G(e,void 0,`Failed to register domain.`))}},[e,n,Y,q,m]),xe=(0,Z.useCallback)(async()=>{let t=S.trim().toLowerCase();if(!t){E(`Enter an email username.`);return}try{await _e.mutateAsync({path:{assistant_id:e},body:{username:t}}),w(``),E(null),Y(),C.success(`Email address created.`)}catch(e){E(G(e,void 0,`Failed to create email address.`))}},[e,Y,_e,S]),Se=(0,Z.useCallback)(async()=>{if(H?.id){F(!1);try{await J.mutateAsync({path:{assistant_id:e,id:H.id}}),Y(),C.success(`Email address removed.`)}catch(e){a(e,{context:`email_address_delete`}),C.error(`Failed to remove email address.`)}}},[H?.id,e,J,Y]),Ce=(0,Z.useCallback)(async()=>{if(!V?.id)return;if(H){C.error(`Remove the email address first.`);return}N(!1);let t=V.subdomain;try{await ie.mutateAsync({path:{assistant_id:e,id:V.id}}),h(t),Y(),C.success(`Domain released.`)}catch(e){a(e,{context:`email_domain_release`}),C.error(`Failed to release domain.`)}},[H,e,ie,V?.id,V?.subdomain,Y]);if(I.isLoading)return(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin`}),`Checking subscription…`]});if(z)return(0,Q.jsxs)(_,{tone:`info`,icon:(0,Q.jsx)(O,{className:`h-4 w-4`,"aria-hidden":!0}),title:`Get a dedicated email address for your assistant`,actions:(0,Q.jsx)(s,{size:`compact`,onClick:()=>i(`${re.settings.billing}?adjust_plan`),children:`Upgrade to Pro`}),children:[`Pro plans include a managed`,` `,`<your-subdomain>.${n}`,` inbox — no provider setup required. Or switch to `,(0,Q.jsx)(`strong`,{children:`Your Own`}),` to bring an existing provider.`]});let we=te?(0,Q.jsx)(_,{tone:`warning`,title:`Couldn't verify subscription status`,actions:(0,Q.jsx)(s,{size:`compact`,variant:`outlined`,onClick:()=>I.refetch(),children:`Retry`}),children:`We couldn't reach the billing service. The form below assumes managed email is enabled for your org — if it isn't, registering a domain will fail.`}):null;return V?H?(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[we,(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Address`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(`span`,{className:`font-mono text-body-small-default text-[var(--content-default)]`,children:H.address}),(0,Q.jsx)(ft,{status:K.data?.status,message:K.data?.message,isLoading:K.isLoading}),(0,Q.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,Q.jsx)(be,{}),onClick:()=>F(!0),disabled:J.isPending,"aria-label":`Remove email address`})]}),(0,Q.jsx)(g,{open:P,title:`Remove Email Address`,message:(0,Q.jsxs)(Q.Fragment,{children:[`Are you sure you want to remove `,(0,Q.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:H.address}),`? Your assistant will no longer be able to send or receive email at this address.`]}),confirmLabel:`Remove`,destructive:!0,onConfirm:Se,onCancel:()=>F(!1)})]}),W.data?.usage&&(0,Q.jsxs)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:[W.data.usage.sent_today,` /`,` `,W.data.usage.daily_limit,` sent today ·`,` `,W.data.usage.received_today,` received`]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[we,(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Domain`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsxs)(`span`,{className:`font-mono text-body-small-default text-[var(--content-default)]`,children:[V.subdomain,`.`,n]}),(0,Q.jsx)(ft,{status:K.data?.status,message:K.data?.message,isLoading:K.isLoading}),(0,Q.jsx)(s,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,Q.jsx)(be,{}),onClick:()=>N(!0),disabled:ie.isPending,"aria-label":`Release domain`})]}),(0,Q.jsx)(g,{open:j,title:`Release Domain`,message:(0,Q.jsxs)(Q.Fragment,{children:[`Are you sure you want to release `,(0,Q.jsxs)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:[V.subdomain,`.`,n]}),`? The subdomain will become available for others to claim.`]}),confirmLabel:`Release`,destructive:!0,onConfirm:Ce,onCancel:()=>N(!1)})]}),(0,Q.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Email address`}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsxs)(`div`,{className:`flex h-9 min-w-0 flex-1 items-center rounded-md border bg-[var(--field-bg)] text-body-medium-lighter transition-[border-color] duration-150 ${T?`border-[var(--system-negative-strong)]`:`border-[var(--field-border)] focus-within:border-[var(--border-active)]`}`,children:[(0,Q.jsx)(`input`,{value:S,onChange:e=>{w(e.target.value.toLowerCase()),T&&E(null)},placeholder:`hi`,"aria-label":`Email username`,"aria-invalid":!!T,className:`h-full min-w-0 flex-1 bg-transparent pl-3 pr-1 text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none`}),(0,Q.jsxs)(`span`,{className:`shrink-0 pr-3 font-mono text-[var(--content-secondary)]`,children:[`@`,U]})]}),(0,Q.jsx)(s,{onClick:xe,disabled:_e.isPending||!S.trim(),children:_e.isPending?`Creating…`:`Create`})]}),T&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:T})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[we,(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Subdomain`}),(0,Q.jsx)(k,{subdomain:m,onSubdomainChange:e=>{h(e),b&&x(null)},domainSuffix:n,subdomainPlaceholder:`my-assistant`,error:b}),(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Each assistant gets its own subdomain. Lowercase letters, numbers, and hyphens only.`}),(0,Q.jsx)(s,{onClick:()=>A(!0),disabled:q.isPending||!m.trim(),children:q.isPending?`Registering…`:`Register`}),(0,Q.jsx)(g,{open:D,title:`Set Subdomain`,message:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 font-mono text-[0.9em]`,children:m.trim().toLowerCase()||`subdomain`}),` will also become your assistant's public handle. You won't be able to change it once set.`]}),confirmLabel:`Confirm`,onConfirm:ye,onCancel:()=>A(!1)})]})}function $t(){let e=X(),t=K(),{data:o}=p({..._e(),enabled:t}),s=o?.results?.[0]?.handle,c=at.use.emailRootDomain(),l=ze(),[u,d]=(0,Z.useState)(()=>l===`gated`?`your-own`:Ie(n(It,`managed`),`managed`)),[f,m]=(0,Z.useState)(()=>{let e=n(Lt,`resend`);return e===`mailgun`||e===`resend`?e:`resend`}),g=p({queryKey:[`byoEmailCredential`,e,f],queryFn:async()=>{let{data:t}=await ee({path:{assistant_id:e},body:{service:f,field:`api_key`},throwOnError:!0});return t},enabled:u===`your-own`||l===`gated`,staleTime:6e4,retry:i,meta:{errorContext:`byo_email_credential_check`}});(0,Z.useEffect)(()=>{g.error&&a(g.error,{context:`byo_email_credential_check`,bestEffort:!0})},[g.error]);let _=g.data?.hasSecret===!0,v=(0,Z.useCallback)(e=>{d(e),r(It,e)},[]),y=(0,Z.useCallback)(()=>{r(Lt,f),C.success(`Email settings saved.`)},[f]),b=(0,Z.useMemo)(()=>Yt.find(e=>e.id===f)??Yt[0],[f]),x=(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(j,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-positive-strong)]`}),(0,Q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,Q.jsxs)(`span`,{children:[`Configure `,b.displayName,` via the assistant CLI: ask the assistant to run the`,` `,(0,Q.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 text-[12px]`,children:b.setupSkill}),` `,`skill. It walks you through storing the API key, detecting the domain, and (optionally) wiring up an inbound webhook.`]}),(0,Q.jsxs)(`a`,{href:b.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,b.displayName,(0,Q.jsx)(A,{className:`h-3 w-3`})]})]})]}),S=(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:f,onChange:e=>{(e===`mailgun`||e===`resend`)&&m(e)},options:Yt.map(e=>({value:e.id,label:e.displayName}))})]}),_?(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg border border-[var(--system-positive-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-default)]`,children:[(0,Q.jsx)(D,{className:`h-4 w-4 shrink-0 text-[var(--system-positive-strong)]`}),(0,Q.jsxs)(`span`,{children:[b.displayName,` API key configured. To reconfigure, run the`,` `,(0,Q.jsx)(`code`,{className:`rounded bg-[var(--surface-active)] px-1 py-0.5 text-[12px]`,children:b.setupSkill}),` `,`skill.`]})]}),(0,Q.jsxs)(`a`,{href:b.docsUrl,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-body-small-default text-[var(--system-positive-strong)] underline hover:opacity-80`,children:[`Open `,b.displayName,(0,Q.jsx)(A,{className:`h-3 w-3`})]})]}):x,(0,Q.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Q.jsx)($,{onClick:y,disabled:!1})})]});return l===`gated`?(0,Q.jsx)(ut,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,children:S}):(0,Q.jsx)(ct,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,mode:u,onModeChange:v,children:u===`managed`?(0,Q.jsx)(`div`,{className:`space-y-4`,children:l===`disabled`?(0,Q.jsx)(et,{children:`Log in to the Vellum platform to manage email settings.`}):(0,Q.jsx)(Qt,{assistantId:e,assistantHandle:s,emailRootDomain:c})}):S})}function en(){let e=X(),t=u(),{data:i}=p({...z({path:{assistant_id:e}}),staleTime:3e4}),o=B({onSuccess:n=>{H(t,{path:{assistant_id:e}},n)}}),s=Ut(),[c,l]=kt((0,Z.useMemo)(()=>Ie(i?i.services?.[`image-generation`]?.mode??n(`vellum:ai:imageGenMode`,`your-own`):n(jt,`your-own`),`your-own`),[i])),[d,f]=(0,Z.useState)(()=>n(Mt,`gemini-3.1-flash-image-preview`)),[m,g]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(!1),b=(0,Z.useCallback)(async()=>{v(!0);let n=m.trim(),i=c===`your-own`&&n.length>0;try{i&&await s(`gemini`,n),await o.mutateAsync({path:{assistant_id:e},body:{services:{"image-generation":{mode:c}}}}).catch(e=>{throw C.error(`Failed to update assistant configuration. Please try again.`),a(e,{context:`patch_daemon_config`}),e});try{await I({path:{assistant_id:e},body:{modelId:d},throwOnError:!0})}catch(e){throw C.error(`Failed to update image generation model. Please try again.`),a(e,{context:`set_image_gen_model`}),e}finally{t.invalidateQueries({queryKey:V({path:{assistant_id:e}})})}}catch{v(!1);return}v(!1);try{r(jt,c),r(Mt,d),i&&g(``),C.success(`Image generation settings saved.`)}catch(e){a(e,{context:`settings-ai-image-gen-persist-local`}),C.error(`Saved, but local preferences could not be written.`)}},[m,c,d,e,o,s,t]),x=(0,Z.useCallback)(()=>{g(``),f(`gemini-3.1-flash-image-preview`),r(Mt,`gemini-3.1-flash-image-preview`)},[]);return(0,Q.jsx)(ct,{title:`Image Generation`,subtitle:`Configure which model your assistant uses to generate images`,mode:c,onModeChange:e=>l(e),children:c===`managed`?(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Active Model`}),(0,Q.jsxs)(`div`,{className:`flex items-end gap-3`,children:[(0,Q.jsx)(h,{className:`flex-1`,value:d,onChange:f,options:Xt.map(e=>({value:e,label:Zt[e]??e}))}),(0,Q.jsx)($,{onClick:b,disabled:_}),_&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsx)(y,{label:`API Key`,type:`password`,value:m,onChange:e=>g(e.target.value),placeholder:`Enter your Gemini API key`,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Active Model`}),(0,Q.jsx)(h,{value:d,onChange:f,options:Xt.map(e=>({value:e,label:Zt[e]??e}))})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:b,disabled:_}),_&&(0,Q.jsx)(M,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),(0,Q.jsx)(lt,{onClick:x})]})]})})}async function tn(e){let{provider:t,apiKey:n,voiceId:r,text:i}=e;if(n.trim().length===0)return{kind:`error`,message:`Save an API key for this provider first.`};try{return t===`elevenlabs`?await nn(n,r,i):t===`deepgram`?await rn(n,i):t===`fish-audio`?{kind:`unsupported`,message:`Fish Audio TTS is only supported in the desktop app today. Use ElevenLabs or Deepgram to test from the browser.`}:t===`xai`?{kind:`unsupported`,message:`xAI TTS is only supported in the desktop app today. Use ElevenLabs or Deepgram to test from the browser.`}:{kind:`unsupported`,message:`TTS testing for "${t}" is not supported from the browser yet.`}}catch(e){return{kind:`error`,message:e instanceof Error?e.message:`Failed to reach the TTS provider.`}}}async function nn(e,t,n){let r=t.trim();if(r.length===0)return{kind:`error`,message:`Enter and save a Voice ID before testing ElevenLabs.`};let i=await fetch(`https://api.elevenlabs.io/v1/text-to-speech/${encodeURIComponent(r)}?output_format=mp3_44100_128`,{method:`POST`,headers:{"xi-api-key":e,"Content-Type":`application/json`,Accept:`audio/mpeg`},body:JSON.stringify({text:n,model_id:`eleven_turbo_v2_5`})});return i.ok?{kind:`audio`,blob:await i.blob()}:{kind:`error`,message:await an(i,`ElevenLabs rejected the request.`)}}async function rn(e,t){let n=await fetch(`https://api.deepgram.com/v1/speak?model=aura-2-thalia-en`,{method:`POST`,headers:{Authorization:`Token ${e}`,"Content-Type":`application/json`,Accept:`audio/mpeg`},body:JSON.stringify({text:t})});return n.ok?{kind:`audio`,blob:await n.blob()}:{kind:`error`,message:await an(n,`Deepgram rejected the request.`)}}async function an(e,t){try{let n=await e.text();if(n.length===0)return`${t} (HTTP ${e.status})`;try{let e=JSON.parse(n);if(e&&typeof e==`object`&&`detail`in e&&typeof e.detail==`string`)return e.detail;if(e&&typeof e==`object`&&`message`in e&&typeof e.message==`string`)return e.message}catch{}return n.slice(0,200)}catch{return`${t} (HTTP ${e.status})`}}function on(){let e=X(),t=q.use.name()??`your assistant`,i=K(),{data:a}=p({...U({path:{assistant_id:e}}),enabled:i,staleTime:1/0}),o=a?.providers??qt,c=o[0]?.id??`elevenlabs`,[l,u]=(0,Z.useState)(()=>n(Rt,c)),[d,f]=(0,Z.useState)(l),[m,g]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(``),[b,x]=(0,Z.useState)(``),[S,w]=(0,Z.useState)(!1),[T,E]=(0,Z.useState)(!1),D=(0,Z.useMemo)(()=>o.find(e=>e.id===l)??o[0],[l,o]),O=(0,Z.useCallback)(e=>{let t=n(zt+e,``),r=n(Bt+e,``);w(t.length>0),v(r),x(r),g(``)},[]);(0,Z.useEffect)(()=>{O(l)},[l,O]);let k=(0,Z.useMemo)(()=>{let e=l!==d,t=m.trim().length>0,n=_.trim()!==b;return e||t||n},[l,d,m,_,b]),A=(0,Z.useCallback)(()=>{r(Rt,l);let e=m.trim();e.length>0&&(r(zt+l,e),w(!0));let t=_.trim();r(Bt+l,t),f(l),x(t),g(``)},[l,m,_]),j=(0,Z.useCallback)(()=>{r(zt+l,``),w(!1),g(``)},[l]),M=(0,Z.useCallback)(async()=>{E(!0);try{let e=n(zt+l,``),r=m.trim(),i=r.length>0?r:e;if(i.length===0){C.error(`Save an API key for this provider before testing.`);return}let a=n(Bt+l,``),o=_.trim(),s=await tn({provider:l,apiKey:i,voiceId:o.length>0?o:a,text:`Hey! It's ${t}. How does this sound?`});if(s.kind!==`audio`){C.error(s.message);return}let c=URL.createObjectURL(s.blob);try{let e=new Audio(c);await e.play(),await new Promise(t=>{e.onended=()=>t(),e.onerror=()=>t()})}finally{URL.revokeObjectURL(c)}}finally{E(!1)}},[t,m,l,_]),N=S?`•••••••• (Enter a new key to replace)`:D.apiKeyPlaceholder;return(0,Q.jsx)(ut,{title:`Text-to-Speech`,subtitle:D.subtitle,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:l,onChange:u,options:o.map(e=>({value:e.id,label:e.displayName})),"aria-label":`TTS provider`})]}),(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`API Key`}),(0,Q.jsx)(y,{type:`password`,value:m,onChange:e=>g(e.target.value),placeholder:N,fullWidth:!0})]}),D.supportsVoiceSelection&&(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Voice ID`}),(0,Q.jsx)(y,{type:`text`,value:_,onChange:e=>v(e.target.value),placeholder:`Enter a voice ID`,fullWidth:!0})]}),(0,Q.jsx)(dt,{guide:D.credentialsGuide}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(s,{variant:`outlined`,onClick:M,disabled:T,children:T?`Testing…`:`Test`}),(0,Q.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:A,disabled:!k}),S&&(0,Q.jsx)(lt,{onClick:j})]})]})]})})}function sn(){let[e]=(0,Z.useState)(()=>Jt.filter(e=>!e.requiresNativeDictation||Qe())),t=e[0]?.id??`deepgram`,[i,a]=(0,Z.useState)(()=>{let r=n(Vt,t);return e.some(e=>e.id===r)?r:t}),[o,s]=(0,Z.useState)(i),[c,l]=(0,Z.useState)(``),[u,d]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{let i=n(Vt,t);i===`macos-native`&&!e.some(e=>e.id===i)&&r(Vt,t)},[e,t]);let f=(0,Z.useMemo)(()=>e.find(e=>e.id===i)??e[0],[e,i]),p=f.apiKeyPlaceholder!==void 0;(0,Z.useEffect)(()=>{d(n(Ht+i,``).length>0),l(``)},[i]);let m=(0,Z.useMemo)(()=>{let e=i!==o,t=c.trim().length>0;return e||t},[i,o,c]),g=(0,Z.useCallback)(()=>{r(Vt,i);let e=c.trim();e.length>0&&(r(Ht+i,e),d(!0)),s(i),l(``)},[i,c]),_=(0,Z.useCallback)(()=>{r(Ht+i,``),d(!1),l(``)},[i]),v=u?`•••••••• (Enter a new key to replace)`:f.apiKeyPlaceholder;return(0,Q.jsx)(ut,{title:`Speech-to-Text`,subtitle:f.subtitle,children:(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,Q.jsx)(h,{value:i,onChange:a,options:e.map(e=>({value:e.id,label:e.displayName})),"aria-label":`STT provider`})]}),p&&(0,Q.jsxs)(`div`,{className:`space-y-1`,children:[(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`API Key`}),(0,Q.jsx)(y,{type:`password`,value:c,onChange:e=>l(e.target.value),placeholder:v,fullWidth:!0})]}),f.setupWarning&&(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-subtle)] bg-[var(--surface-sunken)] p-3 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(N,{className:`mt-0.5 h-3.5 w-3.5 shrink-0 text-[var(--system-mid-strong)]`}),(0,Q.jsx)(`span`,{children:f.setupWarning})]}),f.credentialsGuide&&(0,Q.jsx)(dt,{guide:f.credentialsGuide}),(0,Q.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,Q.jsx)($,{onClick:g,disabled:!m}),u&&(0,Q.jsx)(lt,{onClick:_})]})]})})}function cn(){return(0,Z.useEffect)(()=>{let e=window.location.hash.slice(1);e&&requestAnimationFrame(()=>{document.getElementById(e)?.scrollIntoView({block:`start`})})},[]),(0,Q.jsxs)(`div`,{className:`space-y-5`,children:[(0,Q.jsxs)(`div`,{className:`flex items-start gap-2 rounded-lg border border-[var(--border-base)] bg-[var(--surface-base)] px-4 py-2.5`,children:[(0,Q.jsx)(j,{className:`mt-0.5 h-4 w-4 shrink-0 text-[var(--content-tertiary)]`}),(0,Q.jsxs)(`p`,{className:`text-body-medium-lighter text-[var(--content-secondary)]`,children:[`Managed services are metered and deducted from your Vellum account balance.`,` `,(0,Q.jsxs)(`a`,{href:`https://www.vellum.ai/docs/pricing`,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 text-[var(--primary-base)] hover:underline`,children:[`View pricing`,(0,Q.jsx)(A,{className:`h-3.5 w-3.5`})]})]})]}),(0,Q.jsx)(At,{}),(0,Q.jsx)(Wt,{}),(0,Q.jsx)(Kt,{}),(0,Q.jsx)($t,{}),(0,Q.jsx)(en,{}),(0,Q.jsx)(on,{}),(0,Q.jsx)(sn,{})]})}export{cn as AiPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Q as e,at as t,c as n}from"./local-mode-
|
|
1
|
+
import{Q as e,at as t,c as n}from"./local-mode-Cez1weue.js";import{c as r}from"./assistant-api-BdlaVxiH.js";import{_ as i,at as a,g as o,h as s,it as c,yt as l}from"./sdk.gen-CC1iYdd0.js";import{i as u,n as d}from"./api-errors-B-g6gvNv.js";import{B as f,C as p,R as m,a as h,i as g,o as _,w as v,z as y}from"./sdk.gen-DSjI3deY.js";async function b(e,t){let{data:n,error:r,response:i}=await p({body:e??{},query:t?{mode:t}:void 0,throwOnError:!1});return d(i,r,`Failed to hatch assistant.`),i.ok?{ok:!0,status:i.status,data:n}:{ok:!1,status:i.status,error:u(r,i)}}async function x(e){if(t()){let e=n();if(e)return{ok:!0,status:200,data:{id:e.assistantId,name:e.name??e.assistantId,status:`active`,is_local:!0,created:e.hatchedAt??``}}}if(e){let{data:t,error:n,response:r}=await f({path:{id:e},throwOnError:!1});return d(r,n,`Failed to get assistant.`),r.ok?{ok:!0,status:r.status,data:t}:{ok:!1,status:r.status,error:u(n,r)}}let r=await v({query:{hosting:`platform`},throwOnError:!1});if(d(r.response,r.error,`Failed to get assistant.`),!r.response.ok)return{ok:!1,status:r.response.status,error:u(r.error,r.response)};let i=r.data?.results??[];if(i.length>0)return{ok:!0,status:r.response.status,data:i[0]};let a=await v({query:{hosting:`local`},throwOnError:!1});if(d(a.response,a.error,`Failed to get assistant.`),a.response.ok){let e=a.data?.results??[];if(e.length>0)return{ok:!0,status:a.response.status,data:e[0]}}return a.response.ok?{ok:!1,status:404,error:{detail:`No assistants found`}}:{ok:!1,status:a.response.status,error:u(a.error,a.response)}}async function S(e){let{data:t,error:n,response:r}=await l({path:{assistant_id:e},throwOnError:!1});return d(r,n,`Failed to get assistant healthz.`),r.ok&&t?{ok:!0,status:r.status,data:t}:{ok:!1,status:r.status,error:u(n,r)}}async function C(e){let{data:t,error:n,response:i}=await a({path:{assistant_id:e},throwOnError:!1});if(d(i,n,`Failed to get assistant disk pressure status.`),i.ok){let e=r.safeParse(t);return e.success?{ok:!0,status:i.status,data:e.data}:{ok:!1,status:i.status,error:u(e.error.message,i)}}return{ok:!1,status:i.status,error:u(n,i)}}async function w(e){let{data:t,error:n,response:i}=await c({path:{assistant_id:e},throwOnError:!1});if(d(i,n,`Failed to acknowledge assistant disk pressure.`),i.ok){let e=r.safeParse(t);return e.success?{ok:!0,status:i.status,data:e.data}:{ok:!1,status:i.status,error:u(e.error.message,i)}}return{ok:!1,status:i.status,error:u(n,i)}}function T(e){let t=e&&typeof e==`object`&&!Array.isArray(e)?e:{};if(Array.isArray(t.backups))return t.backups;let n=t,r=[],i=n.local?.snapshots;if(Array.isArray(i))for(let e of i)r.push({snapshot_name:e.filename,pvc:``,created_at:e.created_at,ready_to_use:!0,backup_type:`scheduled`,path:e.path});if(Array.isArray(n.offsite)){for(let e of n.offsite)if(Array.isArray(e.snapshots))for(let t of e.snapshots)r.push({snapshot_name:t.filename,pvc:``,created_at:t.created_at,ready_to_use:!t.encrypted,backup_type:`scheduled`,path:t.path})}return r}function E(e){let t=e&&typeof e==`object`&&!Array.isArray(e)?e:{};return Array.isArray(t.backups)?t.backups:[]}async function D(t){let n=!e(),[r,i]=await Promise.all([o({path:{assistant_id:t},throwOnError:!1}),n?_({path:{assistant_id:t},throwOnError:!1}):null]);if(d(r.response,r.error,`Failed to list assistant backups.`),!r.response.ok)return{ok:!1,status:r.response.status,error:u(r.error,r.response)};let a=T(r.data);if(i){if(i.response?.ok){let e=E(i.data);return{ok:!0,status:r.response.status,data:[...e,...a]}}if(a.length===0&&i.response)return{ok:!1,status:i.response.status,error:u(i.error,i.response)}}return{ok:!0,status:r.response.status,data:a}}async function O(t){let{data:n,error:r,response:i}=e()?await s({path:{assistant_id:t},throwOnError:!1}):await g({path:{assistant_id:t},throwOnError:!1});if(d(i,r,`Failed to create assistant backup.`),i.ok){let e=n&&typeof n==`object`&&!Array.isArray(n)?n:{};return{ok:!0,status:i.status,data:e}}return{ok:!1,status:i.status,error:u(r,i)}}async function k(t,n){let{data:r,error:a,response:o}=e()?await i({path:{assistant_id:t},body:{path:n.path??n.snapshot_name},throwOnError:!1}):await h({path:{assistant_id:t,snapshot_name:n.snapshot_name},throwOnError:!1});if(d(o,a,`Failed to restore assistant backup.`),o.ok){let e=r&&typeof r==`object`&&!Array.isArray(r)?r:{};return{ok:!0,status:o.status,data:e}}return{ok:!1,status:o.status,error:u(a,o)}}async function A(e){let{data:t,error:n,response:r}=await m({path:{id:e},throwOnError:!1});return d(r,n,`Failed to restart assistant.`),r.ok?{ok:!0,data:t&&typeof t==`object`&&!Array.isArray(t)?t:{}}:{ok:!1,status:r.status,error:u(n,r)}}async function j(e){let{error:t,response:n}=await y({path:{id:e},throwOnError:!1});return d(n,t,`Failed to retire assistant.`),n.ok?{ok:!0}:{ok:!1,status:n.status,error:u(t,n)}}async function M(){let{data:e,error:t,response:n}=await v({query:{hosting:`all`},throwOnError:!1});return d(n,t,`Failed to list assistants.`),n.ok?{ok:!0,status:n.status,data:e?.results??[]}:{ok:!1,status:n.status,error:u(t,n)}}export{S as a,M as c,j as d,C as i,A as l,O as n,b as o,x as r,D as s,w as t,k as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./button-BvHa6F59.js";import{d as r,h as i}from"./chunk-5KNZJZUH-DdS6bb-3.js";import{t as a}from"./jsx-runtime-B-mvcaJS.js";import{t as o}from"./dropdown-SUNHYFiy.js";import{t as s}from"./input-BLN3wmw2.js";import{t as c}from"./is-electron-URCUw74P.js";import{a as l}from"./routes-Dzl0kj5j.js";import{kt as u}from"./index-3zpPFBeR.js";import{n as d,r as f}from"./provider-key-BKR2QTfR.js";var p=e(t(),1),m=[{id:`anthropic`,displayName:`Anthropic`,apiKeyPlaceholder:`sk-ant-api03-...`,docsUrl:`https://console.anthropic.com/settings/keys`,requiresKey:!0},{id:`openai`,displayName:`OpenAI`,apiKeyPlaceholder:`sk-proj-...`,docsUrl:`https://platform.openai.com/api-keys`,requiresKey:!0},{id:`gemini`,displayName:`Google Gemini`,apiKeyPlaceholder:`AIza...`,docsUrl:`https://aistudio.google.com/apikey`,requiresKey:!0},{id:`ollama`,displayName:`Ollama`,apiKeyPlaceholder:null,docsUrl:`https://ollama.com/download`,requiresKey:!1},{id:`fireworks`,displayName:`Fireworks`,apiKeyPlaceholder:`fw_...`,docsUrl:`https://fireworks.ai/account/api-keys`,requiresKey:!0},{id:`openrouter`,displayName:`OpenRouter`,apiKeyPlaceholder:`sk-or-v1-...`,docsUrl:`https://openrouter.ai/keys`,requiresKey:!0},{id:`openai-compatible`,displayName:`OpenAI-compatible`,apiKeyPlaceholder:`Your provider's API key`,docsUrl:null,requiresKey:!0}],h=m[0];function g(e){return m.find(t=>t.id===e)}var _=a();function v(){let e=r(),[t]=i(),a=t.get(`hosting`),v=c(),[y,b]=(0,p.useState)(()=>d()?.provider??h.id),[x,S]=(0,p.useState)(()=>d()?.key??``),C=g(y)??h,w=C.requiresKey,T=!w||x.trim().length>0;return(0,_.jsx)(u,{children:(0,_.jsxs)(`div`,{className:`mx-auto flex w-full max-w-xl flex-col items-center ${v?`min-h-full px-8 pt-21 pb-4 electron-prechat-type`:`px-6 py-16`} text-[var(--content-default)]`,children:[(0,_.jsx)(`h1`,{className:v?`text-title-large`:`text-3xl font-semibold tracking-tight`,style:{animation:`fadeInUp 0.5s ease-out 0.1s both`},children:`Connect a Model Provider`}),(0,_.jsx)(`p`,{className:`text-center text-body-medium-lighter text-[var(--content-tertiary)] ${v?`mt-3.5`:`mt-3`}`,style:{animation:`fadeInUp 0.5s ease-out 0.3s both`},children:`Enter an API key to connect your model provider.`}),(0,_.jsxs)(`div`,{className:`flex w-full flex-col gap-4 ${v?`mt-8`:`mt-10`}`,style:{animation:`fadeInUp 0.5s ease-out 0.4s both`},children:[(0,_.jsxs)(`div`,{className:`flex flex-col ${v?`gap-2`:`gap-1`}`,children:[(0,_.jsx)(`label`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`Provider`}),(0,_.jsx)(o,{"aria-label":`Provider`,value:y,onChange:e=>{let t=g(e);t&&(b(t.id),S(``))},options:m.map(e=>({value:e.id,label:e.displayName}))})]}),w&&(0,_.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,_.jsx)(s,{type:`password`,label:`${C.displayName} API Key`,placeholder:C.apiKeyPlaceholder??`Enter your API key`,value:x,onChange:e=>S(e.target.value),fullWidth:!0}),C.docsUrl&&(0,_.jsxs)(`p`,{className:`self-start text-body-medium-lighter text-[var(--content-tertiary)]`,children:[`Don't have it?`,` `,(0,_.jsx)(`a`,{href:C.docsUrl,target:`_blank`,rel:`noreferrer`,className:`text-[var(--content-default)] underline`,children:`Get an API key here`})]})]})]}),(0,_.jsxs)(`div`,{className:`mt-8 flex w-full flex-col ${v?`gap-2.5`:`gap-2`}`,style:{animation:`fadeInUp 0.5s ease-out 0.5s both`},children:[(0,_.jsx)(n,{variant:`primary`,size:`regular`,fullWidth:!0,disabled:!T,onClick:()=>{T&&(f({provider:y,key:w?x.trim():``}),e(a?`${l.onboarding.privacy}?hosting=${a}`:l.onboarding.privacy))},className:v?void 0:`h-11 text-base`,children:`Continue`}),(0,_.jsx)(n,{variant:`outlined`,size:`regular`,fullWidth:!0,onClick:()=>{e(l.onboarding.hosting)},className:v?void 0:`h-11 text-base`,children:`Back`})]})]})})}export{v as ApiKeyScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./is-electron-
|
|
1
|
+
import{t as e}from"./is-electron-URCUw74P.js";async function t(){return e()?await window.vellum?.app.versionInfo()??null:null}async function n(){e()&&await window.vellum?.app.openWebsite()}export{n,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-
|
|
1
|
+
import{t as e}from"./createLucideIcon-D8roAprb.js";var t=e(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-
|
|
1
|
+
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-BaKOqBjF.js";import{t as n}from"./react-DJZBPgpf.js";import{t as r}from"./button-BvHa6F59.js";import{n as i}from"./QueryClientProvider-DgWA3A3c.js";import{t as a}from"./jsx-runtime-B-mvcaJS.js";import{t as o}from"./card-D9_3ngHI.js";import"./src-Dr68ou95.js";import{n as s}from"./toast-VJ6jFKB9.js";import{t as c}from"./archive-Ct5g6T4N.js";import{t as l}from"./loader-circle-cYXxWP5B.js";import{t as u}from"./triangle-alert-DqPPHRPD.js";import{G as d}from"./sdk.gen-CC1iYdd0.js";import{Kt as f,On as p,Zr as m}from"./index-3zpPFBeR.js";import{t as h}from"./use-active-assistant-id-jfqnc4T7.js";var g=e(n(),1),_=a();function v(e){if(e==null)return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleString(void 0,{month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`,hour12:!0})}function y(){return(0,_.jsx)(o,{children:(0,_.jsxs)(`div`,{className:`flex min-h-[400px] flex-col items-center justify-center px-6 py-16 text-center`,children:[(0,_.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,_.jsx)(c,{className:`h-6 w-6 text-[var(--content-disabled)] dark:text-[var(--content-default)]`})}),(0,_.jsx)(`h2`,{className:`mt-4 text-title-small text-[var(--content-default)]`,children:`No archived conversations`}),(0,_.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Conversations you archive will appear here.`})]})})}function b({conversation:e,isFirst:t,onUnarchive:n,isPending:i}){let a=[v(e.createdAt),e.source??`vellum-assistant`].filter(Boolean).join(` · `),o=e.title&&e.title.trim().length>0?e.title:`Untitled conversation`;return(0,_.jsxs)(`div`,{className:`flex items-center gap-3 py-3 ${t?``:`border-t border-[var(--border-base)]`}`,children:[(0,_.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,_.jsx)(`div`,{className:`truncate text-body-medium-default text-[var(--content-default)]`,children:o}),(0,_.jsx)(`p`,{className:`mt-0.5 truncate text-body-small-default text-[var(--content-tertiary)]`,children:a})]}),(0,_.jsx)(r,{variant:`outlined`,onClick:n,disabled:i,className:`shrink-0`,children:i?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l,{className:`h-4 w-4 animate-spin`}),`Unarchiving`]}):`Unarchive`})]})}function x(){let e=i(),n=h(),{conversations:a,isLoading:c,isError:v,refetch:x}=f(n),[S,C]=(0,g.useState)(null),w=(0,g.useCallback)(async r=>{if(n){C(r);try{await d({path:{assistant_id:n,id:r},throwOnError:!0}),p(e,n)}catch(e){t(e,{context:`archive_settings_unarchive_conversation`}),s.error(`Failed to unarchive conversation.`)}finally{C(null)}}},[n,e]);return c?(0,_.jsx)(`div`,{className:`w-full`,children:(0,_.jsx)(`div`,{className:`flex min-h-[400px] items-center justify-center`,children:(0,_.jsx)(l,{className:`h-6 w-6 animate-spin text-[var(--content-disabled)]`})})}):v?(0,_.jsx)(`div`,{className:`w-full`,children:(0,_.jsx)(o,{children:(0,_.jsxs)(`div`,{className:`flex min-h-[400px] flex-col items-center justify-center px-6 py-16 text-center`,children:[(0,_.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-[var(--system-error-lighter)]`,children:(0,_.jsx)(u,{className:`h-6 w-6 text-[var(--system-error-default)]`})}),(0,_.jsx)(`h2`,{className:`mt-4 text-title-small text-[var(--content-default)]`,children:`Failed to load archived conversations`}),(0,_.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Something went wrong. Please try again.`}),(0,_.jsxs)(r,{variant:`outlined`,onClick:x,className:`mt-4`,children:[(0,_.jsx)(m,{className:`h-4 w-4`}),`Retry`]})]})})}):a.length===0?(0,_.jsx)(`div`,{className:`w-full`,children:(0,_.jsx)(y,{})}):(0,_.jsx)(`div`,{className:`w-full`,children:(0,_.jsx)(o,{noPadding:!0,className:`px-4`,children:a.map((e,t)=>(0,_.jsx)(b,{conversation:e,isFirst:t===0,onUnarchive:()=>{w(e.conversationId)},isPending:S===e.conversationId},e.conversationId))})})}export{x as ArchivePage};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-D8roAprb.js";var t=e(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]);export{t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./createLucideIcon-D8roAprb.js";var t=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]);export{t};
|