@gram-ai/elements 1.18.4 → 1.18.6

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 (87) hide show
  1. package/dist/components/Chat/stories/Sidecar.stories.d.ts +6 -0
  2. package/dist/elements.cjs +23 -22
  3. package/dist/elements.cjs.map +1 -0
  4. package/dist/elements.js +609 -599
  5. package/dist/elements.js.map +1 -0
  6. package/dist/index-Bj7jPiuy.cjs +1 -0
  7. package/dist/index-Bj7jPiuy.cjs.map +1 -0
  8. package/dist/index-CJRypLIa.js +1 -0
  9. package/dist/index-CJRypLIa.js.map +1 -0
  10. package/dist/lib/api.d.ts +2 -0
  11. package/dist/lib/api.test.d.ts +1 -0
  12. package/dist/plugins.cjs +1 -0
  13. package/dist/plugins.cjs.map +1 -0
  14. package/dist/plugins.js +1 -0
  15. package/dist/plugins.js.map +1 -0
  16. package/dist/server.cjs +1 -0
  17. package/dist/server.cjs.map +1 -0
  18. package/dist/server.js +1 -0
  19. package/dist/server.js.map +1 -0
  20. package/package.json +6 -2
  21. package/src/components/Chat/index.tsx +21 -0
  22. package/src/components/Chat/stories/ColorScheme.stories.tsx +52 -0
  23. package/src/components/Chat/stories/Composer.stories.tsx +42 -0
  24. package/src/components/Chat/stories/Customization.stories.tsx +88 -0
  25. package/src/components/Chat/stories/Density.stories.tsx +52 -0
  26. package/src/components/Chat/stories/FrontendTools.stories.tsx +145 -0
  27. package/src/components/Chat/stories/Modal.stories.tsx +84 -0
  28. package/src/components/Chat/stories/Model.stories.tsx +32 -0
  29. package/src/components/Chat/stories/Plugins.stories.tsx +50 -0
  30. package/src/components/Chat/stories/Radius.stories.tsx +52 -0
  31. package/src/components/Chat/stories/Sidecar.stories.tsx +27 -0
  32. package/src/components/Chat/stories/ToolApproval.stories.tsx +110 -0
  33. package/src/components/Chat/stories/Tools.stories.tsx +175 -0
  34. package/src/components/Chat/stories/Variants.stories.tsx +46 -0
  35. package/src/components/Chat/stories/Welcome.stories.tsx +42 -0
  36. package/src/components/FrontendTools/index.tsx +9 -0
  37. package/src/components/assistant-ui/assistant-modal.tsx +255 -0
  38. package/src/components/assistant-ui/assistant-sidecar.tsx +88 -0
  39. package/src/components/assistant-ui/attachment.tsx +233 -0
  40. package/src/components/assistant-ui/markdown-text.tsx +240 -0
  41. package/src/components/assistant-ui/reasoning.tsx +261 -0
  42. package/src/components/assistant-ui/thread-list.tsx +97 -0
  43. package/src/components/assistant-ui/thread.tsx +632 -0
  44. package/src/components/assistant-ui/tool-fallback.tsx +111 -0
  45. package/src/components/assistant-ui/tool-group.tsx +59 -0
  46. package/src/components/assistant-ui/tooltip-icon-button.tsx +57 -0
  47. package/src/components/ui/avatar.tsx +51 -0
  48. package/src/components/ui/button.tsx +27 -0
  49. package/src/components/ui/buttonVariants.ts +33 -0
  50. package/src/components/ui/collapsible.tsx +31 -0
  51. package/src/components/ui/dialog.tsx +141 -0
  52. package/src/components/ui/popover.tsx +46 -0
  53. package/src/components/ui/skeleton.tsx +13 -0
  54. package/src/components/ui/tool-ui.stories.tsx +146 -0
  55. package/src/components/ui/tool-ui.tsx +676 -0
  56. package/src/components/ui/tooltip.tsx +61 -0
  57. package/src/contexts/ElementsProvider.tsx +256 -0
  58. package/src/contexts/ToolApprovalContext.tsx +120 -0
  59. package/src/contexts/contexts.ts +10 -0
  60. package/src/global.css +136 -0
  61. package/src/hooks/useAuth.ts +71 -0
  62. package/src/hooks/useDensity.ts +110 -0
  63. package/src/hooks/useElements.ts +14 -0
  64. package/src/hooks/useExpanded.ts +20 -0
  65. package/src/hooks/useMCPTools.ts +73 -0
  66. package/src/hooks/usePluginComponents.ts +34 -0
  67. package/src/hooks/useRadius.ts +42 -0
  68. package/src/hooks/useSession.ts +38 -0
  69. package/src/hooks/useThemeProps.ts +24 -0
  70. package/src/hooks/useToolApproval.ts +16 -0
  71. package/src/index.ts +45 -0
  72. package/src/lib/api.test.ts +90 -0
  73. package/src/lib/api.ts +8 -0
  74. package/src/lib/auth.ts +10 -0
  75. package/src/lib/easing.ts +1 -0
  76. package/src/lib/humanize.ts +14 -0
  77. package/src/lib/models.ts +22 -0
  78. package/src/lib/tools.ts +210 -0
  79. package/src/lib/utils.ts +16 -0
  80. package/src/plugins/README.md +49 -0
  81. package/src/plugins/chart/component.tsx +102 -0
  82. package/src/plugins/chart/index.ts +27 -0
  83. package/src/plugins/index.ts +7 -0
  84. package/src/server.ts +89 -0
  85. package/src/types/index.ts +726 -0
  86. package/src/types/plugins.ts +65 -0
  87. package/src/vite-env.d.ts +12 -0
package/dist/elements.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { jsx as g, Fragment as Fn, jsxs as U } from "react/jsx-runtime";
2
2
  import { a as Yd, T as Im, c as Ee, r as q0, E as V0, b as R, d as B0, u as Ke, e as po, f as fo, g as J0 } from "./index-CJRypLIa.js";
3
3
  import * as _ from "react";
4
- import km, { useContext as W0, useRef as Lt, useCallback as $t, useState as Ie, useEffect as kt, useMemo as pr, useSyncExternalStore as Os, useLayoutEffect as H0, forwardRef as G0, memo as Xl } from "react";
5
- import { makeAssistantTool as K0, getExternalStoreMessages as ul, unstable_createMessageConverter as Y0, useAssistantApi as Em, INTERNAL as Tm, useRuntimeAdapters as Q0, useExternalStoreRuntime as X0, unstable_useCloudThreadListAdapter as eI, unstable_useRemoteThreadListRuntime as tI, useAssistantState as Tt, AssistantRuntimeProvider as rI, MessagePrimitive as fr, ComposerPrimitive as Mt, AttachmentPrimitive as cl, useScrollLock as nI, ThreadPrimitive as Wt, ErrorPrimitive as Qd, BranchPickerPrimitive as Tn, ActionBarPrimitive as Un } from "@assistant-ui/react";
4
+ import km, { useContext as W0, useRef as Lt, useCallback as $t, useState as Ie, useEffect as kt, useMemo as pr, useSyncExternalStore as Ns, useLayoutEffect as H0, forwardRef as G0, memo as Xl } from "react";
5
+ import { makeAssistantTool as K0, getExternalStoreMessages as cl, unstable_createMessageConverter as Y0, useAssistantApi as Em, INTERNAL as Tm, useRuntimeAdapters as Q0, useExternalStoreRuntime as X0, unstable_useCloudThreadListAdapter as eI, unstable_useRemoteThreadListRuntime as tI, useAssistantState as Tt, AssistantRuntimeProvider as rI, MessagePrimitive as fr, ComposerPrimitive as Mt, AttachmentPrimitive as dl, useScrollLock as nI, ThreadPrimitive as Wt, ErrorPrimitive as Qd, BranchPickerPrimitive as Tn, ActionBarPrimitive as Un } from "@assistant-ui/react";
6
6
  import { LazyMotion as eu, domAnimation as oI, MotionConfig as Om, domMax as Nm, AnimatePresence as iI } from "motion/react";
7
7
  import * as Ht from "motion/react-m";
8
8
  import { useShallow as aI } from "zustand/shallow";
@@ -82,7 +82,7 @@ Lm = vI;
82
82
  function gn(e) {
83
83
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
84
84
  }
85
- var Zm = "AI_InvalidArgumentError", Fm = `vercel.ai.error.${Zm}`, bI = Symbol.for(Fm), qm, oa = class extends K {
85
+ var Zm = "AI_InvalidArgumentError", Fm = `vercel.ai.error.${Zm}`, bI = Symbol.for(Fm), qm, ia = class extends K {
86
86
  constructor({
87
87
  message: t,
88
88
  cause: n,
@@ -136,7 +136,7 @@ var Km = "AI_NoSuchModelError", Ym = `vercel.ai.error.${Km}`, $I = Symbol.for(Ym
136
136
  }
137
137
  };
138
138
  Qm = $I;
139
- var Xm = "AI_TypeValidationError", eh = `vercel.ai.error.${Xm}`, xI = Symbol.for(eh), th, II = class dl extends K {
139
+ var Xm = "AI_TypeValidationError", eh = `vercel.ai.error.${Xm}`, xI = Symbol.for(eh), th, II = class pl extends K {
140
140
  constructor({ value: t, cause: n }) {
141
141
  super({
142
142
  name: Xm,
@@ -162,7 +162,7 @@ Error message: ${gn(n)}`,
162
162
  value: t,
163
163
  cause: n
164
164
  }) {
165
- return dl.isInstance(n) && n.value === t ? n : new dl({ value: t, cause: n });
165
+ return pl.isInstance(n) && n.value === t ? n : new pl({ value: t, cause: n });
166
166
  }
167
167
  };
168
168
  th = xI;
@@ -172,14 +172,14 @@ let Xd = class extends Error {
172
172
  super(t), this.name = "ParseError", this.type = n.type, this.field = n.field, this.value = n.value, this.line = n.line;
173
173
  }
174
174
  };
175
- function Ns(e) {
175
+ function Ps(e) {
176
176
  }
177
177
  function kI(e) {
178
178
  if (typeof e == "function")
179
179
  throw new TypeError(
180
180
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
181
181
  );
182
- const { onEvent: t = Ns, onError: n = Ns, onRetry: o = Ns, onComment: r } = e;
182
+ const { onEvent: t = Ps, onError: n = Ps, onRetry: o = Ps, onComment: r } = e;
183
183
  let i = "", a = !0, s, u = "", l = "";
184
184
  function c(m) {
185
185
  const b = a ? m.replace(/^\xEF\xBB\xBF/, "") : m, [y, $] = EI(`${i}${b}`);
@@ -333,7 +333,7 @@ class kr extends Error {
333
333
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
334
334
  }
335
335
  }
336
- class ia extends Error {
336
+ class aa extends Error {
337
337
  constructor(t) {
338
338
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
339
339
  }
@@ -378,7 +378,7 @@ function mo(e) {
378
378
  function jr(e) {
379
379
  return e == null;
380
380
  }
381
- function aa(e) {
381
+ function sa(e) {
382
382
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
383
383
  return e.slice(t, n);
384
384
  }
@@ -450,7 +450,7 @@ function MI(e = 10) {
450
450
  n += t[Math.floor(Math.random() * t.length)];
451
451
  return n;
452
452
  }
453
- function pl(e) {
453
+ function fl(e) {
454
454
  return JSON.stringify(e);
455
455
  }
456
456
  function oh(e) {
@@ -480,7 +480,7 @@ function Er(e) {
480
480
  const n = t.prototype;
481
481
  return !(rn(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
482
482
  }
483
- function sa(e) {
483
+ function la(e) {
484
484
  return Er(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
485
485
  }
486
486
  function DI(e) {
@@ -721,10 +721,10 @@ function ct(e, t, n) {
721
721
  }
722
722
  return delete o.inst, delete o.continue, t?.reportInput || delete o.input, o;
723
723
  }
724
- function la(e) {
724
+ function ua(e) {
725
725
  return e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof File ? "file" : "unknown";
726
726
  }
727
- function ua(e) {
727
+ function ca(e) {
728
728
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
729
729
  }
730
730
  function nn(...e) {
@@ -792,21 +792,21 @@ const bh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
792
792
  cached: mo,
793
793
  captureStackTrace: nu,
794
794
  cleanEnum: ZI,
795
- cleanRegex: aa,
795
+ cleanRegex: sa,
796
796
  clone: ft,
797
797
  cloneDef: RI,
798
798
  createTransparentProxy: LI,
799
799
  defineLazy: re,
800
- esc: pl,
800
+ esc: fl,
801
801
  escapeRegex: Kt,
802
802
  extend: ph,
803
803
  finalizeIssue: ct,
804
804
  floatSafeRemainder: nh,
805
805
  getElementAtPath: zI,
806
806
  getEnumValues: ru,
807
- getLengthableOrigin: ua,
807
+ getLengthableOrigin: ca,
808
808
  getParsedType: UI,
809
- getSizableOrigin: la,
809
+ getSizableOrigin: ua,
810
810
  hexToUint8Array: VI,
811
811
  isObject: rn,
812
812
  isPlainObject: Er,
@@ -830,7 +830,7 @@ const bh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
830
830
  randomString: MI,
831
831
  required: gh,
832
832
  safeExtend: fh,
833
- shallowClone: sa,
833
+ shallowClone: la,
834
834
  slugify: oh,
835
835
  stringifyPrimitive: W,
836
836
  uint8ArrayToBase64: yh,
@@ -923,7 +923,7 @@ const ho = (e) => (t, n, o, r) => {
923
923
  throw nu(s, r?.callee), s;
924
924
  }
925
925
  return a.value;
926
- }, fl = /* @__PURE__ */ ho(it), go = (e) => async (t, n, o, r) => {
926
+ }, ml = /* @__PURE__ */ ho(it), go = (e) => async (t, n, o, r) => {
927
927
  const i = o ? Object.assign(o, { async: !0 }) : { async: !0 };
928
928
  let a = t._zod.run({ value: n, issues: [] }, i);
929
929
  if (a instanceof Promise && (a = await a), a.issues.length) {
@@ -931,7 +931,7 @@ const ho = (e) => (t, n, o, r) => {
931
931
  throw nu(s, r?.callee), s;
932
932
  }
933
933
  return a.value;
934
- }, ml = /* @__PURE__ */ go(it), vo = (e) => (t, n, o) => {
934
+ }, hl = /* @__PURE__ */ go(it), vo = (e) => (t, n, o) => {
935
935
  const r = o ? { ...o, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, r);
936
936
  if (i instanceof Promise)
937
937
  throw new kr();
@@ -1198,7 +1198,7 @@ const ck = /^[0-9a-fA-F]{32}$/, dk = /* @__PURE__ */ bo(22, "=="), pk = /* @__PU
1198
1198
  }), e._zod.check = (o) => {
1199
1199
  const r = o.value;
1200
1200
  r.size <= t.maximum || o.issues.push({
1201
- origin: la(r),
1201
+ origin: ua(r),
1202
1202
  code: "too_big",
1203
1203
  maximum: t.maximum,
1204
1204
  inclusive: !0,
@@ -1218,7 +1218,7 @@ const ck = /^[0-9a-fA-F]{32}$/, dk = /* @__PURE__ */ bo(22, "=="), pk = /* @__PU
1218
1218
  }), e._zod.check = (o) => {
1219
1219
  const r = o.value;
1220
1220
  r.size >= t.minimum || o.issues.push({
1221
- origin: la(r),
1221
+ origin: ua(r),
1222
1222
  code: "too_small",
1223
1223
  minimum: t.minimum,
1224
1224
  inclusive: !0,
@@ -1241,7 +1241,7 @@ const ck = /^[0-9a-fA-F]{32}$/, dk = /* @__PURE__ */ bo(22, "=="), pk = /* @__PU
1241
1241
  return;
1242
1242
  const a = i > t.size;
1243
1243
  o.issues.push({
1244
- origin: la(r),
1244
+ origin: ua(r),
1245
1245
  ...a ? { code: "too_big", maximum: t.size } : { code: "too_small", minimum: t.size },
1246
1246
  inclusive: !0,
1247
1247
  exact: !0,
@@ -1262,7 +1262,7 @@ const ck = /^[0-9a-fA-F]{32}$/, dk = /* @__PURE__ */ bo(22, "=="), pk = /* @__PU
1262
1262
  const r = o.value;
1263
1263
  if (r.length <= t.maximum)
1264
1264
  return;
1265
- const a = ua(r);
1265
+ const a = ca(r);
1266
1266
  o.issues.push({
1267
1267
  origin: a,
1268
1268
  code: "too_big",
@@ -1285,7 +1285,7 @@ const ck = /^[0-9a-fA-F]{32}$/, dk = /* @__PURE__ */ bo(22, "=="), pk = /* @__PU
1285
1285
  const r = o.value;
1286
1286
  if (r.length >= t.minimum)
1287
1287
  return;
1288
- const a = ua(r);
1288
+ const a = ca(r);
1289
1289
  o.issues.push({
1290
1290
  origin: a,
1291
1291
  code: "too_small",
@@ -1308,7 +1308,7 @@ const ck = /^[0-9a-fA-F]{32}$/, dk = /* @__PURE__ */ bo(22, "=="), pk = /* @__PU
1308
1308
  const r = o.value, i = r.length;
1309
1309
  if (i === t.length)
1310
1310
  return;
1311
- const a = ua(r), s = i > t.length;
1311
+ const a = ca(r), s = i > t.length;
1312
1312
  o.issues.push({
1313
1313
  origin: a,
1314
1314
  ...s ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -1980,7 +1980,7 @@ const mv = /* @__PURE__ */ x("$ZodObject", (e, t) => {
1980
1980
  mv.init(e, t);
1981
1981
  const n = e._zod.parse, o = mo(() => pv(t)), r = (f) => {
1982
1982
  const p = new kg(["shape", "payload", "ctx"]), h = o.value, m = (S) => {
1983
- const v = pl(S);
1983
+ const v = fl(S);
1984
1984
  return `shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`;
1985
1985
  };
1986
1986
  p.write("const input = payload.value;");
@@ -1990,7 +1990,7 @@ const mv = /* @__PURE__ */ x("$ZodObject", (e, t) => {
1990
1990
  b[S] = `key_${y++}`;
1991
1991
  p.write("const newResult = {};");
1992
1992
  for (const S of h.keys) {
1993
- const v = b[S], k = pl(S);
1993
+ const v = b[S], k = fl(S);
1994
1994
  p.write(`const ${v} = ${m(S)};`), p.write(`
1995
1995
  if (${v}.issues.length) {
1996
1996
  payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
@@ -2040,14 +2040,14 @@ function np(e, t, n, o) {
2040
2040
  errors: e.map((i) => i.issues.map((a) => ct(a, o, Ue())))
2041
2041
  }), t);
2042
2042
  }
2043
- const ca = /* @__PURE__ */ x("$ZodUnion", (e, t) => {
2043
+ const da = /* @__PURE__ */ x("$ZodUnion", (e, t) => {
2044
2044
  Q.init(e, t), re(e._zod, "optin", () => t.options.some((r) => r._zod.optin === "optional") ? "optional" : void 0), re(e._zod, "optout", () => t.options.some((r) => r._zod.optout === "optional") ? "optional" : void 0), re(e._zod, "values", () => {
2045
2045
  if (t.options.every((r) => r._zod.values))
2046
2046
  return new Set(t.options.flatMap((r) => Array.from(r._zod.values)));
2047
2047
  }), re(e._zod, "pattern", () => {
2048
2048
  if (t.options.every((r) => r._zod.pattern)) {
2049
2049
  const r = t.options.map((i) => i._zod.pattern);
2050
- return new RegExp(`^(${r.map((i) => aa(i.source)).join("|")})$`);
2050
+ return new RegExp(`^(${r.map((i) => sa(i.source)).join("|")})$`);
2051
2051
  }
2052
2052
  });
2053
2053
  const n = t.options.length === 1, o = t.options[0]._zod.run;
@@ -2088,7 +2088,7 @@ function op(e, t, n, o) {
2088
2088
  }), t);
2089
2089
  }
2090
2090
  const gv = /* @__PURE__ */ x("$ZodXor", (e, t) => {
2091
- ca.init(e, t), t.inclusive = !1;
2091
+ da.init(e, t), t.inclusive = !1;
2092
2092
  const n = t.options.length === 1, o = t.options[0]._zod.run;
2093
2093
  e._zod.parse = (r, i) => {
2094
2094
  if (n)
@@ -2105,7 +2105,7 @@ const gv = /* @__PURE__ */ x("$ZodXor", (e, t) => {
2105
2105
  return a ? Promise.all(s).then((u) => op(u, r, e, i)) : op(s, r, e, i);
2106
2106
  };
2107
2107
  }), vv = /* @__PURE__ */ x("$ZodDiscriminatedUnion", (e, t) => {
2108
- t.inclusive = !1, ca.init(e, t);
2108
+ t.inclusive = !1, da.init(e, t);
2109
2109
  const n = e._zod.parse;
2110
2110
  re(e._zod, "propValues", () => {
2111
2111
  const r = {};
@@ -2161,7 +2161,7 @@ const gv = /* @__PURE__ */ x("$ZodXor", (e, t) => {
2161
2161
  return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([u, l]) => ip(n, u, l)) : ip(n, i, a);
2162
2162
  };
2163
2163
  });
2164
- function hl(e, t) {
2164
+ function gl(e, t) {
2165
2165
  if (e === t)
2166
2166
  return { valid: !0, data: e };
2167
2167
  if (e instanceof Date && t instanceof Date && +e == +t)
@@ -2169,7 +2169,7 @@ function hl(e, t) {
2169
2169
  if (Er(e) && Er(t)) {
2170
2170
  const n = Object.keys(t), o = Object.keys(e).filter((i) => n.indexOf(i) !== -1), r = { ...e, ...t };
2171
2171
  for (const i of o) {
2172
- const a = hl(e[i], t[i]);
2172
+ const a = gl(e[i], t[i]);
2173
2173
  if (!a.valid)
2174
2174
  return {
2175
2175
  valid: !1,
@@ -2184,7 +2184,7 @@ function hl(e, t) {
2184
2184
  return { valid: !1, mergeErrorPath: [] };
2185
2185
  const n = [];
2186
2186
  for (let o = 0; o < e.length; o++) {
2187
- const r = e[o], i = t[o], a = hl(r, i);
2187
+ const r = e[o], i = t[o], a = gl(r, i);
2188
2188
  if (!a.valid)
2189
2189
  return {
2190
2190
  valid: !1,
@@ -2199,7 +2199,7 @@ function hl(e, t) {
2199
2199
  function ip(e, t, n) {
2200
2200
  if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), Sr(e))
2201
2201
  return e;
2202
- const o = hl(t.value, n.value);
2202
+ const o = gl(t.value, n.value);
2203
2203
  if (!o.valid)
2204
2204
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
2205
2205
  return e.value = o.data, e;
@@ -2410,7 +2410,7 @@ const $v = /* @__PURE__ */ x("$ZodEnum", (e, t) => {
2410
2410
  }), Iv = /* @__PURE__ */ x("$ZodTransform", (e, t) => {
2411
2411
  Q.init(e, t), e._zod.parse = (n, o) => {
2412
2412
  if (o.direction === "backward")
2413
- throw new ia(e.constructor.name);
2413
+ throw new aa(e.constructor.name);
2414
2414
  const r = t.transform(n.value, n);
2415
2415
  if (o.async)
2416
2416
  return (r instanceof Promise ? r : Promise.resolve(r)).then((a) => (n.value = a, n));
@@ -2425,7 +2425,7 @@ function lp(e, t) {
2425
2425
  const kv = /* @__PURE__ */ x("$ZodOptional", (e, t) => {
2426
2426
  Q.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", re(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), re(e._zod, "pattern", () => {
2427
2427
  const n = t.innerType._zod.pattern;
2428
- return n ? new RegExp(`^(${aa(n.source)})?$`) : void 0;
2428
+ return n ? new RegExp(`^(${sa(n.source)})?$`) : void 0;
2429
2429
  }), e._zod.parse = (n, o) => {
2430
2430
  if (t.innerType._zod.optin === "optional") {
2431
2431
  const r = t.innerType._zod.run(n, o);
@@ -2436,7 +2436,7 @@ const kv = /* @__PURE__ */ x("$ZodOptional", (e, t) => {
2436
2436
  }), Ev = /* @__PURE__ */ x("$ZodNullable", (e, t) => {
2437
2437
  Q.init(e, t), re(e._zod, "optin", () => t.innerType._zod.optin), re(e._zod, "optout", () => t.innerType._zod.optout), re(e._zod, "pattern", () => {
2438
2438
  const n = t.innerType._zod.pattern;
2439
- return n ? new RegExp(`^(${aa(n.source)}|null)$`) : void 0;
2439
+ return n ? new RegExp(`^(${sa(n.source)}|null)$`) : void 0;
2440
2440
  }), re(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, o) => n.value === null ? n : t.innerType._zod.run(n, o);
2441
2441
  }), Tv = /* @__PURE__ */ x("$ZodDefault", (e, t) => {
2442
2442
  Q.init(e, t), e._zod.optin = "optional", re(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => {
@@ -2473,7 +2473,7 @@ function cp(e, t) {
2473
2473
  const Pv = /* @__PURE__ */ x("$ZodSuccess", (e, t) => {
2474
2474
  Q.init(e, t), e._zod.parse = (n, o) => {
2475
2475
  if (o.direction === "backward")
2476
- throw new ia("ZodSuccess");
2476
+ throw new aa("ZodSuccess");
2477
2477
  const r = t.innerType._zod.run(n, o);
2478
2478
  return r instanceof Promise ? r.then((i) => (n.value = i.issues.length === 0, n)) : (n.value = r.issues.length === 0, n);
2479
2479
  };
@@ -2584,15 +2584,15 @@ const jv = /* @__PURE__ */ x("$ZodTemplateLiteral", (e, t) => {
2584
2584
  if (typeof n != "function")
2585
2585
  throw new Error("implement() must be called with a function");
2586
2586
  return function(...o) {
2587
- const r = e._def.input ? fl(e._def.input, o) : o, i = Reflect.apply(n, this, r);
2588
- return e._def.output ? fl(e._def.output, i) : i;
2587
+ const r = e._def.input ? ml(e._def.input, o) : o, i = Reflect.apply(n, this, r);
2588
+ return e._def.output ? ml(e._def.output, i) : i;
2589
2589
  };
2590
2590
  }, e.implementAsync = (n) => {
2591
2591
  if (typeof n != "function")
2592
2592
  throw new Error("implementAsync() must be called with a function");
2593
2593
  return async function(...o) {
2594
- const r = e._def.input ? await ml(e._def.input, o) : o, i = await Reflect.apply(n, this, r);
2595
- return e._def.output ? await ml(e._def.output, i) : i;
2594
+ const r = e._def.input ? await hl(e._def.input, o) : o, i = await Reflect.apply(n, this, r);
2595
+ return e._def.output ? await hl(e._def.output, i) : i;
2596
2596
  };
2597
2597
  }, e._zod.parse = (n, o) => typeof n.value != "function" ? (n.issues.push({
2598
2598
  code: "invalid_type",
@@ -7300,7 +7300,7 @@ function Nu(e, t) {
7300
7300
  ...N(t)
7301
7301
  });
7302
7302
  }
7303
- function da(e, t) {
7303
+ function pa(e, t) {
7304
7304
  return new e({
7305
7305
  type: "string",
7306
7306
  format: "url",
@@ -7724,7 +7724,7 @@ function sn(e, t) {
7724
7724
  minimum: e
7725
7725
  });
7726
7726
  }
7727
- function pa(e, t) {
7727
+ function fa(e, t) {
7728
7728
  return new fg({
7729
7729
  check: "size_equals",
7730
7730
  ...N(t),
@@ -7752,7 +7752,7 @@ function Io(e, t) {
7752
7752
  length: e
7753
7753
  });
7754
7754
  }
7755
- function fa(e, t) {
7755
+ function ma(e, t) {
7756
7756
  return new vg({
7757
7757
  check: "string_format",
7758
7758
  format: "regex",
@@ -7760,21 +7760,21 @@ function fa(e, t) {
7760
7760
  pattern: e
7761
7761
  });
7762
7762
  }
7763
- function ma(e) {
7763
+ function ha(e) {
7764
7764
  return new yg({
7765
7765
  check: "string_format",
7766
7766
  format: "lowercase",
7767
7767
  ...N(e)
7768
7768
  });
7769
7769
  }
7770
- function ha(e) {
7770
+ function ga(e) {
7771
7771
  return new bg({
7772
7772
  check: "string_format",
7773
7773
  format: "uppercase",
7774
7774
  ...N(e)
7775
7775
  });
7776
7776
  }
7777
- function ga(e, t) {
7777
+ function va(e, t) {
7778
7778
  return new _g({
7779
7779
  check: "string_format",
7780
7780
  format: "includes",
@@ -7782,7 +7782,7 @@ function ga(e, t) {
7782
7782
  includes: e
7783
7783
  });
7784
7784
  }
7785
- function va(e, t) {
7785
+ function ya(e, t) {
7786
7786
  return new wg({
7787
7787
  check: "string_format",
7788
7788
  format: "starts_with",
@@ -7790,7 +7790,7 @@ function va(e, t) {
7790
7790
  prefix: e
7791
7791
  });
7792
7792
  }
7793
- function ya(e, t) {
7793
+ function ba(e, t) {
7794
7794
  return new $g({
7795
7795
  check: "string_format",
7796
7796
  format: "ends_with",
@@ -7806,7 +7806,7 @@ function Ku(e, t, n) {
7806
7806
  ...N(n)
7807
7807
  });
7808
7808
  }
7809
- function ba(e, t) {
7809
+ function _a(e, t) {
7810
7810
  return new xg({
7811
7811
  check: "mime_type",
7812
7812
  mime: e,
@@ -7819,19 +7819,19 @@ function tr(e) {
7819
7819
  tx: e
7820
7820
  });
7821
7821
  }
7822
- function _a(e) {
7822
+ function wa(e) {
7823
7823
  return tr((t) => t.normalize(e));
7824
7824
  }
7825
- function wa() {
7825
+ function $a() {
7826
7826
  return tr((e) => e.trim());
7827
7827
  }
7828
- function $a() {
7828
+ function Sa() {
7829
7829
  return tr((e) => e.toLowerCase());
7830
7830
  }
7831
- function Sa() {
7831
+ function xa() {
7832
7832
  return tr((e) => e.toUpperCase());
7833
7833
  }
7834
- function xa() {
7834
+ function Ia() {
7835
7835
  return tr((e) => oh(e));
7836
7836
  }
7837
7837
  function Iy(e, t, n) {
@@ -7957,7 +7957,7 @@ function ET(e, t, n) {
7957
7957
  type: "default",
7958
7958
  innerType: t,
7959
7959
  get defaultValue() {
7960
- return typeof n == "function" ? n() : sa(n);
7960
+ return typeof n == "function" ? n() : la(n);
7961
7961
  }
7962
7962
  });
7963
7963
  }
@@ -8528,7 +8528,7 @@ const Ry = (e, t = {}) => (n) => {
8528
8528
  me(r, t, o);
8529
8529
  const i = t.seen.get(e);
8530
8530
  i.ref = r;
8531
- }, gl = {
8531
+ }, vl = {
8532
8532
  string: zy,
8533
8533
  number: jy,
8534
8534
  boolean: My,
@@ -8569,9 +8569,9 @@ const Ry = (e, t = {}) => (n) => {
8569
8569
  optional: vb,
8570
8570
  lazy: yb
8571
8571
  };
8572
- function Ia(e, t) {
8572
+ function ka(e, t) {
8573
8573
  if ("_idmap" in e) {
8574
- const o = e, r = ln({ ...t, processors: gl }), i = {};
8574
+ const o = e, r = ln({ ...t, processors: vl }), i = {};
8575
8575
  for (const u of o._idmap.entries()) {
8576
8576
  const [l, c] = u;
8577
8577
  me(c, r);
@@ -8594,7 +8594,7 @@ function Ia(e, t) {
8594
8594
  }
8595
8595
  return { schemas: a };
8596
8596
  }
8597
- const n = ln({ ...t, processors: gl });
8597
+ const n = ln({ ...t, processors: vl });
8598
8598
  return me(e, n), un(n, e), cn(n, e);
8599
8599
  }
8600
8600
  class MT {
@@ -8632,7 +8632,7 @@ class MT {
8632
8632
  constructor(t) {
8633
8633
  let n = t?.target ?? "draft-2020-12";
8634
8634
  n === "draft-4" && (n = "draft-04"), n === "draft-7" && (n = "draft-07"), this.ctx = ln({
8635
- processors: gl,
8635
+ processors: vl,
8636
8636
  target: n,
8637
8637
  ...t?.metadata && { metadata: t.metadata },
8638
8638
  ...t?.unrepresentable && { unrepresentable: t.unrepresentable },
@@ -8705,7 +8705,7 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8705
8705
  $ZodE164: Yg,
8706
8706
  $ZodEmail: Ng,
8707
8707
  $ZodEmoji: Cg,
8708
- $ZodEncodeError: ia,
8708
+ $ZodEncodeError: aa,
8709
8709
  $ZodEnum: $v,
8710
8710
  $ZodError: ou,
8711
8711
  $ZodFile: xv,
@@ -8755,7 +8755,7 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8755
8755
  $ZodURL: Pg,
8756
8756
  $ZodUUID: Og,
8757
8757
  $ZodUndefined: ov,
8758
- $ZodUnion: ca,
8758
+ $ZodUnion: da,
8759
8759
  $ZodUnknown: sv,
8760
8760
  $ZodVoid: uv,
8761
8761
  $ZodXID: Mg,
@@ -8797,7 +8797,7 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8797
8797
  _emoji: Pu,
8798
8798
  _encode: su,
8799
8799
  _encodeAsync: uu,
8800
- _endsWith: ya,
8800
+ _endsWith: ba,
8801
8801
  _enum: wT,
8802
8802
  _file: ky,
8803
8803
  _float32: iy,
@@ -8805,7 +8805,7 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8805
8805
  _gt: hr,
8806
8806
  _gte: He,
8807
8807
  _guid: Ei,
8808
- _includes: ga,
8808
+ _includes: va,
8809
8809
  _int: oy,
8810
8810
  _int32: sy,
8811
8811
  _int64: fy,
@@ -8821,7 +8821,7 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8821
8821
  _lazy: RT,
8822
8822
  _length: Io,
8823
8823
  _literal: ST,
8824
- _lowercase: ma,
8824
+ _lowercase: ha,
8825
8825
  _lt: mr,
8826
8826
  _lte: ut,
8827
8827
  _mac: Kv,
@@ -8829,7 +8829,7 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8829
8829
  _max: ut,
8830
8830
  _maxLength: xo,
8831
8831
  _maxSize: So,
8832
- _mime: ba,
8832
+ _mime: _a,
8833
8833
  _min: He,
8834
8834
  _minLength: Tr,
8835
8835
  _minSize: sn,
@@ -8842,7 +8842,7 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8842
8842
  _nonnegative: Gu,
8843
8843
  _nonoptional: TT,
8844
8844
  _nonpositive: Hu,
8845
- _normalize: _a,
8845
+ _normalize: wa,
8846
8846
  _null: vy,
8847
8847
  _nullable: kT,
8848
8848
  _number: ry,
@@ -8857,7 +8857,7 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8857
8857
  _readonly: CT,
8858
8858
  _record: yT,
8859
8859
  _refine: Ty,
8860
- _regex: fa,
8860
+ _regex: ma,
8861
8861
  _safeDecode: pu,
8862
8862
  _safeDecodeAsync: mu,
8863
8863
  _safeEncode: du,
@@ -8865,9 +8865,9 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8865
8865
  _safeParse: vo,
8866
8866
  _safeParseAsync: yo,
8867
8867
  _set: _T,
8868
- _size: pa,
8869
- _slugify: xa,
8870
- _startsWith: va,
8868
+ _size: fa,
8869
+ _slugify: Ia,
8870
+ _startsWith: ya,
8871
8871
  _string: Hv,
8872
8872
  _stringFormat: ko,
8873
8873
  _stringbool: Ay,
@@ -8875,10 +8875,10 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8875
8875
  _superRefine: Oy,
8876
8876
  _symbol: hy,
8877
8877
  _templateLiteral: AT,
8878
- _toLowerCase: $a,
8879
- _toUpperCase: Sa,
8878
+ _toLowerCase: Sa,
8879
+ _toUpperCase: xa,
8880
8880
  _transform: xT,
8881
- _trim: wa,
8881
+ _trim: $a,
8882
8882
  _tuple: vT,
8883
8883
  _uint32: ly,
8884
8884
  _uint64: my,
@@ -8886,8 +8886,8 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8886
8886
  _undefined: gy,
8887
8887
  _union: fT,
8888
8888
  _unknown: by,
8889
- _uppercase: ha,
8890
- _url: da,
8889
+ _uppercase: ga,
8890
+ _url: pa,
8891
8891
  _uuid: Eu,
8892
8892
  _uuidv4: Tu,
8893
8893
  _uuidv6: Ou,
@@ -8916,8 +8916,8 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8916
8916
  isValidJWT: Qg,
8917
8917
  locales: Vv,
8918
8918
  meta: Cy,
8919
- parse: fl,
8920
- parseAsync: ml,
8919
+ parse: ml,
8920
+ parseAsync: hl,
8921
8921
  prettifyError: Sh,
8922
8922
  process: me,
8923
8923
  regexes: gu,
@@ -8929,41 +8929,41 @@ const DT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8929
8929
  safeParse: xh,
8930
8930
  safeParseAsync: Ih,
8931
8931
  toDotPath: $h,
8932
- toJSONSchema: Ia,
8932
+ toJSONSchema: ka,
8933
8933
  treeifyError: wh,
8934
8934
  util: bh,
8935
8935
  version: Eg
8936
8936
  }, Symbol.toStringTag, { value: "Module" })), LT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8937
8937
  __proto__: null,
8938
- endsWith: ya,
8938
+ endsWith: ba,
8939
8939
  gt: hr,
8940
8940
  gte: He,
8941
- includes: ga,
8941
+ includes: va,
8942
8942
  length: Io,
8943
- lowercase: ma,
8943
+ lowercase: ha,
8944
8944
  lt: mr,
8945
8945
  lte: ut,
8946
8946
  maxLength: xo,
8947
8947
  maxSize: So,
8948
- mime: ba,
8948
+ mime: _a,
8949
8949
  minLength: Tr,
8950
8950
  minSize: sn,
8951
8951
  multipleOf: an,
8952
8952
  negative: Wu,
8953
8953
  nonnegative: Gu,
8954
8954
  nonpositive: Hu,
8955
- normalize: _a,
8955
+ normalize: wa,
8956
8956
  overwrite: tr,
8957
8957
  positive: Ju,
8958
8958
  property: Ku,
8959
- regex: fa,
8960
- size: pa,
8961
- slugify: xa,
8962
- startsWith: va,
8963
- toLowerCase: $a,
8964
- toUpperCase: Sa,
8965
- trim: wa,
8966
- uppercase: ha
8959
+ regex: ma,
8960
+ size: fa,
8961
+ slugify: Ia,
8962
+ startsWith: ya,
8963
+ toLowerCase: Sa,
8964
+ toUpperCase: xa,
8965
+ trim: $a,
8966
+ uppercase: ga
8967
8967
  }, Symbol.toStringTag, { value: "Module" })), Qu = /* @__PURE__ */ x("ZodISODateTime", (e, t) => {
8968
8968
  Ug.init(e, t), ge.init(e, t);
8969
8969
  });
@@ -9029,7 +9029,7 @@ const Sb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9029
9029
  });
9030
9030
  }, ZT = x("ZodError", xb), at = x("ZodError", xb, {
9031
9031
  Parent: Error
9032
- }), Ib = /* @__PURE__ */ ho(at), kb = /* @__PURE__ */ go(at), Eb = /* @__PURE__ */ vo(at), ka = /* @__PURE__ */ yo(at), Tb = /* @__PURE__ */ su(at), Ob = /* @__PURE__ */ lu(at), Nb = /* @__PURE__ */ uu(at), Pb = /* @__PURE__ */ cu(at), Cb = /* @__PURE__ */ du(at), Ab = /* @__PURE__ */ pu(at), Rb = /* @__PURE__ */ fu(at), zb = /* @__PURE__ */ mu(at), te = /* @__PURE__ */ x("ZodType", (e, t) => (Q.init(e, t), Object.assign(e["~standard"], {
9032
+ }), Ib = /* @__PURE__ */ ho(at), kb = /* @__PURE__ */ go(at), Eb = /* @__PURE__ */ vo(at), Ea = /* @__PURE__ */ yo(at), Tb = /* @__PURE__ */ su(at), Ob = /* @__PURE__ */ lu(at), Nb = /* @__PURE__ */ uu(at), Pb = /* @__PURE__ */ cu(at), Cb = /* @__PURE__ */ du(at), Ab = /* @__PURE__ */ pu(at), Rb = /* @__PURE__ */ fu(at), zb = /* @__PURE__ */ mu(at), te = /* @__PURE__ */ x("ZodType", (e, t) => (Q.init(e, t), Object.assign(e["~standard"], {
9033
9033
  jsonSchema: {
9034
9034
  input: Vn(e, "input"),
9035
9035
  output: Vn(e, "output")
@@ -9039,7 +9039,7 @@ const Sb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9039
9039
  ...t.checks ?? [],
9040
9040
  ...n.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
9041
9041
  ]
9042
- })), e.clone = (n, o) => ft(e, n, o), e.brand = () => e, e.register = ((n, o) => (n.add(e, o), e)), e.parse = (n, o) => Ib(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => Eb(e, n, o), e.parseAsync = async (n, o) => kb(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => ka(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => Tb(e, n, o), e.decode = (n, o) => Ob(e, n, o), e.encodeAsync = async (n, o) => Nb(e, n, o), e.decodeAsync = async (n, o) => Pb(e, n, o), e.safeEncode = (n, o) => Cb(e, n, o), e.safeDecode = (n, o) => Ab(e, n, o), e.safeEncodeAsync = async (n, o) => Rb(e, n, o), e.safeDecodeAsync = async (n, o) => zb(e, n, o), e.refine = (n, o) => e.check(Dc(n, o)), e.superRefine = (n) => e.check(Uc(n)), e.overwrite = (n) => e.check(tr(n)), e.optional = () => X(e), e.nullable = () => Jn(e), e.nullish = () => X(Jn(e)), e.nonoptional = (n) => Ec(e, n), e.array = () => z(e), e.or = (n) => H([e, n]), e.and = (n) => mc(e, n), e.transform = (n) => Wn(e, Ga(n)), e.default = (n) => xc(e, n), e.prefault = (n) => kc(e, n), e.catch = (n) => Nc(e, n), e.pipe = (n) => Wn(e, n), e.readonly = () => Ac(e), e.describe = (n) => {
9042
+ })), e.clone = (n, o) => ft(e, n, o), e.brand = () => e, e.register = ((n, o) => (n.add(e, o), e)), e.parse = (n, o) => Ib(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => Eb(e, n, o), e.parseAsync = async (n, o) => kb(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => Ea(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => Tb(e, n, o), e.decode = (n, o) => Ob(e, n, o), e.encodeAsync = async (n, o) => Nb(e, n, o), e.decodeAsync = async (n, o) => Pb(e, n, o), e.safeEncode = (n, o) => Cb(e, n, o), e.safeDecode = (n, o) => Ab(e, n, o), e.safeEncodeAsync = async (n, o) => Rb(e, n, o), e.safeDecodeAsync = async (n, o) => zb(e, n, o), e.refine = (n, o) => e.check(Dc(n, o)), e.superRefine = (n) => e.check(Uc(n)), e.overwrite = (n) => e.check(tr(n)), e.optional = () => X(e), e.nullable = () => Jn(e), e.nullish = () => X(Jn(e)), e.nonoptional = (n) => Ec(e, n), e.array = () => z(e), e.or = (n) => H([e, n]), e.and = (n) => mc(e, n), e.transform = (n) => Wn(e, Ka(n)), e.default = (n) => xc(e, n), e.prefault = (n) => kc(e, n), e.catch = (n) => Nc(e, n), e.pipe = (n) => Wn(e, n), e.readonly = () => Ac(e), e.describe = (n) => {
9043
9043
  const o = e.clone();
9044
9044
  return xt.add(o, { description: n }), o;
9045
9045
  }, Object.defineProperty(e, "description", {
@@ -9052,23 +9052,23 @@ const Sb = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9052
9052
  return xt.get(e);
9053
9053
  const o = e.clone();
9054
9054
  return xt.add(o, n[0]), o;
9055
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Ea = /* @__PURE__ */ x("_ZodString", (e, t) => {
9055
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Ta = /* @__PURE__ */ x("_ZodString", (e, t) => {
9056
9056
  $o.init(e, t), te.init(e, t), e._zod.processJSONSchema = (o, r, i) => zy(e, o, r);
9057
9057
  const n = e._zod.bag;
9058
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(fa(...o)), e.includes = (...o) => e.check(ga(...o)), e.startsWith = (...o) => e.check(va(...o)), e.endsWith = (...o) => e.check(ya(...o)), e.min = (...o) => e.check(Tr(...o)), e.max = (...o) => e.check(xo(...o)), e.length = (...o) => e.check(Io(...o)), e.nonempty = (...o) => e.check(Tr(1, ...o)), e.lowercase = (o) => e.check(ma(o)), e.uppercase = (o) => e.check(ha(o)), e.trim = () => e.check(wa()), e.normalize = (...o) => e.check(_a(...o)), e.toLowerCase = () => e.check($a()), e.toUpperCase = () => e.check(Sa()), e.slugify = () => e.check(xa());
9058
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(ma(...o)), e.includes = (...o) => e.check(va(...o)), e.startsWith = (...o) => e.check(ya(...o)), e.endsWith = (...o) => e.check(ba(...o)), e.min = (...o) => e.check(Tr(...o)), e.max = (...o) => e.check(xo(...o)), e.length = (...o) => e.check(Io(...o)), e.nonempty = (...o) => e.check(Tr(1, ...o)), e.lowercase = (o) => e.check(ha(o)), e.uppercase = (o) => e.check(ga(o)), e.trim = () => e.check($a()), e.normalize = (...o) => e.check(wa(...o)), e.toLowerCase = () => e.check(Sa()), e.toUpperCase = () => e.check(xa()), e.slugify = () => e.check(Ia());
9059
9059
  }), Eo = /* @__PURE__ */ x("ZodString", (e, t) => {
9060
- $o.init(e, t), Ea.init(e, t), e.email = (n) => e.check(ku(Ta, n)), e.url = (n) => e.check(da(To, n)), e.jwt = (n) => e.check(Bu(Va, n)), e.emoji = (n) => e.check(Pu(Oa, n)), e.guid = (n) => e.check(Ei(Bn, n)), e.uuid = (n) => e.check(Eu(Dt, n)), e.uuidv4 = (n) => e.check(Tu(Dt, n)), e.uuidv6 = (n) => e.check(Ou(Dt, n)), e.uuidv7 = (n) => e.check(Nu(Dt, n)), e.nanoid = (n) => e.check(Cu(Na, n)), e.guid = (n) => e.check(Ei(Bn, n)), e.cuid = (n) => e.check(Au(Pa, n)), e.cuid2 = (n) => e.check(Ru(Ca, n)), e.ulid = (n) => e.check(zu(Aa, n)), e.base64 = (n) => e.check(Fu(La, n)), e.base64url = (n) => e.check(qu(Fa, n)), e.xid = (n) => e.check(ju(Ra, n)), e.ksuid = (n) => e.check(Mu(za, n)), e.ipv4 = (n) => e.check(Du(ja, n)), e.ipv6 = (n) => e.check(Uu(Ma, n)), e.cidrv4 = (n) => e.check(Lu(Da, n)), e.cidrv6 = (n) => e.check(Zu(Ua, n)), e.e164 = (n) => e.check(Vu(qa, n)), e.datetime = (n) => e.check(bb(n)), e.date = (n) => e.check(_b(n)), e.time = (n) => e.check(wb(n)), e.duration = (n) => e.check($b(n));
9060
+ $o.init(e, t), Ta.init(e, t), e.email = (n) => e.check(ku(Oa, n)), e.url = (n) => e.check(pa(To, n)), e.jwt = (n) => e.check(Bu(Ba, n)), e.emoji = (n) => e.check(Pu(Na, n)), e.guid = (n) => e.check(Ei(Bn, n)), e.uuid = (n) => e.check(Eu(Dt, n)), e.uuidv4 = (n) => e.check(Tu(Dt, n)), e.uuidv6 = (n) => e.check(Ou(Dt, n)), e.uuidv7 = (n) => e.check(Nu(Dt, n)), e.nanoid = (n) => e.check(Cu(Pa, n)), e.guid = (n) => e.check(Ei(Bn, n)), e.cuid = (n) => e.check(Au(Ca, n)), e.cuid2 = (n) => e.check(Ru(Aa, n)), e.ulid = (n) => e.check(zu(Ra, n)), e.base64 = (n) => e.check(Fu(Za, n)), e.base64url = (n) => e.check(qu(qa, n)), e.xid = (n) => e.check(ju(za, n)), e.ksuid = (n) => e.check(Mu(ja, n)), e.ipv4 = (n) => e.check(Du(Ma, n)), e.ipv6 = (n) => e.check(Uu(Da, n)), e.cidrv4 = (n) => e.check(Lu(Ua, n)), e.cidrv6 = (n) => e.check(Zu(La, n)), e.e164 = (n) => e.check(Vu(Va, n)), e.datetime = (n) => e.check(bb(n)), e.date = (n) => e.check(_b(n)), e.time = (n) => e.check(wb(n)), e.duration = (n) => e.check($b(n));
9061
9061
  });
9062
9062
  function w(e) {
9063
9063
  return Hv(Eo, e);
9064
9064
  }
9065
9065
  const ge = /* @__PURE__ */ x("ZodStringFormat", (e, t) => {
9066
- he.init(e, t), Ea.init(e, t);
9067
- }), Ta = /* @__PURE__ */ x("ZodEmail", (e, t) => {
9066
+ he.init(e, t), Ta.init(e, t);
9067
+ }), Oa = /* @__PURE__ */ x("ZodEmail", (e, t) => {
9068
9068
  Ng.init(e, t), ge.init(e, t);
9069
9069
  });
9070
9070
  function jb(e) {
9071
- return ku(Ta, e);
9071
+ return ku(Oa, e);
9072
9072
  }
9073
9073
  const Bn = /* @__PURE__ */ x("ZodGUID", (e, t) => {
9074
9074
  Tg.init(e, t), ge.init(e, t);
@@ -9095,62 +9095,62 @@ const To = /* @__PURE__ */ x("ZodURL", (e, t) => {
9095
9095
  Pg.init(e, t), ge.init(e, t);
9096
9096
  });
9097
9097
  function Fb(e) {
9098
- return da(To, e);
9098
+ return pa(To, e);
9099
9099
  }
9100
9100
  function qb(e) {
9101
- return da(To, {
9101
+ return pa(To, {
9102
9102
  protocol: /^https?$/,
9103
9103
  hostname: Vh,
9104
9104
  ...N(e)
9105
9105
  });
9106
9106
  }
9107
- const Oa = /* @__PURE__ */ x("ZodEmoji", (e, t) => {
9107
+ const Na = /* @__PURE__ */ x("ZodEmoji", (e, t) => {
9108
9108
  Cg.init(e, t), ge.init(e, t);
9109
9109
  });
9110
9110
  function Vb(e) {
9111
- return Pu(Oa, e);
9111
+ return Pu(Na, e);
9112
9112
  }
9113
- const Na = /* @__PURE__ */ x("ZodNanoID", (e, t) => {
9113
+ const Pa = /* @__PURE__ */ x("ZodNanoID", (e, t) => {
9114
9114
  Ag.init(e, t), ge.init(e, t);
9115
9115
  });
9116
9116
  function Bb(e) {
9117
- return Cu(Na, e);
9117
+ return Cu(Pa, e);
9118
9118
  }
9119
- const Pa = /* @__PURE__ */ x("ZodCUID", (e, t) => {
9119
+ const Ca = /* @__PURE__ */ x("ZodCUID", (e, t) => {
9120
9120
  Rg.init(e, t), ge.init(e, t);
9121
9121
  });
9122
9122
  function Jb(e) {
9123
- return Au(Pa, e);
9123
+ return Au(Ca, e);
9124
9124
  }
9125
- const Ca = /* @__PURE__ */ x("ZodCUID2", (e, t) => {
9125
+ const Aa = /* @__PURE__ */ x("ZodCUID2", (e, t) => {
9126
9126
  zg.init(e, t), ge.init(e, t);
9127
9127
  });
9128
9128
  function Wb(e) {
9129
- return Ru(Ca, e);
9129
+ return Ru(Aa, e);
9130
9130
  }
9131
- const Aa = /* @__PURE__ */ x("ZodULID", (e, t) => {
9131
+ const Ra = /* @__PURE__ */ x("ZodULID", (e, t) => {
9132
9132
  jg.init(e, t), ge.init(e, t);
9133
9133
  });
9134
9134
  function Hb(e) {
9135
- return zu(Aa, e);
9135
+ return zu(Ra, e);
9136
9136
  }
9137
- const Ra = /* @__PURE__ */ x("ZodXID", (e, t) => {
9137
+ const za = /* @__PURE__ */ x("ZodXID", (e, t) => {
9138
9138
  Mg.init(e, t), ge.init(e, t);
9139
9139
  });
9140
9140
  function Gb(e) {
9141
- return ju(Ra, e);
9141
+ return ju(za, e);
9142
9142
  }
9143
- const za = /* @__PURE__ */ x("ZodKSUID", (e, t) => {
9143
+ const ja = /* @__PURE__ */ x("ZodKSUID", (e, t) => {
9144
9144
  Dg.init(e, t), ge.init(e, t);
9145
9145
  });
9146
9146
  function Kb(e) {
9147
- return Mu(za, e);
9147
+ return Mu(ja, e);
9148
9148
  }
9149
- const ja = /* @__PURE__ */ x("ZodIPv4", (e, t) => {
9149
+ const Ma = /* @__PURE__ */ x("ZodIPv4", (e, t) => {
9150
9150
  qg.init(e, t), ge.init(e, t);
9151
9151
  });
9152
9152
  function Yb(e) {
9153
- return Du(ja, e);
9153
+ return Du(Ma, e);
9154
9154
  }
9155
9155
  const rc = /* @__PURE__ */ x("ZodMAC", (e, t) => {
9156
9156
  Bg.init(e, t), ge.init(e, t);
@@ -9158,47 +9158,47 @@ const rc = /* @__PURE__ */ x("ZodMAC", (e, t) => {
9158
9158
  function Qb(e) {
9159
9159
  return Kv(rc, e);
9160
9160
  }
9161
- const Ma = /* @__PURE__ */ x("ZodIPv6", (e, t) => {
9161
+ const Da = /* @__PURE__ */ x("ZodIPv6", (e, t) => {
9162
9162
  Vg.init(e, t), ge.init(e, t);
9163
9163
  });
9164
9164
  function Xb(e) {
9165
- return Uu(Ma, e);
9165
+ return Uu(Da, e);
9166
9166
  }
9167
- const Da = /* @__PURE__ */ x("ZodCIDRv4", (e, t) => {
9167
+ const Ua = /* @__PURE__ */ x("ZodCIDRv4", (e, t) => {
9168
9168
  Jg.init(e, t), ge.init(e, t);
9169
9169
  });
9170
9170
  function e_(e) {
9171
- return Lu(Da, e);
9171
+ return Lu(Ua, e);
9172
9172
  }
9173
- const Ua = /* @__PURE__ */ x("ZodCIDRv6", (e, t) => {
9173
+ const La = /* @__PURE__ */ x("ZodCIDRv6", (e, t) => {
9174
9174
  Wg.init(e, t), ge.init(e, t);
9175
9175
  });
9176
9176
  function t_(e) {
9177
- return Zu(Ua, e);
9177
+ return Zu(La, e);
9178
9178
  }
9179
- const La = /* @__PURE__ */ x("ZodBase64", (e, t) => {
9179
+ const Za = /* @__PURE__ */ x("ZodBase64", (e, t) => {
9180
9180
  Hg.init(e, t), ge.init(e, t);
9181
9181
  });
9182
- function Za(e) {
9183
- return Fu(La, e);
9182
+ function Fa(e) {
9183
+ return Fu(Za, e);
9184
9184
  }
9185
- const Fa = /* @__PURE__ */ x("ZodBase64URL", (e, t) => {
9185
+ const qa = /* @__PURE__ */ x("ZodBase64URL", (e, t) => {
9186
9186
  Kg.init(e, t), ge.init(e, t);
9187
9187
  });
9188
9188
  function r_(e) {
9189
- return qu(Fa, e);
9189
+ return qu(qa, e);
9190
9190
  }
9191
- const qa = /* @__PURE__ */ x("ZodE164", (e, t) => {
9191
+ const Va = /* @__PURE__ */ x("ZodE164", (e, t) => {
9192
9192
  Yg.init(e, t), ge.init(e, t);
9193
9193
  });
9194
9194
  function n_(e) {
9195
- return Vu(qa, e);
9195
+ return Vu(Va, e);
9196
9196
  }
9197
- const Va = /* @__PURE__ */ x("ZodJWT", (e, t) => {
9197
+ const Ba = /* @__PURE__ */ x("ZodJWT", (e, t) => {
9198
9198
  Xg.init(e, t), ge.init(e, t);
9199
9199
  });
9200
9200
  function o_(e) {
9201
- return Bu(Va, e);
9201
+ return Bu(Ba, e);
9202
9202
  }
9203
9203
  const vn = /* @__PURE__ */ x("ZodCustomStringFormat", (e, t) => {
9204
9204
  ev.init(e, t), ge.init(e, t);
@@ -9258,14 +9258,14 @@ const Po = /* @__PURE__ */ x("ZodBigInt", (e, t) => {
9258
9258
  function f_(e) {
9259
9259
  return dy(Po, e);
9260
9260
  }
9261
- const Ba = /* @__PURE__ */ x("ZodBigIntFormat", (e, t) => {
9261
+ const Ja = /* @__PURE__ */ x("ZodBigIntFormat", (e, t) => {
9262
9262
  rv.init(e, t), Po.init(e, t);
9263
9263
  });
9264
9264
  function m_(e) {
9265
- return fy(Ba, e);
9265
+ return fy(Ja, e);
9266
9266
  }
9267
9267
  function h_(e) {
9268
- return my(Ba, e);
9268
+ return my(Ja, e);
9269
9269
  }
9270
9270
  const nc = /* @__PURE__ */ x("ZodSymbol", (e, t) => {
9271
9271
  nv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => Uy(e, n);
@@ -9300,7 +9300,7 @@ function $e() {
9300
9300
  const lc = /* @__PURE__ */ x("ZodNever", (e, t) => {
9301
9301
  lv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => qy(e, n, o);
9302
9302
  });
9303
- function Ja(e) {
9303
+ function Wa(e) {
9304
9304
  return _y(lc, e);
9305
9305
  }
9306
9306
  const uc = /* @__PURE__ */ x("ZodVoid", (e, t) => {
@@ -9309,13 +9309,13 @@ const uc = /* @__PURE__ */ x("ZodVoid", (e, t) => {
9309
9309
  function y_(e) {
9310
9310
  return wy(uc, e);
9311
9311
  }
9312
- const Wa = /* @__PURE__ */ x("ZodDate", (e, t) => {
9312
+ const Ha = /* @__PURE__ */ x("ZodDate", (e, t) => {
9313
9313
  cv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (o, r, i) => Jy(e, o), e.min = (o, r) => e.check(He(o, r)), e.max = (o, r) => e.check(ut(o, r));
9314
9314
  const n = e._zod.bag;
9315
9315
  e.minDate = n.minimum ? new Date(n.minimum) : null, e.maxDate = n.maximum ? new Date(n.maximum) : null;
9316
9316
  });
9317
9317
  function b_(e) {
9318
- return $y(Wa, e);
9318
+ return $y(Ha, e);
9319
9319
  }
9320
9320
  const cc = /* @__PURE__ */ x("ZodArray", (e, t) => {
9321
9321
  dv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => ob(e, n, o, r), e.element = t.element, e.min = (n, o) => e.check(Tr(n, o)), e.nonempty = (n) => e.check(Tr(1, n)), e.max = (n, o) => e.check(xo(n, o)), e.length = (n, o) => e.check(Io(n, o)), e.unwrap = () => e.element;
@@ -9328,7 +9328,7 @@ function __(e) {
9328
9328
  return _r(Object.keys(t));
9329
9329
  }
9330
9330
  const Ao = /* @__PURE__ */ x("ZodObject", (e, t) => {
9331
- hv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => ib(e, n, o, r), re(e, "shape", () => t.shape), e.keyof = () => _r(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: $e() }), e.loose = () => e.clone({ ...e._zod.def, catchall: $e() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ja() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => ph(e, n), e.safeExtend = (n) => fh(e, n), e.merge = (n) => mh(e, n), e.pick = (n) => ch(e, n), e.omit = (n) => dh(e, n), e.partial = (...n) => hh(Ka, e, n[0]), e.required = (...n) => gh(Ya, e, n[0]);
9331
+ hv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => ib(e, n, o, r), re(e, "shape", () => t.shape), e.keyof = () => _r(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: $e() }), e.loose = () => e.clone({ ...e._zod.def, catchall: $e() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Wa() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => ph(e, n), e.safeExtend = (n) => fh(e, n), e.merge = (n) => mh(e, n), e.pick = (n) => ch(e, n), e.omit = (n) => dh(e, n), e.partial = (...n) => hh(Ya, e, n[0]), e.required = (...n) => gh(Qa, e, n[0]);
9332
9332
  });
9333
9333
  function E(e, t) {
9334
9334
  const n = {
@@ -9342,7 +9342,7 @@ function ye(e, t) {
9342
9342
  return new Ao({
9343
9343
  type: "object",
9344
9344
  shape: e,
9345
- catchall: Ja(),
9345
+ catchall: Wa(),
9346
9346
  ...N(t)
9347
9347
  });
9348
9348
  }
@@ -9355,7 +9355,7 @@ function sr(e, t) {
9355
9355
  });
9356
9356
  }
9357
9357
  const Ro = /* @__PURE__ */ x("ZodUnion", (e, t) => {
9358
- ca.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => Yu(e, n, o, r), e.options = t.options;
9358
+ da.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => Yu(e, n, o, r), e.options = t.options;
9359
9359
  });
9360
9360
  function H(e, t) {
9361
9361
  return new Ro({
@@ -9378,7 +9378,7 @@ function w_(e, t) {
9378
9378
  const pc = /* @__PURE__ */ x("ZodDiscriminatedUnion", (e, t) => {
9379
9379
  Ro.init(e, t), vv.init(e, t);
9380
9380
  });
9381
- function Ha(e, t, n) {
9381
+ function Ga(e, t, n) {
9382
9382
  return new pc({
9383
9383
  type: "union",
9384
9384
  options: t,
@@ -9452,7 +9452,7 @@ function x_(e, t, n) {
9452
9452
  });
9453
9453
  }
9454
9454
  const yc = /* @__PURE__ */ x("ZodSet", (e, t) => {
9455
- wv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => nb(e, n), e.min = (...n) => e.check(sn(...n)), e.nonempty = (n) => e.check(sn(1, n)), e.max = (...n) => e.check(So(...n)), e.size = (...n) => e.check(pa(...n));
9455
+ wv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => nb(e, n), e.min = (...n) => e.check(sn(...n)), e.nonempty = (n) => e.check(sn(1, n)), e.max = (...n) => e.check(So(...n)), e.size = (...n) => e.check(fa(...n));
9456
9456
  });
9457
9457
  function I_(e, t) {
9458
9458
  return new yc({
@@ -9524,7 +9524,7 @@ function P(e, t) {
9524
9524
  });
9525
9525
  }
9526
9526
  const _c = /* @__PURE__ */ x("ZodFile", (e, t) => {
9527
- xv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => Yy(e, n, o), e.min = (n, o) => e.check(sn(n, o)), e.max = (n, o) => e.check(So(n, o)), e.mime = (n, o) => e.check(ba(Array.isArray(n) ? n : [n], o));
9527
+ xv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => Yy(e, n, o), e.min = (n, o) => e.check(sn(n, o)), e.max = (n, o) => e.check(So(n, o)), e.mime = (n, o) => e.check(_a(Array.isArray(n) ? n : [n], o));
9528
9528
  });
9529
9529
  function E_(e) {
9530
9530
  return ky(_c, e);
@@ -9532,7 +9532,7 @@ function E_(e) {
9532
9532
  const wc = /* @__PURE__ */ x("ZodTransform", (e, t) => {
9533
9533
  Iv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => tb(e, n), e._zod.parse = (n, o) => {
9534
9534
  if (o.direction === "backward")
9535
- throw new ia(e.constructor.name);
9535
+ throw new aa(e.constructor.name);
9536
9536
  n.addIssue = (i) => {
9537
9537
  if (typeof i == "string")
9538
9538
  n.issues.push(nn(i, n.value, t));
@@ -9545,17 +9545,17 @@ const wc = /* @__PURE__ */ x("ZodTransform", (e, t) => {
9545
9545
  return r instanceof Promise ? r.then((i) => (n.value = i, n)) : (n.value = r, n);
9546
9546
  };
9547
9547
  });
9548
- function Ga(e) {
9548
+ function Ka(e) {
9549
9549
  return new wc({
9550
9550
  type: "transform",
9551
9551
  transform: e
9552
9552
  });
9553
9553
  }
9554
- const Ka = /* @__PURE__ */ x("ZodOptional", (e, t) => {
9554
+ const Ya = /* @__PURE__ */ x("ZodOptional", (e, t) => {
9555
9555
  kv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => vb(e, n, o, r), e.unwrap = () => e._zod.def.innerType;
9556
9556
  });
9557
9557
  function X(e) {
9558
- return new Ka({
9558
+ return new Ya({
9559
9559
  type: "optional",
9560
9560
  innerType: e
9561
9561
  });
@@ -9580,7 +9580,7 @@ function xc(e, t) {
9580
9580
  type: "default",
9581
9581
  innerType: e,
9582
9582
  get defaultValue() {
9583
- return typeof t == "function" ? t() : sa(t);
9583
+ return typeof t == "function" ? t() : la(t);
9584
9584
  }
9585
9585
  });
9586
9586
  }
@@ -9592,15 +9592,15 @@ function kc(e, t) {
9592
9592
  type: "prefault",
9593
9593
  innerType: e,
9594
9594
  get defaultValue() {
9595
- return typeof t == "function" ? t() : sa(t);
9595
+ return typeof t == "function" ? t() : la(t);
9596
9596
  }
9597
9597
  });
9598
9598
  }
9599
- const Ya = /* @__PURE__ */ x("ZodNonOptional", (e, t) => {
9599
+ const Qa = /* @__PURE__ */ x("ZodNonOptional", (e, t) => {
9600
9600
  Nv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => cb(e, n, o, r), e.unwrap = () => e._zod.def.innerType;
9601
9601
  });
9602
9602
  function Ec(e, t) {
9603
- return new Ya({
9603
+ return new Qa({
9604
9604
  type: "nonoptional",
9605
9605
  innerType: e,
9606
9606
  ...N(t)
@@ -9631,22 +9631,22 @@ const Pc = /* @__PURE__ */ x("ZodNaN", (e, t) => {
9631
9631
  function N_(e) {
9632
9632
  return xy(Pc, e);
9633
9633
  }
9634
- const Qa = /* @__PURE__ */ x("ZodPipe", (e, t) => {
9634
+ const Xa = /* @__PURE__ */ x("ZodPipe", (e, t) => {
9635
9635
  Rv.init(e, t), te.init(e, t), e._zod.processJSONSchema = (n, o, r) => mb(e, n, o, r), e.in = t.in, e.out = t.out;
9636
9636
  });
9637
9637
  function Wn(e, t) {
9638
- return new Qa({
9638
+ return new Xa({
9639
9639
  type: "pipe",
9640
9640
  in: e,
9641
9641
  out: t
9642
9642
  // ...util.normalizeParams(params),
9643
9643
  });
9644
9644
  }
9645
- const Xa = /* @__PURE__ */ x("ZodCodec", (e, t) => {
9646
- Qa.init(e, t), xu.init(e, t);
9645
+ const es = /* @__PURE__ */ x("ZodCodec", (e, t) => {
9646
+ Xa.init(e, t), xu.init(e, t);
9647
9647
  });
9648
9648
  function P_(e, t, n) {
9649
- return new Xa({
9649
+ return new es({
9650
9650
  type: "pipe",
9651
9651
  in: e,
9652
9652
  out: t,
@@ -9734,7 +9734,7 @@ function Ft(e, t = {
9734
9734
  return n._zod.bag.Class = e, n;
9735
9735
  }
9736
9736
  const M_ = (...e) => Ay({
9737
- Codec: Xa,
9737
+ Codec: es,
9738
9738
  Boolean: No,
9739
9739
  String: Eo
9740
9740
  }, ...e);
@@ -9743,55 +9743,55 @@ function D_(e) {
9743
9743
  return t;
9744
9744
  }
9745
9745
  function U_(e, t) {
9746
- return Wn(Ga(e), t);
9746
+ return Wn(Ka(e), t);
9747
9747
  }
9748
9748
  const FT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9749
9749
  __proto__: null,
9750
9750
  ZodAny: ac,
9751
9751
  ZodArray: cc,
9752
- ZodBase64: La,
9753
- ZodBase64URL: Fa,
9752
+ ZodBase64: Za,
9753
+ ZodBase64URL: qa,
9754
9754
  ZodBigInt: Po,
9755
- ZodBigIntFormat: Ba,
9755
+ ZodBigIntFormat: Ja,
9756
9756
  ZodBoolean: No,
9757
- ZodCIDRv4: Da,
9758
- ZodCIDRv6: Ua,
9759
- ZodCUID: Pa,
9760
- ZodCUID2: Ca,
9757
+ ZodCIDRv4: Ua,
9758
+ ZodCIDRv6: La,
9759
+ ZodCUID: Ca,
9760
+ ZodCUID2: Aa,
9761
9761
  ZodCatch: Oc,
9762
- ZodCodec: Xa,
9762
+ ZodCodec: es,
9763
9763
  ZodCustom: Mo,
9764
9764
  ZodCustomStringFormat: vn,
9765
- ZodDate: Wa,
9765
+ ZodDate: Ha,
9766
9766
  ZodDefault: Sc,
9767
9767
  ZodDiscriminatedUnion: pc,
9768
- ZodE164: qa,
9769
- ZodEmail: Ta,
9770
- ZodEmoji: Oa,
9768
+ ZodE164: Va,
9769
+ ZodEmail: Oa,
9770
+ ZodEmoji: Na,
9771
9771
  ZodEnum: dn,
9772
9772
  ZodFile: _c,
9773
9773
  ZodFunction: Mc,
9774
9774
  ZodGUID: Bn,
9775
- ZodIPv4: ja,
9776
- ZodIPv6: Ma,
9775
+ ZodIPv4: Ma,
9776
+ ZodIPv6: Da,
9777
9777
  ZodIntersection: fc,
9778
- ZodJWT: Va,
9779
- ZodKSUID: za,
9778
+ ZodJWT: Ba,
9779
+ ZodKSUID: ja,
9780
9780
  ZodLazy: zc,
9781
9781
  ZodLiteral: bc,
9782
9782
  ZodMAC: rc,
9783
9783
  ZodMap: vc,
9784
9784
  ZodNaN: Pc,
9785
- ZodNanoID: Na,
9785
+ ZodNanoID: Pa,
9786
9786
  ZodNever: lc,
9787
- ZodNonOptional: Ya,
9787
+ ZodNonOptional: Qa,
9788
9788
  ZodNull: ic,
9789
9789
  ZodNullable: $c,
9790
9790
  ZodNumber: Oo,
9791
9791
  ZodNumberFormat: Mr,
9792
9792
  ZodObject: Ao,
9793
- ZodOptional: Ka,
9794
- ZodPipe: Qa,
9793
+ ZodOptional: Ya,
9794
+ ZodPipe: Xa,
9795
9795
  ZodPrefault: Ic,
9796
9796
  ZodPromise: jc,
9797
9797
  ZodReadonly: Cc,
@@ -9805,21 +9805,21 @@ const FT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9805
9805
  ZodTransform: wc,
9806
9806
  ZodTuple: hc,
9807
9807
  ZodType: te,
9808
- ZodULID: Aa,
9808
+ ZodULID: Ra,
9809
9809
  ZodURL: To,
9810
9810
  ZodUUID: Dt,
9811
9811
  ZodUndefined: oc,
9812
9812
  ZodUnion: Ro,
9813
9813
  ZodUnknown: sc,
9814
9814
  ZodVoid: uc,
9815
- ZodXID: Ra,
9815
+ ZodXID: za,
9816
9816
  ZodXor: dc,
9817
- _ZodString: Ea,
9817
+ _ZodString: Ta,
9818
9818
  _default: xc,
9819
9819
  _function: Oi,
9820
9820
  any: Ce,
9821
9821
  array: z,
9822
- base64: Za,
9822
+ base64: Fa,
9823
9823
  base64url: r_,
9824
9824
  bigint: f_,
9825
9825
  boolean: de,
@@ -9833,7 +9833,7 @@ const FT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9833
9833
  custom: Do,
9834
9834
  date: b_,
9835
9835
  describe: z_,
9836
- discriminatedUnion: Ha,
9836
+ discriminatedUnion: Ga,
9837
9837
  e164: n_,
9838
9838
  email: jb,
9839
9839
  emoji: Vb,
@@ -9868,7 +9868,7 @@ const FT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9868
9868
  nan: N_,
9869
9869
  nanoid: Bb,
9870
9870
  nativeEnum: k_,
9871
- never: Ja,
9871
+ never: Wa,
9872
9872
  nonoptional: Ec,
9873
9873
  null: Co,
9874
9874
  nullable: Jn,
@@ -9893,7 +9893,7 @@ const FT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9893
9893
  superRefine: Uc,
9894
9894
  symbol: g_,
9895
9895
  templateLiteral: C_,
9896
- transform: Ga,
9896
+ transform: Ka,
9897
9897
  tuple: gc,
9898
9898
  uint32: p_,
9899
9899
  uint64: h_,
@@ -9930,8 +9930,8 @@ function qT(e) {
9930
9930
  function VT() {
9931
9931
  return Ue().customError;
9932
9932
  }
9933
- var vl;
9934
- vl || (vl = {});
9933
+ var yl;
9934
+ yl || (yl = {});
9935
9935
  const M = {
9936
9936
  ...FT,
9937
9937
  ...LT,
@@ -10144,7 +10144,7 @@ function YT(e) {
10144
10144
  return py(Po, e);
10145
10145
  }
10146
10146
  function QT(e) {
10147
- return Sy(Wa, e);
10147
+ return Sy(Ha, e);
10148
10148
  }
10149
10149
  const XT = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10150
10150
  __proto__: null,
@@ -10164,58 +10164,58 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10164
10164
  TimePrecision: Yv,
10165
10165
  ZodAny: ac,
10166
10166
  ZodArray: cc,
10167
- ZodBase64: La,
10168
- ZodBase64URL: Fa,
10167
+ ZodBase64: Za,
10168
+ ZodBase64URL: qa,
10169
10169
  ZodBigInt: Po,
10170
- ZodBigIntFormat: Ba,
10170
+ ZodBigIntFormat: Ja,
10171
10171
  ZodBoolean: No,
10172
- ZodCIDRv4: Da,
10173
- ZodCIDRv6: Ua,
10174
- ZodCUID: Pa,
10175
- ZodCUID2: Ca,
10172
+ ZodCIDRv4: Ua,
10173
+ ZodCIDRv6: La,
10174
+ ZodCUID: Ca,
10175
+ ZodCUID2: Aa,
10176
10176
  ZodCatch: Oc,
10177
- ZodCodec: Xa,
10177
+ ZodCodec: es,
10178
10178
  ZodCustom: Mo,
10179
10179
  ZodCustomStringFormat: vn,
10180
- ZodDate: Wa,
10180
+ ZodDate: Ha,
10181
10181
  ZodDefault: Sc,
10182
10182
  ZodDiscriminatedUnion: pc,
10183
- ZodE164: qa,
10184
- ZodEmail: Ta,
10185
- ZodEmoji: Oa,
10183
+ ZodE164: Va,
10184
+ ZodEmail: Oa,
10185
+ ZodEmoji: Na,
10186
10186
  ZodEnum: dn,
10187
10187
  ZodError: ZT,
10188
10188
  ZodFile: _c,
10189
10189
  get ZodFirstPartyTypeKind() {
10190
- return vl;
10190
+ return yl;
10191
10191
  },
10192
10192
  ZodFunction: Mc,
10193
10193
  ZodGUID: Bn,
10194
- ZodIPv4: ja,
10195
- ZodIPv6: Ma,
10194
+ ZodIPv4: Ma,
10195
+ ZodIPv6: Da,
10196
10196
  ZodISODate: Xu,
10197
10197
  ZodISODateTime: Qu,
10198
10198
  ZodISODuration: tc,
10199
10199
  ZodISOTime: ec,
10200
10200
  ZodIntersection: fc,
10201
10201
  ZodIssueCode: L_,
10202
- ZodJWT: Va,
10203
- ZodKSUID: za,
10202
+ ZodJWT: Ba,
10203
+ ZodKSUID: ja,
10204
10204
  ZodLazy: zc,
10205
10205
  ZodLiteral: bc,
10206
10206
  ZodMAC: rc,
10207
10207
  ZodMap: vc,
10208
10208
  ZodNaN: Pc,
10209
- ZodNanoID: Na,
10209
+ ZodNanoID: Pa,
10210
10210
  ZodNever: lc,
10211
- ZodNonOptional: Ya,
10211
+ ZodNonOptional: Qa,
10212
10212
  ZodNull: ic,
10213
10213
  ZodNullable: $c,
10214
10214
  ZodNumber: Oo,
10215
10215
  ZodNumberFormat: Mr,
10216
10216
  ZodObject: Ao,
10217
- ZodOptional: Ka,
10218
- ZodPipe: Qa,
10217
+ ZodOptional: Ya,
10218
+ ZodPipe: Xa,
10219
10219
  ZodPrefault: Ic,
10220
10220
  ZodPromise: jc,
10221
10221
  ZodReadonly: Cc,
@@ -10230,21 +10230,21 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10230
10230
  ZodTransform: wc,
10231
10231
  ZodTuple: hc,
10232
10232
  ZodType: te,
10233
- ZodULID: Aa,
10233
+ ZodULID: Ra,
10234
10234
  ZodURL: To,
10235
10235
  ZodUUID: Dt,
10236
10236
  ZodUndefined: oc,
10237
10237
  ZodUnion: Ro,
10238
10238
  ZodUnknown: sc,
10239
10239
  ZodVoid: uc,
10240
- ZodXID: Ra,
10240
+ ZodXID: za,
10241
10241
  ZodXor: dc,
10242
- _ZodString: Ea,
10242
+ _ZodString: Ta,
10243
10243
  _default: xc,
10244
10244
  _function: Oi,
10245
10245
  any: Ce,
10246
10246
  array: z,
10247
- base64: Za,
10247
+ base64: Fa,
10248
10248
  base64url: r_,
10249
10249
  bigint: f_,
10250
10250
  boolean: de,
@@ -10264,13 +10264,13 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10264
10264
  decode: Ob,
10265
10265
  decodeAsync: Pb,
10266
10266
  describe: z_,
10267
- discriminatedUnion: Ha,
10267
+ discriminatedUnion: Ga,
10268
10268
  e164: n_,
10269
10269
  email: jb,
10270
10270
  emoji: Vb,
10271
10271
  encode: Tb,
10272
10272
  encodeAsync: Nb,
10273
- endsWith: ya,
10273
+ endsWith: ba,
10274
10274
  enum: _r,
10275
10275
  file: E_,
10276
10276
  flattenError: iu,
@@ -10288,7 +10288,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10288
10288
  hex: s_,
10289
10289
  hostname: a_,
10290
10290
  httpUrl: qb,
10291
- includes: ga,
10291
+ includes: va,
10292
10292
  instanceof: Ft,
10293
10293
  int: Ti,
10294
10294
  int32: d_,
@@ -10307,7 +10307,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10307
10307
  locales: Vv,
10308
10308
  looseObject: sr,
10309
10309
  looseRecord: S_,
10310
- lowercase: ma,
10310
+ lowercase: ha,
10311
10311
  lt: mr,
10312
10312
  lte: ut,
10313
10313
  mac: Qb,
@@ -10315,7 +10315,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10315
10315
  maxLength: xo,
10316
10316
  maxSize: So,
10317
10317
  meta: j_,
10318
- mime: ba,
10318
+ mime: _a,
10319
10319
  minLength: Tr,
10320
10320
  minSize: sn,
10321
10321
  multipleOf: an,
@@ -10323,11 +10323,11 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10323
10323
  nanoid: Bb,
10324
10324
  nativeEnum: k_,
10325
10325
  negative: Wu,
10326
- never: Ja,
10326
+ never: Wa,
10327
10327
  nonnegative: Gu,
10328
10328
  nonoptional: Ec,
10329
10329
  nonpositive: Hu,
10330
- normalize: _a,
10330
+ normalize: wa,
10331
10331
  null: Co,
10332
10332
  nullable: Jn,
10333
10333
  nullish: T_,
@@ -10348,7 +10348,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10348
10348
  readonly: Ac,
10349
10349
  record: tt,
10350
10350
  refine: Dc,
10351
- regex: fa,
10351
+ regex: ma,
10352
10352
  regexes: gu,
10353
10353
  registry: Iu,
10354
10354
  safeDecode: Ab,
@@ -10356,12 +10356,12 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10356
10356
  safeEncode: Cb,
10357
10357
  safeEncodeAsync: Rb,
10358
10358
  safeParse: Eb,
10359
- safeParseAsync: ka,
10359
+ safeParseAsync: Ea,
10360
10360
  set: I_,
10361
10361
  setErrorMap: qT,
10362
- size: pa,
10363
- slugify: xa,
10364
- startsWith: va,
10362
+ size: fa,
10363
+ slugify: Ia,
10364
+ startsWith: ya,
10365
10365
  strictObject: ye,
10366
10366
  string: w,
10367
10367
  stringFormat: i_,
@@ -10370,12 +10370,12 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10370
10370
  superRefine: Uc,
10371
10371
  symbol: g_,
10372
10372
  templateLiteral: C_,
10373
- toJSONSchema: Ia,
10374
- toLowerCase: $a,
10375
- toUpperCase: Sa,
10376
- transform: Ga,
10373
+ toJSONSchema: ka,
10374
+ toLowerCase: Sa,
10375
+ toUpperCase: xa,
10376
+ transform: Ka,
10377
10377
  treeifyError: wh,
10378
- trim: wa,
10378
+ trim: $a,
10379
10379
  tuple: gc,
10380
10380
  uint32: p_,
10381
10381
  uint64: h_,
@@ -10383,7 +10383,7 @@ const Ni = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10383
10383
  undefined: v_,
10384
10384
  union: H,
10385
10385
  unknown: $e,
10386
- uppercase: ha,
10386
+ uppercase: ga,
10387
10387
  url: Fb,
10388
10388
  util: bh,
10389
10389
  uuid: Db,
@@ -10566,7 +10566,7 @@ var eO = ({
10566
10566
  if (e == null)
10567
10567
  return r;
10568
10568
  if (n.includes(o))
10569
- throw new oa({
10569
+ throw new ia({
10570
10570
  argument: "separator",
10571
10571
  message: `The separator "${o}" must not be part of the alphabet "${n}".`
10572
10572
  });
@@ -10672,11 +10672,11 @@ var dO = "AI_MCPClientError", V_ = `vercel.ai.error.${dO}`, pO = Symbol.for(V_),
10672
10672
  ], mO = sr({
10673
10673
  name: w(),
10674
10674
  version: w()
10675
- }), es = sr({
10675
+ }), ts = sr({
10676
10676
  _meta: X(E({}).loose())
10677
- }), Yt = es, B_ = E({
10677
+ }), Yt = ts, B_ = E({
10678
10678
  method: w(),
10679
- params: X(es)
10679
+ params: X(ts)
10680
10680
  }), J_ = E({
10681
10681
  applyDefaults: X(de())
10682
10682
  }).loose(), hO = sr({
@@ -10724,7 +10724,7 @@ var gO = Yt.extend({
10724
10724
  text: w()
10725
10725
  }).loose(), H_ = E({
10726
10726
  type: P("image"),
10727
- data: Za(),
10727
+ data: Fa(),
10728
10728
  mimeType: w()
10729
10729
  }).loose(), bO = E({
10730
10730
  uri: w(),
@@ -10755,7 +10755,7 @@ var gO = Yt.extend({
10755
10755
  }).loose(), K_ = G_.extend({
10756
10756
  text: w()
10757
10757
  }), Y_ = G_.extend({
10758
- blob: Za()
10758
+ blob: Fa()
10759
10759
  }), Q_ = E({
10760
10760
  type: P("resource"),
10761
10761
  resource: H([K_, Y_])
@@ -10801,7 +10801,7 @@ var gO = Yt.extend({
10801
10801
  }).loose(), OO = Yt.extend({
10802
10802
  description: X(w()),
10803
10803
  messages: z(TO)
10804
- }), NO = es.extend({
10804
+ }), NO = ts.extend({
10805
10805
  message: w(),
10806
10806
  requestedSchema: $e()
10807
10807
  }), wp = B_.extend({
@@ -10814,15 +10814,15 @@ var gO = Yt.extend({
10814
10814
  P("cancel")
10815
10815
  ]),
10816
10816
  content: X(tt(w(), $e()))
10817
- }), ts = "2.0", CO = E({
10818
- jsonrpc: P(ts),
10817
+ }), rs = "2.0", CO = E({
10818
+ jsonrpc: P(rs),
10819
10819
  id: H([w(), F().int()])
10820
10820
  }).merge(B_).strict(), AO = E({
10821
- jsonrpc: P(ts),
10821
+ jsonrpc: P(rs),
10822
10822
  id: H([w(), F().int()]),
10823
10823
  result: Yt
10824
10824
  }).strict(), RO = E({
10825
- jsonrpc: P(ts),
10825
+ jsonrpc: P(rs),
10826
10826
  id: H([w(), F().int()]),
10827
10827
  error: E({
10828
10828
  code: F().int(),
@@ -10830,11 +10830,11 @@ var gO = Yt.extend({
10830
10830
  data: X($e())
10831
10831
  })
10832
10832
  }).strict(), zO = E({
10833
- jsonrpc: P(ts)
10833
+ jsonrpc: P(rs)
10834
10834
  }).merge(
10835
10835
  E({
10836
10836
  method: w(),
10837
- params: X(es)
10837
+ params: X(ts)
10838
10838
  })
10839
10839
  ).strict(), zn = H([
10840
10840
  CO,
@@ -11306,12 +11306,12 @@ async function aN(e, {
11306
11306
  async function Mi(e, t) {
11307
11307
  var n, o;
11308
11308
  try {
11309
- return await Ps(e, t);
11309
+ return await Cs(e, t);
11310
11310
  } catch (r) {
11311
11311
  if (r instanceof Ci || r instanceof Ri)
11312
- return await ((n = e.invalidateCredentials) == null ? void 0 : n.call(e, "all")), await Ps(e, t);
11312
+ return await ((n = e.invalidateCredentials) == null ? void 0 : n.call(e, "all")), await Cs(e, t);
11313
11313
  if (r instanceof Ai)
11314
- return await ((o = e.invalidateCredentials) == null ? void 0 : o.call(e, "tokens")), await Ps(e, t);
11314
+ return await ((o = e.invalidateCredentials) == null ? void 0 : o.call(e, "tokens")), await Cs(e, t);
11315
11315
  throw r;
11316
11316
  }
11317
11317
  }
@@ -11333,7 +11333,7 @@ async function sN(e, t, n) {
11333
11333
  return new URL(n.resource);
11334
11334
  }
11335
11335
  }
11336
- async function Ps(e, {
11336
+ async function Cs(e, {
11337
11337
  serverUrl: t,
11338
11338
  authorizationCode: n,
11339
11339
  scope: o,
@@ -12326,7 +12326,7 @@ function We() {
12326
12326
  function yN(e, t) {
12327
12327
  return typeof e == "function" ? e(t) : e;
12328
12328
  }
12329
- function yl(e) {
12329
+ function bl(e) {
12330
12330
  return typeof e == "number" && e >= 0 && e !== 1 / 0;
12331
12331
  }
12332
12332
  function iw(e, t) {
@@ -12380,18 +12380,18 @@ function Vc(e, t) {
12380
12380
  function Gn(e) {
12381
12381
  return JSON.stringify(
12382
12382
  e,
12383
- (t, n) => wl(n) ? Object.keys(n).sort().reduce((o, r) => (o[r] = n[r], o), {}) : n
12383
+ (t, n) => $l(n) ? Object.keys(n).sort().reduce((o, r) => (o[r] = n[r], o), {}) : n
12384
12384
  );
12385
12385
  }
12386
12386
  function Kn(e, t) {
12387
12387
  return e === t ? !0 : typeof e != typeof t ? !1 : e && t && typeof e == "object" && typeof t == "object" ? Object.keys(t).every((n) => Kn(e[n], t[n])) : !1;
12388
12388
  }
12389
12389
  var bN = Object.prototype.hasOwnProperty;
12390
- function bl(e, t) {
12390
+ function _l(e, t) {
12391
12391
  if (e === t)
12392
12392
  return e;
12393
12393
  const n = Ep(e) && Ep(t);
12394
- if (!n && !(wl(e) && wl(t))) return t;
12394
+ if (!n && !($l(e) && $l(t))) return t;
12395
12395
  const r = (n ? e : Object.keys(e)).length, i = n ? t : Object.keys(t), a = i.length, s = n ? new Array(a) : {};
12396
12396
  let u = 0;
12397
12397
  for (let l = 0; l < a; l++) {
@@ -12404,12 +12404,12 @@ function bl(e, t) {
12404
12404
  s[c] = f;
12405
12405
  continue;
12406
12406
  }
12407
- const p = bl(d, f);
12407
+ const p = _l(d, f);
12408
12408
  s[c] = p, p === d && u++;
12409
12409
  }
12410
12410
  return r === a && u === r ? e : s;
12411
12411
  }
12412
- function _l(e, t) {
12412
+ function wl(e, t) {
12413
12413
  if (!t || Object.keys(e).length !== Object.keys(t).length)
12414
12414
  return !1;
12415
12415
  for (const n in e)
@@ -12420,7 +12420,7 @@ function _l(e, t) {
12420
12420
  function Ep(e) {
12421
12421
  return Array.isArray(e) && e.length === Object.keys(e).length;
12422
12422
  }
12423
- function wl(e) {
12423
+ function $l(e) {
12424
12424
  if (!Tp(e))
12425
12425
  return !1;
12426
12426
  const t = e.constructor;
@@ -12437,19 +12437,19 @@ function _N(e) {
12437
12437
  xr.setTimeout(t, e);
12438
12438
  });
12439
12439
  }
12440
- function $l(e, t, n) {
12440
+ function Sl(e, t, n) {
12441
12441
  if (typeof n.structuralSharing == "function")
12442
12442
  return n.structuralSharing(e, t);
12443
12443
  if (n.structuralSharing !== !1) {
12444
12444
  if (process.env.NODE_ENV !== "production")
12445
12445
  try {
12446
- return bl(e, t);
12446
+ return _l(e, t);
12447
12447
  } catch (o) {
12448
12448
  throw console.error(
12449
12449
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${o}`
12450
12450
  ), o;
12451
12451
  }
12452
- return bl(e, t);
12452
+ return _l(e, t);
12453
12453
  }
12454
12454
  return t;
12455
12455
  }
@@ -12508,7 +12508,7 @@ var xN = class extends Lo {
12508
12508
  return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
12509
12509
  }
12510
12510
  }, Bc = new xN();
12511
- function Sl() {
12511
+ function xl() {
12512
12512
  let e, t;
12513
12513
  const n = new Promise((r, i) => {
12514
12514
  e = r, t = i;
@@ -12628,16 +12628,16 @@ function TN(e) {
12628
12628
  function sw(e) {
12629
12629
  return (e ?? "online") === "online" ? Ui.isOnline() : !0;
12630
12630
  }
12631
- var xl = class extends Error {
12631
+ var Il = class extends Error {
12632
12632
  constructor(e) {
12633
12633
  super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
12634
12634
  }
12635
12635
  };
12636
12636
  function lw(e) {
12637
12637
  let t = !1, n = 0, o;
12638
- const r = Sl(), i = () => r.status !== "pending", a = (m) => {
12638
+ const r = xl(), i = () => r.status !== "pending", a = (m) => {
12639
12639
  if (!i()) {
12640
- const b = new xl(m);
12640
+ const b = new Il(m);
12641
12641
  f(b), e.onCancel?.(b);
12642
12642
  }
12643
12643
  }, s = () => {
@@ -12694,7 +12694,7 @@ var uw = class {
12694
12694
  this.clearGcTimeout();
12695
12695
  }
12696
12696
  scheduleGc() {
12697
- this.clearGcTimeout(), yl(this.gcTime) && (this.#e = xr.setTimeout(() => {
12697
+ this.clearGcTimeout(), bl(this.gcTime) && (this.#e = xr.setTimeout(() => {
12698
12698
  this.optionalRemove();
12699
12699
  }, this.gcTime));
12700
12700
  }
@@ -12736,7 +12736,7 @@ var uw = class {
12736
12736
  !this.observers.length && this.state.fetchStatus === "idle" && this.#r.remove(this);
12737
12737
  }
12738
12738
  setData(e, t) {
12739
- const n = $l(this.state.data, e, this.options);
12739
+ const n = Sl(this.state.data, e, this.options);
12740
12740
  return this.#i({
12741
12741
  data: n,
12742
12742
  type: "success",
@@ -12847,7 +12847,7 @@ var uw = class {
12847
12847
  initialPromise: t?.initialPromise,
12848
12848
  fn: a.fetchFn,
12849
12849
  onCancel: (s) => {
12850
- s instanceof xl && s.revert && this.setState({
12850
+ s instanceof Il && s.revert && this.setState({
12851
12851
  ...this.#t,
12852
12852
  fetchStatus: "idle"
12853
12853
  }), n.abort();
@@ -12878,7 +12878,7 @@ var uw = class {
12878
12878
  this
12879
12879
  ), s;
12880
12880
  } catch (s) {
12881
- if (s instanceof xl) {
12881
+ if (s instanceof Il) {
12882
12882
  if (s.silent)
12883
12883
  return this.#n.promise;
12884
12884
  if (s.revert) {
@@ -13009,7 +13009,7 @@ function Np(e) {
13009
13009
  }
13010
13010
  var NN = class extends Lo {
13011
13011
  constructor(e, t) {
13012
- super(), this.options = t, this.#e = e, this.#i = null, this.#a = Sl(), this.bindMethods(), this.setOptions(t);
13012
+ super(), this.options = t, this.#e = e, this.#i = null, this.#a = xl(), this.bindMethods(), this.setOptions(t);
13013
13013
  }
13014
13014
  #e;
13015
13015
  #t = void 0;
@@ -13038,14 +13038,14 @@ var NN = class extends Lo {
13038
13038
  this.hasListeners() || this.destroy();
13039
13039
  }
13040
13040
  shouldFetchOnReconnect() {
13041
- return Il(
13041
+ return kl(
13042
13042
  this.#t,
13043
13043
  this.options,
13044
13044
  this.options.refetchOnReconnect
13045
13045
  );
13046
13046
  }
13047
13047
  shouldFetchOnWindowFocus() {
13048
- return Il(
13048
+ return kl(
13049
13049
  this.#t,
13050
13050
  this.options,
13051
13051
  this.options.refetchOnWindowFocus
@@ -13060,7 +13060,7 @@ var NN = class extends Lo {
13060
13060
  throw new Error(
13061
13061
  "Expected enabled to be a boolean or a callback that returns a boolean"
13062
13062
  );
13063
- this.#$(), this.#t.setOptions(this.options), t._defaulted && !_l(this.options, t) && this.#e.getQueryCache().notify({
13063
+ this.#$(), this.#t.setOptions(this.options), t._defaulted && !wl(this.options, t) && this.#e.getQueryCache().notify({
13064
13064
  type: "observerOptionsUpdated",
13065
13065
  query: this.#t,
13066
13066
  observer: this
@@ -13126,7 +13126,7 @@ var NN = class extends Lo {
13126
13126
  this.options.staleTime,
13127
13127
  this.#t
13128
13128
  );
13129
- if (Or || this.#o.isStale || !yl(e))
13129
+ if (Or || this.#o.isStale || !bl(e))
13130
13130
  return;
13131
13131
  const n = iw(this.#o.dataUpdatedAt, e) + 1;
13132
13132
  this.#u = xr.setTimeout(() => {
@@ -13137,7 +13137,7 @@ var NN = class extends Lo {
13137
13137
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
13138
13138
  }
13139
13139
  #y(e) {
13140
- this.#w(), this.#l = e, !(Or || lt(this.options.enabled, this.#t) === !1 || !yl(this.#l) || this.#l === 0) && (this.#c = xr.setInterval(() => {
13140
+ this.#w(), this.#l = e, !(Or || lt(this.options.enabled, this.#t) === !1 || !bl(this.#l) || this.#l === 0) && (this.#c = xr.setInterval(() => {
13141
13141
  (this.options.refetchIntervalInBackground || Bc.isFocused()) && this.#d();
13142
13142
  }, this.#l));
13143
13143
  }
@@ -13168,7 +13168,7 @@ var NN = class extends Lo {
13168
13168
  r?.isPlaceholderData && t.placeholderData === a?.placeholderData ? (T = r.data, b = !0) : T = typeof t.placeholderData == "function" ? t.placeholderData(
13169
13169
  this.#f?.state.data,
13170
13170
  this.#f
13171
- ) : t.placeholderData, T !== void 0 && (m = "success", f = $l(
13171
+ ) : t.placeholderData, T !== void 0 && (m = "success", f = Sl(
13172
13172
  r?.data,
13173
13173
  T,
13174
13174
  t
@@ -13179,7 +13179,7 @@ var NN = class extends Lo {
13179
13179
  f = this.#p;
13180
13180
  else
13181
13181
  try {
13182
- this.#h = t.select, f = t.select(f), f = $l(r?.data, f, t), this.#p = f, this.#i = null;
13182
+ this.#h = t.select, f = t.select(f), f = Sl(r?.data, f, t), this.#p = f, this.#i = null;
13183
13183
  } catch (T) {
13184
13184
  this.#i = T;
13185
13185
  }
@@ -13216,7 +13216,7 @@ var NN = class extends Lo {
13216
13216
  const T = (ee) => {
13217
13217
  I.status === "error" ? ee.reject(I.error) : I.data !== void 0 && ee.resolve(I.data);
13218
13218
  }, j = () => {
13219
- const ee = this.#a = I.promise = Sl();
13219
+ const ee = this.#a = I.promise = xl();
13220
13220
  T(ee);
13221
13221
  }, Z = this.#a;
13222
13222
  switch (Z.status) {
@@ -13235,7 +13235,7 @@ var NN = class extends Lo {
13235
13235
  }
13236
13236
  updateResult() {
13237
13237
  const e = this.#o, t = this.createResult(this.#t, this.options);
13238
- if (this.#n = this.#t.state, this.#s = this.options, this.#n.data !== void 0 && (this.#f = this.#t), _l(t, e))
13238
+ if (this.#n = this.#t.state, this.#s = this.options, this.#n.data !== void 0 && (this.#f = this.#t), wl(t, e))
13239
13239
  return;
13240
13240
  this.#o = t;
13241
13241
  const n = () => {
@@ -13279,9 +13279,9 @@ function PN(e, t) {
13279
13279
  return lt(t.enabled, e) !== !1 && e.state.data === void 0 && !(e.state.status === "error" && t.retryOnMount === !1);
13280
13280
  }
13281
13281
  function Pp(e, t) {
13282
- return PN(e, t) || e.state.data !== void 0 && Il(e, t, t.refetchOnMount);
13282
+ return PN(e, t) || e.state.data !== void 0 && kl(e, t, t.refetchOnMount);
13283
13283
  }
13284
- function Il(e, t, n) {
13284
+ function kl(e, t, n) {
13285
13285
  if (lt(t.enabled, e) !== !1 && ur(t.staleTime, e) !== "static") {
13286
13286
  const o = typeof n == "function" ? n(e) : n;
13287
13287
  return o === "always" || o !== !1 && Jc(e, t);
@@ -13295,7 +13295,7 @@ function Jc(e, t) {
13295
13295
  return lt(t.enabled, e) !== !1 && e.isStaleByTime(ur(t.staleTime, e));
13296
13296
  }
13297
13297
  function CN(e, t) {
13298
- return !_l(e.getCurrentResult(), t);
13298
+ return !wl(e.getCurrentResult(), t);
13299
13299
  }
13300
13300
  function Ap(e) {
13301
13301
  return {
@@ -14243,7 +14243,7 @@ const yP = [
14243
14243
  ["path", { d: "m4.9 19.1 2.9-2.9", key: "bwix9q" }],
14244
14244
  ["path", { d: "M2 12h4", key: "j09sii" }],
14245
14245
  ["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
14246
- ], kl = Ee("loader", yP);
14246
+ ], Fi = Ee("loader", yP);
14247
14247
  const bP = [
14248
14248
  ["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
14249
14249
  ["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
@@ -14323,7 +14323,7 @@ var Fo = ({
14323
14323
  if (e == null)
14324
14324
  return r;
14325
14325
  if (n.includes(o))
14326
- throw new oa({
14326
+ throw new ia({
14327
14327
  argument: "separator",
14328
14328
  message: `The separator "${o}" must not be part of the alphabet "${n}".`
14329
14329
  });
@@ -14391,12 +14391,12 @@ function qP(e) {
14391
14391
  Error.stackTraceLimit = t;
14392
14392
  }
14393
14393
  }
14394
- var Fi = Symbol.for("vercel.ai.validator");
14394
+ var qi = Symbol.for("vercel.ai.validator");
14395
14395
  function VP(e) {
14396
- return { [Fi]: !0, validate: e };
14396
+ return { [qi]: !0, validate: e };
14397
14397
  }
14398
14398
  function BP(e) {
14399
- return typeof e == "object" && e !== null && Fi in e && e[Fi] === !0 && "validate" in e;
14399
+ return typeof e == "object" && e !== null && qi in e && e[qi] === !0 && "validate" in e;
14400
14400
  }
14401
14401
  function JP(e) {
14402
14402
  let t;
@@ -14448,7 +14448,7 @@ async function Hc({
14448
14448
  };
14449
14449
  }
14450
14450
  }
14451
- async function qi({
14451
+ async function Vi({
14452
14452
  text: e,
14453
14453
  schema: t
14454
14454
  }) {
@@ -14470,7 +14470,7 @@ function GP({
14470
14470
  return e.pipeThrough(new TextDecoderStream()).pipeThrough(new qn()).pipeThrough(
14471
14471
  new TransformStream({
14472
14472
  async transform({ data: n }, o) {
14473
- n !== "[DONE]" && o.enqueue(await qi({ text: n, schema: t }));
14473
+ n !== "[DONE]" && o.enqueue(await Vi({ text: n, schema: t }));
14474
14474
  }
14475
14475
  })
14476
14476
  );
@@ -14655,7 +14655,7 @@ function u1(e) {
14655
14655
  const: e.value
14656
14656
  };
14657
14657
  }
14658
- var Cs = void 0, vt = {
14658
+ var As = void 0, vt = {
14659
14659
  /**
14660
14660
  * `c` was changed to `[cC]` to replicate /i flag
14661
14661
  */
@@ -14677,10 +14677,10 @@ var Cs = void 0, vt = {
14677
14677
  * Fix in Zod:
14678
14678
  * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
14679
14679
  */
14680
- emoji: () => (Cs === void 0 && (Cs = RegExp(
14680
+ emoji: () => (As === void 0 && (As = RegExp(
14681
14681
  "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
14682
14682
  "u"
14683
- )), Cs),
14683
+ )), As),
14684
14684
  /**
14685
14685
  * Unused
14686
14686
  */
@@ -14744,7 +14744,7 @@ function ww(e, t) {
14744
14744
  case "startsWith":
14745
14745
  qe(
14746
14746
  n,
14747
- RegExp(`^${As(o.value, t)}`),
14747
+ RegExp(`^${Rs(o.value, t)}`),
14748
14748
  o.message,
14749
14749
  t
14750
14750
  );
@@ -14752,7 +14752,7 @@ function ww(e, t) {
14752
14752
  case "endsWith":
14753
14753
  qe(
14754
14754
  n,
14755
- RegExp(`${As(o.value, t)}$`),
14755
+ RegExp(`${Rs(o.value, t)}$`),
14756
14756
  o.message,
14757
14757
  t
14758
14758
  );
@@ -14775,7 +14775,7 @@ function ww(e, t) {
14775
14775
  case "includes": {
14776
14776
  qe(
14777
14777
  n,
14778
- RegExp(As(o.value, t)),
14778
+ RegExp(Rs(o.value, t)),
14779
14779
  o.message,
14780
14780
  t
14781
14781
  );
@@ -14824,7 +14824,7 @@ function ww(e, t) {
14824
14824
  }
14825
14825
  return n;
14826
14826
  }
14827
- function As(e, t) {
14827
+ function Rs(e, t) {
14828
14828
  return t.patternStrategy === "escape" ? d1(e) : e;
14829
14829
  }
14830
14830
  var c1 = new Set(
@@ -15404,7 +15404,7 @@ var C1 = (e, t) => {
15404
15404
  function M1(e, t) {
15405
15405
  var n;
15406
15406
  const o = (n = void 0) != null ? n : !1;
15407
- return rs(
15407
+ return ns(
15408
15408
  // defer json schema creation to avoid unnecessary computation when only validation is needed
15409
15409
  () => j1(e, {
15410
15410
  $refStrategy: o ? "root" : "none"
@@ -15420,10 +15420,10 @@ function M1(e, t) {
15420
15420
  function D1(e, t) {
15421
15421
  var n;
15422
15422
  const o = (n = void 0) != null ? n : !1;
15423
- return rs(
15423
+ return ns(
15424
15424
  // defer json schema creation to avoid unnecessary computation when only validation is needed
15425
15425
  () => hi(
15426
- Ia(e, {
15426
+ ka(e, {
15427
15427
  target: "draft-7",
15428
15428
  io: "input",
15429
15429
  reused: o ? "ref" : "inline"
@@ -15431,7 +15431,7 @@ function D1(e, t) {
15431
15431
  ),
15432
15432
  {
15433
15433
  validate: async (r) => {
15434
- const i = await ka(e, r);
15434
+ const i = await Ea(e, r);
15435
15435
  return i.success ? { success: !0, value: i.data } : { success: !1, error: i.error };
15436
15436
  }
15437
15437
  }
@@ -15444,14 +15444,14 @@ function Sw(e, t) {
15444
15444
  return U1(e) ? D1(e) : M1(e);
15445
15445
  }
15446
15446
  var Tl = Symbol.for("vercel.ai.schema");
15447
- function rs(e, {
15447
+ function ns(e, {
15448
15448
  validate: t
15449
15449
  } = {}) {
15450
15450
  return {
15451
15451
  [Tl]: !0,
15452
15452
  _type: void 0,
15453
15453
  // should never be used directly
15454
- [Fi]: !0,
15454
+ [qi]: !0,
15455
15455
  get jsonSchema() {
15456
15456
  return typeof e == "function" && (e = e()), e;
15457
15457
  },
@@ -15462,7 +15462,7 @@ function L1(e) {
15462
15462
  return typeof e == "object" && e !== null && Tl in e && e[Tl] === !0 && "jsonSchema" in e && "validate" in e;
15463
15463
  }
15464
15464
  function Z1(e) {
15465
- return e == null ? rs({
15465
+ return e == null ? ns({
15466
15466
  properties: {},
15467
15467
  additionalProperties: !1
15468
15468
  }) : L1(e) ? e : typeof e == "function" ? e() : Sw(e);
@@ -15630,7 +15630,7 @@ var Y1 = function(e, t) {
15630
15630
  if (n || arguments.length === 2) for (var o = 0, r = t.length, i; o < r; o++)
15631
15631
  (i || !(o in t)) && (i || (i = Array.prototype.slice.call(t, 0, o)), i[o] = t[o]);
15632
15632
  return e.concat(i || Array.prototype.slice.call(t));
15633
- }, X1 = "diag", Vi = (
15633
+ }, X1 = "diag", Bi = (
15634
15634
  /** @class */
15635
15635
  (function() {
15636
15636
  function e() {
@@ -15749,7 +15749,7 @@ var tC = (
15749
15749
  if (n || arguments.length === 2) for (var o = 0, r = t.length, i; o < r; o++)
15750
15750
  (i || !(o in t)) && (i || (i = Array.prototype.slice.call(t, 0, o)), i[o] = t[o]);
15751
15751
  return e.concat(i || Array.prototype.slice.call(t));
15752
- }, Rs = "context", lC = new iC(), xw = (
15752
+ }, zs = "context", lC = new iC(), xw = (
15753
15753
  /** @class */
15754
15754
  (function() {
15755
15755
  function e() {
@@ -15757,7 +15757,7 @@ var tC = (
15757
15757
  return e.getInstance = function() {
15758
15758
  return this._instance || (this._instance = new e()), this._instance;
15759
15759
  }, e.prototype.setGlobalContextManager = function(t) {
15760
- return Gc(Rs, t, Vi.instance());
15760
+ return Gc(zs, t, Bi.instance());
15761
15761
  }, e.prototype.active = function() {
15762
15762
  return this._getContextManager().active();
15763
15763
  }, e.prototype.with = function(t, n, o) {
@@ -15767,9 +15767,9 @@ var tC = (
15767
15767
  }, e.prototype.bind = function(t, n) {
15768
15768
  return this._getContextManager().bind(t, n);
15769
15769
  }, e.prototype._getContextManager = function() {
15770
- return Xn(Rs) || lC;
15770
+ return Xn(zs) || lC;
15771
15771
  }, e.prototype.disable = function() {
15772
- this._getContextManager().disable(), Kc(Rs, Vi.instance());
15772
+ this._getContextManager().disable(), Kc(zs, Bi.instance());
15773
15773
  }, e;
15774
15774
  })()
15775
15775
  ), Ol;
@@ -15841,13 +15841,13 @@ function Tw(e) {
15841
15841
  function vC(e) {
15842
15842
  return new Ln(e);
15843
15843
  }
15844
- var zs = xw.getInstance(), Ow = (
15844
+ var js = xw.getInstance(), Ow = (
15845
15845
  /** @class */
15846
15846
  (function() {
15847
15847
  function e() {
15848
15848
  }
15849
15849
  return e.prototype.startSpan = function(t, n, o) {
15850
- o === void 0 && (o = zs.active());
15850
+ o === void 0 && (o = js.active());
15851
15851
  var r = !!n?.root;
15852
15852
  if (r)
15853
15853
  return new Ln();
@@ -15857,8 +15857,8 @@ var zs = xw.getInstance(), Ow = (
15857
15857
  var i, a, s;
15858
15858
  if (!(arguments.length < 2)) {
15859
15859
  arguments.length === 2 ? s = n : arguments.length === 3 ? (i = n, s = o) : (i = n, a = o, s = r);
15860
- var u = a ?? zs.active(), l = this.startSpan(t, i, u), c = Xc(u, l);
15861
- return zs.with(c, s, void 0, l);
15860
+ var u = a ?? js.active(), l = this.startSpan(t, i, u), c = Xc(u, l);
15861
+ return js.with(c, s, void 0, l);
15862
15862
  }
15863
15863
  }, e;
15864
15864
  })()
@@ -15911,11 +15911,11 @@ var bC = new Ow(), _C = (
15911
15911
  return (r = this._delegate) === null || r === void 0 ? void 0 : r.getTracer(t, n, o);
15912
15912
  }, e;
15913
15913
  })()
15914
- ), Bi;
15914
+ ), Ji;
15915
15915
  (function(e) {
15916
15916
  e[e.UNSET = 0] = "UNSET", e[e.OK = 1] = "OK", e[e.ERROR = 2] = "ERROR";
15917
- })(Bi || (Bi = {}));
15918
- var js = "trace", SC = (
15917
+ })(Ji || (Ji = {}));
15918
+ var Ms = "trace", SC = (
15919
15919
  /** @class */
15920
15920
  (function() {
15921
15921
  function e() {
@@ -15924,14 +15924,14 @@ var js = "trace", SC = (
15924
15924
  return e.getInstance = function() {
15925
15925
  return this._instance || (this._instance = new e()), this._instance;
15926
15926
  }, e.prototype.setGlobalTracerProvider = function(t) {
15927
- var n = Gc(js, this._proxyTracerProvider, Vi.instance());
15927
+ var n = Gc(Ms, this._proxyTracerProvider, Bi.instance());
15928
15928
  return n && this._proxyTracerProvider.setDelegate(t), n;
15929
15929
  }, e.prototype.getTracerProvider = function() {
15930
- return Xn(js) || this._proxyTracerProvider;
15930
+ return Xn(Ms) || this._proxyTracerProvider;
15931
15931
  }, e.prototype.getTracer = function(t, n) {
15932
15932
  return this.getTracerProvider().getTracer(t, n);
15933
15933
  }, e.prototype.disable = function() {
15934
- Kc(js, Vi.instance()), this._proxyTracerProvider = new Vp();
15934
+ Kc(Ms, Bi.instance()), this._proxyTracerProvider = new Vp();
15935
15935
  }, e;
15936
15936
  })()
15937
15937
  ), xC = SC.getInstance(), IC = Object.defineProperty, kC = (e, t) => {
@@ -16003,7 +16003,7 @@ var Jp = "5.0.116", Aw = H([
16003
16003
  input: $e(),
16004
16004
  providerOptions: ke.optional(),
16005
16005
  providerExecuted: de().optional()
16006
- }), PC = Ha("type", [
16006
+ }), PC = Ga("type", [
16007
16007
  E({
16008
16008
  type: P("text"),
16009
16009
  value: w()
@@ -16525,8 +16525,8 @@ function DC(e) {
16525
16525
  async function Dw(e) {
16526
16526
  if (e === void 0)
16527
16527
  return { value: void 0, state: "undefined-input" };
16528
- let t = await qi({ text: e });
16529
- return t.success ? { value: t.value, state: "successful-parse" } : (t = await qi({ text: DC(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
16528
+ let t = await Vi({ text: e });
16529
+ return t.success ? { value: t.value, state: "successful-parse" } : (t = await Vi({ text: DC(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
16530
16530
  }
16531
16531
  function Kr(e) {
16532
16532
  return e.type.startsWith("tool-");
@@ -16981,7 +16981,7 @@ var BC = () => ({
16981
16981
  }
16982
16982
  },
16983
16983
  async parseOutput({ text: n }, o) {
16984
- const r = await qi({ text: n });
16984
+ const r = await Vi({ text: n });
16985
16985
  if (!r.success)
16986
16986
  throw new Bp({
16987
16987
  message: "No object generated: could not parse the response.",
@@ -17458,11 +17458,11 @@ const Gp = (e, t) => {
17458
17458
  },
17459
17459
  async remove() {
17460
17460
  }
17461
- }, Yp = (e) => ul(e);
17461
+ }, Yp = (e) => cl(e);
17462
17462
  function QC(e) {
17463
17463
  return e.replace(/[}\]"]+$/, "");
17464
17464
  }
17465
- const Ms = (e, t) => !e.parts || e.parts.length === 0 ? [] : e.parts.filter((n) => n.type !== "step-start" && n.type !== "file").map((n) => {
17465
+ const Ds = (e, t) => !e.parts || e.parts.length === 0 ? [] : e.parts.filter((n) => n.type !== "step-start" && n.type !== "file").map((n) => {
17466
17466
  const o = n.type;
17467
17467
  if (o === "text")
17468
17468
  return {
@@ -17539,7 +17539,7 @@ const Ms = (e, t) => !e.parts || e.parts.length === 0 ? [] : e.parts.filter((n)
17539
17539
  role: "user",
17540
17540
  id: e.id,
17541
17541
  createdAt: n,
17542
- content: Ms(e, t),
17542
+ content: Ds(e, t),
17543
17543
  attachments: e.parts?.filter((o) => o.type === "file").map((o, r) => ({
17544
17544
  id: r.toString(),
17545
17545
  type: o.mediaType.startsWith("image/") ? "image" : "file",
@@ -17565,14 +17565,14 @@ const Ms = (e, t) => !e.parts || e.parts.length === 0 ? [] : e.parts.filter((n)
17565
17565
  role: "system",
17566
17566
  id: e.id,
17567
17567
  createdAt: n,
17568
- content: Ms(e, t)
17568
+ content: Ds(e, t)
17569
17569
  };
17570
17570
  case "assistant":
17571
17571
  return {
17572
17572
  role: "assistant",
17573
17573
  id: e.id,
17574
17574
  createdAt: n,
17575
- content: Ms(e, t),
17575
+ content: Ds(e, t),
17576
17576
  metadata: {
17577
17577
  unstable_annotations: e.annotations,
17578
17578
  unstable_data: Array.isArray(e.data) ? e.data : e.data ? [e.data] : void 0,
@@ -17628,7 +17628,7 @@ const Ms = (e, t) => !e.parts || e.parts.length === 0 ? [] : e.parts.filter((n)
17628
17628
  const m = new eA();
17629
17629
  m.import(h);
17630
17630
  const b = m.getMessages();
17631
- d.current(b.map(ul).flat()), c.current = new Set(h.messages.map((y) => y.message.id));
17631
+ d.current(b.map(cl).flat()), c.current = new Set(h.messages.map((y) => y.message.id));
17632
17632
  }
17633
17633
  } catch (p) {
17634
17634
  console.error("Failed to load message history:", p);
@@ -17662,7 +17662,7 @@ const Ms = (e, t) => !e.parts || e.parts.length === 0 ? [] : e.parts.filter((n)
17662
17662
  const b = h > 0 ? f[h - 1].id : null;
17663
17663
  await t?.withFormat?.(o).append({
17664
17664
  parentId: b,
17665
- message: ul(m)[0]
17665
+ message: cl(m)[0]
17666
17666
  });
17667
17667
  }
17668
17668
  }
@@ -17758,9 +17758,9 @@ const Ms = (e, t) => !e.parts || e.parts.length === 0 ? [] : e.parts.filter((n)
17758
17758
  });
17759
17759
  return h;
17760
17760
  };
17761
- var Ds, Xp;
17761
+ var Us, Xp;
17762
17762
  function oA() {
17763
- if (Xp) return Ds;
17763
+ if (Xp) return Us;
17764
17764
  Xp = 1;
17765
17765
  function e(t, n) {
17766
17766
  if (typeof t != "function")
@@ -17774,14 +17774,14 @@ function oA() {
17774
17774
  }, l);
17775
17775
  };
17776
17776
  }
17777
- return Ds = e, Ds;
17777
+ return Us = e, Us;
17778
17778
  }
17779
17779
  var iA = /* @__PURE__ */ oA();
17780
17780
  const aA = /* @__PURE__ */ F1(iA);
17781
- var oi = { exports: {} }, Us = {};
17781
+ var oi = { exports: {} }, Ls = {};
17782
17782
  var ef;
17783
17783
  function sA() {
17784
- if (ef) return Us;
17784
+ if (ef) return Ls;
17785
17785
  ef = 1;
17786
17786
  var e = km;
17787
17787
  function t(d, f) {
@@ -17818,9 +17818,9 @@ function sA() {
17818
17818
  return f();
17819
17819
  }
17820
17820
  var c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? l : s;
17821
- return Us.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : c, Us;
17821
+ return Ls.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : c, Ls;
17822
17822
  }
17823
- var Ls = {};
17823
+ var Zs = {};
17824
17824
  var tf;
17825
17825
  function lA() {
17826
17826
  return tf || (tf = 1, process.env.NODE_ENV !== "production" && (function() {
@@ -17871,8 +17871,8 @@ function lA() {
17871
17871
  }
17872
17872
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
17873
17873
  var r = km, i = typeof Object.is == "function" ? Object.is : e, a = r.useState, s = r.useEffect, u = r.useLayoutEffect, l = r.useDebugValue, c = !1, d = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? o : t;
17874
- Ls.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
17875
- })()), Ls;
17874
+ Zs.useSyncExternalStore = r.useSyncExternalStore !== void 0 ? r.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
17875
+ })()), Zs;
17876
17876
  }
17877
17877
  var rf;
17878
17878
  function uA() {
@@ -17968,15 +17968,15 @@ function fA({
17968
17968
  // `chatRef.current.id` is required to trigger re-subscription when the chat ID changes
17969
17969
  // eslint-disable-next-line react-hooks/exhaustive-deps
17970
17970
  [e, o.current.id]
17971
- ), a = Os(
17971
+ ), a = Ns(
17972
17972
  i,
17973
17973
  () => o.current.messages,
17974
17974
  () => o.current.messages
17975
- ), s = Os(
17975
+ ), s = Ns(
17976
17976
  o.current["~registerStatusCallback"],
17977
17977
  () => o.current.status,
17978
17978
  () => o.current.status
17979
- ), u = Os(
17979
+ ), u = Ns(
17980
17980
  o.current["~registerErrorCallback"],
17981
17981
  () => o.current.error,
17982
17982
  () => o.current.error
@@ -18079,7 +18079,7 @@ const gA = (e) => {
18079
18079
  t,
18080
18080
  {
18081
18081
  ...n.description ? { description: n.description } : void 0,
18082
- inputSchema: rs(n.parameters)
18082
+ inputSchema: ns(n.parameters)
18083
18083
  }
18084
18084
  ]));
18085
18085
  var _A = Object.defineProperty, wA = Object.defineProperties, $A = Object.getOwnPropertyDescriptors, af = Object.getOwnPropertySymbols, SA = Object.prototype.hasOwnProperty, xA = Object.prototype.propertyIsEnumerable, sf = (e, t, n) => t in e ? _A(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, se = (e, t) => {
@@ -18089,7 +18089,7 @@ var _A = Object.defineProperty, wA = Object.defineProperties, $A = Object.getOwn
18089
18089
  for (var n of af(t))
18090
18090
  xA.call(t, n) && sf(e, n, t[n]);
18091
18091
  return e;
18092
- }, Ji = (e, t) => wA(e, $A(t)), Zw = "vercel.ai.error", IA = Symbol.for(Zw), Fw, kA = class qw extends Error {
18092
+ }, Wi = (e, t) => wA(e, $A(t)), Zw = "vercel.ai.error", IA = Symbol.for(Zw), Fw, kA = class qw extends Error {
18093
18093
  /**
18094
18094
  * Creates an AI SDK Error.
18095
18095
  *
@@ -18193,7 +18193,7 @@ var o$ = "AI_InvalidResponseDataError", i$ = `vercel.ai.error.${o$}`, AA = Symbo
18193
18193
  }
18194
18194
  };
18195
18195
  a$ = AA;
18196
- var s$ = "AI_JSONParseError", l$ = `vercel.ai.error.${s$}`, RA = Symbol.for(l$), u$, Wi = class extends Pe {
18196
+ var s$ = "AI_JSONParseError", l$ = `vercel.ai.error.${s$}`, RA = Symbol.for(l$), u$, Hi = class extends Pe {
18197
18197
  constructor({ text: e, cause: t }) {
18198
18198
  super({
18199
18199
  name: s$,
@@ -18276,14 +18276,14 @@ var lf = class extends Error {
18276
18276
  super(e), this.name = "ParseError", this.type = t.type, this.field = t.field, this.value = t.value, this.line = t.line;
18277
18277
  }
18278
18278
  };
18279
- function Zs(e) {
18279
+ function Fs(e) {
18280
18280
  }
18281
18281
  function LA(e) {
18282
18282
  if (typeof e == "function")
18283
18283
  throw new TypeError(
18284
18284
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
18285
18285
  );
18286
- const { onEvent: t = Zs, onError: n = Zs, onRetry: o = Zs, onComment: r } = e;
18286
+ const { onEvent: t = Fs, onError: n = Fs, onRetry: o = Fs, onComment: r } = e;
18287
18287
  let i = "", a = !0, s, u = "", l = "";
18288
18288
  function c(m) {
18289
18289
  const b = a ? m.replace(/^\xEF\xBB\xBF/, "") : m, [y, $] = ZA(`${i}${b}`);
@@ -18401,7 +18401,7 @@ function ro(...e) {
18401
18401
  {}
18402
18402
  );
18403
18403
  }
18404
- function ns(e) {
18404
+ function os(e) {
18405
18405
  return Object.fromEntries([...e.headers]);
18406
18406
  }
18407
18407
  var qA = ({
@@ -18575,7 +18575,7 @@ async function nR({
18575
18575
  const n = ed(e);
18576
18576
  return t == null ? n : rR({ value: n, schema: t });
18577
18577
  } catch (n) {
18578
- throw Wi.isInstance(n) || to.isInstance(n) ? n : new Wi({ text: e, cause: n });
18578
+ throw Hi.isInstance(n) || to.isInstance(n) ? n : new Hi({ text: e, cause: n });
18579
18579
  }
18580
18580
  }
18581
18581
  async function x$({
@@ -18588,12 +18588,12 @@ async function x$({
18588
18588
  } catch (n) {
18589
18589
  return {
18590
18590
  success: !1,
18591
- error: Wi.isInstance(n) ? n : new Wi({ text: e, cause: n }),
18591
+ error: Hi.isInstance(n) ? n : new Hi({ text: e, cause: n }),
18592
18592
  rawValue: void 0
18593
18593
  };
18594
18594
  }
18595
18595
  }
18596
- function Fs(e) {
18596
+ function qs(e) {
18597
18597
  try {
18598
18598
  return ed(e), !0;
18599
18599
  } catch {
@@ -18648,7 +18648,7 @@ var iR = () => globalThis.fetch, no = async ({
18648
18648
  headers: JA(t),
18649
18649
  body: n.content,
18650
18650
  signal: i
18651
- }), u = ns(s);
18651
+ }), u = os(s);
18652
18652
  if (!s.ok) {
18653
18653
  let l;
18654
18654
  try {
@@ -18693,7 +18693,7 @@ var iR = () => globalThis.fetch, no = async ({
18693
18693
  errorToMessage: t,
18694
18694
  isRetryable: n
18695
18695
  }) => async ({ response: o, url: r, requestBodyValues: i }) => {
18696
- const a = await o.text(), s = ns(o);
18696
+ const a = await o.text(), s = os(o);
18697
18697
  if (a.trim() === "")
18698
18698
  return {
18699
18699
  responseHeaders: s,
@@ -18740,7 +18740,7 @@ var iR = () => globalThis.fetch, no = async ({
18740
18740
  };
18741
18741
  }
18742
18742
  }, I$ = (e) => async ({ response: t }) => {
18743
- const n = ns(t);
18743
+ const n = os(t);
18744
18744
  if (t.body == null)
18745
18745
  throw new OA({});
18746
18746
  return {
@@ -18754,7 +18754,7 @@ var iR = () => globalThis.fetch, no = async ({
18754
18754
  const r = await t.text(), i = await x$({
18755
18755
  text: r,
18756
18756
  schema: e
18757
- }), a = ns(t);
18757
+ }), a = os(t);
18758
18758
  if (!i.success)
18759
18759
  throw new It({
18760
18760
  message: "Invalid JSON response",
@@ -18780,7 +18780,7 @@ function uR(e) {
18780
18780
  function cR(e) {
18781
18781
  return e?.replace(/\/$/, "");
18782
18782
  }
18783
- function qs(e) {
18783
+ function Vs(e) {
18784
18784
  return e != null;
18785
18785
  }
18786
18786
  var k$ = /* @__PURE__ */ ((e) => (e.Unknown = "unknown", e.OpenAIResponsesV1 = "openai-responses-v1", e.XAIResponsesV1 = "xai-responses-v1", e.AnthropicClaudeV1 = "anthropic-claude-v1", e.GoogleGeminiV1 = "google-gemini-v1", e))(k$ || {}), rd = E({
@@ -18820,21 +18820,21 @@ H([
18820
18820
  reasoning_details: z(yi)
18821
18821
  })
18822
18822
  }).transform(
18823
- (e) => e.delta.reasoning_details.filter(qs)
18823
+ (e) => e.delta.reasoning_details.filter(Vs)
18824
18824
  ),
18825
18825
  E({
18826
18826
  message: E({
18827
18827
  reasoning_details: z(yi)
18828
18828
  })
18829
18829
  }).transform(
18830
- (e) => e.message.reasoning_details.filter(qs)
18830
+ (e) => e.message.reasoning_details.filter(Vs)
18831
18831
  ),
18832
18832
  E({
18833
18833
  text: w(),
18834
18834
  reasoning_details: z(yi)
18835
- }).transform((e) => e.reasoning_details.filter(qs))
18835
+ }).transform((e) => e.reasoning_details.filter(Vs))
18836
18836
  ]);
18837
- var os = E({
18837
+ var is = E({
18838
18838
  error: E({
18839
18839
  code: H([w(), F()]).nullable().optional().default(null),
18840
18840
  message: w(),
@@ -18842,7 +18842,7 @@ var os = E({
18842
18842
  param: Ce().nullable().optional().default(null)
18843
18843
  }).passthrough()
18844
18844
  }).passthrough(), oo = sR({
18845
- errorSchema: os,
18845
+ errorSchema: is,
18846
18846
  errorToMessage: (e) => e.error.message
18847
18847
  }), E$ = E({
18848
18848
  type: P("file"),
@@ -18881,7 +18881,7 @@ var os = E({
18881
18881
  annotations: z(E$).optional()
18882
18882
  }).optional()
18883
18883
  }).optional();
18884
- function Hi(e) {
18884
+ function Gi(e) {
18885
18885
  switch (e) {
18886
18886
  case "stop":
18887
18887
  return "stop";
@@ -19304,7 +19304,7 @@ var wR = E({
19304
19304
  )
19305
19305
  }),
19306
19306
  // Error response (HTTP 200 with error payload)
19307
- os.extend({
19307
+ is.extend({
19308
19308
  user_id: w().optional()
19309
19309
  })
19310
19310
  ]), xR = H([
@@ -19385,7 +19385,7 @@ var wR = E({
19385
19385
  }).passthrough()
19386
19386
  )
19387
19387
  }),
19388
- os
19388
+ is
19389
19389
  ]), IR = class {
19390
19390
  constructor(e, t, n) {
19391
19391
  this.specificationVersion = "v2", this.provider = "openrouter", this.defaultObjectGenerationMode = "tool", this.supportsImageUrls = !0, this.supportedUrls = {
@@ -19466,7 +19466,7 @@ var wR = E({
19466
19466
  parameters: m.inputSchema
19467
19467
  }
19468
19468
  }));
19469
- return Ji(se({}, p), {
19469
+ return Wi(se({}, p), {
19470
19470
  tools: h,
19471
19471
  tool_choice: d ? _R(d) : void 0
19472
19472
  });
@@ -19610,7 +19610,7 @@ var wR = E({
19610
19610
  (D) => D.type === "file"
19611
19611
  ), V = q.message.tool_calls && q.message.tool_calls.length > 0, Le = ne.some(
19612
19612
  (D) => D.type === "reasoning.encrypted" && D.data
19613
- ), Ze = V && Le && q.finish_reason === "stop" ? "tool-calls" : Hi(q.finish_reason);
19613
+ ), Ze = V && Le && q.finish_reason === "stop" ? "tool-calls" : Gi(q.finish_reason);
19614
19614
  return {
19615
19615
  content: G,
19616
19616
  finishReason: Ze,
@@ -19657,7 +19657,7 @@ var wR = E({
19657
19657
  modelId: this.modelId
19658
19658
  }),
19659
19659
  headers: ro(this.config.headers(), e.headers),
19660
- body: Ji(se({}, r), {
19660
+ body: Wi(se({}, r), {
19661
19661
  stream: !0,
19662
19662
  // only include stream_options when in strict compatibility mode:
19663
19663
  stream_options: this.config.compatibility === "strict" ? se({
@@ -19720,7 +19720,7 @@ var wR = E({
19720
19720
  });
19721
19721
  }
19722
19722
  const Le = V.choices[0];
19723
- if (Le?.finish_reason != null && (u = Hi(Le.finish_reason)), Le?.delta == null)
19723
+ if (Le?.finish_reason != null && (u = Gi(Le.finish_reason)), Le?.delta == null)
19724
19724
  return;
19725
19725
  const ve = Le.delta, Ze = (D, Y) => {
19726
19726
  h || (b = y || wt(), v.enqueue({
@@ -19829,7 +19829,7 @@ var wR = E({
19829
19829
  data: { index: Y, toolCallsLength: s.length },
19830
19830
  message: `Tool call at index ${Y} is missing after creation.`
19831
19831
  });
19832
- ((ee = we.function) == null ? void 0 : ee.name) != null && ((oe = we.function) == null ? void 0 : oe.arguments) != null && Fs(we.function.arguments) && (we.inputStarted = !0, v.enqueue({
19832
+ ((ee = we.function) == null ? void 0 : ee.name) != null && ((oe = we.function) == null ? void 0 : oe.arguments) != null && qs(we.function.arguments) && (we.inputStarted = !0, v.enqueue({
19833
19833
  type: "tool-input-start",
19834
19834
  id: we.id,
19835
19835
  toolName: we.function.name
@@ -19871,7 +19871,7 @@ var wR = E({
19871
19871
  type: "tool-input-delta",
19872
19872
  id: fe.id,
19873
19873
  delta: (ne = D.function.arguments) != null ? ne : ""
19874
- }), ((ce = fe.function) == null ? void 0 : ce.name) != null && ((G = fe.function) == null ? void 0 : G.arguments) != null && Fs(fe.function.arguments) && (v.enqueue({
19874
+ }), ((ce = fe.function) == null ? void 0 : ce.name) != null && ((G = fe.function) == null ? void 0 : G.arguments) != null && qs(fe.function.arguments) && (v.enqueue({
19875
19875
  type: "tool-call",
19876
19876
  toolCallId: (pe = fe.id) != null ? pe : wt(),
19877
19877
  toolName: fe.function.name,
@@ -19903,7 +19903,7 @@ var wR = E({
19903
19903
  toolCallId: (v = T.id) != null ? v : wt(),
19904
19904
  toolName: T.function.name,
19905
19905
  // Coerce invalid arguments to an empty JSON object
19906
- input: Fs(T.function.arguments) ? T.function.arguments : "{}",
19906
+ input: qs(T.function.arguments) ? T.function.arguments : "{}",
19907
19907
  providerMetadata: {
19908
19908
  openrouter: {
19909
19909
  reasoning_details: d
@@ -20052,7 +20052,7 @@ var df = H([
20052
20052
  }).passthrough().nullish()
20053
20053
  }).passthrough().nullish()
20054
20054
  }).passthrough(),
20055
- os
20055
+ is
20056
20056
  ]), ER = class {
20057
20057
  constructor(e, t, n) {
20058
20058
  this.specificationVersion = "v2", this.provider = "openrouter", this.supportsImageUrls = !0, this.supportedUrls = {
@@ -20158,7 +20158,7 @@ var df = H([
20158
20158
  text: (t = k.text) != null ? t : ""
20159
20159
  }
20160
20160
  ],
20161
- finishReason: Hi(k.finish_reason),
20161
+ finishReason: Gi(k.finish_reason),
20162
20162
  usage: {
20163
20163
  inputTokens: (o = (n = S.usage) == null ? void 0 : n.prompt_tokens) != null ? o : 0,
20164
20164
  outputTokens: (i = (r = S.usage) == null ? void 0 : r.completion_tokens) != null ? i : 0,
@@ -20179,7 +20179,7 @@ var df = H([
20179
20179
  modelId: this.modelId
20180
20180
  }),
20181
20181
  headers: ro(this.config.headers(), e.headers),
20182
- body: Ji(se({}, o), {
20182
+ body: Wi(se({}, o), {
20183
20183
  stream: !0,
20184
20184
  // only include stream_options when in strict compatibility mode:
20185
20185
  stream_options: this.config.compatibility === "strict" ? { include_usage: !0 } : void 0
@@ -20233,7 +20233,7 @@ var df = H([
20233
20233
  });
20234
20234
  }
20235
20235
  const m = h.choices[0];
20236
- m?.finish_reason != null && (a = Hi(m.finish_reason)), m?.text != null && c.enqueue({
20236
+ m?.finish_reason != null && (a = Gi(m.finish_reason)), m?.text != null && c.enqueue({
20237
20237
  type: "text-delta",
20238
20238
  delta: m.text,
20239
20239
  id: wt()
@@ -20323,7 +20323,7 @@ function AR(e, ...t) {
20323
20323
  const n = CR(
20324
20324
  e ?? {}
20325
20325
  ), r = [n["user-agent"] || "", ...t].filter(Boolean).join(" ");
20326
- return Ji(se({}, n), {
20326
+ return Wi(se({}, n), {
20327
20327
  "user-agent": r
20328
20328
  });
20329
20329
  }
@@ -20426,7 +20426,7 @@ var Vo = ({
20426
20426
  if (e == null)
20427
20427
  return r;
20428
20428
  if (n.includes(o))
20429
- throw new oa({
20429
+ throw new ia({
20430
20430
  argument: "separator",
20431
20431
  message: `The separator "${o}" must not be part of the alphabet "${n}".`
20432
20432
  });
@@ -20480,7 +20480,7 @@ function MR(e) {
20480
20480
  }
20481
20481
  return t;
20482
20482
  }
20483
- function is(e, ...t) {
20483
+ function as(e, ...t) {
20484
20484
  const n = new Headers(MR(e)), o = n.get("user-agent") || "";
20485
20485
  return n.set(
20486
20486
  "user-agent",
@@ -20498,7 +20498,7 @@ var R$ = "3.0.16", DR = () => globalThis.fetch, ff = async ({
20498
20498
  try {
20499
20499
  const a = await i(e, {
20500
20500
  method: "GET",
20501
- headers: is(
20501
+ headers: as(
20502
20502
  t,
20503
20503
  `ai-sdk/provider-utils/${R$}`,
20504
20504
  ad()
@@ -20596,12 +20596,12 @@ function z$(e) {
20596
20596
  Error.stackTraceLimit = t;
20597
20597
  }
20598
20598
  }
20599
- var Gi = Symbol.for("vercel.ai.validator");
20599
+ var Ki = Symbol.for("vercel.ai.validator");
20600
20600
  function VR(e) {
20601
- return { [Gi]: !0, validate: e };
20601
+ return { [Ki]: !0, validate: e };
20602
20602
  }
20603
20603
  function BR(e) {
20604
- return typeof e == "object" && e !== null && Gi in e && e[Gi] === !0 && "validate" in e;
20604
+ return typeof e == "object" && e !== null && Ki in e && e[Ki] === !0 && "validate" in e;
20605
20605
  }
20606
20606
  function bn(e) {
20607
20607
  let t;
@@ -20725,7 +20725,7 @@ var KR = () => globalThis.fetch, Ul = async ({
20725
20725
  try {
20726
20726
  const s = await a(e, {
20727
20727
  method: "POST",
20728
- headers: is(
20728
+ headers: as(
20729
20729
  t,
20730
20730
  `ai-sdk/provider-utils/${R$}`,
20731
20731
  ad()
@@ -20838,7 +20838,7 @@ var io = ({
20838
20838
  schema: e
20839
20839
  })
20840
20840
  };
20841
- }, Ki = (e) => async ({ response: t, url: n, requestBodyValues: o }) => {
20841
+ }, Yi = (e) => async ({ response: t, url: n, requestBodyValues: o }) => {
20842
20842
  const r = await t.text(), i = await Pr({
20843
20843
  text: r,
20844
20844
  schema: e
@@ -21019,7 +21019,7 @@ function pz(e) {
21019
21019
  const: e.value
21020
21020
  };
21021
21021
  }
21022
- var Vs = void 0, bt = {
21022
+ var Bs = void 0, bt = {
21023
21023
  /**
21024
21024
  * `c` was changed to `[cC]` to replicate /i flag
21025
21025
  */
@@ -21041,10 +21041,10 @@ var Vs = void 0, bt = {
21041
21041
  * Fix in Zod:
21042
21042
  * https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b
21043
21043
  */
21044
- emoji: () => (Vs === void 0 && (Vs = RegExp(
21044
+ emoji: () => (Bs === void 0 && (Bs = RegExp(
21045
21045
  "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",
21046
21046
  "u"
21047
- )), Vs),
21047
+ )), Bs),
21048
21048
  /**
21049
21049
  * Unused
21050
21050
  */
@@ -21108,7 +21108,7 @@ function D$(e, t) {
21108
21108
  case "startsWith":
21109
21109
  Ve(
21110
21110
  n,
21111
- RegExp(`^${Bs(o.value, t)}`),
21111
+ RegExp(`^${Js(o.value, t)}`),
21112
21112
  o.message,
21113
21113
  t
21114
21114
  );
@@ -21116,7 +21116,7 @@ function D$(e, t) {
21116
21116
  case "endsWith":
21117
21117
  Ve(
21118
21118
  n,
21119
- RegExp(`${Bs(o.value, t)}$`),
21119
+ RegExp(`${Js(o.value, t)}$`),
21120
21120
  o.message,
21121
21121
  t
21122
21122
  );
@@ -21139,7 +21139,7 @@ function D$(e, t) {
21139
21139
  case "includes": {
21140
21140
  Ve(
21141
21141
  n,
21142
- RegExp(Bs(o.value, t)),
21142
+ RegExp(Js(o.value, t)),
21143
21143
  o.message,
21144
21144
  t
21145
21145
  );
@@ -21188,7 +21188,7 @@ function D$(e, t) {
21188
21188
  }
21189
21189
  return n;
21190
21190
  }
21191
- function Bs(e, t) {
21191
+ function Js(e, t) {
21192
21192
  return t.patternStrategy === "escape" ? mz(e) : e;
21193
21193
  }
21194
21194
  var fz = new Set(
@@ -21786,14 +21786,14 @@ function Zz(e, t) {
21786
21786
  const o = (n = void 0) != null ? n : !1;
21787
21787
  return sd(
21788
21788
  // defer json schema creation to avoid unnecessary computation when only validation is needed
21789
- () => Ia(e, {
21789
+ () => ka(e, {
21790
21790
  target: "draft-7",
21791
21791
  io: "output",
21792
21792
  reused: o ? "ref" : "inline"
21793
21793
  }),
21794
21794
  {
21795
21795
  validate: async (r) => {
21796
- const i = await ka(e, r);
21796
+ const i = await Ea(e, r);
21797
21797
  return i.success ? { success: !0, value: i.data } : { success: !1, error: i.error };
21798
21798
  }
21799
21799
  }
@@ -21813,7 +21813,7 @@ function sd(e, {
21813
21813
  [Zl]: !0,
21814
21814
  _type: void 0,
21815
21815
  // should never be used directly
21816
- [Gi]: !0,
21816
+ [Ki]: !0,
21817
21817
  get jsonSchema() {
21818
21818
  return typeof e == "function" && (e = e()), e;
21819
21819
  },
@@ -21823,7 +21823,7 @@ function sd(e, {
21823
21823
  function qz(e) {
21824
21824
  return typeof e == "object" && e !== null && Zl in e && e[Zl] === !0 && "jsonSchema" in e && "validate" in e;
21825
21825
  }
21826
- function as(e) {
21826
+ function ss(e) {
21827
21827
  return e == null ? sd({
21828
21828
  properties: {},
21829
21829
  additionalProperties: !1
@@ -21860,9 +21860,9 @@ async function* Hz({
21860
21860
  } else
21861
21861
  yield { type: "final", output: await o };
21862
21862
  }
21863
- var Js, gf;
21863
+ var Ws, gf;
21864
21864
  function Gz() {
21865
- if (gf) return Js;
21865
+ if (gf) return Ws;
21866
21866
  gf = 1;
21867
21867
  var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, r = (c, d) => {
21868
21868
  for (var f in d)
@@ -21876,16 +21876,16 @@ function Gz() {
21876
21876
  r(s, {
21877
21877
  SYMBOL_FOR_REQ_CONTEXT: () => u,
21878
21878
  getContext: () => l
21879
- }), Js = a(s);
21879
+ }), Ws = a(s);
21880
21880
  const u = Symbol.for("@vercel/request-context");
21881
21881
  function l() {
21882
21882
  return globalThis[u]?.get?.() ?? {};
21883
21883
  }
21884
- return Js;
21884
+ return Ws;
21885
21885
  }
21886
- var Ws, vf;
21886
+ var Hs, vf;
21887
21887
  function Kz() {
21888
- if (vf) return Ws;
21888
+ if (vf) return Hs;
21889
21889
  vf = 1;
21890
21890
  var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, o = Object.prototype.hasOwnProperty, r = (d, f) => {
21891
21891
  for (var p in f)
@@ -21900,7 +21900,7 @@ function Kz() {
21900
21900
  getContext: () => u.getContext,
21901
21901
  getVercelOidcToken: () => l,
21902
21902
  getVercelOidcTokenSync: () => c
21903
- }), Ws = a(s);
21903
+ }), Hs = a(s);
21904
21904
  var u = Gz();
21905
21905
  async function l() {
21906
21906
  return "";
@@ -21908,9 +21908,9 @@ function Kz() {
21908
21908
  function c() {
21909
21909
  return "";
21910
21910
  }
21911
- return Ws;
21911
+ return Hs;
21912
21912
  }
21913
- var L$ = Kz(), Yz = "vercel.ai.gateway.error", Hs = Symbol.for(Yz), yf, bf, ot = class Z$ extends (bf = Error, yf = Hs, bf) {
21913
+ var L$ = Kz(), Yz = "vercel.ai.gateway.error", Gs = Symbol.for(Yz), yf, bf, ot = class Z$ extends (bf = Error, yf = Gs, bf) {
21914
21914
  constructor({
21915
21915
  message: t,
21916
21916
  statusCode: n = 500,
@@ -21927,7 +21927,7 @@ var L$ = Kz(), Yz = "vercel.ai.gateway.error", Hs = Symbol.for(Yz), yf, bf, ot =
21927
21927
  return Z$.hasMarker(t);
21928
21928
  }
21929
21929
  static hasMarker(t) {
21930
- return typeof t == "object" && t !== null && Hs in t && t[Hs] === !0;
21930
+ return typeof t == "object" && t !== null && Gs in t && t[Gs] === !0;
21931
21931
  }
21932
21932
  }, F$ = "GatewayAuthenticationError", Qz = `vercel.ai.gateway.error.${F$}`, _f = Symbol.for(Qz), wf, $f, ud = class q$ extends ($f = ot, wf = _f, $f) {
21933
21933
  constructor({
@@ -22145,7 +22145,7 @@ var cj = bn(
22145
22145
  const { value: e } = await ff({
22146
22146
  url: `${this.config.baseURL}/config`,
22147
22147
  headers: await lr(this.config.headers()),
22148
- successfulResponseHandler: Ki(
22148
+ successfulResponseHandler: Yi(
22149
22149
  dj
22150
22150
  ),
22151
22151
  failedResponseHandler: io({
@@ -22164,7 +22164,7 @@ var cj = bn(
22164
22164
  const e = new URL(this.config.baseURL), { value: t } = await ff({
22165
22165
  url: `${e.origin}/v1/credits`,
22166
22166
  headers: await lr(this.config.headers()),
22167
- successfulResponseHandler: Ki(
22167
+ successfulResponseHandler: Yi(
22168
22168
  pj
22169
22169
  ),
22170
22170
  failedResponseHandler: io({
@@ -22249,7 +22249,7 @@ var cj = bn(
22249
22249
  await lr(this.config.o11yHeaders)
22250
22250
  ),
22251
22251
  body: t,
22252
- successfulResponseHandler: Ki(Ce()),
22252
+ successfulResponseHandler: Yi(Ce()),
22253
22253
  failedResponseHandler: io({
22254
22254
  errorSchema: Ce(),
22255
22255
  errorToMessage: (u) => u
@@ -22378,7 +22378,7 @@ var cj = bn(
22378
22378
  input: e.length === 1 ? e[0] : e,
22379
22379
  ...o ? { providerOptions: o } : {}
22380
22380
  },
22381
- successfulResponseHandler: Ki(
22381
+ successfulResponseHandler: Yi(
22382
22382
  hj
22383
22383
  ),
22384
22384
  failedResponseHandler: io({
@@ -22429,7 +22429,7 @@ function bj(e = {}) {
22429
22429
  const s = (n = Jz(e.baseURL)) != null ? n : "https://ai-gateway.vercel.sh/v1/ai", u = async () => {
22430
22430
  const h = await wj(e);
22431
22431
  if (h)
22432
- return is(
22432
+ return as(
22433
22433
  {
22434
22434
  Authorization: `Bearer ${h.token}`,
22435
22435
  "ai-gateway-protocol-version": yj,
@@ -22688,7 +22688,7 @@ var $S = "AI_MessageConversionError", SS = `vercel.ai.error.${$S}`, Lj = Symbol.
22688
22688
  }
22689
22689
  };
22690
22690
  xS = Lj;
22691
- var IS = "AI_DownloadError", kS = `vercel.ai.error.${IS}`, Fj = Symbol.for(kS), ES, Gs = class extends K {
22691
+ var IS = "AI_DownloadError", kS = `vercel.ai.error.${IS}`, Fj = Symbol.for(kS), ES, Ks = class extends K {
22692
22692
  constructor({
22693
22693
  url: e,
22694
22694
  statusCode: t,
@@ -22841,14 +22841,14 @@ var Gj = "5.0.90", Kj = async ({ url: e }) => {
22841
22841
  const n = e.toString();
22842
22842
  try {
22843
22843
  const o = await fetch(n, {
22844
- headers: is(
22844
+ headers: as(
22845
22845
  {},
22846
22846
  `ai-sdk/${Gj}`,
22847
22847
  ad()
22848
22848
  )
22849
22849
  });
22850
22850
  if (!o.ok)
22851
- throw new Gs({
22851
+ throw new Ks({
22852
22852
  url: n,
22853
22853
  statusCode: o.status,
22854
22854
  statusText: o.statusText
@@ -22858,7 +22858,7 @@ var Gj = "5.0.90", Kj = async ({ url: e }) => {
22858
22858
  mediaType: (t = o.headers.get("content-type")) != null ? t : void 0
22859
22859
  };
22860
22860
  } catch (o) {
22861
- throw Gs.isInstance(o) ? o : new Gs({ url: n, cause: o });
22861
+ throw Ks.isInstance(o) ? o : new Ks({ url: n, cause: o });
22862
22862
  }
22863
22863
  }, Yj = (e = Kj) => (t) => Promise.all(
22864
22864
  t.map(
@@ -23208,7 +23208,7 @@ function a4({
23208
23208
  type: "function",
23209
23209
  name: r,
23210
23210
  description: i.description,
23211
- inputSchema: as(i.inputSchema).jsonSchema,
23211
+ inputSchema: ss(i.inputSchema).jsonSchema,
23212
23212
  providerOptions: i.providerOptions
23213
23213
  };
23214
23214
  case "provider-defined":
@@ -23268,7 +23268,7 @@ var so = jo(
23268
23268
  input: $e(),
23269
23269
  providerOptions: Vt.optional(),
23270
23270
  providerExecuted: de().optional()
23271
- }), c4 = Ha("type", [
23271
+ }), c4 = Ga("type", [
23272
23272
  E({
23273
23273
  type: P("text"),
23274
23274
  value: w()
@@ -23518,9 +23518,9 @@ function MS(e, t) {
23518
23518
  message: t.message,
23519
23519
  stack: t.stack
23520
23520
  }), e.setStatus({
23521
- code: Bi.ERROR,
23521
+ code: Ji.ERROR,
23522
23522
  message: t.message
23523
- })) : e.setStatus({ code: Bi.ERROR });
23523
+ })) : e.setStatus({ code: Ji.ERROR });
23524
23524
  }
23525
23525
  function Gr({
23526
23526
  telemetry: e,
@@ -23721,7 +23721,7 @@ async function O4({
23721
23721
  tools: t,
23722
23722
  inputSchema: ({ toolName: s }) => {
23723
23723
  const { inputSchema: u } = t[s];
23724
- return as(u).jsonSchema;
23724
+ return ss(u).jsonSchema;
23725
23725
  },
23726
23726
  system: o,
23727
23727
  messages: r,
@@ -23760,7 +23760,7 @@ async function Bf({
23760
23760
  toolName: e.toolName,
23761
23761
  availableTools: Object.keys(t)
23762
23762
  });
23763
- const r = as(o.inputSchema), i = e.input.trim() === "" ? await gr({ value: {}, schema: r }) : await Pr({ text: e.input, schema: r });
23763
+ const r = ss(o.inputSchema), i = e.input.trim() === "" ? await gr({ value: {}, schema: r }) : await Pr({ text: e.input, schema: r });
23764
23764
  if (i.success === !1)
23765
23765
  throw new aS({
23766
23766
  toolName: n,
@@ -23943,7 +23943,7 @@ Vo({
23943
23943
  prefix: "aitxt",
23944
23944
  size: 24
23945
23945
  });
23946
- function ss(e, t) {
23946
+ function ls(e, t) {
23947
23947
  const n = new Headers(e ?? {});
23948
23948
  for (const [o, r] of Object.entries(t))
23949
23949
  n.has(o) || n.set(o, r);
@@ -23958,7 +23958,7 @@ function C4({
23958
23958
  return new Response(o.pipeThrough(new TextEncoderStream()), {
23959
23959
  status: e ?? 200,
23960
23960
  statusText: t,
23961
- headers: ss(n, {
23961
+ headers: ls(n, {
23962
23962
  "content-type": "text/plain; charset=utf-8"
23963
23963
  })
23964
23964
  });
@@ -24001,7 +24001,7 @@ function A4({
24001
24001
  status: t,
24002
24002
  statusText: n,
24003
24003
  headers: Object.fromEntries(
24004
- ss(o, {
24004
+ ls(o, {
24005
24005
  "content-type": "text/plain; charset=utf-8"
24006
24006
  }).entries()
24007
24007
  ),
@@ -24046,7 +24046,7 @@ function R4({
24046
24046
  return new Response(i.pipeThrough(new TextEncoderStream()), {
24047
24047
  status: e,
24048
24048
  statusText: t,
24049
- headers: ss(n, FS)
24049
+ headers: ls(n, FS)
24050
24050
  });
24051
24051
  }
24052
24052
  function z4({
@@ -24336,13 +24336,13 @@ async function VS(e) {
24336
24336
  let t = await Pr({ text: e });
24337
24337
  return t.success ? { value: t.value, state: "successful-parse" } : (t = await Pr({ text: M4(e) }), t.success ? { value: t.value, state: "repaired-parse" } : { value: void 0, state: "failed-parse" });
24338
24338
  }
24339
- function Ks(e) {
24339
+ function Ys(e) {
24340
24340
  return e.type.startsWith("data-");
24341
24341
  }
24342
- function Ys(e) {
24342
+ function Qs(e) {
24343
24343
  return e.type === "text";
24344
24344
  }
24345
- function Qs(e) {
24345
+ function Xs(e) {
24346
24346
  return e.type === "file";
24347
24347
  }
24348
24348
  function Hf(e) {
@@ -24357,11 +24357,11 @@ function cd(e) {
24357
24357
  function Gf(e) {
24358
24358
  return Yr(e) || cd(e);
24359
24359
  }
24360
- function Yi(e) {
24360
+ function Qi(e) {
24361
24361
  return e.type.split("-").slice(1).join("-");
24362
24362
  }
24363
24363
  function D4(e) {
24364
- return cd(e) ? e.toolName : Yi(e);
24364
+ return cd(e) ? e.toolName : Qi(e);
24365
24365
  }
24366
24366
  function U4({
24367
24367
  lastMessage: e,
@@ -24629,7 +24629,7 @@ function L4({
24629
24629
  const v = m(s.toolCallId);
24630
24630
  y({
24631
24631
  toolCallId: s.toolCallId,
24632
- toolName: Yi(v),
24632
+ toolName: Qi(v),
24633
24633
  state: "output-available",
24634
24634
  input: v.input,
24635
24635
  output: s.output,
@@ -24657,7 +24657,7 @@ function L4({
24657
24657
  const v = m(s.toolCallId);
24658
24658
  y({
24659
24659
  toolCallId: s.toolCallId,
24660
- toolName: Yi(v),
24660
+ toolName: Qi(v),
24661
24661
  state: "output-error",
24662
24662
  input: v.input,
24663
24663
  rawInput: v.rawInput,
@@ -24799,7 +24799,7 @@ function F4({
24799
24799
  status: t,
24800
24800
  statusText: n,
24801
24801
  headers: Object.fromEntries(
24802
- ss(o, FS).entries()
24802
+ ls(o, FS).entries()
24803
24803
  ),
24804
24804
  stream: a.pipeThrough(new TextEncoderStream())
24805
24805
  });
@@ -25519,7 +25519,7 @@ var K4 = class {
25519
25519
  })
25520
25520
  );
25521
25521
  this.baseStream = we.pipeThrough(G4(m)).pipeThrough(D);
25522
- const { maxRetries: Go, retry: ws } = k4({
25522
+ const { maxRetries: Go, retry: $s } = k4({
25523
25523
  maxRetries: r,
25524
25524
  abortSignal: i
25525
25525
  }), $n = w4(t), mt = o4(o), Ko = y4({
@@ -25574,7 +25574,7 @@ var K4 = class {
25574
25574
  },
25575
25575
  supportedUrls: await Ur.supportedUrls,
25576
25576
  download: oe
25577
- }), { toolChoice: $s, tools: Ss } = a4({
25577
+ }), { toolChoice: Ss, tools: xs } = a4({
25578
25578
  tools: l,
25579
25579
  toolChoice: (xn = Ct?.toolChoice) != null ? xn : c,
25580
25580
  activeTools: (Zd = Ct?.activeTools) != null ? Zd : f
@@ -25582,7 +25582,7 @@ var K4 = class {
25582
25582
  result: { stream: L0, response: Bd, request: Jd },
25583
25583
  doStreamSpan: Lr,
25584
25584
  startTimestampMs: Wd
25585
- } = await ws(
25585
+ } = await $s(
25586
25586
  () => Bl({
25587
25587
  name: "ai.streamText.doStream",
25588
25588
  attributes: Gr({
@@ -25602,10 +25602,10 @@ var K4 = class {
25602
25602
  },
25603
25603
  "ai.prompt.tools": {
25604
25604
  // convert the language model level tools:
25605
- input: () => Ss?.map((J) => JSON.stringify(J))
25605
+ input: () => xs?.map((J) => JSON.stringify(J))
25606
25606
  },
25607
25607
  "ai.prompt.toolChoice": {
25608
- input: () => $s != null ? JSON.stringify($s) : void 0
25608
+ input: () => Ss != null ? JSON.stringify(Ss) : void 0
25609
25609
  },
25610
25610
  // standardized gen-ai llm span attributes:
25611
25611
  "gen_ai.system": Ur.provider,
@@ -25627,8 +25627,8 @@ var K4 = class {
25627
25627
  doStreamSpan: J,
25628
25628
  result: await Ur.doStream({
25629
25629
  ...mt,
25630
- tools: Ss,
25631
- toolChoice: $s,
25630
+ tools: xs,
25631
+ toolChoice: Ss,
25632
25632
  responseFormat: m?.responseFormat,
25633
25633
  prompt: Vd,
25634
25634
  providerOptions: b,
@@ -25648,14 +25648,14 @@ var K4 = class {
25648
25648
  repairToolCall: p,
25649
25649
  abortSignal: i,
25650
25650
  experimental_context: ee
25651
- }), F0 = Jd ?? {}, Yo = [], xs = [];
25652
- let Is;
25653
- const ks = {};
25651
+ }), F0 = Jd ?? {}, Yo = [], Is = [];
25652
+ let ks;
25653
+ const Es = {};
25654
25654
  let Zr = "unknown", gt = {
25655
25655
  inputTokens: void 0,
25656
25656
  outputTokens: void 0,
25657
25657
  totalTokens: void 0
25658
- }, Es, Hd = !0, At = {
25658
+ }, Ts, Hd = !0, At = {
25659
25659
  id: k(),
25660
25660
  timestamp: v(),
25661
25661
  modelId: e.modelId
@@ -25666,7 +25666,7 @@ var K4 = class {
25666
25666
  async transform(J, je) {
25667
25667
  var kn, En, Qo, Jt;
25668
25668
  if (J.type === "stream-start") {
25669
- Is = J.warnings;
25669
+ ks = J.warnings;
25670
25670
  return;
25671
25671
  }
25672
25672
  if (Hd) {
@@ -25678,7 +25678,7 @@ var K4 = class {
25678
25678
  }), je.enqueue({
25679
25679
  type: "start-step",
25680
25680
  request: F0,
25681
- warnings: Is ?? []
25681
+ warnings: ks ?? []
25682
25682
  });
25683
25683
  }
25684
25684
  const Kd = J.type;
@@ -25716,11 +25716,11 @@ var K4 = class {
25716
25716
  break;
25717
25717
  }
25718
25718
  case "tool-result": {
25719
- je.enqueue(J), J.preliminary || xs.push(J);
25719
+ je.enqueue(J), J.preliminary || Is.push(J);
25720
25720
  break;
25721
25721
  }
25722
25722
  case "tool-error": {
25723
- je.enqueue(J), xs.push(J);
25723
+ je.enqueue(J), Is.push(J);
25724
25724
  break;
25725
25725
  }
25726
25726
  case "response-metadata": {
@@ -25732,7 +25732,7 @@ var K4 = class {
25732
25732
  break;
25733
25733
  }
25734
25734
  case "finish": {
25735
- gt = J.usage, Zr = J.finishReason, Es = J.providerMetadata;
25735
+ gt = J.usage, Zr = J.finishReason, Ts = J.providerMetadata;
25736
25736
  const Fe = S() - Wd;
25737
25737
  Lr.addEvent("ai.stream.finish"), Lr.setAttributes({
25738
25738
  "ai.response.msToFinish": Fe,
@@ -25749,7 +25749,7 @@ var K4 = class {
25749
25749
  break;
25750
25750
  }
25751
25751
  case "tool-input-start": {
25752
- ks[J.id] = J.toolName;
25752
+ Es[J.id] = J.toolName;
25753
25753
  const Fe = l?.[J.toolName];
25754
25754
  Fe?.onInputStart != null && await Fe.onInputStart({
25755
25755
  toolCallId: J.id,
@@ -25763,12 +25763,12 @@ var K4 = class {
25763
25763
  break;
25764
25764
  }
25765
25765
  case "tool-input-end": {
25766
- delete ks[J.id], je.enqueue(J);
25766
+ delete Es[J.id], je.enqueue(J);
25767
25767
  break;
25768
25768
  }
25769
25769
  case "tool-input-delta": {
25770
- const Fe = ks[J.id], Ts = l?.[Fe];
25771
- Ts?.onInputDelta != null && await Ts.onInputDelta({
25770
+ const Fe = Es[J.id], Os = l?.[Fe];
25771
+ Os?.onInputDelta != null && await Os.onInputDelta({
25772
25772
  inputTextDelta: J.delta,
25773
25773
  toolCallId: J.id,
25774
25774
  messages: In,
@@ -25809,7 +25809,7 @@ var K4 = class {
25809
25809
  "ai.response.id": At.id,
25810
25810
  "ai.response.model": At.modelId,
25811
25811
  "ai.response.timestamp": At.timestamp.toISOString(),
25812
- "ai.response.providerMetadata": JSON.stringify(Es),
25812
+ "ai.response.providerMetadata": JSON.stringify(Ts),
25813
25813
  "ai.usage.inputTokens": gt.inputTokens,
25814
25814
  "ai.usage.outputTokens": gt.outputTokens,
25815
25815
  "ai.usage.totalTokens": gt.totalTokens,
@@ -25832,7 +25832,7 @@ var K4 = class {
25832
25832
  type: "finish-step",
25833
25833
  finishReason: Zr,
25834
25834
  usage: gt,
25835
- providerMetadata: Es,
25835
+ providerMetadata: Ts,
25836
25836
  response: {
25837
25837
  ...At,
25838
25838
  headers: Bd?.headers
@@ -25842,7 +25842,7 @@ var K4 = class {
25842
25842
  await B.promise;
25843
25843
  const En = Yo.filter(
25844
25844
  (Jt) => Jt.providerExecuted !== !0
25845
- ), Qo = xs.filter(
25845
+ ), Qo = Is.filter(
25846
25846
  (Jt) => Jt.providerExecuted !== !0
25847
25847
  );
25848
25848
  if (En.length > 0 && // all current tool calls have outputs (incl. execution errors):
@@ -26343,13 +26343,13 @@ function Y4(e, t) {
26343
26343
  role: "user",
26344
26344
  content: o.parts.map((r) => {
26345
26345
  var i;
26346
- if (Ys(r))
26346
+ if (Qs(r))
26347
26347
  return {
26348
26348
  type: "text",
26349
26349
  text: r.text,
26350
26350
  ...r.providerMetadata != null ? { providerOptions: r.providerMetadata } : {}
26351
26351
  };
26352
- if (Qs(r))
26352
+ if (Xs(r))
26353
26353
  return {
26354
26354
  type: "file",
26355
26355
  mediaType: r.mediaType,
@@ -26357,7 +26357,7 @@ function Y4(e, t) {
26357
26357
  data: r.url,
26358
26358
  ...r.providerMetadata != null ? { providerOptions: r.providerMetadata } : {}
26359
26359
  };
26360
- if (Ks(r))
26360
+ if (Ys(r))
26361
26361
  return (i = t?.convertDataPart) == null ? void 0 : i.call(
26362
26362
  t,
26363
26363
  r
@@ -26374,13 +26374,13 @@ function Y4(e, t) {
26374
26374
  return;
26375
26375
  const l = [];
26376
26376
  for (const d of i)
26377
- if (Ys(d))
26377
+ if (Qs(d))
26378
26378
  l.push({
26379
26379
  type: "text",
26380
26380
  text: d.text,
26381
26381
  ...d.providerMetadata != null ? { providerOptions: d.providerMetadata } : {}
26382
26382
  });
26383
- else if (Qs(d))
26383
+ else if (Xs(d))
26384
26384
  l.push({
26385
26385
  type: "file",
26386
26386
  mediaType: d.mediaType,
@@ -26403,7 +26403,7 @@ function Y4(e, t) {
26403
26403
  ...d.callProviderMetadata != null ? { providerOptions: d.callProviderMetadata } : {}
26404
26404
  });
26405
26405
  } else if (Yr(d)) {
26406
- const f = Yi(d);
26406
+ const f = Qi(d);
26407
26407
  d.state !== "input-streaming" && (l.push({
26408
26408
  type: "tool-call",
26409
26409
  toolCallId: d.toolCallId,
@@ -26421,7 +26421,7 @@ function Y4(e, t) {
26421
26421
  errorMode: d.state === "output-error" ? "json" : "none"
26422
26422
  })
26423
26423
  }));
26424
- } else if (Ks(d)) {
26424
+ } else if (Ys(d)) {
26425
26425
  const f = (u = t?.convertDataPart) == null ? void 0 : u.call(
26426
26426
  t,
26427
26427
  d
@@ -26466,7 +26466,7 @@ function Y4(e, t) {
26466
26466
  }), i = [];
26467
26467
  }, i = [];
26468
26468
  for (const a of o.parts)
26469
- Ys(a) || Hf(a) || Qs(a) || Gf(a) || Ks(a) ? i.push(a) : a.type === "step-start" && r();
26469
+ Qs(a) || Hf(a) || Xs(a) || Gf(a) || Ys(a) ? i.push(a) : a.type === "step-start" && r();
26470
26470
  r();
26471
26471
  break;
26472
26472
  }
@@ -26501,7 +26501,7 @@ var X4 = () => ({
26501
26501
  }), eM = ({
26502
26502
  schema: e
26503
26503
  }) => {
26504
- const t = as(e);
26504
+ const t = ss(e);
26505
26505
  return {
26506
26506
  type: "object",
26507
26507
  responseFormat: {
@@ -26579,7 +26579,7 @@ function rM({
26579
26579
  else {
26580
26580
  const r = typeof t == "string" ? tM[t] : t;
26581
26581
  if (r == null)
26582
- throw new oa({
26582
+ throw new ia({
26583
26583
  argument: "chunking",
26584
26584
  message: `Chunking must be "word" or "line" or a RegExp. Received: ${t}`
26585
26585
  });
@@ -26604,7 +26604,7 @@ function rM({
26604
26604
  });
26605
26605
  };
26606
26606
  }
26607
- function Xs(e) {
26607
+ function el(e) {
26608
26608
  return !!e && "UNSAFE_apiKey" in e;
26609
26609
  }
26610
26610
  const nM = ({
@@ -26636,11 +26636,11 @@ const iM = ({
26636
26636
  auth: t
26637
26637
  }) => {
26638
26638
  const n = nM({
26639
- enabled: !Xs(t),
26640
- getSession: Xs(t) ? null : t?.sessionFn ?? oM,
26639
+ enabled: !el(t),
26640
+ getSession: el(t) ? null : t?.sessionFn ?? oM,
26641
26641
  projectSlug: e
26642
26642
  });
26643
- return Xs(t) ? {
26643
+ return el(t) ? {
26644
26644
  headers: {
26645
26645
  "Gram-Project": e,
26646
26646
  "Gram-Key": t.UNSAFE_apiKey
@@ -26720,10 +26720,13 @@ function aM({ children: e }) {
26720
26720
  }
26721
26721
  );
26722
26722
  }
26723
- const sM = "You are a helpful assistant that can answer questions and help with tasks.";
26724
- function lM(e, t) {
26723
+ function sM(e) {
26724
+ return (e.api?.url || "" || "https://app.getgram.ai").replace(/\/+$/, "");
26725
+ }
26726
+ const lM = "You are a helpful assistant that can answer questions and help with tasks.";
26727
+ function uM(e, t) {
26725
26728
  return `
26726
- ${sM}
26729
+ ${lM}
26727
26730
 
26728
26731
  User-provided System Prompt:
26729
26732
  ${e ?? "None provided"}
@@ -26732,21 +26735,18 @@ function lM(e, t) {
26732
26735
  ${t.map((n) => `- ${n.language}: ${n.prompt}`).join(`
26733
26736
  `)}`;
26734
26737
  }
26735
- function uM(e) {
26736
- return (e.api?.url ?? "" ?? "https://app.getgram.ai").replace(/\/+$/, "");
26737
- }
26738
26738
  const cM = ({
26739
26739
  children: e,
26740
26740
  config: t
26741
26741
  }) => {
26742
- const n = uM(t), o = iM({
26742
+ const n = sM(t), o = iM({
26743
26743
  auth: t.api,
26744
26744
  projectSlug: t.projectSlug
26745
26745
  }), r = hw(), [i, a] = Ie(
26746
26746
  t.model?.defaultModel ?? gw[0]
26747
26747
  ), [s, u] = Ie(
26748
26748
  t.modal?.defaultExpanded ?? !1
26749
- ), [l, c] = Ie(t.modal?.defaultOpen), d = t.plugins ?? q0, f = lM(
26749
+ ), [l, c] = Ie(t.modal?.defaultOpen), d = t.plugins ?? q0, f = uM(
26750
26750
  t.systemPrompt,
26751
26751
  d
26752
26752
  ), { data: p, isLoading: h } = YN({
@@ -26779,7 +26779,7 @@ const cM = ({
26779
26779
  sendMessages: async ({ messages: S, abortSignal: v }) => {
26780
26780
  const k = !!t.languageModel;
26781
26781
  if (o.isLoading)
26782
- throw new Error("Session is laoding");
26782
+ throw new Error("Session is loading");
26783
26783
  const O = $.thread.getModelContext(), I = XN(
26784
26784
  eP(O?.tools ?? {})
26785
26785
  ), T = k ? null : N$({
@@ -27041,7 +27041,7 @@ var wM = "DismissableLayer", Jl = "dismissableLayer.update", $M = "dismissableLa
27041
27041
  layers: /* @__PURE__ */ new Set(),
27042
27042
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
27043
27043
  branches: /* @__PURE__ */ new Set()
27044
- }), ls = _.forwardRef(
27044
+ }), us = _.forwardRef(
27045
27045
  (e, t) => {
27046
27046
  const {
27047
27047
  disableOutsidePointerEvents: n = !1,
@@ -27089,7 +27089,7 @@ var wM = "DismissableLayer", Jl = "dismissableLayer.update", $M = "dismissableLa
27089
27089
  );
27090
27090
  }
27091
27091
  );
27092
- ls.displayName = wM;
27092
+ us.displayName = wM;
27093
27093
  var xM = "DismissableLayerBranch", IM = _.forwardRef((e, t) => {
27094
27094
  const n = _.useContext(JS), o = _.useRef(null), r = Ye(t, o);
27095
27095
  return _.useEffect(() => {
@@ -27162,7 +27162,7 @@ function Qr(e) {
27162
27162
  n((o) => o ?? String(OM++));
27163
27163
  }, [e]), t ? `radix-${t}` : "";
27164
27164
  }
27165
- const NM = ["top", "right", "bottom", "left"], vr = Math.min, Xe = Math.max, Qi = Math.round, ui = Math.floor, Zt = (e) => ({
27165
+ const NM = ["top", "right", "bottom", "left"], vr = Math.min, Xe = Math.max, Xi = Math.round, ui = Math.floor, Zt = (e) => ({
27166
27166
  x: e,
27167
27167
  y: e
27168
27168
  }), PM = {
@@ -27203,10 +27203,10 @@ function RM(e, t, n) {
27203
27203
  n === void 0 && (n = !1);
27204
27204
  const o = _n(e), r = hd(e), i = md(r);
27205
27205
  let a = r === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
27206
- return t.reference[i] > t.floating[i] && (a = Xi(a)), [a, Xi(a)];
27206
+ return t.reference[i] > t.floating[i] && (a = ea(a)), [a, ea(a)];
27207
27207
  }
27208
27208
  function zM(e) {
27209
- const t = Xi(e);
27209
+ const t = ea(e);
27210
27210
  return [Hl(e), t, Hl(t)];
27211
27211
  }
27212
27212
  function Hl(e) {
@@ -27230,7 +27230,7 @@ function UM(e, t, n, o) {
27230
27230
  let i = DM(Xt(e), n === "start", o);
27231
27231
  return r && (i = i.map((a) => a + "-" + r), t && (i = i.concat(i.map(Hl)))), i;
27232
27232
  }
27233
- function Xi(e) {
27233
+ function ea(e) {
27234
27234
  return e.replace(/left|right|bottom|top/g, (t) => PM[t]);
27235
27235
  }
27236
27236
  function LM(e) {
@@ -27250,7 +27250,7 @@ function HS(e) {
27250
27250
  left: e
27251
27251
  };
27252
27252
  }
27253
- function ea(e) {
27253
+ function ta(e) {
27254
27254
  const {
27255
27255
  x: t,
27256
27256
  y: n,
@@ -27393,7 +27393,7 @@ async function lo(e, t) {
27393
27393
  elementContext: d = "floating",
27394
27394
  altBoundary: f = !1,
27395
27395
  padding: p = 0
27396
- } = Qt(t, e), h = HS(p), b = s[f ? d === "floating" ? "reference" : "floating" : d], y = ea(await i.getClippingRect({
27396
+ } = Qt(t, e), h = HS(p), b = s[f ? d === "floating" ? "reference" : "floating" : d], y = ta(await i.getClippingRect({
27397
27397
  element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(s.floating)),
27398
27398
  boundary: l,
27399
27399
  rootBoundary: c,
@@ -27409,7 +27409,7 @@ async function lo(e, t) {
27409
27409
  } : {
27410
27410
  x: 1,
27411
27411
  y: 1
27412
- }, k = ea(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
27412
+ }, k = ta(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
27413
27413
  elements: s,
27414
27414
  rect: $,
27415
27415
  offsetParent: S,
@@ -27483,7 +27483,7 @@ const FM = (e) => ({
27483
27483
  } = Qt(e, t);
27484
27484
  if ((n = i.arrow) != null && n.alignmentOffset)
27485
27485
  return {};
27486
- const y = Xt(r), $ = Ut(s), S = Xt(s) === s, v = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), k = f || (S || !m ? [Xi(s)] : zM(s)), O = h !== "none";
27486
+ const y = Xt(r), $ = Ut(s), S = Xt(s) === s, v = await (u.isRTL == null ? void 0 : u.isRTL(l.floating)), k = f || (S || !m ? [ea(s)] : zM(s)), O = h !== "none";
27487
27487
  !f && O && k.push(...UM(s, m, h, v));
27488
27488
  const I = [s, ...k], T = await lo(t, b), j = [];
27489
27489
  let Z = ((o = i.flip) == null ? void 0 : o.overflows) || [];
@@ -27782,7 +27782,7 @@ const JM = function(e) {
27782
27782
  }
27783
27783
  };
27784
27784
  };
27785
- function us() {
27785
+ function cs() {
27786
27786
  return typeof window < "u";
27787
27787
  }
27788
27788
  function wn(e) {
@@ -27797,16 +27797,16 @@ function Bt(e) {
27797
27797
  return (t = (KS(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
27798
27798
  }
27799
27799
  function KS(e) {
27800
- return us() ? e instanceof Node || e instanceof et(e).Node : !1;
27800
+ return cs() ? e instanceof Node || e instanceof et(e).Node : !1;
27801
27801
  }
27802
27802
  function Ot(e) {
27803
- return us() ? e instanceof Element || e instanceof et(e).Element : !1;
27803
+ return cs() ? e instanceof Element || e instanceof et(e).Element : !1;
27804
27804
  }
27805
27805
  function qt(e) {
27806
- return us() ? e instanceof HTMLElement || e instanceof et(e).HTMLElement : !1;
27806
+ return cs() ? e instanceof HTMLElement || e instanceof et(e).HTMLElement : !1;
27807
27807
  }
27808
27808
  function im(e) {
27809
- return !us() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof et(e).ShadowRoot;
27809
+ return !cs() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof et(e).ShadowRoot;
27810
27810
  }
27811
27811
  const KM = /* @__PURE__ */ new Set(["inline", "contents"]);
27812
27812
  function Jo(e) {
@@ -27823,7 +27823,7 @@ function QM(e) {
27823
27823
  return YM.has(wn(e));
27824
27824
  }
27825
27825
  const XM = [":popover-open", ":modal"];
27826
- function cs(e) {
27826
+ function ds(e) {
27827
27827
  return XM.some((t) => {
27828
27828
  try {
27829
27829
  return e.matches(t);
@@ -27842,7 +27842,7 @@ function nD(e) {
27842
27842
  for (; qt(t) && !fn(t); ) {
27843
27843
  if (gd(t))
27844
27844
  return t;
27845
- if (cs(t))
27845
+ if (ds(t))
27846
27846
  return null;
27847
27847
  t = yr(t);
27848
27848
  }
@@ -27858,7 +27858,7 @@ function fn(e) {
27858
27858
  function Nt(e) {
27859
27859
  return et(e).getComputedStyle(e);
27860
27860
  }
27861
- function ds(e) {
27861
+ function ps(e) {
27862
27862
  return Ot(e) ? {
27863
27863
  scrollLeft: e.scrollLeft,
27864
27864
  scrollTop: e.scrollTop
@@ -27899,7 +27899,7 @@ function Gl(e) {
27899
27899
  function QS(e) {
27900
27900
  const t = Nt(e);
27901
27901
  let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
27902
- const r = qt(e), i = r ? e.offsetWidth : n, a = r ? e.offsetHeight : o, s = Qi(n) !== i || Qi(o) !== a;
27902
+ const r = qt(e), i = r ? e.offsetWidth : n, a = r ? e.offsetHeight : o, s = Xi(n) !== i || Xi(o) !== a;
27903
27903
  return s && (n = i, o = a), {
27904
27904
  width: n,
27905
27905
  height: o,
@@ -27918,7 +27918,7 @@ function Xr(e) {
27918
27918
  height: r,
27919
27919
  $: i
27920
27920
  } = QS(t);
27921
- let a = (i ? Qi(n.width) : n.width) / o, s = (i ? Qi(n.height) : n.height) / r;
27921
+ let a = (i ? Xi(n.width) : n.width) / o, s = (i ? Xi(n.height) : n.height) / r;
27922
27922
  return (!a || !Number.isFinite(a)) && (a = 1), (!s || !Number.isFinite(s)) && (s = 1), {
27923
27923
  x: a,
27924
27924
  y: s
@@ -27950,7 +27950,7 @@ function Rr(e, t, n, o) {
27950
27950
  u *= b.x, l *= b.y, c *= b.x, d *= b.y, u += S, l += v, h = et(m), m = Gl(h);
27951
27951
  }
27952
27952
  }
27953
- return ea({
27953
+ return ta({
27954
27954
  width: c,
27955
27955
  height: d,
27956
27956
  x: u,
@@ -27958,7 +27958,7 @@ function Rr(e, t, n, o) {
27958
27958
  });
27959
27959
  }
27960
27960
  function bd(e, t) {
27961
- const n = ds(e).scrollLeft;
27961
+ const n = ps(e).scrollLeft;
27962
27962
  return t ? t.left + n : Rr(Bt(e)).left + n;
27963
27963
  }
27964
27964
  function ex(e, t, n) {
@@ -27979,7 +27979,7 @@ function sD(e) {
27979
27979
  offsetParent: o,
27980
27980
  strategy: r
27981
27981
  } = e;
27982
- const i = r === "fixed", a = Bt(o), s = t ? cs(t.floating) : !1;
27982
+ const i = r === "fixed", a = Bt(o), s = t ? ds(t.floating) : !1;
27983
27983
  if (o === a || s && i)
27984
27984
  return n;
27985
27985
  let u = {
@@ -27987,7 +27987,7 @@ function sD(e) {
27987
27987
  scrollTop: 0
27988
27988
  }, l = Zt(1);
27989
27989
  const c = Zt(0), d = qt(o);
27990
- if ((d || !d && !i) && ((wn(o) !== "body" || Jo(a)) && (u = ds(o)), qt(o))) {
27990
+ if ((d || !d && !i) && ((wn(o) !== "body" || Jo(a)) && (u = ps(o)), qt(o))) {
27991
27991
  const p = Rr(o);
27992
27992
  l = Xr(o), c.x = p.x + o.clientLeft, c.y = p.y + o.clientTop;
27993
27993
  }
@@ -28003,7 +28003,7 @@ function lD(e) {
28003
28003
  return Array.from(e.getClientRects());
28004
28004
  }
28005
28005
  function uD(e) {
28006
- const t = Bt(e), n = ds(e), o = e.ownerDocument.body, r = Xe(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = Xe(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
28006
+ const t = Bt(e), n = ps(e), o = e.ownerDocument.body, r = Xe(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), i = Xe(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
28007
28007
  let a = -n.scrollLeft + bd(e);
28008
28008
  const s = -n.scrollTop;
28009
28009
  return Nt(o).direction === "rtl" && (a += Xe(t.clientWidth, o.clientWidth) - r), {
@@ -28055,7 +28055,7 @@ function am(e, t, n) {
28055
28055
  height: t.height
28056
28056
  };
28057
28057
  }
28058
- return ea(o);
28058
+ return ta(o);
28059
28059
  }
28060
28060
  function tx(e, t) {
28061
28061
  const n = yr(e);
@@ -28081,7 +28081,7 @@ function mD(e) {
28081
28081
  rootBoundary: o,
28082
28082
  strategy: r
28083
28083
  } = e;
28084
- const a = [...n === "clippingAncestors" ? cs(t) ? [] : fD(t, this._c) : [].concat(n), o], s = a[0], u = a.reduce((l, c) => {
28084
+ const a = [...n === "clippingAncestors" ? ds(t) ? [] : fD(t, this._c) : [].concat(n), o], s = a[0], u = a.reduce((l, c) => {
28085
28085
  const d = am(t, c, r);
28086
28086
  return l.top = Xe(d.top, l.top), l.right = vr(d.right, l.right), l.bottom = vr(d.bottom, l.bottom), l.left = Xe(d.left, l.left), l;
28087
28087
  }, am(t, s, r));
@@ -28113,7 +28113,7 @@ function gD(e, t, n) {
28113
28113
  u.x = bd(r);
28114
28114
  }
28115
28115
  if (o || !o && !i)
28116
- if ((wn(t) !== "body" || Jo(r)) && (s = ds(t)), o) {
28116
+ if ((wn(t) !== "body" || Jo(r)) && (s = ps(t)), o) {
28117
28117
  const p = Rr(t, !0, i, t);
28118
28118
  u.x = p.x + t.clientLeft, u.y = p.y + t.clientTop;
28119
28119
  } else r && l();
@@ -28126,7 +28126,7 @@ function gD(e, t, n) {
28126
28126
  height: a.height
28127
28127
  };
28128
28128
  }
28129
- function el(e) {
28129
+ function tl(e) {
28130
28130
  return Nt(e).position === "static";
28131
28131
  }
28132
28132
  function sm(e, t) {
@@ -28139,21 +28139,21 @@ function sm(e, t) {
28139
28139
  }
28140
28140
  function rx(e, t) {
28141
28141
  const n = et(e);
28142
- if (cs(e))
28142
+ if (ds(e))
28143
28143
  return n;
28144
28144
  if (!qt(e)) {
28145
28145
  let r = yr(e);
28146
28146
  for (; r && !fn(r); ) {
28147
- if (Ot(r) && !el(r))
28147
+ if (Ot(r) && !tl(r))
28148
28148
  return r;
28149
28149
  r = yr(r);
28150
28150
  }
28151
28151
  return n;
28152
28152
  }
28153
28153
  let o = sm(e, t);
28154
- for (; o && QM(o) && el(o); )
28154
+ for (; o && QM(o) && tl(o); )
28155
28155
  o = sm(o, t);
28156
- return o && fn(o) && el(o) && !gd(o) ? n : o || nD(e) || n;
28156
+ return o && fn(o) && tl(o) && !gd(o) ? n : o || nD(e) || n;
28157
28157
  }
28158
28158
  const vD = async function(e) {
28159
28159
  const t = this.getOffsetParent || rx, n = this.getDimensions, o = await n(e.floating);
@@ -28282,7 +28282,7 @@ const $D = JM, SD = WM, xD = qM, ID = GM, kD = VM, lm = FM, ED = HM, TD = (e, t,
28282
28282
  };
28283
28283
  var OD = typeof document < "u", ND = function() {
28284
28284
  }, _i = OD ? H0 : ND;
28285
- function ta(e, t) {
28285
+ function ra(e, t) {
28286
28286
  if (e === t)
28287
28287
  return !0;
28288
28288
  if (typeof e != typeof t)
@@ -28294,7 +28294,7 @@ function ta(e, t) {
28294
28294
  if (Array.isArray(e)) {
28295
28295
  if (n = e.length, n !== t.length) return !1;
28296
28296
  for (o = n; o-- !== 0; )
28297
- if (!ta(e[o], t[o]))
28297
+ if (!ra(e[o], t[o]))
28298
28298
  return !1;
28299
28299
  return !0;
28300
28300
  }
@@ -28305,7 +28305,7 @@ function ta(e, t) {
28305
28305
  return !1;
28306
28306
  for (o = n; o-- !== 0; ) {
28307
28307
  const i = r[o];
28308
- if (!(i === "_owner" && e.$$typeof) && !ta(e[i], t[i]))
28308
+ if (!(i === "_owner" && e.$$typeof) && !ra(e[i], t[i]))
28309
28309
  return !1;
28310
28310
  }
28311
28311
  return !0;
@@ -28319,7 +28319,7 @@ function um(e, t) {
28319
28319
  const n = ox(e);
28320
28320
  return Math.round(t * n) / n;
28321
28321
  }
28322
- function tl(e) {
28322
+ function rl(e) {
28323
28323
  const t = _.useRef(e);
28324
28324
  return _i(() => {
28325
28325
  t.current = e;
@@ -28347,12 +28347,12 @@ function PD(e) {
28347
28347
  middlewareData: {},
28348
28348
  isPositioned: !1
28349
28349
  }), [f, p] = _.useState(o);
28350
- ta(f, o) || p(o);
28350
+ ra(f, o) || p(o);
28351
28351
  const [h, m] = _.useState(null), [b, y] = _.useState(null), $ = _.useCallback((G) => {
28352
28352
  G !== O.current && (O.current = G, m(G));
28353
28353
  }, []), S = _.useCallback((G) => {
28354
28354
  G !== I.current && (I.current = G, y(G));
28355
- }, []), v = i || h, k = a || b, O = _.useRef(null), I = _.useRef(null), T = _.useRef(c), j = u != null, Z = tl(u), ee = tl(r), oe = tl(l), B = _.useCallback(() => {
28355
+ }, []), v = i || h, k = a || b, O = _.useRef(null), I = _.useRef(null), T = _.useRef(c), j = u != null, Z = rl(u), ee = rl(r), oe = rl(l), B = _.useCallback(() => {
28356
28356
  if (!O.current || !I.current)
28357
28357
  return;
28358
28358
  const G = {
@@ -28369,7 +28369,7 @@ function PD(e) {
28369
28369
  // setting it to `true` when `open === false` (must be specified).
28370
28370
  isPositioned: oe.current !== !1
28371
28371
  };
28372
- q.current && !ta(T.current, V) && (T.current = V, Pm.flushSync(() => {
28372
+ q.current && !ra(T.current, V) && (T.current = V, Pm.flushSync(() => {
28373
28373
  d(V);
28374
28374
  }));
28375
28375
  });
@@ -28509,7 +28509,7 @@ function FD(e) {
28509
28509
  n(void 0);
28510
28510
  }, [e]), t;
28511
28511
  }
28512
- var _d = "Popper", [ax, ps] = Bo(_d), [qD, sx] = ax(_d), lx = (e) => {
28512
+ var _d = "Popper", [ax, fs] = Bo(_d), [qD, sx] = ax(_d), lx = (e) => {
28513
28513
  const { __scopePopper: t, children: n } = e, [o, r] = _.useState(null);
28514
28514
  return /* @__PURE__ */ g(qD, { scope: t, anchor: o, onAnchorChange: r, children: n });
28515
28515
  };
@@ -28567,9 +28567,9 @@ var wd = "PopperContent", [VD, BD] = ax(wd), dx = _.forwardRef(
28567
28567
  u && jD({ ...B }),
28568
28568
  MD({
28569
28569
  ...B,
28570
- apply: ({ elements: we, rects: Go, availableWidth: ws, availableHeight: $n }) => {
28570
+ apply: ({ elements: we, rects: Go, availableWidth: $s, availableHeight: $n }) => {
28571
28571
  const { width: mt, height: Ko } = Go.reference, Re = we.floating.style;
28572
- Re.setProperty("--radix-popper-available-width", `${ws}px`), Re.setProperty("--radix-popper-available-height", `${$n}px`), Re.setProperty("--radix-popper-anchor-width", `${mt}px`), Re.setProperty("--radix-popper-anchor-height", `${Ko}px`);
28572
+ Re.setProperty("--radix-popper-available-width", `${$s}px`), Re.setProperty("--radix-popper-available-height", `${$n}px`), Re.setProperty("--radix-popper-anchor-width", `${mt}px`), Re.setProperty("--radix-popper-anchor-height", `${Ko}px`);
28573
28573
  }
28574
28574
  }),
28575
28575
  v && UD({ element: v, padding: s }),
@@ -28705,13 +28705,13 @@ function mx(e) {
28705
28705
  const [t, n = "center"] = e.split("-");
28706
28706
  return [t, n];
28707
28707
  }
28708
- var hx = lx, $d = cx, gx = dx, vx = fx, GD = "Portal", fs = _.forwardRef((e, t) => {
28708
+ var hx = lx, $d = cx, gx = dx, vx = fx, GD = "Portal", ms = _.forwardRef((e, t) => {
28709
28709
  const { container: n, ...o } = e, [r, i] = _.useState(!1);
28710
28710
  dt(() => i(!0), []);
28711
28711
  const a = n || r && globalThis?.document?.body;
28712
28712
  return a ? sI.createPortal(/* @__PURE__ */ g(Ae.div, { ...o, ref: t }), a) : null;
28713
28713
  });
28714
- fs.displayName = GD;
28714
+ ms.displayName = GD;
28715
28715
  function KD(e, t) {
28716
28716
  return _.useReducer((n, o) => t[n][o] ?? n, e);
28717
28717
  }
@@ -28777,7 +28777,7 @@ function QD(e) {
28777
28777
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
28778
28778
  }
28779
28779
  var XD = _[" useInsertionEffect ".trim().toString()] || dt;
28780
- function ms({
28780
+ function hs({
28781
28781
  prop: e,
28782
28782
  defaultProp: t,
28783
28783
  onChange: n = () => {
@@ -28846,9 +28846,9 @@ var rU = Object.freeze({
28846
28846
  )
28847
28847
  );
28848
28848
  yx.displayName = nU;
28849
- var oU = yx, [hs] = Bo("Tooltip", [
28850
- ps
28851
- ]), gs = ps(), bx = "TooltipProvider", iU = 700, Kl = "tooltip.open", [aU, Sd] = hs(bx), _x = (e) => {
28849
+ var oU = yx, [gs] = Bo("Tooltip", [
28850
+ fs
28851
+ ]), vs = fs(), bx = "TooltipProvider", iU = 700, Kl = "tooltip.open", [aU, Sd] = gs(bx), _x = (e) => {
28852
28852
  const {
28853
28853
  __scopeTooltip: t,
28854
28854
  delayDuration: n = iU,
@@ -28884,7 +28884,7 @@ var oU = yx, [hs] = Bo("Tooltip", [
28884
28884
  );
28885
28885
  };
28886
28886
  _x.displayName = bx;
28887
- var co = "Tooltip", [sU, Wo] = hs(co), wx = (e) => {
28887
+ var co = "Tooltip", [sU, Wo] = gs(co), wx = (e) => {
28888
28888
  const {
28889
28889
  __scopeTooltip: t,
28890
28890
  children: n,
@@ -28893,7 +28893,7 @@ var co = "Tooltip", [sU, Wo] = hs(co), wx = (e) => {
28893
28893
  onOpenChange: i,
28894
28894
  disableHoverableContent: a,
28895
28895
  delayDuration: s
28896
- } = e, u = Sd(co, e.__scopeTooltip), l = gs(t), [c, d] = _.useState(null), f = Qr(), p = _.useRef(0), h = a ?? u.disableHoverableContent, m = s ?? u.delayDuration, b = _.useRef(!1), [y, $] = ms({
28896
+ } = e, u = Sd(co, e.__scopeTooltip), l = vs(t), [c, d] = _.useState(null), f = Qr(), p = _.useRef(0), h = a ?? u.disableHoverableContent, m = s ?? u.delayDuration, b = _.useRef(!1), [y, $] = hs({
28897
28897
  prop: o,
28898
28898
  defaultProp: r ?? !1,
28899
28899
  onChange: (I) => {
@@ -28936,7 +28936,7 @@ var co = "Tooltip", [sU, Wo] = hs(co), wx = (e) => {
28936
28936
  wx.displayName = co;
28937
28937
  var Yl = "TooltipTrigger", $x = _.forwardRef(
28938
28938
  (e, t) => {
28939
- const { __scopeTooltip: n, ...o } = e, r = Wo(Yl, n), i = Sd(Yl, n), a = gs(n), s = _.useRef(null), u = Ye(t, s, r.onTriggerChange), l = _.useRef(!1), c = _.useRef(!1), d = _.useCallback(() => l.current = !1, []);
28939
+ const { __scopeTooltip: n, ...o } = e, r = Wo(Yl, n), i = Sd(Yl, n), a = vs(n), s = _.useRef(null), u = Ye(t, s, r.onTriggerChange), l = _.useRef(!1), c = _.useRef(!1), d = _.useCallback(() => l.current = !1, []);
28940
28940
  return _.useEffect(() => () => document.removeEventListener("pointerup", d), [d]), /* @__PURE__ */ g($d, { asChild: !0, ...a, children: /* @__PURE__ */ g(
28941
28941
  Ae.button,
28942
28942
  {
@@ -28963,11 +28963,11 @@ var Yl = "TooltipTrigger", $x = _.forwardRef(
28963
28963
  }
28964
28964
  );
28965
28965
  $x.displayName = Yl;
28966
- var xd = "TooltipPortal", [lU, uU] = hs(xd, {
28966
+ var xd = "TooltipPortal", [lU, uU] = gs(xd, {
28967
28967
  forceMount: void 0
28968
28968
  }), Sx = (e) => {
28969
28969
  const { __scopeTooltip: t, forceMount: n, children: o, container: r } = e, i = Wo(xd, t);
28970
- return /* @__PURE__ */ g(lU, { scope: t, forceMount: n, children: /* @__PURE__ */ g(rr, { present: n || i.open, children: /* @__PURE__ */ g(fs, { asChild: !0, container: r, children: o }) }) });
28970
+ return /* @__PURE__ */ g(lU, { scope: t, forceMount: n, children: /* @__PURE__ */ g(rr, { present: n || i.open, children: /* @__PURE__ */ g(ms, { asChild: !0, container: r, children: o }) }) });
28971
28971
  };
28972
28972
  Sx.displayName = xd;
28973
28973
  var mn = "TooltipContent", xx = _.forwardRef(
@@ -29001,7 +29001,7 @@ var mn = "TooltipContent", xx = _.forwardRef(
29001
29001
  return document.addEventListener("pointermove", h), () => document.removeEventListener("pointermove", h);
29002
29002
  }
29003
29003
  }, [u, c, a, l, f]), /* @__PURE__ */ g(Ix, { ...e, ref: i });
29004
- }), [dU, pU] = hs(co, { isInside: !1 }), fU = /* @__PURE__ */ mM("TooltipContent"), Ix = _.forwardRef(
29004
+ }), [dU, pU] = gs(co, { isInside: !1 }), fU = /* @__PURE__ */ mM("TooltipContent"), Ix = _.forwardRef(
29005
29005
  (e, t) => {
29006
29006
  const {
29007
29007
  __scopeTooltip: n,
@@ -29010,7 +29010,7 @@ var mn = "TooltipContent", xx = _.forwardRef(
29010
29010
  onEscapeKeyDown: i,
29011
29011
  onPointerDownOutside: a,
29012
29012
  ...s
29013
- } = e, u = Wo(mn, n), l = gs(n), { onClose: c } = u;
29013
+ } = e, u = Wo(mn, n), l = vs(n), { onClose: c } = u;
29014
29014
  return _.useEffect(() => (document.addEventListener(Kl, c), () => document.removeEventListener(Kl, c)), [c]), _.useEffect(() => {
29015
29015
  if (u.trigger) {
29016
29016
  const d = (f) => {
@@ -29019,7 +29019,7 @@ var mn = "TooltipContent", xx = _.forwardRef(
29019
29019
  return window.addEventListener("scroll", d, { capture: !0 }), () => window.removeEventListener("scroll", d, { capture: !0 });
29020
29020
  }
29021
29021
  }, [u.trigger, c]), /* @__PURE__ */ g(
29022
- ls,
29022
+ us,
29023
29023
  {
29024
29024
  asChild: !0,
29025
29025
  disableOutsidePointerEvents: !1,
@@ -29055,7 +29055,7 @@ var mn = "TooltipContent", xx = _.forwardRef(
29055
29055
  xx.displayName = mn;
29056
29056
  var kx = "TooltipArrow", Ex = _.forwardRef(
29057
29057
  (e, t) => {
29058
- const { __scopeTooltip: n, ...o } = e, r = gs(n);
29058
+ const { __scopeTooltip: n, ...o } = e, r = vs(n);
29059
29059
  return pU(
29060
29060
  kx,
29061
29061
  n
@@ -29202,7 +29202,7 @@ function Ed({
29202
29202
  }
29203
29203
  ) });
29204
29204
  }
29205
- var rl = "focusScope.autoFocusOnMount", nl = "focusScope.autoFocusOnUnmount", cm = { bubbles: !1, cancelable: !0 }, kU = "FocusScope", Td = _.forwardRef((e, t) => {
29205
+ var nl = "focusScope.autoFocusOnMount", ol = "focusScope.autoFocusOnUnmount", cm = { bubbles: !1, cancelable: !0 }, kU = "FocusScope", Td = _.forwardRef((e, t) => {
29206
29206
  const {
29207
29207
  loop: n = !1,
29208
29208
  trapped: o = !1,
@@ -29244,13 +29244,13 @@ var rl = "focusScope.autoFocusOnMount", nl = "focusScope.autoFocusOnUnmount", cm
29244
29244
  pm.add(p);
29245
29245
  const m = document.activeElement;
29246
29246
  if (!s.contains(m)) {
29247
- const y = new CustomEvent(rl, cm);
29248
- s.addEventListener(rl, l), s.dispatchEvent(y), y.defaultPrevented || (EU(CU(Ox(s)), { select: !0 }), document.activeElement === m && ir(s));
29247
+ const y = new CustomEvent(nl, cm);
29248
+ s.addEventListener(nl, l), s.dispatchEvent(y), y.defaultPrevented || (EU(CU(Ox(s)), { select: !0 }), document.activeElement === m && ir(s));
29249
29249
  }
29250
29250
  return () => {
29251
- s.removeEventListener(rl, l), setTimeout(() => {
29252
- const y = new CustomEvent(nl, cm);
29253
- s.addEventListener(nl, c), s.dispatchEvent(y), y.defaultPrevented || ir(m ?? document.body, { select: !0 }), s.removeEventListener(nl, c), pm.remove(p);
29251
+ s.removeEventListener(nl, l), setTimeout(() => {
29252
+ const y = new CustomEvent(ol, cm);
29253
+ s.addEventListener(ol, c), s.dispatchEvent(y), y.defaultPrevented || ir(m ?? document.body, { select: !0 }), s.removeEventListener(ol, c), pm.remove(p);
29254
29254
  }, 0);
29255
29255
  };
29256
29256
  }
@@ -29330,12 +29330,12 @@ function fm(e, t) {
29330
29330
  function CU(e) {
29331
29331
  return e.filter((t) => t.tagName !== "A");
29332
29332
  }
29333
- var ol = 0;
29333
+ var il = 0;
29334
29334
  function Nx() {
29335
29335
  _.useEffect(() => {
29336
29336
  const e = document.querySelectorAll("[data-radix-focus-guard]");
29337
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? mm()), document.body.insertAdjacentElement("beforeend", e[1] ?? mm()), ol++, () => {
29338
- ol === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), ol--;
29337
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? mm()), document.body.insertAdjacentElement("beforeend", e[1] ?? mm()), il++, () => {
29338
+ il === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), il--;
29339
29339
  };
29340
29340
  }, []);
29341
29341
  }
@@ -29366,7 +29366,7 @@ function AU(e, t, n) {
29366
29366
  return e.concat(i || Array.prototype.slice.call(t));
29367
29367
  }
29368
29368
  var wi = "right-scroll-bar-position", $i = "width-before-scroll-bar", RU = "with-scroll-bars-hidden", zU = "--removed-body-scroll-bar-size";
29369
- function il(e, t) {
29369
+ function al(e, t) {
29370
29370
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
29371
29371
  }
29372
29372
  function jU(e, t) {
@@ -29394,7 +29394,7 @@ var MU = typeof window < "u" ? _.useLayoutEffect : _.useEffect, hm = /* @__PURE_
29394
29394
  function DU(e, t) {
29395
29395
  var n = jU(null, function(o) {
29396
29396
  return e.forEach(function(r) {
29397
- return il(r, o);
29397
+ return al(r, o);
29398
29398
  });
29399
29399
  });
29400
29400
  return MU(function() {
@@ -29402,9 +29402,9 @@ function DU(e, t) {
29402
29402
  if (o) {
29403
29403
  var r = new Set(o), i = new Set(e), a = n.current;
29404
29404
  r.forEach(function(s) {
29405
- i.has(s) || il(s, null);
29405
+ i.has(s) || al(s, null);
29406
29406
  }), i.forEach(function(s) {
29407
- r.has(s) || il(s, a);
29407
+ r.has(s) || al(s, a);
29408
29408
  });
29409
29409
  }
29410
29410
  hm.set(n, e);
@@ -29486,12 +29486,12 @@ Cx.isSideCarExport = !0;
29486
29486
  function FU(e, t) {
29487
29487
  return e.useMedium(t), Cx;
29488
29488
  }
29489
- var Ax = ZU(), al = function() {
29490
- }, vs = _.forwardRef(function(e, t) {
29489
+ var Ax = ZU(), sl = function() {
29490
+ }, ys = _.forwardRef(function(e, t) {
29491
29491
  var n = _.useRef(null), o = _.useState({
29492
- onScrollCapture: al,
29493
- onWheelCapture: al,
29494
- onTouchMoveCapture: al
29492
+ onScrollCapture: sl,
29493
+ onWheelCapture: sl,
29494
+ onTouchMoveCapture: sl
29495
29495
  }), r = o[0], i = o[1], a = e.forwardProps, s = e.children, u = e.className, l = e.removeScrollBar, c = e.enabled, d = e.shards, f = e.sideCar, p = e.noRelative, h = e.noIsolation, m = e.inert, b = e.allowPinchZoom, y = e.as, $ = y === void 0 ? "div" : y, S = e.gapMode, v = Px(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), k = f, O = DU([n, t]), I = jt(jt({}, v), r);
29496
29496
  return _.createElement(
29497
29497
  _.Fragment,
@@ -29500,12 +29500,12 @@ var Ax = ZU(), al = function() {
29500
29500
  a ? _.cloneElement(_.Children.only(s), jt(jt({}, I), { ref: O })) : _.createElement($, jt({}, I, { className: u, ref: O }), s)
29501
29501
  );
29502
29502
  });
29503
- vs.defaultProps = {
29503
+ ys.defaultProps = {
29504
29504
  enabled: !0,
29505
29505
  removeScrollBar: !0,
29506
29506
  inert: !1
29507
29507
  };
29508
- vs.classNames = {
29508
+ ys.classNames = {
29509
29509
  fullWidth: $i,
29510
29510
  zeroRight: wi
29511
29511
  };
@@ -29558,11 +29558,11 @@ var WU = function() {
29558
29558
  top: 0,
29559
29559
  right: 0,
29560
29560
  gap: 0
29561
- }, sl = function(e) {
29561
+ }, ll = function(e) {
29562
29562
  return parseInt(e || "", 10) || 0;
29563
29563
  }, KU = function(e) {
29564
29564
  var t = window.getComputedStyle(document.body), n = t[e === "padding" ? "paddingLeft" : "marginLeft"], o = t[e === "padding" ? "paddingTop" : "marginTop"], r = t[e === "padding" ? "paddingRight" : "marginRight"];
29565
- return [sl(n), sl(o), sl(r)];
29565
+ return [ll(n), ll(o), ll(r)];
29566
29566
  }, YU = function(e) {
29567
29567
  if (e === void 0 && (e = "margin"), typeof window > "u")
29568
29568
  return GU;
@@ -29812,15 +29812,15 @@ function f6(e) {
29812
29812
  }
29813
29813
  const m6 = FU(Ax, p6);
29814
29814
  var Od = _.forwardRef(function(e, t) {
29815
- return _.createElement(vs, jt({}, e, { ref: t, sideCar: m6 }));
29815
+ return _.createElement(ys, jt({}, e, { ref: t, sideCar: m6 }));
29816
29816
  });
29817
- Od.classNames = vs.classNames;
29817
+ Od.classNames = ys.classNames;
29818
29818
  var h6 = function(e) {
29819
29819
  if (typeof document > "u")
29820
29820
  return null;
29821
29821
  var t = Array.isArray(e) ? e[0] : e;
29822
29822
  return t.ownerDocument.body;
29823
- }, Jr = /* @__PURE__ */ new WeakMap(), fi = /* @__PURE__ */ new WeakMap(), mi = {}, ll = 0, Dx = function(e) {
29823
+ }, Jr = /* @__PURE__ */ new WeakMap(), fi = /* @__PURE__ */ new WeakMap(), mi = {}, ul = 0, Dx = function(e) {
29824
29824
  return e && (e.host || Dx(e.parentNode));
29825
29825
  }, g6 = function(e, t) {
29826
29826
  return t.map(function(n) {
@@ -29851,11 +29851,11 @@ var h6 = function(e) {
29851
29851
  }
29852
29852
  });
29853
29853
  };
29854
- return c(t), s.clear(), ll++, function() {
29854
+ return c(t), s.clear(), ul++, function() {
29855
29855
  a.forEach(function(d) {
29856
29856
  var f = Jr.get(d) - 1, p = i.get(d) - 1;
29857
29857
  Jr.set(d, f), i.set(d, p), f || (fi.has(d) || d.removeAttribute(o), fi.delete(d)), p || d.removeAttribute(n);
29858
- }), ll--, ll || (Jr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), fi = /* @__PURE__ */ new WeakMap(), mi = {});
29858
+ }), ul--, ul || (Jr = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), fi = /* @__PURE__ */ new WeakMap(), mi = {});
29859
29859
  };
29860
29860
  }, Ux = function(e, t, n) {
29861
29861
  n === void 0 && (n = "data-aria-hidden");
@@ -29863,7 +29863,7 @@ var h6 = function(e) {
29863
29863
  return r ? (o.push.apply(o, Array.from(r.querySelectorAll("[aria-live], script"))), v6(o, r, n, "aria-hidden")) : function() {
29864
29864
  return null;
29865
29865
  };
29866
- }, ys = "Dialog", [Lx] = Bo(ys), [y6, Pt] = Lx(ys), Zx = (e) => {
29866
+ }, bs = "Dialog", [Lx] = Bo(bs), [y6, Pt] = Lx(bs), Zx = (e) => {
29867
29867
  const {
29868
29868
  __scopeDialog: t,
29869
29869
  children: n,
@@ -29871,11 +29871,11 @@ var h6 = function(e) {
29871
29871
  defaultOpen: r,
29872
29872
  onOpenChange: i,
29873
29873
  modal: a = !0
29874
- } = e, s = _.useRef(null), u = _.useRef(null), [l, c] = ms({
29874
+ } = e, s = _.useRef(null), u = _.useRef(null), [l, c] = hs({
29875
29875
  prop: o,
29876
29876
  defaultProp: r ?? !1,
29877
29877
  onChange: i,
29878
- caller: ys
29878
+ caller: bs
29879
29879
  });
29880
29880
  return /* @__PURE__ */ g(
29881
29881
  y6,
@@ -29894,7 +29894,7 @@ var h6 = function(e) {
29894
29894
  }
29895
29895
  );
29896
29896
  };
29897
- Zx.displayName = ys;
29897
+ Zx.displayName = bs;
29898
29898
  var Fx = "DialogTrigger", qx = _.forwardRef(
29899
29899
  (e, t) => {
29900
29900
  const { __scopeDialog: n, ...o } = e, r = Pt(Fx, n), i = Ye(t, r.triggerRef);
@@ -29918,19 +29918,19 @@ var Nd = "DialogPortal", [b6, Vx] = Lx(Nd, {
29918
29918
  forceMount: void 0
29919
29919
  }), Bx = (e) => {
29920
29920
  const { __scopeDialog: t, forceMount: n, children: o, container: r } = e, i = Pt(Nd, t);
29921
- return /* @__PURE__ */ g(b6, { scope: t, forceMount: n, children: _.Children.map(o, (a) => /* @__PURE__ */ g(rr, { present: n || i.open, children: /* @__PURE__ */ g(fs, { asChild: !0, container: r, children: a }) })) });
29921
+ return /* @__PURE__ */ g(b6, { scope: t, forceMount: n, children: _.Children.map(o, (a) => /* @__PURE__ */ g(rr, { present: n || i.open, children: /* @__PURE__ */ g(ms, { asChild: !0, container: r, children: a }) })) });
29922
29922
  };
29923
29923
  Bx.displayName = Nd;
29924
- var ra = "DialogOverlay", Jx = _.forwardRef(
29924
+ var na = "DialogOverlay", Jx = _.forwardRef(
29925
29925
  (e, t) => {
29926
- const n = Vx(ra, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, i = Pt(ra, e.__scopeDialog);
29926
+ const n = Vx(na, e.__scopeDialog), { forceMount: o = n.forceMount, ...r } = e, i = Pt(na, e.__scopeDialog);
29927
29927
  return i.modal ? /* @__PURE__ */ g(rr, { present: o || i.open, children: /* @__PURE__ */ g(w6, { ...r, ref: t }) }) : null;
29928
29928
  }
29929
29929
  );
29930
- Jx.displayName = ra;
29930
+ Jx.displayName = na;
29931
29931
  var _6 = /* @__PURE__ */ pd("DialogOverlay.RemoveScroll"), w6 = _.forwardRef(
29932
29932
  (e, t) => {
29933
- const { __scopeDialog: n, ...o } = e, r = Pt(ra, n);
29933
+ const { __scopeDialog: n, ...o } = e, r = Pt(na, n);
29934
29934
  return (
29935
29935
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
29936
29936
  // ie. when `Overlay` and `Content` are siblings
@@ -30013,7 +30013,7 @@ var $6 = _.forwardRef(
30013
30013
  onMountAutoFocus: r,
30014
30014
  onUnmountAutoFocus: i,
30015
30015
  children: /* @__PURE__ */ g(
30016
- ls,
30016
+ us,
30017
30017
  {
30018
30018
  role: "dialog",
30019
30019
  id: s.contentId,
@@ -30214,7 +30214,7 @@ function F6(...e) {
30214
30214
  };
30215
30215
  return n.scopeName = t.scopeName, n;
30216
30216
  }
30217
- var q6 = Symbol.for("react.lazy"), na = _[" use ".trim().toString()];
30217
+ var q6 = Symbol.for("react.lazy"), oa = _[" use ".trim().toString()];
30218
30218
  function V6(e) {
30219
30219
  return typeof e == "object" && e !== null && "then" in e;
30220
30220
  }
@@ -30225,7 +30225,7 @@ function t0(e) {
30225
30225
  function r0(e) {
30226
30226
  const t = /* @__PURE__ */ J6(e), n = _.forwardRef((o, r) => {
30227
30227
  let { children: i, ...a } = o;
30228
- t0(i) && typeof na == "function" && (i = na(i._payload));
30228
+ t0(i) && typeof oa == "function" && (i = oa(i._payload));
30229
30229
  const s = _.Children.toArray(i), u = s.find(G6);
30230
30230
  if (u) {
30231
30231
  const l = u.props.children, c = s.map((d) => d === u ? _.Children.count(l) > 1 ? _.Children.only(null) : _.isValidElement(l) ? l.props.children : null : d);
@@ -30240,7 +30240,7 @@ var B6 = /* @__PURE__ */ r0("Slot");
30240
30240
  function J6(e) {
30241
30241
  const t = _.forwardRef((n, o) => {
30242
30242
  let { children: r, ...i } = n;
30243
- if (t0(r) && typeof na == "function" && (r = na(r._payload)), _.isValidElement(r)) {
30243
+ if (t0(r) && typeof oa == "function" && (r = oa(r._payload)), _.isValidElement(r)) {
30244
30244
  const a = Y6(r), s = K6(i, r.props);
30245
30245
  return r.type !== _.Fragment && (s.ref = o ? dd(o, a) : a), _.cloneElement(r, s);
30246
30246
  }
@@ -30590,7 +30590,7 @@ const d2 = (e) => {
30590
30590
  });
30591
30591
  return /* @__PURE__ */ U(Id, { children: [
30592
30592
  /* @__PURE__ */ U(
30593
- cl.Root,
30593
+ dl.Root,
30594
30594
  {
30595
30595
  className: R(
30596
30596
  "aui-attachment-root relative",
@@ -30614,9 +30614,9 @@ const d2 = (e) => {
30614
30614
  ]
30615
30615
  }
30616
30616
  ),
30617
- /* @__PURE__ */ g(Ed, { side: "top", children: /* @__PURE__ */ g(cl.Name, {}) })
30617
+ /* @__PURE__ */ g(Ed, { side: "top", children: /* @__PURE__ */ g(dl.Name, {}) })
30618
30618
  ] });
30619
- }, h2 = () => /* @__PURE__ */ g(cl.Remove, { asChild: !0, children: /* @__PURE__ */ g(
30619
+ }, h2 = () => /* @__PURE__ */ g(dl.Remove, { asChild: !0, children: /* @__PURE__ */ g(
30620
30620
  pt,
30621
30621
  {
30622
30622
  tooltip: "Remove file",
@@ -30857,7 +30857,7 @@ const _2 = () => {
30857
30857
  },
30858
30858
  CodeHeader: w2
30859
30859
  });
30860
- var bs = "Collapsible", [x2] = Bo(bs), [I2, zd] = x2(bs), m0 = _.forwardRef(
30860
+ var _s = "Collapsible", [x2] = Bo(_s), [I2, zd] = x2(_s), m0 = _.forwardRef(
30861
30861
  (e, t) => {
30862
30862
  const {
30863
30863
  __scopeCollapsible: n,
@@ -30866,11 +30866,11 @@ var bs = "Collapsible", [x2] = Bo(bs), [I2, zd] = x2(bs), m0 = _.forwardRef(
30866
30866
  disabled: i,
30867
30867
  onOpenChange: a,
30868
30868
  ...s
30869
- } = e, [u, l] = ms({
30869
+ } = e, [u, l] = hs({
30870
30870
  prop: o,
30871
30871
  defaultProp: r ?? !1,
30872
30872
  onChange: a,
30873
- caller: bs
30873
+ caller: _s
30874
30874
  });
30875
30875
  return /* @__PURE__ */ g(
30876
30876
  I2,
@@ -30893,7 +30893,7 @@ var bs = "Collapsible", [x2] = Bo(bs), [I2, zd] = x2(bs), m0 = _.forwardRef(
30893
30893
  );
30894
30894
  }
30895
30895
  );
30896
- m0.displayName = bs;
30896
+ m0.displayName = _s;
30897
30897
  var h0 = "CollapsibleTrigger", g0 = _.forwardRef(
30898
30898
  (e, t) => {
30899
30899
  const { __scopeCollapsible: n, ...o } = e, r = zd(h0, n);
@@ -31122,9 +31122,9 @@ const A2 = () => /* @__PURE__ */ g(f0, {}), R2 = ({
31122
31122
  w0.displayName = "Reasoning";
31123
31123
  const $0 = Xl(R2);
31124
31124
  $0.displayName = "ReasoningGroup";
31125
- var _s = "Popover", [S0] = Bo(_s, [
31126
- ps
31127
- ]), Ho = ps(), [z2, wr] = S0(_s), x0 = (e) => {
31125
+ var ws = "Popover", [S0] = Bo(ws, [
31126
+ fs
31127
+ ]), Ho = fs(), [z2, wr] = S0(ws), x0 = (e) => {
31128
31128
  const {
31129
31129
  __scopePopover: t,
31130
31130
  children: n,
@@ -31132,11 +31132,11 @@ var _s = "Popover", [S0] = Bo(_s, [
31132
31132
  defaultOpen: r,
31133
31133
  onOpenChange: i,
31134
31134
  modal: a = !1
31135
- } = e, s = Ho(t), u = _.useRef(null), [l, c] = _.useState(!1), [d, f] = ms({
31135
+ } = e, s = Ho(t), u = _.useRef(null), [l, c] = _.useState(!1), [d, f] = hs({
31136
31136
  prop: o,
31137
31137
  defaultProp: r ?? !1,
31138
31138
  onChange: i,
31139
- caller: _s
31139
+ caller: ws
31140
31140
  });
31141
31141
  return /* @__PURE__ */ g(hx, { ...s, children: /* @__PURE__ */ g(
31142
31142
  z2,
@@ -31155,7 +31155,7 @@ var _s = "Popover", [S0] = Bo(_s, [
31155
31155
  }
31156
31156
  ) });
31157
31157
  };
31158
- x0.displayName = _s;
31158
+ x0.displayName = ws;
31159
31159
  var I0 = "PopoverAnchor", j2 = _.forwardRef(
31160
31160
  (e, t) => {
31161
31161
  const { __scopePopover: n, ...o } = e, r = wr(I0, n), i = Ho(n), { onCustomAnchorAdd: a, onCustomAnchorRemove: s } = r;
@@ -31186,7 +31186,7 @@ var Dd = "PopoverPortal", [M2, D2] = S0(Dd, {
31186
31186
  forceMount: void 0
31187
31187
  }), T0 = (e) => {
31188
31188
  const { __scopePopover: t, forceMount: n, children: o, container: r } = e, i = wr(Dd, t);
31189
- return /* @__PURE__ */ g(M2, { scope: t, forceMount: n, children: /* @__PURE__ */ g(rr, { present: n || i.open, children: /* @__PURE__ */ g(fs, { asChild: !0, container: r, children: o }) }) });
31189
+ return /* @__PURE__ */ g(M2, { scope: t, forceMount: n, children: /* @__PURE__ */ g(rr, { present: n || i.open, children: /* @__PURE__ */ g(ms, { asChild: !0, container: r, children: o }) }) });
31190
31190
  };
31191
31191
  T0.displayName = Dd;
31192
31192
  var hn = "PopoverContent", O0 = _.forwardRef(
@@ -31272,7 +31272,7 @@ var U2 = /* @__PURE__ */ pd("PopoverContent.RemoveScroll"), L2 = _.forwardRef(
31272
31272
  onMountAutoFocus: r,
31273
31273
  onUnmountAutoFocus: i,
31274
31274
  children: /* @__PURE__ */ g(
31275
- ls,
31275
+ us,
31276
31276
  {
31277
31277
  asChild: !0,
31278
31278
  disableOutsidePointerEvents: a,
@@ -31413,10 +31413,10 @@ function Q2(e) {
31413
31413
  function j0({ status: e }) {
31414
31414
  return /* @__PURE__ */ U("div", { className: R(G2({ status: e })), children: [
31415
31415
  e === "pending" && null,
31416
- e === "running" && /* @__PURE__ */ g(kl, { className: "size-4 animate-spin" }),
31416
+ e === "running" && /* @__PURE__ */ g(Fi, { className: "size-4 animate-spin" }),
31417
31417
  e === "complete" && /* @__PURE__ */ g(cr, { className: "size-4" }),
31418
31418
  e === "error" && /* @__PURE__ */ g(Zo, { className: "size-4" }),
31419
- e === "approval" && /* @__PURE__ */ g(kl, { className: "text-muted-foreground size-4 animate-spin" })
31419
+ e === "approval" && /* @__PURE__ */ g(Fi, { className: "text-muted-foreground size-4 animate-spin" })
31420
31420
  ] });
31421
31421
  }
31422
31422
  function X2({ content: e }) {
@@ -32402,7 +32402,7 @@ const aL = ({ children: e }) => {
32402
32402
  children: [
32403
32403
  /* @__PURE__ */ g("span", { className: "truncate", children: l }),
32404
32404
  b && /* @__PURE__ */ g(
32405
- kl,
32405
+ Fi,
32406
32406
  {
32407
32407
  className: "text-muted-foreground size-4.5 animate-spin",
32408
32408
  strokeWidth: 1.25
@@ -32535,14 +32535,23 @@ const xL = () => {
32535
32535
  ),
32536
32536
  children: [
32537
32537
  /* @__PURE__ */ U("div", { className: "aui-sidecar-header flex h-14 items-center justify-between border-b px-4", children: [
32538
- /* @__PURE__ */ g(
32538
+ /* @__PURE__ */ U(
32539
32539
  "span",
32540
32540
  {
32541
32541
  className: R(
32542
- "flex items-center gap-2 text-sm font-medium",
32542
+ "text-md flex items-center gap-2 font-medium",
32543
32543
  u && "shimmer"
32544
32544
  ),
32545
- children: o
32545
+ children: [
32546
+ o,
32547
+ u && /* @__PURE__ */ g(
32548
+ Fi,
32549
+ {
32550
+ className: "text-muted-foreground size-4.5 animate-spin",
32551
+ strokeWidth: 1.25
32552
+ }
32553
+ )
32554
+ ]
32546
32555
  }
32547
32556
  ),
32548
32557
  /* @__PURE__ */ g("div", { className: "aui-sidecar-header-actions flex items-center gap-1", children: /* @__PURE__ */ g(
@@ -32579,3 +32588,4 @@ export {
32579
32588
  FL as defineFrontendTool,
32580
32589
  Ke as useGramElements
32581
32590
  };
32591
+ //# sourceMappingURL=elements.js.map