teodor-new-chat-ui 3.0.57 → 3.0.58

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
@@ -2,7 +2,7 @@ import * as f from "react";
2
2
  import K, { useState as fe, useRef as bt, useCallback as Ye, useEffect as Ve, useReducer as Pp, useMemo as wn, createContext as gc, useContext as vc, createElement as to, useLayoutEffect as _p } from "react";
3
3
  import * as Bo from "react-dom";
4
4
  import xc from "react-dom";
5
- import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as bc, FileText as $a, Loader as Fp, ChevronUp as hr, ChevronDown as Un, Copy as Ha, Edit as za, RotateCcw as qs, Bot as Ua, Wrench as Bp, User as $p, ChevronRight as Hp, Check as Oi, Circle as zp, Edit3 as wc, Paperclip as Wa, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as Xp, PanelLeft as qp, Settings as Zp, Server as Jp, EyeOff as Qp, Eye as em, Layout as tm, MessageCircle as nm, Save as rm } from "lucide-react";
5
+ import { Square as Op, Send as Mp, X as Wn, ExternalLink as Dp, Download as Lp, Image as bc, FileText as Ha, Loader as Fp, ChevronUp as hr, ChevronDown as Un, Copy as $a, Edit as za, RotateCcw as qs, Bot as Ua, Wrench as Bp, User as Hp, ChevronRight as $p, Check as Oi, Circle as zp, Edit3 as wc, Paperclip as Wa, Loader2 as Up, Plus as Wp, FileSpreadsheet as Vp, MessageSquarePlus as Gp, MessageSquare as Kp, Calendar as Yp, Trash2 as Xp, PanelLeft as qp, Settings as Zp, Server as Jp, EyeOff as Qp, Eye as em, Layout as tm, MessageCircle as nm, Save as rm } from "lucide-react";
6
6
  import { Slot as Qn, createSlot as Yn, createSlottable as om } from "@radix-ui/react-slot";
7
7
  import { cva as Pr } from "class-variance-authority";
8
8
  import { clsx as sm } from "clsx";
@@ -133,13 +133,13 @@ function lm() {
133
133
  }
134
134
  return null;
135
135
  }
136
- var N = Object.assign, H = 0, L, X, O, _, z, q, oe;
136
+ var N = Object.assign, $ = 0, L, X, O, _, z, q, oe;
137
137
  function F() {
138
138
  }
139
139
  F.__reactDisabledLog = !0;
140
140
  function Q() {
141
141
  {
142
- if (H === 0) {
142
+ if ($ === 0) {
143
143
  L = console.log, X = console.info, O = console.warn, _ = console.error, z = console.group, q = console.groupCollapsed, oe = console.groupEnd;
144
144
  var T = {
145
145
  configurable: !0,
@@ -157,12 +157,12 @@ function lm() {
157
157
  groupEnd: T
158
158
  });
159
159
  }
160
- H++;
160
+ $++;
161
161
  }
162
162
  }
163
163
  function de() {
164
164
  {
165
- if (H--, H === 0) {
165
+ if ($--, $ === 0) {
166
166
  var T = {
167
167
  configurable: !0,
168
168
  enumerable: !0,
@@ -192,7 +192,7 @@ function lm() {
192
192
  })
193
193
  });
194
194
  }
195
- H < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
195
+ $ < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
196
196
  }
197
197
  }
198
198
  var be = b.ReactCurrentDispatcher, Y;
@@ -322,7 +322,7 @@ function lm() {
322
322
  return "";
323
323
  }
324
324
  var ce = Object.prototype.hasOwnProperty, Ae = {}, ve = b.ReactDebugCurrentFrame;
325
- function $(T) {
325
+ function H(T) {
326
326
  if (T) {
327
327
  var U = T._owner, te = Le(T.type, T._source, U ? U.type : null);
328
328
  ve.setExtraStackFrame(te);
@@ -344,7 +344,7 @@ function lm() {
344
344
  } catch (Ke) {
345
345
  Ee = Ke;
346
346
  }
347
- Ee && !(Ee instanceof Error) && ($(_e), w("%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).", ge || "React class", te, Ie, typeof Ee), $(null)), Ee instanceof Error && !(Ee.message in Ae) && (Ae[Ee.message] = !0, $(_e), w("Failed %s type: %s", te, Ee.message), $(null));
347
+ Ee && !(Ee instanceof Error) && (H(_e), w("%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).", ge || "React class", te, Ie, typeof Ee), H(null)), Ee instanceof Error && !(Ee.message in Ae) && (Ae[Ee.message] = !0, H(_e), w("Failed %s type: %s", te, Ee.message), H(null));
348
348
  }
349
349
  }
350
350
  }
@@ -623,10 +623,10 @@ function yc(e, t) {
623
623
  return e.apply(t, arguments);
624
624
  };
625
625
  }
626
- const { toString: cm } = Object.prototype, { getPrototypeOf: Mi } = Object, { iterator: $o, toStringTag: Sc } = Symbol, Ho = /* @__PURE__ */ ((e) => (t) => {
626
+ const { toString: cm } = Object.prototype, { getPrototypeOf: Mi } = Object, { iterator: Ho, toStringTag: Sc } = Symbol, $o = /* @__PURE__ */ ((e) => (t) => {
627
627
  const n = cm.call(t);
628
628
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
629
- })(/* @__PURE__ */ Object.create(null)), zt = (e) => (e = e.toLowerCase(), (t) => Ho(t) === e), zo = (e) => (t) => typeof t === e, { isArray: er } = Array, Xn = zo("undefined");
629
+ })(/* @__PURE__ */ Object.create(null)), zt = (e) => (e = e.toLowerCase(), (t) => $o(t) === e), zo = (e) => (t) => typeof t === e, { isArray: er } = Array, Xn = zo("undefined");
630
630
  function _r(e) {
631
631
  return e !== null && !Xn(e) && e.constructor !== null && !Xn(e.constructor) && pt(e.constructor.isBuffer) && e.constructor.isBuffer(e);
632
632
  }
@@ -636,10 +636,10 @@ function um(e) {
636
636
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Cc(e.buffer), t;
637
637
  }
638
638
  const dm = zo("string"), pt = zo("function"), Tc = zo("number"), Or = (e) => e !== null && typeof e == "object", fm = (e) => e === !0 || e === !1, no = (e) => {
639
- if (Ho(e) !== "object")
639
+ if ($o(e) !== "object")
640
640
  return !1;
641
641
  const t = Mi(e);
642
- return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Sc in e) && !($o in e);
642
+ return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Sc in e) && !(Ho in e);
643
643
  }, hm = (e) => {
644
644
  if (!Or(e) || _r(e))
645
645
  return !1;
@@ -650,7 +650,7 @@ const dm = zo("string"), pt = zo("function"), Tc = zo("number"), Or = (e) => e !
650
650
  }
651
651
  }, pm = zt("Date"), mm = zt("File"), gm = zt("Blob"), vm = zt("FileList"), xm = (e) => Or(e) && pt(e.pipe), bm = (e) => {
652
652
  let t;
653
- return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t = Ho(e)) === "formdata" || // detect form-data instance
653
+ return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t = $o(e)) === "formdata" || // detect form-data instance
654
654
  t === "object" && pt(e.toString) && e.toString() === "[object FormData]"));
655
655
  }, wm = zt("URLSearchParams"), [ym, Sm, Cm, Tm] = ["ReadableStream", "Request", "Response", "Headers"].map(zt), Em = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
656
656
  function Mr(e, t, { allOwnKeys: n = !1 } = {}) {
@@ -720,7 +720,7 @@ const Rm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
720
720
  n[t] = e[t];
721
721
  return n;
722
722
  }, Pm = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Mi(Uint8Array)), _m = (e, t) => {
723
- const r = (e && e[$o]).call(e);
723
+ const r = (e && e[Ho]).call(e);
724
724
  let o;
725
725
  for (; (o = r.next()) && !o.done; ) {
726
726
  const s = o.value;
@@ -765,10 +765,10 @@ const Rm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
765
765
  });
766
766
  };
767
767
  return er(e) ? r(e) : r(String(e).split(t)), n;
768
- }, $m = () => {
769
- }, Hm = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
768
+ }, Hm = () => {
769
+ }, $m = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
770
770
  function zm(e) {
771
- return !!(e && pt(e.append) && e[Sc] === "FormData" && e[$o]);
771
+ return !!(e && pt(e.append) && e[Sc] === "FormData" && e[Ho]);
772
772
  }
773
773
  const Um = (e) => {
774
774
  const t = new Array(10), n = (r, o) => {
@@ -796,7 +796,7 @@ const Um = (e) => {
796
796
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
797
797
  typeof setImmediate == "function",
798
798
  pt(yn.postMessage)
799
- ), Gm = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || Nc, Km = (e) => e != null && pt(e[$o]), j = {
799
+ ), Gm = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || Nc, Km = (e) => e != null && pt(e[Ho]), j = {
800
800
  isArray: er,
801
801
  isArrayBuffer: Cc,
802
802
  isBuffer: _r,
@@ -829,7 +829,7 @@ const Um = (e) => {
829
829
  stripBOM: Im,
830
830
  inherits: Nm,
831
831
  toFlatObject: jm,
832
- kindOf: Ho,
832
+ kindOf: $o,
833
833
  kindOfTest: zt,
834
834
  endsWith: Am,
835
835
  toArray: km,
@@ -843,8 +843,8 @@ const Um = (e) => {
843
843
  freezeMethods: Fm,
844
844
  toObjectSet: Bm,
845
845
  toCamelCase: Dm,
846
- noop: $m,
847
- toFiniteNumber: Hm,
846
+ noop: Hm,
847
+ toFiniteNumber: $m,
848
848
  findKey: Ec,
849
849
  global: yn,
850
850
  isContextDefined: Rc,
@@ -1855,9 +1855,9 @@ const Bc = (e) => {
1855
1855
  const N = W && W.unsubscribe && (() => {
1856
1856
  W.unsubscribe();
1857
1857
  });
1858
- let H;
1858
+ let $;
1859
1859
  try {
1860
- if (C && u && m !== "get" && m !== "head" && (H = await x(I, b)) !== 0) {
1860
+ if (C && u && m !== "get" && m !== "head" && ($ = await x(I, b)) !== 0) {
1861
1861
  let q = new n(v, {
1862
1862
  method: "POST",
1863
1863
  body: b,
@@ -1865,7 +1865,7 @@ const Bc = (e) => {
1865
1865
  }), oe;
1866
1866
  if (j.isFormData(b) && (oe = q.headers.get("content-type")) && I.setContentType(oe), q.body) {
1867
1867
  const [F, Q] = Ja(
1868
- H,
1868
+ $,
1869
1869
  So(Qa(C))
1870
1870
  );
1871
1871
  b = tl(q.body, nl, F, Q);
@@ -1921,7 +1921,7 @@ const Bc = (e) => {
1921
1921
  ) : we.from(L, L && L.code, g, G);
1922
1922
  }
1923
1923
  };
1924
- }, kg = /* @__PURE__ */ new Map(), $c = (e) => {
1924
+ }, kg = /* @__PURE__ */ new Map(), Hc = (e) => {
1925
1925
  let t = e ? e.env : {};
1926
1926
  const { fetch: n, Request: r, Response: o } = t, s = [
1927
1927
  r,
@@ -1933,12 +1933,12 @@ const Bc = (e) => {
1933
1933
  c = s[a], u = d.get(c), u === void 0 && d.set(c, u = a ? /* @__PURE__ */ new Map() : Ag(t)), d = u;
1934
1934
  return u;
1935
1935
  };
1936
- $c();
1936
+ Hc();
1937
1937
  const ti = {
1938
1938
  http: Ym,
1939
1939
  xhr: Tg,
1940
1940
  fetch: {
1941
- get: $c
1941
+ get: Hc
1942
1942
  }
1943
1943
  };
1944
1944
  j.forEach(ti, (e, t) => {
@@ -1950,7 +1950,7 @@ j.forEach(ti, (e, t) => {
1950
1950
  Object.defineProperty(e, "adapterName", { value: t });
1951
1951
  }
1952
1952
  });
1953
- const il = (e) => `- ${e}`, Pg = (e) => j.isFunction(e) || e === null || e === !1, Hc = {
1953
+ const il = (e) => `- ${e}`, Pg = (e) => j.isFunction(e) || e === null || e === !1, $c = {
1954
1954
  getAdapter: (e, t) => {
1955
1955
  e = j.isArray(e) ? e : [e];
1956
1956
  const { length: n } = e;
@@ -1989,7 +1989,7 @@ function al(e) {
1989
1989
  return Is(e), e.headers = mt.from(e.headers), e.data = Rs.call(
1990
1990
  e,
1991
1991
  e.transformRequest
1992
- ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Hc.getAdapter(e.adapter || Dr.adapter, e)(e).then(function(r) {
1992
+ ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), $c.getAdapter(e.adapter || Dr.adapter, e)(e).then(function(r) {
1993
1993
  return Is(e), r.data = Rs.call(
1994
1994
  e,
1995
1995
  e.transformResponse,
@@ -2348,14 +2348,14 @@ qe.isAxiosError = Dg;
2348
2348
  qe.mergeConfig = En;
2349
2349
  qe.AxiosHeaders = mt;
2350
2350
  qe.formToJSON = (e) => Mc(j.isHTMLForm(e) ? new FormData(e) : e);
2351
- qe.getAdapter = Hc.getAdapter;
2351
+ qe.getAdapter = $c.getAdapter;
2352
2352
  qe.HttpStatusCode = ni;
2353
2353
  qe.default = qe;
2354
2354
  const {
2355
2355
  Axios: FT,
2356
2356
  AxiosError: BT,
2357
- CanceledError: $T,
2358
- isCancel: HT,
2357
+ CanceledError: HT,
2358
+ isCancel: $T,
2359
2359
  CancelToken: zT,
2360
2360
  VERSION: UT,
2361
2361
  all: WT,
@@ -2387,7 +2387,7 @@ function Bg() {
2387
2387
  function dl(e) {
2388
2388
  Co = e, oi.forEach((t) => t(e));
2389
2389
  }
2390
- function $g(e) {
2390
+ function Hg(e) {
2391
2391
  return oi.add(e), () => oi.delete(e);
2392
2392
  }
2393
2393
  const At = qe.create({
@@ -2408,7 +2408,7 @@ async function Mt(e, t) {
2408
2408
  async function fl(e, t, n) {
2409
2409
  return At.defaults.baseURL ? (await At.post(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2410
2410
  }
2411
- async function Hg(e, t, n) {
2411
+ async function $g(e, t, n) {
2412
2412
  return At.defaults.baseURL ? (await At.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2413
2413
  }
2414
2414
  async function zg(e, t) {
@@ -2434,7 +2434,7 @@ class Ug {
2434
2434
  dl(t);
2435
2435
  }
2436
2436
  onTokenChange(t) {
2437
- return $g(t);
2437
+ return Hg(t);
2438
2438
  }
2439
2439
  // ---- Thread Management ----
2440
2440
  async listThreads() {
@@ -2446,7 +2446,7 @@ class Ug {
2446
2446
  return xt(r);
2447
2447
  }
2448
2448
  async updateThread(t, n) {
2449
- const r = await Hg(`/chat/threads/${t}`, { title: n });
2449
+ const r = await $g(`/chat/threads/${t}`, { title: n });
2450
2450
  return xt(r);
2451
2451
  }
2452
2452
  async deleteThread(t) {
@@ -2544,10 +2544,10 @@ function Wg(e = {}) {
2544
2544
  return !1;
2545
2545
  }
2546
2546
  })(), I = (N) => {
2547
- var H;
2547
+ var $;
2548
2548
  try {
2549
2549
  const L = JSON.parse(JSON.stringify(N));
2550
- return (H = L == null ? void 0 : L.payload) != null && H.files_info && Array.isArray(L.payload.files_info) && (L.payload.files_info = L.payload.files_info.map((X) => ({
2550
+ return ($ = L == null ? void 0 : L.payload) != null && $.files_info && Array.isArray(L.payload.files_info) && (L.payload.files_info = L.payload.files_info.map((X) => ({
2551
2551
  ...X,
2552
2552
  data: X != null && X.data ? `<base64 ${String(X.data).length} chars>` : X == null ? void 0 : X.data
2553
2553
  }))), L;
@@ -2574,7 +2574,7 @@ function Wg(e = {}) {
2574
2574
  } catch {
2575
2575
  }
2576
2576
  E && console.debug("[use-chat] POST", t + n, I(y));
2577
- const H = await fetch(t + n, {
2577
+ const $ = await fetch(t + n, {
2578
2578
  method: "POST",
2579
2579
  headers: {
2580
2580
  "Content-Type": "application/json",
@@ -2585,12 +2585,12 @@ function Wg(e = {}) {
2585
2585
  body: JSON.stringify(y),
2586
2586
  signal: C.signal
2587
2587
  });
2588
- if (!H.ok || !H.body) {
2589
- const _ = await H.text().catch(() => "");
2590
- throw E && console.debug("[use-chat] non-OK response", H.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${H.status}${_ ? ": " + _ : ""}`);
2588
+ if (!$.ok || !$.body) {
2589
+ const _ = await $.text().catch(() => "");
2590
+ throw E && console.debug("[use-chat] non-OK response", $.status, _ == null ? void 0 : _.slice(0, 500)), new Error(`stream ${$.status}${_ ? ": " + _ : ""}`);
2591
2591
  }
2592
2592
  try {
2593
- const _ = H.headers.get("X-Thread-Id") || H.headers.get("x-thread-id"), z = H.headers.get("X-Thread-Created") || H.headers.get("x-thread-created"), q = _ ?? null, oe = String(z ?? "").toLowerCase() === "true";
2593
+ const _ = $.headers.get("X-Thread-Id") || $.headers.get("x-thread-id"), z = $.headers.get("X-Thread-Created") || $.headers.get("x-thread-created"), q = _ ?? null, oe = String(z ?? "").toLowerCase() === "true";
2594
2594
  try {
2595
2595
  (W = S == null ? void 0 : S.onOpen) == null || W.call(S, { threadId: q, created: oe });
2596
2596
  } catch (F) {
@@ -2599,7 +2599,7 @@ function Wg(e = {}) {
2599
2599
  } catch (_) {
2600
2600
  E && console.debug("[use-chat] failed to read headers:", _);
2601
2601
  }
2602
- const L = H.body.getReader(), X = new TextDecoder();
2602
+ const L = $.body.getReader(), X = new TextDecoder();
2603
2603
  let O = "";
2604
2604
  for (; ; ) {
2605
2605
  const { value: _, done: z } = await L.read();
@@ -2631,8 +2631,8 @@ function Wg(e = {}) {
2631
2631
  }
2632
2632
  } catch (N) {
2633
2633
  if ((N == null ? void 0 : N.name) === "AbortError") return;
2634
- const H = (N == null ? void 0 : N.message) || String(N);
2635
- E && console.debug("[use-chat] error:", H), u(H), (G = S == null ? void 0 : S.onError) == null || G.call(S, H);
2634
+ const $ = (N == null ? void 0 : N.message) || String(N);
2635
+ E && console.debug("[use-chat] error:", $), u($), (G = S == null ? void 0 : S.onError) == null || G.call(S, $);
2636
2636
  } finally {
2637
2637
  a(!1), g.current = null;
2638
2638
  }
@@ -2943,27 +2943,27 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2943
2943
  }), [v, m] = fe(() => typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
2944
2944
  Ve(() => {
2945
2945
  g(typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
2946
- const $ = u.onTokenChange((ae) => {
2946
+ const H = u.onTokenChange((ae) => {
2947
2947
  m(ae), g(ae);
2948
2948
  });
2949
2949
  return () => {
2950
- $();
2950
+ H();
2951
2951
  };
2952
2952
  }, [u, g]);
2953
- const b = Ye(($) => {
2954
- u.setAuthToken($);
2955
- }, [u]), { state: w, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Xg(), I = s && s > 0 ? s : 6, [A, k] = fe(!1), [M, W] = fe(!1), [G, N] = fe(null), [H, L] = fe(void 0), X = Ye(
2956
- ($, ae) => {
2957
- const Be = Array.isArray($ == null ? void 0 : $.messages) ? $.messages : [];
2958
- ae === "replace" ? y(Be) : ae === "prepend" && Be.length && R(Be), N(($ == null ? void 0 : $.nextCursor) ?? null), k(!!($ != null && $.hasMore)), L((nt) => ($ == null ? void 0 : $.checkpointId) ?? nt ?? void 0);
2953
+ const b = Ye((H) => {
2954
+ u.setAuthToken(H);
2955
+ }, [u]), { state: w, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Xg(), I = s && s > 0 ? s : 6, [A, k] = fe(!1), [M, W] = fe(!1), [G, N] = fe(null), [$, L] = fe(void 0), X = Ye(
2956
+ (H, ae) => {
2957
+ const Be = Array.isArray(H == null ? void 0 : H.messages) ? H.messages : [];
2958
+ ae === "replace" ? y(Be) : ae === "prepend" && Be.length && R(Be), N((H == null ? void 0 : H.nextCursor) ?? null), k(!!(H != null && H.hasMore)), L((nt) => (H == null ? void 0 : H.checkpointId) ?? nt ?? void 0);
2959
2959
  },
2960
2960
  [y, R]
2961
2961
  ), [O, _] = fe([]), [z, q] = fe(null), oe = Ye(async () => {
2962
- const $ = await u.listThreads();
2963
- _($);
2962
+ const H = await u.listThreads();
2963
+ _(H);
2964
2964
  }, [u]), [F, Q] = fe(!1), de = Ye(
2965
- async ($) => {
2966
- const ae = ($ == null ? void 0 : $.maxAttempts) ?? 5, Be = ($ == null ? void 0 : $.baseDelayMs) ?? 500, nt = ($ == null ? void 0 : $.timeoutMs) ?? 2e3;
2965
+ async (H) => {
2966
+ const ae = (H == null ? void 0 : H.maxAttempts) ?? 5, Be = (H == null ? void 0 : H.baseDelayMs) ?? 500, nt = (H == null ? void 0 : H.timeoutMs) ?? 2e3;
2967
2967
  if (!u.baseUrl) return !1;
2968
2968
  const ut = u.baseUrl.replace(/\/+$/, ""), rt = [
2969
2969
  "/health",
@@ -3004,7 +3004,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3004
3004
  [u.baseUrl]
3005
3005
  );
3006
3006
  Ve(() => {
3007
- let $ = !0;
3007
+ let H = !0;
3008
3008
  if (!u.baseUrl) {
3009
3009
  console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
3010
3010
  return;
@@ -3012,13 +3012,13 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3012
3012
  return (async () => {
3013
3013
  try {
3014
3014
  const ae = await de();
3015
- if (!$) return;
3015
+ if (!H) return;
3016
3016
  ae ? oe().catch(() => {
3017
3017
  }) : console.warn("[ChatProvider] backend health-check failed — skipping initial loads");
3018
3018
  } catch {
3019
3019
  }
3020
3020
  })(), () => {
3021
- $ = !1;
3021
+ H = !1;
3022
3022
  };
3023
3023
  }, [oe, u.baseUrl, de]), Ve(() => {
3024
3024
  r == null || r(z);
@@ -3039,37 +3039,37 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3039
3039
  }
3040
3040
  }, [o, i, u.baseUrl, F]);
3041
3041
  const Y = bt(null), P = Ye(
3042
- async ($, ae, Be) => {
3042
+ async (H, ae, Be) => {
3043
3043
  if (!u.baseUrl) {
3044
3044
  console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
3045
3045
  return;
3046
3046
  }
3047
- if (Y.current !== $) {
3048
- Y.current = $;
3047
+ if (Y.current !== H) {
3048
+ Y.current = H;
3049
3049
  try {
3050
3050
  k(!1), N(null), L(void 0);
3051
3051
  const nt = await u.getMessages({
3052
- threadId: $,
3052
+ threadId: H,
3053
3053
  checkpointId: ae,
3054
3054
  checkpointNs: Be,
3055
3055
  limit: I
3056
3056
  });
3057
- q($), X(nt, "replace");
3057
+ q(H), X(nt, "replace");
3058
3058
  } finally {
3059
3059
  Y.current = null;
3060
3060
  }
3061
3061
  }
3062
3062
  },
3063
3063
  [u, X]
3064
- ), J = Ye(async ($) => {
3065
- const ae = await u.listCheckpoints($);
3066
- return ev(ae, $);
3067
- }, [u]), ne = Ye(async ($) => {
3064
+ ), J = Ye(async (H) => {
3065
+ const ae = await u.listCheckpoints(H);
3066
+ return ev(ae, H);
3067
+ }, [u]), ne = Ye(async (H) => {
3068
3068
  if (!z) throw new Error("No active thread");
3069
3069
  k(!1), N(null), L(void 0);
3070
3070
  const ae = await u.getMessages({
3071
3071
  threadId: z,
3072
- checkpointId: $,
3072
+ checkpointId: H,
3073
3073
  limit: I
3074
3074
  });
3075
3075
  X(ae, "replace");
@@ -3078,8 +3078,8 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3078
3078
  await P(z);
3079
3079
  }, [z, P]), ie = bt(!1);
3080
3080
  Ve(() => {
3081
- const $ = ie.current;
3082
- if (ie.current = d, $ && !d && z) {
3081
+ const H = ie.current;
3082
+ if (ie.current = d, H && !d && z) {
3083
3083
  const ae = w.lastCheckpointId ?? void 0;
3084
3084
  (async () => {
3085
3085
  try {
@@ -3098,14 +3098,14 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3098
3098
  })();
3099
3099
  }
3100
3100
  }, [d, z, w.lastCheckpointId, u, X, oe]);
3101
- const Pe = Ye(async ($) => {
3102
- const ae = await u.createThread($);
3101
+ const Pe = Ye(async (H) => {
3102
+ const ae = await u.createThread(H);
3103
3103
  return await oe(), await P(ae.threadId), ae.threadId;
3104
- }, [u, oe, P]), Fe = Ye(async ($) => {
3105
- await u.deleteThread($), await oe(), z === $ && (q(null), E([]), k(!1), N(null), L(void 0));
3106
- }, [u, oe, z, E]), Le = Ye(async ($, ae) => {
3107
- await u.updateThread($, ae), await oe();
3108
- }, [u, oe]), ce = Ye(async ($, ae) => {
3104
+ }, [u, oe, P]), Fe = Ye(async (H) => {
3105
+ await u.deleteThread(H), await oe(), z === H && (q(null), E([]), k(!1), N(null), L(void 0));
3106
+ }, [u, oe, z, E]), Le = Ye(async (H, ae) => {
3107
+ await u.updateThread(H, ae), await oe();
3108
+ }, [u, oe]), ce = Ye(async (H, ae) => {
3109
3109
  var Dn;
3110
3110
  const Be = (ae == null ? void 0 : ae.attachments) || [], { contentParts: nt, filesInfo: ut } = await rv(
3111
3111
  u,
@@ -3115,7 +3115,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3115
3115
  c,
3116
3116
  z
3117
3117
  ), rt = [];
3118
- $ && rt.push({ type: "text", text: $ });
3118
+ H && rt.push({ type: "text", text: H });
3119
3119
  for (const Ue of nt) rt.push(Ue);
3120
3120
  const Qe = {
3121
3121
  id: ((Dn = crypto.randomUUID) == null ? void 0 : Dn.call(crypto)) || `user-${Date.now()}`,
@@ -3156,7 +3156,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3156
3156
  }
3157
3157
  );
3158
3158
  }, [z, S, p, C, w.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, oe, q, a, c]), Ae = Ye(
3159
- async ($) => {
3159
+ async (H) => {
3160
3160
  if (!z) throw new Error("No active thread");
3161
3161
  if (M || !A) return;
3162
3162
  const ae = G;
@@ -3165,8 +3165,8 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3165
3165
  try {
3166
3166
  const Be = await u.getMessages({
3167
3167
  threadId: z,
3168
- checkpointId: H,
3169
- limit: ($ == null ? void 0 : $.limit) ?? I,
3168
+ checkpointId: $,
3169
+ limit: (H == null ? void 0 : H.limit) ?? I,
3170
3170
  beforeId: ae
3171
3171
  });
3172
3172
  X(Be, "prepend");
@@ -3175,7 +3175,7 @@ function so({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3175
3175
  }
3176
3176
  }
3177
3177
  },
3178
- [u, z, H, G, A, M, X]
3178
+ [u, z, $, G, A, M, X]
3179
3179
  ), ve = {
3180
3180
  baseUrl: u.baseUrl,
3181
3181
  token: v,
@@ -3243,7 +3243,7 @@ function Go(e, t) {
3243
3243
  function av(e, t) {
3244
3244
  return t(e);
3245
3245
  }
3246
- function He(...e) {
3246
+ function $e(...e) {
3247
3247
  return e;
3248
3248
  }
3249
3249
  function Oe(e, t) {
@@ -3252,7 +3252,7 @@ function Oe(e, t) {
3252
3252
  function ye(e, t) {
3253
3253
  e(Vo, t);
3254
3254
  }
3255
- function $i(e) {
3255
+ function Hi(e) {
3256
3256
  e(nr);
3257
3257
  }
3258
3258
  function Xe(e) {
@@ -3278,7 +3278,7 @@ function gl(e) {
3278
3278
  function Yc(e, t) {
3279
3279
  return e === t;
3280
3280
  }
3281
- function $e(e = Yc) {
3281
+ function He(e = Yc) {
3282
3282
  let t;
3283
3283
  return (n) => (r) => {
3284
3284
  e(t, r) || (t = r, n(r));
@@ -3302,7 +3302,7 @@ function B(e, ...t) {
3302
3302
  return (r, o) => {
3303
3303
  switch (r) {
3304
3304
  case nr:
3305
- $i(e);
3305
+ Hi(e);
3306
3306
  return;
3307
3307
  case hn:
3308
3308
  return Oe(e, n(o));
@@ -3434,7 +3434,7 @@ function Je(...e) {
3434
3434
  }), function(s, i) {
3435
3435
  switch (s) {
3436
3436
  case nr: {
3437
- $i(t);
3437
+ Hi(t);
3438
3438
  return;
3439
3439
  }
3440
3440
  case hn:
@@ -3443,7 +3443,7 @@ function Je(...e) {
3443
3443
  };
3444
3444
  }
3445
3445
  function he(e, t = Yc) {
3446
- return B(e, $e(t));
3446
+ return B(e, He(t));
3447
3447
  }
3448
3448
  function ii(...e) {
3449
3449
  return function(t, n) {
@@ -3486,9 +3486,9 @@ const fv = {
3486
3486
  { singleton: !0 }
3487
3487
  );
3488
3488
  function Pn(e, t, n) {
3489
- return Hi(e, t, n).callbackRef;
3489
+ return $i(e, t, n).callbackRef;
3490
3490
  }
3491
- function Hi(e, t, n) {
3491
+ function $i(e, t, n) {
3492
3492
  const r = K.useRef(null);
3493
3493
  let o = (i) => {
3494
3494
  };
@@ -3524,7 +3524,7 @@ function pv(e, t, n, r, o, s, i, a, c) {
3524
3524
  },
3525
3525
  [e, t, o, s, i, r, a]
3526
3526
  );
3527
- return Hi(u, n, c);
3527
+ return $i(u, n, c);
3528
3528
  }
3529
3529
  function mv(e, t, n, r) {
3530
3530
  const o = e.length;
@@ -3568,7 +3568,7 @@ function Xc(e, t, n) {
3568
3568
  },
3569
3569
  // eslint-disable-next-line react-hooks/exhaustive-deps
3570
3570
  [e, t]
3571
- ), { callbackRef: s, ref: i } = Hi(o, !0, n), a = K.useCallback(() => {
3571
+ ), { callbackRef: s, ref: i } = $i(o, !0, n), a = K.useCallback(() => {
3572
3572
  o(i.current);
3573
3573
  }, [o, i]);
3574
3574
  return K.useEffect(() => {
@@ -3940,12 +3940,12 @@ const Iv = {
3940
3940
  }, Jt = je(
3941
3941
  ([{ log: e }, { recalcInProgress: t }]) => {
3942
3942
  const n = Re(), r = Re(), o = ct(r, 0), s = Re(), i = Re(), a = V(0), c = V([]), u = V(void 0), d = V(void 0), h = V((S, C) => cn(S, Iv[C])), p = V(void 0), x = V(0), g = xv(), v = ct(
3943
- B(n, Se(c, e, x), Yt(Cv, g), $e()),
3943
+ B(n, Se(c, e, x), Yt(Cv, g), He()),
3944
3944
  g
3945
3945
  ), m = ct(
3946
3946
  B(
3947
3947
  c,
3948
- $e(),
3948
+ He(),
3949
3949
  Yt((S, C) => ({ current: C, prev: S.current }), {
3950
3950
  current: [],
3951
3951
  prev: []
@@ -4049,30 +4049,30 @@ const Iv = {
4049
4049
  const k = Sr(C.sizeTree, 0);
4050
4050
  let M = 0, W = 0;
4051
4051
  for (; M < S; ) {
4052
- const N = C.groupIndices[W], H = C.groupIndices.length === W + 1 ? 1 / 0 : C.groupIndices[W + 1] - N - 1;
4052
+ const N = C.groupIndices[W], $ = C.groupIndices.length === W + 1 ? 1 / 0 : C.groupIndices[W + 1] - N - 1;
4053
4053
  I.push({
4054
4054
  endIndex: N,
4055
4055
  size: k,
4056
4056
  startIndex: N
4057
4057
  }), I.push({
4058
- endIndex: N + 1 + H - 1,
4058
+ endIndex: N + 1 + $ - 1,
4059
4059
  size: A,
4060
4060
  startIndex: N + 1
4061
- }), W++, M += H + 1;
4061
+ }), W++, M += $ + 1;
4062
4062
  }
4063
4063
  const G = Sn(C.sizeTree);
4064
4064
  return M !== S && G.shift(), G.reduce(
4065
- (N, { k: H, v: L }) => {
4065
+ (N, { k: $, v: L }) => {
4066
4066
  let X = N.ranges;
4067
4067
  return N.prevSize !== 0 && (X = [
4068
4068
  ...N.ranges,
4069
4069
  {
4070
- endIndex: H + S - 1,
4070
+ endIndex: $ + S - 1,
4071
4071
  size: N.prevSize,
4072
4072
  startIndex: N.prevIndex
4073
4073
  }
4074
4074
  ]), {
4075
- prevIndex: H + S,
4075
+ prevIndex: $ + S,
4076
4076
  prevSize: L,
4077
4077
  ranges: X
4078
4078
  };
@@ -4126,7 +4126,7 @@ const Iv = {
4126
4126
  const G = A[M + 1] - W - 1;
4127
4127
  M++, k += G + 1;
4128
4128
  }
4129
- if (I = Sn(C.sizeTree).reduce((G, { k: N, v: H }) => yt(G, Math.max(0, N + S), H), I), k !== -S) {
4129
+ if (I = Sn(C.sizeTree).reduce((G, { k: N, v: $ }) => yt(G, Math.max(0, N + S), $), I), k !== -S) {
4130
4130
  const G = Sr(C.sizeTree, W);
4131
4131
  I = yt(I, 0, G);
4132
4132
  const N = Bt(C.sizeTree, -S + 1)[1];
@@ -4170,7 +4170,7 @@ const Iv = {
4170
4170
  unshiftWith: s
4171
4171
  };
4172
4172
  },
4173
- He(pn, zi),
4173
+ $e(pn, zi),
4174
4174
  { singleton: !0 }
4175
4175
  );
4176
4176
  function Nv(e) {
@@ -4202,27 +4202,27 @@ const su = je(
4202
4202
  Je(o, t, r),
4203
4203
  pe(([c, u]) => Yo(u)),
4204
4204
  re(([c, u, d]) => Bt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
4205
- $e(),
4205
+ He(),
4206
4206
  re((c) => [c])
4207
4207
  ),
4208
4208
  i
4209
4209
  ), { groupCounts: s, topItemsIndexes: i };
4210
4210
  },
4211
- He(Jt, ft)
4211
+ $e(Jt, ft)
4212
4212
  ), mn = je(
4213
4213
  ([{ log: e }]) => {
4214
4214
  const t = V(!1), n = St(
4215
4215
  B(
4216
4216
  t,
4217
4217
  pe((r) => r),
4218
- $e()
4218
+ He()
4219
4219
  )
4220
4220
  );
4221
4221
  return Oe(t, (r) => {
4222
4222
  r && Xe(e)("props updated", {}, gt.DEBUG);
4223
4223
  }), { didMount: n, propsReady: t };
4224
4224
  },
4225
- He(pn),
4225
+ $e(pn),
4226
4226
  { singleton: !0 }
4227
4227
  ), jv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4228
4228
  function iu(e) {
@@ -4261,7 +4261,7 @@ const Lr = je(
4261
4261
  G,
4262
4262
  N
4263
4263
  ]) => {
4264
- const H = iu(R), { align: L, behavior: X, offset: O } = H, _ = E - 1, z = ou(H, S, _);
4264
+ const $ = iu(R), { align: L, behavior: X, offset: O } = $, _ = E - 1, z = ou($, S, _);
4265
4265
  let q = Tr(z, S.offsetTree, W) + A;
4266
4266
  L === "end" ? (q += G + Bt(S.sizeTree, z)[1] - C + N, z === _ && (q += k)) : L === "center" ? q += (G + Bt(S.sizeTree, z)[1] - C + N) / 2 : q -= I, O && (q += O);
4267
4267
  const oe = (F) => {
@@ -4289,7 +4289,7 @@ const Lr = je(
4289
4289
  topListHeight: v
4290
4290
  };
4291
4291
  },
4292
- He(Jt, ft, pn),
4292
+ $e(Jt, ft, pn),
4293
4293
  { singleton: !0 }
4294
4294
  );
4295
4295
  function Av(e) {
@@ -4352,7 +4352,7 @@ const Fr = je(
4352
4352
  scrolledToInitialItem: a
4353
4353
  };
4354
4354
  },
4355
- He(Jt, ft, Lr, mn),
4355
+ $e(Jt, ft, Lr, mn),
4356
4356
  { singleton: !0 }
4357
4357
  );
4358
4358
  function au(e, t) {
@@ -4371,18 +4371,18 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4371
4371
  const i = V(!1), a = V(!0), c = Re(), u = Re(), d = V(4), h = V(_v), p = ct(
4372
4372
  B(
4373
4373
  ii(B(he(o), In(1), Gt(!0)), B(he(o), In(1), Gt(!1), gl(100))),
4374
- $e()
4374
+ He()
4375
4375
  ),
4376
4376
  !1
4377
4377
  ), x = ct(
4378
- B(ii(B(n, Gt(!0)), B(n, Gt(!1), gl(200))), $e()),
4378
+ B(ii(B(n, Gt(!0)), B(n, Gt(!1), gl(200))), He()),
4379
4379
  !1
4380
4380
  );
4381
4381
  ue(
4382
4382
  B(
4383
4383
  Je(he(o), he(h)),
4384
4384
  re(([w, y]) => w <= y),
4385
- $e()
4385
+ He()
4386
4386
  ),
4387
4387
  a
4388
4388
  ), ue(B(a, nn(50)), u);
@@ -4411,7 +4411,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4411
4411
  state: k
4412
4412
  };
4413
4413
  }, Pv),
4414
- $e((w, y) => w && w.atBottom === y.atBottom)
4414
+ He((w, y) => w && w.atBottom === y.atBottom)
4415
4415
  )
4416
4416
  ), v = ct(
4417
4417
  B(
@@ -4459,7 +4459,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4459
4459
  B(
4460
4460
  r,
4461
4461
  re(({ scrollTop: w }) => w),
4462
- $e(),
4462
+ He(),
4463
4463
  Yt(
4464
4464
  (w, y) => Xe(x) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? Er : gr, prevScrollTop: y },
4465
4465
  { direction: gr, prevScrollTop: 0 }
@@ -4499,7 +4499,7 @@ const Er = "up", gr = "down", kv = "none", Pv = {
4499
4499
  scrollDirection: m,
4500
4500
  scrollVelocity: b
4501
4501
  };
4502
- }, He(ft)), Eo = "top", Ro = "bottom", wl = "none";
4502
+ }, $e(ft)), Eo = "top", Ro = "bottom", wl = "none";
4503
4503
  function yl(e, t, n) {
4504
4504
  return typeof e == "number" ? n === Er && t === Eo || n === gr && t === Ro ? e : 0 : n === Er ? t === Eo ? e.main : e.reverse : t === Ro ? e.main : e.reverse;
4505
4505
  }
@@ -4544,7 +4544,7 @@ const Gi = je(
4544
4544
  }
4545
4545
  ),
4546
4546
  pe((d) => d != null),
4547
- $e(Cr)
4547
+ He(Cr)
4548
4548
  ),
4549
4549
  [0, 0]
4550
4550
  );
@@ -4558,7 +4558,7 @@ const Gi = je(
4558
4558
  visibleRange: u
4559
4559
  };
4560
4560
  },
4561
- He(ft),
4561
+ $e(ft),
4562
4562
  { singleton: !0 }
4563
4563
  );
4564
4564
  function Ov(e, t, n) {
@@ -4689,16 +4689,16 @@ const _n = je(
4689
4689
  W,
4690
4690
  G,
4691
4691
  N,
4692
- H
4692
+ $
4693
4693
  ]) => {
4694
4694
  const L = A, { offsetTree: X, sizeTree: O } = L, _ = Xe(m);
4695
4695
  if (I === 0)
4696
4696
  return { ...Ps, totalCount: I };
4697
4697
  if (C === 0 && E === 0)
4698
- return _ === 0 ? { ...Ps, totalCount: I } : lu(_, k, A, G, N, H || []);
4698
+ return _ === 0 ? { ...Ps, totalCount: I } : lu(_, k, A, G, N, $ || []);
4699
4699
  if (De(O))
4700
4700
  return _ > 0 ? null : ao(
4701
- Ov(Vi(k, I), L, H),
4701
+ Ov(Vi(k, I), L, $),
4702
4702
  [],
4703
4703
  I,
4704
4704
  N,
@@ -4712,7 +4712,7 @@ const _n = je(
4712
4712
  for (const P of Ko(O, de, be)) {
4713
4713
  const J = P.value, ne = Math.max(P.start, de), le = Math.min(P.end, be);
4714
4714
  for (let ie = ne; ie <= le; ie++)
4715
- z.push({ data: H == null ? void 0 : H[ie], index: ie, offset: Y, size: J }), Y += J;
4715
+ z.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: Y, size: J }), Y += J;
4716
4716
  }
4717
4717
  }
4718
4718
  if (!M)
@@ -4733,7 +4733,7 @@ const _n = je(
4733
4733
  J < q && (P += (q - J) * ne, J = q);
4734
4734
  const le = Math.min(be.end, F);
4735
4735
  for (let ie = J; ie <= le && !(P >= E); ie++)
4736
- de.push({ data: H == null ? void 0 : H[ie], index: ie, offset: P, size: ne }), P += ne + N;
4736
+ de.push({ data: $ == null ? void 0 : $[ie], index: ie, offset: P, size: ne }), P += ne + N;
4737
4737
  }
4738
4738
  });
4739
4739
  return ao(Q, z, I, N, L, G);
@@ -4741,7 +4741,7 @@ const _n = je(
4741
4741
  ),
4742
4742
  //@ts-expect-error filter needs to be fixed
4743
4743
  pe((C) => C !== null),
4744
- $e()
4744
+ He()
4745
4745
  ),
4746
4746
  Ps
4747
4747
  );
@@ -4778,7 +4778,7 @@ const _n = je(
4778
4778
  Se(o, e),
4779
4779
  pe(([{ items: C }, E]) => C[C.length - 1].originalIndex === E - 1),
4780
4780
  re(([, C, E]) => [C - 1, E]),
4781
- $e(Cr),
4781
+ He(Cr),
4782
4782
  re(([C]) => C)
4783
4783
  )
4784
4784
  ), R = St(
@@ -4787,7 +4787,7 @@ const _n = je(
4787
4787
  nn(200),
4788
4788
  pe(({ items: C, topItems: E }) => C.length > 0 && C[0].originalIndex === E.length),
4789
4789
  re(({ items: C }) => C[0].index),
4790
- $e()
4790
+ He()
4791
4791
  )
4792
4792
  ), S = St(
4793
4793
  B(
@@ -4804,12 +4804,12 @@ const _n = je(
4804
4804
  startIndex: C[E].index
4805
4805
  };
4806
4806
  }),
4807
- $e(tu)
4807
+ He(tu)
4808
4808
  )
4809
4809
  );
4810
4810
  return { endReached: y, initialItemCount: m, itemsRendered: b, listState: w, rangeChanged: S, startReached: R, topItemsIndexes: v, ...p };
4811
4811
  },
4812
- He(
4812
+ $e(
4813
4813
  Jt,
4814
4814
  su,
4815
4815
  Gi,
@@ -4831,7 +4831,7 @@ const _n = je(
4831
4831
  );
4832
4832
  return ue(he(i), s), { totalListHeight: i, totalListHeightChanged: s };
4833
4833
  },
4834
- He(ft, _n),
4834
+ $e(ft, _n),
4835
4835
  { singleton: !0 }
4836
4836
  ), Mv = je(
4837
4837
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
@@ -4841,13 +4841,13 @@ const _n = je(
4841
4841
  pe(([o]) => o),
4842
4842
  re(([, o, s]) => Math.max(0, o - s)),
4843
4843
  nn(0),
4844
- $e()
4844
+ He()
4845
4845
  ),
4846
4846
  0
4847
4847
  );
4848
4848
  return { alignToBottom: n, paddingTopAddition: r };
4849
4849
  },
4850
- He(ft, cu),
4850
+ $e(ft, cu),
4851
4851
  { singleton: !0 }
4852
4852
  ), uu = je(() => ({
4853
4853
  context: V(null)
@@ -4880,7 +4880,7 @@ const _n = je(
4880
4880
  return N ? E && Lt(
4881
4881
  B(
4882
4882
  i,
4883
- pe((H) => !H),
4883
+ pe(($) => !$),
4884
4884
  // skips the initial publish of false, and the cleanup call.
4885
4885
  // but if scrollingInProgress is true, we skip the initial publish.
4886
4886
  In(Xe(i) ? 1 : 2)
@@ -4895,7 +4895,7 @@ const _n = je(
4895
4895
  scrollIntoView: d
4896
4896
  };
4897
4897
  },
4898
- He(Jt, ft, Lr, _n, pn),
4898
+ $e(Jt, ft, Lr, _n, pn),
4899
4899
  { singleton: !0 }
4900
4900
  );
4901
4901
  function Tl(e) {
@@ -4995,7 +4995,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
4995
4995
  }
4996
4996
  ), { autoscrollToBottom: v, followOutput: g, scrollIntoViewOnChange: y };
4997
4997
  },
4998
- He(
4998
+ $e(
4999
4999
  Jt,
5000
5000
  Br,
5001
5001
  Lr,
@@ -5017,9 +5017,9 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5017
5017
  ),
5018
5018
  i
5019
5019
  ), {}),
5020
- He(Jt, Fr, _n, mn),
5020
+ $e(Jt, Fr, _n, mn),
5021
5021
  { singleton: !0 }
5022
- ), $v = je(
5022
+ ), Hv = je(
5023
5023
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
5024
5024
  const r = V(0);
5025
5025
  return Oe(
@@ -5047,7 +5047,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5047
5047
  initialScrollTop: r
5048
5048
  };
5049
5049
  },
5050
- He(mn, ft, _n),
5050
+ $e(mn, ft, _n),
5051
5051
  { singleton: !0 }
5052
5052
  ), fu = je(
5053
5053
  ([{ scrollVelocity: e }]) => {
@@ -5066,7 +5066,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5066
5066
  return !0;
5067
5067
  return i;
5068
5068
  }),
5069
- $e()
5069
+ He()
5070
5070
  ),
5071
5071
  t
5072
5072
  ), Oe(
@@ -5076,7 +5076,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5076
5076
  }
5077
5077
  ), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
5078
5078
  },
5079
- He(Br),
5079
+ $e(Br),
5080
5080
  { singleton: !0 }
5081
5081
  ), Ki = je(([{ scrollContainerState: e, scrollTo: t }]) => {
5082
5082
  const n = Re(), r = Re(), o = Re(), s = V(!1), i = V(void 0);
@@ -5110,7 +5110,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5110
5110
  windowScrollTo: o,
5111
5111
  windowViewportRect: r
5112
5112
  };
5113
- }, He(ft)), Hv = je(
5113
+ }, $e(ft)), $v = je(
5114
5114
  ([
5115
5115
  { sizeRanges: e, sizes: t },
5116
5116
  { headerHeight: n, scrollTop: r },
@@ -5133,7 +5133,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5133
5133
  s,
5134
5134
  Se(d),
5135
5135
  pe(([, x]) => x !== void 0),
5136
- $e(),
5136
+ He(),
5137
5137
  re(([, x]) => x.ranges)
5138
5138
  ),
5139
5139
  e
@@ -5142,7 +5142,7 @@ const Lv = (e, t) => typeof e == "function" ? Tl(e(t)) : t && Tl(e), Fv = je(
5142
5142
  restoreStateFrom: d
5143
5143
  };
5144
5144
  },
5145
- He(Jt, ft, Fr, mn, Ki)
5145
+ $e(Jt, ft, Fr, mn, Ki)
5146
5146
  );
5147
5147
  function zv(e) {
5148
5148
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -5157,7 +5157,7 @@ const Uv = je(([{ topItemsIndexes: e }]) => {
5157
5157
  ),
5158
5158
  e
5159
5159
  ), { topItemCount: t };
5160
- }, He(_n));
5160
+ }, $e(_n));
5161
5161
  function hu(e) {
5162
5162
  let t = !1, n;
5163
5163
  return () => (t || (t = !0, n = e()), n);
@@ -5240,7 +5240,7 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5240
5240
  }
5241
5241
  ), { deviation: e };
5242
5242
  },
5243
- He(ft, Br, _n, Jt, pn, zi)
5243
+ $e(ft, Br, _n, Jt, pn, zi)
5244
5244
  ), Gv = je(
5245
5245
  ([
5246
5246
  e,
@@ -5267,13 +5267,13 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5267
5267
  ...u,
5268
5268
  ...d
5269
5269
  }),
5270
- He(
5270
+ $e(
5271
5271
  Gi,
5272
5272
  Bv,
5273
5273
  mn,
5274
5274
  fu,
5275
5275
  cu,
5276
- $v,
5276
+ Hv,
5277
5277
  Mv,
5278
5278
  Ki,
5279
5279
  du,
@@ -5343,11 +5343,11 @@ const Wv = hu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5343
5343
  sizes: c,
5344
5344
  ...m
5345
5345
  }),
5346
- He(
5346
+ $e(
5347
5347
  Jt,
5348
5348
  Fr,
5349
5349
  ft,
5350
- Hv,
5350
+ $v,
5351
5351
  Fv,
5352
5352
  _n,
5353
5353
  Lr,
@@ -5400,7 +5400,7 @@ function mu(e, t, n) {
5400
5400
  for (const E of i)
5401
5401
  E in y && Oe(S[E], y[E]);
5402
5402
  return () => {
5403
- Object.values(S).map($i);
5403
+ Object.values(S).map(Hi);
5404
5404
  };
5405
5405
  }, [y, S, R]), Gr(() => {
5406
5406
  c(R, y);
@@ -5516,7 +5516,7 @@ const Xv = /* @__PURE__ */ je(() => {
5516
5516
  B(
5517
5517
  n,
5518
5518
  re((u) => u[a]),
5519
- $e()
5519
+ He()
5520
5520
  ),
5521
5521
  c
5522
5522
  );
@@ -5539,7 +5539,7 @@ const Xv = /* @__PURE__ */ je(() => {
5539
5539
  };
5540
5540
  }), qv = /* @__PURE__ */ je(
5541
5541
  ([e, t]) => ({ ...e, ...t }),
5542
- He(pu, Xv)
5542
+ $e(pu, Xv)
5543
5543
  ), Zv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Jv = { overflowAnchor: "none", position: Yi(), zIndex: 1 }, wu = { overflowAnchor: "none" }, Qv = { ...wu, display: "inline-block", height: "100%" }, Rl = /* @__PURE__ */ K.memo(function({ showTopList: e = !1 }) {
5544
5544
  const t = xe("listState"), n = It("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = It("windowScrollContainerState"), i = It("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), h = xe("trackItemSizes"), p = xe("itemSize"), x = xe("log"), g = It("gap"), v = xe("horizontalDirection"), { callbackRef: m } = pv(
5545
5545
  n,
@@ -5579,7 +5579,7 @@ const Xv = /* @__PURE__ */ je(() => {
5579
5579
  ref: m,
5580
5580
  style: G,
5581
5581
  children: (e ? t.topItems : t.items).map((N) => {
5582
- const H = N.originalIndex, L = I(H + t.firstItemIndex, N.data, u);
5582
+ const $ = N.originalIndex, L = I($ + t.firstItemIndex, N.data, u);
5583
5583
  return A ? /* @__PURE__ */ to(
5584
5584
  R,
5585
5585
  {
@@ -5594,7 +5594,7 @@ const Xv = /* @__PURE__ */ je(() => {
5594
5594
  E,
5595
5595
  {
5596
5596
  ...lt(E, u),
5597
- "data-index": H,
5597
+ "data-index": $,
5598
5598
  "data-item-index": N.index,
5599
5599
  "data-known-size": N.size,
5600
5600
  key: L,
@@ -5606,7 +5606,7 @@ const Xv = /* @__PURE__ */ je(() => {
5606
5606
  {
5607
5607
  ...lt(C, u),
5608
5608
  ...rx(C, N.data),
5609
- "data-index": H,
5609
+ "data-index": $,
5610
5610
  "data-item-group-index": N.groupIndex,
5611
5611
  "data-item-index": N.index,
5612
5612
  "data-known-size": N.size,
@@ -5829,7 +5829,7 @@ const ix = ({ children: e }) => {
5829
5829
  B(
5830
5830
  s,
5831
5831
  re((h) => h[u]),
5832
- $e()
5832
+ He()
5833
5833
  ),
5834
5834
  d
5835
5835
  );
@@ -5854,7 +5854,7 @@ const ix = ({ children: e }) => {
5854
5854
  GroupComponent: c("Group", "tr")
5855
5855
  };
5856
5856
  });
5857
- He(pu, px);
5857
+ $e(pu, px);
5858
5858
  Yi();
5859
5859
  const Il = {
5860
5860
  bottom: 0,
@@ -5898,7 +5898,7 @@ const xx = /* @__PURE__ */ je(
5898
5898
  { customScrollParent: m, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: R },
5899
5899
  S
5900
5900
  ]) => {
5901
- const C = V(0), E = V(0), I = V(Il), A = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Re(), W = Re(), G = V(0), N = V(null), H = V({ column: 0, row: 0 }), L = Re(), X = Re(), O = V(!1), _ = V(0), z = V(!0), q = V(!1), oe = V(!1);
5901
+ const C = V(0), E = V(0), I = V(Il), A = V({ height: 0, width: 0 }), k = V({ height: 0, width: 0 }), M = Re(), W = Re(), G = V(0), N = V(null), $ = V({ column: 0, row: 0 }), L = Re(), X = Re(), O = V(!1), _ = V(0), z = V(!0), q = V(!1), oe = V(!1);
5902
5902
  Oe(
5903
5903
  B(
5904
5904
  g,
@@ -5934,7 +5934,7 @@ const xx = /* @__PURE__ */ je(
5934
5934
  pe(([, P]) => P != null)
5935
5935
  ),
5936
5936
  ([, P]) => {
5937
- P && (ye(A, P.viewport), ye(k, P.item), ye(H, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (J) => {
5937
+ P && (ye(A, P.viewport), ye(k, P.item), ye($, P.gap), P.scrollTop > 0 && (ye(O, !0), Lt(B(u, In(1)), (J) => {
5938
5938
  ye(O, !1);
5939
5939
  }), ye(c, { top: P.scrollTop })));
5940
5940
  }
@@ -5949,7 +5949,7 @@ const xx = /* @__PURE__ */ je(
5949
5949
  Je(
5950
5950
  he(A, Kr),
5951
5951
  he(k, Kr),
5952
- he(H, (P, J) => P && P.column === J.column && P.row === J.row),
5952
+ he($, (P, J) => P && P.column === J.column && P.row === J.row),
5953
5953
  he(u)
5954
5954
  ),
5955
5955
  re(([P, J, ne, le]) => ({
@@ -5965,7 +5965,7 @@ const xx = /* @__PURE__ */ je(
5965
5965
  Je(
5966
5966
  he(C),
5967
5967
  r,
5968
- he(H, vx),
5968
+ he($, vx),
5969
5969
  he(k, Kr),
5970
5970
  he(A, Kr),
5971
5971
  he(N),
@@ -5988,7 +5988,7 @@ const xx = /* @__PURE__ */ je(
5988
5988
  ce,
5989
5989
  Ae
5990
5990
  ]) => {
5991
- const { column: ve, row: $ } = le, { height: ae, width: Be } = ie, { width: nt } = Pe;
5991
+ const { column: ve, row: H } = le, { height: ae, width: Be } = ie, { width: nt } = Pe;
5992
5992
  if (Le === 0 && (P === 0 || nt === 0))
5993
5993
  return Il;
5994
5994
  if (Be === 0) {
@@ -5997,8 +5997,8 @@ const xx = /* @__PURE__ */ je(
5997
5997
  }
5998
5998
  const ut = Cu(nt, Be, ve);
5999
5999
  let rt, Qe;
6000
- ce ? J === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((J + $) / (ae + $)), Qe = ut * Nl((ne + $) / (ae + $)) - 1, Qe = Ms(P - 1, vr(Qe, ut - 1)), rt = Ms(Qe, vr(0, rt))) : (rt = 0, Qe = -1);
6001
- const Tt = Al(rt, Qe, Fe), { bottom: We, top: st } = kl(Pe, le, ie, Tt), Ge = Nl(P / ut), it = Ge * ae + (Ge - 1) * $ - We;
6000
+ ce ? J === 0 && ne === 0 && Le > 0 ? (rt = 0, Qe = Le - 1) : (rt = ut * Io((J + H) / (ae + H)), Qe = ut * Nl((ne + H) / (ae + H)) - 1, Qe = Ms(P - 1, vr(Qe, ut - 1)), rt = Ms(Qe, vr(0, rt))) : (rt = 0, Qe = -1);
6001
+ const Tt = Al(rt, Qe, Fe), { bottom: We, top: st } = kl(Pe, le, ie, Tt), Ge = Nl(P / ut), it = Ge * ae + (Ge - 1) * H - We;
6002
6002
  return { bottom: We, itemHeight: ae, items: Tt, itemWidth: Be, offsetBottom: it, offsetTop: st, top: st };
6003
6003
  }
6004
6004
  )
@@ -6013,13 +6013,13 @@ const xx = /* @__PURE__ */ je(
6013
6013
  C
6014
6014
  ), ue(
6015
6015
  B(
6016
- Je(A, k, I, H),
6016
+ Je(A, k, I, $),
6017
6017
  pe(([P, J, { items: ne }]) => ne.length > 0 && J.height !== 0 && P.height !== 0),
6018
6018
  re(([P, J, { items: ne }, le]) => {
6019
6019
  const { bottom: ie, top: Pe } = kl(P, le, J, ne);
6020
6020
  return [Pe, ie];
6021
6021
  }),
6022
- $e(Cr)
6022
+ He(Cr)
6023
6023
  ),
6024
6024
  t
6025
6025
  );
@@ -6042,14 +6042,14 @@ const xx = /* @__PURE__ */ je(
6042
6042
  return (ne || P.bottom > 0 && P.itemHeight > 0 && P.offsetBottom === 0 && P.items.length === J) && le;
6043
6043
  }),
6044
6044
  re(([[, P]]) => P - 1),
6045
- $e()
6045
+ He()
6046
6046
  )
6047
6047
  ), de = St(
6048
6048
  B(
6049
6049
  he(I),
6050
6050
  pe(({ items: P }) => P.length > 0 && P[0].index === 0),
6051
6051
  Gt(0),
6052
- $e()
6052
+ He()
6053
6053
  )
6054
6054
  ), be = St(
6055
6055
  B(
@@ -6060,14 +6060,14 @@ const xx = /* @__PURE__ */ je(
6060
6060
  endIndex: P[P.length - 1].index,
6061
6061
  startIndex: P[0].index
6062
6062
  })),
6063
- $e(tu),
6063
+ He(tu),
6064
6064
  nn(0)
6065
6065
  )
6066
6066
  );
6067
6067
  ue(be, x.scrollSeekRangeChanged), ue(
6068
6068
  B(
6069
6069
  M,
6070
- Se(A, k, C, H),
6070
+ Se(A, k, C, $),
6071
6071
  re(([P, J, ne, le, ie]) => {
6072
6072
  const Pe = iu(P), { align: Fe, behavior: Le, offset: ce } = Pe;
6073
6073
  let Ae = Pe.index;
@@ -6097,7 +6097,7 @@ const xx = /* @__PURE__ */ je(
6097
6097
  data: N,
6098
6098
  deviation: G,
6099
6099
  footerHeight: o,
6100
- gap: H,
6100
+ gap: $,
6101
6101
  headerHeight: s,
6102
6102
  increaseViewportBy: e,
6103
6103
  initialItemCount: E,
@@ -6133,7 +6133,7 @@ const xx = /* @__PURE__ */ je(
6133
6133
  ...S
6134
6134
  };
6135
6135
  },
6136
- He(Gi, ft, Br, fu, mn, Ki, pn)
6136
+ $e(Gi, ft, Br, fu, mn, Ki, pn)
6137
6137
  );
6138
6138
  function Cu(e, t, n) {
6139
6139
  return vr(1, Io((e + n) / (Io(t) + n)));
@@ -6154,7 +6154,7 @@ const bx = /* @__PURE__ */ je(() => {
6154
6154
  B(
6155
6155
  t,
6156
6156
  re((x) => x[h]),
6157
- $e()
6157
+ He()
6158
6158
  ),
6159
6159
  p
6160
6160
  ), u = V(!1), d = V(!1);
@@ -6178,7 +6178,7 @@ const bx = /* @__PURE__ */ je(() => {
6178
6178
  };
6179
6179
  }), wx = /* @__PURE__ */ je(
6180
6180
  ([e, t]) => ({ ...e, ...t }),
6181
- He(xx, bx)
6181
+ $e(xx, bx)
6182
6182
  ), yx = /* @__PURE__ */ K.memo(function() {
6183
6183
  const e = ze("gridState"), t = ze("listClassName"), n = ze("itemClassName"), r = ze("itemContent"), o = ze("computeItemKey"), s = ze("isSeeking"), i = Nt("scrollHeight"), a = ze("ItemComponent"), c = ze("ListComponent"), u = ze("ScrollSeekPlaceholder"), d = ze("context"), h = Nt("itemDimensions"), p = Nt("gap"), x = ze("log"), g = ze("stateRestoreInProgress"), v = Nt("reportReadyState"), m = Pn(
6184
6184
  K.useMemo(
@@ -6676,11 +6676,11 @@ function Bx(e, t) {
6676
6676
  return f.useReducer((n, r) => t[n][r] ?? n, e);
6677
6677
  }
6678
6678
  var vt = (e) => {
6679
- const { present: t, children: n } = e, r = $x(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = Te(r.ref, Hx(o));
6679
+ const { present: t, children: n } = e, r = Hx(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = Te(r.ref, $x(o));
6680
6680
  return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: s }) : null;
6681
6681
  };
6682
6682
  vt.displayName = "Presence";
6683
- function $x(e) {
6683
+ function Hx(e) {
6684
6684
  const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), s = f.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = Bx(i, {
6685
6685
  mounted: {
6686
6686
  UNMOUNT: "unmounted",
@@ -6732,7 +6732,7 @@ function $x(e) {
6732
6732
  function Yr(e) {
6733
6733
  return (e == null ? void 0 : e.animationName) || "none";
6734
6734
  }
6735
- function Hx(e) {
6735
+ function $x(e) {
6736
6736
  var r, o;
6737
6737
  let t = (r = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : r.get, n = t && "isReactWarning" in t && t.isReactWarning;
6738
6738
  return n ? e.ref : (t = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
@@ -6846,7 +6846,7 @@ function ea(e) {
6846
6846
  return e ? "open" : "closed";
6847
6847
  }
6848
6848
  var Yx = Nu;
6849
- const Ol = Yx, Ml = Au, ku = new URL("data:video/mp2t;base64,aW1wb3J0IHsgcGFyc2UgfSBmcm9tICdtYXJrZWQnOwoKY29uc3Qgc2NvcGU6IGFueSA9IHNlbGY7Cgpjb25zb2xlLmxvZygnW01hcmtkb3duV29ya2VyXSB3b3JrZXIgc2NyaXB0IGxvYWRlZCcpOwovLyBTaWduYWwgdG8gdGhlIG1haW4gdGhyZWFkIHRoYXQgdGhlIHdvcmtlciBpcyByZWFkeSB0byByZWNlaXZlIHdvcmsuCi8vIFRoaXMgaGVscHMgY2FsbGVycyBhdm9pZCBwb3N0aW5nIG1lc3NhZ2VzIGJlZm9yZSB0aGUgd29ya2VyIGhhcyBmaW5pc2hlZCBpbml0aWFsaXppbmcuCnNjb3BlLnBvc3RNZXNzYWdlPy4oeyBfX3dvcmtlcl9yZWFkeTogdHJ1ZSB9KTsKCnNjb3BlLmFkZEV2ZW50TGlzdGVuZXIoJ21lc3NhZ2UnLCAoZXZlbnQ6IE1lc3NhZ2VFdmVudCkgPT4gewogIGNvbnN0IHBheWxvYWQ6IGFueSA9IGV2ZW50Py5kYXRhID8/IHt9OwogIGNvbnN0IGlkID0gdHlwZW9mIHBheWxvYWQuaWQgPT09ICdzdHJpbmcnID8gcGF5bG9hZC5pZCA6IHVuZGVmaW5lZDsKICBjb25zdCBzb3VyY2UgPSB0eXBlb2YgcGF5bG9hZC5zb3VyY2UgPT09ICdzdHJpbmcnID8gcGF5bG9hZC5zb3VyY2UgOiB1bmRlZmluZWQ7CiAgaWYgKCFpZCB8fCB0eXBlb2Ygc291cmNlICE9PSAnc3RyaW5nJykgewogICAgcmV0dXJuOwogIH0KICB0cnkgewogICAgY29uc29sZS5sb2coJ1tNYXJrZG93bldvcmtlcl0gcmVjZWl2ZWQgd29yaycsIGlkLCAnc291cmNlTGVuJywgc291cmNlPy5sZW5ndGggPz8gMCk7CiAgICBjb25zdCBodG1sID0gcGFyc2Uoc291cmNlKTsKICAgIGNvbnNvbGUubG9nKCdbTWFya2Rvd25Xb3JrZXJdIHBhcnNlZCBodG1sIGxlbmd0aCcsIGh0bWw/Lmxlbmd0aCA/PyAwLCAnZm9yJywgaWQpOwogICAgLy8gUmV0dXJuIHRoZSBnZW5lcmF0ZWQgSFRNTCBmb3IgdGhlIGNhbGxlciB0byBjYWNoZSBhbmQgcmVuZGVyCiAgICAvLyBLZWVwIHRoZSBwYXlsb2FkIHNtYWxsOiBzZW5kIGlkICsgaHRtbAogICAgLy8gTWFya2VkIG91dHB1dCBzaG91bGQgYmUgc2FmZS1lbm91Z2ggZm9yIGludGVybmFsIFVJczsgY2FsbGVycyBtYXkgZnVydGhlciBzYW5pdGl6ZSBpZiByZXF1aXJlZC4KICAgIHNjb3BlLnBvc3RNZXNzYWdlKHsgaWQsIGh0bWwgfSk7CiAgfSBjYXRjaCAoZXJyKSB7CiAgICBjb25zb2xlLmVycm9yKCdbTWFya2Rvd25Xb3JrZXJdIHJlbmRlciBlcnJvcicsIGVycik7CiAgICBzY29wZS5wb3N0TWVzc2FnZSh7IGlkLCBodG1sOiBgPHByZT5FcnJvciByZW5kZXJpbmcgbWFya2Rvd246ICR7U3RyaW5nKGVycil9PC9wcmU+YCB9KTsKICB9Cn0pOwo=", import.meta.url), lo = ku.toString();
6849
+ const Ol = Yx, Ml = Au, ku = new URL("data:video/mp2t;base64,aW1wb3J0IHsgcGFyc2UgfSBmcm9tICdtYXJrZWQnOwoKY29uc3Qgc2NvcGUgPSBzZWxmOwoKY29uc29sZS5sb2coJ1tNYXJrZG93bldvcmtlcl0gd29ya2VyIHNjcmlwdCBsb2FkZWQnKTsKLy8gU2lnbmFsIHRvIHRoZSBtYWluIHRocmVhZCB0aGF0IHRoZSB3b3JrZXIgaXMgcmVhZHkgdG8gcmVjZWl2ZSB3b3JrLgovLyBUaGlzIGhlbHBzIGNhbGxlcnMgYXZvaWQgcG9zdGluZyBtZXNzYWdlcyBiZWZvcmUgdGhlIHdvcmtlciBoYXMgZmluaXNoZWQgaW5pdGlhbGl6aW5nLgpzY29wZS5wb3N0TWVzc2FnZT8uKHsgX193b3JrZXJfcmVhZHk6IHRydWUgfSk7CgpzY29wZS5hZGRFdmVudExpc3RlbmVyKCdtZXNzYWdlJywgKGV2ZW50OiBNZXNzYWdlRXZlbnQpID0+IHsKICBjb25zdCBwYXlsb2FkOiBhbnkgPSBldmVudD8uZGF0YSA/PyB7fTsKICBjb25zdCBpZCA9IHR5cGVvZiBwYXlsb2FkLmlkID09PSAnc3RyaW5nJyA/IHBheWxvYWQuaWQgOiB1bmRlZmluZWQ7CiAgY29uc3Qgc291cmNlID0gdHlwZW9mIHBheWxvYWQuc291cmNlID09PSAnc3RyaW5nJyA/IHBheWxvYWQuc291cmNlIDogdW5kZWZpbmVkOwogIGlmICghaWQgfHwgdHlwZW9mIHNvdXJjZSAhPT0gJ3N0cmluZycpIHsKICAgIHJldHVybjsKICB9CiAgdHJ5IHsKICAgIGNvbnNvbGUubG9nKCdbTWFya2Rvd25Xb3JrZXJdIHJlY2VpdmVkIHdvcmsnLCBpZCwgJ3NvdXJjZUxlbicsIHNvdXJjZT8ubGVuZ3RoID8/IDApOwogICAgY29uc3QgaHRtbCA9IHBhcnNlKHNvdXJjZSk7CiAgICBjb25zb2xlLmxvZygnW01hcmtkb3duV29ya2VyXSBwYXJzZWQgaHRtbCBsZW5ndGgnLCBodG1sPy5sZW5ndGggPz8gMCwgJ2ZvcicsIGlkKTsKICAgIC8vIFJldHVybiB0aGUgZ2VuZXJhdGVkIEhUTUwgZm9yIHRoZSBjYWxsZXIgdG8gY2FjaGUgYW5kIHJlbmRlcgogICAgLy8gS2VlcCB0aGUgcGF5bG9hZCBzbWFsbDogc2VuZCBpZCArIGh0bWwKICAgIC8vIE1hcmtlZCBvdXRwdXQgc2hvdWxkIGJlIHNhZmUtZW5vdWdoIGZvciBpbnRlcm5hbCBVSXM7IGNhbGxlcnMgbWF5IGZ1cnRoZXIgc2FuaXRpemUgaWYgcmVxdWlyZWQuCiAgICBzY29wZS5wb3N0TWVzc2FnZSh7IGlkLCBodG1sIH0pOwogIH0gY2F0Y2ggKGVycikgewogICAgY29uc29sZS5lcnJvcignW01hcmtkb3duV29ya2VyXSByZW5kZXIgZXJyb3InLCBlcnIpOwogICAgc2NvcGUucG9zdE1lc3NhZ2UoeyBpZCwgaHRtbDogYDxwcmU+RXJyb3IgcmVuZGVyaW5nIG1hcmtkb3duOiAke1N0cmluZyhlcnIpfTwvcHJlPmAgfSk7CiAgfQp9KTsK", import.meta.url), lo = ku.toString();
6850
6850
  console.log("[MarkdownContent] worker url", lo);
6851
6851
  const fi = [];
6852
6852
  let hi = !1;
@@ -7172,7 +7172,7 @@ var sb = "DismissableLayer", mi = "dismissableLayer.update", ib = "dismissableLa
7172
7172
  layers: /* @__PURE__ */ new Set(),
7173
7173
  layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
7174
7174
  branches: /* @__PURE__ */ new Set()
7175
- }), $r = f.forwardRef(
7175
+ }), Hr = f.forwardRef(
7176
7176
  (e, t) => {
7177
7177
  const {
7178
7178
  disableOutsidePointerEvents: n = !1,
@@ -7193,11 +7193,11 @@ var sb = "DismissableLayer", mi = "dismissableLayer.update", ib = "dismissableLa
7193
7193
  w === u.layers.size - 1 && (r == null || r(E), !E.defaultPrevented && a && (E.preventDefault(), a()));
7194
7194
  }, p), f.useEffect(() => {
7195
7195
  if (d)
7196
- return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Bl = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), $l(), () => {
7196
+ return n && (u.layersWithOutsidePointerEventsDisabled.size === 0 && (Bl = p.body.style.pointerEvents, p.body.style.pointerEvents = "none"), u.layersWithOutsidePointerEventsDisabled.add(d)), u.layers.add(d), Hl(), () => {
7197
7197
  n && u.layersWithOutsidePointerEventsDisabled.size === 1 && (p.body.style.pointerEvents = Bl);
7198
7198
  };
7199
7199
  }, [d, p, n, u]), f.useEffect(() => () => {
7200
- d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), $l());
7200
+ d && (u.layers.delete(d), u.layersWithOutsidePointerEventsDisabled.delete(d), Hl());
7201
7201
  }, [d, u]), f.useEffect(() => {
7202
7202
  const E = () => x({});
7203
7203
  return document.addEventListener(mi, E), () => document.removeEventListener(mi, E);
@@ -7220,7 +7220,7 @@ var sb = "DismissableLayer", mi = "dismissableLayer.update", ib = "dismissableLa
7220
7220
  );
7221
7221
  }
7222
7222
  );
7223
- $r.displayName = sb;
7223
+ Hr.displayName = sb;
7224
7224
  var lb = "DismissableLayerBranch", cb = f.forwardRef((e, t) => {
7225
7225
  const n = f.useContext(Ou), r = f.useRef(null), o = Te(t, r);
7226
7226
  return f.useEffect(() => {
@@ -7276,7 +7276,7 @@ function db(e, t = globalThis == null ? void 0 : globalThis.document) {
7276
7276
  onBlurCapture: () => r.current = !1
7277
7277
  };
7278
7278
  }
7279
- function $l() {
7279
+ function Hl() {
7280
7280
  const e = new CustomEvent(mi);
7281
7281
  document.dispatchEvent(e);
7282
7282
  }
@@ -7284,7 +7284,7 @@ function Mu(e, t, n, { discrete: r }) {
7284
7284
  const o = n.originalEvent.target, s = new CustomEvent(e, { bubbles: !1, cancelable: !0, detail: n });
7285
7285
  t && o.addEventListener(e, t, { once: !0 }), r ? Iu(o, s) : o.dispatchEvent(s);
7286
7286
  }
7287
- var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", Hl = { bubbles: !1, cancelable: !0 }, fb = "FocusScope", Zo = f.forwardRef((e, t) => {
7287
+ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", $l = { bubbles: !1, cancelable: !0 }, fb = "FocusScope", Zo = f.forwardRef((e, t) => {
7288
7288
  const {
7289
7289
  loop: n = !1,
7290
7290
  trapped: r = !1,
@@ -7326,12 +7326,12 @@ var Fs = "focusScope.autoFocusOnMount", Bs = "focusScope.autoFocusOnUnmount", Hl
7326
7326
  Ul.add(x);
7327
7327
  const v = document.activeElement;
7328
7328
  if (!a.contains(v)) {
7329
- const b = new CustomEvent(Fs, Hl);
7329
+ const b = new CustomEvent(Fs, $l);
7330
7330
  a.addEventListener(Fs, u), a.dispatchEvent(b), b.defaultPrevented || (hb(xb(Du(a)), { select: !0 }), document.activeElement === v && sn(a));
7331
7331
  }
7332
7332
  return () => {
7333
7333
  a.removeEventListener(Fs, u), setTimeout(() => {
7334
- const b = new CustomEvent(Bs, Hl);
7334
+ const b = new CustomEvent(Bs, $l);
7335
7335
  a.addEventListener(Bs, d), a.dispatchEvent(b), b.defaultPrevented || sn(v ?? document.body, { select: !0 }), a.removeEventListener(Bs, d), Ul.remove(x);
7336
7336
  }, 0);
7337
7337
  };
@@ -7421,12 +7421,12 @@ var bb = "Portal", Jo = f.forwardRef((e, t) => {
7421
7421
  return i ? xc.createPortal(/* @__PURE__ */ l.jsx(me.div, { ...r, ref: t }), i) : null;
7422
7422
  });
7423
7423
  Jo.displayName = bb;
7424
- var $s = 0;
7424
+ var Hs = 0;
7425
7425
  function na() {
7426
7426
  f.useEffect(() => {
7427
7427
  const e = document.querySelectorAll("[data-radix-focus-guard]");
7428
- return document.body.insertAdjacentElement("afterbegin", e[0] ?? Vl()), document.body.insertAdjacentElement("beforeend", e[1] ?? Vl()), $s++, () => {
7429
- $s === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), $s--;
7428
+ return document.body.insertAdjacentElement("afterbegin", e[0] ?? Vl()), document.body.insertAdjacentElement("beforeend", e[1] ?? Vl()), Hs++, () => {
7429
+ Hs === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((t) => t.remove()), Hs--;
7430
7430
  };
7431
7431
  }, []);
7432
7432
  }
@@ -7457,7 +7457,7 @@ function wb(e, t, n) {
7457
7457
  return e.concat(s || Array.prototype.slice.call(t));
7458
7458
  }
7459
7459
  var fo = "right-scroll-bar-position", ho = "width-before-scroll-bar", yb = "with-scroll-bars-hidden", Sb = "--removed-body-scroll-bar-size";
7460
- function Hs(e, t) {
7460
+ function $s(e, t) {
7461
7461
  return typeof e == "function" ? e(t) : e && (e.current = t), e;
7462
7462
  }
7463
7463
  function Cb(e, t) {
@@ -7485,7 +7485,7 @@ var Tb = typeof window < "u" ? f.useLayoutEffect : f.useEffect, Gl = /* @__PURE_
7485
7485
  function Eb(e, t) {
7486
7486
  var n = Cb(null, function(r) {
7487
7487
  return e.forEach(function(o) {
7488
- return Hs(o, r);
7488
+ return $s(o, r);
7489
7489
  });
7490
7490
  });
7491
7491
  return Tb(function() {
@@ -7493,9 +7493,9 @@ function Eb(e, t) {
7493
7493
  if (r) {
7494
7494
  var o = new Set(r), s = new Set(e), i = n.current;
7495
7495
  o.forEach(function(a) {
7496
- s.has(a) || Hs(a, null);
7496
+ s.has(a) || $s(a, null);
7497
7497
  }), s.forEach(function(a) {
7498
- o.has(a) || Hs(a, i);
7498
+ o.has(a) || $s(a, i);
7499
7499
  });
7500
7500
  }
7501
7501
  Gl.set(n, e);
@@ -7638,7 +7638,7 @@ var Ob = function() {
7638
7638
  };
7639
7639
  }, [t && n]);
7640
7640
  };
7641
- }, $u = function() {
7641
+ }, Hu = function() {
7642
7642
  var e = Mb(), t = function(n) {
7643
7643
  var r = n.styles, o = n.dynamic;
7644
7644
  return e(r, o), null;
@@ -7664,7 +7664,7 @@ var Ob = function() {
7664
7664
  right: t[2],
7665
7665
  gap: Math.max(0, r - n + t[2] - t[0])
7666
7666
  };
7667
- }, Bb = $u(), Gn = "data-scroll-locked", $b = function(e, t, n, r) {
7667
+ }, Bb = Hu(), Gn = "data-scroll-locked", Hb = function(e, t, n, r) {
7668
7668
  var o = e.left, s = e.top, i = e.right, a = e.gap;
7669
7669
  return n === void 0 && (n = "margin"), `
7670
7670
  .`.concat(yb, ` {
@@ -7711,7 +7711,7 @@ var Ob = function() {
7711
7711
  }, Kl = function() {
7712
7712
  var e = parseInt(document.body.getAttribute(Gn) || "0", 10);
7713
7713
  return isFinite(e) ? e : 0;
7714
- }, Hb = function() {
7714
+ }, $b = function() {
7715
7715
  f.useEffect(function() {
7716
7716
  return document.body.setAttribute(Gn, (Kl() + 1).toString()), function() {
7717
7717
  var e = Kl() - 1;
@@ -7720,11 +7720,11 @@ var Ob = function() {
7720
7720
  }, []);
7721
7721
  }, zb = function(e) {
7722
7722
  var t = e.noRelative, n = e.noImportant, r = e.gapMode, o = r === void 0 ? "margin" : r;
7723
- Hb();
7723
+ $b();
7724
7724
  var s = f.useMemo(function() {
7725
7725
  return Fb(o);
7726
7726
  }, [o]);
7727
- return f.createElement(Bb, { styles: $b(s, !t, o, n ? "" : "!important") });
7727
+ return f.createElement(Bb, { styles: Hb(s, !t, o, n ? "" : "!important") });
7728
7728
  }, gi = !1;
7729
7729
  if (typeof window < "u")
7730
7730
  try {
@@ -7739,7 +7739,7 @@ if (typeof window < "u")
7739
7739
  }
7740
7740
  var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7741
7741
  return e.tagName === "TEXTAREA";
7742
- }, Hu = function(e, t) {
7742
+ }, $u = function(e, t) {
7743
7743
  if (!(e instanceof Element))
7744
7744
  return !1;
7745
7745
  var n = window.getComputedStyle(e);
@@ -7749,9 +7749,9 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7749
7749
  !(n.overflowY === n.overflowX && !Ub(e) && n[t] === "visible")
7750
7750
  );
7751
7751
  }, Wb = function(e) {
7752
- return Hu(e, "overflowY");
7752
+ return $u(e, "overflowY");
7753
7753
  }, Vb = function(e) {
7754
- return Hu(e, "overflowX");
7754
+ return $u(e, "overflowX");
7755
7755
  }, Yl = function(e, t) {
7756
7756
  var n = t.ownerDocument, r = t;
7757
7757
  do {
@@ -7813,9 +7813,9 @@ var Bn = gi ? { passive: !1 } : !1, Ub = function(e) {
7813
7813
  .block-interactivity-`.concat(e, ` {pointer-events: none;}
7814
7814
  .allow-interactivity-`).concat(e, ` {pointer-events: all;}
7815
7815
  `);
7816
- }, Jb = 0, $n = [];
7816
+ }, Jb = 0, Hn = [];
7817
7817
  function Qb(e) {
7818
- var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Jb++)[0], s = f.useState($u)[0], i = f.useRef(e);
7818
+ var t = f.useRef([]), n = f.useRef([0, 0]), r = f.useRef(), o = f.useState(Jb++)[0], s = f.useState(Hu)[0], i = f.useRef(e);
7819
7819
  f.useEffect(function() {
7820
7820
  i.current = e;
7821
7821
  }, [e]), f.useEffect(function() {
@@ -7848,7 +7848,7 @@ function Qb(e) {
7848
7848
  return Xb(A, m, v, A === "h" ? y : R);
7849
7849
  }, []), c = f.useCallback(function(v) {
7850
7850
  var m = v;
7851
- if (!(!$n.length || $n[$n.length - 1] !== s)) {
7851
+ if (!(!Hn.length || Hn[Hn.length - 1] !== s)) {
7852
7852
  var b = "deltaY" in m ? Xl(m) : Zr(m), w = t.current.filter(function(S) {
7853
7853
  return S.name === m.type && (S.target === m.target || m.target === S.shadowParent) && qb(S.delta, b);
7854
7854
  })[0];
@@ -7878,12 +7878,12 @@ function Qb(e) {
7878
7878
  u(v.type, Zr(v), v.target, a(v, e.lockRef.current));
7879
7879
  }, []);
7880
7880
  f.useEffect(function() {
7881
- return $n.push(s), e.setCallbacks({
7881
+ return Hn.push(s), e.setCallbacks({
7882
7882
  onScrollCapture: h,
7883
7883
  onWheelCapture: h,
7884
7884
  onTouchMoveCapture: p
7885
7885
  }), document.addEventListener("wheel", c, Bn), document.addEventListener("touchmove", c, Bn), document.addEventListener("touchstart", d, Bn), function() {
7886
- $n = $n.filter(function(v) {
7886
+ Hn = Hn.filter(function(v) {
7887
7887
  return v !== s;
7888
7888
  }), document.removeEventListener("wheel", c, Bn), document.removeEventListener("touchmove", c, Bn), document.removeEventListener("touchstart", d, Bn);
7889
7889
  };
@@ -7911,7 +7911,7 @@ var nw = function(e) {
7911
7911
  return null;
7912
7912
  var t = Array.isArray(e) ? e[0] : e;
7913
7913
  return t.ownerDocument.body;
7914
- }, Hn = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Qr = {}, Ws = 0, Wu = function(e) {
7914
+ }, $n = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Qr = {}, Ws = 0, Wu = function(e) {
7915
7915
  return e && (e.host || Wu(e.parentNode));
7916
7916
  }, rw = function(e, t) {
7917
7917
  return t.map(function(n) {
@@ -7935,8 +7935,8 @@ var nw = function(e) {
7935
7935
  d(p);
7936
7936
  else
7937
7937
  try {
7938
- var x = p.getAttribute(r), g = x !== null && x !== "false", v = (Hn.get(p) || 0) + 1, m = (s.get(p) || 0) + 1;
7939
- Hn.set(p, v), s.set(p, m), i.push(p), v === 1 && g && Jr.set(p, !0), m === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
7938
+ var x = p.getAttribute(r), g = x !== null && x !== "false", v = ($n.get(p) || 0) + 1, m = (s.get(p) || 0) + 1;
7939
+ $n.set(p, v), s.set(p, m), i.push(p), v === 1 && g && Jr.set(p, !0), m === 1 && p.setAttribute(n, "true"), g || p.setAttribute(r, "true");
7940
7940
  } catch (b) {
7941
7941
  console.error("aria-hidden: cannot operate on ", p, b);
7942
7942
  }
@@ -7944,9 +7944,9 @@ var nw = function(e) {
7944
7944
  };
7945
7945
  return d(t), a.clear(), Ws++, function() {
7946
7946
  i.forEach(function(h) {
7947
- var p = Hn.get(h) - 1, x = s.get(h) - 1;
7948
- Hn.set(h, p), s.set(h, x), p || (Jr.has(h) || h.removeAttribute(r), Jr.delete(h)), x || h.removeAttribute(n);
7949
- }), Ws--, Ws || (Hn = /* @__PURE__ */ new WeakMap(), Hn = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Qr = {});
7947
+ var p = $n.get(h) - 1, x = s.get(h) - 1;
7948
+ $n.set(h, p), s.set(h, x), p || (Jr.has(h) || h.removeAttribute(r), Jr.delete(h)), x || h.removeAttribute(n);
7949
+ }), Ws--, Ws || ($n = /* @__PURE__ */ new WeakMap(), $n = /* @__PURE__ */ new WeakMap(), Jr = /* @__PURE__ */ new WeakMap(), Qr = {});
7950
7950
  };
7951
7951
  }, ra = function(e, t, n) {
7952
7952
  n === void 0 && (n = "data-aria-hidden");
@@ -8107,7 +8107,7 @@ var cw = f.forwardRef(
8107
8107
  onMountAutoFocus: o,
8108
8108
  onUnmountAutoFocus: s,
8109
8109
  children: /* @__PURE__ */ l.jsx(
8110
- $r,
8110
+ Hr,
8111
8111
  {
8112
8112
  role: "dialog",
8113
8113
  id: a.contentId,
@@ -8321,7 +8321,7 @@ function xw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8321
8321
  title: r
8322
8322
  }
8323
8323
  ) }) : o.startsWith("text/") || o.includes("json") || o.includes("xml") ? /* @__PURE__ */ l.jsx("div", { className: "bg-gray-50 dark:bg-gray-900 rounded-lg p-4 max-h-[70vh] overflow-auto", children: /* @__PURE__ */ l.jsx("pre", { className: "whitespace-pre-wrap font-mono text-sm", children: a }) }) : /* @__PURE__ */ l.jsxs("div", { className: "flex flex-col items-center justify-center py-12 text-center", children: [
8324
- /* @__PURE__ */ l.jsx($a, { className: "h-16 w-16 text-gray-400 mb-4" }),
8324
+ /* @__PURE__ */ l.jsx(Ha, { className: "h-16 w-16 text-gray-400 mb-4" }),
8325
8325
  /* @__PURE__ */ l.jsx("p", { className: "text-lg font-medium mb-2", children: r }),
8326
8326
  /* @__PURE__ */ l.jsxs("p", { className: "text-sm text-muted-foreground mb-4", children: [
8327
8327
  o,
@@ -8330,7 +8330,7 @@ function xw({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
8330
8330
  " bytes"
8331
8331
  ] }),
8332
8332
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "This file type cannot be previewed. Use download or external view." })
8333
- ] }) : /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ l.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), m = () => o.startsWith("image/") ? /* @__PURE__ */ l.jsx(bc, { className: "h-5 w-5" }) : /* @__PURE__ */ l.jsx($a, { className: "h-5 w-5" });
8333
+ ] }) : /* @__PURE__ */ l.jsx("div", { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ l.jsx("p", { className: "text-muted-foreground", children: "No content to display" }) }), m = () => o.startsWith("image/") ? /* @__PURE__ */ l.jsx(bc, { className: "h-5 w-5" }) : /* @__PURE__ */ l.jsx(Ha, { className: "h-5 w-5" });
8334
8334
  return /* @__PURE__ */ l.jsx(mw, { open: e, onOpenChange: t, children: /* @__PURE__ */ l.jsxs(dd, { className: "max-w-4xl max-h-[90vh] overflow-hidden", children: [
8335
8335
  /* @__PURE__ */ l.jsx(fd, { children: /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
8336
8336
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-3", children: [
@@ -8415,7 +8415,7 @@ const ww = K.memo(function({
8415
8415
  }) {
8416
8416
  const [y, R] = fe(!1), [S, C] = fe(!1), [E, I] = fe(!1), [A, k] = fe(!1), { currentThreadId: M } = Fi();
8417
8417
  ta();
8418
- const [W, G] = fe({}), [N, H] = fe(!1), [L, X] = fe(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", q = K.useMemo(() => {
8418
+ const [W, G] = fe({}), [N, $] = fe(!1), [L, X] = fe(null), O = u === "phone" || u === "half-screen", _ = t.role, z = _ === "tool", q = K.useMemo(() => {
8419
8419
  switch (_) {
8420
8420
  case "user":
8421
8421
  return "text-[hsl(var(--chat-bubble-user-text))]";
@@ -8454,7 +8454,7 @@ const ww = K.memo(function({
8454
8454
  const Ae = D(O ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", q);
8455
8455
  switch (_) {
8456
8456
  case "user":
8457
- return /* @__PURE__ */ l.jsx($p, { className: Ae });
8457
+ return /* @__PURE__ */ l.jsx(Hp, { className: Ae });
8458
8458
  case "assistant":
8459
8459
  return /* @__PURE__ */ l.jsx(Ua, { className: Ae });
8460
8460
  case "tool":
@@ -8515,12 +8515,12 @@ const ww = K.memo(function({
8515
8515
  }
8516
8516
  }, Fe = () => {
8517
8517
  if (t.model === "reflection") {
8518
- const ve = oe.trim(), $ = Vs(ve);
8519
- if ($ && typeof $ == "object")
8520
- return /* @__PURE__ */ l.jsx(jw, { data: $ });
8518
+ const ve = oe.trim(), H = Vs(ve);
8519
+ if (H && typeof H == "object")
8520
+ return /* @__PURE__ */ l.jsx(jw, { data: H });
8521
8521
  }
8522
8522
  if (z && F.name === "get_issues") {
8523
- const ve = t.content.find((Be) => Be.type === "tool_result"), $ = (ve == null ? void 0 : ve.output) ?? zn(t.content), ae = md($);
8523
+ const ve = t.content.find((Be) => Be.type === "tool_result"), H = (ve == null ? void 0 : ve.output) ?? zn(t.content), ae = md(H);
8524
8524
  if (ae) return /* @__PURE__ */ l.jsx(Aw, { issues: ae });
8525
8525
  }
8526
8526
  if (z && !E) {
@@ -8531,10 +8531,10 @@ const ww = K.memo(function({
8531
8531
  ] }) });
8532
8532
  }
8533
8533
  if (z && d) {
8534
- const ve = zn(t.content), $ = ve.length > h;
8534
+ const ve = zn(t.content), H = ve.length > h;
8535
8535
  return /* @__PURE__ */ l.jsx(Ol, { open: S, onOpenChange: C, children: /* @__PURE__ */ l.jsxs("div", { className: "font-mono text-sm text-current", children: [
8536
- /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: $ && !S ? ve.substring(0, h) + "..." : ve }),
8537
- $ && /* @__PURE__ */ l.jsx(Ml, { asChild: !0, children: /* @__PURE__ */ l.jsx(ke, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8536
+ /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: H && !S ? ve.substring(0, h) + "..." : ve }),
8537
+ H && /* @__PURE__ */ l.jsx(Ml, { asChild: !0, children: /* @__PURE__ */ l.jsx(ke, { variant: "ghost", size: "sm", className: "h-6 text-xs text-current", children: S ? /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8538
8538
  /* @__PURE__ */ l.jsx(hr, { className: "h-3 w-3 mr-1" }),
8539
8539
  "Show less"
8540
8540
  ] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
@@ -8549,8 +8549,8 @@ const ww = K.memo(function({
8549
8549
  const ve = kw(t.content);
8550
8550
  if (ve && Sw(ve))
8551
8551
  return /* @__PURE__ */ l.jsx(Xr, { content: ve.trim() });
8552
- const $ = zn(t.content);
8553
- return /* @__PURE__ */ l.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: $ }) });
8552
+ const H = zn(t.content);
8553
+ return /* @__PURE__ */ l.jsx("div", { className: "font-mono text-sm text-current", children: /* @__PURE__ */ l.jsx("pre", { className: D("whitespace-pre-wrap break-words text-current", O && "text-xs"), children: H }) });
8554
8554
  }
8555
8555
  const ce = Q.length > 0 && _ !== "tool", Ae = de.length > 0 && _ !== "tool" && !1;
8556
8556
  return /* @__PURE__ */ l.jsxs("div", { children: [
@@ -8564,11 +8564,11 @@ const ww = K.memo(function({
8564
8564
  const ve = Vs(oe.trim());
8565
8565
  if (ve !== null) return /* @__PURE__ */ l.jsx(Zl, { data: ve });
8566
8566
  if (_ === "user" && p) {
8567
- const $ = oe.trim();
8568
- if ($.length > x)
8567
+ const H = oe.trim();
8568
+ if (H.length > x)
8569
8569
  return /* @__PURE__ */ l.jsxs(Ol, { open: A, onOpenChange: k, children: [
8570
- /* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: A ? /* @__PURE__ */ l.jsx(Xr, { content: $ }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8571
- $.substring(0, x),
8570
+ /* @__PURE__ */ l.jsx("div", { className: D("text-sm text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: A ? /* @__PURE__ */ l.jsx(Xr, { content: H }) : /* @__PURE__ */ l.jsxs("pre", { className: D("font-sans whitespace-pre-wrap break-words bg-transparent p-0 m-0 text-[hsl(var(--chat-bubble-user-text))]", O && "text-xs"), children: [
8571
+ H.substring(0, x),
8572
8572
  "..."
8573
8573
  ] }) }),
8574
8574
  /* @__PURE__ */ l.jsx(Ml, { asChild: !0, children: /* @__PURE__ */ l.jsx(
@@ -8583,7 +8583,7 @@ const ww = K.memo(function({
8583
8583
  ] }) : /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
8584
8584
  /* @__PURE__ */ l.jsx(Un, { className: "h-3 w-3 mr-1" }),
8585
8585
  " Show more (",
8586
- $.length - x,
8586
+ H.length - x,
8587
8587
  " chars)"
8588
8588
  ] })
8589
8589
  }
@@ -8592,13 +8592,13 @@ const ww = K.memo(function({
8592
8592
  }
8593
8593
  return /* @__PURE__ */ l.jsx(Xr, { content: oe.trim() });
8594
8594
  })(),
8595
- ce && /* @__PURE__ */ l.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Q.map((ve, $) => /* @__PURE__ */ l.jsxs("div", { className: "relative border rounded overflow-hidden", children: [
8595
+ ce && /* @__PURE__ */ l.jsx("div", { className: "mt-2 grid grid-cols-2 gap-2", children: Q.map((ve, H) => /* @__PURE__ */ l.jsxs("div", { className: "relative border rounded overflow-hidden", children: [
8596
8596
  /* @__PURE__ */ l.jsx("img", { src: ve.url, alt: ve.alt ?? "image", className: "w-full h-auto" }),
8597
8597
  /* @__PURE__ */ l.jsxs("div", { className: "absolute top-1 right-1 bg-background/70 rounded px-1 py-0.5 text-[10px] flex items-center gap-1", children: [
8598
8598
  /* @__PURE__ */ l.jsx(bc, { className: "h-3 w-3" }),
8599
8599
  /* @__PURE__ */ l.jsx("span", { children: "image" })
8600
8600
  ] })
8601
- ] }, $)) }),
8601
+ ] }, H)) }),
8602
8602
  Ae
8603
8603
  ] });
8604
8604
  }, Le = wn(() => Iw(t), [t]);
@@ -8667,7 +8667,7 @@ const ww = K.memo(function({
8667
8667
  onClick: Y,
8668
8668
  className: D("h-6 w-6 p-0 hover:bg-foreground/10", q, O && "h-5 w-5"),
8669
8669
  children: /* @__PURE__ */ l.jsx(
8670
- Ha,
8670
+ $a,
8671
8671
  {
8672
8672
  className: D(
8673
8673
  y ? "text-success" : q,
@@ -8731,7 +8731,7 @@ const ww = K.memo(function({
8731
8731
  size: "sm",
8732
8732
  onClick: Y,
8733
8733
  className: D("h-6 w-6 p-0 hover:bg-background/50 text-current", O && "h-5 w-5"),
8734
- children: /* @__PURE__ */ l.jsx(Ha, { className: D(y ? "text-success" : "text-current", O ? "h-3 w-3" : "h-4 w-4") })
8734
+ children: /* @__PURE__ */ l.jsx($a, { className: D(y ? "text-success" : "text-current", O ? "h-3 w-3" : "h-4 w-4") })
8735
8735
  }
8736
8736
  ),
8737
8737
  _ === "user" && v && /* @__PURE__ */ l.jsx(
@@ -8763,7 +8763,7 @@ const ww = K.memo(function({
8763
8763
  {
8764
8764
  isOpen: N,
8765
8765
  onClose: () => {
8766
- H(!1), X(null);
8766
+ $(!1), X(null);
8767
8767
  },
8768
8768
  fileId: L.id,
8769
8769
  fileName: L.name,
@@ -9120,13 +9120,13 @@ function Xt(e) {
9120
9120
  function ua(e) {
9121
9121
  return la(Xt(e));
9122
9122
  }
9123
- function $w(e, t, n) {
9123
+ function Hw(e, t, n) {
9124
9124
  n === void 0 && (n = !1);
9125
9125
  const r = or(e), o = ua(e), s = ca(o);
9126
9126
  let i = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
9127
9127
  return t.reference[s] > t.floating[s] && (i = ko(i)), [i, ko(i)];
9128
9128
  }
9129
- function Hw(e) {
9129
+ function $w(e) {
9130
9130
  const t = ko(e);
9131
9131
  return [xi(e), t, xi(t)];
9132
9132
  }
@@ -9367,12 +9367,12 @@ const Yw = (e) => ({
9367
9367
  }, x = ua(o), g = ca(x), v = await i.getDimensions(u), m = x === "y", b = m ? "top" : "left", w = m ? "bottom" : "right", y = m ? "clientHeight" : "clientWidth", R = s.reference[g] + s.reference[x] - p[x] - s.floating[g], S = p[x] - s.reference[x], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u));
9368
9368
  let E = C ? C[y] : 0;
9369
9369
  (!E || !await (i.isElement == null ? void 0 : i.isElement(C))) && (E = a.floating[y] || s.floating[g]);
9370
- const I = R / 2 - S / 2, A = E / 2 - v[g] / 2 - 1, k = dn(h[b], A), M = dn(h[w], A), W = k, G = E - v[g] - M, N = E / 2 - v[g] / 2 + I, H = vi(W, N, G), L = !c.arrow && or(o) != null && N !== H && s.reference[g] / 2 - (N < W ? k : M) - v[g] / 2 < 0, X = L ? N < W ? N - W : N - G : 0;
9370
+ const I = R / 2 - S / 2, A = E / 2 - v[g] / 2 - 1, k = dn(h[b], A), M = dn(h[w], A), W = k, G = E - v[g] - M, N = E / 2 - v[g] / 2 + I, $ = vi(W, N, G), L = !c.arrow && or(o) != null && N !== $ && s.reference[g] / 2 - (N < W ? k : M) - v[g] / 2 < 0, X = L ? N < W ? N - W : N - G : 0;
9371
9371
  return {
9372
9372
  [x]: p[x] + X,
9373
9373
  data: {
9374
- [x]: H,
9375
- centerOffset: N - H - X,
9374
+ [x]: $,
9375
+ centerOffset: N - $ - X,
9376
9376
  ...L && {
9377
9377
  alignmentOffset: X
9378
9378
  }
@@ -9404,12 +9404,12 @@ const Yw = (e) => ({
9404
9404
  } = rn(e, t);
9405
9405
  if ((n = s.arrow) != null && n.alignmentOffset)
9406
9406
  return {};
9407
- const b = on(o), w = Xt(a), y = on(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !v ? [ko(a)] : Hw(a)), C = g !== "none";
9407
+ const b = on(o), w = Xt(a), y = on(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = p || (y || !v ? [ko(a)] : $w(a)), C = g !== "none";
9408
9408
  !p && C && S.push(...Vw(a, v, g, R));
9409
9409
  const E = [a, ...S], I = await Rr(t, m), A = [];
9410
9410
  let k = ((r = s.flip) == null ? void 0 : r.overflows) || [];
9411
9411
  if (d && A.push(I[b]), h) {
9412
- const N = $w(o, i, R);
9412
+ const N = Hw(o, i, R);
9413
9413
  A.push(I[N[0]], I[N[1]]);
9414
9414
  }
9415
9415
  if (k = [...k, {
@@ -9417,8 +9417,8 @@ const Yw = (e) => ({
9417
9417
  overflows: A
9418
9418
  }], !A.every((N) => N <= 0)) {
9419
9419
  var M, W;
9420
- const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, H = E[N];
9421
- if (H && (!(h === "alignment" ? w !== Xt(H) : !1) || // We leave the current main axis only if every placement on that axis
9420
+ const N = (((M = s.flip) == null ? void 0 : M.index) || 0) + 1, $ = E[N];
9421
+ if ($ && (!(h === "alignment" ? w !== Xt($) : !1) || // We leave the current main axis only if every placement on that axis
9422
9422
  // overflows the main axis.
9423
9423
  k.every((O) => Xt(O.placement) === w ? O.overflows[0] > 0 : !0)))
9424
9424
  return {
@@ -9427,7 +9427,7 @@ const Yw = (e) => ({
9427
9427
  overflows: k
9428
9428
  },
9429
9429
  reset: {
9430
- placement: H
9430
+ placement: $
9431
9431
  }
9432
9432
  };
9433
9433
  let L = (W = k.filter((X) => X.overflows[0] <= 0).sort((X, O) => X.overflows[1] - O.overflows[1])[0]) == null ? void 0 : W.placement;
@@ -9720,7 +9720,7 @@ function Qt(e) {
9720
9720
  function xd(e) {
9721
9721
  return is() ? e instanceof Node || e instanceof Ct(e).Node : !1;
9722
9722
  }
9723
- function $t(e) {
9723
+ function Ht(e) {
9724
9724
  return is() ? e instanceof Element || e instanceof Ct(e).Element : !1;
9725
9725
  }
9726
9726
  function Zt(e) {
@@ -9730,13 +9730,13 @@ function rc(e) {
9730
9730
  return !is() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Ct(e).ShadowRoot;
9731
9731
  }
9732
9732
  const ny = /* @__PURE__ */ new Set(["inline", "contents"]);
9733
- function Hr(e) {
9733
+ function $r(e) {
9734
9734
  const {
9735
9735
  overflow: t,
9736
9736
  overflowX: n,
9737
9737
  overflowY: r,
9738
9738
  display: o
9739
- } = Ht(e);
9739
+ } = $t(e);
9740
9740
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !ny.has(o);
9741
9741
  }
9742
9742
  const ry = /* @__PURE__ */ new Set(["table", "td", "th"]);
@@ -9755,7 +9755,7 @@ function as(e) {
9755
9755
  }
9756
9756
  const iy = ["transform", "translate", "scale", "rotate", "perspective"], ay = ["transform", "translate", "scale", "rotate", "perspective", "filter"], ly = ["paint", "layout", "strict", "content"];
9757
9757
  function da(e) {
9758
- const t = fa(), n = $t(e) ? Ht(e) : e;
9758
+ const t = fa(), n = Ht(e) ? $t(e) : e;
9759
9759
  return iy.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || ay.some((r) => (n.willChange || "").includes(r)) || ly.some((r) => (n.contain || "").includes(r));
9760
9760
  }
9761
9761
  function cy(e) {
@@ -9776,11 +9776,11 @@ const uy = /* @__PURE__ */ new Set(["html", "body", "#document"]);
9776
9776
  function qn(e) {
9777
9777
  return uy.has(sr(e));
9778
9778
  }
9779
- function Ht(e) {
9779
+ function $t(e) {
9780
9780
  return Ct(e).getComputedStyle(e);
9781
9781
  }
9782
9782
  function ls(e) {
9783
- return $t(e) ? {
9783
+ return Ht(e) ? {
9784
9784
  scrollLeft: e.scrollLeft,
9785
9785
  scrollTop: e.scrollTop
9786
9786
  } : {
@@ -9802,7 +9802,7 @@ function fn(e) {
9802
9802
  }
9803
9803
  function bd(e) {
9804
9804
  const t = fn(e);
9805
- return qn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Zt(t) && Hr(t) ? t : bd(t);
9805
+ return qn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Zt(t) && $r(t) ? t : bd(t);
9806
9806
  }
9807
9807
  function Ir(e, t, n) {
9808
9808
  var r;
@@ -9810,7 +9810,7 @@ function Ir(e, t, n) {
9810
9810
  const o = bd(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Ct(o);
9811
9811
  if (s) {
9812
9812
  const a = bi(i);
9813
- return t.concat(i, i.visualViewport || [], Hr(o) ? o : [], a && n ? Ir(a) : []);
9813
+ return t.concat(i, i.visualViewport || [], $r(o) ? o : [], a && n ? Ir(a) : []);
9814
9814
  }
9815
9815
  return t.concat(o, Ir(o, [], n));
9816
9816
  }
@@ -9818,7 +9818,7 @@ function bi(e) {
9818
9818
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
9819
9819
  }
9820
9820
  function wd(e) {
9821
- const t = Ht(e);
9821
+ const t = $t(e);
9822
9822
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
9823
9823
  const o = Zt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
9824
9824
  return a && (n = s, r = i), {
@@ -9828,7 +9828,7 @@ function wd(e) {
9828
9828
  };
9829
9829
  }
9830
9830
  function ha(e) {
9831
- return $t(e) ? e : e.contextElement;
9831
+ return Ht(e) ? e : e.contextElement;
9832
9832
  }
9833
9833
  function Kn(e) {
9834
9834
  const t = ha(e);
@@ -9860,14 +9860,14 @@ function jn(e, t, n, r) {
9860
9860
  t === void 0 && (t = !1), n === void 0 && (n = !1);
9861
9861
  const o = e.getBoundingClientRect(), s = ha(e);
9862
9862
  let i = qt(1);
9863
- t && (r ? $t(r) && (i = Kn(r)) : i = Kn(e));
9863
+ t && (r ? Ht(r) && (i = Kn(r)) : i = Kn(e));
9864
9864
  const a = fy(s, n, r) ? yd(s) : qt(0);
9865
9865
  let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, h = o.height / i.y;
9866
9866
  if (s) {
9867
- const p = Ct(s), x = r && $t(r) ? Ct(r) : r;
9867
+ const p = Ct(s), x = r && Ht(r) ? Ct(r) : r;
9868
9868
  let g = p, v = bi(g);
9869
9869
  for (; v && r && x !== g; ) {
9870
- const m = Kn(v), b = v.getBoundingClientRect(), w = Ht(v), y = b.left + (v.clientLeft + parseFloat(w.paddingLeft)) * m.x, R = b.top + (v.clientTop + parseFloat(w.paddingTop)) * m.y;
9870
+ const m = Kn(v), b = v.getBoundingClientRect(), w = $t(v), y = b.left + (v.clientLeft + parseFloat(w.paddingLeft)) * m.x, R = b.top + (v.clientTop + parseFloat(w.paddingTop)) * m.y;
9871
9871
  c *= m.x, u *= m.y, d *= m.x, h *= m.y, c += y, u += R, g = Ct(v), v = bi(g);
9872
9872
  }
9873
9873
  }
@@ -9904,7 +9904,7 @@ function hy(e) {
9904
9904
  scrollTop: 0
9905
9905
  }, u = qt(1);
9906
9906
  const d = qt(0), h = Zt(r);
9907
- if ((h || !h && !s) && ((sr(r) !== "body" || Hr(i)) && (c = ls(r)), Zt(r))) {
9907
+ if ((h || !h && !s) && ((sr(r) !== "body" || $r(i)) && (c = ls(r)), Zt(r))) {
9908
9908
  const x = jn(r);
9909
9909
  u = Kn(r), d.x = x.x + r.clientLeft, d.y = x.y + r.clientTop;
9910
9910
  }
@@ -9923,7 +9923,7 @@ function my(e) {
9923
9923
  const t = Qt(e), n = ls(e), r = e.ownerDocument.body, o = wt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = wt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
9924
9924
  let i = -n.scrollLeft + cs(e);
9925
9925
  const a = -n.scrollTop;
9926
- return Ht(r).direction === "rtl" && (i += wt(t.clientWidth, r.clientWidth) - o), {
9926
+ return $t(r).direction === "rtl" && (i += wt(t.clientWidth, r.clientWidth) - o), {
9927
9927
  width: o,
9928
9928
  height: s,
9929
9929
  x: i,
@@ -9967,7 +9967,7 @@ function sc(e, t, n) {
9967
9967
  r = gy(e, n);
9968
9968
  else if (t === "document")
9969
9969
  r = my(Qt(e));
9970
- else if ($t(t))
9970
+ else if (Ht(t))
9971
9971
  r = xy(t, n);
9972
9972
  else {
9973
9973
  const o = yd(e);
@@ -9982,18 +9982,18 @@ function sc(e, t, n) {
9982
9982
  }
9983
9983
  function Cd(e, t) {
9984
9984
  const n = fn(e);
9985
- return n === t || !$t(n) || qn(n) ? !1 : Ht(n).position === "fixed" || Cd(n, t);
9985
+ return n === t || !Ht(n) || qn(n) ? !1 : $t(n).position === "fixed" || Cd(n, t);
9986
9986
  }
9987
9987
  function by(e, t) {
9988
9988
  const n = t.get(e);
9989
9989
  if (n)
9990
9990
  return n;
9991
- let r = Ir(e, [], !1).filter((a) => $t(a) && sr(a) !== "body"), o = null;
9992
- const s = Ht(e).position === "fixed";
9991
+ let r = Ir(e, [], !1).filter((a) => Ht(a) && sr(a) !== "body"), o = null;
9992
+ const s = $t(e).position === "fixed";
9993
9993
  let i = s ? fn(e) : e;
9994
- for (; $t(i) && !qn(i); ) {
9995
- const a = Ht(i), c = da(i);
9996
- !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && vy.has(o.position) || Hr(i) && !c && Cd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fn(i);
9994
+ for (; Ht(i) && !qn(i); ) {
9995
+ const a = $t(i), c = da(i);
9996
+ !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && vy.has(o.position) || $r(i) && !c && Cd(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fn(i);
9997
9997
  }
9998
9998
  return t.set(e, r), r;
9999
9999
  }
@@ -10036,7 +10036,7 @@ function Sy(e, t, n) {
10036
10036
  c.x = cs(o);
10037
10037
  }
10038
10038
  if (r || !r && !s)
10039
- if ((sr(t) !== "body" || Hr(o)) && (a = ls(t)), r) {
10039
+ if ((sr(t) !== "body" || $r(o)) && (a = ls(t)), r) {
10040
10040
  const x = jn(t, !0, s, t);
10041
10041
  c.x = x.x + t.clientLeft, c.y = x.y + t.clientTop;
10042
10042
  } else o && u();
@@ -10050,10 +10050,10 @@ function Sy(e, t, n) {
10050
10050
  };
10051
10051
  }
10052
10052
  function Gs(e) {
10053
- return Ht(e).position === "static";
10053
+ return $t(e).position === "static";
10054
10054
  }
10055
10055
  function ic(e, t) {
10056
- if (!Zt(e) || Ht(e).position === "fixed")
10056
+ if (!Zt(e) || $t(e).position === "fixed")
10057
10057
  return null;
10058
10058
  if (t)
10059
10059
  return t(e);
@@ -10067,7 +10067,7 @@ function Td(e, t) {
10067
10067
  if (!Zt(e)) {
10068
10068
  let o = fn(e);
10069
10069
  for (; o && !qn(o); ) {
10070
- if ($t(o) && !Gs(o))
10070
+ if (Ht(o) && !Gs(o))
10071
10071
  return o;
10072
10072
  o = fn(o);
10073
10073
  }
@@ -10091,7 +10091,7 @@ const Cy = async function(e) {
10091
10091
  };
10092
10092
  };
10093
10093
  function Ty(e) {
10094
- return Ht(e).direction === "rtl";
10094
+ return $t(e).direction === "rtl";
10095
10095
  }
10096
10096
  const Ey = {
10097
10097
  convertOffsetParentRelativeRectToViewportRelativeRect: hy,
@@ -10102,7 +10102,7 @@ const Ey = {
10102
10102
  getClientRects: py,
10103
10103
  getDimensions: yy,
10104
10104
  getScale: Kn,
10105
- isElement: $t,
10105
+ isElement: Ht,
10106
10106
  isRTL: Ty
10107
10107
  };
10108
10108
  function Ed(e, t) {
@@ -10313,7 +10313,7 @@ function Ly(e) {
10313
10313
  G();
10314
10314
  }
10315
10315
  }, [R, S, G, k, A]);
10316
- const H = f.useMemo(() => ({
10316
+ const $ = f.useMemo(() => ({
10317
10317
  reference: C,
10318
10318
  floating: E,
10319
10319
  setReference: w,
@@ -10345,10 +10345,10 @@ function Ly(e) {
10345
10345
  return f.useMemo(() => ({
10346
10346
  ...d,
10347
10347
  update: G,
10348
- refs: H,
10348
+ refs: $,
10349
10349
  elements: L,
10350
10350
  floatingStyles: X
10351
- }), [d, G, H, L, X]);
10351
+ }), [d, G, $, L, X]);
10352
10352
  }
10353
10353
  const Fy = (e) => {
10354
10354
  function t(n) {
@@ -10374,10 +10374,10 @@ const Fy = (e) => {
10374
10374
  }, By = (e, t) => ({
10375
10375
  ...Ny(e),
10376
10376
  options: [e, t]
10377
- }), $y = (e, t) => ({
10377
+ }), Hy = (e, t) => ({
10378
10378
  ...jy(e),
10379
10379
  options: [e, t]
10380
- }), Hy = (e, t) => ({
10380
+ }), $y = (e, t) => ({
10381
10381
  ..._y(e),
10382
10382
  options: [e, t]
10383
10383
  }), zy = (e, t) => ({
@@ -10470,7 +10470,7 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10470
10470
  boundary: M.filter(Jy),
10471
10471
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
10472
10472
  altBoundary: W
10473
- }, { refs: N, floatingStyles: H, placement: L, isPositioned: X, middlewareData: O } = Ly({
10473
+ }, { refs: N, floatingStyles: $, placement: L, isPositioned: X, middlewareData: O } = Ly({
10474
10474
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
10475
10475
  strategy: "fixed",
10476
10476
  placement: A,
@@ -10482,18 +10482,18 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10482
10482
  },
10483
10483
  middleware: [
10484
10484
  By({ mainAxis: o + I, alignmentAxis: i }),
10485
- c && $y({
10485
+ c && Hy({
10486
10486
  mainAxis: !0,
10487
10487
  crossAxis: !1,
10488
- limiter: h === "partial" ? Hy() : void 0,
10488
+ limiter: h === "partial" ? $y() : void 0,
10489
10489
  ...G
10490
10490
  }),
10491
10491
  c && zy({ ...G }),
10492
10492
  Uy({
10493
10493
  ...G,
10494
10494
  apply: ({ elements: Pe, rects: Fe, availableWidth: Le, availableHeight: ce }) => {
10495
- const { width: Ae, height: ve } = Fe.reference, $ = Pe.floating.style;
10496
- $.setProperty("--radix-popper-available-width", `${Le}px`), $.setProperty("--radix-popper-available-height", `${ce}px`), $.setProperty("--radix-popper-anchor-width", `${Ae}px`), $.setProperty("--radix-popper-anchor-height", `${ve}px`);
10495
+ const { width: Ae, height: ve } = Fe.reference, H = Pe.floating.style;
10496
+ H.setProperty("--radix-popper-available-width", `${Le}px`), H.setProperty("--radix-popper-available-height", `${ce}px`), H.setProperty("--radix-popper-anchor-width", `${Ae}px`), H.setProperty("--radix-popper-anchor-height", `${ve}px`);
10497
10497
  }
10498
10498
  }),
10499
10499
  R && Vy({ element: R, padding: a }),
@@ -10513,8 +10513,8 @@ var ma = "PopperContent", [Xy, qy] = jd(ma), Od = f.forwardRef(
10513
10513
  ref: N.setFloating,
10514
10514
  "data-radix-popper-content-wrapper": "",
10515
10515
  style: {
10516
- ...H,
10517
- transform: X ? H.transform : "translate(0, -200%)",
10516
+ ...$,
10517
+ transform: X ? $.transform : "translate(0, -200%)",
10518
10518
  // keep off the page when measuring
10519
10519
  minWidth: "max-content",
10520
10520
  zIndex: de,
@@ -10633,10 +10633,10 @@ function Ld(e) {
10633
10633
  var ga = kd, va = _d, xa = Od, ba = Dd, Ys = "rovingFocusGroup.onEntryFocus", eS = { bubbles: !1, cancelable: !0 }, zr = "RovingFocusGroup", [wi, Fd, tS] = aa(zr), [nS, Bd] = Ut(
10634
10634
  zr,
10635
10635
  [tS]
10636
- ), [rS, oS] = nS(zr), $d = f.forwardRef(
10636
+ ), [rS, oS] = nS(zr), Hd = f.forwardRef(
10637
10637
  (e, t) => /* @__PURE__ */ l.jsx(wi.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(wi.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ l.jsx(sS, { ...e, ref: t }) }) })
10638
10638
  );
10639
- $d.displayName = zr;
10639
+ Hd.displayName = zr;
10640
10640
  var sS = f.forwardRef((e, t) => {
10641
10641
  const {
10642
10642
  __scopeRovingFocusGroup: n,
@@ -10696,10 +10696,10 @@ var sS = f.forwardRef((e, t) => {
10696
10696
  if (I.target === I.currentTarget && A && !b) {
10697
10697
  const k = new CustomEvent(Ys, eS);
10698
10698
  if (I.currentTarget.dispatchEvent(k), !k.defaultPrevented) {
10699
- const M = R().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === v), H = [W, G, ...M].filter(
10699
+ const M = R().filter((L) => L.focusable), W = M.find((L) => L.active), G = M.find((L) => L.id === v), $ = [W, G, ...M].filter(
10700
10700
  Boolean
10701
10701
  ).map((L) => L.ref.current);
10702
- Ud(H, d);
10702
+ Ud($, d);
10703
10703
  }
10704
10704
  }
10705
10705
  S.current = !1;
@@ -10709,7 +10709,7 @@ var sS = f.forwardRef((e, t) => {
10709
10709
  )
10710
10710
  }
10711
10711
  );
10712
- }), Hd = "RovingFocusGroupItem", zd = f.forwardRef(
10712
+ }), $d = "RovingFocusGroupItem", zd = f.forwardRef(
10713
10713
  (e, t) => {
10714
10714
  const {
10715
10715
  __scopeRovingFocusGroup: n,
@@ -10718,7 +10718,7 @@ var sS = f.forwardRef((e, t) => {
10718
10718
  tabStopId: s,
10719
10719
  children: i,
10720
10720
  ...a
10721
- } = e, c = Ft(), u = s || c, d = oS(Hd, n), h = d.currentTabStopId === u, p = Fd(n), { onFocusableItemAdd: x, onFocusableItemRemove: g, currentTabStopId: v } = d;
10721
+ } = e, c = Ft(), u = s || c, d = oS($d, n), h = d.currentTabStopId === u, p = Fd(n), { onFocusableItemAdd: x, onFocusableItemRemove: g, currentTabStopId: v } = d;
10722
10722
  return f.useEffect(() => {
10723
10723
  if (r)
10724
10724
  return x(), () => g();
@@ -10767,7 +10767,7 @@ var sS = f.forwardRef((e, t) => {
10767
10767
  );
10768
10768
  }
10769
10769
  );
10770
- zd.displayName = Hd;
10770
+ zd.displayName = $d;
10771
10771
  var iS = {
10772
10772
  ArrowLeft: "prev",
10773
10773
  ArrowUp: "prev",
@@ -10794,7 +10794,7 @@ function Ud(e, t = !1) {
10794
10794
  function cS(e, t) {
10795
10795
  return e.map((n, r) => e[(t + r) % e.length]);
10796
10796
  }
10797
- var uS = $d, dS = zd, yi = ["Enter", " "], fS = ["ArrowDown", "PageUp", "Home"], Wd = ["ArrowUp", "PageDown", "End"], hS = [...fS, ...Wd], pS = {
10797
+ var uS = Hd, dS = zd, yi = ["Enter", " "], fS = ["ArrowDown", "PageUp", "Home"], Wd = ["ArrowUp", "PageDown", "End"], hS = [...fS, ...Wd], pS = {
10798
10798
  ltr: [...yi, "ArrowRight"],
10799
10799
  rtl: [...yi, "ArrowLeft"]
10800
10800
  }, mS = {
@@ -10908,7 +10908,7 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
10908
10908
  onDismiss: x,
10909
10909
  disableOutsideScroll: g,
10910
10910
  ...v
10911
- } = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Gd(n), R = gS(n), [S, C] = f.useState(null), E = f.useRef(null), I = Te(t, E, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), H = g ? es : f.Fragment, L = g ? { as: ES, allowPinchZoom: !0 } : void 0, X = (_) => {
10911
+ } = e, m = Mn(jt, n), b = Wr(jt, n), w = us(n), y = Gd(n), R = gS(n), [S, C] = f.useState(null), E = f.useRef(null), I = Te(t, E, m.onContentChange), A = f.useRef(0), k = f.useRef(""), M = f.useRef(0), W = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), $ = g ? es : f.Fragment, L = g ? { as: ES, allowPinchZoom: !0 } : void 0, X = (_) => {
10912
10912
  var Y, P;
10913
10913
  const z = k.current + _, q = R().filter((J) => !J.disabled), oe = document.activeElement, F = (Y = q.find((J) => J.ref.current === oe)) == null ? void 0 : Y.textValue, Q = q.map((J) => J.textValue), de = LS(Q, z, F), be = (P = q.find((J) => J.textValue === de)) == null ? void 0 : P.ref.current;
10914
10914
  (function J(ne) {
@@ -10948,7 +10948,7 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
10948
10948
  onPointerGraceIntentChange: f.useCallback((_) => {
10949
10949
  W.current = _;
10950
10950
  }, []),
10951
- children: /* @__PURE__ */ l.jsx(H, { ...L, children: /* @__PURE__ */ l.jsx(
10951
+ children: /* @__PURE__ */ l.jsx($, { ...L, children: /* @__PURE__ */ l.jsx(
10952
10952
  Zo,
10953
10953
  {
10954
10954
  asChild: !0,
@@ -10959,7 +10959,7 @@ var jt = "MenuContent", [SS, Sa] = On(jt), qd = f.forwardRef(
10959
10959
  }),
10960
10960
  onUnmountAutoFocus: i,
10961
10961
  children: /* @__PURE__ */ l.jsx(
10962
- $r,
10962
+ Hr,
10963
10963
  {
10964
10964
  asChild: !0,
10965
10965
  disableOutsidePointerEvents: a,
@@ -11365,7 +11365,7 @@ function BS(e, t) {
11365
11365
  function jr(e) {
11366
11366
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
11367
11367
  }
11368
- var $S = Kd, HS = wa, zS = Xd, US = qd, WS = Ta, VS = Zd, GS = ds, KS = Qd, YS = tf, XS = rf, qS = sf, ZS = af, JS = lf, QS = uf, e0 = ff, fs = "DropdownMenu", [t0, oE] = Ut(
11368
+ var HS = Kd, $S = wa, zS = Xd, US = qd, WS = Ta, VS = Zd, GS = ds, KS = Qd, YS = tf, XS = rf, qS = sf, ZS = af, JS = lf, QS = uf, e0 = ff, fs = "DropdownMenu", [t0, oE] = Ut(
11369
11369
  fs,
11370
11370
  [Vd]
11371
11371
  ), ht = Vd(), [n0, pf] = t0(fs), mf = (e) => {
@@ -11394,7 +11394,7 @@ var $S = Kd, HS = wa, zS = Xd, US = qd, WS = Ta, VS = Zd, GS = ds, KS = Qd, YS =
11394
11394
  onOpenChange: h,
11395
11395
  onOpenToggle: f.useCallback(() => h((p) => !p), [h]),
11396
11396
  modal: a,
11397
- children: /* @__PURE__ */ l.jsx($S, { ...c, open: d, onOpenChange: h, dir: r, modal: a, children: n })
11397
+ children: /* @__PURE__ */ l.jsx(HS, { ...c, open: d, onOpenChange: h, dir: r, modal: a, children: n })
11398
11398
  }
11399
11399
  );
11400
11400
  };
@@ -11402,7 +11402,7 @@ mf.displayName = fs;
11402
11402
  var gf = "DropdownMenuTrigger", vf = f.forwardRef(
11403
11403
  (e, t) => {
11404
11404
  const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = pf(gf, n), i = ht(n);
11405
- return /* @__PURE__ */ l.jsx(HS, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
11405
+ return /* @__PURE__ */ l.jsx($S, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
11406
11406
  me.button,
11407
11407
  {
11408
11408
  type: "button",
@@ -11554,7 +11554,7 @@ const y0 = x0, S0 = b0, C0 = f.forwardRef(({ className: e, inset: t, children: n
11554
11554
  ...r,
11555
11555
  children: [
11556
11556
  n,
11557
- /* @__PURE__ */ l.jsx(Hp, { className: "ml-auto h-4 w-4" })
11557
+ /* @__PURE__ */ l.jsx($p, { className: "ml-auto h-4 w-4" })
11558
11558
  ]
11559
11559
  }
11560
11560
  ));
@@ -11682,9 +11682,9 @@ function vo({
11682
11682
  isLoadingHistory: I,
11683
11683
  loadOlderMessages: A,
11684
11684
  api: k
11685
- } = Fi(), [M, W] = fe(null), [G, N] = fe(""), [H, L] = fe(null), [X, O] = fe([]), [_, z] = fe(!1), [q, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [J, ne] = fe([]), [le, ie] = fe(null);
11685
+ } = Fi(), [M, W] = fe(null), [G, N] = fe(""), [$, L] = fe(null), [X, O] = fe([]), [_, z] = fe(!1), [q, oe] = fe(null), [F, Q] = fe(null), [de, be] = fe(!1), [Y, P] = fe(null), [J, ne] = fe([]), [le, ie] = fe(null);
11686
11686
  bt(null);
11687
- const Pe = bt(null), Fe = bt(null), Le = bt(null), ce = bt(!1), Ae = bt(!0), ve = bt(0), $ = bt(null), [ae, Be] = fe("desktop");
11687
+ const Pe = bt(null), Fe = bt(null), Le = bt(null), ce = bt(!1), Ae = bt(!0), ve = bt(0), H = bt(null), [ae, Be] = fe("desktop");
11688
11688
  Ve(() => {
11689
11689
  const Z = () => {
11690
11690
  const se = window.innerWidth;
@@ -11694,13 +11694,13 @@ function vo({
11694
11694
  }, []), Ve(() => {
11695
11695
  let Z = !1;
11696
11696
  if (!p) {
11697
- ne([]), ie(null), $.current = null;
11697
+ ne([]), ie(null), H.current = null;
11698
11698
  return;
11699
11699
  }
11700
11700
  const se = {
11701
11701
  threadId: p,
11702
11702
  checkpointId: y ?? null
11703
- }, Ce = $.current;
11703
+ }, Ce = H.current;
11704
11704
  if (!(Ce && Ce.threadId === se.threadId && Ce.checkpointId === se.checkpointId))
11705
11705
  return R(p).then((Ne) => {
11706
11706
  if (Z) return;
@@ -11708,9 +11708,9 @@ function vo({
11708
11708
  ne(_t), ie((Ot) => {
11709
11709
  var Ln;
11710
11710
  return Ot ?? ((Ln = _t[0]) == null ? void 0 : Ln.checkpointId) ?? null;
11711
- }), $.current = se;
11711
+ }), H.current = se;
11712
11712
  }).catch((Ne) => {
11713
- console.error("ChatInterface - listCheckpoints error:", Ne), Z || (ne([]), $.current = null);
11713
+ console.error("ChatInterface - listCheckpoints error:", Ne), Z || (ne([]), H.current = null);
11714
11714
  }), () => {
11715
11715
  Z = !0;
11716
11716
  };
@@ -11988,7 +11988,7 @@ function vo({
11988
11988
  q && !_ && /* @__PURE__ */ l.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: q })
11989
11989
  ] })
11990
11990
  ] }),
11991
- H && /* @__PURE__ */ l.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: H }),
11991
+ $ && /* @__PURE__ */ l.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: $ }),
11992
11992
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-end gap-2", children: [
11993
11993
  (s || i) && /* @__PURE__ */ l.jsxs(y0, { children: [
11994
11994
  /* @__PURE__ */ l.jsx(S0, { asChild: !0, children: /* @__PURE__ */ l.jsx(
@@ -12040,7 +12040,7 @@ function vo({
12040
12040
  onCancelEdit: We,
12041
12041
  onStop: w,
12042
12042
  allowEmptySend: X.length > 0,
12043
- textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${M ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${H ? "border-red-400" : ""} ${c.textarea || ""}`
12043
+ textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${M ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${$ ? "border-red-400" : ""} ${c.textarea || ""}`
12044
12044
  }
12045
12045
  ) })
12046
12046
  ] })
@@ -12068,7 +12068,7 @@ function Ci(e, [t, n]) {
12068
12068
  function j0(e, t) {
12069
12069
  return f.useReducer((n, r) => t[n][r] ?? n, e);
12070
12070
  }
12071
- var Ia = "ScrollArea", [Bf, sE] = Ut(Ia), [A0, kt] = Bf(Ia), $f = f.forwardRef(
12071
+ var Ia = "ScrollArea", [Bf, sE] = Ut(Ia), [A0, kt] = Bf(Ia), Hf = f.forwardRef(
12072
12072
  (e, t) => {
12073
12073
  const {
12074
12074
  __scopeScrollArea: n,
@@ -12118,10 +12118,10 @@ var Ia = "ScrollArea", [Bf, sE] = Ut(Ia), [A0, kt] = Bf(Ia), $f = f.forwardRef(
12118
12118
  );
12119
12119
  }
12120
12120
  );
12121
- $f.displayName = Ia;
12122
- var Hf = "ScrollAreaViewport", zf = f.forwardRef(
12121
+ Hf.displayName = Ia;
12122
+ var $f = "ScrollAreaViewport", zf = f.forwardRef(
12123
12123
  (e, t) => {
12124
- const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = kt(Hf, n), a = f.useRef(null), c = Te(t, a, i.onViewportChange);
12124
+ const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = kt($f, n), a = f.useRef(null), c = Te(t, a, i.onViewportChange);
12125
12125
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
12126
12126
  /* @__PURE__ */ l.jsx(
12127
12127
  "style",
@@ -12160,7 +12160,7 @@ var Hf = "ScrollAreaViewport", zf = f.forwardRef(
12160
12160
  ] });
12161
12161
  }
12162
12162
  );
12163
- zf.displayName = Hf;
12163
+ zf.displayName = $f;
12164
12164
  var en = "ScrollAreaScrollbar", Na = f.forwardRef(
12165
12165
  (e, t) => {
12166
12166
  const { forceMount: n, ...r } = e, o = kt(en, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
@@ -12575,7 +12575,7 @@ function Zn(e, t) {
12575
12575
  }
12576
12576
  }, [e, n]);
12577
12577
  }
12578
- var Zf = $f, $0 = zf, H0 = Kf;
12578
+ var Zf = Hf, H0 = zf, $0 = Kf;
12579
12579
  const Jf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__ */ l.jsxs(
12580
12580
  Zf,
12581
12581
  {
@@ -12583,9 +12583,9 @@ const Jf = f.forwardRef(({ className: e, children: t, ...n }, r) => /* @__PURE__
12583
12583
  className: D("relative overflow-hidden", e),
12584
12584
  ...n,
12585
12585
  children: [
12586
- /* @__PURE__ */ l.jsx($0, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
12586
+ /* @__PURE__ */ l.jsx(H0, { className: "h-full w-full rounded-[inherit] overflow-auto", children: t }),
12587
12587
  /* @__PURE__ */ l.jsx(Qf, {}),
12588
- /* @__PURE__ */ l.jsx(H0, {})
12588
+ /* @__PURE__ */ l.jsx($0, {})
12589
12589
  ]
12590
12590
  }
12591
12591
  ));
@@ -12637,7 +12637,7 @@ function Ti({
12637
12637
  } catch (Q) {
12638
12638
  console.error("Failed to select thread:", Q);
12639
12639
  }
12640
- }, H = async () => {
12640
+ }, $ = async () => {
12641
12641
  try {
12642
12642
  G(!0);
12643
12643
  const F = await v();
@@ -12680,7 +12680,7 @@ function Ti({
12680
12680
  t && /* @__PURE__ */ l.jsx("div", { className: s.header || "flex-shrink-0 p-2 border-b bg-slate-800 border-slate-700 text-slate-100 flex justify-end", children: /* @__PURE__ */ l.jsx(
12681
12681
  ke,
12682
12682
  {
12683
- onClick: H,
12683
+ onClick: $,
12684
12684
  disabled: W || R,
12685
12685
  className: s.createButton || "p-2",
12686
12686
  size: "sm",
@@ -13146,7 +13146,7 @@ var iC = "TooltipPortal", [dE, aC] = ms(iC, {
13146
13146
  return window.addEventListener("scroll", h, { capture: !0 }), () => window.removeEventListener("scroll", h, { capture: !0 });
13147
13147
  }
13148
13148
  }, [c.trigger, d]), /* @__PURE__ */ l.jsx(
13149
- $r,
13149
+ Hr,
13150
13150
  {
13151
13151
  asChild: !0,
13152
13152
  disableOutsidePointerEvents: !1,
@@ -13761,7 +13761,7 @@ const BC = f.forwardRef(({ className: e, showIcon: t = !1, ...n }, r) => {
13761
13761
  );
13762
13762
  });
13763
13763
  BC.displayName = "SidebarMenuSkeleton";
13764
- const $C = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13764
+ const HC = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13765
13765
  "ul",
13766
13766
  {
13767
13767
  ref: n,
@@ -13774,9 +13774,9 @@ const $C = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13774
13774
  ...t
13775
13775
  }
13776
13776
  ));
13777
- $C.displayName = "SidebarMenuSub";
13778
- const HC = f.forwardRef(({ ...e }, t) => /* @__PURE__ */ l.jsx("li", { ref: t, ...e }));
13779
- HC.displayName = "SidebarMenuSubItem";
13777
+ HC.displayName = "SidebarMenuSub";
13778
+ const $C = f.forwardRef(({ ...e }, t) => /* @__PURE__ */ l.jsx("li", { ref: t, ...e }));
13779
+ $C.displayName = "SidebarMenuSubItem";
13780
13780
  const zC = f.forwardRef(({ asChild: e = !1, size: t = "md", isActive: n, className: r, ...o }, s) => {
13781
13781
  const i = e ? Qn : "a";
13782
13782
  return /* @__PURE__ */ l.jsx(
@@ -13889,7 +13889,7 @@ var bs = "Switch", [VC, hE] = Ut(bs), [GC, KC] = VC(bs), Dh = f.forwardRef(
13889
13889
  role: "switch",
13890
13890
  "aria-checked": b,
13891
13891
  "aria-required": i,
13892
- "data-state": $h(b),
13892
+ "data-state": Hh(b),
13893
13893
  "data-disabled": a ? "" : void 0,
13894
13894
  disabled: a,
13895
13895
  value: c,
@@ -13924,7 +13924,7 @@ var Lh = "SwitchThumb", Fh = f.forwardRef(
13924
13924
  return /* @__PURE__ */ l.jsx(
13925
13925
  me.span,
13926
13926
  {
13927
- "data-state": $h(o.checked),
13927
+ "data-state": Hh(o.checked),
13928
13928
  "data-disabled": o.disabled ? "" : void 0,
13929
13929
  ...r,
13930
13930
  ref: t
@@ -13975,12 +13975,12 @@ var YC = "SwitchBubbleInput", Bh = f.forwardRef(
13975
13975
  }
13976
13976
  );
13977
13977
  Bh.displayName = YC;
13978
- function $h(e) {
13978
+ function Hh(e) {
13979
13979
  return e ? "checked" : "unchecked";
13980
13980
  }
13981
- var Hh = Dh, XC = Fh;
13981
+ var $h = Dh, XC = Fh;
13982
13982
  const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13983
- Hh,
13983
+ $h,
13984
13984
  {
13985
13985
  className: D(
13986
13986
  "peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
@@ -13998,7 +13998,7 @@ const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13998
13998
  )
13999
13999
  }
14000
14000
  ));
14001
- an.displayName = Hh.displayName;
14001
+ an.displayName = $h.displayName;
14002
14002
  var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], ZC = [" ", "Enter"], An = "Select", [ws, ys, JC] = aa(An), [ar, pE] = Ut(An, [
14003
14003
  JC,
14004
14004
  ir
@@ -14028,7 +14028,7 @@ var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], ZC = [" ", "Enter"], An = "Sele
14028
14028
  defaultProp: a,
14029
14029
  onChange: c,
14030
14030
  caller: An
14031
- }), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, N] = f.useState(/* @__PURE__ */ new Set()), H = Array.from(G).map((L) => L.props.value).join(";");
14031
+ }), M = f.useRef(null), W = m ? g || !!m.closest("form") : !0, [G, N] = f.useState(/* @__PURE__ */ new Set()), $ = Array.from(G).map((L) => L.props.value).join(";");
14032
14032
  return /* @__PURE__ */ l.jsx(ga, { ...v, children: /* @__PURE__ */ l.jsxs(
14033
14033
  QC,
14034
14034
  {
@@ -14082,7 +14082,7 @@ var qC = [" ", "Enter", "ArrowUp", "ArrowDown"], ZC = [" ", "Enter"], An = "Sele
14082
14082
  Array.from(G)
14083
14083
  ]
14084
14084
  },
14085
- H
14085
+ $
14086
14086
  ) : null
14087
14087
  ]
14088
14088
  }
@@ -14199,7 +14199,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14199
14199
  ...b
14200
14200
  } = e, w = gn(kn, n), [y, R] = f.useState(null), [S, C] = f.useState(null), E = Te(t, (Y) => R(Y)), [I, A] = f.useState(null), [k, M] = f.useState(
14201
14201
  null
14202
- ), W = ys(n), [G, N] = f.useState(!1), H = f.useRef(!1);
14202
+ ), W = ys(n), [G, N] = f.useState(!1), $ = f.useRef(!1);
14203
14203
  f.useEffect(() => {
14204
14204
  if (y) return ra(y);
14205
14205
  }, [y]), na();
@@ -14245,13 +14245,13 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14245
14245
  ne && setTimeout(() => ne.ref.current.focus());
14246
14246
  }), oe = f.useCallback(
14247
14247
  (Y, P, J) => {
14248
- const ne = !H.current && !J;
14249
- (w.value !== void 0 && w.value === P || ne) && (A(Y), ne && (H.current = !0));
14248
+ const ne = !$.current && !J;
14249
+ (w.value !== void 0 && w.value === P || ne) && (A(Y), ne && ($.current = !0));
14250
14250
  },
14251
14251
  [w.value]
14252
14252
  ), F = f.useCallback(() => y == null ? void 0 : y.focus(), [y]), Q = f.useCallback(
14253
14253
  (Y, P, J) => {
14254
- const ne = !H.current && !J;
14254
+ const ne = !$.current && !J;
14255
14255
  (w.value !== void 0 && w.value === P || ne) && M(Y);
14256
14256
  },
14257
14257
  [w.value]
@@ -14296,7 +14296,7 @@ var Dt = 10, [qh, vn] = ar(kn), oT = "SelectContentImpl", sT = Yn("SelectContent
14296
14296
  (P = w.trigger) == null || P.focus({ preventScroll: !0 }), Y.preventDefault();
14297
14297
  }),
14298
14298
  children: /* @__PURE__ */ l.jsx(
14299
- $r,
14299
+ Hr,
14300
14300
  {
14301
14301
  asChild: !0,
14302
14302
  disableOutsidePointerEvents: !0,
@@ -14368,7 +14368,7 @@ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
14368
14368
  ]);
14369
14369
  a.style.minWidth = Fe + "px", a.style.right = Ae + "px";
14370
14370
  }
14371
- const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), H = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), X = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = H + L + G + O + X, z = Math.min(m.offsetHeight * 5, _), q = window.getComputedStyle(v), oe = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), Q = E.top + E.height / 2 - Dt, de = W - Q, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = H + L + Y, J = _ - P;
14371
+ const M = p(), W = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), $ = parseInt(N.borderTopWidth, 10), L = parseInt(N.paddingTop, 10), X = parseInt(N.borderBottomWidth, 10), O = parseInt(N.paddingBottom, 10), _ = $ + L + G + O + X, z = Math.min(m.offsetHeight * 5, _), q = window.getComputedStyle(v), oe = parseInt(q.paddingTop, 10), F = parseInt(q.paddingBottom, 10), Q = E.top + E.height / 2 - Dt, de = W - Q, be = m.offsetHeight / 2, Y = m.offsetTop + be, P = $ + L + Y, J = _ - P;
14372
14372
  if (P <= Q) {
14373
14373
  const le = M.length > 0 && m === M[M.length - 1].ref.current;
14374
14374
  a.style.bottom = "0px";
@@ -14383,7 +14383,7 @@ var iT = "SelectItemAlignedPosition", Jh = f.forwardRef((e, t) => {
14383
14383
  a.style.top = "0px";
14384
14384
  const Pe = Math.max(
14385
14385
  Q,
14386
- H + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
14386
+ $ + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
14387
14387
  (le ? oe : 0) + be
14388
14388
  ) + J;
14389
14389
  a.style.height = Pe + "px", v.scrollTop = P - Q + v.offsetTop;
@@ -15361,9 +15361,9 @@ export {
15361
15361
  lE as getCurrentSettings,
15362
15362
  W0 as getDefaultApiConfig,
15363
15363
  V0 as getDefaultChatSettings,
15364
- $g as onChatTokenChanged,
15364
+ Hg as onChatTokenChanged,
15365
15365
  fl as post,
15366
- Hg as put,
15366
+ $g as put,
15367
15367
  dl as setChatToken,
15368
15368
  Fi as useChat,
15369
15369
  aE as useChatRouting,