@chaibuilder/sdk 4.0.0-beta.43 → 4.0.0-beta.45

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 (125) hide show
  1. package/dist/{2SSKDMRQ-hQZti_AG.js → 2SSKDMRQ-CqsUj10r.js} +2 -2
  2. package/dist/{2SSKDMRQ-BZmyXysb.cjs → 2SSKDMRQ-D12irKaV.cjs} +1 -1
  3. package/dist/{AP7HFJJL-DhBHON6w.js → AP7HFJJL-CEMjieq8.js} +1 -1
  4. package/dist/{AP7HFJJL-DZJbtGey.cjs → AP7HFJJL-CQ1kBXlH.cjs} +1 -1
  5. package/dist/{IconPicker-y7ijQESM.js → IconPicker-CGtjTiWr.js} +1 -1
  6. package/dist/{IconPicker-BTC6tZZE.cjs → IconPicker-CeAu6O-X.cjs} +1 -1
  7. package/dist/{WDYDFRGG-BQXNJif4.cjs → WDYDFRGG-BGBMGOXn.cjs} +1 -1
  8. package/dist/{WDYDFRGG-DT73rUAi.js → WDYDFRGG-Djk7UWh1.js} +2 -2
  9. package/dist/{actions-registery-CqhNZFV3.cjs → actions-registery-B6tt904t.cjs} +18 -18
  10. package/dist/{actions-registery-CMKfEXxX.js → actions-registery-D1v8fvDh.js} +712 -709
  11. package/dist/actions.cjs +1 -1
  12. package/dist/actions.d.ts +135 -0
  13. package/dist/actions.js +7 -6
  14. package/dist/{active-in-another-tab-B_b2Wl-l.cjs → active-in-another-tab-BWn6jTeo.cjs} +1 -1
  15. package/dist/{active-in-another-tab-D5Wsc7po.js → active-in-another-tab-b3dtgwXA.js} +4 -4
  16. package/dist/{add-new-language-page-B37NvHcc.cjs → add-new-language-page-CJgeCgQ_.cjs} +1 -1
  17. package/dist/{add-new-language-page-DgYUSlvF.js → add-new-language-page-DLSJWwTI.js} +3 -3
  18. package/dist/{add-new-page-BLPSZY8N.js → add-new-page-CS8dEOhg.js} +2 -2
  19. package/dist/{add-new-page-CMkPeRMc.cjs → add-new-page-IRS1Ft0d.cjs} +1 -1
  20. package/dist/{ai-panel-default-lang-BJPZtqTZ.cjs → ai-panel-default-lang-BTjr4pC6.cjs} +2 -2
  21. package/dist/{ai-panel-default-lang-q7ibfHDa.js → ai-panel-default-lang-NdhYzpxN.js} +11 -11
  22. package/dist/{ai-panel-other-lang-DO2Pq3eM.js → ai-panel-other-lang-Bj2wYIfM.js} +14 -14
  23. package/dist/{ai-panel-other-lang-CqThrEnR.cjs → ai-panel-other-lang-BpjPfSPX.cjs} +1 -1
  24. package/dist/ai-prompt-input-B8SFfk6N.cjs +1 -0
  25. package/dist/ai-prompt-input-bleYNRnH.js +650 -0
  26. package/dist/{ai-translation-prompt-Ch54mM08.cjs → ai-translation-prompt-D1rNu8P-.cjs} +1 -1
  27. package/dist/{ai-translation-prompt-TUVm5MgK.js → ai-translation-prompt-DHfe6Wzy.js} +1 -1
  28. package/dist/apply-binding-CBSjMYSk.cjs +41 -0
  29. package/dist/{apply-binding-RQRSIe56.js → apply-binding-vAuN-TGV.js} +3 -2
  30. package/dist/{change-password-modal-Cet5GebC.js → change-password-modal-OPNVgWPf.js} +4 -4
  31. package/dist/{change-password-modal-xBIyXsLV.cjs → change-password-modal-pr1urpGi.cjs} +1 -1
  32. package/dist/{code-editor-C8oMJmY_.cjs → code-editor-BVmpIZOt.cjs} +1 -1
  33. package/dist/{code-editor-DvxiAjP6.js → code-editor-BfGHceIq.js} +1 -1
  34. package/dist/{continue-editing-in-this-client-B19gkD98.cjs → continue-editing-in-this-client-B0fhkHm9.cjs} +1 -1
  35. package/dist/{continue-editing-in-this-client-CGd_nIXe.js → continue-editing-in-this-client-BM6Ru46L.js} +2 -2
  36. package/dist/core.cjs +1 -1
  37. package/dist/core.js +18 -18
  38. package/dist/{css-import-modal-JsnFEHuT.cjs → css-import-modal-C9G5pbFd.cjs} +1 -1
  39. package/dist/{css-import-modal-DLLriSUJ.js → css-import-modal-CEQccCmc.js} +1 -1
  40. package/dist/{delete-page-Cc5Z537o.cjs → delete-page-CXRD2fUG.cjs} +1 -1
  41. package/dist/{delete-page-CjdSwdRR.js → delete-page-YGXD04Z1.js} +2 -2
  42. package/dist/{design-token-usage-DCEQ0nFH.cjs → design-token-usage-C5WfKLj-.cjs} +1 -1
  43. package/dist/{design-token-usage-hGL4vi4W.js → design-token-usage-CVPBTF21.js} +8 -8
  44. package/dist/{digital-asset-manager-l1HTU_vW.cjs → digital-asset-manager-BLnvpLiu.cjs} +1 -1
  45. package/dist/{digital-asset-manager-Bb7ESXoQ.js → digital-asset-manager-CC02mA_u.js} +3 -3
  46. package/dist/{duplicate-page-oxFQeRmn.js → duplicate-page-Df3_zMuR.js} +12 -12
  47. package/dist/{duplicate-page-cFYp-bAb.cjs → duplicate-page-N6d80CFF.cjs} +1 -1
  48. package/dist/{dynamic-page-selector-CEHpm0rg.cjs → dynamic-page-selector-CehQLxyZ.cjs} +1 -1
  49. package/dist/{dynamic-page-selector-Brj1zNHl.js → dynamic-page-selector-DDUtutYp.js} +12 -12
  50. package/dist/{image-editor-DhgFpSAR.js → image-editor-CzxSXo-u.js} +1 -1
  51. package/dist/{image-editor-D0A_xctQ.cjs → image-editor-DQ8mQonU.cjs} +1 -1
  52. package/dist/index-DAJ9bufO.cjs +5 -0
  53. package/dist/{index-ZaKz5cWo.cjs → index-DrzR7vXl.cjs} +2 -2
  54. package/dist/{index-CGZjCAyz.js → index-RwAuF_BE.js} +40 -40
  55. package/dist/{index-D2xHSM7d.js → index-nVkLHaAS.js} +1344 -1289
  56. package/dist/{json-diff-viewer-C-H_IWJx.js → json-diff-viewer-CgWyab6R.js} +6 -6
  57. package/dist/{json-diff-viewer-LIr31DRU.cjs → json-diff-viewer-DgcLmglp.cjs} +1 -1
  58. package/dist/{lang-panel-CAcPc81E.js → lang-panel-B95Qvr7o.js} +22 -22
  59. package/dist/{lang-panel-xrs5AMiU.cjs → lang-panel-D1usAgp_.cjs} +1 -1
  60. package/dist/{manage-design-tokens-CT5v3zQJ.js → manage-design-tokens-D2Oz-jVp.js} +2 -2
  61. package/dist/{manage-design-tokens-modal-Rh86m84s.cjs → manage-design-tokens-modal-Gufu9nHL.cjs} +1 -1
  62. package/dist/{manage-design-tokens-modal-C6ZCrth8.js → manage-design-tokens-modal-ZR8PuhWC.js} +2 -2
  63. package/dist/{manage-design-tokens-D2zeiRpA.cjs → manage-design-tokens-sDi2Pdec.cjs} +1 -1
  64. package/dist/{mark-as-template-RDZ4zAWY.cjs → mark-as-template-BN3Ao9n8.cjs} +1 -1
  65. package/dist/{mark-as-template-4VtOICqJ.js → mark-as-template-CzBJQ_nj.js} +2 -2
  66. package/dist/{models-D95ZYr_x.js → models-BCu-p_QK.js} +4 -4
  67. package/dist/{models-5gOsRC56.cjs → models-D0RH2u4C.cjs} +1 -1
  68. package/dist/{nested-path-selector-content-uXvLlVet.js → nested-path-selector-content-Ct80kFX-.js} +1 -1
  69. package/dist/{nested-path-selector-content-CvV4iQ6y.cjs → nested-path-selector-content-DhNCvKp3.cjs} +1 -1
  70. package/dist/{no-language-page-content-SqCm12wz.js → no-language-page-content-CGyfOtV3.js} +4 -4
  71. package/dist/{no-language-page-content-DX7R8GnY.cjs → no-language-page-content-DMxN5AZK.cjs} +1 -1
  72. package/dist/{no-language-page-dialog-BqVCx1Ow.cjs → no-language-page-dialog-5I_REfoR.cjs} +1 -1
  73. package/dist/{no-language-page-dialog-s43OupLf.js → no-language-page-dialog-DJXWLTYK.js} +2 -2
  74. package/dist/{page-creator-6A0cANfE.cjs → page-creator-CGOumc-z.cjs} +1 -1
  75. package/dist/{page-creator-hKMxWP7u.js → page-creator-IQs478pG.js} +3 -3
  76. package/dist/{page-lock-CDP4IhJN.cjs → page-lock-CLZ_Oj1q.cjs} +1 -1
  77. package/dist/{page-lock-CSRmpKr0.js → page-lock-Dx3unkMc.js} +2 -2
  78. package/dist/{page-locked-dialog-Js9XDigU.js → page-locked-dialog-C_JgymA0.js} +15 -15
  79. package/dist/{page-locked-dialog-BOAalIT3.cjs → page-locked-dialog-fTJsy11q.cjs} +1 -1
  80. package/dist/{page-manager-new-BvVol7j6.js → page-manager-new-Cdt2NoSS.js} +29 -29
  81. package/dist/{page-manager-new-DhK74o43.cjs → page-manager-new-yyjdahAJ.cjs} +1 -1
  82. package/dist/{page-manager-search-and-filter-CGZnfZIg.cjs → page-manager-search-and-filter-BQ6yd7_7.cjs} +1 -1
  83. package/dist/{page-manager-search-and-filter-D7aoAp1N.js → page-manager-search-and-filter-kF_V1Kw5.js} +26 -26
  84. package/dist/{page-revisions-content-zatAssu9.js → page-revisions-content-Cf1Cn0wo.js} +24 -24
  85. package/dist/{page-revisions-content-BP1wghI_.cjs → page-revisions-content-DfDZS2ME.cjs} +1 -1
  86. package/dist/pages.cjs +1 -1
  87. package/dist/pages.d.ts +2 -0
  88. package/dist/pages.js +24 -23
  89. package/dist/{publish-pages-content-BvWEkJis.js → publish-pages-content-BLXYr2sJ.js} +23 -23
  90. package/dist/{publish-pages-content-BCkzDZSc.cjs → publish-pages-content-BYPD6vxL.cjs} +1 -1
  91. package/dist/render.cjs +1 -1
  92. package/dist/render.js +2 -2
  93. package/dist/{rte-widget-modal-CQazv0bz.cjs → rte-widget-modal-BwE5wIZa.cjs} +1 -1
  94. package/dist/{rte-widget-modal-D0YHscUT.js → rte-widget-modal-Tj_pS3ql.js} +1 -1
  95. package/dist/{save-to-lib-BBvjMM3Z.cjs → save-to-lib-BZvVC0bb.cjs} +1 -1
  96. package/dist/{save-to-lib-CnKWpb9U.js → save-to-lib-DGONzxBC.js} +62 -62
  97. package/dist/{selected-block-display-BdWPYwVr.js → selected-block-display-CoWqh7BT.js} +11 -11
  98. package/dist/{selected-block-display-D9bDLuNV.cjs → selected-block-display-D1p8khWb.cjs} +1 -1
  99. package/dist/{seo-panel-C2NUYfBh.js → seo-panel-C5_war2g.js} +25 -25
  100. package/dist/{seo-panel-BxN785dG.cjs → seo-panel-DTxo0HRg.cjs} +1 -1
  101. package/dist/{shared-json-ld-DUBQa4Td.js → shared-json-ld-CDQKtky3.js} +46 -46
  102. package/dist/{shared-json-ld-Wgwndrv1.cjs → shared-json-ld-CgF2Si7b.cjs} +1 -1
  103. package/dist/{slug-input-BwWsAZWy.cjs → slug-input-BvIplRdd.cjs} +1 -1
  104. package/dist/{slug-input-Dpgn_HRd.js → slug-input-P-CLfUrw.js} +1 -1
  105. package/dist/supabase-actions.cjs +1 -1
  106. package/dist/supabase-actions.js +1 -1
  107. package/dist/{take-over-request-477jyIub.cjs → take-over-request-BDHFsfIR.cjs} +1 -1
  108. package/dist/{take-over-request-Cla8KuMu.js → take-over-request-mIiTaYST.js} +5 -5
  109. package/dist/{translation-warning-modal-CiXMjMs-.cjs → translation-warning-modal-Bc2i-0YG.cjs} +1 -1
  110. package/dist/{translation-warning-modal-Blylw0Uc.js → translation-warning-modal-BdkToZwn.js} +1 -1
  111. package/dist/{unmark-as-template-Co-3oGGQ.cjs → unmark-as-template-Bf9f4L0-.cjs} +1 -1
  112. package/dist/{unmark-as-template-TjtqlqKG.js → unmark-as-template-D1o7Vm_F.js} +2 -2
  113. package/dist/{unpublish-page-VTYcfZO9.js → unpublish-page-BWnyAdo3.js} +2 -2
  114. package/dist/{unpublish-page-C4v2-E5K.cjs → unpublish-page-YPMIqjta.cjs} +1 -1
  115. package/dist/{unpublished-partials-modal-D1HuPwGr.cjs → unpublished-partials-modal-i1oOnrgA.cjs} +1 -1
  116. package/dist/{unpublished-partials-modal-D6rkb_MK.js → unpublished-partials-modal-p_0N6V23.js} +1 -1
  117. package/dist/{web-preview-DjkWh678.js → web-preview-DN7QMzca.js} +1 -1
  118. package/dist/{web-preview-DNCFZBu2.cjs → web-preview-gmOwlKZr.cjs} +1 -1
  119. package/package.json +1 -1
  120. package/dist/ai-panel-content-C39F2hj1.cjs +0 -1
  121. package/dist/ai-panel-content-tDE696c-.js +0 -62
  122. package/dist/ai-prompt-input-Dcekb4u6.js +0 -652
  123. package/dist/ai-prompt-input-V0noWeHd.cjs +0 -1
  124. package/dist/apply-binding-BuwI_Uf5.cjs +0 -41
  125. package/dist/index-tI1JCogc.cjs +0 -5
@@ -1,8 +1,8 @@
1
- var $u = Object.defineProperty;
2
- var Mu = (e, t, r) => t in e ? $u(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var Ae = (e, t, r) => Mu(e, typeof t != "symbol" ? t + "" : t, r);
4
- import { a as Fu, d as zu, f as ua, g as Lu, e as Uu, h as Zu, i as ju } from "./register-partial-type-BjtdfKHE.js";
5
- import { noop as Fa, omit as ca, isEmpty as Mt, isFunction as Hn, map as za, uniq as Jn, set as Yn, orderBy as Gu, get as Dt, has as Bu, each as Vu, first as qu, flattenDeep as Hu, pick as vn, compact as La, keys as Ua } from "lodash-es";
1
+ var Mu = Object.defineProperty;
2
+ var Fu = (e, t, r) => t in e ? Mu(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var Ae = (e, t, r) => Fu(e, typeof t != "symbol" ? t + "" : t, r);
4
+ import { a as zu, d as Lu, f as ua, g as Uu, e as Zu, h as ju, i as Gu } from "./register-partial-type-BjtdfKHE.js";
5
+ import { noop as Fa, omit as ca, isEmpty as Mt, isFunction as Jn, map as za, uniq as Xr, set as Yn, orderBy as Bu, get as Dt, has as Vu, each as qu, first as Hu, flattenDeep as La, pick as wn, compact as Ua, keys as Za } from "lodash-es";
6
6
  import { g as Ju } from "./_commonjsHelpers-C6fGbg64.js";
7
7
  import Yu from "fs";
8
8
  import Wu from "path";
@@ -10,13 +10,13 @@ import Ku from "os";
10
10
  import Xu, { createHash as Qu } from "crypto";
11
11
  import { drizzle as ec } from "drizzle-orm/postgres-js";
12
12
  import tc from "postgres";
13
- import { pgSequence as Rs, pgTable as Je, timestamp as xe, text as O, numeric as _r, uuid as J, foreignKey as et, jsonb as K, boolean as er, json as Za, doublePrecision as rc, bigint as nc } from "drizzle-orm/pg-core";
14
- import { sql as da, and as j, eq as T, inArray as Tt, isNotNull as ja, isNull as ac, or as xs, like as oc, ilike as Ga } from "drizzle-orm";
15
- import { A as sc } from "./models-D95ZYr_x.js";
13
+ import { pgSequence as xs, pgTable as Je, timestamp as xe, text as O, numeric as _r, uuid as J, foreignKey as et, jsonb as K, boolean as er, json as ja, doublePrecision as rc, bigint as nc } from "drizzle-orm/pg-core";
14
+ import { sql as da, and as j, eq as T, inArray as Tt, isNotNull as Ga, isNull as ac, or as ks, like as oc, ilike as Ba } from "drizzle-orm";
15
+ import { A as sc } from "./models-BCu-p_QK.js";
16
16
  import { z as m } from "zod";
17
17
  import { f as ic } from "./core-nSRy3D7z.js";
18
18
  import { randomUUID as lc } from "node:crypto";
19
- var ks = "vercel.ai.error", uc = Symbol.for(ks), Ba, Va, H = class Ps extends (Va = Error, Ba = uc, Va) {
19
+ var Ps = "vercel.ai.error", uc = Symbol.for(Ps), Va, qa, H = class Cs extends (qa = Error, Va = uc, qa) {
20
20
  /**
21
21
  * Creates an AI SDK Error.
22
22
  *
@@ -30,7 +30,7 @@ var ks = "vercel.ai.error", uc = Symbol.for(ks), Ba, Va, H = class Ps extends (V
30
30
  message: r,
31
31
  cause: n
32
32
  }) {
33
- super(r), this[Ba] = !0, this.name = t, this.cause = n;
33
+ super(r), this[Va] = !0, this.name = t, this.cause = n;
34
34
  }
35
35
  /**
36
36
  * Checks if the given error is an AI SDK Error.
@@ -38,13 +38,13 @@ var ks = "vercel.ai.error", uc = Symbol.for(ks), Ba, Va, H = class Ps extends (V
38
38
  * @returns {boolean} True if the error is an AI SDK Error, false otherwise.
39
39
  */
40
40
  static isInstance(t) {
41
- return Ps.hasMarker(t, ks);
41
+ return Cs.hasMarker(t, Ps);
42
42
  }
43
43
  static hasMarker(t, r) {
44
44
  const n = Symbol.for(r);
45
45
  return t != null && typeof t == "object" && n in t && typeof t[n] == "boolean" && t[n] === !0;
46
46
  }
47
- }, Cs = "AI_APICallError", Ds = `vercel.ai.error.${Cs}`, cc = Symbol.for(Ds), qa, Ha, Le = class extends (Ha = H, qa = cc, Ha) {
47
+ }, Ds = "AI_APICallError", $s = `vercel.ai.error.${Ds}`, cc = Symbol.for($s), Ha, Ja, Le = class extends (Ja = H, Ha = cc, Ja) {
48
48
  constructor({
49
49
  message: e,
50
50
  url: t,
@@ -60,68 +60,68 @@ var ks = "vercel.ai.error", uc = Symbol.for(ks), Ba, Va, H = class Ps extends (V
60
60
  // server error
61
61
  data: l
62
62
  }) {
63
- super({ name: Cs, message: e, cause: s }), this[qa] = !0, this.url = t, this.requestBodyValues = r, this.statusCode = n, this.responseHeaders = a, this.responseBody = o, this.isRetryable = i, this.data = l;
63
+ super({ name: Ds, message: e, cause: s }), this[Ha] = !0, this.url = t, this.requestBodyValues = r, this.statusCode = n, this.responseHeaders = a, this.responseBody = o, this.isRetryable = i, this.data = l;
64
64
  }
65
65
  static isInstance(e) {
66
- return H.hasMarker(e, Ds);
66
+ return H.hasMarker(e, $s);
67
67
  }
68
- }, $s = "AI_EmptyResponseBodyError", Ms = `vercel.ai.error.${$s}`, dc = Symbol.for(Ms), Ja, Ya, pc = class extends (Ya = H, Ja = dc, Ya) {
68
+ }, Ms = "AI_EmptyResponseBodyError", Fs = `vercel.ai.error.${Ms}`, dc = Symbol.for(Fs), Ya, Wa, pc = class extends (Wa = H, Ya = dc, Wa) {
69
69
  // used in isInstance
70
70
  constructor({ message: e = "Empty response body" } = {}) {
71
- super({ name: $s, message: e }), this[Ja] = !0;
71
+ super({ name: Ms, message: e }), this[Ya] = !0;
72
72
  }
73
73
  static isInstance(e) {
74
- return H.hasMarker(e, Ms);
74
+ return H.hasMarker(e, Fs);
75
75
  }
76
76
  };
77
77
  function or(e) {
78
78
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
79
79
  }
80
- var Fs = "AI_InvalidArgumentError", zs = `vercel.ai.error.${Fs}`, fc = Symbol.for(zs), Wa, Ka, gc = class extends (Ka = H, Wa = fc, Ka) {
80
+ var zs = "AI_InvalidArgumentError", Ls = `vercel.ai.error.${zs}`, fc = Symbol.for(Ls), Ka, Xa, gc = class extends (Xa = H, Ka = fc, Xa) {
81
81
  constructor({
82
82
  message: t,
83
83
  cause: r,
84
84
  argument: n
85
85
  }) {
86
- super({ name: Fs, message: t, cause: r }), this[Wa] = !0, this.argument = n;
86
+ super({ name: zs, message: t, cause: r }), this[Ka] = !0, this.argument = n;
87
87
  }
88
88
  static isInstance(t) {
89
- return H.hasMarker(t, zs);
89
+ return H.hasMarker(t, Ls);
90
90
  }
91
- }, Ls = "AI_InvalidPromptError", Us = `vercel.ai.error.${Ls}`, hc = Symbol.for(Us), Xa, Qa, Wt = class extends (Qa = H, Xa = hc, Qa) {
91
+ }, Us = "AI_InvalidPromptError", Zs = `vercel.ai.error.${Us}`, hc = Symbol.for(Zs), Qa, eo, Wt = class extends (eo = H, Qa = hc, eo) {
92
92
  constructor({
93
93
  prompt: e,
94
94
  message: t,
95
95
  cause: r
96
96
  }) {
97
- super({ name: Ls, message: `Invalid prompt: ${t}`, cause: r }), this[Xa] = !0, this.prompt = e;
97
+ super({ name: Us, message: `Invalid prompt: ${t}`, cause: r }), this[Qa] = !0, this.prompt = e;
98
98
  }
99
99
  static isInstance(e) {
100
- return H.hasMarker(e, Us);
100
+ return H.hasMarker(e, Zs);
101
101
  }
102
- }, Zs = "AI_JSONParseError", js = `vercel.ai.error.${Zs}`, mc = Symbol.for(js), eo, to, Qr = class extends (to = H, eo = mc, to) {
102
+ }, js = "AI_JSONParseError", Gs = `vercel.ai.error.${js}`, mc = Symbol.for(Gs), to, ro, en = class extends (ro = H, to = mc, ro) {
103
103
  constructor({ text: e, cause: t }) {
104
104
  super({
105
- name: Zs,
105
+ name: js,
106
106
  message: `JSON parsing failed: Text: ${e}.
107
107
  Error message: ${or(t)}`,
108
108
  cause: t
109
- }), this[eo] = !0, this.text = e;
109
+ }), this[to] = !0, this.text = e;
110
110
  }
111
111
  static isInstance(e) {
112
- return H.hasMarker(e, js);
112
+ return H.hasMarker(e, Gs);
113
113
  }
114
- }, Gs = "AI_TypeValidationError", Bs = `vercel.ai.error.${Gs}`, yc = Symbol.for(Bs), ro, no, Ft = class Wn extends (no = H, ro = yc, no) {
114
+ }, Bs = "AI_TypeValidationError", Vs = `vercel.ai.error.${Bs}`, yc = Symbol.for(Vs), no, ao, Ft = class Wn extends (ao = H, no = yc, ao) {
115
115
  constructor({ value: t, cause: r }) {
116
116
  super({
117
- name: Gs,
117
+ name: Bs,
118
118
  message: `Type validation failed: Value: ${JSON.stringify(t)}.
119
119
  Error message: ${or(r)}`,
120
120
  cause: r
121
- }), this[ro] = !0, this.value = t;
121
+ }), this[no] = !0, this.value = t;
122
122
  }
123
123
  static isInstance(t) {
124
- return H.hasMarker(t, Bs);
124
+ return H.hasMarker(t, Vs);
125
125
  }
126
126
  /**
127
127
  * Wraps an error into a TypeValidationError.
@@ -182,23 +182,23 @@ class Qt extends Error {
182
182
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
183
183
  }
184
184
  }
185
- class Vs extends Error {
185
+ class qs extends Error {
186
186
  constructor(t) {
187
187
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
188
188
  }
189
189
  }
190
- const qs = {};
190
+ const Hs = {};
191
191
  function It(e) {
192
- return qs;
192
+ return Hs;
193
193
  }
194
- function Hs(e) {
194
+ function Js(e) {
195
195
  const t = Object.values(e).filter((n) => typeof n == "number");
196
196
  return Object.entries(e).filter(([n, a]) => t.indexOf(+n) === -1).map(([n, a]) => a);
197
197
  }
198
198
  function Kn(e, t) {
199
199
  return typeof t == "bigint" ? t.toString() : t;
200
200
  }
201
- function wn(e) {
201
+ function _n(e) {
202
202
  return {
203
203
  get value() {
204
204
  {
@@ -225,13 +225,13 @@ function vc(e, t) {
225
225
  const o = r > a ? r : a, s = Number.parseInt(e.toFixed(o).replace(".", "")), i = Number.parseInt(t.toFixed(o).replace(".", ""));
226
226
  return s % i / 10 ** o;
227
227
  }
228
- const ao = Symbol("evaluating");
228
+ const oo = Symbol("evaluating");
229
229
  function W(e, t, r) {
230
230
  let n;
231
231
  Object.defineProperty(e, t, {
232
232
  get() {
233
- if (n !== ao)
234
- return n === void 0 && (n = ao, n = r()), n;
233
+ if (n !== oo)
234
+ return n === void 0 && (n = oo, n = r()), n;
235
235
  },
236
236
  set(a) {
237
237
  Object.defineProperty(e, t, {
@@ -258,18 +258,18 @@ function Ot(...e) {
258
258
  }
259
259
  return Object.defineProperties({}, t);
260
260
  }
261
- function oo(e) {
261
+ function so(e) {
262
262
  return JSON.stringify(e);
263
263
  }
264
264
  function wc(e) {
265
265
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
266
266
  }
267
- const Js = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
267
+ const Ys = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
268
268
  };
269
269
  function br(e) {
270
270
  return typeof e == "object" && e !== null && !Array.isArray(e);
271
271
  }
272
- const _c = wn(() => {
272
+ const _c = _n(() => {
273
273
  var e;
274
274
  if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
275
275
  return !1;
@@ -289,7 +289,7 @@ function tr(e) {
289
289
  const r = t.prototype;
290
290
  return !(br(r) === !1 || Object.prototype.hasOwnProperty.call(r, "isPrototypeOf") === !1);
291
291
  }
292
- function Ys(e) {
292
+ function Ws(e) {
293
293
  return tr(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
294
294
  }
295
295
  const Tc = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
@@ -493,7 +493,7 @@ function Ir(...e) {
493
493
  inst: n
494
494
  } : { ...t };
495
495
  }
496
- const Ws = (e, t) => {
496
+ const Ks = (e, t) => {
497
497
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
498
498
  value: e._zod,
499
499
  enumerable: !1
@@ -504,7 +504,7 @@ const Ws = (e, t) => {
504
504
  value: () => e.message,
505
505
  enumerable: !1
506
506
  });
507
- }, Ks = w("$ZodError", Ws), Xs = w("$ZodError", Ws, { Parent: Error });
507
+ }, Xs = w("$ZodError", Ks), Qs = w("$ZodError", Ks, { Parent: Error });
508
508
  function kc(e, t = (r) => r.message) {
509
509
  const r = {}, n = [];
510
510
  for (const a of e.issues)
@@ -538,7 +538,7 @@ const ha = (e) => (t, r, n, a) => {
538
538
  throw new Qt();
539
539
  if (s.issues.length) {
540
540
  const i = new ((a == null ? void 0 : a.Err) ?? e)(s.issues.map((l) => St(l, o, It())));
541
- throw Js(i, a == null ? void 0 : a.callee), i;
541
+ throw Ys(i, a == null ? void 0 : a.callee), i;
542
542
  }
543
543
  return s.value;
544
544
  }, ma = (e) => async (t, r, n, a) => {
@@ -546,67 +546,67 @@ const ha = (e) => (t, r, n, a) => {
546
546
  let s = t._zod.run({ value: r, issues: [] }, o);
547
547
  if (s instanceof Promise && (s = await s), s.issues.length) {
548
548
  const i = new ((a == null ? void 0 : a.Err) ?? e)(s.issues.map((l) => St(l, o, It())));
549
- throw Js(i, a == null ? void 0 : a.callee), i;
549
+ throw Ys(i, a == null ? void 0 : a.callee), i;
550
550
  }
551
551
  return s.value;
552
- }, _n = (e) => (t, r, n) => {
552
+ }, Tn = (e) => (t, r, n) => {
553
553
  const a = n ? { ...n, async: !1 } : { async: !1 }, o = t._zod.run({ value: r, issues: [] }, a);
554
554
  if (o instanceof Promise)
555
555
  throw new Qt();
556
556
  return o.issues.length ? {
557
557
  success: !1,
558
- error: new (e ?? Ks)(o.issues.map((s) => St(s, a, It())))
558
+ error: new (e ?? Xs)(o.issues.map((s) => St(s, a, It())))
559
559
  } : { success: !0, data: o.value };
560
- }, Cc = /* @__PURE__ */ _n(Xs), Tn = (e) => async (t, r, n) => {
560
+ }, Cc = /* @__PURE__ */ Tn(Qs), En = (e) => async (t, r, n) => {
561
561
  const a = n ? Object.assign(n, { async: !0 }) : { async: !0 };
562
562
  let o = t._zod.run({ value: r, issues: [] }, a);
563
563
  return o instanceof Promise && (o = await o), o.issues.length ? {
564
564
  success: !1,
565
565
  error: new e(o.issues.map((s) => St(s, a, It())))
566
566
  } : { success: !0, data: o.value };
567
- }, Dc = /* @__PURE__ */ Tn(Xs), $c = (e) => (t, r, n) => {
567
+ }, Dc = /* @__PURE__ */ En(Qs), $c = (e) => (t, r, n) => {
568
568
  const a = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
569
569
  return ha(e)(t, r, a);
570
570
  }, Mc = (e) => (t, r, n) => ha(e)(t, r, n), Fc = (e) => async (t, r, n) => {
571
571
  const a = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
572
572
  return ma(e)(t, r, a);
573
573
  }, zc = (e) => async (t, r, n) => ma(e)(t, r, n), Lc = (e) => (t, r, n) => {
574
- const a = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
575
- return _n(e)(t, r, a);
576
- }, Uc = (e) => (t, r, n) => _n(e)(t, r, n), Zc = (e) => async (t, r, n) => {
577
574
  const a = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
578
575
  return Tn(e)(t, r, a);
579
- }, jc = (e) => async (t, r, n) => Tn(e)(t, r, n), Gc = /^[cC][^\s-]{8,}$/, Bc = /^[0-9a-z]+$/, Vc = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, qc = /^[0-9a-vA-V]{20}$/, Hc = /^[A-Za-z0-9]{27}$/, Jc = /^[a-zA-Z0-9_-]{21}$/, Yc = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Wc = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, so = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Kc = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Xc = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
576
+ }, Uc = (e) => (t, r, n) => Tn(e)(t, r, n), Zc = (e) => async (t, r, n) => {
577
+ const a = n ? Object.assign(n, { direction: "backward" }) : { direction: "backward" };
578
+ return En(e)(t, r, a);
579
+ }, jc = (e) => async (t, r, n) => En(e)(t, r, n), Gc = /^[cC][^\s-]{8,}$/, Bc = /^[0-9a-z]+$/, Vc = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, qc = /^[0-9a-vA-V]{20}$/, Hc = /^[A-Za-z0-9]{27}$/, Jc = /^[a-zA-Z0-9_-]{21}$/, Yc = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Wc = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, io = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Kc = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Xc = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
580
580
  function Qc() {
581
581
  return new RegExp(Xc, "u");
582
582
  }
583
- const ed = /^(?:(?: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])$/, td = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, rd = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, nd = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ad = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Qs = /^[A-Za-z0-9_-]*$/, od = /^\+[1-9]\d{6,14}$/, ei = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", sd = /* @__PURE__ */ new RegExp(`^${ei}$`);
584
- function ti(e) {
583
+ const ed = /^(?:(?: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])$/, td = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, rd = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, nd = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ad = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ei = /^[A-Za-z0-9_-]*$/, od = /^\+[1-9]\d{6,14}$/, ti = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", sd = /* @__PURE__ */ new RegExp(`^${ti}$`);
584
+ function ri(e) {
585
585
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
586
586
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
587
587
  }
588
588
  function id(e) {
589
- return new RegExp(`^${ti(e)}$`);
589
+ return new RegExp(`^${ri(e)}$`);
590
590
  }
591
591
  function ld(e) {
592
- const t = ti({ precision: e.precision }), r = ["Z"];
592
+ const t = ri({ precision: e.precision }), r = ["Z"];
593
593
  e.local && r.push(""), e.offset && r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
594
594
  const n = `${t}(?:${r.join("|")})`;
595
- return new RegExp(`^${ei}T(?:${n})$`);
595
+ return new RegExp(`^${ti}T(?:${n})$`);
596
596
  }
597
597
  const ud = (e) => {
598
598
  const t = e ? `[\\s\\S]{${(e == null ? void 0 : e.minimum) ?? 0},${(e == null ? void 0 : e.maximum) ?? ""}}` : "[\\s\\S]*";
599
599
  return new RegExp(`^${t}$`);
600
- }, cd = /^-?\d+$/, ri = /^-?\d+(?:\.\d+)?$/, dd = /^(?:true|false)$/i, pd = /^null$/i, fd = /^[^A-Z]*$/, gd = /^[^a-z]*$/, Ue = /* @__PURE__ */ w("$ZodCheck", (e, t) => {
600
+ }, cd = /^-?\d+$/, ni = /^-?\d+(?:\.\d+)?$/, dd = /^(?:true|false)$/i, pd = /^null$/i, fd = /^[^A-Z]*$/, gd = /^[^a-z]*$/, Ue = /* @__PURE__ */ w("$ZodCheck", (e, t) => {
601
601
  var r;
602
602
  e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
603
- }), ni = {
603
+ }), ai = {
604
604
  number: "number",
605
605
  bigint: "bigint",
606
606
  object: "date"
607
- }, ai = /* @__PURE__ */ w("$ZodCheckLessThan", (e, t) => {
607
+ }, oi = /* @__PURE__ */ w("$ZodCheckLessThan", (e, t) => {
608
608
  Ue.init(e, t);
609
- const r = ni[typeof t.value];
609
+ const r = ai[typeof t.value];
610
610
  e._zod.onattach.push((n) => {
611
611
  const a = n._zod.bag, o = (t.inclusive ? a.maximum : a.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
612
612
  t.value < o && (t.inclusive ? a.maximum = t.value : a.exclusiveMaximum = t.value);
@@ -621,9 +621,9 @@ const ud = (e) => {
621
621
  continue: !t.abort
622
622
  });
623
623
  };
624
- }), oi = /* @__PURE__ */ w("$ZodCheckGreaterThan", (e, t) => {
624
+ }), si = /* @__PURE__ */ w("$ZodCheckGreaterThan", (e, t) => {
625
625
  Ue.init(e, t);
626
- const r = ni[typeof t.value];
626
+ const r = ai[typeof t.value];
627
627
  e._zod.onattach.push((n) => {
628
628
  const a = n._zod.bag, o = (t.inclusive ? a.minimum : a.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
629
629
  t.value > o && (t.inclusive ? a.minimum = t.value : a.exclusiveMinimum = t.value);
@@ -785,7 +785,7 @@ const ud = (e) => {
785
785
  continue: !t.abort
786
786
  });
787
787
  };
788
- }), En = /* @__PURE__ */ w("$ZodCheckStringFormat", (e, t) => {
788
+ }), bn = /* @__PURE__ */ w("$ZodCheckStringFormat", (e, t) => {
789
789
  var r, n;
790
790
  Ue.init(e, t), e._zod.onattach.push((a) => {
791
791
  const o = a._zod.bag;
@@ -803,7 +803,7 @@ const ud = (e) => {
803
803
  }) : (n = e._zod).check ?? (n.check = () => {
804
804
  });
805
805
  }), _d = /* @__PURE__ */ w("$ZodCheckRegex", (e, t) => {
806
- En.init(e, t), e._zod.check = (r) => {
806
+ bn.init(e, t), e._zod.check = (r) => {
807
807
  t.pattern.lastIndex = 0, !t.pattern.test(r.value) && r.issues.push({
808
808
  origin: "string",
809
809
  code: "invalid_format",
@@ -815,9 +815,9 @@ const ud = (e) => {
815
815
  });
816
816
  };
817
817
  }), Td = /* @__PURE__ */ w("$ZodCheckLowerCase", (e, t) => {
818
- t.pattern ?? (t.pattern = fd), En.init(e, t);
818
+ t.pattern ?? (t.pattern = fd), bn.init(e, t);
819
819
  }), Ed = /* @__PURE__ */ w("$ZodCheckUpperCase", (e, t) => {
820
- t.pattern ?? (t.pattern = gd), En.init(e, t);
820
+ t.pattern ?? (t.pattern = gd), bn.init(e, t);
821
821
  }), bd = /* @__PURE__ */ w("$ZodCheckIncludes", (e, t) => {
822
822
  Ue.init(e, t);
823
823
  const r = rr(t.includes), n = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${r}` : r);
@@ -996,7 +996,7 @@ const Od = {
996
996
  }), n;
997
997
  };
998
998
  }), ve = /* @__PURE__ */ w("$ZodStringFormat", (e, t) => {
999
- En.init(e, t), ya.init(e, t);
999
+ bn.init(e, t), ya.init(e, t);
1000
1000
  }), Rd = /* @__PURE__ */ w("$ZodGUID", (e, t) => {
1001
1001
  t.pattern ?? (t.pattern = Wc), ve.init(e, t);
1002
1002
  }), xd = /* @__PURE__ */ w("$ZodUUID", (e, t) => {
@@ -1013,9 +1013,9 @@ const Od = {
1013
1013
  }[t.version];
1014
1014
  if (n === void 0)
1015
1015
  throw new Error(`Invalid UUID version: "${t.version}"`);
1016
- t.pattern ?? (t.pattern = so(n));
1016
+ t.pattern ?? (t.pattern = io(n));
1017
1017
  } else
1018
- t.pattern ?? (t.pattern = so());
1018
+ t.pattern ?? (t.pattern = io());
1019
1019
  ve.init(e, t);
1020
1020
  }), kd = /* @__PURE__ */ w("$ZodEmail", (e, t) => {
1021
1021
  t.pattern ?? (t.pattern = Kc), ve.init(e, t);
@@ -1117,7 +1117,7 @@ const Od = {
1117
1117
  }
1118
1118
  };
1119
1119
  });
1120
- function si(e) {
1120
+ function ii(e) {
1121
1121
  if (e === "")
1122
1122
  return !0;
1123
1123
  if (e.length % 4 !== 0)
@@ -1130,7 +1130,7 @@ function si(e) {
1130
1130
  }
1131
1131
  const Jd = /* @__PURE__ */ w("$ZodBase64", (e, t) => {
1132
1132
  t.pattern ?? (t.pattern = ad), ve.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (r) => {
1133
- si(r.value) || r.issues.push({
1133
+ ii(r.value) || r.issues.push({
1134
1134
  code: "invalid_format",
1135
1135
  format: "base64",
1136
1136
  input: r.value,
@@ -1140,13 +1140,13 @@ const Jd = /* @__PURE__ */ w("$ZodBase64", (e, t) => {
1140
1140
  };
1141
1141
  });
1142
1142
  function Yd(e) {
1143
- if (!Qs.test(e))
1143
+ if (!ei.test(e))
1144
1144
  return !1;
1145
1145
  const t = e.replace(/[-_]/g, (n) => n === "-" ? "+" : "/"), r = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1146
- return si(r);
1146
+ return ii(r);
1147
1147
  }
1148
1148
  const Wd = /* @__PURE__ */ w("$ZodBase64URL", (e, t) => {
1149
- t.pattern ?? (t.pattern = Qs), ve.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (r) => {
1149
+ t.pattern ?? (t.pattern = ei), ve.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (r) => {
1150
1150
  Yd(r.value) || r.issues.push({
1151
1151
  code: "invalid_format",
1152
1152
  format: "base64url",
@@ -1182,8 +1182,8 @@ const Qd = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
1182
1182
  continue: !t.abort
1183
1183
  });
1184
1184
  };
1185
- }), ii = /* @__PURE__ */ w("$ZodNumber", (e, t) => {
1186
- pe.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? ri, e._zod.parse = (r, n) => {
1185
+ }), li = /* @__PURE__ */ w("$ZodNumber", (e, t) => {
1186
+ pe.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? ni, e._zod.parse = (r, n) => {
1187
1187
  if (t.coerce)
1188
1188
  try {
1189
1189
  r.value = Number(r.value);
@@ -1202,7 +1202,7 @@ const Qd = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
1202
1202
  }), r;
1203
1203
  };
1204
1204
  }), ep = /* @__PURE__ */ w("$ZodNumberFormat", (e, t) => {
1205
- md.init(e, t), ii.init(e, t);
1205
+ md.init(e, t), li.init(e, t);
1206
1206
  }), tp = /* @__PURE__ */ w("$ZodBoolean", (e, t) => {
1207
1207
  pe.init(e, t), e._zod.pattern = dd, e._zod.parse = (r, n) => {
1208
1208
  if (t.coerce)
@@ -1240,7 +1240,7 @@ const Qd = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
1240
1240
  inst: e
1241
1241
  }), r);
1242
1242
  });
1243
- function io(e, t, r) {
1243
+ function lo(e, t, r) {
1244
1244
  e.issues.length && t.issues.push(...Xt(r, e.issues)), t.value[r] = e.value;
1245
1245
  }
1246
1246
  const sp = /* @__PURE__ */ w("$ZodArray", (e, t) => {
@@ -1260,12 +1260,12 @@ const sp = /* @__PURE__ */ w("$ZodArray", (e, t) => {
1260
1260
  value: i,
1261
1261
  issues: []
1262
1262
  }, n);
1263
- l instanceof Promise ? o.push(l.then((u) => io(u, r, s))) : io(l, r, s);
1263
+ l instanceof Promise ? o.push(l.then((u) => lo(u, r, s))) : lo(l, r, s);
1264
1264
  }
1265
1265
  return o.length ? Promise.all(o).then(() => r) : r;
1266
1266
  };
1267
1267
  });
1268
- function en(e, t, r, n, a) {
1268
+ function tn(e, t, r, n, a) {
1269
1269
  if (e.issues.length) {
1270
1270
  if (a && !(r in n))
1271
1271
  return;
@@ -1273,7 +1273,7 @@ function en(e, t, r, n, a) {
1273
1273
  }
1274
1274
  e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
1275
1275
  }
1276
- function li(e) {
1276
+ function ui(e) {
1277
1277
  var n, a, o, s;
1278
1278
  const t = Object.keys(e.shape);
1279
1279
  for (const i of t)
@@ -1288,7 +1288,7 @@ function li(e) {
1288
1288
  optionalKeys: new Set(r)
1289
1289
  };
1290
1290
  }
1291
- function ui(e, t, r, n, a, o) {
1291
+ function ci(e, t, r, n, a, o) {
1292
1292
  const s = [], i = a.keySet, l = a.catchall._zod, u = l.def.type, c = l.optout === "optional";
1293
1293
  for (const d in t) {
1294
1294
  if (i.has(d))
@@ -1298,7 +1298,7 @@ function ui(e, t, r, n, a, o) {
1298
1298
  continue;
1299
1299
  }
1300
1300
  const p = l.run({ value: t[d], issues: [] }, n);
1301
- p instanceof Promise ? e.push(p.then((y) => en(y, r, d, t, c))) : en(p, r, d, t, c);
1301
+ p instanceof Promise ? e.push(p.then((y) => tn(y, r, d, t, c))) : tn(p, r, d, t, c);
1302
1302
  }
1303
1303
  return s.length && r.issues.push({
1304
1304
  code: "unrecognized_keys",
@@ -1321,7 +1321,7 @@ const ip = /* @__PURE__ */ w("$ZodObject", (e, t) => {
1321
1321
  }
1322
1322
  });
1323
1323
  }
1324
- const n = wn(() => li(t));
1324
+ const n = _n(() => ui(t));
1325
1325
  W(e._zod, "propValues", () => {
1326
1326
  const i = t.shape, l = {};
1327
1327
  for (const u in i) {
@@ -1350,16 +1350,16 @@ const ip = /* @__PURE__ */ w("$ZodObject", (e, t) => {
1350
1350
  const c = [], d = s.shape;
1351
1351
  for (const p of s.keys) {
1352
1352
  const y = d[p], E = y._zod.optout === "optional", v = y._zod.run({ value: u[p], issues: [] }, l);
1353
- v instanceof Promise ? c.push(v.then((b) => en(b, i, p, u, E))) : en(v, i, p, u, E);
1353
+ v instanceof Promise ? c.push(v.then((b) => tn(b, i, p, u, E))) : tn(v, i, p, u, E);
1354
1354
  }
1355
- return o ? ui(c, u, i, l, n.value, e) : c.length ? Promise.all(c).then(() => i) : i;
1355
+ return o ? ci(c, u, i, l, n.value, e) : c.length ? Promise.all(c).then(() => i) : i;
1356
1356
  };
1357
1357
  }), lp = /* @__PURE__ */ w("$ZodObjectJIT", (e, t) => {
1358
1358
  ip.init(e, t);
1359
- const r = e._zod.parse, n = wn(() => li(t)), a = (p) => {
1359
+ const r = e._zod.parse, n = _n(() => ui(t)), a = (p) => {
1360
1360
  var g;
1361
1361
  const y = new Nd(["shape", "payload", "ctx"]), E = n.value, v = ($) => {
1362
- const R = oo($);
1362
+ const R = so($);
1363
1363
  return `shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`;
1364
1364
  };
1365
1365
  y.write("const input = payload.value;");
@@ -1369,7 +1369,7 @@ const ip = /* @__PURE__ */ w("$ZodObject", (e, t) => {
1369
1369
  b[$] = `key_${P++}`;
1370
1370
  y.write("const newResult = {};");
1371
1371
  for (const $ of E.keys) {
1372
- const R = b[$], h = oo($), N = p[$], D = ((g = N == null ? void 0 : N._zod) == null ? void 0 : g.optout) === "optional";
1372
+ const R = b[$], h = so($), N = p[$], D = ((g = N == null ? void 0 : N._zod) == null ? void 0 : g.optout) === "optional";
1373
1373
  y.write(`const ${R} = ${v($)};`), D ? y.write(`
1374
1374
  if (${R}.issues.length) {
1375
1375
  if (${h} in input) {
@@ -1411,12 +1411,12 @@ const ip = /* @__PURE__ */ w("$ZodObject", (e, t) => {
1411
1411
  return ($, R) => C(p, $, R);
1412
1412
  };
1413
1413
  let o;
1414
- const s = br, i = !qs.jitless, u = i && _c.value, c = t.catchall;
1414
+ const s = br, i = !Hs.jitless, u = i && _c.value, c = t.catchall;
1415
1415
  let d;
1416
1416
  e._zod.parse = (p, y) => {
1417
1417
  d ?? (d = n.value);
1418
1418
  const E = p.value;
1419
- return s(E) ? i && u && (y == null ? void 0 : y.async) === !1 && y.jitless !== !0 ? (o || (o = a(t.shape)), p = o(p, y), c ? ui([], E, p, y, d, e) : p) : r(p, y) : (p.issues.push({
1419
+ return s(E) ? i && u && (y == null ? void 0 : y.async) === !1 && y.jitless !== !0 ? (o || (o = a(t.shape)), p = o(p, y), c ? ci([], E, p, y, d, e) : p) : r(p, y) : (p.issues.push({
1420
1420
  expected: "object",
1421
1421
  code: "invalid_type",
1422
1422
  input: E,
@@ -1424,7 +1424,7 @@ const ip = /* @__PURE__ */ w("$ZodObject", (e, t) => {
1424
1424
  }), p);
1425
1425
  };
1426
1426
  });
1427
- function lo(e, t, r, n) {
1427
+ function uo(e, t, r, n) {
1428
1428
  for (const o of e)
1429
1429
  if (o.issues.length === 0)
1430
1430
  return t.value = o.value, t;
@@ -1436,7 +1436,7 @@ function lo(e, t, r, n) {
1436
1436
  errors: e.map((o) => o.issues.map((s) => St(s, n, It())))
1437
1437
  }), t);
1438
1438
  }
1439
- const ci = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
1439
+ const di = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
1440
1440
  pe.init(e, t), W(e._zod, "optin", () => t.options.some((a) => a._zod.optin === "optional") ? "optional" : void 0), W(e._zod, "optout", () => t.options.some((a) => a._zod.optout === "optional") ? "optional" : void 0), W(e._zod, "values", () => {
1441
1441
  if (t.options.every((a) => a._zod.values))
1442
1442
  return new Set(t.options.flatMap((a) => Array.from(a._zod.values)));
@@ -1465,10 +1465,10 @@ const ci = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
1465
1465
  i.push(u);
1466
1466
  }
1467
1467
  }
1468
- return s ? Promise.all(i).then((l) => lo(l, a, e, o)) : lo(i, a, e, o);
1468
+ return s ? Promise.all(i).then((l) => uo(l, a, e, o)) : uo(i, a, e, o);
1469
1469
  };
1470
1470
  }), up = /* @__PURE__ */ w("$ZodDiscriminatedUnion", (e, t) => {
1471
- t.inclusive = !1, ci.init(e, t);
1471
+ t.inclusive = !1, di.init(e, t);
1472
1472
  const r = e._zod.parse;
1473
1473
  W(e._zod, "propValues", () => {
1474
1474
  const a = {};
@@ -1484,7 +1484,7 @@ const ci = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
1484
1484
  }
1485
1485
  return a;
1486
1486
  });
1487
- const n = wn(() => {
1487
+ const n = _n(() => {
1488
1488
  var s;
1489
1489
  const a = t.options, o = /* @__PURE__ */ new Map();
1490
1490
  for (const i of a) {
@@ -1522,7 +1522,7 @@ const ci = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
1522
1522
  }), cp = /* @__PURE__ */ w("$ZodIntersection", (e, t) => {
1523
1523
  pe.init(e, t), e._zod.parse = (r, n) => {
1524
1524
  const a = r.value, o = t.left._zod.run({ value: a, issues: [] }, n), s = t.right._zod.run({ value: a, issues: [] }, n);
1525
- return o instanceof Promise || s instanceof Promise ? Promise.all([o, s]).then(([l, u]) => uo(r, l, u)) : uo(r, o, s);
1525
+ return o instanceof Promise || s instanceof Promise ? Promise.all([o, s]).then(([l, u]) => co(r, l, u)) : co(r, o, s);
1526
1526
  };
1527
1527
  });
1528
1528
  function Xn(e, t) {
@@ -1560,7 +1560,7 @@ function Xn(e, t) {
1560
1560
  }
1561
1561
  return { valid: !1, mergeErrorPath: [] };
1562
1562
  }
1563
- function uo(e, t, r) {
1563
+ function co(e, t, r) {
1564
1564
  const n = /* @__PURE__ */ new Map();
1565
1565
  let a;
1566
1566
  for (const i of t.issues)
@@ -1623,7 +1623,7 @@ const dp = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
1623
1623
  let l = t.keyType._zod.run({ value: i, issues: [] }, n);
1624
1624
  if (l instanceof Promise)
1625
1625
  throw new Error("Async schemas not supported in object keys currently");
1626
- if (typeof i == "string" && ri.test(i) && l.issues.length && l.issues.some((d) => d.code === "invalid_type" && d.expected === "number")) {
1626
+ if (typeof i == "string" && ni.test(i) && l.issues.length && l.issues.some((d) => d.code === "invalid_type" && d.expected === "number")) {
1627
1627
  const d = t.keyType._zod.run({ value: Number(i), issues: [] }, n);
1628
1628
  if (d instanceof Promise)
1629
1629
  throw new Error("Async schemas not supported in object keys currently");
@@ -1650,7 +1650,7 @@ const dp = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
1650
1650
  };
1651
1651
  }), pp = /* @__PURE__ */ w("$ZodEnum", (e, t) => {
1652
1652
  pe.init(e, t);
1653
- const r = Hs(t.entries), n = new Set(r);
1653
+ const r = Js(t.entries), n = new Set(r);
1654
1654
  e._zod.values = n, e._zod.pattern = new RegExp(`^(${r.filter((a) => Tc.has(typeof a)).map((a) => typeof a == "string" ? rr(a) : a.toString()).join("|")})$`), e._zod.parse = (a, o) => {
1655
1655
  const s = a.value;
1656
1656
  return n.has(s) || a.issues.push({
@@ -1676,7 +1676,7 @@ const dp = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
1676
1676
  }), gp = /* @__PURE__ */ w("$ZodTransform", (e, t) => {
1677
1677
  pe.init(e, t), e._zod.parse = (r, n) => {
1678
1678
  if (n.direction === "backward")
1679
- throw new Vs(e.constructor.name);
1679
+ throw new qs(e.constructor.name);
1680
1680
  const a = t.transform(r.value, r);
1681
1681
  if (n.async)
1682
1682
  return (a instanceof Promise ? a : Promise.resolve(a)).then((s) => (r.value = s, r));
@@ -1685,22 +1685,22 @@ const dp = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
1685
1685
  return r.value = a, r;
1686
1686
  };
1687
1687
  });
1688
- function co(e, t) {
1688
+ function po(e, t) {
1689
1689
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1690
1690
  }
1691
- const di = /* @__PURE__ */ w("$ZodOptional", (e, t) => {
1691
+ const pi = /* @__PURE__ */ w("$ZodOptional", (e, t) => {
1692
1692
  pe.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", W(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), W(e._zod, "pattern", () => {
1693
1693
  const r = t.innerType._zod.pattern;
1694
1694
  return r ? new RegExp(`^(${fa(r.source)})?$`) : void 0;
1695
1695
  }), e._zod.parse = (r, n) => {
1696
1696
  if (t.innerType._zod.optin === "optional") {
1697
1697
  const a = t.innerType._zod.run(r, n);
1698
- return a instanceof Promise ? a.then((o) => co(o, r.value)) : co(a, r.value);
1698
+ return a instanceof Promise ? a.then((o) => po(o, r.value)) : po(a, r.value);
1699
1699
  }
1700
1700
  return r.value === void 0 ? r : t.innerType._zod.run(r, n);
1701
1701
  };
1702
1702
  }), hp = /* @__PURE__ */ w("$ZodExactOptional", (e, t) => {
1703
- di.init(e, t), W(e._zod, "values", () => t.innerType._zod.values), W(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (r, n) => t.innerType._zod.run(r, n);
1703
+ pi.init(e, t), W(e._zod, "values", () => t.innerType._zod.values), W(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (r, n) => t.innerType._zod.run(r, n);
1704
1704
  }), mp = /* @__PURE__ */ w("$ZodNullable", (e, t) => {
1705
1705
  pe.init(e, t), W(e._zod, "optin", () => t.innerType._zod.optin), W(e._zod, "optout", () => t.innerType._zod.optout), W(e._zod, "pattern", () => {
1706
1706
  const r = t.innerType._zod.pattern;
@@ -1713,10 +1713,10 @@ const di = /* @__PURE__ */ w("$ZodOptional", (e, t) => {
1713
1713
  if (r.value === void 0)
1714
1714
  return r.value = t.defaultValue, r;
1715
1715
  const a = t.innerType._zod.run(r, n);
1716
- return a instanceof Promise ? a.then((o) => po(o, t)) : po(a, t);
1716
+ return a instanceof Promise ? a.then((o) => fo(o, t)) : fo(a, t);
1717
1717
  };
1718
1718
  });
1719
- function po(e, t) {
1719
+ function fo(e, t) {
1720
1720
  return e.value === void 0 && (e.value = t.defaultValue), e;
1721
1721
  }
1722
1722
  const vp = /* @__PURE__ */ w("$ZodPrefault", (e, t) => {
@@ -1727,10 +1727,10 @@ const vp = /* @__PURE__ */ w("$ZodPrefault", (e, t) => {
1727
1727
  return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
1728
1728
  }), e._zod.parse = (r, n) => {
1729
1729
  const a = t.innerType._zod.run(r, n);
1730
- return a instanceof Promise ? a.then((o) => fo(o, e)) : fo(a, e);
1730
+ return a instanceof Promise ? a.then((o) => go(o, e)) : go(a, e);
1731
1731
  };
1732
1732
  });
1733
- function fo(e, t) {
1733
+ function go(e, t) {
1734
1734
  return !e.issues.length && e.value === void 0 && e.issues.push({
1735
1735
  code: "invalid_type",
1736
1736
  expected: "nonoptional",
@@ -1781,10 +1781,10 @@ const Ep = /* @__PURE__ */ w("$ZodReadonly", (e, t) => {
1781
1781
  if (n.direction === "backward")
1782
1782
  return t.innerType._zod.run(r, n);
1783
1783
  const a = t.innerType._zod.run(r, n);
1784
- return a instanceof Promise ? a.then(go) : go(a);
1784
+ return a instanceof Promise ? a.then(ho) : ho(a);
1785
1785
  };
1786
1786
  });
1787
- function go(e) {
1787
+ function ho(e) {
1788
1788
  return e.value = Object.freeze(e.value), e;
1789
1789
  }
1790
1790
  const bp = /* @__PURE__ */ w("$ZodLazy", (e, t) => {
@@ -1805,11 +1805,11 @@ const bp = /* @__PURE__ */ w("$ZodLazy", (e, t) => {
1805
1805
  Ue.init(e, t), pe.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
1806
1806
  const n = r.value, a = t.fn(n);
1807
1807
  if (a instanceof Promise)
1808
- return a.then((o) => ho(o, r, n, e));
1809
- ho(a, r, n, e);
1808
+ return a.then((o) => mo(o, r, n, e));
1809
+ mo(a, r, n, e);
1810
1810
  };
1811
1811
  });
1812
- function ho(e, t, r, n) {
1812
+ function mo(e, t, r, n) {
1813
1813
  if (!e) {
1814
1814
  const a = {
1815
1815
  code: "custom",
@@ -1824,7 +1824,7 @@ function ho(e, t, r, n) {
1824
1824
  n._zod.def.params && (a.params = n._zod.def.params), t.issues.push(Ir(a));
1825
1825
  }
1826
1826
  }
1827
- var mo;
1827
+ var yo;
1828
1828
  class Sp {
1829
1829
  constructor() {
1830
1830
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
@@ -1857,7 +1857,7 @@ class Sp {
1857
1857
  function Ap() {
1858
1858
  return new Sp();
1859
1859
  }
1860
- (mo = globalThis).__zod_globalRegistry ?? (mo.__zod_globalRegistry = Ap());
1860
+ (yo = globalThis).__zod_globalRegistry ?? (yo.__zod_globalRegistry = Ap());
1861
1861
  const vr = globalThis.__zod_globalRegistry;
1862
1862
  // @__NO_SIDE_EFFECTS__
1863
1863
  function Np(e, t) {
@@ -1877,7 +1877,7 @@ function Op(e, t) {
1877
1877
  });
1878
1878
  }
1879
1879
  // @__NO_SIDE_EFFECTS__
1880
- function yo(e, t) {
1880
+ function vo(e, t) {
1881
1881
  return new e({
1882
1882
  type: "string",
1883
1883
  format: "guid",
@@ -2181,8 +2181,8 @@ function of(e, t) {
2181
2181
  });
2182
2182
  }
2183
2183
  // @__NO_SIDE_EFFECTS__
2184
- function vo(e, t) {
2185
- return new ai({
2184
+ function wo(e, t) {
2185
+ return new oi({
2186
2186
  check: "less_than",
2187
2187
  ...k(t),
2188
2188
  value: e,
@@ -2190,8 +2190,8 @@ function vo(e, t) {
2190
2190
  });
2191
2191
  }
2192
2192
  // @__NO_SIDE_EFFECTS__
2193
- function Pn(e, t) {
2194
- return new ai({
2193
+ function Cn(e, t) {
2194
+ return new oi({
2195
2195
  check: "less_than",
2196
2196
  ...k(t),
2197
2197
  value: e,
@@ -2199,8 +2199,8 @@ function Pn(e, t) {
2199
2199
  });
2200
2200
  }
2201
2201
  // @__NO_SIDE_EFFECTS__
2202
- function wo(e, t) {
2203
- return new oi({
2202
+ function _o(e, t) {
2203
+ return new si({
2204
2204
  check: "greater_than",
2205
2205
  ...k(t),
2206
2206
  value: e,
@@ -2208,8 +2208,8 @@ function wo(e, t) {
2208
2208
  });
2209
2209
  }
2210
2210
  // @__NO_SIDE_EFFECTS__
2211
- function Cn(e, t) {
2212
- return new oi({
2211
+ function Dn(e, t) {
2212
+ return new si({
2213
2213
  check: "greater_than",
2214
2214
  ...k(t),
2215
2215
  value: e,
@@ -2217,7 +2217,7 @@ function Cn(e, t) {
2217
2217
  });
2218
2218
  }
2219
2219
  // @__NO_SIDE_EFFECTS__
2220
- function _o(e, t) {
2220
+ function To(e, t) {
2221
2221
  return new hd({
2222
2222
  check: "multiple_of",
2223
2223
  ...k(t),
@@ -2225,7 +2225,7 @@ function _o(e, t) {
2225
2225
  });
2226
2226
  }
2227
2227
  // @__NO_SIDE_EFFECTS__
2228
- function pi(e, t) {
2228
+ function fi(e, t) {
2229
2229
  return new yd({
2230
2230
  check: "max_length",
2231
2231
  ...k(t),
@@ -2233,7 +2233,7 @@ function pi(e, t) {
2233
2233
  });
2234
2234
  }
2235
2235
  // @__NO_SIDE_EFFECTS__
2236
- function tn(e, t) {
2236
+ function rn(e, t) {
2237
2237
  return new vd({
2238
2238
  check: "min_length",
2239
2239
  ...k(t),
@@ -2241,7 +2241,7 @@ function tn(e, t) {
2241
2241
  });
2242
2242
  }
2243
2243
  // @__NO_SIDE_EFFECTS__
2244
- function fi(e, t) {
2244
+ function gi(e, t) {
2245
2245
  return new wd({
2246
2246
  check: "length_equals",
2247
2247
  ...k(t),
@@ -2377,7 +2377,7 @@ function Ef(e, t) {
2377
2377
  });
2378
2378
  return r._zod.check = e, r;
2379
2379
  }
2380
- function rn(e) {
2380
+ function nn(e) {
2381
2381
  let t = (e == null ? void 0 : e.target) ?? "draft-2020-12";
2382
2382
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2383
2383
  processors: e.processors ?? {},
@@ -2425,7 +2425,7 @@ function de(e, t, r = { path: [], schemaPath: [] }) {
2425
2425
  const l = t.metadataRegistry.get(e);
2426
2426
  return l && Object.assign(s.schema, l), t.io === "input" && ze(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((n = s.schema).default ?? (n.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
2427
2427
  }
2428
- function nn(e, t) {
2428
+ function an(e, t) {
2429
2429
  var s, i, l, u;
2430
2430
  const r = e.seen.get(t);
2431
2431
  if (!r)
@@ -2499,7 +2499,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2499
2499
  }
2500
2500
  }
2501
2501
  }
2502
- function an(e, t) {
2502
+ function on(e, t) {
2503
2503
  var s, i, l;
2504
2504
  const r = e.seen.get(t);
2505
2505
  if (!r)
@@ -2555,8 +2555,8 @@ function an(e, t) {
2555
2555
  value: {
2556
2556
  ...t["~standard"],
2557
2557
  jsonSchema: {
2558
- input: on(t, "input", e.processors),
2559
- output: on(t, "output", e.processors)
2558
+ input: sn(t, "input", e.processors),
2559
+ output: sn(t, "output", e.processors)
2560
2560
  }
2561
2561
  },
2562
2562
  enumerable: !1,
@@ -2609,11 +2609,11 @@ function ze(e, t) {
2609
2609
  return !1;
2610
2610
  }
2611
2611
  const bf = (e, t = {}) => (r) => {
2612
- const n = rn({ ...r, processors: t });
2613
- return de(e, n), nn(n, e), an(n, e);
2614
- }, on = (e, t, r = {}) => (n) => {
2615
- const { libraryOptions: a, target: o } = n ?? {}, s = rn({ ...a ?? {}, target: o, io: t, processors: r });
2616
- return de(e, s), nn(s, e), an(s, e);
2612
+ const n = nn({ ...r, processors: t });
2613
+ return de(e, n), an(n, e), on(n, e);
2614
+ }, sn = (e, t, r = {}) => (n) => {
2615
+ const { libraryOptions: a, target: o } = n ?? {}, s = nn({ ...a ?? {}, target: o, io: t, processors: r });
2616
+ return de(e, s), an(s, e), on(s, e);
2617
2617
  }, If = {
2618
2618
  guid: "uuid",
2619
2619
  url: "uri",
@@ -2621,7 +2621,7 @@ const bf = (e, t = {}) => (r) => {
2621
2621
  json_string: "json-string",
2622
2622
  regex: ""
2623
2623
  // do not set
2624
- }, gi = (e, t, r, n) => {
2624
+ }, hi = (e, t, r, n) => {
2625
2625
  const a = r;
2626
2626
  a.type = "string";
2627
2627
  const { minimum: o, maximum: s, format: i, patterns: l, contentEncoding: u } = e._zod.bag;
@@ -2634,10 +2634,10 @@ const bf = (e, t = {}) => (r) => {
2634
2634
  }))
2635
2635
  ]);
2636
2636
  }
2637
- }, hi = (e, t, r, n) => {
2637
+ }, mi = (e, t, r, n) => {
2638
2638
  const a = r, { minimum: o, maximum: s, format: i, multipleOf: l, exclusiveMaximum: u, exclusiveMinimum: c } = e._zod.bag;
2639
2639
  typeof i == "string" && i.includes("int") ? a.type = "integer" : a.type = "number", typeof c == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (a.minimum = c, a.exclusiveMinimum = !0) : a.exclusiveMinimum = c), typeof o == "number" && (a.minimum = o, typeof c == "number" && t.target !== "draft-04" && (c >= o ? delete a.minimum : delete a.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (a.maximum = u, a.exclusiveMaximum = !0) : a.exclusiveMaximum = u), typeof s == "number" && (a.maximum = s, typeof u == "number" && t.target !== "draft-04" && (u <= s ? delete a.maximum : delete a.exclusiveMaximum)), typeof l == "number" && (a.multipleOf = l);
2640
- }, mi = (e, t, r, n) => {
2640
+ }, yi = (e, t, r, n) => {
2641
2641
  r.type = "boolean";
2642
2642
  }, Sf = (e, t, r, n) => {
2643
2643
  if (t.unrepresentable === "throw")
@@ -2645,7 +2645,7 @@ const bf = (e, t = {}) => (r) => {
2645
2645
  }, Af = (e, t, r, n) => {
2646
2646
  if (t.unrepresentable === "throw")
2647
2647
  throw new Error("Symbols cannot be represented in JSON Schema");
2648
- }, yi = (e, t, r, n) => {
2648
+ }, vi = (e, t, r, n) => {
2649
2649
  t.target === "openapi-3.0" ? (r.type = "string", r.nullable = !0, r.enum = [null]) : r.type = "null";
2650
2650
  }, Nf = (e, t, r, n) => {
2651
2651
  if (t.unrepresentable === "throw")
@@ -2653,17 +2653,17 @@ const bf = (e, t = {}) => (r) => {
2653
2653
  }, Of = (e, t, r, n) => {
2654
2654
  if (t.unrepresentable === "throw")
2655
2655
  throw new Error("Void cannot be represented in JSON Schema");
2656
- }, vi = (e, t, r, n) => {
2657
- r.not = {};
2658
2656
  }, wi = (e, t, r, n) => {
2657
+ r.not = {};
2659
2658
  }, _i = (e, t, r, n) => {
2659
+ }, Ti = (e, t, r, n) => {
2660
2660
  }, Rf = (e, t, r, n) => {
2661
2661
  if (t.unrepresentable === "throw")
2662
2662
  throw new Error("Date cannot be represented in JSON Schema");
2663
- }, Ti = (e, t, r, n) => {
2664
- const a = e._zod.def, o = Hs(a.entries);
2665
- o.every((s) => typeof s == "number") && (r.type = "number"), o.every((s) => typeof s == "string") && (r.type = "string"), r.enum = o;
2666
2663
  }, Ei = (e, t, r, n) => {
2664
+ const a = e._zod.def, o = Js(a.entries);
2665
+ o.every((s) => typeof s == "number") && (r.type = "number"), o.every((s) => typeof s == "string") && (r.type = "string"), r.enum = o;
2666
+ }, bi = (e, t, r, n) => {
2667
2667
  const a = e._zod.def, o = [];
2668
2668
  for (const s of a.values)
2669
2669
  if (s === void 0) {
@@ -2697,13 +2697,13 @@ const bf = (e, t = {}) => (r) => {
2697
2697
  s !== void 0 && (o.minLength = s), i !== void 0 && (o.maxLength = i), l ? l.length === 1 ? (o.contentMediaType = l[0], Object.assign(a, o)) : (Object.assign(a, o), a.anyOf = l.map((u) => ({ contentMediaType: u }))) : Object.assign(a, o);
2698
2698
  }, Cf = (e, t, r, n) => {
2699
2699
  r.type = "boolean";
2700
- }, bi = (e, t, r, n) => {
2700
+ }, Ii = (e, t, r, n) => {
2701
2701
  if (t.unrepresentable === "throw")
2702
2702
  throw new Error("Custom types cannot be represented in JSON Schema");
2703
2703
  }, Df = (e, t, r, n) => {
2704
2704
  if (t.unrepresentable === "throw")
2705
2705
  throw new Error("Function types cannot be represented in JSON Schema");
2706
- }, Ii = (e, t, r, n) => {
2706
+ }, Si = (e, t, r, n) => {
2707
2707
  if (t.unrepresentable === "throw")
2708
2708
  throw new Error("Transforms cannot be represented in JSON Schema");
2709
2709
  }, $f = (e, t, r, n) => {
@@ -2712,10 +2712,10 @@ const bf = (e, t = {}) => (r) => {
2712
2712
  }, Mf = (e, t, r, n) => {
2713
2713
  if (t.unrepresentable === "throw")
2714
2714
  throw new Error("Set cannot be represented in JSON Schema");
2715
- }, Si = (e, t, r, n) => {
2715
+ }, Ai = (e, t, r, n) => {
2716
2716
  const a = r, o = e._zod.def, { minimum: s, maximum: i } = e._zod.bag;
2717
2717
  typeof s == "number" && (a.minItems = s), typeof i == "number" && (a.maxItems = i), a.type = "array", a.items = de(o.element, t, { ...n, path: [...n.path, "items"] });
2718
- }, Ai = (e, t, r, n) => {
2718
+ }, Ni = (e, t, r, n) => {
2719
2719
  var u;
2720
2720
  const a = r, o = e._zod.def;
2721
2721
  a.type = "object", a.properties = {};
@@ -2733,13 +2733,13 @@ const bf = (e, t = {}) => (r) => {
2733
2733
  ...n,
2734
2734
  path: [...n.path, "additionalProperties"]
2735
2735
  })) : t.io === "output" && (a.additionalProperties = !1);
2736
- }, Ni = (e, t, r, n) => {
2736
+ }, Oi = (e, t, r, n) => {
2737
2737
  const a = e._zod.def, o = a.inclusive === !1, s = a.options.map((i, l) => de(i, t, {
2738
2738
  ...n,
2739
2739
  path: [...n.path, o ? "oneOf" : "anyOf", l]
2740
2740
  }));
2741
2741
  o ? r.oneOf = s : r.anyOf = s;
2742
- }, Oi = (e, t, r, n) => {
2742
+ }, Ri = (e, t, r, n) => {
2743
2743
  const a = e._zod.def, o = de(a.left, t, {
2744
2744
  ...n,
2745
2745
  path: [...n.path, "allOf", 0]
@@ -2766,7 +2766,7 @@ const bf = (e, t = {}) => (r) => {
2766
2766
  }, u && a.items.anyOf.push(u), a.minItems = l.length, u || (a.maxItems = l.length)) : (a.items = l, u && (a.additionalItems = u));
2767
2767
  const { minimum: c, maximum: d } = e._zod.bag;
2768
2768
  typeof c == "number" && (a.minItems = c), typeof d == "number" && (a.maxItems = d);
2769
- }, Ri = (e, t, r, n) => {
2769
+ }, xi = (e, t, r, n) => {
2770
2770
  const a = r, o = e._zod.def;
2771
2771
  a.type = "object";
2772
2772
  const s = o.keyType, i = s._zod.bag, l = i == null ? void 0 : i.patterns;
@@ -2791,25 +2791,25 @@ const bf = (e, t = {}) => (r) => {
2791
2791
  const c = [...u].filter((d) => typeof d == "string" || typeof d == "number");
2792
2792
  c.length > 0 && (a.required = c);
2793
2793
  }
2794
- }, xi = (e, t, r, n) => {
2794
+ }, ki = (e, t, r, n) => {
2795
2795
  const a = e._zod.def, o = de(a.innerType, t, n), s = t.seen.get(e);
2796
2796
  t.target === "openapi-3.0" ? (s.ref = a.innerType, r.nullable = !0) : r.anyOf = [o, { type: "null" }];
2797
- }, ki = (e, t, r, n) => {
2797
+ }, Pi = (e, t, r, n) => {
2798
2798
  const a = e._zod.def;
2799
2799
  de(a.innerType, t, n);
2800
2800
  const o = t.seen.get(e);
2801
2801
  o.ref = a.innerType;
2802
- }, Pi = (e, t, r, n) => {
2802
+ }, Ci = (e, t, r, n) => {
2803
2803
  const a = e._zod.def;
2804
2804
  de(a.innerType, t, n);
2805
2805
  const o = t.seen.get(e);
2806
2806
  o.ref = a.innerType, r.default = JSON.parse(JSON.stringify(a.defaultValue));
2807
- }, Ci = (e, t, r, n) => {
2807
+ }, Di = (e, t, r, n) => {
2808
2808
  const a = e._zod.def;
2809
2809
  de(a.innerType, t, n);
2810
2810
  const o = t.seen.get(e);
2811
2811
  o.ref = a.innerType, t.io === "input" && (r._prefault = JSON.parse(JSON.stringify(a.defaultValue)));
2812
- }, Di = (e, t, r, n) => {
2812
+ }, $i = (e, t, r, n) => {
2813
2813
  const a = e._zod.def;
2814
2814
  de(a.innerType, t, n);
2815
2815
  const o = t.seen.get(e);
@@ -2821,12 +2821,12 @@ const bf = (e, t = {}) => (r) => {
2821
2821
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2822
2822
  }
2823
2823
  r.default = s;
2824
- }, $i = (e, t, r, n) => {
2824
+ }, Mi = (e, t, r, n) => {
2825
2825
  const a = e._zod.def, o = t.io === "input" ? a.in._zod.def.type === "transform" ? a.out : a.in : a.out;
2826
2826
  de(o, t, n);
2827
2827
  const s = t.seen.get(e);
2828
2828
  s.ref = o;
2829
- }, Mi = (e, t, r, n) => {
2829
+ }, Fi = (e, t, r, n) => {
2830
2830
  const a = e._zod.def;
2831
2831
  de(a.innerType, t, n);
2832
2832
  const o = t.seen.get(e);
@@ -2841,55 +2841,55 @@ const bf = (e, t = {}) => (r) => {
2841
2841
  de(a.innerType, t, n);
2842
2842
  const o = t.seen.get(e);
2843
2843
  o.ref = a.innerType;
2844
- }, Fi = (e, t, r, n) => {
2844
+ }, zi = (e, t, r, n) => {
2845
2845
  const a = e._zod.innerType;
2846
2846
  de(a, t, n);
2847
2847
  const o = t.seen.get(e);
2848
2848
  o.ref = a;
2849
- }, To = {
2850
- string: gi,
2851
- number: hi,
2852
- boolean: mi,
2849
+ }, Eo = {
2850
+ string: hi,
2851
+ number: mi,
2852
+ boolean: yi,
2853
2853
  bigint: Sf,
2854
2854
  symbol: Af,
2855
- null: yi,
2855
+ null: vi,
2856
2856
  undefined: Nf,
2857
2857
  void: Of,
2858
- never: vi,
2859
- any: wi,
2860
- unknown: _i,
2858
+ never: wi,
2859
+ any: _i,
2860
+ unknown: Ti,
2861
2861
  date: Rf,
2862
- enum: Ti,
2863
- literal: Ei,
2862
+ enum: Ei,
2863
+ literal: bi,
2864
2864
  nan: xf,
2865
2865
  template_literal: kf,
2866
2866
  file: Pf,
2867
2867
  success: Cf,
2868
- custom: bi,
2868
+ custom: Ii,
2869
2869
  function: Df,
2870
- transform: Ii,
2870
+ transform: Si,
2871
2871
  map: $f,
2872
2872
  set: Mf,
2873
- array: Si,
2874
- object: Ai,
2875
- union: Ni,
2876
- intersection: Oi,
2873
+ array: Ai,
2874
+ object: Ni,
2875
+ union: Oi,
2876
+ intersection: Ri,
2877
2877
  tuple: Ff,
2878
- record: Ri,
2879
- nullable: xi,
2880
- nonoptional: ki,
2881
- default: Pi,
2882
- prefault: Ci,
2883
- catch: Di,
2884
- pipe: $i,
2885
- readonly: Mi,
2878
+ record: xi,
2879
+ nullable: ki,
2880
+ nonoptional: Pi,
2881
+ default: Ci,
2882
+ prefault: Di,
2883
+ catch: $i,
2884
+ pipe: Mi,
2885
+ readonly: Fi,
2886
2886
  promise: zf,
2887
2887
  optional: va,
2888
- lazy: Fi
2888
+ lazy: zi
2889
2889
  };
2890
2890
  function Lf(e, t) {
2891
2891
  if ("_idmap" in e) {
2892
- const n = e, a = rn({ ...t, processors: To }), o = {};
2892
+ const n = e, a = nn({ ...t, processors: Eo }), o = {};
2893
2893
  for (const l of n._idmap.entries()) {
2894
2894
  const [u, c] = l;
2895
2895
  de(c, a);
@@ -2902,7 +2902,7 @@ function Lf(e, t) {
2902
2902
  a.external = i;
2903
2903
  for (const l of n._idmap.entries()) {
2904
2904
  const [u, c] = l;
2905
- nn(a, c), s[u] = an(a, c);
2905
+ an(a, c), s[u] = on(a, c);
2906
2906
  }
2907
2907
  if (Object.keys(o).length > 0) {
2908
2908
  const l = a.target === "draft-2020-12" ? "$defs" : "definitions";
@@ -2912,8 +2912,8 @@ function Lf(e, t) {
2912
2912
  }
2913
2913
  return { schemas: s };
2914
2914
  }
2915
- const r = rn({ ...t, processors: To });
2916
- return de(e, r), nn(r, e), an(r, e);
2915
+ const r = nn({ ...t, processors: Eo });
2916
+ return de(e, r), an(r, e), on(r, e);
2917
2917
  }
2918
2918
  const Uf = /* @__PURE__ */ w("ZodISODateTime", (e, t) => {
2919
2919
  Ud.init(e, t), _e.init(e, t);
@@ -2940,7 +2940,7 @@ function Hf(e) {
2940
2940
  return /* @__PURE__ */ Xp(qf, e);
2941
2941
  }
2942
2942
  const Jf = (e, t) => {
2943
- Ks.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2943
+ Xs.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2944
2944
  format: {
2945
2945
  value: (r) => Pc(e, r)
2946
2946
  // enumerable: false,
@@ -2970,10 +2970,10 @@ const Jf = (e, t) => {
2970
2970
  });
2971
2971
  }, Ye = w("ZodError", Jf, {
2972
2972
  Parent: Error
2973
- }), Yf = /* @__PURE__ */ ha(Ye), Wf = /* @__PURE__ */ ma(Ye), Kf = /* @__PURE__ */ _n(Ye), zi = /* @__PURE__ */ Tn(Ye), Xf = /* @__PURE__ */ $c(Ye), Qf = /* @__PURE__ */ Mc(Ye), eg = /* @__PURE__ */ Fc(Ye), tg = /* @__PURE__ */ zc(Ye), rg = /* @__PURE__ */ Lc(Ye), ng = /* @__PURE__ */ Uc(Ye), ag = /* @__PURE__ */ Zc(Ye), og = /* @__PURE__ */ jc(Ye), fe = /* @__PURE__ */ w("ZodType", (e, t) => (pe.init(e, t), Object.assign(e["~standard"], {
2973
+ }), Yf = /* @__PURE__ */ ha(Ye), Wf = /* @__PURE__ */ ma(Ye), Kf = /* @__PURE__ */ Tn(Ye), Li = /* @__PURE__ */ En(Ye), Xf = /* @__PURE__ */ $c(Ye), Qf = /* @__PURE__ */ Mc(Ye), eg = /* @__PURE__ */ Fc(Ye), tg = /* @__PURE__ */ zc(Ye), rg = /* @__PURE__ */ Lc(Ye), ng = /* @__PURE__ */ Uc(Ye), ag = /* @__PURE__ */ Zc(Ye), og = /* @__PURE__ */ jc(Ye), fe = /* @__PURE__ */ w("ZodType", (e, t) => (pe.init(e, t), Object.assign(e["~standard"], {
2974
2974
  jsonSchema: {
2975
- input: on(e, "input"),
2976
- output: on(e, "output")
2975
+ input: sn(e, "input"),
2976
+ output: sn(e, "output")
2977
2977
  }
2978
2978
  }), e.toJSONSchema = bf(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(Ot(t, {
2979
2979
  checks: [
@@ -2982,7 +2982,7 @@ const Jf = (e, t) => {
2982
2982
  ]
2983
2983
  }), {
2984
2984
  parent: !0
2985
- }), e.with = e.check, e.clone = (r, n) => Rt(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => Yf(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => Kf(e, r, n), e.parseAsync = async (r, n) => Wf(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => zi(e, r, n), e.spa = e.safeParseAsync, e.encode = (r, n) => Xf(e, r, n), e.decode = (r, n) => Qf(e, r, n), e.encodeAsync = async (r, n) => eg(e, r, n), e.decodeAsync = async (r, n) => tg(e, r, n), e.safeEncode = (r, n) => rg(e, r, n), e.safeDecode = (r, n) => ng(e, r, n), e.safeEncodeAsync = async (r, n) => ag(e, r, n), e.safeDecodeAsync = async (r, n) => og(e, r, n), e.refine = (r, n) => e.check(ah(r, n)), e.superRefine = (r) => e.check(oh(r)), e.overwrite = (r) => e.check(/* @__PURE__ */ sr(r)), e.optional = () => Io(e), e.exactOptional = () => Gg(e), e.nullable = () => So(e), e.nullish = () => Io(So(e)), e.nonoptional = (r) => Yg(e, r), e.array = () => Ge(e), e.or = (r) => $e([e, r]), e.and = (r) => Fg(e, r), e.transform = (r) => Ao(e, Zg(r)), e.default = (r) => qg(e, r), e.prefault = (r) => Jg(e, r), e.catch = (r) => Kg(e, r), e.pipe = (r) => Ao(e, r), e.readonly = () => eh(e), e.describe = (r) => {
2985
+ }), e.with = e.check, e.clone = (r, n) => Rt(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => Yf(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => Kf(e, r, n), e.parseAsync = async (r, n) => Wf(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => Li(e, r, n), e.spa = e.safeParseAsync, e.encode = (r, n) => Xf(e, r, n), e.decode = (r, n) => Qf(e, r, n), e.encodeAsync = async (r, n) => eg(e, r, n), e.decodeAsync = async (r, n) => tg(e, r, n), e.safeEncode = (r, n) => rg(e, r, n), e.safeDecode = (r, n) => ng(e, r, n), e.safeEncodeAsync = async (r, n) => ag(e, r, n), e.safeDecodeAsync = async (r, n) => og(e, r, n), e.refine = (r, n) => e.check(ah(r, n)), e.superRefine = (r) => e.check(oh(r)), e.overwrite = (r) => e.check(/* @__PURE__ */ sr(r)), e.optional = () => So(e), e.exactOptional = () => Gg(e), e.nullable = () => Ao(e), e.nullish = () => So(Ao(e)), e.nonoptional = (r) => Yg(e, r), e.array = () => Ge(e), e.or = (r) => $e([e, r]), e.and = (r) => Fg(e, r), e.transform = (r) => No(e, Zg(r)), e.default = (r) => qg(e, r), e.prefault = (r) => Jg(e, r), e.catch = (r) => Kg(e, r), e.pipe = (r) => No(e, r), e.readonly = () => eh(e), e.describe = (r) => {
2986
2986
  const n = e.clone();
2987
2987
  return vr.add(n, { description: r }), n;
2988
2988
  }, Object.defineProperty(e, "description", {
@@ -2996,21 +2996,21 @@ const Jf = (e, t) => {
2996
2996
  return vr.get(e);
2997
2997
  const n = e.clone();
2998
2998
  return vr.add(n, r[0]), n;
2999
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (r) => r(e), e)), Li = /* @__PURE__ */ w("_ZodString", (e, t) => {
3000
- ya.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => gi(e, n, a);
2999
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (r) => r(e), e)), Ui = /* @__PURE__ */ w("_ZodString", (e, t) => {
3000
+ ya.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => hi(e, n, a);
3001
3001
  const r = e._zod.bag;
3002
- e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(/* @__PURE__ */ sf(...n)), e.includes = (...n) => e.check(/* @__PURE__ */ cf(...n)), e.startsWith = (...n) => e.check(/* @__PURE__ */ df(...n)), e.endsWith = (...n) => e.check(/* @__PURE__ */ pf(...n)), e.min = (...n) => e.check(/* @__PURE__ */ tn(...n)), e.max = (...n) => e.check(/* @__PURE__ */ pi(...n)), e.length = (...n) => e.check(/* @__PURE__ */ fi(...n)), e.nonempty = (...n) => e.check(/* @__PURE__ */ tn(1, ...n)), e.lowercase = (n) => e.check(/* @__PURE__ */ lf(n)), e.uppercase = (n) => e.check(/* @__PURE__ */ uf(n)), e.trim = () => e.check(/* @__PURE__ */ gf()), e.normalize = (...n) => e.check(/* @__PURE__ */ ff(...n)), e.toLowerCase = () => e.check(/* @__PURE__ */ hf()), e.toUpperCase = () => e.check(/* @__PURE__ */ mf()), e.slugify = () => e.check(/* @__PURE__ */ yf());
3002
+ e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(/* @__PURE__ */ sf(...n)), e.includes = (...n) => e.check(/* @__PURE__ */ cf(...n)), e.startsWith = (...n) => e.check(/* @__PURE__ */ df(...n)), e.endsWith = (...n) => e.check(/* @__PURE__ */ pf(...n)), e.min = (...n) => e.check(/* @__PURE__ */ rn(...n)), e.max = (...n) => e.check(/* @__PURE__ */ fi(...n)), e.length = (...n) => e.check(/* @__PURE__ */ gi(...n)), e.nonempty = (...n) => e.check(/* @__PURE__ */ rn(1, ...n)), e.lowercase = (n) => e.check(/* @__PURE__ */ lf(n)), e.uppercase = (n) => e.check(/* @__PURE__ */ uf(n)), e.trim = () => e.check(/* @__PURE__ */ gf()), e.normalize = (...n) => e.check(/* @__PURE__ */ ff(...n)), e.toLowerCase = () => e.check(/* @__PURE__ */ hf()), e.toUpperCase = () => e.check(/* @__PURE__ */ mf()), e.slugify = () => e.check(/* @__PURE__ */ yf());
3003
3003
  }), sg = /* @__PURE__ */ w("ZodString", (e, t) => {
3004
- ya.init(e, t), Li.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ Op(ig, r)), e.url = (r) => e.check(/* @__PURE__ */ Cp(lg, r)), e.jwt = (r) => e.check(/* @__PURE__ */ Jp(bg, r)), e.emoji = (r) => e.check(/* @__PURE__ */ Dp(ug, r)), e.guid = (r) => e.check(/* @__PURE__ */ yo(Eo, r)), e.uuid = (r) => e.check(/* @__PURE__ */ Rp(Yr, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ xp(Yr, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ kp(Yr, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ Pp(Yr, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ $p(cg, r)), e.guid = (r) => e.check(/* @__PURE__ */ yo(Eo, r)), e.cuid = (r) => e.check(/* @__PURE__ */ Mp(dg, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ Fp(pg, r)), e.ulid = (r) => e.check(/* @__PURE__ */ zp(fg, r)), e.base64 = (r) => e.check(/* @__PURE__ */ Vp(_g, r)), e.base64url = (r) => e.check(/* @__PURE__ */ qp(Tg, r)), e.xid = (r) => e.check(/* @__PURE__ */ Lp(gg, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ Up(hg, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ Zp(mg, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ jp(yg, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ Gp(vg, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ Bp(wg, r)), e.e164 = (r) => e.check(/* @__PURE__ */ Hp(Eg, r)), e.datetime = (r) => e.check(Zf(r)), e.date = (r) => e.check(Gf(r)), e.time = (r) => e.check(Vf(r)), e.duration = (r) => e.check(Hf(r));
3004
+ ya.init(e, t), Ui.init(e, t), e.email = (r) => e.check(/* @__PURE__ */ Op(ig, r)), e.url = (r) => e.check(/* @__PURE__ */ Cp(lg, r)), e.jwt = (r) => e.check(/* @__PURE__ */ Jp(bg, r)), e.emoji = (r) => e.check(/* @__PURE__ */ Dp(ug, r)), e.guid = (r) => e.check(/* @__PURE__ */ vo(bo, r)), e.uuid = (r) => e.check(/* @__PURE__ */ Rp(Yr, r)), e.uuidv4 = (r) => e.check(/* @__PURE__ */ xp(Yr, r)), e.uuidv6 = (r) => e.check(/* @__PURE__ */ kp(Yr, r)), e.uuidv7 = (r) => e.check(/* @__PURE__ */ Pp(Yr, r)), e.nanoid = (r) => e.check(/* @__PURE__ */ $p(cg, r)), e.guid = (r) => e.check(/* @__PURE__ */ vo(bo, r)), e.cuid = (r) => e.check(/* @__PURE__ */ Mp(dg, r)), e.cuid2 = (r) => e.check(/* @__PURE__ */ Fp(pg, r)), e.ulid = (r) => e.check(/* @__PURE__ */ zp(fg, r)), e.base64 = (r) => e.check(/* @__PURE__ */ Vp(_g, r)), e.base64url = (r) => e.check(/* @__PURE__ */ qp(Tg, r)), e.xid = (r) => e.check(/* @__PURE__ */ Lp(gg, r)), e.ksuid = (r) => e.check(/* @__PURE__ */ Up(hg, r)), e.ipv4 = (r) => e.check(/* @__PURE__ */ Zp(mg, r)), e.ipv6 = (r) => e.check(/* @__PURE__ */ jp(yg, r)), e.cidrv4 = (r) => e.check(/* @__PURE__ */ Gp(vg, r)), e.cidrv6 = (r) => e.check(/* @__PURE__ */ Bp(wg, r)), e.e164 = (r) => e.check(/* @__PURE__ */ Hp(Eg, r)), e.datetime = (r) => e.check(Zf(r)), e.date = (r) => e.check(Gf(r)), e.time = (r) => e.check(Vf(r)), e.duration = (r) => e.check(Hf(r));
3005
3005
  });
3006
3006
  function x(e) {
3007
3007
  return /* @__PURE__ */ Np(sg, e);
3008
3008
  }
3009
3009
  const _e = /* @__PURE__ */ w("ZodStringFormat", (e, t) => {
3010
- ve.init(e, t), Li.init(e, t);
3010
+ ve.init(e, t), Ui.init(e, t);
3011
3011
  }), ig = /* @__PURE__ */ w("ZodEmail", (e, t) => {
3012
3012
  kd.init(e, t), _e.init(e, t);
3013
- }), Eo = /* @__PURE__ */ w("ZodGUID", (e, t) => {
3013
+ }), bo = /* @__PURE__ */ w("ZodGUID", (e, t) => {
3014
3014
  Rd.init(e, t), _e.init(e, t);
3015
3015
  }), Yr = /* @__PURE__ */ w("ZodUUID", (e, t) => {
3016
3016
  xd.init(e, t), _e.init(e, t);
@@ -3046,58 +3046,58 @@ const _e = /* @__PURE__ */ w("ZodStringFormat", (e, t) => {
3046
3046
  Kd.init(e, t), _e.init(e, t);
3047
3047
  }), bg = /* @__PURE__ */ w("ZodJWT", (e, t) => {
3048
3048
  Qd.init(e, t), _e.init(e, t);
3049
- }), Ui = /* @__PURE__ */ w("ZodNumber", (e, t) => {
3050
- ii.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => hi(e, n, a), e.gt = (n, a) => e.check(/* @__PURE__ */ wo(n, a)), e.gte = (n, a) => e.check(/* @__PURE__ */ Cn(n, a)), e.min = (n, a) => e.check(/* @__PURE__ */ Cn(n, a)), e.lt = (n, a) => e.check(/* @__PURE__ */ vo(n, a)), e.lte = (n, a) => e.check(/* @__PURE__ */ Pn(n, a)), e.max = (n, a) => e.check(/* @__PURE__ */ Pn(n, a)), e.int = (n) => e.check(bo(n)), e.safe = (n) => e.check(bo(n)), e.positive = (n) => e.check(/* @__PURE__ */ wo(0, n)), e.nonnegative = (n) => e.check(/* @__PURE__ */ Cn(0, n)), e.negative = (n) => e.check(/* @__PURE__ */ vo(0, n)), e.nonpositive = (n) => e.check(/* @__PURE__ */ Pn(0, n)), e.multipleOf = (n, a) => e.check(/* @__PURE__ */ _o(n, a)), e.step = (n, a) => e.check(/* @__PURE__ */ _o(n, a)), e.finite = () => e;
3049
+ }), Zi = /* @__PURE__ */ w("ZodNumber", (e, t) => {
3050
+ li.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => mi(e, n, a), e.gt = (n, a) => e.check(/* @__PURE__ */ _o(n, a)), e.gte = (n, a) => e.check(/* @__PURE__ */ Dn(n, a)), e.min = (n, a) => e.check(/* @__PURE__ */ Dn(n, a)), e.lt = (n, a) => e.check(/* @__PURE__ */ wo(n, a)), e.lte = (n, a) => e.check(/* @__PURE__ */ Cn(n, a)), e.max = (n, a) => e.check(/* @__PURE__ */ Cn(n, a)), e.int = (n) => e.check(Io(n)), e.safe = (n) => e.check(Io(n)), e.positive = (n) => e.check(/* @__PURE__ */ _o(0, n)), e.nonnegative = (n) => e.check(/* @__PURE__ */ Dn(0, n)), e.negative = (n) => e.check(/* @__PURE__ */ wo(0, n)), e.nonpositive = (n) => e.check(/* @__PURE__ */ Cn(0, n)), e.multipleOf = (n, a) => e.check(/* @__PURE__ */ To(n, a)), e.step = (n, a) => e.check(/* @__PURE__ */ To(n, a)), e.finite = () => e;
3051
3051
  const r = e._zod.bag;
3052
3052
  e.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), e.isFinite = !0, e.format = r.format ?? null;
3053
3053
  });
3054
- function sn(e) {
3055
- return /* @__PURE__ */ Qp(Ui, e);
3054
+ function ln(e) {
3055
+ return /* @__PURE__ */ Qp(Zi, e);
3056
3056
  }
3057
3057
  const Ig = /* @__PURE__ */ w("ZodNumberFormat", (e, t) => {
3058
- ep.init(e, t), Ui.init(e, t);
3058
+ ep.init(e, t), Zi.init(e, t);
3059
3059
  });
3060
- function bo(e) {
3060
+ function Io(e) {
3061
3061
  return /* @__PURE__ */ ef(Ig, e);
3062
3062
  }
3063
3063
  const Sg = /* @__PURE__ */ w("ZodBoolean", (e, t) => {
3064
- tp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => mi(e, r, n);
3064
+ tp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => yi(e, r, n);
3065
3065
  });
3066
3066
  function wa(e) {
3067
3067
  return /* @__PURE__ */ tf(Sg, e);
3068
3068
  }
3069
3069
  const Ag = /* @__PURE__ */ w("ZodNull", (e, t) => {
3070
- rp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => yi(e, r, n);
3070
+ rp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => vi(e, r, n);
3071
3071
  });
3072
3072
  function Ng(e) {
3073
3073
  return /* @__PURE__ */ rf(Ag, e);
3074
3074
  }
3075
3075
  const Og = /* @__PURE__ */ w("ZodAny", (e, t) => {
3076
- np.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => wi();
3076
+ np.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => _i();
3077
3077
  });
3078
3078
  function Et() {
3079
3079
  return /* @__PURE__ */ nf(Og);
3080
3080
  }
3081
3081
  const Rg = /* @__PURE__ */ w("ZodUnknown", (e, t) => {
3082
- ap.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => _i();
3082
+ ap.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ti();
3083
3083
  });
3084
3084
  function zt() {
3085
3085
  return /* @__PURE__ */ af(Rg);
3086
3086
  }
3087
3087
  const xg = /* @__PURE__ */ w("ZodNever", (e, t) => {
3088
- op.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => vi(e, r, n);
3088
+ op.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => wi(e, r, n);
3089
3089
  });
3090
3090
  function kg(e) {
3091
3091
  return /* @__PURE__ */ of(xg, e);
3092
3092
  }
3093
3093
  const Pg = /* @__PURE__ */ w("ZodArray", (e, t) => {
3094
- sp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Si(e, r, n, a), e.element = t.element, e.min = (r, n) => e.check(/* @__PURE__ */ tn(r, n)), e.nonempty = (r) => e.check(/* @__PURE__ */ tn(1, r)), e.max = (r, n) => e.check(/* @__PURE__ */ pi(r, n)), e.length = (r, n) => e.check(/* @__PURE__ */ fi(r, n)), e.unwrap = () => e.element;
3094
+ sp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ai(e, r, n, a), e.element = t.element, e.min = (r, n) => e.check(/* @__PURE__ */ rn(r, n)), e.nonempty = (r) => e.check(/* @__PURE__ */ rn(1, r)), e.max = (r, n) => e.check(/* @__PURE__ */ fi(r, n)), e.length = (r, n) => e.check(/* @__PURE__ */ gi(r, n)), e.unwrap = () => e.element;
3095
3095
  });
3096
3096
  function Ge(e, t) {
3097
3097
  return /* @__PURE__ */ vf(Pg, e, t);
3098
3098
  }
3099
3099
  const Cg = /* @__PURE__ */ w("ZodObject", (e, t) => {
3100
- lp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ai(e, r, n, a), W(e, "shape", () => t.shape), e.keyof = () => ji(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: zt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: zt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: kg() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => Ac(e, r), e.safeExtend = (r) => Nc(e, r), e.merge = (r) => Oc(e, r), e.pick = (r) => Ic(e, r), e.omit = (r) => Sc(e, r), e.partial = (...r) => Rc(Gi, e, r[0]), e.required = (...r) => xc(Bi, e, r[0]);
3100
+ lp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ni(e, r, n, a), W(e, "shape", () => t.shape), e.keyof = () => Gi(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: zt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: zt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: kg() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => Ac(e, r), e.safeExtend = (r) => Nc(e, r), e.merge = (r) => Oc(e, r), e.pick = (r) => Ic(e, r), e.omit = (r) => Sc(e, r), e.partial = (...r) => Rc(Bi, e, r[0]), e.required = (...r) => xc(Vi, e, r[0]);
3101
3101
  });
3102
3102
  function B(e, t) {
3103
3103
  const r = {
@@ -3107,18 +3107,18 @@ function B(e, t) {
3107
3107
  };
3108
3108
  return new Cg(r);
3109
3109
  }
3110
- const Zi = /* @__PURE__ */ w("ZodUnion", (e, t) => {
3111
- ci.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ni(e, r, n, a), e.options = t.options;
3110
+ const ji = /* @__PURE__ */ w("ZodUnion", (e, t) => {
3111
+ di.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Oi(e, r, n, a), e.options = t.options;
3112
3112
  });
3113
3113
  function $e(e, t) {
3114
- return new Zi({
3114
+ return new ji({
3115
3115
  type: "union",
3116
3116
  options: e,
3117
3117
  ...k(t)
3118
3118
  });
3119
3119
  }
3120
3120
  const Dg = /* @__PURE__ */ w("ZodDiscriminatedUnion", (e, t) => {
3121
- Zi.init(e, t), up.init(e, t);
3121
+ ji.init(e, t), up.init(e, t);
3122
3122
  });
3123
3123
  function $g(e, t, r) {
3124
3124
  return new Dg({
@@ -3129,7 +3129,7 @@ function $g(e, t, r) {
3129
3129
  });
3130
3130
  }
3131
3131
  const Mg = /* @__PURE__ */ w("ZodIntersection", (e, t) => {
3132
- cp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Oi(e, r, n, a);
3132
+ cp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ri(e, r, n, a);
3133
3133
  });
3134
3134
  function Fg(e, t) {
3135
3135
  return new Mg({
@@ -3139,7 +3139,7 @@ function Fg(e, t) {
3139
3139
  });
3140
3140
  }
3141
3141
  const zg = /* @__PURE__ */ w("ZodRecord", (e, t) => {
3142
- dp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ri(e, r, n, a), e.keyType = t.keyType, e.valueType = t.valueType;
3142
+ dp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => xi(e, r, n, a), e.keyType = t.keyType, e.valueType = t.valueType;
3143
3143
  });
3144
3144
  function At(e, t, r) {
3145
3145
  return new zg({
@@ -3150,7 +3150,7 @@ function At(e, t, r) {
3150
3150
  });
3151
3151
  }
3152
3152
  const Qn = /* @__PURE__ */ w("ZodEnum", (e, t) => {
3153
- pp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => Ti(e, n, a), e.enum = t.entries, e.options = Object.values(t.entries);
3153
+ pp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (n, a, o) => Ei(e, n, a), e.enum = t.entries, e.options = Object.values(t.entries);
3154
3154
  const r = new Set(Object.keys(t.entries));
3155
3155
  e.extract = (n, a) => {
3156
3156
  const o = {};
@@ -3180,7 +3180,7 @@ const Qn = /* @__PURE__ */ w("ZodEnum", (e, t) => {
3180
3180
  });
3181
3181
  };
3182
3182
  });
3183
- function ji(e, t) {
3183
+ function Gi(e, t) {
3184
3184
  const r = Array.isArray(e) ? Object.fromEntries(e.map((n) => [n, n])) : e;
3185
3185
  return new Qn({
3186
3186
  type: "enum",
@@ -3189,7 +3189,7 @@ function ji(e, t) {
3189
3189
  });
3190
3190
  }
3191
3191
  const Lg = /* @__PURE__ */ w("ZodLiteral", (e, t) => {
3192
- fp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ei(e, r, n), e.values = new Set(t.values), Object.defineProperty(e, "value", {
3192
+ fp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => bi(e, r, n), e.values = new Set(t.values), Object.defineProperty(e, "value", {
3193
3193
  get() {
3194
3194
  if (t.values.length > 1)
3195
3195
  throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
@@ -3205,9 +3205,9 @@ function re(e, t) {
3205
3205
  });
3206
3206
  }
3207
3207
  const Ug = /* @__PURE__ */ w("ZodTransform", (e, t) => {
3208
- gp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ii(e, r), e._zod.parse = (r, n) => {
3208
+ gp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Si(e, r), e._zod.parse = (r, n) => {
3209
3209
  if (n.direction === "backward")
3210
- throw new Vs(e.constructor.name);
3210
+ throw new qs(e.constructor.name);
3211
3211
  r.addIssue = (o) => {
3212
3212
  if (typeof o == "string")
3213
3213
  r.issues.push(Ir(o, r.value, t));
@@ -3226,11 +3226,11 @@ function Zg(e) {
3226
3226
  transform: e
3227
3227
  });
3228
3228
  }
3229
- const Gi = /* @__PURE__ */ w("ZodOptional", (e, t) => {
3230
- di.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => va(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3229
+ const Bi = /* @__PURE__ */ w("ZodOptional", (e, t) => {
3230
+ pi.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => va(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3231
3231
  });
3232
- function Io(e) {
3233
- return new Gi({
3232
+ function So(e) {
3233
+ return new Bi({
3234
3234
  type: "optional",
3235
3235
  innerType: e
3236
3236
  });
@@ -3245,50 +3245,50 @@ function Gg(e) {
3245
3245
  });
3246
3246
  }
3247
3247
  const Bg = /* @__PURE__ */ w("ZodNullable", (e, t) => {
3248
- mp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => xi(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3248
+ mp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => ki(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3249
3249
  });
3250
- function So(e) {
3250
+ function Ao(e) {
3251
3251
  return new Bg({
3252
3252
  type: "nullable",
3253
3253
  innerType: e
3254
3254
  });
3255
3255
  }
3256
3256
  const Vg = /* @__PURE__ */ w("ZodDefault", (e, t) => {
3257
- yp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Pi(e, r, n, a), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3257
+ yp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ci(e, r, n, a), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3258
3258
  });
3259
3259
  function qg(e, t) {
3260
3260
  return new Vg({
3261
3261
  type: "default",
3262
3262
  innerType: e,
3263
3263
  get defaultValue() {
3264
- return typeof t == "function" ? t() : Ys(t);
3264
+ return typeof t == "function" ? t() : Ws(t);
3265
3265
  }
3266
3266
  });
3267
3267
  }
3268
3268
  const Hg = /* @__PURE__ */ w("ZodPrefault", (e, t) => {
3269
- vp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ci(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3269
+ vp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Di(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3270
3270
  });
3271
3271
  function Jg(e, t) {
3272
3272
  return new Hg({
3273
3273
  type: "prefault",
3274
3274
  innerType: e,
3275
3275
  get defaultValue() {
3276
- return typeof t == "function" ? t() : Ys(t);
3276
+ return typeof t == "function" ? t() : Ws(t);
3277
3277
  }
3278
3278
  });
3279
3279
  }
3280
- const Bi = /* @__PURE__ */ w("ZodNonOptional", (e, t) => {
3281
- wp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => ki(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3280
+ const Vi = /* @__PURE__ */ w("ZodNonOptional", (e, t) => {
3281
+ wp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Pi(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3282
3282
  });
3283
3283
  function Yg(e, t) {
3284
- return new Bi({
3284
+ return new Vi({
3285
3285
  type: "nonoptional",
3286
3286
  innerType: e,
3287
3287
  ...k(t)
3288
3288
  });
3289
3289
  }
3290
3290
  const Wg = /* @__PURE__ */ w("ZodCatch", (e, t) => {
3291
- _p.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Di(e, r, n, a), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3291
+ _p.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => $i(e, r, n, a), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3292
3292
  });
3293
3293
  function Kg(e, t) {
3294
3294
  return new Wg({
@@ -3298,9 +3298,9 @@ function Kg(e, t) {
3298
3298
  });
3299
3299
  }
3300
3300
  const Xg = /* @__PURE__ */ w("ZodPipe", (e, t) => {
3301
- Tp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => $i(e, r, n, a), e.in = t.in, e.out = t.out;
3301
+ Tp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Mi(e, r, n, a), e.in = t.in, e.out = t.out;
3302
3302
  });
3303
- function Ao(e, t) {
3303
+ function No(e, t) {
3304
3304
  return new Xg({
3305
3305
  type: "pipe",
3306
3306
  in: e,
@@ -3309,7 +3309,7 @@ function Ao(e, t) {
3309
3309
  });
3310
3310
  }
3311
3311
  const Qg = /* @__PURE__ */ w("ZodReadonly", (e, t) => {
3312
- Ep.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Mi(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3312
+ Ep.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Fi(e, r, n, a), e.unwrap = () => e._zod.def.innerType;
3313
3313
  });
3314
3314
  function eh(e) {
3315
3315
  return new Qg({
@@ -3318,7 +3318,7 @@ function eh(e) {
3318
3318
  });
3319
3319
  }
3320
3320
  const th = /* @__PURE__ */ w("ZodLazy", (e, t) => {
3321
- bp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Fi(e, r, n, a), e.unwrap = () => e._zod.def.getter();
3321
+ bp.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => zi(e, r, n, a), e.unwrap = () => e._zod.def.getter();
3322
3322
  });
3323
3323
  function rh(e) {
3324
3324
  return new th({
@@ -3327,7 +3327,7 @@ function rh(e) {
3327
3327
  });
3328
3328
  }
3329
3329
  const _a = /* @__PURE__ */ w("ZodCustom", (e, t) => {
3330
- Ip.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => bi(e, r);
3330
+ Ip.init(e, t), fe.init(e, t), e._zod.processJSONSchema = (r, n, a) => Ii(e, r);
3331
3331
  });
3332
3332
  function nh(e, t) {
3333
3333
  return /* @__PURE__ */ wf(_a, e ?? (() => !0), t);
@@ -3338,7 +3338,7 @@ function ah(e, t = {}) {
3338
3338
  function oh(e) {
3339
3339
  return /* @__PURE__ */ Tf(e);
3340
3340
  }
3341
- function ln(e, t = {}) {
3341
+ function un(e, t = {}) {
3342
3342
  const r = new _a({
3343
3343
  type: "custom",
3344
3344
  check: "custom",
@@ -3393,14 +3393,14 @@ var Sr;
3393
3393
  }
3394
3394
  e.joinValues = n, e.jsonStringifyReplacer = (a, o) => typeof o == "bigint" ? o.toString() : o;
3395
3395
  })(Sr || (Sr = {}));
3396
- var No;
3396
+ var Oo;
3397
3397
  (function(e) {
3398
3398
  e.mergeShapes = (t, r) => ({
3399
3399
  ...t,
3400
3400
  ...r
3401
3401
  // second overwrites first
3402
3402
  });
3403
- })(No || (No = {}));
3403
+ })(Oo || (Oo = {}));
3404
3404
  Sr.arrayToEnum([
3405
3405
  "string",
3406
3406
  "nan",
@@ -3441,7 +3441,7 @@ Sr.arrayToEnum([
3441
3441
  "not_multiple_of",
3442
3442
  "not_finite"
3443
3443
  ]);
3444
- class un extends Error {
3444
+ class cn extends Error {
3445
3445
  get errors() {
3446
3446
  return this.issues;
3447
3447
  }
@@ -3478,7 +3478,7 @@ class un extends Error {
3478
3478
  return a(this), n;
3479
3479
  }
3480
3480
  static assert(t) {
3481
- if (!(t instanceof un))
3481
+ if (!(t instanceof cn))
3482
3482
  throw new Error(`Not a ZodError: ${t}`);
3483
3483
  }
3484
3484
  toString() {
@@ -3504,28 +3504,28 @@ class un extends Error {
3504
3504
  return this.flatten();
3505
3505
  }
3506
3506
  }
3507
- un.create = (e) => new un(e);
3508
- var Oo;
3507
+ cn.create = (e) => new cn(e);
3508
+ var Ro;
3509
3509
  (function(e) {
3510
3510
  e.errToObj = (t) => typeof t == "string" ? { message: t } : t || {}, e.toString = (t) => typeof t == "string" ? t : t == null ? void 0 : t.message;
3511
- })(Oo || (Oo = {}));
3511
+ })(Ro || (Ro = {}));
3512
3512
  var Z;
3513
3513
  (function(e) {
3514
3514
  e.ZodString = "ZodString", e.ZodNumber = "ZodNumber", e.ZodNaN = "ZodNaN", e.ZodBigInt = "ZodBigInt", e.ZodBoolean = "ZodBoolean", e.ZodDate = "ZodDate", e.ZodSymbol = "ZodSymbol", e.ZodUndefined = "ZodUndefined", e.ZodNull = "ZodNull", e.ZodAny = "ZodAny", e.ZodUnknown = "ZodUnknown", e.ZodNever = "ZodNever", e.ZodVoid = "ZodVoid", e.ZodArray = "ZodArray", e.ZodObject = "ZodObject", e.ZodUnion = "ZodUnion", e.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", e.ZodIntersection = "ZodIntersection", e.ZodTuple = "ZodTuple", e.ZodRecord = "ZodRecord", e.ZodMap = "ZodMap", e.ZodSet = "ZodSet", e.ZodFunction = "ZodFunction", e.ZodLazy = "ZodLazy", e.ZodLiteral = "ZodLiteral", e.ZodEnum = "ZodEnum", e.ZodEffects = "ZodEffects", e.ZodNativeEnum = "ZodNativeEnum", e.ZodOptional = "ZodOptional", e.ZodNullable = "ZodNullable", e.ZodDefault = "ZodDefault", e.ZodCatch = "ZodCatch", e.ZodPromise = "ZodPromise", e.ZodBranded = "ZodBranded", e.ZodPipeline = "ZodPipeline", e.ZodReadonly = "ZodReadonly";
3515
3515
  })(Z || (Z = {}));
3516
- class Ro extends Error {
3516
+ class xo extends Error {
3517
3517
  constructor(t, r) {
3518
3518
  super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
3519
3519
  }
3520
3520
  }
3521
- function Dn(e) {
3521
+ function $n(e) {
3522
3522
  }
3523
3523
  function sh(e) {
3524
3524
  if (typeof e == "function")
3525
3525
  throw new TypeError(
3526
3526
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
3527
3527
  );
3528
- const { onEvent: t = Dn, onError: r = Dn, onRetry: n = Dn, onComment: a } = e;
3528
+ const { onEvent: t = $n, onError: r = $n, onRetry: n = $n, onComment: a } = e;
3529
3529
  let o = "", s = !0, i, l = "", u = "";
3530
3530
  function c(v) {
3531
3531
  const b = s ? v.replace(/^\xEF\xBB\xBF/, "") : v, [P, C] = ih(`${o}${b}`);
@@ -3564,7 +3564,7 @@ function sh(e) {
3564
3564
  break;
3565
3565
  case "retry":
3566
3566
  /^\d+$/.test(b) ? n(parseInt(b, 10)) : r(
3567
- new Ro(`Invalid \`retry\` value: "${b}"`, {
3567
+ new xo(`Invalid \`retry\` value: "${b}"`, {
3568
3568
  type: "invalid-retry",
3569
3569
  value: b,
3570
3570
  line: P
@@ -3573,7 +3573,7 @@ function sh(e) {
3573
3573
  break;
3574
3574
  default:
3575
3575
  r(
3576
- new Ro(
3576
+ new xo(
3577
3577
  `Unknown field "${v.length > 20 ? `${v.slice(0, 20)}…` : v}"`,
3578
3578
  { type: "unknown-field", field: v, value: b, line: P }
3579
3579
  )
@@ -3636,7 +3636,7 @@ class lh extends TransformStream {
3636
3636
  });
3637
3637
  }
3638
3638
  }
3639
- function cn(...e) {
3639
+ function dn(...e) {
3640
3640
  return e.reduce(
3641
3641
  (t, r) => ({
3642
3642
  ...t,
@@ -3651,7 +3651,7 @@ async function uh(e, t) {
3651
3651
  const r = t == null ? void 0 : t.abortSignal;
3652
3652
  return new Promise((n, a) => {
3653
3653
  if (r != null && r.aborted) {
3654
- a(xo());
3654
+ a(ko());
3655
3655
  return;
3656
3656
  }
3657
3657
  const o = setTimeout(() => {
@@ -3659,12 +3659,12 @@ async function uh(e, t) {
3659
3659
  }, e), s = () => {
3660
3660
  clearTimeout(o), r == null || r.removeEventListener("abort", i);
3661
3661
  }, i = () => {
3662
- s(), a(xo());
3662
+ s(), a(ko());
3663
3663
  };
3664
3664
  r == null || r.addEventListener("abort", i);
3665
3665
  });
3666
3666
  }
3667
- function xo() {
3667
+ function ko() {
3668
3668
  return new DOMException("Delay was aborted", "AbortError");
3669
3669
  }
3670
3670
  var mr = class {
@@ -3702,13 +3702,13 @@ function Ta(e) {
3702
3702
  const t = e.replace(/-/g, "+").replace(/_/g, "/"), r = dh(t);
3703
3703
  return Uint8Array.from(r, (n) => n.codePointAt(0));
3704
3704
  }
3705
- function dn(e) {
3705
+ function pn(e) {
3706
3706
  let t = "";
3707
3707
  for (let r = 0; r < e.length; r++)
3708
3708
  t += String.fromCodePoint(e[r]);
3709
3709
  return ch(t);
3710
3710
  }
3711
- var Vi = "AI_DownloadError", qi = `vercel.ai.error.${Vi}`, ph = Symbol.for(qi), ko, Po, $n = class extends (Po = H, ko = ph, Po) {
3711
+ var qi = "AI_DownloadError", Hi = `vercel.ai.error.${qi}`, ph = Symbol.for(Hi), Po, Co, Mn = class extends (Co = H, Po = ph, Co) {
3712
3712
  constructor({
3713
3713
  url: e,
3714
3714
  statusCode: t,
@@ -3716,10 +3716,10 @@ var Vi = "AI_DownloadError", qi = `vercel.ai.error.${Vi}`, ph = Symbol.for(qi),
3716
3716
  cause: n,
3717
3717
  message: a = n == null ? `Failed to download ${e}: ${t} ${r}` : `Failed to download ${e}: ${n}`
3718
3718
  }) {
3719
- super({ name: Vi, message: a, cause: n }), this[ko] = !0, this.url = e, this.statusCode = t, this.statusText = r;
3719
+ super({ name: qi, message: a, cause: n }), this[Po] = !0, this.url = e, this.statusCode = t, this.statusText = r;
3720
3720
  }
3721
3721
  static isInstance(e) {
3722
- return H.hasMarker(e, qi);
3722
+ return H.hasMarker(e, Hi);
3723
3723
  }
3724
3724
  }, Fr = ({
3725
3725
  prefix: e,
@@ -3751,7 +3751,7 @@ function Lt(e) {
3751
3751
  e.name === "TimeoutError");
3752
3752
  }
3753
3753
  var fh = ["fetch failed", "failed to fetch"];
3754
- function Hi({
3754
+ function Ji({
3755
3755
  error: e,
3756
3756
  url: t,
3757
3757
  requestBodyValues: r
@@ -3798,7 +3798,7 @@ function zr(e, ...t) {
3798
3798
  [n, ...t].filter(Boolean).join(" ")
3799
3799
  ), Object.fromEntries(r.entries());
3800
3800
  }
3801
- var Ji = "4.0.3", hh = () => globalThis.fetch, Co = async ({
3801
+ var Yi = "4.0.3", hh = () => globalThis.fetch, Do = async ({
3802
3802
  url: e,
3803
3803
  headers: t = {},
3804
3804
  successfulResponseHandler: r,
@@ -3811,7 +3811,7 @@ var Ji = "4.0.3", hh = () => globalThis.fetch, Co = async ({
3811
3811
  method: "GET",
3812
3812
  headers: zr(
3813
3813
  t,
3814
- `ai-sdk/provider-utils/${Ji}`,
3814
+ `ai-sdk/provider-utils/${Yi}`,
3815
3815
  ba()
3816
3816
  ),
3817
3817
  signal: a
@@ -3853,7 +3853,7 @@ var Ji = "4.0.3", hh = () => globalThis.fetch, Co = async ({
3853
3853
  });
3854
3854
  }
3855
3855
  } catch (s) {
3856
- throw Hi({ error: s, url: e, requestBodyValues: {} });
3856
+ throw Ji({ error: s, url: e, requestBodyValues: {} });
3857
3857
  }
3858
3858
  };
3859
3859
  function mh({
@@ -3866,7 +3866,7 @@ function mh({
3866
3866
  return o === "*" || o === "*/*" ? { mediaTypePrefix: "", regexes: a } : { mediaTypePrefix: o.replace(/\*/, ""), regexes: a };
3867
3867
  }).filter(({ mediaTypePrefix: n }) => e.startsWith(n)).flatMap(({ regexes: n }) => n).some((n) => n.test(t));
3868
3868
  }
3869
- function Xr({
3869
+ function Qr({
3870
3870
  settingValue: e,
3871
3871
  environmentVariableName: t
3872
3872
  }) {
@@ -3876,7 +3876,7 @@ function Xr({
3876
3876
  return e;
3877
3877
  }
3878
3878
  var yh = /"__proto__"\s*:/, vh = /"constructor"\s*:/;
3879
- function Do(e) {
3879
+ function $o(e) {
3880
3880
  const t = JSON.parse(e);
3881
3881
  return t === null || typeof t != "object" || yh.test(e) === !1 && vh.test(e) === !1 ? t : wh(t);
3882
3882
  }
@@ -3898,20 +3898,20 @@ function wh(e) {
3898
3898
  }
3899
3899
  return e;
3900
3900
  }
3901
- function Yi(e) {
3901
+ function Wi(e) {
3902
3902
  const { stackTraceLimit: t } = Error;
3903
3903
  try {
3904
3904
  Error.stackTraceLimit = 0;
3905
3905
  } catch {
3906
- return Do(e);
3906
+ return $o(e);
3907
3907
  }
3908
3908
  try {
3909
- return Do(e);
3909
+ return $o(e);
3910
3910
  } finally {
3911
3911
  Error.stackTraceLimit = t;
3912
3912
  }
3913
3913
  }
3914
- function Wi(e) {
3914
+ function Ki(e) {
3915
3915
  if (e.type === "object" || Array.isArray(e.type) && e.type.includes("object")) {
3916
3916
  e.additionalProperties = !1;
3917
3917
  const { properties: r } = e;
@@ -3927,11 +3927,11 @@ function Wi(e) {
3927
3927
  return e;
3928
3928
  }
3929
3929
  function Pt(e) {
3930
- return typeof e == "boolean" ? e : Wi(e);
3930
+ return typeof e == "boolean" ? e : Ki(e);
3931
3931
  }
3932
3932
  var _h = Symbol(
3933
3933
  "Let zodToJsonSchema decide on which parser to use"
3934
- ), $o = {
3934
+ ), Mo = {
3935
3935
  name: void 0,
3936
3936
  $refStrategy: "root",
3937
3937
  basePath: ["#"],
@@ -3952,10 +3952,10 @@ var _h = Symbol(
3952
3952
  base64Strategy: "contentEncoding:base64",
3953
3953
  nameStrategy: "ref"
3954
3954
  }, Th = (e) => typeof e == "string" ? {
3955
- ...$o,
3955
+ ...Mo,
3956
3956
  name: e
3957
3957
  } : {
3958
- ...$o,
3958
+ ...Mo,
3959
3959
  ...e
3960
3960
  };
3961
3961
  function Be() {
@@ -3994,15 +3994,15 @@ function bh(e) {
3994
3994
  function Ih() {
3995
3995
  return { type: "boolean" };
3996
3996
  }
3997
- function Ki(e, t) {
3997
+ function Xi(e, t) {
3998
3998
  return ie(e.type._def, t);
3999
3999
  }
4000
4000
  var Sh = (e, t) => ie(e.innerType._def, t);
4001
- function Xi(e, t, r) {
4001
+ function Qi(e, t, r) {
4002
4002
  const n = r ?? t.dateStrategy;
4003
4003
  if (Array.isArray(n))
4004
4004
  return {
4005
- anyOf: n.map((a, o) => Xi(e, t, a))
4005
+ anyOf: n.map((a, o) => Qi(e, t, a))
4006
4006
  };
4007
4007
  switch (n) {
4008
4008
  case "string":
@@ -4085,7 +4085,7 @@ function Ph(e) {
4085
4085
  const: e.value
4086
4086
  };
4087
4087
  }
4088
- var Mn = void 0, Ke = {
4088
+ var Fn = void 0, Ke = {
4089
4089
  /**
4090
4090
  * `c` was changed to `[cC]` to replicate /i flag
4091
4091
  */
@@ -4107,10 +4107,10 @@ var Mn = void 0, Ke = {
4107
4107
  * Fix in Zod:
4108
4108
  * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
4109
4109
  */
4110
- emoji: () => (Mn === void 0 && (Mn = RegExp(
4110
+ emoji: () => (Fn === void 0 && (Fn = RegExp(
4111
4111
  "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
4112
4112
  "u"
4113
- )), Mn),
4113
+ )), Fn),
4114
4114
  /**
4115
4115
  * Unused
4116
4116
  */
@@ -4130,7 +4130,7 @@ var Mn = void 0, Ke = {
4130
4130
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
4131
4131
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
4132
4132
  };
4133
- function Qi(e, t) {
4133
+ function el(e, t) {
4134
4134
  const r = {
4135
4135
  type: "string"
4136
4136
  };
@@ -4174,7 +4174,7 @@ function Qi(e, t) {
4174
4174
  case "startsWith":
4175
4175
  Fe(
4176
4176
  r,
4177
- RegExp(`^${Fn(n.value, t)}`),
4177
+ RegExp(`^${zn(n.value, t)}`),
4178
4178
  n.message,
4179
4179
  t
4180
4180
  );
@@ -4182,7 +4182,7 @@ function Qi(e, t) {
4182
4182
  case "endsWith":
4183
4183
  Fe(
4184
4184
  r,
4185
- RegExp(`${Fn(n.value, t)}$`),
4185
+ RegExp(`${zn(n.value, t)}$`),
4186
4186
  n.message,
4187
4187
  t
4188
4188
  );
@@ -4205,7 +4205,7 @@ function Qi(e, t) {
4205
4205
  case "includes": {
4206
4206
  Fe(
4207
4207
  r,
4208
- RegExp(Fn(n.value, t)),
4208
+ RegExp(zn(n.value, t)),
4209
4209
  n.message,
4210
4210
  t
4211
4211
  );
@@ -4254,7 +4254,7 @@ function Qi(e, t) {
4254
4254
  }
4255
4255
  return r;
4256
4256
  }
4257
- function Fn(e, t) {
4257
+ function zn(e, t) {
4258
4258
  return t.patternStrategy === "escape" ? Dh(e) : e;
4259
4259
  }
4260
4260
  var Ch = new Set(
@@ -4280,11 +4280,11 @@ function Fe(e, t, r, n) {
4280
4280
  e.pattern || (a = e.allOf) != null && a.some((o) => o.pattern) ? (e.allOf || (e.allOf = []), e.pattern && (e.allOf.push({
4281
4281
  pattern: e.pattern
4282
4282
  }), delete e.pattern), e.allOf.push({
4283
- pattern: Mo(t, n),
4283
+ pattern: Fo(t, n),
4284
4284
  ...r && n.errorMessages && { errorMessage: { pattern: r } }
4285
- })) : e.pattern = Mo(t, n);
4285
+ })) : e.pattern = Fo(t, n);
4286
4286
  }
4287
- function Mo(e, t) {
4287
+ function Fo(e, t) {
4288
4288
  var r;
4289
4289
  if (!t.applyRegexFlags || !e.flags)
4290
4290
  return e.source;
@@ -4343,7 +4343,7 @@ function Mo(e, t) {
4343
4343
  }
4344
4344
  return o;
4345
4345
  }
4346
- function el(e, t) {
4346
+ function tl(e, t) {
4347
4347
  var r, n, a, o, s, i;
4348
4348
  const l = {
4349
4349
  type: "object",
@@ -4353,7 +4353,7 @@ function el(e, t) {
4353
4353
  })) != null ? r : t.allowedAdditionalProperties
4354
4354
  };
4355
4355
  if (((n = e.keyType) == null ? void 0 : n._def.typeName) === Z.ZodString && ((a = e.keyType._def.checks) != null && a.length)) {
4356
- const { type: u, ...c } = Qi(e.keyType._def, t);
4356
+ const { type: u, ...c } = el(e.keyType._def, t);
4357
4357
  return {
4358
4358
  ...l,
4359
4359
  propertyNames: c
@@ -4367,7 +4367,7 @@ function el(e, t) {
4367
4367
  }
4368
4368
  };
4369
4369
  if (((s = e.keyType) == null ? void 0 : s._def.typeName) === Z.ZodBranded && e.keyType._def.type._def.typeName === Z.ZodString && ((i = e.keyType._def.type._def.checks) != null && i.length)) {
4370
- const { type: u, ...c } = Ki(
4370
+ const { type: u, ...c } = Xi(
4371
4371
  e.keyType._def,
4372
4372
  t
4373
4373
  );
@@ -4381,7 +4381,7 @@ function el(e, t) {
4381
4381
  }
4382
4382
  function $h(e, t) {
4383
4383
  if (t.mapStrategy === "record")
4384
- return el(e, t);
4384
+ return tl(e, t);
4385
4385
  const r = ie(e.keyType._def, {
4386
4386
  ...t,
4387
4387
  currentPath: [...t.currentPath, "items", "items", "0"]
@@ -4654,7 +4654,7 @@ function Xh() {
4654
4654
  var Qh = (e, t) => ie(e.innerType._def, t), em = (e, t, r) => {
4655
4655
  switch (t) {
4656
4656
  case Z.ZodString:
4657
- return Qi(e, r);
4657
+ return el(e, r);
4658
4658
  case Z.ZodNumber:
4659
4659
  return jh(e);
4660
4660
  case Z.ZodObject:
@@ -4664,7 +4664,7 @@ var Qh = (e, t) => ie(e.innerType._def, t), em = (e, t, r) => {
4664
4664
  case Z.ZodBoolean:
4665
4665
  return Ih();
4666
4666
  case Z.ZodDate:
4667
- return Xi(e, r);
4667
+ return Qi(e, r);
4668
4668
  case Z.ZodUndefined:
4669
4669
  return Kh();
4670
4670
  case Z.ZodNull:
@@ -4679,7 +4679,7 @@ var Qh = (e, t) => ie(e.innerType._def, t), em = (e, t, r) => {
4679
4679
  case Z.ZodTuple:
4680
4680
  return Wh(e, r);
4681
4681
  case Z.ZodRecord:
4682
- return el(e, r);
4682
+ return tl(e, r);
4683
4683
  case Z.ZodLiteral:
4684
4684
  return Ph(e);
4685
4685
  case Z.ZodEnum:
@@ -4710,7 +4710,7 @@ var Qh = (e, t) => ie(e.innerType._def, t), em = (e, t, r) => {
4710
4710
  case Z.ZodDefault:
4711
4711
  return Nh(e, r);
4712
4712
  case Z.ZodBranded:
4713
- return Ki(e, r);
4713
+ return Xi(e, r);
4714
4714
  case Z.ZodReadonly:
4715
4715
  return Qh(e, r);
4716
4716
  case Z.ZodCatch:
@@ -4840,7 +4840,7 @@ function ir(e) {
4840
4840
  let t;
4841
4841
  return () => (t == null && (t = e()), t);
4842
4842
  }
4843
- function bn(e, {
4843
+ function In(e, {
4844
4844
  validate: t
4845
4845
  } = {}) {
4846
4846
  return {
@@ -4857,10 +4857,10 @@ function sm(e) {
4857
4857
  return typeof e == "object" && e !== null && ta in e && e[ta] === !0 && "jsonSchema" in e && "validate" in e;
4858
4858
  }
4859
4859
  function lr(e) {
4860
- return e == null ? bn({ properties: {}, additionalProperties: !1 }) : sm(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? Zt(e) : im(e) : e();
4860
+ return e == null ? In({ properties: {}, additionalProperties: !1 }) : sm(e) ? e : "~standard" in e ? e["~standard"].vendor === "zod" ? Zt(e) : im(e) : e();
4861
4861
  }
4862
4862
  function im(e) {
4863
- return bn(
4863
+ return In(
4864
4864
  () => e["~standard"].jsonSchema.input({
4865
4865
  target: "draft-07"
4866
4866
  }),
@@ -4881,7 +4881,7 @@ function im(e) {
4881
4881
  function lm(e, t) {
4882
4882
  var r;
4883
4883
  const n = (r = void 0) != null ? r : !1;
4884
- return bn(
4884
+ return In(
4885
4885
  // defer json schema creation to avoid unnecessary computation when only validation is needed
4886
4886
  () => om(e, {
4887
4887
  $refStrategy: n ? "root" : "none"
@@ -4897,9 +4897,9 @@ function lm(e, t) {
4897
4897
  function um(e, t) {
4898
4898
  var r;
4899
4899
  const n = (r = void 0) != null ? r : !1;
4900
- return bn(
4900
+ return In(
4901
4901
  // defer json schema creation to avoid unnecessary computation when only validation is needed
4902
- () => Wi(
4902
+ () => Ki(
4903
4903
  Lf(e, {
4904
4904
  target: "draft-7",
4905
4905
  io: "input",
@@ -4908,7 +4908,7 @@ function um(e, t) {
4908
4908
  ),
4909
4909
  {
4910
4910
  validate: async (a) => {
4911
- const o = await zi(e, a);
4911
+ const o = await Li(e, a);
4912
4912
  return o.success ? { success: !0, value: o.data } : { success: !1, error: o.error };
4913
4913
  }
4914
4914
  }
@@ -4956,10 +4956,10 @@ async function dm({
4956
4956
  schema: t
4957
4957
  }) {
4958
4958
  try {
4959
- const r = Yi(e);
4959
+ const r = Wi(e);
4960
4960
  return t == null ? r : ra({ value: r, schema: t });
4961
4961
  } catch (r) {
4962
- throw Qr.isInstance(r) || Ft.isInstance(r) ? r : new Qr({ text: e, cause: r });
4962
+ throw en.isInstance(r) || Ft.isInstance(r) ? r : new en({ text: e, cause: r });
4963
4963
  }
4964
4964
  }
4965
4965
  async function tt({
@@ -4967,12 +4967,12 @@ async function tt({
4967
4967
  schema: t
4968
4968
  }) {
4969
4969
  try {
4970
- const r = Yi(e);
4970
+ const r = Wi(e);
4971
4971
  return t == null ? { success: !0, value: r, rawValue: r } : await it({ value: r, schema: t });
4972
4972
  } catch (r) {
4973
4973
  return {
4974
4974
  success: !1,
4975
- error: Qr.isInstance(r) ? r : new Qr({ text: e, cause: r }),
4975
+ error: en.isInstance(r) ? r : new en({ text: e, cause: r }),
4976
4976
  rawValue: void 0
4977
4977
  };
4978
4978
  }
@@ -4989,7 +4989,7 @@ function pm({
4989
4989
  })
4990
4990
  );
4991
4991
  }
4992
- var fm = () => globalThis.fetch, pn = async ({
4992
+ var fm = () => globalThis.fetch, fn = async ({
4993
4993
  url: e,
4994
4994
  headers: t,
4995
4995
  body: r,
@@ -5025,7 +5025,7 @@ var fm = () => globalThis.fetch, pn = async ({
5025
5025
  method: "POST",
5026
5026
  headers: zr(
5027
5027
  t,
5028
- `ai-sdk/provider-utils/${Ji}`,
5028
+ `ai-sdk/provider-utils/${Yi}`,
5029
5029
  ba()
5030
5030
  ),
5031
5031
  body: r.content,
@@ -5068,7 +5068,7 @@ var fm = () => globalThis.fetch, pn = async ({
5068
5068
  });
5069
5069
  }
5070
5070
  } catch (i) {
5071
- throw Hi({ error: i, url: e, requestBodyValues: r.values });
5071
+ throw Ji({ error: i, url: e, requestBodyValues: r.values });
5072
5072
  }
5073
5073
  };
5074
5074
  async function He(e) {
@@ -5177,10 +5177,10 @@ async function* vm({
5177
5177
  } else
5178
5178
  yield { type: "final", output: await n };
5179
5179
  }
5180
- var zn, Fo;
5180
+ var Ln, zo;
5181
5181
  function wm() {
5182
- if (Fo) return zn;
5183
- Fo = 1;
5182
+ if (zo) return Ln;
5183
+ zo = 1;
5184
5184
  var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, n = Object.prototype.hasOwnProperty, a = (c, d) => {
5185
5185
  for (var p in d)
5186
5186
  e(c, p, { get: d[p], enumerable: !0 });
@@ -5193,18 +5193,18 @@ function wm() {
5193
5193
  a(i, {
5194
5194
  SYMBOL_FOR_REQ_CONTEXT: () => l,
5195
5195
  getContext: () => u
5196
- }), zn = s(i);
5196
+ }), Ln = s(i);
5197
5197
  const l = Symbol.for("@vercel/request-context");
5198
5198
  function u() {
5199
5199
  var d, p;
5200
5200
  return ((p = (d = globalThis[l]) == null ? void 0 : d.get) == null ? void 0 : p.call(d)) ?? {};
5201
5201
  }
5202
- return zn;
5202
+ return Ln;
5203
5203
  }
5204
- var Ln, zo;
5204
+ var Un, Lo;
5205
5205
  function _m() {
5206
- if (zo) return Ln;
5207
- zo = 1;
5206
+ if (Lo) return Un;
5207
+ Lo = 1;
5208
5208
  var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, n = Object.prototype.hasOwnProperty, a = (d, p) => {
5209
5209
  for (var y in p)
5210
5210
  e(d, y, { get: p[y], enumerable: !0 });
@@ -5218,7 +5218,7 @@ function _m() {
5218
5218
  getContext: () => l.getContext,
5219
5219
  getVercelOidcToken: () => u,
5220
5220
  getVercelOidcTokenSync: () => c
5221
- }), Ln = s(i);
5221
+ }), Un = s(i);
5222
5222
  var l = wm();
5223
5223
  async function u() {
5224
5224
  return "";
@@ -5226,15 +5226,15 @@ function _m() {
5226
5226
  function c() {
5227
5227
  return "";
5228
5228
  }
5229
- return Ln;
5229
+ return Un;
5230
5230
  }
5231
- var tl = _m(), Tm = "vercel.ai.gateway.error", Un = Symbol.for(Tm), Lo, Uo, Ve = class rl extends (Uo = Error, Lo = Un, Uo) {
5231
+ var rl = _m(), Tm = "vercel.ai.gateway.error", Zn = Symbol.for(Tm), Uo, Zo, Ve = class nl extends (Zo = Error, Uo = Zn, Zo) {
5232
5232
  constructor({
5233
5233
  message: t,
5234
5234
  statusCode: r = 500,
5235
5235
  cause: n
5236
5236
  }) {
5237
- super(t), this[Lo] = !0, this.statusCode = r, this.cause = n;
5237
+ super(t), this[Uo] = !0, this.statusCode = r, this.cause = n;
5238
5238
  }
5239
5239
  /**
5240
5240
  * Checks if the given error is a Gateway Error.
@@ -5242,21 +5242,21 @@ var tl = _m(), Tm = "vercel.ai.gateway.error", Un = Symbol.for(Tm), Lo, Uo, Ve =
5242
5242
  * @returns {boolean} True if the error is a Gateway Error, false otherwise.
5243
5243
  */
5244
5244
  static isInstance(t) {
5245
- return rl.hasMarker(t);
5245
+ return nl.hasMarker(t);
5246
5246
  }
5247
5247
  static hasMarker(t) {
5248
- return typeof t == "object" && t !== null && Un in t && t[Un] === !0;
5248
+ return typeof t == "object" && t !== null && Zn in t && t[Zn] === !0;
5249
5249
  }
5250
- }, nl = "GatewayAuthenticationError", Em = `vercel.ai.gateway.error.${nl}`, Zo = Symbol.for(Em), jo, Go, Ia = class al extends (Go = Ve, jo = Zo, Go) {
5250
+ }, al = "GatewayAuthenticationError", Em = `vercel.ai.gateway.error.${al}`, jo = Symbol.for(Em), Go, Bo, Ia = class ol extends (Bo = Ve, Go = jo, Bo) {
5251
5251
  constructor({
5252
5252
  message: t = "Authentication failed",
5253
5253
  statusCode: r = 401,
5254
5254
  cause: n
5255
5255
  } = {}) {
5256
- super({ message: t, statusCode: r, cause: n }), this[jo] = !0, this.name = nl, this.type = "authentication_error";
5256
+ super({ message: t, statusCode: r, cause: n }), this[Go] = !0, this.name = al, this.type = "authentication_error";
5257
5257
  }
5258
5258
  static isInstance(t) {
5259
- return Ve.hasMarker(t) && Zo in t;
5259
+ return Ve.hasMarker(t) && jo in t;
5260
5260
  }
5261
5261
  /**
5262
5262
  * Creates a contextual error message when authentication fails
@@ -5284,64 +5284,64 @@ Create an API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
5284
5284
  Provide via 'apiKey' option or 'AI_GATEWAY_API_KEY' environment variable.
5285
5285
 
5286
5286
  Option 2 - OIDC token:
5287
- Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`, new al({
5287
+ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the token.`, new ol({
5288
5288
  message: s,
5289
5289
  statusCode: a,
5290
5290
  cause: o
5291
5291
  });
5292
5292
  }
5293
- }, ol = "GatewayInvalidRequestError", bm = `vercel.ai.gateway.error.${ol}`, Bo = Symbol.for(bm), Vo, qo, Im = class extends (qo = Ve, Vo = Bo, qo) {
5293
+ }, sl = "GatewayInvalidRequestError", bm = `vercel.ai.gateway.error.${sl}`, Vo = Symbol.for(bm), qo, Ho, Im = class extends (Ho = Ve, qo = Vo, Ho) {
5294
5294
  constructor({
5295
5295
  message: e = "Invalid request",
5296
5296
  statusCode: t = 400,
5297
5297
  cause: r
5298
5298
  } = {}) {
5299
- super({ message: e, statusCode: t, cause: r }), this[Vo] = !0, this.name = ol, this.type = "invalid_request_error";
5299
+ super({ message: e, statusCode: t, cause: r }), this[qo] = !0, this.name = sl, this.type = "invalid_request_error";
5300
5300
  }
5301
5301
  static isInstance(e) {
5302
- return Ve.hasMarker(e) && Bo in e;
5302
+ return Ve.hasMarker(e) && Vo in e;
5303
5303
  }
5304
- }, sl = "GatewayRateLimitError", Sm = `vercel.ai.gateway.error.${sl}`, Ho = Symbol.for(Sm), Jo, Yo, Am = class extends (Yo = Ve, Jo = Ho, Yo) {
5304
+ }, il = "GatewayRateLimitError", Sm = `vercel.ai.gateway.error.${il}`, Jo = Symbol.for(Sm), Yo, Wo, Am = class extends (Wo = Ve, Yo = Jo, Wo) {
5305
5305
  constructor({
5306
5306
  message: e = "Rate limit exceeded",
5307
5307
  statusCode: t = 429,
5308
5308
  cause: r
5309
5309
  } = {}) {
5310
- super({ message: e, statusCode: t, cause: r }), this[Jo] = !0, this.name = sl, this.type = "rate_limit_exceeded";
5310
+ super({ message: e, statusCode: t, cause: r }), this[Yo] = !0, this.name = il, this.type = "rate_limit_exceeded";
5311
5311
  }
5312
5312
  static isInstance(e) {
5313
- return Ve.hasMarker(e) && Ho in e;
5313
+ return Ve.hasMarker(e) && Jo in e;
5314
5314
  }
5315
- }, il = "GatewayModelNotFoundError", Nm = `vercel.ai.gateway.error.${il}`, Wo = Symbol.for(Nm), Om = ir(
5315
+ }, ll = "GatewayModelNotFoundError", Nm = `vercel.ai.gateway.error.${ll}`, Ko = Symbol.for(Nm), Om = ir(
5316
5316
  () => Zt(
5317
5317
  B({
5318
5318
  modelId: x()
5319
5319
  })
5320
5320
  )
5321
- ), Ko, Xo, Rm = class extends (Xo = Ve, Ko = Wo, Xo) {
5321
+ ), Xo, Qo, Rm = class extends (Qo = Ve, Xo = Ko, Qo) {
5322
5322
  constructor({
5323
5323
  message: e = "Model not found",
5324
5324
  statusCode: t = 404,
5325
5325
  modelId: r,
5326
5326
  cause: n
5327
5327
  } = {}) {
5328
- super({ message: e, statusCode: t, cause: n }), this[Ko] = !0, this.name = il, this.type = "model_not_found", this.modelId = r;
5328
+ super({ message: e, statusCode: t, cause: n }), this[Xo] = !0, this.name = ll, this.type = "model_not_found", this.modelId = r;
5329
5329
  }
5330
5330
  static isInstance(e) {
5331
- return Ve.hasMarker(e) && Wo in e;
5331
+ return Ve.hasMarker(e) && Ko in e;
5332
5332
  }
5333
- }, ll = "GatewayInternalServerError", xm = `vercel.ai.gateway.error.${ll}`, Qo = Symbol.for(xm), es, ts, rs = class extends (ts = Ve, es = Qo, ts) {
5333
+ }, ul = "GatewayInternalServerError", xm = `vercel.ai.gateway.error.${ul}`, es = Symbol.for(xm), ts, rs, ns = class extends (rs = Ve, ts = es, rs) {
5334
5334
  constructor({
5335
5335
  message: e = "Internal server error",
5336
5336
  statusCode: t = 500,
5337
5337
  cause: r
5338
5338
  } = {}) {
5339
- super({ message: e, statusCode: t, cause: r }), this[es] = !0, this.name = ll, this.type = "internal_server_error";
5339
+ super({ message: e, statusCode: t, cause: r }), this[ts] = !0, this.name = ul, this.type = "internal_server_error";
5340
5340
  }
5341
5341
  static isInstance(e) {
5342
- return Ve.hasMarker(e) && Qo in e;
5342
+ return Ve.hasMarker(e) && es in e;
5343
5343
  }
5344
- }, ul = "GatewayResponseError", km = `vercel.ai.gateway.error.${ul}`, ns = Symbol.for(km), as, os, Pm = class extends (os = Ve, as = ns, os) {
5344
+ }, cl = "GatewayResponseError", km = `vercel.ai.gateway.error.${cl}`, as = Symbol.for(km), os, ss, Pm = class extends (ss = Ve, os = as, ss) {
5345
5345
  constructor({
5346
5346
  message: e = "Invalid response from Gateway",
5347
5347
  statusCode: t = 502,
@@ -5349,13 +5349,13 @@ Run 'npx vercel link' to link your project, then 'vc env pull' to fetch the toke
5349
5349
  validationError: n,
5350
5350
  cause: a
5351
5351
  } = {}) {
5352
- super({ message: e, statusCode: t, cause: a }), this[as] = !0, this.name = ul, this.type = "response_error", this.response = r, this.validationError = n;
5352
+ super({ message: e, statusCode: t, cause: a }), this[os] = !0, this.name = cl, this.type = "response_error", this.response = r, this.validationError = n;
5353
5353
  }
5354
5354
  static isInstance(e) {
5355
- return Ve.hasMarker(e) && ns in e;
5355
+ return Ve.hasMarker(e) && as in e;
5356
5356
  }
5357
5357
  };
5358
- async function ss({
5358
+ async function is({
5359
5359
  response: e,
5360
5360
  statusCode: t,
5361
5361
  defaultMessage: r = "Gateway request failed",
@@ -5400,9 +5400,9 @@ async function ss({
5400
5400
  });
5401
5401
  }
5402
5402
  case "internal_server_error":
5403
- return new rs({ message: l, statusCode: t, cause: n });
5403
+ return new ns({ message: l, statusCode: t, cause: n });
5404
5404
  default:
5405
- return new rs({ message: l, statusCode: t, cause: n });
5405
+ return new ns({ message: l, statusCode: t, cause: n });
5406
5406
  }
5407
5407
  }
5408
5408
  var Cm = ir(
@@ -5412,20 +5412,20 @@ var Cm = ir(
5412
5412
  message: x(),
5413
5413
  type: x().nullish(),
5414
5414
  param: zt().nullish(),
5415
- code: $e([x(), sn()]).nullish()
5415
+ code: $e([x(), ln()]).nullish()
5416
5416
  })
5417
5417
  })
5418
5418
  )
5419
5419
  );
5420
5420
  function Nt(e, t) {
5421
5421
  var r;
5422
- return Ve.isInstance(e) ? e : Le.isInstance(e) ? ss({
5422
+ return Ve.isInstance(e) ? e : Le.isInstance(e) ? is({
5423
5423
  response: Dm(e),
5424
5424
  statusCode: (r = e.statusCode) != null ? r : 500,
5425
5425
  defaultMessage: "Gateway request failed",
5426
5426
  cause: e,
5427
5427
  authMethod: t
5428
- }) : ss({
5428
+ }) : is({
5429
5429
  response: {},
5430
5430
  statusCode: 500,
5431
5431
  defaultMessage: e instanceof Error ? `Gateway request failed: ${e.message}` : "Unknown Gateway error",
@@ -5444,23 +5444,23 @@ function Dm(e) {
5444
5444
  }
5445
5445
  return {};
5446
5446
  }
5447
- var cl = "ai-gateway-auth-method";
5447
+ var dl = "ai-gateway-auth-method";
5448
5448
  async function ar(e) {
5449
5449
  const t = await it({
5450
- value: e[cl],
5450
+ value: e[dl],
5451
5451
  schema: $m
5452
5452
  });
5453
5453
  return t.success ? t.value : void 0;
5454
5454
  }
5455
5455
  var $m = ir(
5456
5456
  () => Zt($e([re("api-key"), re("oidc")]))
5457
- ), is = class {
5457
+ ), ls = class {
5458
5458
  constructor(e) {
5459
5459
  this.config = e;
5460
5460
  }
5461
5461
  async getAvailableModels() {
5462
5462
  try {
5463
- const { value: e } = await Co({
5463
+ const { value: e } = await Do({
5464
5464
  url: `${this.config.baseURL}/config`,
5465
5465
  headers: await He(this.config.headers()),
5466
5466
  successfulResponseHandler: Ar(
@@ -5479,7 +5479,7 @@ var $m = ir(
5479
5479
  }
5480
5480
  async getCredits() {
5481
5481
  try {
5482
- const e = new URL(this.config.baseURL), { value: t } = await Co({
5482
+ const e = new URL(this.config.baseURL), { value: t } = await Do({
5483
5483
  url: `${e.origin}/v1/credits`,
5484
5484
  headers: await He(this.config.headers()),
5485
5485
  successfulResponseHandler: Ar(
@@ -5522,7 +5522,7 @@ var $m = ir(
5522
5522
  provider: x(),
5523
5523
  modelId: x()
5524
5524
  }),
5525
- modelType: ji(["language", "embedding", "image"]).nullish()
5525
+ modelType: Gi(["language", "embedding", "image"]).nullish()
5526
5526
  })
5527
5527
  )
5528
5528
  })
@@ -5558,9 +5558,9 @@ var $m = ir(
5558
5558
  responseHeaders: o,
5559
5559
  value: s,
5560
5560
  rawValue: i
5561
- } = await pn({
5561
+ } = await fn({
5562
5562
  url: this.getUrl(),
5563
- headers: cn(
5563
+ headers: dn(
5564
5564
  a,
5565
5565
  e.headers,
5566
5566
  this.getModelConfigHeaders(this.modelId, !1),
@@ -5588,9 +5588,9 @@ var $m = ir(
5588
5588
  async doStream(e) {
5589
5589
  const { args: t, warnings: r } = await this.getArgs(e), { abortSignal: n } = e, a = await He(this.config.headers());
5590
5590
  try {
5591
- const { value: o, responseHeaders: s } = await pn({
5591
+ const { value: o, responseHeaders: s } = await fn({
5592
5592
  url: this.getUrl(),
5593
- headers: cn(
5593
+ headers: dn(
5594
5594
  a,
5595
5595
  e.headers,
5596
5596
  this.getModelConfigHeaders(this.modelId, !0),
@@ -5684,9 +5684,9 @@ var $m = ir(
5684
5684
  responseHeaders: s,
5685
5685
  value: i,
5686
5686
  rawValue: l
5687
- } = await pn({
5687
+ } = await fn({
5688
5688
  url: this.getUrl(),
5689
- headers: cn(
5689
+ headers: dn(
5690
5690
  o,
5691
5691
  t ?? {},
5692
5692
  this.getModelConfigHeaders(),
@@ -5729,8 +5729,8 @@ var $m = ir(
5729
5729
  }, Um = ir(
5730
5730
  () => Zt(
5731
5731
  B({
5732
- embeddings: Ge(Ge(sn())),
5733
- usage: B({ tokens: sn() }).nullish(),
5732
+ embeddings: Ge(Ge(ln())),
5733
+ usage: B({ tokens: ln() }).nullish(),
5734
5734
  providerMetadata: At(x(), At(x(), zt())).optional()
5735
5735
  })
5736
5736
  )
@@ -5760,9 +5760,9 @@ var $m = ir(
5760
5760
  responseHeaders: p,
5761
5761
  value: y,
5762
5762
  rawValue: E
5763
- } = await pn({
5763
+ } = await fn({
5764
5764
  url: this.getUrl(),
5765
- headers: cn(
5765
+ headers: dn(
5766
5766
  d,
5767
5767
  l ?? {},
5768
5768
  this.getModelConfigHeaders(),
@@ -5776,9 +5776,9 @@ var $m = ir(
5776
5776
  ...a && { seed: a },
5777
5777
  ...i && { providerOptions: i },
5778
5778
  ...o && {
5779
- files: o.map((v) => ls(v))
5779
+ files: o.map((v) => us(v))
5780
5780
  },
5781
- ...s && { mask: ls(s) }
5781
+ ...s && { mask: us(s) }
5782
5782
  },
5783
5783
  successfulResponseHandler: Ar(
5784
5784
  Gm
@@ -5815,10 +5815,10 @@ var $m = ir(
5815
5815
  };
5816
5816
  }
5817
5817
  };
5818
- function ls(e) {
5818
+ function us(e) {
5819
5819
  return e.type === "file" && e.data instanceof Uint8Array ? {
5820
5820
  ...e,
5821
- data: dn(e.data)
5821
+ data: pn(e.data)
5822
5822
  } : e;
5823
5823
  }
5824
5824
  var jm = B({
@@ -5836,7 +5836,7 @@ var jm = B({
5836
5836
  });
5837
5837
  async function Bm() {
5838
5838
  var e;
5839
- return (e = tl.getContext().headers) == null ? void 0 : e["x-vercel-id"];
5839
+ return (e = rl.getContext().headers) == null ? void 0 : e["x-vercel-id"];
5840
5840
  }
5841
5841
  var Vm = "3.0.8", qm = "0.0.1";
5842
5842
  function Hm(e = {}) {
@@ -5851,7 +5851,7 @@ function Hm(e = {}) {
5851
5851
  {
5852
5852
  Authorization: `Bearer ${v.token}`,
5853
5853
  "ai-gateway-protocol-version": qm,
5854
- [cl]: v.authMethod,
5854
+ [dl]: v.authMethod,
5855
5855
  ...e.headers
5856
5856
  },
5857
5857
  `ai-sdk/gateway/${Vm}`
@@ -5865,13 +5865,13 @@ function Hm(e = {}) {
5865
5865
  });
5866
5866
  }
5867
5867
  }, u = () => {
5868
- const v = Xr({
5868
+ const v = Qr({
5869
5869
  settingValue: void 0,
5870
5870
  environmentVariableName: "VERCEL_DEPLOYMENT_ID"
5871
- }), b = Xr({
5871
+ }), b = Qr({
5872
5872
  settingValue: void 0,
5873
5873
  environmentVariableName: "VERCEL_ENV"
5874
- }), P = Xr({
5874
+ }), P = Qr({
5875
5875
  settingValue: void 0,
5876
5876
  environmentVariableName: "VERCEL_REGION"
5877
5877
  });
@@ -5893,7 +5893,7 @@ function Hm(e = {}) {
5893
5893
  }), d = async () => {
5894
5894
  var v, b, P;
5895
5895
  const C = (P = (b = (v = e._internal) == null ? void 0 : v.currentDate) == null ? void 0 : b.call(v).getTime()) != null ? P : Date.now();
5896
- return (!n || C - s > o) && (s = C, n = new is({
5896
+ return (!n || C - s > o) && (s = C, n = new ls({
5897
5897
  baseURL: i,
5898
5898
  headers: l,
5899
5899
  fetch: e.fetch
@@ -5903,7 +5903,7 @@ function Hm(e = {}) {
5903
5903
  await ar(await l())
5904
5904
  );
5905
5905
  })), a ? Promise.resolve(a) : n;
5906
- }, p = async () => new is({
5906
+ }, p = async () => new ls({
5907
5907
  baseURL: i,
5908
5908
  headers: l,
5909
5909
  fetch: e.fetch
@@ -5937,7 +5937,7 @@ function Hm(e = {}) {
5937
5937
  }
5938
5938
  var Jm = Hm();
5939
5939
  async function Ym(e) {
5940
- const t = Xr({
5940
+ const t = Qr({
5941
5941
  settingValue: e.apiKey,
5942
5942
  environmentVariableName: "AI_GATEWAY_API_KEY"
5943
5943
  });
@@ -5945,13 +5945,13 @@ async function Ym(e) {
5945
5945
  token: t,
5946
5946
  authMethod: "api-key"
5947
5947
  } : {
5948
- token: await tl.getVercelOidcToken(),
5948
+ token: await rl.getVercelOidcToken(),
5949
5949
  authMethod: "oidc"
5950
5950
  };
5951
5951
  }
5952
- var Wm = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof global == "object" ? global : {}, $t = "1.9.0", us = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
5952
+ var Wm = typeof globalThis == "object" ? globalThis : typeof self == "object" ? self : typeof window == "object" ? window : typeof global == "object" ? global : {}, $t = "1.9.0", cs = /^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;
5953
5953
  function Km(e) {
5954
- var t = /* @__PURE__ */ new Set([e]), r = /* @__PURE__ */ new Set(), n = e.match(us);
5954
+ var t = /* @__PURE__ */ new Set([e]), r = /* @__PURE__ */ new Set(), n = e.match(cs);
5955
5955
  if (!n)
5956
5956
  return function() {
5957
5957
  return !1;
@@ -5977,7 +5977,7 @@ function Km(e) {
5977
5977
  return !0;
5978
5978
  if (r.has(l))
5979
5979
  return !1;
5980
- var u = l.match(us);
5980
+ var u = l.match(cs);
5981
5981
  if (!u)
5982
5982
  return o(l);
5983
5983
  var c = {
@@ -6109,7 +6109,7 @@ var ay = function(e, t) {
6109
6109
  if (r || arguments.length === 2) for (var n = 0, a = t.length, o; n < a; n++)
6110
6110
  (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
6111
6111
  return e.concat(o || Array.prototype.slice.call(t));
6112
- }, sy = "diag", fn = (
6112
+ }, sy = "diag", gn = (
6113
6113
  /** @class */
6114
6114
  (function() {
6115
6115
  function e() {
@@ -6228,7 +6228,7 @@ var ly = (
6228
6228
  if (r || arguments.length === 2) for (var n = 0, a = t.length, o; n < a; n++)
6229
6229
  (o || !(n in t)) && (o || (o = Array.prototype.slice.call(t, 0, n)), o[n] = t[n]);
6230
6230
  return e.concat(o || Array.prototype.slice.call(t));
6231
- }, Zn = "context", hy = new py(), dl = (
6231
+ }, jn = "context", hy = new py(), pl = (
6232
6232
  /** @class */
6233
6233
  (function() {
6234
6234
  function e() {
@@ -6236,7 +6236,7 @@ var ly = (
6236
6236
  return e.getInstance = function() {
6237
6237
  return this._instance || (this._instance = new e()), this._instance;
6238
6238
  }, e.prototype.setGlobalContextManager = function(t) {
6239
- return Sa(Zn, t, fn.instance());
6239
+ return Sa(jn, t, gn.instance());
6240
6240
  }, e.prototype.active = function() {
6241
6241
  return this._getContextManager().active();
6242
6242
  }, e.prototype.with = function(t, r, n) {
@@ -6246,18 +6246,18 @@ var ly = (
6246
6246
  }, e.prototype.bind = function(t, r) {
6247
6247
  return this._getContextManager().bind(t, r);
6248
6248
  }, e.prototype._getContextManager = function() {
6249
- return Rr(Zn) || hy;
6249
+ return Rr(jn) || hy;
6250
6250
  }, e.prototype.disable = function() {
6251
- this._getContextManager().disable(), Aa(Zn, fn.instance());
6251
+ this._getContextManager().disable(), Aa(jn, gn.instance());
6252
6252
  }, e;
6253
6253
  })()
6254
6254
  ), na;
6255
6255
  (function(e) {
6256
6256
  e[e.NONE = 0] = "NONE", e[e.SAMPLED = 1] = "SAMPLED";
6257
6257
  })(na || (na = {}));
6258
- var pl = "0000000000000000", fl = "00000000000000000000000000000000", my = {
6259
- traceId: fl,
6260
- spanId: pl,
6258
+ var fl = "0000000000000000", gl = "00000000000000000000000000000000", my = {
6259
+ traceId: gl,
6260
+ spanId: fl,
6261
6261
  traceFlags: na.NONE
6262
6262
  }, Tr = (
6263
6263
  /** @class */
@@ -6292,7 +6292,7 @@ function Oa(e) {
6292
6292
  return e.getValue(Na) || void 0;
6293
6293
  }
6294
6294
  function yy() {
6295
- return Oa(dl.getInstance().active());
6295
+ return Oa(pl.getInstance().active());
6296
6296
  }
6297
6297
  function Ra(e, t) {
6298
6298
  return e.setValue(Na, t);
@@ -6303,41 +6303,41 @@ function vy(e) {
6303
6303
  function wy(e, t) {
6304
6304
  return Ra(e, new Tr(t));
6305
6305
  }
6306
- function gl(e) {
6306
+ function hl(e) {
6307
6307
  var t;
6308
6308
  return (t = Oa(e)) === null || t === void 0 ? void 0 : t.spanContext();
6309
6309
  }
6310
6310
  var _y = /^([0-9a-f]{32})$/i, Ty = /^[0-9a-f]{16}$/i;
6311
6311
  function Ey(e) {
6312
- return _y.test(e) && e !== fl;
6312
+ return _y.test(e) && e !== gl;
6313
6313
  }
6314
6314
  function by(e) {
6315
- return Ty.test(e) && e !== pl;
6315
+ return Ty.test(e) && e !== fl;
6316
6316
  }
6317
- function hl(e) {
6317
+ function ml(e) {
6318
6318
  return Ey(e.traceId) && by(e.spanId);
6319
6319
  }
6320
6320
  function Iy(e) {
6321
6321
  return new Tr(e);
6322
6322
  }
6323
- var jn = dl.getInstance(), ml = (
6323
+ var Gn = pl.getInstance(), yl = (
6324
6324
  /** @class */
6325
6325
  (function() {
6326
6326
  function e() {
6327
6327
  }
6328
6328
  return e.prototype.startSpan = function(t, r, n) {
6329
- n === void 0 && (n = jn.active());
6329
+ n === void 0 && (n = Gn.active());
6330
6330
  var a = !!(r != null && r.root);
6331
6331
  if (a)
6332
6332
  return new Tr();
6333
- var o = n && gl(n);
6334
- return Sy(o) && hl(o) ? new Tr(o) : new Tr();
6333
+ var o = n && hl(n);
6334
+ return Sy(o) && ml(o) ? new Tr(o) : new Tr();
6335
6335
  }, e.prototype.startActiveSpan = function(t, r, n, a) {
6336
6336
  var o, s, i;
6337
6337
  if (!(arguments.length < 2)) {
6338
6338
  arguments.length === 2 ? i = r : arguments.length === 3 ? (o = r, i = n) : (o = r, s = n, i = a);
6339
- var l = s ?? jn.active(), u = this.startSpan(t, o, l), c = Ra(l, u);
6340
- return jn.with(c, i, void 0, u);
6339
+ var l = s ?? Gn.active(), u = this.startSpan(t, o, l), c = Ra(l, u);
6340
+ return Gn.with(c, i, void 0, u);
6341
6341
  }
6342
6342
  }, e;
6343
6343
  })()
@@ -6345,7 +6345,7 @@ var jn = dl.getInstance(), ml = (
6345
6345
  function Sy(e) {
6346
6346
  return typeof e == "object" && typeof e.spanId == "string" && typeof e.traceId == "string" && typeof e.traceFlags == "number";
6347
6347
  }
6348
- var Ay = new ml(), Ny = (
6348
+ var Ay = new yl(), Ny = (
6349
6349
  /** @class */
6350
6350
  (function() {
6351
6351
  function e(t, r, n, a) {
@@ -6369,10 +6369,10 @@ var Ay = new ml(), Ny = (
6369
6369
  function e() {
6370
6370
  }
6371
6371
  return e.prototype.getTracer = function(t, r, n) {
6372
- return new ml();
6372
+ return new yl();
6373
6373
  }, e;
6374
6374
  })()
6375
- ), Ry = new Oy(), cs = (
6375
+ ), Ry = new Oy(), ds = (
6376
6376
  /** @class */
6377
6377
  (function() {
6378
6378
  function e() {
@@ -6390,90 +6390,90 @@ var Ay = new ml(), Ny = (
6390
6390
  return (a = this._delegate) === null || a === void 0 ? void 0 : a.getTracer(t, r, n);
6391
6391
  }, e;
6392
6392
  })()
6393
- ), gn;
6393
+ ), hn;
6394
6394
  (function(e) {
6395
6395
  e[e.UNSET = 0] = "UNSET", e[e.OK = 1] = "OK", e[e.ERROR = 2] = "ERROR";
6396
- })(gn || (gn = {}));
6397
- var Gn = "trace", xy = (
6396
+ })(hn || (hn = {}));
6397
+ var Bn = "trace", xy = (
6398
6398
  /** @class */
6399
6399
  (function() {
6400
6400
  function e() {
6401
- this._proxyTracerProvider = new cs(), this.wrapSpanContext = Iy, this.isSpanContextValid = hl, this.deleteSpan = vy, this.getSpan = Oa, this.getActiveSpan = yy, this.getSpanContext = gl, this.setSpan = Ra, this.setSpanContext = wy;
6401
+ this._proxyTracerProvider = new ds(), this.wrapSpanContext = Iy, this.isSpanContextValid = ml, this.deleteSpan = vy, this.getSpan = Oa, this.getActiveSpan = yy, this.getSpanContext = hl, this.setSpan = Ra, this.setSpanContext = wy;
6402
6402
  }
6403
6403
  return e.getInstance = function() {
6404
6404
  return this._instance || (this._instance = new e()), this._instance;
6405
6405
  }, e.prototype.setGlobalTracerProvider = function(t) {
6406
- var r = Sa(Gn, this._proxyTracerProvider, fn.instance());
6406
+ var r = Sa(Bn, this._proxyTracerProvider, gn.instance());
6407
6407
  return r && this._proxyTracerProvider.setDelegate(t), r;
6408
6408
  }, e.prototype.getTracerProvider = function() {
6409
- return Rr(Gn) || this._proxyTracerProvider;
6409
+ return Rr(Bn) || this._proxyTracerProvider;
6410
6410
  }, e.prototype.getTracer = function(t, r) {
6411
6411
  return this.getTracerProvider().getTracer(t, r);
6412
6412
  }, e.prototype.disable = function() {
6413
- Aa(Gn, fn.instance()), this._proxyTracerProvider = new cs();
6413
+ Aa(Bn, gn.instance()), this._proxyTracerProvider = new ds();
6414
6414
  }, e;
6415
6415
  })()
6416
6416
  ), ky = xy.getInstance(), Py = Object.defineProperty, Cy = (e, t) => {
6417
6417
  for (var r in t)
6418
6418
  Py(e, r, { get: t[r], enumerable: !0 });
6419
- }, yl = "AI_InvalidArgumentError", vl = `vercel.ai.error.${yl}`, Dy = Symbol.for(vl), wl, ot = class extends H {
6419
+ }, vl = "AI_InvalidArgumentError", wl = `vercel.ai.error.${vl}`, Dy = Symbol.for(wl), _l, ot = class extends H {
6420
6420
  constructor({
6421
6421
  parameter: e,
6422
6422
  value: t,
6423
6423
  message: r
6424
6424
  }) {
6425
6425
  super({
6426
- name: yl,
6426
+ name: vl,
6427
6427
  message: `Invalid argument for parameter ${e}: ${r}`
6428
- }), this[wl] = !0, this.parameter = e, this.value = t;
6428
+ }), this[_l] = !0, this.parameter = e, this.value = t;
6429
6429
  }
6430
6430
  static isInstance(e) {
6431
- return H.hasMarker(e, vl);
6431
+ return H.hasMarker(e, wl);
6432
6432
  }
6433
6433
  };
6434
- wl = Dy;
6435
- var _l = "AI_InvalidToolApprovalError", Tl = `vercel.ai.error.${_l}`, $y = Symbol.for(Tl), El, My = class extends H {
6434
+ _l = Dy;
6435
+ var Tl = "AI_InvalidToolApprovalError", El = `vercel.ai.error.${Tl}`, $y = Symbol.for(El), bl, My = class extends H {
6436
6436
  constructor({ approvalId: e }) {
6437
6437
  super({
6438
- name: _l,
6438
+ name: Tl,
6439
6439
  message: `Tool approval response references unknown approvalId: "${e}". No matching tool-approval-request found in message history.`
6440
- }), this[El] = !0, this.approvalId = e;
6440
+ }), this[bl] = !0, this.approvalId = e;
6441
6441
  }
6442
6442
  static isInstance(e) {
6443
- return H.hasMarker(e, Tl);
6443
+ return H.hasMarker(e, El);
6444
6444
  }
6445
6445
  };
6446
- El = $y;
6447
- var bl = "AI_InvalidToolInputError", Il = `vercel.ai.error.${bl}`, Fy = Symbol.for(Il), Sl, xa = class extends H {
6446
+ bl = $y;
6447
+ var Il = "AI_InvalidToolInputError", Sl = `vercel.ai.error.${Il}`, Fy = Symbol.for(Sl), Al, xa = class extends H {
6448
6448
  constructor({
6449
6449
  toolInput: e,
6450
6450
  toolName: t,
6451
6451
  cause: r,
6452
6452
  message: n = `Invalid input for tool ${t}: ${or(r)}`
6453
6453
  }) {
6454
- super({ name: bl, message: n, cause: r }), this[Sl] = !0, this.toolInput = e, this.toolName = t;
6454
+ super({ name: Il, message: n, cause: r }), this[Al] = !0, this.toolInput = e, this.toolName = t;
6455
6455
  }
6456
6456
  static isInstance(e) {
6457
- return H.hasMarker(e, Il);
6457
+ return H.hasMarker(e, Sl);
6458
6458
  }
6459
6459
  };
6460
- Sl = Fy;
6461
- var Al = "AI_ToolCallNotFoundForApprovalError", Nl = `vercel.ai.error.${Al}`, zy = Symbol.for(Nl), Ol, ka = class extends H {
6460
+ Al = Fy;
6461
+ var Nl = "AI_ToolCallNotFoundForApprovalError", Ol = `vercel.ai.error.${Nl}`, zy = Symbol.for(Ol), Rl, ka = class extends H {
6462
6462
  constructor({
6463
6463
  toolCallId: e,
6464
6464
  approvalId: t
6465
6465
  }) {
6466
6466
  super({
6467
- name: Al,
6467
+ name: Nl,
6468
6468
  message: `Tool call "${e}" not found for approval request "${t}".`
6469
- }), this[Ol] = !0, this.toolCallId = e, this.approvalId = t;
6469
+ }), this[Rl] = !0, this.toolCallId = e, this.approvalId = t;
6470
6470
  }
6471
6471
  static isInstance(e) {
6472
- return H.hasMarker(e, Nl);
6472
+ return H.hasMarker(e, Ol);
6473
6473
  }
6474
6474
  };
6475
- Ol = zy;
6476
- var Rl = "AI_NoObjectGeneratedError", xl = `vercel.ai.error.${Rl}`, Ly = Symbol.for(xl), kl, bt = class extends H {
6475
+ Rl = zy;
6476
+ var xl = "AI_NoObjectGeneratedError", kl = `vercel.ai.error.${xl}`, Ly = Symbol.for(kl), Pl, bt = class extends H {
6477
6477
  constructor({
6478
6478
  message: e = "No object generated.",
6479
6479
  cause: t,
@@ -6482,52 +6482,52 @@ var Rl = "AI_NoObjectGeneratedError", xl = `vercel.ai.error.${Rl}`, Ly = Symbol.
6482
6482
  usage: a,
6483
6483
  finishReason: o
6484
6484
  }) {
6485
- super({ name: Rl, message: e, cause: t }), this[kl] = !0, this.text = r, this.response = n, this.usage = a, this.finishReason = o;
6485
+ super({ name: xl, message: e, cause: t }), this[Pl] = !0, this.text = r, this.response = n, this.usage = a, this.finishReason = o;
6486
6486
  }
6487
6487
  static isInstance(e) {
6488
- return H.hasMarker(e, xl);
6488
+ return H.hasMarker(e, kl);
6489
6489
  }
6490
6490
  };
6491
- kl = Ly;
6492
- var Pl = "AI_NoOutputGeneratedError", Cl = `vercel.ai.error.${Pl}`, Uy = Symbol.for(Cl), Dl, $l = class extends H {
6491
+ Pl = Ly;
6492
+ var Cl = "AI_NoOutputGeneratedError", Dl = `vercel.ai.error.${Cl}`, Uy = Symbol.for(Dl), $l, Ml = class extends H {
6493
6493
  // used in isInstance
6494
6494
  constructor({
6495
6495
  message: e = "No output generated.",
6496
6496
  cause: t
6497
6497
  } = {}) {
6498
- super({ name: Pl, message: e, cause: t }), this[Dl] = !0;
6498
+ super({ name: Cl, message: e, cause: t }), this[$l] = !0;
6499
6499
  }
6500
6500
  static isInstance(e) {
6501
- return H.hasMarker(e, Cl);
6501
+ return H.hasMarker(e, Dl);
6502
6502
  }
6503
6503
  };
6504
- Dl = Uy;
6505
- var Ml = "AI_NoSuchToolError", Fl = `vercel.ai.error.${Ml}`, Zy = Symbol.for(Fl), zl, aa = class extends H {
6504
+ $l = Uy;
6505
+ var Fl = "AI_NoSuchToolError", zl = `vercel.ai.error.${Fl}`, Zy = Symbol.for(zl), Ll, aa = class extends H {
6506
6506
  constructor({
6507
6507
  toolName: e,
6508
6508
  availableTools: t = void 0,
6509
6509
  message: r = `Model tried to call unavailable tool '${e}'. ${t === void 0 ? "No tools are available." : `Available tools: ${t.join(", ")}.`}`
6510
6510
  }) {
6511
- super({ name: Ml, message: r }), this[zl] = !0, this.toolName = e, this.availableTools = t;
6511
+ super({ name: Fl, message: r }), this[Ll] = !0, this.toolName = e, this.availableTools = t;
6512
6512
  }
6513
6513
  static isInstance(e) {
6514
- return H.hasMarker(e, Fl);
6514
+ return H.hasMarker(e, zl);
6515
6515
  }
6516
6516
  };
6517
- zl = Zy;
6518
- var Ll = "AI_ToolCallRepairError", Ul = `vercel.ai.error.${Ll}`, jy = Symbol.for(Ul), Zl, Gy = class extends H {
6517
+ Ll = Zy;
6518
+ var Ul = "AI_ToolCallRepairError", Zl = `vercel.ai.error.${Ul}`, jy = Symbol.for(Zl), jl, Gy = class extends H {
6519
6519
  constructor({
6520
6520
  cause: e,
6521
6521
  originalError: t,
6522
6522
  message: r = `Error repairing tool call: ${or(e)}`
6523
6523
  }) {
6524
- super({ name: Ll, message: r, cause: e }), this[Zl] = !0, this.originalError = t;
6524
+ super({ name: Ul, message: r, cause: e }), this[jl] = !0, this.originalError = t;
6525
6525
  }
6526
6526
  static isInstance(e) {
6527
- return H.hasMarker(e, Ul);
6527
+ return H.hasMarker(e, Zl);
6528
6528
  }
6529
6529
  };
6530
- Zl = jy;
6530
+ jl = jy;
6531
6531
  var By = class extends H {
6532
6532
  constructor(e) {
6533
6533
  super({
@@ -6535,31 +6535,31 @@ var By = class extends H {
6535
6535
  message: `Unsupported model version ${e.version} for provider "${e.provider}" and model "${e.modelId}". AI SDK 5 only supports models that implement specification version "v2".`
6536
6536
  }), this.version = e.version, this.provider = e.provider, this.modelId = e.modelId;
6537
6537
  }
6538
- }, jl = "AI_InvalidMessageRoleError", Gl = `vercel.ai.error.${jl}`, Vy = Symbol.for(Gl), Bl, qy = class extends H {
6538
+ }, Gl = "AI_InvalidMessageRoleError", Bl = `vercel.ai.error.${Gl}`, Vy = Symbol.for(Bl), Vl, qy = class extends H {
6539
6539
  constructor({
6540
6540
  role: e,
6541
6541
  message: t = `Invalid message role: '${e}'. Must be one of: "system", "user", "assistant", "tool".`
6542
6542
  }) {
6543
- super({ name: jl, message: t }), this[Bl] = !0, this.role = e;
6543
+ super({ name: Gl, message: t }), this[Vl] = !0, this.role = e;
6544
6544
  }
6545
6545
  static isInstance(e) {
6546
- return H.hasMarker(e, Gl);
6546
+ return H.hasMarker(e, Bl);
6547
6547
  }
6548
6548
  };
6549
- Bl = Vy;
6550
- var Vl = "AI_RetryError", ql = `vercel.ai.error.${Vl}`, Hy = Symbol.for(ql), Hl, ds = class extends H {
6549
+ Vl = Vy;
6550
+ var ql = "AI_RetryError", Hl = `vercel.ai.error.${ql}`, Hy = Symbol.for(Hl), Jl, ps = class extends H {
6551
6551
  constructor({
6552
6552
  message: e,
6553
6553
  reason: t,
6554
6554
  errors: r
6555
6555
  }) {
6556
- super({ name: Vl, message: e }), this[Hl] = !0, this.reason = t, this.errors = r, this.lastError = r[r.length - 1];
6556
+ super({ name: ql, message: e }), this[Jl] = !0, this.reason = t, this.errors = r, this.lastError = r[r.length - 1];
6557
6557
  }
6558
6558
  static isInstance(e) {
6559
- return H.hasMarker(e, ql);
6559
+ return H.hasMarker(e, Hl);
6560
6560
  }
6561
6561
  };
6562
- Hl = Hy;
6562
+ Jl = Hy;
6563
6563
  function Jy({
6564
6564
  warning: e,
6565
6565
  provider: t,
@@ -6581,7 +6581,7 @@ function Jy({
6581
6581
  return `${n} ${JSON.stringify(e, null, 2)}`;
6582
6582
  }
6583
6583
  }
6584
- var Yy = "AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.", ps = !1, Pa = (e) => {
6584
+ var Yy = "AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG_WARNINGS global to false.", fs = !1, Pa = (e) => {
6585
6585
  if (e.warnings.length === 0)
6586
6586
  return;
6587
6587
  const t = globalThis.AI_SDK_LOG_WARNINGS;
@@ -6590,7 +6590,7 @@ var Yy = "AI SDK Warning System: To turn off warning logging, set the AI_SDK_LOG
6590
6590
  t(e);
6591
6591
  return;
6592
6592
  }
6593
- ps || (ps = !0, console.info(Yy));
6593
+ fs || (fs = !0, console.info(Yy));
6594
6594
  for (const r of e.warnings)
6595
6595
  console.warn(
6596
6596
  Jy({
@@ -6631,8 +6631,8 @@ function Ky(e) {
6631
6631
  const a = await t.doGenerate(...n);
6632
6632
  return {
6633
6633
  ...a,
6634
- finishReason: Jl(a.finishReason),
6635
- usage: Yl(a.usage)
6634
+ finishReason: Yl(a.finishReason),
6635
+ usage: Wl(a.usage)
6636
6636
  };
6637
6637
  };
6638
6638
  case "doStream":
@@ -6657,8 +6657,8 @@ function Xy(e) {
6657
6657
  case "finish":
6658
6658
  r.enqueue({
6659
6659
  ...t,
6660
- finishReason: Jl(t.finishReason),
6661
- usage: Yl(t.usage)
6660
+ finishReason: Yl(t.finishReason),
6661
+ usage: Wl(t.usage)
6662
6662
  });
6663
6663
  break;
6664
6664
  default:
@@ -6669,13 +6669,13 @@ function Xy(e) {
6669
6669
  })
6670
6670
  );
6671
6671
  }
6672
- function Jl(e) {
6672
+ function Yl(e) {
6673
6673
  return {
6674
6674
  unified: e === "unknown" ? "other" : e,
6675
6675
  raw: void 0
6676
6676
  };
6677
6677
  }
6678
- function Yl(e) {
6678
+ function Wl(e) {
6679
6679
  return {
6680
6680
  inputTokens: {
6681
6681
  total: e.inputTokens,
@@ -6690,7 +6690,7 @@ function Yl(e) {
6690
6690
  }
6691
6691
  };
6692
6692
  }
6693
- function hn(e) {
6693
+ function mn(e) {
6694
6694
  if (typeof e != "string") {
6695
6695
  if (e.specificationVersion !== "v3" && e.specificationVersion !== "v2") {
6696
6696
  const t = e;
@@ -6812,19 +6812,19 @@ function nv({
6812
6812
  ))
6813
6813
  return a.mediaType;
6814
6814
  }
6815
- var Wl = "6.0.11", av = async ({ url: e }) => {
6815
+ var Kl = "6.0.11", av = async ({ url: e }) => {
6816
6816
  var t;
6817
6817
  const r = e.toString();
6818
6818
  try {
6819
6819
  const n = await fetch(r, {
6820
6820
  headers: zr(
6821
6821
  {},
6822
- `ai-sdk/${Wl}`,
6822
+ `ai-sdk/${Kl}`,
6823
6823
  ba()
6824
6824
  )
6825
6825
  });
6826
6826
  if (!n.ok)
6827
- throw new $n({
6827
+ throw new Mn({
6828
6828
  url: r,
6829
6829
  statusCode: n.status,
6830
6830
  statusText: n.statusText
@@ -6834,7 +6834,7 @@ var Wl = "6.0.11", av = async ({ url: e }) => {
6834
6834
  mediaType: (t = n.headers.get("content-type")) != null ? t : void 0
6835
6835
  };
6836
6836
  } catch (n) {
6837
- throw $n.isInstance(n) ? n : new $n({ url: r, cause: n });
6837
+ throw Mn.isInstance(n) ? n : new Mn({ url: r, cause: n });
6838
6838
  }
6839
6839
  }, ov = (e = av) => (t) => Promise.all(
6840
6840
  t.map(
@@ -6855,10 +6855,10 @@ function sv(e) {
6855
6855
  };
6856
6856
  }
6857
6857
  }
6858
- var Kl = $e([
6858
+ var Xl = $e([
6859
6859
  x(),
6860
- ln(Uint8Array),
6861
- ln(ArrayBuffer),
6860
+ un(Uint8Array),
6861
+ un(ArrayBuffer),
6862
6862
  nh(
6863
6863
  // Buffer might not be available in some environments such as CloudFlare:
6864
6864
  (e) => {
@@ -6868,7 +6868,7 @@ var Kl = $e([
6868
6868
  { message: "Must be a Buffer" }
6869
6869
  )
6870
6870
  ]);
6871
- function Xl(e) {
6871
+ function Ql(e) {
6872
6872
  if (e instanceof Uint8Array)
6873
6873
  return { data: e, mediaType: void 0 };
6874
6874
  if (e instanceof ArrayBuffer)
@@ -6892,12 +6892,12 @@ function Xl(e) {
6892
6892
  return { data: e, mediaType: void 0 };
6893
6893
  }
6894
6894
  function iv(e) {
6895
- return typeof e == "string" ? e : e instanceof ArrayBuffer ? dn(new Uint8Array(e)) : dn(e);
6895
+ return typeof e == "string" ? e : e instanceof ArrayBuffer ? pn(new Uint8Array(e)) : pn(e);
6896
6896
  }
6897
6897
  function xr(e) {
6898
6898
  return e === void 0 ? [] : Array.isArray(e) ? e : [e];
6899
6899
  }
6900
- async function Ql({
6900
+ async function eu({
6901
6901
  prompt: e,
6902
6902
  supportedUrls: t,
6903
6903
  download: r = ov()
@@ -6964,7 +6964,7 @@ function lv({
6964
6964
  const a = n.providerOptions;
6965
6965
  switch (n.type) {
6966
6966
  case "file": {
6967
- const { data: o, mediaType: s } = Xl(
6967
+ const { data: o, mediaType: s } = Ql(
6968
6968
  n.data
6969
6969
  );
6970
6970
  return {
@@ -7001,7 +7001,7 @@ function lv({
7001
7001
  type: "tool-result",
7002
7002
  toolCallId: n.toolCallId,
7003
7003
  toolName: n.toolName,
7004
- output: fs(n.output),
7004
+ output: gs(n.output),
7005
7005
  providerOptions: a
7006
7006
  };
7007
7007
  }
@@ -7021,7 +7021,7 @@ function lv({
7021
7021
  type: "tool-result",
7022
7022
  toolCallId: n.toolCallId,
7023
7023
  toolName: n.toolName,
7024
- output: fs(n.output),
7024
+ output: gs(n.output),
7025
7025
  providerOptions: n.providerOptions
7026
7026
  };
7027
7027
  case "tool-approval-response":
@@ -7095,7 +7095,7 @@ function cv(e, t) {
7095
7095
  default:
7096
7096
  throw new Error(`Unsupported part type: ${a}`);
7097
7097
  }
7098
- const { data: o, mediaType: s } = Xl(n);
7098
+ const { data: o, mediaType: s } = Ql(n);
7099
7099
  let i = s ?? e.mediaType, l = o;
7100
7100
  if (l instanceof URL) {
7101
7101
  const u = t[l.toString()];
@@ -7124,7 +7124,7 @@ function cv(e, t) {
7124
7124
  }
7125
7125
  }
7126
7126
  }
7127
- function fs(e) {
7127
+ function gs(e) {
7128
7128
  return e.type !== "content" ? e : {
7129
7129
  type: "content",
7130
7130
  value: e.value.map((t) => t.type !== "media" ? t : t.mediaType.startsWith("image/") ? {
@@ -7145,9 +7145,9 @@ async function Er({
7145
7145
  tool: n,
7146
7146
  errorMode: a
7147
7147
  }) {
7148
- return a === "text" ? { type: "error-text", value: or(r) } : a === "json" ? { type: "error-json", value: gs(r) } : n != null && n.toModelOutput ? await n.toModelOutput({ toolCallId: e, input: t, output: r }) : typeof r == "string" ? { type: "text", value: r } : { type: "json", value: gs(r) };
7148
+ return a === "text" ? { type: "error-text", value: or(r) } : a === "json" ? { type: "error-json", value: hs(r) } : n != null && n.toModelOutput ? await n.toModelOutput({ toolCallId: e, input: t, output: r }) : typeof r == "string" ? { type: "text", value: r } : { type: "json", value: hs(r) };
7149
7149
  }
7150
- function gs(e) {
7150
+ function hs(e) {
7151
7151
  return e === void 0 ? null : e;
7152
7152
  }
7153
7153
  function oa({
@@ -7224,7 +7224,7 @@ function oa({
7224
7224
  function dv(e) {
7225
7225
  return e != null && Object.keys(e).length > 0;
7226
7226
  }
7227
- async function eu({
7227
+ async function tu({
7228
7228
  tools: e,
7229
7229
  toolChoice: t,
7230
7230
  activeTools: r
@@ -7276,7 +7276,7 @@ var kr = rh(
7276
7276
  () => $e([
7277
7277
  Ng(),
7278
7278
  x(),
7279
- sn(),
7279
+ ln(),
7280
7280
  wa(),
7281
7281
  At(x(), kr.optional()),
7282
7282
  Ge(kr)
@@ -7284,18 +7284,18 @@ var kr = rh(
7284
7284
  ), we = At(
7285
7285
  x(),
7286
7286
  At(x(), kr.optional())
7287
- ), tu = B({
7287
+ ), ru = B({
7288
7288
  type: re("text"),
7289
7289
  text: x(),
7290
7290
  providerOptions: we.optional()
7291
7291
  }), pv = B({
7292
7292
  type: re("image"),
7293
- image: $e([Kl, ln(URL)]),
7293
+ image: $e([Xl, un(URL)]),
7294
7294
  mediaType: x().optional(),
7295
7295
  providerOptions: we.optional()
7296
- }), ru = B({
7296
+ }), nu = B({
7297
7297
  type: re("file"),
7298
- data: $e([Kl, ln(URL)]),
7298
+ data: $e([Xl, un(URL)]),
7299
7299
  filename: x().optional(),
7300
7300
  mediaType: x(),
7301
7301
  providerOptions: we.optional()
@@ -7393,7 +7393,7 @@ var kr = rh(
7393
7393
  )
7394
7394
  })
7395
7395
  ]
7396
- ), nu = B({
7396
+ ), au = B({
7397
7397
  type: re("tool-result"),
7398
7398
  toolCallId: x(),
7399
7399
  toolName: x(),
@@ -7418,7 +7418,7 @@ var kr = rh(
7418
7418
  role: re("user"),
7419
7419
  content: $e([
7420
7420
  x(),
7421
- Ge($e([tu, pv, ru]))
7421
+ Ge($e([ru, pv, nu]))
7422
7422
  ]),
7423
7423
  providerOptions: we.optional()
7424
7424
  }), _v = B({
@@ -7427,11 +7427,11 @@ var kr = rh(
7427
7427
  x(),
7428
7428
  Ge(
7429
7429
  $e([
7430
- tu,
7431
7430
  ru,
7431
+ nu,
7432
7432
  fv,
7433
7433
  gv,
7434
- nu,
7434
+ au,
7435
7435
  mv
7436
7436
  ])
7437
7437
  )
@@ -7439,7 +7439,7 @@ var kr = rh(
7439
7439
  providerOptions: we.optional()
7440
7440
  }), Tv = B({
7441
7441
  role: re("tool"),
7442
- content: Ge($e([nu, yv])),
7442
+ content: Ge($e([au, yv])),
7443
7443
  providerOptions: we.optional()
7444
7444
  }), Ev = $e([
7445
7445
  vv,
@@ -7447,7 +7447,7 @@ var kr = rh(
7447
7447
  _v,
7448
7448
  Tv
7449
7449
  ]);
7450
- async function au(e) {
7450
+ async function ou(e) {
7451
7451
  if (e.prompt == null && e.messages == null)
7452
7452
  throw new Wt({
7453
7453
  prompt: e,
@@ -7497,7 +7497,7 @@ async function au(e) {
7497
7497
  system: e.system
7498
7498
  };
7499
7499
  }
7500
- function ou(e) {
7500
+ function su(e) {
7501
7501
  if (!Ia.isInstance(e))
7502
7502
  return e;
7503
7503
  const t = (process == null ? void 0 : process.env.NODE_ENV) === "production", r = "https://ai-sdk.dev/unauthenticated-ai-gateway";
@@ -7530,7 +7530,7 @@ function Pr({
7530
7530
  "ai.telemetry.functionId": t == null ? void 0 : t.functionId
7531
7531
  };
7532
7532
  }
7533
- function su({
7533
+ function iu({
7534
7534
  model: e,
7535
7535
  settings: t,
7536
7536
  telemetry: r,
@@ -7602,7 +7602,7 @@ var bv = {
7602
7602
  spanId: "",
7603
7603
  traceFlags: 0
7604
7604
  };
7605
- function iu({
7605
+ function lu({
7606
7606
  isEnabled: e = !1,
7607
7607
  tracer: t
7608
7608
  } = {}) {
@@ -7624,7 +7624,7 @@ async function Cr({
7624
7624
  return a && o.end(), s;
7625
7625
  } catch (s) {
7626
7626
  try {
7627
- lu(o, s);
7627
+ uu(o, s);
7628
7628
  } finally {
7629
7629
  o.end();
7630
7630
  }
@@ -7633,15 +7633,15 @@ async function Cr({
7633
7633
  }
7634
7634
  );
7635
7635
  }
7636
- function lu(e, t) {
7636
+ function uu(e, t) {
7637
7637
  t instanceof Error ? (e.recordException({
7638
7638
  name: t.name,
7639
7639
  message: t.message,
7640
7640
  stack: t.stack
7641
7641
  }), e.setStatus({
7642
- code: gn.ERROR,
7642
+ code: hn.ERROR,
7643
7643
  message: t.message
7644
- })) : e.setStatus({ code: gn.ERROR });
7644
+ })) : e.setStatus({ code: hn.ERROR });
7645
7645
  }
7646
7646
  async function st({
7647
7647
  telemetry: e,
@@ -7670,7 +7670,7 @@ async function st({
7670
7670
  }
7671
7671
  return r;
7672
7672
  }
7673
- function uu(e) {
7673
+ function cu(e) {
7674
7674
  return JSON.stringify(
7675
7675
  e.map((t) => ({
7676
7676
  ...t,
@@ -7683,7 +7683,7 @@ function uu(e) {
7683
7683
  }))
7684
7684
  );
7685
7685
  }
7686
- function cu(e) {
7686
+ function du(e) {
7687
7687
  return {
7688
7688
  inputTokens: e.inputTokens.total,
7689
7689
  inputTokenDetails: {
@@ -7705,7 +7705,7 @@ function cu(e) {
7705
7705
  cachedInputTokens: e.inputTokens.cacheRead
7706
7706
  };
7707
7707
  }
7708
- function Bn() {
7708
+ function Vn() {
7709
7709
  return {
7710
7710
  inputTokens: void 0,
7711
7711
  inputTokenDetails: {
@@ -7722,7 +7722,7 @@ function Bn() {
7722
7722
  raw: void 0
7723
7723
  };
7724
7724
  }
7725
- function du(e, t) {
7725
+ function pu(e, t) {
7726
7726
  var r, n, a, o, s, i, l, u, c, d;
7727
7727
  return {
7728
7728
  inputTokens: Qe(e.inputTokens, t.inputTokens),
@@ -7765,7 +7765,7 @@ function du(e, t) {
7765
7765
  function Qe(e, t) {
7766
7766
  return e == null && t == null ? void 0 : (e ?? 0) + (t ?? 0);
7767
7767
  }
7768
- function In(e, t) {
7768
+ function Sn(e, t) {
7769
7769
  if (e === void 0 && t === void 0)
7770
7770
  return;
7771
7771
  if (e === void 0)
@@ -7779,7 +7779,7 @@ function In(e, t) {
7779
7779
  if (a === void 0)
7780
7780
  continue;
7781
7781
  const o = n in e ? e[n] : void 0, s = a !== null && typeof a == "object" && !Array.isArray(a) && !(a instanceof Date) && !(a instanceof RegExp), i = o != null && typeof o == "object" && !Array.isArray(o) && !(o instanceof Date) && !(o instanceof RegExp);
7782
- s && i ? r[n] = In(
7782
+ s && i ? r[n] = Sn(
7783
7783
  o,
7784
7784
  a
7785
7785
  ) : r[n] = a;
@@ -7811,13 +7811,13 @@ var Av = ({
7811
7811
  initialDelayInMs: t = 2e3,
7812
7812
  backoffFactor: r = 2,
7813
7813
  abortSignal: n
7814
- } = {}) => async (a) => pu(a, {
7814
+ } = {}) => async (a) => fu(a, {
7815
7815
  maxRetries: e,
7816
7816
  delayInMs: t,
7817
7817
  backoffFactor: r,
7818
7818
  abortSignal: n
7819
7819
  });
7820
- async function pu(e, {
7820
+ async function fu(e, {
7821
7821
  maxRetries: t,
7822
7822
  delayInMs: r,
7823
7823
  backoffFactor: n,
@@ -7830,7 +7830,7 @@ async function pu(e, {
7830
7830
  throw s;
7831
7831
  const i = Ea(s), l = [...o, s], u = l.length;
7832
7832
  if (u > t)
7833
- throw new ds({
7833
+ throw new ps({
7834
7834
  message: `Failed after ${u} attempts. Last error: ${i}`,
7835
7835
  reason: "maxRetriesExceeded",
7836
7836
  errors: l
@@ -7842,7 +7842,7 @@ async function pu(e, {
7842
7842
  exponentialBackoffDelay: r
7843
7843
  }),
7844
7844
  { abortSignal: a }
7845
- ), pu(
7845
+ ), fu(
7846
7846
  e,
7847
7847
  {
7848
7848
  maxRetries: t,
@@ -7852,14 +7852,14 @@ async function pu(e, {
7852
7852
  },
7853
7853
  l
7854
7854
  );
7855
- throw u === 1 ? s : new ds({
7855
+ throw u === 1 ? s : new ps({
7856
7856
  message: `Failed after ${u} attempts with non-retryable error: '${i}'`,
7857
7857
  reason: "errorNotRetryable",
7858
7858
  errors: l
7859
7859
  });
7860
7860
  }
7861
7861
  }
7862
- function fu({
7862
+ function gu({
7863
7863
  maxRetries: e,
7864
7864
  abortSignal: t
7865
7865
  }) {
@@ -7886,7 +7886,7 @@ function fu({
7886
7886
  })
7887
7887
  };
7888
7888
  }
7889
- function gu({
7889
+ function hu({
7890
7890
  messages: e
7891
7891
  }) {
7892
7892
  const t = e.at(-1);
@@ -7988,7 +7988,7 @@ async function Ca({
7988
7988
  preliminary: !0
7989
7989
  }) : y = v.output;
7990
7990
  } catch (E) {
7991
- return lu(p, E), {
7991
+ return uu(p, E), {
7992
7992
  type: "tool-error",
7993
7993
  toolCallId: u,
7994
7994
  toolName: l,
@@ -8023,14 +8023,14 @@ async function Ca({
8023
8023
  }
8024
8024
  });
8025
8025
  }
8026
- function hs(e) {
8026
+ function ms(e) {
8027
8027
  const t = e.filter(
8028
8028
  (r) => r.type === "text"
8029
8029
  );
8030
8030
  if (t.length !== 0)
8031
8031
  return t.map((r) => r.text).join("");
8032
8032
  }
8033
- var hu = class {
8033
+ var mu = class {
8034
8034
  constructor({
8035
8035
  data: e,
8036
8036
  mediaType: t
@@ -8040,18 +8040,18 @@ var hu = class {
8040
8040
  }
8041
8041
  // lazy conversion with caching to avoid unnecessary conversion overhead:
8042
8042
  get base64() {
8043
- return this.base64Data == null && (this.base64Data = dn(this.uint8ArrayData)), this.base64Data;
8043
+ return this.base64Data == null && (this.base64Data = pn(this.uint8ArrayData)), this.base64Data;
8044
8044
  }
8045
8045
  // lazy conversion with caching to avoid unnecessary conversion overhead:
8046
8046
  get uint8Array() {
8047
8047
  return this.uint8ArrayData == null && (this.uint8ArrayData = Ta(this.base64Data)), this.uint8ArrayData;
8048
8048
  }
8049
- }, Nv = class extends hu {
8049
+ }, Nv = class extends mu {
8050
8050
  constructor(e) {
8051
8051
  super(e), this.type = "file";
8052
8052
  }
8053
8053
  };
8054
- async function mu({
8054
+ async function yu({
8055
8055
  tool: e,
8056
8056
  toolCall: t,
8057
8057
  messages: r,
@@ -8069,7 +8069,7 @@ Cy(Ov, {
8069
8069
  choice: () => Pv,
8070
8070
  json: () => Cv,
8071
8071
  object: () => xv,
8072
- text: () => mn
8072
+ text: () => yn
8073
8073
  });
8074
8074
  function Rv(e) {
8075
8075
  const t = ["ROOT"];
@@ -8325,7 +8325,7 @@ async function Lr(e) {
8325
8325
  let t = await tt({ text: e });
8326
8326
  return t.success ? { value: t.value, state: "successful-parse" } : (t = await tt({ text: Rv(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
8327
8327
  }
8328
- var mn = () => ({
8328
+ var yn = () => ({
8329
8329
  responseFormat: Promise.resolve({ type: "text" }),
8330
8330
  async parseCompleteOutput({ text: e }) {
8331
8331
  return e;
@@ -8575,7 +8575,7 @@ var mn = () => ({
8575
8575
  }
8576
8576
  }
8577
8577
  });
8578
- async function yu({
8578
+ async function vu({
8579
8579
  toolCall: e,
8580
8580
  tools: t,
8581
8581
  repairToolCall: r,
@@ -8586,11 +8586,11 @@ async function yu({
8586
8586
  try {
8587
8587
  if (t == null) {
8588
8588
  if (e.providerExecuted && e.dynamic)
8589
- return await vu(e);
8589
+ return await wu(e);
8590
8590
  throw new aa({ toolName: e.toolName });
8591
8591
  }
8592
8592
  try {
8593
- return await ms({ toolCall: e, tools: t });
8593
+ return await ys({ toolCall: e, tools: t });
8594
8594
  } catch (s) {
8595
8595
  if (r == null || !(aa.isInstance(s) || xa.isInstance(s)))
8596
8596
  throw s;
@@ -8615,7 +8615,7 @@ async function yu({
8615
8615
  }
8616
8616
  if (i == null)
8617
8617
  throw s;
8618
- return await ms({ toolCall: i, tools: t });
8618
+ return await ys({ toolCall: i, tools: t });
8619
8619
  }
8620
8620
  } catch (s) {
8621
8621
  const i = await tt({ text: e.input }), l = i.success ? i.value : e.input;
@@ -8633,7 +8633,7 @@ async function yu({
8633
8633
  };
8634
8634
  }
8635
8635
  }
8636
- async function vu(e) {
8636
+ async function wu(e) {
8637
8637
  const t = e.input.trim() === "" ? { success: !0, value: {} } : await tt({ text: e.input });
8638
8638
  if (t.success === !1)
8639
8639
  throw new xa({
@@ -8651,14 +8651,14 @@ async function vu(e) {
8651
8651
  providerMetadata: e.providerMetadata
8652
8652
  };
8653
8653
  }
8654
- async function ms({
8654
+ async function ys({
8655
8655
  toolCall: e,
8656
8656
  tools: t
8657
8657
  }) {
8658
8658
  const r = e.toolName, n = t[r];
8659
8659
  if (n == null) {
8660
8660
  if (e.providerExecuted && e.dynamic)
8661
- return await vu(e);
8661
+ return await wu(e);
8662
8662
  throw new aa({
8663
8663
  toolName: e.toolName,
8664
8664
  availableTools: Object.keys(t)
@@ -8690,7 +8690,7 @@ async function ms({
8690
8690
  title: n.title
8691
8691
  };
8692
8692
  }
8693
- var wu = class {
8693
+ var _u = class {
8694
8694
  constructor({
8695
8695
  content: e,
8696
8696
  finishReason: t,
@@ -8745,10 +8745,10 @@ var wu = class {
8745
8745
  );
8746
8746
  }
8747
8747
  };
8748
- function _u(e) {
8748
+ function Tu(e) {
8749
8749
  return ({ steps: t }) => t.length === e;
8750
8750
  }
8751
- async function Tu({
8751
+ async function Eu({
8752
8752
  stopConditions: e,
8753
8753
  steps: t
8754
8754
  }) {
@@ -8878,7 +8878,7 @@ async function ia({
8878
8878
  maxRetries: s,
8879
8879
  abortSignal: i,
8880
8880
  headers: l,
8881
- stopWhen: u = _u(1),
8881
+ stopWhen: u = Tu(1),
8882
8882
  experimental_output: c,
8883
8883
  output: d = c,
8884
8884
  experimental_telemetry: p,
@@ -8898,22 +8898,22 @@ async function ia({
8898
8898
  onFinish: D,
8899
8899
  ...z
8900
8900
  }) {
8901
- const le = hn(e), L = xr(u), { maxRetries: ee, retry: te } = fu({
8901
+ const le = mn(e), L = xr(u), { maxRetries: ee, retry: te } = gu({
8902
8902
  maxRetries: s,
8903
8903
  abortSignal: i
8904
8904
  }), ce = oa(z), ke = zr(
8905
8905
  l ?? {},
8906
- `ai/${Wl}`
8907
- ), be = su({
8906
+ `ai/${Kl}`
8907
+ ), be = iu({
8908
8908
  model: le,
8909
8909
  telemetry: p,
8910
8910
  headers: ke,
8911
8911
  settings: { ...ce, maxRetries: ee }
8912
- }), gt = await au({
8912
+ }), gt = await ou({
8913
8913
  system: n,
8914
8914
  prompt: a,
8915
8915
  messages: o
8916
- }), Ze = iu(p);
8916
+ }), Ze = lu(p);
8917
8917
  try {
8918
8918
  return await Cr({
8919
8919
  name: "ai.generateText",
@@ -8937,11 +8937,11 @@ async function ia({
8937
8937
  tracer: Ze,
8938
8938
  fn: async (jt) => {
8939
8939
  var Gt, Me, Bt, Vt, lt, ut, Ur, ht;
8940
- const ur = gt.messages, ct = [], { approvedToolApprovals: Zr, deniedToolApprovals: cr } = gu({ messages: ur }), xt = Zr.filter(
8940
+ const ur = gt.messages, ct = [], { approvedToolApprovals: Zr, deniedToolApprovals: cr } = hu({ messages: ur }), xt = Zr.filter(
8941
8941
  (U) => !U.toolCall.providerExecuted
8942
8942
  );
8943
8943
  if (cr.length > 0 || xt.length > 0) {
8944
- const U = await ys({
8944
+ const U = await vs({
8945
8945
  toolCalls: xt.map(
8946
8946
  (X) => X.toolCall
8947
8947
  ),
@@ -9016,9 +9016,9 @@ async function ia({
9016
9016
  stepNumber: oe.length,
9017
9017
  messages: U,
9018
9018
  experimental_context: $
9019
- })), X = hn(
9019
+ })), X = mn(
9020
9020
  (Gt = se == null ? void 0 : se.model) != null ? Gt : le
9021
- ), dt = await Ql({
9021
+ ), dt = await eu({
9022
9022
  prompt: {
9023
9023
  system: (Me = se == null ? void 0 : se.system) != null ? Me : gt.system,
9024
9024
  messages: (Bt = se == null ? void 0 : se.messages) != null ? Bt : U
@@ -9027,7 +9027,7 @@ async function ia({
9027
9027
  download: g
9028
9028
  });
9029
9029
  $ = (Vt = se == null ? void 0 : se.experimental_context) != null ? Vt : $;
9030
- const { toolChoice: De, tools: mt } = await eu({
9030
+ const { toolChoice: De, tools: mt } = await tu({
9031
9031
  tools: t,
9032
9032
  toolChoice: (lt = se == null ? void 0 : se.toolChoice) != null ? lt : r,
9033
9033
  activeTools: (ut = se == null ? void 0 : se.activeTools) != null ? ut : v
@@ -9050,7 +9050,7 @@ async function ia({
9050
9050
  "ai.model.id": X.modelId,
9051
9051
  // prompt:
9052
9052
  "ai.prompt.messages": {
9053
- input: () => uu(dt)
9053
+ input: () => cu(dt)
9054
9054
  },
9055
9055
  "ai.prompt.tools": {
9056
9056
  // convert the language model level tools:
@@ -9074,7 +9074,7 @@ async function ia({
9074
9074
  tracer: Ze,
9075
9075
  fn: async (Ie) => {
9076
9076
  var qt, pt, Ht, Gr, Br, dr, pr, ft;
9077
- const Vr = In(
9077
+ const Vr = Sn(
9078
9078
  y,
9079
9079
  se == null ? void 0 : se.providerOptions
9080
9080
  ), Pe = await X.doGenerate({
@@ -9099,11 +9099,11 @@ async function ia({
9099
9099
  attributes: {
9100
9100
  "ai.response.finishReason": Pe.finishReason.unified,
9101
9101
  "ai.response.text": {
9102
- output: () => hs(Pe.content)
9102
+ output: () => ms(Pe.content)
9103
9103
  },
9104
9104
  "ai.response.toolCalls": {
9105
9105
  output: () => {
9106
- const wt = vs(Pe.content);
9106
+ const wt = ws(Pe.content);
9107
9107
  return wt == null ? void 0 : JSON.stringify(wt);
9108
9108
  }
9109
9109
  },
@@ -9135,7 +9135,7 @@ async function ia({
9135
9135
  Y.content.filter(
9136
9136
  (M) => M.type === "tool-call"
9137
9137
  ).map(
9138
- (M) => yu({
9138
+ (M) => vu({
9139
9139
  toolCall: M,
9140
9140
  tools: t,
9141
9141
  repairToolCall: C,
@@ -9154,7 +9154,7 @@ async function ia({
9154
9154
  messages: U,
9155
9155
  abortSignal: i,
9156
9156
  experimental_context: $
9157
- }), await mu({
9157
+ }), await yu({
9158
9158
  tool: Ie,
9159
9159
  toolCall: M,
9160
9160
  messages: U,
@@ -9181,7 +9181,7 @@ async function ia({
9181
9181
  ge = Te.filter(
9182
9182
  (M) => !M.providerExecuted
9183
9183
  ), t != null && he.push(
9184
- ...await ys({
9184
+ ...await vs({
9185
9185
  toolCalls: ge.filter(
9186
9186
  (M) => !M.invalid && Oe[M.toolCallId] == null
9187
9187
  ),
@@ -9218,11 +9218,11 @@ async function ia({
9218
9218
  tools: t
9219
9219
  })
9220
9220
  );
9221
- const yt = new wu({
9221
+ const yt = new _u({
9222
9222
  content: kt,
9223
9223
  finishReason: Y.finishReason.unified,
9224
9224
  rawFinishReason: Y.finishReason.raw,
9225
- usage: cu(Y.usage),
9225
+ usage: du(Y.usage),
9226
9226
  warnings: Y.warnings,
9227
9227
  providerMetadata: Y.providerMetadata,
9228
9228
  request: (Ur = Y.request) != null ? Ur : {},
@@ -9242,7 +9242,7 @@ async function ia({
9242
9242
  // 1. There are client tool calls that have all been executed, OR
9243
9243
  // 2. There are pending deferred results from provider-executed tools
9244
9244
  (ge.length > 0 && he.length === ge.length || q.size > 0) && // continue until a stop condition is met:
9245
- !await Tu({ stopConditions: L, steps: oe })
9245
+ !await Eu({ stopConditions: L, steps: oe })
9246
9246
  );
9247
9247
  jt.setAttributes(
9248
9248
  await st({
@@ -9250,11 +9250,11 @@ async function ia({
9250
9250
  attributes: {
9251
9251
  "ai.response.finishReason": Y.finishReason.unified,
9252
9252
  "ai.response.text": {
9253
- output: () => hs(Y.content)
9253
+ output: () => ms(Y.content)
9254
9254
  },
9255
9255
  "ai.response.toolCalls": {
9256
9256
  output: () => {
9257
- const U = vs(Y.content);
9257
+ const U = ws(Y.content);
9258
9258
  return U == null ? void 0 : JSON.stringify(U);
9259
9259
  }
9260
9260
  },
@@ -9268,7 +9268,7 @@ async function ia({
9268
9268
  })
9269
9269
  );
9270
9270
  const V = oe[oe.length - 1], rt = oe.reduce(
9271
- (U, se) => du(U, se.usage),
9271
+ (U, se) => pu(U, se.usage),
9272
9272
  {
9273
9273
  inputTokens: void 0,
9274
9274
  outputTokens: void 0,
@@ -9302,7 +9302,7 @@ async function ia({
9302
9302
  experimental_context: $
9303
9303
  }));
9304
9304
  let A;
9305
- return V.finishReason === "stop" && (A = await (d ?? mn()).parseCompleteOutput(
9305
+ return V.finishReason === "stop" && (A = await (d ?? yn()).parseCompleteOutput(
9306
9306
  { text: V.text },
9307
9307
  {
9308
9308
  response: V.response,
@@ -9317,10 +9317,10 @@ async function ia({
9317
9317
  }
9318
9318
  });
9319
9319
  } catch (jt) {
9320
- throw ou(jt);
9320
+ throw su(jt);
9321
9321
  }
9322
9322
  }
9323
- async function ys({
9323
+ async function vs({
9324
9324
  toolCalls: e,
9325
9325
  tools: t,
9326
9326
  tracer: r,
@@ -9414,11 +9414,11 @@ var $v = class {
9414
9414
  }
9415
9415
  get output() {
9416
9416
  if (this._output == null)
9417
- throw new $l();
9417
+ throw new Ml();
9418
9418
  return this._output;
9419
9419
  }
9420
9420
  };
9421
- function vs(e) {
9421
+ function ws(e) {
9422
9422
  const t = e.filter(
9423
9423
  (r) => r.type === "tool-call"
9424
9424
  );
@@ -9447,7 +9447,7 @@ function Mv({
9447
9447
  case "file": {
9448
9448
  o.push({
9449
9449
  type: "file",
9450
- file: new hu(s),
9450
+ file: new mu(s),
9451
9451
  ...s.providerMetadata != null ? { providerMetadata: s.providerMetadata } : {}
9452
9452
  });
9453
9453
  break;
@@ -9523,7 +9523,7 @@ function Mv({
9523
9523
  }
9524
9524
  return [...o, ...r, ...n];
9525
9525
  }
9526
- function Sn(e, t) {
9526
+ function An(e, t) {
9527
9527
  const r = new Headers(e ?? {});
9528
9528
  for (const [n, a] of Object.entries(t))
9529
9529
  r.has(n) || r.set(n, a);
@@ -9538,12 +9538,12 @@ function Fv({
9538
9538
  return new Response(n.pipeThrough(new TextEncoderStream()), {
9539
9539
  status: e ?? 200,
9540
9540
  statusText: t,
9541
- headers: Sn(r, {
9541
+ headers: An(r, {
9542
9542
  "content-type": "text/plain; charset=utf-8"
9543
9543
  })
9544
9544
  });
9545
9545
  }
9546
- function Eu({
9546
+ function bu({
9547
9547
  response: e,
9548
9548
  status: t,
9549
9549
  statusText: r,
@@ -9577,19 +9577,19 @@ function zv({
9577
9577
  headers: n,
9578
9578
  textStream: a
9579
9579
  }) {
9580
- Eu({
9580
+ bu({
9581
9581
  response: e,
9582
9582
  status: t,
9583
9583
  statusText: r,
9584
9584
  headers: Object.fromEntries(
9585
- Sn(n, {
9585
+ An(n, {
9586
9586
  "content-type": "text/plain; charset=utf-8"
9587
9587
  }).entries()
9588
9588
  ),
9589
9589
  stream: a.pipeThrough(new TextEncoderStream())
9590
9590
  });
9591
9591
  }
9592
- var bu = class extends TransformStream {
9592
+ var Iu = class extends TransformStream {
9593
9593
  constructor() {
9594
9594
  super({
9595
9595
  transform(e, t) {
@@ -9604,7 +9604,7 @@ var bu = class extends TransformStream {
9604
9604
  }
9605
9605
  });
9606
9606
  }
9607
- }, Iu = {
9607
+ }, Su = {
9608
9608
  "content-type": "text/event-stream",
9609
9609
  "cache-control": "no-cache",
9610
9610
  connection: "keep-alive",
@@ -9619,7 +9619,7 @@ function Lv({
9619
9619
  stream: n,
9620
9620
  consumeSseStream: a
9621
9621
  }) {
9622
- let o = n.pipeThrough(new bu());
9622
+ let o = n.pipeThrough(new Iu());
9623
9623
  if (a) {
9624
9624
  const [s, i] = o.tee();
9625
9625
  o = s, a({ stream: i });
@@ -9627,7 +9627,7 @@ function Lv({
9627
9627
  return new Response(o.pipeThrough(new TextEncoderStream()), {
9628
9628
  status: e,
9629
9629
  statusText: t,
9630
- headers: Sn(r, Iu)
9630
+ headers: An(r, Su)
9631
9631
  });
9632
9632
  }
9633
9633
  function Uv({
@@ -9651,7 +9651,7 @@ function jv(e) {
9651
9651
  function Gv(e) {
9652
9652
  return la(e) || jv(e);
9653
9653
  }
9654
- function ws(e) {
9654
+ function _s(e) {
9655
9655
  return e.type.split("-").slice(1).join("-");
9656
9656
  }
9657
9657
  function Bv({
@@ -9734,7 +9734,7 @@ function Vv({
9734
9734
  }
9735
9735
  async function C(g) {
9736
9736
  if (g != null) {
9737
- const $ = u.message.metadata != null ? In(u.message.metadata, g) : g;
9737
+ const $ = u.message.metadata != null ? Sn(u.message.metadata, g) : g;
9738
9738
  t != null && await ra({
9739
9739
  value: $,
9740
9740
  schema: t
@@ -9923,7 +9923,7 @@ function Vv({
9923
9923
  title: g.title
9924
9924
  }) : b({
9925
9925
  toolCallId: i.toolCallId,
9926
- toolName: ws(g),
9926
+ toolName: _s(g),
9927
9927
  state: "output-available",
9928
9928
  input: g.input,
9929
9929
  output: i.output,
@@ -9945,7 +9945,7 @@ function Vv({
9945
9945
  title: g.title
9946
9946
  }) : b({
9947
9947
  toolCallId: i.toolCallId,
9948
- toolName: ws(g),
9948
+ toolName: _s(g),
9949
9949
  state: "output-error",
9950
9950
  input: g.input,
9951
9951
  rawInput: g.rawInput,
@@ -10077,17 +10077,17 @@ function Hv({
10077
10077
  stream: a,
10078
10078
  consumeSseStream: o
10079
10079
  }) {
10080
- let s = a.pipeThrough(new bu());
10080
+ let s = a.pipeThrough(new Iu());
10081
10081
  if (o) {
10082
10082
  const [i, l] = s.tee();
10083
10083
  s = i, o({ stream: l });
10084
10084
  }
10085
- Eu({
10085
+ bu({
10086
10086
  response: e,
10087
10087
  status: t,
10088
10088
  statusText: r,
10089
10089
  headers: Object.fromEntries(
10090
- Sn(n, Iu).entries()
10090
+ An(n, Su).entries()
10091
10091
  ),
10092
10092
  stream: s.pipeThrough(new TextEncoderStream())
10093
10093
  });
@@ -10157,7 +10157,7 @@ async function Jv({
10157
10157
  r.releaseLock();
10158
10158
  }
10159
10159
  }
10160
- function _s() {
10160
+ function Ts() {
10161
10161
  let e, t;
10162
10162
  return {
10163
10163
  promise: new Promise((n, a) => {
@@ -10168,7 +10168,7 @@ function _s() {
10168
10168
  };
10169
10169
  }
10170
10170
  function Yv() {
10171
- let e = [], t = null, r = !1, n = _s();
10171
+ let e = [], t = null, r = !1, n = Ts();
10172
10172
  const a = () => {
10173
10173
  r = !0, n.resolve(), e.forEach((s) => s.cancel()), e = [], t == null || t.close();
10174
10174
  }, o = async () => {
@@ -10177,7 +10177,7 @@ function Yv() {
10177
10177
  return;
10178
10178
  }
10179
10179
  if (e.length === 0)
10180
- return n = _s(), await n.promise, o();
10180
+ return n = Ts(), await n.promise, o();
10181
10181
  try {
10182
10182
  const { value: s, done: i } = await e[0].read();
10183
10183
  i ? (e.shift(), e.length === 0 && r ? t == null || t.close() : await o()) : t == null || t.enqueue(s);
@@ -10278,7 +10278,7 @@ function Kv({
10278
10278
  type: "finish",
10279
10279
  finishReason: g.finishReason.unified,
10280
10280
  rawFinishReason: g.finishReason.raw,
10281
- usage: cu(g.usage),
10281
+ usage: du(g.usage),
10282
10282
  providerMetadata: g.providerMetadata
10283
10283
  };
10284
10284
  break;
@@ -10304,7 +10304,7 @@ function Kv({
10304
10304
  }
10305
10305
  case "tool-call": {
10306
10306
  try {
10307
- const h = await yu({
10307
+ const h = await vu({
10308
10308
  toolCall: g,
10309
10309
  tools: e,
10310
10310
  repairToolCall: i,
@@ -10332,7 +10332,7 @@ function Kv({
10332
10332
  messages: o,
10333
10333
  abortSignal: s,
10334
10334
  experimental_context: l
10335
- }), await mu({
10335
+ }), await yu({
10336
10336
  tool: N,
10337
10337
  toolCall: h,
10338
10338
  messages: o,
@@ -10445,7 +10445,7 @@ function Qv({
10445
10445
  maxRetries: s,
10446
10446
  abortSignal: i,
10447
10447
  headers: l,
10448
- stopWhen: u = _u(1),
10448
+ stopWhen: u = Tu(1),
10449
10449
  experimental_output: c,
10450
10450
  output: d = c,
10451
10451
  experimental_telemetry: p,
@@ -10473,7 +10473,7 @@ function Qv({
10473
10473
  ...ce
10474
10474
  }) {
10475
10475
  return new tw({
10476
- model: hn(e),
10476
+ model: mn(e),
10477
10477
  telemetry: p,
10478
10478
  headers: l,
10479
10479
  settings: ce,
@@ -10593,7 +10593,7 @@ var tw = class {
10593
10593
  var oe, q, V, rt;
10594
10594
  he.enqueue(ge);
10595
10595
  const { part: A } = ge;
10596
- if ((A.type === "text-delta" || A.type === "reasoning-delta" || A.type === "source" || A.type === "tool-call" || A.type === "tool-result" || A.type === "tool-input-start" || A.type === "tool-input-delta" || A.type === "raw") && await (h == null ? void 0 : h({ chunk: A })), A.type === "error" && await N({ error: ou(A.error) }), A.type === "text-start" && (lt[A.id] = {
10596
+ if ((A.type === "text-delta" || A.type === "reasoning-delta" || A.type === "source" || A.type === "tool-call" || A.type === "tool-result" || A.type === "tool-input-start" || A.type === "tool-input-delta" || A.type === "raw") && await (h == null ? void 0 : h({ chunk: A })), A.type === "error" && await N({ error: su(A.error) }), A.type === "text-start" && (lt[A.id] = {
10597
10597
  type: "text",
10598
10598
  text: "",
10599
10599
  providerMetadata: A.providerMetadata
@@ -10661,7 +10661,7 @@ var tw = class {
10661
10661
  const U = await sa({
10662
10662
  content: ce,
10663
10663
  tools: u
10664
- }), se = new wu({
10664
+ }), se = new _u({
10665
10665
  content: ce,
10666
10666
  finishReason: A.finishReason,
10667
10667
  rawFinishReason: A.rawFinishReason,
@@ -10685,13 +10685,13 @@ var tw = class {
10685
10685
  async flush(ge) {
10686
10686
  try {
10687
10687
  if (Me.length === 0) {
10688
- const V = new $l({
10688
+ const V = new Ml({
10689
10689
  message: "No output generated. Check the stream for errors."
10690
10690
  });
10691
10691
  Y._finishReason.reject(V), Y._rawFinishReason.reject(V), Y._totalUsage.reject(V), Y._steps.reject(V);
10692
10692
  return;
10693
10693
  }
10694
- const he = be ?? "other", oe = Ze ?? Bn();
10694
+ const he = be ?? "other", oe = Ze ?? Vn();
10695
10695
  Y._finishReason.resolve(he), Y._rawFinishReason.resolve(gt), Y._totalUsage.resolve(oe), Y._steps.resolve(Me);
10696
10696
  const q = Me[Me.length - 1];
10697
10697
  await (D == null ? void 0 : D({
@@ -10785,11 +10785,11 @@ var tw = class {
10785
10785
  }
10786
10786
  })
10787
10787
  );
10788
- this.baseStream = ct.pipeThrough(ew(v ?? mn())).pipeThrough(Ur);
10789
- const { maxRetries: Zr, retry: cr } = fu({
10788
+ this.baseStream = ct.pipeThrough(ew(v ?? yn())).pipeThrough(Ur);
10789
+ const { maxRetries: Zr, retry: cr } = gu({
10790
10790
  maxRetries: a,
10791
10791
  abortSignal: o
10792
- }), xt = iu(t), qe = oa(n), jr = su({
10792
+ }), xt = lu(t), qe = oa(n), jr = iu({
10793
10793
  model: e,
10794
10794
  telemetry: t,
10795
10795
  headers: r,
@@ -10812,11 +10812,11 @@ var tw = class {
10812
10812
  endWhenDone: !1,
10813
10813
  fn: async (ge) => {
10814
10814
  Vt = ge;
10815
- const he = await au({
10815
+ const he = await ou({
10816
10816
  system: s,
10817
10817
  prompt: i,
10818
10818
  messages: l
10819
- }), oe = he.messages, q = [], { approvedToolApprovals: V, deniedToolApprovals: rt } = gu({ messages: oe });
10819
+ }), oe = he.messages, q = [], { approvedToolApprovals: V, deniedToolApprovals: rt } = hu({ messages: oe });
10820
10820
  if (rt.length > 0 || V.length > 0) {
10821
10821
  const U = [
10822
10822
  ...V,
@@ -10922,22 +10922,22 @@ var tw = class {
10922
10922
  stepNumber: Me.length,
10923
10923
  messages: yt,
10924
10924
  experimental_context: L
10925
- })), Ie = hn(
10925
+ })), Ie = mn(
10926
10926
  (dt = M == null ? void 0 : M.model) != null ? dt : e
10927
- ), qt = await Ql({
10927
+ ), qt = await eu({
10928
10928
  prompt: {
10929
10929
  system: (De = M == null ? void 0 : M.system) != null ? De : he.system,
10930
10930
  messages: (mt = M == null ? void 0 : M.messages) != null ? mt : yt
10931
10931
  },
10932
10932
  supportedUrls: await Ie.supportedUrls,
10933
10933
  download: ee
10934
- }), { toolChoice: pt, tools: Ht } = await eu({
10934
+ }), { toolChoice: pt, tools: Ht } = await tu({
10935
10935
  tools: u,
10936
10936
  toolChoice: (Te = M == null ? void 0 : M.toolChoice) != null ? Te : c,
10937
10937
  activeTools: (Oe = M == null ? void 0 : M.activeTools) != null ? Oe : p
10938
10938
  });
10939
10939
  L = (Ee = M == null ? void 0 : M.experimental_context) != null ? Ee : L;
10940
- const Gr = In(
10940
+ const Gr = Sn(
10941
10941
  b,
10942
10942
  M == null ? void 0 : M.providerOptions
10943
10943
  ), {
@@ -10960,7 +10960,7 @@ var tw = class {
10960
10960
  "ai.model.id": Ie.modelId,
10961
10961
  // prompt:
10962
10962
  "ai.prompt.messages": {
10963
- input: () => uu(qt)
10963
+ input: () => cu(qt)
10964
10964
  },
10965
10965
  "ai.prompt.tools": {
10966
10966
  // convert the language model level tools:
@@ -11012,9 +11012,9 @@ var tw = class {
11012
11012
  experimental_context: L,
11013
11013
  generateId: R
11014
11014
  }), vt = pr ?? {}, wt = [], fr = [];
11015
- let An;
11016
- const Nn = {};
11017
- let Jt = "other", On, We = Bn(), Rn, $a = !0, nt = {
11015
+ let Nn;
11016
+ const On = {};
11017
+ let Jt = "other", Rn, We = Vn(), xn, $a = !0, nt = {
11018
11018
  id: R(),
11019
11019
  timestamp: $(),
11020
11020
  modelId: e.modelId
@@ -11025,7 +11025,7 @@ var tw = class {
11025
11025
  async transform(F, Ce) {
11026
11026
  var gr, hr, qr, Re, Yt;
11027
11027
  if (F.type === "stream-start") {
11028
- An = F.warnings;
11028
+ Nn = F.warnings;
11029
11029
  return;
11030
11030
  }
11031
11031
  if ($a) {
@@ -11037,11 +11037,11 @@ var tw = class {
11037
11037
  }), Ce.enqueue({
11038
11038
  type: "start-step",
11039
11039
  request: vt,
11040
- warnings: An ?? []
11040
+ warnings: Nn ?? []
11041
11041
  });
11042
11042
  }
11043
- const xn = F.type;
11044
- switch (xn) {
11043
+ const kn = F.type;
11044
+ switch (kn) {
11045
11045
  case "tool-approval-request":
11046
11046
  case "text-start":
11047
11047
  case "text-end": {
@@ -11092,7 +11092,7 @@ var tw = class {
11092
11092
  break;
11093
11093
  }
11094
11094
  case "finish": {
11095
- We = F.usage, Jt = F.finishReason, On = F.rawFinishReason, Rn = F.providerMetadata;
11095
+ We = F.usage, Jt = F.finishReason, Rn = F.rawFinishReason, xn = F.providerMetadata;
11096
11096
  const Se = g() - Vr;
11097
11097
  ft.addEvent("ai.stream.finish"), ft.setAttributes({
11098
11098
  "ai.response.msToFinish": Se,
@@ -11109,7 +11109,7 @@ var tw = class {
11109
11109
  break;
11110
11110
  }
11111
11111
  case "tool-input-start": {
11112
- Nn[F.id] = F.toolName;
11112
+ On[F.id] = F.toolName;
11113
11113
  const Se = u == null ? void 0 : u[F.toolName];
11114
11114
  (Se == null ? void 0 : Se.onInputStart) != null && await Se.onInputStart({
11115
11115
  toolCallId: F.id,
@@ -11124,12 +11124,12 @@ var tw = class {
11124
11124
  break;
11125
11125
  }
11126
11126
  case "tool-input-end": {
11127
- delete Nn[F.id], Ce.enqueue(F);
11127
+ delete On[F.id], Ce.enqueue(F);
11128
11128
  break;
11129
11129
  }
11130
11130
  case "tool-input-delta": {
11131
- const Se = Nn[F.id], kn = u == null ? void 0 : u[Se];
11132
- (kn == null ? void 0 : kn.onInputDelta) != null && await kn.onInputDelta({
11131
+ const Se = On[F.id], Pn = u == null ? void 0 : u[Se];
11132
+ (Pn == null ? void 0 : Pn.onInputDelta) != null && await Pn.onInputDelta({
11133
11133
  inputTextDelta: F.delta,
11134
11134
  toolCallId: F.id,
11135
11135
  messages: yt,
@@ -11147,7 +11147,7 @@ var tw = class {
11147
11147
  break;
11148
11148
  }
11149
11149
  default: {
11150
- const Se = xn;
11150
+ const Se = kn;
11151
11151
  throw new Error(`Unknown chunk type: ${Se}`);
11152
11152
  }
11153
11153
  }
@@ -11170,7 +11170,7 @@ var tw = class {
11170
11170
  "ai.response.id": nt.id,
11171
11171
  "ai.response.model": nt.modelId,
11172
11172
  "ai.response.timestamp": nt.timestamp.toISOString(),
11173
- "ai.response.providerMetadata": JSON.stringify(Rn),
11173
+ "ai.response.providerMetadata": JSON.stringify(xn),
11174
11174
  "ai.usage.inputTokens": We.inputTokens,
11175
11175
  "ai.usage.outputTokens": We.outputTokens,
11176
11176
  "ai.usage.totalTokens": We.totalTokens,
@@ -11192,15 +11192,15 @@ var tw = class {
11192
11192
  F.enqueue({
11193
11193
  type: "finish-step",
11194
11194
  finishReason: Jt,
11195
- rawFinishReason: On,
11195
+ rawFinishReason: Rn,
11196
11196
  usage: We,
11197
- providerMetadata: Rn,
11197
+ providerMetadata: xn,
11198
11198
  response: {
11199
11199
  ...nt,
11200
11200
  headers: dr == null ? void 0 : dr.headers
11201
11201
  }
11202
11202
  });
11203
- const gr = du(X, We);
11203
+ const gr = pu(X, We);
11204
11204
  await te.promise;
11205
11205
  const hr = wt.filter(
11206
11206
  (Re) => Re.providerExecuted !== !0
@@ -11224,7 +11224,7 @@ var tw = class {
11224
11224
  // 1. There are client tool calls that have all been executed, OR
11225
11225
  // 2. There are pending deferred results from provider-executed tools
11226
11226
  (hr.length > 0 && qr.length === hr.length || Bt.size > 0) && // continue until a stop condition is met:
11227
- !await Tu({
11227
+ !await Eu({
11228
11228
  stopConditions: E,
11229
11229
  steps: Me
11230
11230
  })
@@ -11254,7 +11254,7 @@ var tw = class {
11254
11254
  F.enqueue({
11255
11255
  type: "finish",
11256
11256
  finishReason: Jt,
11257
- rawFinishReason: On,
11257
+ rawFinishReason: Rn,
11258
11258
  totalUsage: gr
11259
11259
  }), Y.closeStream();
11260
11260
  }
@@ -11265,7 +11265,7 @@ var tw = class {
11265
11265
  await A({
11266
11266
  currentStep: 0,
11267
11267
  responseMessages: q,
11268
- usage: Bn()
11268
+ usage: Vn()
11269
11269
  });
11270
11270
  }
11271
11271
  }).catch((ge) => {
@@ -11406,7 +11406,7 @@ var tw = class {
11406
11406
  get output() {
11407
11407
  return this.finalStep.then((e) => {
11408
11408
  var t;
11409
- return ((t = this.outputSpecification) != null ? t : mn()).parseCompleteOutput(
11409
+ return ((t = this.outputSpecification) != null ? t : yn()).parseCompleteOutput(
11410
11410
  { text: e.text },
11411
11411
  {
11412
11412
  response: e.response,
@@ -11802,7 +11802,7 @@ CRITICAL REQUIREMENTS (Content Modification):
11802
11802
  5. Preserve all other language variants and properties unchanged
11803
11803
  6. Apply changes consistently across related properties when applicable
11804
11804
 
11805
- OUTPUT FORMAT: Valid JSON only, ready to be parsed directly.`, Ts = `
11805
+ OUTPUT FORMAT: Valid JSON only, ready to be parsed directly.`, Es = `
11806
11806
  🚨 CRITICAL FORMAT REQUIREMENT: Your response MUST start with '--START--' immediately. NEVER include any text, thinking, or reasoning before '--START--'. 🚨
11807
11807
 
11808
11808
 
@@ -12076,9 +12076,9 @@ function aw(e = null) {
12076
12076
  case "UPDATE_CONTENT":
12077
12077
  return nw;
12078
12078
  default:
12079
- return Ts;
12079
+ return Es;
12080
12080
  }
12081
- return Ts;
12081
+ return Es;
12082
12082
  }
12083
12083
  const ow = "google/gemini-2.5-flash";
12084
12084
  class sw {
@@ -12122,10 +12122,10 @@ var at = { exports: {} };
12122
12122
  const iw = "16.6.1", lw = {
12123
12123
  version: iw
12124
12124
  };
12125
- var Es;
12126
- function Su() {
12127
- if (Es) return at.exports;
12128
- Es = 1;
12125
+ var bs;
12126
+ function Au() {
12127
+ if (bs) return at.exports;
12128
+ bs = 1;
12129
12129
  const e = Yu, t = Wu, r = Ku, n = Xu, o = lw.version, s = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;
12130
12130
  function i(h) {
12131
12131
  const N = {};
@@ -12310,8 +12310,8 @@ function Su() {
12310
12310
  };
12311
12311
  return at.exports.configDotenv = R.configDotenv, at.exports._configVault = R._configVault, at.exports._parseVault = R._parseVault, at.exports.config = R.config, at.exports.decrypt = R.decrypt, at.exports.parse = R.parse, at.exports.populate = R.populate, at.exports = R, at.exports;
12312
12312
  }
12313
- var uw = Su();
12314
- const cw = /* @__PURE__ */ Ju(uw), dw = Rs("app_pages_metadata_id_seq", { startWith: "1", increment: "1", minValue: "1", maxValue: "9223372036854775807", cache: "1", cycle: !1 }), pw = Rs("webhook_events_id_seq", { startWith: "1", increment: "1", minValue: "1", maxValue: "9223372036854775807", cache: "1", cycle: !1 }), fw = Je("app_assets", {
12313
+ var uw = Au();
12314
+ const cw = /* @__PURE__ */ Ju(uw), dw = xs("app_pages_metadata_id_seq", { startWith: "1", increment: "1", minValue: "1", maxValue: "9223372036854775807", cache: "1", cycle: !1 }), pw = xs("webhook_events_id_seq", { startWith: "1", increment: "1", minValue: "1", maxValue: "9223372036854775807", cache: "1", cycle: !1 }), fw = Je("app_assets", {
12315
12315
  id: J().defaultRandom().primaryKey().notNull(),
12316
12316
  app: J(),
12317
12317
  name: O(),
@@ -12410,8 +12410,8 @@ const cw = /* @__PURE__ */ Ju(uw), dw = Rs("app_pages_metadata_id_seq", { startW
12410
12410
  id: J().defaultRandom().primaryKey().notNull(),
12411
12411
  createdAt: xe({ withTimezone: !0, mode: "string" }).defaultNow().notNull(),
12412
12412
  app: J(),
12413
- formData: Za(),
12414
- additionalData: Za(),
12413
+ formData: ja(),
12414
+ additionalData: ja(),
12415
12415
  formName: O().default(""),
12416
12416
  pageUrl: O()
12417
12417
  }, (e) => [
@@ -13441,40 +13441,40 @@ class Ow extends G {
13441
13441
  return !!n;
13442
13442
  }
13443
13443
  }
13444
- var bs = {}, Vn, Is;
13444
+ var Is = {}, qn, Ss;
13445
13445
  function Rw() {
13446
- if (Is) return Vn;
13447
- Is = 1;
13446
+ if (Ss) return qn;
13447
+ Ss = 1;
13448
13448
  const e = {};
13449
- return process.env.DOTENV_CONFIG_ENCODING != null && (e.encoding = process.env.DOTENV_CONFIG_ENCODING), process.env.DOTENV_CONFIG_PATH != null && (e.path = process.env.DOTENV_CONFIG_PATH), process.env.DOTENV_CONFIG_QUIET != null && (e.quiet = process.env.DOTENV_CONFIG_QUIET), process.env.DOTENV_CONFIG_DEBUG != null && (e.debug = process.env.DOTENV_CONFIG_DEBUG), process.env.DOTENV_CONFIG_OVERRIDE != null && (e.override = process.env.DOTENV_CONFIG_OVERRIDE), process.env.DOTENV_CONFIG_DOTENV_KEY != null && (e.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY), Vn = e, Vn;
13449
+ return process.env.DOTENV_CONFIG_ENCODING != null && (e.encoding = process.env.DOTENV_CONFIG_ENCODING), process.env.DOTENV_CONFIG_PATH != null && (e.path = process.env.DOTENV_CONFIG_PATH), process.env.DOTENV_CONFIG_QUIET != null && (e.quiet = process.env.DOTENV_CONFIG_QUIET), process.env.DOTENV_CONFIG_DEBUG != null && (e.debug = process.env.DOTENV_CONFIG_DEBUG), process.env.DOTENV_CONFIG_OVERRIDE != null && (e.override = process.env.DOTENV_CONFIG_OVERRIDE), process.env.DOTENV_CONFIG_DOTENV_KEY != null && (e.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY), qn = e, qn;
13450
13450
  }
13451
- var qn, Ss;
13451
+ var Hn, As;
13452
13452
  function xw() {
13453
- if (Ss) return qn;
13454
- Ss = 1;
13453
+ if (As) return Hn;
13454
+ As = 1;
13455
13455
  const e = /^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/;
13456
- return qn = function(r) {
13456
+ return Hn = function(r) {
13457
13457
  const n = r.reduce(function(a, o) {
13458
13458
  const s = o.match(e);
13459
13459
  return s && (a[s[1]] = s[2]), a;
13460
13460
  }, {});
13461
13461
  return "quiet" in n || (n.quiet = "true"), n;
13462
- }, qn;
13462
+ }, Hn;
13463
13463
  }
13464
- var As;
13464
+ var Ns;
13465
13465
  function kw() {
13466
- return As || (As = 1, (function() {
13467
- Su().config(
13466
+ return Ns || (Ns = 1, (function() {
13467
+ Au().config(
13468
13468
  Object.assign(
13469
13469
  {},
13470
13470
  Rw(),
13471
13471
  xw()(process.argv)
13472
13472
  )
13473
13473
  );
13474
- })()), bs;
13474
+ })()), Is;
13475
13475
  }
13476
13476
  kw();
13477
- const Ns = "anthropic/claude-haiku-4.5";
13477
+ const Os = "anthropic/claude-haiku-4.5";
13478
13478
  class Pw extends G {
13479
13479
  /**
13480
13480
  * Define the validation schema for generate HTML action
@@ -13546,7 +13546,7 @@ The final output should be clean, semantic HTML that works across all devices an
13546
13546
 
13547
13547
  ${t.context ? `Additional Context: ${t.context}` : ""}`;
13548
13548
  let a = (t.image ? await ia({
13549
- model: Ns,
13549
+ model: Os,
13550
13550
  system: r,
13551
13551
  messages: [
13552
13552
  {
@@ -13565,7 +13565,7 @@ ${t.context ? `Additional Context: ${t.context}` : ""}`;
13565
13565
  ],
13566
13566
  temperature: 0.7
13567
13567
  }) : await ia({
13568
- model: Ns,
13568
+ model: Os,
13569
13569
  system: r,
13570
13570
  prompt: t.prompt,
13571
13571
  temperature: 0.7
@@ -13576,7 +13576,7 @@ ${t.context ? `Additional Context: ${t.context}` : ""}`;
13576
13576
  }
13577
13577
  }
13578
13578
  }
13579
- const Cw = "anthropic/claude-haiku-4.5", Os = {
13579
+ const Cw = "anthropic/claude-haiku-4.5", Rs = {
13580
13580
  title: "Generate title for the following page. Max length: 60 characters",
13581
13581
  description: "Generate description for the following page. Max length: 160 characters",
13582
13582
  ogTitle: "Generate og title for the following page. Max length: 60 characters",
@@ -13609,13 +13609,13 @@ class Dw extends G {
13609
13609
  model: Cw,
13610
13610
  system: `You are a SEO expert. Follow the instructions carefully.
13611
13611
  Return plain string values except for json ld. For JSONLD, remove \`\`\`json\`\`\` and \`\`\`\`\` and return only valid JSON.
13612
- Instructions: ${Os[t.field]}
13612
+ Instructions: ${Rs[t.field]}
13613
13613
  ${t.keyword ? `Optimize the generated content for "${t.keyword}" keyword(s)` : ""}
13614
13614
  Page Context: ${t.pageContext}
13615
13615
  Page Content: ${t.pageContent}
13616
13616
  Dynamic: ${t.dynamic}
13617
13617
  Language: ${t.lang}`,
13618
- prompt: `${Os[t.field]}
13618
+ prompt: `${Rs[t.field]}
13619
13619
  Page Context: ${t.pageContext}
13620
13620
  Page Content: ${t.pageContent}
13621
13621
  Dynamic: ${t.dynamic}
@@ -13636,7 +13636,7 @@ class $w extends G {
13636
13636
  try {
13637
13637
  const { block: n, pageProps: a, lang: o } = t, s = n._type;
13638
13638
  if (s === "Repeater" && ((r = n == null ? void 0 : n.repeaterItems) != null && r.includes("{{#"))) {
13639
- const u = n.repeaterItems.replace("{{#", "").replace("}}", ""), c = Fu(u);
13639
+ const u = n.repeaterItems.replace("{{#", "").replace("}}", ""), c = zu(u);
13640
13640
  return c ? await (c == null ? void 0 : c.fetch({
13641
13641
  block: n,
13642
13642
  pageProps: a,
@@ -13646,7 +13646,7 @@ class $w extends G {
13646
13646
  })) ?? [] : [];
13647
13647
  }
13648
13648
  const i = ic(s);
13649
- return !i || !Hn(i.dataProvider) ? {} : await i.dataProvider({
13649
+ return !i || !Jn(i.dataProvider) ? {} : await i.dataProvider({
13650
13650
  block: n,
13651
13651
  pageProps: a,
13652
13652
  lang: o,
@@ -13658,7 +13658,7 @@ class $w extends G {
13658
13658
  }
13659
13659
  }
13660
13660
  }
13661
- class Au extends G {
13661
+ class Nu extends G {
13662
13662
  getValidationSchema() {
13663
13663
  return m.object({
13664
13664
  lang: m.string(),
@@ -13668,7 +13668,7 @@ class Au extends G {
13668
13668
  }
13669
13669
  async execute(t) {
13670
13670
  try {
13671
- const { lang: r, pageType: n, pageProps: a = {} } = t, o = await zu({
13671
+ const { lang: r, pageType: n, pageProps: a = {} } = t, o = await Lu({
13672
13672
  lang: r,
13673
13673
  draft: !0,
13674
13674
  inBuilder: !0
@@ -13732,7 +13732,7 @@ class Mw extends G {
13732
13732
  primaryPage: f.primaryPage,
13733
13733
  online: f.online,
13734
13734
  currentEditor: f.currentEditor
13735
- }).from(f).where(j(T(f.app, this.appId), ja(f.changes)))
13735
+ }).from(f).where(j(T(f.app, this.appId), Ga(f.changes)))
13736
13736
  );
13737
13737
  if (n)
13738
13738
  throw new _("Error getting changed pages", "ERROR_GETTING_CHANGES");
@@ -13768,7 +13768,7 @@ class Mw extends G {
13768
13768
  ], { data: u, error: c } = await S(
13769
13769
  () => I.select({
13770
13770
  changes: me.changes
13771
- }).from(me).where(j(T(me.id, this.appId), ja(me.changes)))
13771
+ }).from(me).where(j(T(me.id, this.appId), Ga(me.changes)))
13772
13772
  );
13773
13773
  if (!c && u && u.length > 0) {
13774
13774
  const d = u[0].changes ?? [];
@@ -13795,13 +13795,13 @@ class Mw extends G {
13795
13795
  return l;
13796
13796
  }
13797
13797
  }
13798
- class Nu extends G {
13798
+ class Ou extends G {
13799
13799
  getValidationSchema() {
13800
13800
  return m.object({});
13801
13801
  }
13802
13802
  async execute() {
13803
13803
  try {
13804
- return Lu().map((r) => ca(r, "fetch"));
13804
+ return Uu().map((r) => ca(r, "fetch"));
13805
13805
  } catch (t) {
13806
13806
  return this.handleError(t);
13807
13807
  }
@@ -13901,7 +13901,7 @@ class Fw extends G {
13901
13901
  throw new _("Context not set", "CONTEXT_NOT_SET");
13902
13902
  }
13903
13903
  }
13904
- class Ou extends G {
13904
+ class Ru extends G {
13905
13905
  getValidationSchema() {
13906
13906
  return m.object({
13907
13907
  id: m.string()
@@ -13966,7 +13966,7 @@ class zw extends G {
13966
13966
  }
13967
13967
  }
13968
13968
  }
13969
- class Ru extends G {
13969
+ class xu extends G {
13970
13970
  getValidationSchema() {
13971
13971
  return m.object({
13972
13972
  id: m.string()
@@ -13992,7 +13992,7 @@ class Ru extends G {
13992
13992
  dynamicSlugCustom: f.dynamicSlugCustom,
13993
13993
  changes: f.changes
13994
13994
  }).from(f).where(
13995
- j(T(f.app, r), xs(T(f.primaryPage, n), T(f.id, n)))
13995
+ j(T(f.app, r), ks(T(f.primaryPage, n), T(f.id, n)))
13996
13996
  )
13997
13997
  );
13998
13998
  if (o)
@@ -14000,7 +14000,7 @@ class Ru extends G {
14000
14000
  return a.map((s) => ca(s, ["app"]));
14001
14001
  }
14002
14002
  }
14003
- class xu extends G {
14003
+ class ku extends G {
14004
14004
  getValidationSchema() {
14005
14005
  return m.object({}).optional().default({});
14006
14006
  }
@@ -14079,7 +14079,7 @@ class Lw extends G {
14079
14079
  if (o)
14080
14080
  throw new _("Failed to fetch library groups", "GET_LIBRARY_GROUPS_FAILED", 500, o);
14081
14081
  const s = za(a, "group").filter((i) => i != null);
14082
- return za(Jn(s), (i) => ({
14082
+ return za(Xr(s), (i) => ({
14083
14083
  id: i,
14084
14084
  name: i
14085
14085
  }));
@@ -14220,17 +14220,17 @@ class jw extends G {
14220
14220
  uid: "current"
14221
14221
  }
14222
14222
  ] : [], ...a ?? []];
14223
- return Gu(l, ["createdAt"], ["desc"]);
14223
+ return Bu(l, ["createdAt"], ["desc"]);
14224
14224
  }
14225
14225
  }
14226
- class ku extends G {
14226
+ class Pu extends G {
14227
14227
  getValidationSchema() {
14228
14228
  return m.object({});
14229
14229
  }
14230
14230
  async execute() {
14231
14231
  try {
14232
14232
  return await Promise.all(
14233
- Uu().map(async (r) => ({
14233
+ Zu().map(async (r) => ({
14234
14234
  key: r.key,
14235
14235
  helpText: r.helpText ?? "",
14236
14236
  icon: r.icon ?? "",
@@ -14238,8 +14238,8 @@ class ku extends G {
14238
14238
  dynamicSlug: r.dynamicSlug ?? "",
14239
14239
  hasSlug: r.hasSlug ?? !0,
14240
14240
  name: typeof r.name == "function" ? await r.name() : r.name,
14241
- ...Hn(r.defaultSeo) ? { defaultSeo: r.defaultSeo() } : {},
14242
- ...Hn(r.defaultJSONLD) ? { defaultJSONLD: r.defaultJSONLD() } : {}
14241
+ ...Jn(r.defaultSeo) ? { defaultSeo: r.defaultSeo() } : {},
14242
+ ...Jn(r.defaultJSONLD) ? { defaultJSONLD: r.defaultJSONLD() } : {}
14243
14243
  }))
14244
14244
  );
14245
14245
  } catch (t) {
@@ -14324,7 +14324,7 @@ class Gw extends G {
14324
14324
  const p = Dt(d, "partialBlockId", Dt(d, "globalBlock", ""));
14325
14325
  if (p === "") continue;
14326
14326
  let y = u.get(p) ?? [];
14327
- y.length > 0 && (y = y.map((v) => (Mt(v._parent) && (v._parent = d._parent), Bu(d, "_show") && (v._show = d._show), v)));
14327
+ y.length > 0 && (y = y.map((v) => (Mt(v._parent) && (v._parent = d._parent), Vu(d, "_show") && (v._show = d._show), v)));
14328
14328
  const E = t.indexOf(d);
14329
14329
  E !== -1 && t.splice(E, 1, ...y);
14330
14330
  }
@@ -14357,7 +14357,7 @@ class Bw extends G {
14357
14357
  if (n)
14358
14358
  throw ue("FETCH_SITE_DATA_FAILED", n);
14359
14359
  const a = {};
14360
- return Vu(r, (o) => {
14360
+ return qu(r, (o) => {
14361
14361
  var s;
14362
14362
  a[o.id] = {
14363
14363
  name: o.name,
@@ -14424,7 +14424,7 @@ class Vw extends G {
14424
14424
  return u || [];
14425
14425
  }
14426
14426
  }
14427
- class Pu extends G {
14427
+ class Cu extends G {
14428
14428
  getValidationSchema() {
14429
14429
  return m.object({
14430
14430
  lang: m.string().optional()
@@ -14478,7 +14478,7 @@ class Pu extends G {
14478
14478
  }));
14479
14479
  }
14480
14480
  }
14481
- class Cu extends G {
14481
+ class Du extends G {
14482
14482
  getValidationSchema() {
14483
14483
  return m.object({
14484
14484
  draft: m.boolean()
@@ -14501,7 +14501,7 @@ class Cu extends G {
14501
14501
  throw ue("ERROR_PROJECT_CONFIG", s);
14502
14502
  if (!o || o.length === 0)
14503
14503
  throw ue("PROJECT_NOT_FOUND", new Error("Project not found"));
14504
- const i = qu(o), l = (i == null ? void 0 : i.changes) ?? [];
14504
+ const i = Hu(o), l = (i == null ? void 0 : i.changes) ?? [];
14505
14505
  return {
14506
14506
  ...this.getDefaultSettings(),
14507
14507
  ...i,
@@ -14595,7 +14595,7 @@ class qw extends G {
14595
14595
  throw new _("Library not found for this app", "GET_SITE_LIBRARY_FAILED");
14596
14596
  let p = u;
14597
14597
  if (l) {
14598
- const b = Du("UPLOAD_TO_STORAGE");
14598
+ const b = $u("UPLOAD_TO_STORAGE");
14599
14599
  b == null || b.setContext(this.context);
14600
14600
  const P = `template-${Date.now()}.webp`, C = `${r}/templates`, g = await (b == null ? void 0 : b.execute({
14601
14601
  file: l,
@@ -14655,9 +14655,11 @@ class Hw extends G {
14655
14655
  if (n.length === 0)
14656
14656
  throw new _("IDS_REQUIRED", "At least one page ID or THEME must be provided");
14657
14657
  const a = await Promise.all(
14658
- n.map((o) => o === "THEME" ? this.publishTheme() : o === "DESIGN_TOKENS" ? this.publishDesignToken() : this.publishPage(o))
14658
+ n.map((i) => i === "THEME" ? this.publishTheme() : i === "DESIGN_TOKENS" ? this.publishDesignToken() : this.publishPage(i))
14659
14659
  );
14660
- return await this.clearChanges(n), { tags: Jn(Hu(a)) };
14660
+ await this.clearChanges(n);
14661
+ const o = Xr(La(a.map((i) => i.tags))), s = Xr(La(a.map((i) => i.paths)));
14662
+ return { tags: o, paths: s };
14661
14663
  } catch (n) {
14662
14664
  return this.handleExecutionError(n);
14663
14665
  }
@@ -14683,7 +14685,7 @@ class Hw extends G {
14683
14685
  );
14684
14686
  if (a)
14685
14687
  throw new _("Error inserting online theme", "ERROR_PUBLISHING_THEME", 500, a);
14686
- return await this.removeFromChangesArray("THEME", "ERROR_PUBLISHING_THEME"), [`website-settings-${this.appId}`];
14688
+ return await this.removeFromChangesArray("THEME", "ERROR_PUBLISHING_THEME"), { tags: [`website-settings-${this.appId}`], paths: [] };
14687
14689
  }
14688
14690
  /**
14689
14691
  * Publish design token changes
@@ -14699,7 +14701,7 @@ class Hw extends G {
14699
14701
  );
14700
14702
  if (a)
14701
14703
  throw new _("Error inserting online app", "ERROR_PUBLISHING_DESIGN_TOKEN", 500, a);
14702
- return await this.removeFromChangesArray("DESIGN_TOKENS", "ERROR_PUBLISHING_DESIGN_TOKEN"), [`website-settings-${this.appId}`];
14704
+ return await this.removeFromChangesArray("DESIGN_TOKENS", "ERROR_PUBLISHING_DESIGN_TOKEN"), { tags: [`website-settings-${this.appId}`], paths: [] };
14703
14705
  }
14704
14706
  /**
14705
14707
  * Remove a specific key from the app's changes array.
@@ -14756,7 +14758,7 @@ class Hw extends G {
14756
14758
  }
14757
14759
  })
14758
14760
  );
14759
- return Jn(n ?? []).map((a) => a.id).map((a) => `page-${a}`);
14761
+ return Xr(n ?? []).map((a) => a.id).map((a) => `page-${a}`);
14760
14762
  }
14761
14763
  /**
14762
14764
  * Publish a single page
@@ -14764,8 +14766,8 @@ class Hw extends G {
14764
14766
  async publishPage(r) {
14765
14767
  const n = await this.clonePage(r);
14766
14768
  await this.addOnlinePage(n);
14767
- const a = [`page-${n.primaryPage ?? n.id}`];
14768
- return Mt(n.slug) && a.push(...await this.getPartialBlockUsage(n.primaryPage ?? n.id)), a;
14769
+ const a = [`page-${n.primaryPage ?? n.id}`], o = [];
14770
+ return Mt(n.slug) ? a.push(...await this.getPartialBlockUsage(n.primaryPage ?? n.id)) : o.push(`${n.slug}`), { tags: a, paths: o };
14769
14771
  }
14770
14772
  /**
14771
14773
  * Create a revision before publishing
@@ -14914,7 +14916,7 @@ class Jw extends G {
14914
14916
  blocks: i,
14915
14917
  type: "draft",
14916
14918
  createdAt: "now()",
14917
- ...vn(o, ["name", "slug", "pageType", "lang", "app", "currentEditor"])
14919
+ ...wn(o, ["name", "slug", "pageType", "lang", "app", "currentEditor"])
14918
14920
  };
14919
14921
  await I.insert(Ne).values(l);
14920
14922
  }
@@ -14963,7 +14965,7 @@ class Ww extends G {
14963
14965
  let i;
14964
14966
  a ? o ? i = j(...s, T(f.id, a)) : i = j(
14965
14967
  ...s,
14966
- xs(Ga(f.slug, `%${a}%`), Ga(f.name, `%${a}%`))
14968
+ ks(Ba(f.slug, `%${a}%`), Ba(f.name, `%${a}%`))
14967
14969
  ) : i = j(...s);
14968
14970
  const { data: l, error: u } = await S(
14969
14971
  () => I.select({
@@ -15266,7 +15268,7 @@ class Qw {
15266
15268
  lastSaved: da`now()`
15267
15269
  };
15268
15270
  if (i.id === n) {
15269
- const c = vn(r, [
15271
+ const c = wn(r, [
15270
15272
  "name",
15271
15273
  "seo",
15272
15274
  "blocks",
@@ -15356,7 +15358,7 @@ class e_ extends G {
15356
15358
  await this.updatePageInDatabase(r, { blocks: n, links: a, partialBlocks: o, designTokens: s });
15357
15359
  }
15358
15360
  getPartialBlocks(r) {
15359
- return La(
15361
+ return Ua(
15360
15362
  r.filter((n) => n._type === "GlobalBlock" || n._type === "PartialBlock").map((n) => Dt(n, "partialBlockId", Dt(n, "globalBlock", !1)))
15361
15363
  ).join("|");
15362
15364
  }
@@ -15365,7 +15367,7 @@ class e_ extends G {
15365
15367
  let s;
15366
15368
  for (; (s = a.exec(n)) !== null; )
15367
15369
  s[1] && o.push(s[1]);
15368
- return La(o).join("|");
15370
+ return Ua(o).join("|");
15369
15371
  }
15370
15372
  getDesignTokens(r) {
15371
15373
  const n = /dt#[^ "]+/g, a = {};
@@ -15391,7 +15393,7 @@ class e_ extends G {
15391
15393
  * Extract only the allowed fields for page updates
15392
15394
  */
15393
15395
  extractAllowedPageFields(r) {
15394
- return vn(r, [
15396
+ return wn(r, [
15395
15397
  "slug",
15396
15398
  "name",
15397
15399
  "seo",
@@ -15422,7 +15424,7 @@ class e_ extends G {
15422
15424
  * Determine what type of changes are being made
15423
15425
  */
15424
15426
  determineChangeTypes(r) {
15425
- const n = [], a = Ua(r);
15427
+ const n = [], a = Za(r);
15426
15428
  return a.includes("blocks") && n.push("Page"), a.includes("seo") && n.push("SEO"), n.length > 0 ? n : ["Updated"];
15427
15429
  }
15428
15430
  /**
@@ -15450,7 +15452,7 @@ class e_ extends G {
15450
15452
  * Check if only blocks are being updated
15451
15453
  */
15452
15454
  isOnlyBlocksUpdate(r) {
15453
- return Ua(r).includes("blocks");
15455
+ return Za(r).includes("blocks");
15454
15456
  }
15455
15457
  /**
15456
15458
  * Fetch the updated page data from database
@@ -15533,7 +15535,7 @@ class r_ extends G {
15533
15535
  async execute(t) {
15534
15536
  if (await this.verifyAccess(), !this.context)
15535
15537
  throw ue("CONTEXT_NOT_SET", new Error("CONTEXT_NOT_SET"));
15536
- const { appId: r } = this.context, n = vn(t.settings, ["theme", "designTokens"]), { data: a, error: o } = await S(
15538
+ const { appId: r } = this.context, n = wn(t.settings, ["theme", "designTokens"]), { data: a, error: o } = await S(
15537
15539
  () => I.select({ changes: me.changes }).from(me).where(T(me.id, r))
15538
15540
  );
15539
15541
  if (o)
@@ -15583,7 +15585,7 @@ class n_ extends G {
15583
15585
  throw new _("Library not found for this app", "GET_SITE_LIBRARY_FAILED");
15584
15586
  let y = u;
15585
15587
  if (l) {
15586
- const v = Du("UPLOAD_TO_STORAGE");
15588
+ const v = $u("UPLOAD_TO_STORAGE");
15587
15589
  v == null || v.setContext(this.context);
15588
15590
  const b = `library-item-${Date.now()}.webp`, P = `${r}/library-items`, C = await (v == null ? void 0 : v.execute({
15589
15591
  file: l,
@@ -15637,7 +15639,7 @@ class a_ extends G {
15637
15639
  return m.object({}).optional().default({});
15638
15640
  }
15639
15641
  async execute() {
15640
- const t = new Cu(), r = new Pu(), n = new ku(), a = new xu(), o = new Nu();
15642
+ const t = new Du(), r = new Cu(), n = new Pu(), a = new ku(), o = new Ou();
15641
15643
  this.context && (t.setContext(this.context), r.setContext(this.context), n.setContext(this.context), a.setContext(this.context), o.setContext(this.context));
15642
15644
  const [s, i, l, u, c] = await Promise.all([
15643
15645
  t.execute({ draft: !0 }),
@@ -15665,7 +15667,7 @@ class o_ extends G {
15665
15667
  });
15666
15668
  }
15667
15669
  async execute(t) {
15668
- const { id: r, lang: n, pageType: a, pageProps: o = {} } = t, s = new Ou(), i = new Au(), l = new Ru();
15670
+ const { id: r, lang: n, pageType: a, pageProps: o = {} } = t, s = new Ru(), i = new Nu(), l = new xu();
15669
15671
  this.context && (s.setContext(this.context), i.setContext(this.context), l.setContext(this.context));
15670
15672
  try {
15671
15673
  const [u, c, d] = await Promise.all([
@@ -15687,14 +15689,14 @@ class o_ extends G {
15687
15689
  const Ct = class Ct {
15688
15690
  constructor() {
15689
15691
  Ae(this, "actions", {});
15690
- Zu("page", {
15692
+ ju("page", {
15691
15693
  name: "Static Page",
15692
15694
  icon: '<svg stroke="currentColor" fill="currentColor" strokeWidth="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path d="M5 8V20H19V8H5ZM5 6H19V4H5V6ZM20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM7 10H11V14H7V10ZM7 16H17V18H7V16ZM13 11H17V13H13V11Z"></path></svg>'
15693
- }), ju("global", {
15695
+ }), Gu("global", {
15694
15696
  name: "Global Block",
15695
15697
  helpText: "A global block can be reused in multiple pages.",
15696
15698
  icon: '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-hash-icon lucide-hash"><line x1="4" x2="20" y1="9" y2="9"/><line x1="4" x2="20" y1="15" y2="15"/><line x1="10" x2="8" y1="3" y2="21"/><line x1="16" x2="14" y1="3" y2="21"/></svg>'
15697
- }), this.register("ASK_AI", new Ew()), this.register("CHECK_USER_ACCESS", new bw()), this.register("CREATE_PAGE", new Iw()), this.register("DELETE_PAGE", new Aw()), this.register("DUPLICATE_PAGE", new Ow()), this.register("RESTORE_PAGE_REVISION", new Jw()), this.register("UPDATE_PAGE_METADATA", new t_()), this.register("GENERATE_SEO_FIELD", new Dw()), this.register("GENERATE_HTML_FROM_PROMPT", new Pw()), this.register("GET_REVISION_PAGE", new Gw()), this.register("UPDATE_PAGE", new e_()), this.register("GET_COMPARE_DATA", new Fw()), this.register("GET_SITE_WIDE_USAGE", new Bw()), this.register("GET_WEBSITE_DRAFT_SETTINGS", new Cu()), this.register("GET_WEBSITE_PAGES", new Pu()), this.register("GET_LIBRARIES", new xu()), this.register("GET_DRAFT_PAGE", new Ou()), this.register("GET_LANGUAGE_PAGES", new Ru()), this.register("UPSERT_LIBRARY_ITEM", new n_()), this.register("MARK_AS_TEMPLATE", new qw()), this.register("GET_LIBRARY_ITEM", new Uw()), this.register("GET_LIBRARY_ITEMS", new Zw()), this.register("DELETE_LIBRARY_ITEM", new Sw()), this.register("UNMARK_AS_TEMPLATE", new Xw()), this.register("GET_TEMPLATES_BY_TYPE", new Vw()), this.register("SEARCH_PAGES", new Ww()), this.register("GET_PAGE_REVISIONS", new jw()), this.register("PUBLISH_CHANGES", new Hw()), this.register("UPDATE_WEBSITE_FIELDS", new r_()), this.register("TAKE_OFFLINE", new Kw()), this.register("GET_CHANGES", new Mw()), this.register("GET_LIBRARY_GROUPS", new Lw()), this.register("DELETE_PAGE_REVISION", new Nw()), this.register("GET_COLLECTIONS", new Nu()), this.register("GET_BLOCK_ASYNC_PROPS", new $w()), this.register("GET_BUILDER_PAGE_DATA", new Au()), this.register("GET_PAGE_TYPES", new ku()), this.register("SEARCH_PAGE_TYPE_ITEMS", new Yw()), this.register("GET_DYNAMIC_PAGES", new zw()), this.register("GET_WEBSITE_DATA", new a_()), this.register("GET_PAGE_ALL_DATA", new o_());
15699
+ }), this.register("ASK_AI", new Ew()), this.register("CHECK_USER_ACCESS", new bw()), this.register("CREATE_PAGE", new Iw()), this.register("DELETE_PAGE", new Aw()), this.register("DUPLICATE_PAGE", new Ow()), this.register("RESTORE_PAGE_REVISION", new Jw()), this.register("UPDATE_PAGE_METADATA", new t_()), this.register("GENERATE_SEO_FIELD", new Dw()), this.register("GENERATE_HTML_FROM_PROMPT", new Pw()), this.register("GET_REVISION_PAGE", new Gw()), this.register("UPDATE_PAGE", new e_()), this.register("GET_COMPARE_DATA", new Fw()), this.register("GET_SITE_WIDE_USAGE", new Bw()), this.register("GET_WEBSITE_DRAFT_SETTINGS", new Du()), this.register("GET_WEBSITE_PAGES", new Cu()), this.register("GET_LIBRARIES", new ku()), this.register("GET_DRAFT_PAGE", new Ru()), this.register("GET_LANGUAGE_PAGES", new xu()), this.register("UPSERT_LIBRARY_ITEM", new n_()), this.register("MARK_AS_TEMPLATE", new qw()), this.register("GET_LIBRARY_ITEM", new Uw()), this.register("GET_LIBRARY_ITEMS", new Zw()), this.register("DELETE_LIBRARY_ITEM", new Sw()), this.register("UNMARK_AS_TEMPLATE", new Xw()), this.register("GET_TEMPLATES_BY_TYPE", new Vw()), this.register("SEARCH_PAGES", new Ww()), this.register("GET_PAGE_REVISIONS", new jw()), this.register("PUBLISH_CHANGES", new Hw()), this.register("UPDATE_WEBSITE_FIELDS", new r_()), this.register("TAKE_OFFLINE", new Kw()), this.register("GET_CHANGES", new Mw()), this.register("GET_LIBRARY_GROUPS", new Lw()), this.register("DELETE_PAGE_REVISION", new Nw()), this.register("GET_COLLECTIONS", new Ou()), this.register("GET_BLOCK_ASYNC_PROPS", new $w()), this.register("GET_BUILDER_PAGE_DATA", new Nu()), this.register("GET_PAGE_TYPES", new Pu()), this.register("SEARCH_PAGE_TYPE_ITEMS", new Yw()), this.register("GET_DYNAMIC_PAGES", new zw()), this.register("GET_WEBSITE_DATA", new a_()), this.register("GET_PAGE_ALL_DATA", new o_());
15698
15700
  }
15699
15701
  /**
15700
15702
  * Get the singleton instance of the registry
@@ -15726,15 +15728,16 @@ const Ct = class Ct {
15726
15728
  }
15727
15729
  };
15728
15730
  Ae(Ct, "instance");
15729
- let yn = Ct;
15730
- const Du = (e) => yn.getInstance().getAction(e), b_ = yn.getInstance();
15731
+ let vn = Ct;
15732
+ const $u = (e) => vn.getInstance().getAction(e), b_ = vn.getInstance();
15731
15733
  export {
15732
15734
  _ as A,
15733
15735
  G as C,
15736
+ Hw as P,
15734
15737
  b_ as a,
15735
15738
  aw as b,
15736
15739
  hw as c,
15737
15740
  I as d,
15738
- Du as g,
15741
+ $u as g,
15739
15742
  S as s
15740
15743
  };