@versini/sassysaint 8.81.0 → 8.82.0

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 (27) hide show
  1. package/dist/chunks/{AboutChangelog.CG9_9RBr.js → AboutChangelog.BSx_46oO.js} +3 -3
  2. package/dist/chunks/{AboutEntry.BcWHXPTl.js → AboutEntry.BpkbOp-E.js} +7 -7
  3. package/dist/chunks/{App.fy42GZ00.js → App.CpK3vbuC.js} +380 -389
  4. package/dist/chunks/{Chart.DgPu7GAJ.js → Chart.BQTk2pK3.js} +2 -2
  5. package/dist/chunks/{ChatBubbleAssistant.QcgMeCXD.js → ChatBubbleAssistant.BFj2pLII.js} +4 -4
  6. package/dist/chunks/{ChatBubbleUser.DBCisdEg.js → ChatBubbleUser.Cpvxvebn.js} +3 -3
  7. package/dist/chunks/{ChatHistoryTable.BpklvK1V.js → ChatHistoryTable.B8sWhUDq.js} +3 -3
  8. package/dist/chunks/HistoryEntry.Bair25TG.js +298 -0
  9. package/dist/chunks/{ProfileEntry.k75Va2Cz.js → ProfileEntry.DpxtnxMi.js} +2 -2
  10. package/dist/chunks/{SettingsEntry.D29K9xF_.js → SettingsEntry.CAf7JHHN.js} +3 -3
  11. package/dist/chunks/{UsageEntry.qqzZUjsN.js → UsageEntry.WJO19NIA.js} +3 -3
  12. package/dist/chunks/{UserMemoriesPanel.B1FmaK56.js → UserMemoriesPanel.Cc8bs-bq.js} +4 -4
  13. package/dist/chunks/{index.D20JAa4I.js → index.B8DHTZep.js} +1 -1
  14. package/dist/chunks/{index.Q0TPtuHy.js → index.BHptKcss.js} +4 -5
  15. package/dist/chunks/{index.DvG_-Ewj.js → index.BW2JmieU.js} +1 -1
  16. package/dist/chunks/{index.BdHiUvmZ.js → index.CHqfXZtZ.js} +1 -1
  17. package/dist/chunks/{index.BsGDroXc.js → index.CPHEqdrL.js} +1 -1
  18. package/dist/chunks/{index.DdvISo_s.js → index.CtTF1DFp.js} +1 -1
  19. package/dist/chunks/{index.Bw68vbKf.js → index.DYgM3w1D.js} +3 -3
  20. package/dist/chunks/{index.DMtpmERc.js → index.DmgNCKlb.js} +2 -2
  21. package/dist/chunks/{index.Ce9p-YjW.js → index.qXgqxbjy.js} +1 -1
  22. package/dist/chunks/{useMarkdown.BeoSWV0O.js → useMarkdown.ovqec__Y.js} +6 -6
  23. package/dist/components/SassySaint/SassySaint.js +1 -1
  24. package/dist/index.js +4 -4
  25. package/dist/style.css +1 -1
  26. package/package.json +3 -3
  27. package/dist/chunks/HistoryEntry.CewFhms8.js +0 -316
@@ -1,9 +1,9 @@
1
1
  import { jsx as d, jsxs as A, Fragment as Ae } from "react/jsx-runtime";
2
- import { ACTION_SORT as oa, e as mt, ACTION_SEARCH as sa, ACTION_RESET_PROMPT as po, ACTION_TOGGLE_PROMPT as fo, useLocalStorage as ke, LOCAL_STORAGE_PREFIX as Me, LOCAL_STORAGE_CHAT_ID as ho, n as me, isDev as aa, isPWAMode as mo, isTauri as yt, useChat as ia, useClickOutside as ca, useInterval as la, useTheme as xe, ButtonIcon as Ie, IconAddLight as ua, DEFAULT_ICON_ACTION_SIZE as Ce, ChatContext as Ee, useUserPreferences as je, useHotkeys as Ur, isProbablyiPhone as $e, IconCloseLight as da, IconEditLight as pa, serverUrl as go, useEntitlements as jr, IconClose as vo, useHaptic as fa, L as Er, j as st, Button as sn, LOCAL_STORAGE_PRIVATE_DISCLOSURE as ha, V as Ht, IconLockedLight as ma, IconUnlockedLight as ga, IconSelected as va, IconUnSelected as ya, IconNext as _a, PromptsContext as Fr, IconBookSparklesLight as ba, IconRewrite as wa, IconProofread as Ia, IconMagic as Ea, LOCAL_STORAGE_REASONING_DISCLOSURE as Ta, IconLightBulbLight as Sa, useSaveChat as ka, IconDownloadLight as Ca, TOAST_CHAT_SAVED as xa, IconSendLight as Aa, AppContext as St, HistoryContext as yo, useChatsHistory as Na, useUniqueId as Oa, PROMPT_EDITABLE_AREA_CLASSNAME as za, PROMPT_CLASSNAME as Pa, B as _o, ERROR_MESSAGE as Ra, _ as _t, CLIPBOARD_PROMPT as an, INPUT_PLACEHOLDER_TEXT_MOBILE as cn, INPUT_PLACEHOLDER_TEXT_ENTER as ln, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as un, isProbablyMobile as Tr, getHotkeyHandler as Ma, m as $a, FOOTER_DISCLAIMERS as dn, useViewportSize as Za, useVisualViewportSize as Da, useResizeObserver as bo, isProbablyiPad as La, INPUT_BOTTOM_OFFSET_EXTRA as pn, INPUT_BOTTOM_OFFSET_IPHONE as Ua, INPUT_BOTTOM_OFFSET_IPAD as ja, INPUT_BOTTOM_OFFSET as wo, APP_SET_FOOTER_HEIGHT as Fa, FOOTER_TOP as Sr, FOOTER_BOTTOM as gt, APP_SET_FOOTER_POSITION as lr, getLayoutPaddingClass as kr, canEvaluateModels as fn, w as Ba, IconOpenAI as Va, q as Ha, IconAnthropic as Ga, E as Ja, IconGoogleGemini as Wa, K as Ya, x as qa, d as ur, setNewProvider as hn, TOAST_PROVIDER_CHANGED as mn, useQueryClient as Xa, LOG_OUT as gn, IconProfile as Ka, IconSliders as Qa, IconHistory as ei, IconEditUser as ti, IconChart as ri, IconInfo as ni, IconBack as oi, IconSettings as si, ee as Io, Q as vn, useInViewport as ai, useServerCapabilities as ii, getMessageContaintWrapperClass as ci, UI_FOOTER_BUFFER as Eo, UI_BUTTON_SCROLL_BUFFER as li, Logo as ui, UI_DEFAULT_MAIN_HEIGHT as yn, k as di, appReducer as pi, applyOledMode as fi, APP_SET_OLED_MODE as hi, APP_SET_FULL_SCREEN as mi, APP_SET_THEME_MODE as gi, UI_DEFAULT_MAIN_HEIGHT_IPHONE as vi, APP_CLASSNAME as yi, f as _n, h as _i, LOCAL_STORAGE_SORT as bi, LOCAL_STORAGE_SEARCH as wi, LOCAL_STORAGE_OLED_MODE as Ii, LOCAL_STORAGE_FULL_SCREEN as Ei, LOCAL_STORAGE_SORT_TIMESTAMP as Ti, LOCAL_STORAGE_SORT_TOKEN_USAGE as Si, TOAST_CACHE_ENABLED as ki, TOAST_CACHE_DISABLED as Ci } from "./index.Q0TPtuHy.js";
3
- import To, { useRef as W, useCallback as q, useSyncExternalStore as dr, useEffect as $, useState as M, createContext as Br, useContext as X, forwardRef as Xe, cloneElement as xi, useId as So, useLayoutEffect as Vr, useMemo as we, Suspense as Gt, lazy as Oe, useReducer as zt } from "react";
2
+ import { ACTION_SORT as oa, e as mt, ACTION_SEARCH as sa, ACTION_RESET_PROMPT as uo, ACTION_TOGGLE_PROMPT as po, useLocalStorage as ke, LOCAL_STORAGE_PREFIX as Me, LOCAL_STORAGE_CHAT_ID as fo, n as me, isDev as aa, isPWAMode as ho, isTauri as yt, useChat as ia, useClickOutside as ca, useInterval as la, useTheme as xe, ButtonIcon as Ie, IconAddLight as ua, DEFAULT_ICON_ACTION_SIZE as Ce, ChatContext as Ee, useUserPreferences as je, useHotkeys as Ur, isProbablyiPhone as $e, IconCloseLight as da, IconEditLight as pa, serverUrl as mo, useEntitlements as jr, IconClose as go, useHaptic as fa, L as Er, j as st, Button as on, LOCAL_STORAGE_PRIVATE_DISCLOSURE as ha, V as Ht, IconLockedLight as ma, IconUnlockedLight as ga, IconSelected as va, IconUnSelected as ya, IconNext as _a, PromptsContext as Fr, IconBookSparklesLight as ba, IconRewrite as wa, IconProofread as Ia, IconMagic as Ea, LOCAL_STORAGE_REASONING_DISCLOSURE as Ta, IconLightBulbLight as Sa, useSaveChat as ka, IconDownloadLight as Ca, TOAST_CHAT_SAVED as xa, IconSendLight as Aa, AppContext as St, HistoryContext as vo, useChatsHistory as Na, useUniqueId as Oa, PROMPT_EDITABLE_AREA_CLASSNAME as za, PROMPT_CLASSNAME as Pa, B as yo, ERROR_MESSAGE as Ra, _ as _t, CLIPBOARD_PROMPT as sn, INPUT_PLACEHOLDER_TEXT_MOBILE as an, INPUT_PLACEHOLDER_TEXT_ENTER as cn, INPUT_PLACEHOLDER_TEXT_CMD_ENTER as ln, isProbablyMobile as Tr, getHotkeyHandler as Ma, m as $a, FOOTER_DISCLAIMERS as un, useViewportSize as Za, useVisualViewportSize as Da, useResizeObserver as _o, isProbablyiPad as La, INPUT_BOTTOM_OFFSET_EXTRA as dn, INPUT_BOTTOM_OFFSET_IPHONE as Ua, INPUT_BOTTOM_OFFSET_IPAD as ja, INPUT_BOTTOM_OFFSET as bo, APP_SET_FOOTER_HEIGHT as Fa, FOOTER_TOP as Sr, FOOTER_BOTTOM as gt, APP_SET_FOOTER_POSITION as lr, getLayoutPaddingClass as kr, canEvaluateModels as pn, w as Ba, IconOpenAI as Va, q as Ha, IconAnthropic as Ga, E as Ja, IconGoogleGemini as Wa, K as Ya, x as qa, d as ur, setNewProvider as fn, TOAST_PROVIDER_CHANGED as hn, useQueryClient as Xa, LOG_OUT as mn, IconProfile as Ka, IconSliders as Qa, IconHistory as ei, IconEditUser as ti, IconChart as ri, IconInfo as ni, IconBack as oi, IconSettings as si, ee as wo, Q as gn, useInViewport as ai, useServerCapabilities as ii, getMessageContaintWrapperClass as ci, UI_FOOTER_BUFFER as Io, UI_BUTTON_SCROLL_BUFFER as li, Logo as ui, UI_DEFAULT_MAIN_HEIGHT as vn, k as di, appReducer as pi, applyOledMode as fi, APP_SET_OLED_MODE as hi, APP_SET_FULL_SCREEN as mi, APP_SET_THEME_MODE as gi, UI_DEFAULT_MAIN_HEIGHT_IPHONE as vi, APP_CLASSNAME as yi, f as yn, h as _i, LOCAL_STORAGE_SORT as bi, LOCAL_STORAGE_SEARCH as wi, LOCAL_STORAGE_OLED_MODE as Ii, LOCAL_STORAGE_FULL_SCREEN as Ei, LOCAL_STORAGE_SORT_TIMESTAMP as Ti, LOCAL_STORAGE_SORT_TOKEN_USAGE as Si, TOAST_CACHE_ENABLED as ki, TOAST_CACHE_DISABLED as Ci } from "./index.BHptKcss.js";
3
+ import Eo, { useRef as W, useCallback as q, useSyncExternalStore as dr, useEffect as $, useState as M, createContext as Br, useContext as X, forwardRef as Xe, cloneElement as xi, useId as To, useLayoutEffect as Vr, useMemo as we, Suspense as Gt, lazy as Oe, useReducer as zt } from "react";
4
4
  import O, { clsx as Ai } from "clsx";
5
- import { computePosition as Ni, offset as ko, flip as Co, shift as xo, arrow as Oi, useMergeRefs as Hr, FloatingPortal as Cr, FloatingOverlay as zi, FloatingFocusManager as xr, useFloating as Ao, useClick as No, useDismiss as Oo, useRole as zo, useInteractions as Po, useFloatingParentNodeId as Ro, FloatingTree as Pi, useListItem as Mo, useFloatingTree as $o, useFloatingNodeId as Ri, autoUpdate as Mi, useHover as $i, safePolygon as Zi, useListNavigation as Di, useTypeahead as Li, FloatingNode as bn, FloatingList as wn } from "@floating-ui/react";
6
- var Zo = "vercel.ai.error", Ui = Symbol.for(Zo), Do, ji = class Lo extends Error {
5
+ import { computePosition as Ni, offset as So, flip as ko, shift as Co, arrow as Oi, useMergeRefs as Hr, FloatingPortal as Cr, FloatingOverlay as zi, FloatingFocusManager as xr, useFloating as xo, useClick as Ao, useDismiss as No, useRole as Oo, useInteractions as zo, useFloatingParentNodeId as Po, FloatingTree as Pi, useListItem as Ro, useFloatingTree as Mo, useFloatingNodeId as Ri, autoUpdate as Mi, useHover as $i, safePolygon as Zi, useListNavigation as Di, useTypeahead as Li, FloatingNode as _n, FloatingList as bn } from "@floating-ui/react";
6
+ var $o = "vercel.ai.error", Ui = Symbol.for($o), Zo, ji = class Do extends Error {
7
7
  /**
8
8
  * Creates an AI SDK Error.
9
9
  *
@@ -17,7 +17,7 @@ var Zo = "vercel.ai.error", Ui = Symbol.for(Zo), Do, ji = class Lo extends Error
17
17
  message: r,
18
18
  cause: n
19
19
  }) {
20
- super(r), this[Do] = !0, this.name = t, this.cause = n;
20
+ super(r), this[Zo] = !0, this.name = t, this.cause = n;
21
21
  }
22
22
  /**
23
23
  * Checks if the given error is an AI SDK Error.
@@ -25,56 +25,56 @@ var Zo = "vercel.ai.error", Ui = Symbol.for(Zo), Do, ji = class Lo extends Error
25
25
  * @returns {boolean} True if the error is an AI SDK Error, false otherwise.
26
26
  */
27
27
  static isInstance(t) {
28
- return Lo.hasMarker(t, Zo);
28
+ return Do.hasMarker(t, $o);
29
29
  }
30
30
  static hasMarker(t, r) {
31
31
  const n = Symbol.for(r);
32
32
  return t != null && typeof t == "object" && n in t && typeof t[n] == "boolean" && t[n] === !0;
33
33
  }
34
34
  };
35
- Do = Ui;
35
+ Zo = Ui;
36
36
  var Ze = ji;
37
- function Uo(e) {
37
+ function Lo(e) {
38
38
  return e == null ? "unknown error" : typeof e == "string" ? e : e instanceof Error ? e.message : JSON.stringify(e);
39
39
  }
40
- var jo = "AI_InvalidArgumentError", Fo = `vercel.ai.error.${jo}`, Fi = Symbol.for(Fo), Bo, Bi = class extends Ze {
40
+ var Uo = "AI_InvalidArgumentError", jo = `vercel.ai.error.${Uo}`, Fi = Symbol.for(jo), Fo, Bi = class extends Ze {
41
41
  constructor({
42
42
  message: e,
43
43
  cause: t,
44
44
  argument: r
45
45
  }) {
46
- super({ name: jo, message: e, cause: t }), this[Bo] = !0, this.argument = r;
46
+ super({ name: Uo, message: e, cause: t }), this[Fo] = !0, this.argument = r;
47
47
  }
48
48
  static isInstance(e) {
49
- return Ze.hasMarker(e, Fo);
49
+ return Ze.hasMarker(e, jo);
50
50
  }
51
51
  };
52
- Bo = Fi;
53
- var Vo = "AI_JSONParseError", Ho = `vercel.ai.error.${Vo}`, Vi = Symbol.for(Ho), Go, In = class extends Ze {
52
+ Fo = Fi;
53
+ var Bo = "AI_JSONParseError", Vo = `vercel.ai.error.${Bo}`, Vi = Symbol.for(Vo), Ho, wn = class extends Ze {
54
54
  constructor({ text: e, cause: t }) {
55
55
  super({
56
- name: Vo,
56
+ name: Bo,
57
57
  message: `JSON parsing failed: Text: ${e}.
58
- Error message: ${Uo(t)}`,
58
+ Error message: ${Lo(t)}`,
59
59
  cause: t
60
- }), this[Go] = !0, this.text = e;
60
+ }), this[Ho] = !0, this.text = e;
61
61
  }
62
62
  static isInstance(e) {
63
- return Ze.hasMarker(e, Ho);
63
+ return Ze.hasMarker(e, Vo);
64
64
  }
65
65
  };
66
- Go = Vi;
67
- var Jo = "AI_TypeValidationError", Wo = `vercel.ai.error.${Jo}`, Hi = Symbol.for(Wo), Yo, Gi = class Ar extends Ze {
66
+ Ho = Vi;
67
+ var Go = "AI_TypeValidationError", Jo = `vercel.ai.error.${Go}`, Hi = Symbol.for(Jo), Wo, Gi = class Ar extends Ze {
68
68
  constructor({ value: t, cause: r }) {
69
69
  super({
70
- name: Jo,
70
+ name: Go,
71
71
  message: `Type validation failed: Value: ${JSON.stringify(t)}.
72
- Error message: ${Uo(r)}`,
72
+ Error message: ${Lo(r)}`,
73
73
  cause: r
74
- }), this[Yo] = !0, this.value = t;
74
+ }), this[Wo] = !0, this.value = t;
75
75
  }
76
76
  static isInstance(t) {
77
- return Ze.hasMarker(t, Wo);
77
+ return Ze.hasMarker(t, Jo);
78
78
  }
79
79
  /**
80
80
  * Wraps an error into a TypeValidationError.
@@ -93,9 +93,9 @@ Error message: ${Uo(r)}`,
93
93
  return Ar.isInstance(r) && r.value === t ? r : new Ar({ value: t, cause: r });
94
94
  }
95
95
  };
96
- Yo = Hi;
96
+ Wo = Hi;
97
97
  var Jt = Gi;
98
- class En extends Error {
98
+ class In extends Error {
99
99
  constructor(t, r) {
100
100
  super(t), this.name = "ParseError", this.type = r.type, this.field = r.field, this.value = r.value, this.line = r.line;
101
101
  }
@@ -146,7 +146,7 @@ function Ji(e) {
146
146
  break;
147
147
  case "retry":
148
148
  /^\d+$/.test(y) ? n(parseInt(y, 10)) : r(
149
- new En(`Invalid \`retry\` value: "${y}"`, {
149
+ new In(`Invalid \`retry\` value: "${y}"`, {
150
150
  type: "invalid-retry",
151
151
  value: y,
152
152
  line: w
@@ -155,7 +155,7 @@ function Ji(e) {
155
155
  break;
156
156
  default:
157
157
  r(
158
- new En(
158
+ new In(
159
159
  `Unknown field "${f.length > 20 ? `${f.slice(0, 20)}…` : f}"`,
160
160
  { type: "unknown-field", field: f, value: y, line: w }
161
161
  )
@@ -250,11 +250,11 @@ class bt extends Error {
250
250
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
251
251
  }
252
252
  }
253
- const qo = {};
253
+ const Yo = {};
254
254
  function De(e) {
255
- return qo;
255
+ return Yo;
256
256
  }
257
- function Xo(e) {
257
+ function qo(e) {
258
258
  const t = Object.values(e).filter((n) => typeof n == "number");
259
259
  return Object.entries(e).filter(([n, o]) => t.indexOf(+n) === -1).map(([n, o]) => o);
260
260
  }
@@ -310,7 +310,7 @@ function tr(e, t, r) {
310
310
  function ut(e) {
311
311
  return JSON.stringify(e);
312
312
  }
313
- const Ko = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
313
+ const Xo = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
314
314
  };
315
315
  function Wt(e) {
316
316
  return typeof e == "object" && e !== null && !Array.isArray(e);
@@ -499,7 +499,7 @@ function wt(...e) {
499
499
  inst: n
500
500
  } : { ...t };
501
501
  }
502
- const Qo = (e, t) => {
502
+ const Ko = (e, t) => {
503
503
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
504
504
  value: e._zod,
505
505
  enumerable: !1
@@ -516,7 +516,7 @@ const Qo = (e, t) => {
516
516
  value: () => e.message,
517
517
  enumerable: !1
518
518
  });
519
- }, es = _("$ZodError", Qo), ts = _("$ZodError", Qo, { Parent: Error });
519
+ }, Qo = _("$ZodError", Ko), es = _("$ZodError", Ko, { Parent: Error });
520
520
  function cc(e, t = (r) => r.message) {
521
521
  const r = {}, n = [];
522
522
  for (const o of e.issues)
@@ -552,7 +552,7 @@ const uc = (e) => (t, r, n, o) => {
552
552
  throw new bt();
553
553
  if (i.issues.length) {
554
554
  const a = new (o?.Err ?? e)(i.issues.map((l) => Le(l, s, De())));
555
- throw Ko(a, o?.callee), a;
555
+ throw Xo(a, o?.callee), a;
556
556
  }
557
557
  return i.value;
558
558
  }, dc = (e) => async (t, r, n, o) => {
@@ -560,41 +560,41 @@ const uc = (e) => (t, r, n, o) => {
560
560
  let i = t._zod.run({ value: r, issues: [] }, s);
561
561
  if (i instanceof Promise && (i = await i), i.issues.length) {
562
562
  const a = new (o?.Err ?? e)(i.issues.map((l) => Le(l, s, De())));
563
- throw Ko(a, o?.callee), a;
563
+ throw Xo(a, o?.callee), a;
564
564
  }
565
565
  return i.value;
566
- }, rs = (e) => (t, r, n) => {
566
+ }, ts = (e) => (t, r, n) => {
567
567
  const o = n ? { ...n, async: !1 } : { async: !1 }, s = t._zod.run({ value: r, issues: [] }, o);
568
568
  if (s instanceof Promise)
569
569
  throw new bt();
570
570
  return s.issues.length ? {
571
571
  success: !1,
572
- error: new (e ?? es)(s.issues.map((i) => Le(i, o, De())))
572
+ error: new (e ?? Qo)(s.issues.map((i) => Le(i, o, De())))
573
573
  } : { success: !0, data: s.value };
574
- }, pc = /* @__PURE__ */ rs(ts), ns = (e) => async (t, r, n) => {
574
+ }, pc = /* @__PURE__ */ ts(es), rs = (e) => async (t, r, n) => {
575
575
  const o = n ? Object.assign(n, { async: !0 }) : { async: !0 };
576
576
  let s = t._zod.run({ value: r, issues: [] }, o);
577
577
  return s instanceof Promise && (s = await s), s.issues.length ? {
578
578
  success: !1,
579
579
  error: new e(s.issues.map((i) => Le(i, o, De())))
580
580
  } : { success: !0, data: s.value };
581
- }, fc = /* @__PURE__ */ ns(ts), hc = /^[cC][^\s-]{8,}$/, mc = /^[0-9a-z]+$/, gc = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, vc = /^[0-9a-vA-V]{20}$/, yc = /^[A-Za-z0-9]{27}$/, _c = /^[a-zA-Z0-9_-]{21}$/, bc = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, wc = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Tn = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/, Ic = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Ec = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
581
+ }, fc = /* @__PURE__ */ rs(es), hc = /^[cC][^\s-]{8,}$/, mc = /^[0-9a-z]+$/, gc = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, vc = /^[0-9a-vA-V]{20}$/, yc = /^[A-Za-z0-9]{27}$/, _c = /^[a-zA-Z0-9_-]{21}$/, bc = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, wc = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, En = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/, Ic = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Ec = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
582
582
  function Tc() {
583
583
  return new RegExp(Ec, "u");
584
584
  }
585
- const Sc = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, kc = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/, Cc = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, xc = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ac = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, os = /^[A-Za-z0-9_-]*$/, Nc = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, Oc = /^\+(?:[0-9]){6,14}[0-9]$/, ss = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", zc = /* @__PURE__ */ new RegExp(`^${ss}$`);
586
- function as(e) {
585
+ const Sc = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, kc = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/, Cc = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, xc = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ac = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, ns = /^[A-Za-z0-9_-]*$/, Nc = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, Oc = /^\+(?:[0-9]){6,14}[0-9]$/, os = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", zc = /* @__PURE__ */ new RegExp(`^${os}$`);
586
+ function ss(e) {
587
587
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
588
588
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
589
589
  }
590
590
  function Pc(e) {
591
- return new RegExp(`^${as(e)}$`);
591
+ return new RegExp(`^${ss(e)}$`);
592
592
  }
593
593
  function Rc(e) {
594
- const t = as({ precision: e.precision }), r = ["Z"];
594
+ const t = ss({ precision: e.precision }), r = ["Z"];
595
595
  e.local && r.push(""), e.offset && r.push("([+-]\\d{2}:\\d{2})");
596
596
  const n = `${t}(?:${r.join("|")})`;
597
- return new RegExp(`^${ss}T(?:${n})$`);
597
+ return new RegExp(`^${os}T(?:${n})$`);
598
598
  }
599
599
  const Mc = (e) => {
600
600
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
@@ -602,13 +602,13 @@ const Mc = (e) => {
602
602
  }, $c = /^\d+$/, Zc = /^-?\d+(?:\.\d+)?/i, Dc = /true|false/i, Lc = /null/i, Uc = /^[^A-Z]*$/, jc = /^[^a-z]*$/, ce = /* @__PURE__ */ _("$ZodCheck", (e, t) => {
603
603
  var r;
604
604
  e._zod ?? (e._zod = {}), e._zod.def = t, (r = e._zod).onattach ?? (r.onattach = []);
605
- }), is = {
605
+ }), as = {
606
606
  number: "number",
607
607
  bigint: "bigint",
608
608
  object: "date"
609
- }, cs = /* @__PURE__ */ _("$ZodCheckLessThan", (e, t) => {
609
+ }, is = /* @__PURE__ */ _("$ZodCheckLessThan", (e, t) => {
610
610
  ce.init(e, t);
611
- const r = is[typeof t.value];
611
+ const r = as[typeof t.value];
612
612
  e._zod.onattach.push((n) => {
613
613
  const o = n._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
614
614
  t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
@@ -623,9 +623,9 @@ const Mc = (e) => {
623
623
  continue: !t.abort
624
624
  });
625
625
  };
626
- }), ls = /* @__PURE__ */ _("$ZodCheckGreaterThan", (e, t) => {
626
+ }), cs = /* @__PURE__ */ _("$ZodCheckGreaterThan", (e, t) => {
627
627
  ce.init(e, t);
628
- const r = is[typeof t.value];
628
+ const r = as[typeof t.value];
629
629
  e._zod.onattach.push((n) => {
630
630
  const o = n._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
631
631
  t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
@@ -987,9 +987,9 @@ const tl = {
987
987
  }[t.version];
988
988
  if (n === void 0)
989
989
  throw new Error(`Invalid UUID version: "${t.version}"`);
990
- t.pattern ?? (t.pattern = Tn(n));
990
+ t.pattern ?? (t.pattern = En(n));
991
991
  } else
992
- t.pattern ?? (t.pattern = Tn());
992
+ t.pattern ?? (t.pattern = En());
993
993
  V.init(e, t);
994
994
  }), ol = /* @__PURE__ */ _("$ZodEmail", (e, t) => {
995
995
  t.pattern ?? (t.pattern = Ic), V.init(e, t);
@@ -1094,7 +1094,7 @@ const tl = {
1094
1094
  }
1095
1095
  };
1096
1096
  });
1097
- function us(e) {
1097
+ function ls(e) {
1098
1098
  if (e === "")
1099
1099
  return !0;
1100
1100
  if (e.length % 4 !== 0)
@@ -1109,7 +1109,7 @@ const wl = /* @__PURE__ */ _("$ZodBase64", (e, t) => {
1109
1109
  t.pattern ?? (t.pattern = Ac), V.init(e, t), e._zod.onattach.push((r) => {
1110
1110
  r._zod.bag.contentEncoding = "base64";
1111
1111
  }), e._zod.check = (r) => {
1112
- us(r.value) || r.issues.push({
1112
+ ls(r.value) || r.issues.push({
1113
1113
  code: "invalid_format",
1114
1114
  format: "base64",
1115
1115
  input: r.value,
@@ -1119,13 +1119,13 @@ const wl = /* @__PURE__ */ _("$ZodBase64", (e, t) => {
1119
1119
  };
1120
1120
  });
1121
1121
  function Il(e) {
1122
- if (!os.test(e))
1122
+ if (!ns.test(e))
1123
1123
  return !1;
1124
1124
  const t = e.replace(/[-_]/g, (n) => n === "-" ? "+" : "/"), r = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1125
- return us(r);
1125
+ return ls(r);
1126
1126
  }
1127
1127
  const El = /* @__PURE__ */ _("$ZodBase64URL", (e, t) => {
1128
- t.pattern ?? (t.pattern = os), V.init(e, t), e._zod.onattach.push((r) => {
1128
+ t.pattern ?? (t.pattern = ns), V.init(e, t), e._zod.onattach.push((r) => {
1129
1129
  r._zod.bag.contentEncoding = "base64url";
1130
1130
  }), e._zod.check = (r) => {
1131
1131
  Il(r.value) || r.issues.push({
@@ -1163,7 +1163,7 @@ const kl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
1163
1163
  continue: !t.abort
1164
1164
  });
1165
1165
  };
1166
- }), ds = /* @__PURE__ */ _("$ZodNumber", (e, t) => {
1166
+ }), us = /* @__PURE__ */ _("$ZodNumber", (e, t) => {
1167
1167
  j.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Zc, e._zod.parse = (r, n) => {
1168
1168
  if (t.coerce)
1169
1169
  try {
@@ -1183,7 +1183,7 @@ const kl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
1183
1183
  }), r;
1184
1184
  };
1185
1185
  }), Cl = /* @__PURE__ */ _("$ZodNumber", (e, t) => {
1186
- Bc.init(e, t), ds.init(e, t);
1186
+ Bc.init(e, t), us.init(e, t);
1187
1187
  }), xl = /* @__PURE__ */ _("$ZodBoolean", (e, t) => {
1188
1188
  j.init(e, t), e._zod.pattern = Dc, e._zod.parse = (r, n) => {
1189
1189
  if (t.coerce)
@@ -1219,7 +1219,7 @@ const kl = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
1219
1219
  inst: e
1220
1220
  }), r);
1221
1221
  });
1222
- function Sn(e, t, r) {
1222
+ function Tn(e, t, r) {
1223
1223
  e.issues.length && t.issues.push(...We(r, e.issues)), t.value[r] = e.value;
1224
1224
  }
1225
1225
  const zl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
@@ -1239,7 +1239,7 @@ const zl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
1239
1239
  value: a,
1240
1240
  issues: []
1241
1241
  }, n);
1242
- l instanceof Promise ? s.push(l.then((c) => Sn(c, r, i))) : Sn(l, r, i);
1242
+ l instanceof Promise ? s.push(l.then((c) => Tn(c, r, i))) : Tn(l, r, i);
1243
1243
  }
1244
1244
  return s.length ? Promise.all(s).then(() => r) : r;
1245
1245
  };
@@ -1247,7 +1247,7 @@ const zl = /* @__PURE__ */ _("$ZodArray", (e, t) => {
1247
1247
  function Rt(e, t, r) {
1248
1248
  e.issues.length && t.issues.push(...We(r, e.issues)), t.value[r] = e.value;
1249
1249
  }
1250
- function kn(e, t, r, n) {
1250
+ function Sn(e, t, r, n) {
1251
1251
  e.issues.length ? n[r] === void 0 ? r in n ? t.value[r] = void 0 : t.value[r] = e.value : t.issues.push(...We(r, e.issues)) : e.value === void 0 ? r in n && (t.value[r] = void 0) : t.value[r] = e.value;
1252
1252
  }
1253
1253
  const Pl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
@@ -1327,7 +1327,7 @@ const Pl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1327
1327
  return (b, I) => w(u, b, I);
1328
1328
  };
1329
1329
  let o;
1330
- const s = Wt, i = !qo.jitless, l = i && Ki.value, c = t.catchall;
1330
+ const s = Wt, i = !Yo.jitless, l = i && Ki.value, c = t.catchall;
1331
1331
  let p;
1332
1332
  e._zod.parse = (u, g) => {
1333
1333
  p ?? (p = r.value);
@@ -1347,7 +1347,7 @@ const Pl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1347
1347
  const I = p.shape;
1348
1348
  for (const m of p.keys) {
1349
1349
  const k = I[m], x = k._zod.run({ value: v[m], issues: [] }, g), T = k._zod.optin === "optional" && k._zod.optout === "optional";
1350
- x instanceof Promise ? h.push(x.then((C) => T ? kn(C, u, m, v) : Rt(C, u, m))) : T ? kn(x, u, m, v) : Rt(x, u, m);
1350
+ x instanceof Promise ? h.push(x.then((C) => T ? Sn(C, u, m, v) : Rt(C, u, m))) : T ? Sn(x, u, m, v) : Rt(x, u, m);
1351
1351
  }
1352
1352
  }
1353
1353
  if (!c)
@@ -1371,7 +1371,7 @@ const Pl = /* @__PURE__ */ _("$ZodObject", (e, t) => {
1371
1371
  }), h.length ? Promise.all(h).then(() => u) : u;
1372
1372
  };
1373
1373
  });
1374
- function Cn(e, t, r, n) {
1374
+ function kn(e, t, r, n) {
1375
1375
  for (const o of e)
1376
1376
  if (o.issues.length === 0)
1377
1377
  return t.value = o.value, t;
@@ -1382,7 +1382,7 @@ function Cn(e, t, r, n) {
1382
1382
  errors: e.map((o) => o.issues.map((s) => Le(s, n, De())))
1383
1383
  }), t;
1384
1384
  }
1385
- const ps = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1385
+ const ds = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1386
1386
  j.init(e, t), Z(e._zod, "optin", () => t.options.some((r) => r._zod.optin === "optional") ? "optional" : void 0), Z(e._zod, "optout", () => t.options.some((r) => r._zod.optout === "optional") ? "optional" : void 0), Z(e._zod, "values", () => {
1387
1387
  if (t.options.every((r) => r._zod.values))
1388
1388
  return new Set(t.options.flatMap((r) => Array.from(r._zod.values)));
@@ -1407,10 +1407,10 @@ const ps = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1407
1407
  s.push(a);
1408
1408
  }
1409
1409
  }
1410
- return o ? Promise.all(s).then((i) => Cn(i, r, e, n)) : Cn(s, r, e, n);
1410
+ return o ? Promise.all(s).then((i) => kn(i, r, e, n)) : kn(s, r, e, n);
1411
1411
  };
1412
1412
  }), Rl = /* @__PURE__ */ _("$ZodDiscriminatedUnion", (e, t) => {
1413
- ps.init(e, t);
1413
+ ds.init(e, t);
1414
1414
  const r = e._zod.parse;
1415
1415
  Z(e._zod, "propValues", () => {
1416
1416
  const o = {};
@@ -1462,7 +1462,7 @@ const ps = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
1462
1462
  }), Ml = /* @__PURE__ */ _("$ZodIntersection", (e, t) => {
1463
1463
  j.init(e, t), e._zod.parse = (r, n) => {
1464
1464
  const o = r.value, s = t.left._zod.run({ value: o, issues: [] }, n), i = t.right._zod.run({ value: o, issues: [] }, n);
1465
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([l, c]) => xn(r, l, c)) : xn(r, s, i);
1465
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([l, c]) => Cn(r, l, c)) : Cn(r, s, i);
1466
1466
  };
1467
1467
  });
1468
1468
  function Nr(e, t) {
@@ -1500,7 +1500,7 @@ function Nr(e, t) {
1500
1500
  }
1501
1501
  return { valid: !1, mergeErrorPath: [] };
1502
1502
  }
1503
- function xn(e, t, r) {
1503
+ function Cn(e, t, r) {
1504
1504
  if (t.issues.length && e.issues.push(...t.issues), r.issues.length && e.issues.push(...r.issues), vt(e))
1505
1505
  return e;
1506
1506
  const n = Nr(t.value, r.value);
@@ -1567,7 +1567,7 @@ const $l = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
1567
1567
  };
1568
1568
  }), Zl = /* @__PURE__ */ _("$ZodEnum", (e, t) => {
1569
1569
  j.init(e, t);
1570
- const r = Xo(t.entries);
1570
+ const r = qo(t.entries);
1571
1571
  e._zod.values = new Set(r), e._zod.pattern = new RegExp(`^(${r.filter((n) => Qi.has(typeof n)).map((n) => typeof n == "string" ? kt(n) : n.toString()).join("|")})$`), e._zod.parse = (n, o) => {
1572
1572
  const s = n.value;
1573
1573
  return e._zod.values.has(s) || n.issues.push({
@@ -1611,10 +1611,10 @@ const $l = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
1611
1611
  if (r.value === void 0)
1612
1612
  return r.value = t.defaultValue, r;
1613
1613
  const o = t.innerType._zod.run(r, n);
1614
- return o instanceof Promise ? o.then((s) => An(s, t)) : An(o, t);
1614
+ return o instanceof Promise ? o.then((s) => xn(s, t)) : xn(o, t);
1615
1615
  };
1616
1616
  });
1617
- function An(e, t) {
1617
+ function xn(e, t) {
1618
1618
  return e.value === void 0 && (e.value = t.defaultValue), e;
1619
1619
  }
1620
1620
  const Bl = /* @__PURE__ */ _("$ZodPrefault", (e, t) => {
@@ -1625,10 +1625,10 @@ const Bl = /* @__PURE__ */ _("$ZodPrefault", (e, t) => {
1625
1625
  return r ? new Set([...r].filter((n) => n !== void 0)) : void 0;
1626
1626
  }), e._zod.parse = (r, n) => {
1627
1627
  const o = t.innerType._zod.run(r, n);
1628
- return o instanceof Promise ? o.then((s) => Nn(s, e)) : Nn(o, e);
1628
+ return o instanceof Promise ? o.then((s) => An(s, e)) : An(o, e);
1629
1629
  };
1630
1630
  });
1631
- function Nn(e, t) {
1631
+ function An(e, t) {
1632
1632
  return !e.issues.length && e.value === void 0 && e.issues.push({
1633
1633
  code: "invalid_type",
1634
1634
  expected: "nonoptional",
@@ -1656,19 +1656,19 @@ const Hl = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
1656
1656
  }), Gl = /* @__PURE__ */ _("$ZodPipe", (e, t) => {
1657
1657
  j.init(e, t), Z(e._zod, "values", () => t.in._zod.values), Z(e._zod, "optin", () => t.in._zod.optin), Z(e._zod, "optout", () => t.out._zod.optout), e._zod.parse = (r, n) => {
1658
1658
  const o = t.in._zod.run(r, n);
1659
- return o instanceof Promise ? o.then((s) => On(s, t, n)) : On(o, t, n);
1659
+ return o instanceof Promise ? o.then((s) => Nn(s, t, n)) : Nn(o, t, n);
1660
1660
  };
1661
1661
  });
1662
- function On(e, t, r) {
1662
+ function Nn(e, t, r) {
1663
1663
  return vt(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, r);
1664
1664
  }
1665
1665
  const Jl = /* @__PURE__ */ _("$ZodReadonly", (e, t) => {
1666
1666
  j.init(e, t), Z(e._zod, "propValues", () => t.innerType._zod.propValues), Z(e._zod, "values", () => t.innerType._zod.values), Z(e._zod, "optin", () => t.innerType._zod.optin), Z(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (r, n) => {
1667
1667
  const o = t.innerType._zod.run(r, n);
1668
- return o instanceof Promise ? o.then(zn) : zn(o);
1668
+ return o instanceof Promise ? o.then(On) : On(o);
1669
1669
  };
1670
1670
  });
1671
- function zn(e) {
1671
+ function On(e) {
1672
1672
  return e.value = Object.freeze(e.value), e;
1673
1673
  }
1674
1674
  const Wl = /* @__PURE__ */ _("$ZodLazy", (e, t) => {
@@ -1677,11 +1677,11 @@ const Wl = /* @__PURE__ */ _("$ZodLazy", (e, t) => {
1677
1677
  ce.init(e, t), j.init(e, t), e._zod.parse = (r, n) => r, e._zod.check = (r) => {
1678
1678
  const n = r.value, o = t.fn(n);
1679
1679
  if (o instanceof Promise)
1680
- return o.then((s) => Pn(s, r, n, e));
1681
- Pn(o, r, n, e);
1680
+ return o.then((s) => zn(s, r, n, e));
1681
+ zn(o, r, n, e);
1682
1682
  };
1683
1683
  });
1684
- function Pn(e, t, r, n) {
1684
+ function zn(e, t, r, n) {
1685
1685
  if (!e) {
1686
1686
  const o = {
1687
1687
  code: "custom",
@@ -1696,7 +1696,7 @@ function Pn(e, t, r, n) {
1696
1696
  n._zod.def.params && (o.params = n._zod.def.params), t.issues.push(wt(o));
1697
1697
  }
1698
1698
  }
1699
- class fs {
1699
+ class ps {
1700
1700
  constructor() {
1701
1701
  this._map = /* @__PURE__ */ new Map(), this._idmap = /* @__PURE__ */ new Map();
1702
1702
  }
@@ -1729,7 +1729,7 @@ class fs {
1729
1729
  }
1730
1730
  }
1731
1731
  function ql() {
1732
- return new fs();
1732
+ return new ps();
1733
1733
  }
1734
1734
  const dt = /* @__PURE__ */ ql();
1735
1735
  function Xl(e, t) {
@@ -1747,7 +1747,7 @@ function Kl(e, t) {
1747
1747
  ...E(t)
1748
1748
  });
1749
1749
  }
1750
- function Rn(e, t) {
1750
+ function Pn(e, t) {
1751
1751
  return new e({
1752
1752
  type: "string",
1753
1753
  format: "guid",
@@ -2014,8 +2014,8 @@ function xu(e, t) {
2014
2014
  ...E(t)
2015
2015
  });
2016
2016
  }
2017
- function Mn(e, t) {
2018
- return new cs({
2017
+ function Rn(e, t) {
2018
+ return new is({
2019
2019
  check: "less_than",
2020
2020
  ...E(t),
2021
2021
  value: e,
@@ -2023,15 +2023,15 @@ function Mn(e, t) {
2023
2023
  });
2024
2024
  }
2025
2025
  function fr(e, t) {
2026
- return new cs({
2026
+ return new is({
2027
2027
  check: "less_than",
2028
2028
  ...E(t),
2029
2029
  value: e,
2030
2030
  inclusive: !0
2031
2031
  });
2032
2032
  }
2033
- function $n(e, t) {
2034
- return new ls({
2033
+ function Mn(e, t) {
2034
+ return new cs({
2035
2035
  check: "greater_than",
2036
2036
  ...E(t),
2037
2037
  value: e,
@@ -2039,21 +2039,21 @@ function $n(e, t) {
2039
2039
  });
2040
2040
  }
2041
2041
  function hr(e, t) {
2042
- return new ls({
2042
+ return new cs({
2043
2043
  check: "greater_than",
2044
2044
  ...E(t),
2045
2045
  value: e,
2046
2046
  inclusive: !0
2047
2047
  });
2048
2048
  }
2049
- function Zn(e, t) {
2049
+ function $n(e, t) {
2050
2050
  return new Fc({
2051
2051
  check: "multiple_of",
2052
2052
  ...E(t),
2053
2053
  value: e
2054
2054
  });
2055
2055
  }
2056
- function hs(e, t) {
2056
+ function fs(e, t) {
2057
2057
  return new Vc({
2058
2058
  check: "max_length",
2059
2059
  ...E(t),
@@ -2067,7 +2067,7 @@ function qt(e, t) {
2067
2067
  minimum: e
2068
2068
  });
2069
2069
  }
2070
- function ms(e, t) {
2070
+ function hs(e, t) {
2071
2071
  return new Gc({
2072
2072
  check: "length_equals",
2073
2073
  ...E(t),
@@ -2165,7 +2165,7 @@ function ju(e, t, r) {
2165
2165
  ...E(r)
2166
2166
  });
2167
2167
  }
2168
- class Dn {
2168
+ class Zn {
2169
2169
  constructor(t) {
2170
2170
  this.counter = 0, this.metadataRegistry = t?.metadata ?? dt, this.target = t?.target ?? "draft-2020-12", this.unrepresentable = t?.unrepresentable ?? "throw", this.override = t?.override ?? (() => {
2171
2171
  }), this.io = t?.io ?? "output", this.seen = /* @__PURE__ */ new Map();
@@ -2344,7 +2344,7 @@ class Dn {
2344
2344
  break;
2345
2345
  }
2346
2346
  case "enum": {
2347
- const h = v, f = Xo(o.entries);
2347
+ const h = v, f = qo(o.entries);
2348
2348
  f.every((y) => typeof y == "number") && (h.type = "number"), f.every((y) => typeof y == "string") && (h.type = "string"), h.enum = f;
2349
2349
  break;
2350
2350
  }
@@ -2458,7 +2458,7 @@ class Dn {
2458
2458
  }
2459
2459
  }
2460
2460
  const c = this.metadataRegistry.get(t);
2461
- return c && Object.assign(a.schema, c), this.io === "input" && ee(t) && (delete a.schema.examples, delete a.schema.default), this.io === "input" && a.schema._prefault && ((n = a.schema).default ?? (n.default = a.schema._prefault)), delete a.schema._prefault, this.seen.get(t).schema;
2461
+ return c && Object.assign(a.schema, c), this.io === "input" && Q(t) && (delete a.schema.examples, delete a.schema.default), this.io === "input" && a.schema._prefault && ((n = a.schema).default ?? (n.default = a.schema._prefault)), delete a.schema._prefault, this.seen.get(t).schema;
2462
2462
  }
2463
2463
  emit(t, r) {
2464
2464
  const n = {
@@ -2567,8 +2567,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2567
2567
  }
2568
2568
  }
2569
2569
  function Fu(e, t) {
2570
- if (e instanceof fs) {
2571
- const n = new Dn(t), o = {};
2570
+ if (e instanceof ps) {
2571
+ const n = new Zn(t), o = {};
2572
2572
  for (const a of e._idmap.entries()) {
2573
2573
  const [l, c] = a;
2574
2574
  n.process(c);
@@ -2593,10 +2593,10 @@ function Fu(e, t) {
2593
2593
  }
2594
2594
  return { schemas: s };
2595
2595
  }
2596
- const r = new Dn(t);
2596
+ const r = new Zn(t);
2597
2597
  return r.process(e), r.emit(e, t);
2598
2598
  }
2599
- function ee(e, t) {
2599
+ function Q(e, t) {
2600
2600
  const r = t ?? { seen: /* @__PURE__ */ new Set() };
2601
2601
  if (r.seen.has(e))
2602
2602
  return !1;
@@ -2622,52 +2622,52 @@ function ee(e, t) {
2622
2622
  case "template_literal":
2623
2623
  return !1;
2624
2624
  case "array":
2625
- return ee(o.element, r);
2625
+ return Q(o.element, r);
2626
2626
  case "object": {
2627
2627
  for (const s in o.shape)
2628
- if (ee(o.shape[s], r))
2628
+ if (Q(o.shape[s], r))
2629
2629
  return !0;
2630
2630
  return !1;
2631
2631
  }
2632
2632
  case "union": {
2633
2633
  for (const s of o.options)
2634
- if (ee(s, r))
2634
+ if (Q(s, r))
2635
2635
  return !0;
2636
2636
  return !1;
2637
2637
  }
2638
2638
  case "intersection":
2639
- return ee(o.left, r) || ee(o.right, r);
2639
+ return Q(o.left, r) || Q(o.right, r);
2640
2640
  case "tuple": {
2641
2641
  for (const s of o.items)
2642
- if (ee(s, r))
2642
+ if (Q(s, r))
2643
2643
  return !0;
2644
- return !!(o.rest && ee(o.rest, r));
2644
+ return !!(o.rest && Q(o.rest, r));
2645
2645
  }
2646
2646
  case "record":
2647
- return ee(o.keyType, r) || ee(o.valueType, r);
2647
+ return Q(o.keyType, r) || Q(o.valueType, r);
2648
2648
  case "map":
2649
- return ee(o.keyType, r) || ee(o.valueType, r);
2649
+ return Q(o.keyType, r) || Q(o.valueType, r);
2650
2650
  case "set":
2651
- return ee(o.valueType, r);
2651
+ return Q(o.valueType, r);
2652
2652
  // inner types
2653
2653
  case "promise":
2654
2654
  case "optional":
2655
2655
  case "nonoptional":
2656
2656
  case "nullable":
2657
2657
  case "readonly":
2658
- return ee(o.innerType, r);
2658
+ return Q(o.innerType, r);
2659
2659
  case "lazy":
2660
- return ee(o.getter(), r);
2660
+ return Q(o.getter(), r);
2661
2661
  case "default":
2662
- return ee(o.innerType, r);
2662
+ return Q(o.innerType, r);
2663
2663
  case "prefault":
2664
- return ee(o.innerType, r);
2664
+ return Q(o.innerType, r);
2665
2665
  case "custom":
2666
2666
  return !1;
2667
2667
  case "transform":
2668
2668
  return !0;
2669
2669
  case "pipe":
2670
- return ee(o.in, r) || ee(o.out, r);
2670
+ return Q(o.in, r) || Q(o.out, r);
2671
2671
  case "success":
2672
2672
  return !1;
2673
2673
  case "catch":
@@ -2700,7 +2700,7 @@ function qu(e) {
2700
2700
  return Iu(Yu, e);
2701
2701
  }
2702
2702
  const Xu = (e, t) => {
2703
- es.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2703
+ Qo.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2704
2704
  format: {
2705
2705
  value: (r) => lc(e, r)
2706
2706
  // enumerable: false,
@@ -2726,7 +2726,7 @@ const Xu = (e, t) => {
2726
2726
  });
2727
2727
  }, nr = _("ZodError", Xu, {
2728
2728
  Parent: Error
2729
- }), Ku = /* @__PURE__ */ uc(nr), Qu = /* @__PURE__ */ dc(nr), ed = /* @__PURE__ */ rs(nr), gs = /* @__PURE__ */ ns(nr), H = /* @__PURE__ */ _("ZodType", (e, t) => (j.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
2729
+ }), Ku = /* @__PURE__ */ uc(nr), Qu = /* @__PURE__ */ dc(nr), ed = /* @__PURE__ */ ts(nr), ms = /* @__PURE__ */ rs(nr), H = /* @__PURE__ */ _("ZodType", (e, t) => (j.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...r) => e.clone(
2730
2730
  {
2731
2731
  ...t,
2732
2732
  checks: [
@@ -2735,7 +2735,7 @@ const Xu = (e, t) => {
2735
2735
  ]
2736
2736
  }
2737
2737
  // { parent: true }
2738
- ), e.clone = (r, n) => Ke(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => Ku(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => ed(e, r, n), e.parseAsync = async (r, n) => Qu(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => gs(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(qd(r, n)), e.superRefine = (r) => e.check(Xd(r)), e.overwrite = (r) => e.check(Ct(r)), e.optional = () => jn(e), e.nullable = () => Fn(e), e.nullish = () => jn(Fn(e)), e.nonoptional = (r) => jd(e, r), e.array = () => it(e), e.or = (r) => he([e, r]), e.and = (r) => Nd(e, r), e.transform = (r) => Bn(e, Md(r)), e.default = (r) => Dd(e, r), e.prefault = (r) => Ud(e, r), e.catch = (r) => Bd(e, r), e.pipe = (r) => Bn(e, r), e.readonly = () => Gd(e), e.describe = (r) => {
2738
+ ), e.clone = (r, n) => Ke(e, r, n), e.brand = () => e, e.register = ((r, n) => (r.add(e, n), e)), e.parse = (r, n) => Ku(e, r, n, { callee: e.parse }), e.safeParse = (r, n) => ed(e, r, n), e.parseAsync = async (r, n) => Qu(e, r, n, { callee: e.parseAsync }), e.safeParseAsync = async (r, n) => ms(e, r, n), e.spa = e.safeParseAsync, e.refine = (r, n) => e.check(qd(r, n)), e.superRefine = (r) => e.check(Xd(r)), e.overwrite = (r) => e.check(Ct(r)), e.optional = () => Un(e), e.nullable = () => jn(e), e.nullish = () => Un(jn(e)), e.nonoptional = (r) => jd(e, r), e.array = () => it(e), e.or = (r) => he([e, r]), e.and = (r) => Nd(e, r), e.transform = (r) => Fn(e, Md(r)), e.default = (r) => Dd(e, r), e.prefault = (r) => Ud(e, r), e.catch = (r) => Bd(e, r), e.pipe = (r) => Fn(e, r), e.readonly = () => Gd(e), e.describe = (r) => {
2739
2739
  const n = e.clone();
2740
2740
  return dt.add(n, { description: r }), n;
2741
2741
  }, Object.defineProperty(e, "description", {
@@ -2748,21 +2748,21 @@ const Xu = (e, t) => {
2748
2748
  return dt.get(e);
2749
2749
  const n = e.clone();
2750
2750
  return dt.add(n, r[0]), n;
2751
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), vs = /* @__PURE__ */ _("_ZodString", (e, t) => {
2751
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), gs = /* @__PURE__ */ _("_ZodString", (e, t) => {
2752
2752
  qr.init(e, t), H.init(e, t);
2753
2753
  const r = e._zod.bag;
2754
- e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(Au(...n)), e.includes = (...n) => e.check(zu(...n)), e.startsWith = (...n) => e.check(Pu(...n)), e.endsWith = (...n) => e.check(Ru(...n)), e.min = (...n) => e.check(qt(...n)), e.max = (...n) => e.check(hs(...n)), e.length = (...n) => e.check(ms(...n)), e.nonempty = (...n) => e.check(qt(1, ...n)), e.lowercase = (n) => e.check(Nu(n)), e.uppercase = (n) => e.check(Ou(n)), e.trim = () => e.check($u()), e.normalize = (...n) => e.check(Mu(...n)), e.toLowerCase = () => e.check(Zu()), e.toUpperCase = () => e.check(Du());
2754
+ e.format = r.format ?? null, e.minLength = r.minimum ?? null, e.maxLength = r.maximum ?? null, e.regex = (...n) => e.check(Au(...n)), e.includes = (...n) => e.check(zu(...n)), e.startsWith = (...n) => e.check(Pu(...n)), e.endsWith = (...n) => e.check(Ru(...n)), e.min = (...n) => e.check(qt(...n)), e.max = (...n) => e.check(fs(...n)), e.length = (...n) => e.check(hs(...n)), e.nonempty = (...n) => e.check(qt(1, ...n)), e.lowercase = (n) => e.check(Nu(n)), e.uppercase = (n) => e.check(Ou(n)), e.trim = () => e.check($u()), e.normalize = (...n) => e.check(Mu(...n)), e.toLowerCase = () => e.check(Zu()), e.toUpperCase = () => e.check(Du());
2755
2755
  }), td = /* @__PURE__ */ _("ZodString", (e, t) => {
2756
- qr.init(e, t), vs.init(e, t), e.email = (r) => e.check(Kl(rd, r)), e.url = (r) => e.check(nu(nd, r)), e.jwt = (r) => e.check(yu(yd, r)), e.emoji = (r) => e.check(ou(od, r)), e.guid = (r) => e.check(Rn(Ln, r)), e.uuid = (r) => e.check(Ql(Mt, r)), e.uuidv4 = (r) => e.check(eu(Mt, r)), e.uuidv6 = (r) => e.check(tu(Mt, r)), e.uuidv7 = (r) => e.check(ru(Mt, r)), e.nanoid = (r) => e.check(su(sd, r)), e.guid = (r) => e.check(Rn(Ln, r)), e.cuid = (r) => e.check(au(ad, r)), e.cuid2 = (r) => e.check(iu(id, r)), e.ulid = (r) => e.check(cu(cd, r)), e.base64 = (r) => e.check(mu(md, r)), e.base64url = (r) => e.check(gu(gd, r)), e.xid = (r) => e.check(lu(ld, r)), e.ksuid = (r) => e.check(uu(ud, r)), e.ipv4 = (r) => e.check(du(dd, r)), e.ipv6 = (r) => e.check(pu(pd, r)), e.cidrv4 = (r) => e.check(fu(fd, r)), e.cidrv6 = (r) => e.check(hu(hd, r)), e.e164 = (r) => e.check(vu(vd, r)), e.datetime = (r) => e.check(Vu(r)), e.date = (r) => e.check(Gu(r)), e.time = (r) => e.check(Wu(r)), e.duration = (r) => e.check(qu(r));
2756
+ qr.init(e, t), gs.init(e, t), e.email = (r) => e.check(Kl(rd, r)), e.url = (r) => e.check(nu(nd, r)), e.jwt = (r) => e.check(yu(yd, r)), e.emoji = (r) => e.check(ou(od, r)), e.guid = (r) => e.check(Pn(Dn, r)), e.uuid = (r) => e.check(Ql(Mt, r)), e.uuidv4 = (r) => e.check(eu(Mt, r)), e.uuidv6 = (r) => e.check(tu(Mt, r)), e.uuidv7 = (r) => e.check(ru(Mt, r)), e.nanoid = (r) => e.check(su(sd, r)), e.guid = (r) => e.check(Pn(Dn, r)), e.cuid = (r) => e.check(au(ad, r)), e.cuid2 = (r) => e.check(iu(id, r)), e.ulid = (r) => e.check(cu(cd, r)), e.base64 = (r) => e.check(mu(md, r)), e.base64url = (r) => e.check(gu(gd, r)), e.xid = (r) => e.check(lu(ld, r)), e.ksuid = (r) => e.check(uu(ud, r)), e.ipv4 = (r) => e.check(du(dd, r)), e.ipv6 = (r) => e.check(pu(pd, r)), e.cidrv4 = (r) => e.check(fu(fd, r)), e.cidrv6 = (r) => e.check(hu(hd, r)), e.e164 = (r) => e.check(vu(vd, r)), e.datetime = (r) => e.check(Vu(r)), e.date = (r) => e.check(Gu(r)), e.time = (r) => e.check(Wu(r)), e.duration = (r) => e.check(qu(r));
2757
2757
  });
2758
2758
  function S(e) {
2759
2759
  return Xl(td, e);
2760
2760
  }
2761
2761
  const J = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
2762
- V.init(e, t), vs.init(e, t);
2762
+ V.init(e, t), gs.init(e, t);
2763
2763
  }), rd = /* @__PURE__ */ _("ZodEmail", (e, t) => {
2764
2764
  ol.init(e, t), J.init(e, t);
2765
- }), Ln = /* @__PURE__ */ _("ZodGUID", (e, t) => {
2765
+ }), Dn = /* @__PURE__ */ _("ZodGUID", (e, t) => {
2766
2766
  rl.init(e, t), J.init(e, t);
2767
2767
  }), Mt = /* @__PURE__ */ _("ZodUUID", (e, t) => {
2768
2768
  nl.init(e, t), J.init(e, t);
@@ -2798,18 +2798,18 @@ const J = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
2798
2798
  Tl.init(e, t), J.init(e, t);
2799
2799
  }), yd = /* @__PURE__ */ _("ZodJWT", (e, t) => {
2800
2800
  kl.init(e, t), J.init(e, t);
2801
- }), ys = /* @__PURE__ */ _("ZodNumber", (e, t) => {
2802
- ds.init(e, t), H.init(e, t), e.gt = (n, o) => e.check($n(n, o)), e.gte = (n, o) => e.check(hr(n, o)), e.min = (n, o) => e.check(hr(n, o)), e.lt = (n, o) => e.check(Mn(n, o)), e.lte = (n, o) => e.check(fr(n, o)), e.max = (n, o) => e.check(fr(n, o)), e.int = (n) => e.check(Un(n)), e.safe = (n) => e.check(Un(n)), e.positive = (n) => e.check($n(0, n)), e.nonnegative = (n) => e.check(hr(0, n)), e.negative = (n) => e.check(Mn(0, n)), e.nonpositive = (n) => e.check(fr(0, n)), e.multipleOf = (n, o) => e.check(Zn(n, o)), e.step = (n, o) => e.check(Zn(n, o)), e.finite = () => e;
2801
+ }), vs = /* @__PURE__ */ _("ZodNumber", (e, t) => {
2802
+ us.init(e, t), H.init(e, t), e.gt = (n, o) => e.check(Mn(n, o)), e.gte = (n, o) => e.check(hr(n, o)), e.min = (n, o) => e.check(hr(n, o)), e.lt = (n, o) => e.check(Rn(n, o)), e.lte = (n, o) => e.check(fr(n, o)), e.max = (n, o) => e.check(fr(n, o)), e.int = (n) => e.check(Ln(n)), e.safe = (n) => e.check(Ln(n)), e.positive = (n) => e.check(Mn(0, n)), e.nonnegative = (n) => e.check(hr(0, n)), e.negative = (n) => e.check(Rn(0, n)), e.nonpositive = (n) => e.check(fr(0, n)), e.multipleOf = (n, o) => e.check($n(n, o)), e.step = (n, o) => e.check($n(n, o)), e.finite = () => e;
2803
2803
  const r = e._zod.bag;
2804
2804
  e.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), e.isFinite = !0, e.format = r.format ?? null;
2805
2805
  });
2806
2806
  function _d(e) {
2807
- return Eu(ys, e);
2807
+ return Eu(vs, e);
2808
2808
  }
2809
2809
  const bd = /* @__PURE__ */ _("ZodNumberFormat", (e, t) => {
2810
- Cl.init(e, t), ys.init(e, t);
2810
+ Cl.init(e, t), vs.init(e, t);
2811
2811
  });
2812
- function Un(e) {
2812
+ function Ln(e) {
2813
2813
  return Tu(bd, e);
2814
2814
  }
2815
2815
  const wd = /* @__PURE__ */ _("ZodBoolean", (e, t) => {
@@ -2833,17 +2833,17 @@ function Se() {
2833
2833
  const Sd = /* @__PURE__ */ _("ZodNever", (e, t) => {
2834
2834
  Ol.init(e, t), H.init(e, t);
2835
2835
  });
2836
- function _s(e) {
2836
+ function ys(e) {
2837
2837
  return xu(Sd, e);
2838
2838
  }
2839
2839
  const kd = /* @__PURE__ */ _("ZodArray", (e, t) => {
2840
- zl.init(e, t), H.init(e, t), e.element = t.element, e.min = (r, n) => e.check(qt(r, n)), e.nonempty = (r) => e.check(qt(1, r)), e.max = (r, n) => e.check(hs(r, n)), e.length = (r, n) => e.check(ms(r, n)), e.unwrap = () => e.element;
2840
+ zl.init(e, t), H.init(e, t), e.element = t.element, e.min = (r, n) => e.check(qt(r, n)), e.nonempty = (r) => e.check(qt(1, r)), e.max = (r, n) => e.check(fs(r, n)), e.length = (r, n) => e.check(hs(r, n)), e.unwrap = () => e.element;
2841
2841
  });
2842
2842
  function it(e, t) {
2843
2843
  return Lu(kd, e, t);
2844
2844
  }
2845
- const bs = /* @__PURE__ */ _("ZodObject", (e, t) => {
2846
- Pl.init(e, t), H.init(e, t), Z(e, "shape", () => t.shape), e.keyof = () => zd(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Se() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Se() }), e.strict = () => e.clone({ ...e._zod.def, catchall: _s() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => oc(e, r), e.merge = (r) => sc(e, r), e.pick = (r) => rc(e, r), e.omit = (r) => nc(e, r), e.partial = (...r) => ac(Is, e, r[0]), e.required = (...r) => ic(Es, e, r[0]);
2845
+ const _s = /* @__PURE__ */ _("ZodObject", (e, t) => {
2846
+ Pl.init(e, t), H.init(e, t), Z(e, "shape", () => t.shape), e.keyof = () => zd(Object.keys(e._zod.def.shape)), e.catchall = (r) => e.clone({ ...e._zod.def, catchall: r }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Se() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Se() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ys() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (r) => oc(e, r), e.merge = (r) => sc(e, r), e.pick = (r) => rc(e, r), e.omit = (r) => nc(e, r), e.partial = (...r) => ac(ws, e, r[0]), e.required = (...r) => ic(Is, e, r[0]);
2847
2847
  });
2848
2848
  function se(e, t) {
2849
2849
  const r = {
@@ -2853,30 +2853,30 @@ function se(e, t) {
2853
2853
  },
2854
2854
  ...E(t)
2855
2855
  };
2856
- return new bs(r);
2856
+ return new _s(r);
2857
2857
  }
2858
2858
  function G(e, t) {
2859
- return new bs({
2859
+ return new _s({
2860
2860
  type: "object",
2861
2861
  get shape() {
2862
2862
  return tr(this, "shape", { ...e }), this.shape;
2863
2863
  },
2864
- catchall: _s(),
2864
+ catchall: ys(),
2865
2865
  ...E(t)
2866
2866
  });
2867
2867
  }
2868
- const ws = /* @__PURE__ */ _("ZodUnion", (e, t) => {
2869
- ps.init(e, t), H.init(e, t), e.options = t.options;
2868
+ const bs = /* @__PURE__ */ _("ZodUnion", (e, t) => {
2869
+ ds.init(e, t), H.init(e, t), e.options = t.options;
2870
2870
  });
2871
2871
  function he(e, t) {
2872
- return new ws({
2872
+ return new bs({
2873
2873
  type: "union",
2874
2874
  options: e,
2875
2875
  ...E(t)
2876
2876
  });
2877
2877
  }
2878
2878
  const Cd = /* @__PURE__ */ _("ZodDiscriminatedUnion", (e, t) => {
2879
- ws.init(e, t), Rl.init(e, t);
2879
+ bs.init(e, t), Rl.init(e, t);
2880
2880
  });
2881
2881
  function xd(e, t, r) {
2882
2882
  return new Cd({
@@ -2982,11 +2982,11 @@ function Md(e) {
2982
2982
  transform: e
2983
2983
  });
2984
2984
  }
2985
- const Is = /* @__PURE__ */ _("ZodOptional", (e, t) => {
2985
+ const ws = /* @__PURE__ */ _("ZodOptional", (e, t) => {
2986
2986
  Ul.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
2987
2987
  });
2988
- function jn(e) {
2989
- return new Is({
2988
+ function Un(e) {
2989
+ return new ws({
2990
2990
  type: "optional",
2991
2991
  innerType: e
2992
2992
  });
@@ -2994,7 +2994,7 @@ function jn(e) {
2994
2994
  const $d = /* @__PURE__ */ _("ZodNullable", (e, t) => {
2995
2995
  jl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
2996
2996
  });
2997
- function Fn(e) {
2997
+ function jn(e) {
2998
2998
  return new $d({
2999
2999
  type: "nullable",
3000
3000
  innerType: e
@@ -3024,11 +3024,11 @@ function Ud(e, t) {
3024
3024
  }
3025
3025
  });
3026
3026
  }
3027
- const Es = /* @__PURE__ */ _("ZodNonOptional", (e, t) => {
3027
+ const Is = /* @__PURE__ */ _("ZodNonOptional", (e, t) => {
3028
3028
  Vl.init(e, t), H.init(e, t), e.unwrap = () => e._zod.def.innerType;
3029
3029
  });
3030
3030
  function jd(e, t) {
3031
- return new Es({
3031
+ return new Is({
3032
3032
  type: "nonoptional",
3033
3033
  innerType: e,
3034
3034
  ...E(t)
@@ -3047,7 +3047,7 @@ function Bd(e, t) {
3047
3047
  const Vd = /* @__PURE__ */ _("ZodPipe", (e, t) => {
3048
3048
  Gl.init(e, t), H.init(e, t), e.in = t.in, e.out = t.out;
3049
3049
  });
3050
- function Bn(e, t) {
3050
+ function Fn(e, t) {
3051
3051
  return new Vd({
3052
3052
  type: "pipe",
3053
3053
  in: e,
@@ -3083,7 +3083,7 @@ function Yd(e) {
3083
3083
  });
3084
3084
  return t._zod.check = e, t;
3085
3085
  }
3086
- function Ts(e, t) {
3086
+ function Es(e, t) {
3087
3087
  return Uu(Xr, e ?? (() => !0), t);
3088
3088
  }
3089
3089
  function qd(e, t = {}) {
@@ -3137,7 +3137,7 @@ var xt = ({
3137
3137
  });
3138
3138
  return () => `${e}${n}${o()}`;
3139
3139
  }, Kd = xt();
3140
- function Vn(e = globalThis) {
3140
+ function Bn(e = globalThis) {
3141
3141
  var t, r, n;
3142
3142
  return e.window ? "runtime/browser" : (t = e.navigator) != null && t.userAgent ? `runtime/${e.navigator.userAgent.toLowerCase()}` : (n = (r = e.process) == null ? void 0 : r.versions) != null && n.node ? `runtime/node.js/${e.process.version.substring(0)}` : e.EdgeRuntime ? "runtime/vercel-edge" : "runtime/unknown";
3143
3143
  }
@@ -3156,7 +3156,7 @@ function Je(e) {
3156
3156
  }
3157
3157
  return t;
3158
3158
  }
3159
- function Hn(e, ...t) {
3159
+ function Vn(e, ...t) {
3160
3160
  const r = new Headers(Je(e)), n = r.get("user-agent") || "";
3161
3161
  return r.set(
3162
3162
  "user-agent",
@@ -3221,7 +3221,7 @@ function cp(e) {
3221
3221
  };
3222
3222
  });
3223
3223
  }
3224
- async function Gn({
3224
+ async function Hn({
3225
3225
  value: e,
3226
3226
  schema: t
3227
3227
  }) {
@@ -3262,7 +3262,7 @@ async function Qt({
3262
3262
  } catch (r) {
3263
3263
  return {
3264
3264
  success: !1,
3265
- error: In.isInstance(r) ? r : new In({ text: e, cause: r }),
3265
+ error: wn.isInstance(r) ? r : new wn({ text: e, cause: r }),
3266
3266
  rawValue: void 0
3267
3267
  };
3268
3268
  }
@@ -3289,7 +3289,7 @@ var up = (e, t) => {
3289
3289
  return [(e.length - r).toString(), ...t.slice(r)].join("/");
3290
3290
  }, dp = Symbol(
3291
3291
  "Let zodToJsonSchema decide on which parser to use"
3292
- ), Jn = {
3292
+ ), Gn = {
3293
3293
  name: void 0,
3294
3294
  $refStrategy: "root",
3295
3295
  basePath: ["#"],
@@ -3310,10 +3310,10 @@ var up = (e, t) => {
3310
3310
  base64Strategy: "contentEncoding:base64",
3311
3311
  nameStrategy: "ref"
3312
3312
  }, pp = (e) => typeof e == "string" ? {
3313
- ...Jn,
3313
+ ...Gn,
3314
3314
  name: e
3315
3315
  } : {
3316
- ...Jn,
3316
+ ...Gn,
3317
3317
  ...e
3318
3318
  };
3319
3319
  function ue() {
@@ -3352,15 +3352,15 @@ function hp(e) {
3352
3352
  function mp() {
3353
3353
  return { type: "boolean" };
3354
3354
  }
3355
- function Ss(e, t) {
3355
+ function Ts(e, t) {
3356
3356
  return L(e.type._def, t);
3357
3357
  }
3358
3358
  var gp = (e, t) => L(e.innerType._def, t);
3359
- function ks(e, t, r) {
3359
+ function Ss(e, t, r) {
3360
3360
  const n = r ?? t.dateStrategy;
3361
3361
  if (Array.isArray(n))
3362
3362
  return {
3363
- anyOf: n.map((o, s) => ks(e, t, o))
3363
+ anyOf: n.map((o, s) => Ss(e, t, o))
3364
3364
  };
3365
3365
  switch (n) {
3366
3366
  case "string":
@@ -3488,7 +3488,7 @@ var mr = void 0, ve = {
3488
3488
  nanoid: /^[a-zA-Z0-9_-]{21}$/,
3489
3489
  jwt: /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/
3490
3490
  };
3491
- function Cs(e, t) {
3491
+ function ks(e, t) {
3492
3492
  const r = {
3493
3493
  type: "string"
3494
3494
  };
@@ -3638,11 +3638,11 @@ function ae(e, t, r, n) {
3638
3638
  e.pattern || (o = e.allOf) != null && o.some((s) => s.pattern) ? (e.allOf || (e.allOf = []), e.pattern && (e.allOf.push({
3639
3639
  pattern: e.pattern
3640
3640
  }), delete e.pattern), e.allOf.push({
3641
- pattern: Wn(t, n),
3641
+ pattern: Jn(t, n),
3642
3642
  ...r && n.errorMessages && { errorMessage: { pattern: r } }
3643
- })) : e.pattern = Wn(t, n);
3643
+ })) : e.pattern = Jn(t, n);
3644
3644
  }
3645
- function Wn(e, t) {
3645
+ function Jn(e, t) {
3646
3646
  var r;
3647
3647
  if (!t.applyRegexFlags || !e.flags)
3648
3648
  return e.source;
@@ -3692,7 +3692,7 @@ function Wn(e, t) {
3692
3692
  }
3693
3693
  return s;
3694
3694
  }
3695
- function xs(e, t) {
3695
+ function Cs(e, t) {
3696
3696
  var r, n, o, s, i, a;
3697
3697
  const l = {
3698
3698
  type: "object",
@@ -3702,7 +3702,7 @@ function xs(e, t) {
3702
3702
  })) != null ? r : t.allowedAdditionalProperties
3703
3703
  };
3704
3704
  if (((n = e.keyType) == null ? void 0 : n._def.typeName) === N.ZodString && ((o = e.keyType._def.checks) != null && o.length)) {
3705
- const { type: c, ...p } = Cs(e.keyType._def, t);
3705
+ const { type: c, ...p } = ks(e.keyType._def, t);
3706
3706
  return {
3707
3707
  ...l,
3708
3708
  propertyNames: p
@@ -3716,7 +3716,7 @@ function xs(e, t) {
3716
3716
  }
3717
3717
  };
3718
3718
  if (((i = e.keyType) == null ? void 0 : i._def.typeName) === N.ZodBranded && e.keyType._def.type._def.typeName === N.ZodString && ((a = e.keyType._def.type._def.checks) != null && a.length)) {
3719
- const { type: c, ...p } = Ss(
3719
+ const { type: c, ...p } = Ts(
3720
3720
  e.keyType._def,
3721
3721
  t
3722
3722
  );
@@ -3730,7 +3730,7 @@ function xs(e, t) {
3730
3730
  }
3731
3731
  function kp(e, t) {
3732
3732
  if (t.mapStrategy === "record")
3733
- return xs(e, t);
3733
+ return Cs(e, t);
3734
3734
  const r = L(e.keyType._def, {
3735
3735
  ...t,
3736
3736
  currentPath: [...t.currentPath, "items", "items", "0"]
@@ -4003,7 +4003,7 @@ function Bp() {
4003
4003
  var Vp = (e, t) => L(e.innerType._def, t), Hp = (e, t, r) => {
4004
4004
  switch (t) {
4005
4005
  case N.ZodString:
4006
- return Cs(e, r);
4006
+ return ks(e, r);
4007
4007
  case N.ZodNumber:
4008
4008
  return Pp(e);
4009
4009
  case N.ZodObject:
@@ -4013,7 +4013,7 @@ var Vp = (e, t) => L(e.innerType._def, t), Hp = (e, t, r) => {
4013
4013
  case N.ZodBoolean:
4014
4014
  return mp();
4015
4015
  case N.ZodDate:
4016
- return ks(e, r);
4016
+ return Ss(e, r);
4017
4017
  case N.ZodUndefined:
4018
4018
  return Fp();
4019
4019
  case N.ZodNull:
@@ -4028,7 +4028,7 @@ var Vp = (e, t) => L(e.innerType._def, t), Hp = (e, t, r) => {
4028
4028
  case N.ZodTuple:
4029
4029
  return jp(e, r);
4030
4030
  case N.ZodRecord:
4031
- return xs(e, r);
4031
+ return Cs(e, r);
4032
4032
  case N.ZodLiteral:
4033
4033
  return Ep(e);
4034
4034
  case N.ZodEnum:
@@ -4059,7 +4059,7 @@ var Vp = (e, t) => L(e.innerType._def, t), Hp = (e, t, r) => {
4059
4059
  case N.ZodDefault:
4060
4060
  return yp(e, r);
4061
4061
  case N.ZodBranded:
4062
- return Ss(e, r);
4062
+ return Ts(e, r);
4063
4063
  case N.ZodReadonly:
4064
4064
  return Vp(e, r);
4065
4065
  case N.ZodCatch:
@@ -4208,7 +4208,7 @@ function Kp(e, t) {
4208
4208
  }),
4209
4209
  {
4210
4210
  validate: async (o) => {
4211
- const s = await gs(e, o);
4211
+ const s = await ms(e, o);
4212
4212
  return s.success ? { success: !0, value: s.data } : { success: !1, error: s.error };
4213
4213
  }
4214
4214
  }
@@ -4217,7 +4217,7 @@ function Kp(e, t) {
4217
4217
  function Qp(e) {
4218
4218
  return "_zod" in e;
4219
4219
  }
4220
- function As(e, t) {
4220
+ function xs(e, t) {
4221
4221
  return Qp(e) ? Kp(e) : Xp(e);
4222
4222
  }
4223
4223
  var Rr = Symbol.for("vercel.ai.schema");
@@ -4242,7 +4242,7 @@ function tf(e) {
4242
4242
  return e == null ? Qr({
4243
4243
  properties: {},
4244
4244
  additionalProperties: !1
4245
- }) : ef(e) ? e : typeof e == "function" ? e() : As(e);
4245
+ }) : ef(e) ? e : typeof e == "function" ? e() : xs(e);
4246
4246
  }
4247
4247
  function rf(e) {
4248
4248
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
@@ -4250,7 +4250,7 @@ function rf(e) {
4250
4250
  var nf = Object.defineProperty, of = (e, t) => {
4251
4251
  for (var r in t)
4252
4252
  nf(e, r, { get: t[r], enumerable: !0 });
4253
- }, Ns = "AI_NoObjectGeneratedError", Os = `vercel.ai.error.${Ns}`, sf = Symbol.for(Os), zs, Yn = class extends Ze {
4253
+ }, As = "AI_NoObjectGeneratedError", Ns = `vercel.ai.error.${As}`, sf = Symbol.for(Ns), Os, Wn = class extends Ze {
4254
4254
  constructor({
4255
4255
  message: e = "No object generated.",
4256
4256
  cause: t,
@@ -4259,18 +4259,18 @@ var nf = Object.defineProperty, of = (e, t) => {
4259
4259
  usage: o,
4260
4260
  finishReason: s
4261
4261
  }) {
4262
- super({ name: Ns, message: e, cause: t }), this[zs] = !0, this.text = r, this.response = n, this.usage = o, this.finishReason = s;
4262
+ super({ name: As, message: e, cause: t }), this[Os] = !0, this.text = r, this.response = n, this.usage = o, this.finishReason = s;
4263
4263
  }
4264
4264
  static isInstance(e) {
4265
- return Ze.hasMarker(e, Os);
4265
+ return Ze.hasMarker(e, Ns);
4266
4266
  }
4267
4267
  };
4268
- zs = sf;
4269
- var qn = "5.0.86", Ps = he([
4268
+ Os = sf;
4269
+ var Yn = "5.0.86", zs = he([
4270
4270
  S(),
4271
4271
  Xt(Uint8Array),
4272
4272
  Xt(ArrayBuffer),
4273
- Ts(
4273
+ Es(
4274
4274
  // Buffer might not be available in some environments such as CloudFlare:
4275
4275
  (e) => {
4276
4276
  var t, r;
@@ -4290,18 +4290,18 @@ var qn = "5.0.86", Ps = he([
4290
4290
  ), Y = Or(
4291
4291
  S(),
4292
4292
  Or(S(), It)
4293
- ), Rs = se({
4293
+ ), Ps = se({
4294
4294
  type: P("text"),
4295
4295
  text: S(),
4296
4296
  providerOptions: Y.optional()
4297
4297
  }), af = se({
4298
4298
  type: P("image"),
4299
- image: he([Ps, Xt(URL)]),
4299
+ image: he([zs, Xt(URL)]),
4300
4300
  mediaType: S().optional(),
4301
4301
  providerOptions: Y.optional()
4302
- }), Ms = se({
4302
+ }), Rs = se({
4303
4303
  type: P("file"),
4304
- data: he([Ps, Xt(URL)]),
4304
+ data: he([zs, Xt(URL)]),
4305
4305
  filename: S().optional(),
4306
4306
  mediaType: S(),
4307
4307
  providerOptions: Y.optional()
@@ -4349,7 +4349,7 @@ var qn = "5.0.86", Ps = he([
4349
4349
  ])
4350
4350
  )
4351
4351
  })
4352
- ]), $s = se({
4352
+ ]), Ms = se({
4353
4353
  type: P("tool-result"),
4354
4354
  toolCallId: S(),
4355
4355
  toolName: S(),
@@ -4365,7 +4365,7 @@ var qn = "5.0.86", Ps = he([
4365
4365
  role: P("user"),
4366
4366
  content: he([
4367
4367
  S(),
4368
- it(he([Rs, af, Ms]))
4368
+ it(he([Ps, af, Rs]))
4369
4369
  ]),
4370
4370
  providerOptions: Y.optional()
4371
4371
  }), ff = se({
@@ -4374,18 +4374,18 @@ var qn = "5.0.86", Ps = he([
4374
4374
  S(),
4375
4375
  it(
4376
4376
  he([
4377
+ Ps,
4377
4378
  Rs,
4378
- Ms,
4379
4379
  cf,
4380
4380
  lf,
4381
- $s
4381
+ Ms
4382
4382
  ])
4383
4383
  )
4384
4384
  ]),
4385
4385
  providerOptions: Y.optional()
4386
4386
  }), hf = se({
4387
4387
  role: P("tool"),
4388
- content: it($s),
4388
+ content: it(Ms),
4389
4389
  providerOptions: Y.optional()
4390
4390
  });
4391
4391
  he([
@@ -4399,7 +4399,7 @@ xt({
4399
4399
  size: 24
4400
4400
  });
4401
4401
  var mf = ap(
4402
- () => As(
4402
+ () => xs(
4403
4403
  he([
4404
4404
  G({
4405
4405
  type: P("text-start"),
@@ -4505,7 +4505,7 @@ var mf = ap(
4505
4505
  providerMetadata: Y.optional()
4506
4506
  }),
4507
4507
  G({
4508
- type: Ts(
4508
+ type: Es(
4509
4509
  (e) => typeof e == "string" && e.startsWith("data-"),
4510
4510
  { message: 'Type must start with "data-"' }
4511
4511
  ),
@@ -4541,7 +4541,7 @@ var mf = ap(
4541
4541
  function gf(e) {
4542
4542
  return e.type.startsWith("data-");
4543
4543
  }
4544
- function Zs(e, t) {
4544
+ function $s(e, t) {
4545
4545
  if (e === void 0 && t === void 0)
4546
4546
  return;
4547
4547
  if (e === void 0)
@@ -4555,7 +4555,7 @@ function Zs(e, t) {
4555
4555
  if (o === void 0)
4556
4556
  continue;
4557
4557
  const s = n in e ? e[n] : void 0, i = o !== null && typeof o == "object" && !Array.isArray(o) && !(o instanceof Date) && !(o instanceof RegExp), a = s != null && typeof s == "object" && !Array.isArray(s) && !(s instanceof Date) && !(s instanceof RegExp);
4558
- i && a ? r[n] = Zs(
4558
+ i && a ? r[n] = $s(
4559
4559
  s,
4560
4560
  o
4561
4561
  ) : r[n] = o;
@@ -4810,7 +4810,7 @@ function vf(e) {
4810
4810
  }
4811
4811
  return a;
4812
4812
  }
4813
- async function Ds(e) {
4813
+ async function Zs(e) {
4814
4814
  if (e === void 0)
4815
4815
  return { value: void 0, state: "undefined-input" };
4816
4816
  let t = await Qt({ text: e });
@@ -4822,10 +4822,10 @@ function Ut(e) {
4822
4822
  function yf(e) {
4823
4823
  return e.type === "dynamic-tool";
4824
4824
  }
4825
- function Xn(e) {
4825
+ function qn(e) {
4826
4826
  return Ut(e) || yf(e);
4827
4827
  }
4828
- function Kn(e) {
4828
+ function Xn(e) {
4829
4829
  return e.type.split("-").slice(1).join("-");
4830
4830
  }
4831
4831
  function _f({
@@ -4918,8 +4918,8 @@ function bf({
4918
4918
  }
4919
4919
  async function I(m) {
4920
4920
  if (m != null) {
4921
- const k = c.message.metadata != null ? Zs(c.message.metadata, m) : m;
4922
- t != null && await Gn({
4921
+ const k = c.message.metadata != null ? $s(c.message.metadata, m) : m;
4922
+ t != null && await Hn({
4923
4923
  value: k,
4924
4924
  schema: t
4925
4925
  }), c.message.metadata = k;
@@ -5020,7 +5020,7 @@ function bf({
5020
5020
  case "tool-input-delta": {
5021
5021
  const m = c.partialToolCalls[a.toolCallId];
5022
5022
  m.text += a.inputTextDelta;
5023
- const { value: k } = await Ds(
5023
+ const { value: k } = await Zs(
5024
5024
  m.text
5025
5025
  );
5026
5026
  m.dynamic ? b({
@@ -5094,7 +5094,7 @@ function bf({
5094
5094
  const m = f(a.toolCallId);
5095
5095
  w({
5096
5096
  toolCallId: a.toolCallId,
5097
- toolName: Kn(m),
5097
+ toolName: Xn(m),
5098
5098
  state: "output-available",
5099
5099
  input: m.input,
5100
5100
  output: a.output,
@@ -5122,7 +5122,7 @@ function bf({
5122
5122
  const m = f(a.toolCallId);
5123
5123
  w({
5124
5124
  toolCallId: a.toolCallId,
5125
- toolName: Kn(m),
5125
+ toolName: Xn(m),
5126
5126
  state: "output-error",
5127
5127
  input: m.input,
5128
5128
  rawInput: m.rawInput,
@@ -5159,7 +5159,7 @@ function bf({
5159
5159
  }
5160
5160
  default:
5161
5161
  if (gf(a)) {
5162
- r?.[a.type] != null && await Gn({
5162
+ r?.[a.type] != null && await Hn({
5163
5163
  value: a.data,
5164
5164
  schema: r[a.type]
5165
5165
  });
@@ -5251,7 +5251,7 @@ var Tf = () => ({
5251
5251
  schema: t.jsonSchema
5252
5252
  },
5253
5253
  async parsePartial({ text: r }) {
5254
- const n = await Ds(r);
5254
+ const n = await Zs(r);
5255
5255
  switch (n.state) {
5256
5256
  case "failed-parse":
5257
5257
  case "undefined-input":
@@ -5271,7 +5271,7 @@ var Tf = () => ({
5271
5271
  async parseOutput({ text: r }, n) {
5272
5272
  const o = await Qt({ text: r });
5273
5273
  if (!o.success)
5274
- throw new Yn({
5274
+ throw new Wn({
5275
5275
  message: "No object generated: could not parse the response.",
5276
5276
  cause: o.error,
5277
5277
  text: r,
@@ -5284,7 +5284,7 @@ var Tf = () => ({
5284
5284
  schema: t
5285
5285
  });
5286
5286
  if (!s.success)
5287
- throw new Yn({
5287
+ throw new Wn({
5288
5288
  message: "No object generated: response did not match schema.",
5289
5289
  cause: s.error,
5290
5290
  text: r,
@@ -5358,13 +5358,13 @@ var Cf = class {
5358
5358
  messageId: t.messageId
5359
5359
  }, f = (o = u?.credentials) != null ? o : c, w = await ((s = this.fetch) != null ? s : globalThis.fetch)(g, {
5360
5360
  method: "POST",
5361
- headers: Hn(
5361
+ headers: Vn(
5362
5362
  {
5363
5363
  "Content-Type": "application/json",
5364
5364
  ...v
5365
5365
  },
5366
- `ai-sdk/${qn}`,
5367
- Vn()
5366
+ `ai-sdk/${Yn}`,
5367
+ Bn()
5368
5368
  ),
5369
5369
  body: JSON.stringify(h),
5370
5370
  credentials: f,
@@ -5392,10 +5392,10 @@ var Cf = class {
5392
5392
  requestMetadata: e.metadata
5393
5393
  })), u = (r = p?.api) != null ? r : `${this.api}/${e.chatId}/stream`, g = p?.headers !== void 0 ? Je(p.headers) : c, v = (n = p?.credentials) != null ? n : l, f = await ((o = this.fetch) != null ? o : globalThis.fetch)(u, {
5394
5394
  method: "GET",
5395
- headers: Hn(
5395
+ headers: Vn(
5396
5396
  g,
5397
- `ai-sdk/${qn}`,
5398
- Vn()
5397
+ `ai-sdk/${Yn}`,
5398
+ Bn()
5399
5399
  ),
5400
5400
  credentials: v
5401
5401
  });
@@ -5517,10 +5517,10 @@ var Cf = class {
5517
5517
  this.state.replaceMessage(b.length - 1, {
5518
5518
  ...I,
5519
5519
  parts: I.parts.map(
5520
- (m) => Xn(m) && m.toolCallId === v ? { ...m, state: u, output: h, errorText: f } : m
5520
+ (m) => qn(m) && m.toolCallId === v ? { ...m, state: u, output: h, errorText: f } : m
5521
5521
  )
5522
5522
  }), this.activeResponse && (this.activeResponse.state.message.parts = this.activeResponse.state.message.parts.map(
5523
- (m) => Xn(m) && m.toolCallId === v ? {
5523
+ (m) => qn(m) && m.toolCallId === v ? {
5524
5524
  ...m,
5525
5525
  state: u,
5526
5526
  output: h,
@@ -5684,10 +5684,10 @@ function Of() {
5684
5684
  }
5685
5685
  return vr(Nf);
5686
5686
  }
5687
- const zf = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Qn = { randomUUID: zf };
5687
+ const zf = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Kn = { randomUUID: zf };
5688
5688
  function Ne(e, t, r) {
5689
- if (Qn.randomUUID && !e)
5690
- return Qn.randomUUID();
5689
+ if (Kn.randomUUID && !e)
5690
+ return Kn.randomUUID();
5691
5691
  e = e || {};
5692
5692
  const n = e.random ?? e.rng?.() ?? Of();
5693
5693
  if (n.length < 16)
@@ -5695,23 +5695,23 @@ function Ne(e, t, r) {
5695
5695
  return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Af(n);
5696
5696
  }
5697
5697
  let yr = null, _r = null;
5698
- const Ls = async () => (yr || (yr = import(
5698
+ const Ds = async () => (yr || (yr = import(
5699
5699
  /* webpackChunkName: "toast-react-toastify" */
5700
5700
  "./index.790ujKXR.js"
5701
- )), yr), Us = async () => (_r || (_r = import(
5701
+ )), yr), Ls = async () => (_r || (_r = import(
5702
5702
  /* webpackChunkName: "toast-utilities" */
5703
- "./index.Q0TPtuHy.js"
5703
+ "./index.BHptKcss.js"
5704
5704
  ).then((e) => e.utilities)), _r), Pf = async () => {
5705
5705
  try {
5706
- await Promise.all([Ls(), Us()]);
5706
+ await Promise.all([Ds(), Ls()]);
5707
5707
  } catch {
5708
5708
  }
5709
- }, js = async (e, t = "success", r) => {
5709
+ }, Us = async (e, t = "success", r) => {
5710
5710
  try {
5711
5711
  window.dispatchEvent(new CustomEvent("toast-request"));
5712
5712
  const [{ toast: n, Slide: o }, { toastOptions: s }] = await Promise.all([
5713
- Ls(),
5714
- Us()
5713
+ Ds(),
5714
+ Ls()
5715
5715
  ]), i = s({
5716
5716
  ...r,
5717
5717
  transition: o
@@ -5722,9 +5722,9 @@ const Ls = async () => (yr || (yr = import(
5722
5722
  }, 100);
5723
5723
  } catch {
5724
5724
  }
5725
- }, Et = (e, t) => js(e, "success", t), Em = (e, t) => js(e, "error", t), Ye = "CHAT_SET_STATUS", Fs = "CHAT_SET_USAGE", at = "CHAT_SET_ATTACHMENTS", tn = "CHAT_SET_PROVIDER", Ue = "CHAT_RESET", Rf = (e, t) => {
5725
+ }, Et = (e, t) => Us(e, "success", t), Em = (e, t) => Us(e, "error", t), Ye = "CHAT_SET_STATUS", js = "CHAT_SET_USAGE", at = "CHAT_SET_ATTACHMENTS", Fs = "CHAT_SET_PROVIDER", Ue = "CHAT_RESET", Rf = (e, t) => {
5726
5726
  switch (t.type) {
5727
- case Fs:
5727
+ case js:
5728
5728
  return {
5729
5729
  ...e,
5730
5730
  tokenUsage: e.tokenUsage + t.payload.tokenUsage
@@ -5750,7 +5750,7 @@ const Ls = async () => (yr || (yr = import(
5750
5750
  lastStreamingTimestamp: n ? Date.now() : e.lastStreamingTimestamp
5751
5751
  };
5752
5752
  }
5753
- case tn:
5753
+ case Fs:
5754
5754
  return {
5755
5755
  ...e,
5756
5756
  provider: t.payload.provider
@@ -5795,12 +5795,12 @@ const Ls = async () => (yr || (yr = import(
5795
5795
  }
5796
5796
  }, $f = (e, t) => {
5797
5797
  switch (t?.type) {
5798
- case fo:
5798
+ case po:
5799
5799
  return {
5800
5800
  prompt: t.payload.prompt,
5801
5801
  lastTriggeredTimestamp: e.lastTriggeredTimestamp
5802
5802
  };
5803
- case po:
5803
+ case uo:
5804
5804
  return {
5805
5805
  prompt: "",
5806
5806
  lastTriggeredTimestamp: (/* @__PURE__ */ new Date()).getTime()
@@ -5809,10 +5809,10 @@ const Ls = async () => (yr || (yr = import(
5809
5809
  return e;
5810
5810
  }
5811
5811
  };
5812
- var br, eo;
5812
+ var br, Qn;
5813
5813
  function Zf() {
5814
- if (eo) return br;
5815
- eo = 1;
5814
+ if (Qn) return br;
5815
+ Qn = 1;
5816
5816
  function e(t, r) {
5817
5817
  if (typeof t != "function")
5818
5818
  throw new TypeError(`Expected the first argument to be a \`function\`, got \`${typeof t}\`.`);
@@ -5898,7 +5898,7 @@ ht = /* @__PURE__ */ new WeakMap();
5898
5898
  nt = /* @__PURE__ */ new WeakMap();
5899
5899
  Mr = /* @__PURE__ */ new WeakMap();
5900
5900
  $r = /* @__PURE__ */ new WeakMap();
5901
- var ot, to = class extends xf {
5901
+ var ot, eo = class extends xf {
5902
5902
  constructor({ messages: e, ...t }) {
5903
5903
  const r = new jf(e);
5904
5904
  super({ ...t, state: r }), Te(this, ot, void 0), this["~registerMessagesCallback"] = (n, o) => B(this, ot)["~registerMessagesCallback"](n, o), this["~registerStatusCallback"] = (n) => B(this, ot)["~registerStatusCallback"](n), this["~registerErrorCallback"] = (n) => B(this, ot)["~registerErrorCallback"](n), Re(this, ot, r);
@@ -5911,9 +5911,9 @@ function Ff({
5911
5911
  ...r
5912
5912
  } = {}) {
5913
5913
  const n = W(
5914
- "chat" in r ? r.chat : new to(r)
5914
+ "chat" in r ? r.chat : new eo(r)
5915
5915
  );
5916
- ("chat" in r && r.chat !== n.current || "id" in r && n.current.id !== r.id) && (n.current = "chat" in r ? r.chat : new to(r));
5916
+ ("chat" in r && r.chat !== n.current || "id" in r && n.current.id !== r.id) && (n.current = "chat" in r ? r.chat : new eo(r));
5917
5917
  const s = "id" in r ? r.id : null, i = q(
5918
5918
  (u) => n.current["~registerMessagesCallback"](u, e),
5919
5919
  // optionsId is required to trigger re-subscription when the chat ID changes
@@ -5953,7 +5953,7 @@ function Ff({
5953
5953
  addToolResult: n.current.addToolResult
5954
5954
  };
5955
5955
  }
5956
- const ro = () => ({
5956
+ const to = () => ({
5957
5957
  onFinish: /* @__PURE__ */ new Set(),
5958
5958
  onError: /* @__PURE__ */ new Set(),
5959
5959
  onData: /* @__PURE__ */ new Set(),
@@ -5981,9 +5981,9 @@ function Bf({
5981
5981
  children: e,
5982
5982
  value: t
5983
5983
  }) {
5984
- const r = W(ro()), [n, o] = M("");
5984
+ const r = W(to()), [n, o] = M("");
5985
5985
  $(() => {
5986
- r.current = ro();
5986
+ r.current = to();
5987
5987
  }, [t]);
5988
5988
  const s = q((p) => {
5989
5989
  for (const u of r.current.onError)
@@ -6025,7 +6025,7 @@ function Bf({
6025
6025
  }
6026
6026
  const Vf = ({ chatId: e }) => {
6027
6027
  const { messages: t } = Fe(), [r, n] = ke({
6028
- key: Me + ho,
6028
+ key: Me + fo,
6029
6029
  initialValue: ""
6030
6030
  }), o = W(e), s = W(!1);
6031
6031
  return $(() => {
@@ -6034,7 +6034,7 @@ const Vf = ({ chatId: e }) => {
6034
6034
  }, [e, t.length, n]), null;
6035
6035
  };
6036
6036
  let $t = !1, wr = null;
6037
- const no = ({
6037
+ const ro = ({
6038
6038
  containerId: e,
6039
6039
  ...t
6040
6040
  }) => {
@@ -6063,43 +6063,36 @@ const no = ({
6063
6063
  currentChatId: e,
6064
6064
  setChatId: t,
6065
6065
  setInitialMessages: r,
6066
- dispatchChat: n,
6067
- stateProvider: o
6066
+ dispatchChat: n
6068
6067
  }) => {
6069
- const { user: s, getAccessToken: i } = me(), [a, l] = M(!1), [c] = ke({
6070
- key: Me + ho,
6068
+ const { user: o, getAccessToken: s } = me(), [i, a] = M(!1), [l] = ke({
6069
+ key: Me + fo,
6071
6070
  initialValue: ""
6072
- }), u = (aa || mo() || yt()) && !!c && !a && !!s?.username && c !== e, { data: g } = ia({
6073
- chatId: u ? c : void 0,
6074
- getAccessToken: i,
6075
- enabled: u
6071
+ }), p = (aa || ho() || yt()) && !!l && !i && !!o?.username && l !== e, { data: u } = ia({
6072
+ chatId: p ? l : void 0,
6073
+ getAccessToken: s,
6074
+ enabled: p
6076
6075
  });
6077
6076
  return $(() => {
6078
- !g || !u || a || g.messages && (g.provider && o !== g.provider && n({
6079
- type: tn,
6080
- payload: {
6081
- provider: g.provider
6082
- }
6083
- }), n({
6077
+ !u || !p || i || u.messages && (n({
6084
6078
  type: Ye,
6085
6079
  payload: {
6086
6080
  streaming: !1,
6087
6081
  loading: !1,
6088
6082
  restoring: !0,
6089
- restoredModel: g?.model || "",
6090
- restoredUsage: g?.tokenUsage || 0
6083
+ restoredModel: u?.model || "",
6084
+ restoredUsage: u?.tokenUsage || 0
6091
6085
  }
6092
- }), t(c), r(g.messages), l(!0));
6086
+ }), t(l), r(u.messages), a(!0));
6093
6087
  }, [
6094
- g,
6095
6088
  u,
6096
- a,
6097
- c,
6098
- o,
6089
+ p,
6090
+ i,
6091
+ l,
6099
6092
  t,
6100
6093
  r,
6101
6094
  n
6102
- ]), { hasRestoredFromCache: a };
6095
+ ]), { hasRestoredFromCache: i };
6103
6096
  }, Gf = "z-20", Jf = "z-10";
6104
6097
  /*!
6105
6098
  @versini/ui-tooltip v3.1.0
@@ -6114,7 +6107,7 @@ try {
6114
6107
  });
6115
6108
  } catch {
6116
6109
  }
6117
- const Wf = "av-tooltip", Yf = "av-tooltip-arrow", Zt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, qf = () => O("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), oo = ({ mode: e }) => O({
6110
+ const Wf = "av-tooltip", Yf = "av-tooltip-arrow", Zt = (e, t = "px") => typeof e > "u" ? "" : `${Math.round(e)}${t}`, qf = () => O("absolute top-0 left-0 w-max py-1 px-2 rounded-sm text-sm z-50"), no = ({ mode: e }) => O({
6118
6111
  "bg-surface-darker": e === "dark" || e === "system",
6119
6112
  "bg-surface-light": e === "light" || e === "alt-system",
6120
6113
  "dark:bg-surface-light": e === "system",
@@ -6125,11 +6118,11 @@ const Wf = "av-tooltip", Yf = "av-tooltip-arrow", Zt = (e, t = "px") => typeof e
6125
6118
  "dark:text-copy-dark": e === "system",
6126
6119
  "dark:text-copy-light": e === "alt-system"
6127
6120
  }), Kf = () => O("absolute", "size-2", "transform rotate-45"), Qf = ({ mode: e, className: t, tooltipClassName: r, arrowClassName: n }) => {
6128
- const o = O("relative inline-block", t), s = O(Wf, qf(), oo({
6121
+ const o = O("relative inline-block", t), s = O(Wf, qf(), no({
6129
6122
  mode: e
6130
6123
  }), Xf({
6131
6124
  mode: e
6132
- }), r), i = O(Yf, Kf(), oo({
6125
+ }), r), i = O(Yf, Kf(), no({
6133
6126
  mode: e
6134
6127
  }), n);
6135
6128
  return {
@@ -6156,12 +6149,12 @@ const Wf = "av-tooltip", Yf = "av-tooltip-arrow", Zt = (e, t = "px") => typeof e
6156
6149
  const { x, y: T, middlewareData: C, placement: U } = await Ni(l.current, c.current, {
6157
6150
  placement: r,
6158
6151
  middleware: [
6159
- ko(10),
6160
- Co({
6152
+ So(10),
6153
+ ko({
6161
6154
  crossAxis: r.includes("-"),
6162
6155
  fallbackAxisSideDirection: "start"
6163
6156
  }),
6164
- xo({
6157
+ Co({
6165
6158
  padding: 5
6166
6159
  }),
6167
6160
  Oi({
@@ -6328,7 +6321,7 @@ const nh = ({
6328
6321
  });
6329
6322
  try {
6330
6323
  const x = await t();
6331
- await fetch(`${go}/api/abort`, {
6324
+ await fetch(`${mo}/api/abort`, {
6332
6325
  method: "POST",
6333
6326
  headers: {
6334
6327
  "Content-Type": "application/json",
@@ -6413,15 +6406,15 @@ try {
6413
6406
  }
6414
6407
  const Gs = /* @__PURE__ */ Br(null);
6415
6408
  function ah({ initialOpen: e = !1, open: t, onOpenChange: r } = {}) {
6416
- const [n, o] = M(e), [s, i] = M(), [a, l] = M(), c = t ?? n, p = r ?? o, u = Ao({
6409
+ const [n, o] = M(e), [s, i] = M(), [a, l] = M(), c = t ?? n, p = r ?? o, u = xo({
6417
6410
  open: c,
6418
6411
  onOpenChange: p
6419
- }), g = u.context, v = No(g, {
6412
+ }), g = u.context, v = Ao(g, {
6420
6413
  enabled: t == null
6421
- }), h = Oo(g, {
6414
+ }), h = No(g, {
6422
6415
  outsidePress: !1,
6423
6416
  outsidePressEvent: "mousedown"
6424
- }), f = zo(g), y = Po([
6417
+ }), f = Oo(g), y = zo([
6425
6418
  v,
6426
6419
  h,
6427
6420
  f
@@ -6485,7 +6478,7 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
6485
6478
  })
6486
6479
  });
6487
6480
  }), lh = /* @__PURE__ */ Xe(function({ children: t, ...r }, n) {
6488
- const { setLabelId: o } = or(), s = So();
6481
+ const { setLabelId: o } = or(), s = To();
6489
6482
  return Vr(() => (o(s), () => o(void 0)), [
6490
6483
  s,
6491
6484
  o
@@ -6496,7 +6489,7 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
6496
6489
  children: t
6497
6490
  });
6498
6491
  }), uh = /* @__PURE__ */ Xe(function({ children: t, ...r }, n) {
6499
- const { setDescriptionId: o } = or(), s = So();
6492
+ const { setDescriptionId: o } = or(), s = To();
6500
6493
  return Vr(() => (o(s), () => o(void 0)), [
6501
6494
  s,
6502
6495
  o
@@ -6552,8 +6545,8 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
6552
6545
  header: "sm:p-4 mb-0 p-2",
6553
6546
  close: "sm:p-4 p-2"
6554
6547
  };
6555
- }, fh = "slide", so = "fade", hh = ({ open: e, onOpenChange: t, title: r, children: n, footer: o, borderMode: s = "light", kind: i = _e, className: a, animation: l = !1, animationType: c = fh, maxWidth: p = "medium", maxHeight: u }) => {
6556
- const g = W(""), [v, h] = M(l ? c === so ? {
6548
+ }, fh = "slide", oo = "fade", hh = ({ open: e, onOpenChange: t, title: r, children: n, footer: o, borderMode: s = "light", kind: i = _e, className: a, animation: l = !1, animationType: c = fh, maxWidth: p = "medium", maxHeight: u }) => {
6549
+ const g = W(""), [v, h] = M(l ? c === oo ? {
6557
6550
  opacity: 0
6558
6551
  } : {
6559
6552
  transform: "translateY(-100vh)"
@@ -6572,7 +6565,7 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
6572
6565
  e
6573
6566
  ]), $(() => {
6574
6567
  if (l && e) {
6575
- h(l ? c === so ? {
6568
+ h(l ? c === oo ? {
6576
6569
  opacity: 0
6577
6570
  } : {
6578
6571
  transform: "translateY(-666vh)"
@@ -6608,7 +6601,7 @@ const ch = /* @__PURE__ */ Xe(function(t, r) {
6608
6601
  focusMode: "light",
6609
6602
  noBorder: !0,
6610
6603
  label: "Close",
6611
- children: /* @__PURE__ */ d(vo, {
6604
+ children: /* @__PURE__ */ d(go, {
6612
6605
  monotone: !0
6613
6606
  })
6614
6607
  })
@@ -6680,7 +6673,7 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
6680
6673
  "border-border-light bg-surface-darker": e === "dark",
6681
6674
  "border-border-light bg-surface-darker dark:border-border-dark dark:bg-surface-medium": e === "alt-system",
6682
6675
  "border-border-medium bg-surface-medium dark:border-border-light dark:bg-surface-darker": e === "system"
6683
- }), ao = ({ labelHidden: e, labelMode: t, mode: r, labelPosition: n = "right", subLabel: o = !1 }) => (t = t || r, e ? "sr-only" : O("select-none", {
6676
+ }), so = ({ labelHidden: e, labelMode: t, mode: r, labelPosition: n = "right", subLabel: o = !1 }) => (t = t || r, e ? "sr-only" : O("select-none", {
6684
6677
  "ml-2": n === "right",
6685
6678
  "mr-2": n === "left",
6686
6679
  "text-copy-dark": t === "light" && !o,
@@ -6706,13 +6699,13 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
6706
6699
  }), yh({
6707
6700
  narrow: s
6708
6701
  })),
6709
- label: ao({
6702
+ label: so({
6710
6703
  labelHidden: r,
6711
6704
  labelMode: i,
6712
6705
  mode: e,
6713
6706
  labelPosition: a
6714
6707
  }),
6715
- subLabel: ao({
6708
+ subLabel: so({
6716
6709
  labelHidden: r,
6717
6710
  labelMode: i,
6718
6711
  mode: e,
@@ -6794,7 +6787,7 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
6794
6787
  }) => {
6795
6788
  const u = /* @__PURE__ */ A(Er, { columnGap: 2, alignHorizontal: "flex-end", children: [
6796
6789
  /* @__PURE__ */ d(st, { children: !s && /* @__PURE__ */ d(
6797
- sn,
6790
+ on,
6798
6791
  {
6799
6792
  noBorder: !0,
6800
6793
  mode: "dark",
@@ -6807,7 +6800,7 @@ const mh = "av-toggle", gh = ({ narrow: e }) => O(
6807
6800
  }
6808
6801
  ) }),
6809
6802
  /* @__PURE__ */ d(st, { children: /* @__PURE__ */ d(
6810
- sn,
6803
+ on,
6811
6804
  {
6812
6805
  noBorder: !0,
6813
6806
  mode: "dark",
@@ -6993,7 +6986,7 @@ const Bt = /* @__PURE__ */ Br({
6993
6986
  isOpen: !1,
6994
6987
  allowHover: !1,
6995
6988
  parent: null
6996
- }), io = (e) => {
6989
+ }), ao = (e) => {
6997
6990
  if (typeof e == "string")
6998
6991
  return e;
6999
6992
  if (typeof e == "function")
@@ -7005,9 +6998,9 @@ const Bt = /* @__PURE__ */ Br({
7005
6998
  }
7006
6999
  return "Element";
7007
7000
  }, Zr = /* @__PURE__ */ Xe(({ trigger: e, children: t, label: r = "Open menu", defaultPlacement: n = "bottom-start", onOpenChange: o, mode: s = "system", focusMode: i = "system", ...a }, l) => {
7008
- const [c, p] = M(!1), [u, g] = M(!1), [v, h] = M(null), [f, y] = M(!1), w = W([]), b = W([]), I = X(Bt), m = $o(), k = Ri(), x = Ro(), T = Mo({
7001
+ const [c, p] = M(!1), [u, g] = M(!1), [v, h] = M(null), [f, y] = M(!1), w = W([]), b = W([]), I = X(Bt), m = Mo(), k = Ri(), x = Po(), T = Ro({
7009
7002
  label: r !== "Open menu" ? r : null
7010
- }), C = x != null, { floatingStyles: U, refs: F, context: z } = Ao({
7003
+ }), C = x != null, { floatingStyles: U, refs: F, context: z } = xo({
7011
7004
  nodeId: k,
7012
7005
  open: c,
7013
7006
  onOpenChange: (K) => {
@@ -7016,18 +7009,18 @@ const Bt = /* @__PURE__ */ Br({
7016
7009
  placement: C ? "right-start" : n,
7017
7010
  strategy: "fixed",
7018
7011
  middleware: [
7019
- ko(() => C ? {
7012
+ So(() => C ? {
7020
7013
  mainAxis: window.innerWidth < 640 ? 22 : 14,
7021
7014
  alignmentAxis: -4
7022
7015
  } : {
7023
7016
  mainAxis: 10,
7024
7017
  alignmentAxis: 0
7025
7018
  }),
7026
- Co(),
7027
- xo()
7019
+ ko(),
7020
+ Co()
7028
7021
  ],
7029
7022
  whileElementsMounted: Mi
7030
- }), Q = $i(z, {
7023
+ }), ee = $i(z, {
7031
7024
  enabled: C && f,
7032
7025
  delay: {
7033
7026
  open: 75
@@ -7035,13 +7028,13 @@ const Bt = /* @__PURE__ */ Br({
7035
7028
  handleClose: Zi({
7036
7029
  blockPointerEvents: !0
7037
7030
  })
7038
- }), le = No(z, {
7031
+ }), le = Ao(z, {
7039
7032
  event: "mousedown",
7040
7033
  toggle: !C || !f,
7041
7034
  ignoreMouse: C && f
7042
- }), R = zo(z, {
7035
+ }), R = Oo(z, {
7043
7036
  role: "menu"
7044
- }), Qe = Oo(z, {
7037
+ }), Qe = No(z, {
7045
7038
  bubbles: !0
7046
7039
  }), de = Di(z, {
7047
7040
  listRef: w,
@@ -7053,8 +7046,8 @@ const Bt = /* @__PURE__ */ Br({
7053
7046
  listRef: b,
7054
7047
  onMatch: c ? h : void 0,
7055
7048
  activeIndex: v
7056
- }), { getReferenceProps: At, getFloatingProps: ct, getItemProps: pe } = Po([
7057
- Q,
7049
+ }), { getReferenceProps: At, getFloatingProps: ct, getItemProps: pe } = zo([
7050
+ ee,
7058
7051
  le,
7059
7052
  R,
7060
7053
  Qe,
@@ -7108,7 +7101,7 @@ const Bt = /* @__PURE__ */ Br({
7108
7101
  }), window.removeEventListener("keydown", re, !0);
7109
7102
  };
7110
7103
  }, []);
7111
- const et = io(e) === "Button" || io(e) === "ButtonIcon", sr = et ? {
7104
+ const et = ao(e) === "Button" || ao(e) === "ButtonIcon", sr = et ? {
7112
7105
  noInternalClick: et,
7113
7106
  focusMode: i,
7114
7107
  mode: s
@@ -7117,7 +7110,7 @@ const Bt = /* @__PURE__ */ Br({
7117
7110
  const K = O("flex items-center flex-row justify-between", "w-full", "m-0 first:mt-0 mt-2 sm:mt-1 px-2 py-1", "rounded-md border border-transparent", "text-left text-base", "outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline", "disabled:cursor-not-allowed disabled:text-copy-medium", {
7118
7111
  "bg-surface-lighter": c && !u
7119
7112
  });
7120
- return /* @__PURE__ */ A(bn, {
7113
+ return /* @__PURE__ */ A(_n, {
7121
7114
  id: k,
7122
7115
  children: [
7123
7116
  /* @__PURE__ */ A("button", {
@@ -7154,7 +7147,7 @@ const Bt = /* @__PURE__ */ Br({
7154
7147
  allowHover: f,
7155
7148
  parent: I
7156
7149
  },
7157
- children: /* @__PURE__ */ d(wn, {
7150
+ children: /* @__PURE__ */ d(bn, {
7158
7151
  elementsRef: w,
7159
7152
  labelsRef: b,
7160
7153
  children: c && /* @__PURE__ */ d(Cr, {
@@ -7177,7 +7170,7 @@ const Bt = /* @__PURE__ */ Br({
7177
7170
  ]
7178
7171
  });
7179
7172
  }
7180
- const Nt = /* @__PURE__ */ To.cloneElement(e, {
7173
+ const Nt = /* @__PURE__ */ Eo.cloneElement(e, {
7181
7174
  ...sr,
7182
7175
  "aria-label": r,
7183
7176
  "data-open": c ? "" : void 0,
@@ -7187,7 +7180,7 @@ const Bt = /* @__PURE__ */ Br({
7187
7180
  ...a
7188
7181
  }))
7189
7182
  });
7190
- return /* @__PURE__ */ A(bn, {
7183
+ return /* @__PURE__ */ A(_n, {
7191
7184
  id: k,
7192
7185
  children: [
7193
7186
  Nt,
@@ -7201,7 +7194,7 @@ const Bt = /* @__PURE__ */ Br({
7201
7194
  allowHover: f,
7202
7195
  parent: I
7203
7196
  },
7204
- children: /* @__PURE__ */ d(wn, {
7197
+ children: /* @__PURE__ */ d(bn, {
7205
7198
  elementsRef: w,
7206
7199
  labelsRef: b,
7207
7200
  children: c && /* @__PURE__ */ d(Cr, {
@@ -7223,7 +7216,7 @@ const Bt = /* @__PURE__ */ Br({
7223
7216
  })
7224
7217
  ]
7225
7218
  });
7226
- }), Tt = /* @__PURE__ */ Xe((e, t) => Ro() === null ? /* @__PURE__ */ d(Pi, {
7219
+ }), Tt = /* @__PURE__ */ Xe((e, t) => Po() === null ? /* @__PURE__ */ d(Pi, {
7227
7220
  children: /* @__PURE__ */ d(Zr, {
7228
7221
  ...e,
7229
7222
  ref: t
@@ -7236,9 +7229,9 @@ Tt.displayName = "Menu";
7236
7229
  Zr.displayName = "MenuComponent";
7237
7230
  const be = /* @__PURE__ */ Xe(({ label: e, disabled: t, icon: r, raw: n = !1, children: o, ignoreClick: s = !1, selected: i, ...a }, l) => {
7238
7231
  let c = "";
7239
- const p = X(Bt), u = Mo({
7232
+ const p = X(Bt), u = Ro({
7240
7233
  label: t ? null : e
7241
- }), g = $o(), v = Hr([
7234
+ }), g = Mo(), v = Hr([
7242
7235
  u.ref,
7243
7236
  l
7244
7237
  ]);
@@ -7320,7 +7313,7 @@ const kh = ({ className: e, ...t }) => {
7320
7313
  privateChat: w
7321
7314
  }
7322
7315
  }), s({
7323
- type: fo,
7316
+ type: po,
7324
7317
  payload: {
7325
7318
  prompt: y
7326
7319
  }
@@ -7662,7 +7655,7 @@ const kh = ({ className: e, ...t }) => {
7662
7655
  onClick: () => t(r),
7663
7656
  noBorder: !0,
7664
7657
  size: "small",
7665
- children: /* @__PURE__ */ d(vo, { size: "size-3" })
7658
+ children: /* @__PURE__ */ d(go, { size: "size-3" })
7666
7659
  }
7667
7660
  )
7668
7661
  ]
@@ -7676,7 +7669,7 @@ const kh = ({ className: e, ...t }) => {
7676
7669
  " ",
7677
7670
  Vt(Lr)
7678
7671
  ] })
7679
- ] }), Ws = 24, Dh = 500, Ys = 2, Lh = 5, Uh = Ws * Ys, co = Lh * Ws, jh = "ready", Fh = "streaming", Bh = "error", Vh = "submitted", Dt = (e) => {
7672
+ ] }), Ws = 24, Dh = 500, Ys = 2, Lh = 5, Uh = Ws * Ys, io = Lh * Ws, jh = "ready", Fh = "streaming", Bh = "error", Vh = "submitted", Dt = (e) => {
7680
7673
  e.current && (e.current.style.height = `${Uh}px`);
7681
7674
  }, Hh = () => O(
7682
7675
  "relative rounded-md text-base h-auto min-w-28 overflow-hidden pt-2"
@@ -7705,7 +7698,7 @@ const kh = ({ className: e, ...t }) => {
7705
7698
  provider: b,
7706
7699
  privateChat: I
7707
7700
  }
7708
- } = X(Ee), { state: m, dispatch: k } = X(Fr), { state: x } = X(yo), { refetch: T } = Na({
7701
+ } = X(Ee), { state: m, dispatch: k } = X(Fr), { state: x } = X(vo), { refetch: T } = Na({
7709
7702
  enabled: !1,
7710
7703
  user: e?.username || "",
7711
7704
  searchString: x.searchString,
@@ -7715,7 +7708,7 @@ const kh = ({ className: e, ...t }) => {
7715
7708
  }), { data: C } = je({
7716
7709
  user: e?.username,
7717
7710
  getAccessToken: t
7718
- }), U = W(null), F = W(null), z = W(!1), Q = W(0), le = W(null), R = W(null), Qe = Oa(), [de, Be] = xe(), At = () => O(
7711
+ }), U = W(null), F = W(null), z = W(!1), ee = W(0), le = W(null), R = W(null), Qe = Oa(), [de, Be] = xe(), At = () => O(
7719
7712
  "peer",
7720
7713
  "text-base resize-none overflow-hidden w-full text-inherit outline-none",
7721
7714
  "h-6 pr-2 pl-3",
@@ -7734,7 +7727,7 @@ const kh = ({ className: e, ...t }) => {
7734
7727
  T();
7735
7728
  const te = D.message?.metadata;
7736
7729
  te?.tokenUsage && g({
7737
- type: Fs,
7730
+ type: js,
7738
7731
  payload: {
7739
7732
  tokenUsage: te.tokenUsage
7740
7733
  }
@@ -7757,7 +7750,7 @@ const kh = ({ className: e, ...t }) => {
7757
7750
  privateChat: I,
7758
7751
  ...ne?.body
7759
7752
  };
7760
- C?.model && _o(C.model, o) && (te.model = C.model), Nt(
7753
+ C?.model && yo(C.model, o) && (te.model = C.model), Nt(
7761
7754
  {
7762
7755
  text: K,
7763
7756
  ...ne?.experimental_attachments && {
@@ -7780,7 +7773,7 @@ const kh = ({ className: e, ...t }) => {
7780
7773
  C?.model,
7781
7774
  o
7782
7775
  ]
7783
- ), nn = q(
7776
+ ), rn = q(
7784
7777
  async (D) => {
7785
7778
  D === jh && g({
7786
7779
  type: Ye,
@@ -7820,8 +7813,8 @@ const kh = ({ className: e, ...t }) => {
7820
7813
  [g, lt, f]
7821
7814
  );
7822
7815
  $(() => {
7823
- et && nn(et);
7824
- }, [et, nn]), $(() => {
7816
+ et && rn(et);
7817
+ }, [et, rn]), $(() => {
7825
7818
  C?.sendOnEnter !== void 0 && p(C.sendOnEnter);
7826
7819
  }, [C]);
7827
7820
  const ar = q(() => {
@@ -7829,8 +7822,8 @@ const kh = ({ className: e, ...t }) => {
7829
7822
  return;
7830
7823
  R.current.style.height = "auto";
7831
7824
  const D = R.current.scrollHeight;
7832
- if (D > co) {
7833
- R.current.style.height = `${co}px`, R.current.style.overflowY = "scroll";
7825
+ if (D > io) {
7826
+ R.current.style.height = `${io}px`, R.current.style.overflowY = "scroll";
7834
7827
  return;
7835
7828
  }
7836
7829
  R.current.style.height = `${D}px`, R.current.style.overflowY = "hidden";
@@ -7881,7 +7874,7 @@ const kh = ({ className: e, ...t }) => {
7881
7874
  }), F.current && (F.current.value = "");
7882
7875
  }, ra = q(() => {
7883
7876
  F.current && (F.current.value = ""), i(null);
7884
- }, []), on = async (D) => {
7877
+ }, []), nn = async (D) => {
7885
7878
  D.preventDefault(), Dt(R);
7886
7879
  const ne = await t();
7887
7880
  let te;
@@ -7915,11 +7908,11 @@ const kh = ({ className: e, ...t }) => {
7915
7908
  ]), $(() => {
7916
7909
  if (m.prompt !== "") {
7917
7910
  const D = m.prompt.endsWith(":") && !m.prompt.endsWith(": ") ? m.prompt + " " : m.prompt;
7918
- D.indexOf(an) !== -1 ? navigator.clipboard.readText().then((te) => {
7911
+ D.indexOf(sn) !== -1 ? navigator.clipboard.readText().then((te) => {
7919
7912
  const Ve = te.startsWith("http://") || te.startsWith("https://") ? te : `"""${te}"""`;
7920
- re(D.replace(an, Ve));
7913
+ re(D.replace(sn, Ve));
7921
7914
  }) : re(D), !$e() && R.current && R.current.focus(), k({
7922
- type: po
7915
+ type: uo
7923
7916
  });
7924
7917
  }
7925
7918
  }, [m, k, re]), $(() => {
@@ -7927,7 +7920,7 @@ const kh = ({ className: e, ...t }) => {
7927
7920
  z.current = !0, !K && Dt(R);
7928
7921
  return;
7929
7922
  }
7930
- y > 0 && y !== Q.current ? (Q.current = y, setTimeout(() => {
7923
+ y > 0 && y !== ee.current ? (ee.current = y, setTimeout(() => {
7931
7924
  R.current && (!K && Dt(R), R.current.focus());
7932
7925
  }, Dh)) : h === !1 && !K && (Dt(R), !$e() && R.current && R.current.focus());
7933
7926
  }, [y, h, K]), $(() => {
@@ -7953,8 +7946,8 @@ const kh = ({ className: e, ...t }) => {
7953
7946
  children: /* @__PURE__ */ d("p", { className: "m-0", children: U.current })
7954
7947
  }
7955
7948
  ),
7956
- /* @__PURE__ */ d("div", { className: ct.wrapper, ref: le, children: /* @__PURE__ */ A("form", { onSubmit: on, children: [
7957
- /* @__PURE__ */ d("div", { id: Qe, className: "sr-only", children: Tr() ? cn : c ? ln : un }),
7949
+ /* @__PURE__ */ d("div", { className: ct.wrapper, ref: le, children: /* @__PURE__ */ A("form", { onSubmit: nn, children: [
7950
+ /* @__PURE__ */ d("div", { id: Qe, className: "sr-only", children: Tr() ? an : c ? cn : ln }),
7958
7951
  /* @__PURE__ */ A("div", { className: "relative", children: [
7959
7952
  /* @__PURE__ */ d(
7960
7953
  "textarea",
@@ -7962,12 +7955,12 @@ const kh = ({ className: e, ...t }) => {
7962
7955
  required: !0,
7963
7956
  rows: Ys,
7964
7957
  ref: R,
7965
- placeholder: Tr() ? cn : c ? ln : un,
7958
+ placeholder: Tr() ? an : c ? cn : ln,
7966
7959
  translate: "no",
7967
7960
  onChange: na,
7968
7961
  value: K,
7969
7962
  onKeyDown: Ma([
7970
- [c ? "enter" : "mod+Enter", on]
7963
+ [c ? "enter" : "mod+Enter", nn]
7971
7964
  ]),
7972
7965
  className: ct.textArea,
7973
7966
  "aria-labelledby": Qe
@@ -8038,10 +8031,10 @@ const kh = ({ className: e, ...t }) => {
8038
8031
  state: { footerHeight: o, footerPosition: s, fullScreen: i, oledMode: a },
8039
8032
  dispatch: l
8040
8033
  } = X(St), [c] = M(
8041
- () => dn[Math.floor(Math.random() * dn.length)]
8042
- ), { messages: p } = Fe(), { height: u } = Za(), { height: g } = Da(), [v, h] = bo(), f = we(() => $e(), []), y = we(() => La(), []), w = u - g, b = we(() => {
8043
- const I = f ? Ua : y ? ja : wo;
8044
- return w > 70 && w < 500 ? f ? pn / 2 : pn : I;
8034
+ () => un[Math.floor(Math.random() * un.length)]
8035
+ ), { messages: p } = Fe(), { height: u } = Za(), { height: g } = Da(), [v, h] = _o(), f = we(() => $e(), []), y = we(() => La(), []), w = u - g, b = we(() => {
8036
+ const I = f ? Ua : y ? ja : bo;
8037
+ return w > 70 && w < 500 ? f ? dn / 2 : dn : I;
8045
8038
  }, [w, f, y]);
8046
8039
  return $(() => {
8047
8040
  o !== h.height && l({
@@ -8153,16 +8146,16 @@ const kh = ({ className: e, ...t }) => {
8153
8146
  user: i?.username,
8154
8147
  getAccessToken: s
8155
8148
  }), b = we(() => {
8156
- if (fn(l, c)) {
8157
- const z = Ba(l), Q = Ir.filter(
8149
+ if (pn(l, c)) {
8150
+ const z = Ba(l), ee = Ir.filter(
8158
8151
  (le) => z.includes(
8159
8152
  le.id
8160
8153
  )
8161
8154
  );
8162
- return Q.length > 0 ? Q : Ir;
8155
+ return ee.length > 0 ? ee : Ir;
8163
8156
  }
8164
8157
  return Ir;
8165
- }, [l, c]), I = we(() => fn(l, c) ? qa(l) : /* @__PURE__ */ new Map(), [l, c]), m = we(() => {
8158
+ }, [l, c]), I = we(() => pn(l, c) ? qa(l) : /* @__PURE__ */ new Map(), [l, c]), m = we(() => {
8166
8159
  if (!w?.useNestedModelSelection)
8167
8160
  return !1;
8168
8161
  for (const z of I.values())
@@ -8171,11 +8164,11 @@ const kh = ({ className: e, ...t }) => {
8171
8164
  return !1;
8172
8165
  }, [w?.useNestedModelSelection, I]), k = async (z) => {
8173
8166
  try {
8174
- n(Ne()), o([]), z !== w?.provider && (await hn({
8167
+ n(Ne()), o([]), z !== w?.provider && (await fn({
8175
8168
  provider: z,
8176
8169
  accessToken: await s(),
8177
8170
  username: i?.username || ""
8178
- }), y(), await Et(`${mn} ${z}`, {
8171
+ }), y(), await Et(`${hn} ${z}`, {
8179
8172
  containerId: "toggle-provider"
8180
8173
  })), t({
8181
8174
  type: Ue,
@@ -8185,18 +8178,18 @@ const kh = ({ className: e, ...t }) => {
8185
8178
  });
8186
8179
  } catch {
8187
8180
  }
8188
- }, x = async (z, Q) => {
8181
+ }, x = async (z, ee) => {
8189
8182
  try {
8190
- if (n(Ne()), o([]), z !== w?.provider || Q !== w?.model) {
8191
- await hn({
8183
+ if (n(Ne()), o([]), z !== w?.provider || ee !== w?.model) {
8184
+ await fn({
8192
8185
  provider: z,
8193
- model: Q,
8186
+ model: ee,
8194
8187
  accessToken: await s(),
8195
8188
  username: i?.username || ""
8196
8189
  }), y();
8197
- const le = ur[Q] || Q;
8190
+ const le = ur[ee] || ee;
8198
8191
  await Et(
8199
- `${mn} ${z} (${le})`,
8192
+ `${hn} ${z} (${le})`,
8200
8193
  {
8201
8194
  containerId: "toggle-provider"
8202
8195
  }
@@ -8212,7 +8205,7 @@ const kh = ({ className: e, ...t }) => {
8212
8205
  }
8213
8206
  }, T = w && f, C = T && b.find(
8214
8207
  (z) => w.provider === z.id
8215
- )?.icon || b[0]?.icon, U = we(() => !w?.useNestedModelSelection || !w?.model || !l || !_o(w.model, l) ? null : ur[w.model] || w.model, [w?.useNestedModelSelection, w?.model, l]), F = /* @__PURE__ */ d(Ae, { children: /* @__PURE__ */ A(
8208
+ )?.icon || b[0]?.icon, U = we(() => !w?.useNestedModelSelection || !w?.model || !l || !yo(w.model, l) ? null : ur[w.model] || w.model, [w?.useNestedModelSelection, w?.model, l]), F = /* @__PURE__ */ d(Ae, { children: /* @__PURE__ */ A(
8216
8209
  Tt,
8217
8210
  {
8218
8211
  mode: "dark",
@@ -8239,13 +8232,13 @@ const kh = ({ className: e, ...t }) => {
8239
8232
  children: [
8240
8233
  /* @__PURE__ */ d(Dr, { children: "Providers" }),
8241
8234
  T && b.map((z) => {
8242
- const Q = I.get(z.id) || [];
8243
- return m && Q.length > 1 ? /* @__PURE__ */ A(Tt, { label: z.label, children: [
8235
+ const ee = I.get(z.id) || [];
8236
+ return m && ee.length > 1 ? /* @__PURE__ */ A(Tt, { label: z.label, children: [
8244
8237
  /* @__PURE__ */ A(Dr, { children: [
8245
8238
  z.label,
8246
8239
  " Models"
8247
8240
  ] }),
8248
- Q.map((R) => /* @__PURE__ */ d(
8241
+ ee.map((R) => /* @__PURE__ */ d(
8249
8242
  be,
8250
8243
  {
8251
8244
  selected: w.provider === z.id && w.model === R,
@@ -8293,38 +8286,38 @@ const kh = ({ className: e, ...t }) => {
8293
8286
  }, Kh = Oe(
8294
8287
  () => import(
8295
8288
  /* webpackChunkName: "modal-chunk" */
8296
- "./ProfileEntry.k75Va2Cz.js"
8289
+ "./ProfileEntry.DpxtnxMi.js"
8297
8290
  ).then((e) => ({
8298
8291
  default: e.Profile
8299
8292
  }))
8300
8293
  ), Qh = Oe(
8301
8294
  () => import(
8302
8295
  /* webpackChunkName: "modal-chunk" */
8303
- "./SettingsEntry.D29K9xF_.js"
8296
+ "./SettingsEntry.CAf7JHHN.js"
8304
8297
  ).then((e) => ({
8305
8298
  default: e.SettingsPanel
8306
8299
  }))
8307
8300
  ), em = Oe(
8308
8301
  () => import(
8309
8302
  /* webpackChunkName: "modal-chunk" */
8310
- "./HistoryEntry.CewFhms8.js"
8303
+ "./HistoryEntry.Bair25TG.js"
8311
8304
  ).then((e) => ({
8312
8305
  default: e.HistoryPanel
8313
8306
  }))
8314
8307
  ), tm = Oe(
8315
8308
  () => import(
8316
8309
  /* webpackChunkName: "modal-chunk" */
8317
- "./AboutEntry.BcWHXPTl.js"
8310
+ "./AboutEntry.BpkbOp-E.js"
8318
8311
  ).then((e) => ({ default: e.About }))
8319
8312
  ), rm = Oe(
8320
8313
  () => import(
8321
8314
  /* webpackChunkName: "modal-chunk" */
8322
- "./UsageEntry.qqzZUjsN.js"
8315
+ "./UsageEntry.WJO19NIA.js"
8323
8316
  ).then((e) => ({ default: e.Usage }))
8324
8317
  ), nm = Oe(
8325
8318
  () => import(
8326
8319
  /* webpackChunkName: "modal-chunk" */
8327
- "./UserMemoriesPanel.B1FmaK56.js"
8320
+ "./UserMemoriesPanel.Cc8bs-bq.js"
8328
8321
  ).then(
8329
8322
  (e) => ({ default: e.default })
8330
8323
  )
@@ -8374,23 +8367,23 @@ const kh = ({ className: e, ...t }) => {
8374
8367
  h || Promise.all([
8375
8368
  import(
8376
8369
  /* webpackChunkName: "modal-chunk" */
8377
- "./ProfileEntry.k75Va2Cz.js"
8370
+ "./ProfileEntry.DpxtnxMi.js"
8378
8371
  ),
8379
8372
  import(
8380
8373
  /* webpackChunkName: "modal-chunk" */
8381
- "./SettingsEntry.D29K9xF_.js"
8374
+ "./SettingsEntry.CAf7JHHN.js"
8382
8375
  ),
8383
8376
  import(
8384
8377
  /* webpackChunkName: "modal-chunk" */
8385
- "./HistoryEntry.CewFhms8.js"
8378
+ "./HistoryEntry.Bair25TG.js"
8386
8379
  ),
8387
8380
  import(
8388
8381
  /* webpackChunkName: "modal-chunk" */
8389
- "./AboutEntry.BcWHXPTl.js"
8382
+ "./AboutEntry.BpkbOp-E.js"
8390
8383
  ),
8391
8384
  import(
8392
8385
  /* webpackChunkName: "modal-chunk" */
8393
- "./UsageEntry.qqzZUjsN.js"
8386
+ "./UsageEntry.WJO19NIA.js"
8394
8387
  )
8395
8388
  ]).finally(() => f(!0));
8396
8389
  }, [h]), m = q((U) => {
@@ -8429,9 +8422,9 @@ const kh = ({ className: e, ...t }) => {
8429
8422
  setShowConfirmation: v,
8430
8423
  action: C,
8431
8424
  customStrings: {
8432
- confirmAction: gn,
8425
+ confirmAction: mn,
8433
8426
  cancelAction: "Cancel",
8434
- title: gn
8427
+ title: mn
8435
8428
  },
8436
8429
  children: /* @__PURE__ */ d("p", { children: "Are you sure you want to log out?" })
8437
8430
  }
@@ -8613,13 +8606,13 @@ try {
8613
8606
  });
8614
8607
  } catch {
8615
8608
  }
8616
- const lo = "av-spinner", qs = ({ spinnerRef: e, mode: t = "system", type: r = "circle", className: n }) => {
8617
- const o = r === "circle" ? O(lo, "h-8 w-8", "align-[-0.125em]", "border-4", "inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]", {
8609
+ const co = "av-spinner", qs = ({ spinnerRef: e, mode: t = "system", type: r = "circle", className: n }) => {
8610
+ const o = r === "circle" ? O(co, "h-8 w-8", "align-[-0.125em]", "border-4", "inline-block animate-spin rounded-full border-solid border-current border-r-transparent motion-reduce:animate-[spin_1.5s_linear_infinite]", {
8618
8611
  "text-copy-dark": t === "dark",
8619
8612
  "text-copy-accent": t === "light",
8620
8613
  "text-copy-dark dark:text-copy-accent": t === "system",
8621
8614
  "text-copy-accent dark:text-copy-dark": t === "alt-system"
8622
- }, n) : O(lo, n), s = O("av-spinner__dot", {
8615
+ }, n) : O(co, n), s = O("av-spinner__dot", {
8623
8616
  "fill-copy-dark": t === "dark",
8624
8617
  "fill-copy-accent": t === "light",
8625
8618
  "fill-copy-dark dark:fill-copy-accent": t === "system",
@@ -8660,20 +8653,20 @@ const lo = "av-spinner", qs = ({ spinnerRef: e, mode: t = "system", type: r = "c
8660
8653
  ]
8661
8654
  });
8662
8655
  }, cm = Oe(
8663
- () => import("./index.BsGDroXc.js").then((e) => ({ default: e.Bubble }))
8664
- ), rn = (e) => /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", { className: "inline-block" }), children: /* @__PURE__ */ d(cm, { ...e }) });
8665
- rn.displayName = "AsyncBubble";
8666
- const uo = 1, lm = 150, um = Oe(
8656
+ () => import("./index.CPHEqdrL.js").then((e) => ({ default: e.Bubble }))
8657
+ ), tn = (e) => /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", { className: "inline-block" }), children: /* @__PURE__ */ d(cm, { ...e }) });
8658
+ tn.displayName = "AsyncBubble";
8659
+ const lo = 1, lm = 150, um = Oe(
8667
8660
  () => import(
8668
8661
  /* webpackChunkName: "LazyMessageAssistant" */
8669
- "./ChatBubbleAssistant.QcgMeCXD.js"
8662
+ "./ChatBubbleAssistant.BFj2pLII.js"
8670
8663
  )
8671
8664
  ), dm = Oe(
8672
8665
  () => import(
8673
8666
  /* webpackChunkName: "LazyMessageUser" */
8674
- "./ChatBubbleUser.DBCisdEg.js"
8667
+ "./ChatBubbleUser.Cpvxvebn.js"
8675
8668
  )
8676
- ), pm = To.memo(
8669
+ ), pm = Eo.memo(
8677
8670
  ({
8678
8671
  role: e,
8679
8672
  content: t,
@@ -8686,7 +8679,7 @@ const uo = 1, lm = 150, um = Oe(
8686
8679
  () => o && (s === "streaming" || s === "submitted")
8687
8680
  );
8688
8681
  return $(() => {
8689
- if (o && i && t && t.trim().length >= uo) {
8682
+ if (o && i && t && t.trim().length >= lo) {
8690
8683
  const u = Date.now() - l.current, g = lm - u;
8691
8684
  if (g > 0) {
8692
8685
  const v = setTimeout(
@@ -8697,7 +8690,7 @@ const uo = 1, lm = 150, um = Oe(
8697
8690
  }
8698
8691
  a(!1);
8699
8692
  }
8700
- }, [t, i, o]), e === Io && t ? /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(dm, { content: t }) }) : (e === _t || e === vn) && o && (s === "submitted" || s === "streaming") && i ? /* @__PURE__ */ d(rn, { tail: !0, children: /* @__PURE__ */ d(qs, { type: "dots" }) }) : (e === _t || e === vn) && t && t.trim().length >= uo ? /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(
8693
+ }, [t, i, o]), e === wo && t ? /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(dm, { content: t }) }) : (e === _t || e === gn) && o && (s === "submitted" || s === "streaming") && i ? /* @__PURE__ */ d(tn, { tail: !0, children: /* @__PURE__ */ d(qs, { type: "dots" }) }) : (e === _t || e === gn) && t && t.trim().length >= lo ? /* @__PURE__ */ d(Gt, { fallback: /* @__PURE__ */ d("span", {}), children: /* @__PURE__ */ d(
8701
8694
  um,
8702
8695
  {
8703
8696
  role: e,
@@ -8733,7 +8726,7 @@ function hm(e) {
8733
8726
  }
8734
8727
  }
8735
8728
  const mm = () => {
8736
- const { messages: e, status: t } = Fe(), r = e ? e.map((s, i) => s.role === _t ? i : -1).filter((s) => s !== -1).pop() : -1, n = e && e.length > 0 ? e[e.length - 1] : null, o = (t === "submitted" || t === "streaming") && n?.role === Io;
8729
+ const { messages: e, status: t } = Fe(), r = e ? e.map((s, i) => s.role === _t ? i : -1).filter((s) => s !== -1).pop() : -1, n = e && e.length > 0 ? e[e.length - 1] : null, o = (t === "submitted" || t === "streaming") && n?.role === wo;
8737
8730
  return e && e.length > 0 ? /* @__PURE__ */ A("div", { className: "space-y-6 mt-2 @container", children: [
8738
8731
  e?.map((s, i) => {
8739
8732
  let a;
@@ -8751,7 +8744,7 @@ const mm = () => {
8751
8744
  l
8752
8745
  );
8753
8746
  }),
8754
- o && /* @__PURE__ */ d(rn, { tail: !0, children: /* @__PURE__ */ d(qs, { type: "dots" }) })
8747
+ o && /* @__PURE__ */ d(tn, { tail: !0, children: /* @__PURE__ */ d(qs, { type: "dots" }) })
8755
8748
  ] }) : null;
8756
8749
  }, gm = () => {
8757
8750
  const { isAuthenticated: e } = me(), { ref: t, inViewport: r } = ai(), n = W(null), o = W(null), {
@@ -8771,7 +8764,7 @@ const mm = () => {
8771
8764
  return $(() => {
8772
8765
  c && y();
8773
8766
  }, [c, y]), $(() => {
8774
- u.current = s === gt ? i + a + Eo + li + 15 : 0;
8767
+ u.current = s === gt ? i + a + Io + li + 15 : 0;
8775
8768
  }, [s, i, a]), /* @__PURE__ */ A(Ae, { children: [
8776
8769
  /* @__PURE__ */ A("div", { className: h, ref: n, children: [
8777
8770
  /* @__PURE__ */ d(
@@ -8808,12 +8801,12 @@ function Xs({
8808
8801
  isComponent: e = !1,
8809
8802
  headerHeight: t = 0
8810
8803
  }) {
8811
- const { user: r, getAccessToken: n } = me(), [o, s] = M(`${yn}px`), [i, a] = bo(), [l, c] = M(Ne()), [p, u] = M([]), [g] = ke({
8804
+ const { user: r, getAccessToken: n } = me(), [o, s] = M(`${vn}px`), [i, a] = _o(), [l, c] = M(Ne()), [p, u] = M([]), [g] = ke({
8812
8805
  key: Me + wi,
8813
8806
  initialValue: ""
8814
8807
  }), [v] = ke({
8815
8808
  key: Me + bi,
8816
- initialValue: _n
8809
+ initialValue: yn
8817
8810
  }), [h] = ke({
8818
8811
  key: Me + Ti,
8819
8812
  initialValue: mt.DESC
@@ -8829,12 +8822,12 @@ function Xs({
8829
8822
  }), b = we(() => ({
8830
8823
  footerPosition: Sr,
8831
8824
  footerHeight: 0,
8832
- footerOffset: $e() ? wo : 0,
8825
+ footerOffset: $e() ? bo : 0,
8833
8826
  oledMode: !1,
8834
8827
  fullScreen: !1,
8835
8828
  themeMode: di
8836
8829
  }), []), [I, m] = zt(pi, b), k = we(() => {
8837
- const de = $e(), Be = mo();
8830
+ const de = $e(), Be = ho();
8838
8831
  return de && Be ? "mt-1" : "mt-5";
8839
8832
  }, []), T = {
8840
8833
  searchString: g,
@@ -8843,7 +8836,7 @@ function Xs({
8843
8836
  switch (v) {
8844
8837
  case _i:
8845
8838
  return f;
8846
- case _n:
8839
+ case yn:
8847
8840
  default:
8848
8841
  return h;
8849
8842
  }
@@ -8854,7 +8847,7 @@ function Xs({
8854
8847
  ), [F, z] = zt($f, {
8855
8848
  prompt: "",
8856
8849
  lastTriggeredTimestamp: 0
8857
- }), [Q, le] = zt(Rf, {
8850
+ }), [ee, le] = zt(Rf, {
8858
8851
  provider: "",
8859
8852
  // OpenAI, Anthropic, etc.
8860
8853
  privateChat: !1,
@@ -8871,7 +8864,7 @@ function Xs({
8871
8864
  user: r?.username,
8872
8865
  getAccessToken: n
8873
8866
  }), Qe = we(() => new en({
8874
- api: `${go}/api/generate`,
8867
+ api: `${mo}/api/generate`,
8875
8868
  // Only include static values in transport body.
8876
8869
  body: {
8877
8870
  username: r?.username
@@ -8881,8 +8874,7 @@ function Xs({
8881
8874
  currentChatId: l,
8882
8875
  setChatId: c,
8883
8876
  setInitialMessages: u,
8884
- dispatchChat: le,
8885
- stateProvider: Q.provider
8877
+ dispatchChat: le
8886
8878
  }), $(() => {
8887
8879
  document.getElementById("root")?.classList.replace("app-hidden", "fadeIn");
8888
8880
  }, []), $(() => {
@@ -8902,7 +8894,7 @@ function Xs({
8902
8894
  });
8903
8895
  }, [R]), $(() => {
8904
8896
  R && R.provider && le({
8905
- type: tn,
8897
+ type: Fs,
8906
8898
  payload: {
8907
8899
  provider: R.provider
8908
8900
  }
@@ -8919,14 +8911,14 @@ function Xs({
8919
8911
  if (I.footerPosition === "FOOTER_BOTTOM") {
8920
8912
  const de = k === "mt-1" ? 4 : 20, Be = `calc(${a.height}px + ${de}px)`;
8921
8913
  s(
8922
- `calc(100svh - ${t}px - ${Be} - ${I.footerHeight}px - ${I.footerOffset}px - ${Eo}px)`
8914
+ `calc(100svh - ${t}px - ${Be} - ${I.footerHeight}px - ${I.footerOffset}px - ${Io}px)`
8923
8915
  );
8924
8916
  } else
8925
8917
  s(
8926
- $e() ? `${vi}px` : `${yn}px`
8918
+ $e() ? `${vi}px` : `${vn}px`
8927
8919
  );
8928
8920
  }, [I, a, t, k]), /* @__PURE__ */ d(
8929
- yo.Provider,
8921
+ vo.Provider,
8930
8922
  {
8931
8923
  value: {
8932
8924
  state: C,
@@ -8940,7 +8932,7 @@ function Xs({
8940
8932
  Ee.Provider,
8941
8933
  {
8942
8934
  value: {
8943
- state: Q,
8935
+ state: ee,
8944
8936
  dispatch: le,
8945
8937
  setChatId: c,
8946
8938
  setInitialMessages: u
@@ -8960,8 +8952,8 @@ function Xs({
8960
8952
  children: [
8961
8953
  /* @__PURE__ */ d(Vf, { chatId: l }),
8962
8954
  /* @__PURE__ */ A("div", { className: yi, children: [
8963
- /* @__PURE__ */ d(no, { containerId: "toggle-save" }),
8964
- /* @__PURE__ */ d(no, { containerId: "toggle-provider" })
8955
+ /* @__PURE__ */ d(ro, { containerId: "toggle-save" }),
8956
+ /* @__PURE__ */ d(ro, { containerId: "toggle-provider" })
8965
8957
  ] }),
8966
8958
  /* @__PURE__ */ d(
8967
8959
  "header",
@@ -8999,12 +8991,11 @@ Xs.displayName = "App";
8999
8991
  const Tm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: Xs }, Symbol.toStringTag, { value: "Module" }));
9000
8992
  export {
9001
8993
  Tm as App,
9002
- rn as AsyncBubble,
8994
+ tn as AsyncBubble,
9003
8995
  im as ButtonScroll,
9004
- tn as CHAT_SET_PROVIDER,
9005
8996
  Ye as CHAT_SET_STATUS,
9006
8997
  qe as ConfirmationPanel,
9007
- no as LazyToastContainerWrapper,
8998
+ ro as LazyToastContainerWrapper,
9008
8999
  hh as Panel,
9009
9000
  Th as Toggle,
9010
9001
  ze as Tooltip,