@8wave/ai-elements 0.126.0-beta.46 → 0.126.0-beta.48

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/dist/_chunks/{Agent-DJ6TBi6l.js → Agent-C1GMLvYc.js} +2 -2
  2. package/dist/_chunks/Agent-C1GMLvYc.js.map +1 -0
  3. package/dist/_chunks/{Document-CHcFWo2X.js → Document-CE96PH_Z.js} +2 -2
  4. package/dist/_chunks/{Document-CHcFWo2X.js.map → Document-CE96PH_Z.js.map} +1 -1
  5. package/dist/_chunks/{PkFilePreview-BdthRUlY.js → PkFilePreview-CtkjYYm0.js} +3 -3
  6. package/dist/_chunks/{PkFilePreview-BdthRUlY.js.map → PkFilePreview-CtkjYYm0.js.map} +1 -1
  7. package/dist/_chunks/{PkFilePreviewDialog-DyQtn85H.js → PkFilePreviewDialog-CSI_4eoa.js} +2 -2
  8. package/dist/_chunks/{PkFilePreviewDialog-DyQtn85H.js.map → PkFilePreviewDialog-CSI_4eoa.js.map} +1 -1
  9. package/dist/_chunks/{PkImageEditorDialog-DzA_qGj9.js → PkImageEditorDialog-Cs8daOKf.js} +2 -2
  10. package/dist/_chunks/{PkImageEditorDialog-DzA_qGj9.js.map → PkImageEditorDialog-Cs8daOKf.js.map} +1 -1
  11. package/dist/_chunks/{PkSelectionActions-BeREUy3h.js → PkSelectionActions-BkgCVAY6.js} +2 -2
  12. package/dist/_chunks/{PkSelectionActions-BeREUy3h.js.map → PkSelectionActions-BkgCVAY6.js.map} +1 -1
  13. package/dist/_chunks/{PkStreamingMarkdown-DLyBjSaH.js → PkStreamingMarkdown-BoD9GNXd.js} +3 -3
  14. package/dist/_chunks/{PkStreamingMarkdown-DLyBjSaH.js.map → PkStreamingMarkdown-BoD9GNXd.js.map} +1 -1
  15. package/dist/_chunks/{PkToolChatFile-Ck1uJvaj.js → PkToolChatFile-uuugwDtK.js} +3 -3
  16. package/dist/_chunks/{PkToolChatFile-Ck1uJvaj.js.map → PkToolChatFile-uuugwDtK.js.map} +1 -1
  17. package/dist/_chunks/{PkToolRequestGeolocation-ZYzgy6kw.js → PkToolRequestGeolocation-VtAohA8r.js} +2 -2
  18. package/dist/_chunks/{PkToolRequestGeolocation-ZYzgy6kw.js.map → PkToolRequestGeolocation-VtAohA8r.js.map} +1 -1
  19. package/dist/_chunks/{PkToolRequestOAuthConnection-Cj_IYnrW.js → PkToolRequestOAuthConnection-C6mz4a3r.js} +2 -2
  20. package/dist/_chunks/{PkToolRequestOAuthConnection-Cj_IYnrW.js.map → PkToolRequestOAuthConnection-C6mz4a3r.js.map} +1 -1
  21. package/dist/_chunks/{PkToolShowArtifact-CePvZJJ9.js → PkToolShowArtifact-DE2QAILB.js} +2 -2
  22. package/dist/_chunks/{PkToolShowArtifact-CePvZJJ9.js.map → PkToolShowArtifact-DE2QAILB.js.map} +1 -1
  23. package/dist/_chunks/{PkToolShowContactForm-B9u6KgjQ.js → PkToolShowContactForm-DbFbr4W4.js} +2 -2
  24. package/dist/_chunks/{PkToolShowContactForm-B9u6KgjQ.js.map → PkToolShowContactForm-DbFbr4W4.js.map} +1 -1
  25. package/dist/_chunks/{PkToolShowForm-B5A-Zj9m.js → PkToolShowForm-DUZRqE6L.js} +4 -4
  26. package/dist/_chunks/{PkToolShowForm-B5A-Zj9m.js.map → PkToolShowForm-DUZRqE6L.js.map} +1 -1
  27. package/dist/_chunks/{PkToolShowImageGallery-DOb626aG.js → PkToolShowImageGallery-BnXGmS-z.js} +2 -2
  28. package/dist/_chunks/{PkToolShowImageGallery-DOb626aG.js.map → PkToolShowImageGallery-BnXGmS-z.js.map} +1 -1
  29. package/dist/_chunks/{PkToolShowProductList-C-XQdsus.js → PkToolShowProductList-DjARkB8k.js} +2 -2
  30. package/dist/_chunks/{PkToolShowProductList-C-XQdsus.js.map → PkToolShowProductList-DjARkB8k.js.map} +1 -1
  31. package/dist/_chunks/{PkToolShowSources-DceDrdbn.js → PkToolShowSources-DyqHj3k9.js} +3 -3
  32. package/dist/_chunks/{PkToolShowSources-DceDrdbn.js.map → PkToolShowSources-DyqHj3k9.js.map} +1 -1
  33. package/dist/_chunks/{PkToolShowSuggestedReply-BYoW-L6k.js → PkToolShowSuggestedReply-BHloucB9.js} +2 -2
  34. package/dist/_chunks/{PkToolShowSuggestedReply-BYoW-L6k.js.map → PkToolShowSuggestedReply-BHloucB9.js.map} +1 -1
  35. package/dist/_chunks/{PkToolShowVideo-C_1ziurv.js → PkToolShowVideo-p4cHGjAv.js} +2 -2
  36. package/dist/_chunks/{PkToolShowVideo-C_1ziurv.js.map → PkToolShowVideo-p4cHGjAv.js.map} +1 -1
  37. package/dist/_chunks/{PkToolShowWebPages-yFdm0n0F.js → PkToolShowWebPages-DA0YtpMg.js} +2 -2
  38. package/dist/_chunks/{PkToolShowWebPages-yFdm0n0F.js.map → PkToolShowWebPages-DA0YtpMg.js.map} +1 -1
  39. package/dist/_chunks/{chatImagePolicy-Dqke0kDv.js → chatImagePolicy-DzkymjG_.js} +2 -2
  40. package/dist/_chunks/{chatImagePolicy-Dqke0kDv.js.map → chatImagePolicy-DzkymjG_.js.map} +1 -1
  41. package/dist/_chunks/{utils-CEzr10hz.js → utils-wfTrmetf.js} +2 -2
  42. package/dist/_chunks/{utils-CEzr10hz.js.map → utils-wfTrmetf.js.map} +1 -1
  43. package/dist/ai-elements.es.js +1574 -1523
  44. package/dist/ai-elements.es.js.map +1 -1
  45. package/dist-vue/PkChatbot.js +1 -1
  46. package/dist-vue/PkChatbotEmptyState.js +1 -1
  47. package/dist-vue/PkChatbotInput.js +1 -1
  48. package/dist-vue/PkChatbotMessages.js +1 -1
  49. package/dist-vue/PkChatbotStepPayload.js +1 -1
  50. package/dist-vue/PkChatbotStepToolDetail.js +1 -1
  51. package/dist-vue/PkChatbotSteps.js +1 -1
  52. package/dist-vue/PkChatbotViewChat.js +1 -1
  53. package/dist-vue/PkChatbotViewConversations.js +1 -1
  54. package/dist-vue/PkChatbotViewFiles.js +1 -1
  55. package/dist-vue/PkChatbotViewProfile.js +1 -1
  56. package/dist-vue/_chunks/{Agent-DrnYCRFA.js → Agent-isVYBr_n.js} +2 -2
  57. package/dist-vue/_chunks/Agent-isVYBr_n.js.map +1 -0
  58. package/dist-vue/_chunks/{Document-CA7c3oZE.js → Document-CsEiPyJf.js} +2 -2
  59. package/dist-vue/_chunks/{Document-CA7c3oZE.js.map → Document-CsEiPyJf.js.map} +1 -1
  60. package/dist-vue/_chunks/{PkChatbot-BUHFAQYp.js → PkChatbot-DJ-kKNeV.js} +8 -8
  61. package/dist-vue/_chunks/{PkChatbot-BUHFAQYp.js.map → PkChatbot-DJ-kKNeV.js.map} +1 -1
  62. package/dist-vue/_chunks/{PkChatbotEmptyState-CdE2z9C2.js → PkChatbotEmptyState-CQwz5hSb.js} +2 -2
  63. package/dist-vue/_chunks/{PkChatbotEmptyState-CdE2z9C2.js.map → PkChatbotEmptyState-CQwz5hSb.js.map} +1 -1
  64. package/dist-vue/_chunks/{PkChatbotInput-D6khxAJ8.js → PkChatbotInput-BGlJtAlP.js} +4 -4
  65. package/dist-vue/_chunks/{PkChatbotInput-D6khxAJ8.js.map → PkChatbotInput-BGlJtAlP.js.map} +1 -1
  66. package/dist-vue/_chunks/{PkChatbotMessages-DqoPly0A.js → PkChatbotMessages-2mYFC4KH.js} +18 -18
  67. package/dist-vue/_chunks/{PkChatbotMessages-DqoPly0A.js.map → PkChatbotMessages-2mYFC4KH.js.map} +1 -1
  68. package/dist-vue/_chunks/{PkChatbotStepPayload-Ksj_Mp7n.js → PkChatbotStepPayload-BxJcO_kc.js} +2 -2
  69. package/dist-vue/_chunks/{PkChatbotStepPayload-Ksj_Mp7n.js.map → PkChatbotStepPayload-BxJcO_kc.js.map} +1 -1
  70. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BqAF4YZl.js → PkChatbotStepToolDetail-DfHNp8if.js} +3 -3
  71. package/dist-vue/_chunks/{PkChatbotStepToolDetail-BqAF4YZl.js.map → PkChatbotStepToolDetail-DfHNp8if.js.map} +1 -1
  72. package/dist-vue/_chunks/{PkChatbotSteps-C6GAEPfL.js → PkChatbotSteps-BrlFQA5a.js} +5 -5
  73. package/dist-vue/_chunks/{PkChatbotSteps-C6GAEPfL.js.map → PkChatbotSteps-BrlFQA5a.js.map} +1 -1
  74. package/dist-vue/_chunks/{PkChatbotViewChat-DE0qVYZ-.js → PkChatbotViewChat-DyYzQ0_6.js} +7 -7
  75. package/dist-vue/_chunks/{PkChatbotViewChat-DE0qVYZ-.js.map → PkChatbotViewChat-DyYzQ0_6.js.map} +1 -1
  76. package/dist-vue/_chunks/{PkChatbotViewConversations-HNJPIMeQ.js → PkChatbotViewConversations-Bfl-Cu3s.js} +3 -3
  77. package/dist-vue/_chunks/{PkChatbotViewConversations-HNJPIMeQ.js.map → PkChatbotViewConversations-Bfl-Cu3s.js.map} +1 -1
  78. package/dist-vue/_chunks/{PkChatbotViewFiles-gGshDAPk.js → PkChatbotViewFiles-D0Ym57Sc.js} +3 -3
  79. package/dist-vue/_chunks/{PkChatbotViewFiles-gGshDAPk.js.map → PkChatbotViewFiles-D0Ym57Sc.js.map} +1 -1
  80. package/dist-vue/_chunks/{PkChatbotViewProfile-BuJtqq8F.js → PkChatbotViewProfile-Da95mth_.js} +2 -2
  81. package/dist-vue/_chunks/{PkChatbotViewProfile-BuJtqq8F.js.map → PkChatbotViewProfile-Da95mth_.js.map} +1 -1
  82. package/dist-vue/_chunks/{PkFilePreview-CGCMa6NV.js → PkFilePreview-jUCV8QJV.js} +4 -4
  83. package/dist-vue/_chunks/{PkFilePreview-CGCMa6NV.js.map → PkFilePreview-jUCV8QJV.js.map} +1 -1
  84. package/dist-vue/_chunks/{PkFilePreviewDialog-DRkXUy1_.js → PkFilePreviewDialog-Bzeqzrso.js} +2 -2
  85. package/dist-vue/_chunks/{PkFilePreviewDialog-DRkXUy1_.js.map → PkFilePreviewDialog-Bzeqzrso.js.map} +1 -1
  86. package/dist-vue/_chunks/{PkImageEditorDialog-M0xhsEUs.js → PkImageEditorDialog-DyKncQED.js} +2 -2
  87. package/dist-vue/_chunks/{PkImageEditorDialog-M0xhsEUs.js.map → PkImageEditorDialog-DyKncQED.js.map} +1 -1
  88. package/dist-vue/_chunks/{PkStreamingMarkdown-48T0DPih.js → PkStreamingMarkdown-BN35ztaH.js} +3 -3
  89. package/dist-vue/_chunks/{PkStreamingMarkdown-48T0DPih.js.map → PkStreamingMarkdown-BN35ztaH.js.map} +1 -1
  90. package/dist-vue/_chunks/{PkToolChatFile-qKYe0XRX.js → PkToolChatFile-CjmR6vJr.js} +3 -3
  91. package/dist-vue/_chunks/{PkToolChatFile-qKYe0XRX.js.map → PkToolChatFile-CjmR6vJr.js.map} +1 -1
  92. package/dist-vue/_chunks/{PkToolRequestGeolocation-BuknnxuZ.js → PkToolRequestGeolocation-4lo7rdw_.js} +2 -2
  93. package/dist-vue/_chunks/{PkToolRequestGeolocation-BuknnxuZ.js.map → PkToolRequestGeolocation-4lo7rdw_.js.map} +1 -1
  94. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BaMZkvU5.js → PkToolRequestOAuthConnection-DLvI-FO1.js} +2 -2
  95. package/dist-vue/_chunks/{PkToolRequestOAuthConnection-BaMZkvU5.js.map → PkToolRequestOAuthConnection-DLvI-FO1.js.map} +1 -1
  96. package/dist-vue/_chunks/{PkToolShowArtifact-D51SQ08X.js → PkToolShowArtifact-CUnLCfe2.js} +2 -2
  97. package/dist-vue/_chunks/{PkToolShowArtifact-D51SQ08X.js.map → PkToolShowArtifact-CUnLCfe2.js.map} +1 -1
  98. package/dist-vue/_chunks/{PkToolShowChart-Cf3Hi-Pb.js → PkToolShowChart-BKaqm4jB.js} +2 -2
  99. package/dist-vue/_chunks/{PkToolShowChart-Cf3Hi-Pb.js.map → PkToolShowChart-BKaqm4jB.js.map} +1 -1
  100. package/dist-vue/_chunks/{PkToolShowContactForm-D8Z4bRx9.js → PkToolShowContactForm-BPgCFRBO.js} +2 -2
  101. package/dist-vue/_chunks/{PkToolShowContactForm-D8Z4bRx9.js.map → PkToolShowContactForm-BPgCFRBO.js.map} +1 -1
  102. package/dist-vue/_chunks/{PkToolShowDiagram-Bla0_Vc2.js → PkToolShowDiagram-BA1ngT_R.js} +2 -2
  103. package/dist-vue/_chunks/{PkToolShowDiagram-Bla0_Vc2.js.map → PkToolShowDiagram-BA1ngT_R.js.map} +1 -1
  104. package/dist-vue/_chunks/{PkToolShowForm-BO3NuyAu.js → PkToolShowForm-CPzloHZG.js} +4 -4
  105. package/dist-vue/_chunks/{PkToolShowForm-BO3NuyAu.js.map → PkToolShowForm-CPzloHZG.js.map} +1 -1
  106. package/dist-vue/_chunks/{PkToolShowImageGallery-BLISCC3h.js → PkToolShowImageGallery-Cf_xEnCc.js} +2 -2
  107. package/dist-vue/_chunks/{PkToolShowImageGallery-BLISCC3h.js.map → PkToolShowImageGallery-Cf_xEnCc.js.map} +1 -1
  108. package/dist-vue/_chunks/{PkToolShowProductList-D5JZ6W7c.js → PkToolShowProductList-BR74ZJ0y.js} +2 -2
  109. package/dist-vue/_chunks/{PkToolShowProductList-D5JZ6W7c.js.map → PkToolShowProductList-BR74ZJ0y.js.map} +1 -1
  110. package/dist-vue/_chunks/{PkToolShowSources-SnQoTbvq.js → PkToolShowSources-98lDr3hZ.js} +3 -3
  111. package/dist-vue/_chunks/{PkToolShowSources-SnQoTbvq.js.map → PkToolShowSources-98lDr3hZ.js.map} +1 -1
  112. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DCZbwFhR.js → PkToolShowSuggestedReply-C1bBBrWL.js} +2 -2
  113. package/dist-vue/_chunks/{PkToolShowSuggestedReply-DCZbwFhR.js.map → PkToolShowSuggestedReply-C1bBBrWL.js.map} +1 -1
  114. package/dist-vue/_chunks/{PkToolShowVideo-D7pwwsfX.js → PkToolShowVideo-BAHMp9Om.js} +2 -2
  115. package/dist-vue/_chunks/{PkToolShowVideo-D7pwwsfX.js.map → PkToolShowVideo-BAHMp9Om.js.map} +1 -1
  116. package/dist-vue/_chunks/{PkToolShowWebPages-dbNooGK_.js → PkToolShowWebPages-ChdvHjDW.js} +2 -2
  117. package/dist-vue/_chunks/{PkToolShowWebPages-dbNooGK_.js.map → PkToolShowWebPages-ChdvHjDW.js.map} +1 -1
  118. package/dist-vue/_chunks/{createChatbotApiClient-_gh3Y1rl.js → createChatbotApiClient-BNRjO4rv.js} +2 -2
  119. package/dist-vue/_chunks/{createChatbotApiClient-_gh3Y1rl.js.map → createChatbotApiClient-BNRjO4rv.js.map} +1 -1
  120. package/dist-vue/_chunks/{useChatbotStore-CjFPM9Q5.js → useChatbotStore-BQ9areKD.js} +1071 -1020
  121. package/dist-vue/_chunks/useChatbotStore-BQ9areKD.js.map +1 -0
  122. package/dist-vue/_chunks/{utils-CaPUJibf.js → utils-3Tmkyrn8.js} +2 -2
  123. package/dist-vue/_chunks/{utils-CaPUJibf.js.map → utils-3Tmkyrn8.js.map} +1 -1
  124. package/dist-vue/api.js +1 -1
  125. package/dist-vue/composables.js +4 -4
  126. package/dist-vue/index.js +28 -28
  127. package/dist-vue/packages/models/src/schema/constants.d.ts +1 -1
  128. package/package.json +2 -2
  129. package/dist/_chunks/Agent-DJ6TBi6l.js.map +0 -1
  130. package/dist-vue/_chunks/Agent-DrnYCRFA.js.map +0 -1
  131. package/dist-vue/_chunks/useChatbotStore-CjFPM9Q5.js.map +0 -1
@@ -1,15 +1,15 @@
1
- import { $ as e, A as t, B as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, P as m, Q as h, R as g, S as _, T as v, U as y, W as b, X as ee, Y as te, Z as ne, _t as re, a as ie, at as ae, b as oe, bt as x, ct as se, dt as ce, et as le, g as ue, gt as de, h as fe, ht as pe, i as me, it as he, k as ge, l as _e, lt as ve, m as ye, mt as S, nt as C, o as be, ot as xe, p as w, q as Se, rt as Ce, s as we, st as Te, tt as Ee, u as De, ut as Oe, vt as ke, x as Ae, xt as je, y as Me, yt as Ne, z as Pe } from "./schemas-CwcNxjnD.js";
2
- import { n as Fe, t as Ie } from "./useSafeLocalStorage-Bn4SsL8C.js";
3
- import { i as Le, r as Re, t as ze } from "./createChatbotApiClient-_gh3Y1rl.js";
4
- import { Q as Be, V as Ve, Z as He, at as Ue, et as We, nt as Ge, ot as Ke, st as qe } from "./Agent-DrnYCRFA.js";
5
- import { d as Je, r as Ye } from "./message-DuibQyHy.js";
6
- import { n as Xe } from "./src-nb8MU1sh.js";
7
- import { computed as T, getCurrentScope as E, isReadonly as Ze, nextTick as Qe, onScopeDispose as $e, reactive as et, ref as D, shallowRef as O, toRefs as tt, toValue as nt, watch as k, watchEffect as rt } from "vue";
8
- import { useI18n as it } from "vue-i18n";
9
- import { useDocumentVisibility as at, usePreferredDark as ot } from "@vueuse/core";
10
- import { defineStore as A } from "pinia";
1
+ import { $ as e, A as t, B as n, D as r, E as i, F as a, G as o, H as s, I as c, J as l, K as u, L as d, M as f, N as p, P as m, Q as h, R as g, S as _, T as v, U as ee, W as y, X as te, Y as ne, Z as re, _t as ie, a as ae, at as oe, b as se, bt as b, ct as ce, dt as le, et as ue, g as de, gt as fe, h as pe, ht as me, i as he, it as ge, k as _e, l as ve, lt as ye, m as be, mt as x, nt as S, o as xe, ot as Se, p as C, q as Ce, rt as we, s as Te, st as Ee, tt as De, u as Oe, ut as ke, vt as Ae, x as je, xt as Me, y as Ne, yt as Pe, z as Fe } from "./schemas-CwcNxjnD.js";
2
+ import { n as Ie, t as Le } from "./useSafeLocalStorage-Bn4SsL8C.js";
3
+ import { i as Re, r as ze, t as Be } from "./createChatbotApiClient-BNRjO4rv.js";
4
+ import { Q as Ve, V as He, Z as Ue, at as We, et as Ge, nt as Ke, ot as qe, st as Je } from "./Agent-isVYBr_n.js";
5
+ import { d as Ye, r as Xe } from "./message-DuibQyHy.js";
6
+ import { n as Ze } from "./src-nb8MU1sh.js";
7
+ import { computed as w, getCurrentScope as T, isReadonly as Qe, nextTick as $e, onScopeDispose as et, reactive as tt, ref as E, shallowRef as D, toRefs as nt, toValue as rt, watch as O, watchEffect as it } from "vue";
8
+ import { useI18n as at } from "vue-i18n";
9
+ import { useDocumentVisibility as ot, usePreferredDark as st } from "@vueuse/core";
10
+ import { defineStore as k } from "pinia";
11
11
  // ../../packages/utils/src/device-context.ts
12
- function st() {
12
+ function ct() {
13
13
  let e = navigator.connection, t = navigator.userAgentData;
14
14
  return {
15
15
  dateTime: (/* @__PURE__ */ new Date()).toISOString(),
@@ -39,7 +39,7 @@ function st() {
39
39
  historyLength: window.history.length
40
40
  };
41
41
  }
42
- async function ct(e) {
42
+ async function lt(e) {
43
43
  if (!navigator.geolocation || !navigator.permissions) return null;
44
44
  try {
45
45
  if ((await navigator.permissions.query({ name: "geolocation" })).state !== "granted") return null;
@@ -57,16 +57,16 @@ async function ct(e) {
57
57
  }
58
58
  }
59
59
  // ../../packages/composable/src/chatbot/hostTools.ts
60
- var lt = "agentstudio:page-navigation", ut = (e) => typeof e?.afterOutput == "function", dt = (e) => e.toolMetadata?.source === Ue, ft = (e, t) => {
60
+ var ut = "agentstudio:page-navigation", dt = (e) => typeof e?.afterOutput == "function", ft = (e) => e.toolMetadata?.source === We, pt = (e, t) => {
61
61
  if (!t || !e?.length) return;
62
- let n = new Set(t.allowed), r = e.filter((e) => n.has(e.name) && !We(e.name)).map(({ execute: e, confirmation: t, policy: n, ...r }) => r);
62
+ let n = new Set(t.allowed), r = e.filter((e) => n.has(e.name) && !Ge(e.name)).map(({ execute: e, confirmation: t, policy: n, ...r }) => r);
63
63
  return r.length > 0 ? r : void 0;
64
64
  };
65
- function pt(e) {
65
+ function mt(e) {
66
66
  let t = 0, n = 0, r = (t) => {
67
67
  n = t, e.onPendingChange?.(n);
68
68
  }, i = Promise.resolve(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Set(), s = (e) => {
69
- ut(e) && e.abandon?.();
69
+ dt(e) && e.abandon?.();
70
70
  }, c = (e, t) => t.requireConfirmation.includes(e.name) || t.confirmDestructive && e.annotations?.destructiveHint === !0, l = (t, n) => e.addToolOutput({
71
71
  tool: t.toolName,
72
72
  toolCallId: t.toolCallId,
@@ -80,7 +80,7 @@ function pt(e) {
80
80
  async function d(n, r) {
81
81
  let i = () => r === t, d = e.capability(), f = e.registry()?.find((e) => e.name === n.toolName), p = f?.policy?.timeoutMs ?? d?.timeoutMs;
82
82
  if (!f || p === void 0) {
83
- u(n, Ke(n.readOnly));
83
+ u(n, qe(n.readOnly));
84
84
  return;
85
85
  }
86
86
  let m;
@@ -103,22 +103,22 @@ function pt(e) {
103
103
  }
104
104
  let v = new AbortController();
105
105
  a.set(n.toolCallId, v), e.onActivity?.(n);
106
- let y = setTimeout(() => v.abort(/* @__PURE__ */ Error("timeout")), p), b;
106
+ let ee = setTimeout(() => v.abort(/* @__PURE__ */ Error("timeout")), p), y;
107
107
  try {
108
108
  let t = new Promise((e, t) => {
109
109
  v.signal.addEventListener("abort", () => t(v.signal.reason), { once: !0 });
110
110
  });
111
- b = Promise.resolve(f.execute(n.input, {
111
+ y = Promise.resolve(f.execute(n.input, {
112
112
  signal: v.signal,
113
113
  callId: n.toolCallId,
114
114
  messageId: n.messageId
115
115
  }));
116
- let r = await Promise.race([b, t]);
116
+ let r = await Promise.race([y, t]);
117
117
  if (!i()) {
118
118
  s(r);
119
119
  return;
120
120
  }
121
- if (ut(r)) {
121
+ if (dt(r)) {
122
122
  l(n, r.result ?? null);
123
123
  let t = !1, a = () => {
124
124
  t || (t = !0, o.delete(a), r.abandon?.());
@@ -128,11 +128,11 @@ function pt(e) {
128
128
  });
129
129
  } else l(n, r ?? null);
130
130
  } catch (e) {
131
- if (b?.then(s, () => void 0), !i()) return;
131
+ if (y?.then(s, () => void 0), !i()) return;
132
132
  let t = v.signal.aborted;
133
- u(n, t ? Ke(n.readOnly) : e instanceof Error && e.message ? e.message : "The host app failed to run this call.");
133
+ u(n, t ? qe(n.readOnly) : e instanceof Error && e.message ? e.message : "The host app failed to run this call.");
134
134
  } finally {
135
- clearTimeout(y), a.delete(n.toolCallId), e.onActivity?.(void 0);
135
+ clearTimeout(ee), a.delete(n.toolCallId), e.onActivity?.(void 0);
136
136
  }
137
137
  }
138
138
  return {
@@ -150,66 +150,66 @@ function pt(e) {
150
150
  }
151
151
  };
152
152
  }
153
- // ../../node_modules/.pnpm/@ai-sdk+provider@4.0.38/node_modules/@ai-sdk/provider/dist/index.js
154
- var mt = "vercel.ai.error", ht = Symbol.for(mt), j = class e extends Error {
153
+ // ../../node_modules/.pnpm/@ai-sdk+provider@4.0.39/node_modules/@ai-sdk/provider/dist/index.js
154
+ var ht = "vercel.ai.error", gt = Symbol.for(ht), A = class e extends Error {
155
155
  constructor({ name: e, message: t, cause: n }) {
156
- super(t), this[ht] = !0, this.name = e, this.cause = n;
156
+ super(t), this[gt] = !0, this.name = e, this.cause = n;
157
157
  }
158
158
  static isInstance(t) {
159
- return e.hasMarker(t, mt);
159
+ return e.hasMarker(t, ht);
160
160
  }
161
161
  static hasMarker(e, t) {
162
162
  let n = Symbol.for(t);
163
163
  return typeof e == "object" && !!e && n in e && typeof e[n] == "boolean" && e[n] === !0;
164
164
  }
165
- }, gt = "AI_APICallError", _t = `vercel.ai.error.${gt}`, vt = Symbol.for(_t), yt = class extends j {
165
+ }, _t = "AI_APICallError", vt = `vercel.ai.error.${_t}`, yt = Symbol.for(vt), bt = class extends A {
166
166
  constructor({ message: e, url: t, requestBodyValues: n, statusCode: r, responseHeaders: i, responseBody: a, cause: o, isRetryable: s = r != null && (r === 408 || r === 409 || r === 429 || r >= 500), data: c }) {
167
167
  super({
168
- name: gt,
168
+ name: _t,
169
169
  message: e,
170
170
  cause: o
171
- }), this[vt] = !0, this.url = t, this.requestBodyValues = n, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = s, this.data = c;
171
+ }), this[yt] = !0, this.url = t, this.requestBodyValues = n, this.statusCode = r, this.responseHeaders = i, this.responseBody = a, this.isRetryable = s, this.data = c;
172
172
  }
173
173
  static isInstance(e) {
174
- return j.hasMarker(e, _t);
174
+ return A.hasMarker(e, vt);
175
175
  }
176
- }, bt = "AI_EmptyResponseBodyError", xt = `vercel.ai.error.${bt}`, St = Symbol.for(xt), Ct = class extends j {
176
+ }, xt = "AI_EmptyResponseBodyError", St = `vercel.ai.error.${xt}`, Ct = Symbol.for(St), wt = class extends A {
177
177
  constructor({ message: e = "Empty response body" } = {}) {
178
178
  super({
179
- name: bt,
179
+ name: xt,
180
180
  message: e
181
- }), this[St] = !0;
181
+ }), this[Ct] = !0;
182
182
  }
183
183
  static isInstance(e) {
184
- return j.hasMarker(e, xt);
184
+ return A.hasMarker(e, St);
185
185
  }
186
186
  };
187
- function wt(e) {
187
+ function Tt(e) {
188
188
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.toString() : JSON.stringify(e);
189
189
  }
190
- var Tt = "AI_InvalidArgumentError", Et = `vercel.ai.error.${Tt}`, Dt = Symbol.for(Et), Ot = class extends j {
190
+ var Et = "AI_InvalidArgumentError", Dt = `vercel.ai.error.${Et}`, Ot = Symbol.for(Dt), kt = class extends A {
191
191
  constructor({ message: e, cause: t, argument: n }) {
192
192
  super({
193
- name: Tt,
193
+ name: Et,
194
194
  message: e,
195
195
  cause: t
196
- }), this[Dt] = !0, this.argument = n;
196
+ }), this[Ot] = !0, this.argument = n;
197
197
  }
198
198
  static isInstance(e) {
199
- return j.hasMarker(e, Et);
199
+ return A.hasMarker(e, Dt);
200
200
  }
201
- }, M = "AI_JSONParseError", kt = `vercel.ai.error.${M}`, At = Symbol.for(kt), jt = class extends j {
201
+ }, j = "AI_JSONParseError", At = `vercel.ai.error.${j}`, jt = Symbol.for(At), Mt = class extends A {
202
202
  constructor({ text: e, cause: t }) {
203
203
  super({
204
- name: M,
205
- message: `JSON parsing failed: Text: ${e}.\nError message: ${wt(t)}`,
204
+ name: j,
205
+ message: `JSON parsing failed: Text: ${e}.\nError message: ${Tt(t)}`,
206
206
  cause: t
207
- }), this[At] = !0, this.text = e;
207
+ }), this[jt] = !0, this.text = e;
208
208
  }
209
209
  static isInstance(e) {
210
- return j.hasMarker(e, kt);
210
+ return A.hasMarker(e, At);
211
211
  }
212
- }, N = "AI_TypeValidationError", P = `vercel.ai.error.${N}`, Mt = Symbol.for(P), Nt = class e extends j {
212
+ }, M = "AI_TypeValidationError", N = `vercel.ai.error.${M}`, Nt = Symbol.for(N), Pt = class e extends A {
213
213
  constructor({ value: e, cause: t, context: n }) {
214
214
  let r = "Type validation failed";
215
215
  if (n?.field && (r += ` for ${n.field}`), n?.entityName || n?.entityId) {
@@ -218,13 +218,13 @@ var Tt = "AI_InvalidArgumentError", Et = `vercel.ai.error.${Tt}`, Dt = Symbol.fo
218
218
  n.entityName && e.push(n.entityName), n.entityId && e.push(`id: "${n.entityId}"`), r += e.join(", "), r += ")";
219
219
  }
220
220
  super({
221
- name: N,
222
- message: `${r}: Value: ${JSON.stringify(e)}.\nError message: ${wt(t)}`,
221
+ name: M,
222
+ message: `${r}: Value: ${JSON.stringify(e)}.\nError message: ${Tt(t)}`,
223
223
  cause: t
224
- }), this[Mt] = !0, this.value = e, this.context = n;
224
+ }), this[Nt] = !0, this.value = e, this.context = n;
225
225
  }
226
226
  static isInstance(e) {
227
- return j.hasMarker(e, P);
227
+ return A.hasMarker(e, N);
228
228
  }
229
229
  static wrap({ value: t, cause: n, context: r }) {
230
230
  return e.isInstance(n) && n.value === t && n.context?.field === r?.field && n.context?.entityName === r?.entityName && n.context?.entityId === r?.entityId ? n : new e({
@@ -233,25 +233,25 @@ var Tt = "AI_InvalidArgumentError", Et = `vercel.ai.error.${Tt}`, Dt = Symbol.fo
233
233
  context: r
234
234
  });
235
235
  }
236
- }, Pt = "AI_UnsupportedFunctionalityError", Ft = `vercel.ai.error.${Pt}`, It = Symbol.for(Ft), Lt = class extends j {
236
+ }, Ft = "AI_UnsupportedFunctionalityError", It = `vercel.ai.error.${Ft}`, Lt = Symbol.for(It), Rt = class extends A {
237
237
  constructor({ functionality: e, message: t = `'${e}' functionality not supported.` }) {
238
238
  super({
239
- name: Pt,
239
+ name: Ft,
240
240
  message: t
241
- }), this[It] = !0, this.functionality = e;
241
+ }), this[Lt] = !0, this.functionality = e;
242
242
  }
243
243
  static isInstance(e) {
244
- return j.hasMarker(e, Ft);
244
+ return A.hasMarker(e, It);
245
245
  }
246
- }, Rt = class extends Error {
246
+ }, zt = class extends Error {
247
247
  constructor(e, t) {
248
248
  super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
249
249
  }
250
- }, F = 10, zt = 13, Bt = 32;
251
- function Vt(e) {}
252
- function Ht(e) {
250
+ }, P = 10, Bt = 13, Vt = 32;
251
+ function Ht(e) {}
252
+ function Ut(e) {
253
253
  if (typeof e == "function") throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");
254
- let { onEvent: t = Vt, onError: n = Vt, onRetry: r = Vt, onComment: i, maxBufferSize: a } = e, o = [], s = 0, c = !0, l, u = "", d = 0, f, p = !1;
254
+ let { onEvent: t = Ht, onError: n = Ht, onRetry: r = Ht, onComment: i, maxBufferSize: a } = e, o = [], s = 0, c = !0, l, u = "", d = 0, f, p = !1;
255
255
  function m(e) {
256
256
  if (p) throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");
257
257
  if (c && (c = !1, e.charCodeAt(0) === 239 && e.charCodeAt(1) === 187 && e.charCodeAt(2) === 191 && (e = e.slice(3))), o.length === 0) {
@@ -270,7 +270,7 @@ function Ht(e) {
270
270
  n !== "" && (o.push(n), s = n.length), h();
271
271
  }
272
272
  function h() {
273
- a !== void 0 && (s + u.length <= a || (p = !0, o.length = 0, s = 0, l = void 0, u = "", d = 0, f = void 0, n(new Rt(`Buffered data exceeded max buffer size of ${a} characters`, { type: "max-buffer-size-exceeded" }))));
273
+ a !== void 0 && (s + u.length <= a || (p = !0, o.length = 0, s = 0, l = void 0, u = "", d = 0, f = void 0, n(new zt(`Buffered data exceeded max buffer size of ${a} characters`, { type: "max-buffer-size-exceeded" }))));
274
274
  }
275
275
  function g(e) {
276
276
  let n = 0;
@@ -286,9 +286,9 @@ function Ht(e) {
286
286
  continue;
287
287
  }
288
288
  let i = e.charCodeAt(n);
289
- if (Ut(e, n, i)) {
290
- let i = e.charCodeAt(n + 5) === Bt ? n + 6 : n + 5, a = e.slice(i, r);
291
- if (d === 0 && e.charCodeAt(r + 1) === F) {
289
+ if (Wt(e, n, i)) {
290
+ let i = e.charCodeAt(n + 5) === Vt ? n + 6 : n + 5, a = e.slice(i, r);
291
+ if (d === 0 && e.charCodeAt(r + 1) === P) {
292
292
  t({
293
293
  id: l,
294
294
  event: f,
@@ -298,7 +298,7 @@ function Ht(e) {
298
298
  }
299
299
  u = d === 0 ? a : `${u}
300
300
  ${a}`, d++;
301
- } else Wt(e, n, i) ? f = e.slice(e.charCodeAt(n + 6) === Bt ? n + 7 : n + 6, r) || void 0 : _(e, n, r);
301
+ } else Gt(e, n, i) ? f = e.slice(e.charCodeAt(n + 6) === Vt ? n + 7 : n + 6, r) || void 0 : _(e, n, r);
302
302
  n = r + 1, r = e.indexOf("\n", n);
303
303
  }
304
304
  return e.slice(n);
@@ -306,35 +306,35 @@ ${a}`, d++;
306
306
  for (; n < e.length;) {
307
307
  let t = e.indexOf("\r", n), r = e.indexOf("\n", n), i = -1;
308
308
  if (t !== -1 && r !== -1 ? i = t < r ? t : r : t === -1 ? r !== -1 && (i = r) : i = t === e.length - 1 ? -1 : t, i === -1) break;
309
- _(e, n, i), n = i + 1, e.charCodeAt(n - 1) === zt && e.charCodeAt(n) === F && n++;
309
+ _(e, n, i), n = i + 1, e.charCodeAt(n - 1) === Bt && e.charCodeAt(n) === P && n++;
310
310
  }
311
311
  return e.slice(n);
312
312
  }
313
313
  function _(e, t, n) {
314
314
  if (t === n) {
315
- y();
315
+ ee();
316
316
  return;
317
317
  }
318
318
  let r = e.charCodeAt(t);
319
- if (Ut(e, t, r)) {
320
- let r = e.charCodeAt(t + 5) === Bt ? t + 6 : t + 5, i = e.slice(r, n);
319
+ if (Wt(e, t, r)) {
320
+ let r = e.charCodeAt(t + 5) === Vt ? t + 6 : t + 5, i = e.slice(r, n);
321
321
  u = d === 0 ? i : `${u}
322
322
  ${i}`, d++;
323
323
  return;
324
324
  }
325
- if (Wt(e, t, r)) {
326
- f = e.slice(e.charCodeAt(t + 6) === Bt ? t + 7 : t + 6, n) || void 0;
325
+ if (Gt(e, t, r)) {
326
+ f = e.slice(e.charCodeAt(t + 6) === Vt ? t + 7 : t + 6, n) || void 0;
327
327
  return;
328
328
  }
329
329
  if (r === 105 && e.charCodeAt(t + 1) === 100 && e.charCodeAt(t + 2) === 58) {
330
- let r = e.slice(e.charCodeAt(t + 3) === Bt ? t + 4 : t + 3, n);
330
+ let r = e.slice(e.charCodeAt(t + 3) === Vt ? t + 4 : t + 3, n);
331
331
  l = r.includes("\0") ? void 0 : r;
332
332
  return;
333
333
  }
334
334
  if (r === 58) {
335
335
  if (i) {
336
336
  let r = e.slice(t, n);
337
- i(r.slice(e.charCodeAt(t + 1) === Bt ? 2 : 1));
337
+ i(r.slice(e.charCodeAt(t + 1) === Vt ? 2 : 1));
338
338
  }
339
339
  return;
340
340
  }
@@ -343,7 +343,7 @@ ${i}`, d++;
343
343
  v(a, "", a);
344
344
  return;
345
345
  }
346
- let s = a.slice(0, o), c = a.charCodeAt(o + 1) === Bt ? 2 : 1;
346
+ let s = a.slice(0, o), c = a.charCodeAt(o + 1) === Vt ? 2 : 1;
347
347
  v(s, a.slice(o + c), a);
348
348
  }
349
349
  function v(e, t, i) {
@@ -359,13 +359,13 @@ ${t}`, d++;
359
359
  l = t.includes("\0") ? void 0 : t;
360
360
  break;
361
361
  case "retry":
362
- /^\d+$/.test(t) ? r(parseInt(t, 10)) : n(new Rt(`Invalid \`retry\` value: "${t}"`, {
362
+ /^\d+$/.test(t) ? r(parseInt(t, 10)) : n(new zt(`Invalid \`retry\` value: "${t}"`, {
363
363
  type: "invalid-retry",
364
364
  value: t,
365
365
  line: i
366
366
  }));
367
367
  break;
368
- default: n(new Rt(`Unknown field "${e.length > 20 ? `${e.slice(0, 20)}\u2026` : e}"`, {
368
+ default: n(new zt(`Unknown field "${e.length > 20 ? `${e.slice(0, 20)}\u2026` : e}"`, {
369
369
  type: "unknown-field",
370
370
  field: e,
371
371
  value: t,
@@ -373,14 +373,14 @@ ${t}`, d++;
373
373
  }));
374
374
  }
375
375
  }
376
- function y() {
376
+ function ee() {
377
377
  d > 0 && t({
378
378
  id: l,
379
379
  event: f,
380
380
  data: u
381
381
  }), l = void 0, u = "", d = 0, f = void 0;
382
382
  }
383
- function b(e = {}) {
383
+ function y(e = {}) {
384
384
  if (e.consume && o.length > 0) {
385
385
  let e = o.join("");
386
386
  _(e, 0, e.length);
@@ -389,22 +389,22 @@ ${t}`, d++;
389
389
  }
390
390
  return {
391
391
  feed: m,
392
- reset: b
392
+ reset: y
393
393
  };
394
394
  }
395
- function Ut(e, t, n) {
395
+ function Wt(e, t, n) {
396
396
  return n === 100 && e.charCodeAt(t + 1) === 97 && e.charCodeAt(t + 2) === 116 && e.charCodeAt(t + 3) === 97 && e.charCodeAt(t + 4) === 58;
397
397
  }
398
- function Wt(e, t, n) {
398
+ function Gt(e, t, n) {
399
399
  return n === 101 && e.charCodeAt(t + 1) === 118 && e.charCodeAt(t + 2) === 101 && e.charCodeAt(t + 3) === 110 && e.charCodeAt(t + 4) === 116 && e.charCodeAt(t + 5) === 58;
400
400
  }
401
401
  // ../../node_modules/.pnpm/eventsource-parser@3.1.0/node_modules/eventsource-parser/dist/stream.js
402
- var Gt = class extends TransformStream {
402
+ var Kt = class extends TransformStream {
403
403
  constructor({ onError: e, onRetry: t, onComment: n, maxBufferSize: r } = {}) {
404
404
  let i;
405
405
  super({
406
406
  start(a) {
407
- i = Ht({
407
+ i = Ut({
408
408
  onEvent: (e) => {
409
409
  a.enqueue(e);
410
410
  },
@@ -423,19 +423,19 @@ var Gt = class extends TransformStream {
423
423
  }
424
424
  };
425
425
  new TextDecoder();
426
- var { btoa: Kt, atob: qt } = globalThis, Jt = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get, Yt = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get;
427
- function Xt(e) {
428
- return ArrayBuffer.isView(e) && Jt.call(e) === "Uint8Array";
426
+ var { btoa: qt, atob: Jt } = globalThis, Yt = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get, Xt = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get;
427
+ function Zt(e) {
428
+ return ArrayBuffer.isView(e) && Yt.call(e) === "Uint8Array";
429
429
  }
430
- function I(e) {
430
+ function F(e) {
431
431
  if (typeof e != "object" || !e || !("byteLength" in e)) return !1;
432
432
  try {
433
- return Yt.call(e), !0;
433
+ return Xt.call(e), !0;
434
434
  } catch {
435
435
  return !1;
436
436
  }
437
437
  }
438
- function Zt(e) {
438
+ function Qt(e) {
439
439
  if (e == null) return {};
440
440
  let t = {};
441
441
  if (e instanceof Headers) e.forEach((e, n) => {
@@ -447,28 +447,28 @@ function Zt(e) {
447
447
  }
448
448
  return t;
449
449
  }
450
- var L = ({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: r = "-" } = {}) => {
450
+ var I = ({ prefix: e, size: t = 16, alphabet: n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", separator: r = "-" } = {}) => {
451
451
  let i = () => {
452
452
  let e = n.length, r = Array(t);
453
453
  for (let i = 0; i < t; i++) r[i] = n[Math.random() * e | 0];
454
454
  return r.join("");
455
455
  };
456
456
  if (e == null) return i;
457
- if (n.includes(r)) throw new Ot({
457
+ if (n.includes(r)) throw new kt({
458
458
  argument: "separator",
459
459
  message: `The separator "${r}" must not be part of the alphabet "${n}".`
460
460
  });
461
461
  return () => `${e}${r}${i()}`;
462
- }, Qt = L();
463
- function R(e) {
462
+ }, $t = I();
463
+ function L(e) {
464
464
  return globalThis.Buffer?.isBuffer(e) ?? !1;
465
465
  }
466
- var $t = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, en = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
467
- function tn(e) {
466
+ var en = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/, tn = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;
467
+ function nn(e) {
468
468
  let t = JSON.parse(e);
469
- return typeof t != "object" || !t || $t.test(e) === !1 && en.test(e) === !1 ? t : nn(t);
469
+ return typeof t != "object" || !t || en.test(e) === !1 && tn.test(e) === !1 ? t : rn(t);
470
470
  }
471
- function nn(e) {
471
+ function rn(e) {
472
472
  let t = [e];
473
473
  for (; t.length;) {
474
474
  let e = t;
@@ -483,35 +483,35 @@ function nn(e) {
483
483
  }
484
484
  return e;
485
485
  }
486
- function rn(e) {
486
+ function an(e) {
487
487
  let { stackTraceLimit: t } = Error;
488
488
  try {
489
489
  Error.stackTraceLimit = 0;
490
490
  } catch {
491
- return tn(e);
491
+ return nn(e);
492
492
  }
493
493
  try {
494
- return tn(e);
494
+ return nn(e);
495
495
  } finally {
496
496
  Error.stackTraceLimit = t;
497
497
  }
498
498
  }
499
- function z(e) {
499
+ function R(e) {
500
500
  if (e.type === "object" || Array.isArray(e.type) && e.type.includes("object")) {
501
501
  let { additionalProperties: t } = e;
502
- e.additionalProperties = t != null && typeof t != "boolean" && B(t);
502
+ e.additionalProperties = t != null && typeof t != "boolean" && z(t);
503
503
  let { properties: n } = e;
504
- if (n != null) for (let e of Object.keys(n)) n[e] = B(n[e]);
504
+ if (n != null) for (let e of Object.keys(n)) n[e] = z(n[e]);
505
505
  }
506
- e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(B) : B(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(B)), e.allOf != null && (e.allOf = e.allOf.map(B)), e.oneOf != null && (e.oneOf = e.oneOf.map(B));
506
+ e.items != null && (e.items = Array.isArray(e.items) ? e.items.map(z) : z(e.items)), e.anyOf != null && (e.anyOf = e.anyOf.map(z)), e.allOf != null && (e.allOf = e.allOf.map(z)), e.oneOf != null && (e.oneOf = e.oneOf.map(z));
507
507
  let { definitions: t } = e;
508
- if (t != null) for (let e of Object.keys(t)) t[e] = B(t[e]);
508
+ if (t != null) for (let e of Object.keys(t)) t[e] = z(t[e]);
509
509
  return e;
510
510
  }
511
- function B(e) {
512
- return typeof e == "boolean" ? e : z(e);
511
+ function z(e) {
512
+ return typeof e == "boolean" ? e : R(e);
513
513
  }
514
- var an = Symbol("Let zodToJsonSchema decide on which parser to use"), on = {
514
+ var on = Symbol("Let zodToJsonSchema decide on which parser to use"), sn = {
515
515
  name: void 0,
516
516
  $refStrategy: "root",
517
517
  basePath: ["#"],
@@ -531,24 +531,24 @@ var an = Symbol("Let zodToJsonSchema decide on which parser to use"), on = {
531
531
  emailStrategy: "format:email",
532
532
  base64Strategy: "contentEncoding:base64",
533
533
  nameStrategy: "ref"
534
- }, sn = (e) => typeof e == "string" ? {
535
- ...on,
534
+ }, cn = (e) => typeof e == "string" ? {
535
+ ...sn,
536
536
  name: e
537
537
  } : {
538
- ...on,
538
+ ...sn,
539
539
  ...e
540
540
  };
541
- function V() {
541
+ function B() {
542
542
  return {};
543
543
  }
544
- function cn(e, t) {
544
+ function ln(e, t) {
545
545
  let n = { type: "array" };
546
546
  return e.type?._def && e.type?._def?.typeName !== "ZodAny" && (n.items = J(e.type._def, {
547
547
  ...t,
548
548
  currentPath: [...t.currentPath, "items"]
549
549
  })), e.minLength && (n.minItems = e.minLength.value), e.maxLength && (n.maxItems = e.maxLength.value), e.exactLength && (n.minItems = e.exactLength.value, n.maxItems = e.exactLength.value), n;
550
550
  }
551
- function ln(e) {
551
+ function un(e) {
552
552
  let t = {
553
553
  type: "integer",
554
554
  format: "int64"
@@ -565,16 +565,16 @@ function ln(e) {
565
565
  }
566
566
  return t;
567
567
  }
568
- function un() {
568
+ function dn() {
569
569
  return { type: "boolean" };
570
570
  }
571
- function dn(e, t) {
571
+ function fn(e, t) {
572
572
  return J(e.type._def, t);
573
573
  }
574
- var fn = (e, t) => J(e.innerType._def, t);
575
- function pn(e, t, n) {
574
+ var pn = (e, t) => J(e.innerType._def, t);
575
+ function mn(e, t, n) {
576
576
  let r = n ?? t.dateStrategy;
577
- if (Array.isArray(r)) return { anyOf: r.map((n) => pn(e, t, n)) };
577
+ if (Array.isArray(r)) return { anyOf: r.map((n) => mn(e, t, n)) };
578
578
  switch (r) {
579
579
  case "string":
580
580
  case "format:date-time": return {
@@ -585,10 +585,10 @@ function pn(e, t, n) {
585
585
  type: "string",
586
586
  format: "date"
587
587
  };
588
- case "integer": return H(e);
588
+ case "integer": return V(e);
589
589
  }
590
590
  }
591
- var H = (e) => {
591
+ var V = (e) => {
592
592
  let t = {
593
593
  type: "integer",
594
594
  format: "unix-time"
@@ -601,23 +601,23 @@ var H = (e) => {
601
601
  }
602
602
  return t;
603
603
  };
604
- function U(e, t) {
604
+ function H(e, t) {
605
605
  return {
606
606
  ...J(e.innerType._def, t),
607
607
  default: e.defaultValue()
608
608
  };
609
609
  }
610
- function W(e, t) {
611
- return t.effectStrategy === "input" ? J(e.schema._def, t) : V();
610
+ function U(e, t) {
611
+ return t.effectStrategy === "input" ? J(e.schema._def, t) : B();
612
612
  }
613
- function mn(e) {
613
+ function hn(e) {
614
614
  return {
615
615
  type: "string",
616
616
  enum: Array.from(e.values)
617
617
  };
618
618
  }
619
- var hn = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
620
- function gn(e, t) {
619
+ var gn = (e) => "type" in e && e.type === "string" ? !1 : "allOf" in e;
620
+ function _n(e, t) {
621
621
  let n = [J(e.left._def, {
622
622
  ...t,
623
623
  currentPath: [
@@ -634,7 +634,7 @@ function gn(e, t) {
634
634
  ]
635
635
  })].filter((e) => !!e), r = [];
636
636
  return n.forEach((e) => {
637
- if (hn(e)) r.push(...e.allOf);
637
+ if (gn(e)) r.push(...e.allOf);
638
638
  else {
639
639
  let t = e;
640
640
  if ("additionalProperties" in e && e.additionalProperties === !1) {
@@ -645,19 +645,19 @@ function gn(e, t) {
645
645
  }
646
646
  }), r.length ? { allOf: r } : void 0;
647
647
  }
648
- function _n(e) {
648
+ function vn(e) {
649
649
  let t = typeof e.value;
650
650
  return t !== "bigint" && t !== "number" && t !== "boolean" && t !== "string" ? { type: Array.isArray(e.value) ? "array" : "object" } : {
651
651
  type: t === "bigint" ? "integer" : t,
652
652
  const: e.value
653
653
  };
654
654
  }
655
- var vn = void 0, G = {
655
+ var yn = void 0, W = {
656
656
  cuid: /^[cC][^\s-]{8,}$/,
657
657
  cuid2: /^[0-9a-z]+$/,
658
658
  ulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,
659
659
  email: /^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9-]*\.)+[a-zA-Z]{2,}$/,
660
- emoji: () => (vn === void 0 && (vn = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), vn),
660
+ emoji: () => (yn === void 0 && (yn = RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$", "u")), yn),
661
661
  uuid: /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,
662
662
  ipv4: /^(?:(?: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])$/,
663
663
  ipv4Cidr: /^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,
@@ -668,7 +668,7 @@ var vn = void 0, G = {
668
668
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
669
669
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
670
670
  };
671
- function yn(e, t) {
671
+ function bn(e, t) {
672
672
  let n = { type: "string" };
673
673
  if (e.checks) for (let r of e.checks) switch (r.kind) {
674
674
  case "min":
@@ -680,108 +680,108 @@ function yn(e, t) {
680
680
  case "email":
681
681
  switch (t.emailStrategy) {
682
682
  case "format:email":
683
- K(n, "email", r.message, t);
683
+ G(n, "email", r.message, t);
684
684
  break;
685
685
  case "format:idn-email":
686
- K(n, "idn-email", r.message, t);
686
+ G(n, "idn-email", r.message, t);
687
687
  break;
688
- case "pattern:zod": q(n, G.email, r.message, t);
688
+ case "pattern:zod": K(n, W.email, r.message, t);
689
689
  }
690
690
  break;
691
691
  case "url":
692
- K(n, "uri", r.message, t);
692
+ G(n, "uri", r.message, t);
693
693
  break;
694
694
  case "uuid":
695
- K(n, "uuid", r.message, t);
695
+ G(n, "uuid", r.message, t);
696
696
  break;
697
697
  case "regex":
698
- q(n, r.regex, r.message, t);
698
+ K(n, r.regex, r.message, t);
699
699
  break;
700
700
  case "cuid":
701
- q(n, G.cuid, r.message, t);
701
+ K(n, W.cuid, r.message, t);
702
702
  break;
703
703
  case "cuid2":
704
- q(n, G.cuid2, r.message, t);
704
+ K(n, W.cuid2, r.message, t);
705
705
  break;
706
706
  case "startsWith":
707
- q(n, RegExp(`^${bn(r.value, t)}`), r.message, t);
707
+ K(n, RegExp(`^${xn(r.value, t)}`), r.message, t);
708
708
  break;
709
709
  case "endsWith":
710
- q(n, RegExp(`${bn(r.value, t)}$`), r.message, t);
710
+ K(n, RegExp(`${xn(r.value, t)}$`), r.message, t);
711
711
  break;
712
712
  case "datetime":
713
- K(n, "date-time", r.message, t);
713
+ G(n, "date-time", r.message, t);
714
714
  break;
715
715
  case "date":
716
- K(n, "date", r.message, t);
716
+ G(n, "date", r.message, t);
717
717
  break;
718
718
  case "time":
719
- K(n, "time", r.message, t);
719
+ G(n, "time", r.message, t);
720
720
  break;
721
721
  case "duration":
722
- K(n, "duration", r.message, t);
722
+ G(n, "duration", r.message, t);
723
723
  break;
724
724
  case "length":
725
725
  n.minLength = typeof n.minLength == "number" ? Math.max(n.minLength, r.value) : r.value, n.maxLength = typeof n.maxLength == "number" ? Math.min(n.maxLength, r.value) : r.value;
726
726
  break;
727
727
  case "includes":
728
- q(n, RegExp(bn(r.value, t)), r.message, t);
728
+ K(n, RegExp(xn(r.value, t)), r.message, t);
729
729
  break;
730
730
  case "ip":
731
- r.version !== "v6" && K(n, "ipv4", r.message, t), r.version !== "v4" && K(n, "ipv6", r.message, t);
731
+ r.version !== "v6" && G(n, "ipv4", r.message, t), r.version !== "v4" && G(n, "ipv6", r.message, t);
732
732
  break;
733
733
  case "base64url":
734
- q(n, G.base64url, r.message, t);
734
+ K(n, W.base64url, r.message, t);
735
735
  break;
736
736
  case "jwt":
737
- q(n, G.jwt, r.message, t);
737
+ K(n, W.jwt, r.message, t);
738
738
  break;
739
739
  case "cidr":
740
- r.version !== "v6" && q(n, G.ipv4Cidr, r.message, t), r.version !== "v4" && q(n, G.ipv6Cidr, r.message, t);
740
+ r.version !== "v6" && K(n, W.ipv4Cidr, r.message, t), r.version !== "v4" && K(n, W.ipv6Cidr, r.message, t);
741
741
  break;
742
742
  case "emoji":
743
- q(n, G.emoji(), r.message, t);
743
+ K(n, W.emoji(), r.message, t);
744
744
  break;
745
745
  case "ulid":
746
- q(n, G.ulid, r.message, t);
746
+ K(n, W.ulid, r.message, t);
747
747
  break;
748
748
  case "base64":
749
749
  switch (t.base64Strategy) {
750
750
  case "format:binary":
751
- K(n, "binary", r.message, t);
751
+ G(n, "binary", r.message, t);
752
752
  break;
753
753
  case "contentEncoding:base64":
754
754
  n.contentEncoding = "base64";
755
755
  break;
756
- case "pattern:zod": q(n, G.base64, r.message, t);
756
+ case "pattern:zod": K(n, W.base64, r.message, t);
757
757
  }
758
758
  break;
759
- case "nanoid": q(n, G.nanoid, r.message, t);
759
+ case "nanoid": K(n, W.nanoid, r.message, t);
760
760
  }
761
761
  return n;
762
762
  }
763
- function bn(e, t) {
764
- return t.patternStrategy === "escape" ? Sn(e) : e;
763
+ function xn(e, t) {
764
+ return t.patternStrategy === "escape" ? Cn(e) : e;
765
765
  }
766
- var xn = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
767
- function Sn(e) {
766
+ var Sn = /* @__PURE__ */ new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");
767
+ function Cn(e) {
768
768
  let t = "";
769
- for (let n = 0; n < e.length; n++) xn.has(e[n]) || (t += "\\"), t += e[n];
769
+ for (let n = 0; n < e.length; n++) Sn.has(e[n]) || (t += "\\"), t += e[n];
770
770
  return t;
771
771
  }
772
- function K(e, t, n, r) {
772
+ function G(e, t, n, r) {
773
773
  e.format || e.anyOf?.some((e) => e.format) ? (e.anyOf ||= [], e.format && (e.anyOf.push({ format: e.format }), delete e.format), e.anyOf.push({
774
774
  format: t,
775
775
  ...n && r.errorMessages && { errorMessage: { format: n } }
776
776
  })) : e.format = t;
777
777
  }
778
- function q(e, t, n, r) {
778
+ function K(e, t, n, r) {
779
779
  e.pattern || e.allOf?.some((e) => e.pattern) ? (e.allOf ||= [], e.pattern && (e.allOf.push({ pattern: e.pattern }), delete e.pattern), e.allOf.push({
780
- pattern: Cn(t, r),
780
+ pattern: wn(t, r),
781
781
  ...n && r.errorMessages && { errorMessage: { pattern: n } }
782
- })) : e.pattern = Cn(t, r);
782
+ })) : e.pattern = wn(t, r);
783
783
  }
784
- function Cn(e, t) {
784
+ function wn(e, t) {
785
785
  if (!t.applyRegexFlags || !e.flags) return e.source;
786
786
  let n = {
787
787
  i: e.flags.includes("i"),
@@ -820,7 +820,7 @@ function Cn(e, t) {
820
820
  }
821
821
  return i;
822
822
  }
823
- function wn(e, t) {
823
+ function Tn(e, t) {
824
824
  let n = {
825
825
  type: "object",
826
826
  additionalProperties: J(e.valueType._def, {
@@ -829,7 +829,7 @@ function wn(e, t) {
829
829
  }) ?? t.allowedAdditionalProperties
830
830
  };
831
831
  if (e.keyType?._def.typeName === "ZodString" && e.keyType._def.checks?.length) {
832
- let { type: r, ...i } = yn(e.keyType._def, t);
832
+ let { type: r, ...i } = bn(e.keyType._def, t);
833
833
  return {
834
834
  ...n,
835
835
  propertyNames: i
@@ -840,7 +840,7 @@ function wn(e, t) {
840
840
  propertyNames: { enum: e.keyType._def.values }
841
841
  };
842
842
  if (e.keyType?._def.typeName === "ZodBranded" && e.keyType._def.type._def.typeName === "ZodString" && e.keyType._def.type._def.checks?.length) {
843
- let { type: r, ...i } = dn(e.keyType._def, t);
843
+ let { type: r, ...i } = fn(e.keyType._def, t);
844
844
  return {
845
845
  ...n,
846
846
  propertyNames: i
@@ -848,8 +848,8 @@ function wn(e, t) {
848
848
  }
849
849
  return n;
850
850
  }
851
- function Tn(e, t) {
852
- return t.mapStrategy === "record" ? wn(e, t) : {
851
+ function En(e, t) {
852
+ return t.mapStrategy === "record" ? Tn(e, t) : {
853
853
  type: "array",
854
854
  maxItems: 125,
855
855
  items: {
@@ -862,7 +862,7 @@ function Tn(e, t) {
862
862
  "items",
863
863
  "0"
864
864
  ]
865
- }) || V(), J(e.valueType._def, {
865
+ }) || B(), J(e.valueType._def, {
866
866
  ...t,
867
867
  currentPath: [
868
868
  ...t.currentPath,
@@ -870,37 +870,37 @@ function Tn(e, t) {
870
870
  "items",
871
871
  "1"
872
872
  ]
873
- }) || V()],
873
+ }) || B()],
874
874
  minItems: 2,
875
875
  maxItems: 2
876
876
  }
877
877
  };
878
878
  }
879
- function En(e) {
879
+ function Dn(e) {
880
880
  let t = e.values, n = Object.keys(e.values).filter((e) => typeof t[t[e]] != "number").map((e) => t[e]), r = Array.from(new Set(n.map((e) => typeof e)));
881
881
  return {
882
882
  type: r.length === 1 ? r[0] === "string" ? "string" : "number" : ["string", "number"],
883
883
  enum: n
884
884
  };
885
885
  }
886
- function Dn() {
887
- return { not: V() };
888
- }
889
886
  function On() {
887
+ return { not: B() };
888
+ }
889
+ function kn() {
890
890
  return { type: "null" };
891
891
  }
892
- var kn = {
892
+ var An = {
893
893
  ZodString: "string",
894
894
  ZodNumber: "number",
895
895
  ZodBigInt: "integer",
896
896
  ZodBoolean: "boolean",
897
897
  ZodNull: "null"
898
898
  };
899
- function An(e, t) {
899
+ function jn(e, t) {
900
900
  let n = e.options instanceof Map ? Array.from(e.options.values()) : e.options;
901
- if (n.every((e) => e._def.typeName in kn && (!e._def.checks || !e._def.checks.length))) {
901
+ if (n.every((e) => e._def.typeName in An && (!e._def.checks || !e._def.checks.length))) {
902
902
  let e = n.reduce((e, t) => {
903
- let n = kn[t._def.typeName];
903
+ let n = An[t._def.typeName];
904
904
  return n && !e.includes(n) ? [...e, n] : e;
905
905
  }, []);
906
906
  return { type: e.length > 1 ? e : e[0] };
@@ -928,9 +928,9 @@ function An(e, t) {
928
928
  type: "string",
929
929
  enum: n.reduce((e, t) => [...e, ...t._def.values.filter((t) => !e.includes(t))], [])
930
930
  };
931
- return jn(e, t);
931
+ return Mn(e, t);
932
932
  }
933
- var jn = (e, t) => {
933
+ var Mn = (e, t) => {
934
934
  let n = (e.options instanceof Map ? Array.from(e.options.values()) : e.options).map((e, n) => J(e._def, {
935
935
  ...t,
936
936
  currentPath: [
@@ -941,14 +941,14 @@ var jn = (e, t) => {
941
941
  })).filter((e) => !!e && (!t.strictUnions || typeof e == "object" && Object.keys(e).length > 0));
942
942
  return n.length ? { anyOf: n } : void 0;
943
943
  };
944
- function Mn(e, t) {
944
+ function Nn(e, t) {
945
945
  if ([
946
946
  "ZodString",
947
947
  "ZodNumber",
948
948
  "ZodBigInt",
949
949
  "ZodBoolean",
950
950
  "ZodNull"
951
- ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [kn[e.innerType._def.typeName], "null"] };
951
+ ].includes(e.innerType._def.typeName) && (!e.innerType._def.checks || !e.innerType._def.checks.length)) return { type: [An[e.innerType._def.typeName], "null"] };
952
952
  let n = J(e.innerType._def, {
953
953
  ...t,
954
954
  currentPath: [
@@ -959,7 +959,7 @@ function Mn(e, t) {
959
959
  });
960
960
  return n && { anyOf: [n, { type: "null" }] };
961
961
  }
962
- function Nn(e) {
962
+ function q(e) {
963
963
  let t = { type: "number" };
964
964
  if (!e.checks) return t;
965
965
  for (let n of e.checks) switch (n.kind) {
@@ -1031,7 +1031,7 @@ var Ln = (e, t) => {
1031
1031
  "1"
1032
1032
  ]
1033
1033
  });
1034
- return n ? { anyOf: [{ not: V() }, n] } : V();
1034
+ return n ? { anyOf: [{ not: B() }, n] } : B();
1035
1035
  }, Rn = (e, t) => {
1036
1036
  if (t.pipeStrategy === "input") return J(e.in._def, t);
1037
1037
  if (t.pipeStrategy === "output") return J(e.out._def, t);
@@ -1097,45 +1097,45 @@ function Vn(e, t) {
1097
1097
  };
1098
1098
  }
1099
1099
  function Hn() {
1100
- return { not: V() };
1100
+ return { not: B() };
1101
1101
  }
1102
1102
  function Un() {
1103
- return V();
1103
+ return B();
1104
1104
  }
1105
1105
  var Wn = (e, t) => J(e.innerType._def, t), Gn = (e, t, n) => {
1106
1106
  switch (t) {
1107
- case "ZodString": return yn(e, n);
1108
- case "ZodNumber": return Nn(e);
1107
+ case "ZodString": return bn(e, n);
1108
+ case "ZodNumber": return q(e);
1109
1109
  case "ZodObject": return Pn(e, n);
1110
- case "ZodBigInt": return ln(e);
1111
- case "ZodBoolean": return un();
1112
- case "ZodDate": return pn(e, n);
1110
+ case "ZodBigInt": return un(e);
1111
+ case "ZodBoolean": return dn();
1112
+ case "ZodDate": return mn(e, n);
1113
1113
  case "ZodUndefined": return Hn();
1114
- case "ZodNull": return On();
1115
- case "ZodArray": return cn(e, n);
1114
+ case "ZodNull": return kn();
1115
+ case "ZodArray": return ln(e, n);
1116
1116
  case "ZodUnion":
1117
- case "ZodDiscriminatedUnion": return An(e, n);
1118
- case "ZodIntersection": return gn(e, n);
1117
+ case "ZodDiscriminatedUnion": return jn(e, n);
1118
+ case "ZodIntersection": return _n(e, n);
1119
1119
  case "ZodTuple": return Vn(e, n);
1120
- case "ZodRecord": return wn(e, n);
1121
- case "ZodLiteral": return _n(e);
1122
- case "ZodEnum": return mn(e);
1123
- case "ZodNativeEnum": return En(e);
1124
- case "ZodNullable": return Mn(e, n);
1120
+ case "ZodRecord": return Tn(e, n);
1121
+ case "ZodLiteral": return vn(e);
1122
+ case "ZodEnum": return hn(e);
1123
+ case "ZodNativeEnum": return Dn(e);
1124
+ case "ZodNullable": return Nn(e, n);
1125
1125
  case "ZodOptional": return Ln(e, n);
1126
- case "ZodMap": return Tn(e, n);
1126
+ case "ZodMap": return En(e, n);
1127
1127
  case "ZodSet": return Bn(e, n);
1128
1128
  case "ZodLazy": return () => e.getter()._def;
1129
1129
  case "ZodPromise": return zn(e, n);
1130
1130
  case "ZodNaN":
1131
- case "ZodNever": return Dn();
1132
- case "ZodEffects": return W(e, n);
1133
- case "ZodAny": return V();
1131
+ case "ZodNever": return On();
1132
+ case "ZodEffects": return U(e, n);
1133
+ case "ZodAny": return B();
1134
1134
  case "ZodUnknown": return Un();
1135
- case "ZodDefault": return U(e, n);
1136
- case "ZodBranded": return dn(e, n);
1135
+ case "ZodDefault": return H(e, n);
1136
+ case "ZodBranded": return fn(e, n);
1137
1137
  case "ZodReadonly": return Wn(e, n);
1138
- case "ZodCatch": return fn(e, n);
1138
+ case "ZodCatch": return pn(e, n);
1139
1139
  case "ZodPipeline": return Rn(e, n);
1140
1140
  case "ZodFunction":
1141
1141
  case "ZodVoid":
@@ -1153,7 +1153,7 @@ function J(e, t, n = !1) {
1153
1153
  let r = t.seen.get(e);
1154
1154
  if (t.override) {
1155
1155
  let i = t.override?.(e, t, r, n);
1156
- if (i !== an) return i;
1156
+ if (i !== on) return i;
1157
1157
  }
1158
1158
  if (r && !n) {
1159
1159
  let e = qn(r, t);
@@ -1177,10 +1177,10 @@ var qn = (e, t) => {
1177
1177
  case "root": return { $ref: e.path.join("/") };
1178
1178
  case "relative": return { $ref: Kn(t.currentPath, e.path) };
1179
1179
  case "none":
1180
- case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), V()) : t.$refStrategy === "seen" ? V() : void 0;
1180
+ case "seen": return e.path.length < t.currentPath.length && e.path.every((e, n) => t.currentPath[n] === e) ? (console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`), B()) : t.$refStrategy === "seen" ? B() : void 0;
1181
1181
  }
1182
1182
  }, Jn = (e, t, n) => (e.description && (n.description = e.description), n), Yn = (e) => {
1183
- let t = sn(e), n = t.name === void 0 ? t.basePath : [
1183
+ let t = cn(e), n = t.name === void 0 ? t.basePath : [
1184
1184
  ...t.basePath,
1185
1185
  t.definitionPath,
1186
1186
  t.name
@@ -1209,7 +1209,7 @@ var qn = (e, t) => {
1209
1209
  n.definitionPath,
1210
1210
  t
1211
1211
  ]
1212
- }, !0) ?? V()
1212
+ }, !0) ?? B()
1213
1213
  }), {}) : void 0, i = typeof t == "string" ? t : t?.nameStrategy === "title" ? void 0 : t?.name, a = J(e._def, i === void 0 ? n : {
1214
1214
  ...n,
1215
1215
  currentPath: [
@@ -1217,7 +1217,7 @@ var qn = (e, t) => {
1217
1217
  n.definitionPath,
1218
1218
  i
1219
1219
  ]
1220
- }, !1) ?? V(), o = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
1220
+ }, !1) ?? B(), o = typeof t == "object" && t.name !== void 0 && t.nameStrategy === "title" ? t.name : void 0;
1221
1221
  o !== void 0 && (a.title = o);
1222
1222
  let s = i === void 0 ? r ? {
1223
1223
  ...a,
@@ -1262,15 +1262,15 @@ function tr(e) {
1262
1262
  function nr(e) {
1263
1263
  return $n(() => {
1264
1264
  if (!rr(e)) throw Error(`Standard schema vendor '${e["~standard"].vendor}' does not support JSON Schema conversion.`);
1265
- return z(e["~standard"].jsonSchema.input({ target: "draft-07" }));
1265
+ return R(e["~standard"].jsonSchema.input({ target: "draft-07" }));
1266
1266
  }, { validate: async (t) => {
1267
1267
  let n = await e["~standard"].validate(t);
1268
- return "value" in n ? {
1268
+ return n.issues === void 0 && "value" in n ? {
1269
1269
  success: !0,
1270
1270
  value: n.value
1271
1271
  } : {
1272
1272
  success: !1,
1273
- error: new Nt({
1273
+ error: new Pt({
1274
1274
  value: t,
1275
1275
  cause: n.issues
1276
1276
  })
@@ -1294,9 +1294,9 @@ function ir(e, t) {
1294
1294
  } });
1295
1295
  }
1296
1296
  function ar(e, t) {
1297
- de().localeError || de(y());
1297
+ fe().localeError || fe(ee());
1298
1298
  let n = t?.useReferences ?? !1;
1299
- return $n(() => z(i(e, {
1299
+ return $n(() => R(i(e, {
1300
1300
  target: "draft-7",
1301
1301
  io: "input",
1302
1302
  reused: n ? "ref" : "inline"
@@ -1323,7 +1323,7 @@ async function cr({ value: e, schema: t, context: n }) {
1323
1323
  schema: t,
1324
1324
  context: n
1325
1325
  });
1326
- if (!r.success) throw Nt.wrap({
1326
+ if (!r.success) throw Pt.wrap({
1327
1327
  value: e,
1328
1328
  cause: r.error,
1329
1329
  context: n
@@ -1345,7 +1345,7 @@ async function lr({ value: e, schema: t, context: n }) {
1345
1345
  rawValue: e
1346
1346
  } : {
1347
1347
  success: !1,
1348
- error: Nt.wrap({
1348
+ error: Pt.wrap({
1349
1349
  value: e,
1350
1350
  cause: t.error,
1351
1351
  context: n
@@ -1355,7 +1355,7 @@ async function lr({ value: e, schema: t, context: n }) {
1355
1355
  } catch (t) {
1356
1356
  return {
1357
1357
  success: !1,
1358
- error: Nt.wrap({
1358
+ error: Pt.wrap({
1359
1359
  value: e,
1360
1360
  cause: t,
1361
1361
  context: n
@@ -1366,7 +1366,7 @@ async function lr({ value: e, schema: t, context: n }) {
1366
1366
  }
1367
1367
  async function ur({ text: e, schema: t }) {
1368
1368
  try {
1369
- let n = rn(e);
1369
+ let n = an(e);
1370
1370
  return t == null ? {
1371
1371
  success: !0,
1372
1372
  value: n,
@@ -1378,7 +1378,7 @@ async function ur({ text: e, schema: t }) {
1378
1378
  } catch (t) {
1379
1379
  return {
1380
1380
  success: !1,
1381
- error: jt.isInstance(t) ? t : new jt({
1381
+ error: Mt.isInstance(t) ? t : new Mt({
1382
1382
  text: e,
1383
1383
  cause: t
1384
1384
  }),
@@ -1387,7 +1387,7 @@ async function ur({ text: e, schema: t }) {
1387
1387
  }
1388
1388
  }
1389
1389
  function dr({ stream: e, schema: t }) {
1390
- return e.pipeThrough(new TextDecoderStream()).pipeThrough(new Gt()).pipeThrough(new TransformStream({ async transform({ data: e }, n) {
1390
+ return e.pipeThrough(new TextDecoderStream()).pipeThrough(new Kt()).pipeThrough(new TransformStream({ async transform({ data: e }, n) {
1391
1391
  e !== "[DONE]" && n.enqueue(await ur({
1392
1392
  text: e,
1393
1393
  schema: t
@@ -1399,27 +1399,27 @@ async function fr(e) {
1399
1399
  }
1400
1400
  new TextDecoder();
1401
1401
  // ../../node_modules/.pnpm/zod@4.6.7/node_modules/zod/v4/mini/schemas.js
1402
- var Y = /*@__PURE__*/ S("ZodMiniType", (e, t) => {
1402
+ var Y = /*@__PURE__*/ x("ZodMiniType", (e, t) => {
1403
1403
  if (!e._zod) throw Error("Uninitialized schema in ZodMiniType.");
1404
- ae.init(e, t), e.def = t, e.type = t.type;
1404
+ oe.init(e, t), e.def = t, e.type = t.type;
1405
1405
  }, {
1406
1406
  get with() {
1407
1407
  return this.check;
1408
1408
  },
1409
1409
  set with(e) {
1410
- je(this, "with", e);
1410
+ Me(this, "with", e);
1411
1411
  },
1412
1412
  parse(e, t) {
1413
- return se(this, e, t, { callee: this.parse });
1413
+ return ce(this, e, t, { callee: this.parse });
1414
1414
  },
1415
1415
  parseAsync(e, t) {
1416
- return ve(this, e, t, { callee: this.parseAsync });
1416
+ return ye(this, e, t, { callee: this.parseAsync });
1417
1417
  },
1418
1418
  safeParse(e, t) {
1419
- return Oe(this, e, t);
1419
+ return ke(this, e, t);
1420
1420
  },
1421
1421
  safeParseAsync(e, t) {
1422
- return ce(this, e, t);
1422
+ return le(this, e, t);
1423
1423
  },
1424
1424
  check(...e) {
1425
1425
  let t = this.def;
@@ -1433,7 +1433,7 @@ var Y = /*@__PURE__*/ S("ZodMiniType", (e, t) => {
1433
1433
  }, { parent: !0 });
1434
1434
  },
1435
1435
  clone(e, t) {
1436
- return re(this, e, t);
1436
+ return ie(this, e, t);
1437
1437
  },
1438
1438
  brand() {
1439
1439
  return this;
@@ -1444,67 +1444,67 @@ var Y = /*@__PURE__*/ S("ZodMiniType", (e, t) => {
1444
1444
  apply(e, ...t) {
1445
1445
  return t.length === 0 ? e(this) : e(this, ...t);
1446
1446
  }
1447
- }), pr = /*@__PURE__*/ S("ZodMiniString", (e, t) => {
1448
- Ce.init(e, t), Y.init(e, t);
1447
+ }), pr = /*@__PURE__*/ x("ZodMiniString", (e, t) => {
1448
+ we.init(e, t), Y.init(e, t);
1449
1449
  });
1450
1450
  // @__NO_SIDE_EFFECTS__
1451
1451
  function mr(e) {
1452
1452
  return n(pr, e);
1453
1453
  }
1454
- var hr = /*@__PURE__*/ S("ZodMiniNumber", (e, t) => {
1455
- ne.init(e, t), Y.init(e, t);
1454
+ var hr = /*@__PURE__*/ x("ZodMiniNumber", (e, t) => {
1455
+ re.init(e, t), Y.init(e, t);
1456
1456
  });
1457
1457
  // @__NO_SIDE_EFFECTS__
1458
1458
  function gr(e) {
1459
1459
  return c(hr, e);
1460
1460
  }
1461
- var _r = /*@__PURE__*/ S("ZodMiniNumberFormat", (e, t) => {
1461
+ var _r = /*@__PURE__*/ x("ZodMiniNumberFormat", (e, t) => {
1462
1462
  h.init(e, t), hr.init(e, t);
1463
1463
  });
1464
1464
  function vr(e) {
1465
1465
  return t(_r, e);
1466
1466
  }
1467
- var yr = /*@__PURE__*/ S("ZodMiniBoolean", (e, t) => {
1467
+ var yr = /*@__PURE__*/ x("ZodMiniBoolean", (e, t) => {
1468
1468
  o.init(e, t), Y.init(e, t);
1469
1469
  });
1470
1470
  // @__NO_SIDE_EFFECTS__
1471
1471
  function br(e) {
1472
1472
  return r(yr, e);
1473
1473
  }
1474
- var xr = /*@__PURE__*/ S("ZodMiniUnknown", (e, t) => {
1475
- Te.init(e, t), Y.init(e, t);
1474
+ var xr = /*@__PURE__*/ x("ZodMiniUnknown", (e, t) => {
1475
+ Ee.init(e, t), Y.init(e, t);
1476
1476
  });
1477
1477
  // @__NO_SIDE_EFFECTS__
1478
1478
  function Sr() {
1479
1479
  return s(xr);
1480
1480
  }
1481
- var Cr = /*@__PURE__*/ S("ZodMiniNever", (e, t) => {
1482
- ee.init(e, t), Y.init(e, t);
1481
+ var Cr = /*@__PURE__*/ x("ZodMiniNever", (e, t) => {
1482
+ te.init(e, t), Y.init(e, t);
1483
1483
  });
1484
1484
  // @__NO_SIDE_EFFECTS__
1485
1485
  function wr(e) {
1486
1486
  return m(Cr, e);
1487
1487
  }
1488
- var Tr = /*@__PURE__*/ S("ZodMiniArray", (e, t) => {
1489
- b.init(e, t), Y.init(e, t);
1488
+ var Tr = /*@__PURE__*/ x("ZodMiniArray", (e, t) => {
1489
+ y.init(e, t), Y.init(e, t);
1490
1490
  });
1491
1491
  // @__NO_SIDE_EFFECTS__
1492
1492
  function Er(e, t) {
1493
1493
  return new Tr({
1494
1494
  type: "array",
1495
1495
  element: e,
1496
- ...x(t)
1496
+ ...b(t)
1497
1497
  });
1498
1498
  }
1499
- var Dr = /*@__PURE__*/ S("ZodMiniObject", (t, n) => {
1500
- e.init(t, n), Y.init(t, n), Ne(t, "shape", (e) => e._zod.def.shape, !1);
1499
+ var Dr = /*@__PURE__*/ x("ZodMiniObject", (t, n) => {
1500
+ e.init(t, n), Y.init(t, n), Pe(t, "shape", (e) => e._zod.def.shape, !1);
1501
1501
  });
1502
1502
  // @__NO_SIDE_EFFECTS__
1503
1503
  function Or(e, t) {
1504
1504
  return new Dr({
1505
1505
  type: "object",
1506
1506
  shape: e ?? {},
1507
- ...x(t)
1507
+ ...b(t)
1508
1508
  });
1509
1509
  }
1510
1510
  // @__NO_SIDE_EFFECTS__
@@ -1513,26 +1513,26 @@ function kr(e, t) {
1513
1513
  type: "object",
1514
1514
  shape: e,
1515
1515
  catchall: /* @__PURE__ */ Sr(),
1516
- ...x(t)
1516
+ ...b(t)
1517
1517
  });
1518
1518
  }
1519
1519
  // @__NO_SIDE_EFFECTS__
1520
1520
  function Ar(e, t) {
1521
- return ke(e, t);
1521
+ return Ae(e, t);
1522
1522
  }
1523
- var jr = /*@__PURE__*/ S("ZodMiniUnion", (e, t) => {
1524
- xe.init(e, t), Y.init(e, t);
1523
+ var jr = /*@__PURE__*/ x("ZodMiniUnion", (e, t) => {
1524
+ Se.init(e, t), Y.init(e, t);
1525
1525
  });
1526
1526
  // @__NO_SIDE_EFFECTS__
1527
1527
  function Mr(e, t) {
1528
1528
  return new jr({
1529
1529
  type: "union",
1530
1530
  options: e,
1531
- ...x(t)
1531
+ ...b(t)
1532
1532
  });
1533
1533
  }
1534
- var Nr = /*@__PURE__*/ S("ZodMiniDiscriminatedUnion", (e, t) => {
1535
- Se.init(e, t), Y.init(e, t);
1534
+ var Nr = /*@__PURE__*/ x("ZodMiniDiscriminatedUnion", (e, t) => {
1535
+ Ce.init(e, t), Y.init(e, t);
1536
1536
  });
1537
1537
  // @__NO_SIDE_EFFECTS__
1538
1538
  function Pr(e, t, n) {
@@ -1540,11 +1540,11 @@ function Pr(e, t, n) {
1540
1540
  type: "union",
1541
1541
  options: t,
1542
1542
  discriminator: e,
1543
- ...x(n)
1543
+ ...b(n)
1544
1544
  });
1545
1545
  }
1546
- var Fr = /*@__PURE__*/ S("ZodMiniRecord", (e, t) => {
1547
- C.init(e, t), Y.init(e, t);
1546
+ var Fr = /*@__PURE__*/ x("ZodMiniRecord", (e, t) => {
1547
+ S.init(e, t), Y.init(e, t);
1548
1548
  });
1549
1549
  // @__NO_SIDE_EFFECTS__
1550
1550
  function Ir(e, t, n) {
@@ -1552,15 +1552,15 @@ function Ir(e, t, n) {
1552
1552
  type: "record",
1553
1553
  keyType: /* @__PURE__ */ mr(),
1554
1554
  valueType: e,
1555
- ...x(t)
1555
+ ...b(t)
1556
1556
  }) : new Fr({
1557
1557
  type: "record",
1558
1558
  keyType: e,
1559
1559
  valueType: t,
1560
- ...x(n)
1560
+ ...b(n)
1561
1561
  });
1562
1562
  }
1563
- var Lr = /*@__PURE__*/ S("ZodMiniEnum", (e, t) => {
1563
+ var Lr = /*@__PURE__*/ x("ZodMiniEnum", (e, t) => {
1564
1564
  l.init(e, t), Y.init(e, t), e.options = [...e._zod.values];
1565
1565
  });
1566
1566
  // @__NO_SIDE_EFFECTS__
@@ -1568,22 +1568,22 @@ function Rr(e, t) {
1568
1568
  return new Lr({
1569
1569
  type: "enum",
1570
1570
  entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
1571
- ...x(t)
1571
+ ...b(t)
1572
1572
  });
1573
1573
  }
1574
- var zr = /*@__PURE__*/ S("ZodMiniLiteral", (e, t) => {
1575
- te.init(e, t), Y.init(e, t);
1574
+ var zr = /*@__PURE__*/ x("ZodMiniLiteral", (e, t) => {
1575
+ ne.init(e, t), Y.init(e, t);
1576
1576
  });
1577
1577
  // @__NO_SIDE_EFFECTS__
1578
1578
  function Br(e, t) {
1579
1579
  return new zr({
1580
1580
  type: "literal",
1581
1581
  values: Array.isArray(e) ? e : [e],
1582
- ...x(t)
1582
+ ...b(t)
1583
1583
  });
1584
1584
  }
1585
- var Vr = /*@__PURE__*/ S("ZodMiniTransform", (e, t) => {
1586
- he.init(e, t), Y.init(e, t);
1585
+ var Vr = /*@__PURE__*/ x("ZodMiniTransform", (e, t) => {
1586
+ ge.init(e, t), Y.init(e, t);
1587
1587
  });
1588
1588
  // @__NO_SIDE_EFFECTS__
1589
1589
  function Hr(e) {
@@ -1592,8 +1592,8 @@ function Hr(e) {
1592
1592
  transform: e
1593
1593
  });
1594
1594
  }
1595
- var Ur = /*@__PURE__*/ S("ZodMiniOptional", (e, t) => {
1596
- le.init(e, t), Y.init(e, t);
1595
+ var Ur = /*@__PURE__*/ x("ZodMiniOptional", (e, t) => {
1596
+ ue.init(e, t), Y.init(e, t);
1597
1597
  });
1598
1598
  // @__NO_SIDE_EFFECTS__
1599
1599
  function Wr(e) {
@@ -1602,8 +1602,8 @@ function Wr(e) {
1602
1602
  innerType: e
1603
1603
  });
1604
1604
  }
1605
- var Gr = /*@__PURE__*/ S("ZodMiniPipe", (e, t) => {
1606
- Ee.init(e, t), Y.init(e, t);
1605
+ var Gr = /*@__PURE__*/ x("ZodMiniPipe", (e, t) => {
1606
+ De.init(e, t), Y.init(e, t);
1607
1607
  });
1608
1608
  // @__NO_SIDE_EFFECTS__
1609
1609
  function Kr(e, t) {
@@ -1613,19 +1613,19 @@ function Kr(e, t) {
1613
1613
  out: t
1614
1614
  });
1615
1615
  }
1616
- var qr = /*@__PURE__*/ S("ZodMiniCustom", (e, t) => {
1616
+ var qr = /*@__PURE__*/ x("ZodMiniCustom", (e, t) => {
1617
1617
  u.init(e, t), Y.init(e, t);
1618
1618
  });
1619
1619
  // @__NO_SIDE_EFFECTS__
1620
1620
  function Jr(e, t) {
1621
- return ge(qr, e ?? (() => !0), t);
1621
+ return _e(qr, e ?? (() => !0), t);
1622
1622
  }
1623
1623
  // @__NO_SIDE_EFFECTS__
1624
1624
  function Yr(e, t = {}) {
1625
1625
  return g(qr, e, t);
1626
1626
  }
1627
- // ../../node_modules/.pnpm/ai@7.0.173_zod@4.6.7/node_modules/ai/dist/index.js
1628
- var Xr = "AI_InvalidArgumentError", Zr = `vercel.ai.error.${Xr}`, Qr = Symbol.for(Zr), $r = class extends j {
1627
+ // ../../node_modules/.pnpm/ai@7.0.176_zod@4.6.7/node_modules/ai/dist/index.js
1628
+ var Xr = "AI_InvalidArgumentError", Zr = `vercel.ai.error.${Xr}`, Qr = Symbol.for(Zr), $r = class extends A {
1629
1629
  constructor({ parameter: e, value: t, message: n }) {
1630
1630
  super({
1631
1631
  name: Xr,
@@ -1633,9 +1633,9 @@ var Xr = "AI_InvalidArgumentError", Zr = `vercel.ai.error.${Xr}`, Qr = Symbol.fo
1633
1633
  }), this[Qr] = !0, this.parameter = e, this.value = t;
1634
1634
  }
1635
1635
  static isInstance(e) {
1636
- return j.hasMarker(e, Zr);
1636
+ return A.hasMarker(e, Zr);
1637
1637
  }
1638
- }, ei = "AI_UIMessageStreamError", ti = `vercel.ai.error.${ei}`, ni = Symbol.for(ti), ri = class extends j {
1638
+ }, ei = "AI_UIMessageStreamError", ti = `vercel.ai.error.${ei}`, ni = Symbol.for(ti), ri = class extends A {
1639
1639
  constructor({ chunkType: e, chunkId: t, message: n }) {
1640
1640
  super({
1641
1641
  name: ei,
@@ -1643,7 +1643,7 @@ var Xr = "AI_InvalidArgumentError", Zr = `vercel.ai.error.${Xr}`, Qr = Symbol.fo
1643
1643
  }), this[ni] = !0, this.chunkType = e, this.chunkId = t;
1644
1644
  }
1645
1645
  static isInstance(e) {
1646
- return j.hasMarker(e, ti);
1646
+ return A.hasMarker(e, ti);
1647
1647
  }
1648
1648
  };
1649
1649
  function ii(e, t) {
@@ -1858,18 +1858,18 @@ async function oi(e) {
1858
1858
  state: "failed-parse"
1859
1859
  });
1860
1860
  }
1861
- L({
1861
+ I({
1862
1862
  prefix: "steer",
1863
1863
  size: 24
1864
- }), new TextEncoder(), new TextEncoder(), L({
1864
+ }), new TextEncoder(), new TextEncoder(), I({
1865
1865
  prefix: "aitxt",
1866
1866
  size: 24
1867
- }), L({
1867
+ }), I({
1868
1868
  prefix: "call",
1869
1869
  size: 24
1870
1870
  }), TransformStream;
1871
1871
  var X = {
1872
- NEVER: pe,
1872
+ NEVER: me,
1873
1873
  array: Er,
1874
1874
  boolean: br,
1875
1875
  custom: Jr,
@@ -1890,26 +1890,26 @@ var X = {
1890
1890
  positive: d,
1891
1891
  record: Ir,
1892
1892
  refine: Yr,
1893
- safeParse: Oe,
1894
- startsWith: Pe,
1893
+ safeParse: ke,
1894
+ startsWith: Fe,
1895
1895
  string: mr,
1896
1896
  transform: Hr,
1897
1897
  union: Mr,
1898
1898
  unknown: Sr
1899
1899
  }, Z = {
1900
- array: be,
1901
- boolean: we,
1902
- custom: _e,
1903
- discriminatedUnion: De,
1904
- instanceof: me,
1905
- lazy: w,
1906
- literal: ye,
1907
- null: ie,
1908
- number: fe,
1909
- object: ue,
1910
- record: Me,
1911
- string: oe,
1912
- union: Ae,
1900
+ array: xe,
1901
+ boolean: Te,
1902
+ custom: ve,
1903
+ discriminatedUnion: Oe,
1904
+ instanceof: he,
1905
+ lazy: C,
1906
+ literal: be,
1907
+ null: ae,
1908
+ number: pe,
1909
+ object: de,
1910
+ record: Ne,
1911
+ string: se,
1912
+ union: je,
1913
1913
  unknown: _
1914
1914
  }, si = Z.lazy(() => Z.union([
1915
1915
  Z.null(),
@@ -1918,27 +1918,31 @@ var X = {
1918
1918
  Z.boolean(),
1919
1919
  Z.record(Z.string(), si.optional()),
1920
1920
  Z.array(si)
1921
- ])), Q = Z.record(Z.string(), Z.record(Z.string(), si.optional())), ci = X.object({
1922
- source: X.discriminatedUnion("sourceType", [X.object({
1923
- type: X.literal("source"),
1924
- sourceType: X.literal("url"),
1925
- id: X.string(),
1926
- url: X.string(),
1927
- title: X.optional(X.string()),
1928
- providerMetadata: X.optional(Q)
1929
- }), X.object({
1930
- type: X.literal("source"),
1931
- sourceType: X.literal("document"),
1932
- id: X.string(),
1933
- mediaType: X.string(),
1934
- title: X.string(),
1935
- filename: X.optional(X.string()),
1936
- providerMetadata: X.optional(Q)
1937
- })]),
1938
- startIndex: X.optional(X.number().check(X.int()).check(X.nonnegative())),
1939
- endIndex: X.optional(X.number().check(X.int()).check(X.nonnegative())),
1940
- citedText: X.optional(X.string())
1941
- }), li = X.record(X.string(), X.optional(si)), ui = Qn(() => sr(X.union([
1921
+ ])), Q = Z.record(Z.string(), Z.record(Z.string(), si.optional()));
1922
+ function ci(e) {
1923
+ return X.object({
1924
+ source: X.discriminatedUnion("sourceType", [X.object({
1925
+ type: X.literal("source"),
1926
+ sourceType: X.literal("url"),
1927
+ id: X.string(),
1928
+ url: X.string(),
1929
+ title: X.optional(X.string()),
1930
+ providerMetadata: X.optional(e)
1931
+ }), X.object({
1932
+ type: X.literal("source"),
1933
+ sourceType: X.literal("document"),
1934
+ id: X.string(),
1935
+ mediaType: X.string(),
1936
+ title: X.string(),
1937
+ filename: X.optional(X.string()),
1938
+ providerMetadata: X.optional(e)
1939
+ })]),
1940
+ startIndex: X.optional(X.number().check(X.int()).check(X.nonnegative())),
1941
+ endIndex: X.optional(X.number().check(X.int()).check(X.nonnegative())),
1942
+ citedText: X.optional(X.string())
1943
+ });
1944
+ }
1945
+ var li = ci(Q), ui = X.record(X.string(), X.optional(si)), di = Qn(() => sr(X.union([
1942
1946
  X.looseObject({
1943
1947
  type: X.literal("text-start"),
1944
1948
  id: X.string(),
@@ -1953,7 +1957,7 @@ var X = {
1953
1957
  X.looseObject({
1954
1958
  type: X.literal("text-end"),
1955
1959
  id: X.string(),
1956
- citations: X.optional(X.array(ci)),
1960
+ citations: X.optional(X.array(li)),
1957
1961
  providerMetadata: X.optional(Q)
1958
1962
  }),
1959
1963
  X.looseObject({
@@ -1967,7 +1971,7 @@ var X = {
1967
1971
  inputEncoding: X.optional(X.enum(["json", "text"])),
1968
1972
  providerExecuted: X.optional(X.boolean()),
1969
1973
  providerMetadata: X.optional(Q),
1970
- toolMetadata: X.optional(li),
1974
+ toolMetadata: X.optional(ui),
1971
1975
  dynamic: X.optional(X.boolean()),
1972
1976
  title: X.optional(X.string())
1973
1977
  }),
@@ -1983,7 +1987,7 @@ var X = {
1983
1987
  input: X.unknown(),
1984
1988
  providerExecuted: X.optional(X.boolean()),
1985
1989
  providerMetadata: X.optional(Q),
1986
- toolMetadata: X.optional(li),
1990
+ toolMetadata: X.optional(ui),
1987
1991
  dynamic: X.optional(X.boolean()),
1988
1992
  title: X.optional(X.string())
1989
1993
  }),
@@ -1994,7 +1998,7 @@ var X = {
1994
1998
  input: X.unknown(),
1995
1999
  providerExecuted: X.optional(X.boolean()),
1996
2000
  providerMetadata: X.optional(Q),
1997
- toolMetadata: X.optional(li),
2001
+ toolMetadata: X.optional(ui),
1998
2002
  dynamic: X.optional(X.boolean()),
1999
2003
  errorText: X.string(),
2000
2004
  title: X.optional(X.string())
@@ -2023,7 +2027,7 @@ var X = {
2023
2027
  output: X.unknown(),
2024
2028
  providerExecuted: X.optional(X.boolean()),
2025
2029
  providerMetadata: X.optional(Q),
2026
- toolMetadata: X.optional(li),
2030
+ toolMetadata: X.optional(ui),
2027
2031
  dynamic: X.optional(X.boolean()),
2028
2032
  preliminary: X.optional(X.boolean())
2029
2033
  }),
@@ -2033,7 +2037,7 @@ var X = {
2033
2037
  errorText: X.string(),
2034
2038
  providerExecuted: X.optional(X.boolean()),
2035
2039
  providerMetadata: X.optional(Q),
2036
- toolMetadata: X.optional(li),
2040
+ toolMetadata: X.optional(ui),
2037
2041
  dynamic: X.optional(X.boolean())
2038
2042
  }),
2039
2043
  X.looseObject({
@@ -2140,39 +2144,39 @@ var X = {
2140
2144
  messageMetadata: X.unknown()
2141
2145
  })
2142
2146
  ])));
2143
- function di(e) {
2147
+ function fi(e) {
2144
2148
  return e.type.startsWith("data-");
2145
2149
  }
2146
- function fi() {
2150
+ function pi() {
2147
2151
  return Object.create(null);
2148
2152
  }
2149
- function pi(e) {
2153
+ function mi(e) {
2150
2154
  return e.type.startsWith("tool-");
2151
2155
  }
2152
- function mi(e) {
2156
+ function hi(e) {
2153
2157
  return e.type === "dynamic-tool";
2154
2158
  }
2155
2159
  function $(e) {
2156
- return pi(e) || mi(e);
2160
+ return mi(e) || hi(e);
2157
2161
  }
2158
- function hi(e) {
2162
+ function gi(e) {
2159
2163
  return e.type.split("-").slice(1).join("-");
2160
2164
  }
2161
- function gi({ lastMessage: e, messageId: t }) {
2165
+ function _i({ lastMessage: e, messageId: t }) {
2162
2166
  let n = e?.role === "assistant" ? e : {
2163
2167
  id: t,
2164
2168
  metadata: void 0,
2165
2169
  role: "assistant",
2166
2170
  parts: []
2167
- }, r = fi(), i = n.parts.findLastIndex((e) => e.type === "step-start"), a = 0;
2171
+ }, r = pi(), i = n.parts.findLastIndex((e) => e.type === "step-start"), a = 0;
2168
2172
  for (let e of n.parts.slice(i + 1)) {
2169
2173
  if (!$(e)) continue;
2170
2174
  let t = a;
2171
- pi(e) && a++, e.state === "input-streaming" && (r[e.toolCallId] = {
2175
+ mi(e) && a++, e.state === "input-streaming" && (r[e.toolCallId] = {
2172
2176
  text: e.rawInput ?? "",
2173
2177
  inputEncoding: e.inputEncoding,
2174
2178
  index: t,
2175
- toolName: e.type === "dynamic-tool" ? e.toolName : hi(e),
2179
+ toolName: e.type === "dynamic-tool" ? e.toolName : gi(e),
2176
2180
  dynamic: e.type === "dynamic-tool",
2177
2181
  title: e.title,
2178
2182
  toolMetadata: e.toolMetadata
@@ -2180,12 +2184,12 @@ function gi({ lastMessage: e, messageId: t }) {
2180
2184
  }
2181
2185
  return {
2182
2186
  message: n,
2183
- activeTextParts: fi(),
2184
- activeReasoningParts: fi(),
2187
+ activeTextParts: pi(),
2188
+ activeReasoningParts: pi(),
2185
2189
  partialToolCalls: r
2186
2190
  };
2187
2191
  }
2188
- function _i({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdateMessageJob: r, onError: i, onToolCall: a, onData: o, resetStateOnMessageIdChange: s = !1, resetStateOnFirstMessageStart: c = !1 }) {
2192
+ function vi({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdateMessageJob: r, onError: i, onToolCall: a, onData: o, resetStateOnMessageIdChange: s = !1, resetStateOnFirstMessageStart: c = !1 }) {
2189
2193
  let l = !0;
2190
2194
  return e.pipeThrough(new TransformStream({ async transform(e, u) {
2191
2195
  await r(async ({ state: r, write: d }) => {
@@ -2226,7 +2230,7 @@ function _i({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2226
2230
  return t;
2227
2231
  }
2228
2232
  function g(e, t) {
2229
- let n = t ?? f().find((t) => pi(t) && t.toolCallId === e.toolCallId), i = e, a = n;
2233
+ let n = t ?? f().find((t) => mi(t) && t.toolCallId === e.toolCallId), i = e, a = n;
2230
2234
  if (n != null) {
2231
2235
  n.state = e.state, a.type = `tool-${e.toolName}`, a.input = i.input, a.output = i.output, a.errorText = i.errorText, a.rawInput = i.rawInput, i.inputEncoding == null ? delete a.inputEncoding : a.inputEncoding = i.inputEncoding, a.preliminary = i.preliminary, e.title !== void 0 && (a.title = e.title), e.toolMetadata !== void 0 && (a.toolMetadata = e.toolMetadata), a.providerExecuted = i.providerExecuted ?? n.providerExecuted;
2232
2236
  let t = i.providerMetadata;
@@ -2394,7 +2398,7 @@ function _i({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2394
2398
  }), d();
2395
2399
  break;
2396
2400
  case "tool-input-start": {
2397
- let t = f().filter(pi);
2401
+ let t = f().filter(mi);
2398
2402
  r.partialToolCalls[e.toolCallId] = {
2399
2403
  text: "",
2400
2404
  inputEncoding: e.inputEncoding,
@@ -2542,7 +2546,7 @@ function _i({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2542
2546
  toolMetadata: e.toolMetadata ?? t.toolMetadata
2543
2547
  }, t) : g({
2544
2548
  toolCallId: e.toolCallId,
2545
- toolName: hi(t),
2549
+ toolName: gi(t),
2546
2550
  state: "output-available",
2547
2551
  input: t.input,
2548
2552
  output: e.output,
@@ -2568,7 +2572,7 @@ function _i({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2568
2572
  toolMetadata: e.toolMetadata ?? t.toolMetadata
2569
2573
  }, t) : g({
2570
2574
  toolCallId: e.toolCallId,
2571
- toolName: hi(t),
2575
+ toolName: gi(t),
2572
2576
  state: "output-error",
2573
2577
  input: t.input,
2574
2578
  rawInput: t.rawInput,
@@ -2593,12 +2597,12 @@ function _i({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2593
2597
  case "finish-step": break;
2594
2598
  case "reset-step": {
2595
2599
  let e = f();
2596
- r.activeTextParts = fi(), r.activeReasoningParts = fi(), r.partialToolCalls = fi(), e.length > 0 && (r.message.parts.splice(r.message.parts.length - e.length, e.length), d());
2600
+ r.activeTextParts = pi(), r.activeReasoningParts = pi(), r.partialToolCalls = pi(), e.length > 0 && (r.message.parts.splice(r.message.parts.length - e.length, e.length), d());
2597
2601
  break;
2598
2602
  }
2599
2603
  case "start": {
2600
2604
  let t = c && l || s && e.messageId != null && e.messageId !== r.message.id;
2601
- l = !1, t && Object.assign(r, gi({
2605
+ l = !1, t && Object.assign(r, _i({
2602
2606
  lastMessage: void 0,
2603
2607
  messageId: e.messageId ?? r.message.id
2604
2608
  }), { finishReason: void 0 }), e.messageId != null && (r.message.id = e.messageId), await v(e.messageMetadata), (t || e.messageId != null || e.messageMetadata != null) && d({ updateStatus: !1 });
@@ -2613,7 +2617,7 @@ function _i({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2613
2617
  case "error":
2614
2618
  i?.(Error(e.errorText));
2615
2619
  break;
2616
- default: if (di(e)) {
2620
+ default: if (fi(e)) {
2617
2621
  let t = n?.[e.type.slice(5)];
2618
2622
  if (t != null) {
2619
2623
  let n = r.message.parts.findIndex((t) => "id" in t && "data" in t && t.id === e.id && t.type === e.type), i = n >= 0 ? n : r.message.parts.length;
@@ -2640,7 +2644,7 @@ function _i({ stream: e, messageMetadataSchema: t, dataPartSchemas: n, runUpdate
2640
2644
  });
2641
2645
  } }));
2642
2646
  }
2643
- async function vi({ stream: e, onError: t, abortSignal: n }) {
2647
+ async function yi({ stream: e, onError: t, abortSignal: n }) {
2644
2648
  let r = e.getReader(), i = () => {
2645
2649
  r.cancel().catch(() => {});
2646
2650
  };
@@ -2656,7 +2660,7 @@ async function vi({ stream: e, onError: t, abortSignal: n }) {
2656
2660
  n?.removeEventListener("abort", i), r.releaseLock();
2657
2661
  }
2658
2662
  }
2659
- function yi() {
2663
+ function bi() {
2660
2664
  let e, t;
2661
2665
  return {
2662
2666
  promise: new Promise((n, r) => {
@@ -2666,68 +2670,115 @@ function yi() {
2666
2670
  reject: t
2667
2671
  };
2668
2672
  }
2669
- L({
2673
+ I({
2670
2674
  prefix: "aitxt",
2671
2675
  size: 24
2672
- }), L({
2676
+ }), I({
2673
2677
  prefix: "call",
2674
2678
  size: 24
2675
- }), L({
2679
+ }), I({
2676
2680
  prefix: "aitxt",
2677
2681
  size: 24
2678
- }), L({
2682
+ }), I({
2679
2683
  prefix: "call",
2680
2684
  size: 24
2681
2685
  });
2682
- function bi(e, t = [], n = /* @__PURE__ */ new WeakSet()) {
2686
+ var xi = Symbol("invalid");
2687
+ function Si(e) {
2688
+ let t = [], n = Ci(e, t, /* @__PURE__ */ new Set());
2689
+ return n === xi ? {
2690
+ success: !1,
2691
+ path: t
2692
+ } : {
2693
+ success: !0,
2694
+ value: n
2695
+ };
2696
+ }
2697
+ function Ci(e, t, n) {
2683
2698
  switch (typeof e) {
2684
- case "number": return Number.isFinite(e) ? void 0 : [...t];
2685
- case "bigint":
2686
- case "symbol":
2687
- case "function": return [...t];
2699
+ case "string":
2700
+ case "boolean": return e;
2701
+ case "number": return Number.isFinite(e) ? e : xi;
2688
2702
  case "object": {
2689
- if (e === null || n.has(e)) return;
2703
+ if (e === null) return e;
2704
+ if (n.has(e)) return xi;
2690
2705
  n.add(e);
2691
- let r = Array.isArray(e) ? e.keys() : Object.keys(e);
2692
- for (let i of r) {
2693
- if (i === "__proto__") continue;
2694
- t.push(i);
2695
- let r = bi(e[i], t, n);
2696
- if (r != null) return r;
2697
- t.pop();
2698
- }
2699
- return;
2706
+ let r = Array.isArray(e) ? wi(e, t, n) : Ti(e, t, n);
2707
+ return n.delete(e), r;
2700
2708
  }
2701
- default: return;
2709
+ default: return xi;
2702
2710
  }
2703
2711
  }
2704
- function xi(e, t = []) {
2705
- return X.pipe(X.unknown().check((e) => {
2706
- let n = e.value;
2707
- for (let e of t) n = typeof n == "object" && n ? n[e] : void 0;
2708
- let r = bi(n);
2709
- r != null && e.issues.push({
2710
- code: "custom",
2711
- message: "Invalid JSON value. Expected null, a string, a finite number, a boolean, an array, or an object.",
2712
- input: e.value,
2713
- path: [...t, ...r]
2714
- });
2715
- }), e);
2712
+ function wi(e, t, n) {
2713
+ let r;
2714
+ for (let i = 0; i < e.length; i++) {
2715
+ let a = e[i];
2716
+ t.push(i);
2717
+ let o = Ci(a, t, n);
2718
+ if (o === xi) return xi;
2719
+ t.pop(), r == null ? o !== a && (r = e.slice(0, i), r.push(o)) : r.push(o);
2720
+ }
2721
+ return r ?? e;
2722
+ }
2723
+ function Ti(e, t, n) {
2724
+ if (!Di(e) || Oi(e)) return xi;
2725
+ let r = Object.keys(e), i;
2726
+ for (let a = 0; a < r.length; a++) {
2727
+ let o = r[a];
2728
+ if (o === "__proto__") {
2729
+ i ??= Ei(e, r, a);
2730
+ continue;
2731
+ }
2732
+ let s = e[o], c = s;
2733
+ if (s !== void 0) {
2734
+ if (t.push(o), c = Ci(s, t, n), c === xi) return xi;
2735
+ t.pop();
2736
+ }
2737
+ i == null ? c !== s && (i = Ei(e, r, a), i[o] = c) : i[o] = c;
2738
+ }
2739
+ return i ?? e;
2740
+ }
2741
+ function Ei(e, t, n) {
2742
+ let r = {};
2743
+ for (let i = 0; i < n; i++) r[t[i]] = e[t[i]];
2744
+ return r;
2716
2745
  }
2717
- xi(X.record(X.string(), X.optional(si))), xi(Q), X.record(X.string(), X.string()), xi(ci, ["source", "providerMetadata"]), L({
2746
+ function Di(e) {
2747
+ let t = e.constructor;
2748
+ if (typeof t != "function") return !0;
2749
+ let n = t.prototype;
2750
+ return typeof n == "object" && !!n && Object.prototype.hasOwnProperty.call(n, "isPrototypeOf");
2751
+ }
2752
+ function Oi(e) {
2753
+ let t = Object.getOwnPropertySymbols(e);
2754
+ for (let n = 0; n < t.length; n++) if (Object.prototype.propertyIsEnumerable.call(e, t[n])) return !0;
2755
+ return !1;
2756
+ }
2757
+ var ki = X.pipe(X.unknown(), X.transform((e, t) => {
2758
+ let n = Si(e);
2759
+ return n.success ? n.value : (t.issues.push({
2760
+ code: "custom",
2761
+ message: "Invalid JSON value. Expected null, a string, a finite number, a boolean, an array, or an object.",
2762
+ input: e,
2763
+ path: n.path
2764
+ }), X.NEVER);
2765
+ })), Ai = X.custom();
2766
+ X.pipe(ki, X.record(X.string(), Ai));
2767
+ var ji = X.pipe(ki, X.record(X.string(), X.record(X.string(), Ai)));
2768
+ X.record(X.string(), X.string()), ci(ji), I({
2718
2769
  prefix: "call",
2719
2770
  size: 24
2720
- }), L({
2771
+ }), I({
2721
2772
  prefix: "call",
2722
2773
  size: 24
2723
- }), new TextEncoder(), L({
2774
+ }), new TextEncoder(), I({
2724
2775
  prefix: "call",
2725
2776
  size: 24
2726
- }), L({
2777
+ }), I({
2727
2778
  prefix: "aiobj",
2728
2779
  size: 24
2729
2780
  });
2730
- var { atob: Si } = globalThis, Ci = class {
2781
+ var { atob: Mi } = globalThis, Ni = class {
2731
2782
  constructor() {
2732
2783
  this.queue = [], this.isProcessing = !1, this.idleWaiters = [];
2733
2784
  }
@@ -2759,35 +2810,35 @@ var { atob: Si } = globalThis, Ci = class {
2759
2810
  });
2760
2811
  }
2761
2812
  };
2762
- L({
2813
+ I({
2763
2814
  prefix: "aiobj",
2764
2815
  size: 24
2765
- }), L({
2816
+ }), I({
2766
2817
  prefix: "call",
2767
2818
  size: 24
2768
2819
  });
2769
- var wi = Z.union([
2820
+ var Pi = Z.union([
2770
2821
  Z.string(),
2771
- Z.custom(Xt, { message: "Must be a Uint8Array" }),
2772
- Z.custom(I, { message: "Must be an ArrayBuffer" }),
2773
- Z.custom(R, { message: "Must be a Buffer" })
2774
- ]), Ti = Z.record(Z.string(), Z.string()), Ei = Z.object({
2822
+ Z.custom(Zt, { message: "Must be a Uint8Array" }),
2823
+ Z.custom(F, { message: "Must be an ArrayBuffer" }),
2824
+ Z.custom(L, { message: "Must be a Buffer" })
2825
+ ]), Fi = Z.record(Z.string(), Z.string()), Ii = Z.object({
2775
2826
  type: Z.literal("text"),
2776
2827
  text: Z.string(),
2777
2828
  providerOptions: Q.optional()
2778
- }), Di = Z.object({
2829
+ }), Li = Z.object({
2779
2830
  type: Z.literal("image"),
2780
2831
  image: Z.union([
2781
- wi,
2832
+ Pi,
2782
2833
  Z.instanceof(URL),
2783
- Ti
2834
+ Fi
2784
2835
  ]),
2785
2836
  mediaType: Z.string().optional(),
2786
2837
  providerOptions: Q.optional()
2787
- }), Oi = Z.discriminatedUnion("type", [
2838
+ }), Ri = Z.discriminatedUnion("type", [
2788
2839
  Z.object({
2789
2840
  type: Z.literal("data"),
2790
- data: wi
2841
+ data: Pi
2791
2842
  }),
2792
2843
  Z.object({
2793
2844
  type: Z.literal("url"),
@@ -2795,54 +2846,54 @@ var wi = Z.union([
2795
2846
  }),
2796
2847
  Z.object({
2797
2848
  type: Z.literal("reference"),
2798
- reference: Ti
2849
+ reference: Fi
2799
2850
  }),
2800
2851
  Z.object({
2801
2852
  type: Z.literal("text"),
2802
2853
  text: Z.string()
2803
2854
  })
2804
- ]), ki = Z.discriminatedUnion("type", [Z.object({
2855
+ ]), zi = Z.discriminatedUnion("type", [Z.object({
2805
2856
  type: Z.literal("data"),
2806
- data: wi
2857
+ data: Pi
2807
2858
  }), Z.object({
2808
2859
  type: Z.literal("url"),
2809
2860
  url: Z.instanceof(URL)
2810
- })]), Ai = Z.object({
2861
+ })]), Bi = Z.object({
2811
2862
  type: Z.literal("file"),
2812
2863
  data: Z.union([
2813
- Oi,
2814
- wi,
2864
+ Ri,
2865
+ Pi,
2815
2866
  Z.instanceof(URL),
2816
- Ti
2867
+ Fi
2817
2868
  ]),
2818
2869
  filename: Z.string().optional(),
2819
2870
  mediaType: Z.string(),
2820
2871
  providerOptions: Q.optional()
2821
- }), ji = Z.object({
2872
+ }), Vi = Z.object({
2822
2873
  type: Z.literal("reasoning"),
2823
2874
  text: Z.string(),
2824
2875
  providerOptions: Q.optional()
2825
- }), Mi = Z.object({
2876
+ }), Hi = Z.object({
2826
2877
  type: Z.literal("custom"),
2827
2878
  kind: Z.string().transform((e) => e),
2828
2879
  providerOptions: Q.optional()
2829
- }), Ni = Z.object({
2880
+ }), Ui = Z.object({
2830
2881
  type: Z.literal("reasoning-file"),
2831
2882
  data: Z.union([
2832
- ki,
2833
- wi,
2883
+ zi,
2884
+ Pi,
2834
2885
  Z.instanceof(URL)
2835
2886
  ]),
2836
2887
  mediaType: Z.string(),
2837
2888
  providerOptions: Q.optional()
2838
- }), Pi = Z.object({
2889
+ }), Wi = Z.object({
2839
2890
  type: Z.literal("tool-call"),
2840
2891
  toolCallId: Z.string(),
2841
2892
  toolName: Z.string(),
2842
2893
  input: Z.unknown(),
2843
2894
  providerOptions: Q.optional(),
2844
2895
  providerExecuted: Z.boolean().optional()
2845
- }), Fi = Z.discriminatedUnion("type", [
2896
+ }), Gi = Z.discriminatedUnion("type", [
2846
2897
  Z.object({
2847
2898
  type: Z.literal("text"),
2848
2899
  value: Z.string(),
@@ -2878,7 +2929,7 @@ var wi = Z.union([
2878
2929
  }),
2879
2930
  Z.object({
2880
2931
  type: Z.literal("file"),
2881
- data: Oi,
2932
+ data: Ri,
2882
2933
  mediaType: Z.string(),
2883
2934
  filename: Z.string().optional(),
2884
2935
  providerOptions: Q.optional()
@@ -2933,13 +2984,13 @@ var wi = Z.union([
2933
2984
  })
2934
2985
  ]))
2935
2986
  })
2936
- ]), Ii = Z.object({
2987
+ ]), Ki = Z.object({
2937
2988
  type: Z.literal("tool-result"),
2938
2989
  toolCallId: Z.string(),
2939
2990
  toolName: Z.string(),
2940
- output: Fi,
2991
+ output: Gi,
2941
2992
  providerOptions: Q.optional()
2942
- }), Li = Z.object({
2993
+ }), qi = Z.object({
2943
2994
  type: Z.literal("tool-approval-request"),
2944
2995
  approvalId: Z.string(),
2945
2996
  toolCallId: Z.string(),
@@ -2947,46 +2998,46 @@ var wi = Z.union([
2947
2998
  isAutomatic: Z.boolean().optional(),
2948
2999
  signature: Z.string().optional(),
2949
3000
  inputSchemaInput: Z.unknown().optional()
2950
- }), Ri = Z.object({
3001
+ }), Ji = Z.object({
2951
3002
  type: Z.literal("tool-approval-response"),
2952
3003
  approvalId: Z.string(),
2953
3004
  approved: Z.boolean(),
2954
3005
  reason: Z.string().optional()
2955
- }), zi = Z.object({
3006
+ }), Yi = Z.object({
2956
3007
  role: Z.literal("system"),
2957
3008
  content: Z.string(),
2958
3009
  providerOptions: Q.optional()
2959
- }), Bi = Z.object({
3010
+ }), Xi = Z.object({
2960
3011
  role: Z.literal("user"),
2961
3012
  content: Z.union([Z.string(), Z.array(Z.union([
2962
- Ei,
2963
- Di,
2964
- Ai
3013
+ Ii,
3014
+ Li,
3015
+ Bi
2965
3016
  ]))]),
2966
3017
  providerOptions: Q.optional()
2967
- }), Vi = Z.object({
3018
+ }), Zi = Z.object({
2968
3019
  role: Z.literal("assistant"),
2969
3020
  content: Z.union([Z.string(), Z.array(Z.union([
2970
- Ei,
2971
- Mi,
2972
- Ai,
2973
- ji,
2974
- Ni,
2975
- Pi,
2976
3021
  Ii,
2977
- Li
3022
+ Hi,
3023
+ Bi,
3024
+ Vi,
3025
+ Ui,
3026
+ Wi,
3027
+ Ki,
3028
+ qi
2978
3029
  ]))]),
2979
3030
  providerOptions: Q.optional()
2980
- }), Hi = Z.object({
3031
+ }), Qi = Z.object({
2981
3032
  role: Z.literal("tool"),
2982
- content: Z.array(Z.union([Ii, Ri])),
3033
+ content: Z.array(Z.union([Ki, Ji])),
2983
3034
  providerOptions: Q.optional()
2984
3035
  });
2985
3036
  Z.union([
2986
- zi,
2987
- Bi,
2988
- Vi,
2989
- Hi
3037
+ Yi,
3038
+ Xi,
3039
+ Zi,
3040
+ Qi
2990
3041
  ]), X.object({
2991
3042
  token: X.string().check(X.refine((e) => e.trim().length > 0)),
2992
3043
  url: X.string().check(X.refine((e) => {
@@ -3004,19 +3055,19 @@ Z.union([
3004
3055
  description: X.optional(X.string()),
3005
3056
  parameters: X.record(X.string(), X.unknown())
3006
3057
  })))
3007
- }), L({
3058
+ }), I({
3008
3059
  prefix: "call",
3009
3060
  size: 24
3010
- }), L({
3061
+ }), I({
3011
3062
  prefix: "call",
3012
3063
  size: 24
3013
- }), L({
3064
+ }), I({
3014
3065
  prefix: "call",
3015
3066
  size: 24
3016
3067
  });
3017
- async function Ui({ response: e, url: t, fallbackMessage: n }) {
3068
+ async function $i({ response: e, url: t, fallbackMessage: n }) {
3018
3069
  let r = await e.text();
3019
- return new yt({
3070
+ return new bt({
3020
3071
  message: r || n,
3021
3072
  url: t,
3022
3073
  requestBodyValues: void 0,
@@ -3024,9 +3075,9 @@ async function Ui({ response: e, url: t, fallbackMessage: n }) {
3024
3075
  responseBody: r
3025
3076
  });
3026
3077
  }
3027
- async function Wi(e) {
3078
+ async function ea(e) {
3028
3079
  if (e == null) return [];
3029
- if (!globalThis.FileList || !(e instanceof globalThis.FileList)) throw new Lt({
3080
+ if (!globalThis.FileList || !(e instanceof globalThis.FileList)) throw new Rt({
3030
3081
  functionality: "FileList",
3031
3082
  message: "FileList is not supported in the current environment"
3032
3083
  });
@@ -3045,18 +3096,18 @@ async function Wi(e) {
3045
3096
  };
3046
3097
  }));
3047
3098
  }
3048
- function Gi(e, t) {
3099
+ function ta(e, t) {
3049
3100
  let n = e.search(/[?#]/), r = n === -1 ? e : e.slice(0, n), i = n === -1 ? "" : e.slice(n);
3050
3101
  return `${r.endsWith("/") && t.startsWith("/") ? r.slice(0, -1) : r}${t}${i}`;
3051
3102
  }
3052
- var Ki = class {
3103
+ var na = class {
3053
3104
  constructor({ api: e = "/api/chat", credentials: t, headers: n, body: r, fetch: i, prepareSendMessagesRequest: a, prepareReconnectToStreamRequest: o }) {
3054
3105
  this.api = e, this.credentials = t, this.headers = n, this.body = r, this.fetch = i, this.prepareSendMessagesRequest = a, this.prepareReconnectToStreamRequest = o;
3055
3106
  }
3056
3107
  async sendMessages({ abortSignal: e, ...t }) {
3057
3108
  let n = await fr(this.body), r = await fr(this.headers), i = await fr(this.credentials), a = {
3058
- ...Zt(r),
3059
- ...Zt(t.headers)
3109
+ ...Qt(r),
3110
+ ...Qt(t.headers)
3060
3111
  }, o = await this.prepareSendMessagesRequest?.({
3061
3112
  api: this.api,
3062
3113
  id: t.chatId,
@@ -3070,7 +3121,7 @@ var Ki = class {
3070
3121
  requestMetadata: t.metadata,
3071
3122
  trigger: t.trigger,
3072
3123
  messageId: t.messageId
3073
- }), s = o?.api ?? this.api, c = o?.headers === void 0 ? a : Zt(o.headers), l = o?.body === void 0 ? {
3124
+ }), s = o?.api ?? this.api, c = o?.headers === void 0 ? a : Qt(o.headers), l = o?.body === void 0 ? {
3074
3125
  ...n,
3075
3126
  ...t.body,
3076
3127
  id: t.chatId,
@@ -3087,18 +3138,18 @@ var Ki = class {
3087
3138
  credentials: u,
3088
3139
  signal: e
3089
3140
  });
3090
- if (!d.ok) throw await Ui({
3141
+ if (!d.ok) throw await $i({
3091
3142
  response: d,
3092
3143
  url: s,
3093
3144
  fallbackMessage: "Failed to fetch the chat response."
3094
3145
  });
3095
- if (!d.body) throw new Ct({ message: "The response body is empty." });
3146
+ if (!d.body) throw new wt({ message: "The response body is empty." });
3096
3147
  return this.processResponseStream(d.body);
3097
3148
  }
3098
3149
  async reconnectToStream(e) {
3099
3150
  let t = await fr(this.body), n = await fr(this.headers), r = await fr(this.credentials), i = {
3100
- ...Zt(n),
3101
- ...Zt(e.headers)
3151
+ ...Qt(n),
3152
+ ...Qt(e.headers)
3102
3153
  }, a = await this.prepareReconnectToStreamRequest?.({
3103
3154
  api: this.api,
3104
3155
  id: e.chatId,
@@ -3116,42 +3167,42 @@ var Ki = class {
3116
3167
  value: e.chatId,
3117
3168
  message: "Chat IDs must not be \".\" or \"..\" when using the default reconnect URL."
3118
3169
  });
3119
- o = Gi(this.api, `/${encodeURIComponent(e.chatId)}/stream`);
3170
+ o = ta(this.api, `/${encodeURIComponent(e.chatId)}/stream`);
3120
3171
  }
3121
- let s = a?.headers === void 0 ? i : Zt(a.headers), c = a?.credentials ?? r, l = await (this.fetch ?? globalThis.fetch)(o, {
3172
+ let s = a?.headers === void 0 ? i : Qt(a.headers), c = a?.credentials ?? r, l = await (this.fetch ?? globalThis.fetch)(o, {
3122
3173
  method: "GET",
3123
3174
  headers: s,
3124
3175
  credentials: c,
3125
3176
  signal: e.abortSignal
3126
3177
  });
3127
3178
  if (l.status === 204) return null;
3128
- if (!l.ok) throw await Ui({
3179
+ if (!l.ok) throw await $i({
3129
3180
  response: l,
3130
3181
  url: o,
3131
3182
  fallbackMessage: "Failed to fetch the chat response."
3132
3183
  });
3133
- if (!l.body) throw new Ct({ message: "The response body is empty." });
3184
+ if (!l.body) throw new wt({ message: "The response body is empty." });
3134
3185
  return this.processResponseStream(l.body);
3135
3186
  }
3136
- }, qi = class extends Ki {
3187
+ }, ra = class extends na {
3137
3188
  constructor({ resumeStreamIsReplay: e = !0, ...t } = {}) {
3138
3189
  super(t), this.resumeStreamIsReplay = e;
3139
3190
  }
3140
3191
  processResponseStream(e) {
3141
3192
  return dr({
3142
3193
  stream: e,
3143
- schema: ui
3194
+ schema: di
3144
3195
  }).pipeThrough(new TransformStream({ async transform(e, t) {
3145
3196
  if (!e.success) throw e.error;
3146
3197
  t.enqueue(e.value);
3147
3198
  } }));
3148
3199
  }
3149
- }, Ji = class {
3200
+ }, ia = class {
3150
3201
  get id() {
3151
3202
  return this._id ??= this.generateId();
3152
3203
  }
3153
- constructor({ generateId: e = Qt, id: t, transport: n = new qi(), messageMetadataSchema: r, dataPartSchemas: i, state: a, onError: o, onToolCall: s, onFinish: c, onData: l, sendAutomaticallyWhen: u, experimental_queue: d = !1 }) {
3154
- this.queuedMessagesFallback = [], this.queuedMessageOptions = /* @__PURE__ */ new Map(), this.isQueuePaused = !1, this.pendingAutomaticDecisions = [], this.pendingMessagePreparations = /* @__PURE__ */ new Set(), this.interruptedMessageIds = /* @__PURE__ */ new Set(), this.activeResponse = void 0, this.activeResumeRequest = void 0, this.resumableStreamState = void 0, this.jobExecutor = new Ci(), this.activeStopCount = 0, this.stopGeneration = 0, this.experimental_removeQueuedMessage = (e) => {
3204
+ constructor({ generateId: e = $t, id: t, transport: n = new ra(), messageMetadataSchema: r, dataPartSchemas: i, state: a, onError: o, onToolCall: s, onFinish: c, onData: l, sendAutomaticallyWhen: u, experimental_queue: d = !1 }) {
3205
+ this.queuedMessagesFallback = [], this.queuedMessageOptions = /* @__PURE__ */ new Map(), this.isQueuePaused = !1, this.pendingAutomaticDecisions = [], this.pendingMessagePreparations = /* @__PURE__ */ new Set(), this.interruptedMessageIds = /* @__PURE__ */ new Set(), this.activeResponse = void 0, this.activeResumeRequest = void 0, this.resumableStreamState = void 0, this.jobExecutor = new Ni(), this.activeStopCount = 0, this.stopGeneration = 0, this.experimental_removeQueuedMessage = (e) => {
3155
3206
  this.queuedMessageOptions.delete(e), this.setQueuedMessages(this.experimental_queuedMessages.filter((t) => t.id !== e));
3156
3207
  }, this.experimental_sendQueuedMessageNow = async (e) => {
3157
3208
  let t = this.experimental_queuedMessages.find((t) => t.id === e);
@@ -3189,7 +3240,7 @@ var Ki = class {
3189
3240
  this.pendingMessagePreparations.add(t);
3190
3241
  let r;
3191
3242
  try {
3192
- r = Array.isArray(e.files) ? e.files : await Wi(e.files);
3243
+ r = Array.isArray(e.files) ? e.files : await ea(e.files);
3193
3244
  } finally {
3194
3245
  this.pendingMessagePreparations.delete(t);
3195
3246
  }
@@ -3443,7 +3494,7 @@ var Ki = class {
3443
3494
  }), r && this.status === "error" && this.pendingApprovalMessageId == null && (this.pendingApprovalMessageId = this.state.messages[t]?.id ?? e);
3444
3495
  }
3445
3496
  async makeRequest(e) {
3446
- let t = yi();
3497
+ let t = bi();
3447
3498
  try {
3448
3499
  await this.makeRequestImpl({
3449
3500
  ...e,
@@ -3496,17 +3547,17 @@ var Ki = class {
3496
3547
  status: "submitted",
3497
3548
  error: void 0
3498
3549
  });
3499
- let d = this.lastMessage, f = e === "submit-message" && i != null ? this.state.messages.findIndex((e) => e.id === i) : this.state.messages.length - 1, p = f === -1 ? d : this.state.messages[f], m = p?.id, h = e === "resume-stream" && p?.role === "assistant" && p.parts.some((e) => $(e) && (e.state === "input-streaming" || e.state === "input-available" && e.providerExecuted || e.state === "approval-responded")) ? this.state.snapshot(p) : void 0, g = f !== -1 && f < this.state.messages.length - 1 && p?.role === "assistant", _ = !1, v = !1, y = !1, b;
3550
+ let d = this.lastMessage, f = e === "submit-message" && i != null ? this.state.messages.findIndex((e) => e.id === i) : this.state.messages.length - 1, p = f === -1 ? d : this.state.messages[f], m = p?.id, h = e === "resume-stream" && p?.role === "assistant" && p.parts.some((e) => $(e) && (e.state === "input-streaming" || e.state === "input-available" && e.providerExecuted || e.state === "approval-responded")) ? this.state.snapshot(p) : void 0, g = f !== -1 && f < this.state.messages.length - 1 && p?.role === "assistant", _ = !1, v = !1, ee = !1, y;
3500
3551
  try {
3501
3552
  let s = {
3502
- state: e === "resume-stream" && this.resumableStreamState != null ? this.resumableStreamState : gi({
3553
+ state: e === "resume-stream" && this.resumableStreamState != null ? this.resumableStreamState : _i({
3503
3554
  lastMessage: e === "resume-stream" ? h : e === "regenerate-message" ? void 0 : this.state.snapshot(p),
3504
3555
  messageId: this.generateId()
3505
3556
  }),
3506
3557
  abortController: o,
3507
3558
  completionPromise: a
3508
3559
  };
3509
- b = s, s.abortController.signal.addEventListener("abort", () => {
3560
+ y = s, s.abortController.signal.addEventListener("abort", () => {
3510
3561
  _ = !0;
3511
3562
  }), this.activeResponse = s;
3512
3563
  let l;
@@ -3519,8 +3570,8 @@ var Ki = class {
3519
3570
  body: r,
3520
3571
  trigger: e,
3521
3572
  messageId: i
3522
- }), await vi({
3523
- stream: _i({
3573
+ }), await yi({
3574
+ stream: vi({
3524
3575
  stream: l,
3525
3576
  resetStateOnMessageIdChange: e === "resume-stream",
3526
3577
  resetStateOnFirstMessageStart: e === "resume-stream" && this.transport.resumeStreamIsReplay,
@@ -3552,34 +3603,34 @@ var Ki = class {
3552
3603
  }), _) return c() && (this.setStatus({ status: "ready" }), this.resumableStreamState === s.state && (this.resumableStreamState = void 0)), null;
3553
3604
  c() && (this.setStatus({ status: "ready" }), this.resumableStreamState === s.state && (this.resumableStreamState = void 0));
3554
3605
  } catch (e) {
3555
- if (_ || e.name === "AbortError") return _ = !0, c() && (this.setStatus({ status: "ready" }), this.resumableStreamState === b?.state && (this.resumableStreamState = void 0)), null;
3606
+ if (_ || e.name === "AbortError") return _ = !0, c() && (this.setStatus({ status: "ready" }), this.resumableStreamState === y?.state && (this.resumableStreamState = void 0)), null;
3556
3607
  if (!c()) return null;
3557
- if (y = !0, e instanceof TypeError) {
3608
+ if (ee = !0, e instanceof TypeError) {
3558
3609
  let t = e.message.toLowerCase();
3559
3610
  v = t.includes("fetch") || t.includes("network") || t === "load failed";
3560
3611
  }
3561
- v ? this.resumableStreamState = b?.state : this.resumableStreamState === b?.state && (this.resumableStreamState = void 0), this.onError && e instanceof Error && this.onError(e), this.setStatus({
3612
+ v ? this.resumableStreamState = y?.state : this.resumableStreamState === y?.state && (this.resumableStreamState = void 0), this.onError && e instanceof Error && this.onError(e), this.setStatus({
3562
3613
  status: "error",
3563
3614
  error: e
3564
3615
  });
3565
3616
  } finally {
3566
3617
  try {
3567
- if (b) {
3568
- let { message: e, finishReason: t } = b.state;
3569
- t === "interrupted" ? this.interruptedMessageIds.add(e.id) : !_ && !y && this.interruptedMessageIds.delete(e.id), this.onFinish?.({
3570
- message: b.state.message,
3618
+ if (y) {
3619
+ let { message: e, finishReason: t } = y.state;
3620
+ t === "interrupted" ? this.interruptedMessageIds.add(e.id) : !_ && !ee && this.interruptedMessageIds.delete(e.id), this.onFinish?.({
3621
+ message: y.state.message,
3571
3622
  messages: this.state.messages,
3572
3623
  isAbort: _,
3573
3624
  isDisconnect: v,
3574
- isError: y,
3575
- finishReason: b.state.finishReason
3625
+ isError: ee,
3626
+ finishReason: y.state.finishReason
3576
3627
  });
3577
3628
  }
3578
3629
  } finally {
3579
- (_ || y || b?.state.finishReason === "interrupted") && (this.isQueuePaused = !0), this.activeResponse === b && (this.activeResponse = void 0), l();
3630
+ (_ || ee || y?.state.finishReason === "interrupted") && (this.isQueuePaused = !0), this.activeResponse === y && (this.activeResponse = void 0), l();
3580
3631
  }
3581
3632
  }
3582
- if (!_ && !y && b?.state.finishReason !== "interrupted") {
3633
+ if (!_ && !ee && y?.state.finishReason !== "interrupted") {
3583
3634
  let e = this.stopGeneration;
3584
3635
  await this.runAutomaticRequest(() => this.makeRequest({
3585
3636
  trigger: "submit-message",
@@ -3591,37 +3642,37 @@ var Ki = class {
3591
3642
  }
3592
3643
  }
3593
3644
  };
3594
- function Yi({ messages: e }) {
3645
+ function aa({ messages: e }) {
3595
3646
  let t = e[e.length - 1];
3596
3647
  if (!t || t.role !== "assistant") return !1;
3597
3648
  let n = t.parts.reduce((e, t, n) => t.type === "step-start" ? n : e, -1), r = t.parts.slice(n + 1).filter($);
3598
3649
  return r.filter((e) => e.state === "approval-responded").length > 0 && r.every((e) => e.state === "output-available" && e.preliminary !== !0 || e.state === "output-error" || e.state === "output-denied" || e.state === "approval-responded");
3599
3650
  }
3600
3651
  // ../../node_modules/.pnpm/swrv@1.2.0_vue@3.5.45_typescript@6.0.3_/node_modules/swrv/esm/lib/hash.js
3601
- var Xi = /* @__PURE__ */ new WeakMap(), Zi = 0;
3602
- function Qi(e) {
3652
+ var oa = /* @__PURE__ */ new WeakMap(), sa = 0;
3653
+ function ca(e) {
3603
3654
  if (!e.length) return "";
3604
3655
  for (var t = "arg", n = 0; n < e.length; ++n) {
3605
3656
  var r = void 0;
3606
- e[n] === null || typeof e[n] != "object" && typeof e[n] != "function" ? r = typeof e[n] == "string" ? "\"" + e[n] + "\"" : String(e[n]) : Xi.has(e[n]) ? r = Xi.get(e[n]) : (r = Zi, Xi.set(e[n], Zi++)), t += "@" + r;
3657
+ e[n] === null || typeof e[n] != "object" && typeof e[n] != "function" ? r = typeof e[n] == "string" ? "\"" + e[n] + "\"" : String(e[n]) : oa.has(e[n]) ? r = oa.get(e[n]) : (r = sa, oa.set(e[n], sa++)), t += "@" + r;
3607
3658
  }
3608
3659
  return t;
3609
3660
  }
3610
3661
  // ../../node_modules/.pnpm/swrv@1.2.0_vue@3.5.45_typescript@6.0.3_/node_modules/swrv/esm/cache/index.js
3611
- function $i(e) {
3662
+ function la(e) {
3612
3663
  if (typeof e == "function") try {
3613
3664
  e = e();
3614
3665
  } catch {
3615
3666
  e = "";
3616
3667
  }
3617
- return e = Array.isArray(e) ? Qi(e) : String(e || ""), e;
3668
+ return e = Array.isArray(e) ? ca(e) : String(e || ""), e;
3618
3669
  }
3619
- var ea = function() {
3670
+ var ua = function() {
3620
3671
  function e(e) {
3621
3672
  e === void 0 && (e = 0), this.items = /* @__PURE__ */ new Map(), this.ttl = e;
3622
3673
  }
3623
3674
  return e.prototype.serializeKey = function(e) {
3624
- return $i(e);
3675
+ return la(e);
3625
3676
  }, e.prototype.get = function(e) {
3626
3677
  var t = this.serializeKey(e);
3627
3678
  return this.items.get(t);
@@ -3642,26 +3693,26 @@ var ea = function() {
3642
3693
  }, e;
3643
3694
  }();
3644
3695
  // ../../node_modules/.pnpm/swrv@1.2.0_vue@3.5.45_typescript@6.0.3_/node_modules/swrv/esm/lib/web-preset.js
3645
- function ta() {
3696
+ function da() {
3646
3697
  return navigator.onLine === void 0 || navigator.onLine;
3647
3698
  }
3648
- function na() {
3699
+ function fa() {
3649
3700
  return typeof document < "u" && document.visibilityState !== void 0 ? document.visibilityState !== "hidden" : !0;
3650
3701
  }
3651
- var ra = {
3652
- isOnline: ta,
3653
- isDocumentVisible: na,
3702
+ var pa = {
3703
+ isOnline: da,
3704
+ isDocumentVisible: fa,
3654
3705
  fetcher: function(e) {
3655
3706
  return fetch(e).then(function(e) {
3656
3707
  return e.json();
3657
3708
  });
3658
3709
  }
3659
- }, ia = function() {
3660
- return ia = Object.assign || function(e) {
3710
+ }, ma = function() {
3711
+ return ma = Object.assign || function(e) {
3661
3712
  for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
3662
3713
  return e;
3663
- }, ia.apply(this, arguments);
3664
- }, aa = function(e, t, n, r) {
3714
+ }, ma.apply(this, arguments);
3715
+ }, ha = function(e, t, n, r) {
3665
3716
  function i(e) {
3666
3717
  return e instanceof n ? e : new n(function(t) {
3667
3718
  t(e);
@@ -3687,7 +3738,7 @@ var ra = {
3687
3738
  }
3688
3739
  c((r = r.apply(e, t || [])).next());
3689
3740
  });
3690
- }, oa = function(e, t) {
3741
+ }, ga = function(e, t) {
3691
3742
  var n = {
3692
3743
  label: 0,
3693
3744
  sent: function() {
@@ -3760,7 +3811,7 @@ var ra = {
3760
3811
  done: !0
3761
3812
  };
3762
3813
  }
3763
- }, sa = function(e, t) {
3814
+ }, _a = function(e, t) {
3764
3815
  var n = typeof Symbol == "function" && e[Symbol.iterator];
3765
3816
  if (!n) return e;
3766
3817
  var r = n.call(e), i, a = [], o;
@@ -3776,11 +3827,11 @@ var ra = {
3776
3827
  }
3777
3828
  }
3778
3829
  return a;
3779
- }, ca = function(e, t, n) {
3830
+ }, va = function(e, t, n) {
3780
3831
  if (n || arguments.length === 2) for (var r = 0, i = t.length, a; r < i; r++) (a || !(r in t)) && (a ||= Array.prototype.slice.call(t, 0, r), a[r] = t[r]);
3781
3832
  return e.concat(a || Array.prototype.slice.call(t));
3782
- }, la = new ea(), ua = new ea(), da = new ea(), fa = {
3783
- cache: la,
3833
+ }, ya = new ua(), ba = new ua(), xa = new ua(), Sa = {
3834
+ cache: ya,
3784
3835
  refreshInterval: 0,
3785
3836
  ttl: 0,
3786
3837
  serverTTL: 1e3,
@@ -3790,15 +3841,15 @@ var ra = {
3790
3841
  shouldRetryOnError: !0,
3791
3842
  errorRetryInterval: 5e3,
3792
3843
  errorRetryCount: 5,
3793
- fetcher: ra.fetcher,
3794
- isOnline: ra.isOnline,
3795
- isDocumentVisible: ra.isDocumentVisible
3844
+ fetcher: pa.fetcher,
3845
+ isOnline: pa.isOnline,
3846
+ isDocumentVisible: pa.isDocumentVisible
3796
3847
  };
3797
- function pa(e, t, n) {
3798
- var r = ua.get(e);
3799
- r ? r.data.push(t) : ua.set(e, [t], n > 0 ? n + 5e3 : n);
3848
+ function Ca(e, t, n) {
3849
+ var r = ba.get(e);
3850
+ r ? r.data.push(t) : ba.set(e, [t], n > 0 ? n + 5e3 : n);
3800
3851
  }
3801
- function ma(e, t, n) {
3852
+ function wa(e, t, n) {
3802
3853
  if (n.isDocumentVisible() && !(n.errorRetryCount !== void 0 && t > n.errorRetryCount)) {
3803
3854
  var r = Math.min(t || 0, n.errorRetryCount), i = r * n.errorRetryInterval;
3804
3855
  setTimeout(function() {
@@ -3809,17 +3860,17 @@ function ma(e, t, n) {
3809
3860
  }, i);
3810
3861
  }
3811
3862
  }
3812
- function ha(e) {
3863
+ function Ta(e) {
3813
3864
  var t = e.shouldRetry, n = t === void 0 ? void 0 : t, r = e.error;
3814
- return typeof n == "function" ? n(r) : typeof n == "boolean" ? n : fa.shouldRetryOnError;
3865
+ return typeof n == "function" ? n(r) : typeof n == "boolean" ? n : Sa.shouldRetryOnError;
3815
3866
  }
3816
- var ga = function(e, t, n, r) {
3817
- return n === void 0 && (n = la), r === void 0 && (r = fa.ttl), aa(void 0, void 0, void 0, function() {
3867
+ var Ea = function(e, t, n, r) {
3868
+ return n === void 0 && (n = ya), r === void 0 && (r = Sa.ttl), ha(void 0, void 0, void 0, function() {
3818
3869
  var i, a, o, s, c, l, u;
3819
- return oa(this, function(d) {
3870
+ return ga(this, function(d) {
3820
3871
  switch (d.label) {
3821
3872
  case 0:
3822
- if (!va(t)) return [3, 5];
3873
+ if (!Oa(t)) return [3, 5];
3823
3874
  d.label = 1;
3824
3875
  case 1: return d.trys.push([
3825
3876
  1,
@@ -3841,7 +3892,7 @@ var ga = function(e, t, n, r) {
3841
3892
  } catch (e) {
3842
3893
  console.error("swrv(mutate): failed to set cache", e);
3843
3894
  }
3844
- return l = ua.get(e), l && l.data.length && (u = l.data.filter(function(t) {
3895
+ return l = ba.get(e), l && l.data.length && (u = l.data.filter(function(t) {
3845
3896
  return t.key === e;
3846
3897
  }), u.forEach(function(e, t) {
3847
3898
  c.data !== void 0 && (e.data = c.data), e.error = c.error, e.isValidating = c.isValidating, e.isLoading = c.isValidating, t !== u.length - 1 && delete u[t];
@@ -3850,16 +3901,16 @@ var ga = function(e, t, n, r) {
3850
3901
  });
3851
3902
  });
3852
3903
  };
3853
- function _a() {
3904
+ function Da() {
3854
3905
  for (var e = this, t = [], n = 0; n < arguments.length; n++) t[n] = arguments[n];
3855
- var r, i, a = ia({}, fa), o = !1, s = !1;
3856
- if (!E()) return console.error("useSWRV must be called inside setup() or an active effectScope()."), null;
3906
+ var r, i, a = ma({}, Sa), o = !1, s = !1;
3907
+ if (!T()) return console.error("useSWRV must be called inside setup() or an active effectScope()."), null;
3857
3908
  var c = typeof window > "u" || typeof document > "u";
3858
- t.length >= 1 && (r = t[0]), t.length >= 2 && (i = t[1]), t.length > 2 && (a = ia(ia({}, a), t[2]));
3859
- var l = c ? a.serverTTL : a.ttl, u = typeof r == "function" ? r : D(r);
3909
+ t.length >= 1 && (r = t[0]), t.length >= 2 && (i = t[1]), t.length > 2 && (a = ma(ma({}, a), t[2]));
3910
+ var l = c ? a.serverTTL : a.ttl, u = typeof r == "function" ? r : E(r);
3860
3911
  i === void 0 && (i = a.fetcher);
3861
3912
  var d = null;
3862
- d ||= et({
3913
+ d ||= tt({
3863
3914
  data: void 0,
3864
3915
  error: void 0,
3865
3916
  isValidating: !0,
@@ -3867,32 +3918,32 @@ function _a() {
3867
3918
  key: null
3868
3919
  });
3869
3920
  var f = function(t, n) {
3870
- return aa(e, void 0, void 0, function() {
3921
+ return ha(e, void 0, void 0, function() {
3871
3922
  var e, r, s, c, p, m, h, g = this;
3872
- return oa(this, function(_) {
3923
+ return ga(this, function(_) {
3873
3924
  switch (_.label) {
3874
3925
  case 0: return e = d.data === void 0, r = u.value, r ? (s = a.cache.get(r), c = s && s.data, d.isValidating = !0, d.isLoading = !c, c && (d.data = c.data, d.error = c.error), p = t || i, !p || !a.isDocumentVisible() && !e || n?.forceRevalidate !== void 0 && !n?.forceRevalidate || s && (m = !!(Date.now() - s.createdAt >= a.dedupingInterval || n?.forceRevalidate), !m) ? (d.isValidating = !1, d.isLoading = !1, [2]) : (h = function() {
3875
- return aa(g, void 0, void 0, function() {
3926
+ return ha(g, void 0, void 0, function() {
3876
3927
  var e, t, i, s, c, u;
3877
- return oa(this, function(m) {
3928
+ return ga(this, function(m) {
3878
3929
  switch (m.label) {
3879
- case 0: return e = da.get(r), e ? [3, 2] : (t = Array.isArray(r) ? r : [r], i = p.apply(void 0, ca([], sa(t), !1)), da.set(r, i, a.dedupingInterval), [4, ga(r, i, a.cache, l)]);
3930
+ case 0: return e = xa.get(r), e ? [3, 2] : (t = Array.isArray(r) ? r : [r], i = p.apply(void 0, va([], _a(t), !1)), xa.set(r, i, a.dedupingInterval), [4, Ea(r, i, a.cache, l)]);
3880
3931
  case 1: return m.sent(), [3, 4];
3881
- case 2: return [4, ga(r, e.data, a.cache, l)];
3932
+ case 2: return [4, Ea(r, e.data, a.cache, l)];
3882
3933
  case 3: m.sent(), m.label = 4;
3883
- case 4: return d.isValidating = !1, d.isLoading = !1, da.delete(r), d.error !== void 0 && (s = ha({
3934
+ case 4: return d.isValidating = !1, d.isLoading = !1, xa.delete(r), d.error !== void 0 && (s = Ta({
3884
3935
  shouldRetry: a.shouldRetryOnError,
3885
3936
  error: d.error
3886
- }), c = ha({
3937
+ }), c = Ta({
3887
3938
  shouldRetry: !n || n.shouldRetryOnError,
3888
3939
  error: d.error
3889
- }), u = !o && s && c, u && ma(f, n ? n.errorRetryCount : 1, a)), [2];
3940
+ }), u = !o && s && c, u && wa(f, n ? n.errorRetryCount : 1, a)), [2];
3890
3941
  }
3891
3942
  });
3892
3943
  });
3893
3944
  }, c && a.revalidateDebounce ? (setTimeout(function() {
3894
- return aa(g, void 0, void 0, function() {
3895
- return oa(this, function(e) {
3945
+ return ha(g, void 0, void 0, function() {
3946
+ return ga(this, function(e) {
3896
3947
  switch (e.label) {
3897
3948
  case 0: return o ? [3, 2] : [4, h()];
3898
3949
  case 1: e.sent(), e.label = 2;
@@ -3908,16 +3959,16 @@ function _a() {
3908
3959
  });
3909
3960
  });
3910
3961
  }, p = function() {
3911
- return aa(e, void 0, void 0, function() {
3912
- return oa(this, function(e) {
3962
+ return ha(e, void 0, void 0, function() {
3963
+ return ga(this, function(e) {
3913
3964
  return [2, f(null, { shouldRetryOnError: !1 })];
3914
3965
  });
3915
3966
  });
3916
3967
  }, m = null;
3917
3968
  if (!c) {
3918
3969
  var h = function() {
3919
- return aa(e, void 0, void 0, function() {
3920
- return oa(this, function(e) {
3970
+ return ha(e, void 0, void 0, function() {
3971
+ return ga(this, function(e) {
3921
3972
  switch (e.label) {
3922
3973
  case 0: return d.error || !a.isOnline() ? [3, 2] : [4, f()];
3923
3974
  case 1: return e.sent(), [3, 3];
@@ -3929,40 +3980,40 @@ function _a() {
3929
3980
  };
3930
3981
  a.refreshInterval && (m = setTimeout(h, a.refreshInterval)), a.revalidateOnFocus && (document.addEventListener("visibilitychange", p, !1), window.addEventListener("focus", p, !1));
3931
3982
  }
3932
- $e(function() {
3983
+ et(function() {
3933
3984
  o = !0, m &&= (clearTimeout(m), null), !c && a.revalidateOnFocus && (document.removeEventListener("visibilitychange", p, !1), window.removeEventListener("focus", p, !1));
3934
- var e = ua.get(u.value);
3985
+ var e = ba.get(u.value);
3935
3986
  e && (e.data = e.data.filter(function(e) {
3936
3987
  return e !== d;
3937
3988
  }));
3938
3989
  });
3939
3990
  try {
3940
- k(u, function(e) {
3941
- Ze(u) || (u.value = e), d.key = e, d.isValidating = !!e, pa(u.value, d, l), !c && !s && u.value && f(), s = !1;
3991
+ O(u, function(e) {
3992
+ Qe(u) || (u.value = e), d.key = e, d.isValidating = !!e, Ca(u.value, d, l), !c && !s && u.value && f(), s = !1;
3942
3993
  }, { immediate: !0 });
3943
3994
  } catch {}
3944
- return ia(ia({}, tt(d)), { mutate: function(e, t) {
3945
- return f(e, ia(ia({}, t), { forceRevalidate: !0 }));
3995
+ return ma(ma({}, nt(d)), { mutate: function(e, t) {
3996
+ return f(e, ma(ma({}, t), { forceRevalidate: !0 }));
3946
3997
  } });
3947
3998
  }
3948
- function va(e) {
3999
+ function Oa(e) {
3949
4000
  return typeof e == "object" && !!e && typeof e.then == "function";
3950
4001
  }
3951
4002
  // ../../node_modules/.pnpm/swrv@1.2.0_vue@3.5.45_typescript@6.0.3_/node_modules/swrv/esm/index.js
3952
- var ya = _a;
3953
- ya.default, ya.default;
3954
- function ba(e) {
4003
+ var ka = Da;
4004
+ ka.default, ka.default;
4005
+ function Aa(e) {
3955
4006
  return Array.isArray(e) ? [...e] : typeof e == "object" && e && (Object.getPrototypeOf(e) === Object.prototype || Object.getPrototypeOf(e) === null) ? { ...e } : e;
3956
4007
  }
3957
- function xa(e) {
4008
+ function ja(e) {
3958
4009
  if (typeof e != "object" || !e || !("parts" in e) || !Array.isArray(e.parts)) return e;
3959
4010
  let t = e, n = {
3960
4011
  ...t,
3961
4012
  parts: t.parts.map((e) => ({ ...e }))
3962
4013
  };
3963
- return "metadata" in t && (n.metadata = ba(t.metadata)), n;
4014
+ return "metadata" in t && (n.metadata = Aa(t.metadata)), n;
3964
4015
  }
3965
- var Sa = class {
4016
+ var Ma = class {
3966
4017
  constructor({ initialMessages: e, messagesRef: t, statusRef: n, errorRef: r, queuedMessagesRef: i, throttleWaitMs: a }) {
3967
4018
  this.publishedMessages = [], this.publishedMessageSources = [], this.dirtyMessageIndices = /* @__PURE__ */ new Set(), this.statusValue = "ready", this.queuedMessagesValue = [], this.hasPendingPublication = !1, this.isActive = !0, this.isPublishing = !1, this.pushMessage = (e) => {
3968
4019
  this.messagesValue.push(e), this.dirtyMessageIndices.add(this.messagesValue.length - 1), this.schedulePublication();
@@ -3970,7 +4021,7 @@ var Sa = class {
3970
4021
  this.messagesValue.pop(), this.schedulePublication();
3971
4022
  }, this.replaceMessage = (e, t) => {
3972
4023
  this.messagesValue[e] = t, this.dirtyMessageIndices.add(e), this.schedulePublication();
3973
- }, this.snapshot = xa, this.handleIntervalEnd = () => {
4024
+ }, this.snapshot = ja, this.handleIntervalEnd = () => {
3974
4025
  this.timeout = void 0, this.isActive && this.hasPendingPublication && (this.hasPendingPublication = !1, this.publishMessages(), this.timeout = setTimeout(this.handleIntervalEnd, this.throttleWaitMs));
3975
4026
  }, this.messagesValue = e, this.messagesRef = t, this.statusRef = n, this.errorRef = r, this.queuedMessagesRef = i, this.throttleWaitMs = a != null && Number.isFinite(a) && a > 0 ? a : void 0;
3976
4027
  }
@@ -4018,7 +4069,7 @@ var Sa = class {
4018
4069
  }
4019
4070
  publishMessages() {
4020
4071
  if (!this.isActive) return;
4021
- let e = this.messagesValue.map((e, t) => this.dirtyMessageIndices.has(t) || this.publishedMessageSources[t] !== e ? xa(e) : this.publishedMessages[t]);
4072
+ let e = this.messagesValue.map((e, t) => this.dirtyMessageIndices.has(t) || this.publishedMessageSources[t] !== e ? ja(e) : this.publishedMessages[t]);
4022
4073
  this.publishedMessages = e, this.publishedMessageSources = [...this.messagesValue], this.dirtyMessageIndices.clear(), this.isPublishing = !0;
4023
4074
  try {
4024
4075
  this.messagesRef.value = e;
@@ -4026,7 +4077,7 @@ var Sa = class {
4026
4077
  this.isPublishing = !1;
4027
4078
  }
4028
4079
  }
4029
- }, Ca = class extends Ji {
4080
+ }, Na = class extends ia {
4030
4081
  constructor({ state: e, ...t }) {
4031
4082
  super({
4032
4083
  ...t,
@@ -4034,13 +4085,13 @@ var Sa = class {
4034
4085
  });
4035
4086
  }
4036
4087
  };
4037
- function wa(e) {
4038
- let t = O([]), n = O("ready"), r = O(), i = O([]), a = O(), o;
4039
- return k(t, (e) => {
4088
+ function Pa(e) {
4089
+ let t = D([]), n = D("ready"), r = D(), i = D([]), a = D(), o;
4090
+ return O(t, (e) => {
4040
4091
  o != null && !o.isPublishing && o.setMessagesFromConsumer(e);
4041
- }, { flush: "sync" }), k(() => nt(e), (e) => {
4092
+ }, { flush: "sync" }), O(() => rt(e), (e) => {
4042
4093
  o?.dispose();
4043
- let { throttle: s, ...c } = e ?? {}, l = new Sa({
4094
+ let { throttle: s, ...c } = e ?? {}, l = new Ma({
4044
4095
  initialMessages: c.messages ?? [],
4045
4096
  messagesRef: t,
4046
4097
  statusRef: n,
@@ -4048,14 +4099,14 @@ function wa(e) {
4048
4099
  queuedMessagesRef: i,
4049
4100
  throttleWaitMs: s
4050
4101
  });
4051
- o = l, l.publishInitialState(), a.value = new Ca({
4102
+ o = l, l.publishInitialState(), a.value = new Na({
4052
4103
  ...c,
4053
4104
  state: l
4054
4105
  });
4055
- }, { immediate: !0 }), E() != null && $e(() => {
4106
+ }, { immediate: !0 }), T() != null && et(() => {
4056
4107
  o?.dispose();
4057
4108
  }), {
4058
- id: T(() => a.value.id),
4109
+ id: w(() => a.value.id),
4059
4110
  status: n,
4060
4111
  messages: t,
4061
4112
  error: r,
@@ -4072,60 +4123,60 @@ function wa(e) {
4072
4123
  };
4073
4124
  }
4074
4125
  // ../../packages/composable/src/chatbot/useChatbotStore.ts
4075
- var Ta = "voice-", Ea = 300, Da = (e) => e?.role === "assistant" && e.parts.some((e) => e.state === "approval-requested"), Oa = (e) => e.replace(/\s+/g, " ").trim().toLowerCase(), ka = (e) => Oa(e.parts.filter((e) => e.type === "text").map((e) => "text" in e ? e.text : "").join(" ")), Aa = 8, ja = (e, t) => {
4126
+ var Fa = "voice-", Ia = 300, La = (e) => e?.role === "assistant" && e.parts.some((e) => e.state === "approval-requested"), Ra = (e) => e.replace(/\s+/g, " ").trim().toLowerCase(), za = (e) => Ra(e.parts.filter((e) => e.type === "text").map((e) => "text" in e ? e.text : "").join(" ")), Ba = 8, Va = (e, t) => {
4076
4127
  let n = new Set(t.map((e) => e.id)), r = e.filter((e) => e.role === "user" && !n.has(e.id)).map((e) => ({
4077
- text: ka(e),
4128
+ text: za(e),
4078
4129
  taken: !1
4079
4130
  }));
4080
4131
  return t.filter((e) => {
4081
4132
  if (!e.id.startsWith("voice-") || e.role !== "user") return !1;
4082
- let t = ka(e), n = r.find((e) => !e.taken && e.text.length > 0 && (e.text === t || e.text.length >= Aa && t.endsWith(e.text)));
4133
+ let t = za(e), n = r.find((e) => !e.taken && e.text.length > 0 && (e.text === t || e.text.length >= Ba && t.endsWith(e.text)));
4083
4134
  return !n || (n.taken = !0, !1);
4084
4135
  });
4085
- }, Ma = 12e4, Na = 1e3, Pa = 5e3, Fa = 100, Ia = 3e4, La = 5e3, Ra = 250, za = 1e3, Ba = "\n\n", Va = (e) => {
4136
+ }, Ha = 12e4, Ua = 1e3, Wa = 5e3, Ga = 100, Ka = 3e4, qa = 5e3, Ja = 250, Ya = 1e3, Xa = "\n\n", Za = (e) => {
4086
4137
  let t = e.type ?? "";
4087
4138
  return t === "dynamic-tool" ? e.toolName ?? "" : t.startsWith("tool-") ? t.slice(5) : "";
4088
- }, Ha = (e) => e?.role === "assistant" && e.parts.some((e) => Ve(Va(e)) && !e.providerExecuted && !Le.has(e.state ?? "")), Ua = ({ messages: e }) => {
4139
+ }, Qa = (e) => e?.role === "assistant" && e.parts.some((e) => He(Za(e)) && !e.providerExecuted && !Re.has(e.state ?? "")), $a = ({ messages: e }) => {
4089
4140
  let t = e[e.length - 1];
4090
4141
  if (!t || t.role !== "assistant") return !1;
4091
- let n = t.parts.reduce((e, t, n) => t.type === "step-start" ? n : e, -1), r = t.parts.slice(n + 1).filter((e) => !e.providerExecuted && (Ve(Va(e)) || qe(e)));
4092
- return r.length > 0 && r.every((e) => Le.has(e.state ?? ""));
4142
+ let n = t.parts.reduce((e, t, n) => t.type === "step-start" ? n : e, -1), r = t.parts.slice(n + 1).filter((e) => !e.providerExecuted && (He(Za(e)) || Je(e)));
4143
+ return r.length > 0 && r.every((e) => Re.has(e.state ?? ""));
4093
4144
  };
4094
- function Wa(e) {
4095
- return A(`chatbot-${e}`, () => {
4096
- let { t, te: n, locale: r } = it({ useScope: "global" }), i = D(""), a = D(), o = D(e), s = D(), c = D(), l = D(), u = D(), d = D(), f = D(), p = D(), m = D(), h = D(), g = D(), _ = D(), v = D(), y = D(), b = D(), ee = D(), te = D(), ne = O(), re = D(0), ie = D(0), ae = D(), oe = D(), x = D(), se = O(), ce = O(), le = D(), ue = D(), de = O(), fe = D(!1), pe = D({}), me = D({}), he = D(!1), ge = D(0), _e = D(), ve = D(!1), ye = ot(), S = T(() => {
4145
+ function eo(e) {
4146
+ return k(`chatbot-${e}`, () => {
4147
+ let { t, te: n, locale: r } = at({ useScope: "global" }), i = E(""), a = E(), o = E(e), s = E(), c = E(), l = E(), u = E(), d = E(), f = E(), p = E(), m = E(), h = E(), g = E(), _ = E(), v = E(), ee = E(), y = E(), te = E(), ne = E(), re = D(), ie = E(0), ae = E(0), oe = E(), se = E(), b = E(), ce = D(), le = D(), ue = E(), de = E(), fe = D(), pe = E(!1), me = E({}), he = E({}), ge = E(!1), _e = E(0), ve = E(), ye = E(!1), be = st(), x = w(() => {
4097
4148
  let e = u.value?.theme;
4098
- return e && e !== "auto" || (e = _e.value), e ? e === "dark" : ye.value;
4099
- }), C = T(() => c.value === "reasoning"), be = T(() => C.value ? g.value?.filter((e) => ![
4149
+ return e && e !== "auto" || (e = ve.value), e ? e === "dark" : be.value;
4150
+ }), S = w(() => c.value === "reasoning"), xe = w(() => S.value ? g.value?.filter((e) => ![
4100
4151
  "upvote",
4101
4152
  "downvote",
4102
4153
  "feedback"
4103
- ].includes(e)) : g.value), xe = Ie(T(() => `${o.value}-chatId`), null);
4104
- rt(() => {
4105
- xe.value ||= Qt();
4154
+ ].includes(e)) : g.value), Se = Le(w(() => `${o.value}-chatId`), null);
4155
+ it(() => {
4156
+ Se.value ||= $t();
4106
4157
  });
4107
- let w = T({
4108
- get: () => xe.value,
4158
+ let C = w({
4159
+ get: () => Se.value,
4109
4160
  set: (e) => {
4110
- xe.value = e;
4161
+ Se.value = e;
4111
4162
  }
4112
- }), Se = Fe(T(() => `${o.value}-pageAccessOff`), !1), Ce = T(() => Se.value ? [] : se.value ?? []), we = () => Se.value ? [] : ce.value?.() ?? [], Te = T(() => !!(ae.value && se.value?.length)), Ee = Ie(T(() => `${o.value}-${l.value ?? "anonymous"}-confirmations`), "manual"), De = T(() => oe.value?.allowAutomatic === !0), Oe = T(() => De.value && Ee.value === "automatic" ? "automatic" : "manual");
4113
- function ke(e) {
4114
- Ee.value = e;
4163
+ }), Ce = Ie(w(() => `${o.value}-pageAccessOff`), !1), we = w(() => Ce.value ? [] : ce.value ?? []), Te = () => Ce.value ? [] : le.value?.() ?? [], Ee = w(() => !!(oe.value && ce.value?.length)), De = Le(w(() => `${o.value}-${l.value ?? "anonymous"}-confirmations`), "manual"), Oe = w(() => se.value?.allowAutomatic === !0), ke = w(() => Oe.value && De.value === "automatic" ? "automatic" : "manual");
4164
+ function Ae(e) {
4165
+ De.value = e;
4115
4166
  }
4116
- let Ae = T(() => !!de.value && ae.value?.pointer === !0 && Ce.value.length > 0);
4117
- k(Ae, (e) => {
4118
- e || (ue.value = void 0);
4167
+ let je = w(() => !!fe.value && oe.value?.pointer === !0 && we.value.length > 0);
4168
+ O(je, (e) => {
4169
+ e || (de.value = void 0);
4119
4170
  });
4120
- let je = Ie(T(() => `${o.value}-pageNotice`), null), Me = T(() => {
4121
- let e = ae.value?.level;
4122
- return e && e !== Be.Off && Ce.value.length && !Ge(je.value ?? void 0, e) ? e : void 0;
4171
+ let Me = Le(w(() => `${o.value}-pageNotice`), null), Ne = w(() => {
4172
+ let e = oe.value?.level;
4173
+ return e && e !== Ve.Off && we.value.length && !Ke(Me.value ?? void 0, e) ? e : void 0;
4123
4174
  });
4124
- function Ne() {
4125
- je.value = ae.value?.level ?? null;
4175
+ function Pe() {
4176
+ Me.value = oe.value?.level ?? null;
4126
4177
  }
4127
- let Pe = D(), Le = D(!1), Ve = T(() => Pe.value?.message?.toLowerCase().includes("conversation-blocked") ?? !1);
4128
- function Ue(e) {
4178
+ let Fe = E(), Re = E(!1), He = w(() => Fe.value?.message?.toLowerCase().includes("conversation-blocked") ?? !1);
4179
+ function We(e) {
4129
4180
  try {
4130
4181
  let t = JSON.parse(e.message);
4131
4182
  return t.status === 404 || t.type?.includes("entity-not-found");
@@ -4133,99 +4184,99 @@ function Wa(e) {
4133
4184
  return !1;
4134
4185
  }
4135
4186
  }
4136
- function Ke(e) {
4137
- if (Ue(e) && !I.value) {
4138
- let e = F.value.messages.filter((e) => e.role === "user"), t = e[e.length - 1], n = t ? Ye(t) : void 0;
4139
- w.value = Qt(), Pe.value = void 0, Qe(() => {
4140
- F.value.clearError(), n && F.value.sendMessage({ text: n });
4187
+ function qe(e) {
4188
+ if (We(e) && !F.value) {
4189
+ let e = P.value.messages.filter((e) => e.role === "user"), t = e[e.length - 1], n = t ? Xe(t) : void 0;
4190
+ C.value = $t(), Fe.value = void 0, $e(() => {
4191
+ P.value.clearError(), n && P.value.sendMessage({ text: n });
4141
4192
  });
4142
- } else Xe.error(e), Pe.value = e, Ve.value && (Le.value = !0);
4193
+ } else Ze.error(e), Fe.value = e, He.value && (Re.value = !0);
4143
4194
  }
4144
- let E = T(() => ze({
4195
+ let T = w(() => Be({
4145
4196
  baseUrl: i.value,
4146
4197
  basePath: a.value,
4147
4198
  headers: () => p.value
4148
- })), Ze = D(null), tt = () => ({
4149
- ...st(),
4150
- ...Ze.value ?? {}
4151
- }), nt = () => {
4152
- let e = ge.value;
4199
+ })), Qe = E(null), nt = () => ({
4200
+ ...ct(),
4201
+ ...Qe.value ?? {}
4202
+ }), rt = () => {
4203
+ let e = _e.value;
4153
4204
  return new Promise((t) => {
4154
4205
  let n = setTimeout(() => {
4155
4206
  r(), t(!1);
4156
- }, 3e4), r = k(() => [ge.value, F.value.status], ([i, a]) => {
4207
+ }, 3e4), r = O(() => [_e.value, P.value.status], ([i, a]) => {
4157
4208
  i > e && a === "streaming" && (clearTimeout(n), r(), t(!0));
4158
4209
  });
4159
4210
  });
4160
- }, A = O(), ut = (e, t) => new Promise((n) => {
4161
- A.value?.answer(!1), A.value = {
4211
+ }, k = D(), dt = (e, t) => new Promise((n) => {
4212
+ k.value?.answer(!1), k.value = {
4162
4213
  toolCallId: e.toolCallId,
4163
4214
  question: t?.question,
4164
4215
  details: t?.details,
4165
4216
  unchanged: t?.unchanged,
4166
4217
  answer: (e) => {
4167
- A.value = void 0, n(e);
4218
+ k.value = void 0, n(e);
4168
4219
  }
4169
4220
  };
4170
4221
  });
4171
- function mt(e) {
4172
- A.value?.answer(e);
4222
+ function ht(e) {
4223
+ k.value?.answer(e);
4173
4224
  }
4174
- let ht = (e, t) => {
4175
- t.details?.some((e) => e.before !== void 0) && (me.value = {
4176
- ...me.value,
4225
+ let gt = (e, t) => {
4226
+ t.details?.some((e) => e.before !== void 0) && (he.value = {
4227
+ ...he.value,
4177
4228
  [e.toolCallId]: {
4178
4229
  details: t.details,
4179
4230
  unchanged: t.unchanged
4180
4231
  }
4181
4232
  });
4182
- }, j = ({ forms: e }) => ae.value && Ce.value.length ? {
4233
+ }, A = ({ forms: e }) => oe.value && we.value.length ? {
4183
4234
  version: 1,
4184
- features: [...He],
4185
- forms: e ? we().map(({ name: e, description: t, inputSchema: n, annotations: r }) => ({
4235
+ features: [...Ue],
4236
+ forms: e ? Te().map(({ name: e, description: t, inputSchema: n, annotations: r }) => ({
4186
4237
  name: e,
4187
4238
  description: t,
4188
4239
  inputSchema: n,
4189
4240
  annotations: r
4190
4241
  })) : []
4191
- } : void 0, gt = (e) => {
4242
+ } : void 0, _t = (e) => {
4192
4243
  if (e?.provider !== "page") {
4193
- le.value = void 0;
4244
+ ue.value = void 0;
4194
4245
  return;
4195
4246
  }
4196
- let t = [...Ce.value, ...we()].find((t) => t.name === e.toolName), n;
4247
+ let t = [...we.value, ...Te()].find((t) => t.name === e.toolName), n;
4197
4248
  try {
4198
4249
  n = t?.describe?.(e.input);
4199
4250
  } catch {
4200
4251
  n = void 0;
4201
4252
  }
4202
- n && (pe.value = {
4203
- ...pe.value,
4253
+ n && (me.value = {
4254
+ ...me.value,
4204
4255
  [e.toolCallId]: n
4205
- }), e.readOnly ? le.value = void 0 : (le.value = { title: n ?? t?.annotations?.title ?? e.toolName }, he.value = !0);
4206
- }, _t = pt({
4256
+ }), e.readOnly ? ue.value = void 0 : (ue.value = { title: n ?? t?.annotations?.title ?? e.toolName }, ge.value = !0);
4257
+ }, vt = mt({
4207
4258
  registry: () => [
4208
- ...(ne.value ?? []).filter((e) => !We(e.name)),
4209
- ...Ce.value,
4210
- ...we()
4259
+ ...(re.value ?? []).filter((e) => !Ge(e.name)),
4260
+ ...we.value,
4261
+ ...Te()
4211
4262
  ],
4212
- capability: () => te.value,
4213
- addToolOutput: (e) => void F.value.addToolOutput(e),
4214
- confirm: ut,
4215
- waitForResume: nt,
4263
+ capability: () => ne.value,
4264
+ addToolOutput: (e) => void P.value.addToolOutput(e),
4265
+ confirm: dt,
4266
+ waitForResume: rt,
4216
4267
  onPendingChange: (e) => {
4217
- re.value = e;
4268
+ ie.value = e;
4218
4269
  },
4219
- onActivity: gt,
4220
- mode: () => Oe.value,
4221
- onSkip: ht
4222
- }), vt = /* @__PURE__ */ new Map(), yt = 0, bt = (e, t) => {
4223
- let n = vt.get(e);
4224
- vt.delete(e), n?.(JSON.stringify(t));
4225
- }, xt = pt({
4226
- registry: () => Ce.value,
4227
- capability: () => te.value,
4228
- addToolOutput: (e) => bt(e.toolCallId, "output" in e ? e.output : {
4270
+ onActivity: _t,
4271
+ mode: () => ke.value,
4272
+ onSkip: gt
4273
+ }), yt = /* @__PURE__ */ new Map(), bt = 0, xt = (e, t) => {
4274
+ let n = yt.get(e);
4275
+ yt.delete(e), n?.(JSON.stringify(t));
4276
+ }, St = mt({
4277
+ registry: () => we.value,
4278
+ capability: () => ne.value,
4279
+ addToolOutput: (e) => xt(e.toolCallId, "output" in e ? e.output : {
4229
4280
  content: [{
4230
4281
  type: "text",
4231
4282
  text: e.errorText
@@ -4233,42 +4284,42 @@ function Wa(e) {
4233
4284
  isError: !0
4234
4285
  }),
4235
4286
  confirm: async (e, t) => {
4236
- for (; A.value;) await new Promise((e) => {
4237
- let t = k(A, (n) => {
4287
+ for (; k.value;) await new Promise((e) => {
4288
+ let t = O(k, (n) => {
4238
4289
  n || (t(), e());
4239
4290
  });
4240
4291
  });
4241
- return vt.has(e.toolCallId) ? ut(e, t) : !1;
4292
+ return yt.has(e.toolCallId) ? dt(e, t) : !1;
4242
4293
  },
4243
- waitForResume: () => new Promise((e) => setTimeout(() => e(!0), Ea)),
4294
+ waitForResume: () => new Promise((e) => setTimeout(() => e(!0), Ia)),
4244
4295
  onPendingChange: (e) => {
4245
- ie.value = e;
4296
+ ae.value = e;
4246
4297
  },
4247
- onActivity: gt,
4248
- mode: () => St
4249
- }), St = "manual";
4250
- function Ct() {
4251
- St = Oe.value;
4252
- let e = j({ forms: !1 });
4298
+ onActivity: _t,
4299
+ mode: () => Ct
4300
+ }), Ct = "manual";
4301
+ function wt() {
4302
+ Ct = ke.value;
4303
+ let e = A({ forms: !1 });
4253
4304
  if (e) return {
4254
4305
  declaration: e,
4255
- clientTools: Object.fromEntries(Ce.value.map((e) => [e.name, (t) => new Promise((n) => {
4256
- yt += 1;
4257
- let r = `page-call-${yt}`;
4258
- vt.set(r, n), xt.enqueue({
4306
+ clientTools: Object.fromEntries(we.value.map((e) => [e.name, (t) => new Promise((n) => {
4307
+ bt += 1;
4308
+ let r = `page-call-${bt}`;
4309
+ yt.set(r, n), St.enqueue({
4259
4310
  toolCallId: r,
4260
4311
  toolName: e.name,
4261
4312
  input: t ?? {},
4262
- messageId: zt()?.id ?? "",
4313
+ messageId: Bt()?.id ?? "",
4263
4314
  readOnly: e.annotations?.readOnlyHint === !0,
4264
4315
  provider: "page"
4265
4316
  });
4266
4317
  })]))
4267
4318
  };
4268
4319
  }
4269
- function wt() {
4270
- xt.cancelAll(), A.value && vt.has(A.value.toolCallId) && A.value.answer(!1);
4271
- for (let e of [...vt.keys()]) bt(e, {
4320
+ function Tt() {
4321
+ St.cancelAll(), k.value && yt.has(k.value.toolCallId) && k.value.answer(!1);
4322
+ for (let e of [...yt.keys()]) xt(e, {
4272
4323
  content: [{
4273
4324
  type: "text",
4274
4325
  text: "Stopped by the user."
@@ -4276,34 +4327,34 @@ function Wa(e) {
4276
4327
  isError: !0
4277
4328
  });
4278
4329
  }
4279
- async function Tt() {
4280
- Et(), wt(), le.value = void 0, he.value = !1, W.value = "", await F.value.stop();
4330
+ async function Et() {
4331
+ Dt(), Tt(), ue.value = void 0, ge.value = !1, U.value = "", await P.value.stop();
4281
4332
  }
4282
- function Et() {
4283
- _t.cancelAll(), A.value && !vt.has(A.value.toolCallId) && A.value.answer(!1);
4333
+ function Dt() {
4334
+ vt.cancelAll(), k.value && !yt.has(k.value.toolCallId) && k.value.answer(!1);
4284
4335
  }
4285
- async function Dt(e) {
4286
- Se.value = e, e && await Tt();
4336
+ async function Ot(e) {
4337
+ Ce.value = e, e && await Et();
4287
4338
  }
4288
- k(w, () => Et(), { flush: "sync" });
4289
- let Ot = !1, M, kt = D(), At, jt = D([]), N = D([]), P = D([]), Mt = D({}), Nt = /* @__PURE__ */ new Map(), Pt = /* @__PURE__ */ new Set();
4290
- function Ft(e, t, n) {
4291
- N.value.includes(e) || (N.value = [...N.value, e]), Nt.set(e, Date.now()), n ? Pt.add(e) : Pt.delete(e), t && (Mt.value = {
4292
- ...Mt.value,
4339
+ O(C, () => Dt(), { flush: "sync" });
4340
+ let kt = !1, j, At = E(), jt, Mt = E([]), M = E([]), N = E([]), Nt = E({}), Pt = /* @__PURE__ */ new Map(), Ft = /* @__PURE__ */ new Set();
4341
+ function It(e, t, n) {
4342
+ M.value.includes(e) || (M.value = [...M.value, e]), Pt.set(e, Date.now()), n ? Ft.add(e) : Ft.delete(e), t && (Nt.value = {
4343
+ ...Nt.value,
4293
4344
  [e]: t
4294
4345
  }), nr || ar();
4295
4346
  }
4296
- function It(e) {
4297
- Mt.value = Object.fromEntries(Object.entries(Mt.value).filter(([t]) => t !== e));
4298
- }
4299
4347
  function Lt(e) {
4300
- Nt.delete(e), N.value = N.value.filter((t) => t !== e), P.value = P.value.filter((t) => t !== e), It(e);
4348
+ Nt.value = Object.fromEntries(Object.entries(Nt.value).filter(([t]) => t !== e));
4349
+ }
4350
+ function Rt(e) {
4351
+ Pt.delete(e), M.value = M.value.filter((t) => t !== e), N.value = N.value.filter((t) => t !== e), Lt(e);
4301
4352
  }
4302
- let Rt = wa(() => ({
4303
- id: w.value,
4304
- transport: new qi({
4305
- api: E.value.getChatEndpoint(o.value, C.value ? "reasoning" : "chat"),
4306
- prepareReconnectToStreamRequest: ({ id: e }) => ({ api: E.value.getChatStreamEndpoint(o.value, e) }),
4353
+ let zt = Pa(() => ({
4354
+ id: C.value,
4355
+ transport: new ra({
4356
+ api: T.value.getChatEndpoint(o.value, S.value ? "reasoning" : "chat"),
4357
+ prepareReconnectToStreamRequest: ({ id: e }) => ({ api: T.value.getChatStreamEndpoint(o.value, e) }),
4307
4358
  prepareSendMessagesRequest: ({ messages: e, id: t }) => ({ body: {
4308
4359
  id: t,
4309
4360
  messages: [e[e.length - 1]],
@@ -4318,61 +4369,61 @@ function Wa(e) {
4318
4369
  reasoning: d.value?.reasoning,
4319
4370
  webSearch: f.value?.webSearch,
4320
4371
  smoothStream: u.value?.smoothStream,
4321
- deviceContext: tt(),
4322
- externalContext: ee.value,
4372
+ deviceContext: nt(),
4373
+ externalContext: te.value,
4323
4374
  disabledTools: f.value?.disabled,
4324
- fallbackModels: y.value,
4325
- gatewayOptions: b.value,
4326
- hostTools: ft(ne.value, te.value),
4327
- pageTools: j({ forms: !0 }),
4328
- ...Zt(t) && { projectId: Zt(t) },
4329
- ...Oe.value === "automatic" && { confirmations: "automatic" }
4375
+ fallbackModels: ee.value,
4376
+ gatewayOptions: y.value,
4377
+ hostTools: pt(re.value, ne.value),
4378
+ pageTools: A({ forms: !0 }),
4379
+ ...Qt(t) && { projectId: Qt(t) },
4380
+ ...ke.value === "automatic" && { confirmations: "automatic" }
4330
4381
  } }),
4331
4382
  credentials: "include",
4332
4383
  headers: () => p.value ?? {}
4333
4384
  }),
4334
- sendAutomaticallyWhen: (e) => !I.value && (Ua(e) || Yi(e)),
4385
+ sendAutomaticallyWhen: (e) => !F.value && ($a(e) || aa(e)),
4335
4386
  onError: (e) => {
4336
- Ot ? Xe.warn(e) : Ke(e);
4387
+ kt ? Ze.warn(e) : qe(e);
4337
4388
  },
4338
4389
  onToolCall: ({ toolCall: e }) => {
4339
- if (!dt(e) || Ot || I.value) return;
4390
+ if (!ft(e) || kt || F.value) return;
4340
4391
  let t = e;
4341
- _t.enqueue({
4392
+ vt.enqueue({
4342
4393
  toolCallId: t.toolCallId,
4343
4394
  toolName: t.toolName,
4344
4395
  input: t.input,
4345
- messageId: zt()?.id ?? "",
4396
+ messageId: Bt()?.id ?? "",
4346
4397
  readOnly: t.toolMetadata?.readOnly === !0,
4347
4398
  provider: t.toolMetadata?.provider === "page" ? "page" : "app"
4348
4399
  });
4349
4400
  },
4350
4401
  onData: (e) => {
4351
- e.type === "data-turnStream" ? At = e.data.streamId : e.type === "data-audioTranscripts" && (F.value.messages = Je(F.value.messages, e.data));
4402
+ e.type === "data-turnStream" ? jt = e.data.streamId : e.type === "data-audioTranscripts" && (P.value.messages = Ye(P.value.messages, e.data));
4352
4403
  },
4353
4404
  onFinish: () => {
4354
- let e = w.value;
4355
- !C.value && !R.value.some((t) => t.id === e) && q(o.value);
4405
+ let e = C.value;
4406
+ !S.value && !L.value.some((t) => t.id === e) && K(o.value);
4356
4407
  }
4357
- })), F = T(() => et(Rt)), zt = () => F.value.messages[F.value.messages.length - 1];
4358
- k(w, (e, t) => {
4359
- if (t && !C.value && (Nn() || M?.chatId === t)) {
4360
- let e = F.value.messages.filter((e) => e.role === "user"), n = e[e.length - 1];
4361
- Ft(t, n ? Ye(n) ?? "" : "", F.value.status === "streaming" || M?.chatId === t);
4408
+ })), P = w(() => tt(zt)), Bt = () => P.value.messages[P.value.messages.length - 1];
4409
+ O(C, (e, t) => {
4410
+ if (t && !S.value && (q() || j?.chatId === t)) {
4411
+ let e = P.value.messages.filter((e) => e.role === "user"), n = e[e.length - 1];
4412
+ It(t, n ? Xe(n) ?? "" : "", P.value.status === "streaming" || j?.chatId === t);
4362
4413
  }
4363
- Lt(e), At = void 0, clearTimeout(Qn), Zn.value = !1, F.value.stop();
4414
+ Rt(e), jt = void 0, clearTimeout(Qn), Zn.value = !1, P.value.stop();
4364
4415
  }, { flush: "sync" });
4365
- let Bt = T(() => {
4416
+ let Vt = w(() => {
4366
4417
  let e = u.value?.initialMessage;
4367
4418
  return e?.[r.value] ? e[r.value] : n("message.defaultAgentWelcome") ? t("message.defaultAgentWelcome") : "";
4368
- }), Vt = Qt(), Ht = T(() => ({
4369
- id: Vt,
4419
+ }), Ht = $t(), Ut = w(() => ({
4420
+ id: Ht,
4370
4421
  role: "assistant",
4371
4422
  parts: [{
4372
4423
  type: "text",
4373
- text: Bt.value
4424
+ text: Vt.value
4374
4425
  }]
4375
- })), Ut = T(() => {
4426
+ })), Wt = w(() => {
4376
4427
  let e = (e) => e.map((e) => e.role !== "user" || !e.parts.some((e) => e.type === "file") ? e : {
4377
4428
  ...e,
4378
4429
  parts: e.parts.map((e) => {
@@ -4382,177 +4433,177 @@ function Wa(e) {
4382
4433
  let e = t.url.slice(13);
4383
4434
  return {
4384
4435
  ...t,
4385
- url: E.value.getMediaUrl(o.value, w.value, e)
4436
+ url: T.value.getMediaUrl(o.value, C.value, e)
4386
4437
  };
4387
4438
  }
4388
4439
  return t.url.startsWith("blob:") ? t : {
4389
4440
  ...t,
4390
- url: E.value.appendAuthToken(t.url)
4441
+ url: T.value.appendAuthToken(t.url)
4391
4442
  };
4392
4443
  })
4393
- }), t = F.value.id === w.value ? F.value.messages : [];
4394
- return C.value ? e(t) : !ve.value && t[0]?.role !== "assistant" ? [Ht.value, ...e(t)] : e(t);
4395
- }), Wt = T(() => {
4444
+ }), t = P.value.id === C.value ? P.value.messages : [];
4445
+ return S.value ? e(t) : !ye.value && t[0]?.role !== "assistant" ? [Ut.value, ...e(t)] : e(t);
4446
+ }), Gt = w(() => {
4396
4447
  let e = u.value?.messagePlaceholder;
4397
4448
  return e?.[r.value] ? e[r.value] : n("placeholder.askAnything") ? t("placeholder.askAnything") : "";
4398
- }), Gt = D(!1), Kt = D();
4399
- function qt(e, t) {
4400
- Kt.value = {
4449
+ }), Kt = E(!1), qt = E();
4450
+ function Jt(e, t) {
4451
+ qt.value = {
4401
4452
  chatId: e,
4402
4453
  authorId: t.authorId,
4403
4454
  projectId: t.projectId ?? void 0
4404
4455
  };
4405
4456
  }
4406
- let Jt = (e) => Kt.value?.chatId === e ? Kt.value : void 0, Yt = T(() => Jt(w.value)?.authorId), Xt = T(() => Jt(w.value)?.projectId), I = T(() => Yt.value !== void 0 && l.value !== void 0 && Yt.value !== l.value), Zt = (e) => {
4407
- let t = Jt(e);
4457
+ let Yt = (e) => qt.value?.chatId === e ? qt.value : void 0, Xt = w(() => Yt(C.value)?.authorId), Zt = w(() => Yt(C.value)?.projectId), F = w(() => Xt.value !== void 0 && l.value !== void 0 && Xt.value !== l.value), Qt = (e) => {
4458
+ let t = Yt(e);
4408
4459
  return t && t.authorId === void 0 ? t.projectId : void 0;
4409
- }, L = () => Gt.value ? { projectId: Re } : void 0, R = D([]), $t = D(!1), en = D(1), tn = D(!1), nn = D(!1), rn, z = D([]), B = D(!1), an = D("chat"), on = D(0), sn = D([]), V = D(), cn = D(!1), ln = D(!1), un = D(), dn = D(!1), fn = D(!1), pn = D(), H = D(""), U = D([]), W = D(""), mn = D(!0), hn = O(), gn = D(0), _n = Fe(T(() => `${o.value}-queue`), {}), vn = T(() => _n.value[w.value] ?? []), G = T(() => !C.value);
4410
- function yn(e, t) {
4411
- let n = Object.fromEntries(Object.entries(_n.value).filter(([t]) => t !== e));
4412
- _n.value = t.length > 0 ? {
4460
+ }, I = () => Kt.value ? { projectId: ze } : void 0, L = E([]), en = E(!1), tn = E(1), nn = E(!1), rn = E(!1), an, R = E([]), z = E(!1), on = E("chat"), sn = E(0), cn = E([]), B = E(), ln = E(!1), un = E(!1), dn = E(), fn = E(!1), pn = E(!1), mn = E(), V = E(""), H = E([]), U = E(""), hn = E(!0), gn = D(), _n = E(0), vn = Ie(w(() => `${o.value}-queue`), {}), yn = w(() => vn.value[C.value] ?? []), W = w(() => !S.value);
4461
+ function bn(e, t) {
4462
+ let n = Object.fromEntries(Object.entries(vn.value).filter(([t]) => t !== e));
4463
+ vn.value = t.length > 0 ? {
4413
4464
  ...n,
4414
4465
  [e]: t
4415
4466
  } : n;
4416
4467
  }
4417
- function bn(e) {
4418
- let t = (_n.value[e] ?? []).join(Ba);
4419
- return yn(e, []), t;
4420
- }
4421
4468
  function xn(e) {
4422
- e && (H.value = H.value ? `${H.value}${Ba}${e}` : e);
4469
+ let t = (vn.value[e] ?? []).join(Xa);
4470
+ return bn(e, []), t;
4423
4471
  }
4424
4472
  function Sn(e) {
4425
- yn(w.value, vn.value.filter((t, n) => n !== e));
4473
+ e && (V.value = V.value ? `${V.value}${Xa}${e}` : e);
4474
+ }
4475
+ function Cn(e) {
4476
+ bn(C.value, yn.value.filter((t, n) => n !== e));
4426
4477
  }
4427
- function K(e) {
4428
- let t = vn.value[e];
4429
- Sn(e), xn(t ?? "");
4478
+ function G(e) {
4479
+ let t = yn.value[e];
4480
+ Cn(e), Sn(t ?? "");
4430
4481
  }
4431
- async function q(e) {
4432
- if (C.value) R.value = [];
4482
+ async function K(e) {
4483
+ if (S.value) L.value = [];
4433
4484
  else {
4434
- $t.value = !0;
4485
+ en.value = !0;
4435
4486
  try {
4436
- let t = await E.value.getConversations(e, l.value, L()), n = new Set(t.map((e) => e.id)), r = N.value.filter((e) => !n.has(e) && Mt.value[e]).map((t) => ({
4487
+ let t = await T.value.getConversations(e, l.value, I()), n = new Set(t.map((e) => e.id)), r = M.value.filter((e) => !n.has(e) && Nt.value[e]).map((t) => ({
4437
4488
  id: t,
4438
4489
  agentId: e,
4439
- title: Mt.value[t],
4490
+ title: Nt.value[t],
4440
4491
  summary: null,
4441
4492
  messages: [],
4442
4493
  lastMessageAt: /* @__PURE__ */ new Date()
4443
4494
  })), i = `${e}:${l.value ?? ""}`;
4444
- i !== rn && (en.value = 1);
4445
- let a = new Set(r.map((e) => e.id)), o = en.value > 1 ? R.value.filter((e) => !n.has(e.id) && !a.has(e.id)) : [];
4446
- R.value = [
4495
+ i !== an && (tn.value = 1);
4496
+ let a = new Set(r.map((e) => e.id)), o = tn.value > 1 ? L.value.filter((e) => !n.has(e.id) && !a.has(e.id)) : [];
4497
+ L.value = [
4447
4498
  ...r,
4448
4499
  ...t,
4449
4500
  ...o
4450
- ], rn = i, en.value === 1 && (tn.value = t.length >= 100);
4501
+ ], an = i, tn.value === 1 && (nn.value = t.length >= 100);
4451
4502
  } catch {
4452
- R.value = [], en.value = 1, rn = void 0, tn.value = !1;
4503
+ L.value = [], tn.value = 1, an = void 0, nn.value = !1;
4453
4504
  return;
4454
4505
  } finally {
4455
- $t.value = !1;
4506
+ en.value = !1;
4456
4507
  }
4457
- sr([.../* @__PURE__ */ new Set([...er(), ...R.value.map((e) => e.id)])]);
4508
+ sr([.../* @__PURE__ */ new Set([...er(), ...L.value.map((e) => e.id)])]);
4458
4509
  }
4459
4510
  }
4460
- async function Cn() {
4461
- if (!tn.value || nn.value || C.value) return;
4462
- nn.value = !0;
4463
- let e = rn;
4511
+ async function wn() {
4512
+ if (!nn.value || rn.value || S.value) return;
4513
+ rn.value = !0;
4514
+ let e = an;
4464
4515
  try {
4465
- let t = en.value + 1, n = await E.value.getConversations(o.value, l.value, {
4466
- ...L(),
4516
+ let t = tn.value + 1, n = await T.value.getConversations(o.value, l.value, {
4517
+ ...I(),
4467
4518
  page: t
4468
4519
  });
4469
- if (e !== rn) return;
4470
- let r = new Set(R.value.map((e) => e.id));
4471
- R.value = [...R.value, ...n.filter((e) => !r.has(e.id))], en.value = t, tn.value = n.length >= 100;
4520
+ if (e !== an) return;
4521
+ let r = new Set(L.value.map((e) => e.id));
4522
+ L.value = [...L.value, ...n.filter((e) => !r.has(e.id))], tn.value = t, nn.value = n.length >= 100;
4472
4523
  } catch {} finally {
4473
- nn.value = !1;
4524
+ rn.value = !1;
4474
4525
  }
4475
4526
  }
4476
- async function wn(e) {
4477
- return C.value ? [] : E.value.getConversations(o.value, l.value, { search: e });
4527
+ async function Tn(e) {
4528
+ return S.value ? [] : T.value.getConversations(o.value, l.value, { search: e });
4478
4529
  }
4479
- async function Tn() {
4480
- let e = w.value;
4481
- if (!e) z.value = [];
4530
+ async function En() {
4531
+ let e = C.value;
4532
+ if (!e) R.value = [];
4482
4533
  else {
4483
- B.value = !0;
4534
+ z.value = !0;
4484
4535
  try {
4485
- z.value = await E.value.getChatFiles(e);
4536
+ R.value = await T.value.getChatFiles(e);
4486
4537
  } catch {
4487
- z.value = [];
4538
+ R.value = [];
4488
4539
  } finally {
4489
- B.value = !1;
4540
+ z.value = !1;
4490
4541
  }
4491
4542
  }
4492
4543
  }
4493
- function En(e, t = !1) {
4494
- return E.value.getChatFileDownloadUrl(e, t);
4544
+ function Dn(e, t = !1) {
4545
+ return T.value.getChatFileDownloadUrl(e, t);
4495
4546
  }
4496
- function Dn(e) {
4497
- return E.value.getChatFilePreviewUrl(e);
4547
+ function On(e) {
4548
+ return T.value.getChatFilePreviewUrl(e);
4498
4549
  }
4499
- async function On(e) {
4500
- await E.value.deleteChatFile(e);
4501
- let t = z.value.find((t) => t.documentId === e), n = t?.kind === "spreadsheet" ? t.sourceAttachmentId ?? t.documentId : void 0;
4502
- z.value = z.value.filter((t) => t.documentId !== e && (!n || t.documentId !== n && t.sourceAttachmentId !== n));
4550
+ async function kn(e) {
4551
+ await T.value.deleteChatFile(e);
4552
+ let t = R.value.find((t) => t.documentId === e), n = t?.kind === "spreadsheet" ? t.sourceAttachmentId ?? t.documentId : void 0;
4553
+ R.value = R.value.filter((t) => t.documentId !== e && (!n || t.documentId !== n && t.sourceAttachmentId !== n));
4503
4554
  }
4504
- async function kn(e, t) {
4505
- if (!C.value) try {
4506
- let n = await E.value.getChat(e, t);
4507
- if (t !== w.value || (n && qt(t, {
4555
+ async function An(e, t) {
4556
+ if (!S.value) try {
4557
+ let n = await T.value.getChat(e, t);
4558
+ if (t !== C.value || (n && Jt(t, {
4508
4559
  authorId: n.userId,
4509
4560
  projectId: n.projectId
4510
- }), F.value.status !== "ready" || F.value.messages.length > 0)) return;
4511
- n && (F.value.messages = n.messages, Le.value = n.blocked ?? !1, An(e, t, n.turnInProgress === !0));
4561
+ }), P.value.status !== "ready" || P.value.messages.length > 0)) return;
4562
+ n && (P.value.messages = n.messages, Re.value = n.blocked ?? !1, jn(e, t, n.turnInProgress === !0));
4512
4563
  } catch {}
4513
4564
  }
4514
- async function An(e, t, n) {
4515
- n && (await jn(t), t !== w.value || Nn()) || (await Mn(e, t), t === w.value && await Ln());
4565
+ async function jn(e, t, n) {
4566
+ n && (await Mn(t), t !== C.value || q()) || (await Nn(e, t), t === C.value && await Ln());
4516
4567
  }
4517
- async function jn(e) {
4568
+ async function Mn(e) {
4518
4569
  let t = { chatId: e };
4519
- M = t, kt.value = e;
4520
- let n = () => M === t && e === w.value, r = Date.now() + Ma;
4570
+ j = t, At.value = e;
4571
+ let n = () => j === t && e === C.value, r = Date.now() + Ha;
4521
4572
  try {
4522
- for (; n() && !Nn() && Date.now() < r;) {
4523
- Ot = !0;
4573
+ for (; n() && !q() && Date.now() < r;) {
4574
+ kt = !0;
4524
4575
  try {
4525
- await F.value.resumeStream();
4576
+ await P.value.resumeStream();
4526
4577
  } finally {
4527
- Ot = !1;
4578
+ kt = !1;
4528
4579
  }
4529
4580
  if (!n()) return;
4530
- F.value.clearError();
4531
- let t = await E.value.getChat(o.value, e).catch(() => null);
4532
- if (!t || !n() || Nn()) return;
4581
+ P.value.clearError();
4582
+ let t = await T.value.getChat(o.value, e).catch(() => null);
4583
+ if (!t || !n() || q()) return;
4533
4584
  if (!t.turnInProgress) {
4534
- F.value.messages = t.messages;
4585
+ P.value.messages = t.messages;
4535
4586
  return;
4536
4587
  }
4537
- await new Promise((e) => setTimeout(e, Na));
4588
+ await new Promise((e) => setTimeout(e, Ua));
4538
4589
  }
4539
4590
  } finally {
4540
- M === t && (M = void 0, kt.value = void 0);
4591
+ j === t && (j = void 0, At.value = void 0);
4541
4592
  }
4542
4593
  }
4543
- async function Mn(e, t) {
4594
+ async function Nn(e, t) {
4544
4595
  let n;
4545
4596
  try {
4546
- n = Number(sessionStorage.getItem(lt)), sessionStorage.removeItem(lt);
4597
+ n = Number(sessionStorage.getItem(ut)), sessionStorage.removeItem(ut);
4547
4598
  } catch {
4548
4599
  return;
4549
4600
  }
4550
- if (!(!n || Date.now() - n > 6e4 || Se.value)) for (let n = 0; n < 12; n++) {
4551
- let n = F.value.messages[F.value.messages.length - 1];
4601
+ if (!(!n || Date.now() - n > 6e4 || Ce.value)) for (let n = 0; n < 12; n++) {
4602
+ let n = P.value.messages[P.value.messages.length - 1];
4552
4603
  if (n?.role === "assistant") {
4553
- let e = n.parts.filter((e) => qe(e) && e.state === "input-available"), t = e.filter((e) => e.toolMetadata?.provider === "page" && e.toolMetadata.readOnly === !0);
4604
+ let e = n.parts.filter((e) => Je(e) && e.state === "input-available"), t = e.filter((e) => e.toolMetadata?.provider === "page" && e.toolMetadata.readOnly === !0);
4554
4605
  if (e.length > 0) {
4555
- if (t.length === e.length && !Se.value) for (let e of t) _t.enqueue({
4606
+ if (t.length === e.length && !Ce.value) for (let e of t) vt.enqueue({
4556
4607
  toolCallId: e.toolCallId,
4557
4608
  toolName: e.toolName,
4558
4609
  input: e.input,
@@ -4564,33 +4615,33 @@ function Wa(e) {
4564
4615
  }
4565
4616
  if (n.parts[n.parts.length - 1]?.type === "text") return;
4566
4617
  }
4567
- if (await new Promise((e) => setTimeout(e, 1500)), t !== w.value || F.value.status !== "ready") return;
4618
+ if (await new Promise((e) => setTimeout(e, 1500)), t !== C.value || P.value.status !== "ready") return;
4568
4619
  try {
4569
- let n = await E.value.getChat(e, t);
4570
- n && t === w.value && (F.value.messages = n.messages);
4620
+ let n = await T.value.getChat(e, t);
4621
+ n && t === C.value && (P.value.messages = n.messages);
4571
4622
  } catch {
4572
4623
  return;
4573
4624
  }
4574
4625
  }
4575
4626
  }
4576
- let Nn = () => {
4577
- let e = F.value.status;
4627
+ let q = () => {
4628
+ let e = P.value.status;
4578
4629
  return e === "submitted" || e === "streaming";
4579
- }, Pn = () => Nn() || M?.chatId === w.value || re.value > 0, Fn = () => {
4580
- let e = zt();
4581
- return A.value !== void 0 || Da(e) || Ha(e);
4630
+ }, Pn = () => q() || j?.chatId === C.value || ie.value > 0, Fn = () => {
4631
+ let e = Bt();
4632
+ return k.value !== void 0 || La(e) || Qa(e);
4582
4633
  }, In = /* @__PURE__ */ new Set();
4583
4634
  async function Ln() {
4584
- let e = w.value;
4585
- if (!(In.has(e) || vn.value.length === 0 || Pn() || Pe.value)) {
4586
- if (Fn()) xn(bn(e));
4635
+ let e = C.value;
4636
+ if (!(In.has(e) || yn.value.length === 0 || Pn() || Fe.value)) {
4637
+ if (Fn()) Sn(xn(e));
4587
4638
  else {
4588
4639
  In.add(e);
4589
4640
  try {
4590
- let t = Date.now() + La;
4591
- for (; Date.now() < t && (await Promise.race([E.value.getRunningTurns(o.value, [e]).catch(() => []), new Promise((t) => setTimeout(() => t([e]), za))])).includes(e);) await new Promise((e) => setTimeout(e, Ra));
4592
- if (e !== w.value || Pn()) return;
4593
- let n = bn(e);
4641
+ let t = Date.now() + qa;
4642
+ for (; Date.now() < t && (await Promise.race([T.value.getRunningTurns(o.value, [e]).catch(() => []), new Promise((t) => setTimeout(() => t([e]), Ya))])).includes(e);) await new Promise((e) => setTimeout(e, Ja));
4643
+ if (e !== C.value || Pn()) return;
4644
+ let n = xn(e);
4594
4645
  n && qn(n);
4595
4646
  } finally {
4596
4647
  In.delete(e);
@@ -4600,66 +4651,66 @@ function Wa(e) {
4600
4651
  }
4601
4652
  let Rn = 0, zn = 0;
4602
4653
  async function Bn() {
4603
- if (C.value || Nn()) return "indeterminate";
4604
- let e = w.value, t = Rn += 1;
4654
+ if (S.value || q()) return "indeterminate";
4655
+ let e = C.value, t = Rn += 1;
4605
4656
  try {
4606
- let n = await E.value.getChat(o.value, e);
4607
- if (!n || e !== w.value || Nn() || t <= zn) return "indeterminate";
4657
+ let n = await T.value.getChat(o.value, e);
4658
+ if (!n || e !== C.value || q() || t <= zn) return "indeterminate";
4608
4659
  zn = t;
4609
- let r = n.messages, i = ja(r, F.value.messages);
4610
- return F.value.messages = [...r, ...i], Le.value = n.blocked ?? !1, i.length > 0 ? "pending" : "caught-up";
4660
+ let r = n.messages, i = Va(r, P.value.messages);
4661
+ return P.value.messages = [...r, ...i], Re.value = n.blocked ?? !1, i.length > 0 ? "pending" : "caught-up";
4611
4662
  } catch {}
4612
4663
  return "indeterminate";
4613
4664
  }
4614
4665
  function Vn(e) {
4615
- F.value.messages = [...F.value.messages, e];
4666
+ P.value.messages = [...P.value.messages, e];
4616
4667
  }
4617
4668
  async function Hn(e) {
4618
4669
  try {
4619
- sn.value = await E.value.getMessageFeedbacks(e);
4670
+ cn.value = await T.value.getMessageFeedbacks(e);
4620
4671
  } catch {
4621
- sn.value = [];
4672
+ cn.value = [];
4622
4673
  }
4623
4674
  }
4624
4675
  function Un(e) {
4625
- let t = sn.value.findIndex((t) => t.messageId === e.messageId);
4626
- t >= 0 ? sn.value[t] = e : sn.value.push(e);
4676
+ let t = cn.value.findIndex((t) => t.messageId === e.messageId);
4677
+ t >= 0 ? cn.value[t] = e : cn.value.push(e);
4627
4678
  }
4628
4679
  function Wn(e) {
4629
- let t = Ut.value, n = t.findIndex((t) => t.id === e.id), r = Ye(e) ?? "", i = t.slice(0, n).reverse().find((e) => e.role === "user");
4680
+ let t = Wt.value, n = t.findIndex((t) => t.id === e.id), r = Xe(e) ?? "", i = t.slice(0, n).reverse().find((e) => e.role === "user");
4630
4681
  return {
4631
- userQuestion: Ye(i ?? e) ?? "",
4682
+ userQuestion: Xe(i ?? e) ?? "",
4632
4683
  assistantMessage: r
4633
4684
  };
4634
4685
  }
4635
4686
  async function Gn(e, t) {
4636
4687
  await Promise.all([
4637
- kn(e, t),
4638
- q(e),
4688
+ An(e, t),
4689
+ K(e),
4639
4690
  Hn(t)
4640
- ]), Ze.value || ct((e, t) => E.value.reverseGeocode(e, t, r.value)).then((e) => {
4641
- e && (Ze.value = e);
4691
+ ]), Qe.value || lt((e, t) => T.value.reverseGeocode(e, t, r.value)).then((e) => {
4692
+ e && (Qe.value = e);
4642
4693
  });
4643
4694
  }
4644
4695
  async function Kn() {
4645
- if (I.value || U.value.some((e) => e.state !== "done")) return;
4646
- let e = H.value.trim(), t = U.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
4696
+ if (F.value || H.value.some((e) => e.state !== "done")) return;
4697
+ let e = V.value.trim(), t = H.value.filter((e) => e.state === "done" && e.mediaSource !== void 0).map((e) => ({
4647
4698
  type: "file",
4648
4699
  mediaType: e.mediaSource.mimeType,
4649
4700
  url: e.localUrl,
4650
4701
  filename: e.mediaSource.name,
4651
4702
  providerMetadata: { "8bot": { media: e.mediaSource } }
4652
- })), n = Ae.value ? ue.value : void 0;
4653
- !C.value && Pn() ? e && t.length === 0 && !n && (yn(w.value, [...vn.value, e]), H.value = "") : (C.value && Ut.value.length > 0 && await fr(), qn(e, t, n && { pagePointer: n }), H.value = "", ue.value = void 0, dr());
4703
+ })), n = je.value ? de.value : void 0;
4704
+ !S.value && Pn() ? e && t.length === 0 && !n && (bn(C.value, [...yn.value, e]), V.value = "") : (S.value && Wt.value.length > 0 && await fr(), qn(e, t, n && { pagePointer: n }), V.value = "", de.value = void 0, dr());
4654
4705
  }
4655
4706
  function J(e, t) {
4656
4707
  let n = e.trim();
4657
- return !n || Le.value || I.value || Pn() || F.value.status !== "ready" ? !1 : (qn(n, [], t, { toInput: !1 }), !0);
4708
+ return !n || Re.value || F.value || Pn() || P.value.status !== "ready" ? !1 : (qn(n, [], t, { toInput: !1 }), !0);
4658
4709
  }
4659
4710
  function qn(e, t = [], n, { toInput: r = !0 } = {}) {
4660
- if (I.value) return;
4661
- Et(), W.value = e, mn.value = r, hn.value = r && n && "pagePointer" in n ? n.pagePointer : void 0, gn.value = F.value.messages.length;
4662
- let i = F.value.sendMessage;
4711
+ if (F.value) return;
4712
+ Dt(), U.value = e, hn.value = r, gn.value = r && n && "pagePointer" in n ? n.pagePointer : void 0, _n.value = P.value.messages.length;
4713
+ let i = P.value.sendMessage;
4663
4714
  i({
4664
4715
  text: e,
4665
4716
  files: t.length > 0 ? t : void 0,
@@ -4668,162 +4719,162 @@ function Wa(e) {
4668
4719
  }
4669
4720
  function Jn(e) {
4670
4721
  let t = e.trim();
4671
- if (!t || I.value) return;
4672
- if (F.value.status !== "ready") {
4673
- Xe.warn("[useChatbotStore] sendMessage called before chat is ready. Listen for the \"ready\" event on the widget element.");
4722
+ if (!t || F.value) return;
4723
+ if (P.value.status !== "ready") {
4724
+ Ze.warn("[useChatbotStore] sendMessage called before chat is ready. Listen for the \"ready\" event on the widget element.");
4674
4725
  return;
4675
4726
  }
4676
- let n = F.value.sendMessage;
4677
- Et(), n({ text: t });
4727
+ let n = P.value.sendMessage;
4728
+ Dt(), n({ text: t });
4678
4729
  }
4679
4730
  async function Yn() {
4680
- let e = F.value.messages.slice(gn.value).some((e) => e.parts.some(qe)), t = W.value, n = mn.value, r = hn.value, i = t.length > 0 && !e, a = w.value, s = gn.value, c = M?.chatId === a, l = At, u = bn(a), d = (e = "") => {
4681
- H.value = [
4731
+ let e = P.value.messages.slice(_n.value).some((e) => e.parts.some(Je)), t = U.value, n = hn.value, r = gn.value, i = t.length > 0 && !e, a = C.value, s = _n.value, c = j?.chatId === a, l = jt, u = xn(a), d = (e = "") => {
4732
+ V.value = [
4682
4733
  e,
4683
4734
  u,
4684
- H.value
4685
- ].filter(Boolean).join(Ba);
4686
- }, f = () => a === w.value && !Nn() && gn.value === s ? !1 : (u && yn(a, [u, ..._n.value[a] ?? []]), !0);
4687
- M = void 0, kt.value = void 0, Et(), await F.value.stop();
4688
- let p = C.value || e && !c || await E.value.stopChatTurn(o.value, a, l).catch(() => !0);
4735
+ V.value
4736
+ ].filter(Boolean).join(Xa);
4737
+ }, f = () => a === C.value && !q() && _n.value === s ? !1 : (u && bn(a, [u, ...vn.value[a] ?? []]), !0);
4738
+ j = void 0, At.value = void 0, Dt(), await P.value.stop();
4739
+ let p = S.value || e && !c || await T.value.stopChatTurn(o.value, a, l).catch(() => !0);
4689
4740
  if (!f()) {
4690
4741
  if (c || !p) {
4691
4742
  if (await Bn(), f()) return;
4692
- if (c || F.value.messages.length > gn.value) {
4693
- W.value = "", d();
4743
+ if (c || P.value.messages.length > _n.value) {
4744
+ U.value = "", d();
4694
4745
  return;
4695
4746
  }
4696
4747
  }
4697
- i ? (d(n ? t : ""), ue.value ??= r, F.value.messages = F.value.messages.slice(0, gn.value), W.value = "") : d();
4748
+ i ? (d(n ? t : ""), de.value ??= r, P.value.messages = P.value.messages.slice(0, _n.value), U.value = "") : d();
4698
4749
  }
4699
4750
  }
4700
- k(() => F.value.messages, (e) => {
4701
- let t = A.value?.toolCallId;
4702
- t && !vt.has(t) && !e.some((e) => e.parts.some((e) => e.toolCallId === t)) && Et();
4703
- }), k(() => F.value.status, (e) => {
4704
- e === "submitted" && (ge.value++, At = void 0);
4751
+ O(() => P.value.messages, (e) => {
4752
+ let t = k.value?.toolCallId;
4753
+ t && !yt.has(t) && !e.some((e) => e.parts.some((e) => e.toolCallId === t)) && Dt();
4754
+ }), O(() => P.value.status, (e) => {
4755
+ e === "submitted" && (_e.value++, jt = void 0);
4705
4756
  });
4706
4757
  let Xn;
4707
- k(() => [
4708
- F.value.status,
4709
- re.value,
4710
- ie.value
4758
+ O(() => [
4759
+ P.value.status,
4760
+ ie.value,
4761
+ ae.value
4711
4762
  ], ([e, t, n]) => {
4712
4763
  clearTimeout(Xn), e === "ready" && t === 0 && n === 0 && (Xn = setTimeout(() => {
4713
- he.value = !1;
4764
+ ge.value = !1;
4714
4765
  }, 1500));
4715
4766
  });
4716
- let Zn = D(!1), Qn;
4717
- k(() => !A.value && !Da(zt()) && (Nn() || re.value > 0), (e) => {
4767
+ let Zn = E(!1), Qn;
4768
+ O(() => !k.value && !La(Bt()) && (q() || ie.value > 0), (e) => {
4718
4769
  clearTimeout(Qn), e ? Zn.value = !0 : Qn = setTimeout(() => {
4719
4770
  Zn.value = !1;
4720
4771
  }, 400);
4721
4772
  }, { immediate: !0 });
4722
- let $n = T(() => {
4723
- let e = jt.value.filter((e) => e !== w.value);
4724
- return Zn.value || kt.value === w.value ? [...e, w.value] : e;
4725
- }), er = () => [.../* @__PURE__ */ new Set([...jt.value, ...N.value])], tr = at(), nr, rr = 0, ir = 0;
4773
+ let $n = w(() => {
4774
+ let e = Mt.value.filter((e) => e !== C.value);
4775
+ return Zn.value || At.value === C.value ? [...e, C.value] : e;
4776
+ }), er = () => [.../* @__PURE__ */ new Set([...Mt.value, ...M.value])], tr = ot(), nr, rr = 0, ir = 0;
4726
4777
  function ar() {
4727
4778
  clearTimeout(nr), nr = void 0, er().length !== 0 && tr.value === "visible" && (nr = setTimeout(() => {
4728
4779
  nr = void 0, sr(er());
4729
- }, Pa));
4780
+ }, Wa));
4730
4781
  }
4731
4782
  async function or(e) {
4732
- let t = w.value;
4733
- if (u.value?.nextMessageSuggestion && !C.value && t) try {
4734
- return await E.value.suggestNextMessage(o.value, t, e) ?? void 0;
4783
+ let t = C.value;
4784
+ if (u.value?.nextMessageSuggestion && !S.value && t) try {
4785
+ return await T.value.suggestNextMessage(o.value, t, e) ?? void 0;
4735
4786
  } catch {
4736
4787
  return;
4737
4788
  }
4738
4789
  }
4739
4790
  async function sr(e) {
4740
- let t = e.slice(0, Fa);
4741
- if (C.value || t.length === 0) {
4791
+ let t = e.slice(0, Ga);
4792
+ if (S.value || t.length === 0) {
4742
4793
  ar();
4743
4794
  return;
4744
4795
  }
4745
4796
  let n = rr += 1, r;
4746
4797
  try {
4747
- r = await E.value.getRunningTurns(o.value, t);
4798
+ r = await T.value.getRunningTurns(o.value, t);
4748
4799
  } catch {
4749
4800
  ar();
4750
4801
  return;
4751
4802
  }
4752
4803
  if (n <= ir) return;
4753
4804
  ir = n;
4754
- for (let e of r) Pt.add(e);
4755
- let i = new Set(t), a = er().filter((e) => i.has(e) && !r.includes(e)), s = (e) => N.value.includes(e) && !Pt.has(e), c = a.filter((e) => s(e) && Date.now() - (Nt.get(e) ?? 0) > Ia), l = a.filter((e) => !s(e));
4756
- jt.value = [...jt.value.filter((e) => !i.has(e)), ...r];
4757
- let u = l.filter((e) => N.value.includes(e));
4758
- (u.length > 0 || c.length > 0) && (N.value = N.value.filter((e) => !u.includes(e) && !c.includes(e)), P.value = [...P.value, ...u.filter((e) => e !== w.value && !P.value.includes(e))]), l.length > 0 && q(o.value), ar();
4805
+ for (let e of r) Ft.add(e);
4806
+ let i = new Set(t), a = er().filter((e) => i.has(e) && !r.includes(e)), s = (e) => M.value.includes(e) && !Ft.has(e), c = a.filter((e) => s(e) && Date.now() - (Pt.get(e) ?? 0) > Ka), l = a.filter((e) => !s(e));
4807
+ Mt.value = [...Mt.value.filter((e) => !i.has(e)), ...r];
4808
+ let u = l.filter((e) => M.value.includes(e));
4809
+ (u.length > 0 || c.length > 0) && (M.value = M.value.filter((e) => !u.includes(e) && !c.includes(e)), N.value = [...N.value, ...u.filter((e) => e !== C.value && !N.value.includes(e))]), l.length > 0 && K(o.value), ar();
4759
4810
  }
4760
- k(tr, (e) => {
4811
+ O(tr, (e) => {
4761
4812
  e === "visible" ? sr(er()) : (clearTimeout(nr), nr = void 0);
4762
- }), $e(() => clearTimeout(nr));
4763
- let cr = T(() => P.value.map((e) => ({
4813
+ }), et(() => clearTimeout(nr));
4814
+ let cr = w(() => N.value.map((e) => ({
4764
4815
  chatId: e,
4765
- title: R.value.find((t) => t.id === e)?.title || Mt.value[e] || void 0
4816
+ title: L.value.find((t) => t.id === e)?.title || Nt.value[e] || void 0
4766
4817
  })));
4767
4818
  function lr(e) {
4768
- Lt(e), w.value = e, Lr("chat");
4819
+ Rt(e), C.value = e, Lr("chat");
4769
4820
  }
4770
4821
  function ur(e) {
4771
- P.value = P.value.filter((t) => t !== e), It(e);
4822
+ N.value = N.value.filter((t) => t !== e), Lt(e);
4772
4823
  }
4773
- k(() => [F.value.status, F.value.id], ([e, t], [n, r]) => {
4824
+ O(() => [P.value.status, P.value.id], ([e, t], [n, r]) => {
4774
4825
  if (t === r) {
4775
- if (e === "error") M?.chatId !== w.value && xn(bn(w.value));
4826
+ if (e === "error") j?.chatId !== C.value && Sn(xn(C.value));
4776
4827
  else if (e === "ready" && (n === "streaming" || n === "submitted")) {
4777
4828
  if (Fn()) {
4778
- xn(bn(w.value));
4829
+ Sn(xn(C.value));
4779
4830
  return;
4780
4831
  }
4781
4832
  Ln();
4782
4833
  }
4783
4834
  }
4784
- }), k(re, (e) => {
4785
- e === 0 && F.value.status === "ready" && Ln();
4786
- }), k(() => F.value.status, (e) => {
4787
- e === "ready" && W.value.length > 0 && (W.value = "");
4835
+ }), O(ie, (e) => {
4836
+ e === 0 && P.value.status === "ready" && Ln();
4837
+ }), O(() => P.value.status, (e) => {
4838
+ e === "ready" && U.value.length > 0 && (U.value = "");
4788
4839
  });
4789
4840
  function dr(e = !1) {
4790
- for (let t of U.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
4791
- U.value = [], br.value = null;
4841
+ for (let t of H.value) (e || t.state !== "done") && URL.revokeObjectURL(t.localUrl);
4842
+ H.value = [], br.value = null;
4792
4843
  }
4793
4844
  async function fr(e) {
4794
4845
  let t = typeof e?.projectId == "string" ? e.projectId : void 0;
4795
- return W.value = "", pe.value = {}, me.value = {}, w.value = Qt(), qt(w.value, { projectId: t }), await Qe(), F.value.clearError(), Pe.value = void 0, Le.value = !1, dr(!0), Lr("chat"), w.value;
4846
+ return U.value = "", me.value = {}, he.value = {}, C.value = $t(), Jt(C.value, { projectId: t }), await $e(), P.value.clearError(), Fe.value = void 0, Re.value = !1, dr(!0), Lr("chat"), C.value;
4796
4847
  }
4797
4848
  async function Y(e) {
4798
- I.value || (F.value.status !== "ready" && (W.value = "", await Yn()), Et(), await F.value.regenerate(e));
4849
+ F.value || (P.value.status !== "ready" && (U.value = "", await Yn()), Dt(), await P.value.regenerate(e));
4799
4850
  }
4800
4851
  function pr(e) {
4801
- if (!I.value) {
4852
+ if (!F.value) {
4802
4853
  if (e.tool === "requestGeolocation") {
4803
4854
  let t = e.output;
4804
- "latitude" in t && (Ze.value = {
4855
+ "latitude" in t && (Qe.value = {
4805
4856
  geolocationLatitude: t.latitude,
4806
4857
  geolocationLongitude: t.longitude,
4807
4858
  geolocationAccuracy: t.accuracy,
4808
4859
  geolocationCity: t.city
4809
4860
  });
4810
4861
  }
4811
- F.value.addToolOutput(e);
4862
+ P.value.addToolOutput(e);
4812
4863
  }
4813
4864
  }
4814
4865
  function mr(e) {
4815
- I.value || F.value.addToolApprovalResponse(e);
4866
+ F.value || P.value.addToolApprovalResponse(e);
4816
4867
  }
4817
- let hr = T(() => F.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), gr = T(() => _.value?.maxFilesPerMessage ?? 5), _r = T(() => _.value?.maxFilesPerChat ?? 20), vr = T(() => Math.max(0, Math.min(gr.value - U.value.length, _r.value - hr.value - U.value.length))), yr = T(() => vr.value <= 0), br = D(null), xr = () => {
4868
+ let hr = w(() => P.value.messages.reduce((e, t) => e + t.parts.filter((e) => e.type === "file").length, 0)), gr = w(() => _.value?.maxFilesPerMessage ?? 5), _r = w(() => _.value?.maxFilesPerChat ?? 20), vr = w(() => Math.max(0, Math.min(gr.value - H.value.length, _r.value - hr.value - H.value.length))), yr = w(() => vr.value <= 0), br = E(null), xr = () => {
4818
4869
  br.value = null;
4819
4870
  };
4820
- k(yr, (e) => {
4871
+ O(yr, (e) => {
4821
4872
  e || (br.value = null);
4822
4873
  });
4823
4874
  async function Sr(e) {
4824
- if (I.value) return;
4875
+ if (F.value) return;
4825
4876
  if (yr.value) {
4826
- br.value = _r.value - hr.value - U.value.length <= gr.value - U.value.length ? {
4877
+ br.value = _r.value - hr.value - H.value.length <= gr.value - H.value.length ? {
4827
4878
  reason: "per-chat",
4828
4879
  max: _r.value
4829
4880
  } : {
@@ -4833,18 +4884,18 @@ function Wa(e) {
4833
4884
  return;
4834
4885
  }
4835
4886
  let t = Tr(e);
4836
- U.value = [...U.value, t], await Er(t);
4887
+ H.value = [...H.value, t], await Er(t);
4837
4888
  }
4838
4889
  async function Cr(e, t) {
4839
- let n = U.value.find((t) => t.id === e.id);
4890
+ let n = H.value.find((t) => t.id === e.id);
4840
4891
  if (!n) return;
4841
4892
  URL.revokeObjectURL(n.localUrl);
4842
4893
  let r = Tr(t);
4843
- U.value = U.value.map((e) => e.id === n.id ? r : e), await Promise.all([Dr(n), Er(r)]);
4894
+ H.value = H.value.map((e) => e.id === n.id ? r : e), await Promise.all([Dr(n), Er(r)]);
4844
4895
  }
4845
4896
  async function wr(e) {
4846
- let t = U.value.find((t) => t.id === e.id && t.state === "error");
4847
- t && (U.value = U.value.map((e) => e.id === t.id ? {
4897
+ let t = H.value.find((t) => t.id === e.id && t.state === "error");
4898
+ t && (H.value = H.value.map((e) => e.id === t.id ? {
4848
4899
  ...e,
4849
4900
  state: "uploading",
4850
4901
  error: void 0
@@ -4852,7 +4903,7 @@ function Wa(e) {
4852
4903
  }
4853
4904
  function Tr(e) {
4854
4905
  return {
4855
- id: Qt(),
4906
+ id: $t(),
4856
4907
  file: e,
4857
4908
  localUrl: URL.createObjectURL(e),
4858
4909
  state: "uploading"
@@ -4860,19 +4911,19 @@ function Wa(e) {
4860
4911
  }
4861
4912
  async function Er({ id: e, file: t }) {
4862
4913
  try {
4863
- let n = await E.value.uploadMedia(o.value, w.value, t);
4864
- if (!U.value.some((t) => t.id === e)) {
4914
+ let n = await T.value.uploadMedia(o.value, C.value, t);
4915
+ if (!H.value.some((t) => t.id === e)) {
4865
4916
  await Or(n);
4866
4917
  return;
4867
4918
  }
4868
- U.value = U.value.map((t) => t.id === e ? {
4919
+ H.value = H.value.map((t) => t.id === e ? {
4869
4920
  ...t,
4870
4921
  state: "done",
4871
4922
  mediaSource: n
4872
4923
  } : t);
4873
4924
  } catch (t) {
4874
4925
  let n = t instanceof Error ? t.message : "Upload failed";
4875
- U.value = U.value.map((t) => t.id === e ? {
4926
+ H.value = H.value.map((t) => t.id === e ? {
4876
4927
  ...t,
4877
4928
  state: "error",
4878
4929
  error: n
@@ -4884,14 +4935,14 @@ function Wa(e) {
4884
4935
  }
4885
4936
  async function Or(e) {
4886
4937
  try {
4887
- await E.value.discardMedia(e);
4938
+ await T.value.discardMedia(e);
4888
4939
  } catch {}
4889
4940
  }
4890
4941
  async function kr(e, t) {
4891
4942
  let { userQuestion: n, assistantMessage: r } = Wn(e);
4892
- Un(await E.value.submitMessageFeedback({
4943
+ Un(await T.value.submitMessageFeedback({
4893
4944
  messageId: e.id,
4894
- chatId: w.value,
4945
+ chatId: C.value,
4895
4946
  agentId: o.value,
4896
4947
  vote: t,
4897
4948
  userQuestion: n,
@@ -4905,71 +4956,71 @@ function Wa(e) {
4905
4956
  await kr(e, "downvote");
4906
4957
  }
4907
4958
  function Mr(e) {
4908
- ln.value = !1, un.value = void 0, V.value = e;
4959
+ un.value = !1, dn.value = void 0, B.value = e;
4909
4960
  }
4910
4961
  async function Nr(e) {
4911
- if (V.value) try {
4912
- cn.value = !0, ln.value = !1, un.value = void 0;
4913
- let { userQuestion: t, assistantMessage: n } = Wn(V.value);
4914
- Un(await E.value.submitMessageFeedback({
4915
- messageId: V.value.id,
4916
- chatId: w.value,
4962
+ if (B.value) try {
4963
+ ln.value = !0, un.value = !1, dn.value = void 0;
4964
+ let { userQuestion: t, assistantMessage: n } = Wn(B.value);
4965
+ Un(await T.value.submitMessageFeedback({
4966
+ messageId: B.value.id,
4967
+ chatId: C.value,
4917
4968
  agentId: o.value,
4918
4969
  userQuestion: t,
4919
4970
  assistantMessage: n,
4920
4971
  comment: e
4921
- })), ln.value = !0, await Hn(w.value);
4972
+ })), un.value = !0, await Hn(C.value);
4922
4973
  } catch {
4923
- un.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
4974
+ dn.value = n("message.feedbackSubmitError") ? t("message.feedbackSubmitError") : "Failed to submit feedback";
4924
4975
  } finally {
4925
- cn.value = !1;
4976
+ ln.value = !1;
4926
4977
  }
4927
4978
  }
4928
4979
  async function Pr(e) {
4929
4980
  try {
4930
- fn.value = !0, dn.value = !1, pn.value = void 0, await E.value.submitLead({
4981
+ pn.value = !0, fn.value = !1, mn.value = void 0, await T.value.submitLead({
4931
4982
  agentId: o.value,
4932
- chatId: w.value,
4983
+ chatId: C.value,
4933
4984
  ...e
4934
- }), dn.value = !0;
4985
+ }), fn.value = !0;
4935
4986
  } catch {
4936
- pn.value = n("message.leadSubmitError") ? t("message.leadSubmitError") : "Failed to submit lead";
4987
+ mn.value = n("message.leadSubmitError") ? t("message.leadSubmitError") : "Failed to submit lead";
4937
4988
  } finally {
4938
- fn.value = !1;
4989
+ pn.value = !1;
4939
4990
  }
4940
4991
  }
4941
4992
  async function Fr(e, t) {
4942
- let n = await E.value.updateChatTitle(o.value, e, t);
4943
- R.value = R.value.map((t) => t.id === e ? {
4993
+ let n = await T.value.updateChatTitle(o.value, e, t);
4994
+ L.value = L.value.map((t) => t.id === e ? {
4944
4995
  ...t,
4945
4996
  title: n.title
4946
4997
  } : t);
4947
4998
  }
4948
4999
  async function Ir(e) {
4949
- await E.value.deleteChat(o.value, e), R.value = R.value.filter((t) => t.id !== e), w.value === e && await fr();
5000
+ await T.value.deleteChat(o.value, e), L.value = L.value.filter((t) => t.id !== e), C.value === e && await fr();
4950
5001
  }
4951
5002
  function Lr(e) {
4952
- an.value = e;
5003
+ on.value = e;
4953
5004
  }
4954
5005
  function Rr() {
4955
- Lr("chat"), on.value++;
5006
+ Lr("chat"), sn.value++;
4956
5007
  }
4957
5008
  let zr;
4958
5009
  function Br(e) {
4959
- let t = () => E.value.getChat(o.value, e);
5010
+ let t = () => T.value.getChat(o.value, e);
4960
5011
  return t().catch(() => t().catch(() => null));
4961
5012
  }
4962
- return k(l, async (e) => {
5013
+ return O(l, async (e) => {
4963
5014
  if (!e || e === zr) return;
4964
5015
  let t = zr;
4965
5016
  if (zr = e, t === void 0) return;
4966
- let n = w.value, r = C.value ? null : await Br(n);
4967
- l.value === e && w.value === n && (r ? (qt(n, {
5017
+ let n = C.value, r = S.value ? null : await Br(n);
5018
+ l.value === e && C.value === n && (r ? (Jt(n, {
4968
5019
  authorId: r.userId,
4969
5020
  projectId: r.projectId
4970
- }), q(o.value)) : (R.value = [], sn.value = [], z.value = [], jt.value = [], N.value = [], P.value = [], Mt.value = {}, await fr(), H.value = ""));
5021
+ }), K(o.value)) : (L.value = [], cn.value = [], R.value = [], Mt.value = [], M.value = [], N.value = [], Nt.value = {}, await fr(), V.value = ""));
4971
5022
  }), {
4972
- apiClient: E,
5023
+ apiClient: T,
4973
5024
  baseUrl: i,
4974
5025
  basePath: a,
4975
5026
  agentId: o,
@@ -4984,96 +5035,96 @@ function Wa(e) {
4984
5035
  revisedAnswers: m,
4985
5036
  model: h,
4986
5037
  actionsInput: g,
4987
- actions: be,
5038
+ actions: xe,
4988
5039
  agentFileUpload: _,
4989
5040
  agentVoice: v,
4990
- fallbackModels: y,
4991
- gatewayOptions: b,
4992
- externalContext: ee,
4993
- agentHostTools: te,
4994
- hostToolRegistry: ne,
4995
- hostToolsPending: re,
4996
- agentPageAccess: ae,
4997
- pageToolRegistry: se,
4998
- pageFormsProvider: ce,
4999
- pageAction: le,
5000
- hostStepTitles: pe,
5001
- hostStepChanges: me,
5002
- pageControlActive: he,
5041
+ fallbackModels: ee,
5042
+ gatewayOptions: y,
5043
+ externalContext: te,
5044
+ agentHostTools: ne,
5045
+ hostToolRegistry: re,
5046
+ hostToolsPending: ie,
5047
+ agentPageAccess: oe,
5048
+ pageToolRegistry: ce,
5049
+ pageFormsProvider: le,
5050
+ pageAction: ue,
5051
+ hostStepTitles: me,
5052
+ hostStepChanges: he,
5053
+ pageControlActive: ge,
5003
5054
  isWorking: Zn,
5004
- stopHostActions: Tt,
5005
- voicePageTools: Ct,
5006
- cancelVoicePageCalls: wt,
5007
- pageNoticeLevel: Me,
5008
- closePageNotice: Ne,
5009
- hostConfirmation: A,
5010
- respondHostConfirmation: mt,
5011
- pageAccessAvailable: Te,
5012
- pageAccessOff: Se,
5013
- setPageAccessOff: Dt,
5014
- agentConfirmations: oe,
5015
- agentSelectionActions: x,
5055
+ stopHostActions: Et,
5056
+ voicePageTools: wt,
5057
+ cancelVoicePageCalls: Tt,
5058
+ pageNoticeLevel: Ne,
5059
+ closePageNotice: Pe,
5060
+ hostConfirmation: k,
5061
+ respondHostConfirmation: ht,
5062
+ pageAccessAvailable: Ee,
5063
+ pageAccessOff: Ce,
5064
+ setPageAccessOff: Ot,
5065
+ agentConfirmations: se,
5066
+ agentSelectionActions: b,
5016
5067
  sendSelection: J,
5017
- confirmationsAvailable: De,
5018
- confirmationMode: Oe,
5019
- setConfirmationMode: ke,
5020
- pagePointer: ue,
5021
- pagePointerStart: de,
5022
- pagePointing: fe,
5023
- pagePointerAvailable: Ae,
5024
- systemTheme: _e,
5025
- hideWelcomeMessage: ve,
5026
- isDark: S,
5027
- chat: F,
5028
- messages: Ut,
5029
- conversations: R,
5030
- isLoadingConversations: $t,
5031
- hasMoreConversations: tn,
5032
- isLoadingMoreConversations: nn,
5033
- chatFiles: z,
5034
- isLoadingChatFiles: B,
5035
- input: H,
5036
- pendingAttachments: U,
5068
+ confirmationsAvailable: Oe,
5069
+ confirmationMode: ke,
5070
+ setConfirmationMode: Ae,
5071
+ pagePointer: de,
5072
+ pagePointerStart: fe,
5073
+ pagePointing: pe,
5074
+ pagePointerAvailable: je,
5075
+ systemTheme: ve,
5076
+ hideWelcomeMessage: ye,
5077
+ isDark: x,
5078
+ chat: P,
5079
+ messages: Wt,
5080
+ conversations: L,
5081
+ isLoadingConversations: en,
5082
+ hasMoreConversations: nn,
5083
+ isLoadingMoreConversations: rn,
5084
+ chatFiles: R,
5085
+ isLoadingChatFiles: z,
5086
+ input: V,
5087
+ pendingAttachments: H,
5037
5088
  isAttachmentLimitReached: yr,
5038
5089
  fileLimitError: br,
5039
- localChatId: w,
5040
- isConversationBlocked: Le,
5041
- inputMessagePlaceholder: Wt,
5042
- chatError: Pe,
5090
+ localChatId: C,
5091
+ isConversationBlocked: Re,
5092
+ inputMessagePlaceholder: Gt,
5093
+ chatError: Fe,
5043
5094
  runningChatIds: $n,
5044
5095
  backgroundAnswers: cr,
5045
5096
  openBackgroundAnswer: lr,
5046
5097
  dismissBackgroundAnswer: ur,
5047
- canQueue: G,
5048
- queuedMessages: vn,
5049
- removeQueuedMessage: Sn,
5050
- editQueuedMessage: K,
5051
- activeView: an,
5052
- inputFocusRequest: on,
5053
- messageFeedbacks: sn,
5054
- feedbackDialogMessage: V,
5055
- isFeedbackSubmitting: cn,
5056
- isFeedbackSubmitted: ln,
5057
- feedbackSubmitError: un,
5058
- isLeadSubmitted: dn,
5059
- isLoadingSubmitLead: fn,
5060
- submitLeadError: pn,
5061
- buildDeviceContext: tt,
5098
+ canQueue: W,
5099
+ queuedMessages: yn,
5100
+ removeQueuedMessage: Cn,
5101
+ editQueuedMessage: G,
5102
+ activeView: on,
5103
+ inputFocusRequest: sn,
5104
+ messageFeedbacks: cn,
5105
+ feedbackDialogMessage: B,
5106
+ isFeedbackSubmitting: ln,
5107
+ isFeedbackSubmitted: un,
5108
+ feedbackSubmitError: dn,
5109
+ isLeadSubmitted: fn,
5110
+ isLoadingSubmitLead: pn,
5111
+ submitLeadError: mn,
5112
+ buildDeviceContext: nt,
5062
5113
  initialize: Gn,
5063
- loadConversations: q,
5064
- loadMoreConversations: Cn,
5065
- projectsEnabled: Gt,
5066
- chatAuthorId: Yt,
5067
- chatProjectId: Xt,
5068
- isReadOnlyChat: I,
5069
- describeChat: qt,
5070
- searchConversations: wn,
5071
- loadChatFiles: Tn,
5114
+ loadConversations: K,
5115
+ loadMoreConversations: wn,
5116
+ projectsEnabled: Kt,
5117
+ chatAuthorId: Xt,
5118
+ chatProjectId: Zt,
5119
+ isReadOnlyChat: F,
5120
+ describeChat: Jt,
5121
+ searchConversations: Tn,
5122
+ loadChatFiles: En,
5072
5123
  refreshMessages: Bn,
5073
5124
  appendMessage: Vn,
5074
- getChatFileUrl: En,
5075
- getChatFilePreviewUrl: Dn,
5076
- deleteChatFile: On,
5125
+ getChatFileUrl: Dn,
5126
+ getChatFilePreviewUrl: On,
5127
+ deleteChatFile: kn,
5077
5128
  handleSubmit: Kn,
5078
5129
  sendMessage: Jn,
5079
5130
  stopGeneration: Yn,
@@ -5099,6 +5150,6 @@ function Wa(e) {
5099
5150
  };
5100
5151
  })();
5101
5152
  }
5102
- export { Qt as a, qi as i, Wa as n, wa as r, Ta as t };
5153
+ export { $t as a, ra as i, eo as n, Pa as r, Fa as t };
5103
5154
 
5104
- //# sourceMappingURL=useChatbotStore-CjFPM9Q5.js.map
5155
+ //# sourceMappingURL=useChatbotStore-BQ9areKD.js.map