@vellumai/web 0.8.8 → 0.8.9-dev.202606091926.ebb2d62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/BundleConfirmPage-wFUbvCIh.js +1 -0
- package/dist/assets/{QueryClientProvider-DBAeGN3q.js → QueryClientProvider-DKhXIxGb.js} +1 -1
- package/dist/assets/{about-page-C4tN0hSY.js → about-page-M03PCQjM.js} +1 -1
- package/dist/assets/account-page-DDXf71EJ.js +1 -0
- package/dist/assets/{account-shell-BZu7oVl3.js → account-shell-qQqbocXz.js} +1 -1
- package/dist/assets/add-credits-modal-Ba4Xq3mP.js +1 -0
- package/dist/assets/{advanced-page-Du0vGXNL.js → advanced-page-D_rGd8hT.js} +1 -1
- package/dist/assets/ai-page-DOMxHHyx.js +1 -0
- package/dist/assets/{angular-html-CDXMmzLv.js → angular-html-EHq37VRB.js} +1 -1
- package/dist/assets/{angular-ts-CaUHVMjx.js → angular-ts-CyvnMw9x.js} +1 -1
- package/dist/assets/api-DA14D9P8.js +39 -0
- package/dist/assets/{api-key-screen-Bgk6XGC1.js → api-key-screen-_pmVhsup.js} +1 -1
- package/dist/assets/{apl-BTRFCz7X.js → apl-CDFqSPmq.js} +1 -1
- package/dist/assets/{app-html-cache-BsFOfI0R.js → app-html-cache-DNQd-TK8.js} +1 -1
- package/dist/assets/{archive-yWA8_b2E.js → archive-BmTrKV5M.js} +1 -1
- package/dist/assets/archive-page-CZfW23DN.js +1 -0
- package/dist/assets/arrow-up-BLnb2N1m.js +1 -0
- package/dist/assets/assistant-feature-flag-store-CRKVT3rt.js +1 -0
- package/dist/assets/assistant-identity-store-dQ1LxIr0.js +1 -0
- package/dist/assets/assistant-status-panel-DjggokJY.js +1 -0
- package/dist/assets/{astro-CKyX7s7R.js → astro-DwtMGmbh.js} +1 -1
- package/dist/assets/auth-store-CEYaVkBG.js +6 -0
- package/dist/assets/{avatar-api-BfDoaCjw.js → avatar-api-BwHmtSnS.js} +1 -1
- package/dist/assets/{bell-BFRXSoMR.js → bell-C7RL04h4.js} +1 -1
- package/dist/assets/billing-page-Xywc9ybw.js +34 -0
- package/dist/assets/{blade-Rzz0TE8c.js → blade-CxYcTDW-.js} +1 -1
- package/dist/assets/{bsl-DpFuAvE8.js → bsl-CVaQXkX-.js} +1 -1
- package/dist/assets/{bug-wSdnBKWO.js → bug-DDEBp29t.js} +1 -1
- package/dist/assets/button-DdEh-9f_.js +1 -0
- package/dist/assets/{cairo-Bobk4atY.js → cairo-2Y07A7vZ.js} +1 -1
- package/dist/assets/{calendar-xwiYi6y2.js → calendar-CP_Q3Aw6.js} +1 -1
- package/dist/assets/capture-error-CZsNGL6n.js +4 -0
- package/dist/assets/card-CL5iEMJO.js +1 -0
- package/dist/assets/check-CW0KmV0o.js +1 -0
- package/dist/assets/checkbox-qlcBvCFW.js +1 -0
- package/dist/assets/chevron-right-zTNPbA1m.js +1 -0
- package/dist/assets/{chevron-up-C-4xJEr7.js → chevron-up-D4oYMRNW.js} +1 -1
- package/dist/assets/{chunk-5KNZJZUH-BpLAEZ0-.js → chunk-5KNZJZUH-DdS6bb-3.js} +3 -3
- package/dist/assets/cn-DFqQkJlk.js +1 -0
- package/dist/assets/{cobol-1CNEp2gA.js → cobol-B5bQhoAq.js} +1 -1
- package/dist/assets/{coffee-CCurbO7Q.js → coffee-CX-zNI46.js} +1 -1
- package/dist/assets/command-palette-CCbik2ci.js +1 -0
- package/dist/assets/{community-page-BWc9-V5m.js → community-page-CJhP5yYL.js} +1 -1
- package/dist/assets/confirm-dialog-NYG-K9zN.js +1 -0
- package/dist/assets/{connect-page-DLP-KRIF.js → connect-page-HIhq_iZu.js} +1 -1
- package/dist/assets/{contacts-gateway-BF6L_WJp.js → contacts-gateway-DBRvewkn.js} +1 -1
- package/dist/assets/{contacts-page-route-ziTjDj3t.js → contacts-page-route-DY41r-ZB.js} +1 -1
- package/dist/assets/{conversation-store-D8-qWog8.js → conversation-store-BEgf__eu.js} +1 -1
- package/dist/assets/{cpp-D8F2mhyx.js → cpp-D-wqygg_.js} +1 -1
- package/dist/assets/createLucideIcon-D6d6iDdi.js +1 -0
- package/dist/assets/{crystal-BV5GbE2n.js → crystal-2rXzMO-C.js} +1 -1
- package/dist/assets/danger-zone-redirect-page-V4V7ftC6.js +1 -0
- package/dist/assets/debug-page-CN5niysO.js +3 -0
- package/dist/assets/{deploy-dialogs-Ddx6WsXp.js → deploy-dialogs-DsaGDLoe.js} +1 -1
- package/dist/assets/{detail-card-Y8InXOgy.js → detail-card-B5j4Rqau.js} +1 -1
- package/dist/assets/developer-page-DymLhWw4.js +1 -0
- package/dist/assets/{devices-page-4yNwXw0J.js → devices-page-ByHiS7Hh.js} +1 -1
- package/dist/assets/dist-B1Fpj7hg.js +1 -0
- package/dist/assets/dist-BmaCqMgD.js +153 -0
- package/dist/assets/dist-D6LVk88Z.js +45 -0
- package/dist/assets/document-viewer-page-Doj2ePu_.js +1 -0
- package/dist/assets/{dollar-sign-D_9hooHL.js → dollar-sign-B-1DlpoB.js} +1 -1
- package/dist/assets/{domain-field-CyNgwvDW.js → domain-field-cWBlWR4h.js} +1 -1
- package/dist/assets/dropdown-CocFV5yi.js +1 -0
- package/dist/assets/{earn-credits-modal-BfVEDIqn.js → earn-credits-modal-Dkd0Q08t.js} +1 -1
- package/dist/assets/{edge-wZlHrIuI.js → edge-DxiTxESb.js} +1 -1
- package/dist/assets/{elixir-CxYq-rkj.js → elixir-BqExV7Mb.js} +1 -1
- package/dist/assets/{ellipsis-vertical-f27t2xXb.js → ellipsis-vertical-Dxg526It.js} +1 -1
- package/dist/assets/{elm-BgDZWS-i.js → elm-DoHcZ_98.js} +1 -1
- package/dist/assets/{emails-page-VM8fJ5kb.js → emails-page-BZM8Qj9H.js} +1 -1
- package/dist/assets/environment-store-CLqv1dDs.js +1 -0
- package/dist/assets/{erb-DBocu5OY.js → erb-T1Yd4grC.js} +1 -1
- package/dist/assets/{erlang-Dd9A6Ts8.js → erlang-sMV4xc3e.js} +1 -1
- package/dist/assets/{esm-BBKnACgF.js → esm-BfiJ42Ad.js} +2 -2
- package/dist/assets/esm-CautLOfa.js +2 -0
- package/dist/assets/esm-DTgeUUet.js +2 -0
- package/dist/assets/esm-DZPMmLdo.js +2 -0
- package/dist/assets/esm-D_HYq01-.js +2 -0
- package/dist/assets/{external-link-CcV79Arv.js → external-link-BCB1rbW9.js} +1 -1
- package/dist/assets/feature-flag-catalog-CEp3DBEM.js +1 -0
- package/dist/assets/file-markdown-DX5x9ziL.js +2 -0
- package/dist/assets/format-file-size-ComBK8Aa.js +1 -0
- package/dist/assets/{fortran-fixed-form-DMrzopcc.js → fortran-fixed-form-DKnaUnzq.js} +1 -1
- package/dist/assets/{fsharp-C6m4Hy9y.js → fsharp-BizN7JaO.js} +1 -1
- package/dist/assets/{gdresource-YKD2wsBt.js → gdresource-C03Nu36p.js} +1 -1
- package/dist/assets/general-page-Dzt0hIwa.js +1 -0
- package/dist/assets/{git-commit-D3W81laO.js → git-commit-Dlbu4g9u.js} +1 -1
- package/dist/assets/{git-rebase-D7A-ZIs_.js → git-rebase-Bp5nCjBJ.js} +1 -1
- package/dist/assets/{glimmer-js-Kj1yb8GI.js → glimmer-js-BRNkuAjG.js} +1 -1
- package/dist/assets/{glimmer-ts-CMle0DS9.js → glimmer-ts-C-WDx-0B.js} +1 -1
- package/dist/assets/{globe-B6unPYdp.js → globe-ByNYDdSW.js} +1 -1
- package/dist/assets/{glsl-CGs04uf3.js → glsl-CjrHb9ps.js} +1 -1
- package/dist/assets/{google-logo-NlVU0R23.js → google-logo-mNxCGWd3.js} +1 -1
- package/dist/assets/{graphql-DTpeHwUI.js → graphql-vJOsI9Q0.js} +1 -1
- package/dist/assets/{hack-DCR-U-qQ.js → hack-TawZ7_H0.js} +1 -1
- package/dist/assets/{haml-Cp_ZrdH-.js → haml-Ck1tHO4J.js} +1 -1
- package/dist/assets/{handlebars-DTIya8Eo.js → handlebars-CW8KnsAX.js} +1 -1
- package/dist/assets/{hard-drive-C5ssi802.js → hard-drive-DKBjBUo8.js} +1 -1
- package/dist/assets/hatching-screen-BgXc4QXD.js +1 -0
- package/dist/assets/home-page-route-CoWif8tz.js +1 -0
- package/dist/assets/hosting-screen-CSQT7_xn.js +1 -0
- package/dist/assets/{html-CCPUpDrQ.js → html-Dni-tmtM.js} +1 -1
- package/dist/assets/{html-derivative-CoL1ACif.js → html-derivative-CxaJ6DvG.js} +1 -1
- package/dist/assets/{http-BjpN3wdH.js → http-Dp4EVAWP.js} +1 -1
- package/dist/assets/{hurl-BHqN3hsl.js → hurl-CSfNp96n.js} +1 -1
- package/dist/assets/{hxml-CthMTwgY.js → hxml-DHyd-nrX.js} +1 -1
- package/dist/assets/identity-page-route-COYOOdox.js +1 -0
- package/dist/assets/index-BJIuhctB.css +2 -0
- package/dist/assets/index-BoHdS0dH.js +124 -0
- package/dist/assets/input-Cu3PPVCq.js +1 -0
- package/dist/assets/{inspect-page-CsvH5Rih.js → inspect-page-CZleugp8.js} +2 -2
- package/dist/assets/{install-OHIUtZSu.js → install-Cr0_ROdI.js} +1 -1
- package/dist/assets/integrations-page-Db5NmQjH.js +1 -0
- package/dist/assets/{intelligence-layout-Onjx6_Xb.js → intelligence-layout-D0yx4-8O.js} +1 -1
- package/dist/assets/{jinja-Bn3xB2ml.js → jinja-CijccQJ8.js} +1 -1
- package/dist/assets/{jison-BX4oePNj.js → jison-Bt8ZjqFZ.js} +1 -1
- package/dist/assets/{julia-DU_-trts.js → julia-BiriYc35.js} +1 -1
- package/dist/assets/{just-CyokZPsE.js → just-DHvFRFSz.js} +1 -1
- package/dist/assets/keyboard-shortcuts-page-oT4iDHBY.js +1 -0
- package/dist/assets/{latex-CHvXrGPz.js → latex-Dyl4S9re.js} +1 -1
- package/dist/assets/lib-B8eh8Q36.js +29 -0
- package/dist/assets/{lib-B020BIem.js → lib-CNXbvB2y.js} +1 -1
- package/dist/assets/{library-detail-page-PP_bf3mt.js → library-detail-page-DH_-n2ZF.js} +1 -1
- package/dist/assets/library-page-DROhxP9w.js +1 -0
- package/dist/assets/{link-2-B0QONFsy.js → link-2-BHdo-6Lp.js} +1 -1
- package/dist/assets/{liquid-Bs4Sb-po.js → liquid-BB4lKYGB.js} +1 -1
- package/dist/assets/loader-circle-BSAFLoPH.js +1 -0
- package/dist/assets/{login-flow-BbsypWKa.js → login-flow-CGVhpMhL.js} +1 -1
- package/dist/assets/login-page-qWjFvdVx.js +1 -0
- package/dist/assets/logout-page-Cqdj6GbH.js +1 -0
- package/dist/assets/{logs-layout-Cs8hHTTu.js → logs-layout-CzzECogM.js} +1 -1
- package/dist/assets/{lua-Dlulix5z.js → lua-BvVuKqEk.js} +1 -1
- package/dist/assets/{marko-BKY8xXbp.js → marko-S1DsBE-c.js} +1 -1
- package/dist/assets/{mdc-DUJqLRSQ.js → mdc-Dh4PJVso.js} +1 -1
- package/dist/assets/{memory-router-playground-page-4uw1uIhg.js → memory-router-playground-page-C36jgrL2.js} +1 -1
- package/dist/assets/menu-B79-l6IU.js +1 -0
- package/dist/assets/{minimize-2-H-zinYcX.js → minimize-2-CXA_X5M9.js} +1 -1
- package/dist/assets/{misc-BllImtEn.js → misc-MEUnNRwX.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-CSQF2rSV.js → mobile-sidebar-drawer-B2ClO-zB.js} +1 -1
- package/dist/assets/modal-BYMhDpQo.js +1 -0
- package/dist/assets/{native-file-C2WSS7-h.js → native-file-CS-pobfT.js} +2 -2
- package/dist/assets/{nextflow-7_68OVU_.js → nextflow-BE6HS58m.js} +1 -1
- package/dist/assets/{nginx-eipJu1bl.js → nginx-BZIz2mri.js} +1 -1
- package/dist/assets/{nim-CYnL-Wir.js → nim-DTA68UpI.js} +1 -1
- package/dist/assets/notice-CF2pptne.js +1 -0
- package/dist/assets/{notifications-page-DRppz7Ms.js → notifications-page-kcxcRxBI.js} +1 -1
- package/dist/assets/{oauth-complete-page-aT6QAfCd.js → oauth-complete-page-Bfkk9A3u.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-ClfKIV61.js → oauth-popup-complete-page-CxbVvSEU.js} +2 -2
- package/dist/assets/{octagon-x-Bze4QGjG.js → octagon-x-DV9qasaC.js} +1 -1
- package/dist/assets/onboarding-layout-BIVa2BnX.js +1 -0
- package/dist/assets/{page-shell-C4yGVVNa.js → page-shell-CYsp3hSr.js} +1 -1
- package/dist/assets/panel-item-FzMfzMJA.js +1 -0
- package/dist/assets/password-reset-page-BJo9vGl_.js +1 -0
- package/dist/assets/{pdf-BbxrOchE.js → pdf-eIgXagOI.js} +1 -1
- package/dist/assets/{pencil-CESg1M7c.js → pencil-BA9LOIzP.js} +1 -1
- package/dist/assets/{perl-D0xJm_ah.js → perl-G6ZZQsfy.js} +1 -1
- package/dist/assets/{php-DNtH2WpS.js → php-BeUbGztq.js} +1 -1
- package/dist/assets/platform-loopback-page-DyXQ6NvW.js +1 -0
- package/dist/assets/plugin-detail-page-geoYiAlT.js +1 -0
- package/dist/assets/plugins-page--NwZlb3s.js +1 -0
- package/dist/assets/portal-container-DIXEBWUe.js +1 -0
- package/dist/assets/pre-chat-flow-BAH62AEt.js +1 -0
- package/dist/assets/privacy-page-yLv8pxcQ.js +1 -0
- package/dist/assets/privacy-screen-CIPUbd6m.js +1 -0
- package/dist/assets/progress-bar-BxeXgLhp.js +1 -0
- package/dist/assets/provider-callback-page-4baz5ZSB.js +1 -0
- package/dist/assets/{provider-key-DiyETKhK.js → provider-key-D_Hh-rHb.js} +1 -1
- package/dist/assets/provider-signup-page-D6q9JrqN.js +1 -0
- package/dist/assets/{pug-DEPEeomQ.js → pug-D45MnfGZ.js} +1 -1
- package/dist/assets/{qml-C9mVjGBN.js → qml-COPmH2mF.js} +1 -1
- package/dist/assets/{query-tags-yOSQTht4.js → query-tags-LUKTkOVt.js} +1 -1
- package/dist/assets/quick-input-page-nd4iN-tG.js +1 -0
- package/dist/assets/{razor-Cyg4V1EK.js → razor-CQW42Ogp.js} +1 -1
- package/dist/assets/react-query.gen-mIY9pJOj.js +1 -0
- package/dist/assets/{resize-errors-C_vO4oid.js → resize-errors-DejLlS-b.js} +1 -1
- package/dist/assets/resolved-assistants-store-ub66utfl.js +1 -0
- package/dist/assets/review-terms-screen-Cdwcsfka.js +1 -0
- package/dist/assets/routes-Dk5Qeryt.js +1 -0
- package/dist/assets/{rst-BiUNp2Fv.js → rst-C9ZVT0AG.js} +1 -1
- package/dist/assets/{ruby-Bddxezn1.js → ruby-DDticLOn.js} +1 -1
- package/dist/assets/{sas-DAUEkM7Z.js → sas-C5rCQJBu.js} +1 -1
- package/dist/assets/{save-CBzZvuPl.js → save-DHFrLI4J.js} +1 -1
- package/dist/assets/{schedules-mjx6ouZ2.js → schedules-BJAra2Ob.js} +1 -1
- package/dist/assets/schedules-page-CZ9YxyW6.js +1 -0
- package/dist/assets/{scss-BlEtTolU.js → scss-CLfSZysM.js} +1 -1
- package/dist/assets/{sdk.gen-up8j0_uF.js → sdk.gen-AJllUeDf.js} +1 -1
- package/dist/assets/select-assistant-screen-M-2shDA3.js +1 -0
- package/dist/assets/settings-layout-CdqjPbK4.js +1 -0
- package/dist/assets/{shaderlab-BH1Q2CVQ.js → shaderlab-BEussGgZ.js} +1 -1
- package/dist/assets/share-feedback-modal-Co_P5WuZ.js +1 -0
- package/dist/assets/{shellsession-BdTXj0Sh.js → shellsession-DA8c5lD0.js} +1 -1
- package/dist/assets/shortcut-keys-FXO7qQjX.js +1 -0
- package/dist/assets/sidebar-tree-BRDRNQ8Q.js +1 -0
- package/dist/assets/signup-page-DI04DI-C.js +1 -0
- package/dist/assets/skills-page-a30JiOR9.js +1 -0
- package/dist/assets/sounds-page-C115AWgu.js +1 -0
- package/dist/assets/{soy-B-FcVSYk.js → soy-CBeww7qH.js} +1 -1
- package/dist/assets/{sparql-BjDARHNL.js → sparql-DOILO3Ud.js} +1 -1
- package/dist/assets/{src-Bah0_lDG.js → src-hn7lwVCD.js} +3 -3
- package/dist/assets/stat-square-sRJmexc-.js +1 -0
- package/dist/assets/{stata-Y4GvktLE.js → stata-D4jcvFy6.js} +1 -1
- package/dist/assets/step-indicator-dots-Cz4FzNR8.js +1 -0
- package/dist/assets/{subagent-detail-panel-BcUQAemM.js → subagent-detail-panel-Bbnyrf81.js} +2 -2
- package/dist/assets/{surrealql-BDSKZaSH.js → surrealql-B68HrEZ7.js} +1 -1
- package/dist/assets/{svelte-CtuvIFmj.js → svelte-93u-3tLs.js} +1 -1
- package/dist/assets/{system-events-page-BC0hWcTo.js → system-events-page-g_xLeN_u.js} +1 -1
- package/dist/assets/system-events-redirect-page-BC7UPZbk.js +1 -0
- package/dist/assets/tag-Ccr7Quy6.js +1 -0
- package/dist/assets/{target-B8JHLfTN.js → target-BMMY7Kql.js} +1 -1
- package/dist/assets/{templ-eJUdwoXg.js → templ-Ctw_ylZL.js} +1 -1
- package/dist/assets/{tex-CIRkYPu6.js → tex-M6sV0M4v.js} +1 -1
- package/dist/assets/{tiptap-document-editor-CIVPtfOQ.js → tiptap-document-editor-DScdORMl.js} +2 -2
- package/dist/assets/toast-DU1nH33j.js +1 -0
- package/dist/assets/toggle-CEm3M86o.js +1 -0
- package/dist/assets/{tool-detail-panel-y2CN1PtJ.js → tool-detail-panel-C7MN-KAI.js} +1 -1
- package/dist/assets/trace-page-CVP6LRdX.js +1 -0
- package/dist/assets/{ts-tags-Cza2ueQC.js → ts-tags-Qp4WvCJw.js} +1 -1
- package/dist/assets/{twig-CXZQ9Ol2.js → twig-CogzkHzb.js} +1 -1
- package/dist/assets/typography-Czgs_2w_.js +1 -0
- package/dist/assets/{upgrade-cancel-page-KQ4EN_I1.js → upgrade-cancel-page-B2rtkAy-.js} +1 -1
- package/dist/assets/{upgrade-success-page-Bmv-ncJ6.js → upgrade-success-page-RUhJdNDa.js} +1 -1
- package/dist/assets/usage-page-nhIdLaSC.js +1 -0
- package/dist/assets/use-active-assistant-id-BIhArlF_.js +1 -0
- package/dist/assets/{use-bus-subscription-r105Upoa.js → use-bus-subscription-BuU6xaZz.js} +1 -1
- package/dist/assets/use-current-platform-assistant-CnWB-OXZ.js +1 -0
- package/dist/assets/use-is-org-ready-DQ-TnmMg.js +1 -0
- package/dist/assets/{use-oauth-complete-deep-link-listener-BkbO4kZ1.js → use-oauth-complete-deep-link-listener-DL4gXjh5.js} +1 -1
- package/dist/assets/use-onboarding-login-CU8ga9dy.js +1 -0
- package/dist/assets/{use-reduced-motion-GQ_HVFpK.js → use-reduced-motion-CZO_MWGV.js} +1 -1
- package/dist/assets/{useMutation-DTb3lMvF.js → useMutation-Lj4VunQV.js} +1 -1
- package/dist/assets/{useQuery-DAtrV0RI.js → useQuery-B45lW1Kk.js} +1 -1
- package/dist/assets/{utils-DfoBtDfL.js → utils-Csn9OVRE.js} +1 -1
- package/dist/assets/viewer-store-Cc5YI5ay.js +1 -0
- package/dist/assets/voice-page-BBwDHQfi.js +1 -0
- package/dist/assets/{vue-BHoLyUei.js → vue-CKYV05Wl.js} +1 -1
- package/dist/assets/{vue-html-DkcwChpt.js → vue-html-CD969jd0.js} +1 -1
- package/dist/assets/{vue-vine-CWaGKpZ6.js → vue-vine-BPU_80oA.js} +1 -1
- package/dist/assets/{wand-sparkles-CIV_5Oi6.js → wand-sparkles-DL9Oe56R.js} +1 -1
- package/dist/assets/{weather-forecast-display-BA-3Q5jY.js → weather-forecast-display-fyM6Wp3V.js} +1 -1
- package/dist/assets/{web-DhGMOrai.js → web-Cue81zTY.js} +1 -1
- package/dist/assets/{web-BURo-fbJ.js → web-DgJRXlLM.js} +1 -1
- package/dist/assets/{web-D4HuJomW.js → web-MavgiYAR.js} +1 -1
- package/dist/assets/{web-ByC97zP5.js → web-XRhV1FIb.js} +1 -1
- package/dist/assets/{web-St4pj-6p.js → web-hjMLFqJn.js} +1 -1
- package/dist/assets/{web-Bladjo1x.js → web-m17sEkBA.js} +1 -1
- package/dist/assets/{web-BoYC6fGC.js → web-oH2q0g1D.js} +1 -1
- package/dist/assets/welcome-screen-Db5Ic4aS.js +1 -0
- package/dist/assets/workspace-page-DlTxEh46.js +1 -0
- package/dist/assets/x-BDqbYVtS.js +1 -0
- package/dist/assets/x-CaVViVFn.js +1 -0
- package/dist/assets/{xml-CUVPRfsD.js → xml-B-TXQRmh.js} +1 -1
- package/dist/assets/{xsl-imDMVavE.js → xsl-hDlDZuus.js} +1 -1
- package/dist/assets/zwitch-19hSuEjR.js +1 -0
- package/dist/index.html +86 -88
- package/package.json +1 -1
- package/dist/assets/account-page-e-4zB_8t.js +0 -1
- package/dist/assets/add-credits-modal-p0gkX1yC.js +0 -1
- package/dist/assets/ai-page-BQOcmKeW.js +0 -1
- package/dist/assets/api-8hqpGaif.js +0 -39
- package/dist/assets/archive-page-DhDeJH4l.js +0 -1
- package/dist/assets/arrow-up-Cev-d0qQ.js +0 -1
- package/dist/assets/assistant-feature-flag-store-CNdFPRBD.js +0 -1
- package/dist/assets/assistant-identity-store-Y4grVs1H.js +0 -1
- package/dist/assets/assistant-status-panel-C3CvCBVl.js +0 -1
- package/dist/assets/auth-store-CYbo7naZ.js +0 -1
- package/dist/assets/billing-page-CyTcQ9ki.js +0 -34
- package/dist/assets/button-Cs9tc8OR.js +0 -1
- package/dist/assets/capture-error-1Tr5aMfq.js +0 -1
- package/dist/assets/card-BcKGvsaa.js +0 -1
- package/dist/assets/check-DqeyrftF.js +0 -1
- package/dist/assets/checkbox-hJlRqWtn.js +0 -1
- package/dist/assets/chevron-right-CJ0Oykrn.js +0 -1
- package/dist/assets/cn-DIX4PZch.js +0 -1
- package/dist/assets/command-palette-CTF-tqv7.js +0 -1
- package/dist/assets/confirm-dialog-DavdF-L4.js +0 -1
- package/dist/assets/createLucideIcon-CSvzx8tc.js +0 -1
- package/dist/assets/danger-zone-redirect-page-BlS6Bao4.js +0 -1
- package/dist/assets/debug-page-B38HF3wu.js +0 -3
- package/dist/assets/developer-page-CVcwOCG9.js +0 -1
- package/dist/assets/dist-3bWmqQYy.js +0 -45
- package/dist/assets/dist-Cb2Epurm.js +0 -1
- package/dist/assets/dist-Ck9KSeuV.js +0 -153
- package/dist/assets/document-viewer-page-BZqF90o0.js +0 -1
- package/dist/assets/dropdown-PPtOL9bp.js +0 -1
- package/dist/assets/esm-B9MFZJ_e.js +0 -2
- package/dist/assets/esm-BAXpcEfg.js +0 -2
- package/dist/assets/esm-BesMJi2r.js +0 -2
- package/dist/assets/esm-Dlx5ghIf.js +0 -2
- package/dist/assets/exports-B_RC9sMS.js +0 -4
- package/dist/assets/feature-flag-catalog-CRgdQmMF.js +0 -1
- package/dist/assets/file-markdown-DjJ2NSmS.js +0 -1
- package/dist/assets/gateway-session-CaFk8wfN.js +0 -1
- package/dist/assets/general-page-m_m-DrX4.js +0 -1
- package/dist/assets/hatching-screen-CI8iOd8-.js +0 -1
- package/dist/assets/home-page-route-ePg1Cu2z.js +0 -1
- package/dist/assets/hosting-screen-CA6XnVWn.js +0 -1
- package/dist/assets/identity-page-route-BcE8OAJ6.js +0 -1
- package/dist/assets/index-Cb930VA2.css +0 -2
- package/dist/assets/index-DUwiZuxe.js +0 -124
- package/dist/assets/input-DwAJUlac.js +0 -1
- package/dist/assets/integrations-page-B54hIoCi.js +0 -1
- package/dist/assets/lib-h5KT63h9.js +0 -29
- package/dist/assets/library-page-Cg1IA3a6.js +0 -1
- package/dist/assets/loader-circle-FEkI0Am4.js +0 -1
- package/dist/assets/login-page-BVX4fr6R.js +0 -1
- package/dist/assets/logout-page-BkzePxva.js +0 -1
- package/dist/assets/loopback-auth-Dclf8zKT.js +0 -1
- package/dist/assets/menu-0h93UDZw.js +0 -1
- package/dist/assets/modal-C7CS3Y_X.js +0 -1
- package/dist/assets/native-biometric-B4t4zElu.js +0 -6
- package/dist/assets/notice-BWm2kHlI.js +0 -1
- package/dist/assets/onboarding-layout-DMOume9Z.js +0 -1
- package/dist/assets/panel-item-BPosLg5Y.js +0 -1
- package/dist/assets/password-reset-page-CugjFViT.js +0 -1
- package/dist/assets/platform-loopback-page-DSAaBS5p.js +0 -1
- package/dist/assets/plugins-page-CYcKA2Ai.js +0 -1
- package/dist/assets/portal-container-CKtYcZfP.js +0 -1
- package/dist/assets/pre-chat-flow-BLHHoHka.js +0 -1
- package/dist/assets/privacy-page-HiOgrDR9.js +0 -1
- package/dist/assets/privacy-screen-Ca0oGFo0.js +0 -1
- package/dist/assets/progress-bar-CgQMQ_UR.js +0 -1
- package/dist/assets/provider-callback-page-DpGReURP.js +0 -1
- package/dist/assets/provider-signup-page-BpqjcKpY.js +0 -1
- package/dist/assets/react-query.gen-CfXF72qo.js +0 -1
- package/dist/assets/routes-C-DwSCj0.js +0 -1
- package/dist/assets/schedules-page-zyXnmD3U.js +0 -1
- package/dist/assets/selection-store-BCKoLRDh.js +0 -1
- package/dist/assets/settings-layout-Bsi8NeES.js +0 -1
- package/dist/assets/share-feedback-modal-BgfMO7ED.js +0 -1
- package/dist/assets/sidebar-tree-D9JFk5pQ.js +0 -1
- package/dist/assets/signup-page-CI7xziFt.js +0 -1
- package/dist/assets/skills-page-DrpHzObX.js +0 -1
- package/dist/assets/sounds-page-Dw_ASs77.js +0 -1
- package/dist/assets/stat-square-CMFH3mHq.js +0 -1
- package/dist/assets/step-indicator-dots-ClKaa4nc.js +0 -1
- package/dist/assets/system-events-redirect-page-BrzAhJZT.js +0 -1
- package/dist/assets/tag-BkZB4euH.js +0 -1
- package/dist/assets/toast-Cii5pffK.js +0 -1
- package/dist/assets/toggle-DGzEs0L1.js +0 -1
- package/dist/assets/trace-page-BX5w9eln.js +0 -1
- package/dist/assets/typography-PN7B1rrW.js +0 -1
- package/dist/assets/usage-page-CXNTUrjR.js +0 -1
- package/dist/assets/use-active-assistant-id-kjFL4dWB.js +0 -1
- package/dist/assets/use-current-platform-assistant-BXRU4B3R.js +0 -1
- package/dist/assets/use-debounced-value-DK0n_BKN.js +0 -1
- package/dist/assets/use-is-org-ready-Dtde_1TT.js +0 -1
- package/dist/assets/viewer-store-BIIKltsh.js +0 -1
- package/dist/assets/voice-page-D3jl6Uq8.js +0 -1
- package/dist/assets/welcome-screen-B3oZjIVb.js +0 -1
- package/dist/assets/workspace-page-CUxLMyKc.js +0 -1
- package/dist/assets/x-2OoTSOWJ.js +0 -1
- package/dist/assets/x-CwP6G6OK.js +0 -1
- /package/dist/assets/{abap-C4iPiDIu.js → abap-C765urHY.js} +0 -0
- /package/dist/assets/{actionscript-3-gKpUxVX1.js → actionscript-3-lC5SPJIn.js} +0 -0
- /package/dist/assets/{ada-BNfMfhXG.js → ada-D6z3_0sc.js} +0 -0
- /package/dist/assets/{andromeeda-DLZ1RhgM.js → andromeeda-DxGTh_os.js} +0 -0
- /package/dist/assets/{apache-CmXtX8w8.js → apache-rkls1DSR.js} +0 -0
- /package/dist/assets/{apex-DQ3YjsTJ.js → apex-CNQCNeA7.js} +0 -0
- /package/dist/assets/{api-errors-DhNZwQy5.js → api-errors-ChauV4ed.js} +0 -0
- /package/dist/assets/{applescript-CoELsxRV.js → applescript-DQYsaxRM.js} +0 -0
- /package/dist/assets/{ara-BLqTzepa.js → ara-Zm0W1ER8.js} +0 -0
- /package/dist/assets/{asciidoc-Bu3NXNp3.js → asciidoc-uekNNlKP.js} +0 -0
- /package/dist/assets/{asm-hlDTKcRV.js → asm-Bbxb9Q7N.js} +0 -0
- /package/dist/assets/{aurora-x-Y3rL1Mno.js → aurora-x-CaQsey3l.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-BKb8hhzM.js → avatar-bundled-components-CrafToy8.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-CE52Zi2F.js → avatar-svg-compositor-krWs9LGY.js} +0 -0
- /package/dist/assets/{awk-fqp6puV8.js → awk-CNSoW6F_.js} +0 -0
- /package/dist/assets/{ayu-dark-8m2thfgS.js → ayu-dark-D3cTidcI.js} +0 -0
- /package/dist/assets/{ayu-light-B_LzrLW4.js → ayu-light-Cs1cEPZA.js} +0 -0
- /package/dist/assets/{ayu-mirage-C408gKdx.js → ayu-mirage-xGyelbjm.js} +0 -0
- /package/dist/assets/{ballerina-Dzhgw61p.js → ballerina-UrfaUWaS.js} +0 -0
- /package/dist/assets/{bat-CM0nyl3e.js → bat-BSseGlJ2.js} +0 -0
- /package/dist/assets/{beancount-DS2zW2gu.js → beancount-BME0bq77.js} +0 -0
- /package/dist/assets/{berry-CFa7Vgeg.js → berry-BbmX7W94.js} +0 -0
- /package/dist/assets/{bibtex-BgrhWGNJ.js → bibtex-Bj1CNNvW.js} +0 -0
- /package/dist/assets/{bicep-DtHaVZsZ.js → bicep-BSN2uHnH.js} +0 -0
- /package/dist/assets/{bird2-CwlVhixU.js → bird2-DKVBk6e_.js} +0 -0
- /package/dist/assets/{c-DHEwyzyt.js → c-yTfbDbmI.js} +0 -0
- /package/dist/assets/{c3-BjbJ1SWk.js → c3-Tbt7gffV.js} +0 -0
- /package/dist/assets/{cadence-D5TkDw9F.js → cadence-DQUV1O6z.js} +0 -0
- /package/dist/assets/{catppuccin-frappe-AYmKAKbn.js → catppuccin-frappe-DxbhXt9K.js} +0 -0
- /package/dist/assets/{catppuccin-latte-rgEci-mq.js → catppuccin-latte-CgFlEQYs.js} +0 -0
- /package/dist/assets/{catppuccin-macchiato-DK631o7w.js → catppuccin-macchiato-Pgo0Bz4Y.js} +0 -0
- /package/dist/assets/{catppuccin-mocha-Dxwp0FIj.js → catppuccin-mocha-CUd4v5ay.js} +0 -0
- /package/dist/assets/{clarity-RpeFvelS.js → clarity-Cja2-cF9.js} +0 -0
- /package/dist/assets/{clojure-CRAC2t-A.js → clojure-1vnBLaIC.js} +0 -0
- /package/dist/assets/{clsx-BcPLHiun.js → clsx-CyUKbFfa.js} +0 -0
- /package/dist/assets/{cmake-CR_x8y9A.js → cmake-B7nBRZe5.js} +0 -0
- /package/dist/assets/{codeowners-DCE2DWuf.js → codeowners-l0-p2hBj.js} +0 -0
- /package/dist/assets/{codeql-DsaJqgmb.js → codeql-CZegxzQJ.js} +0 -0
- /package/dist/assets/{common-lisp-ssblfVQ2.js → common-lisp-BwWhYub9.js} +0 -0
- /package/dist/assets/{coq-CHVp-7H5.js → coq-DXStvgQ7.js} +0 -0
- /package/dist/assets/{create-selectors-LbkU9b0a.js → create-selectors-CDULelrw.js} +0 -0
- /package/dist/assets/{createLucideIcon-D8wUFCt3.js → createLucideIcon-Bjb-Kuq7.js} +0 -0
- /package/dist/assets/{csharp-DI5xNuVa.js → csharp-DLXmY1sb.js} +0 -0
- /package/dist/assets/{css-cWOM3a0B.js → css-B4lldM37.js} +0 -0
- /package/dist/assets/{csv-Bpv-AoF-.js → csv-DGudciUq.js} +0 -0
- /package/dist/assets/{cue-DDYtbxe3.js → cue-D53528FL.js} +0 -0
- /package/dist/assets/{cypher-llXjaNz7.js → cypher-Bv8Z4GK2.js} +0 -0
- /package/dist/assets/{d-CKAGFvTZ.js → d-B0tR3tAH.js} +0 -0
- /package/dist/assets/{dark-plus-rkBkJwdk.js → dark-plus-DxGtsBDC.js} +0 -0
- /package/dist/assets/{dart-DMYKlTVD.js → dart-BKofA41x.js} +0 -0
- /package/dist/assets/{dax-DdvjFH0V.js → dax-Dd0gvVZ0.js} +0 -0
- /package/dist/assets/{definitions-BNrrmgWe.js → definitions-FC3DcvI3.js} +0 -0
- /package/dist/assets/{desktop-w1vLnVHT.js → desktop-BbJezzxJ.js} +0 -0
- /package/dist/assets/{diff-OeXZvF1L.js → diff-CPVWfCck.js} +0 -0
- /package/dist/assets/{dist-C49TvNNR.js → dist-B4KYfSON.js} +0 -0
- /package/dist/assets/{docker-C3A0dfO2.js → docker-BUIA6Gjt.js} +0 -0
- /package/dist/assets/{dotenv-DW1eN_9r.js → dotenv-BLms_imc.js} +0 -0
- /package/dist/assets/{dracula-DTBIfZ52.js → dracula-CFX8u3fe.js} +0 -0
- /package/dist/assets/{dracula-soft-CrJWuJGa.js → dracula-soft-DIr29C0b.js} +0 -0
- /package/dist/assets/{dream-maker-BbcHsNud.js → dream-maker-D1q7VQg6.js} +0 -0
- /package/dist/assets/{edit-chat-session-Bn0bAlP1.js → edit-chat-session-Cx2xnSSj.js} +0 -0
- /package/dist/assets/{effective-timezone-CJWCpcyG.js → effective-timezone-CKEcAtDc.js} +0 -0
- /package/dist/assets/{emacs-lisp-CXlankGO.js → emacs-lisp-BcZ9rlnt.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-B2dzgy2b.js → emoji-catalog-data-ZbE1lqD6.js} +0 -0
- /package/dist/assets/{event-bus-WRYwtHDl.js → event-bus-CMBsMREI.js} +0 -0
- /package/dist/assets/{everforest-dark-B2pu_HKn.js → everforest-dark-BQBBmI9l.js} +0 -0
- /package/dist/assets/{everforest-light-DN0BkMBf.js → everforest-light-Cuh0ru8h.js} +0 -0
- /package/dist/assets/{fennel-Cr6woGT-.js → fennel-BpqBXoBR.js} +0 -0
- /package/dist/assets/{fish-BJg8G7KS.js → fish-DyYYr9bo.js} +0 -0
- /package/dist/assets/{fluent-DwMQdbwA.js → fluent-LgrDR_-H.js} +0 -0
- /package/dist/assets/{format-B2Cl9naL.js → format-VxJLq14L.js} +0 -0
- /package/dist/assets/{format-date-C_j5UjES.js → format-date-lYqfuFdi.js} +0 -0
- /package/dist/assets/{fortran-free-form-CzTB9Sqt.js → fortran-free-form-zxo4vZkI.js} +0 -0
- /package/dist/assets/{gdscript-weUeMolr.js → gdscript-8-sj85Vb.js} +0 -0
- /package/dist/assets/{gdshader-iWAUzgYh.js → gdshader-BZfJmuLj.js} +0 -0
- /package/dist/assets/{genie-CV-0RB6d.js → genie-BFvJfKnC.js} +0 -0
- /package/dist/assets/{gherkin-Bi25xuBx.js → gherkin-CPWjfG76.js} +0 -0
- /package/dist/assets/{github-dark-UUFXF3bS.js → github-dark-CDP4O7Bn.js} +0 -0
- /package/dist/assets/{github-dark-default-C5WdYtsR.js → github-dark-default-BcXmigOb.js} +0 -0
- /package/dist/assets/{github-dark-dimmed-CJFXRI6Q.js → github-dark-dimmed-5_i38q35.js} +0 -0
- /package/dist/assets/{github-dark-high-contrast-JloQ0SAJ.js → github-dark-high-contrast-_CgCWILr.js} +0 -0
- /package/dist/assets/{github-light-4CveJiiC.js → github-light-B51iW2_d.js} +0 -0
- /package/dist/assets/{github-light-default-DGIOayrf.js → github-light-default-WJu0iiQj.js} +0 -0
- /package/dist/assets/{github-light-high-contrast-DOA9HriW.js → github-light-high-contrast-CvbJyaey.js} +0 -0
- /package/dist/assets/{gleam-CKtDvnYK.js → gleam-DRz17LOo.js} +0 -0
- /package/dist/assets/{gn-lpxxrUCu.js → gn-CJhzP-4V.js} +0 -0
- /package/dist/assets/{gnuplot-BhYvNHXT.js → gnuplot-BWrGxdNu.js} +0 -0
- /package/dist/assets/{go-CGiDqZ23.js → go-CNIAodSs.js} +0 -0
- /package/dist/assets/{groovy-CGHX_PQL.js → groovy-Dbr7YtTJ.js} +0 -0
- /package/dist/assets/{gruvbox-dark-hard-WxeIxO0x.js → gruvbox-dark-hard-BRDuiL2M.js} +0 -0
- /package/dist/assets/{gruvbox-dark-medium-BrLRvqzP.js → gruvbox-dark-medium-BSHS7XsT.js} +0 -0
- /package/dist/assets/{gruvbox-dark-soft-Yzi926sT.js → gruvbox-dark-soft-D5sY56aX.js} +0 -0
- /package/dist/assets/{gruvbox-light-hard-Cw9Re-rI.js → gruvbox-light-hard-Crga28iX.js} +0 -0
- /package/dist/assets/{gruvbox-light-medium-4lcJ4wOe.js → gruvbox-light-medium-DYI_fIXR.js} +0 -0
- /package/dist/assets/{gruvbox-light-soft-CXfwWDtY.js → gruvbox-light-soft-DGrx7O6I.js} +0 -0
- /package/dist/assets/{haskell-DBidNlOX.js → haskell-s3USba_s.js} +0 -0
- /package/dist/assets/{haxe-B6ZewxKA.js → haxe-DHVuHtAU.js} +0 -0
- /package/dist/assets/{hcl-BKeuz7gp.js → hcl-CibSb2Tt.js} +0 -0
- /package/dist/assets/{hjson-rgQbq9_i.js → hjson-MSVmDATS.js} +0 -0
- /package/dist/assets/{hlsl-D7KFXCoM.js → hlsl-wPjA7f4R.js} +0 -0
- /package/dist/assets/{horizon-DAiINwqJ.js → horizon-DSv_Vl7g.js} +0 -0
- /package/dist/assets/{horizon-bright-CFeHelVZ.js → horizon-bright-BhWyww1y.js} +0 -0
- /package/dist/assets/{houston-BdHxI9BK.js → houston-kqxIENiP.js} +0 -0
- /package/dist/assets/{hy-CDDbmdhC.js → hy-CcDNvXBw.js} +0 -0
- /package/dist/assets/{imba-CwLWOt59.js → imba-ClQFmFPP.js} +0 -0
- /package/dist/assets/{impersonate-version-flag-D_S9-Z77.js → impersonate-version-flag-DXEwev6c.js} +0 -0
- /package/dist/assets/{ini-Bwb6xY8F.js → ini-DuVrbFYV.js} +0 -0
- /package/dist/assets/{is-electron-1CyUiqR4.js → is-electron-CavSPgmY.js} +0 -0
- /package/dist/assets/{java-CDWeyxES.js → java-79Va6bJc.js} +0 -0
- /package/dist/assets/{javascript-BN3vpbN8.js → javascript-wLwe9AbG.js} +0 -0
- /package/dist/assets/{json-CycFWZcg.js → json-DlXFKBYE.js} +0 -0
- /package/dist/assets/{json5-BM_H1TCH.js → json5-CkCkKH3E.js} +0 -0
- /package/dist/assets/{jsonc-EUMfb5CQ.js → jsonc-0Xq7tyz4.js} +0 -0
- /package/dist/assets/{jsonl-DvZe68u2.js → jsonl-FSPvpkq2.js} +0 -0
- /package/dist/assets/{jsonnet-BG4vdzZ4.js → jsonnet-BSv69JRS.js} +0 -0
- /package/dist/assets/{jssm-DNeKUJR3.js → jssm-CyIoWSxC.js} +0 -0
- /package/dist/assets/{jsx-jfTE_lQA.js → jsx-AdZrb5z2.js} +0 -0
- /package/dist/assets/{jsx-runtime-XSukodg_.js → jsx-runtime-CVSDxk6A.js} +0 -0
- /package/dist/assets/{kanagawa-dragon-D9OVubsz.js → kanagawa-dragon-Bd79Tun-.js} +0 -0
- /package/dist/assets/{kanagawa-lotus-CSRx4SDl.js → kanagawa-lotus-DeCV-Urg.js} +0 -0
- /package/dist/assets/{kanagawa-wave-UOuPU6gH.js → kanagawa-wave-aglxw59J.js} +0 -0
- /package/dist/assets/{kdl-DaJuRpNV.js → kdl-BUg1cLiI.js} +0 -0
- /package/dist/assets/{kotlin-BNEzAgnJ.js → kotlin-BhThn95H.js} +0 -0
- /package/dist/assets/{kusto-BnUa5uHr.js → kusto--hwp7U1v.js} +0 -0
- /package/dist/assets/{laserwave-BPO5VXXS.js → laserwave-C0Ni-UOW.js} +0 -0
- /package/dist/assets/{lean-Z7O9sZeQ.js → lean-D0WZXxTy.js} +0 -0
- /package/dist/assets/{less-9u8t21jj.js → less-BqMPRJgy.js} +0 -0
- /package/dist/assets/{light-plus-Wc5scgJh.js → light-plus-CvXxK5L0.js} +0 -0
- /package/dist/assets/{llm-dimension-DPVignMk.js → llm-dimension-DZzl8VAV.js} +0 -0
- /package/dist/assets/{llvm-DUPAzzzh.js → llvm-DxX8WKJ-.js} +0 -0
- /package/dist/assets/{log-yVIkEnLV.js → log-D8tJQN5p.js} +0 -0
- /package/dist/assets/{logo-BMjRBAP1.js → logo-Dh8zozRh.js} +0 -0
- /package/dist/assets/{luau-CRLNKfW2.js → luau-X-mc9HXh.js} +0 -0
- /package/dist/assets/{make-ABiaNV_U.js → make-Cw4iUEce.js} +0 -0
- /package/dist/assets/{markdown-Dn1PAeWy.js → markdown-C4wgDjuo.js} +0 -0
- /package/dist/assets/{material-theme-DKIEc_9D.js → material-theme-CEmeBs_y.js} +0 -0
- /package/dist/assets/{material-theme-darker-CKATunxP.js → material-theme-darker-BXvhddOF.js} +0 -0
- /package/dist/assets/{material-theme-lighter-Ch4hbIqq.js → material-theme-lighter-DMW3Ucs8.js} +0 -0
- /package/dist/assets/{material-theme-ocean-DMLBHhVS.js → material-theme-ocean-c0mOFI0Z.js} +0 -0
- /package/dist/assets/{material-theme-palenight-rAwveJbA.js → material-theme-palenight-DHn1ZMRK.js} +0 -0
- /package/dist/assets/{matlab-nAylgdir.js → matlab-DwttN0_Y.js} +0 -0
- /package/dist/assets/{mdx-D21b3pUC.js → mdx-VNbJXzl_.js} +0 -0
- /package/dist/assets/{mermaid-BpHmCKn1.js → mermaid-8nLortlR.js} +0 -0
- /package/dist/assets/{min-dark-B0702Ln3.js → min-dark-Cfo9Imnn.js} +0 -0
- /package/dist/assets/{min-light-9h8I8ujc.js → min-light-D-eNMY61.js} +0 -0
- /package/dist/assets/{mipsasm-CtcdPU2Y.js → mipsasm-CmR7MApm.js} +0 -0
- /package/dist/assets/{mojo-Bv8xbxSD.js → mojo-E4JmNL4g.js} +0 -0
- /package/dist/assets/{monokai-R3M-Pkjy.js → monokai-DkH9jgy0.js} +0 -0
- /package/dist/assets/{moonbit-MUcZ6VT6.js → moonbit-B0sciZbe.js} +0 -0
- /package/dist/assets/{move-B0DlmhPE.js → move-Bn26HYrn.js} +0 -0
- /package/dist/assets/{narrat-C1e9cFYb.js → narrat-Cy8di6K9.js} +0 -0
- /package/dist/assets/{nextflow-groovy-WB_Hv0pj.js → nextflow-groovy-BJBZYnqb.js} +0 -0
- /package/dist/assets/{night-owl-BpHVNbG5.js → night-owl-BaJh1bae.js} +0 -0
- /package/dist/assets/{night-owl-light-B7XHq6BU.js → night-owl-light-DOIQSNZE.js} +0 -0
- /package/dist/assets/{nix-Bz43yTHV.js → nix-DYMb3fN3.js} +0 -0
- /package/dist/assets/{nord-C3Ef8EYs.js → nord-Dfe8nufc.js} +0 -0
- /package/dist/assets/{nushell-BDgFfjsp.js → nushell-BecinQos.js} +0 -0
- /package/dist/assets/{objective-c-CrKuI4kq.js → objective-c-wBEbMfkE.js} +0 -0
- /package/dist/assets/{objective-cpp-Cq2sz32p.js → objective-cpp-DwsMXks9.js} +0 -0
- /package/dist/assets/{ocaml-CaddozqL.js → ocaml-DwRdjLFM.js} +0 -0
- /package/dist/assets/{odin-3oMQ00A0.js → odin-CjlC7GSD.js} +0 -0
- /package/dist/assets/{one-dark-pro-Dtx2KhVV.js → one-dark-pro-DQhIyD5N.js} +0 -0
- /package/dist/assets/{one-light-BNUXpRjj.js → one-light-CBfRrrPU.js} +0 -0
- /package/dist/assets/{openscad-Bl9bEK7K.js → openscad-CHCGCt5B.js} +0 -0
- /package/dist/assets/{pascal-DAlnwvFf.js → pascal-DSLi1dwC.js} +0 -0
- /package/dist/assets/{pkl-CUN5bqal.js → pkl-CYrbmtMh.js} +0 -0
- /package/dist/assets/{plastic-BTnTnib5.js → plastic-CcBG239g.js} +0 -0
- /package/dist/assets/{plsql-CSbyze_M.js → plsql-DW8rLCTs.js} +0 -0
- /package/dist/assets/{po-DNd8SYOs.js → po-DRD9UGH5.js} +0 -0
- /package/dist/assets/{poimandres-Du8CR7IV.js → poimandres-C1Y8UWlv.js} +0 -0
- /package/dist/assets/{polar-BP89cGjR.js → polar-BuMHPk14.js} +0 -0
- /package/dist/assets/{postcss-DP5swxmN.js → postcss-D_KibIwL.js} +0 -0
- /package/dist/assets/{powerquery-8FFmlmIB.js → powerquery-DPqdCtl4.js} +0 -0
- /package/dist/assets/{powershell-Df4bjjrh.js → powershell-B_nHu8ou.js} +0 -0
- /package/dist/assets/{preload-helper-CS_K7l1U.js → preload-helper-BewR0kVT.js} +0 -0
- /package/dist/assets/{prisma-GVbmmvVi.js → prisma-CEKpljWu.js} +0 -0
- /package/dist/assets/{prolog-CgVNaQE6.js → prolog-Be9bhwua.js} +0 -0
- /package/dist/assets/{proto-DQgw5Bn7.js → proto-DjKKU6XR.js} +0 -0
- /package/dist/assets/{public-asset-CdVbP-K-.js → public-asset-Dx4la7Nv.js} +0 -0
- /package/dist/assets/{puppet-B6qkR0ho.js → puppet-B3_5JXyb.js} +0 -0
- /package/dist/assets/{purescript-D6HPYETy.js → purescript-B40B7hnk.js} +0 -0
- /package/dist/assets/{python-BQxVVqSC.js → python-CBtENHpB.js} +0 -0
- /package/dist/assets/{qmldir-C4uLs1pY.js → qmldir-DmmSKh1z.js} +0 -0
- /package/dist/assets/{qss-CrbqJ-bS.js → qss-DC50xW7x.js} +0 -0
- /package/dist/assets/{queryOptions-C_ypb2wA.js → queryOptions-BtNi-_9H.js} +0 -0
- /package/dist/assets/{r-BYcMR2CA.js → r-Bxh_P6nZ.js} +0 -0
- /package/dist/assets/{racket-CYlA9b-a.js → racket-Cd0dc7Z9.js} +0 -0
- /package/dist/assets/{raku-DskHTPaV.js → raku-Bez4O8bz.js} +0 -0
- /package/dist/assets/{red-C6BsNewa.js → red-B6c6GahA.js} +0 -0
- /package/dist/assets/{reg-CVAsZyTh.js → reg-RGHB2vyu.js} +0 -0
- /package/dist/assets/{regexp-CE46xxOu.js → regexp-B4qMM8sH.js} +0 -0
- /package/dist/assets/{rel-C3ws-d8w.js → rel-BzD8rdGz.js} +0 -0
- /package/dist/assets/{riscv-zwK-GGe7.js → riscv-R9qNw498.js} +0 -0
- /package/dist/assets/{ron-DKXxeRcR.js → ron-fTY3p6VR.js} +0 -0
- /package/dist/assets/{rose-pine-D16YZ514.js → rose-pine-0XrcwhjC.js} +0 -0
- /package/dist/assets/{rose-pine-dawn-C6PC9FaW.js → rose-pine-dawn-om3p9-A_.js} +0 -0
- /package/dist/assets/{rose-pine-moon-B-ONpfIN.js → rose-pine-moon-MGxH_v4S.js} +0 -0
- /package/dist/assets/{rosmsg-Cly8Evf4.js → rosmsg-CVvSijm3.js} +0 -0
- /package/dist/assets/{rust-COkR_9xi.js → rust-CA961RlG.js} +0 -0
- /package/dist/assets/{sass-DDyX_867.js → sass-CoOeSP7H.js} +0 -0
- /package/dist/assets/{scala-BseDqmtP.js → scala-Bbpmmahb.js} +0 -0
- /package/dist/assets/{scheme-0Ar7fzWG.js → scheme-D-G16M41.js} +0 -0
- /package/dist/assets/{sdbl-BjheWPT8.js → sdbl-BhfGXOJp.js} +0 -0
- /package/dist/assets/{semver-DI5hyC-t.js → semver-Dd0ocNOn.js} +0 -0
- /package/dist/assets/{shellscript-DbCYZXfD.js → shellscript-Cwj5scmN.js} +0 -0
- /package/dist/assets/{slack-dark-B8yuPDrG.js → slack-dark-EnMwLJh2.js} +0 -0
- /package/dist/assets/{slack-ochin-DLZ-yxLq.js → slack-ochin-DbQZnuuX.js} +0 -0
- /package/dist/assets/{smalltalk-DhsjsTfs.js → smalltalk-wkvAA4Ge.js} +0 -0
- /package/dist/assets/{snazzy-light-BdZObzxx.js → snazzy-light-HKT43YcO.js} +0 -0
- /package/dist/assets/{solarized-dark-DnY9BvAi.js → solarized-dark-DHekkVtS.js} +0 -0
- /package/dist/assets/{solarized-light-BfrwmYru.js → solarized-light-MPvd5SW1.js} +0 -0
- /package/dist/assets/{solidity-DPjYkHh9.js → solidity-B7JThXr2.js} +0 -0
- /package/dist/assets/{splunk-aauv22i7.js → splunk-GQMh95CP.js} +0 -0
- /package/dist/assets/{sql-ChQ8ry3n.js → sql-BXe6lADW.js} +0 -0
- /package/dist/assets/{ssh-config-Dz6ViL0P.js → ssh-config-DVuuj5mu.js} +0 -0
- /package/dist/assets/{stylus-BOOipACK.js → stylus-DbmaQDjE.js} +0 -0
- /package/dist/assets/{swift-m0EGSEdy.js → swift-BSc6I7H3.js} +0 -0
- /package/dist/assets/{synthwave-84-BgN63B7_.js → synthwave-84-vXwrabUd.js} +0 -0
- /package/dist/assets/{system-verilog-DA9NXNZH.js → system-verilog-DGtgT0u9.js} +0 -0
- /package/dist/assets/{systemd-6ndOYGhY.js → systemd-DjhZZzlg.js} +0 -0
- /package/dist/assets/{talonscript-B8LuZYir.js → talonscript-jbZ73QSp.js} +0 -0
- /package/dist/assets/{tasl-xnHVT9C9.js → tasl-Cp0NySwy.js} +0 -0
- /package/dist/assets/{tcl-BODTsuI7.js → tcl-CDvB7l7r.js} +0 -0
- /package/dist/assets/{terraform-BKPIDy8E.js → terraform-ViADpNla.js} +0 -0
- /package/dist/assets/{tokyo-night-DL0vCNuB.js → tokyo-night-CP5B0W8z.js} +0 -0
- /package/dist/assets/{toml-DFQNE4Bb.js → toml-Ng7oUEBY.js} +0 -0
- /package/dist/assets/{tsv-CiCFnPYM.js → tsv-CBEPJV1q.js} +0 -0
- /package/dist/assets/{tsx-r66DnitA.js → tsx-Bay-x93q.js} +0 -0
- /package/dist/assets/{turtle-D6TqBP-R.js → turtle-6k3HpfrS.js} +0 -0
- /package/dist/assets/{typescript-DywEkG3h.js → typescript-CESsi6qd.js} +0 -0
- /package/dist/assets/{typespec-CGjgqr9W.js → typespec-BHVNqmiS.js} +0 -0
- /package/dist/assets/{typst-Bx-thO8d.js → typst-CPHv3Z_E.js} +0 -0
- /package/dist/assets/{usage-window-CsjC43Gn.js → usage-window-D5EMg2nb.js} +0 -0
- /package/dist/assets/{use-is-mobile-B9vjoiOp.js → use-is-mobile-D_xrnINF.js} +0 -0
- /package/dist/assets/{v-4VB7M7V1.js → v-DbQnswmZ.js} +0 -0
- /package/dist/assets/{vala-DyD7epks.js → vala-B9xFrP6Q.js} +0 -0
- /package/dist/assets/{vb-MkcXsT7p.js → vb-DhUjJFob.js} +0 -0
- /package/dist/assets/{verilog-CxKKBB7K.js → verilog-knoXnPW_.js} +0 -0
- /package/dist/assets/{vesper-BWWaFc_5.js → vesper-DMn9sD5q.js} +0 -0
- /package/dist/assets/{vhdl-FnKcRQFJ.js → vhdl-BC236CWS.js} +0 -0
- /package/dist/assets/{viml-CLoIdFzC.js → viml-BiHN9dcP.js} +0 -0
- /package/dist/assets/{vitesse-black-LsvPTIiF.js → vitesse-black-BPikaA4r.js} +0 -0
- /package/dist/assets/{vitesse-dark-xzpAWWRe.js → vitesse-dark-etdagetc.js} +0 -0
- /package/dist/assets/{vitesse-light-Dw68nIQJ.js → vitesse-light-wF4P0Zsy.js} +0 -0
- /package/dist/assets/{vyper-DMsUwnVX.js → vyper-9LO9XYNL.js} +0 -0
- /package/dist/assets/{wasm-CGZ0ykRa.js → wasm-BQxIq9Eb.js} +0 -0
- /package/dist/assets/{wasm-ic38CN6z.js → wasm-cLEfWrbG.js} +0 -0
- /package/dist/assets/{wenyan-COLZAIZW.js → wenyan-CpO3LOSA.js} +0 -0
- /package/dist/assets/{wgsl-D-u1_3zX.js → wgsl-DVMBiogp.js} +0 -0
- /package/dist/assets/{wikitext-l1E17Wn7.js → wikitext-C4YdJkhb.js} +0 -0
- /package/dist/assets/{wit-BW55uw8a.js → wit-Dk2LwD_7.js} +0 -0
- /package/dist/assets/{with-selector-CZyYmUFz.js → with-selector-BomrVLKx.js} +0 -0
- /package/dist/assets/{wolfram-C0owoV7l.js → wolfram-BewBpAXL.js} +0 -0
- /package/dist/assets/{xterm-AXHTOo82.js → xterm-D62GGRqD.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-CfpfPbfB.js → xterm-addon-fit-B4zTZTld.js} +0 -0
- /package/dist/assets/{yaml-DP2H7z8n.js → yaml-DvBKdDiG.js} +0 -0
- /package/dist/assets/{zenscript-ChRsLAgZ.js → zenscript-CSyyk0b_.js} +0 -0
- /package/dist/assets/{zig-s66PLVk_.js → zig-DUP4LvJO.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
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{t as i}from"./react-DJZBPgpf.js";import{d as a,m as o}from"./chunk-5KNZJZUH-BpLAEZ0-.js";import{n as s}from"./QueryClientProvider-DBAeGN3q.js";import{t as c}from"./useQuery-DAtrV0RI.js";import{t as l}from"./useMutation-DTb3lMvF.js";import{t as u}from"./jsx-runtime-XSukodg_.js";import{t as d}from"./button-Cs9tc8OR.js";import{t as f}from"./typography-PN7B1rrW.js";import{t as p}from"./dropdown-PPtOL9bp.js";import{t as m}from"./confirm-dialog-DavdF-L4.js";import{t as h}from"./notice-BWm2kHlI.js";import{t as g}from"./tag-BkZB4euH.js";import{t as _}from"./input-DwAJUlac.js";import{t as v}from"./toggle-DGzEs0L1.js";import{n as y}from"./stat-square-CMFH3mHq.js";import{t as b}from"./modal-C7CS3Y_X.js";import{t as x}from"./toast-Cii5pffK.js";import{t as S}from"./selection-store-BCKoLRDh.js";import{t as C}from"./createLucideIcon-D8wUFCt3.js";import{n as w,t as T}from"./domain-field-CyNgwvDW.js";import{t as E}from"./external-link-CcV79Arv.js";import{t as D}from"./loader-circle-FEkI0Am4.js";import{C as O,Et as k,Jt as A,Tt as j,Y as M,b as N,yn as P}from"./sdk.gen-up8j0_uF.js";import{C as F,N as I,S as L,s as R}from"./react-query.gen-CfXF72qo.js";import{r as z}from"./api-errors-DhNZwQy5.js";import{i as B,t as V}from"./capture-error-1Tr5aMfq.js";import{i as ee}from"./routes-C-DwSCj0.js";import{t as H}from"./use-is-org-ready-Dtde_1TT.js";import{r as U}from"./query-tags-yOSQTht4.js";import{t as W}from"./assistant-feature-flag-store-CNdFPRBD.js";import{$r as G,Ar as K,Br as te,Cr as q,Ct as ne,Dr as J,Dt as re,Er as ie,Et as ae,Fr as oe,Gr as Y,Hr as se,Ir as X,Jr as ce,Kr as le,Lr as ue,Mr as de,Mt as fe,Nr as pe,Or as me,Ot as he,Pr as ge,Qr as _e,Rr as ve,St as ye,Ta as be,Tr as xe,Tt as Se,Ur as Ce,Vr as we,Wr as Te,Xr as Ee,Yr as De,Zr as Oe,_i as ke,ai as Ae,bt as je,ci as Me,di as Ne,ei as Pe,fi as Fe,fo as Ie,gi as Le,ii as Re,ji as ze,jr as Be,jt as Ve,kr as He,kt as Ue,li as We,lo as Ge,mi as Ke,ni as qe,nr as Je,oi as Ye,pi as Xe,pn as Ze,pt as Qe,qi as $e,qr as et,ri as tt,ro as nt,si as rt,so as it,ti as at,ui as ot,vi as st,wr as ct,wt as lt,xt as ut,yt as dt,zr as ft}from"./index-DUwiZuxe.js";import{t as pt}from"./detail-card-Y8InXOgy.js";var mt=C(`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(i(),1),Q=u();function ht({mode:e,onChange:t}){return(0,Q.jsx)(`div`,{className:`max-w-[280px]`,children:(0,Q.jsx)(y,{ariaLabel:`Service mode`,value:e,onChange:t,items:[{value:`managed`,label:`Managed`},{value:`your-own`,label:`Your Own`}]})})}function gt({id:e,title:t,subtitle:n,mode:r,onModeChange:i,children:a}){return(0,Q.jsxs)(pt,{id:e,title:t,subtitle:n,accessory:(0,Q.jsx)(ht,{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)(d,{onClick:e,disabled:t,children:`Save`})}function _t({onClick:e,filled:t=!1}){return(0,Q.jsx)(d,{variant:t?`danger`:`dangerGhost`,onClick:e,children:`Reset`})}function vt({id:e,title:t,subtitle:n,children:r}){return(0,Q.jsxs)(pt,{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 yt({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)(be,{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)(E,{className:`h-3 w-3`})]})]})]})}function bt({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)(D,{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)(Ie,{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)(nt,{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)(Ge,{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 xt=`__custom__`;function St(e){return e?!!(e.profile||e.provider||e.model):!1}function Ct(e,t){let n=St(e);return n===St(t)?n?(e?.profile??null)===(t?.profile??null)&&(e?.provider??null)===(t?.provider??null)&&(e?.model??null)===(t?.model??null):!0:!1}function wt({id:e,displayName:t,description:n,defaultProfileLabel:r,draft:i,profileOptions:a,onDraftChange:o,onToggle:s}){let c=St(i),l=!i||!c?``:i.provider||i.model?xt:i.profile??``,u=l===xt,d=i?.provider??Pe[0],f=ke(d??`anthropic`).map(e=>({value:e.id,label:e.displayName})),m=!!i?.provider&&!i?.model;function h(t){if(t===`__custom__`){let t=Pe[0];o(e,{profile:null,provider:t,model:Le(t)??``})}else t===``?o(e,null):o(e,{profile:t,provider:null,model:null})}function g(t){let n=Le(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)(p,{value:l,onChange:h,options:a,className:`w-36`}),(0,Q.jsx)(v,{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)(p,{value:d??``,onChange:g,options:Pe.map(e=>({value:e,label:at[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)(p,{value:i?.model??``,onChange:_,options:f})]})]}),m&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:`Pick a model`})]})]})}function Tt(){let e=s(),{data:t}=c(Ve()),n=t?.results?.[0]?.id;return{assistantId:n,resolveAssistantId:(0,Z.useCallback)(async()=>{if(n)return n;let t=(await e.fetchQuery(Ve())).results?.[0]?.id;if(!t)throw Error(`No assistant found`);return t},[n,e])}}function Et(){let{assistantId:e}=Tt(),{data:t}=c({queryKey:U(e),queryFn:async()=>{let{data:t}=await N({path:{assistant_id:e},throwOnError:!0});return t},enabled:!!e,staleTime:3e4,refetchOnWindowFocus:!1}),n=(0,Z.useMemo)(()=>t?.llm?.profiles??{},[t?.llm?.profiles]),r=(0,Z.useMemo)(()=>t?.llm?.profileOrder??[],[t?.llm?.profileOrder]),i=(0,Z.useMemo)(()=>t?.llm?.activeProfile??null,[t?.llm?.activeProfile]),a=(0,Z.useMemo)(()=>t?.llm?.callSites??{},[t?.llm?.callSites]);return{assistantId:e,config:t,profiles:n,profileOrder:r,orderedProfiles:(0,Z.useMemo)(()=>Te(n,r),[n,r]),activeProfile:i,callSites:a}}function Dt(){let e=s(),{assistantId:t,resolveAssistantId:n}=Tt();return l({mutationFn:async e=>{let t=await n(),{data:r}=await O({path:{assistant_id:t},body:e,throwOnError:!0});return{data:r,resolvedId:t}},onMutate:async n=>{if(!t)return;let r=U(t);await e.cancelQueries({queryKey:r});let i=e.getQueryData(r),a=i?le(i,n):void 0;return e.setQueryData(r,e=>e&&se(e,n)),{rollback:a,queryKey:r}},onError:(t,n,r)=>{let{queryKey:i,rollback:a}=r??{};i&&a&&e.setQueryData(i,e=>e&&se(e,a))},onSettled:n=>{let r=n?.resolvedId??t;e.invalidateQueries({queryKey:U(r)})}})}function Ot(){let{resolveAssistantId:e}=Tt();return(0,Z.useCallback)(async(t,n)=>{try{let{data:r}=await P({path:{assistant_id:await e()},body:{value:n,type:`api_key`,name:t},throwOnError:!0});Ce(r)}catch(e){throw e instanceof Error&&e.message===`No assistant found`?x.error(`Assistant not ready. Please try again.`):x.error(`Failed to save ${t} API key. Please try again.`),V(e,{context:`provision_provider_key`}),e}},[e])}function kt({isOpen:e,onClose:t,assistantId:n}){let r=(0,Z.useRef)(!1);return(0,Q.jsx)(b.Root,{open:e,onOpenChange:e=>{!e&&!r.current&&t()},children:e?(0,Q.jsx)(At,{assistantId:n,onClose:t,onSavingChange:e=>{r.current=e}}):null})}function At({assistantId:e,onClose:t,onSavingChange:n}){let{orderedProfiles:r,callSites:i,config:a}=Et(),o=Dt(),[s,l]=(0,Z.useState)(``),[u,f]=(0,Z.useState)({}),[p,h]=(0,Z.useState)(!1),[g,v]=(0,Z.useState)(!1),y=W.use.analyzeConversation(),{data:S,isLoading:C,isError:w,refetch:T}=c({...R({path:{assistant_id:e}}),enabled:!!e,staleTime:6e4,refetchOnWindowFocus:!1}),E=(0,Z.useMemo)(()=>{let e=(S?.callSites??[]).filter(e=>e.id!==`mainAgent`);return y?e:e.filter(e=>e.id!==`analyzeConversation`)},[S,y]),O=!C&&!w&&!!S&&!!a,k=(0,Z.useMemo)(()=>E.map(e=>e.id),[E]),A=(0,Z.useMemo)(()=>{if(!O)return{};let e={};for(let t of k)if(t in u)e[t]=u[t];else{let n=i[t];e[t]=n?{...n}:{}}return e},[O,k,i,u]),j=(0,Z.useMemo)(()=>new Set(k),[k]),M=(0,Z.useMemo)(()=>Object.entries(i).some(([e,t])=>j.has(e)&&(t?.profile!=null||t?.provider!=null||t?.model!=null)),[i,j]),N=(0,Z.useMemo)(()=>{if(!O)return!1;for(let e of Object.keys(A))if(!Ct(A[e],i[e]))return!0;return!1},[O,A,i]),P=(0,Z.useMemo)(()=>Object.values(A).some(e=>St(e)&&!!e?.provider&&!e?.model),[A]),F=W.use.queryComplexityRouting(),I=(0,Z.useCallback)(e=>[...ve(we(r,[e]),F).map(e=>({value:e.name,label:ft(e)})),{value:xt,label:`Custom`}],[r,F]),L=(0,Z.useMemo)(()=>{if(!s.trim())return E;let e=s.toLowerCase();return E.filter(t=>(t.displayName??``).toLowerCase().includes(e)||(t.description??``).toLowerCase().includes(e)||(t.domain??``).toLowerCase().includes(e))},[E,s]),z=(0,Z.useMemo)(()=>{if(!S)return[];let e=S.domains.map(e=>e.id),t=new Map(S.domains.map(e=>[e.id,e])),n=[];for(let r of e){let e=L.filter(e=>e.domain===r);e.length>0&&n.push({domain:t.get(r),sites:e})}let r=new Set(e),i=L.filter(e=>!r.has(e.domain));return i.length>0&&n.push({domain:{id:`other`,displayName:`Other`},sites:i}),n},[S,L]),B=(0,Z.useCallback)((e,t)=>{f(n=>({...n,[e]:t}))},[]),ee=(0,Z.useCallback)((e,t)=>{if(!t){f(t=>({...t,[e]:null}));return}let n=te(r,E.find(t=>t.id===e)?.defaultProfile,F);if(n)f(t=>({...t,[e]:{profile:n}}));else{let t=Pe[0],n=Le(t)??``;f(r=>({...r,[e]:{provider:t,model:n}}))}},[E,r,F]),H=(0,Z.useCallback)(async()=>{h(!0),n?.(!0);try{let e={};for(let t of Object.keys(A)){let n=A[t]??null;e[t]=St(n)?{profile:n?.profile??null,provider:n?.provider??null,model:n?.model??null}:null}await o.mutateAsync({llm:{callSites:e}}),t(),x.success(`Overrides saved.`)}catch(e){x.error(`Failed to save overrides. Please try again.`),V(e,{context:`call_site_overrides_save`})}finally{h(!1),n?.(!1)}},[A,t,o,n]),U=(0,Z.useCallback)(async()=>{h(!0),n?.(!0);try{let e={};for(let t of Object.keys(A))e[t]=null;await o.mutateAsync({llm:{callSites:e}}),t(),x.success(`Overrides reset.`)}catch(e){x.error(`Failed to reset overrides. Please try again.`),V(e,{context:`call_site_overrides_reset`})}finally{h(!1),n?.(!1)}},[A,t,o,n]);return(0,Q.jsxs)(b.Content,{size:`lg`,hideCloseButton:!0,children:[(0,Q.jsxs)(b.Header,{children:[(0,Q.jsx)(b.Title,{children:`Action Overrides`}),(0,Q.jsx)(b.Description,{children:`Customize which model profile specific actions should use. Uses your default profile if no override is set.`})]}),(0,Q.jsxs)(b.Body,{children:[(0,Q.jsx)(`div`,{className:`mb-4`,children:(0,Q.jsx)(_,{type:`search`,value:s,onChange:e=>l(e.target.value),placeholder:`Search actions…`,leftIcon:(0,Q.jsx)($e,{className:`h-4 w-4`}),fullWidth:!0})}),C&&(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Q.jsx)(D,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`})}),w&&(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)(d,{variant:`outlined`,size:`compact`,onClick:()=>void T(),children:`Retry`})]}),!C&&!w&&S&&(0,Q.jsx)(`div`,{className:`space-y-4`,children:z.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.`}):z.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=A[e.id]??null;return!t||!St(t)?``:t.provider||t.model?`__custom__`:t.profile??``})(),n=e.defaultProfile?r.find(t=>t.name===e.defaultProfile)?.label??e.defaultProfile:null;return(0,Q.jsx)(wt,{id:e.id,displayName:e.displayName,description:e.description,defaultProfileLabel:n,draft:A[e.id]??null,profileOptions:I(t===``||t===`__custom__`?null:t),onDraftChange:B,onToggle:ee},e.id)})})]},e.id))})]}),(0,Q.jsxs)(b.Footer,{children:[M&&(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:()=>v(!0),disabled:p||!O,tintColor:`var(--system-negative-strong)`,className:`mr-auto`,children:`Reset to Defaults`}),(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:t,disabled:p,children:`Cancel`}),(0,Q.jsx)(d,{variant:`primary`,size:`compact`,onClick:()=>void H(),disabled:!N||P||p,children:p?(0,Q.jsx)(D,{className:`h-4 w-4 animate-spin`}):`Save`})]}),(0,Q.jsx)(m,{open:g,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:()=>{v(!1),U()},onCancel:()=>v(!1)})]})}function jt({blocked:e,availableReplacements:t,replacement:n,onReplacementChange:r,error:i,saving:a,onClose:o,onConfirm:s}){let c=``;if(e){let t=e.label||e.name;c=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)(b.Root,{open:e!==null,onOpenChange:e=>{e||o()},children:(0,Q.jsxs)(b.Content,{size:`sm`,children:[(0,Q.jsx)(b.Header,{children:(0,Q.jsx)(b.Title,{children:`Can't Delete Profile`})}),(0,Q.jsxs)(b.Body,{className:`space-y-4`,children:[(0,Q.jsx)(f,{variant:`body-medium-default`,as:`p`,children:c}),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)(p,{"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)(f,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:i})]}),(0,Q.jsxs)(b.Footer,{children:[(0,Q.jsx)(d,{variant:`ghost`,size:`compact`,onClick:o,children:`Cancel`}),(0,Q.jsx)(d,{variant:`primary`,size:`compact`,disabled:!n||a,onClick:s,children:a?`Saving…`:`Reassign and Delete`})]})]})})}function Mt({profile:e,isDragging:t,dropTarget:n,isDeleting:r,deleteError:i,isToggling:a,onDragStart:o,onDragEnd:s,onDragOver:c,onDragLeave:l,onDrop:u,onEditClick:p,onDeleteClick:m,onStatusToggle:h}){let _=e.source===`managed`,y=e.status!==`disabled`,b=e.name===ue;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:!_,onDragStart:o,onDragEnd:s,onDragOver:c,onDragLeave:l,onDrop:u,children:[(0,Q.jsx)(mt,{className:`h-4 w-4 shrink-0 ${_?`invisible`:`cursor-grab text-[var(--content-tertiary)]`}`}),(0,Q.jsxs)(`div`,{className:`min-w-0 flex-1${y?``:` opacity-55`}`,children:[(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(f,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),_&&e.name!==`auto`&&(0,Q.jsx)(g,{tone:`positive`,title:`Managed by Platform — auth is locked, but you can rename or disable this profile.`,children:`Platform`})]}),e.description?(0,Q.jsx)(f,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:e.description}):null,e.model??e.provider?(0,Q.jsx)(f,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:e.model??e.provider}):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:y?`Active — toggle to hide from pickers`:`Disabled — toggle to show in pickers`,children:(0,Q.jsx)(v,{checked:y,onChange:e=>h(e),disabled:a,"aria-label":`${y?`Disable`:`Enable`} ${e.label??e.name}`})}),(0,Q.jsxs)(`div`,{className:`flex w-[92px] items-center justify-end gap-2${b?` invisible`:``}`,children:[(0,Q.jsx)(d,{variant:`ghost`,size:`compact`,onClick:p,children:_?`View`:`Edit`}),(0,Q.jsx)(d,{variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(ze,{}),"aria-label":`Delete ${e.label??e.name}`,disabled:_||r,title:_?`Managed profiles cannot be deleted`:void 0,onClick:m,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)(f,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:i}):null,e.name===`auto`&&(0,Q.jsx)(`div`,{className:`mx-2 mt-1 border-b border-[var(--border-subtle)]`})]})}function Nt({isOpen:e,assistantId:t,onClose:n}){let{profiles:r,profileOrder:i,orderedProfiles:a,activeProfile:o,callSites:s}=Et(),l=Dt(),u=W.use.openAICompatibleEndpoints(),d=W.use.chatgptSubscriptionAuth(),[f,p]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(null),{data:g}=c({...L({path:{assistant_id:t}}),enabled:e}),_=(0,Z.useMemo)(()=>g?ge(g.connections,u):void 0,[g,u]),v=Object.keys(r);async function y(e,t,n){let a=n?.mode??`replace`,o=!(e in r);if(a===`merge`&&!o){await l.mutateAsync({llm:{profiles:{[e]:t}}}),p(!1),h(null);return}let s={profiles:{[e]:t}};if(o&&(s.profileOrder=i.includes(e)?i:[...i,e]),o)await l.mutateAsync({llm:s});else{let t=r[e];await l.mutateAsync({llm:{profiles:{[e]:null}}});try{await l.mutateAsync({llm:s})}catch(n){throw V(n,{context:`settings-ai-profile-edit-recreate`}),t!=null&&await l.mutateAsync({llm:{profiles:{[e]:t}}}).catch(()=>{}),n}}o&&x.success(`Profile "${t.label??e}" created`),p(!1),h(null)}return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(b.Root,{open:e,onOpenChange:e=>{e||n()},children:e?(0,Q.jsx)(Pt,{profiles:r,profileOrder:i,orderedProfiles:a,activeProfile:o,callSiteOverrides:s,onClose:n,onEditClick:e=>{h(e),p(!0)},onNewClick:()=>{h(null),p(!0)}}):null}),(0,Q.jsx)(q,{isOpen:f,mode:m?m.source===`managed`?`view`:`edit`:`create`,profileName:m?.name,initialValues:m??void 0,existingNames:v,connections:_,openAICompatibleEndpointsEnabled:u,assistantId:t,chatgptSubscriptionEnabled:d,onSave:y,onCancel:()=>{p(!1),h(null)}})]})}function Pt({profiles:e,profileOrder:t,orderedProfiles:n,activeProfile:r,callSiteOverrides:i,onClose:a,onEditClick:o,onNewClick:s}){let c=Dt(),[l,u]=(0,Z.useState)({}),[p,m]=(0,Z.useState)({}),[h,g]=(0,Z.useState)(new Set),[_,v]=(0,Z.useState)(null),[y,x]=(0,Z.useState)(null),[S,C]=(0,Z.useState)(null),[w,T]=(0,Z.useState)(null),E=(0,Z.useRef)(null),D=(0,Z.useRef)(null),[O,k]=(0,Z.useState)(null),[A,j]=(0,Z.useState)(null),[M,N]=(0,Z.useState)(``),[P,F]=(0,Z.useState)(!1),I=W.use.queryComplexityRouting(),L=(0,Z.useMemo)(()=>ve(n,I),[n,I]);async function R(t,n){if(h.has(t.name))return!1;g(e=>new Set(e).add(t.name)),v(null);let r=n?`active`:`disabled`;if(!e[t.name])return g(e=>{let n=new Set(e);return n.delete(t.name),n}),!1;try{return await c.mutateAsync({llm:{profiles:{[t.name]:{status:r}}}}),!0}catch(e){return V(e,{context:`settings-ai-profile-toggle`}),v(`Couldn't update "${t.label??t.name}". Please try again.`),!1}finally{g(e=>{let n=new Set(e);return n.delete(t.name),n})}}async function z(e){m(t=>({...t,[e]:!0})),u(t=>{let n={...t};return delete n[e],n});try{let n=t.filter(t=>t!==e);await c.mutateAsync({llm:{profiles:{[e]:null},profileOrder:n}})}catch(t){V(t,{context:`settings-ai-profile-delete`}),u(t=>({...t,[e]:`Failed to delete profile. Please try again.`}))}finally{m(t=>{let n={...t};return delete n[e],n})}}function B(e){let t=L.find(t=>t.name===e)?.label??e,n=e===r,a=Object.entries(i).filter(([t,n])=>t!==`mainAgent`&&n?.profile===e).map(([e])=>e);if(n||a.length>0){k({name:e,label:t,isActive:n,callSiteIds:a}),N(``),j(null);return}z(e)}async function ee(){if(!O||!M)return;F(!0),j(null);let e={};if(O.isActive&&(e.activeProfile=M),O.callSiteIds.length>0){let t={};for(let e of O.callSiteIds)t[e]={profile:M};e.callSites=t}if(Object.keys(e).length>0)try{await c.mutateAsync({llm:e})}catch(e){V(e,{context:`settings-ai-profile-reassign-delete`}),j(`Failed to reassign references. Please try again.`),F(!1);return}let t=O.name;k(null),F(!1),z(t)}async function H(e,n){if(e===n.name)return;T(null);let r=t.filter(t=>t!==e),i=r.indexOf(n.name);if(i===-1)return;n.after&&(i+=1);let a=[...r.slice(0,i),e,...r.slice(i)];try{await c.mutateAsync({llm:{profileOrder:a}})}catch(e){V(e,{context:`settings-ai-profile-reorder`}),T(`Failed to reorder profiles. Please try again.`)}}let U=L.filter(e=>e.name!==O?.name&&e.source!==`managed`),G=U.length>0?U:L.filter(e=>e.name!==O?.name);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(b.Content,{size:`md`,children:[(0,Q.jsxs)(b.Header,{children:[(0,Q.jsx)(b.Title,{children:`Model Profiles`}),(0,Q.jsx)(b.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)(b.Body,{children:[L.length===0?(0,Q.jsx)(f,{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:L.map(e=>(0,Q.jsx)(Mt,{profile:e,isDragging:y===e.name,dropTarget:S,isDeleting:p[e.name]??!1,deleteError:l[e.name],isToggling:h.has(e.name),onDragStart:t=>{E.current=e.name,x(e.name),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`)},onDragEnd:()=>{E.current=null,D.current=null,x(null),C(null)},onDragOver:t=>{t.preventDefault();let n=t.currentTarget.getBoundingClientRect(),r=t.clientY>n.top+n.height/2,i={name:e.name,after:r};D.current=i,C(i)},onDragLeave:t=>{t.currentTarget.contains(t.relatedTarget)||(D.current=null,C(t=>t?.name===e.name?null:t))},onDrop:e=>{e.preventDefault();let t=E.current,n=D.current;E.current=null,D.current=null,x(null),C(null),t&&n&&H(t,n)},onEditClick:()=>o(e),onDeleteClick:()=>B(e.name),onStatusToggle:t=>void R(e,t)},e.name))}),w&&(0,Q.jsx)(f,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:w}),_&&(0,Q.jsx)(f,{variant:`body-small-default`,as:`p`,className:`mt-2 text-(--system-negative-strong)`,children:_})]}),(0,Q.jsxs)(b.Footer,{className:`justify-between`,children:[(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:s,children:`+ New Profile`}),(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:a,children:`Done`})]})]}),(0,Q.jsx)(jt,{blocked:O,availableReplacements:G,replacement:M,onReplacementChange:N,error:A,saving:P,onClose:()=>{k(null),j(null)},onConfirm:()=>void ee()})]})}function Ft({mode:e,connection:t,assistantId:n,existingNames:r,openAICompatibleEndpointsEnabled:i=!1,chatgptSubscriptionEnabled:a=!1,onSave:o,onCancel:c}){let[l,u]=(0,Z.useState)(e),[m,h]=(0,Z.useState)(void 0),g=l===`managed-edit`,[v,y]=(0,Z.useState)(t?.label??``),[x,S]=(0,Z.useState)(t?.name??``),[C,w]=(0,Z.useState)(t?.provider??`anthropic`),[T,E]=(0,Z.useState)(()=>t?t.auth.type:`platform`),[D,O]=(0,Z.useState)(()=>t?.auth.type===`api_key`?t.auth.credential:t?``:`credential/anthropic/api_key`),[A,j]=(0,Z.useState)(t?.baseUrl??``),[M,N]=(0,Z.useState)(()=>t?.models?t.models.map(e=>e.id).join(`, `):``),[F,I]=(0,Z.useState)(!1),[L,R]=(0,Z.useState)(null),z=C===`openai-compatible`,B=(0,Z.useMemo)(()=>{let e=i?He:He.filter(e=>e!==`openai-compatible`);return C&&!e.includes(C)?[...e,C]:e},[i,C]),{handleLabelChange:V,resetDirty:ee}=ie(l,y,S),[H,U]=(0,Z.useState)(``),[W,G]=(0,Z.useState)(!1),te=s(),q=(0,Z.useMemo)(()=>Be(D),[D]),ne=T===`api_key`&&q!==null,{hasStoredCredential:re,isLoading:ae,queryKey:Y}=X({assistantId:n,credentialKind:`credential`,credentialName:q?`${q.service}:${q.field}`:``,enabled:ne,errorContext:`settings-provider-editor-credential-presence`}),{credentials:se,queryKey:ce}=xe({assistantId:n,enabled:T===`api_key`});(0,Z.useEffect)(()=>{let e=t?.provider??`anthropic`;y(t?.label??``),S(t?.name??``),w(e),E(t?t.auth.type:`platform`),t?.auth.type===`api_key`?O(t.auth.credential):O(t?``:`credential/${e}/api_key`),ee(),R(null),j(t?.baseUrl??``),N(t?.models?t.models.map(e=>e.id).join(`, `):``),U(``),G(!1)},[t,ee]);function le(){u(`create`),h(C===`ollama`?`none`:`api_key`)}let ue=x.trim().length>0;async function fe(){if(ue){I(!0),R(null);try{let e;if(T===`api_key`){let t=D.trim()||`credential/${C}/api_key`,r=H.trim();if(r){G(!0);try{let e=Be(t);await P({path:{assistant_id:n},body:e?{type:`credential`,name:`${e.service}:${e.field}`,value:r}:{type:`api_key`,name:C,value:r},throwOnError:!0}),te.setQueryData(Y,!0),te.invalidateQueries({queryKey:ce})}catch{R(`Failed to save API key. Please try again.`);return}finally{G(!1)}}e={type:`api_key`,credential:t}}else if(T===`oauth_subscription`)if(t?.auth.type===`oauth_subscription`)e=t.auth;else{R(`Use the "Sign in with ChatGPT" button to connect your subscription.`);return}else e=T===`none`?{type:`none`}:{type:`platform`};let r=v.trim()||null,i={auth:e,label:r,...z&&{base_url:A.trim()||null,models:M.trim()?M.split(`,`).map(e=>({id:e.trim()})).filter(e=>e.id):null}},{data:a,response:s}=await k({path:{assistant_id:n,name:t?.name??x.trim()},body:i});if(!s?.ok){R(K(s?.status,x.trim()));return}if(!a){R(`Server returned an empty response. Please try again.`);return}o(a)}catch{R(`Failed to save connection. Please try again.`)}finally{I(!1)}}}let he=se.filter(e=>e.service===C),ge=l!==`create`&&t?.auth.type===`api_key`,_e=he.length>0||ge,ve=J(`Enter your API key`,re);return l===`create`?(0,Q.jsx)(ct,{variant:`modal`,assistantId:n,existingNames:r,openAICompatibleEndpointsEnabled:i,chatgptSubscriptionEnabled:a,defaultProviderType:C,defaultAuthType:m,onCreated:o,onCancel:c},C):(0,Q.jsxs)(b.Content,{size:`md`,children:[(0,Q.jsxs)(b.Header,{children:[(0,Q.jsx)(b.Title,{children:`Edit Connection`}),(0,Q.jsx)(b.Description,{children:g?`Managed by Vellum — auth is locked, but you can rename "${t?.name}".`:`Editing "${t?.name}".`})]}),(0,Q.jsxs)(b.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)(_,{value:v,onChange:e=>V(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)(_,{value:x,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)(p,{"aria-label":`Provider`,value:C,onChange:e=>w(e),disabled:!0,options:B.map(e=>({value:e,label:pe[e]}))})]}),z&&(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)(_,{value:A,onChange:e=>j(e.target.value),placeholder:`https://api.example.com/v1`,disabled:g,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)(_,{value:M,onChange:e=>N(e.target.value),placeholder:`model-1, model-2`,disabled:g,fullWidth:!0}),(0,Q.jsx)(f,{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)(p,{"aria-label":`Auth type`,value:T,onChange:e=>{E(e),R(null)},disabled:g||C===`ollama`,options:(()=>{let e;return e=C===`ollama`?[`none`]:st(C)?[`api_key`,`platform`]:[`api_key`],T&&!e.includes(T)&&e.push(T),e.map(e=>({value:e,label:me[e]}))})()})]}),T===`api_key`&&(0,Q.jsx)(de,{apiKeyValue:H,onApiKeyChange:U,credential:D,onCredentialChange:O,isAuthLocked:g,isLoadingCredential:ae,apiKeyPlaceholder:ve,provider:C,providerCredentials:he,showAdvancedSection:_e,onError:R}),T===`oauth_subscription`&&(0,Q.jsx)(oe,{assistantId:n,onConnected:o}),L&&(0,Q.jsx)(f,{variant:`body-small-default`,as:`p`,className:`text-(--system-negative-strong)`,children:L})]}),(0,Q.jsxs)(b.Footer,{children:[(0,Q.jsx)(d,{variant:`ghost`,size:`compact`,onClick:c,children:`Cancel`}),l===`managed-edit`&&(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:le,disabled:F||W,children:`Save as New`}),(0,Q.jsx)(d,{variant:`primary`,size:`compact`,disabled:!ue||F||W,onClick:()=>void fe(),children:F?`Saving…`:`Save`})]})]})}function It(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 Lt({isOpen:e,assistantId:t,onClose:n}){let r=W.use.openAICompatibleEndpoints(),i=W.use.chatgptSubscriptionAuth(),[a,o]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(null),d=s(),{data:f,isLoading:p,isError:m}=c({...L({path:{assistant_id:t}}),enabled:e}),h=(0,Z.useMemo)(()=>ge(f?.connections??[],r),[f,r]);function g(e){d.invalidateQueries({queryKey:F({path:{assistant_id:t}})}),o(!1),u(null)}let _=h.map(e=>e.name),v=()=>{o(!1),u(null)};return(0,Q.jsx)(b.Root,{open:e,onOpenChange:e=>{e||(a?v():n())},children:e?a?(0,Q.jsx)(Ft,{mode:l?l.isManaged?`managed-edit`:`edit`:`create`,connection:l??void 0,assistantId:t,existingNames:_,openAICompatibleEndpointsEnabled:r,chatgptSubscriptionEnabled:i,onSave:g,onCancel:v}):(0,Q.jsx)(Rt,{connections:h,loading:p,isError:m,assistantId:t,onClose:n,onEditClick:e=>{u(e),o(!0)},onNewClick:()=>{u(null),o(!0)},onConnectionDeleted:()=>{d.invalidateQueries({queryKey:F({path:{assistant_id:t}})})}}):null})}function Rt({connections:e,loading:t,isError:n,assistantId:r,onClose:i,onEditClick:a,onNewClick:o,onConnectionDeleted:s}){let[c,l]=(0,Z.useState)({}),[u,p]=(0,Z.useState)({});async function m(e){p(t=>({...t,[e]:!0})),l(t=>{let n={...t};return delete n[e],n});try{let{response:t}=await j({path:{assistant_id:r,name:e}});t?.ok||t?.status===404?s(e):t?.status===409?l(t=>({...t,[e]:`Connection is in use by one or more profiles. Remove those references first.`})):l(t=>({...t,[e]:`Failed to delete connection. Please try again.`}))}catch{l(t=>({...t,[e]:`Failed to delete connection. Please try again.`}))}finally{p(t=>{let n={...t};return delete n[e],n})}}return(0,Q.jsxs)(b.Content,{size:`md`,children:[(0,Q.jsxs)(b.Header,{children:[(0,Q.jsx)(b.Title,{children:`Provider Connections`}),(0,Q.jsx)(b.Description,{children:`Manage inference provider connections. Each connection binds a name to a provider and auth configuration.`})]}),(0,Q.jsx)(b.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)(f,{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)(f,{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=u[e.name]??!1,n=c[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)(f,{variant:`body-medium-default`,as:`span`,className:`text-(--content-default)`,children:e.label??e.name}),r&&(0,Q.jsx)(g,{tone:`positive`,title:`Managed by Platform — auth is locked, but you can rename this connection.`,children:`Platform`})]}),(0,Q.jsxs)(f,{variant:`body-medium-lighter`,as:`p`,className:`mt-0.5 text-(--content-tertiary)`,children:[e.label?`${e.name} · `:``,pe[e.provider]??e.provider,` · `,It(e.auth)]})]}),(0,Q.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[(0,Q.jsx)(d,{variant:`ghost`,size:`compact`,onClick:()=>a(e),children:`Edit`}),(0,Q.jsx)(d,{variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(ze,{}),"aria-label":`Delete ${e.name}`,disabled:r||t,title:r?`Managed connections cannot be deleted`:void 0,onClick:()=>void m(e.name),tintColor:`var(--system-negative-strong)`})]})]}),n?(0,Q.jsx)(f,{variant:`body-small-default`,as:`p`,className:`px-2 pb-1 text-(--system-negative-strong)`,children:n}):null]},e.name)})})}),(0,Q.jsxs)(b.Footer,{className:`justify-between`,children:[(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:o,children:`+ New Connection`}),(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:i,children:`Done`})]})]})}function zt(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 Bt(){let{assistantId:e,orderedProfiles:t,activeProfile:n,callSites:r}=Et(),i=Dt(),[a,o]=zt(n),[s,c]=(0,Z.useState)(!1),[l,u]=(0,Z.useState)(!1),[m,h]=(0,Z.useState)(!1),g=W.use.queryComplexityRouting(),_=(0,Z.useMemo)(()=>ve(we(t,[a]),g),[t,a,g]),v=Object.entries(r).filter(([e,t])=>e!==`mainAgent`&&(t?.profile!=null||t?.provider!=null||t?.model!=null)).length,y=v===1?`1 Override`:v>0?`${v} Overrides`:`Overrides`,b=a!==n,S=(0,Z.useCallback)(async()=>{try{await i.mutateAsync({llm:{activeProfile:a}}),x.success(`Profile saved.`)}catch(e){x.error(`Failed to switch profile. Please try again.`),V(e,{context:`settings-ai-language-model-save`})}},[a,i]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(vt,{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)(p,{value:a??``,onChange:e=>{o(e===``?null:e)},placeholder:`Select a default profile…`,options:_.map(e=>({value:e.name,label:e.name===`auto`?`Automatically switch between profiles`:ft(e)}))}),g&&a===`auto`&&(0,Q.jsx)(`div`,{className:`flex items-center gap-2 rounded-lg bg-[var(--surface-warning-subtle)] px-3 py-2`,children:(0,Q.jsx)(`span`,{className:`text-body-small-default text-[var(--content-warning)]`,children:`Auto may use more powerful models when needed, which can increase costs.`})}),_.length===0?(0,Q.jsx)(f,{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:`flex items-center gap-2`,children:[(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:()=>h(!0),children:`Providers`}),(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:()=>c(!0),children:`Profiles`}),(0,Q.jsx)(d,{variant:`outlined`,size:`compact`,onClick:()=>u(!0),children:y})]}),b&&(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:S,disabled:i.isPending}),i.isPending&&(0,Q.jsx)(D,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]})}),e&&(0,Q.jsx)(Nt,{isOpen:s,assistantId:e,onClose:()=>c(!1)}),e&&(0,Q.jsx)(kt,{isOpen:l,onClose:()=>u(!1),assistantId:e}),e&&(0,Q.jsx)(Lt,{isOpen:m,assistantId:e,onClose:()=>h(!1)})]})}function Vt(){let{assistantId:e,config:i}=Et(),a=Dt(),o=Ot(),c=s(),{serverWebSearchMode:l,serverWebSearchProvider:u}=(0,Z.useMemo)(()=>{if(!i)return{serverWebSearchMode:n(Ne,`your-own`),serverWebSearchProvider:n(Fe,`inference-provider-native`)};let e=i.services?.[`web-search`],t=e?.mode;return{serverWebSearchMode:t===`managed`||t===`your-own`?t:n(Ne,`your-own`),serverWebSearchProvider:e?.provider||n(`vellum:ai:webSearchProvider`,`inference-provider-native`)}},[i]),[d,f]=(0,Z.useState)(!1),[m,h]=zt(l),[g,v]=zt(u),[y,b]=(0,Z.useState)(``),S=et.has(g),{hasStoredCredential:C,queryKey:w}=X({assistantId:e,credentialKind:`api_key`,credentialName:g,enabled:S,errorContext:`settings-ai-web-search-read-credential`}),T=y.trim().length>0,E=d||m===`your-own`&&S&&!C&&!T||!(m!==l||(m===`managed`?`inference-provider-native`:g)!==u)&&!T,O=J(Ee[g]??`Enter your API key`,C),k=(0,Z.useCallback)(async()=>{f(!0);let e=y.trim(),t=m===`managed`?`inference-provider-native`:g,n=Y(t),i=m===`your-own`&&S&&e.length>0;try{i&&await o(t,e),await a.mutateAsync({services:{"web-search":{mode:m,provider:t}}}).catch(e=>{throw x.error(`Failed to update assistant configuration. Please try again.`),V(e,{context:`patch_daemon_config`}),e})}catch{f(!1);return}f(!1);try{r(Ne,m),r(Fe,t),i&&(n&&r(n,e),c.setQueryData(w,!0),c.invalidateQueries({queryKey:w}),b(``)),x.success(`Web search settings saved.`)}catch(e){V(e,{context:`settings-ai-web-search-persist-local`}),x.error(`Saved, but local preferences could not be written.`)}},[S,a,o,c,w,y,m,g]),A=(0,Z.useCallback)(()=>{let e=Y(g);e&&t(e),b(``),v(`inference-provider-native`),r(Fe,`inference-provider-native`)},[g,v]);return(0,Q.jsx)(gt,{title:`Web Search`,subtitle:`Configure how your assistant should search the web`,mode:m,onModeChange:e=>h(e),children:m===`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:E}),d&&(0,Q.jsx)(D,{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)(p,{value:g,onChange:v,options:De.map(e=>({value:e,label:ce[e]??e}))})]}),S&&(0,Q.jsx)(_,{label:`API Key`,type:`password`,value:y,onChange:e=>b(e.target.value),placeholder:O,fullWidth:!0}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:k,disabled:E}),d&&(0,Q.jsx)(D,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),S&&(0,Q.jsx)(_t,{onClick:A,filled:!0})]})]})})}function Ht({assistantId:e,assistantHandle:t,emailRootDomain:n}){let r=s(),i=a(),[u,f]=o(),[p,g]=(0,Z.useState)(``),[_,v]=(0,Z.useState)(!1),[y,b]=(0,Z.useState)(null),[S,C]=(0,Z.useState)(``),[E,O]=(0,Z.useState)(null),[k,A]=(0,Z.useState)(!1),[j,M]=(0,Z.useState)(!1),[N,P]=(0,Z.useState)(!1);(0,Z.useEffect)(()=>{_||!t||p||(g(t),v(!0))},[t,_,p]);let F=c({...Ze(),enabled:!0}),I=F.data,L=I?.entitlements,R=L?.managed_email===!0,B=!!L&&!R,H=!I&&F.isError&&!F.isFetching,U=c({...ut({path:{assistant_id:e}}),enabled:!B}),W=c({...ae({path:{assistant_id:e}}),enabled:!B}),G=U.data?.results?.[0],K=W.data?.results?.[0],te=G?`${G.subdomain}.${n}`:null,q=c({...he({path:{assistant_id:e,id:K?.id??``}}),enabled:!!K?.id,refetchOnWindowFocus:!1}),J=c({...ne({path:{assistant_id:e,id:G?.id??``}}),enabled:!!G?.id,refetchInterval:e=>{let t=e.state.data?.status;return t===`verified`||t===`failed`?!1:1e4},refetchOnWindowFocus:!0});(0,Z.useEffect)(()=>{u.get(`release`)!==`1`||!G||K||(M(!0),f(e=>{let t=new URLSearchParams(e);return t.delete(`release`),t},{replace:!0}))},[K,G,u,f]);let ie=l(dt()),oe=l(je()),Y=l(lt()),se=l(Se()),X=(0,Z.useCallback)(()=>{let t={assistant_id:e};r.invalidateQueries({queryKey:ye({path:t})}),r.invalidateQueries({queryKey:re({path:t})}),K?.id&&r.invalidateQueries({queryKey:Ue({path:{...t,id:K.id}})}),r.invalidateQueries({queryKey:fe()})},[K?.id,e,r]),ce=(0,Z.useCallback)(async()=>{let t=p.trim().toLowerCase();if(!t){b(`Enter a subdomain.`);return}A(!1);try{await ie.mutateAsync({path:{assistant_id:e},body:{subdomain:t}}),g(``),b(null),X(),x.success(`Domain ${t}.${n} registered.`)}catch(e){b(z(e,void 0,`Failed to register domain.`))}},[e,n,X,ie,p]),le=(0,Z.useCallback)(async()=>{let t=S.trim().toLowerCase();if(!t){O(`Enter an email username.`);return}try{await Y.mutateAsync({path:{assistant_id:e},body:{username:t}}),C(``),O(null),X(),x.success(`Email address created.`)}catch(e){O(z(e,void 0,`Failed to create email address.`))}},[e,X,Y,S]),ue=(0,Z.useCallback)(async()=>{if(K?.id){P(!1);try{await se.mutateAsync({path:{assistant_id:e,id:K.id}}),X(),x.success(`Email address removed.`)}catch(e){V(e,{context:`email_address_delete`}),x.error(`Failed to remove email address.`)}}},[K?.id,e,se,X]),de=(0,Z.useCallback)(async()=>{if(!G?.id)return;if(K){x.error(`Remove the email address first.`);return}M(!1);let t=G.subdomain;try{await oe.mutateAsync({path:{assistant_id:e,id:G.id}}),g(t),X(),x.success(`Domain released.`)}catch(e){V(e,{context:`email_domain_release`}),x.error(`Failed to release domain.`)}},[K,e,oe,G?.id,G?.subdomain,X]);if(F.isLoading)return(0,Q.jsxs)(`div`,{className:`flex items-center gap-2 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,Q.jsx)(D,{className:`h-4 w-4 animate-spin`}),`Checking subscription…`]});if(B)return(0,Q.jsxs)(h,{tone:`info`,icon:(0,Q.jsx)(w,{className:`h-4 w-4`,"aria-hidden":!0}),title:`Get a dedicated email address for your assistant`,actions:(0,Q.jsx)(d,{size:`compact`,onClick:()=>i(`${ee.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 pe=H?(0,Q.jsx)(h,{tone:`warning`,title:`Couldn't verify subscription status`,actions:(0,Q.jsx)(d,{size:`compact`,variant:`outlined`,onClick:()=>F.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 G?K?(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[pe,(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:K.address}),(0,Q.jsx)(bt,{status:J.data?.status,message:J.data?.message,isLoading:J.isLoading}),(0,Q.jsx)(d,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,Q.jsx)(ze,{}),onClick:()=>P(!0),disabled:se.isPending,"aria-label":`Remove email address`})]}),(0,Q.jsx)(m,{open:N,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:K.address}),`? Your assistant will no longer be able to send or receive email at this address.`]}),confirmLabel:`Remove`,destructive:!0,onConfirm:ue,onCancel:()=>P(!1)})]}),q.data?.usage&&(0,Q.jsxs)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:[q.data.usage.sent_today,` /`,` `,q.data.usage.daily_limit,` sent today ·`,` `,q.data.usage.received_today,` received`]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[pe,(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:[G.subdomain,`.`,n]}),(0,Q.jsx)(bt,{status:J.data?.status,message:J.data?.message,isLoading:J.isLoading}),(0,Q.jsx)(d,{variant:`dangerGhost`,size:`compact`,iconOnly:(0,Q.jsx)(ze,{}),onClick:()=>M(!0),disabled:oe.isPending,"aria-label":`Release domain`})]}),(0,Q.jsx)(m,{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:[G.subdomain,`.`,n]}),`? The subdomain will become available for others to claim.`]}),confirmLabel:`Release`,destructive:!0,onConfirm:de,onCancel:()=>M(!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 ${E?`border-[var(--system-negative-strong)]`:`border-[var(--field-border)] focus-within:border-[var(--border-active)]`}`,children:[(0,Q.jsx)(`input`,{value:S,onChange:e=>{C(e.target.value.toLowerCase()),E&&O(null)},placeholder:`hi`,"aria-label":`Email username`,"aria-invalid":!!E,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:[`@`,te]})]}),(0,Q.jsx)(d,{onClick:le,disabled:Y.isPending||!S.trim(),children:Y.isPending?`Creating…`:`Create`})]}),E&&(0,Q.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:E})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-3`,children:[pe,(0,Q.jsx)(`label`,{className:`block text-body-small-default text-[var(--content-tertiary)]`,children:`Subdomain`}),(0,Q.jsx)(T,{subdomain:p,onSubdomainChange:e=>{g(e),y&&b(null)},domainSuffix:n,subdomainPlaceholder:`my-assistant`,error:y}),(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)(d,{onClick:()=>A(!0),disabled:ie.isPending||!p.trim(),children:ie.isPending?`Registering…`:`Register`}),(0,Q.jsx)(m,{open:k,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:p.trim().toLowerCase()||`subdomain`}),` will also become your assistant's public handle. You won't be able to change it once set.`]}),confirmLabel:`Confirm`,onConfirm:ce,onCancel:()=>A(!1)})]})}function Ut(){let{data:e}=c(Ve()),t=e?.results?.[0]?.id,i=e?.results?.[0]?.handle,a=Je.use.emailRootDomain(),o=Qe(),s=S.use.activeAssistantId(),l=t??s,[u,d]=(0,Z.useState)(()=>o===`gated`?`your-own`:n(tt,`managed`)),[f,m]=(0,Z.useState)(()=>n(qe,`resend`)),g=c({queryKey:[`byoEmailCredential`,l,f],queryFn:async()=>{let{data:e}=await M({path:{assistant_id:l},body:{service:f,field:`api_key`},throwOnError:!0});return e},enabled:!!l&&(u===`your-own`||o===`gated`),staleTime:6e4,retry:B,meta:{errorContext:`byo_email_credential_check`}});(0,Z.useEffect)(()=>{g.error&&V(g.error,{context:`byo_email_credential_check`,bestEffort:!0})},[g.error]);let _=g.data?.hasSecret===!0,v=(0,Z.useCallback)(e=>{d(e),r(tt,e)},[]),y=(0,Z.useCallback)(()=>{r(qe,f),x.success(`Email settings saved.`)},[f]),b=(0,Z.useMemo)(()=>_e.find(e=>e.id===f)??_e[0],[f]),C=(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)(be,{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)(E,{className:`h-3 w-3`})]})]})]}),w=(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)(p,{value:f,onChange:e=>m(e),options:_e.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)(it,{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)(E,{className:`h-3 w-3`})]})]}):C,(0,Q.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,Q.jsx)($,{onClick:y,disabled:!1})})]});return o===`gated`?(0,Q.jsx)(vt,{id:`email`,title:`Email`,subtitle:`Configure how your assistant sends and receives email`,children:w}):(0,Q.jsx)(gt,{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:o===`disabled`?(0,Q.jsx)(h,{tone:`info`,children:`Log in to the Vellum platform to manage email settings.`}):t?(0,Q.jsx)(Ht,{assistantId:t,assistantHandle:i,emailRootDomain:a}):(0,Q.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No assistant found yet.`})}):w})}function Wt(){let{config:e}=Et(),{resolveAssistantId:t}=Tt(),i=s(),a=Dt(),o=Ot(),[c,l]=zt((0,Z.useMemo)(()=>{if(!e)return n(Re,`your-own`);let t=e.services?.[`image-generation`]?.mode;return t===`managed`||t===`your-own`?t:n(Re,`your-own`)},[e])),[u,d]=(0,Z.useState)(()=>n(Ae,`gemini-3.1-flash-image-preview`)),[f,m]=(0,Z.useState)(``),[h,g]=(0,Z.useState)(!1),v=(0,Z.useCallback)(async()=>{g(!0);let e=f.trim(),n=c===`your-own`&&e.length>0;try{n&&await o(`gemini`,e),await a.mutateAsync({services:{"image-generation":{mode:c}}}).catch(e=>{throw x.error(`Failed to update assistant configuration. Please try again.`),V(e,{context:`patch_daemon_config`}),e});let r=await t();try{await A({path:{assistant_id:r},body:{modelId:u},throwOnError:!0})}catch(e){throw x.error(`Failed to update image generation model. Please try again.`),V(e,{context:`set_image_gen_model`}),e}finally{i.invalidateQueries({queryKey:U(r)})}}catch{g(!1);return}g(!1);try{r(Re,c),r(Ae,u),n&&m(``),x.success(`Image generation settings saved.`)}catch(e){V(e,{context:`settings-ai-image-gen-persist-local`}),x.error(`Saved, but local preferences could not be written.`)}},[f,c,u,a,o,t,i]),y=(0,Z.useCallback)(()=>{m(``),d(`gemini-3.1-flash-image-preview`),r(Ae,`gemini-3.1-flash-image-preview`)},[]);return(0,Q.jsx)(gt,{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)(p,{className:`flex-1`,value:u,onChange:d,options:Oe.map(e=>({value:e,label:G[e]??e}))}),(0,Q.jsx)($,{onClick:v,disabled:h}),h&&(0,Q.jsx)(D,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`})]})]}):(0,Q.jsxs)(`div`,{className:`space-y-4`,children:[(0,Q.jsx)(_,{label:`API Key`,type:`password`,value:f,onChange:e=>m(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)(p,{value:u,onChange:d,options:Oe.map(e=>({value:e,label:G[e]??e}))})]}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:v,disabled:h}),h&&(0,Q.jsx)(D,{className:`h-4 w-4 animate-spin text-[var(--content-disabled)]`}),(0,Q.jsx)(_t,{onClick:y})]})]})})}async function Gt(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 Kt(n,r,i):t===`deepgram`?await qt(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 Kt(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 Jt(i,`ElevenLabs rejected the request.`)}}async function qt(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 Jt(n,`Deepgram rejected the request.`)}}async function Jt(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 Yt(){let{data:e}=c(Ve()),t=e?.results?.[0]?.id,i=e?.results?.[0]?.name??`your assistant`,a=H(),{data:o}=c({...I({path:{assistant_id:t}}),enabled:!!t&&a,staleTime:1/0}),s=o?.providers??Ke,l=s[0]?.id??`elevenlabs`,[u,f]=(0,Z.useState)(()=>n(We,l)),[m,h]=(0,Z.useState)(u),[g,v]=(0,Z.useState)(``),[y,b]=(0,Z.useState)(``),[S,C]=(0,Z.useState)(``),[w,T]=(0,Z.useState)(!1),[E,D]=(0,Z.useState)(!1),O=(0,Z.useMemo)(()=>s.find(e=>e.id===u)??s[0],[u,s]),k=(0,Z.useCallback)(e=>{let t=n(Me+e,``),r=n(ot+e,``);T(t.length>0),b(r),C(r),v(``)},[]);(0,Z.useEffect)(()=>{k(u)},[u,k]);let A=(0,Z.useMemo)(()=>{let e=u!==m,t=g.trim().length>0,n=y.trim()!==S;return e||t||n},[u,m,g,y,S]),j=(0,Z.useCallback)(()=>{r(We,u);let e=g.trim();e.length>0&&(r(Me+u,e),T(!0));let t=y.trim();r(ot+u,t),h(u),C(t),v(``)},[u,g,y]),M=(0,Z.useCallback)(()=>{r(Me+u,``),T(!1),v(``)},[u]),N=(0,Z.useCallback)(async()=>{D(!0);try{let e=n(Me+u,``),t=g.trim(),r=t.length>0?t:e;if(r.length===0){x.error(`Save an API key for this provider before testing.`);return}let a=n(ot+u,``),o=y.trim(),s=await Gt({provider:u,apiKey:r,voiceId:o.length>0?o:a,text:`Hey! It's ${i}. How does this sound?`});if(s.kind!==`audio`){x.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{D(!1)}},[i,g,u,y]),P=w?`•••••••• (Enter a new key to replace)`:O.apiKeyPlaceholder;return(0,Q.jsx)(vt,{title:`Text-to-Speech`,subtitle:O.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)(p,{value:u,onChange:f,options:s.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)(_,{type:`password`,value:g,onChange:e=>v(e.target.value),placeholder:P,fullWidth:!0})]}),O.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)(_,{type:`text`,value:y,onChange:e=>b(e.target.value),placeholder:`Enter a voice ID`,fullWidth:!0})]}),(0,Q.jsx)(yt,{guide:O.credentialsGuide}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(d,{variant:`outlined`,onClick:N,disabled:E,children:E?`Testing…`:`Test`}),(0,Q.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[(0,Q.jsx)($,{onClick:j,disabled:!A}),w&&(0,Q.jsx)(_t,{onClick:M})]})]})]})})}function Xt(){let e=Xe[0]?.id??`deepgram`,[t,i]=(0,Z.useState)(()=>n(rt,e)),[a,o]=(0,Z.useState)(t),[s,c]=(0,Z.useState)(``),[l,u]=(0,Z.useState)(!1),d=(0,Z.useMemo)(()=>Xe.find(e=>e.id===t)??Xe[0],[t]);(0,Z.useEffect)(()=>{u(n(Ye+t,``).length>0),c(``)},[t]);let f=(0,Z.useMemo)(()=>{let e=t!==a,n=s.trim().length>0;return e||n},[t,a,s]),m=(0,Z.useCallback)(()=>{r(rt,t);let e=s.trim();e.length>0&&(r(Ye+t,e),u(!0)),o(t),c(``)},[t,s]),h=(0,Z.useCallback)(()=>{r(Ye+t,``),u(!1),c(``)},[t]),g=l?`•••••••• (Enter a new key to replace)`:d.apiKeyPlaceholder;return(0,Q.jsx)(vt,{title:`Speech-to-Text`,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)(p,{value:t,onChange:i,options:Xe.map(e=>({value:e.id,label:e.displayName})),"aria-label":`STT 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)(_,{type:`password`,value:s,onChange:e=>c(e.target.value),placeholder:g,fullWidth:!0})]}),(0,Q.jsx)(yt,{guide:d.credentialsGuide}),(0,Q.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,Q.jsx)($,{onClick:m,disabled:!f}),l&&(0,Q.jsx)(_t,{onClick:h})]})]})})}function Zt(){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)(be,{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)(E,{className:`h-3.5 w-3.5`})]})]})]}),(0,Q.jsx)(Bt,{}),(0,Q.jsx)(Vt,{}),(0,Q.jsx)(Ut,{}),(0,Q.jsx)(Wt,{}),(0,Q.jsx)(Yt,{}),(0,Q.jsx)(Xt,{})]})}export{Zt as AiPage};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-jRWAZmH_.js";import{Q as t,Z as n,_ as r,ft as i,g as a,h as o}from"./sdk.gen-up8j0_uF.js";import{i as s,n as c}from"./api-errors-DhNZwQy5.js";import{M as l,N as u,P as d,a as f,b as p,i as ee,o as te,x as ne}from"./sdk.gen-BO4vbMAj.js";import{D as re,f as ie,o as ae}from"./gateway-session-CaFk8wfN.js";Object.freeze({status:`aborted`});function m(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,`_zod`,{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,`name`,{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,`init`,{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,`name`,{value:e}),o}var h=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},oe=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},se={};function g(e){return e&&Object.assign(se,e),se}function ce(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function le(e,t){return typeof t==`bigint`?t.toString():t}function ue(e){return{get value(){{let t=e();return Object.defineProperty(this,`value`,{value:t}),t}throw Error(`cached value already set`)}}}function de(e){return e==null}function fe(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function pe(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=t.toString(),i=(r.split(`.`)[1]||``).length;if(i===0&&/\d?e-\d?/.test(r)){let e=r.match(/\d?e-(\d?)/);e?.[1]&&(i=Number.parseInt(e[1]))}let a=n>i?n:i;return Number.parseInt(e.toFixed(a).replace(`.`,``))%Number.parseInt(t.toFixed(a).replace(`.`,``))/10**a}var me=Symbol(`evaluating`);function _(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==me)return r===void 0&&(r=me,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function v(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function y(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function he(e){return JSON.stringify(e)}function ge(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var _e=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function b(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var ve=ue(()=>{if(typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function x(e){if(b(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(b(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function ye(e){return x(e)?{...e}:Array.isArray(e)?[...e]:e}var be=new Set([`string`,`number`,`symbol`]);function S(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function C(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function w(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function xe(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var Se={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Ce(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return C(e,y(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return v(this,`shape`,e),e},checks:[]}))}function we(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return C(e,y(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return v(this,`shape`,r),r},checks:[]}))}function Te(e,t){if(!x(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return C(e,y(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return v(this,`shape`,n),n}}))}function Ee(e,t){if(!x(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return C(e,y(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return v(this,`shape`,n),n}}))}function De(e,t){return C(e,y(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return v(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:[]}))}function Oe(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return C(t,y(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return v(this,`shape`,i),i},checks:[]}))}function ke(e,t,n){return C(t,y(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return v(this,`shape`,i),i}}))}function T(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function E(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function D(e){return typeof e==`string`?e:e?.message}function O(e,t,n){let r={...e,path:e.path??[]};return e.message||(r.message=D(e.inst?._zod.def?.error?.(e))??D(t?.error?.(e))??D(n.customError?.(e))??D(n.localeError?.(e))??`Invalid input`),delete r.inst,delete r.continue,t?.reportInput||delete r.input,r}function Ae(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function k(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}var je=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,`_zod`,{value:e._zod,enumerable:!1}),Object.defineProperty(e,`issues`,{value:t,enumerable:!1}),e.message=JSON.stringify(t,le,2),Object.defineProperty(e,`toString`,{value:()=>e.message,enumerable:!1})},Me=m(`$ZodError`,je),Ne=m(`$ZodError`,je,{Parent:Error});function Pe(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Fe(e,t=e=>e.message){let n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`&&i.errors.length)i.errors.map(e=>r({issues:e}));else if(i.code===`invalid_key`)r({issues:i.issues});else if(i.code===`invalid_element`)r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;r<i.path.length;){let n=i.path[r];r===i.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(i))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(e),n}var Ie=e=>(t,n,r,i)=>{let a=r?Object.assign(r,{async:!1}):{async:!1},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise)throw new h;if(o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>O(e,a,g())));throw _e(t,i?.callee),t}return o.value},Le=e=>async(t,n,r,i)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>O(e,a,g())));throw _e(t,i?.callee),t}return o.value},A=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new h;return a.issues.length?{success:!1,error:new(e??Me)(a.issues.map(e=>O(e,i,g())))}:{success:!0,data:a.value}},Re=A(Ne),j=e=>async(t,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>O(e,i,g())))}:{success:!0,data:a.value}},ze=j(Ne),Be=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Ie(e)(t,n,i)},Ve=e=>(t,n,r)=>Ie(e)(t,n,r),He=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return Le(e)(t,n,i)},Ue=e=>async(t,n,r)=>Le(e)(t,n,r),We=e=>(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return A(e)(t,n,i)},Ge=e=>(t,n,r)=>A(e)(t,n,r),Ke=e=>async(t,n,r)=>{let i=r?Object.assign(r,{direction:`backward`}):{direction:`backward`};return j(e)(t,n,i)},qe=e=>async(t,n,r)=>j(e)(t,n,r),Je=/^[cC][^\s-]{8,}$/,Ye=/^[0-9a-z]+$/,Xe=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ze=/^[0-9a-vA-V]{20}$/,Qe=/^[A-Za-z0-9]{27}$/,$e=/^[a-zA-Z0-9_-]{21}$/,et=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,tt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,nt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,rt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,it=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function at(){return new RegExp(it,`u`)}var ot=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,st=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ct=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,lt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ut=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dt=/^[A-Za-z0-9_-]*$/,ft=/^\+[1-9]\d{6,14}$/,pt=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,mt=RegExp(`^${pt}$`);function ht(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function gt(e){return RegExp(`^${ht(e)}$`)}function _t(e){let t=ht({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${pt}T(?:${r})$`)}var vt=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},yt=/^-?\d+$/,bt=/^-?\d+(?:\.\d+)?$/,xt=/^(?:true|false)$/i,St=/^null$/i,Ct=/^[^A-Z]*$/,wt=/^[^a-z]*$/,M=m(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Tt={number:`number`,bigint:`bigint`,object:`date`},Et=m(`$ZodCheckLessThan`,(e,t)=>{M.init(e,t);let n=Tt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Dt=m(`$ZodCheckGreaterThan`,(e,t)=>{M.init(e,t);let n=Tt[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ot=m(`$ZodCheckMultipleOf`,(e,t)=>{M.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):pe(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),kt=m(`$ZodCheckNumberFormat`,(e,t)=>{M.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Se[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=yt)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),At=m(`$ZodCheckMaxLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!de(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=Ae(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),jt=m(`$ZodCheckMinLength`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!de(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=Ae(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Mt=m(`$ZodCheckLengthEquals`,(e,t)=>{var n;M.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!de(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=Ae(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Nt=m(`$ZodCheckStringFormat`,(e,t)=>{var n,r;M.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Pt=m(`$ZodCheckRegex`,(e,t)=>{Nt.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ft=m(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Ct,Nt.init(e,t)}),It=m(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=wt,Nt.init(e,t)}),Lt=m(`$ZodCheckIncludes`,(e,t)=>{M.init(e,t);let n=S(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Rt=m(`$ZodCheckStartsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`^${S(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),zt=m(`$ZodCheckEndsWith`,(e,t)=>{M.init(e,t);let n=RegExp(`.*${S(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Bt=m(`$ZodCheckOverwrite`,(e,t)=>{M.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Vt=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
2
|
-
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
3
|
-
`))}},Ht={major:4,minor:3,patch:6},N=m(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ht;let r=[...e._zod.def.checks??[]];e._zod.traits.has(`$ZodCheck`)&&r.unshift(e);for(let t of r)for(let n of t._zod.onattach)n(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(e,t,n)=>{let r=T(e),i;for(let a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;let t=e.issues.length,o=a._zod.check(e);if(o instanceof Promise&&n?.async===!1)throw new h;if(i||o instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await o,e.issues.length!==t&&(r||=T(e,t))});else{if(e.issues.length===t)continue;r||=T(e,t)}}return i?i.then(()=>e):e},n=(n,i,a)=>{if(T(n))return n.aborted=!0,n;let o=t(i,r,a);if(o instanceof Promise){if(a.async===!1)throw new h;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(i,a)=>{if(a.skipChecks)return e._zod.parse(i,a);if(a.direction===`backward`){let t=e._zod.parse({value:i.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,i,a)):n(t,i,a)}let o=e._zod.parse(i,a);if(o instanceof Promise){if(a.async===!1)throw new h;return o.then(e=>t(e,r,a))}return t(o,r,a)}}_(e,`~standard`,()=>({validate:t=>{try{let n=Re(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return ze(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:`zod`,version:1}))}),Ut=m(`$ZodString`,(e,t)=>{N.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??vt(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),P=m(`$ZodStringFormat`,(e,t)=>{Nt.init(e,t),Ut.init(e,t)}),Wt=m(`$ZodGUID`,(e,t)=>{t.pattern??=tt,P.init(e,t)}),Gt=m(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=nt(e)}else t.pattern??=nt();P.init(e,t)}),Kt=m(`$ZodEmail`,(e,t)=>{t.pattern??=rt,P.init(e,t)}),qt=m(`$ZodURL`,(e,t)=>{P.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(`:`)?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Jt=m(`$ZodEmoji`,(e,t)=>{t.pattern??=at(),P.init(e,t)}),Yt=m(`$ZodNanoID`,(e,t)=>{t.pattern??=$e,P.init(e,t)}),Xt=m(`$ZodCUID`,(e,t)=>{t.pattern??=Je,P.init(e,t)}),Zt=m(`$ZodCUID2`,(e,t)=>{t.pattern??=Ye,P.init(e,t)}),Qt=m(`$ZodULID`,(e,t)=>{t.pattern??=Xe,P.init(e,t)}),$t=m(`$ZodXID`,(e,t)=>{t.pattern??=Ze,P.init(e,t)}),en=m(`$ZodKSUID`,(e,t)=>{t.pattern??=Qe,P.init(e,t)}),tn=m(`$ZodISODateTime`,(e,t)=>{t.pattern??=_t(t),P.init(e,t)}),nn=m(`$ZodISODate`,(e,t)=>{t.pattern??=mt,P.init(e,t)}),rn=m(`$ZodISOTime`,(e,t)=>{t.pattern??=gt(t),P.init(e,t)}),an=m(`$ZodISODuration`,(e,t)=>{t.pattern??=et,P.init(e,t)}),on=m(`$ZodIPv4`,(e,t)=>{t.pattern??=ot,P.init(e,t),e._zod.bag.format=`ipv4`}),sn=m(`$ZodIPv6`,(e,t)=>{t.pattern??=st,P.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}}),cn=m(`$ZodCIDRv4`,(e,t)=>{t.pattern??=ct,P.init(e,t)}),ln=m(`$ZodCIDRv6`,(e,t)=>{t.pattern??=lt,P.init(e,t),e._zod.check=n=>{let r=n.value.split(`/`);try{if(r.length!==2)throw Error();let[e,t]=r;if(!t)throw Error();let n=Number(t);if(`${n}`!==t||n<0||n>128)throw Error();new URL(`http://[${e}]`)}catch{n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}});function un(e){if(e===``)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var dn=m(`$ZodBase64`,(e,t)=>{t.pattern??=ut,P.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{un(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}});function fn(e){if(!dt.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return un(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var pn=m(`$ZodBase64URL`,(e,t)=>{t.pattern??=dt,P.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{fn(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),mn=m(`$ZodE164`,(e,t)=>{t.pattern??=ft,P.init(e,t)});function hn(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var gn=m(`$ZodJWT`,(e,t)=>{P.init(e,t),e._zod.check=n=>{hn(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),_n=m(`$ZodNumber`,(e,t)=>{N.init(e,t),e._zod.pattern=e._zod.bag.pattern??bt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:`Infinity`:void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),vn=m(`$ZodNumberFormat`,(e,t)=>{kt.init(e,t),_n.init(e,t)}),yn=m(`$ZodBoolean`,(e,t)=>{N.init(e,t),e._zod.pattern=xt,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),bn=m(`$ZodNull`,(e,t)=>{N.init(e,t),e._zod.pattern=St,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),xn=m(`$ZodUnknown`,(e,t)=>{N.init(e,t),e._zod.parse=e=>e}),Sn=m(`$ZodNever`,(e,t)=>{N.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Cn(e,t,n){e.issues.length&&t.issues.push(...E(n,e.issues)),t.value[n]=e.value}var wn=m(`$ZodArray`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:`array`,code:`invalid_type`,input:i,inst:e}),n;n.value=Array(i.length);let a=[];for(let e=0;e<i.length;e++){let o=i[e],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?a.push(s.then(t=>Cn(t,n,e))):Cn(s,n,e)}return a.length?Promise.all(a).then(()=>n):n}});function Tn(e,t,n,r,i){if(e.issues.length){if(i&&!(n in r))return;t.issues.push(...E(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function En(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${n}": expected a Zod schema`);let n=xe(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Dn(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optout===`optional`;for(let i in t){if(s.has(i))continue;if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Tn(e,n,i,t,u))):Tn(a,n,i,t,u)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a}),e.length?Promise.all(e).then(()=>n):n}var On=m(`$ZodObject`,(e,t)=>{if(N.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Object.defineProperty(t,`shape`,{get:()=>{let n={...e};return Object.defineProperty(t,`shape`,{value:n}),n}})}let n=ue(()=>En(t));_(e._zod,`propValues`,()=>{let e=t.shape,n={};for(let t in e){let r=e[t]._zod;if(r.values){n[t]??(n[t]=new Set);for(let e of r.values)n[t].add(e)}}return n});let r=b,i=t.catchall,a;e._zod.parse=(t,o)=>{a??=n.value;let s=t.value;if(!r(s))return t.issues.push({expected:`object`,code:`invalid_type`,input:s,inst:e}),t;t.value={};let c=[],l=a.shape;for(let e of a.keys){let n=l[e],r=n._zod.optout===`optional`,i=n._zod.run({value:s[e],issues:[]},o);i instanceof Promise?c.push(i.then(n=>Tn(n,t,e,s,r))):Tn(i,t,e,s,r)}return i?Dn(c,s,t,o,n.value,e):c.length?Promise.all(c).then(()=>t):t}}),kn=m(`$ZodObjectJIT`,(e,t)=>{On.init(e,t);let n=e._zod.parse,r=ue(()=>En(t)),i=e=>{let t=new Vt([`shape`,`payload`,`ctx`]),n=r.value,i=e=>{let t=he(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write(`const input = payload.value;`);let a=Object.create(null),o=0;for(let e of n.keys)a[e]=`key_${o++}`;t.write(`const newResult = {};`);for(let r of n.keys){let n=a[r],o=he(r),s=e[r]?._zod?.optout===`optional`;t.write(`const ${n} = ${i(r)};`),s?t.write(`
|
|
4
|
-
if (${n}.issues.length) {
|
|
5
|
-
if (${o} in input) {
|
|
6
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
7
|
-
...iss,
|
|
8
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
9
|
-
})));
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (${n}.value === undefined) {
|
|
14
|
-
if (${o} in input) {
|
|
15
|
-
newResult[${o}] = undefined;
|
|
16
|
-
}
|
|
17
|
-
} else {
|
|
18
|
-
newResult[${o}] = ${n}.value;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
`):t.write(`
|
|
22
|
-
if (${n}.issues.length) {
|
|
23
|
-
payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
|
|
24
|
-
...iss,
|
|
25
|
-
path: iss.path ? [${o}, ...iss.path] : [${o}]
|
|
26
|
-
})));
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (${n}.value === undefined) {
|
|
30
|
-
if (${o} in input) {
|
|
31
|
-
newResult[${o}] = undefined;
|
|
32
|
-
}
|
|
33
|
-
} else {
|
|
34
|
-
newResult[${o}] = ${n}.value;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
`)}t.write(`payload.value = newResult;`),t.write(`return payload;`);let s=t.compile();return(t,n)=>s(e,t,n)},a,o=b,s=!se.jitless,c=s&&ve.value,l=t.catchall,u;e._zod.parse=(d,f)=>{u??=r.value;let p=d.value;return o(p)?s&&c&&f?.async===!1&&f.jitless!==!0?(a||=i(t.shape),d=a(d,f),l?Dn([],p,d,f,u,e):d):n(d,f):(d.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),d)}});function An(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!T(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>O(e,r,g())))}),t)}var jn=m(`$ZodUnion`,(e,t)=>{N.init(e,t),_(e._zod,`optin`,()=>t.options.some(e=>e._zod.optin===`optional`)?`optional`:void 0),_(e._zod,`optout`,()=>t.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),_(e._zod,`values`,()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),_(e._zod,`pattern`,()=>{if(t.options.every(e=>e._zod.pattern)){let e=t.options.map(e=>e._zod.pattern);return RegExp(`^(${e.map(e=>fe(e.source)).join(`|`)})$`)}});let n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(i,a)=>{if(n)return r(i,a);let o=!1,s=[];for(let e of t.options){let t=e._zod.run({value:i.value,issues:[]},a);if(t instanceof Promise)s.push(t),o=!0;else{if(t.issues.length===0)return t;s.push(t)}}return o?Promise.all(s).then(t=>An(t,i,e,a)):An(s,i,e,a)}}),Mn=m(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,jn.init(e,t);let n=e._zod.parse;_(e._zod,`propValues`,()=>{let e={};for(let n of t.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(let[t,n]of Object.entries(r)){e[t]||(e[t]=new Set);for(let r of n)e[t].add(r)}}return e});let r=ue(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!b(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,input:o,path:[t.discriminator],inst:e}),i)}}),Nn=m(`$ZodIntersection`,(e,t)=>{N.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Fn(e,t,n)):Fn(e,i,a)}});function Pn(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(x(e)&&x(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Pn(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Pn(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Fn(e,t,n){let r=new Map,i;for(let n of t.issues)if(n.code===`unrecognized_keys`){i??=n;for(let e of n.keys)r.has(e)||r.set(e,{}),r.get(e).l=!0}else e.issues.push(n);for(let t of n.issues)if(t.code===`unrecognized_keys`)for(let e of t.keys)r.has(e)||r.set(e,{}),r.get(e).r=!0;else e.issues.push(t);let a=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(a.length&&i&&e.issues.push({...i,keys:a}),T(e))return e;let o=Pn(t.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}var In=m(`$ZodRecord`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!x(i))return n.issues.push({expected:`record`,code:`invalid_type`,input:i,inst:e}),n;let a=[],o=t.keyType._zod.values;if(o){n.value={};let s=new Set;for(let e of o)if(typeof e==`string`||typeof e==`number`||typeof e==`symbol`){s.add(typeof e==`number`?e.toString():e);let o=t.valueType._zod.run({value:i[e],issues:[]},r);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...E(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...E(e,o.issues)),n.value[e]=o.value)}let c;for(let e in i)s.has(e)||(c??=[],c.push(e));c&&c.length>0&&n.issues.push({code:`unrecognized_keys`,input:i,inst:e,keys:c})}else{n.value={};for(let o of Reflect.ownKeys(i)){if(o===`__proto__`)continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof o==`string`&&bt.test(o)&&s.issues.length){let e=t.keyType._zod.run({value:Number(o),issues:[]},r);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(s=e)}if(s.issues.length){t.mode===`loose`?n.value[o]=i[o]:n.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>O(e,r,g())),input:o,path:[o],inst:e});continue}let c=t.valueType._zod.run({value:i[o],issues:[]},r);c instanceof Promise?a.push(c.then(e=>{e.issues.length&&n.issues.push(...E(o,e.issues)),n.value[s.value]=e.value})):(c.issues.length&&n.issues.push(...E(o,c.issues)),n.value[s.value]=c.value)}}return a.length?Promise.all(a).then(()=>n):n}}),Ln=m(`$ZodEnum`,(e,t)=>{N.init(e,t);let n=ce(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=RegExp(`^(${n.filter(e=>be.has(typeof e)).map(e=>typeof e==`string`?S(e):e.toString()).join(`|`)})$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Rn=m(`$ZodLiteral`,(e,t)=>{if(N.init(e,t),t.values.length===0)throw Error(`Cannot create literal schema with no valid values`);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(`^(${t.values.map(e=>typeof e==`string`?S(e):e?S(e.toString()):String(e)).join(`|`)})$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),zn=m(`$ZodTransform`,(e,t)=>{N.init(e,t),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new oe(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new h;return n.value=i,n}});function Bn(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}var Vn=m(`$ZodOptional`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,e._zod.optout=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${fe(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(t.innerType._zod.optin===`optional`){let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>Bn(t,e.value)):Bn(r,e.value)}return e.value===void 0?e:t.innerType._zod.run(e,n)}}),Hn=m(`$ZodExactOptional`,(e,t)=>{Vn.init(e,t),_(e._zod,`values`,()=>t.innerType._zod.values),_(e._zod,`pattern`,()=>t.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),Un=m(`$ZodNullable`,(e,t)=>{N.init(e,t),_(e._zod,`optin`,()=>t.innerType._zod.optin),_(e._zod,`optout`,()=>t.innerType._zod.optout),_(e._zod,`pattern`,()=>{let e=t.innerType._zod.pattern;return e?RegExp(`^(${fe(e.source)}|null)$`):void 0}),_(e._zod,`values`,()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),Wn=m(`$ZodDefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Gn(e,t)):Gn(r,t)}});function Gn(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Kn=m(`$ZodPrefault`,(e,t)=>{N.init(e,t),e._zod.optin=`optional`,_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),qn=m(`$ZodNonOptional`,(e,t)=>{N.init(e,t),_(e._zod,`values`,()=>{let e=t.innerType._zod.values;return e?new Set([...e].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Jn(t,e)):Jn(i,e)}});function Jn(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}var Yn=m(`$ZodCatch`,(e,t)=>{N.init(e,t),_(e._zod,`optin`,()=>t.innerType._zod.optin),_(e._zod,`optout`,()=>t.innerType._zod.optout),_(e._zod,`values`,()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(r=>(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>O(e,n,g()))},input:e.value}),e.issues=[]),e)):(e.value=r.value,r.issues.length&&(e.value=t.catchValue({...e,error:{issues:r.issues.map(e=>O(e,n,g()))},input:e.value}),e.issues=[]),e)}}),Xn=m(`$ZodPipe`,(e,t)=>{N.init(e,t),_(e._zod,`values`,()=>t.in._zod.values),_(e._zod,`optin`,()=>t.in._zod.optin),_(e._zod,`optout`,()=>t.out._zod.optout),_(e._zod,`propValues`,()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Zn(e,t.in,n)):Zn(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Zn(e,t.out,n)):Zn(r,t.out,n)}});function Zn(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var Qn=m(`$ZodReadonly`,(e,t)=>{N.init(e,t),_(e._zod,`propValues`,()=>t.innerType._zod.propValues),_(e._zod,`values`,()=>t.innerType._zod.values),_(e._zod,`optin`,()=>t.innerType?._zod?.optin),_(e._zod,`optout`,()=>t.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then($n):$n(r)}});function $n(e){return e.value=Object.freeze(e.value),e}var er=m(`$ZodCustom`,(e,t)=>{M.init(e,t),N.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>tr(t,n,r,e));tr(i,n,r,e)}});function tr(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(k(e))}}var nr,rr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function ir(){return new rr}(nr=globalThis).__zod_globalRegistry??(nr.__zod_globalRegistry=ir());var F=globalThis.__zod_globalRegistry;function ar(e,t){return new e({type:`string`,...w(t)})}function or(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...w(t)})}function sr(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...w(t)})}function cr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...w(t)})}function lr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...w(t)})}function ur(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...w(t)})}function dr(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...w(t)})}function fr(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...w(t)})}function pr(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...w(t)})}function mr(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...w(t)})}function hr(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...w(t)})}function gr(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...w(t)})}function _r(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...w(t)})}function vr(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...w(t)})}function yr(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...w(t)})}function br(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...w(t)})}function xr(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...w(t)})}function Sr(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...w(t)})}function Cr(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...w(t)})}function wr(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...w(t)})}function Tr(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...w(t)})}function Er(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...w(t)})}function Dr(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...w(t)})}function Or(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...w(t)})}function kr(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...w(t)})}function Ar(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...w(t)})}function jr(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...w(t)})}function Mr(e,t){return new e({type:`number`,checks:[],...w(t)})}function Nr(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...w(t)})}function Pr(e,t){return new e({type:`boolean`,...w(t)})}function Fr(e,t){return new e({type:`null`,...w(t)})}function Ir(e){return new e({type:`unknown`})}function Lr(e,t){return new e({type:`never`,...w(t)})}function Rr(e,t){return new Et({check:`less_than`,...w(t),value:e,inclusive:!1})}function zr(e,t){return new Et({check:`less_than`,...w(t),value:e,inclusive:!0})}function Br(e,t){return new Dt({check:`greater_than`,...w(t),value:e,inclusive:!1})}function Vr(e,t){return new Dt({check:`greater_than`,...w(t),value:e,inclusive:!0})}function Hr(e,t){return new Ot({check:`multiple_of`,...w(t),value:e})}function Ur(e,t){return new At({check:`max_length`,...w(t),maximum:e})}function I(e,t){return new jt({check:`min_length`,...w(t),minimum:e})}function Wr(e,t){return new Mt({check:`length_equals`,...w(t),length:e})}function Gr(e,t){return new Pt({check:`string_format`,format:`regex`,...w(t),pattern:e})}function Kr(e){return new Ft({check:`string_format`,format:`lowercase`,...w(e)})}function qr(e){return new It({check:`string_format`,format:`uppercase`,...w(e)})}function Jr(e,t){return new Lt({check:`string_format`,format:`includes`,...w(t),includes:e})}function Yr(e,t){return new Rt({check:`string_format`,format:`starts_with`,...w(t),prefix:e})}function Xr(e,t){return new zt({check:`string_format`,format:`ends_with`,...w(t),suffix:e})}function L(e){return new Bt({check:`overwrite`,tx:e})}function Zr(e){return L(t=>t.normalize(e))}function Qr(){return L(e=>e.trim())}function $r(){return L(e=>e.toLowerCase())}function ei(){return L(e=>e.toUpperCase())}function ti(){return L(e=>ge(e))}function ni(e,t,n){return new e({type:`array`,element:t,...w(n)})}function ri(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...w(n)})}function ii(e){let t=ai(n=>(n.addIssue=e=>{if(typeof e==`string`)n.issues.push(k(e,n.value,t._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,r.input??=n.value,r.inst??=t,r.continue??=!t._zod.def.abort,n.issues.push(k(r))}},e(n.value,n)));return t}function ai(e,t){let n=new M({check:`custom`,...w(t)});return n._zod.check=e,n}function oi(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??F,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,external:e?.external??void 0}}function R(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o);let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,R(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(o.schema,c),t.io===`input`&&z(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function si(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${a}`}}if(t[1]===n)return{ref:`#`};let i=`#/${r}/`,a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+a}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>
|
|
38
|
-
|
|
39
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}}function ci(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Object.assign(i,s),Object.assign(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};for(let t of[...e.seen.entries()].reverse())r(t[0]);let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Object.assign(i,n.def??n.schema);let a=e.external?.defs??{};for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(a[e.defId]=e.def)}e.external||Object.keys(a).length>0&&(e.target===`draft-2020-12`?i.$defs=a:i.definitions=a);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,`~standard`,{value:{...t[`~standard`],jsonSchema:{input:B(t,`input`,e.processors),output:B(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function z(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return z(r.element,n);if(r.type===`set`)return z(r.valueType,n);if(r.type===`lazy`)return z(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type===`default`||r.type===`prefault`)return z(r.innerType,n);if(r.type===`intersection`)return z(r.left,n)||z(r.right,n);if(r.type===`record`||r.type===`map`)return z(r.keyType,n)||z(r.valueType,n);if(r.type===`pipe`)return z(r.in,n)||z(r.out,n);if(r.type===`object`){for(let e in r.shape)if(z(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(z(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(z(e,n))return!0;return!!(r.rest&&z(r.rest,n))}return!1}var li=(e,t={})=>n=>{let r=oi({...n,processors:t});return R(e,r),si(r,e),ci(r,e)},B=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=oi({...i??{},target:a,io:t,processors:n});return R(e,o),si(o,e),ci(o,e)},ui={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},di=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=ui[s]??s,i.format===``&&delete i.format,s===`time`&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},fi=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s==`string`&&s.includes(`int`)?i.type=`integer`:i.type=`number`,typeof u==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u),typeof a==`number`&&(i.minimum=a,typeof u==`number`&&t.target!==`draft-04`&&(u>=a?delete i.minimum:delete i.exclusiveMinimum)),typeof l==`number`&&(t.target===`draft-04`||t.target===`openapi-3.0`?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l),typeof o==`number`&&(i.maximum=o,typeof l==`number`&&t.target!==`draft-04`&&(l<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof c==`number`&&(i.multipleOf=c)},pi=(e,t,n,r)=>{n.type=`boolean`},mi=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},hi=(e,t,n,r)=>{n.not={}},gi=(e,t,n,r)=>{let i=e._zod.def,a=ce(i.entries);a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},_i=(e,t,n,r)=>{let i=e._zod.def,a=[];for(let e of i.values)if(e===void 0){if(t.unrepresentable===`throw`)throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof e==`bigint`){if(t.unrepresentable===`throw`)throw Error(`BigInt literals cannot be represented in JSON Schema`);a.push(Number(e))}else a.push(e);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},vi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Custom types cannot be represented in JSON Schema`)},yi=(e,t,n,r)=>{if(t.unrepresentable===`throw`)throw Error(`Transforms cannot be represented in JSON Schema`)},bi=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=R(a.element,t,{...r,path:[...r.path,`items`]})},xi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`,i.properties={};let o=a.shape;for(let e in o)i.properties[e]=R(o[e],t,{...r,path:[...r.path,`properties`,e]});let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e]._zod;return t.io===`input`?n.optin===void 0:n.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=R(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Si=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>R(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Ci=(e,t,n,r)=>{let i=e._zod.def,a=R(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=R(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1;n.allOf=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]]},wi=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=R(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)i.patternProperties[t.source]=e}else (t.target===`draft-07`||t.target===`draft-2020-12`)&&(i.propertyNames=R(a.keyType,t,{...r,path:[...r.path,`propertyNames`]})),i.additionalProperties=R(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]});let c=o._zod.values;if(c){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e)}},Ti=(e,t,n,r)=>{let i=e._zod.def,a=R(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ei=(e,t,n,r)=>{let i=e._zod.def;R(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Di=(e,t,n,r)=>{let i=e._zod.def;R(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Oi=(e,t,n,r)=>{let i=e._zod.def;R(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,t.io===`input`&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},ki=(e,t,n,r)=>{let i=e._zod.def;R(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error(`Dynamic catch values are not supported in JSON Schema`)}n.default=o},Ai=(e,t,n,r)=>{let i=e._zod.def,a=t.io===`input`?i.in._zod.def.type===`transform`?i.out:i.in:i.out;R(a,t,r);let o=t.seen.get(e);o.ref=a},ji=(e,t,n,r)=>{let i=e._zod.def;R(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},Mi=(e,t,n,r)=>{let i=e._zod.def;R(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ni=m(`ZodISODateTime`,(e,t)=>{tn.init(e,t),W.init(e,t)});function Pi(e){return Or(Ni,e)}var Fi=m(`ZodISODate`,(e,t)=>{nn.init(e,t),W.init(e,t)});function Ii(e){return kr(Fi,e)}var Li=m(`ZodISOTime`,(e,t)=>{rn.init(e,t),W.init(e,t)});function Ri(e){return Ar(Li,e)}var zi=m(`ZodISODuration`,(e,t)=>{an.init(e,t),W.init(e,t)});function Bi(e){return jr(zi,e)}var Vi=(e,t)=>{Me.init(e,t),e.name=`ZodError`,Object.defineProperties(e,{format:{value:t=>Fe(e,t)},flatten:{value:t=>Pe(e,t)},addIssue:{value:t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,le,2)}},addIssues:{value:t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,le,2)}},isEmpty:{get(){return e.issues.length===0}}})};m(`ZodError`,Vi);var V=m(`ZodError`,Vi,{Parent:Error}),Hi=Ie(V),Ui=Le(V),Wi=A(V),Gi=j(V),Ki=Be(V),qi=Ve(V),Ji=He(V),Yi=Ue(V),Xi=We(V),Zi=Ge(V),Qi=Ke(V),$i=qe(V),H=m(`ZodType`,(e,t)=>(N.init(e,t),Object.assign(e[`~standard`],{jsonSchema:{input:B(e,`input`),output:B(e,`output`)}}),e.toJSONSchema=li(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,`_def`,{value:t}),e.check=(...n)=>e.clone(y(t,{checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0}),e.with=e.check,e.clone=(t,n)=>C(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.parse=(t,n)=>Hi(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Wi(e,t,n),e.parseAsync=async(t,n)=>Ui(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Gi(e,t,n),e.spa=e.safeParseAsync,e.encode=(t,n)=>Ki(e,t,n),e.decode=(t,n)=>qi(e,t,n),e.encodeAsync=async(t,n)=>Ji(e,t,n),e.decodeAsync=async(t,n)=>Yi(e,t,n),e.safeEncode=(t,n)=>Xi(e,t,n),e.safeDecode=(t,n)=>Zi(e,t,n),e.safeEncodeAsync=async(t,n)=>Qi(e,t,n),e.safeDecodeAsync=async(t,n)=>$i(e,t,n),e.refine=(t,n)=>e.check(so(t,n)),e.superRefine=t=>e.check(co(t)),e.overwrite=t=>e.check(L(t)),e.optional=()=>Ua(e),e.exactOptional=()=>Ga(e),e.nullable=()=>qa(e),e.nullish=()=>Ua(qa(e)),e.nonoptional=t=>$a(e,t),e.array=()=>Y(e),e.or=t=>Ma([e,t]),e.and=t=>Ia(e,t),e.transform=t=>ro(e,Va(t)),e.default=t=>Ya(e,t),e.prefault=t=>Za(e,t),e.catch=t=>to(e,t),e.pipe=t=>ro(e,t),e.readonly=()=>ao(e),e.describe=t=>{let n=e.clone();return F.add(n,{description:t}),n},Object.defineProperty(e,`description`,{get(){return F.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return F.get(e);let n=e.clone();return F.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=t=>t(e),e)),ea=m(`_ZodString`,(e,t)=>{Ut.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>di(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(Gr(...t)),e.includes=(...t)=>e.check(Jr(...t)),e.startsWith=(...t)=>e.check(Yr(...t)),e.endsWith=(...t)=>e.check(Xr(...t)),e.min=(...t)=>e.check(I(...t)),e.max=(...t)=>e.check(Ur(...t)),e.length=(...t)=>e.check(Wr(...t)),e.nonempty=(...t)=>e.check(I(1,...t)),e.lowercase=t=>e.check(Kr(t)),e.uppercase=t=>e.check(qr(t)),e.trim=()=>e.check(Qr()),e.normalize=(...t)=>e.check(Zr(...t)),e.toLowerCase=()=>e.check($r()),e.toUpperCase=()=>e.check(ei()),e.slugify=()=>e.check(ti())}),ta=m(`ZodString`,(e,t)=>{Ut.init(e,t),ea.init(e,t),e.email=t=>e.check(or(na,t)),e.url=t=>e.check(fr(ia,t)),e.jwt=t=>e.check(Dr(ya,t)),e.emoji=t=>e.check(pr(aa,t)),e.guid=t=>e.check(sr(ra,t)),e.uuid=t=>e.check(cr(G,t)),e.uuidv4=t=>e.check(lr(G,t)),e.uuidv6=t=>e.check(ur(G,t)),e.uuidv7=t=>e.check(dr(G,t)),e.nanoid=t=>e.check(mr(oa,t)),e.guid=t=>e.check(sr(ra,t)),e.cuid=t=>e.check(hr(sa,t)),e.cuid2=t=>e.check(gr(ca,t)),e.ulid=t=>e.check(_r(la,t)),e.base64=t=>e.check(wr(ga,t)),e.base64url=t=>e.check(Tr(_a,t)),e.xid=t=>e.check(vr(ua,t)),e.ksuid=t=>e.check(yr(da,t)),e.ipv4=t=>e.check(br(fa,t)),e.ipv6=t=>e.check(xr(pa,t)),e.cidrv4=t=>e.check(Sr(ma,t)),e.cidrv6=t=>e.check(Cr(ha,t)),e.e164=t=>e.check(Er(va,t)),e.datetime=t=>e.check(Pi(t)),e.date=t=>e.check(Ii(t)),e.time=t=>e.check(Ri(t)),e.duration=t=>e.check(Bi(t))});function U(e){return ar(ta,e)}var W=m(`ZodStringFormat`,(e,t)=>{P.init(e,t),ea.init(e,t)}),na=m(`ZodEmail`,(e,t)=>{Kt.init(e,t),W.init(e,t)}),ra=m(`ZodGUID`,(e,t)=>{Wt.init(e,t),W.init(e,t)}),G=m(`ZodUUID`,(e,t)=>{Gt.init(e,t),W.init(e,t)}),ia=m(`ZodURL`,(e,t)=>{qt.init(e,t),W.init(e,t)}),aa=m(`ZodEmoji`,(e,t)=>{Jt.init(e,t),W.init(e,t)}),oa=m(`ZodNanoID`,(e,t)=>{Yt.init(e,t),W.init(e,t)}),sa=m(`ZodCUID`,(e,t)=>{Xt.init(e,t),W.init(e,t)}),ca=m(`ZodCUID2`,(e,t)=>{Zt.init(e,t),W.init(e,t)}),la=m(`ZodULID`,(e,t)=>{Qt.init(e,t),W.init(e,t)}),ua=m(`ZodXID`,(e,t)=>{$t.init(e,t),W.init(e,t)}),da=m(`ZodKSUID`,(e,t)=>{en.init(e,t),W.init(e,t)}),fa=m(`ZodIPv4`,(e,t)=>{on.init(e,t),W.init(e,t)}),pa=m(`ZodIPv6`,(e,t)=>{sn.init(e,t),W.init(e,t)}),ma=m(`ZodCIDRv4`,(e,t)=>{cn.init(e,t),W.init(e,t)}),ha=m(`ZodCIDRv6`,(e,t)=>{ln.init(e,t),W.init(e,t)}),ga=m(`ZodBase64`,(e,t)=>{dn.init(e,t),W.init(e,t)}),_a=m(`ZodBase64URL`,(e,t)=>{pn.init(e,t),W.init(e,t)}),va=m(`ZodE164`,(e,t)=>{mn.init(e,t),W.init(e,t)}),ya=m(`ZodJWT`,(e,t)=>{gn.init(e,t),W.init(e,t)}),ba=m(`ZodNumber`,(e,t)=>{_n.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fi(e,t,n,r),e.gt=(t,n)=>e.check(Br(t,n)),e.gte=(t,n)=>e.check(Vr(t,n)),e.min=(t,n)=>e.check(Vr(t,n)),e.lt=(t,n)=>e.check(Rr(t,n)),e.lte=(t,n)=>e.check(zr(t,n)),e.max=(t,n)=>e.check(zr(t,n)),e.int=t=>e.check(Sa(t)),e.safe=t=>e.check(Sa(t)),e.positive=t=>e.check(Br(0,t)),e.nonnegative=t=>e.check(Vr(0,t)),e.negative=t=>e.check(Rr(0,t)),e.nonpositive=t=>e.check(zr(0,t)),e.multipleOf=(t,n)=>e.check(Hr(t,n)),e.step=(t,n)=>e.check(Hr(t,n)),e.finite=()=>e;let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function K(e){return Mr(ba,e)}var xa=m(`ZodNumberFormat`,(e,t)=>{vn.init(e,t),ba.init(e,t)});function Sa(e){return Nr(xa,e)}var Ca=m(`ZodBoolean`,(e,t)=>{yn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pi(e,t,n,r)});function q(e){return Pr(Ca,e)}var wa=m(`ZodNull`,(e,t)=>{bn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mi(e,t,n,r)});function Ta(e){return Fr(wa,e)}var Ea=m(`ZodUnknown`,(e,t)=>{xn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function J(){return Ir(Ea)}var Da=m(`ZodNever`,(e,t)=>{Sn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hi(e,t,n,r)});function Oa(e){return Lr(Da,e)}var ka=m(`ZodArray`,(e,t)=>{wn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bi(e,t,n,r),e.element=t.element,e.min=(t,n)=>e.check(I(t,n)),e.nonempty=t=>e.check(I(1,t)),e.max=(t,n)=>e.check(Ur(t,n)),e.length=(t,n)=>e.check(Wr(t,n)),e.unwrap=()=>e.element});function Y(e,t){return ni(ka,e,t)}var Aa=m(`ZodObject`,(e,t)=>{kn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xi(e,t,n,r),_(e,`shape`,()=>t.shape),e.keyof=()=>Q(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:J()}),e.loose=()=>e.clone({...e._zod.def,catchall:J()}),e.strict=()=>e.clone({...e._zod.def,catchall:Oa()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>Te(e,t),e.safeExtend=t=>Ee(e,t),e.merge=t=>De(e,t),e.pick=t=>Ce(e,t),e.omit=t=>we(e,t),e.partial=(...t)=>Oe(Ha,e,t[0]),e.required=(...t)=>ke(Qa,e,t[0])});function X(e,t){return new Aa({type:`object`,shape:e??{},...w(t)})}var ja=m(`ZodUnion`,(e,t)=>{jn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Si(e,t,n,r),e.options=t.options});function Ma(e,t){return new ja({type:`union`,options:e,...w(t)})}var Na=m(`ZodDiscriminatedUnion`,(e,t)=>{ja.init(e,t),Mn.init(e,t)});function Pa(e,t,n){return new Na({type:`union`,options:t,discriminator:e,...w(n)})}var Fa=m(`ZodIntersection`,(e,t)=>{Nn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ci(e,t,n,r)});function Ia(e,t){return new Fa({type:`intersection`,left:e,right:t})}var La=m(`ZodRecord`,(e,t)=>{In.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wi(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function Z(e,t,n){return new La({type:`record`,keyType:e,valueType:t,...w(n)})}var Ra=m(`ZodEnum`,(e,t)=>{Ln.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gi(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ra({...t,checks:[],...w(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ra({...t,checks:[],...w(r),entries:i})}});function Q(e,t){return new Ra({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...w(t)})}var za=m(`ZodLiteral`,(e,t)=>{Rn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_i(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,`value`,{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function $(e,t){return new za({type:`literal`,values:Array.isArray(e)?e:[e],...w(t)})}var Ba=m(`ZodTransform`,(e,t)=>{zn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yi(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new oe(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(k(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,t.input??=n.value,t.inst??=e,n.issues.push(k(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Va(e){return new Ba({type:`transform`,transform:e})}var Ha=m(`ZodOptional`,(e,t)=>{Vn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ua(e){return new Ha({type:`optional`,innerType:e})}var Wa=m(`ZodExactOptional`,(e,t)=>{Hn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ga(e){return new Wa({type:`optional`,innerType:e})}var Ka=m(`ZodNullable`,(e,t)=>{Un.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ti(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function qa(e){return new Ka({type:`nullable`,innerType:e})}var Ja=m(`ZodDefault`,(e,t)=>{Wn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Di(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ya(e,t){return new Ja({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():ye(t)}})}var Xa=m(`ZodPrefault`,(e,t)=>{Kn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Oi(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Za(e,t){return new Xa({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():ye(t)}})}var Qa=m(`ZodNonOptional`,(e,t)=>{qn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ei(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function $a(e,t){return new Qa({type:`nonoptional`,innerType:e,...w(t)})}var eo=m(`ZodCatch`,(e,t)=>{Yn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ki(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function to(e,t){return new eo({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:()=>t})}var no=m(`ZodPipe`,(e,t)=>{Xn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ai(e,t,n,r),e.in=t.in,e.out=t.out});function ro(e,t){return new no({type:`pipe`,in:e,out:t})}var io=m(`ZodReadonly`,(e,t)=>{Qn.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ji(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ao(e){return new io({type:`readonly`,innerType:e})}var oo=m(`ZodCustom`,(e,t)=>{er.init(e,t),H.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vi(e,t,n,r)});function so(e,t={}){return ri(oo,e,t)}function co(e){return ii(e)}var lo=Q([`idle`,`thinking`,`streaming`,`tool_running`,`awaiting_confirmation`]),uo=Q([`assistant_turn`,`user_turn`,`global`]),fo=Q([`message_dequeued`,`thinking_delta`,`first_text_delta`,`tool_use_start`,`preview_start`,`tool_result_received`,`confirmation_requested`,`confirmation_resolved`,`context_compacting`,`message_complete`,`generation_cancelled`,`error_terminal`]),po=X({type:$(`assistant_activity_state`),conversationId:U(),activityVersion:K(),phase:lo,anchor:uo,reason:fo,requestId:U().optional(),statusText:U().optional()}),mo=X({type:$(`assistant_text_delta`),text:U(),messageId:U().optional(),conversationId:U().optional()}),ho=X({type:$(`assistant_thinking_delta`),thinking:U(),messageId:U().optional(),conversationId:U().optional()}),go=X({type:$(`assistant_turn_start`),messageId:U(),conversationId:U().optional()}),_o=X({type:$(`avatar_updated`),avatarPath:U()}),vo=X({type:$(`compaction_circuit_closed`),conversationId:U()}),yo=X({type:$(`compaction_circuit_open`),conversationId:U(),reason:$(`3_consecutive_failures`),openUntil:K()}),bo=X({label:U(),description:U(),pattern:U()}),xo=X({label:U(),scope:U()}),So=X({label:U(),scope:U()}),Co=X({filePath:U(),oldContent:U(),newContent:U(),isNewFile:q()}),wo=Q([`allow_once`,`allow_always`,`reject_once`,`reject_always`]),To=X({optionId:U(),name:U(),kind:wo}),Eo=Q([`sandbox`,`host`]),Do=X({type:$(`confirmation_request`),requestId:U(),toolName:U(),input:Z(U(),J()),riskLevel:U(),riskReason:U().optional(),isContainerized:q().optional(),executionTarget:Eo.optional(),allowlistOptions:Y(bo),scopeOptions:Y(xo),directoryScopeOptions:Y(So).optional(),diff:Co.optional(),conversationId:U().optional(),persistentDecisionsAllowed:q().optional(),toolUseId:U().optional(),acpToolKind:U().optional(),acpOptions:Y(To).optional()}),Oo=X({type:$(`contact_request`),requestId:U(),channel:U().optional(),placeholder:U().optional(),label:U().optional(),description:U().optional(),role:U().optional()}),ko=Q([`PROVIDER_NETWORK`,`PROVIDER_RATE_LIMIT`,`MANAGED_USAGE_LIMIT`,`PROVIDER_OVERLOADED`,`PROVIDER_API`,`IMAGE_TOO_LARGE`,`PROVIDER_BILLING`,`PROVIDER_ORDERING`,`PROVIDER_WEB_SEARCH`,`PROVIDER_NOT_CONFIGURED`,`PROVIDER_INVALID_KEY`,`MANAGED_KEY_INVALID`,`CONTEXT_TOO_LARGE`,`BUDGET_YIELD_UNRECOVERED`,`MAX_TOKENS_REACHED`,`CONVERSATION_ABORTED`,`CONVERSATION_PROCESSING_FAILED`,`DISK_SPACE_CRITICAL`,`REGENERATE_FAILED`,`UNKNOWN`]),Ao=X({type:$(`conversation_error`),conversationId:U(),code:ko,userMessage:U(),retryable:q(),debugDetails:U().optional(),errorCategory:U().optional(),connectionName:U().optional(),profileName:U().optional()}),jo=Q([`created`,`renamed`,`deleted`,`reordered`,`seen_changed`]),Mo=X({type:$(`conversation_list_invalidated`),reason:jo}),No=X({type:$(`conversation_title_updated`),conversationId:U(),title:U()}),Po=Q([`disabled`,`ok`,`warning`,`critical`,`unknown`]),Fo=Q([`agent-turns`,`background-work`,`remote-ingress`]),Io=X({enabled:q(),state:Po,locked:q(),acknowledged:q(),overrideActive:q(),effectivelyLocked:q(),lockId:U().nullable(),usagePercent:K().nullable(),thresholdPercent:K(),path:U().nullable(),lastCheckedAt:U().nullable(),blockedCapabilities:Y(Fo),error:U().nullable()}),Lo=X({type:$(`disk_pressure_status_changed`),status:Io}),Ro=X({id:U(),surfaceId:U(),author:U(),content:U(),anchorStart:K().optional(),anchorEnd:K().optional(),anchorText:U().optional(),parentCommentId:U().optional(),status:U(),createdAt:K(),updatedAt:K()}),zo=X({type:$(`document_comment_created`),conversationId:U(),surfaceId:U(),comment:Ro}),Bo=X({type:$(`document_comment_deleted`),conversationId:U(),surfaceId:U(),commentId:U()}),Vo=X({type:$(`document_comment_reopened`),conversationId:U(),surfaceId:U(),commentId:U()}),Ho=X({type:$(`document_comment_resolved`),conversationId:U(),surfaceId:U(),commentId:U(),resolvedBy:U()}),Uo=X({type:$(`document_editor_update`),conversationId:U(),surfaceId:U(),markdown:U(),mode:U()}),Wo=X({type:$(`error`),message:U(),code:U().optional(),category:U().optional(),errorCategory:U().optional(),requestId:U().optional(),conversationId:U().optional()}),Go=X({type:$(`generation_cancelled`),conversationId:U().optional()}),Ko=X({id:U().optional(),filename:U(),mimeType:U(),data:U(),sourceType:Q([`sandbox_file`,`host_file`,`tool_block`]).optional(),sizeBytes:K().optional(),thumbnailData:U().optional(),fileBacked:q().optional(),filePath:U().optional()}),qo=X({type:$(`generation_handoff`),conversationId:U().optional(),requestId:U().optional(),queuedCount:K(),messageId:U().optional(),attachments:Y(Ko).optional(),attachmentWarnings:Y(U()).optional()}),Jo=X({type:$(`home_feed_updated`),updatedAt:U(),newItemCount:K()}),Yo=X({type:$(`identity_changed`),name:U(),role:U(),personality:U(),emoji:U(),home:U()}),Xo=Q([`approved`,`rejected`,`answered`,`cancelled`,`superseded`]),Zo=X({type:$(`interaction_resolved`),requestId:U(),conversationId:U(),state:Xo,kind:U()}),Qo=X({type:$(`message_complete`),messageId:U().optional(),conversationId:U().optional(),source:Q([`main`,`aux`]).optional(),attachments:Y(Ko).optional(),attachmentWarnings:Y(U()).optional()}),$o=X({type:$(`message_dequeued`),conversationId:U(),requestId:U()}),es=X({type:$(`message_queued`),conversationId:U(),requestId:U(),position:K()}),ts=X({type:$(`message_queued_deleted`),conversationId:U(),requestId:U()}),ns=X({type:$(`message_request_complete`),conversationId:U(),requestId:U(),runStillActive:q().optional()}),rs=X({type:$(`navigate_settings`),tab:U()}),is=X({type:$(`notification_intent`),sourceEventName:U(),title:U(),body:U(),deliveryId:U().optional(),deepLinkMetadata:Z(U(),J()).optional(),targetGuardianPrincipalId:U().optional(),silent:q().optional()}),as=X({type:$(`open_url`),url:U().min(1),title:U().optional(),conversationId:U().optional()}),os=X({id:U(),label:U(),description:U().optional()}),ss=X({id:U(),question:U(),description:U().optional(),options:Y(os),freeTextPlaceholder:U().optional()}),cs=X({type:$(`question_request`),requestId:U(),questions:Y(ss),question:U(),description:U().optional(),options:Y(os),freeTextPlaceholder:U().optional(),conversationId:U().optional(),toolUseId:U().optional()}),ls=X({type:$(`relationship_state_updated`),updatedAt:U()}),us=X({type:$(`secret_request`),requestId:U(),service:U(),field:U(),label:U(),description:U().optional(),placeholder:U().optional(),conversationId:U().optional(),purpose:U().optional(),allowedTools:Y(U()).optional(),allowedDomains:Y(U()).optional(),allowOneTimeSend:q().optional()}),ds=X({type:U(),content:U().optional(),text:U().optional(),result:U().optional(),input:Z(U(),J()).optional(),toolName:U().optional(),isError:q().optional(),toolUseId:U().optional()}).passthrough(),fs=X({type:$(`subagent_event`),conversationId:U(),subagentId:U(),event:ds}).strict(),ps=X({type:$(`subagent_spawned`),subagentId:U(),parentConversationId:U(),label:U(),objective:U(),isFork:q().optional(),parentToolUseId:U().optional()}).strict(),ms=Q([`pending`,`running`,`awaiting_input`,`completed`,`failed`,`aborted`]),hs=X({inputTokens:K(),outputTokens:K(),estimatedCost:K()}).strict(),gs=X({type:$(`subagent_status_changed`),subagentId:U(),status:ms,error:U().optional(),usage:hs.optional()}).strict(),_s=X({type:$(`sync_changed`),tags:Y(U().min(1)).min(1),originClientId:U().min(1).optional()}),vs=Q([`tool_start`,`tool_complete`,`status`]),ys=X({type:$(`tool_output_chunk`),chunk:U(),conversationId:U().optional(),toolUseId:U().optional(),subType:vs.optional(),subToolName:U().optional(),subToolInput:U().optional(),subToolIsError:q().optional(),subToolId:U().optional(),messageId:U().optional()}),bs=X({pattern:U(),label:U()}),xs=Q([`anthropic-native`,`brave`,`perplexity`,`tavily`]),Ss=X({rank:K(),title:U(),url:U(),domain:U(),faviconUrl:U().optional(),snippet:U().optional(),age:U().optional(),score:K().optional()}),Cs=X({query:U(),provider:xs,resultCount:K(),durationMs:K(),results:Y(Ss),errorMessage:U().optional()}),ws=X({url:U(),finalUrl:U(),status:K(),contentType:U().optional(),byteCount:K(),charCount:K(),truncated:q(),title:U().optional(),domain:U(),faviconUrl:U().optional(),redirectCount:K(),durationMs:K(),errorMessage:U().optional(),mayRequireJavaScript:q().optional()}),Ts=X({webSearch:Cs.optional(),webFetch:ws.optional()}),Es=X({type:$(`tool_result`),toolName:U(),result:U(),isError:q().optional(),diff:Co.optional(),status:U().optional(),conversationId:U().optional(),imageData:U().optional(),imageDataList:Y(U()).optional(),toolUseId:U().optional(),messageId:U().optional(),riskLevel:U().optional(),riskReason:U().optional(),matchedTrustRuleId:U().optional(),isContainerized:q().optional(),riskScopeOptions:Y(bs).optional(),riskAllowlistOptions:Y(bo).optional(),riskDirectoryScopeOptions:Y(So).optional(),approvalMode:U().optional(),approvalReason:U().optional(),riskThreshold:U().optional(),activityMetadata:Ts.optional()}),Ds=X({type:$(`tool_use_preview_start`),toolUseId:U(),toolName:U(),conversationId:U().optional(),messageId:U().optional()}),Os=X({type:$(`tool_use_start`),toolName:U(),input:Z(U(),J()),toolUseId:U().optional(),messageId:U().optional(),conversationId:U().optional()}),ks=Q([`request_received`,`request_queued`,`request_dequeued`,`llm_call_started`,`llm_call_finished`,`assistant_message`,`tool_started`,`tool_permission_requested`,`tool_permission_decided`,`tool_finished`,`tool_failed`,`generation_handoff`,`message_complete`,`generation_cancelled`,`request_error`,`tool_profiling_summary`]),As=Q([`info`,`success`,`warning`,`error`]),js=X({type:$(`trace_event`),eventId:U(),conversationId:U(),requestId:U().optional(),timestampMs:K(),sequence:K(),kind:ks,status:As.optional(),summary:U(),attributes:Z(U(),Ma([U(),K(),q(),Ta()])).optional()}),Ms=X({type:$(`turn_profile_auto_routed`),conversationId:U(),profile:U(),profileLabel:U()}),Ns=X({type:$(`ui_surface_complete`),conversationId:U(),surfaceId:U(),summary:U(),submittedData:Z(U(),J()).optional()}),Ps=X({type:$(`ui_surface_dismiss`),conversationId:U(),surfaceId:U()}),Fs=X({id:U(),label:U(),style:Q([`primary`,`secondary`,`destructive`]).optional(),data:Z(U(),J()).optional()}),Is=X({type:$(`ui_surface_show`),conversationId:U(),surfaceId:U(),surfaceType:U(),title:U().optional(),data:Z(U(),J()),actions:Y(Fs).optional(),display:Q([`inline`,`panel`]).optional(),messageId:U().optional(),persistent:q().optional(),toolCallId:U().optional()}),Ls=X({type:$(`ui_surface_update`),conversationId:U(),surfaceId:U(),data:Z(U(),J())}),Rs=X({type:$(`usage_update`),conversationId:U(),inputTokens:K(),outputTokens:K(),totalInputTokens:K(),totalOutputTokens:K(),estimatedCost:K(),model:U(),contextWindowTokens:K().optional(),contextWindowMaxTokens:K().optional()}),zs=X({type:$(`user_message_echo`),text:U(),conversationId:U().optional(),messageId:U().optional(),requestId:U().optional(),clientMessageId:U().optional()}).strict(),Bs=`syntheticAgentErrorMessage`,Vs=X({cursorInTextField:q().optional().describe(`Whether the cursor is in an editable text field when dictation started`)}).passthrough().describe(`Dictation context (app name, window title, bundle ID, cursor state, selected text)`),Hs=X({transcription:U().describe(`Raw speech transcription`),context:Vs,profileId:U().describe(`Optional dictation profile ID`).optional()}),Us=X({id:U(),filename:U(),mimeType:U(),sizeBytes:K(),kind:U(),data:U().optional(),thumbnailData:U().optional(),fileBacked:q().optional()}),Ws=X({pattern:U(),label:U()}),Gs=X({label:U(),description:U(),pattern:U()}),Ks=X({scope:U(),label:U()}),qs=X({requestId:U(),title:U().optional(),description:U().optional(),toolName:U().optional(),riskLevel:U().optional(),riskReason:U().optional(),input:Z(U(),J()).optional(),allowlistOptions:Y(bo).optional(),scopeOptions:Y(xo).optional(),directoryScopeOptions:Y(So).optional(),persistentDecisionsAllowed:q().optional()}),Js=Q([`approved`,`denied`,`timed_out`]),Ys=X({id:U().optional(),name:U(),input:Z(U(),J()),result:U().optional(),isError:q().optional(),imageData:U().optional(),imageDataList:Y(U()).optional(),startedAt:K().optional(),completedAt:K().optional(),confirmationDecision:Js.optional(),confirmationLabel:U().optional(),riskLevel:U().optional(),riskReason:U().optional(),matchedTrustRuleId:U().optional(),autoApproved:q().optional(),approvalMode:U().optional(),approvalReason:U().optional(),riskThreshold:U().optional(),riskScopeOptions:Y(Ws).optional(),riskAllowlistOptions:Y(Gs).optional(),riskDirectoryScopeOptions:Y(Ks).optional(),activityMetadata:Ts.optional(),scopeOptions:Y(xo).optional(),pendingConfirmation:qs.optional()}),Xs=X({id:U(),label:U(),style:U().optional(),data:Z(U(),J()).optional()}),Zs=X({surfaceId:U(),surfaceType:U(),title:U().optional(),data:Z(U(),J()),actions:Y(Xs).optional(),display:U().optional(),persistent:q().optional(),completed:q().optional(),completionSummary:U().optional(),toolCallId:U().optional()}),Qs=X({subagentId:U(),label:U(),status:U(),error:U().optional(),conversationId:U().optional(),objective:U().optional()}),$s=X({appUrl:U().optional(),webUrl:U().optional()}),ec=X({channelId:U(),channelName:U().optional(),channelTs:U(),threadTs:U().optional(),sender:X({displayName:U().optional(),externalUserId:U().optional()}).optional(),messageLink:$s.optional(),threadLink:$s.optional()}),tc=Pa(`type`,[X({type:$(`text`),text:U()}),X({type:$(`thinking`),thinking:U()}),X({type:$(`tool_use`),toolCall:Ys}),X({type:$(`surface`),surface:Zs}),X({type:$(`attachment`),attachment:Us})]),nc=X({id:U(),mergedMessageIds:Y(U()).optional(),role:U(),content:U().optional(),timestamp:U(),attachments:Y(Us),toolCalls:Y(Ys).optional(),surfaces:Y(Zs).optional(),textSegments:Y(U()).optional(),thinkingSegments:Y(U()).optional(),contentOrder:Y(U()).optional(),contentBlocks:Y(tc).optional(),subagentNotification:Qs.optional(),slackMessage:ec.optional()}),rc=X({status:Io}),ic=$(`notification`),ac=Q([`new`,`seen`,`acted_on`,`dismissed`]),oc=Q([`low`,`medium`,`high`,`critical`]),sc=Q([`security`,`scheduling`,`background`,`email`,`system`]),cc=X({id:U(),label:U(),prompt:U()}),lc=Q([`emailDraft`,`documentPreview`,`permissionChat`,`paymentAuth`,`toolPermission`,`updatesList`]),uc=X({kind:lc}),dc=X({id:U(),type:ic,priority:K().int().min(0).max(100),title:U().optional(),summary:U(),timestamp:U(),status:ac.default(`new`),expiresAt:U().optional(),actions:Y(cc).optional(),urgency:oc.optional(),conversationId:U().optional(),detailPanel:uc.optional(),category:sc.optional(),noteworthy:q().optional(),fromAssistant:q().optional(),metadata:Z(U(),J()).optional(),createdAt:U()}),fc=Q([`deterministic`,`assistant`]),pc=X({id:U(),label:U(),icon:U().optional(),prompt:U(),source:fc}),mc=X({greeting:U(),timeAwayLabel:U(),newCount:K().int().min(0)}),hc=X({items:Y(dc),updatedAt:U(),contextBanner:mc,suggestedPrompts:Y(pc)}),gc=X({id:U(),category:Q([`voice`,`world`,`priorities`]),text:U(),confidence:Q([`strong`,`uncertain`]),source:Q([`onboarding`,`inferred`])}),_c=X({id:U(),name:U(),description:U(),tier:Q([`unlocked`,`next-up`,`earned`]),gate:U(),unlockHint:U().optional(),ctaLabel:U().optional()}),vc=X({version:$(1),assistantId:U(),tier:Ma([$(1),$(2),$(3),$(4)]),progressPercent:K(),facts:Y(gc),capabilities:Y(_c),conversationCount:K(),hatchedDate:U(),assistantName:U(),userName:U().optional(),updatedAt:U()}),yc=X({provider:U().nullish(),model:U().nullish(),status:U().nullish(),inputTokens:K().nullish(),outputTokens:K().nullish(),cacheCreationInputTokens:K().nullish(),cacheReadInputTokens:K().nullish(),stopReason:U().nullish(),requestMessageCount:K().nullish(),requestToolCount:K().nullish(),responseMessageCount:K().nullish(),responseToolCallCount:K().nullish(),responsePreview:U().nullish(),toolCallNames:Y(U()).nullish(),estimatedCostUsd:K().nullish(),durationMs:K().nullish()}),bc=X({kind:U(),label:U().nullish(),role:U().nullish(),text:U().nullish(),toolName:U().nullish(),data:J().optional(),language:U().nullish()}),xc=X({id:U(),createdAt:K(),requestPayload:Ta(),responsePayload:Ta(),provider:U().nullish(),summary:yc.nullish(),requestSections:Y(bc).nullish(),responseSections:Y(bc).nullish(),agentLoopExitReason:U().nullish(),callSite:U().nullish()}),Sc=X({nodeId:U(),score:K(),semanticSimilarity:K(),recencyBoost:K(),type:U().optional()}),Cc=X({reason:U(),semanticUnavailable:q(),fallbackSources:Y(U())}),wc=X({enabled:q(),degraded:q(),provider:U().nullable(),model:U().nullable(),degradation:Cc.nullable(),semanticHits:K().nullish(),mergedCount:K().nullish(),selectedCount:K().nullish(),tier1Count:K().nullish(),tier2Count:K().nullish(),hybridSearchLatencyMs:K().nullish(),sparseVectorUsed:q().nullish(),injectedTokens:K().nullish(),latencyMs:K().nullish(),topCandidates:Y(Sc),injectedText:U().nullable(),reason:U().nullable(),queryContext:U().nullable()}),Tc=X({slug:U(),finalActivation:K(),ownActivation:K(),priorActivation:K(),simUser:K(),simAssistant:K(),simNow:K(),simUserRerankBoost:K().optional(),simAssistantRerankBoost:K().optional(),inRerankPool:q().optional(),spreadContribution:K(),source:U(),status:U()}),Ec=X({d:K(),c_user:K(),c_assistant:K(),c_now:K(),k:K(),hops:K(),top_k:K(),epsilon:K()}),Dc=X({turn:K(),mode:U(),concepts:Y(Tc),config:Ec}),Oc=X({slug:U(),source:U(),pinned:q()}),kc=X({turn:K(),live:q(),shadow:q(),selections:Y(Oc),injectedText:U()}),Ac=X({messageId:U().nullish(),conversationKey:U().nullish(),conversationId:U().nullish(),conversationKind:U(),conversationTotalEstimatedCostUsd:K().nullish(),logs:Y(xc),memoryRecall:wc.nullable(),memoryV2Activation:Dc.nullable(),memoryV3Selection:kc.nullish()}),jc=X({type:U(),content:U(),toolName:U().optional(),isError:q().optional(),messageId:U().optional()}),Mc=X({subagentId:U(),objective:U().optional(),status:ms.optional(),usage:hs.optional(),events:Y(jc)}),Nc=e({ACPOptionKindSchema:()=>wo,ACPOptionSchema:()=>To,AllowlistOptionSchema:()=>bo,AssistantActivityAnchorSchema:()=>uo,AssistantActivityPhaseSchema:()=>lo,AssistantActivityReasonSchema:()=>fo,AssistantActivityStateEventSchema:()=>po,AssistantEventEnvelopeSchema:()=>Fc,AssistantEventSchema:()=>Pc,AssistantOutboundAttachmentSchema:()=>Ko,AssistantTextDeltaEventSchema:()=>mo,AssistantThinkingDeltaEventSchema:()=>ho,AssistantTurnStartEventSchema:()=>go,AvatarUpdatedEventSchema:()=>_o,CALL_SITE_SYNTHETIC_AGENT_ERROR_MESSAGE:()=>Bs,CapabilitySchema:()=>_c,CompactionCircuitClosedEventSchema:()=>vo,CompactionCircuitOpenEventSchema:()=>yo,ConfirmationDiffSchema:()=>Co,ConfirmationExecutionTargetSchema:()=>Eo,ConfirmationRequestEventSchema:()=>Do,ContactRequestEventSchema:()=>Oo,ContextBannerSchema:()=>mc,ConversationContentBlockSchema:()=>tc,ConversationErrorCodeSchema:()=>ko,ConversationErrorEventSchema:()=>Ao,ConversationListInvalidatedEventSchema:()=>Mo,ConversationListInvalidatedReasonSchema:()=>jo,ConversationMessageAttachmentSchema:()=>Us,ConversationMessageSchema:()=>nc,ConversationMessageSurfaceSchema:()=>Zs,ConversationMessageToolCallSchema:()=>Ys,ConversationSlackMessageSchema:()=>ec,ConversationSubagentNotificationSchema:()=>Qs,ConversationTitleUpdatedEventSchema:()=>No,DEFAULT_TOOL_EXECUTION_TIMEOUT_SEC:()=>120,DictationContextSchema:()=>Vs,DictationRequestSchema:()=>Hs,DirectoryScopeOptionSchema:()=>So,DiskPressureBlockedCapabilitySchema:()=>Fo,DiskPressureStateSchema:()=>Po,DiskPressureStatusChangedEventSchema:()=>Lo,DiskPressureStatusResponseSchema:()=>rc,DiskPressureStatusSchema:()=>Io,DocumentCommentCreatedEventSchema:()=>zo,DocumentCommentDeletedEventSchema:()=>Bo,DocumentCommentReopenedEventSchema:()=>Vo,DocumentCommentResolvedEventSchema:()=>Ho,DocumentEditorUpdateEventSchema:()=>Uo,ErrorEventSchema:()=>Wo,FactSchema:()=>gc,FeedActionSchema:()=>cc,FeedItemCategorySchema:()=>sc,FeedItemDetailPanelKindSchema:()=>lc,FeedItemDetailPanelSchema:()=>uc,FeedItemSchema:()=>dc,FeedItemStatusSchema:()=>ac,FeedItemTypeSchema:()=>ic,FeedItemUrgencySchema:()=>oc,GenerationCancelledEventSchema:()=>Go,GenerationHandoffEventSchema:()=>qo,HomeFeedResponseSchema:()=>hc,HomeFeedUpdatedEventSchema:()=>Jo,IdentityChangedEventSchema:()=>Yo,InteractionResolutionStateSchema:()=>Xo,InteractionResolvedEventSchema:()=>Zo,LLMCallSummarySchema:()=>yc,LLMContextSectionSchema:()=>bc,LLMRequestLogEntrySchema:()=>xc,LlmContextResponseSchema:()=>Ac,MemoryCandidateSchema:()=>Sc,MemoryDegradationSchema:()=>Cc,MemoryRecallLogSchema:()=>wc,MemoryV2ActivationLogSchema:()=>Dc,MemoryV2ConceptRowSchema:()=>Tc,MemoryV2ConfigSnapshotSchema:()=>Ec,MemoryV3SelectionLogSchema:()=>kc,MemoryV3SelectionRowSchema:()=>Oc,MessageCompleteEventSchema:()=>Qo,MessageDequeuedEventSchema:()=>$o,MessageQueuedDeletedEventSchema:()=>ts,MessageQueuedEventSchema:()=>es,MessageRequestCompleteEventSchema:()=>ns,NavigateSettingsEventSchema:()=>rs,NotificationIntentEventSchema:()=>is,OpenUrlEventSchema:()=>as,PendingToolConfirmationSchema:()=>qs,QuestionEntrySchema:()=>ss,QuestionOptionSchema:()=>os,QuestionRequestEventSchema:()=>cs,RelationshipStateSchema:()=>vc,RelationshipStateUpdatedEventSchema:()=>ls,RiskScopeOptionSchema:()=>bs,ScopeOptionSchema:()=>xo,SecretRequestEventSchema:()=>us,SubagentDetailEventSchema:()=>jc,SubagentDetailResponseSchema:()=>Mc,SubagentEventEventSchema:()=>fs,SubagentInnerEventSchema:()=>ds,SubagentSpawnedEventSchema:()=>ps,SubagentStatusChangedEventSchema:()=>gs,SubagentStatusSchema:()=>ms,SubagentUsageStatsSchema:()=>hs,SuggestedPromptSchema:()=>pc,SuggestedPromptSourceSchema:()=>fc,SurfaceActionSchema:()=>Fs,SyncChangedEventSchema:()=>_s,ToolActivityMetadataSchema:()=>Ts,ToolOutputChunkEventSchema:()=>ys,ToolOutputChunkSubTypeSchema:()=>vs,ToolResultEventSchema:()=>Es,ToolUsePreviewStartEventSchema:()=>Ds,ToolUseStartEventSchema:()=>Os,TraceEventKindSchema:()=>ks,TraceEventSchema:()=>js,TraceEventStatusSchema:()=>As,TurnProfileAutoRoutedEventSchema:()=>Ms,UISurfaceCompleteEventSchema:()=>Ns,UISurfaceDismissEventSchema:()=>Ps,UISurfaceShowEventSchema:()=>Is,UISurfaceUpdateEventSchema:()=>Ls,UsageUpdateEventSchema:()=>Rs,UserMessageEchoEventSchema:()=>zs,WebFetchMetadataSchema:()=>ws,WebSearchMetadataSchema:()=>Cs,WebSearchProviderIdSchema:()=>xs,WebSearchResultItemSchema:()=>Ss}),Pc=Pa(`type`,[po,mo,ho,go,_o,vo,yo,Do,Oo,Ao,Mo,No,Lo,zo,Bo,Vo,Ho,Uo,Wo,Go,qo,Jo,Yo,Zo,Qo,$o,es,ts,ns,rs,is,as,cs,ls,us,fs,ps,gs,_s,ys,Es,Ds,Os,js,Ms,Ns,Ps,Is,Ls,Rs,zs]),Fc=X({id:U(),conversationId:U().optional(),seq:K().int().optional(),emittedAt:U(),message:Pc});async function Ic(e){let{data:t,error:n,response:r}=await p({body:e??{},throwOnError:!1});return c(r,n,`Failed to hatch assistant.`),r.ok?{ok:!0,status:r.status,data:t}:{ok:!1,status:r.status,error:s(n,r)}}async function Lc(e){if(ae()){let e=ie();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 d({path:{id:e},throwOnError:!1});return c(r,n,`Failed to get assistant.`),r.ok?{ok:!0,status:r.status,data:t}:{ok:!1,status:r.status,error:s(n,r)}}let t=await ne({query:{hosting:`platform`},throwOnError:!1});if(c(t.response,t.error,`Failed to get assistant.`),!t.response.ok)return{ok:!1,status:t.response.status,error:s(t.error,t.response)};let n=t.data?.results??[];if(n.length>0)return{ok:!0,status:t.response.status,data:n[0]};let r=await ne({query:{hosting:`local`},throwOnError:!1});if(c(r.response,r.error,`Failed to get assistant.`),r.response.ok){let e=r.data?.results??[];if(e.length>0)return{ok:!0,status:r.response.status,data:e[0]}}return r.response.ok?{ok:!1,status:404,error:{detail:`No assistants found`}}:{ok:!1,status:r.response.status,error:s(r.error,r.response)}}async function Rc(e){let{data:t,error:n,response:r}=await i({path:{assistant_id:e},throwOnError:!1});return c(r,n,`Failed to get assistant healthz.`),r.ok&&t?{ok:!0,status:r.status,data:t}:{ok:!1,status:r.status,error:s(n,r)}}async function zc(e){let{data:n,error:r,response:i}=await t({path:{assistant_id:e},throwOnError:!1});if(c(i,r,`Failed to get assistant disk pressure status.`),i.ok){let e=rc.safeParse(n);return e.success?{ok:!0,status:i.status,data:e.data}:{ok:!1,status:i.status,error:s(e.error.message,i)}}return{ok:!1,status:i.status,error:s(r,i)}}async function Bc(e){let{data:t,error:r,response:i}=await n({path:{assistant_id:e},throwOnError:!1});if(c(i,r,`Failed to acknowledge assistant disk pressure.`),i.ok){let e=rc.safeParse(t);return e.success?{ok:!0,status:i.status,data:e.data}:{ok:!1,status:i.status,error:s(e.error.message,i)}}return{ok:!1,status:i.status,error:s(r,i)}}function Vc(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 Hc(e){let t=e&&typeof e==`object`&&!Array.isArray(e)?e:{};return Array.isArray(t.backups)?t.backups:[]}async function Uc(e){let t=!re(),[n,r]=await Promise.all([a({path:{assistant_id:e},throwOnError:!1}),t?te({path:{assistant_id:e},throwOnError:!1}):null]);if(c(n.response,n.error,`Failed to list assistant backups.`),!n.response.ok)return{ok:!1,status:n.response.status,error:s(n.error,n.response)};let i=Vc(n.data);if(r){if(r.response?.ok){let e=Hc(r.data);return{ok:!0,status:n.response.status,data:[...e,...i]}}if(i.length===0&&r.response)return{ok:!1,status:r.response.status,error:s(r.error,r.response)}}return{ok:!0,status:n.response.status,data:i}}async function Wc(e){let{data:t,error:n,response:r}=re()?await o({path:{assistant_id:e},throwOnError:!1}):await ee({path:{assistant_id:e},throwOnError:!1});if(c(r,n,`Failed to create assistant backup.`),r.ok){let e=t&&typeof t==`object`&&!Array.isArray(t)?t:{};return{ok:!0,status:r.status,data:e}}return{ok:!1,status:r.status,error:s(n,r)}}async function Gc(e,t){let{data:n,error:i,response:a}=re()?await r({path:{assistant_id:e},body:{path:t.path??t.snapshot_name},throwOnError:!1}):await f({path:{assistant_id:e,snapshot_name:t.snapshot_name},throwOnError:!1});if(c(a,i,`Failed to restore assistant backup.`),a.ok){let e=n&&typeof n==`object`&&!Array.isArray(n)?n:{};return{ok:!0,status:a.status,data:e}}return{ok:!1,status:a.status,error:s(i,a)}}async function Kc(e){let{data:t,error:n,response:r}=await l({path:{id:e},throwOnError:!1});return c(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:s(n,r)}}async function qc(e){let{error:t,response:n}=await u({path:{id:e},throwOnError:!1});return c(n,t,`Failed to retire assistant.`),n.ok?{ok:!0}:{ok:!1,status:n.status,error:s(t,n)}}async function Jc(){let{data:e,error:t,response:n}=await ne({query:{hosting:`all`},throwOnError:!1});return c(n,t,`Failed to list assistants.`),n.ok?{ok:!0,status:n.status,data:e?.results??[]}:{ok:!1,status:n.status,error:s(t,n)}}export{Rc as a,Jc as c,qc as d,Fc as f,Bs as g,Mc as h,zc as i,Kc as l,Nc as m,Wc as n,Ic as o,Pc as p,Lc as r,Uc as s,Bc as t,Gc as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{n}from"./QueryClientProvider-DBAeGN3q.js";import{t as r}from"./useQuery-DAtrV0RI.js";import{t as i}from"./jsx-runtime-XSukodg_.js";import{t as a}from"./button-Cs9tc8OR.js";import{t as o}from"./card-BcKGvsaa.js";import"./src-Bah0_lDG.js";import{t as s}from"./toast-Cii5pffK.js";import{t as c}from"./archive-yWA8_b2E.js";import{t as l}from"./loader-circle-FEkI0Am4.js";import{B as u}from"./sdk.gen-up8j0_uF.js";import{t as d}from"./capture-error-1Tr5aMfq.js";import{$n as f,Rn as p,Xi as m,jt as h,ki as g}from"./index-DUwiZuxe.js";var _=e(t(),1),v=i();function y(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 b(){return(0,v.jsx)(o,{children:(0,v.jsxs)(`div`,{className:`flex min-h-[400px] flex-col items-center justify-center px-6 py-16 text-center`,children:[(0,v.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-[var(--surface-base)]`,children:(0,v.jsx)(c,{className:`h-6 w-6 text-[var(--content-disabled)] dark:text-[var(--content-default)]`})}),(0,v.jsx)(`h2`,{className:`mt-4 text-title-small text-[var(--content-default)]`,children:`No archived conversations`}),(0,v.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Conversations you archive will appear here.`})]})})}function x({conversation:e,isFirst:t,onUnarchive:n,isPending:r}){let i=[y(e.createdAt),e.source??`vellum-assistant`].filter(Boolean).join(` · `),o=e.title&&e.title.trim().length>0?e.title:`Untitled conversation`;return(0,v.jsxs)(`div`,{className:`flex items-center gap-3 py-3 ${t?``:`border-t border-[var(--border-base)]`}`,children:[(0,v.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,v.jsx)(`div`,{className:`truncate text-body-medium-default text-[var(--content-default)]`,children:o}),(0,v.jsx)(`p`,{className:`mt-0.5 truncate text-body-small-default text-[var(--content-tertiary)]`,children:i})]}),(0,v.jsx)(a,{variant:`outlined`,onClick:n,disabled:r,className:`shrink-0`,children:r?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(l,{className:`h-4 w-4 animate-spin`}),`Unarchiving`]}):`Unarchive`})]})}function S(){let e=n(),{data:t,isLoading:i}=r(h()),c=t?.results?.[0]?.id??null,{conversations:y,isLoading:S,isError:C,refetch:w}=p(c),[T,E]=(0,_.useState)(null),D=(0,_.useCallback)(async t=>{if(c){E(t);try{await u({path:{assistant_id:c,id:t},throwOnError:!0}),f(e,c)}catch(e){d(e,{context:`archive_settings_unarchive_conversation`}),s.error(`Failed to unarchive conversation.`)}finally{E(null)}}},[c,e]);return i||S?(0,v.jsx)(`div`,{className:`w-full`,children:(0,v.jsx)(`div`,{className:`flex min-h-[400px] items-center justify-center`,children:(0,v.jsx)(l,{className:`h-6 w-6 animate-spin text-[var(--content-disabled)]`})})}):C?(0,v.jsx)(`div`,{className:`w-full`,children:(0,v.jsx)(o,{children:(0,v.jsxs)(`div`,{className:`flex min-h-[400px] flex-col items-center justify-center px-6 py-16 text-center`,children:[(0,v.jsx)(`div`,{className:`flex h-12 w-12 items-center justify-center rounded-full bg-[var(--system-error-lighter)]`,children:(0,v.jsx)(g,{className:`h-6 w-6 text-[var(--system-error-default)]`})}),(0,v.jsx)(`h2`,{className:`mt-4 text-title-small text-[var(--content-default)]`,children:`Failed to load archived conversations`}),(0,v.jsx)(`p`,{className:`mt-1 text-body-medium-lighter text-[var(--content-tertiary)]`,children:`Something went wrong. Please try again.`}),(0,v.jsxs)(a,{variant:`outlined`,onClick:w,className:`mt-4`,children:[(0,v.jsx)(m,{className:`h-4 w-4`}),`Retry`]})]})})}):y.length===0?(0,v.jsx)(`div`,{className:`w-full`,children:(0,v.jsx)(b,{})}):(0,v.jsx)(`div`,{className:`w-full`,children:(0,v.jsx)(o,{noPadding:!0,className:`px-4`,children:y.map((e,t)=>(0,v.jsx)(x,{conversation:e,isFirst:t===0,onUnarchive:()=>{D(e.conversationId)},isPending:T===e.conversationId},e.conversationId))})})}export{S as ArchivePage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./createLucideIcon-D8wUFCt3.js";var t=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]);export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./create-selectors-LbkU9b0a.js";import{c as n,n as r,t as i}from"./feature-flag-catalog-CRgdQmMF.js";import{t as a}from"./client.gen-BKAMS0D0.js";var o={...i},s={...r},c=0,l={};function u(e={}){o={...i,...e};for(let e of Object.keys(l))delete l[e]}function d(e={}){s={...r,...e}}function f(){u(),d()}function p(e){return o[e]??i[e]??!1}function m(e){return s[e]??r[e]??``}var h=t(e()(e=>{let t=e;return{...i,hasHydrated:!1,stringFlags:{...r},setFlags:t=>e(e=>(u(t),Object.keys(t).some(n=>t[n]!==e[n])?t:e)),setFlag:(t,r,i)=>{let s=++c,u=()=>{if(l[t]!==s)return;delete l[t];let n=p(t);e(e=>e[t]===r?{[t]:n}:e)},d=n(t);i&&d?(l[t]=s,a.patch({url:`/v1/assistants/${i}/feature-flags/${d}`,body:{enabled:r},throwOnError:!1}).then(e=>{e.response?.ok?(o[t]=r,l[t]===s&&delete l[t]):u()}).catch(u)):o[t]=r,e({[t]:r})},markHydrated:()=>e({hasHydrated:!0}),resetForAssistantSwitch:()=>{f(),e({...i,hasHydrated:!1}),t({stringFlags:{...r}})},setStringFlags:e=>t(t=>{d(e);let n=t.stringFlags;return Object.keys(e).some(t=>e[t]!==n[t])?{stringFlags:e}:t}),setStringFlag:(e,r,i)=>{let o=++c,u=()=>{if(l[e]!==o)return;delete l[e];let n=m(e);t(t=>t.stringFlags[e]===r?{stringFlags:{...t.stringFlags,[e]:n}}:t)},d=n(e);i&&d?(l[e]=o,a.patch({url:`/v1/assistants/${i}/feature-flags/${d}`,body:{enabled:r},throwOnError:!1}).then(t=>{t.response?.ok?(s[e]=r,l[e]===o&&delete l[e]):u()}).catch(u)):s[e]=r,t(t=>({stringFlags:{...t.stringFlags,[e]:r}}))}}}));export{h as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./create-selectors-LbkU9b0a.js";import{t as n}from"./impersonate-version-flag-D_S9-Z77.js";var r=t(e(e=>({name:null,version:null,setIdentity:(t,r)=>{e({name:t,version:n()??r})},clearIdentity:()=>e({name:null,version:null})})));export{r as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-DJZBPgpf.js";import{t as n}from"./useQuery-DAtrV0RI.js";import{t as r}from"./jsx-runtime-XSukodg_.js";import"./src-Bah0_lDG.js";import{t as i}from"./tag-BkZB4euH.js";import{t as a}from"./toast-Cii5pffK.js";import{t as o}from"./loader-circle-FEkI0Am4.js";import{r as s,t as c}from"./capture-error-1Tr5aMfq.js";import{n as l}from"./auth-store-CYbo7naZ.js";import{a as u,r as d}from"./api-8hqpGaif.js";import{t as f}from"./assistant-feature-flag-store-CNdFPRBD.js";import{nr as p}from"./index-DUwiZuxe.js";var m=e(t(),1),h=r();function g({value:e,max:t,caption:n}){let r=t>0?Math.max(0,Math.min(e/t*100,100)):0,i=r>90;return(0,h.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,h.jsx)(`div`,{className:`h-2 w-full overflow-hidden rounded-full bg-[var(--surface-active)]`,children:(0,h.jsx)(`div`,{className:`h-full rounded-full transition-[width] duration-200`,style:{width:`${r}%`,backgroundColor:i?`var(--system-negative-strong)`:`var(--system-positive-strong)`}})}),n&&(0,h.jsx)(`span`,{className:`text-label-medium-default text-[var(--content-tertiary)]`,children:n})]})}var _=7,v=2e3;function y({version:e,loading:t,assistantId:n}){let r=(0,m.useRef)(0),i=(0,m.useRef)(null),[a,s]=(0,m.useState)(null),c=(0,m.useCallback)(()=>{if(r.current+=1,r.current>=_){r.current=0;let e=f.getState(),t=!e.settingsDeveloperNav;e.setFlag(`settingsDeveloperNav`,t,n),s(t?`Developer mode enabled`:`Developer mode disabled`),i.current!==null&&clearTimeout(i.current),i.current=setTimeout(()=>{s(null),i.current=null},v)}},[n]);return(0,m.useEffect)(()=>()=>{i.current!==null&&clearTimeout(i.current)},[]),t?(0,h.jsxs)(`span`,{className:`flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,h.jsx)(o,{className:`h-4 w-4 animate-spin`}),`Loading version...`]}):e?(0,h.jsxs)(`div`,{children:[(0,h.jsx)(`button`,{type:`button`,className:`break-all text-left text-body-medium-lighter text-[var(--content-default)]`,onClick:c,children:e}),a&&(0,h.jsx)(`p`,{className:`mt-1 text-body-small-default text-[var(--content-accent)]`,children:a})]}):(0,h.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`—`})}var b=[`currentAssistant`],x=4e3,S=9e4;function C(e,t){return(e.memory?.maxMb??null)!==(t.memory?.maxMb??null)||(e.cpu?.maxCores??null)!==(t.cpu?.maxCores??null)}function w(){let{data:e=null,isLoading:t,refetch:r}=n({queryKey:b,queryFn:async()=>{let e=await d();return e.ok?e.data:null},retry:!1}),i=e?.id,[o,l]=(0,m.useState)(null),[f,p]=(0,m.useState)(!1),[h,g]=(0,m.useState)(!1),_=(0,m.useRef)(0),v=(0,m.useRef)(0),y=(0,m.useCallback)(async e=>{if(!i)return l(null),p(!1),null;_.current+=1;let t=_.current;p(!0);try{let n=await u(i);return t===_.current?n.ok?(l(n.data),n.data):(e?.keepStaleOnError||l(null),null):null}catch(n){return t===_.current?(e?.keepStaleOnError||l(null),!s(n)&&!e?.keepStaleOnError&&(c(n,{context:`fetch_assistant_healthz`}),a.error(`Failed to load assistant info`)),null):null}finally{t===_.current&&p(!1)}},[i]);return(0,m.useEffect)(()=>{y()},[y]),(0,m.useEffect)(()=>()=>{v.current+=1,g(!1),l(null)},[i]),{assistant:e,assistantLoading:t,healthz:o,healthzLoading:f,healthzPolling:h,refetch:(0,m.useCallback)(async()=>{await r(),await y()},[r,y]),refetchUntilResized:(0,m.useCallback)(async e=>{let t=++v.current,n=Date.now()+S;g(!0);let i=e;try{for(r();Date.now()<n&&t===v.current;){if(await new Promise(e=>setTimeout(e,x)),t!==v.current)return;let e=await y({keepStaleOnError:!0});if(t!==v.current)return;if(e){if(i==null){i=e;continue}if(C(e,i))return}}}finally{t===v.current&&g(!1)}},[y,r])}}function T({assistant:e,assistantLoading:t,healthz:n,healthzLoading:r}){let a=p.use.isNonProduction(),s=l.use.user()?.email;if(t)return(0,h.jsxs)(`div`,{className:`flex items-center gap-2 text-body-medium-lighter text-[var(--content-tertiary)]`,children:[(0,h.jsx)(o,{className:`h-4 w-4 animate-spin`}),`Loading assistant info...`]});if(!e)return(0,h.jsx)(`p`,{className:`text-body-medium-lighter text-[var(--content-tertiary)]`,children:`No assistant found. Hatch an assistant to get started.`});let c=n?.version??e.current_release_version;return(0,h.jsxs)(`div`,{className:`grid grid-cols-[140px_minmax(0,1fr)] gap-y-3`,children:[s&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(D,{children:`Account`}),(0,h.jsx)(O,{children:s})]}),(0,h.jsx)(D,{children:`Name`}),(0,h.jsx)(O,{children:e.name}),e.description&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(D,{children:`Description`}),(0,h.jsx)(O,{children:e.description})]}),(0,h.jsx)(D,{children:`Status`}),(0,h.jsx)(`div`,{children:(0,h.jsx)(i,{tone:e.status===`active`?`positive`:`neutral`,children:e.status})}),(0,h.jsx)(D,{children:`Assistant ID`}),(0,h.jsx)(`span`,{className:`break-all font-mono text-body-small-default text-[var(--content-tertiary)]`,children:e.id}),a&&e.machine_id&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(D,{children:`Machine ID`}),(0,h.jsx)(`span`,{className:`break-all font-mono text-body-small-default text-[var(--content-tertiary)]`,children:e.machine_id})]}),(0,h.jsx)(D,{children:`Created`}),(0,h.jsx)(O,{children:e.created?new Date(e.created).toLocaleDateString():`Unknown`}),(0,h.jsx)(D,{children:`Version`}),(0,h.jsx)(y,{version:c??null,loading:r&&!e.current_release_version,assistantId:e.id??null})]})}function E(e){return e>=1024?`${(e/1024).toFixed(1)} GB`:`${e.toFixed(0)} MB`}function D({children:e}){return(0,h.jsx)(`span`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:e})}function O({children:e}){return(0,h.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e})}export{g as i,E as n,w as r,T as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./local-settings-lVNyIOJ_.js";import{o as t,r as n}from"./device-settings-C07QvMzm.js";import{r}from"./exports-B_RC9sMS.js";import{t as i}from"./useQuery-DAtrV0RI.js";import{n as a,t as o}from"./create-selectors-LbkU9b0a.js";import{t as s}from"./selection-store-BCKoLRDh.js";import{r as ee}from"./api-errors-DhNZwQy5.js";import{t as c}from"./capture-error-1Tr5aMfq.js";import{c as l,d as te,o as ne,r as u}from"./api-8hqpGaif.js";import{ht as re}from"./sdk.gen-BO4vbMAj.js";import{C as d,O as f,S as ie,a as p,d as m,f as ae,h,i as oe,l as se,n as ce,o as g,r as le,s as ue,t as de,u as fe,v as pe,y as me}from"./gateway-session-CaFk8wfN.js";import{S as _,a as he,i as ge,l as _e,m as ve,t as ye,u as be,w as xe}from"./native-biometric-B4t4zElu.js";import{n as Se}from"./event-bus-WRYwtHDl.js";var v=o(a(()=>({assistantState:{kind:`loading`},expectingFirstMessage:!1})));function y(e){if(e.ok)switch(e.data.status){case`active`:return e.data.is_local?{kind:`self_hosted`}:{kind:`active`};case`initializing`:return{kind:`initializing`};case`to_be_deleted`:return{kind:`cleaning_up`};default:return{kind:`error`,message:`Unexpected assistant status: ${e.data.status}`}}return e.status===404?{kind:`auto_hatch`}:{kind:`error`,message:ee(e.error,void 0,`Failed to check assistant status.`)}}function b(e){return e===void 0||e>=500}var Ce=`platform_hosted_disabled`,x=`We are at capacity for Vellum Managed Assistants, more will be available soon!`;function S(e,t){return e===503?t?.code===Ce:!1}var C=3e5;function w(){return{kind:`error`,message:`Your assistant is taking longer than expected to start. Please try again, or check the community for help.`}}var T=[`assistant`,`current`],E=3e3,we=new Set([`initializing`,`cleaning_up`]);function Te(e){if(!e)return!1;let t=y(e);return we.has(t.kind)?E:!1}function Ee(e){return i({queryKey:T,queryFn:()=>u(),enabled:e.enabled,retry:!1,refetchInterval:e=>Te(e.state.data),refetchOnWindowFocus:!1})}var D=e=>e===`authenticated`,O=e=>e!==`initializing`,k=e=>e===`present`,De=3,Oe=3,A=e=>{},j=()=>null,M=new class{state={kind:`loading`};hatching=!1;hatchRetryCount=0;initializingAssistantId=null;initializingRecoveryCount=0;hatchingVersion=void 0;generation=0;initializingTimeout=null;ready=!1;inputs={sessionStatus:`initializing`,isRetired:!1,isNonProduction:!1,hasPlatformSession:!1,onRedirect:A,resolveOnboardingRedirect:j,queryClient:null};setInputs(e){this.inputs=e,this.ready=!0}resetForLogout(){s.getState().activeAssistantId!==null&&s.getState().setActiveAssistantId(null),this.state.kind!==`loading`&&this.transition({kind:`loading`}),this.clearExpectingFirstMessage()}async respondToInputs(){if(this.ready){if(!D(this.inputs.sessionStatus)){this.resetForLogout();return}if(g()){this.applyGatewayAuthShortCircuit();return}if(h()&&!g()&&!this.inputs.hasPlatformSession){let e=this.inputs.resolveOnboardingRedirect({intendedDestination:window.location.pathname});e&&this.inputs.onRedirect(e);return}this.inputs.hasPlatformSession&&f(null),await this.checkAssistant()}}async applyServerResult(e){this.ready&&(this.state.kind!==`initializing`&&this.state.kind!==`cleaning_up`||await this.applyServerStateUpdate(e))}async checkAssistant(){if(!this.ready)return;if(g()){this.applyGatewayAuthShortCircuit();return}let e=this.generation;try{let t=await this.inputs.queryClient.fetchQuery({queryKey:T,queryFn:()=>u(),staleTime:0});if(e!==this.generation)return;await this.applyServerStateUpdate(t)}catch(t){if(console.error(`Error checking assistant status:`,t),c(t,{context:`check_assistant`}),e!==this.generation)return;this.transition({kind:`error`,message:`Network error. Please check your connection and try again.`})}}retryAssistant(){this.ready&&(this.hatchRetryCount=0,this.initializingRecoveryCount=0,this.checkAssistant())}hatchVersion(e){this.ready&&(this.hatchRetryCount=0,this.markExpectingFirstMessage(),this.hatchAndCheck(e))}markExpectingFirstMessage(){v.getState().expectingFirstMessage||v.setState({expectingFirstMessage:!0})}clearExpectingFirstMessage(){v.getState().expectingFirstMessage&&v.setState({expectingFirstMessage:!1})}transition(e){let t=this.state.kind;this.state=e,v.setState({assistantState:e}),e.kind===`initializing`?t!==`initializing`&&this.armInitializingWatchdog():this.initializingTimeout&&=(clearTimeout(this.initializingTimeout),null),e.kind!==`initializing`&&e.kind!==`active`&&this.clearExpectingFirstMessage()}armInitializingWatchdog(){this.initializingTimeout&&clearTimeout(this.initializingTimeout),this.initializingTimeout=setTimeout(()=>{r(`Assistant hatch stuck in initializing state`,{level:`warning`,extra:{timeoutMs:C}}),this.recoverStuckInitializingAssistant()},C)}projectActive(e){let t=e.data.maintenance_mode;f(null),s.getState().setActiveAssistantId(e.data.id),this.transition({kind:`active`,isLocal:e.data.is_local??!1,maintenanceMode:{enabled:t?.enabled}})}projectSelfHosted(e){f({url:e.data.ingress_url,token:e.data.platform_actor_token}),s.getState().setActiveAssistantId(e.data.id),this.transition({kind:`self_hosted`})}applyGatewayAuthShortCircuit(){let e=window.location.origin,t=`self`,n=fe();if(n){let r=ae();e=`${window.location.origin}${n}`,t=r?.assistantId??t}f({url:e,token:le()}),s.getState().setActiveAssistantId(t),this.transition({kind:`active`,isLocal:!0})}async applyServerStateUpdate(e){let t=this.generation,n=y(e);if(e.ok&&n.kind===`initializing`?this.initializingAssistantId=e.data.id:n.kind!==`initializing`&&(this.initializingAssistantId=null),n.kind===`auto_hatch`){if(this.inputs.isRetired){this.transition({kind:`retired`});return}let e=this.inputs.resolveOnboardingRedirect({intendedDestination:window.location.pathname});if(e){this.inputs.onRedirect(e);return}if(this.inputs.isNonProduction){this.transition({kind:`awaiting_version_selection`});return}this.markExpectingFirstMessage(),await this.hatchAndCheck();return}if(n.kind===`active`&&e.ok){this.initializingRecoveryCount=0,this.hatchingVersion=void 0,this.projectActive(e);return}if(n.kind===`self_hosted`&&e.ok){this.initializingRecoveryCount=0,this.hatchingVersion=void 0,this.projectSelfHosted(e);return}t===this.generation&&n.kind!==`active`&&this.transition(n)}async hatchAndCheck(e){if(this.hatching)return;if(this.hatchRetryCount>=De){this.transition({kind:`error`,message:`Failed to start your assistant after multiple attempts. Please refresh the page to try again.`});return}this.hatching=!0,this.hatchingVersion=e;let t=this.generation;this.transition({kind:`initializing`}),this.armInitializingWatchdog();try{let n=await ne(e?{version:e}:void 0);if(t!==this.generation)return;if(n.ok&&(this.initializingAssistantId=n.data.id,this.inputs.queryClient.setQueryData(T,{ok:!0,status:n.status,data:n.data})),!n.ok){if(this.hatchRetryCount+=1,r(`Hatch request failed`,{level:`warning`,extra:{status:n.status,error:n.error,attempt:this.hatchRetryCount}}),S(n.status,n.error)){this.transition({kind:`error`,message:x});return}if(b(n.status)){this.transition({kind:`initializing`}),setTimeout(()=>{this.inputs.queryClient.invalidateQueries({queryKey:T})},E);return}this.transition({kind:`error`,message:ee(n.error,void 0,`Failed to start your assistant. Please refresh the page to try again.`)});return}this.hatchRetryCount=0}catch(e){if(this.hatchRetryCount+=1,c(e,{context:`hatch_assistant`}),t!==this.generation)return;this.transition({kind:`initializing`}),setTimeout(()=>{this.inputs.queryClient.invalidateQueries({queryKey:T})},E);return}finally{this.hatching=!1}t===this.generation&&this.transition({kind:`initializing`})}async recoverStuckInitializingAssistant(){if(this.initializingRecoveryCount>=Oe){this.generation++,this.transition(w());return}this.initializingRecoveryCount++,this.generation++;let e=this.generation;try{let t=this.initializingAssistantId;if(!t){let n=await this.inputs.queryClient.fetchQuery({queryKey:T,queryFn:()=>u(),staleTime:0});if(e!==this.generation)return;if(n.ok&&n.data.status===`initializing`)t=n.data.id;else{let e=y(n);this.initializingAssistantId=null,e.kind===`auto_hatch`?await this.hatchAndCheck(this.hatchingVersion):e.kind===`active`&&n.ok?(this.initializingRecoveryCount=0,this.projectActive(n)):e.kind===`self_hosted`&&n.ok?(this.initializingRecoveryCount=0,this.projectSelfHosted(n)):e.kind!==`active`&&this.transition(e);return}}this.hatching=!0;let n=await te(t);if(e!==this.generation){this.hatching=!1;return}if(!n.ok&&n.status!==404){this.hatching=!1,r(`Failed to retire stuck initializing assistant`,{level:`warning`,extra:{status:n.status,error:n.error}}),this.transition(w());return}this.initializingAssistantId=null,s.getState().setActiveAssistantId(null),this.hatching=!1,await this.hatchAndCheck(this.hatchingVersion)}catch(t){if(this.hatching=!1,c(t,{context:`recover_stuck_initializing_assistant`}),e!==this.generation)return;this.transition(w())}}__resetForTesting(){this.initializingTimeout&&=(clearTimeout(this.initializingTimeout),null),this.state={kind:`loading`},this.hatching=!1,this.hatchRetryCount=0,this.initializingAssistantId=null,this.initializingRecoveryCount=0,this.hatchingVersion=void 0,this.generation=0,this.ready=!1,v.setState({expectingFirstMessage:!1}),this.inputs={sessionStatus:`initializing`,isRetired:!1,isNonProduction:!1,hasPlatformSession:!1,onRedirect:A,resolveOnboardingRedirect:j,queryClient:null},v.setState({assistantState:this.state}),s.setState({activeAssistantId:null})}},N=`vellum:onboarding:tosAccepted`,P=`vellum:onboarding:aiDataConsent`,F=`vellum:onboarding:completed`,ke=`vellum:onboarding:selectedVersion`;function I(){e(N),e(P),e(F),e(ke)}function Ae(e){if(!(typeof window>`u`)&&e!==null)try{if(n(`lastUserId`,``)===e)return;I(),t(`lastUserId`,e)}catch{}}var L=`vellum_active_organization_id`;function R(){return globalThis.sessionStorage===void 0?null:globalThis.sessionStorage}function z(){let e=R();if(!e)return null;try{return e.getItem(L)}catch{return null}}function B(e){let t=R();if(t)try{t.setItem(L,e)}catch{}}function je(){let e=R();if(e)try{e.removeItem(L)}catch{}}function Me(e,t){return e.length===0?null:t&&e.some(e=>e.id===t)?t:e[0].id}var V=o(a()((e,t)=>({organizations:[],currentOrganizationId:null,status:`idle`,error:null,fetchOrganizations:async()=>{e({status:`loading`,error:null});try{let n=(await re()).data?.results??[],r=Me(n,t().currentOrganizationId??z());r&&B(r),e({organizations:n,currentOrganizationId:r,status:r?`ready`:`error`,error:r?null:`No organization available for this user.`})}catch(t){e({status:`error`,error:t instanceof Error&&t.message?t.message:`Failed to load organizations.`})}},setCurrentOrganizationId:n=>{let{organizations:r}=t();r.some(e=>e.id===n)&&(B(n),e({currentOrganizationId:n,status:`ready`}))},clearOrganization:()=>{je(),e({organizations:[],currentOrganizationId:null,status:`idle`,error:null})}})));function Ne(){return V.getState().currentOrganizationId??z()}function H(){V.getState().clearOrganization()}function Pe(){let e=0,t=V.subscribe(t=>{(t.status===`ready`||t.status===`error`)&&(e=Date.now())}),n=$.subscribe((e,t)=>{let n=k(e.platformSession),r=k(t.platformSession);n&&(!r||e.user?.id!==t.user?.id)&&V.getState().fetchOrganizations()}),r=()=>{if(!k($.getState().platformSession))return;let{status:t}=V.getState();(t===`ready`||t===`error`)&&Date.now()-e>1e4&&V.getState().fetchOrganizations()},i=Se(`app.resume`,()=>{r()});return()=>{t(),n(),i()}}var Fe=`vellum:`,Ie=[`onboarding.`,`voice:`,`gw:`,`ff:client:`,`local:`,`integrations.`,`vellumDebug.`,`vellum_`],Le=new Set([`vellum_theme`,`vellum_share_analytics`,`vellum_share_diagnostics`,`vellum_biometric_enabled`,`vellum_llm_log_retention`,`vellum_timezone`,`vellum_media_embeds_enabled`,`vellum_media_embed_domains`,`onboarding.lastUserId`]);function Re(e){return e.startsWith(Fe)?!0:Le.has(e)?!1:Ie.some(t=>e.startsWith(t))}function U(){try{sessionStorage.clear()}catch{}try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n&&Re(n)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e))}catch{}}function ze(e){return e?.id??e?.email??e?.username??null}function W(e){return e?{id:ze(e),username:e.username??null,email:e.email??null,isStaff:e.is_staff??!1,firstName:e.first_name??``,lastName:e.last_name??``}:null}var G=null,K=null,q=!1,Be={id:`gateway-local`,username:`local`,email:null,isStaff:!1,firstName:`Local`,lastName:`User`},J=e=>({sessionStatus:`authenticated`,user:e,platformSession:`present`}),Y=()=>({sessionStatus:`authenticated`,user:Be}),X=()=>({sessionStatus:`unauthenticated`,user:null,platformSession:`absent`});function Ve(e){(!e||G&&G!==e)&&H(),G=e}function He(){K?.postMessage(`auth-changed`)}function Z(e){Ae(e),Ve(e)}var Ue=0;Promise.resolve();function We(e,t={}){let n=++Ue,r=()=>n!==Ue;_().then(async n=>{if(!r())if(n.ok&&n.data.user){let i=t.setUserOnSuccess?{user:W(n.data.user)}:{};if(h())try{let e=await Promise.race([l(),new Promise((e,t)=>setTimeout(()=>t(Error(`sync timeout`)),3e3))]);!r()&&e.ok&&await d(e.data)}catch{}if(r())return;e({platformSession:`present`,...i})}else t.clearOnFailure&&e({platformSession:`absent`})}).catch(()=>{r()||t.clearOnFailure&&e({platformSession:`absent`})}).finally(()=>{r()||e(e=>e.platformSession===`unknown`?{platformSession:`absent`}:{})})}function Q(e,t){!h()||p()||m().length>0?We(e,t):e({platformSession:`absent`})}var $=o(a()(e=>({sessionStatus:`initializing`,user:null,platformSession:`unknown`,initSession:async()=>{if(p()){try{await pe(),e(Y())}catch{e({sessionStatus:`unauthenticated`,user:null})}Q(e);return}if(h()&&!p()){if(m().length>0){try{let t=await _();if(t.ok&&t.data.user){let n=W(t.data.user);try{let t=await l();if(t.ok&&(await d(t.data),m().length===0&&se().length===0)){e(J(n));return}}catch{}e(J(n));return}}catch{}e(X());return}e(Y()),q?e({platformSession:`absent`}):We(e,{setUserOnSuccess:!0}),q=!1;return}try{let t=await _();if(t.ok&&t.data.user){let n=W(t.data.user);Z(n?.id??null),e(J(n));return}}catch(e){console.error(`auth.initSession failed`,e)}if(be()&&ge())try{let t=await he();if(t){_e(t),await ve();let n=await _();if(n.ok&&n.data.user){let t=W(n.data.user);Z(t?.id??null),e(J(t));return}}}catch(e){console.warn(`auth.initSession biometric recovery failed`,e)}Z(null),e(X())},connectLocalAssistant:async t=>{ie(t),await me(),e(Y()),Q(e)},refreshSession:async()=>{if(g()){try{await ce(oe()),e({sessionStatus:`authenticated`})}catch{return e(X()),!1}return Q(e,{clearOnFailure:!0}),!0}try{let t=await _();if(t.ok&&t.data.user){let n=W(t.data.user);return Z(n?.id??null),e(J(n)),!0}}catch(e){console.warn(`auth.refreshSession failed`,e)}return Z(null),e(X()),!1},logout:async()=>{if(g()){ue(),de(),I(),H(),U(),M.resetForLogout(),e(X()),He();return}q=!0;try{await xe()}finally{h()&&(document.cookie=`sessionid=; path=/; samesite=lax; expires=Thu, 01 Jan 1970 00:00:00 UTC`),ye(),I(),H(),U(),M.resetForLogout(),e(X()),He()}}}))),Ge=()=>D($.use.sessionStatus()),Ke=()=>!O($.use.sessionStatus()),qe=()=>k($.use.platformSession());function Je(){let{refreshSession:e}=$.getState(),t=[],n=()=>e().catch(e=>console.warn(`auth.refreshSession failed`,e)),r=Se(`app.resume`,()=>{n()});return t.push(r),typeof BroadcastChannel<`u`&&(K=new BroadcastChannel(`auth`),K.onmessage=()=>{U(),window.location.reload()},t.push(()=>{K?.close(),K=null})),()=>t.forEach(e=>e())}export{v as S,Ee as _,Ke as a,y as b,V as c,N as d,I as f,O as g,D as h,Ge as i,P as l,k as m,$ as n,Ne as o,M as p,qe as r,Pe as s,Je as t,F as u,x as v,b as x,S as y};
|