teodor-new-chat-ui 3.0.146 → 3.0.147

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.
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as f from "react";
2
- import q, { useState as ue, useRef as Ke, useCallback as Ue, useEffect as Ze, useReducer as $p, useMemo as ln, createContext as Sl, useContext as Cl, createElement as go, useLayoutEffect as Hp } from "react";
2
+ import q, { useState as ue, useRef as We, useCallback as Ue, useEffect as Xe, useReducer as $p, useMemo as mn, createContext as Sl, useContext as Cl, createElement as go, useLayoutEffect as Hp } from "react";
3
3
  import { Square as zp, Send as Up, X as er, ExternalLink as Wp, Download as Vp, Image as Tl, FileText as Ya, Loader as Gp, ChevronUp as Cr, ChevronDown as Qn, Copy as qa, Edit as Xa, RotateCcw as ci, Bot as Ja, Wrench as Kp, User as Yp, Paperclip as li, ChevronRight as qp, Check as Wi, Circle as Xp, Edit3 as Rl, Loader2 as Jp, Plus as Zp, FileSpreadsheet as Qp, MessageSquarePlus as em, MessageSquare as tm, Calendar as nm, Trash2 as rm, PanelLeft as om, Settings as sm, Server as im, EyeOff as am, Eye as cm, Layout as lm, MessageCircle as um, Save as dm } from "lucide-react";
4
4
  import { Slot as ur, createSlot as sr, createSlottable as fm } from "@radix-ui/react-slot";
5
5
  import { cva as Wr } from "class-variance-authority";
@@ -264,18 +264,18 @@ function gm() {
264
264
  if (bt && xe && typeof bt.stack == "string") {
265
265
  for (var Ie = bt.stack.split(`
266
266
  `), mt = xe.stack.split(`
267
- `), Xe = Ie.length - 1, tt = mt.length - 1; Xe >= 1 && tt >= 0 && Ie[Xe] !== mt[tt]; )
267
+ `), Je = Ie.length - 1, tt = mt.length - 1; Je >= 1 && tt >= 0 && Ie[Je] !== mt[tt]; )
268
268
  tt--;
269
- for (; Xe >= 1 && tt >= 0; Xe--, tt--)
270
- if (Ie[Xe] !== mt[tt]) {
271
- if (Xe !== 1 || tt !== 1)
269
+ for (; Je >= 1 && tt >= 0; Je--, tt--)
270
+ if (Ie[Je] !== mt[tt]) {
271
+ if (Je !== 1 || tt !== 1)
272
272
  do
273
- if (Xe--, tt--, tt < 0 || Ie[Xe] !== mt[tt]) {
273
+ if (Je--, tt--, tt < 0 || Ie[Je] !== mt[tt]) {
274
274
  var kt = `
275
- ` + Ie[Xe].replace(" at new ", " at ");
275
+ ` + Ie[Je].replace(" at new ", " at ");
276
276
  return T.displayName && kt.includes("<anonymous>") && (kt = kt.replace("<anonymous>", T.displayName)), typeof T == "function" && J.set(T, kt), kt;
277
277
  }
278
- while (Xe >= 1 && tt >= 0);
278
+ while (Je >= 1 && tt >= 0);
279
279
  break;
280
280
  }
281
281
  }
@@ -341,8 +341,8 @@ function gm() {
341
341
  throw mt.name = "Invariant Violation", mt;
342
342
  }
343
343
  Ie = T[Pe](z, Pe, xe, ne, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
344
- } catch (Xe) {
345
- Ie = Xe;
344
+ } catch (Je) {
345
+ Ie = Je;
346
346
  }
347
347
  Ie && !(Ie instanceof Error) && (fe(Le), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", xe || "React class", ne, Pe, typeof Ie), fe(null)), Ie instanceof Error && !(Ie.message in Ne) && (Ne[Ie.message] = !0, fe(Le), b("Failed %s type: %s", ne, Ie.message), fe(null));
348
348
  }
@@ -455,9 +455,9 @@ function gm() {
455
455
  for (He in z)
456
456
  ie.call(z, He) && !ae.hasOwnProperty(He) && (Pe[He] = z[He]);
457
457
  if (T && T.defaultProps) {
458
- var Xe = T.defaultProps;
459
- for (He in Xe)
460
- Pe[He] === void 0 && (Pe[He] = Xe[He]);
458
+ var Je = T.defaultProps;
459
+ for (He in Je)
460
+ Pe[He] === void 0 && (Pe[He] = Je[He]);
461
461
  }
462
462
  if (Ie || mt) {
463
463
  var tt = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
@@ -474,8 +474,8 @@ function gm() {
474
474
  } else
475
475
  cn.setExtraStackFrame(null);
476
476
  }
477
- var hn;
478
- hn = !1;
477
+ var fn;
478
+ fn = !1;
479
479
  function te(T) {
480
480
  return typeof T == "object" && T !== null && T.$$typeof === t;
481
481
  }
@@ -556,8 +556,8 @@ Check the top-level render call using <` + ne + ">.");
556
556
  if (ne) {
557
557
  var xe = G(z);
558
558
  Te(ne, T.props, "prop", xe, T);
559
- } else if (z.PropTypes !== void 0 && !hn) {
560
- hn = !0;
559
+ } else if (z.PropTypes !== void 0 && !fn) {
560
+ fn = !0;
561
561
  var Le = G(z);
562
562
  b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Le || "Unknown");
563
563
  }
@@ -585,8 +585,8 @@ Check the top-level render call using <` + ne + ">.");
585
585
  (T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (Ie += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
586
586
  var mt = Oe();
587
587
  mt ? Ie += mt : Ie += le();
588
- var Xe;
589
- T === null ? Xe = "null" : st(T) ? Xe = "array" : T !== void 0 && T.$$typeof === t ? (Xe = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Xe = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Xe, Ie);
588
+ var Je;
589
+ T === null ? Je = "null" : st(T) ? Je = "array" : T !== void 0 && T.$$typeof === t ? (Je = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Je = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Je, Ie);
590
590
  }
591
591
  var tt = ct(T, z, ne, Le, He);
592
592
  if (tt == null)
@@ -2519,7 +2519,7 @@ class Xg {
2519
2519
  }
2520
2520
  const Mn = new Xg();
2521
2521
  function Jg(e = {}) {
2522
- const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = ue(e.token ?? null), s = Ke(e.headers ?? {}), [i, a] = ue(!1), [l, u] = ue(null), [d, h] = ue(""), [m, w] = ue(null), [x, v] = ue(0), [p, g] = ue(!1), b = Ke(null), y = Ke(0), R = Ue((N) => {
2522
+ const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = ue(e.token ?? null), s = We(e.headers ?? {}), [i, a] = ue(!1), [l, u] = ue(null), [d, h] = ue(""), [m, w] = ue(null), [x, v] = ue(0), [p, g] = ue(!1), b = We(null), y = We(0), R = Ue((N) => {
2523
2523
  o(N);
2524
2524
  }, []), S = Ue(() => {
2525
2525
  var N;
@@ -2653,7 +2653,7 @@ function Jg(e = {}) {
2653
2653
  },
2654
2654
  [t, r, e.autoAppendAssistant]
2655
2655
  );
2656
- return Ze(() => () => {
2656
+ return Xe(() => () => {
2657
2657
  var N;
2658
2658
  return (N = b.current) == null ? void 0 : N.abort();
2659
2659
  }, []), {
@@ -2742,7 +2742,7 @@ function tv(e, t) {
2742
2742
  }
2743
2743
  }
2744
2744
  function nv(e = []) {
2745
- const [t, n] = $p(tv, { ...ev, messages: e }), r = Ke([]), o = Ke(null), s = Ke(null), i = Ue(() => {
2745
+ const [t, n] = $p(tv, { ...ev, messages: e }), r = We([]), o = We(null), s = We(null), i = Ue(() => {
2746
2746
  o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
2747
2747
  const d = r.current;
2748
2748
  d.length && (r.current = [], n({ type: "batch", payload: { events: d } }));
@@ -2751,10 +2751,10 @@ function nv(e = []) {
2751
2751
  }, [i]), l = Ue((d) => {
2752
2752
  r.current.push(d), a();
2753
2753
  }, [a]);
2754
- Ze(() => () => {
2754
+ Xe(() => () => {
2755
2755
  o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), r.current = [];
2756
2756
  }, []);
2757
- const u = ln(() => ({
2757
+ const u = mn(() => ({
2758
2758
  reset: (d) => n({ type: "reset", payload: { messages: d } }),
2759
2759
  seed: (d, h) => n({ type: "seed", payload: { messages: d, ...h ?? {} } }),
2760
2760
  prepend: (d) => n({ type: "prepend", payload: { messages: d } }),
@@ -2935,7 +2935,7 @@ async function uv(e, t = [], n, r, o, s) {
2935
2935
  const Jl = Sl(null);
2936
2936
  function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialThreadId: o = null, autoLoadInitial: s = !0, enableFileAgentRouting: i = !1, fileAgentId: a = "invoice_reader" }) {
2937
2937
  const l = Mn;
2938
- Ze(() => {
2938
+ Xe(() => {
2939
2939
  t && l.updateConfig({
2940
2940
  baseUrl: t.baseUrl,
2941
2941
  authToken: t.apiKey
@@ -2950,7 +2950,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2950
2950
  // Ensure the path matches the chat endpoint
2951
2951
  streamPath: "/chat/runs/stream"
2952
2952
  }), [x, v] = ue(() => typeof l.getAuthToken == "function" ? l.getAuthToken() : null);
2953
- Ze(() => {
2953
+ Xe(() => {
2954
2954
  w(typeof l.getAuthToken == "function" ? l.getAuthToken() : null);
2955
2955
  const V = l.onTokenChange((ae) => {
2956
2956
  v(ae), w(ae);
@@ -2961,7 +2961,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2961
2961
  }, [l, w]);
2962
2962
  const p = Ue((V) => {
2963
2963
  l.setAuthToken(V);
2964
- }, [l]), { state: g, seed: b, prepend: y, pushUser: R, onEvent: S, reset: C } = nv(), E = 20, [N, I] = ue(!1), [j, P] = ue(!1), [B, G] = ue(null), [_, Y] = ue(void 0), [U, oe] = ue(void 0), [O, D] = ue(!1), K = Ke(!1), W = Ke([]), ee = Ue((V) => {
2964
+ }, [l]), { state: g, seed: b, prepend: y, pushUser: R, onEvent: S, reset: C } = nv(), E = 20, [N, I] = ue(!1), [j, P] = ue(!1), [B, G] = ue(null), [_, Y] = ue(void 0), [U, oe] = ue(void 0), [O, D] = ue(!1), K = We(!1), W = We([]), ee = Ue((V) => {
2965
2965
  V.cursor !== void 0 && G(V.cursor), V.hasMore !== void 0 && I(V.hasMore), V.checkpointId !== void 0 && Y(V.checkpointId), V.checkpointNs !== void 0 && oe(V.checkpointNs);
2966
2966
  }, []), L = Ue((V, ae) => new Promise(($e, rt) => {
2967
2967
  const we = async () => {
@@ -3038,7 +3038,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3038
3038
  },
3039
3039
  [l.baseUrl]
3040
3040
  );
3041
- Ze(() => {
3041
+ Xe(() => {
3042
3042
  let V = !0;
3043
3043
  if (!l.baseUrl) {
3044
3044
  console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
@@ -3055,11 +3055,11 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3055
3055
  })(), () => {
3056
3056
  V = !1;
3057
3057
  };
3058
- }, [H, l.baseUrl, se]), Ze(() => {
3058
+ }, [H, l.baseUrl, se]), Xe(() => {
3059
3059
  r == null || r(F);
3060
3060
  }, [F, r]);
3061
- const Ae = Ke(null);
3062
- Ze(() => {
3061
+ const Ae = We(null);
3062
+ Xe(() => {
3063
3063
  if (o && s) {
3064
3064
  if (!l.baseUrl) {
3065
3065
  console.debug("[ChatProvider] skipping initial load: api.baseUrl not configured");
@@ -3073,7 +3073,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3073
3073
  }));
3074
3074
  }
3075
3075
  }, [o, s, l.baseUrl, J]);
3076
- const _e = Ke(null), je = Ke(null), ie = Ue(
3076
+ const _e = We(null), je = We(null), ie = Ue(
3077
3077
  async (V, ae, $e) => {
3078
3078
  await L(async () => {
3079
3079
  if (!l.baseUrl) {
@@ -3133,8 +3133,8 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3133
3133
  }, [l, F, Z, L, ee]), fe = Ue(async () => {
3134
3134
  if (!F) throw new Error("No active thread");
3135
3135
  await ie(F);
3136
- }, [F, ie]), Te = Ke(!1);
3137
- Ze(() => {
3136
+ }, [F, ie]), Te = We(!1);
3137
+ Xe(() => {
3138
3138
  const V = Te.current;
3139
3139
  Te.current = u, V && !u && F && L(async () => {
3140
3140
  try {
@@ -3152,7 +3152,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3152
3152
  }, [l, H, F, C]), et = Ue(async (V, ae) => {
3153
3153
  await l.updateThread(V, ae), await H();
3154
3154
  }, [l, H]), xt = Ue(async (V, ae) => {
3155
- var hn;
3155
+ var fn;
3156
3156
  const $e = (ae == null ? void 0 : ae.attachments) || [], { contentParts: rt, filesInfo: we } = await uv(
3157
3157
  l,
3158
3158
  $e,
@@ -3160,7 +3160,7 @@ function wo({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3160
3160
  ), qe = [];
3161
3161
  V && V.trim() && qe.push({ type: "text", text: V.trim() });
3162
3162
  const jt = {
3163
- id: ((hn = crypto.randomUUID) == null ? void 0 : hn.call(crypto)) || `user-${Date.now()}`,
3163
+ id: ((fn = crypto.randomUUID) == null ? void 0 : fn.call(crypto)) || `user-${Date.now()}`,
3164
3164
  role: "user",
3165
3165
  content: qe,
3166
3166
  // ← No empty text parts
@@ -3441,7 +3441,7 @@ function ss(e, t) {
3441
3441
  function vv(e, t) {
3442
3442
  return t(e);
3443
3443
  }
3444
- function Ve(...e) {
3444
+ function Ge(...e) {
3445
3445
  return e;
3446
3446
  }
3447
3447
  function Fe(e, t) {
@@ -3453,7 +3453,7 @@ function Se(e, t) {
3453
3453
  function Xi(e) {
3454
3454
  e(hr);
3455
3455
  }
3456
- function Je(e) {
3456
+ function Ze(e) {
3457
3457
  return e(Ql);
3458
3458
  }
3459
3459
  function de(e, t) {
@@ -3476,7 +3476,7 @@ function Sc(e) {
3476
3476
  function tu(e, t) {
3477
3477
  return e === t;
3478
3478
  }
3479
- function We(e = tu) {
3479
+ function Ve(e = tu) {
3480
3480
  let t;
3481
3481
  return (n) => (r) => {
3482
3482
  e(t, r) || (t = r, n(r));
@@ -3517,7 +3517,7 @@ function Dn(e) {
3517
3517
  e > 0 ? e-- : t(n);
3518
3518
  };
3519
3519
  }
3520
- function un(e) {
3520
+ function ln(e) {
3521
3521
  let t = null, n;
3522
3522
  return (r) => (o) => {
3523
3523
  t = o, !n && (n = setTimeout(() => {
@@ -3641,7 +3641,7 @@ function nt(...e) {
3641
3641
  };
3642
3642
  }
3643
3643
  function me(e, t = tu) {
3644
- return $(e, We(t));
3644
+ return $(e, Ve(t));
3645
3645
  }
3646
3646
  function xi(...e) {
3647
3647
  return function(t, n) {
@@ -3668,7 +3668,7 @@ const Sv = {
3668
3668
  return {
3669
3669
  log: X((t, n, r = 1) => {
3670
3670
  var o;
3671
- const s = (o = Cv().VIRTUOSO_LOG_LEVEL) != null ? o : Je(e);
3671
+ const s = (o = Cv().VIRTUOSO_LOG_LEVEL) != null ? o : Ze(e);
3672
3672
  r >= s && console[Sv[r]](
3673
3673
  "%creact-virtuoso: %c%s %o",
3674
3674
  "color: #0253b3; font-weight: bold",
@@ -4138,12 +4138,12 @@ const Lv = {
4138
4138
  }, rn = Me(
4139
4139
  ([{ log: e }, { recalcInProgress: t }]) => {
4140
4140
  const n = ke(), r = ke(), o = ht(r, 0), s = ke(), i = ke(), a = X(0), l = X([]), u = X(void 0), d = X(void 0), h = X((S, C) => vn(S, Lv[C])), m = X(void 0), w = X(0), x = Iv(), v = ht(
4141
- $(n, Re(l, e, w), Qt(_v, x), We()),
4141
+ $(n, Re(l, e, w), Qt(_v, x), Ve()),
4142
4142
  x
4143
4143
  ), p = ht(
4144
4144
  $(
4145
4145
  l,
4146
- We(),
4146
+ Ve(),
4147
4147
  Qt((S, C) => ({ current: C, prev: S.current }), {
4148
4148
  current: [],
4149
4149
  prev: []
@@ -4192,7 +4192,7 @@ const Lv = {
4192
4192
  de(
4193
4193
  $(
4194
4194
  d,
4195
- ge((S) => S !== void 0 && ze(Je(v).sizeTree)),
4195
+ ge((S) => S !== void 0 && ze(Ze(v).sizeTree)),
4196
4196
  re((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
4197
4197
  ),
4198
4198
  n
@@ -4221,11 +4221,11 @@ const Lv = {
4221
4221
  re((S) => S.diff)
4222
4222
  ),
4223
4223
  (S) => {
4224
- const { groupIndices: C } = Je(v);
4224
+ const { groupIndices: C } = Ze(v);
4225
4225
  if (S > 0)
4226
4226
  Se(t, !0), Se(s, S + Rc(S, C));
4227
4227
  else if (S < 0) {
4228
- const E = Je(p);
4228
+ const E = Ze(p);
4229
4229
  E.length > 0 && (S -= Rc(-S, E)), Se(i, S);
4230
4230
  }
4231
4231
  }
@@ -4317,7 +4317,7 @@ const Lv = {
4317
4317
  if (ze(C.sizeTree))
4318
4318
  return C;
4319
4319
  let N = tr();
4320
- const I = Je(p);
4320
+ const I = Ze(p);
4321
4321
  let j = 0, P = 0, B = 0;
4322
4322
  for (; j < -S; ) {
4323
4323
  B = I[P];
@@ -4368,7 +4368,7 @@ const Lv = {
4368
4368
  unshiftWith: s
4369
4369
  };
4370
4370
  },
4371
- Ve(Sn, Zi),
4371
+ Ge(Sn, Zi),
4372
4372
  { singleton: !0 }
4373
4373
  );
4374
4374
  function Fv(e) {
@@ -4400,27 +4400,27 @@ const fu = Me(
4400
4400
  nt(o, t, r),
4401
4401
  ge(([l, u]) => as(u)),
4402
4402
  re(([l, u, d]) => zt(u.groupOffsetTree, Math.max(l - d, 0), "v")[0]),
4403
- We(),
4403
+ Ve(),
4404
4404
  re((l) => [l])
4405
4405
  ),
4406
4406
  i
4407
4407
  ), { groupCounts: s, topItemsIndexes: i };
4408
4408
  },
4409
- Ve(rn, gt)
4409
+ Ge(rn, gt)
4410
4410
  ), Cn = Me(
4411
4411
  ([{ log: e }]) => {
4412
4412
  const t = X(!1), n = Nt(
4413
4413
  $(
4414
4414
  t,
4415
4415
  ge((r) => r),
4416
- We()
4416
+ Ve()
4417
4417
  )
4418
4418
  );
4419
4419
  return Fe(t, (r) => {
4420
- r && Je(e)("props updated", {}, St.DEBUG);
4420
+ r && Ze(e)("props updated", {}, St.DEBUG);
4421
4421
  }), { didMount: n, propsReady: t };
4422
4422
  },
4423
- Ve(Sn),
4423
+ Ge(Sn),
4424
4424
  { singleton: !0 }
4425
4425
  ), Bv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4426
4426
  function hu(e) {
@@ -4487,7 +4487,7 @@ const qr = Me(
4487
4487
  topListHeight: v
4488
4488
  };
4489
4489
  },
4490
- Ve(rn, gt, Sn),
4490
+ Ge(rn, gt, Sn),
4491
4491
  { singleton: !0 }
4492
4492
  );
4493
4493
  function $v(e) {
@@ -4550,7 +4550,7 @@ const Xr = Me(
4550
4550
  scrolledToInitialItem: a
4551
4551
  };
4552
4552
  },
4553
- Ve(rn, gt, qr, Cn),
4553
+ Ge(rn, gt, qr, Cn),
4554
4554
  { singleton: !0 }
4555
4555
  );
4556
4556
  function pu(e, t) {
@@ -4569,21 +4569,21 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4569
4569
  const i = X(!1), a = X(!0), l = ke(), u = ke(), d = X(4), h = X(Uv), m = ht(
4570
4570
  $(
4571
4571
  xi($(me(o), Dn(1), Jt(!0)), $(me(o), Dn(1), Jt(!1), Sc(100))),
4572
- We()
4572
+ Ve()
4573
4573
  ),
4574
4574
  !1
4575
4575
  ), w = ht(
4576
- $(xi($(n, Jt(!0)), $(n, Jt(!1), Sc(200))), We()),
4576
+ $(xi($(n, Jt(!0)), $(n, Jt(!1), Sc(200))), Ve()),
4577
4577
  !1
4578
4578
  );
4579
4579
  de(
4580
4580
  $(
4581
4581
  nt(me(o), me(h)),
4582
4582
  re(([b, y]) => b <= y),
4583
- We()
4583
+ Ve()
4584
4584
  ),
4585
4585
  a
4586
- ), de($(a, un(50)), u);
4586
+ ), de($(a, ln(50)), u);
4587
4587
  const x = Nt(
4588
4588
  $(
4589
4589
  nt(r, me(s), me(t), me(e), me(d)),
@@ -4609,7 +4609,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4609
4609
  state: j
4610
4610
  };
4611
4611
  }, zv),
4612
- We((b, y) => b && b.atBottom === y.atBottom)
4612
+ Ve((b, y) => b && b.atBottom === y.atBottom)
4613
4613
  )
4614
4614
  ), v = ht(
4615
4615
  $(
@@ -4651,21 +4651,21 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4651
4651
  re((b) => b.atBottom)
4652
4652
  ),
4653
4653
  i
4654
- ), de($(i, un(50)), l);
4654
+ ), de($(i, ln(50)), l);
4655
4655
  const p = X(Nr);
4656
4656
  de(
4657
4657
  $(
4658
4658
  r,
4659
4659
  re(({ scrollTop: b }) => b),
4660
- We(),
4660
+ Ve(),
4661
4661
  Qt(
4662
- (b, y) => Je(w) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? Lr : Nr, prevScrollTop: y },
4662
+ (b, y) => Ze(w) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? Lr : Nr, prevScrollTop: y },
4663
4663
  { direction: Nr, prevScrollTop: 0 }
4664
4664
  ),
4665
4665
  re((b) => b.direction)
4666
4666
  ),
4667
4667
  p
4668
- ), de($(r, un(50), Jt(Hv)), p);
4668
+ ), de($(r, ln(50), Jt(Hv)), p);
4669
4669
  const g = X(0);
4670
4670
  return de(
4671
4671
  $(
@@ -4677,7 +4677,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4677
4677
  ), de(
4678
4678
  $(
4679
4679
  o,
4680
- un(100),
4680
+ ln(100),
4681
4681
  Re(m),
4682
4682
  ge(([b, y]) => !!y),
4683
4683
  Qt(([b, y], [R]) => [y, R], [0, 0]),
@@ -4697,7 +4697,7 @@ const Lr = "up", Nr = "down", Hv = "none", zv = {
4697
4697
  scrollDirection: p,
4698
4698
  scrollVelocity: g
4699
4699
  };
4700
- }, Ve(gt)), Fo = "top", Bo = "bottom", Ec = "none";
4700
+ }, Ge(gt)), Fo = "top", Bo = "bottom", Ec = "none";
4701
4701
  function Nc(e, t, n) {
4702
4702
  return typeof e == "number" ? n === Lr && t === Fo || n === Nr && t === Bo ? e : 0 : n === Lr ? t === Fo ? e.main : e.reverse : t === Bo ? e.main : e.reverse;
4703
4703
  }
@@ -4742,7 +4742,7 @@ const na = Me(
4742
4742
  }
4743
4743
  ),
4744
4744
  ge((d) => d != null),
4745
- We(Mr)
4745
+ Ve(Mr)
4746
4746
  ),
4747
4747
  [0, 0]
4748
4748
  );
@@ -4756,7 +4756,7 @@ const na = Me(
4756
4756
  visibleRange: u
4757
4757
  };
4758
4758
  },
4759
- Ve(gt),
4759
+ Ge(gt),
4760
4760
  { singleton: !0 }
4761
4761
  );
4762
4762
  function Wv(e, t, n) {
@@ -4889,7 +4889,7 @@ const zn = Me(
4889
4889
  _,
4890
4890
  Y
4891
4891
  ]) => {
4892
- const U = I, { offsetTree: oe, sizeTree: O } = U, D = Je(p);
4892
+ const U = I, { offsetTree: oe, sizeTree: O } = U, D = Ze(p);
4893
4893
  if (N === 0)
4894
4894
  return { ...zs, totalCount: N };
4895
4895
  if (C === 0 && E === 0)
@@ -4939,7 +4939,7 @@ const zn = Me(
4939
4939
  ),
4940
4940
  //@ts-expect-error filter needs to be fixed
4941
4941
  ge((C) => C !== null),
4942
- We()
4942
+ Ve()
4943
4943
  ),
4944
4944
  zs
4945
4945
  );
@@ -4976,16 +4976,16 @@ const zn = Me(
4976
4976
  Re(o, e),
4977
4977
  ge(([{ items: C }, E]) => C[C.length - 1].originalIndex === E - 1),
4978
4978
  re(([, C, E]) => [C - 1, E]),
4979
- We(Mr),
4979
+ Ve(Mr),
4980
4980
  re(([C]) => C)
4981
4981
  )
4982
4982
  ), R = Nt(
4983
4983
  $(
4984
4984
  b,
4985
- un(200),
4985
+ ln(200),
4986
4986
  ge(({ items: C, topItems: E }) => C.length > 0 && C[0].originalIndex === E.length),
4987
4987
  re(({ items: C }) => C[0].index),
4988
- We()
4988
+ Ve()
4989
4989
  )
4990
4990
  ), S = Nt(
4991
4991
  $(
@@ -5002,12 +5002,12 @@ const zn = Me(
5002
5002
  startIndex: C[E].index
5003
5003
  };
5004
5004
  }),
5005
- We(cu)
5005
+ Ve(cu)
5006
5006
  )
5007
5007
  );
5008
5008
  return { endReached: y, initialItemCount: p, itemsRendered: g, listState: b, rangeChanged: S, startReached: R, topItemsIndexes: v, ...m };
5009
5009
  },
5010
- Ve(
5010
+ Ge(
5011
5011
  rn,
5012
5012
  fu,
5013
5013
  na,
@@ -5029,7 +5029,7 @@ const zn = Me(
5029
5029
  );
5030
5030
  return de(me(i), s), { totalListHeight: i, totalListHeightChanged: s };
5031
5031
  },
5032
- Ve(gt, zn),
5032
+ Ge(gt, zn),
5033
5033
  { singleton: !0 }
5034
5034
  ), Vv = Me(
5035
5035
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
@@ -5038,14 +5038,14 @@ const zn = Me(
5038
5038
  nt(n, e, t),
5039
5039
  ge(([o]) => o),
5040
5040
  re(([, o, s]) => Math.max(0, o - s)),
5041
- un(0),
5042
- We()
5041
+ ln(0),
5042
+ Ve()
5043
5043
  ),
5044
5044
  0
5045
5045
  );
5046
5046
  return { alignToBottom: n, paddingTopAddition: r };
5047
5047
  },
5048
- Ve(gt, gu),
5048
+ Ge(gt, gu),
5049
5049
  { singleton: !0 }
5050
5050
  ), vu = Me(() => ({
5051
5051
  context: X(null)
@@ -5081,7 +5081,7 @@ const zn = Me(
5081
5081
  ge((Y) => !Y),
5082
5082
  // skips the initial publish of false, and the cleanup call.
5083
5083
  // but if scrollingInProgress is true, we skip the initial publish.
5084
- Dn(Je(i) ? 1 : 2)
5084
+ Dn(Ze(i) ? 1 : 2)
5085
5085
  ),
5086
5086
  E
5087
5087
  ) : E && E(), _;
@@ -5093,7 +5093,7 @@ const zn = Me(
5093
5093
  scrollIntoView: d
5094
5094
  };
5095
5095
  },
5096
- Ve(rn, gt, qr, zn, Sn),
5096
+ Ge(rn, gt, qr, zn, Sn),
5097
5097
  { singleton: !0 }
5098
5098
  );
5099
5099
  function kc(e) {
@@ -5131,16 +5131,16 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5131
5131
  ge(({ shouldFollow: S }) => S)
5132
5132
  ),
5133
5133
  ({ followOutputBehavior: S, totalCount: C }) => {
5134
- p && (p(), p = null), Je(n) ? requestAnimationFrame(() => {
5135
- Je(d)("following output to ", { totalCount: C }, St.DEBUG), g(S);
5134
+ p && (p(), p = null), Ze(n) ? requestAnimationFrame(() => {
5135
+ Ze(d)("following output to ", { totalCount: C }, St.DEBUG), g(S);
5136
5136
  }) : p = $t(e, () => {
5137
- Je(d)("following output to ", { totalCount: C }, St.DEBUG), g(S), p = null;
5137
+ Ze(d)("following output to ", { totalCount: C }, St.DEBUG), g(S), p = null;
5138
5138
  });
5139
5139
  }
5140
5140
  );
5141
5141
  function b(S) {
5142
5142
  const C = $t(o, (E) => {
5143
- S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !p && (Je(d)("scrolling to bottom due to increased size", {}, St.DEBUG), g("auto"));
5143
+ S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !p && (Ze(d)("scrolling to bottom due to increased size", {}, St.DEBUG), g("auto"));
5144
5144
  });
5145
5145
  setTimeout(C, 100);
5146
5146
  }
@@ -5156,10 +5156,10 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5156
5156
  Re(x, t)
5157
5157
  ),
5158
5158
  ([, S]) => {
5159
- Je(a) && b(S !== !1);
5159
+ Ze(a) && b(S !== !1);
5160
5160
  }
5161
5161
  ), Fe(v, () => {
5162
- b(Je(x) !== !1);
5162
+ b(Ze(x) !== !1);
5163
5163
  }), Fe(nt(me(x), o), ([S, C]) => {
5164
5164
  S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && g("auto");
5165
5165
  });
@@ -5182,18 +5182,18 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5182
5182
  Re(me(y), a, h, m),
5183
5183
  re(([[S, C], E, N, I, j]) => C && N && (E == null ? void 0 : E({ context: j, totalCount: S, scrollingInProgress: I }))),
5184
5184
  ge((S) => !!S),
5185
- un(0)
5185
+ ln(0)
5186
5186
  ),
5187
5187
  (S) => {
5188
- p && (p(), p = null), Je(n) ? requestAnimationFrame(() => {
5189
- Je(d)("scrolling into view", {}), Se(w, S);
5188
+ p && (p(), p = null), Ze(n) ? requestAnimationFrame(() => {
5189
+ Ze(d)("scrolling into view", {}), Se(w, S);
5190
5190
  }) : p = $t(e, () => {
5191
- Je(d)("scrolling into view", {}), Se(w, S), p = null;
5191
+ Ze(d)("scrolling into view", {}), Se(w, S), p = null;
5192
5192
  });
5193
5193
  }
5194
5194
  ), { autoscrollToBottom: v, followOutput: x, scrollIntoViewOnChange: y };
5195
5195
  },
5196
- Ve(
5196
+ Ge(
5197
5197
  rn,
5198
5198
  Jr,
5199
5199
  qr,
@@ -5215,7 +5215,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5215
5215
  ),
5216
5216
  i
5217
5217
  ), {}),
5218
- Ve(rn, Xr, zn, Cn),
5218
+ Ge(rn, Xr, zn, Cn),
5219
5219
  { singleton: !0 }
5220
5220
  ), Xv = Me(
5221
5221
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
@@ -5245,7 +5245,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5245
5245
  initialScrollTop: r
5246
5246
  };
5247
5247
  },
5248
- Ve(Cn, gt, zn),
5248
+ Ge(Cn, gt, zn),
5249
5249
  { singleton: !0 }
5250
5250
  ), bu = Me(
5251
5251
  ([{ scrollVelocity: e }]) => {
@@ -5264,7 +5264,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5264
5264
  return !0;
5265
5265
  return i;
5266
5266
  }),
5267
- We()
5267
+ Ve()
5268
5268
  ),
5269
5269
  t
5270
5270
  ), Fe(
@@ -5274,7 +5274,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5274
5274
  }
5275
5275
  ), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
5276
5276
  },
5277
- Ve(Jr),
5277
+ Ge(Jr),
5278
5278
  { singleton: !0 }
5279
5279
  ), ra = Me(([{ scrollContainerState: e, scrollTo: t }]) => {
5280
5280
  const n = ke(), r = ke(), o = ke(), s = X(!1), i = X(void 0);
@@ -5308,7 +5308,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5308
5308
  windowScrollTo: o,
5309
5309
  windowViewportRect: r
5310
5310
  };
5311
- }, Ve(gt)), Jv = Me(
5311
+ }, Ge(gt)), Jv = Me(
5312
5312
  ([
5313
5313
  { sizeRanges: e, sizes: t },
5314
5314
  { headerHeight: n, scrollTop: r },
@@ -5331,7 +5331,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5331
5331
  s,
5332
5332
  Re(d),
5333
5333
  ge(([, w]) => w !== void 0),
5334
- We(),
5334
+ Ve(),
5335
5335
  re(([, w]) => w.ranges)
5336
5336
  ),
5337
5337
  e
@@ -5340,7 +5340,7 @@ const Kv = (e, t) => typeof e == "function" ? kc(e(t)) : t && kc(e), Yv = Me(
5340
5340
  restoreStateFrom: d
5341
5341
  };
5342
5342
  },
5343
- Ve(rn, gt, Xr, Cn, ra)
5343
+ Ge(rn, gt, Xr, Cn, ra)
5344
5344
  );
5345
5345
  function Zv(e) {
5346
5346
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -5355,7 +5355,7 @@ const Qv = Me(([{ topItemsIndexes: e }]) => {
5355
5355
  ),
5356
5356
  e
5357
5357
  ), { topItemCount: t };
5358
- }, Ve(zn));
5358
+ }, Ge(zn));
5359
5359
  function wu(e) {
5360
5360
  let t = !1, n;
5361
5361
  return () => (t || (t = !0, n = e()), n);
@@ -5397,7 +5397,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5397
5397
  nt(ht(s, !1), e, x),
5398
5398
  ge(([g, b, y]) => !g && !y && b !== 0),
5399
5399
  re(([g, b]) => b),
5400
- un(1)
5400
+ ln(1)
5401
5401
  ),
5402
5402
  p
5403
5403
  ), de(
@@ -5438,7 +5438,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5438
5438
  }
5439
5439
  ), { deviation: e };
5440
5440
  },
5441
- Ve(gt, Jr, zn, rn, Sn, Zi)
5441
+ Ge(gt, Jr, zn, rn, Sn, Zi)
5442
5442
  ), nx = Me(
5443
5443
  ([
5444
5444
  e,
@@ -5465,7 +5465,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5465
5465
  ...u,
5466
5466
  ...d
5467
5467
  }),
5468
- Ve(
5468
+ Ge(
5469
5469
  na,
5470
5470
  qv,
5471
5471
  Cn,
@@ -5541,7 +5541,7 @@ const ex = wu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5541
5541
  sizes: l,
5542
5542
  ...p
5543
5543
  }),
5544
- Ve(
5544
+ Ge(
5545
5545
  rn,
5546
5546
  Xr,
5547
5547
  gt,
@@ -5620,11 +5620,11 @@ function Su(e, t, n) {
5620
5620
  );
5621
5621
  return q.useSyncExternalStore(
5622
5622
  b,
5623
- () => Je(g),
5624
- () => Je(g)
5623
+ () => Ze(g),
5624
+ () => Ze(g)
5625
5625
  );
5626
5626
  }, x = (p) => {
5627
- const g = q.useContext(a)[p], [b, y] = q.useState(yc(Je, g));
5627
+ const g = q.useContext(a)[p], [b, y] = q.useState(yc(Ze, g));
5628
5628
  return io(
5629
5629
  () => Fe(g, (R) => {
5630
5630
  R !== b && y(wc(R));
@@ -5714,7 +5714,7 @@ const sx = /* @__PURE__ */ Me(() => {
5714
5714
  $(
5715
5715
  n,
5716
5716
  re((u) => u[a]),
5717
- We()
5717
+ Ve()
5718
5718
  ),
5719
5719
  l
5720
5720
  );
@@ -5737,7 +5737,7 @@ const sx = /* @__PURE__ */ Me(() => {
5737
5737
  };
5738
5738
  }), ix = /* @__PURE__ */ Me(
5739
5739
  ([e, t]) => ({ ...e, ...t }),
5740
- Ve(yu, sx)
5740
+ Ge(yu, sx)
5741
5741
  ), ax = ({ height: e }) => /* @__PURE__ */ c.jsx("div", { style: { height: e } }), cx = { overflowAnchor: "none", position: oa(), zIndex: 1 }, Nu = { overflowAnchor: "none" }, lx = { ...Nu, display: "inline-block", height: "100%" }, Pc = /* @__PURE__ */ q.memo(function({ showTopList: e = !1 }) {
5742
5742
  const t = be("listState"), n = _t("sizeRanges"), r = be("useWindowScroll"), o = be("customScrollParent"), s = _t("windowScrollContainerState"), i = _t("scrollContainerState"), a = o || r ? s : i, l = be("itemContent"), u = be("context"), d = be("groupContent"), h = be("trackItemSizes"), m = be("itemSize"), w = be("log"), x = _t("gap"), v = be("horizontalDirection"), { callbackRef: p } = Tv(
5743
5743
  n,
@@ -6027,7 +6027,7 @@ const gx = ({ children: e }) => {
6027
6027
  $(
6028
6028
  s,
6029
6029
  re((h) => h[u]),
6030
- We()
6030
+ Ve()
6031
6031
  ),
6032
6032
  d
6033
6033
  );
@@ -6052,7 +6052,7 @@ const gx = ({ children: e }) => {
6052
6052
  GroupComponent: l("Group", "tr")
6053
6053
  };
6054
6054
  });
6055
- Ve(yu, Tx);
6055
+ Ge(yu, Tx);
6056
6056
  oa();
6057
6057
  const _c = {
6058
6058
  bottom: 0,
@@ -6217,7 +6217,7 @@ const Ix = /* @__PURE__ */ Me(
6217
6217
  const { bottom: se, top: Ae } = Lc(A, ce, H, J);
6218
6218
  return [Ae, se];
6219
6219
  }),
6220
- We(Mr)
6220
+ Ve(Mr)
6221
6221
  ),
6222
6222
  t
6223
6223
  );
@@ -6240,14 +6240,14 @@ const Ix = /* @__PURE__ */ Me(
6240
6240
  return (J || A.bottom > 0 && A.itemHeight > 0 && A.offsetBottom === 0 && A.items.length === H) && ce;
6241
6241
  }),
6242
6242
  re(([[, A]]) => A - 1),
6243
- We()
6243
+ Ve()
6244
6244
  )
6245
6245
  ), pe = Nt(
6246
6246
  $(
6247
6247
  me(N),
6248
6248
  ge(({ items: A }) => A.length > 0 && A[0].index === 0),
6249
6249
  Jt(0),
6250
- We()
6250
+ Ve()
6251
6251
  )
6252
6252
  ), he = Nt(
6253
6253
  $(
@@ -6258,8 +6258,8 @@ const Ix = /* @__PURE__ */ Me(
6258
6258
  endIndex: A[A.length - 1].index,
6259
6259
  startIndex: A[0].index
6260
6260
  })),
6261
- We(cu),
6262
- un(0)
6261
+ Ve(cu),
6262
+ ln(0)
6263
6263
  )
6264
6264
  );
6265
6265
  de(he, w.scrollSeekRangeChanged), de(
@@ -6331,7 +6331,7 @@ const Ix = /* @__PURE__ */ Me(
6331
6331
  ...S
6332
6332
  };
6333
6333
  },
6334
- Ve(na, gt, Jr, bu, Cn, ra, Sn)
6334
+ Ge(na, gt, Jr, bu, Cn, ra, Sn)
6335
6335
  );
6336
6336
  function ku(e, t, n) {
6337
6337
  return Ir(1, $o((e + n) / ($o(t) + n)));
@@ -6352,7 +6352,7 @@ const jx = /* @__PURE__ */ Me(() => {
6352
6352
  $(
6353
6353
  t,
6354
6354
  re((w) => w[h]),
6355
- We()
6355
+ Ve()
6356
6356
  ),
6357
6357
  m
6358
6358
  ), u = X(!1), d = X(!1);
@@ -6376,9 +6376,9 @@ const jx = /* @__PURE__ */ Me(() => {
6376
6376
  };
6377
6377
  }), kx = /* @__PURE__ */ Me(
6378
6378
  ([e, t]) => ({ ...e, ...t }),
6379
- Ve(Ix, jx)
6379
+ Ge(Ix, jx)
6380
6380
  ), Ax = /* @__PURE__ */ q.memo(function() {
6381
- const e = Ge("gridState"), t = Ge("listClassName"), n = Ge("itemClassName"), r = Ge("itemContent"), o = Ge("computeItemKey"), s = Ge("isSeeking"), i = Ot("scrollHeight"), a = Ge("ItemComponent"), l = Ge("ListComponent"), u = Ge("ScrollSeekPlaceholder"), d = Ge("context"), h = Ot("itemDimensions"), m = Ot("gap"), w = Ge("log"), x = Ge("stateRestoreInProgress"), v = Ot("reportReadyState"), p = Hn(
6381
+ const e = Ke("gridState"), t = Ke("listClassName"), n = Ke("itemClassName"), r = Ke("itemContent"), o = Ke("computeItemKey"), s = Ke("isSeeking"), i = Ot("scrollHeight"), a = Ke("ItemComponent"), l = Ke("ListComponent"), u = Ke("ScrollSeekPlaceholder"), d = Ke("context"), h = Ot("itemDimensions"), m = Ot("gap"), w = Ke("log"), x = Ke("stateRestoreInProgress"), v = Ot("reportReadyState"), p = Hn(
6382
6382
  q.useMemo(
6383
6383
  () => (g) => {
6384
6384
  const b = g.parentElement.parentElement.scrollHeight;
@@ -6433,7 +6433,7 @@ const jx = /* @__PURE__ */ Me(() => {
6433
6433
  }
6434
6434
  );
6435
6435
  }), Px = q.memo(function() {
6436
- const e = Ge("HeaderComponent"), t = Ot("headerHeight"), n = Ge("headerFooterTag"), r = Hn(
6436
+ const e = Ke("HeaderComponent"), t = Ot("headerHeight"), n = Ke("headerFooterTag"), r = Hn(
6437
6437
  q.useMemo(
6438
6438
  () => (s) => {
6439
6439
  t(vn(s, "height"));
@@ -6442,10 +6442,10 @@ const jx = /* @__PURE__ */ Me(() => {
6442
6442
  ),
6443
6443
  !0,
6444
6444
  !1
6445
- ), o = Ge("context");
6445
+ ), o = Ke("context");
6446
6446
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...ft(e, o) }) }) : null;
6447
6447
  }), _x = q.memo(function() {
6448
- const e = Ge("FooterComponent"), t = Ot("footerHeight"), n = Ge("headerFooterTag"), r = Hn(
6448
+ const e = Ke("FooterComponent"), t = Ot("footerHeight"), n = Ke("headerFooterTag"), r = Hn(
6449
6449
  q.useMemo(
6450
6450
  () => (s) => {
6451
6451
  t(vn(s, "height"));
@@ -6454,7 +6454,7 @@ const jx = /* @__PURE__ */ Me(() => {
6454
6454
  ),
6455
6455
  !0,
6456
6456
  !1
6457
- ), o = Ge("context");
6457
+ ), o = Ke("context");
6458
6458
  return e ? /* @__PURE__ */ c.jsx(n, { ref: r, children: /* @__PURE__ */ c.jsx(e, { ...ft(e, o) }) }) : null;
6459
6459
  }), Ox = ({ children: e }) => {
6460
6460
  const t = q.useContext(Tu), n = Ot("itemDimensions"), r = Ot("viewportDimensions"), o = Hn(
@@ -6471,12 +6471,12 @@ const jx = /* @__PURE__ */ Me(() => {
6471
6471
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
6472
6472
  }, [t, r, n]), /* @__PURE__ */ c.jsx("div", { ref: o, style: cs(!1), children: e });
6473
6473
  }, Mx = ({ children: e }) => {
6474
- const t = q.useContext(Tu), n = Ot("windowViewportRect"), r = Ot("itemDimensions"), o = Ge("customScrollParent"), s = nu(n, o, !1);
6474
+ const t = q.useContext(Tu), n = Ot("windowViewportRect"), r = Ot("itemDimensions"), o = Ke("customScrollParent"), s = nu(n, o, !1);
6475
6475
  return q.useEffect(() => {
6476
6476
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
6477
6477
  }, [t, n, r]), /* @__PURE__ */ c.jsx("div", { ref: s, style: cs(!1), children: e });
6478
6478
  }, Dx = /* @__PURE__ */ q.memo(function({ ...e }) {
6479
- const t = Ge("useWindowScroll"), n = Ge("customScrollParent"), r = n || t ? Fx : Lx, o = n || t ? Mx : Ox, s = Ge("context");
6479
+ const t = Ke("useWindowScroll"), n = Ke("customScrollParent"), r = n || t ? Fx : Lx, o = n || t ? Mx : Ox, s = Ke("context");
6480
6480
  return /* @__PURE__ */ c.jsx(r, { ...e, ...ft(r, s), children: /* @__PURE__ */ c.jsxs(o, { children: [
6481
6481
  /* @__PURE__ */ c.jsx(Px, {}),
6482
6482
  /* @__PURE__ */ c.jsx(Ax, {}),
@@ -6484,7 +6484,7 @@ const jx = /* @__PURE__ */ Me(() => {
6484
6484
  ] }) });
6485
6485
  }), {
6486
6486
  useEmitter: Au,
6487
- useEmitterValue: Ge,
6487
+ useEmitterValue: Ke,
6488
6488
  usePublisher: Ot
6489
6489
  } = /* @__PURE__ */ Su(
6490
6490
  kx,
@@ -6527,7 +6527,7 @@ const jx = /* @__PURE__ */ Me(() => {
6527
6527
  }
6528
6528
  },
6529
6529
  Dx
6530
- ), Lx = /* @__PURE__ */ Iu({ useEmitter: Au, useEmitterValue: Ge, usePublisher: Ot }), Fx = /* @__PURE__ */ ju({ useEmitter: Au, useEmitterValue: Ge, usePublisher: Ot });
6530
+ ), Lx = /* @__PURE__ */ Iu({ useEmitter: Au, useEmitterValue: Ke, usePublisher: Ot }), Fx = /* @__PURE__ */ ju({ useEmitter: Au, useEmitterValue: Ke, usePublisher: Ot });
6531
6531
  function Fc(e, t, n) {
6532
6532
  return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, St.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
6533
6533
  }
@@ -7038,8 +7038,8 @@ function lb(e, t = !1) {
7038
7038
  return `${e.length}:${n}:${r}`;
7039
7039
  }
7040
7040
  function ub(e, t) {
7041
- const [n, r] = ue(e), o = Ke(e), s = Ke(null);
7042
- return Ze(() => {
7041
+ const [n, r] = ue(e), o = We(e), s = We(null);
7042
+ return Xe(() => {
7043
7043
  if (!t) {
7044
7044
  r(e);
7045
7045
  return;
@@ -7066,8 +7066,8 @@ function Ks({
7066
7066
  const a = ub(e, r), l = lb(a, r), [u, d] = ue(() => {
7067
7067
  var x;
7068
7068
  return ((x = Sr.get(l)) == null ? void 0 : x.html) ?? null;
7069
- }), h = Ke(null), m = Ke([]);
7070
- Ze(() => {
7069
+ }), h = We(null), m = We([]);
7070
+ Xe(() => {
7071
7071
  m.current = [];
7072
7072
  const x = Sr.get(l);
7073
7073
  if (x && x.source === a) {
@@ -7460,15 +7460,15 @@ var Xs = "focusScope.autoFocusOnMount", Js = "focusScope.autoFocusOnUnmount", Yc
7460
7460
  let v = function(y) {
7461
7461
  if (w.paused || !a) return;
7462
7462
  const R = y.target;
7463
- a.contains(R) ? h.current = R : pn(h.current, { select: !0 });
7463
+ a.contains(R) ? h.current = R : hn(h.current, { select: !0 });
7464
7464
  }, p = function(y) {
7465
7465
  if (w.paused || !a) return;
7466
7466
  const R = y.relatedTarget;
7467
- R !== null && (a.contains(R) || pn(h.current, { select: !0 }));
7467
+ R !== null && (a.contains(R) || hn(h.current, { select: !0 }));
7468
7468
  }, g = function(y) {
7469
7469
  if (document.activeElement === document.body)
7470
7470
  for (const S of y)
7471
- S.removedNodes.length > 0 && pn(a);
7471
+ S.removedNodes.length > 0 && hn(a);
7472
7472
  };
7473
7473
  document.addEventListener("focusin", v), document.addEventListener("focusout", p);
7474
7474
  const b = new MutationObserver(g);
@@ -7482,12 +7482,12 @@ var Xs = "focusScope.autoFocusOnMount", Js = "focusScope.autoFocusOnUnmount", Yc
7482
7482
  const v = document.activeElement;
7483
7483
  if (!a.contains(v)) {
7484
7484
  const g = new CustomEvent(Xs, Yc);
7485
- a.addEventListener(Xs, u), a.dispatchEvent(g), g.defaultPrevented || (Eb(Ab(zu(a)), { select: !0 }), document.activeElement === v && pn(a));
7485
+ a.addEventListener(Xs, u), a.dispatchEvent(g), g.defaultPrevented || (Eb(Ab(zu(a)), { select: !0 }), document.activeElement === v && hn(a));
7486
7486
  }
7487
7487
  return () => {
7488
7488
  a.removeEventListener(Xs, u), setTimeout(() => {
7489
7489
  const g = new CustomEvent(Js, Yc);
7490
- a.addEventListener(Js, d), a.dispatchEvent(g), g.defaultPrevented || pn(v ?? document.body, { select: !0 }), a.removeEventListener(Js, d), Xc.remove(w);
7490
+ a.addEventListener(Js, d), a.dispatchEvent(g), g.defaultPrevented || hn(v ?? document.body, { select: !0 }), a.removeEventListener(Js, d), Xc.remove(w);
7491
7491
  }, 0);
7492
7492
  };
7493
7493
  }
@@ -7498,7 +7498,7 @@ var Xs = "focusScope.autoFocusOnMount", Js = "focusScope.autoFocusOnUnmount", Yc
7498
7498
  const p = v.key === "Tab" && !v.altKey && !v.ctrlKey && !v.metaKey, g = document.activeElement;
7499
7499
  if (p && g) {
7500
7500
  const b = v.currentTarget, [y, R] = Nb(b);
7501
- y && R ? !v.shiftKey && g === R ? (v.preventDefault(), n && pn(y, { select: !0 })) : v.shiftKey && g === y && (v.preventDefault(), n && pn(R, { select: !0 })) : g === b && v.preventDefault();
7501
+ y && R ? !v.shiftKey && g === R ? (v.preventDefault(), n && hn(y, { select: !0 })) : v.shiftKey && g === y && (v.preventDefault(), n && hn(R, { select: !0 })) : g === b && v.preventDefault();
7502
7502
  }
7503
7503
  },
7504
7504
  [n, r, w.paused]
@@ -7509,7 +7509,7 @@ us.displayName = Rb;
7509
7509
  function Eb(e, { select: t = !1 } = {}) {
7510
7510
  const n = document.activeElement;
7511
7511
  for (const r of e)
7512
- if (pn(r, { select: t }), document.activeElement !== n) return;
7512
+ if (hn(r, { select: t }), document.activeElement !== n) return;
7513
7513
  }
7514
7514
  function Nb(e) {
7515
7515
  const t = zu(e), n = qc(t, e), r = qc(t.reverse(), e);
@@ -7541,7 +7541,7 @@ function Ib(e, { upTo: t }) {
7541
7541
  function jb(e) {
7542
7542
  return e instanceof HTMLInputElement && "select" in e;
7543
7543
  }
7544
- function pn(e, { select: t = !1 } = {}) {
7544
+ function hn(e, { select: t = !1 } = {}) {
7545
7545
  if (e && e.focus) {
7546
7546
  const n = document.activeElement;
7547
7547
  e.focus({ preventScroll: !0 }), e !== n && jb(e) && t && e.select();
@@ -8424,7 +8424,7 @@ const kw = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
8424
8424
  kw.displayName = vs.displayName;
8425
8425
  function Aw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8426
8426
  const [s, i] = ue(!1), [a, l] = ue(null), [u, d] = ue(null), { toast: h } = ha();
8427
- Ze(() => {
8427
+ Xe(() => {
8428
8428
  e && n && m();
8429
8429
  }, [e, n]);
8430
8430
  const m = async () => {
@@ -8533,7 +8533,7 @@ function Aw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8533
8533
  const No = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
8534
8534
  function Pw({ className: e }) {
8535
8535
  const [t, n] = ue(0);
8536
- return Ze(() => {
8536
+ return Xe(() => {
8537
8537
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
8538
8538
  return () => clearInterval(r);
8539
8539
  }, []), /* @__PURE__ */ c.jsxs(
@@ -8584,7 +8584,7 @@ const _w = q.memo(function({
8584
8584
  default:
8585
8585
  return "text-[hsl(var(--chat-bubble-ai-text))]";
8586
8586
  }
8587
- }, [D]), ee = ln(() => Ow(t.content), [t.content]), L = ln(() => Bw(t.content), [t.content]), Z = ln(() => t.content.filter((ie) => ie.type === "image_url"), [t.content]), pe = ln(() => t.content.filter((ie) => ie.type === "file"), [t.content]), he = Hw(ee, r);
8587
+ }, [D]), ee = mn(() => Ow(t.content), [t.content]), L = mn(() => Bw(t.content), [t.content]), Z = mn(() => t.content.filter((ie) => ie.type === "image_url"), [t.content]), pe = mn(() => t.content.filter((ie) => ie.type === "file"), [t.content]), he = Hw(ee, r);
8588
8588
  q.useEffect(() => {
8589
8589
  r && ee !== he && console.log("[MessageComponent] Streaming update:", {
8590
8590
  messageId: t.id,
@@ -8823,7 +8823,7 @@ const _w = q.memo(function({
8823
8823
  }) }),
8824
8824
  Ce
8825
8825
  ] });
8826
- }, je = ln(() => $w(t), [t]);
8826
+ }, je = mn(() => $w(t), [t]);
8827
8827
  return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
8828
8828
  /* @__PURE__ */ c.jsx("div", { className: M(ce(), x.container), children: /* @__PURE__ */ c.jsxs("div", { className: M(se(), x.content), children: [
8829
8829
  (a || l || K) && /* @__PURE__ */ c.jsxs(
@@ -9120,8 +9120,8 @@ function $w(e) {
9120
9120
  return e.name && e.name.trim() ? e.name : e.model && e.model.includes("/") ? e.model.split("/").pop() || null : e.model || null;
9121
9121
  }
9122
9122
  function Hw(e, t) {
9123
- const [n, r] = ue(e), o = Ke(e), s = Ke(null);
9124
- return Ze(() => {
9123
+ const [n, r] = ue(e), o = We(e), s = We(null);
9124
+ return Xe(() => {
9125
9125
  if (!t) {
9126
9126
  r(e);
9127
9127
  return;
@@ -9244,9 +9244,9 @@ const sl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Sd = q.forwa
9244
9244
  onScrollAway: p,
9245
9245
  onAtBottom: g
9246
9246
  }, b) => {
9247
- const y = Ke(null), R = Ke(null), S = Ke(!1), [C, E] = ue(!0), N = Ue((P) => {
9247
+ const y = We(null), R = We(null), S = We(!1), [C, E] = ue(!0), N = Ue((P) => {
9248
9248
  E(P), p && p(!P), g && g(P);
9249
- }, [p, g]), I = ln(() => {
9249
+ }, [p, g]), I = mn(() => {
9250
9250
  if (a)
9251
9251
  return async () => {
9252
9252
  if (!S.current) {
@@ -9258,8 +9258,15 @@ const sl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Sd = q.forwa
9258
9258
  }
9259
9259
  }
9260
9260
  };
9261
- }, [a]), j = ln(() => !x || v ? !1 : t && C ? "auto" : !1, [t, C, x, v]);
9262
- return e.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: w || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx(
9261
+ }, [a]), j = We(!1);
9262
+ return Xe(() => {
9263
+ if (!x || v) {
9264
+ j.current !== !1 && (j.current = !1);
9265
+ return;
9266
+ }
9267
+ const P = t && C ? "auto" : !1;
9268
+ j.current !== P && (j.current = P);
9269
+ }, [t, C, x, v]), e.length === 0 ? /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx("div", { className: "flex items-center justify-center py-8 text-muted-foreground text-center max-w-md mx-auto", children: w || "No messages yet. Start a conversation!" }) }) : /* @__PURE__ */ c.jsx("div", { className: h, style: m, children: /* @__PURE__ */ c.jsx(
9263
9270
  Cx,
9264
9271
  {
9265
9272
  ref: (P) => {
@@ -9269,12 +9276,10 @@ const sl = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, Sd = q.forwa
9269
9276
  R.current = P instanceof HTMLDivElement ? P : null;
9270
9277
  },
9271
9278
  data: e,
9272
- followOutput: j,
9279
+ followOutput: j.current,
9273
9280
  overscan: 400,
9274
9281
  increaseViewportBy: { top: 200, bottom: 400 },
9275
9282
  defaultItemHeight: 120,
9276
- fixedItemHeight: void 0,
9277
- itemSize: () => 120,
9278
9283
  atBottomThreshold: 100,
9279
9284
  alignToBottom: !0,
9280
9285
  startReached: () => {
@@ -9419,10 +9424,10 @@ const qw = ["top", "right", "bottom", "left"], bn = Math.min, Rt = Math.max, Uo
9419
9424
  function Ni(e, t, n) {
9420
9425
  return Rt(e, bn(t, n));
9421
9426
  }
9422
- function dn(e, t) {
9427
+ function un(e, t) {
9423
9428
  return typeof e == "function" ? e(t) : e;
9424
9429
  }
9425
- function fn(e) {
9430
+ function dn(e) {
9426
9431
  return e.split("-")[0];
9427
9432
  }
9428
9433
  function mr(e) {
@@ -9436,7 +9441,7 @@ function ya(e) {
9436
9441
  }
9437
9442
  const Zw = /* @__PURE__ */ new Set(["top", "bottom"]);
9438
9443
  function en(e) {
9439
- return Zw.has(fn(e)) ? "y" : "x";
9444
+ return Zw.has(dn(e)) ? "y" : "x";
9440
9445
  }
9441
9446
  function Sa(e) {
9442
9447
  return wa(en(e));
@@ -9469,7 +9474,7 @@ function ry(e, t, n) {
9469
9474
  }
9470
9475
  function oy(e, t, n, r) {
9471
9476
  const o = mr(e);
9472
- let s = ry(fn(e), n === "start", r);
9477
+ let s = ry(dn(e), n === "start", r);
9473
9478
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(Ii)))), s;
9474
9479
  }
9475
9480
  function Wo(e) {
@@ -9515,7 +9520,7 @@ function cl(e, t, n) {
9515
9520
  reference: r,
9516
9521
  floating: o
9517
9522
  } = e;
9518
- const s = en(t), i = Sa(t), a = ya(i), l = fn(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, h = r.y + r.height / 2 - o.height / 2, m = r[a] / 2 - o[a] / 2;
9523
+ const s = en(t), i = Sa(t), a = ya(i), l = dn(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, h = r.y + r.height / 2 - o.height / 2, m = r[a] / 2 - o[a] / 2;
9519
9524
  let w;
9520
9525
  switch (l) {
9521
9526
  case "top":
@@ -9635,7 +9640,7 @@ async function Fr(e, t) {
9635
9640
  elementContext: h = "floating",
9636
9641
  altBoundary: m = !1,
9637
9642
  padding: w = 0
9638
- } = dn(t, e), x = Cd(w), p = a[m ? h === "floating" ? "reference" : "floating" : h], g = Vo(await s.getClippingRect({
9643
+ } = un(t, e), x = Cd(w), p = a[m ? h === "floating" ? "reference" : "floating" : h], g = Vo(await s.getClippingRect({
9639
9644
  element: (n = await (s.isElement == null ? void 0 : s.isElement(p))) == null || n ? p : p.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
9640
9645
  boundary: u,
9641
9646
  rootBoundary: d,
@@ -9679,7 +9684,7 @@ const ay = (e) => ({
9679
9684
  } = t, {
9680
9685
  element: u,
9681
9686
  padding: d = 0
9682
- } = dn(e, t) || {};
9687
+ } = un(e, t) || {};
9683
9688
  if (u == null)
9684
9689
  return {};
9685
9690
  const h = Cd(d), m = {
@@ -9722,10 +9727,10 @@ const ay = (e) => ({
9722
9727
  fallbackAxisSideDirection: x = "none",
9723
9728
  flipAlignment: v = !0,
9724
9729
  ...p
9725
- } = dn(e, t);
9730
+ } = un(e, t);
9726
9731
  if ((n = s.arrow) != null && n.alignmentOffset)
9727
9732
  return {};
9728
- const g = fn(o), b = en(a), y = fn(a) === a, R = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), S = m || (y || !v ? [Wo(a)] : ey(a)), C = x !== "none";
9733
+ const g = dn(o), b = en(a), y = dn(a) === a, R = await (l.isRTL == null ? void 0 : l.isRTL(u.floating)), S = m || (y || !v ? [Wo(a)] : ey(a)), C = x !== "none";
9729
9734
  !m && C && S.push(...oy(a, v, x, R));
9730
9735
  const E = [a, ...S], N = await Fr(t, p), I = [];
9731
9736
  let j = ((r = s.flip) == null ? void 0 : r.overflows) || [];
@@ -9804,7 +9809,7 @@ const ly = function(e) {
9804
9809
  } = t, {
9805
9810
  strategy: r = "referenceHidden",
9806
9811
  ...o
9807
- } = dn(e, t);
9812
+ } = un(e, t);
9808
9813
  switch (r) {
9809
9814
  case "referenceHidden": {
9810
9815
  const s = await Fr(t, {
@@ -9841,7 +9846,7 @@ async function uy(e, t) {
9841
9846
  placement: n,
9842
9847
  platform: r,
9843
9848
  elements: o
9844
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = fn(n), a = mr(n), l = en(n) === "y", u = Td.has(i) ? -1 : 1, d = s && l ? -1 : 1, h = dn(t, e);
9849
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = dn(n), a = mr(n), l = en(n) === "y", u = Td.has(i) ? -1 : 1, d = s && l ? -1 : 1, h = un(t, e);
9845
9850
  let {
9846
9851
  mainAxis: m,
9847
9852
  crossAxis: w,
@@ -9910,10 +9915,10 @@ const dy = function(e) {
9910
9915
  }
9911
9916
  },
9912
9917
  ...l
9913
- } = dn(e, t), u = {
9918
+ } = un(e, t), u = {
9914
9919
  x: n,
9915
9920
  y: r
9916
- }, d = await Fr(t, l), h = en(fn(o)), m = wa(h);
9921
+ }, d = await Fr(t, l), h = en(dn(o)), m = wa(h);
9917
9922
  let w = u[m], x = u[h];
9918
9923
  if (s) {
9919
9924
  const p = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", b = w + d[p], y = w - d[g];
@@ -9955,12 +9960,12 @@ const dy = function(e) {
9955
9960
  offset: a = 0,
9956
9961
  mainAxis: l = !0,
9957
9962
  crossAxis: u = !0
9958
- } = dn(e, t), d = {
9963
+ } = un(e, t), d = {
9959
9964
  x: n,
9960
9965
  y: r
9961
9966
  }, h = en(o), m = wa(h);
9962
9967
  let w = d[m], x = d[h];
9963
- const v = dn(a, t), p = typeof v == "number" ? {
9968
+ const v = un(a, t), p = typeof v == "number" ? {
9964
9969
  mainAxis: v,
9965
9970
  crossAxis: 0
9966
9971
  } : {
@@ -9974,7 +9979,7 @@ const dy = function(e) {
9974
9979
  }
9975
9980
  if (u) {
9976
9981
  var g, b;
9977
- const y = m === "y" ? "width" : "height", R = Td.has(fn(o)), S = s.reference[h] - s.floating[y] + (R && ((g = i.offset) == null ? void 0 : g[h]) || 0) + (R ? 0 : p.crossAxis), C = s.reference[h] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[h]) || 0) - (R ? p.crossAxis : 0);
9982
+ const y = m === "y" ? "width" : "height", R = Td.has(dn(o)), S = s.reference[h] - s.floating[y] + (R && ((g = i.offset) == null ? void 0 : g[h]) || 0) + (R ? 0 : p.crossAxis), C = s.reference[h] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[h]) || 0) - (R ? p.crossAxis : 0);
9978
9983
  x < S ? x = S : x > C && (x = C);
9979
9984
  }
9980
9985
  return {
@@ -9998,7 +10003,7 @@ const dy = function(e) {
9998
10003
  apply: l = () => {
9999
10004
  },
10000
10005
  ...u
10001
- } = dn(e, t), d = await Fr(t, u), h = fn(o), m = mr(o), w = en(o) === "y", {
10006
+ } = un(e, t), d = await Fr(t, u), h = dn(o), m = mr(o), w = en(o) === "y", {
10002
10007
  width: x,
10003
10008
  height: v
10004
10009
  } = s.floating;
@@ -12005,14 +12010,14 @@ function ko({
12005
12010
  loadOlderMessages: B,
12006
12011
  isPostStreamFetch: G,
12007
12012
  api: _
12008
- } = Yi(), [Y, U] = ue(null), [oe, O] = ue(""), [D, K] = ue(null), [W, ee] = ue([]), [L, Z] = ue(!1), [pe, he] = ue(null), [F, A] = ue(null), [H, J] = ue(!1), [ce, se] = ue(null), [Ae, _e] = ue([]), [je, ie] = ue(null), [Ne, Ce] = ue(null), [fe, Te] = ue(!1), Be = Ke(null), st = Ke(null), et = Ke(null), [xt, at] = ue("desktop");
12009
- Ze(() => {
12013
+ } = Yi(), [Y, U] = ue(null), [oe, O] = ue(""), [D, K] = ue(null), [W, ee] = ue([]), [L, Z] = ue(!1), [pe, he] = ue(null), [F, A] = ue(null), [H, J] = ue(!1), [ce, se] = ue(null), [Ae, _e] = ue([]), [je, ie] = ue(null), [Ne, Ce] = ue(null), [fe, Te] = ue(!1), Be = We(null), st = We(null), et = We(null), [xt, at] = ue("desktop");
12014
+ Xe(() => {
12010
12015
  const te = () => {
12011
12016
  const le = window.innerWidth;
12012
12017
  at(le < 640 ? "phone" : le < 1024 ? "tablet" : "desktop");
12013
12018
  };
12014
12019
  return te(), window.addEventListener("resize", te), () => window.removeEventListener("resize", te);
12015
- }, []), Ze(() => {
12020
+ }, []), Xe(() => {
12016
12021
  let te = !1;
12017
12022
  if (!x) {
12018
12023
  _e([]), ie(null), Ce(null), et.current = null;
@@ -12041,7 +12046,7 @@ function ko({
12041
12046
  }), () => {
12042
12047
  te = !0;
12043
12048
  };
12044
- }, [x, S, C, je, E]), Ze(() => {
12049
+ }, [x, S, C, je, E]), Xe(() => {
12045
12050
  S && (ie(S), Ce(C ?? null));
12046
12051
  }, [S, C]);
12047
12052
  const an = Ue(async () => {
@@ -12052,7 +12057,7 @@ function ko({
12052
12057
  console.warn("loadOlderMessages failed", te);
12053
12058
  }
12054
12059
  }, [j, P, B]);
12055
- Ze(() => {
12060
+ Xe(() => {
12056
12061
  (async () => {
12057
12062
  try {
12058
12063
  const le = await _.getAgent("default");
@@ -12061,7 +12066,7 @@ function ko({
12061
12066
  console.warn("Failed to fetch default message:", le), se(null);
12062
12067
  }
12063
12068
  })();
12064
- }, [_]), Ze(() => {
12069
+ }, [_]), Xe(() => {
12065
12070
  b && !H && (w == null || w(b));
12066
12071
  }, [b, H, w]);
12067
12072
  const V = (te) => {
@@ -12158,7 +12163,7 @@ function ko({
12158
12163
  Te(!1);
12159
12164
  }
12160
12165
  }
12161
- }, cn = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${d.container || ""}`, Yt = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-y-auto overflow-x-auto overscroll-contain break-words break-anywhere p-4 bg-transparent ${d.messagesArea || ""}`, hn = `flex-shrink-0 w-full border-t p-4 bg-transparent ${d.inputArea || ""}`;
12166
+ }, cn = `flex flex-1 w-full flex-col min-h-0 min-w-0 max-h-full overflow-hidden bg-transparent ${e} ${d.container || ""}`, Yt = `flex-1 min-h-0 min-w-0 max-h-full w-full overflow-hidden overscroll-contain break-words break-anywhere p-4 bg-transparent ${d.messagesArea || ""}`, fn = `flex-shrink-0 w-full border-t p-4 bg-transparent ${d.inputArea || ""}`;
12162
12167
  return /* @__PURE__ */ c.jsxs("div", { className: cn, children: [
12163
12168
  !!b && !H && /* @__PURE__ */ c.jsxs("div", { className: "flex-shrink-0 bg-red-50 border border-red-200 text-red-800 px-4 py-2 text-sm flex items-center justify-between", children: [
12164
12169
  /* @__PURE__ */ c.jsx("span", { children: b }),
@@ -12218,7 +12223,7 @@ function ko({
12218
12223
  isNavigatingCheckpoint: fe || G
12219
12224
  }
12220
12225
  ),
12221
- /* @__PURE__ */ c.jsxs("div", { className: hn, children: [
12226
+ /* @__PURE__ */ c.jsxs("div", { className: fn, children: [
12222
12227
  Y && /* @__PURE__ */ c.jsx("div", { className: "mb-3 p-3 bg-blue-50 border border-blue-200 rounded-lg", children: /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
12223
12228
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center gap-2", children: [
12224
12229
  /* @__PURE__ */ c.jsx(Rl, { size: 16, className: "text-blue-600" }),
@@ -12922,7 +12927,7 @@ function Oi({
12922
12927
  deleteThread: p,
12923
12928
  renameThread: g
12924
12929
  } = Yi(), [b, y] = ue(m ?? []), [R, S] = ue(!1), [C, E] = ue(null), [N, I] = ue(null), [j, P] = ue(""), [B, G] = ue(!1);
12925
- Ze(() => {
12930
+ Xe(() => {
12926
12931
  y(m ?? []);
12927
12932
  }, [m]);
12928
12933
  const _ = async (L) => {
@@ -13035,7 +13040,7 @@ function Oi({
13035
13040
  }
13036
13041
  const ah = Sl(null);
13037
13042
  function xR({ children: e, basePath: t = "/chat" }) {
13038
- const n = ln(() => t ? t === "/" ? "" : t.endsWith("/") ? t.slice(0, -1) : t : "/chat", [t]), r = {
13043
+ const n = mn(() => t ? t === "/" ? "" : t.endsWith("/") ? t.slice(0, -1) : t : "/chat", [t]), r = {
13039
13044
  basePath: n,
13040
13045
  buildThreadPath: (o) => `${n}/${o}`,
13041
13046
  buildBasePath: () => n
@@ -14292,7 +14297,7 @@ function qh(e) {
14292
14297
  return e ? "checked" : "unchecked";
14293
14298
  }
14294
14299
  var Xh = Vh, aT = Kh;
14295
- const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14300
+ const pn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14296
14301
  Xh,
14297
14302
  {
14298
14303
  className: M(
@@ -14311,7 +14316,7 @@ const mn = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ c.jsx(
14311
14316
  )
14312
14317
  }
14313
14318
  ));
14314
- mn.displayName = Xh.displayName;
14319
+ pn.displayName = Xh.displayName;
14315
14320
  var cT = [" ", "Enter", "ArrowUp", "ArrowDown"], lT = [" ", "Enter"], Bn = "Select", [Ps, _s, uT] = ba(Bn), [xr, ER] = Gt(Bn, [
14316
14321
  uT,
14317
14322
  vr
@@ -15295,10 +15300,10 @@ const $T = {
15295
15300
  };
15296
15301
  function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15297
15302
  const [r, o] = ue(!1), [s, i] = ue(!1), [a, l] = ue(e), [u, d] = ue(!1), { toast: h } = ha();
15298
- Ze(() => {
15303
+ Xe(() => {
15299
15304
  const p = JSON.stringify(a) !== JSON.stringify(e);
15300
15305
  d(p);
15301
- }, [a, e]), Ze(() => {
15306
+ }, [a, e]), Xe(() => {
15302
15307
  l(e);
15303
15308
  }, [e]);
15304
15309
  const m = () => {
@@ -15367,7 +15372,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15367
15372
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
15368
15373
  /* @__PURE__ */ c.jsx(Pt, { htmlFor: "enable-auth", children: "Enable Authentication" }),
15369
15374
  /* @__PURE__ */ c.jsx(
15370
- mn,
15375
+ pn,
15371
15376
  {
15372
15377
  id: "enable-auth",
15373
15378
  checked: a.api.enableAuth,
@@ -15460,7 +15465,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15460
15465
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
15461
15466
  /* @__PURE__ */ c.jsx(Pt, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
15462
15467
  /* @__PURE__ */ c.jsx(
15463
- mn,
15468
+ pn,
15464
15469
  {
15465
15470
  id: "show-timestamps",
15466
15471
  checked: a.ui.showTimestamps,
@@ -15474,7 +15479,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15474
15479
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
15475
15480
  /* @__PURE__ */ c.jsx(Pt, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
15476
15481
  /* @__PURE__ */ c.jsx(
15477
- mn,
15482
+ pn,
15478
15483
  {
15479
15484
  id: "show-agent-names",
15480
15485
  checked: a.ui.showAgentNames,
@@ -15488,7 +15493,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15488
15493
  /* @__PURE__ */ c.jsxs("div", { className: "flex items-center justify-between", children: [
15489
15494
  /* @__PURE__ */ c.jsx(Pt, { htmlFor: "compact-messages", children: "Compact Messages" }),
15490
15495
  /* @__PURE__ */ c.jsx(
15491
- mn,
15496
+ pn,
15492
15497
  {
15493
15498
  id: "compact-messages",
15494
15499
  checked: a.ui.compactMessages,
@@ -15514,7 +15519,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15514
15519
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "Automatically save messages to threads" })
15515
15520
  ] }),
15516
15521
  /* @__PURE__ */ c.jsx(
15517
- mn,
15522
+ pn,
15518
15523
  {
15519
15524
  id: "auto-save",
15520
15525
  checked: a.behavior.autoSave,
@@ -15531,7 +15536,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15531
15536
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "Stream responses in real-time" })
15532
15537
  ] }),
15533
15538
  /* @__PURE__ */ c.jsx(
15534
- mn,
15539
+ pn,
15535
15540
  {
15536
15541
  id: "enable-streaming",
15537
15542
  checked: a.behavior.enableStreaming,
@@ -15548,7 +15553,7 @@ function NR({ settings: e, onSettingsChange: t, className: n = "" }) {
15548
15553
  /* @__PURE__ */ c.jsx("p", { className: "text-sm text-muted-foreground", children: "Show typing indicator during responses" })
15549
15554
  ] }),
15550
15555
  /* @__PURE__ */ c.jsx(
15551
- mn,
15556
+ pn,
15552
15557
  {
15553
15558
  id: "typing-indicator",
15554
15559
  checked: a.behavior.showTypingIndicator,