@versini/sassysaint 8.111.2 → 8.111.4

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 (81) hide show
  1. package/dist/chunks/{AboutChangelog.dWuiIfoL.js → AboutChangelog.C99ZrqKf.js} +2 -2
  2. package/dist/chunks/{AboutEntry.COzMcfpY.js → AboutEntry.YWAyYLjf.js} +7 -7
  3. package/dist/chunks/{App.DokcpVPh.js → App.D7kYRe3a.js} +627 -618
  4. package/dist/chunks/{Bubble.QRjcn1Lv.js → Bubble.MXxGhdx0.js} +1 -1
  5. package/dist/chunks/{ButtonIconDelete.Dab7ZeCq.js → ButtonIconDelete.Ca_-Z3g5.js} +2 -2
  6. package/dist/chunks/{Chart.DlnR1Gtb.js → Chart.BmxHbT7B.js} +2 -2
  7. package/dist/chunks/{ChatBubbleAssistant.Cqd-fUi1.js → ChatBubbleAssistant.BjZa9CVT.js} +4 -4
  8. package/dist/chunks/{ChatBubbleUser.CSOd70yB.js → ChatBubbleUser.BvDGQWGU.js} +3 -3
  9. package/dist/chunks/{ChatHistoryTable.BZREEzMX.js → ChatHistoryTable.gOA0wCai.js} +4 -4
  10. package/dist/chunks/{HistoryEntry.DyhOuzLz.js → HistoryEntry.m8eQcBA5.js} +6 -6
  11. package/dist/chunks/{LoginEntry.mnt2UmOe.js → LoginEntry.BZ0MKlEZ.js} +4 -4
  12. package/dist/chunks/{LogoEntry.lmV9zmpI.js → LogoEntry.VAaujt4V.js} +4 -4
  13. package/dist/chunks/{MemoriesEntry.BckrjsrE.js → MemoriesEntry.Dp9urYHa.js} +5 -5
  14. package/dist/chunks/{ProfileEntry.DhR2WKuK.js → ProfileEntry.8-BhqMWc.js} +4 -4
  15. package/dist/chunks/{SettingsEntry.kLs1a2Dj.js → SettingsEntry.BfQY7V1X.js} +5 -5
  16. package/dist/chunks/{UsageEntry.BLfcBtrN.js → UsageEntry.CzN_8YVL.js} +5 -5
  17. package/dist/chunks/{_baseUniq.DVmz6jHV.js → _baseUniq.rh3h2tHg.js} +1 -1
  18. package/dist/chunks/{arc.nOb9gxBl.js → arc.BKxb_yu5.js} +1 -1
  19. package/dist/chunks/{architecture-U656AL7Q.BVMn383j.js → architecture-U656AL7Q.B36n-DM7.js} +1 -1
  20. package/dist/chunks/{architectureDiagram-VXUJARFQ.CnR-iRhb.js → architectureDiagram-VXUJARFQ.D3-Qxo-7.js} +4 -4
  21. package/dist/chunks/{blockDiagram-VD42YOAC.D11ZpcLR.js → blockDiagram-VD42YOAC.Mp-Xb22B.js} +5 -5
  22. package/dist/chunks/{browser.DEC1s1QP.js → browser.DjQN4eNb.js} +1 -1
  23. package/dist/chunks/{c4Diagram-YG6GDRKO.bWSzY_rt.js → c4Diagram-YG6GDRKO.C9ltkFOr.js} +2 -2
  24. package/dist/chunks/{channel.1M5uTgQO.js → channel.Bo0ytD01.js} +1 -1
  25. package/dist/chunks/{chunk-4BX2VUAB.Cwa96jeP.js → chunk-4BX2VUAB.aYwLZcak.js} +1 -1
  26. package/dist/chunks/{chunk-55IACEB6.-zoAyrrp.js → chunk-55IACEB6.5GYTuunv.js} +1 -1
  27. package/dist/chunks/{chunk-B4BG7PRW.C4PYFgWM.js → chunk-B4BG7PRW.0yBrgVYm.js} +4 -4
  28. package/dist/chunks/{chunk-DI55MBZ5.CgFtYUkv.js → chunk-DI55MBZ5.CTqvgAEF.js} +3 -3
  29. package/dist/chunks/{chunk-FMBD7UC4.CwiKWz3b.js → chunk-FMBD7UC4.DaPPU-p7.js} +1 -1
  30. package/dist/chunks/{chunk-QN33PNHL.DHmqB3FK.js → chunk-QN33PNHL.By3k-QDP.js} +1 -1
  31. package/dist/chunks/{chunk-QZHKN3VN.DNkMA4Um.js → chunk-QZHKN3VN.DObI7QtE.js} +1 -1
  32. package/dist/chunks/{chunk-TZMSLE5B.U545n4hj.js → chunk-TZMSLE5B.DFJLOpRz.js} +1 -1
  33. package/dist/chunks/{classDiagram-2ON5EDUG.DDxo0x4a.js → classDiagram-2ON5EDUG.CiC1TMro.js} +2 -2
  34. package/dist/chunks/{classDiagram-v2-WZHVMYZB.DDxo0x4a.js → classDiagram-v2-WZHVMYZB.CiC1TMro.js} +2 -2
  35. package/dist/chunks/{clone.BDes26Un.js → clone.snnq5L3s.js} +1 -1
  36. package/dist/chunks/{cose-bilkent-S5V4N54A.CqstBDYg.js → cose-bilkent-S5V4N54A.CDA47A7Q.js} +2 -2
  37. package/dist/chunks/{dagre-6UL2VRFP.C3Ham4x2.js → dagre-6UL2VRFP.BQluIDmg.js} +5 -5
  38. package/dist/chunks/{diagram-PSM6KHXK.Dxc-laJf.js → diagram-PSM6KHXK.Zu7EeNCT.js} +4 -4
  39. package/dist/chunks/{diagram-QEK2KX5R.BYjaO11V.js → diagram-QEK2KX5R.C35h0Q1S.js} +3 -3
  40. package/dist/chunks/{diagram-S2PKOQOG.BdSvjyAT.js → diagram-S2PKOQOG.DeIusNHA.js} +3 -3
  41. package/dist/chunks/{erDiagram-Q2GNP2WA.fXzJbxCM.js → erDiagram-Q2GNP2WA.uQxkucxo.js} +4 -4
  42. package/dist/chunks/{flowDiagram-NV44I4VS.BRY_Tjyi.js → flowDiagram-NV44I4VS.BqkLb-Cs.js} +5 -5
  43. package/dist/chunks/{ganttDiagram-JELNMOA3.Cwp-eTU6.js → ganttDiagram-JELNMOA3.DxEo8Kjd.js} +2 -2
  44. package/dist/chunks/{gitGraph-F6HP7TQM.C6ZVwNEu.js → gitGraph-F6HP7TQM.Dco6xaH4.js} +1 -1
  45. package/dist/chunks/{gitGraphDiagram-NY62KEGX.gcnwvxHM.js → gitGraphDiagram-NY62KEGX.Wnzx_yR3.js} +4 -4
  46. package/dist/chunks/{graph.CPySSX5w.js → graph.BWteyPdy.js} +2 -2
  47. package/dist/chunks/{index.WUocwy4k.js → index.2IQnxrOb.js} +1 -1
  48. package/dist/chunks/{index.BzZO0Ipx.js → index.BRLCj5yF.js} +3 -3
  49. package/dist/chunks/{index.DTjyh1Yf.js → index.Byuy4Q49.js} +1 -1
  50. package/dist/chunks/{index.C2VHPd6a.js → index.CNqIVM7Q.js} +3 -3
  51. package/dist/chunks/{index.oLUsWDYJ.js → index.CZrGRJVJ.js} +1 -1
  52. package/dist/chunks/{index.CycGy587.js → index.D8xiBI-7.js} +1 -1
  53. package/dist/chunks/{index.pgMnuI31.js → index.DlSb-eu-.js} +3 -5
  54. package/dist/chunks/{index.DDgSNuFY.js → index.fanc5b7k.js} +1 -1
  55. package/dist/chunks/{index.BkTdw9OF.js → index.uWhcsflb.js} +1 -1
  56. package/dist/chunks/{info-NVLQJR56.DkAZ6t3I.js → info-NVLQJR56.BEKQeHwA.js} +1 -1
  57. package/dist/chunks/{infoDiagram-WHAUD3N6.DdkmJdhg.js → infoDiagram-WHAUD3N6.Dxbn3Ozt.js} +2 -2
  58. package/dist/chunks/{journeyDiagram-XKPGCS4Q.DytriVE4.js → journeyDiagram-XKPGCS4Q.BD7YwSgA.js} +4 -4
  59. package/dist/chunks/{kanban-definition-3W4ZIXB7.D9a_7W5C.js → kanban-definition-3W4ZIXB7.CK8JRptb.js} +2 -2
  60. package/dist/chunks/{layout.Ekany93E.js → layout.CJKebkKn.js} +4 -4
  61. package/dist/chunks/{mermaid-parser.core.Y-zUfZen.js → mermaid-parser.core.CSYrCldG.js} +10 -10
  62. package/dist/chunks/{min.DYaeWUNl.js → min.CQHAdIy9.js} +2 -2
  63. package/dist/chunks/{mindmap-definition-VGOIOE7T.BKI2PB37.js → mindmap-definition-VGOIOE7T.DM5DeM0F.js} +4 -4
  64. package/dist/chunks/{packet-BFZMPI3H.C9P9j3hX.js → packet-BFZMPI3H.DEd3gHu2.js} +1 -1
  65. package/dist/chunks/{pie-7BOR55EZ.CW0RRcCh.js → pie-7BOR55EZ.B6CjUa98.js} +1 -1
  66. package/dist/chunks/{pieDiagram-ADFJNKIX.vdiM68ye.js → pieDiagram-ADFJNKIX.Ch8Q0rB9.js} +4 -4
  67. package/dist/chunks/{quadrantDiagram-AYHSOK5B.D6xbUkl9.js → quadrantDiagram-AYHSOK5B.C0GD2d0M.js} +1 -1
  68. package/dist/chunks/{radar-NHE76QYJ.B5rD3VRN.js → radar-NHE76QYJ.D4DSygig.js} +1 -1
  69. package/dist/chunks/{rehype-mermaid.V9RRegCN.js → rehype-mermaid.cahUaoTc.js} +33 -33
  70. package/dist/chunks/{requirementDiagram-UZGBJVZJ.B-DgeZPf.js → requirementDiagram-UZGBJVZJ.VgYSoiVA.js} +3 -3
  71. package/dist/chunks/{sankeyDiagram-TZEHDZUN.B-rbHhsw.js → sankeyDiagram-TZEHDZUN.BxpPU8Mb.js} +1 -1
  72. package/dist/chunks/{sequenceDiagram-WL72ISMW.B7ALEyRR.js → sequenceDiagram-WL72ISMW.DaNv2DsB.js} +3 -3
  73. package/dist/chunks/{stateDiagram-FKZM4ZOC.DaKmdfH8.js → stateDiagram-FKZM4ZOC.CA2_FEiS.js} +4 -4
  74. package/dist/chunks/{stateDiagram-v2-4FDKWEC3.B1qCi5lM.js → stateDiagram-v2-4FDKWEC3.D7NqmU3X.js} +2 -2
  75. package/dist/chunks/{timeline-definition-IT6M3QCI.C6TzjvBh.js → timeline-definition-IT6M3QCI.Cg8zMgPR.js} +2 -2
  76. package/dist/chunks/{treemap-KMMF4GRG.DxJ6jLpj.js → treemap-KMMF4GRG.BVFWHatk.js} +1 -1
  77. package/dist/chunks/{useMarkdown.CQHDsVCK.js → useMarkdown.Dupv6NhF.js} +8 -8
  78. package/dist/chunks/{xychartDiagram-PRI3JC2R.LsJsnk8u.js → xychartDiagram-PRI3JC2R.D_CVF5rq.js} +1 -1
  79. package/dist/components/SassySaint/SassySaint.js +1 -1
  80. package/dist/index.js +3 -3
  81. package/package.json +3 -3
@@ -1,8 +1,8 @@
1
1
  import { jsx as h, jsxs as z, Fragment as ut } from "react/jsx-runtime";
2
- import { ACTION_SORT as lu, ACTION_SEARCH as uu, ACTION_RESET_PROMPT as Ya, ACTION_TOGGLE_PROMPT as Ja, LOCAL_STORAGE_PREFIX as Ve, LOCAL_STORAGE_CHAT_ID as Kn, n as $e, useChat as du, DEFAULT_ICON_ACTION_SIZE as tt, isTauri as sr, useUserPreferences as bt, serverUrl as Ka, useEntitlements as ko, useSaveChat as fu, LOCAL_STORAGE_PRIVATE_DISCLOSURE as pu, B as ar, LOCAL_STORAGE_REASONING_DISCLOSURE as mu, PROMPT_EDITABLE_AREA_CLASSNAME as hu, PROMPT_CLASSNAME as gu, j as Xa, ERROR_MESSAGE as vu, o as cn, U as yu, INPUT_BOTTOM_OFFSET_IPHONE as bu, INPUT_BOTTOM_OFFSET_IPAD as wu, INPUT_BOTTOM_OFFSET as qa, INPUT_BOTTOM_OFFSET_EXTRA as Zr, getLayoutPaddingClass as fo, canEvaluateModels as ds, k as _u, a as Eu, i as Su, s as Cu, x as xu, c as Ur, setNewProvider as fs, useQueryClient as Iu, n$1 as po, useServerCapabilities as Tu, getMessageContaintWrapperClass as Au, UI_FOOTER_BUFFER as Qa, UI_BUTTON_SCROLL_BUFFER as Ru, UI_DEFAULT_MAIN_HEIGHT as ps, e as Ou, applyOledMode as Nu, UI_DEFAULT_MAIN_HEIGHT_IPHONE as Pu, y as ms, v as Mu, LOCAL_STORAGE_SORT as ku, LOCAL_STORAGE_SEARCH as Du, LOCAL_STORAGE_OLED_MODE as $u, LOCAL_STORAGE_FULL_SCREEN as Lu, LOCAL_STORAGE_SORT_TIMESTAMP as zu, LOCAL_STORAGE_SORT_TOKEN_USAGE as Fu } from "./index.pgMnuI31.js";
2
+ import { ACTION_SORT as lu, ACTION_SEARCH as uu, ACTION_RESET_PROMPT as Ya, ACTION_TOGGLE_PROMPT as Ja, LOCAL_STORAGE_PREFIX as He, LOCAL_STORAGE_CHAT_ID as Kn, n as $e, useChat as du, DEFAULT_ICON_ACTION_SIZE as tt, isTauri as sr, useUserPreferences as bt, serverUrl as Ka, useEntitlements as ko, useSaveChat as fu, LOCAL_STORAGE_PRIVATE_DISCLOSURE as pu, B as ar, LOCAL_STORAGE_REASONING_DISCLOSURE as mu, PROMPT_EDITABLE_AREA_CLASSNAME as hu, PROMPT_CLASSNAME as gu, j as Xa, ERROR_MESSAGE as vu, o as cn, U as yu, INPUT_BOTTOM_OFFSET_IPHONE as bu, INPUT_BOTTOM_OFFSET_IPAD as wu, INPUT_BOTTOM_OFFSET as qa, INPUT_BOTTOM_OFFSET_EXTRA as Zr, getLayoutPaddingClass as fo, canEvaluateModels as ds, k as _u, a as Eu, i as Su, s as Cu, x as xu, c as Ur, setNewProvider as fs, useQueryClient as Iu, n$1 as po, useServerCapabilities as Tu, getMessageContaintWrapperClass as Au, UI_FOOTER_BUFFER as Qa, UI_BUTTON_SCROLL_BUFFER as Ru, UI_DEFAULT_MAIN_HEIGHT as ps, e as Ou, applyOledMode as Nu, UI_DEFAULT_MAIN_HEIGHT_IPHONE as Pu, y as ms, v as Mu, LOCAL_STORAGE_SORT as ku, LOCAL_STORAGE_SEARCH as Du, LOCAL_STORAGE_OLED_MODE as $u, LOCAL_STORAGE_FULL_SCREEN as Lu, LOCAL_STORAGE_SORT_TIMESTAMP as zu, LOCAL_STORAGE_SORT_TOKEN_USAGE as Fu } from "./index.DlSb-eu-.js";
3
3
  import * as w from "react";
4
- import Ze, { useSyncExternalStore as Xn, useCallback as Y, useEffect as Z, useRef as J, useState as B, createContext as ei, useContext as de, useMemo as Ae, useId as ti, useLayoutEffect as _n, cloneElement as ni, Suspense as ir, lazy as ot, useReducer as Dn } from "react";
5
- import { TableCellSortDirections as on, ChatContext as Le, useTheme as Ke, ButtonIcon as st, IconAddLight as Zu, IconCloseLight as Uu, IconEditLight as ju, Button as ri, IconLockedLight as Bu, IconUnlockedLight as Vu, IconNext as Hu, IconSelected as Wu, IconUnSelected as Gu, PromptsContext as Do, IconBookSparklesLight as Yu, IconRewrite as Ju, IconProofread as Ku, IconMagic as Xu, IconLightBulbLight as qu, IconSendLight as Qu, INPUT_PLACEHOLDER_TEXT_IN_SESSION as oi, INPUT_PLACEHOLDER_TEXT_MORNING as ed, INPUT_PLACEHOLDER_TEXT_TODAY as td, INPUT_PLACEHOLDER_TEXT_AFTERNOON as nd, INPUT_PLACEHOLDER_TEXT_EVENING as rd, INPUT_PLACEHOLDER_TEXT_NIGHT as od, INPUT_PLACEHOLDER_TEXT_DEFAULT as sd, IconClose as ad, AppContext as En, useUniqueId as id, CLIPBOARD_PROMPT as hs, FOOTER_DISCLAIMERS as gs, useResizeObserver as si, APP_SET_FOOTER_HEIGHT as cd, FOOTER_TOP as mo, FOOTER_BOTTOM as sn, APP_SET_FOOTER_POSITION as jr, IconOpenAI as ld, IconAnthropic as ud, IconGoogleGemini as dd, TOAST_PROVIDER_CHANGED as vs, LOG_OUT as ys, IconProfile as fd, IconSliders as pd, IconHistory as md, IconEditUser as hd, IconChart as gd, IconInfo as vd, IconBack as yd, IconSettings as bd, Logo as wd, appReducer as _d, APP_SET_OLED_MODE as Ed, APP_SET_FULL_SCREEN as Sd, APP_SET_THEME_MODE as Cd, APP_SET_THEME_PALETTE as xd, HistoryContext as Id, APP_CLASSNAME as Td, TOAST_CACHE_ENABLED as Ad, TOAST_CACHE_DISABLED as Rd } from "./LogoEntry.lmV9zmpI.js";
4
+ import Ze, { useSyncExternalStore as Xn, useCallback as J, useEffect as Z, useRef as W, useState as H, createContext as ei, useContext as de, useMemo as Ae, useId as ti, useLayoutEffect as _n, cloneElement as ni, Suspense as ir, lazy as ot, useReducer as Dn } from "react";
5
+ import { TableCellSortDirections as on, ChatContext as Le, useTheme as Ke, ButtonIcon as st, IconAddLight as Zu, IconCloseLight as Uu, IconEditLight as ju, Button as ri, IconLockedLight as Bu, IconUnlockedLight as Hu, IconNext as Vu, IconSelected as Wu, IconUnSelected as Gu, PromptsContext as Do, IconBookSparklesLight as Yu, IconRewrite as Ju, IconProofread as Ku, IconMagic as Xu, IconLightBulbLight as qu, IconSendLight as Qu, INPUT_PLACEHOLDER_TEXT_IN_SESSION as oi, INPUT_PLACEHOLDER_TEXT_MORNING as ed, INPUT_PLACEHOLDER_TEXT_TODAY as td, INPUT_PLACEHOLDER_TEXT_AFTERNOON as nd, INPUT_PLACEHOLDER_TEXT_EVENING as rd, INPUT_PLACEHOLDER_TEXT_NIGHT as od, INPUT_PLACEHOLDER_TEXT_DEFAULT as sd, IconClose as ad, AppContext as En, useUniqueId as id, CLIPBOARD_PROMPT as hs, FOOTER_DISCLAIMERS as gs, useResizeObserver as si, APP_SET_FOOTER_HEIGHT as cd, FOOTER_TOP as mo, FOOTER_BOTTOM as sn, APP_SET_FOOTER_POSITION as jr, IconOpenAI as ld, IconAnthropic as ud, IconGoogleGemini as dd, TOAST_PROVIDER_CHANGED as vs, LOG_OUT as ys, IconProfile as fd, IconSliders as pd, IconHistory as md, IconEditUser as hd, IconChart as gd, IconInfo as vd, IconBack as yd, IconSettings as bd, Logo as wd, appReducer as _d, APP_SET_OLED_MODE as Ed, APP_SET_FULL_SCREEN as Sd, APP_SET_THEME_MODE as Cd, APP_SET_THEME_PALETTE as xd, HistoryContext as Id, APP_CLASSNAME as Td, TOAST_CACHE_ENABLED as Ad, TOAST_CACHE_DISABLED as Rd } from "./LogoEntry.VAaujt4V.js";
6
6
  import U, { clsx as dt } from "clsx";
7
7
  import { useFloatingParentNodeId as Od, FloatingTree as Nd, useMergeRefs as Pd, FloatingNode as Md, FloatingPortal as kd, FloatingOverlay as Dd, FloatingFocusManager as $d, useFloatingNodeId as Ld, useFloating as zd, useClick as Fd, useDismiss as Zd, useRole as Ud, useInteractions as jd } from "@floating-ui/react";
8
8
  import * as ai from "react-dom";
@@ -16,26 +16,26 @@ function ii(e, t) {
16
16
  const bs = (e, t) => {
17
17
  const n = JSON.stringify(typeof t == "function" ? t() : t);
18
18
  window.localStorage.setItem(e, n), ii(e, n);
19
- }, Vd = (e) => {
19
+ }, Hd = (e) => {
20
20
  window.localStorage.removeItem(e), ii(e, null);
21
- }, ws = (e) => window.localStorage.getItem(e), Hd = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
21
+ }, ws = (e) => window.localStorage.getItem(e), Vd = (e) => (window.addEventListener("storage", e), () => window.removeEventListener("storage", e));
22
22
  function et({ key: e, initialValue: t }) {
23
- const r = Xn(Hd, () => ws(e)), o = Y((a) => {
23
+ const r = Xn(Vd, () => ws(e)), o = J((a) => {
24
24
  try {
25
25
  const c = typeof a == "function" ? a(JSON.parse(r)) : a;
26
- c == null ? Vd(e) : bs(e, c);
26
+ c == null ? Hd(e) : bs(e, c);
27
27
  } catch (c) {
28
28
  console.warn(c);
29
29
  }
30
30
  }, [
31
31
  e,
32
32
  r
33
- ]), s = Y(() => {
33
+ ]), s = J(() => {
34
34
  o(t);
35
35
  }, [
36
36
  t,
37
37
  o
38
- ]), i = Y(() => {
38
+ ]), i = J(() => {
39
39
  o(null);
40
40
  }, [
41
41
  o
@@ -61,11 +61,11 @@ const _0 = (e, t) => {
61
61
  return (...r) => {
62
62
  window.clearTimeout(n), n = window.setTimeout(() => e(...r), t);
63
63
  };
64
- }, Vt = () => window.innerWidth < 403, Wd = () => window.innerWidth >= 403 && window.innerWidth <= 1220, We = () => {
64
+ }, Ht = () => window.innerWidth < 403, Wd = () => window.innerWidth >= 403 && window.innerWidth <= 1220, We = () => {
65
65
  const e = [
66
66
  "iPhone Simulator",
67
67
  "iPhone"
68
- ].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), n = Vt(), r = navigator.maxTouchPoints > 1;
68
+ ].includes(navigator.platform) || navigator.userAgent.includes("Mac") && "ontouchend" in document || window.indexedDB !== null, t = /iPhone/.test(navigator.userAgent), n = Ht(), r = navigator.maxTouchPoints > 1;
69
69
  return e && t && n && r;
70
70
  }, Gd = () => {
71
71
  const e = [
@@ -136,7 +136,7 @@ Error message: ${ui(t)}`,
136
136
  static isInstance(e) {
137
137
  return ft.hasMarker(e, mi);
138
138
  }
139
- }, hi = "AI_TypeValidationError", gi = `vercel.ai.error.${hi}`, Qd = Symbol.for(gi), As, Rs, Ht = class ho extends (Rs = ft, As = Qd, Rs) {
139
+ }, hi = "AI_TypeValidationError", gi = `vercel.ai.error.${hi}`, Qd = Symbol.for(gi), As, Rs, Vt = class ho extends (Rs = ft, As = Qd, Rs) {
140
140
  constructor({ value: t, cause: n }) {
141
141
  super({
142
142
  name: hi,
@@ -289,7 +289,7 @@ function Pt(e, t, n) {
289
289
  const r = new e._zod.constr(t ?? e._zod.def);
290
290
  return (!t || n?.parent) && (r._zod.parent = e), r;
291
291
  }
292
- function N(e) {
292
+ function P(e) {
293
293
  const t = e;
294
294
  if (!t)
295
295
  return {};
@@ -546,7 +546,7 @@ function Ff(e) {
546
546
  const Zf = (e) => {
547
547
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
548
548
  return new RegExp(`^${t}$`);
549
- }, Uf = /^\d+$/, jf = /^-?\d+(?:\.\d+)?/i, Bf = /true|false/i, Vf = /null/i, Hf = /^[^A-Z]*$/, Wf = /^[^a-z]*$/, _e = /* @__PURE__ */ C("$ZodCheck", (e, t) => {
549
+ }, Uf = /^\d+$/, jf = /^-?\d+(?:\.\d+)?/i, Bf = /true|false/i, Hf = /null/i, Vf = /^[^A-Z]*$/, Wf = /^[^a-z]*$/, _e = /* @__PURE__ */ C("$ZodCheck", (e, t) => {
550
550
  var n;
551
551
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
552
552
  }), Ai = {
@@ -758,7 +758,7 @@ const Zf = (e) => {
758
758
  });
759
759
  };
760
760
  }), Qf = /* @__PURE__ */ C("$ZodCheckLowerCase", (e, t) => {
761
- t.pattern ?? (t.pattern = Hf), Sr.init(e, t);
761
+ t.pattern ?? (t.pattern = Vf), Sr.init(e, t);
762
762
  }), ep = /* @__PURE__ */ C("$ZodCheckUpperCase", (e, t) => {
763
763
  t.pattern ?? (t.pattern = Wf), Sr.init(e, t);
764
764
  }), tp = /* @__PURE__ */ C("$ZodCheckIncludes", (e, t) => {
@@ -1147,7 +1147,7 @@ const Np = /* @__PURE__ */ C("$ZodJWT", (e, t) => {
1147
1147
  }), n;
1148
1148
  };
1149
1149
  }), kp = /* @__PURE__ */ C("$ZodNull", (e, t) => {
1150
- te.init(e, t), e._zod.pattern = Vf, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (n, r) => {
1150
+ te.init(e, t), e._zod.pattern = Hf, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (n, r) => {
1151
1151
  const o = n.value;
1152
1152
  return o === null || n.issues.push({
1153
1153
  expected: "null",
@@ -1534,7 +1534,7 @@ const Up = /* @__PURE__ */ C("$ZodRecord", (e, t) => {
1534
1534
  inst: e
1535
1535
  }), n;
1536
1536
  };
1537
- }), Vp = /* @__PURE__ */ C("$ZodTransform", (e, t) => {
1537
+ }), Hp = /* @__PURE__ */ C("$ZodTransform", (e, t) => {
1538
1538
  te.init(e, t), e._zod.parse = (n, r) => {
1539
1539
  const o = t.transform(n.value, n);
1540
1540
  if (r.async)
@@ -1543,7 +1543,7 @@ const Up = /* @__PURE__ */ C("$ZodRecord", (e, t) => {
1543
1543
  throw new ln();
1544
1544
  return n.value = o, n;
1545
1545
  };
1546
- }), Hp = /* @__PURE__ */ C("$ZodOptional", (e, t) => {
1546
+ }), Vp = /* @__PURE__ */ C("$ZodOptional", (e, t) => {
1547
1547
  te.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", K(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), K(e._zod, "pattern", () => {
1548
1548
  const n = t.innerType._zod.pattern;
1549
1549
  return n ? new RegExp(`^(${zo(n.source)})?$`) : void 0;
@@ -1682,7 +1682,7 @@ const Qt = /* @__PURE__ */ tm();
1682
1682
  function nm(e, t) {
1683
1683
  return new e({
1684
1684
  type: "string",
1685
- ...N(t)
1685
+ ...P(t)
1686
1686
  });
1687
1687
  }
1688
1688
  function rm(e, t) {
@@ -1691,7 +1691,7 @@ function rm(e, t) {
1691
1691
  format: "email",
1692
1692
  check: "string_format",
1693
1693
  abort: !1,
1694
- ...N(t)
1694
+ ...P(t)
1695
1695
  });
1696
1696
  }
1697
1697
  function Zs(e, t) {
@@ -1700,7 +1700,7 @@ function Zs(e, t) {
1700
1700
  format: "guid",
1701
1701
  check: "string_format",
1702
1702
  abort: !1,
1703
- ...N(t)
1703
+ ...P(t)
1704
1704
  });
1705
1705
  }
1706
1706
  function om(e, t) {
@@ -1709,7 +1709,7 @@ function om(e, t) {
1709
1709
  format: "uuid",
1710
1710
  check: "string_format",
1711
1711
  abort: !1,
1712
- ...N(t)
1712
+ ...P(t)
1713
1713
  });
1714
1714
  }
1715
1715
  function sm(e, t) {
@@ -1719,7 +1719,7 @@ function sm(e, t) {
1719
1719
  check: "string_format",
1720
1720
  abort: !1,
1721
1721
  version: "v4",
1722
- ...N(t)
1722
+ ...P(t)
1723
1723
  });
1724
1724
  }
1725
1725
  function am(e, t) {
@@ -1729,7 +1729,7 @@ function am(e, t) {
1729
1729
  check: "string_format",
1730
1730
  abort: !1,
1731
1731
  version: "v6",
1732
- ...N(t)
1732
+ ...P(t)
1733
1733
  });
1734
1734
  }
1735
1735
  function im(e, t) {
@@ -1739,7 +1739,7 @@ function im(e, t) {
1739
1739
  check: "string_format",
1740
1740
  abort: !1,
1741
1741
  version: "v7",
1742
- ...N(t)
1742
+ ...P(t)
1743
1743
  });
1744
1744
  }
1745
1745
  function cm(e, t) {
@@ -1748,7 +1748,7 @@ function cm(e, t) {
1748
1748
  format: "url",
1749
1749
  check: "string_format",
1750
1750
  abort: !1,
1751
- ...N(t)
1751
+ ...P(t)
1752
1752
  });
1753
1753
  }
1754
1754
  function lm(e, t) {
@@ -1757,7 +1757,7 @@ function lm(e, t) {
1757
1757
  format: "emoji",
1758
1758
  check: "string_format",
1759
1759
  abort: !1,
1760
- ...N(t)
1760
+ ...P(t)
1761
1761
  });
1762
1762
  }
1763
1763
  function um(e, t) {
@@ -1766,7 +1766,7 @@ function um(e, t) {
1766
1766
  format: "nanoid",
1767
1767
  check: "string_format",
1768
1768
  abort: !1,
1769
- ...N(t)
1769
+ ...P(t)
1770
1770
  });
1771
1771
  }
1772
1772
  function dm(e, t) {
@@ -1775,7 +1775,7 @@ function dm(e, t) {
1775
1775
  format: "cuid",
1776
1776
  check: "string_format",
1777
1777
  abort: !1,
1778
- ...N(t)
1778
+ ...P(t)
1779
1779
  });
1780
1780
  }
1781
1781
  function fm(e, t) {
@@ -1784,7 +1784,7 @@ function fm(e, t) {
1784
1784
  format: "cuid2",
1785
1785
  check: "string_format",
1786
1786
  abort: !1,
1787
- ...N(t)
1787
+ ...P(t)
1788
1788
  });
1789
1789
  }
1790
1790
  function pm(e, t) {
@@ -1793,7 +1793,7 @@ function pm(e, t) {
1793
1793
  format: "ulid",
1794
1794
  check: "string_format",
1795
1795
  abort: !1,
1796
- ...N(t)
1796
+ ...P(t)
1797
1797
  });
1798
1798
  }
1799
1799
  function mm(e, t) {
@@ -1802,7 +1802,7 @@ function mm(e, t) {
1802
1802
  format: "xid",
1803
1803
  check: "string_format",
1804
1804
  abort: !1,
1805
- ...N(t)
1805
+ ...P(t)
1806
1806
  });
1807
1807
  }
1808
1808
  function hm(e, t) {
@@ -1811,7 +1811,7 @@ function hm(e, t) {
1811
1811
  format: "ksuid",
1812
1812
  check: "string_format",
1813
1813
  abort: !1,
1814
- ...N(t)
1814
+ ...P(t)
1815
1815
  });
1816
1816
  }
1817
1817
  function gm(e, t) {
@@ -1820,7 +1820,7 @@ function gm(e, t) {
1820
1820
  format: "ipv4",
1821
1821
  check: "string_format",
1822
1822
  abort: !1,
1823
- ...N(t)
1823
+ ...P(t)
1824
1824
  });
1825
1825
  }
1826
1826
  function vm(e, t) {
@@ -1829,7 +1829,7 @@ function vm(e, t) {
1829
1829
  format: "ipv6",
1830
1830
  check: "string_format",
1831
1831
  abort: !1,
1832
- ...N(t)
1832
+ ...P(t)
1833
1833
  });
1834
1834
  }
1835
1835
  function ym(e, t) {
@@ -1838,7 +1838,7 @@ function ym(e, t) {
1838
1838
  format: "cidrv4",
1839
1839
  check: "string_format",
1840
1840
  abort: !1,
1841
- ...N(t)
1841
+ ...P(t)
1842
1842
  });
1843
1843
  }
1844
1844
  function bm(e, t) {
@@ -1847,7 +1847,7 @@ function bm(e, t) {
1847
1847
  format: "cidrv6",
1848
1848
  check: "string_format",
1849
1849
  abort: !1,
1850
- ...N(t)
1850
+ ...P(t)
1851
1851
  });
1852
1852
  }
1853
1853
  function wm(e, t) {
@@ -1856,7 +1856,7 @@ function wm(e, t) {
1856
1856
  format: "base64",
1857
1857
  check: "string_format",
1858
1858
  abort: !1,
1859
- ...N(t)
1859
+ ...P(t)
1860
1860
  });
1861
1861
  }
1862
1862
  function _m(e, t) {
@@ -1865,7 +1865,7 @@ function _m(e, t) {
1865
1865
  format: "base64url",
1866
1866
  check: "string_format",
1867
1867
  abort: !1,
1868
- ...N(t)
1868
+ ...P(t)
1869
1869
  });
1870
1870
  }
1871
1871
  function Em(e, t) {
@@ -1874,7 +1874,7 @@ function Em(e, t) {
1874
1874
  format: "e164",
1875
1875
  check: "string_format",
1876
1876
  abort: !1,
1877
- ...N(t)
1877
+ ...P(t)
1878
1878
  });
1879
1879
  }
1880
1880
  function Sm(e, t) {
@@ -1883,7 +1883,7 @@ function Sm(e, t) {
1883
1883
  format: "jwt",
1884
1884
  check: "string_format",
1885
1885
  abort: !1,
1886
- ...N(t)
1886
+ ...P(t)
1887
1887
  });
1888
1888
  }
1889
1889
  function Cm(e, t) {
@@ -1894,7 +1894,7 @@ function Cm(e, t) {
1894
1894
  offset: !1,
1895
1895
  local: !1,
1896
1896
  precision: null,
1897
- ...N(t)
1897
+ ...P(t)
1898
1898
  });
1899
1899
  }
1900
1900
  function xm(e, t) {
@@ -1902,7 +1902,7 @@ function xm(e, t) {
1902
1902
  type: "string",
1903
1903
  format: "date",
1904
1904
  check: "string_format",
1905
- ...N(t)
1905
+ ...P(t)
1906
1906
  });
1907
1907
  }
1908
1908
  function Im(e, t) {
@@ -1911,7 +1911,7 @@ function Im(e, t) {
1911
1911
  format: "time",
1912
1912
  check: "string_format",
1913
1913
  precision: null,
1914
- ...N(t)
1914
+ ...P(t)
1915
1915
  });
1916
1916
  }
1917
1917
  function Tm(e, t) {
@@ -1919,14 +1919,14 @@ function Tm(e, t) {
1919
1919
  type: "string",
1920
1920
  format: "duration",
1921
1921
  check: "string_format",
1922
- ...N(t)
1922
+ ...P(t)
1923
1923
  });
1924
1924
  }
1925
1925
  function Am(e, t) {
1926
1926
  return new e({
1927
1927
  type: "number",
1928
1928
  checks: [],
1929
- ...N(t)
1929
+ ...P(t)
1930
1930
  });
1931
1931
  }
1932
1932
  function Rm(e, t) {
@@ -1935,19 +1935,19 @@ function Rm(e, t) {
1935
1935
  check: "number_format",
1936
1936
  abort: !1,
1937
1937
  format: "safeint",
1938
- ...N(t)
1938
+ ...P(t)
1939
1939
  });
1940
1940
  }
1941
1941
  function Om(e, t) {
1942
1942
  return new e({
1943
1943
  type: "boolean",
1944
- ...N(t)
1944
+ ...P(t)
1945
1945
  });
1946
1946
  }
1947
1947
  function Nm(e, t) {
1948
1948
  return new e({
1949
1949
  type: "null",
1950
- ...N(t)
1950
+ ...P(t)
1951
1951
  });
1952
1952
  }
1953
1953
  function Pm(e) {
@@ -1958,13 +1958,13 @@ function Pm(e) {
1958
1958
  function Mm(e, t) {
1959
1959
  return new e({
1960
1960
  type: "never",
1961
- ...N(t)
1961
+ ...P(t)
1962
1962
  });
1963
1963
  }
1964
1964
  function Us(e, t) {
1965
1965
  return new Ri({
1966
1966
  check: "less_than",
1967
- ...N(t),
1967
+ ...P(t),
1968
1968
  value: e,
1969
1969
  inclusive: !1
1970
1970
  });
@@ -1972,7 +1972,7 @@ function Us(e, t) {
1972
1972
  function Br(e, t) {
1973
1973
  return new Ri({
1974
1974
  check: "less_than",
1975
- ...N(t),
1975
+ ...P(t),
1976
1976
  value: e,
1977
1977
  inclusive: !0
1978
1978
  });
@@ -1980,15 +1980,15 @@ function Br(e, t) {
1980
1980
  function js(e, t) {
1981
1981
  return new Oi({
1982
1982
  check: "greater_than",
1983
- ...N(t),
1983
+ ...P(t),
1984
1984
  value: e,
1985
1985
  inclusive: !1
1986
1986
  });
1987
1987
  }
1988
- function Vr(e, t) {
1988
+ function Hr(e, t) {
1989
1989
  return new Oi({
1990
1990
  check: "greater_than",
1991
- ...N(t),
1991
+ ...P(t),
1992
1992
  value: e,
1993
1993
  inclusive: !0
1994
1994
  });
@@ -1996,28 +1996,28 @@ function Vr(e, t) {
1996
1996
  function Bs(e, t) {
1997
1997
  return new Gf({
1998
1998
  check: "multiple_of",
1999
- ...N(t),
1999
+ ...P(t),
2000
2000
  value: e
2001
2001
  });
2002
2002
  }
2003
2003
  function Di(e, t) {
2004
2004
  return new Jf({
2005
2005
  check: "max_length",
2006
- ...N(t),
2006
+ ...P(t),
2007
2007
  maximum: e
2008
2008
  });
2009
2009
  }
2010
2010
  function ur(e, t) {
2011
2011
  return new Kf({
2012
2012
  check: "min_length",
2013
- ...N(t),
2013
+ ...P(t),
2014
2014
  minimum: e
2015
2015
  });
2016
2016
  }
2017
2017
  function $i(e, t) {
2018
2018
  return new Xf({
2019
2019
  check: "length_equals",
2020
- ...N(t),
2020
+ ...P(t),
2021
2021
  length: e
2022
2022
  });
2023
2023
  }
@@ -2025,7 +2025,7 @@ function km(e, t) {
2025
2025
  return new qf({
2026
2026
  check: "string_format",
2027
2027
  format: "regex",
2028
- ...N(t),
2028
+ ...P(t),
2029
2029
  pattern: e
2030
2030
  });
2031
2031
  }
@@ -2033,21 +2033,21 @@ function Dm(e) {
2033
2033
  return new Qf({
2034
2034
  check: "string_format",
2035
2035
  format: "lowercase",
2036
- ...N(e)
2036
+ ...P(e)
2037
2037
  });
2038
2038
  }
2039
2039
  function $m(e) {
2040
2040
  return new ep({
2041
2041
  check: "string_format",
2042
2042
  format: "uppercase",
2043
- ...N(e)
2043
+ ...P(e)
2044
2044
  });
2045
2045
  }
2046
2046
  function Lm(e, t) {
2047
2047
  return new tp({
2048
2048
  check: "string_format",
2049
2049
  format: "includes",
2050
- ...N(t),
2050
+ ...P(t),
2051
2051
  includes: e
2052
2052
  });
2053
2053
  }
@@ -2055,7 +2055,7 @@ function zm(e, t) {
2055
2055
  return new np({
2056
2056
  check: "string_format",
2057
2057
  format: "starts_with",
2058
- ...N(t),
2058
+ ...P(t),
2059
2059
  prefix: e
2060
2060
  });
2061
2061
  }
@@ -2063,7 +2063,7 @@ function Fm(e, t) {
2063
2063
  return new rp({
2064
2064
  check: "string_format",
2065
2065
  format: "ends_with",
2066
- ...N(t),
2066
+ ...P(t),
2067
2067
  suffix: e
2068
2068
  });
2069
2069
  }
@@ -2085,18 +2085,18 @@ function jm() {
2085
2085
  function Bm() {
2086
2086
  return Cn((e) => e.toUpperCase());
2087
2087
  }
2088
- function Vm(e, t, n) {
2088
+ function Hm(e, t, n) {
2089
2089
  return new e({
2090
2090
  type: "array",
2091
2091
  element: t,
2092
2092
  // get element() {
2093
2093
  // return element;
2094
2094
  // },
2095
- ...N(n)
2095
+ ...P(n)
2096
2096
  });
2097
2097
  }
2098
- function Hm(e, t, n) {
2099
- const r = N(n);
2098
+ function Vm(e, t, n) {
2099
+ const r = P(n);
2100
2100
  return r.abort ?? (r.abort = !0), new e({
2101
2101
  type: "custom",
2102
2102
  check: "custom",
@@ -2109,10 +2109,10 @@ function Wm(e, t, n) {
2109
2109
  type: "custom",
2110
2110
  check: "custom",
2111
2111
  fn: t,
2112
- ...N(n)
2112
+ ...P(n)
2113
2113
  });
2114
2114
  }
2115
- class Vs {
2115
+ class Hs {
2116
2116
  constructor(t) {
2117
2117
  this.counter = 0, this.metadataRegistry = t?.metadata ?? Qt, this.target = t?.target ?? "draft-2020-12", this.unrepresentable = t?.unrepresentable ?? "throw", this.override = t?.override ?? (() => {
2118
2118
  }), this.io = t?.io ?? "output", this.seen = /* @__PURE__ */ new Map();
@@ -2515,7 +2515,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2515
2515
  }
2516
2516
  function Gm(e, t) {
2517
2517
  if (e instanceof ki) {
2518
- const r = new Vs(t), o = {};
2518
+ const r = new Hs(t), o = {};
2519
2519
  for (const a of e._idmap.entries()) {
2520
2520
  const [c, l] = a;
2521
2521
  r.process(l);
@@ -2540,7 +2540,7 @@ function Gm(e, t) {
2540
2540
  }
2541
2541
  return { schemas: s };
2542
2542
  }
2543
- const n = new Vs(t);
2543
+ const n = new Hs(t);
2544
2544
  return n.process(e), n.emit(e, t);
2545
2545
  }
2546
2546
  function le(e, t) {
@@ -2682,7 +2682,7 @@ const nh = (e, t) => {
2682
2682
  ]
2683
2683
  }
2684
2684
  // { parent: true }
2685
- ), e.clone = (n, r) => Pt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => rh(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => sh(e, n, r), e.parseAsync = async (n, r) => oh(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Li(e, n, r), e.spa = e.safeParseAsync, e.refine = (n, r) => e.check(eg(n, r)), e.superRefine = (n) => e.check(tg(n)), e.overwrite = (n) => e.check(Cn(n)), e.optional = () => Gs(e), e.nullable = () => Ys(e), e.nullish = () => Gs(Ys(e)), e.nonoptional = (n) => Hh(e, n), e.array = () => Yt(e), e.or = (n) => ye([e, n]), e.and = (n) => Dh(e, n), e.transform = (n) => Js(e, Fh(n)), e.default = (n) => jh(e, n), e.prefault = (n) => Vh(e, n), e.catch = (n) => Gh(e, n), e.pipe = (n) => Js(e, n), e.readonly = () => Kh(e), e.describe = (n) => {
2685
+ ), e.clone = (n, r) => Pt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => rh(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => sh(e, n, r), e.parseAsync = async (n, r) => oh(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Li(e, n, r), e.spa = e.safeParseAsync, e.refine = (n, r) => e.check(eg(n, r)), e.superRefine = (n) => e.check(tg(n)), e.overwrite = (n) => e.check(Cn(n)), e.optional = () => Gs(e), e.nullable = () => Ys(e), e.nullish = () => Gs(Ys(e)), e.nonoptional = (n) => Vh(e, n), e.array = () => Yt(e), e.or = (n) => ye([e, n]), e.and = (n) => Dh(e, n), e.transform = (n) => Js(e, Fh(n)), e.default = (n) => jh(e, n), e.prefault = (n) => Hh(e, n), e.catch = (n) => Gh(e, n), e.pipe = (n) => Js(e, n), e.readonly = () => Kh(e), e.describe = (n) => {
2686
2686
  const r = e.clone();
2687
2687
  return Qt.add(r, { description: n }), r;
2688
2688
  }, Object.defineProperty(e, "description", {
@@ -2700,7 +2700,7 @@ const nh = (e, t) => {
2700
2700
  const n = e._zod.bag;
2701
2701
  e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(km(...r)), e.includes = (...r) => e.check(Lm(...r)), e.startsWith = (...r) => e.check(zm(...r)), e.endsWith = (...r) => e.check(Fm(...r)), e.min = (...r) => e.check(ur(...r)), e.max = (...r) => e.check(Di(...r)), e.length = (...r) => e.check($i(...r)), e.nonempty = (...r) => e.check(ur(1, ...r)), e.lowercase = (r) => e.check(Dm(r)), e.uppercase = (r) => e.check($m(r)), e.trim = () => e.check(Um()), e.normalize = (...r) => e.check(Zm(...r)), e.toLowerCase = () => e.check(jm()), e.toUpperCase = () => e.check(Bm());
2702
2702
  }), ah = /* @__PURE__ */ C("ZodString", (e, t) => {
2703
- Zo.init(e, t), zi.init(e, t), e.email = (n) => e.check(rm(ih, n)), e.url = (n) => e.check(cm(ch, n)), e.jwt = (n) => e.check(Sm(Sh, n)), e.emoji = (n) => e.check(lm(lh, n)), e.guid = (n) => e.check(Zs(Hs, n)), e.uuid = (n) => e.check(om(zn, n)), e.uuidv4 = (n) => e.check(sm(zn, n)), e.uuidv6 = (n) => e.check(am(zn, n)), e.uuidv7 = (n) => e.check(im(zn, n)), e.nanoid = (n) => e.check(um(uh, n)), e.guid = (n) => e.check(Zs(Hs, n)), e.cuid = (n) => e.check(dm(dh, n)), e.cuid2 = (n) => e.check(fm(fh, n)), e.ulid = (n) => e.check(pm(ph, n)), e.base64 = (n) => e.check(wm(wh, n)), e.base64url = (n) => e.check(_m(_h, n)), e.xid = (n) => e.check(mm(mh, n)), e.ksuid = (n) => e.check(hm(hh, n)), e.ipv4 = (n) => e.check(gm(gh, n)), e.ipv6 = (n) => e.check(vm(vh, n)), e.cidrv4 = (n) => e.check(ym(yh, n)), e.cidrv6 = (n) => e.check(bm(bh, n)), e.e164 = (n) => e.check(Em(Eh, n)), e.datetime = (n) => e.check(Jm(n)), e.date = (n) => e.check(Xm(n)), e.time = (n) => e.check(Qm(n)), e.duration = (n) => e.check(th(n));
2703
+ Zo.init(e, t), zi.init(e, t), e.email = (n) => e.check(rm(ih, n)), e.url = (n) => e.check(cm(ch, n)), e.jwt = (n) => e.check(Sm(Sh, n)), e.emoji = (n) => e.check(lm(lh, n)), e.guid = (n) => e.check(Zs(Vs, n)), e.uuid = (n) => e.check(om(zn, n)), e.uuidv4 = (n) => e.check(sm(zn, n)), e.uuidv6 = (n) => e.check(am(zn, n)), e.uuidv7 = (n) => e.check(im(zn, n)), e.nanoid = (n) => e.check(um(uh, n)), e.guid = (n) => e.check(Zs(Vs, n)), e.cuid = (n) => e.check(dm(dh, n)), e.cuid2 = (n) => e.check(fm(fh, n)), e.ulid = (n) => e.check(pm(ph, n)), e.base64 = (n) => e.check(wm(wh, n)), e.base64url = (n) => e.check(_m(_h, n)), e.xid = (n) => e.check(mm(mh, n)), e.ksuid = (n) => e.check(hm(hh, n)), e.ipv4 = (n) => e.check(gm(gh, n)), e.ipv6 = (n) => e.check(vm(vh, n)), e.cidrv4 = (n) => e.check(ym(yh, n)), e.cidrv6 = (n) => e.check(bm(bh, n)), e.e164 = (n) => e.check(Em(Eh, n)), e.datetime = (n) => e.check(Jm(n)), e.date = (n) => e.check(Xm(n)), e.time = (n) => e.check(Qm(n)), e.duration = (n) => e.check(th(n));
2704
2704
  });
2705
2705
  function A(e) {
2706
2706
  return nm(ah, e);
@@ -2709,7 +2709,7 @@ const ae = /* @__PURE__ */ C("ZodStringFormat", (e, t) => {
2709
2709
  oe.init(e, t), zi.init(e, t);
2710
2710
  }), ih = /* @__PURE__ */ C("ZodEmail", (e, t) => {
2711
2711
  lp.init(e, t), ae.init(e, t);
2712
- }), Hs = /* @__PURE__ */ C("ZodGUID", (e, t) => {
2712
+ }), Vs = /* @__PURE__ */ C("ZodGUID", (e, t) => {
2713
2713
  ip.init(e, t), ae.init(e, t);
2714
2714
  }), zn = /* @__PURE__ */ C("ZodUUID", (e, t) => {
2715
2715
  cp.init(e, t), ae.init(e, t);
@@ -2746,7 +2746,7 @@ const ae = /* @__PURE__ */ C("ZodStringFormat", (e, t) => {
2746
2746
  }), Sh = /* @__PURE__ */ C("ZodJWT", (e, t) => {
2747
2747
  Np.init(e, t), ae.init(e, t);
2748
2748
  }), Fi = /* @__PURE__ */ C("ZodNumber", (e, t) => {
2749
- Pi.init(e, t), se.init(e, t), e.gt = (r, o) => e.check(js(r, o)), e.gte = (r, o) => e.check(Vr(r, o)), e.min = (r, o) => e.check(Vr(r, o)), e.lt = (r, o) => e.check(Us(r, o)), e.lte = (r, o) => e.check(Br(r, o)), e.max = (r, o) => e.check(Br(r, o)), e.int = (r) => e.check(Ws(r)), e.safe = (r) => e.check(Ws(r)), e.positive = (r) => e.check(js(0, r)), e.nonnegative = (r) => e.check(Vr(0, r)), e.negative = (r) => e.check(Us(0, r)), e.nonpositive = (r) => e.check(Br(0, r)), e.multipleOf = (r, o) => e.check(Bs(r, o)), e.step = (r, o) => e.check(Bs(r, o)), e.finite = () => e;
2749
+ Pi.init(e, t), se.init(e, t), e.gt = (r, o) => e.check(js(r, o)), e.gte = (r, o) => e.check(Hr(r, o)), e.min = (r, o) => e.check(Hr(r, o)), e.lt = (r, o) => e.check(Us(r, o)), e.lte = (r, o) => e.check(Br(r, o)), e.max = (r, o) => e.check(Br(r, o)), e.int = (r) => e.check(Ws(r)), e.safe = (r) => e.check(Ws(r)), e.positive = (r) => e.check(js(0, r)), e.nonnegative = (r) => e.check(Hr(0, r)), e.negative = (r) => e.check(Us(0, r)), e.nonpositive = (r) => e.check(Br(0, r)), e.multipleOf = (r, o) => e.check(Bs(r, o)), e.step = (r, o) => e.check(Bs(r, o)), e.finite = () => e;
2750
2750
  const n = e._zod.bag;
2751
2751
  e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
2752
2752
  });
@@ -2787,10 +2787,10 @@ const Nh = /* @__PURE__ */ C("ZodArray", (e, t) => {
2787
2787
  Lp.init(e, t), se.init(e, t), e.element = t.element, e.min = (n, r) => e.check(ur(n, r)), e.nonempty = (n) => e.check(ur(1, n)), e.max = (n, r) => e.check(Di(n, r)), e.length = (n, r) => e.check($i(n, r)), e.unwrap = () => e.element;
2788
2788
  });
2789
2789
  function Yt(e, t) {
2790
- return Vm(Nh, e, t);
2790
+ return Hm(Nh, e, t);
2791
2791
  }
2792
2792
  const Ui = /* @__PURE__ */ C("ZodObject", (e, t) => {
2793
- zp.init(e, t), se.init(e, t), K(e, "shape", () => t.shape), e.keyof = () => Bi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ue() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ue() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Zi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => lf(e, n), e.merge = (n) => uf(e, n), e.pick = (n) => af(e, n), e.omit = (n) => cf(e, n), e.partial = (...n) => df(Vi, e, n[0]), e.required = (...n) => ff(Hi, e, n[0]);
2793
+ zp.init(e, t), se.init(e, t), K(e, "shape", () => t.shape), e.keyof = () => Bi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ue() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ue() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Zi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => lf(e, n), e.merge = (n) => uf(e, n), e.pick = (n) => af(e, n), e.omit = (n) => cf(e, n), e.partial = (...n) => df(Hi, e, n[0]), e.required = (...n) => ff(Vi, e, n[0]);
2794
2794
  });
2795
2795
  function ee(e, t) {
2796
2796
  const n = {
@@ -2798,7 +2798,7 @@ function ee(e, t) {
2798
2798
  get shape() {
2799
2799
  return Er(this, "shape", { ...e }), this.shape;
2800
2800
  },
2801
- ...N(t)
2801
+ ...P(t)
2802
2802
  };
2803
2803
  return new Ui(n);
2804
2804
  }
@@ -2809,7 +2809,7 @@ function ne(e, t) {
2809
2809
  return Er(this, "shape", { ...e }), this.shape;
2810
2810
  },
2811
2811
  catchall: Zi(),
2812
- ...N(t)
2812
+ ...P(t)
2813
2813
  });
2814
2814
  }
2815
2815
  const ji = /* @__PURE__ */ C("ZodUnion", (e, t) => {
@@ -2819,7 +2819,7 @@ function ye(e, t) {
2819
2819
  return new ji({
2820
2820
  type: "union",
2821
2821
  options: e,
2822
- ...N(t)
2822
+ ...P(t)
2823
2823
  });
2824
2824
  }
2825
2825
  const Ph = /* @__PURE__ */ C("ZodDiscriminatedUnion", (e, t) => {
@@ -2830,7 +2830,7 @@ function Mh(e, t, n) {
2830
2830
  type: "union",
2831
2831
  options: t,
2832
2832
  discriminator: e,
2833
- ...N(n)
2833
+ ...P(n)
2834
2834
  });
2835
2835
  }
2836
2836
  const kh = /* @__PURE__ */ C("ZodIntersection", (e, t) => {
@@ -2851,7 +2851,7 @@ function dn(e, t, n) {
2851
2851
  type: "record",
2852
2852
  keyType: e,
2853
2853
  valueType: t,
2854
- ...N(n)
2854
+ ...P(n)
2855
2855
  });
2856
2856
  }
2857
2857
  const vo = /* @__PURE__ */ C("ZodEnum", (e, t) => {
@@ -2867,7 +2867,7 @@ const vo = /* @__PURE__ */ C("ZodEnum", (e, t) => {
2867
2867
  return new vo({
2868
2868
  ...t,
2869
2869
  checks: [],
2870
- ...N(o),
2870
+ ...P(o),
2871
2871
  entries: s
2872
2872
  });
2873
2873
  }, e.exclude = (r, o) => {
@@ -2880,7 +2880,7 @@ const vo = /* @__PURE__ */ C("ZodEnum", (e, t) => {
2880
2880
  return new vo({
2881
2881
  ...t,
2882
2882
  checks: [],
2883
- ...N(o),
2883
+ ...P(o),
2884
2884
  entries: s
2885
2885
  });
2886
2886
  };
@@ -2890,7 +2890,7 @@ function Bi(e, t) {
2890
2890
  return new vo({
2891
2891
  type: "enum",
2892
2892
  entries: n,
2893
- ...N(t)
2893
+ ...P(t)
2894
2894
  });
2895
2895
  }
2896
2896
  const Lh = /* @__PURE__ */ C("ZodLiteral", (e, t) => {
@@ -2902,15 +2902,15 @@ const Lh = /* @__PURE__ */ C("ZodLiteral", (e, t) => {
2902
2902
  }
2903
2903
  });
2904
2904
  });
2905
- function D(e, t) {
2905
+ function $(e, t) {
2906
2906
  return new Lh({
2907
2907
  type: "literal",
2908
2908
  values: Array.isArray(e) ? e : [e],
2909
- ...N(t)
2909
+ ...P(t)
2910
2910
  });
2911
2911
  }
2912
2912
  const zh = /* @__PURE__ */ C("ZodTransform", (e, t) => {
2913
- Vp.init(e, t), se.init(e, t), e._zod.parse = (n, r) => {
2913
+ Hp.init(e, t), se.init(e, t), e._zod.parse = (n, r) => {
2914
2914
  n.addIssue = (s) => {
2915
2915
  if (typeof s == "string")
2916
2916
  n.issues.push(un(s, n.value, t));
@@ -2929,11 +2929,11 @@ function Fh(e) {
2929
2929
  transform: e
2930
2930
  });
2931
2931
  }
2932
- const Vi = /* @__PURE__ */ C("ZodOptional", (e, t) => {
2933
- Hp.init(e, t), se.init(e, t), e.unwrap = () => e._zod.def.innerType;
2932
+ const Hi = /* @__PURE__ */ C("ZodOptional", (e, t) => {
2933
+ Vp.init(e, t), se.init(e, t), e.unwrap = () => e._zod.def.innerType;
2934
2934
  });
2935
2935
  function Gs(e) {
2936
- return new Vi({
2936
+ return new Hi({
2937
2937
  type: "optional",
2938
2938
  innerType: e
2939
2939
  });
@@ -2962,7 +2962,7 @@ function jh(e, t) {
2962
2962
  const Bh = /* @__PURE__ */ C("ZodPrefault", (e, t) => {
2963
2963
  Yp.init(e, t), se.init(e, t), e.unwrap = () => e._zod.def.innerType;
2964
2964
  });
2965
- function Vh(e, t) {
2965
+ function Hh(e, t) {
2966
2966
  return new Bh({
2967
2967
  type: "prefault",
2968
2968
  innerType: e,
@@ -2971,14 +2971,14 @@ function Vh(e, t) {
2971
2971
  }
2972
2972
  });
2973
2973
  }
2974
- const Hi = /* @__PURE__ */ C("ZodNonOptional", (e, t) => {
2974
+ const Vi = /* @__PURE__ */ C("ZodNonOptional", (e, t) => {
2975
2975
  Jp.init(e, t), se.init(e, t), e.unwrap = () => e._zod.def.innerType;
2976
2976
  });
2977
- function Hh(e, t) {
2978
- return new Hi({
2977
+ function Vh(e, t) {
2978
+ return new Vi({
2979
2979
  type: "nonoptional",
2980
2980
  innerType: e,
2981
- ...N(t)
2981
+ ...P(t)
2982
2982
  });
2983
2983
  }
2984
2984
  const Wh = /* @__PURE__ */ C("ZodCatch", (e, t) => {
@@ -3031,7 +3031,7 @@ function Qh(e) {
3031
3031
  return t._zod.check = e, t;
3032
3032
  }
3033
3033
  function Wi(e, t) {
3034
- return Hm(Uo, e ?? (() => !0), t);
3034
+ return Vm(Uo, e ?? (() => !0), t);
3035
3035
  }
3036
3036
  function eg(e, t = {}) {
3037
3037
  return Wm(Uo, e, t);
@@ -3055,7 +3055,7 @@ function dr(e, t = {
3055
3055
  check: "custom",
3056
3056
  fn: (r) => r instanceof e,
3057
3057
  abort: !0,
3058
- ...N(t)
3058
+ ...P(t)
3059
3059
  });
3060
3060
  return n._zod.bag.Class = e, n;
3061
3061
  }
@@ -3068,14 +3068,14 @@ class Ks extends Error {
3068
3068
  super(t), this.name = "ParseError", this.type = n.type, this.field = n.field, this.value = n.value, this.line = n.line;
3069
3069
  }
3070
3070
  }
3071
- function Hr(e) {
3071
+ function Vr(e) {
3072
3072
  }
3073
3073
  function ng(e) {
3074
3074
  if (typeof e == "function")
3075
3075
  throw new TypeError(
3076
3076
  "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
3077
3077
  );
3078
- const { onEvent: t = Hr, onError: n = Hr, onRetry: r = Hr, onComment: o } = e;
3078
+ const { onEvent: t = Vr, onError: n = Vr, onRetry: r = Vr, onComment: o } = e;
3079
3079
  let s = "", i = !0, a, c = "", l = "";
3080
3080
  function d(f) {
3081
3081
  const y = i ? f.replace(/^\xEF\xBB\xBF/, "") : f, [b, _] = rg(`${s}${y}`);
@@ -3995,7 +3995,7 @@ function Ug() {
3995
3995
  function jg() {
3996
3996
  return xe();
3997
3997
  }
3998
- var Bg = (e, t) => X(e.innerType._def, t), Vg = (e, t, n) => {
3998
+ var Bg = (e, t) => X(e.innerType._def, t), Hg = (e, t, n) => {
3999
3999
  switch (t) {
4000
4000
  case F.ZodString:
4001
4001
  return Ji(e, n);
@@ -4069,7 +4069,7 @@ var Bg = (e, t) => X(e.innerType._def, t), Vg = (e, t, n) => {
4069
4069
  return /* @__PURE__ */ ((r) => {
4070
4070
  })();
4071
4071
  }
4072
- }, Hg = (e, t) => {
4072
+ }, Vg = (e, t) => {
4073
4073
  let n = 0;
4074
4074
  for (; n < e.length && n < t.length && e[n] === t[n]; n++)
4075
4075
  ;
@@ -4096,7 +4096,7 @@ function X(e, t, n = !1) {
4096
4096
  }
4097
4097
  const s = { def: e, path: t.currentPath, jsonSchema: void 0 };
4098
4098
  t.seen.set(e, s);
4099
- const i = Vg(e, e.typeName, t), a = typeof i == "function" ? X(i(), t) : i;
4099
+ const i = Hg(e, e.typeName, t), a = typeof i == "function" ? X(i(), t) : i;
4100
4100
  if (a && Gg(e, t, a), t.postProcess) {
4101
4101
  const c = t.postProcess(a, e, t);
4102
4102
  return s.jsonSchema = a, c;
@@ -4108,7 +4108,7 @@ var Wg = (e, t) => {
4108
4108
  case "root":
4109
4109
  return { $ref: e.path.join("/") };
4110
4110
  case "relative":
4111
- return { $ref: Hg(t.currentPath, e.path) };
4111
+ return { $ref: Vg(t.currentPath, e.path) };
4112
4112
  case "none":
4113
4113
  case "seen":
4114
4114
  return e.path.length < t.currentPath.length && e.path.every((n, r) => t.currentPath[r] === n) ? (console.warn(
@@ -4213,7 +4213,7 @@ function qg(e) {
4213
4213
  const n = await e["~standard"].validate(t);
4214
4214
  return "value" in n ? { success: !0, value: n.value } : {
4215
4215
  success: !1,
4216
- error: new Ht({
4216
+ error: new Vt({
4217
4217
  value: t,
4218
4218
  cause: n.issues
4219
4219
  })
@@ -4270,7 +4270,7 @@ async function na({
4270
4270
  }) {
4271
4271
  const n = await fn({ value: e, schema: t });
4272
4272
  if (!n.success)
4273
- throw Ht.wrap({ value: e, cause: n.error });
4273
+ throw Vt.wrap({ value: e, cause: n.error });
4274
4274
  return n.value;
4275
4275
  }
4276
4276
  async function fn({
@@ -4284,13 +4284,13 @@ async function fn({
4284
4284
  const r = await n.validate(e);
4285
4285
  return r.success ? { success: !0, value: r.value, rawValue: e } : {
4286
4286
  success: !1,
4287
- error: Ht.wrap({ value: e, cause: r.error }),
4287
+ error: Vt.wrap({ value: e, cause: r.error }),
4288
4288
  rawValue: e
4289
4289
  };
4290
4290
  } catch (r) {
4291
4291
  return {
4292
4292
  success: !1,
4293
- error: Ht.wrap({ value: e, cause: r }),
4293
+ error: Vt.wrap({ value: e, cause: r }),
4294
4294
  rawValue: e
4295
4295
  };
4296
4296
  }
@@ -4368,148 +4368,148 @@ var ra = "6.0.3", tc = ye([
4368
4368
  dn(A(), pn.optional()),
4369
4369
  Yt(pn)
4370
4370
  ])
4371
- ), H = dn(
4371
+ ), V = dn(
4372
4372
  A(),
4373
4373
  dn(A(), pn.optional())
4374
4374
  ), nc = ee({
4375
- type: D("text"),
4375
+ type: $("text"),
4376
4376
  text: A(),
4377
- providerOptions: H.optional()
4377
+ providerOptions: V.optional()
4378
4378
  }), iv = ee({
4379
- type: D("image"),
4379
+ type: $("image"),
4380
4380
  image: ye([tc, dr(URL)]),
4381
4381
  mediaType: A().optional(),
4382
- providerOptions: H.optional()
4382
+ providerOptions: V.optional()
4383
4383
  }), rc = ee({
4384
- type: D("file"),
4384
+ type: $("file"),
4385
4385
  data: ye([tc, dr(URL)]),
4386
4386
  filename: A().optional(),
4387
4387
  mediaType: A(),
4388
- providerOptions: H.optional()
4388
+ providerOptions: V.optional()
4389
4389
  }), cv = ee({
4390
- type: D("reasoning"),
4390
+ type: $("reasoning"),
4391
4391
  text: A(),
4392
- providerOptions: H.optional()
4392
+ providerOptions: V.optional()
4393
4393
  }), lv = ee({
4394
- type: D("tool-call"),
4394
+ type: $("tool-call"),
4395
4395
  toolCallId: A(),
4396
4396
  toolName: A(),
4397
4397
  input: Ue(),
4398
- providerOptions: H.optional(),
4398
+ providerOptions: V.optional(),
4399
4399
  providerExecuted: ve().optional()
4400
4400
  }), uv = Mh(
4401
4401
  "type",
4402
4402
  [
4403
4403
  ee({
4404
- type: D("text"),
4404
+ type: $("text"),
4405
4405
  value: A(),
4406
- providerOptions: H.optional()
4406
+ providerOptions: V.optional()
4407
4407
  }),
4408
4408
  ee({
4409
- type: D("json"),
4409
+ type: $("json"),
4410
4410
  value: pn,
4411
- providerOptions: H.optional()
4411
+ providerOptions: V.optional()
4412
4412
  }),
4413
4413
  ee({
4414
- type: D("execution-denied"),
4414
+ type: $("execution-denied"),
4415
4415
  reason: A().optional(),
4416
- providerOptions: H.optional()
4416
+ providerOptions: V.optional()
4417
4417
  }),
4418
4418
  ee({
4419
- type: D("error-text"),
4419
+ type: $("error-text"),
4420
4420
  value: A(),
4421
- providerOptions: H.optional()
4421
+ providerOptions: V.optional()
4422
4422
  }),
4423
4423
  ee({
4424
- type: D("error-json"),
4424
+ type: $("error-json"),
4425
4425
  value: pn,
4426
- providerOptions: H.optional()
4426
+ providerOptions: V.optional()
4427
4427
  }),
4428
4428
  ee({
4429
- type: D("content"),
4429
+ type: $("content"),
4430
4430
  value: Yt(
4431
4431
  ye([
4432
4432
  ee({
4433
- type: D("text"),
4433
+ type: $("text"),
4434
4434
  text: A(),
4435
- providerOptions: H.optional()
4435
+ providerOptions: V.optional()
4436
4436
  }),
4437
4437
  ee({
4438
- type: D("media"),
4438
+ type: $("media"),
4439
4439
  data: A(),
4440
4440
  mediaType: A()
4441
4441
  }),
4442
4442
  ee({
4443
- type: D("file-data"),
4443
+ type: $("file-data"),
4444
4444
  data: A(),
4445
4445
  mediaType: A(),
4446
4446
  filename: A().optional(),
4447
- providerOptions: H.optional()
4447
+ providerOptions: V.optional()
4448
4448
  }),
4449
4449
  ee({
4450
- type: D("file-url"),
4450
+ type: $("file-url"),
4451
4451
  url: A(),
4452
- providerOptions: H.optional()
4452
+ providerOptions: V.optional()
4453
4453
  }),
4454
4454
  ee({
4455
- type: D("file-id"),
4455
+ type: $("file-id"),
4456
4456
  fileId: ye([A(), dn(A(), A())]),
4457
- providerOptions: H.optional()
4457
+ providerOptions: V.optional()
4458
4458
  }),
4459
4459
  ee({
4460
- type: D("image-data"),
4460
+ type: $("image-data"),
4461
4461
  data: A(),
4462
4462
  mediaType: A(),
4463
- providerOptions: H.optional()
4463
+ providerOptions: V.optional()
4464
4464
  }),
4465
4465
  ee({
4466
- type: D("image-url"),
4466
+ type: $("image-url"),
4467
4467
  url: A(),
4468
- providerOptions: H.optional()
4468
+ providerOptions: V.optional()
4469
4469
  }),
4470
4470
  ee({
4471
- type: D("image-file-id"),
4471
+ type: $("image-file-id"),
4472
4472
  fileId: ye([A(), dn(A(), A())]),
4473
- providerOptions: H.optional()
4473
+ providerOptions: V.optional()
4474
4474
  }),
4475
4475
  ee({
4476
- type: D("custom"),
4477
- providerOptions: H.optional()
4476
+ type: $("custom"),
4477
+ providerOptions: V.optional()
4478
4478
  })
4479
4479
  ])
4480
4480
  )
4481
4481
  })
4482
4482
  ]
4483
4483
  ), oc = ee({
4484
- type: D("tool-result"),
4484
+ type: $("tool-result"),
4485
4485
  toolCallId: A(),
4486
4486
  toolName: A(),
4487
4487
  output: uv,
4488
- providerOptions: H.optional()
4488
+ providerOptions: V.optional()
4489
4489
  }), dv = ee({
4490
- type: D("tool-approval-request"),
4490
+ type: $("tool-approval-request"),
4491
4491
  approvalId: A(),
4492
4492
  toolCallId: A()
4493
4493
  }), fv = ee({
4494
- type: D("tool-approval-response"),
4494
+ type: $("tool-approval-response"),
4495
4495
  approvalId: A(),
4496
4496
  approved: ve(),
4497
4497
  reason: A().optional()
4498
4498
  }), pv = ee(
4499
4499
  {
4500
- role: D("system"),
4500
+ role: $("system"),
4501
4501
  content: A(),
4502
- providerOptions: H.optional()
4502
+ providerOptions: V.optional()
4503
4503
  }
4504
4504
  ), mv = ee({
4505
- role: D("user"),
4505
+ role: $("user"),
4506
4506
  content: ye([
4507
4507
  A(),
4508
4508
  Yt(ye([nc, iv, rc]))
4509
4509
  ]),
4510
- providerOptions: H.optional()
4510
+ providerOptions: V.optional()
4511
4511
  }), hv = ee({
4512
- role: D("assistant"),
4512
+ role: $("assistant"),
4513
4513
  content: ye([
4514
4514
  A(),
4515
4515
  Yt(
@@ -4523,11 +4523,11 @@ var ra = "6.0.3", tc = ye([
4523
4523
  ])
4524
4524
  )
4525
4525
  ]),
4526
- providerOptions: H.optional()
4526
+ providerOptions: V.optional()
4527
4527
  }), gv = ee({
4528
- role: D("tool"),
4528
+ role: $("tool"),
4529
4529
  content: Yt(ye([oc, fv])),
4530
- providerOptions: H.optional()
4530
+ providerOptions: V.optional()
4531
4531
  });
4532
4532
  ye([
4533
4533
  pv,
@@ -4896,7 +4896,7 @@ var bv = () => ({
4896
4896
  if (a == null || typeof a != "object" || !("elements" in a) || !Array.isArray(a.elements))
4897
4897
  throw new lt({
4898
4898
  message: "No object generated: response did not match schema.",
4899
- cause: new Ht({
4899
+ cause: new Vt({
4900
4900
  value: a,
4901
4901
  cause: "response must be an object with an elements array"
4902
4902
  }),
@@ -4981,7 +4981,7 @@ var bv = () => ({
4981
4981
  if (i == null || typeof i != "object" || !("result" in i) || typeof i.result != "string" || !e.includes(i.result))
4982
4982
  throw new lt({
4983
4983
  message: "No object generated: response did not match schema.",
4984
- cause: new Ht({
4984
+ cause: new Vt({
4985
4985
  value: i,
4986
4986
  cause: "response must be an object that contains a choice value."
4987
4987
  }),
@@ -5052,27 +5052,27 @@ var Cv = Kg(
5052
5052
  () => Xi(
5053
5053
  ye([
5054
5054
  ne({
5055
- type: D("text-start"),
5055
+ type: $("text-start"),
5056
5056
  id: A(),
5057
- providerMetadata: H.optional()
5057
+ providerMetadata: V.optional()
5058
5058
  }),
5059
5059
  ne({
5060
- type: D("text-delta"),
5060
+ type: $("text-delta"),
5061
5061
  id: A(),
5062
5062
  delta: A(),
5063
- providerMetadata: H.optional()
5063
+ providerMetadata: V.optional()
5064
5064
  }),
5065
5065
  ne({
5066
- type: D("text-end"),
5066
+ type: $("text-end"),
5067
5067
  id: A(),
5068
- providerMetadata: H.optional()
5068
+ providerMetadata: V.optional()
5069
5069
  }),
5070
5070
  ne({
5071
- type: D("error"),
5071
+ type: $("error"),
5072
5072
  errorText: A()
5073
5073
  }),
5074
5074
  ne({
5075
- type: D("tool-input-start"),
5075
+ type: $("tool-input-start"),
5076
5076
  toolCallId: A(),
5077
5077
  toolName: A(),
5078
5078
  providerExecuted: ve().optional(),
@@ -5080,38 +5080,38 @@ var Cv = Kg(
5080
5080
  title: A().optional()
5081
5081
  }),
5082
5082
  ne({
5083
- type: D("tool-input-delta"),
5083
+ type: $("tool-input-delta"),
5084
5084
  toolCallId: A(),
5085
5085
  inputTextDelta: A()
5086
5086
  }),
5087
5087
  ne({
5088
- type: D("tool-input-available"),
5088
+ type: $("tool-input-available"),
5089
5089
  toolCallId: A(),
5090
5090
  toolName: A(),
5091
5091
  input: Ue(),
5092
5092
  providerExecuted: ve().optional(),
5093
- providerMetadata: H.optional(),
5093
+ providerMetadata: V.optional(),
5094
5094
  dynamic: ve().optional(),
5095
5095
  title: A().optional()
5096
5096
  }),
5097
5097
  ne({
5098
- type: D("tool-input-error"),
5098
+ type: $("tool-input-error"),
5099
5099
  toolCallId: A(),
5100
5100
  toolName: A(),
5101
5101
  input: Ue(),
5102
5102
  providerExecuted: ve().optional(),
5103
- providerMetadata: H.optional(),
5103
+ providerMetadata: V.optional(),
5104
5104
  dynamic: ve().optional(),
5105
5105
  errorText: A(),
5106
5106
  title: A().optional()
5107
5107
  }),
5108
5108
  ne({
5109
- type: D("tool-approval-request"),
5109
+ type: $("tool-approval-request"),
5110
5110
  approvalId: A(),
5111
5111
  toolCallId: A()
5112
5112
  }),
5113
5113
  ne({
5114
- type: D("tool-output-available"),
5114
+ type: $("tool-output-available"),
5115
5115
  toolCallId: A(),
5116
5116
  output: Ue(),
5117
5117
  providerExecuted: ve().optional(),
@@ -5119,52 +5119,52 @@ var Cv = Kg(
5119
5119
  preliminary: ve().optional()
5120
5120
  }),
5121
5121
  ne({
5122
- type: D("tool-output-error"),
5122
+ type: $("tool-output-error"),
5123
5123
  toolCallId: A(),
5124
5124
  errorText: A(),
5125
5125
  providerExecuted: ve().optional(),
5126
5126
  dynamic: ve().optional()
5127
5127
  }),
5128
5128
  ne({
5129
- type: D("tool-output-denied"),
5129
+ type: $("tool-output-denied"),
5130
5130
  toolCallId: A()
5131
5131
  }),
5132
5132
  ne({
5133
- type: D("reasoning-start"),
5133
+ type: $("reasoning-start"),
5134
5134
  id: A(),
5135
- providerMetadata: H.optional()
5135
+ providerMetadata: V.optional()
5136
5136
  }),
5137
5137
  ne({
5138
- type: D("reasoning-delta"),
5138
+ type: $("reasoning-delta"),
5139
5139
  id: A(),
5140
5140
  delta: A(),
5141
- providerMetadata: H.optional()
5141
+ providerMetadata: V.optional()
5142
5142
  }),
5143
5143
  ne({
5144
- type: D("reasoning-end"),
5144
+ type: $("reasoning-end"),
5145
5145
  id: A(),
5146
- providerMetadata: H.optional()
5146
+ providerMetadata: V.optional()
5147
5147
  }),
5148
5148
  ne({
5149
- type: D("source-url"),
5149
+ type: $("source-url"),
5150
5150
  sourceId: A(),
5151
5151
  url: A(),
5152
5152
  title: A().optional(),
5153
- providerMetadata: H.optional()
5153
+ providerMetadata: V.optional()
5154
5154
  }),
5155
5155
  ne({
5156
- type: D("source-document"),
5156
+ type: $("source-document"),
5157
5157
  sourceId: A(),
5158
5158
  mediaType: A(),
5159
5159
  title: A(),
5160
5160
  filename: A().optional(),
5161
- providerMetadata: H.optional()
5161
+ providerMetadata: V.optional()
5162
5162
  }),
5163
5163
  ne({
5164
- type: D("file"),
5164
+ type: $("file"),
5165
5165
  url: A(),
5166
5166
  mediaType: A(),
5167
- providerMetadata: H.optional()
5167
+ providerMetadata: V.optional()
5168
5168
  }),
5169
5169
  ne({
5170
5170
  type: Wi(
@@ -5176,18 +5176,18 @@ var Cv = Kg(
5176
5176
  transient: ve().optional()
5177
5177
  }),
5178
5178
  ne({
5179
- type: D("start-step")
5179
+ type: $("start-step")
5180
5180
  }),
5181
5181
  ne({
5182
- type: D("finish-step")
5182
+ type: $("finish-step")
5183
5183
  }),
5184
5184
  ne({
5185
- type: D("start"),
5185
+ type: $("start"),
5186
5186
  messageId: A().optional(),
5187
5187
  messageMetadata: Ue().optional()
5188
5188
  }),
5189
5189
  ne({
5190
- type: D("finish"),
5190
+ type: $("finish"),
5191
5191
  finishReason: Bi([
5192
5192
  "stop",
5193
5193
  "length",
@@ -5199,10 +5199,10 @@ var Cv = Kg(
5199
5199
  messageMetadata: Ue().optional()
5200
5200
  }),
5201
5201
  ne({
5202
- type: D("abort")
5202
+ type: $("abort")
5203
5203
  }),
5204
5204
  ne({
5205
- type: D("message-metadata"),
5205
+ type: $("message-metadata"),
5206
5206
  messageMetadata: Ue()
5207
5207
  })
5208
5208
  ])
@@ -5285,7 +5285,7 @@ function Av({
5285
5285
  function b(v) {
5286
5286
  var E, S;
5287
5287
  const I = l.message.parts.find(
5288
- (M) => M.type === "dynamic-tool" && M.toolCallId === v.toolCallId
5288
+ (k) => k.type === "dynamic-tool" && k.toolCallId === v.toolCallId
5289
5289
  ), x = v, T = I;
5290
5290
  I != null ? (I.state = v.state, T.toolName = v.toolName, T.input = x.input, T.output = x.output, T.errorText = x.errorText, T.rawInput = (E = x.rawInput) != null ? E : T.rawInput, T.preliminary = x.preliminary, v.title !== void 0 && (T.title = v.title), T.providerExecuted = (S = x.providerExecuted) != null ? S : I.providerExecuted, x.providerMetadata != null && I.state === "input-available" && (I.callProviderMetadata = x.providerMetadata)) : l.message.parts.push({
5291
5291
  type: "dynamic-tool",
@@ -6031,7 +6031,7 @@ const ac = async () => (Jr || (Jr = import(
6031
6031
  "./index.790ujKXR.js"
6032
6032
  )), Jr), ic = async () => (Kr || (Kr = import(
6033
6033
  /* webpackChunkName: "toast-utilities" */
6034
- "./index.pgMnuI31.js"
6034
+ "./index.DlSb-eu-.js"
6035
6035
  ).then((e) => e.utilities)), Kr), zv = async () => {
6036
6036
  try {
6037
6037
  await Promise.all([ac(), ic()]);
@@ -6165,8 +6165,8 @@ function Bv() {
6165
6165
  }
6166
6166
  return Xr = e, Xr;
6167
6167
  }
6168
- var Vv = /* @__PURE__ */ Bv();
6169
- const Hv = /* @__PURE__ */ rv(Vv);
6168
+ var Hv = /* @__PURE__ */ Bv();
6169
+ const Vv = /* @__PURE__ */ rv(Hv);
6170
6170
  var dc = (e, t, n) => {
6171
6171
  if (!t.has(e))
6172
6172
  throw TypeError("Cannot " + n);
@@ -6176,7 +6176,7 @@ var dc = (e, t, n) => {
6176
6176
  t instanceof WeakSet ? t.add(e) : t.set(e, n);
6177
6177
  }, at = (e, t, n, r) => (dc(e, t, "write to private field"), t.set(e, n), n);
6178
6178
  function Wv(e, t) {
6179
- return t != null ? Hv(e, t) : e;
6179
+ return t != null ? Vv(e, t) : e;
6180
6180
  }
6181
6181
  var Te, Qn, er, en, tn, nn, Zt, So, Co, Gv = class {
6182
6182
  constructor(e = []) {
@@ -6248,11 +6248,11 @@ function Yv({
6248
6248
  resume: t = !1,
6249
6249
  ...n
6250
6250
  } = {}) {
6251
- const r = J(
6251
+ const r = W(
6252
6252
  "chat" in n ? n.chat : new ia(n)
6253
6253
  );
6254
6254
  ("chat" in n && n.chat !== r.current || "id" in n && r.current.id !== n.id) && (r.current = "chat" in n ? n.chat : new ia(n));
6255
- const s = Y(
6255
+ const s = J(
6256
6256
  (d) => r.current["~registerMessagesCallback"](d, e),
6257
6257
  // `chatRef.current.id` is required to trigger re-subscription when the chat ID changes
6258
6258
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -6269,7 +6269,7 @@ function Yv({
6269
6269
  r.current["~registerErrorCallback"],
6270
6270
  () => r.current.error,
6271
6271
  () => r.current.error
6272
- ), l = Y(
6272
+ ), l = J(
6273
6273
  (d) => {
6274
6274
  typeof d == "function" && (d = d(r.current.messages)), r.current.messages = d;
6275
6275
  },
@@ -6306,7 +6306,7 @@ function wt(e = {}) {
6306
6306
  const t = de(fc);
6307
6307
  if (!t)
6308
6308
  throw new Error("useAiChat must be used within a AiChatProvider");
6309
- const n = J(e);
6309
+ const n = W(e);
6310
6310
  return Z(() => {
6311
6311
  n.current = e;
6312
6312
  }, [e]), Z(() => {
@@ -6324,20 +6324,20 @@ function Jv({
6324
6324
  children: e,
6325
6325
  value: t
6326
6326
  }) {
6327
- const n = J(ca()), [r, o] = B("");
6327
+ const n = W(ca()), [r, o] = H("");
6328
6328
  Z(() => {
6329
6329
  n.current = ca();
6330
6330
  }, [t]);
6331
- const s = Y((d) => {
6331
+ const s = J((d) => {
6332
6332
  for (const u of n.current.onError)
6333
6333
  u(d);
6334
- }, []), i = Y((d) => {
6334
+ }, []), i = J((d) => {
6335
6335
  for (const u of n.current.onFinish)
6336
6336
  u(d);
6337
- }, []), a = Y((d) => {
6337
+ }, []), a = J((d) => {
6338
6338
  for (const u of n.current.onData)
6339
6339
  u(d);
6340
- }, []), c = Y(async (d) => {
6340
+ }, []), c = J(async (d) => {
6341
6341
  for (const u of n.current.onToolCall)
6342
6342
  await u(d);
6343
6343
  }, []), l = Yv({
@@ -6369,16 +6369,16 @@ function Jv({
6369
6369
  const Kv = ({ chatId: e }) => {
6370
6370
  const { messages: t } = wt(), {
6371
6371
  state: { privateChat: n }
6372
- } = de(Le), r = J(e), o = J(!1);
6372
+ } = de(Le), r = W(e), o = W(!1);
6373
6373
  return Z(() => {
6374
6374
  const s = r.current !== e, i = t.length > 0;
6375
6375
  i && !n ? (window.localStorage.setItem(
6376
- Ve + Kn,
6376
+ He + Kn,
6377
6377
  JSON.stringify(e)
6378
6378
  ), o.current = !0) : n && i ? window.localStorage.removeItem(
6379
- Ve + Kn
6379
+ He + Kn
6380
6380
  ) : s && o.current && (window.localStorage.removeItem(
6381
- Ve + Kn
6381
+ He + Kn
6382
6382
  ), o.current = !1), r.current = e;
6383
6383
  }, [e, t.length, n]), null;
6384
6384
  };
@@ -6387,7 +6387,7 @@ const la = ({
6387
6387
  containerId: e,
6388
6388
  ...t
6389
6389
  }) => {
6390
- const [n, r] = B(Fn);
6390
+ const [n, r] = H(Fn);
6391
6391
  return Z(() => {
6392
6392
  if (!Fn) {
6393
6393
  const o = async () => {
@@ -6414,8 +6414,8 @@ const la = ({
6414
6414
  setInitialMessages: n,
6415
6415
  dispatchChat: r
6416
6416
  }) => {
6417
- const { user: o, getAccessToken: s } = $e(), [i, a] = B(!1), [c] = et({
6418
- key: Ve + Kn,
6417
+ const { user: o, getAccessToken: s } = $e(), [i, a] = H(!1), [c] = et({
6418
+ key: He + Kn,
6419
6419
  initialValue: ""
6420
6420
  }), l = !!c && !i && !!o?.username && c !== e, { data: d } = du({
6421
6421
  chatId: l ? c : void 0,
@@ -6453,10 +6453,10 @@ function ua(e, t) {
6453
6453
  ]);
6454
6454
  }
6455
6455
  function qv() {
6456
- const [e, t] = B({
6456
+ const [e, t] = H({
6457
6457
  width: 0,
6458
6458
  height: 0
6459
- }), n = Y(() => {
6459
+ }), n = J(() => {
6460
6460
  t({
6461
6461
  width: window.innerWidth || 0,
6462
6462
  height: window.innerHeight || 0
@@ -6465,10 +6465,10 @@ function qv() {
6465
6465
  return ua("resize", n), ua("orientationchange", n), Z(n, []), e;
6466
6466
  }
6467
6467
  function Qv() {
6468
- const [e, t] = B({
6468
+ const [e, t] = H({
6469
6469
  width: 0,
6470
6470
  height: 0
6471
- }), n = Y(() => {
6471
+ }), n = J(() => {
6472
6472
  t({
6473
6473
  width: window?.visualViewport?.width || window.innerWidth || 0,
6474
6474
  height: window?.visualViewport?.height || window.innerHeight || 0
@@ -6486,7 +6486,7 @@ function Qv() {
6486
6486
  }
6487
6487
  const ey = "z-20", ty = "z-10";
6488
6488
  function ny(e) {
6489
- const [t, n] = B(!1);
6489
+ const [t, n] = H(!1);
6490
6490
  return Z(() => {
6491
6491
  if (!e) {
6492
6492
  n(!1);
@@ -6548,7 +6548,7 @@ function sy(e) {
6548
6548
  function ay(e, t, n = !1) {
6549
6549
  return e.target instanceof HTMLElement ? (n || !e.target.isContentEditable) && !t.includes(e.target.tagName) : !0;
6550
6550
  }
6551
- function Vo(e, t = [
6551
+ function Ho(e, t = [
6552
6552
  "INPUT",
6553
6553
  "TEXTAREA",
6554
6554
  "SELECT"
@@ -6592,18 +6592,18 @@ function rt(e) {
6592
6592
  function Jt(e) {
6593
6593
  return e.split("-")[1];
6594
6594
  }
6595
- function Ho(e) {
6595
+ function Vo(e) {
6596
6596
  return e === "x" ? "y" : "x";
6597
6597
  }
6598
6598
  function Wo(e) {
6599
6599
  return e === "y" ? "height" : "width";
6600
6600
  }
6601
6601
  const uy = /* @__PURE__ */ new Set(["top", "bottom"]);
6602
- function He(e) {
6602
+ function Ve(e) {
6603
6603
  return uy.has(rt(e)) ? "y" : "x";
6604
6604
  }
6605
6605
  function Go(e) {
6606
- return Ho(He(e));
6606
+ return Vo(Ve(e));
6607
6607
  }
6608
6608
  function dy(e, t, n) {
6609
6609
  n === void 0 && (n = !1);
@@ -6679,7 +6679,7 @@ function pa(e, t, n) {
6679
6679
  reference: r,
6680
6680
  floating: o
6681
6681
  } = e;
6682
- const s = He(t), i = Go(t), a = Wo(i), c = rt(t), l = s === "y", d = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, g = r[a] / 2 - o[a] / 2;
6682
+ const s = Ve(t), i = Go(t), a = Wo(i), c = rt(t), l = s === "y", d = r.x + r.width / 2 - o.width / 2, u = r.y + r.height / 2 - o.height / 2, g = r[a] / 2 - o[a] / 2;
6683
6683
  let m;
6684
6684
  switch (c) {
6685
6685
  case "top":
@@ -6852,17 +6852,17 @@ const by = (e) => ({
6852
6852
  }, m = Go(o), p = Wo(m), f = await i.getDimensions(l), y = m === "y", b = y ? "top" : "left", _ = y ? "bottom" : "right", v = y ? "clientHeight" : "clientWidth", E = s.reference[p] + s.reference[m] - g[m] - s.floating[p], S = g[m] - s.reference[m], I = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(l));
6853
6853
  let x = I ? I[v] : 0;
6854
6854
  (!x || !await (i.isElement == null ? void 0 : i.isElement(I))) && (x = a.floating[v] || s.floating[p]);
6855
- const T = E / 2 - S / 2, M = x / 2 - f[p] / 2 - 1, $ = gt(u[b], M), V = gt(u[_], M), P = $, R = x - f[p] - V, L = x / 2 - f[p] / 2 + T, Q = xo(P, L, R), j = !c.arrow && Jt(o) != null && L !== Q && s.reference[p] / 2 - (L < P ? $ : V) - f[p] / 2 < 0, q = j ? L < P ? L - P : L - R : 0;
6855
+ const T = E / 2 - S / 2, k = x / 2 - f[p] / 2 - 1, M = gt(u[b], k), j = gt(u[_], k), O = M, R = x - f[p] - j, L = x / 2 - f[p] / 2 + T, Q = xo(O, L, R), B = !c.arrow && Jt(o) != null && L !== Q && s.reference[p] / 2 - (L < O ? M : j) - f[p] / 2 < 0, q = B ? L < O ? L - O : L - R : 0;
6856
6856
  return {
6857
6857
  [m]: g[m] + q,
6858
6858
  data: {
6859
6859
  [m]: Q,
6860
6860
  centerOffset: L - Q - q,
6861
- ...j && {
6861
+ ...B && {
6862
6862
  alignmentOffset: q
6863
6863
  }
6864
6864
  },
6865
- reset: j
6865
+ reset: B
6866
6866
  };
6867
6867
  }
6868
6868
  }), wy = function(e) {
@@ -6889,57 +6889,57 @@ const by = (e) => ({
6889
6889
  } = nt(e, t);
6890
6890
  if ((n = s.arrow) != null && n.alignmentOffset)
6891
6891
  return {};
6892
- const b = rt(o), _ = He(a), v = rt(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), S = g || (v || !f ? [mr(a)] : fy(a)), I = p !== "none";
6892
+ const b = rt(o), _ = Ve(a), v = rt(a) === a, E = await (c.isRTL == null ? void 0 : c.isRTL(l.floating)), S = g || (v || !f ? [mr(a)] : fy(a)), I = p !== "none";
6893
6893
  !g && I && S.push(...gy(a, f, p, E));
6894
- const x = [a, ...S], T = await hn(t, y), M = [];
6895
- let $ = ((r = s.flip) == null ? void 0 : r.overflows) || [];
6896
- if (d && M.push(T[b]), u) {
6894
+ const x = [a, ...S], T = await hn(t, y), k = [];
6895
+ let M = ((r = s.flip) == null ? void 0 : r.overflows) || [];
6896
+ if (d && k.push(T[b]), u) {
6897
6897
  const L = dy(o, i, E);
6898
- M.push(T[L[0]], T[L[1]]);
6898
+ k.push(T[L[0]], T[L[1]]);
6899
6899
  }
6900
- if ($ = [...$, {
6900
+ if (M = [...M, {
6901
6901
  placement: o,
6902
- overflows: M
6903
- }], !M.every((L) => L <= 0)) {
6904
- var V, P;
6905
- const L = (((V = s.flip) == null ? void 0 : V.index) || 0) + 1, Q = x[L];
6906
- if (Q && (!(u === "alignment" ? _ !== He(Q) : !1) || // We leave the current main axis only if every placement on that axis
6902
+ overflows: k
6903
+ }], !k.every((L) => L <= 0)) {
6904
+ var j, O;
6905
+ const L = (((j = s.flip) == null ? void 0 : j.index) || 0) + 1, Q = x[L];
6906
+ if (Q && (!(u === "alignment" ? _ !== Ve(Q) : !1) || // We leave the current main axis only if every placement on that axis
6907
6907
  // overflows the main axis.
6908
- $.every((k) => He(k.placement) === _ ? k.overflows[0] > 0 : !0)))
6908
+ M.every((D) => Ve(D.placement) === _ ? D.overflows[0] > 0 : !0)))
6909
6909
  return {
6910
6910
  data: {
6911
6911
  index: L,
6912
- overflows: $
6912
+ overflows: M
6913
6913
  },
6914
6914
  reset: {
6915
6915
  placement: Q
6916
6916
  }
6917
6917
  };
6918
- let j = (P = $.filter((q) => q.overflows[0] <= 0).sort((q, k) => q.overflows[1] - k.overflows[1])[0]) == null ? void 0 : P.placement;
6919
- if (!j)
6918
+ let B = (O = M.filter((q) => q.overflows[0] <= 0).sort((q, D) => q.overflows[1] - D.overflows[1])[0]) == null ? void 0 : O.placement;
6919
+ if (!B)
6920
6920
  switch (m) {
6921
6921
  case "bestFit": {
6922
6922
  var R;
6923
- const q = (R = $.filter((k) => {
6923
+ const q = (R = M.filter((D) => {
6924
6924
  if (I) {
6925
- const O = He(k.placement);
6926
- return O === _ || // Create a bias to the `y` side axis due to horizontal
6925
+ const N = Ve(D.placement);
6926
+ return N === _ || // Create a bias to the `y` side axis due to horizontal
6927
6927
  // reading directions favoring greater width.
6928
- O === "y";
6928
+ N === "y";
6929
6929
  }
6930
6930
  return !0;
6931
- }).map((k) => [k.placement, k.overflows.filter((O) => O > 0).reduce((O, ie) => O + ie, 0)]).sort((k, O) => k[1] - O[1])[0]) == null ? void 0 : R[0];
6932
- q && (j = q);
6931
+ }).map((D) => [D.placement, D.overflows.filter((N) => N > 0).reduce((N, ie) => N + ie, 0)]).sort((D, N) => D[1] - N[1])[0]) == null ? void 0 : R[0];
6932
+ q && (B = q);
6933
6933
  break;
6934
6934
  }
6935
6935
  case "initialPlacement":
6936
- j = a;
6936
+ B = a;
6937
6937
  break;
6938
6938
  }
6939
- if (o !== j)
6939
+ if (o !== B)
6940
6940
  return {
6941
6941
  reset: {
6942
- placement: j
6942
+ placement: B
6943
6943
  }
6944
6944
  };
6945
6945
  }
@@ -7005,7 +7005,7 @@ async function Ey(e, t) {
7005
7005
  placement: n,
7006
7006
  platform: r,
7007
7007
  elements: o
7008
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = rt(n), a = Jt(n), c = He(n) === "y", l = hc.has(i) ? -1 : 1, d = s && c ? -1 : 1, u = nt(t, e);
7008
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = rt(n), a = Jt(n), c = Ve(n) === "y", l = hc.has(i) ? -1 : 1, d = s && c ? -1 : 1, u = nt(t, e);
7009
7009
  let {
7010
7010
  mainAxis: g,
7011
7011
  crossAxis: m,
@@ -7077,7 +7077,7 @@ const Sy = function(e) {
7077
7077
  } = nt(e, t), l = {
7078
7078
  x: n,
7079
7079
  y: r
7080
- }, d = await hn(t, c), u = He(rt(o)), g = Ho(u);
7080
+ }, d = await hn(t, c), u = Ve(rt(o)), g = Vo(u);
7081
7081
  let m = l[g], p = l[u];
7082
7082
  if (s) {
7083
7083
  const y = g === "y" ? "top" : "left", b = g === "y" ? "bottom" : "right", _ = m + d[y], v = m - d[b];
@@ -7122,7 +7122,7 @@ const Sy = function(e) {
7122
7122
  } = nt(e, t), d = {
7123
7123
  x: n,
7124
7124
  y: r
7125
- }, u = He(o), g = Ho(u);
7125
+ }, u = Ve(o), g = Vo(u);
7126
7126
  let m = d[g], p = d[u];
7127
7127
  const f = nt(a, t), y = typeof f == "number" ? {
7128
7128
  mainAxis: f,
@@ -7162,7 +7162,7 @@ const Sy = function(e) {
7162
7162
  apply: c = () => {
7163
7163
  },
7164
7164
  ...l
7165
- } = nt(e, t), d = await hn(t, l), u = rt(o), g = Jt(o), m = He(o) === "y", {
7165
+ } = nt(e, t), d = await hn(t, l), u = rt(o), g = Jt(o), m = Ve(o) === "y", {
7166
7166
  width: p,
7167
7167
  height: f
7168
7168
  } = s.floating;
@@ -7171,16 +7171,16 @@ const Sy = function(e) {
7171
7171
  const _ = f - d.top - d.bottom, v = p - d.left - d.right, E = gt(f - d[y], _), S = gt(p - d[b], v), I = !t.middlewareData.shift;
7172
7172
  let x = E, T = S;
7173
7173
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (T = v), (r = t.middlewareData.shift) != null && r.enabled.y && (x = _), I && !g) {
7174
- const $ = Se(d.left, 0), V = Se(d.right, 0), P = Se(d.top, 0), R = Se(d.bottom, 0);
7175
- m ? T = p - 2 * ($ !== 0 || V !== 0 ? $ + V : Se(d.left, d.right)) : x = f - 2 * (P !== 0 || R !== 0 ? P + R : Se(d.top, d.bottom));
7174
+ const M = Se(d.left, 0), j = Se(d.right, 0), O = Se(d.top, 0), R = Se(d.bottom, 0);
7175
+ m ? T = p - 2 * (M !== 0 || j !== 0 ? M + j : Se(d.left, d.right)) : x = f - 2 * (O !== 0 || R !== 0 ? O + R : Se(d.top, d.bottom));
7176
7176
  }
7177
7177
  await c({
7178
7178
  ...t,
7179
7179
  availableWidth: T,
7180
7180
  availableHeight: x
7181
7181
  });
7182
- const M = await i.getDimensions(a.floating);
7183
- return p !== M.width || f !== M.height ? {
7182
+ const k = await i.getDimensions(a.floating);
7183
+ return p !== k.width || f !== k.height ? {
7184
7184
  reset: {
7185
7185
  rects: !0
7186
7186
  }
@@ -7469,7 +7469,7 @@ function _c(e, t) {
7469
7469
  const n = vt(e);
7470
7470
  return n === t || !ke(n) || Gt(n) ? !1 : De(n).position === "fixed" || _c(n, t);
7471
7471
  }
7472
- function Vy(e, t) {
7472
+ function Hy(e, t) {
7473
7473
  const n = t.get(e);
7474
7474
  if (n)
7475
7475
  return n;
@@ -7482,14 +7482,14 @@ function Vy(e, t) {
7482
7482
  }
7483
7483
  return t.set(e, r), r;
7484
7484
  }
7485
- function Hy(e) {
7485
+ function Vy(e) {
7486
7486
  let {
7487
7487
  element: t,
7488
7488
  boundary: n,
7489
7489
  rootBoundary: r,
7490
7490
  strategy: o
7491
7491
  } = e;
7492
- const i = [...n === "clippingAncestors" ? Tr(t) ? [] : Vy(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((l, d) => {
7492
+ const i = [...n === "clippingAncestors" ? Tr(t) ? [] : Hy(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((l, d) => {
7493
7493
  const u = ya(t, d, o);
7494
7494
  return l.top = Se(u.top, l.top), l.right = gt(u.right, l.right), l.bottom = gt(u.bottom, l.bottom), l.left = Se(u.left, l.left), l;
7495
7495
  }, ya(t, a, o));
@@ -7581,7 +7581,7 @@ function Jy(e) {
7581
7581
  const Ky = {
7582
7582
  convertOffsetParentRelativeRectToViewportRelativeRect: zy,
7583
7583
  getDocumentElement: Xe,
7584
- getClippingRect: Hy,
7584
+ getClippingRect: Vy,
7585
7585
  getOffsetParent: Ec,
7586
7586
  getElementRects: Yy,
7587
7587
  getClientRects: Fy,
@@ -7693,7 +7693,7 @@ const wa = [
7693
7693
  "touchstart"
7694
7694
  ];
7695
7695
  function nb(e, t, n) {
7696
- const r = J(null);
7696
+ const r = W(null);
7697
7697
  return Z(() => {
7698
7698
  const o = (s) => {
7699
7699
  const i = s ? s.target : void 0;
@@ -7712,11 +7712,11 @@ function nb(e, t, n) {
7712
7712
  ]), r;
7713
7713
  }
7714
7714
  function rb(e, t) {
7715
- const [n, r] = B(!1), o = J(null), s = J(null), i = Y(() => {
7715
+ const [n, r] = H(!1), o = W(null), s = W(null), i = J(() => {
7716
7716
  r((c) => (!c && (!o.current || o.current === -1) && (o.current = window.setInterval(s.current, t)), !0));
7717
7717
  }, [
7718
7718
  t
7719
- ]), a = Y(() => {
7719
+ ]), a = J(() => {
7720
7720
  r(!1), window.clearInterval(o.current || -1), o.current = -1;
7721
7721
  }, []);
7722
7722
  return Z(() => (s.current = e, n && i(), a), [
@@ -7758,7 +7758,7 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
7758
7758
  }), db = 5e3, fb = ({ trigger: e, label: t, placement: n = "top", mode: r = "system", animationDuration: o = 300, delay: s = 0, className: i, tooltipClassName: a, arrowClassName: c }) => {
7759
7759
  const l = nb(() => {
7760
7760
  v.stop(), y(!1);
7761
- }), d = J(null), u = J(null), g = J(null), [m, p] = B(!1), [f, y] = B(!1), [b, _] = B(!1), v = rb(() => {
7761
+ }), d = W(null), u = W(null), g = W(null), [m, p] = H(!1), [f, y] = H(!1), [b, _] = H(!1), v = rb(() => {
7762
7762
  y(!1);
7763
7763
  }, db), E = lb({
7764
7764
  mode: r,
@@ -7767,9 +7767,9 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
7767
7767
  arrowClassName: c
7768
7768
  }), S = ub({
7769
7769
  animationDuration: o
7770
- }), I = Y(async () => {
7770
+ }), I = J(async () => {
7771
7771
  if (l.current && d.current && u.current) {
7772
- const { x: $, y: V, middlewareData: P, placement: R } = await Tc(l.current, d.current, {
7772
+ const { x: M, y: j, middlewareData: O, placement: R } = await Tc(l.current, d.current, {
7773
7773
  placement: n,
7774
7774
  middleware: [
7775
7775
  Cc(10),
@@ -7786,8 +7786,8 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
7786
7786
  ]
7787
7787
  });
7788
7788
  d?.current?.style && Object.assign(d.current.style, {
7789
- left: Un($),
7790
- top: Un(V),
7789
+ left: Un(M),
7790
+ top: Un(j),
7791
7791
  ...S
7792
7792
  });
7793
7793
  const L = {
@@ -7797,8 +7797,8 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
7797
7797
  left: "right"
7798
7798
  }[R.split("-")[0]];
7799
7799
  u?.current?.style && Object.assign(u.current.style, {
7800
- left: Un(P.arrow?.x),
7801
- top: Un(P.arrow?.y),
7800
+ left: Un(O.arrow?.x),
7801
+ top: Un(O.arrow?.y),
7802
7802
  right: "",
7803
7803
  bottom: "",
7804
7804
  [L]: "-4px"
@@ -7823,14 +7823,14 @@ const ob = "av-tooltip", sb = "av-tooltip-arrow", Un = (e, t = "px") => typeof e
7823
7823
  f || (s > 0 ? g.current = setTimeout(() => {
7824
7824
  p(!0), g.current = null;
7825
7825
  }, s) : p(!0));
7826
- }, M = () => {
7826
+ }, k = () => {
7827
7827
  g.current && (clearTimeout(g.current), g.current = null), f || p(!1);
7828
7828
  };
7829
7829
  return /* @__PURE__ */ z("div", {
7830
7830
  className: E.wrapper,
7831
7831
  ref: l,
7832
7832
  onMouseEnter: T,
7833
- onMouseLeave: M,
7833
+ onMouseLeave: k,
7834
7834
  onClick: x,
7835
7835
  children: [
7836
7836
  e,
@@ -7905,10 +7905,10 @@ const mb = ({
7905
7905
  dispatch: s,
7906
7906
  setChatId: i,
7907
7907
  setInitialMessages: a
7908
- } = de(Le), { id: c, setInput: l, stop: d } = wt(), u = J(null), g = J(!1), [m, p] = Ke(), { data: f, isSuccess: y } = bt({
7908
+ } = de(Le), { id: c, setInput: l, stop: d } = wt(), u = W(null), g = W(!1), [m, p] = Ke(), { data: f, isSuccess: y } = bt({
7909
7909
  user: n?.username,
7910
7910
  getAccessToken: t
7911
- }), b = m(p.NewChat), _ = Y(() => {
7911
+ }), b = m(p.NewChat), _ = J(() => {
7912
7912
  i(ht()), a([]), l(""), s({
7913
7913
  type: Wt,
7914
7914
  payload: {
@@ -7922,7 +7922,7 @@ const mb = ({
7922
7922
  }
7923
7923
  });
7924
7924
  }, [i, a, l, s]);
7925
- Ac("newChat", _), Vo(
7925
+ Ac("newChat", _), Ho(
7926
7926
  [
7927
7927
  [
7928
7928
  "mod+N",
@@ -8013,7 +8013,7 @@ const mb = ({
8013
8013
  };
8014
8014
  const hb = "av-messagebox", gb = "av-panel", Qe = "messagebox", Rc = /* @__PURE__ */ ei(null);
8015
8015
  function vb({ initialOpen: e = !1, open: t, onOpenChange: n, initialFocus: r } = {}) {
8016
- const [o, s] = B(e), [i, a] = B(), [c, l] = B(), d = t ?? o, u = n ?? s, g = Ld(), m = zd({
8016
+ const [o, s] = H(e), [i, a] = H(), [c, l] = H(), d = t ?? o, u = n ?? s, g = Ld(), m = zd({
8017
8017
  nodeId: g,
8018
8018
  open: d,
8019
8019
  onOpenChange: u
@@ -8130,7 +8130,7 @@ function _b({ children: e, ref: t, ...n }) {
8130
8130
  });
8131
8131
  }
8132
8132
  function Eb({ ref: e, trigger: t, className: n, ...r }) {
8133
- const { setOpen: o } = Or(), s = Y(() => o(!1), [
8133
+ const { setOpen: o } = Or(), s = J(() => o(!1), [
8134
8134
  o
8135
8135
  ]);
8136
8136
  return /* @__PURE__ */ h("div", {
@@ -8293,7 +8293,7 @@ const Sa = ({ blurEffect: e }) => U("absolute left-0 right-0 z-20 backdrop-brigh
8293
8293
  /* inlined export .NONE */
8294
8294
  "none"
8295
8295
  ), initialFocus: m }) => {
8296
- const p = J(""), [f, y] = B(c ? l === /* inlined export .ANIMATION_FADE */
8296
+ const p = W(""), [f, y] = H(c ? l === /* inlined export .ANIMATION_FADE */
8297
8297
  "fade" ? {
8298
8298
  opacity: 0
8299
8299
  } : {
@@ -8415,7 +8415,7 @@ const xb = () => {
8415
8415
  }, Ib = () => {
8416
8416
  je && document.body && document.body.contains(je) && document.body.removeChild(je), je = null;
8417
8417
  }, Tb = () => {
8418
- const e = J(/* @__PURE__ */ new Set());
8418
+ const e = W(/* @__PURE__ */ new Set());
8419
8419
  Z(() => {
8420
8420
  jn++;
8421
8421
  try {
@@ -8429,7 +8429,7 @@ const xb = () => {
8429
8429
  e.current.clear(), jn--, jn === 0 && Ib();
8430
8430
  };
8431
8431
  }, []);
8432
- const t = Y(() => {
8432
+ const t = J(() => {
8433
8433
  try {
8434
8434
  if (navigator?.vibrate) {
8435
8435
  navigator.vibrate(eo);
@@ -8440,7 +8440,7 @@ const xb = () => {
8440
8440
  }
8441
8441
  }, []);
8442
8442
  return {
8443
- haptic: Y((r = 1) => {
8443
+ haptic: J((r = 1) => {
8444
8444
  if (!(typeof window > "u") && !(r < 1)) {
8445
8445
  if (navigator?.vibrate && r > 1) {
8446
8446
  const o = [];
@@ -8624,7 +8624,7 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
8624
8624
  toggleChecked: d,
8625
8625
  onToggleChange: u
8626
8626
  }) => {
8627
- const g = J(null), m = /* @__PURE__ */ z("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
8627
+ const g = W(null), m = /* @__PURE__ */ z("div", { className: "flex flex-wrap justify-end gap-x-2", children: [
8628
8628
  /* @__PURE__ */ h("div", { className: "box-border max-w-full basis-auto", children: !s && /* @__PURE__ */ h(
8629
8629
  zb,
8630
8630
  {
@@ -8684,8 +8684,8 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
8684
8684
  const { getAccessToken: t, user: n } = $e(), {
8685
8685
  state: { privateChat: r, provider: o, tokenUsage: s },
8686
8686
  dispatch: i
8687
- } = de(Le), { messages: a, id: c } = wt(), { mutateAsync: l } = fu({ getAccessToken: t }), [d, u] = Ke(), [g, m] = B(!1), [p, f] = B(!1), [y, b] = et({
8688
- key: Ve + pu,
8687
+ } = de(Le), { messages: a, id: c } = wt(), { mutateAsync: l } = fu({ getAccessToken: t }), [d, u] = Ke(), [g, m] = H(!1), [p, f] = H(!1), [y, b] = et({
8688
+ key: He + pu,
8689
8689
  initialValue: ""
8690
8690
  }), _ = gr(ar.TOOL.MEMORIES), { data: v, isSuccess: E } = bt({
8691
8691
  user: n?.username,
@@ -8705,13 +8705,13 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
8705
8705
  return;
8706
8706
  }
8707
8707
  let T = [];
8708
- !x && a && a.length > 0 && (T = a.filter((M) => M.parts && M.parts.length > 0 ? M.parts.some(
8709
- ($) => $.type === "text" && $.text?.trim()
8710
- ) : !1).map((M) => ({
8711
- role: M.role,
8708
+ !x && a && a.length > 0 && (T = a.filter((k) => k.parts && k.parts.length > 0 ? k.parts.some(
8709
+ (M) => M.type === "text" && M.text?.trim()
8710
+ ) : !1).map((k) => ({
8711
+ role: k.role,
8712
8712
  // Convert v5 parts array to v4-style content string for storage.
8713
- content: M.parts?.filter(($) => $.type === "text").map(($) => $.text).join("") || "",
8714
- id: M.id
8713
+ content: k.parts?.filter((M) => M.type === "text").map((M) => M.text).join("") || "",
8714
+ id: k.id
8715
8715
  }))), await l({
8716
8716
  userId: n?.username || "",
8717
8717
  id: c,
@@ -8739,8 +8739,8 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
8739
8739
  {
8740
8740
  toggleLabel: "Don't show this again",
8741
8741
  toggleName: "private-disclosure",
8742
- maxHeight: Vt() ? "large" : "medium",
8743
- noCancelAction: Vt(),
8742
+ maxHeight: Ht() ? "large" : "medium",
8743
+ noCancelAction: Ht(),
8744
8744
  toggleChecked: g,
8745
8745
  onToggleChange: (x) => m(x),
8746
8746
  showConfirmation: p,
@@ -8785,7 +8785,7 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
8785
8785
  className: "text-sm",
8786
8786
  disabled: !(E && v),
8787
8787
  children: r ? /* @__PURE__ */ h(Bu, { size: tt }) : /* @__PURE__ */ h(
8788
- Vu,
8788
+ Hu,
8789
8789
  {
8790
8790
  size: tt,
8791
8791
  className: d(u.PrivateChat)
@@ -8797,7 +8797,7 @@ const Ab = "av-toggle", Rb = ({ narrow: e }) => U(
8797
8797
  )
8798
8798
  ] });
8799
8799
  };
8800
- function W(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
8800
+ function G(e, t, { checkForDefaultPrevented: n = !0 } = {}) {
8801
8801
  return function(o) {
8802
8802
  if (e?.(o), n === !1 || !o.defaultPrevented)
8803
8803
  return t?.(o);
@@ -8925,7 +8925,7 @@ function Bb(e) {
8925
8925
  }
8926
8926
  // @__NO_SIDE_EFFECTS__
8927
8927
  function vr(e) {
8928
- const t = /* @__PURE__ */ Vb(e), n = w.forwardRef((r, o) => {
8928
+ const t = /* @__PURE__ */ Hb(e), n = w.forwardRef((r, o) => {
8929
8929
  const { children: s, ...i } = r, a = w.Children.toArray(s), c = a.find(Wb);
8930
8930
  if (c) {
8931
8931
  const l = c.props.children, d = a.map((u) => u === c ? w.Children.count(l) > 1 ? w.Children.only(null) : w.isValidElement(l) ? l.props.children : null : u);
@@ -8936,7 +8936,7 @@ function vr(e) {
8936
8936
  return n.displayName = `${e}.Slot`, n;
8937
8937
  }
8938
8938
  // @__NO_SIDE_EFFECTS__
8939
- function Vb(e) {
8939
+ function Hb(e) {
8940
8940
  const t = w.forwardRef((n, r) => {
8941
8941
  const { children: o, ...s } = n;
8942
8942
  if (w.isValidElement(o)) {
@@ -8947,9 +8947,9 @@ function Vb(e) {
8947
8947
  });
8948
8948
  return t.displayName = `${e}.SlotClone`, t;
8949
8949
  }
8950
- var Hb = /* @__PURE__ */ Symbol("radix.slottable");
8950
+ var Vb = /* @__PURE__ */ Symbol("radix.slottable");
8951
8951
  function Wb(e) {
8952
- return w.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Hb;
8952
+ return w.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === Vb;
8953
8953
  }
8954
8954
  function Gb(e, t) {
8955
8955
  const n = { ...t };
@@ -9071,11 +9071,11 @@ var qb = "DismissableLayer", Ro = "dismissableLayer.update", Qb = "dismissableLa
9071
9071
  onDismiss: a,
9072
9072
  ...c
9073
9073
  } = e, l = w.useContext(Mc), [d, u] = w.useState(null), g = d?.ownerDocument ?? globalThis?.document, [, m] = w.useState({}), p = we(t, (x) => u(x)), f = Array.from(l.layers), [y] = [...l.layersWithOutsidePointerEventsDisabled].slice(-1), b = f.indexOf(y), _ = d ? f.indexOf(d) : -1, v = l.layersWithOutsidePointerEventsDisabled.size > 0, E = _ >= b, S = rw((x) => {
9074
- const T = x.target, M = [...l.branches].some(($) => $.contains(T));
9075
- !E || M || (o?.(x), i?.(x), x.defaultPrevented || a?.());
9074
+ const T = x.target, k = [...l.branches].some((M) => M.contains(T));
9075
+ !E || k || (o?.(x), i?.(x), x.defaultPrevented || a?.());
9076
9076
  }, g), I = ow((x) => {
9077
9077
  const T = x.target;
9078
- [...l.branches].some(($) => $.contains(T)) || (s?.(x), i?.(x), x.defaultPrevented || a?.());
9078
+ [...l.branches].some((M) => M.contains(T)) || (s?.(x), i?.(x), x.defaultPrevented || a?.());
9079
9079
  }, g);
9080
9080
  return Xb((x) => {
9081
9081
  _ === l.layers.size - 1 && (r?.(x), !x.defaultPrevented && a && (x.preventDefault(), a()));
@@ -9098,9 +9098,9 @@ var qb = "DismissableLayer", Ro = "dismissableLayer.update", Qb = "dismissableLa
9098
9098
  pointerEvents: v ? E ? "auto" : "none" : void 0,
9099
9099
  ...e.style
9100
9100
  },
9101
- onFocusCapture: W(e.onFocusCapture, I.onFocusCapture),
9102
- onBlurCapture: W(e.onBlurCapture, I.onBlurCapture),
9103
- onPointerDownCapture: W(
9101
+ onFocusCapture: G(e.onFocusCapture, I.onFocusCapture),
9102
+ onBlurCapture: G(e.onBlurCapture, I.onBlurCapture),
9103
+ onPointerDownCapture: G(
9104
9104
  e.onPointerDownCapture,
9105
9105
  S.onPointerDownCapture
9106
9106
  )
@@ -9389,35 +9389,35 @@ function vw(e) {
9389
9389
  isPositioned: !1
9390
9390
  }), [g, m] = w.useState(r);
9391
9391
  yr(g, r) || m(r);
9392
- const [p, f] = w.useState(null), [y, b] = w.useState(null), _ = w.useCallback((k) => {
9393
- k !== I.current && (I.current = k, f(k));
9394
- }, []), v = w.useCallback((k) => {
9395
- k !== x.current && (x.current = k, b(k));
9396
- }, []), E = s || p, S = i || y, I = w.useRef(null), x = w.useRef(null), T = w.useRef(d), M = c != null, $ = oo(c), V = oo(o), P = oo(l), R = w.useCallback(() => {
9392
+ const [p, f] = w.useState(null), [y, b] = w.useState(null), _ = w.useCallback((D) => {
9393
+ D !== I.current && (I.current = D, f(D));
9394
+ }, []), v = w.useCallback((D) => {
9395
+ D !== x.current && (x.current = D, b(D));
9396
+ }, []), E = s || p, S = i || y, I = w.useRef(null), x = w.useRef(null), T = w.useRef(d), k = c != null, M = oo(c), j = oo(o), O = oo(l), R = w.useCallback(() => {
9397
9397
  if (!I.current || !x.current)
9398
9398
  return;
9399
- const k = {
9399
+ const D = {
9400
9400
  placement: t,
9401
9401
  strategy: n,
9402
9402
  middleware: g
9403
9403
  };
9404
- V.current && (k.platform = V.current), Tc(I.current, x.current, k).then((O) => {
9404
+ j.current && (D.platform = j.current), Tc(I.current, x.current, D).then((N) => {
9405
9405
  const ie = {
9406
- ...O,
9406
+ ...N,
9407
9407
  // The floating element's position may be recomputed while it's closed
9408
9408
  // but still mounted (such as when transitioning out). To ensure
9409
9409
  // `isPositioned` will be `false` initially on the next open, avoid
9410
9410
  // setting it to `true` when `open === false` (must be specified).
9411
- isPositioned: P.current !== !1
9411
+ isPositioned: O.current !== !1
9412
9412
  };
9413
9413
  L.current && !yr(T.current, ie) && (T.current = ie, ai.flushSync(() => {
9414
9414
  u(ie);
9415
9415
  }));
9416
9416
  });
9417
- }, [g, t, n, V, P]);
9417
+ }, [g, t, n, j, O]);
9418
9418
  tr(() => {
9419
- l === !1 && T.current.isPositioned && (T.current.isPositioned = !1, u((k) => ({
9420
- ...k,
9419
+ l === !1 && T.current.isPositioned && (T.current.isPositioned = !1, u((D) => ({
9420
+ ...D,
9421
9421
  isPositioned: !1
9422
9422
  })));
9423
9423
  }, [l]);
@@ -9426,47 +9426,47 @@ function vw(e) {
9426
9426
  L.current = !1;
9427
9427
  }), []), tr(() => {
9428
9428
  if (E && (I.current = E), S && (x.current = S), E && S) {
9429
- if ($.current)
9430
- return $.current(E, S, R);
9429
+ if (M.current)
9430
+ return M.current(E, S, R);
9431
9431
  R();
9432
9432
  }
9433
- }, [E, S, R, $, M]);
9433
+ }, [E, S, R, M, k]);
9434
9434
  const Q = w.useMemo(() => ({
9435
9435
  reference: I,
9436
9436
  floating: x,
9437
9437
  setReference: _,
9438
9438
  setFloating: v
9439
- }), [_, v]), j = w.useMemo(() => ({
9439
+ }), [_, v]), B = w.useMemo(() => ({
9440
9440
  reference: E,
9441
9441
  floating: S
9442
9442
  }), [E, S]), q = w.useMemo(() => {
9443
- const k = {
9443
+ const D = {
9444
9444
  position: n,
9445
9445
  left: 0,
9446
9446
  top: 0
9447
9447
  };
9448
- if (!j.floating)
9449
- return k;
9450
- const O = ka(j.floating, d.x), ie = ka(j.floating, d.y);
9448
+ if (!B.floating)
9449
+ return D;
9450
+ const N = ka(B.floating, d.x), ie = ka(B.floating, d.y);
9451
9451
  return a ? {
9452
- ...k,
9453
- transform: "translate(" + O + "px, " + ie + "px)",
9454
- ...zc(j.floating) >= 1.5 && {
9452
+ ...D,
9453
+ transform: "translate(" + N + "px, " + ie + "px)",
9454
+ ...zc(B.floating) >= 1.5 && {
9455
9455
  willChange: "transform"
9456
9456
  }
9457
9457
  } : {
9458
9458
  position: n,
9459
- left: O,
9459
+ left: N,
9460
9460
  top: ie
9461
9461
  };
9462
- }, [n, a, j.floating, d.x, d.y]);
9462
+ }, [n, a, B.floating, d.x, d.y]);
9463
9463
  return w.useMemo(() => ({
9464
9464
  ...d,
9465
9465
  update: R,
9466
9466
  refs: Q,
9467
- elements: j,
9467
+ elements: B,
9468
9468
  floatingStyles: q
9469
- }), [d, R, Q, j, q]);
9469
+ }), [d, R, Q, B, q]);
9470
9470
  }
9471
9471
  const yw = (e) => {
9472
9472
  function t(n) {
@@ -9555,16 +9555,16 @@ var qo = "Popper", [Zc, Uc] = An(qo), [Rw, jc] = Zc(qo), Bc = (e) => {
9555
9555
  return /* @__PURE__ */ h(Rw, { scope: t, anchor: r, onAnchorChange: o, children: n });
9556
9556
  };
9557
9557
  Bc.displayName = qo;
9558
- var Vc = "PopperAnchor", Hc = w.forwardRef(
9558
+ var Hc = "PopperAnchor", Vc = w.forwardRef(
9559
9559
  (e, t) => {
9560
- const { __scopePopper: n, virtualRef: r, ...o } = e, s = jc(Vc, n), i = w.useRef(null), a = we(t, i), c = w.useRef(null);
9560
+ const { __scopePopper: n, virtualRef: r, ...o } = e, s = jc(Hc, n), i = w.useRef(null), a = we(t, i), c = w.useRef(null);
9561
9561
  return w.useEffect(() => {
9562
9562
  const l = c.current;
9563
9563
  c.current = r?.current || i.current, l !== c.current && s.onAnchorChange(c.current);
9564
9564
  }), r ? null : /* @__PURE__ */ h(be.div, { ...o, ref: a });
9565
9565
  }
9566
9566
  );
9567
- Hc.displayName = Vc;
9567
+ Vc.displayName = Hc;
9568
9568
  var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
9569
9569
  (e, t) => {
9570
9570
  const {
@@ -9582,15 +9582,15 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
9582
9582
  updatePositionStrategy: m = "optimized",
9583
9583
  onPlaced: p,
9584
9584
  ...f
9585
- } = e, y = jc(Qo, n), [b, _] = w.useState(null), v = we(t, (ce) => _(ce)), [E, S] = w.useState(null), I = Aw(E), x = I?.width ?? 0, T = I?.height ?? 0, M = r + (s !== "center" ? "-" + s : ""), $ = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, V = Array.isArray(l) ? l : [l], P = V.length > 0, R = {
9586
- padding: $,
9587
- boundary: V.filter(Mw),
9585
+ } = e, y = jc(Qo, n), [b, _] = w.useState(null), v = we(t, (ce) => _(ce)), [E, S] = w.useState(null), I = Aw(E), x = I?.width ?? 0, T = I?.height ?? 0, k = r + (s !== "center" ? "-" + s : ""), M = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, j = Array.isArray(l) ? l : [l], O = j.length > 0, R = {
9586
+ padding: M,
9587
+ boundary: j.filter(Mw),
9588
9588
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
9589
- altBoundary: P
9590
- }, { refs: L, floatingStyles: Q, placement: j, isPositioned: q, middlewareData: k } = vw({
9589
+ altBoundary: O
9590
+ }, { refs: L, floatingStyles: Q, placement: B, isPositioned: q, middlewareData: D } = vw({
9591
9591
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
9592
9592
  strategy: "fixed",
9593
- placement: M,
9593
+ placement: k,
9594
9594
  whileElementsMounted: (...ce) => qy(...ce, {
9595
9595
  animationFrame: m === "always"
9596
9596
  }),
@@ -9617,11 +9617,11 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
9617
9617
  kw({ arrowWidth: x, arrowHeight: T }),
9618
9618
  g && Cw({ strategy: "referenceHidden", ...R })
9619
9619
  ]
9620
- }), [O, ie] = Jc(j), Ie = Je(p);
9620
+ }), [N, ie] = Jc(B), Ie = Je(p);
9621
9621
  yt(() => {
9622
9622
  q && Ie?.();
9623
9623
  }, [q, Ie]);
9624
- const ze = k.arrow?.x, me = k.arrow?.y, Ee = k.arrow?.centerOffset !== 0, [kt, qe] = w.useState();
9624
+ const ze = D.arrow?.x, me = D.arrow?.y, Ee = D.arrow?.centerOffset !== 0, [kt, qe] = w.useState();
9625
9625
  return yt(() => {
9626
9626
  b && qe(window.getComputedStyle(b).zIndex);
9627
9627
  }, [b]), /* @__PURE__ */ h(
@@ -9636,13 +9636,13 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
9636
9636
  minWidth: "max-content",
9637
9637
  zIndex: kt,
9638
9638
  "--radix-popper-transform-origin": [
9639
- k.transformOrigin?.x,
9640
- k.transformOrigin?.y
9639
+ D.transformOrigin?.x,
9640
+ D.transformOrigin?.y
9641
9641
  ].join(" "),
9642
9642
  // hide the content if using the hide middleware and should be hidden
9643
9643
  // set visibility to hidden and disable pointer events so the UI behaves
9644
9644
  // as if the PopperContent isn't there at all
9645
- ...k.hide?.referenceHidden && {
9645
+ ...D.hide?.referenceHidden && {
9646
9646
  visibility: "hidden",
9647
9647
  pointerEvents: "none"
9648
9648
  }
@@ -9652,7 +9652,7 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
9652
9652
  Ow,
9653
9653
  {
9654
9654
  scope: n,
9655
- placedSide: O,
9655
+ placedSide: N,
9656
9656
  onArrowChange: S,
9657
9657
  arrowX: ze,
9658
9658
  arrowY: me,
@@ -9660,7 +9660,7 @@ var Qo = "PopperContent", [Ow, Nw] = Zc(Qo), Wc = w.forwardRef(
9660
9660
  children: /* @__PURE__ */ h(
9661
9661
  be.div,
9662
9662
  {
9663
- "data-side": O,
9663
+ "data-side": N,
9664
9664
  "data-align": ie,
9665
9665
  ...f,
9666
9666
  ref: v,
@@ -9746,7 +9746,7 @@ function Jc(e) {
9746
9746
  const [t, n = "center"] = e.split("-");
9747
9747
  return [t, n];
9748
9748
  }
9749
- var Kc = Bc, Dw = Hc, $w = Wc, Lw = Yc, zw = "Portal", Xc = w.forwardRef((e, t) => {
9749
+ var Kc = Bc, Dw = Vc, $w = Wc, Lw = Yc, zw = "Portal", Xc = w.forwardRef((e, t) => {
9750
9750
  const { container: n, ...r } = e, [o, s] = w.useState(!1);
9751
9751
  yt(() => s(!0), []);
9752
9752
  const i = n || o && globalThis?.document?.body;
@@ -9817,10 +9817,10 @@ function Uw(e) {
9817
9817
  let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
9818
9818
  return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
9819
9819
  }
9820
- var so = "rovingFocusGroup.onEntryFocus", jw = { bubbles: !1, cancelable: !0 }, On = "RovingFocusGroup", [Oo, qc, Bw] = Nc(On), [Vw, Qc] = An(
9820
+ var so = "rovingFocusGroup.onEntryFocus", jw = { bubbles: !1, cancelable: !0 }, On = "RovingFocusGroup", [Oo, qc, Bw] = Nc(On), [Hw, Qc] = An(
9821
9821
  On,
9822
9822
  [Bw]
9823
- ), [Hw, Ww] = Vw(On), el = w.forwardRef(
9823
+ ), [Vw, Ww] = Hw(On), el = w.forwardRef(
9824
9824
  (e, t) => /* @__PURE__ */ h(Oo.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ h(Oo.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ h(Gw, { ...e, ref: t }) }) })
9825
9825
  );
9826
9826
  el.displayName = On;
@@ -9847,7 +9847,7 @@ var Gw = w.forwardRef((e, t) => {
9847
9847
  if (T)
9848
9848
  return T.addEventListener(so, v), () => T.removeEventListener(so, v);
9849
9849
  }, [v]), /* @__PURE__ */ h(
9850
- Hw,
9850
+ Vw,
9851
9851
  {
9852
9852
  scope: n,
9853
9853
  orientation: r,
@@ -9875,23 +9875,23 @@ var Gw = w.forwardRef((e, t) => {
9875
9875
  ...u,
9876
9876
  ref: m,
9877
9877
  style: { outline: "none", ...e.style },
9878
- onMouseDown: W(e.onMouseDown, () => {
9878
+ onMouseDown: G(e.onMouseDown, () => {
9879
9879
  S.current = !0;
9880
9880
  }),
9881
- onFocus: W(e.onFocus, (T) => {
9882
- const M = !S.current;
9883
- if (T.target === T.currentTarget && M && !b) {
9884
- const $ = new CustomEvent(so, jw);
9885
- if (T.currentTarget.dispatchEvent($), !$.defaultPrevented) {
9886
- const V = E().filter((j) => j.focusable), P = V.find((j) => j.active), R = V.find((j) => j.id === f), Q = [P, R, ...V].filter(
9881
+ onFocus: G(e.onFocus, (T) => {
9882
+ const k = !S.current;
9883
+ if (T.target === T.currentTarget && k && !b) {
9884
+ const M = new CustomEvent(so, jw);
9885
+ if (T.currentTarget.dispatchEvent(M), !M.defaultPrevented) {
9886
+ const j = E().filter((B) => B.focusable), O = j.find((B) => B.active), R = j.find((B) => B.id === f), Q = [O, R, ...j].filter(
9887
9887
  Boolean
9888
- ).map((j) => j.ref.current);
9888
+ ).map((B) => B.ref.current);
9889
9889
  rl(Q, d);
9890
9890
  }
9891
9891
  }
9892
9892
  S.current = !1;
9893
9893
  }),
9894
- onBlur: W(e.onBlur, () => _(!1))
9894
+ onBlur: G(e.onBlur, () => _(!1))
9895
9895
  }
9896
9896
  )
9897
9897
  }
@@ -9923,11 +9923,11 @@ var Gw = w.forwardRef((e, t) => {
9923
9923
  "data-orientation": d.orientation,
9924
9924
  ...a,
9925
9925
  ref: t,
9926
- onMouseDown: W(e.onMouseDown, (y) => {
9926
+ onMouseDown: G(e.onMouseDown, (y) => {
9927
9927
  r ? d.onItemFocus(l) : y.preventDefault();
9928
9928
  }),
9929
- onFocus: W(e.onFocus, () => d.onItemFocus(l)),
9930
- onKeyDown: W(e.onKeyDown, (y) => {
9929
+ onFocus: G(e.onFocus, () => d.onItemFocus(l)),
9930
+ onKeyDown: G(e.onKeyDown, (y) => {
9931
9931
  if (y.key === "Tab" && y.shiftKey) {
9932
9932
  d.onItemShiftTab();
9933
9933
  return;
@@ -9986,7 +9986,7 @@ var qw = el, Qw = nl, e_ = function(e) {
9986
9986
  return null;
9987
9987
  var t = Array.isArray(e) ? e[0] : e;
9988
9988
  return t.ownerDocument.body;
9989
- }, Lt = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), Hn = {}, ao = 0, ol = function(e) {
9989
+ }, Lt = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Vn = {}, ao = 0, ol = function(e) {
9990
9990
  return e && (e.host || ol(e.parentNode));
9991
9991
  }, t_ = function(e, t) {
9992
9992
  return t.map(function(n) {
@@ -9999,8 +9999,8 @@ var qw = el, Qw = nl, e_ = function(e) {
9999
9999
  });
10000
10000
  }, n_ = function(e, t, n, r) {
10001
10001
  var o = t_(t, Array.isArray(e) ? e : [e]);
10002
- Hn[n] || (Hn[n] = /* @__PURE__ */ new WeakMap());
10003
- var s = Hn[n], i = [], a = /* @__PURE__ */ new Set(), c = new Set(o), l = function(u) {
10002
+ Vn[n] || (Vn[n] = /* @__PURE__ */ new WeakMap());
10003
+ var s = Vn[n], i = [], a = /* @__PURE__ */ new Set(), c = new Set(o), l = function(u) {
10004
10004
  !u || a.has(u) || (a.add(u), l(u.parentNode));
10005
10005
  };
10006
10006
  o.forEach(l);
@@ -10011,7 +10011,7 @@ var qw = el, Qw = nl, e_ = function(e) {
10011
10011
  else
10012
10012
  try {
10013
10013
  var m = g.getAttribute(r), p = m !== null && m !== "false", f = (Lt.get(g) || 0) + 1, y = (s.get(g) || 0) + 1;
10014
- Lt.set(g, f), s.set(g, y), i.push(g), f === 1 && p && Vn.set(g, !0), y === 1 && g.setAttribute(n, "true"), p || g.setAttribute(r, "true");
10014
+ Lt.set(g, f), s.set(g, y), i.push(g), f === 1 && p && Hn.set(g, !0), y === 1 && g.setAttribute(n, "true"), p || g.setAttribute(r, "true");
10015
10015
  } catch (b) {
10016
10016
  console.error("aria-hidden: cannot operate on ", g, b);
10017
10017
  }
@@ -10020,8 +10020,8 @@ var qw = el, Qw = nl, e_ = function(e) {
10020
10020
  return d(t), a.clear(), ao++, function() {
10021
10021
  i.forEach(function(u) {
10022
10022
  var g = Lt.get(u) - 1, m = s.get(u) - 1;
10023
- Lt.set(u, g), s.set(u, m), g || (Vn.has(u) || u.removeAttribute(r), Vn.delete(u)), m || u.removeAttribute(n);
10024
- }), ao--, ao || (Lt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), Hn = {});
10023
+ Lt.set(u, g), s.set(u, m), g || (Hn.has(u) || u.removeAttribute(r), Hn.delete(u)), m || u.removeAttribute(n);
10024
+ }), ao--, ao || (Lt = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Vn = {});
10025
10025
  };
10026
10026
  }, r_ = function(e, t, n) {
10027
10027
  n === void 0 && (n = "data-aria-hidden");
@@ -10056,7 +10056,7 @@ function io(e, t) {
10056
10056
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
10057
10057
  }
10058
10058
  function i_(e, t) {
10059
- var n = B(function() {
10059
+ var n = H(function() {
10060
10060
  return {
10061
10061
  // value
10062
10062
  value: e,
@@ -10432,18 +10432,18 @@ function L_(e) {
10432
10432
  var b = Gn(f), _ = n.current, v = "deltaX" in f ? f.deltaX : _[0] - b[0], E = "deltaY" in f ? f.deltaY : _[1] - b[1], S, I = f.target, x = Math.abs(v) > Math.abs(E) ? "h" : "v";
10433
10433
  if ("touches" in f && x === "h" && I.type === "range")
10434
10434
  return !1;
10435
- var T = window.getSelection(), M = T && T.anchorNode, $ = M ? M === I || M.contains(I) : !1;
10436
- if ($)
10435
+ var T = window.getSelection(), k = T && T.anchorNode, M = k ? k === I || k.contains(I) : !1;
10436
+ if (M)
10437
10437
  return !1;
10438
- var V = La(x, I);
10439
- if (!V)
10438
+ var j = La(x, I);
10439
+ if (!j)
10440
10440
  return !0;
10441
- if (V ? S = x : (S = x === "v" ? "h" : "v", V = La(x, I)), !V)
10441
+ if (j ? S = x : (S = x === "v" ? "h" : "v", j = La(x, I)), !j)
10442
10442
  return !1;
10443
10443
  if (!r.current && "changedTouches" in f && (v || E) && (r.current = S), !S)
10444
10444
  return !0;
10445
- var P = r.current || S;
10446
- return M_(P, y, f, P === "h" ? v : E);
10445
+ var O = r.current || S;
10446
+ return M_(O, y, f, O === "h" ? v : E);
10447
10447
  }, []), c = w.useCallback(function(f) {
10448
10448
  var y = f;
10449
10449
  if (!(!Ft.length || Ft[Ft.length - 1] !== s)) {
@@ -10510,8 +10510,8 @@ var Po = ["Enter", " "], Z_ = ["ArrowDown", "PageUp", "Home"], pl = ["ArrowUp",
10510
10510
  }, B_ = {
10511
10511
  ltr: ["ArrowLeft"],
10512
10512
  rtl: ["ArrowRight"]
10513
- }, Nn = "Menu", [bn, V_, H_] = Nc(Nn), [Mt, ml] = An(Nn, [
10514
- H_,
10513
+ }, Nn = "Menu", [bn, H_, V_] = Nc(Nn), [Mt, ml] = An(Nn, [
10514
+ V_,
10515
10515
  Uc,
10516
10516
  Qc
10517
10517
  ]), Pn = Uc(), hl = Qc(), [gl, Et] = Mt(Nn), [W_, Mn] = Mt(Nn), vl = (e) => {
@@ -10579,7 +10579,7 @@ var Re = "MenuContent", [J_, ns] = Mt(Re), wl = w.forwardRef(
10579
10579
  trapFocus: n.open,
10580
10580
  disableOutsidePointerEvents: n.open,
10581
10581
  disableOutsideScroll: !0,
10582
- onFocusOutside: W(
10582
+ onFocusOutside: G(
10583
10583
  e.onFocusOutside,
10584
10584
  (s) => s.preventDefault(),
10585
10585
  { checkForDefaultPrevented: !1 }
@@ -10618,48 +10618,48 @@ var Re = "MenuContent", [J_, ns] = Mt(Re), wl = w.forwardRef(
10618
10618
  onDismiss: m,
10619
10619
  disableOutsideScroll: p,
10620
10620
  ...f
10621
- } = e, y = Et(Re, n), b = Mn(Re, n), _ = Pn(n), v = hl(n), E = V_(n), [S, I] = w.useState(null), x = w.useRef(null), T = we(t, x, y.onContentChange), M = w.useRef(0), $ = w.useRef(""), V = w.useRef(0), P = w.useRef(null), R = w.useRef("right"), L = w.useRef(0), Q = p ? fl : w.Fragment, j = p ? { as: q_, allowPinchZoom: !0 } : void 0, q = (O) => {
10622
- const ie = $.current + O, Ie = E().filter((ce) => !ce.disabled), ze = document.activeElement, me = Ie.find((ce) => ce.ref.current === ze)?.textValue, Ee = Ie.map((ce) => ce.textValue), kt = uE(Ee, ie, me), qe = Ie.find((ce) => ce.textValue === kt)?.ref.current;
10621
+ } = e, y = Et(Re, n), b = Mn(Re, n), _ = Pn(n), v = hl(n), E = H_(n), [S, I] = w.useState(null), x = w.useRef(null), T = we(t, x, y.onContentChange), k = w.useRef(0), M = w.useRef(""), j = w.useRef(0), O = w.useRef(null), R = w.useRef("right"), L = w.useRef(0), Q = p ? fl : w.Fragment, B = p ? { as: q_, allowPinchZoom: !0 } : void 0, q = (N) => {
10622
+ const ie = M.current + N, Ie = E().filter((ce) => !ce.disabled), ze = document.activeElement, me = Ie.find((ce) => ce.ref.current === ze)?.textValue, Ee = Ie.map((ce) => ce.textValue), kt = uE(Ee, ie, me), qe = Ie.find((ce) => ce.textValue === kt)?.ref.current;
10623
10623
  (function ce(St) {
10624
- $.current = St, window.clearTimeout(M.current), St !== "" && (M.current = window.setTimeout(() => ce(""), 1e3));
10624
+ M.current = St, window.clearTimeout(k.current), St !== "" && (k.current = window.setTimeout(() => ce(""), 1e3));
10625
10625
  })(ie), qe && setTimeout(() => qe.focus());
10626
10626
  };
10627
- w.useEffect(() => () => window.clearTimeout(M.current), []), sw();
10628
- const k = w.useCallback((O) => R.current === P.current?.side && fE(O, P.current?.area), []);
10627
+ w.useEffect(() => () => window.clearTimeout(k.current), []), sw();
10628
+ const D = w.useCallback((N) => R.current === O.current?.side && fE(N, O.current?.area), []);
10629
10629
  return /* @__PURE__ */ h(
10630
10630
  J_,
10631
10631
  {
10632
10632
  scope: n,
10633
- searchRef: $,
10633
+ searchRef: M,
10634
10634
  onItemEnter: w.useCallback(
10635
- (O) => {
10636
- k(O) && O.preventDefault();
10635
+ (N) => {
10636
+ D(N) && N.preventDefault();
10637
10637
  },
10638
- [k]
10638
+ [D]
10639
10639
  ),
10640
10640
  onItemLeave: w.useCallback(
10641
- (O) => {
10642
- k(O) || (x.current?.focus(), I(null));
10641
+ (N) => {
10642
+ D(N) || (x.current?.focus(), I(null));
10643
10643
  },
10644
- [k]
10644
+ [D]
10645
10645
  ),
10646
10646
  onTriggerLeave: w.useCallback(
10647
- (O) => {
10648
- k(O) && O.preventDefault();
10647
+ (N) => {
10648
+ D(N) && N.preventDefault();
10649
10649
  },
10650
- [k]
10650
+ [D]
10651
10651
  ),
10652
- pointerGraceTimerRef: V,
10653
- onPointerGraceIntentChange: w.useCallback((O) => {
10654
- P.current = O;
10652
+ pointerGraceTimerRef: j,
10653
+ onPointerGraceIntentChange: w.useCallback((N) => {
10654
+ O.current = N;
10655
10655
  }, []),
10656
- children: /* @__PURE__ */ h(Q, { ...j, children: /* @__PURE__ */ h(
10656
+ children: /* @__PURE__ */ h(Q, { ...B, children: /* @__PURE__ */ h(
10657
10657
  $c,
10658
10658
  {
10659
10659
  asChild: !0,
10660
10660
  trapped: o,
10661
- onMountAutoFocus: W(s, (O) => {
10662
- O.preventDefault(), x.current?.focus({ preventScroll: !0 });
10661
+ onMountAutoFocus: G(s, (N) => {
10662
+ N.preventDefault(), x.current?.focus({ preventScroll: !0 });
10663
10663
  }),
10664
10664
  onUnmountAutoFocus: i,
10665
10665
  children: /* @__PURE__ */ h(
@@ -10682,8 +10682,8 @@ var Re = "MenuContent", [J_, ns] = Mt(Re), wl = w.forwardRef(
10682
10682
  loop: r,
10683
10683
  currentTabStopId: S,
10684
10684
  onCurrentTabStopIdChange: I,
10685
- onEntryFocus: W(c, (O) => {
10686
- b.isUsingKeyboardRef.current || O.preventDefault();
10685
+ onEntryFocus: G(c, (N) => {
10686
+ b.isUsingKeyboardRef.current || N.preventDefault();
10687
10687
  }),
10688
10688
  preventScrollOnEntryFocus: !0,
10689
10689
  children: /* @__PURE__ */ h(
@@ -10698,25 +10698,25 @@ var Re = "MenuContent", [J_, ns] = Mt(Re), wl = w.forwardRef(
10698
10698
  ...f,
10699
10699
  ref: T,
10700
10700
  style: { outline: "none", ...f.style },
10701
- onKeyDown: W(f.onKeyDown, (O) => {
10702
- const Ie = O.target.closest("[data-radix-menu-content]") === O.currentTarget, ze = O.ctrlKey || O.altKey || O.metaKey, me = O.key.length === 1;
10703
- Ie && (O.key === "Tab" && O.preventDefault(), !ze && me && q(O.key));
10701
+ onKeyDown: G(f.onKeyDown, (N) => {
10702
+ const Ie = N.target.closest("[data-radix-menu-content]") === N.currentTarget, ze = N.ctrlKey || N.altKey || N.metaKey, me = N.key.length === 1;
10703
+ Ie && (N.key === "Tab" && N.preventDefault(), !ze && me && q(N.key));
10704
10704
  const Ee = x.current;
10705
- if (O.target !== Ee || !U_.includes(O.key)) return;
10706
- O.preventDefault();
10705
+ if (N.target !== Ee || !U_.includes(N.key)) return;
10706
+ N.preventDefault();
10707
10707
  const qe = E().filter((ce) => !ce.disabled).map((ce) => ce.ref.current);
10708
- pl.includes(O.key) && qe.reverse(), cE(qe);
10708
+ pl.includes(N.key) && qe.reverse(), cE(qe);
10709
10709
  }),
10710
- onBlur: W(e.onBlur, (O) => {
10711
- O.currentTarget.contains(O.target) || (window.clearTimeout(M.current), $.current = "");
10710
+ onBlur: G(e.onBlur, (N) => {
10711
+ N.currentTarget.contains(N.target) || (window.clearTimeout(k.current), M.current = "");
10712
10712
  }),
10713
- onPointerMove: W(
10713
+ onPointerMove: G(
10714
10714
  e.onPointerMove,
10715
- wn((O) => {
10716
- const ie = O.target, Ie = L.current !== O.clientX;
10717
- if (O.currentTarget.contains(ie) && Ie) {
10718
- const ze = O.clientX > L.current ? "right" : "left";
10719
- R.current = ze, L.current = O.clientX;
10715
+ wn((N) => {
10716
+ const ie = N.target, Ie = L.current !== N.clientX;
10717
+ if (N.currentTarget.contains(ie) && Ie) {
10718
+ const ze = N.clientX > L.current ? "right" : "left";
10719
+ R.current = ze, L.current = N.clientX;
10720
10720
  }
10721
10721
  })
10722
10722
  )
@@ -10762,14 +10762,14 @@ var br = "MenuItem", Za = "menu.itemSelect", Mr = w.forwardRef(
10762
10762
  ...o,
10763
10763
  ref: c,
10764
10764
  disabled: n,
10765
- onClick: W(e.onClick, d),
10765
+ onClick: G(e.onClick, d),
10766
10766
  onPointerDown: (u) => {
10767
10767
  e.onPointerDown?.(u), l.current = !0;
10768
10768
  },
10769
- onPointerUp: W(e.onPointerUp, (u) => {
10769
+ onPointerUp: G(e.onPointerUp, (u) => {
10770
10770
  l.current || u.currentTarget?.click();
10771
10771
  }),
10772
- onKeyDown: W(e.onKeyDown, (u) => {
10772
+ onKeyDown: G(e.onKeyDown, (u) => {
10773
10773
  const g = a.searchRef.current !== "";
10774
10774
  n || g && u.key === " " || Po.includes(u.key) && (u.currentTarget.click(), u.preventDefault());
10775
10775
  })
@@ -10799,18 +10799,18 @@ var El = w.forwardRef(
10799
10799
  "data-disabled": r ? "" : void 0,
10800
10800
  ...s,
10801
10801
  ref: l,
10802
- onPointerMove: W(
10802
+ onPointerMove: G(
10803
10803
  e.onPointerMove,
10804
10804
  wn((p) => {
10805
10805
  r ? i.onItemLeave(p) : (i.onItemEnter(p), p.defaultPrevented || p.currentTarget.focus({ preventScroll: !0 }));
10806
10806
  })
10807
10807
  ),
10808
- onPointerLeave: W(
10808
+ onPointerLeave: G(
10809
10809
  e.onPointerLeave,
10810
10810
  wn((p) => i.onItemLeave(p))
10811
10811
  ),
10812
- onFocus: W(e.onFocus, () => u(!0)),
10813
- onBlur: W(e.onBlur, () => u(!1))
10812
+ onFocus: G(e.onFocus, () => u(!0)),
10813
+ onBlur: G(e.onBlur, () => u(!1))
10814
10814
  }
10815
10815
  ) })
10816
10816
  }
@@ -10827,7 +10827,7 @@ var El = w.forwardRef(
10827
10827
  ...o,
10828
10828
  ref: t,
10829
10829
  "data-state": is(n),
10830
- onSelect: W(
10830
+ onSelect: G(
10831
10831
  o.onSelect,
10832
10832
  () => r?.(wr(n) ? !0 : !n),
10833
10833
  { checkForDefaultPrevented: !1 }
@@ -10859,7 +10859,7 @@ var Il = "MenuRadioItem", Tl = w.forwardRef(
10859
10859
  ...r,
10860
10860
  ref: t,
10861
10861
  "data-state": is(s),
10862
- onSelect: W(
10862
+ onSelect: G(
10863
10863
  r.onSelect,
10864
10864
  () => o.onValueChange?.(n),
10865
10865
  { checkForDefaultPrevented: !1 }
@@ -10962,7 +10962,7 @@ var rn = "MenuSubTrigger", kl = w.forwardRef(
10962
10962
  onClick: (u) => {
10963
10963
  e.onClick?.(u), !(e.disabled || u.defaultPrevented) && (u.currentTarget.focus(), n.open || n.onOpenChange(!0));
10964
10964
  },
10965
- onPointerMove: W(
10965
+ onPointerMove: G(
10966
10966
  e.onPointerMove,
10967
10967
  wn((u) => {
10968
10968
  s.onItemEnter(u), !u.defaultPrevented && !e.disabled && !n.open && !i.current && (s.onPointerGraceIntentChange(null), i.current = window.setTimeout(() => {
@@ -10970,7 +10970,7 @@ var rn = "MenuSubTrigger", kl = w.forwardRef(
10970
10970
  }, 100));
10971
10971
  })
10972
10972
  ),
10973
- onPointerLeave: W(
10973
+ onPointerLeave: G(
10974
10974
  e.onPointerLeave,
10975
10975
  wn((u) => {
10976
10976
  d();
@@ -10998,7 +10998,7 @@ var rn = "MenuSubTrigger", kl = w.forwardRef(
10998
10998
  }
10999
10999
  })
11000
11000
  ),
11001
- onKeyDown: W(e.onKeyDown, (u) => {
11001
+ onKeyDown: G(e.onKeyDown, (u) => {
11002
11002
  const g = s.searchRef.current !== "";
11003
11003
  e.disabled || g && u.key === " " || j_[r.dir].includes(u.key) && (n.onOpenChange(!0), n.content?.focus(), u.preventDefault());
11004
11004
  })
@@ -11026,13 +11026,13 @@ var Dl = "MenuSubContent", $l = w.forwardRef(
11026
11026
  i.isUsingKeyboardRef.current && c.current?.focus(), d.preventDefault();
11027
11027
  },
11028
11028
  onCloseAutoFocus: (d) => d.preventDefault(),
11029
- onFocusOutside: W(e.onFocusOutside, (d) => {
11029
+ onFocusOutside: G(e.onFocusOutside, (d) => {
11030
11030
  d.target !== a.trigger && s.onOpenChange(!1);
11031
11031
  }),
11032
- onEscapeKeyDown: W(e.onEscapeKeyDown, (d) => {
11032
+ onEscapeKeyDown: G(e.onEscapeKeyDown, (d) => {
11033
11033
  i.onClose(), d.preventDefault();
11034
11034
  }),
11035
- onKeyDown: W(e.onKeyDown, (d) => {
11035
+ onKeyDown: G(e.onKeyDown, (d) => {
11036
11036
  const u = d.currentTarget.contains(d.target), g = B_[i.dir].includes(d.key);
11037
11037
  u && g && (s.onOpenChange(!1), a.trigger?.focus(), d.preventDefault());
11038
11038
  })
@@ -11134,10 +11134,10 @@ var Zl = "DropdownMenuTrigger", Ul = w.forwardRef(
11134
11134
  disabled: r,
11135
11135
  ...o,
11136
11136
  ref: Nr(t, s.triggerRef),
11137
- onPointerDown: W(e.onPointerDown, (a) => {
11137
+ onPointerDown: G(e.onPointerDown, (a) => {
11138
11138
  !r && a.button === 0 && a.ctrlKey === !1 && (s.onOpenToggle(), s.open || a.preventDefault());
11139
11139
  }),
11140
- onKeyDown: W(e.onKeyDown, (a) => {
11140
+ onKeyDown: G(e.onKeyDown, (a) => {
11141
11141
  r || (["Enter", " "].includes(a.key) && s.onOpenToggle(), a.key === "ArrowDown" && s.onOpenChange(!0), ["Enter", " ", "ArrowDown"].includes(a.key) && a.preventDefault());
11142
11142
  })
11143
11143
  }
@@ -11150,7 +11150,7 @@ var NE = "DropdownMenuPortal", jl = (e) => {
11150
11150
  return /* @__PURE__ */ h(hE, { ...r, ...n });
11151
11151
  };
11152
11152
  jl.displayName = NE;
11153
- var Bl = "DropdownMenuContent", Vl = w.forwardRef(
11153
+ var Bl = "DropdownMenuContent", Hl = w.forwardRef(
11154
11154
  (e, t) => {
11155
11155
  const { __scopeDropdownMenu: n, ...r } = e, o = zl(Bl, n), s = he(n), i = w.useRef(!1);
11156
11156
  return /* @__PURE__ */ h(
@@ -11161,10 +11161,10 @@ var Bl = "DropdownMenuContent", Vl = w.forwardRef(
11161
11161
  ...s,
11162
11162
  ...r,
11163
11163
  ref: t,
11164
- onCloseAutoFocus: W(e.onCloseAutoFocus, (a) => {
11164
+ onCloseAutoFocus: G(e.onCloseAutoFocus, (a) => {
11165
11165
  i.current || o.triggerRef.current?.focus(), i.current = !1, a.preventDefault();
11166
11166
  }),
11167
- onInteractOutside: W(e.onInteractOutside, (a) => {
11167
+ onInteractOutside: G(e.onInteractOutside, (a) => {
11168
11168
  const c = a.detail.originalEvent, l = c.button === 0 && c.ctrlKey === !0, d = c.button === 2 || l;
11169
11169
  (!o.modal || d) && (i.current = !0);
11170
11170
  }),
@@ -11180,7 +11180,7 @@ var Bl = "DropdownMenuContent", Vl = w.forwardRef(
11180
11180
  );
11181
11181
  }
11182
11182
  );
11183
- Vl.displayName = Bl;
11183
+ Hl.displayName = Bl;
11184
11184
  var PE = "DropdownMenuGroup", ME = w.forwardRef(
11185
11185
  (e, t) => {
11186
11186
  const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
@@ -11188,13 +11188,13 @@ var PE = "DropdownMenuGroup", ME = w.forwardRef(
11188
11188
  }
11189
11189
  );
11190
11190
  ME.displayName = PE;
11191
- var kE = "DropdownMenuLabel", Hl = w.forwardRef(
11191
+ var kE = "DropdownMenuLabel", Vl = w.forwardRef(
11192
11192
  (e, t) => {
11193
11193
  const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
11194
11194
  return /* @__PURE__ */ h(yE, { ...o, ...r, ref: t });
11195
11195
  }
11196
11196
  );
11197
- Hl.displayName = kE;
11197
+ Vl.displayName = kE;
11198
11198
  var DE = "DropdownMenuItem", Wl = w.forwardRef(
11199
11199
  (e, t) => {
11200
11200
  const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
@@ -11222,18 +11222,18 @@ var jE = "DropdownMenuItemIndicator", BE = w.forwardRef((e, t) => {
11222
11222
  return /* @__PURE__ */ h(SE, { ...o, ...r, ref: t });
11223
11223
  });
11224
11224
  BE.displayName = jE;
11225
- var VE = "DropdownMenuSeparator", Gl = w.forwardRef((e, t) => {
11225
+ var HE = "DropdownMenuSeparator", Gl = w.forwardRef((e, t) => {
11226
11226
  const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
11227
11227
  return /* @__PURE__ */ h(CE, { ...o, ...r, ref: t });
11228
11228
  });
11229
- Gl.displayName = VE;
11230
- var HE = "DropdownMenuArrow", WE = w.forwardRef(
11229
+ Gl.displayName = HE;
11230
+ var VE = "DropdownMenuArrow", WE = w.forwardRef(
11231
11231
  (e, t) => {
11232
11232
  const { __scopeDropdownMenu: n, ...r } = e, o = he(n);
11233
11233
  return /* @__PURE__ */ h(xE, { ...o, ...r, ref: t });
11234
11234
  }
11235
11235
  );
11236
- WE.displayName = HE;
11236
+ WE.displayName = VE;
11237
11237
  var GE = (e) => {
11238
11238
  const { __scopeDropdownMenu: t, children: n, open: r, onOpenChange: o, defaultOpen: s } = e, i = he(t), [a, c] = Xo({
11239
11239
  prop: r,
@@ -11267,7 +11267,7 @@ var JE = "DropdownMenuSubContent", Jl = w.forwardRef((e, t) => {
11267
11267
  );
11268
11268
  });
11269
11269
  Jl.displayName = JE;
11270
- var KE = Fl, XE = Ul, Kl = jl, qE = Vl, QE = Hl, Ua = Wl, eS = Gl, tS = GE, nS = Yl, rS = Jl;
11270
+ var KE = Fl, XE = Ul, Kl = jl, qE = Hl, QE = Vl, Ua = Wl, eS = Gl, tS = GE, nS = Yl, rS = Jl;
11271
11271
  const ja = (e) => {
11272
11272
  if (typeof e == "string")
11273
11273
  return e;
@@ -11281,11 +11281,11 @@ const ja = (e) => {
11281
11281
  return "Element";
11282
11282
  };
11283
11283
  const oS = "z-100 rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2 prose prose-dark", sS = "z-[60] rounded-md bg-surface-light shadow-sm shadow-border-dark outline-hidden p-3 sm:p-2 mx-3", aS = U("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 select-none cursor-pointer", "outline-hidden focus:border focus:border-border-medium focus:bg-surface-lighter focus:underline", "disabled:cursor-not-allowed disabled:text-copy-medium", "data-highlighted:bg-surface-lighter data-highlighted:border-border-medium data-highlighted:underline", "data-[state=open]:bg-surface-lighter"), iS = (e) => e ? e.startsWith("top") ? "top" : e.startsWith("left") ? "left" : e.startsWith("right") ? "right" : "bottom" : "bottom", cS = (e) => !e || e.endsWith("-start") ? "start" : e.endsWith("-end") ? "end" : "center", Dr = ({ trigger: e, children: t, label: n = "Open menu", defaultPlacement: r = "bottom-start", onOpenChange: o, mode: s = "system", focusMode: i = "system", sideOffset: a = 10, modal: c = !0 }) => {
11284
- const [l, d] = B(!1), [u, g] = B(void 0), m = ja(e) === "Button" || ja(e) === "ButtonIcon", p = m ? {
11284
+ const [l, d] = H(!1), [u, g] = H(void 0), m = ja(e) === "Button" || ja(e) === "ButtonIcon", p = m ? {
11285
11285
  noInternalClick: m,
11286
11286
  focusMode: i,
11287
11287
  mode: s
11288
- } : {}, f = J(null), y = e ? /* @__PURE__ */ ni(e, {
11288
+ } : {}, f = W(null), y = e ? /* @__PURE__ */ ni(e, {
11289
11289
  ...p,
11290
11290
  "aria-label": n,
11291
11291
  ref: f
@@ -11341,7 +11341,7 @@ const Xl = ({ label: e, icon: t, children: n, disabled: r = !1, sideOffset: o =
11341
11341
  })
11342
11342
  ]
11343
11343
  }),
11344
- /* @__PURE__ */ h(Hu, {
11344
+ /* @__PURE__ */ h(Vu, {
11345
11345
  className: "ml-2",
11346
11346
  size: "size-3",
11347
11347
  monotone: !0
@@ -11518,10 +11518,10 @@ const uS = (e) => {
11518
11518
  dispatch: r,
11519
11519
  setChatId: o,
11520
11520
  setInitialMessages: s
11521
- } = de(Le), [i, a] = Ke(), [c, l] = B(!1), [d, u] = B(!1), [g, m] = et({
11522
- key: Ve + mu,
11521
+ } = de(Le), [i, a] = Ke(), [c, l] = H(!1), [d, u] = H(!1), [g, m] = et({
11522
+ key: He + mu,
11523
11523
  initialValue: ""
11524
- }), [p, f] = B(!1), y = (_) => {
11524
+ }), [p, f] = H(!1), y = (_) => {
11525
11525
  o(ht()), s([]), r({
11526
11526
  type: Wt,
11527
11527
  payload: {
@@ -11556,8 +11556,8 @@ const uS = (e) => {
11556
11556
  {
11557
11557
  toggleLabel: "Don't show this again",
11558
11558
  toggleName: "reasoning-disclosure",
11559
- maxHeight: Vt() ? "large" : "medium",
11560
- noCancelAction: Vt(),
11559
+ maxHeight: Ht() ? "large" : "medium",
11560
+ noCancelAction: Ht(),
11561
11561
  toggleChecked: p,
11562
11562
  onToggleChange: (_) => f(_),
11563
11563
  showConfirmation: c,
@@ -11649,7 +11649,7 @@ const uS = (e) => {
11649
11649
  );
11650
11650
  };
11651
11651
  function mS(e) {
11652
- const [t, n] = B(
11652
+ const [t, n] = H(
11653
11653
  () => Ba()
11654
11654
  );
11655
11655
  return Z(() => {
@@ -11770,7 +11770,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
11770
11770
  " ",
11771
11771
  or(Mo)
11772
11772
  ] })
11773
- ] }), cs = 1200, eu = 200 * 1024, TS = 0.85, Va = 0.5, AS = 0.1, RS = ["image/jpeg", "image/webp"], OS = ["image/png", "image/jpeg", "image/webp"], tu = (e) => OS.includes(e.type), NS = (e, t, n = cs) => {
11773
+ ] }), cs = 1200, eu = 200 * 1024, TS = 0.85, Ha = 0.5, AS = 0.1, RS = ["image/jpeg", "image/webp"], OS = ["image/png", "image/jpeg", "image/webp"], tu = (e) => OS.includes(e.type), NS = (e, t, n = cs) => {
11774
11774
  if (e <= n && t <= n)
11775
11775
  return { width: e, height: t };
11776
11776
  const r = e / t;
@@ -11817,10 +11817,10 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
11817
11817
  i,
11818
11818
  c,
11819
11819
  l ? d : 1
11820
- ), u.size <= t || d <= Va)
11820
+ ), u.size <= t || d <= Ha)
11821
11821
  break;
11822
11822
  d -= AS;
11823
- } while (d >= Va);
11823
+ } while (d >= Ha);
11824
11824
  if (u.size >= e.size)
11825
11825
  return e;
11826
11826
  const m = {
@@ -11837,10 +11837,10 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
11837
11837
  }
11838
11838
  }, $S = async (e, t = eu, n = cs) => await Promise.all(
11839
11839
  e.map((o) => tu(o) ? DS(o, t, n) : Promise.resolve(o))
11840
- ), nu = 24, LS = 500, ru = 1, zS = 5, FS = nu * ru, Ha = zS * nu, ZS = "ready", US = "streaming", jS = "error", BS = "submitted", Yn = (e) => {
11840
+ ), nu = 24, LS = 500, ru = 1, zS = 5, FS = nu * ru, Va = zS * nu, ZS = "ready", US = "streaming", jS = "error", BS = "submitted", Yn = (e) => {
11841
11841
  e.current && (e.current.style.height = `${FS}px`);
11842
- }, VS = () => {
11843
- const { user: e, getAccessToken: t } = $e(), n = gr(ar.ADDON.ATTACHMENTS), r = gr(ar.ADDON.REASONING), { allowedModels: o } = ko(), [s, i] = B(null), [a, c] = B(!1), [l, d] = B(!1), {
11842
+ }, HS = () => {
11843
+ const { user: e, getAccessToken: t } = $e(), n = gr(ar.ADDON.ATTACHMENTS), r = gr(ar.ADDON.REASONING), { allowedModels: o } = ko(), [s, i] = H(null), [a, c] = H(!1), [l, d] = H(!1), {
11844
11844
  state: { oledMode: u }
11845
11845
  } = de(En), {
11846
11846
  dispatch: g,
@@ -11856,12 +11856,12 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
11856
11856
  } = de(Le), { state: E, dispatch: S } = de(Do), { data: I } = bt({
11857
11857
  user: e?.username,
11858
11858
  getAccessToken: t
11859
- }), x = J(null), T = J(null), M = J(!1), $ = J(0), V = J(0), P = J(null), R = J(null), L = id(), [Q, j] = Ke(), q = xS({
11859
+ }), x = W(null), T = W(null), k = W(!1), M = W(0), j = W(0), O = W(null), R = W(null), L = id(), [Q, B] = Ke(), q = xS({
11860
11860
  oledMode: u,
11861
- placeholderColor: Q(j.Placeholder)
11862
- }), k = r && I?.showReasoningButton, { setMessages: O, status: ie, id: Ie, sendMessage: ze, input: me, setInput: Ee, messages: kt } = wt({
11863
- onFinish: (G) => {
11864
- const ue = G.message?.metadata;
11861
+ placeholderColor: Q(B.Placeholder)
11862
+ }), D = r && I?.showReasoningButton, { setMessages: N, status: ie, id: Ie, sendMessage: ze, input: me, setInput: Ee, messages: kt } = wt({
11863
+ onFinish: (Y) => {
11864
+ const ue = Y.message?.metadata;
11865
11865
  ue?.tokenUsage && g({
11866
11866
  type: lc,
11867
11867
  payload: {
@@ -11869,14 +11869,14 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
11869
11869
  }
11870
11870
  });
11871
11871
  }
11872
- }), qe = mS(!!kt.length), ce = Y(
11873
- (G) => {
11874
- Ee(G.target.value);
11872
+ }), qe = mS(!!kt.length), ce = J(
11873
+ (Y) => {
11874
+ Ee(Y.target.value);
11875
11875
  },
11876
11876
  [Ee]
11877
- ), St = Y(
11878
- (G, fe) => {
11879
- if (G.preventDefault(), me.trim()) {
11877
+ ), St = J(
11878
+ (Y, fe) => {
11879
+ if (Y.preventDefault(), me.trim()) {
11880
11880
  const ue = {
11881
11881
  /**
11882
11882
  * Include dynamic values that change during runtime. Static values like
@@ -11907,34 +11907,34 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
11907
11907
  I?.model,
11908
11908
  o
11909
11909
  ]
11910
- ), kn = Y(
11911
- async (G) => {
11912
- G === ZS && g({
11910
+ ), kn = J(
11911
+ async (Y) => {
11912
+ Y === ZS && g({
11913
11913
  type: Rt,
11914
11914
  payload: {
11915
11915
  loading: !1,
11916
11916
  streaming: !1
11917
11917
  }
11918
- }), G === BS && g({
11918
+ }), Y === BS && g({
11919
11919
  type: Rt,
11920
11920
  payload: {
11921
11921
  loading: !0,
11922
11922
  streaming: !1
11923
11923
  }
11924
- }), G === US && g({
11924
+ }), Y === US && g({
11925
11925
  type: Rt,
11926
11926
  payload: {
11927
11927
  loading: !1,
11928
11928
  streaming: !0
11929
11929
  }
11930
- }), G === jS && setTimeout(() => {
11930
+ }), Y === jS && setTimeout(() => {
11931
11931
  f || (g({
11932
11932
  type: Rt,
11933
11933
  payload: {
11934
11934
  loading: !1,
11935
11935
  streaming: !1
11936
11936
  }
11937
- }), O((fe) => [
11937
+ }), N((fe) => [
11938
11938
  ...fe,
11939
11939
  {
11940
11940
  id: ht(),
@@ -11944,26 +11944,26 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
11944
11944
  ]));
11945
11945
  }, 1e3);
11946
11946
  },
11947
- [g, O, f]
11947
+ [g, N, f]
11948
11948
  );
11949
11949
  Z(() => {
11950
11950
  ie && kn(ie);
11951
11951
  }, [ie, kn]), Z(() => {
11952
11952
  I?.sendOnEnter !== void 0 && d(I.sendOnEnter);
11953
11953
  }, [I]);
11954
- const Xt = Y(() => {
11954
+ const Xt = J(() => {
11955
11955
  if (!R.current)
11956
11956
  return;
11957
11957
  R.current.style.height = "auto";
11958
- const G = R.current.scrollHeight;
11959
- if (G > Ha) {
11960
- R.current.style.height = `${Ha}px`, R.current.style.overflowY = "scroll";
11958
+ const Y = R.current.scrollHeight;
11959
+ if (Y > Va) {
11960
+ R.current.style.height = `${Va}px`, R.current.style.overflowY = "scroll";
11961
11961
  return;
11962
11962
  }
11963
- R.current.style.height = `${G}px`, R.current.style.overflowY = "hidden";
11964
- }, []), $r = async (G) => {
11965
- if (G.preventDefault(), G.target.files && G.target.files.length > 0) {
11966
- const fe = s ? Array.from(s) : [], ue = Array.from(G.target.files), $t = [...fe];
11963
+ R.current.style.height = `${Y}px`, R.current.style.overflowY = "hidden";
11964
+ }, []), $r = async (Y) => {
11965
+ if (Y.preventDefault(), Y.target.files && Y.target.files.length > 0) {
11966
+ const fe = s ? Array.from(s) : [], ue = Array.from(Y.target.files), $t = [...fe];
11967
11967
  let Ct = !1;
11968
11968
  for (const Oe of ue) {
11969
11969
  const zr = "." + Oe.name.split(".").pop()?.toLowerCase();
@@ -11995,22 +11995,22 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
11995
11995
  }
11996
11996
  }, Lr = () => {
11997
11997
  T.current && T.current.click();
11998
- }, Dt = (G) => {
11998
+ }, Dt = (Y) => {
11999
11999
  if (!s)
12000
12000
  return;
12001
12001
  const fe = new DataTransfer();
12002
12002
  Array.from(s).forEach((ue) => {
12003
- ue !== G && fe.items.add(ue);
12003
+ ue !== Y && fe.items.add(ue);
12004
12004
  }), fe.files.length === 0 ? i(null) : i(fe.files), g({
12005
12005
  type: mn,
12006
12006
  payload: {
12007
12007
  attachments: fe.files.length
12008
12008
  }
12009
12009
  }), T.current && (T.current.value = "");
12010
- }, iu = Y(() => {
12010
+ }, iu = J(() => {
12011
12011
  T.current && (T.current.value = ""), i(null);
12012
- }, []), us = async (G) => {
12013
- G.preventDefault(), Yn(R);
12012
+ }, []), us = async (Y) => {
12013
+ Y.preventDefault(), Yn(R);
12014
12014
  const fe = await t();
12015
12015
  let ue;
12016
12016
  if (s && s.length > 0) {
@@ -12019,7 +12019,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12019
12019
  ), Ct = new DataTransfer();
12020
12020
  $t.forEach((xt) => Ct.items.add(xt)), ue = Ct.files;
12021
12021
  }
12022
- St(G, {
12022
+ St(Y, {
12023
12023
  headers: {
12024
12024
  "Content-Type": "application/json",
12025
12025
  authorization: `Bearer ${fe}`,
@@ -12030,10 +12030,10 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12030
12030
  },
12031
12031
  files: ue
12032
12032
  }), iu();
12033
- }, cu = (G) => {
12034
- Xt(), ce(G);
12033
+ }, cu = (Y) => {
12034
+ Xt(), ce(Y);
12035
12035
  };
12036
- return Vo([
12036
+ return Ho([
12037
12037
  [
12038
12038
  "mod+K",
12039
12039
  () => {
@@ -12042,27 +12042,27 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12042
12042
  ]
12043
12043
  ]), Z(() => {
12044
12044
  if (E.prompt !== "") {
12045
- const G = E.prompt.endsWith(":") && !E.prompt.endsWith(": ") ? E.prompt + " " : E.prompt;
12046
- G.indexOf(hs) !== -1 ? navigator.clipboard.readText().then((ue) => {
12045
+ const Y = E.prompt.endsWith(":") && !E.prompt.endsWith(": ") ? E.prompt + " " : E.prompt;
12046
+ Y.indexOf(hs) !== -1 ? navigator.clipboard.readText().then((ue) => {
12047
12047
  const Ct = ue.startsWith("http://") || ue.startsWith("https://") ? ue : `"""${ue}"""`;
12048
- V.current = Date.now(), Ee(G.replace(hs, Ct));
12049
- }) : (V.current = Date.now(), Ee(G)), !We() && R.current && R.current.focus(), S({
12048
+ j.current = Date.now(), Ee(Y.replace(hs, Ct));
12049
+ }) : (j.current = Date.now(), Ee(Y)), !We() && R.current && R.current.focus(), S({
12050
12050
  type: Ya
12051
12051
  });
12052
12052
  }
12053
12053
  }, [E, S, Ee]), Z(() => {
12054
- if (M.current === !1) {
12055
- M.current = !0, !me && Yn(R);
12054
+ if (k.current === !1) {
12055
+ k.current = !0, !me && Yn(R);
12056
12056
  return;
12057
12057
  }
12058
- y > 0 && y !== $.current ? ($.current = y, setTimeout(() => {
12058
+ y > 0 && y !== M.current ? (M.current = y, setTimeout(() => {
12059
12059
  if (R.current) {
12060
- const G = Date.now() - V.current < 600;
12061
- !me && !G && Yn(R), R.current.focus();
12060
+ const Y = Date.now() - j.current < 600;
12061
+ !me && !Y && Yn(R), R.current.focus();
12062
12062
  }
12063
12063
  }, LS)) : p === !1 && !me && (Yn(R), !We() && R.current && R.current.focus());
12064
12064
  }, [y, p, me]), Z(() => {
12065
- Date.now() - V.current < 200 && me && requestAnimationFrame(() => {
12065
+ Date.now() - j.current < 200 && me && requestAnimationFrame(() => {
12066
12066
  Xt();
12067
12067
  });
12068
12068
  }, [me, Xt]), Z(() => {
@@ -12084,7 +12084,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12084
12084
  children: /* @__PURE__ */ h("p", { className: "m-0", children: x.current })
12085
12085
  }
12086
12086
  ),
12087
- /* @__PURE__ */ h("div", { className: q.wrapper, ref: P, children: /* @__PURE__ */ z("form", { onSubmit: us, children: [
12087
+ /* @__PURE__ */ h("div", { className: q.wrapper, ref: O, children: /* @__PURE__ */ z("form", { onSubmit: us, children: [
12088
12088
  /* @__PURE__ */ h("div", { id: L, className: "sr-only", children: oi }),
12089
12089
  /* @__PURE__ */ z("div", { className: "relative pb-3 sm:pb-0", children: [
12090
12090
  /* @__PURE__ */ h(
@@ -12124,8 +12124,8 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12124
12124
  mb,
12125
12125
  {
12126
12126
  className: U("order-1 sm:mr-2", {
12127
- "mr-3": k,
12128
- "mr-4": !k
12127
+ "mr-3": D,
12128
+ "mr-4": !D
12129
12129
  })
12130
12130
  }
12131
12131
  ),
@@ -12133,8 +12133,8 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12133
12133
  dS,
12134
12134
  {
12135
12135
  className: U("order-2 sm:mr-2", {
12136
- "mr-3": k,
12137
- "mr-4": !k
12136
+ "mr-3": D,
12137
+ "mr-4": !D
12138
12138
  })
12139
12139
  }
12140
12140
  ),
@@ -12142,32 +12142,32 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12142
12142
  pb,
12143
12143
  {
12144
12144
  className: U("order-3 sm:mr-2", {
12145
- "mr-3": k,
12146
- "mr-4": !k
12145
+ "mr-3": D,
12146
+ "mr-4": !D
12147
12147
  }),
12148
12148
  onClick: Lr
12149
12149
  }
12150
12150
  ),
12151
- k && /* @__PURE__ */ h(fS, { className: U("order-4 mr-3 sm:mr-2") }),
12151
+ D && /* @__PURE__ */ h(fS, { className: U("order-4 mr-3 sm:mr-2") }),
12152
12152
  /* @__PURE__ */ h(
12153
12153
  Fb,
12154
12154
  {
12155
12155
  className: U("order-5 mr-3 sm:mr-2", {
12156
- "mr-3": k,
12157
- "mr-4": !k
12156
+ "mr-3": D,
12157
+ "mr-4": !D
12158
12158
  })
12159
12159
  }
12160
12160
  )
12161
12161
  ] })
12162
12162
  ] }) })
12163
12163
  ] });
12164
- }, Jn = "--sassy-bottom", HS = ({ isComponent: e }) => {
12164
+ }, Jn = "--sassy-bottom", VS = ({ isComponent: e }) => {
12165
12165
  const {
12166
12166
  state: { loading: t, streaming: n, restoring: r }
12167
12167
  } = de(Le), {
12168
12168
  state: { footerHeight: o, footerPosition: s, fullScreen: i },
12169
12169
  dispatch: a
12170
- } = de(En), [c] = B(
12170
+ } = de(En), [c] = H(
12171
12171
  () => gs[Math.floor(Math.random() * gs.length)]
12172
12172
  ), l = Ae(() => We(), []), d = Ae(() => Gd(), []), { messages: u } = wt(), [g, m] = si(), [p, f] = Ke(), y = ny(d), { height: b } = qv(), { height: _ } = Qv(), v = d ? 0 : b - _, E = Ae(() => {
12173
12173
  const S = l ? bu : d ? wu : qa;
@@ -12240,7 +12240,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12240
12240
  }
12241
12241
  ),
12242
12242
  children: /* @__PURE__ */ z("div", { className: fo({ fullScreen: i }), children: [
12243
- /* @__PURE__ */ h(VS, {}),
12243
+ /* @__PURE__ */ h(HS, {}),
12244
12244
  /* @__PURE__ */ h(
12245
12245
  "div",
12246
12246
  {
@@ -12276,7 +12276,7 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12276
12276
  state: { privateChat: n },
12277
12277
  setChatId: r,
12278
12278
  setInitialMessages: o
12279
- } = de(Le), { getAccessToken: s, user: i } = $e(), { status: a } = wt(), { allowedModels: c, status: l } = ko(), [d, u] = Ke(), [g, m] = B(!1), p = Y(() => {
12279
+ } = de(Le), { getAccessToken: s, user: i } = $e(), { status: a } = wt(), { allowedModels: c, status: l } = ko(), [d, u] = Ke(), [g, m] = H(!1), p = J(() => {
12280
12280
  g || (zv(), m(!0));
12281
12281
  }, [g]), {
12282
12282
  isSuccess: f,
@@ -12287,8 +12287,8 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12287
12287
  getAccessToken: s
12288
12288
  }), _ = Ae(() => {
12289
12289
  if (ds(c, l)) {
12290
- const P = _u(c), R = uo.filter(
12291
- (L) => P.includes(
12290
+ const O = _u(c), R = uo.filter(
12291
+ (L) => O.includes(
12292
12292
  L.id
12293
12293
  )
12294
12294
  );
@@ -12298,17 +12298,17 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12298
12298
  }, [c, l]), v = Ae(() => ds(c, l) ? xu(c) : /* @__PURE__ */ new Map(), [c, l]), E = Ae(() => {
12299
12299
  if (!b?.useNestedModelSelection)
12300
12300
  return !1;
12301
- for (const P of v.values())
12302
- if (P.length > 1)
12301
+ for (const O of v.values())
12302
+ if (O.length > 1)
12303
12303
  return !0;
12304
12304
  return !1;
12305
- }, [b?.useNestedModelSelection, v]), S = async (P) => {
12305
+ }, [b?.useNestedModelSelection, v]), S = async (O) => {
12306
12306
  try {
12307
- r(ht()), o([]), P !== b?.provider && (await fs({
12308
- provider: P,
12307
+ r(ht()), o([]), O !== b?.provider && (await fs({
12308
+ provider: O,
12309
12309
  accessToken: await s(),
12310
12310
  username: i?.username || ""
12311
- }), y(), await fr(`${vs} ${P}`, {
12311
+ }), y(), await fr(`${vs} ${O}`, {
12312
12312
  containerId: "toggle-provider"
12313
12313
  })), t({
12314
12314
  type: Wt,
@@ -12318,18 +12318,18 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12318
12318
  });
12319
12319
  } catch {
12320
12320
  }
12321
- }, I = async (P, R) => {
12321
+ }, I = async (O, R) => {
12322
12322
  try {
12323
- if (r(ht()), o([]), P !== b?.provider || R !== b?.model) {
12323
+ if (r(ht()), o([]), O !== b?.provider || R !== b?.model) {
12324
12324
  await fs({
12325
- provider: P,
12325
+ provider: O,
12326
12326
  model: R,
12327
12327
  accessToken: await s(),
12328
12328
  username: i?.username || ""
12329
12329
  }), y();
12330
12330
  const L = Ur[R] || R;
12331
12331
  await fr(
12332
- `${vs} ${P} (${L})`,
12332
+ `${vs} ${O} (${L})`,
12333
12333
  {
12334
12334
  containerId: "toggle-provider"
12335
12335
  }
@@ -12344,8 +12344,8 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12344
12344
  } catch {
12345
12345
  }
12346
12346
  }, x = b && f, T = x && _.find(
12347
- (P) => b.provider === P.id
12348
- )?.icon || _[0]?.icon, M = Ae(() => !b?.useNestedModelSelection || !b?.model || !c || !Xa(b.model, c) ? null : Ur[b.model] || b.model, [b?.useNestedModelSelection, b?.model, c]), $ = /* @__PURE__ */ h(ut, { children: /* @__PURE__ */ z(
12347
+ (O) => b.provider === O.id
12348
+ )?.icon || _[0]?.icon, k = Ae(() => !b?.useNestedModelSelection || !b?.model || !c || !Xa(b.model, c) ? null : Ur[b.model] || b.model, [b?.useNestedModelSelection, b?.model, c]), M = /* @__PURE__ */ h(ut, { children: /* @__PURE__ */ z(
12349
12349
  Dr,
12350
12350
  {
12351
12351
  mode: "light",
@@ -12371,15 +12371,15 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12371
12371
  defaultPlacement: "top-start",
12372
12372
  children: [
12373
12373
  /* @__PURE__ */ h(_r, { children: "Providers" }),
12374
- x && _.map((P) => {
12375
- const R = v.get(P.id) || [];
12376
- return E && R.length > 1 ? /* @__PURE__ */ z(Xl, { label: P.label, children: [
12374
+ x && _.map((O) => {
12375
+ const R = v.get(O.id) || [];
12376
+ return E && R.length > 1 ? /* @__PURE__ */ z(Xl, { label: O.label, children: [
12377
12377
  /* @__PURE__ */ z(
12378
12378
  _r,
12379
12379
  {
12380
- ...P.icon && !We() && { icon: /* @__PURE__ */ h(P.icon, {}) },
12380
+ ...O.icon && !We() && { icon: /* @__PURE__ */ h(O.icon, {}) },
12381
12381
  children: [
12382
- P.label,
12382
+ O.label,
12383
12383
  " Models"
12384
12384
  ]
12385
12385
  }
@@ -12387,21 +12387,21 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12387
12387
  R.map((Q) => /* @__PURE__ */ h(
12388
12388
  Me,
12389
12389
  {
12390
- selected: b.provider === P.id && b.model === Q,
12390
+ selected: b.provider === O.id && b.model === Q,
12391
12391
  label: Ur[Q] || Q,
12392
- onClick: () => I(P.id, Q)
12392
+ onClick: () => I(O.id, Q)
12393
12393
  },
12394
12394
  Q
12395
12395
  ))
12396
- ] }, P.id) : /* @__PURE__ */ h(
12396
+ ] }, O.id) : /* @__PURE__ */ h(
12397
12397
  Me,
12398
12398
  {
12399
- selected: b.provider === P.id,
12400
- label: P.label,
12401
- icon: /* @__PURE__ */ h(P.icon, {}),
12402
- onClick: () => S(P.id)
12399
+ selected: b.provider === O.id,
12400
+ label: O.label,
12401
+ icon: /* @__PURE__ */ h(O.icon, {}),
12402
+ onClick: () => S(O.id)
12403
12403
  },
12404
- P.id
12404
+ O.id
12405
12405
  );
12406
12406
  })
12407
12407
  ]
@@ -12415,55 +12415,55 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12415
12415
  mode: "light",
12416
12416
  placement: "right",
12417
12417
  className: e,
12418
- trigger: $
12418
+ trigger: M
12419
12419
  }
12420
12420
  ),
12421
- M && /* @__PURE__ */ h(
12421
+ k && /* @__PURE__ */ h(
12422
12422
  "span",
12423
12423
  {
12424
12424
  className: U(
12425
12425
  "text-sm sm:text-xs font-medium select-none",
12426
12426
  d(u.Header)
12427
12427
  ),
12428
- children: M
12428
+ children: k
12429
12429
  }
12430
12430
  )
12431
- ] }) : /* @__PURE__ */ h("div", { className: e, children: $ });
12431
+ ] }) : /* @__PURE__ */ h("div", { className: e, children: M });
12432
12432
  }, GS = ot(
12433
12433
  () => import(
12434
12434
  /* webpackChunkName: "modal-chunk" */
12435
- "./ProfileEntry.DhR2WKuK.js"
12435
+ "./ProfileEntry.8-BhqMWc.js"
12436
12436
  ).then((e) => ({
12437
12437
  default: e.Profile
12438
12438
  }))
12439
12439
  ), YS = ot(
12440
12440
  () => import(
12441
12441
  /* webpackChunkName: "modal-chunk" */
12442
- "./SettingsEntry.kLs1a2Dj.js"
12442
+ "./SettingsEntry.BfQY7V1X.js"
12443
12443
  ).then((e) => ({
12444
12444
  default: e.SettingsPanel
12445
12445
  }))
12446
12446
  ), JS = ot(
12447
12447
  () => import(
12448
12448
  /* webpackChunkName: "modal-chunk" */
12449
- "./HistoryEntry.DyhOuzLz.js"
12449
+ "./HistoryEntry.m8eQcBA5.js"
12450
12450
  ).then((e) => ({
12451
12451
  default: e.HistoryPanel
12452
12452
  }))
12453
12453
  ), KS = ot(
12454
12454
  () => import(
12455
12455
  /* webpackChunkName: "modal-chunk" */
12456
- "./AboutEntry.COzMcfpY.js"
12456
+ "./AboutEntry.YWAyYLjf.js"
12457
12457
  ).then((e) => ({ default: e.About }))
12458
12458
  ), XS = ot(
12459
12459
  () => import(
12460
12460
  /* webpackChunkName: "modal-chunk" */
12461
- "./UsageEntry.BLfcBtrN.js"
12461
+ "./UsageEntry.CzN_8YVL.js"
12462
12462
  ).then((e) => ({ default: e.Usage }))
12463
12463
  ), qS = ot(
12464
12464
  () => import(
12465
12465
  /* webpackChunkName: "modal-chunk" */
12466
- "./MemoriesEntry.BckrjsrE.js"
12466
+ "./MemoriesEntry.Dp9urYHa.js"
12467
12467
  ).then((e) => ({ default: e.default }))
12468
12468
  ), QS = ({
12469
12469
  open: e,
@@ -12503,47 +12503,47 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12503
12503
  } = de(En), { logout: n, getAccessToken: r, user: o } = $e(), s = Iu(), [i, a] = Ke(), { data: c, isSuccess: l } = bt({
12504
12504
  user: o?.username,
12505
12505
  getAccessToken: r
12506
- }), [d, u] = B(null), [g, m] = B(!1), [p, f] = B(!1), [y, b] = B(!1), _ = gr(ar.TOOL.MEMORIES);
12506
+ }), [d, u] = H(null), [g, m] = H(!1), [p, f] = H(!1), [y, b] = H(!1), _ = gr(ar.TOOL.MEMORIES);
12507
12507
  Z(() => {
12508
12508
  l && c && _ && b(c?.useMemory ?? !1);
12509
12509
  }, [l, c, _]);
12510
- const v = Y(() => {
12510
+ const v = J(() => {
12511
12511
  p || Promise.all([
12512
12512
  import(
12513
12513
  /* webpackChunkName: "modal-chunk" */
12514
- "./ProfileEntry.DhR2WKuK.js"
12514
+ "./ProfileEntry.8-BhqMWc.js"
12515
12515
  ),
12516
12516
  import(
12517
12517
  /* webpackChunkName: "modal-chunk" */
12518
- "./SettingsEntry.kLs1a2Dj.js"
12518
+ "./SettingsEntry.BfQY7V1X.js"
12519
12519
  ),
12520
12520
  import(
12521
12521
  /* webpackChunkName: "modal-chunk" */
12522
- "./HistoryEntry.DyhOuzLz.js"
12522
+ "./HistoryEntry.m8eQcBA5.js"
12523
12523
  ),
12524
12524
  import(
12525
12525
  /* webpackChunkName: "modal-chunk" */
12526
- "./AboutEntry.COzMcfpY.js"
12526
+ "./AboutEntry.YWAyYLjf.js"
12527
12527
  ),
12528
12528
  import(
12529
12529
  /* webpackChunkName: "modal-chunk" */
12530
- "./UsageEntry.BLfcBtrN.js"
12530
+ "./UsageEntry.CzN_8YVL.js"
12531
12531
  )
12532
12532
  ]).finally(() => f(!0));
12533
- }, [p]), E = Y((M) => {
12534
- u(M);
12535
- }, []), S = Y(() => {
12533
+ }, [p]), E = J((k) => {
12534
+ u(k);
12535
+ }, []), S = J(() => {
12536
12536
  u(null);
12537
- }, []), I = Y(() => {
12537
+ }, []), I = J(() => {
12538
12538
  E("settings");
12539
12539
  }, [E]);
12540
12540
  Ac("openSettings", I);
12541
12541
  const x = () => {
12542
12542
  m(!g);
12543
- }, T = Y(() => {
12543
+ }, T = J(() => {
12544
12544
  s.clear(), n();
12545
12545
  }, [n, s]);
12546
- return Vo(
12546
+ return Ho(
12547
12547
  [
12548
12548
  [
12549
12549
  "mod+,",
@@ -12684,9 +12684,9 @@ const hS = [".png", ".jpg", ".jpeg", ".webp"], gS = [".pdf", ".txt"], vS = [
12684
12684
  ] });
12685
12685
  };
12686
12686
  function n0() {
12687
- const e = J(null), [t, n] = B(!1);
12687
+ const e = W(null), [t, n] = H(!1);
12688
12688
  return {
12689
- ref: Y((o) => {
12689
+ ref: J((o) => {
12690
12690
  typeof IntersectionObserver < "u" && (o && !e.current ? e.current = new IntersectionObserver((s) => n(s.some((i) => i.isIntersecting))) : e.current?.disconnect(), o ? e.current?.observe(o) : n(!1));
12691
12691
  }, []),
12692
12692
  inViewport: t
@@ -12786,18 +12786,18 @@ const Wa = "av-spinner", ou = ({ spinnerRef: e, mode: t = "system", type: n = "c
12786
12786
  ]
12787
12787
  });
12788
12788
  }, o0 = ot(
12789
- () => import("./Bubble.QRjcn1Lv.js").then((e) => ({ default: e.Bubble }))
12789
+ () => import("./Bubble.MXxGhdx0.js").then((e) => ({ default: e.Bubble }))
12790
12790
  ), ls = (e) => /* @__PURE__ */ h(ir, { fallback: /* @__PURE__ */ h("span", { className: "inline-block" }), children: /* @__PURE__ */ h(o0, { ...e }) });
12791
12791
  ls.displayName = "AsyncBubble";
12792
12792
  const Ga = 1, s0 = 150, a0 = ot(
12793
12793
  () => import(
12794
12794
  /* webpackChunkName: "LazyMessageAssistant" */
12795
- "./ChatBubbleAssistant.Cqd-fUi1.js"
12795
+ "./ChatBubbleAssistant.BjZa9CVT.js"
12796
12796
  )
12797
12797
  ), i0 = ot(
12798
12798
  () => import(
12799
12799
  /* webpackChunkName: "LazyMessageUser" */
12800
- "./ChatBubbleUser.CSOd70yB.js"
12800
+ "./ChatBubbleUser.BvDGQWGU.js"
12801
12801
  )
12802
12802
  ), c0 = Ze.memo(
12803
12803
  ({
@@ -12808,7 +12808,7 @@ const Ga = 1, s0 = 150, a0 = ot(
12808
12808
  isLastAssistantMessage: o = !1,
12809
12809
  status: s
12810
12810
  }) => {
12811
- const [i, a] = B(!0), c = J(Date.now()), [l] = B(
12811
+ const [i, a] = H(!0), c = W(Date.now()), [l] = H(
12812
12812
  () => o && (s === "streaming" || s === "submitted")
12813
12813
  );
12814
12814
  return Z(() => {
@@ -12889,18 +12889,18 @@ const su = Ze.forwardRef((e, t) => {
12889
12889
  });
12890
12890
  su.displayName = "MessagesList";
12891
12891
  const d0 = () => {
12892
- const { isAuthenticated: e } = $e(), { ref: t, inViewport: n } = n0(), r = J(null), o = J(null), s = J(null), i = J(null), [a, c] = B(0), {
12892
+ const { isAuthenticated: e } = $e(), { ref: t, inViewport: n } = n0(), r = W(null), o = W(null), s = W(null), i = W(null), [a, c] = H(0), {
12893
12893
  state: { footerPosition: l, footerHeight: d, footerOffset: u, oledMode: g }
12894
12894
  } = de(En), {
12895
12895
  state: { loading: m, streaming: p }
12896
- } = de(Le), { messages: f } = wt(), y = J(0), { data: b, isSuccess: _ } = Tu(), v = Au({
12896
+ } = de(Le), { messages: f } = wt(), y = W(0), b = W(!1), _ = W(0), v = W(0), { data: E, isSuccess: S } = Tu(), I = Au({
12897
12897
  isAuthenticated: e,
12898
12898
  oledMode: g,
12899
12899
  extraClass: "rounded-b-md relative border-b-16 border-transparent"
12900
- }), E = Vt() ? "mt-4" : "", S = Y(() => {
12900
+ }), x = Ht() ? "mt-4" : "", T = J(() => {
12901
12901
  if (a > 0 && r.current) {
12902
- const { scrollHeight: x, clientHeight: T } = r.current;
12903
- if (x - a < T && i.current) {
12902
+ const { scrollHeight: M, clientHeight: j } = r.current;
12903
+ if (M - a < j && i.current) {
12904
12904
  i.current.scrollIntoView({
12905
12905
  behavior: "smooth",
12906
12906
  block: "start"
@@ -12919,7 +12919,7 @@ const d0 = () => {
12919
12919
  behavior: "smooth",
12920
12920
  block: "end"
12921
12921
  });
12922
- }, [a]), I = Y(() => {
12922
+ }, [a]), k = J(() => {
12923
12923
  i.current && i.current.scrollIntoView({
12924
12924
  behavior: "smooth",
12925
12925
  block: "start"
@@ -12927,23 +12927,32 @@ const d0 = () => {
12927
12927
  }, []);
12928
12928
  return Z(() => {
12929
12929
  if (m && f && f.length > 0 && r.current) {
12930
- const x = r.current.clientHeight;
12931
- c(x);
12930
+ const M = r.current.clientHeight;
12931
+ _.current = r.current.scrollHeight, v.current = M, c(M);
12932
12932
  }
12933
12933
  }, [m, f]), Z(() => {
12934
12934
  (!f || f.length === 0) && c(0);
12935
12935
  }, [f]), Z(() => {
12936
- m && f && f.length > 0 && I();
12937
- }, [m, I, f]), Z(() => {
12936
+ if (b.current && !p && !m && a > 0 && r.current) {
12937
+ const j = r.current.scrollHeight - _.current, O = Math.max(
12938
+ 0,
12939
+ v.current - j
12940
+ );
12941
+ c(O);
12942
+ }
12943
+ b.current = p;
12944
+ }, [p, m, a]), Z(() => {
12945
+ m && f && f.length > 0 && k();
12946
+ }, [m, k, f]), Z(() => {
12938
12947
  y.current = l === sn ? d + u + Qa + Ru + 15 : 0;
12939
12948
  }, [l, d, u]), /* @__PURE__ */ z(ut, { children: [
12940
- /* @__PURE__ */ z("div", { className: v, ref: r, children: [
12949
+ /* @__PURE__ */ z("div", { className: I, ref: r, children: [
12941
12950
  /* @__PURE__ */ h(
12942
12951
  wd,
12943
12952
  {
12944
- className: E,
12945
- isCapabilitiesSuccess: _,
12946
- capabilities: b
12953
+ className: x,
12954
+ isCapabilitiesSuccess: S,
12955
+ capabilities: E
12947
12956
  }
12948
12957
  ),
12949
12958
  /* @__PURE__ */ h(su, { ref: i }),
@@ -12954,7 +12963,7 @@ const d0 = () => {
12954
12963
  {
12955
12964
  ref: o,
12956
12965
  style: { height: a > 0 ? `${a}px` : void 0 },
12957
- className: U({
12966
+ className: U("av-spacer", {
12958
12967
  "pt-20": f && f.length > 1 && a === 0
12959
12968
  })
12960
12969
  }
@@ -12965,7 +12974,7 @@ const d0 = () => {
12965
12974
  {
12966
12975
  show: !n && l === sn && !m && !p,
12967
12976
  bottom: y.current,
12968
- onClick: S
12977
+ onClick: T
12969
12978
  }
12970
12979
  )
12971
12980
  ] });
@@ -12974,17 +12983,17 @@ function au({
12974
12983
  isComponent: e = !1,
12975
12984
  headerHeight: t = 0
12976
12985
  }) {
12977
- const { user: n, getAccessToken: r } = $e(), [o, s] = B(`${ps}px`), [i, a] = si(), [c, l] = B(ht()), [d, u] = B([]), [g] = et({
12978
- key: Ve + Du,
12986
+ const { user: n, getAccessToken: r } = $e(), [o, s] = H(`${ps}px`), [i, a] = si(), [c, l] = H(ht()), [d, u] = H([]), [g] = et({
12987
+ key: He + Du,
12979
12988
  initialValue: ""
12980
12989
  }), [m] = et({
12981
- key: Ve + ku,
12990
+ key: He + ku,
12982
12991
  initialValue: ms
12983
12992
  }), [p] = et({
12984
- key: Ve + zu,
12993
+ key: He + zu,
12985
12994
  initialValue: on.DESC
12986
12995
  }), [f] = et({
12987
- key: Ve + Fu,
12996
+ key: He + Fu,
12988
12997
  initialValue: on.ASC
12989
12998
  }), [y] = et({
12990
12999
  key: $u,
@@ -13000,8 +13009,8 @@ function au({
13000
13009
  fullScreen: !1,
13001
13010
  themeMode: Ou
13002
13011
  }), []), [v, E] = Dn(_d, _), S = Ae(() => {
13003
- const j = We(), q = Yd();
13004
- return j && q ? "mt-1" : "mt-5";
13012
+ const B = We(), q = Yd();
13013
+ return B && q ? "mt-1" : "mt-5";
13005
13014
  }, []), x = {
13006
13015
  searchString: g,
13007
13016
  sortedCell: m,
@@ -13014,13 +13023,13 @@ function au({
13014
13023
  return p;
13015
13024
  }
13016
13025
  })()
13017
- }, [T, M] = Dn(
13026
+ }, [T, k] = Dn(
13018
13027
  Uv,
13019
13028
  x
13020
- ), [$, V] = Dn(jv, {
13029
+ ), [M, j] = Dn(jv, {
13021
13030
  prompt: "",
13022
13031
  lastTriggeredTimestamp: 0
13023
- }), [P, R] = Dn(Zv, {
13032
+ }), [O, R] = Dn(Zv, {
13024
13033
  provider: "",
13025
13034
  // OpenAI, Anthropic, etc.
13026
13035
  privateChat: !1,
@@ -13078,15 +13087,15 @@ function au({
13078
13087
  });
13079
13088
  }, [L]), Z(() => {
13080
13089
  try {
13081
- const j = sessionStorage.getItem("sw-toggle-pending");
13082
- j && (j === "enabled" ? fr(Ad, { containerId: "toggle-save" }) : j === "disabled" && fr(Rd, {
13090
+ const B = sessionStorage.getItem("sw-toggle-pending");
13091
+ B && (B === "enabled" ? fr(Ad, { containerId: "toggle-save" }) : B === "disabled" && fr(Rd, {
13083
13092
  containerId: "toggle-save"
13084
13093
  }), sessionStorage.removeItem("sw-toggle-pending"));
13085
13094
  } catch {
13086
13095
  }
13087
13096
  }, []), _n(() => {
13088
13097
  if (v.footerPosition === "FOOTER_BOTTOM") {
13089
- const j = S === "mt-1" ? 4 : 20, q = `calc(${a.height}px + ${j}px)`;
13098
+ const B = S === "mt-1" ? 4 : 20, q = `calc(${a.height}px + ${B}px)`;
13090
13099
  s(
13091
13100
  `calc(100svh - ${t}px - ${q} - ${v.footerHeight}px - ${v.footerOffset}px - ${Qa}px)`
13092
13101
  );
@@ -13106,17 +13115,17 @@ function au({
13106
13115
  {
13107
13116
  value: {
13108
13117
  state: T,
13109
- dispatch: M
13118
+ dispatch: k
13110
13119
  },
13111
13120
  children: /* @__PURE__ */ h(En.Provider, { value: { state: v, dispatch: E }, children: /* @__PURE__ */ h(
13112
13121
  Do.Provider,
13113
13122
  {
13114
- value: { state: $, dispatch: V },
13123
+ value: { state: M, dispatch: j },
13115
13124
  children: /* @__PURE__ */ h(
13116
13125
  Le.Provider,
13117
13126
  {
13118
13127
  value: {
13119
- state: P,
13128
+ state: O,
13120
13129
  dispatch: R,
13121
13130
  setChatId: l,
13122
13131
  setInitialMessages: u
@@ -13160,7 +13169,7 @@ function au({
13160
13169
  children: /* @__PURE__ */ h(d0, {})
13161
13170
  }
13162
13171
  ),
13163
- /* @__PURE__ */ h(HS, { isComponent: e })
13172
+ /* @__PURE__ */ h(VS, { isComponent: e })
13164
13173
  ]
13165
13174
  }
13166
13175
  )
@@ -13192,7 +13201,7 @@ export {
13192
13201
  Lb as Toggle,
13193
13202
  _0 as debounce,
13194
13203
  rv as getDefaultExportFromCjs,
13195
- Vt as isProbablyMobile,
13204
+ Ht as isProbablyMobile,
13196
13205
  S0 as numberFormatter,
13197
13206
  C0 as obfuscate,
13198
13207
  E0 as pluralize,