teodor-new-chat-ui 4.3.457 → 4.3.458

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 @@ var Ng = Object.defineProperty;
2
2
  var Ag = (e, t, n) => t in e ? Ng(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var zl = (e, t, n) => Ag(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as h from "react";
5
- import M, { useMemo as Qe, createContext as Pr, useContext as Mr, useState as de, useRef as Fe, useCallback as he, useEffect as Ze, useReducer as jg, useLayoutEffect as _g, createElement as Yo, memo as Pg, useImperativeHandle as Mg, forwardRef as Og, isValidElement as ga } from "react";
5
+ import M, { useMemo as Qe, createContext as Pr, useContext as Mr, useState as de, useRef as Le, useCallback as he, useEffect as Ze, useReducer as jg, useLayoutEffect as _g, createElement as Yo, memo as Pg, useImperativeHandle as Mg, forwardRef as Og, isValidElement as ga } from "react";
6
6
  import { Slot as Dg, createSlot as Rr, createSlottable as Lg } from "@radix-ui/react-slot";
7
7
  import { cva as mo } from "class-variance-authority";
8
8
  import { clsx as $g } from "clsx";
@@ -41,7 +41,7 @@ function UI(e) {
41
41
  function rx(e) {
42
42
  const t = /* @__PURE__ */ new Map(), n = [], r = /* @__PURE__ */ new Map(), o = [];
43
43
  for (let c = 0; c < e.length; c++) {
44
- const d = e[c], p = d.checkpointId, m = p ?? `cp-${c}`, f = d.metadata ?? {}, v = typeof f.step == "number" ? f.step : null, g = typeof f.source == "string" ? f.source : null;
44
+ const d = e[c], f = d.checkpointId, m = f ?? `cp-${c}`, p = d.metadata ?? {}, v = typeof p.step == "number" ? p.step : null, g = typeof p.source == "string" ? p.source : null;
45
45
  let x = null, b = null;
46
46
  const w = Array.isArray(d.messages) ? d.messages : [];
47
47
  for (const T of w)
@@ -57,9 +57,9 @@ function rx(e) {
57
57
  parentConfig: C,
58
58
  userMessageId: x
59
59
  };
60
- if (o.push(S), p && t.set(p, S), p && b) {
60
+ if (o.push(S), f && t.set(f, S), f && b) {
61
61
  const T = $u(b);
62
- T && r.set(p, T);
62
+ T && r.set(f, T);
63
63
  }
64
64
  n.push({
65
65
  id: m,
@@ -79,14 +79,14 @@ function rx(e) {
79
79
  }
80
80
  for (const c of s.values()) {
81
81
  if (!c.length) continue;
82
- c.sort((p, m) => {
83
- const f = p.createdAt ? Date.parse(p.createdAt) : 0;
84
- return (m.createdAt ? Date.parse(m.createdAt) : 0) - f;
82
+ c.sort((f, m) => {
83
+ const p = f.createdAt ? Date.parse(f.createdAt) : 0;
84
+ return (m.createdAt ? Date.parse(m.createdAt) : 0) - p;
85
85
  });
86
86
  const d = c.length;
87
- for (let p = 0; p < c.length; p++) {
88
- const m = c[p];
89
- m.attemptCount = d, m.attemptIndex = p, m.isLatestAttempt = p === 0;
87
+ for (let f = 0; f < c.length; f++) {
88
+ const m = c[f];
89
+ m.attemptCount = d, m.attemptIndex = f, m.isLatestAttempt = f === 0;
90
90
  }
91
91
  }
92
92
  return {
@@ -102,11 +102,11 @@ function rx(e) {
102
102
  getCheckpoint: (c) => t.get(c),
103
103
  getMessageAttempts: (c) => {
104
104
  const d = [];
105
- for (const p of t.values())
106
- p.userMessageId === c && d.push(p);
107
- return d.length ? (d.sort((p, m) => {
108
- const f = typeof p.attemptIndex == "number" ? p.attemptIndex : Number.MAX_SAFE_INTEGER, v = typeof m.attemptIndex == "number" ? m.attemptIndex : Number.MAX_SAFE_INTEGER;
109
- return f - v;
105
+ for (const f of t.values())
106
+ f.userMessageId === c && d.push(f);
107
+ return d.length ? (d.sort((f, m) => {
108
+ const p = typeof f.attemptIndex == "number" ? f.attemptIndex : Number.MAX_SAFE_INTEGER, v = typeof m.attemptIndex == "number" ? m.attemptIndex : Number.MAX_SAFE_INTEGER;
109
+ return p - v;
110
110
  }), d) : [];
111
111
  }
112
112
  };
@@ -172,7 +172,7 @@ function Yn(e) {
172
172
  function ix(e, t) {
173
173
  var y;
174
174
  if (!e) return null;
175
- const r = (Array.isArray((y = e.values) == null ? void 0 : y.messages) ? e.values.messages : []).map((C) => lx(C)).filter((C) => !!C), o = er(e.metadata) ?? {}, s = Vl(e.config), a = er(e.parent_config ?? e.parentConfig), i = Vl(a), l = Gn(s, ["checkpoint_id", "checkpointId"]), c = Gn(s, ["checkpoint_ns", "checkpointNs"]), d = Gn(i, ["checkpoint_id", "checkpointId"]), p = Gn(i, ["checkpoint_id", "checkpointId"]) ?? null, m = Gn(i, ["checkpoint_ns", "checkpointNs"]) ?? null, f = er(e.config), v = Array.isArray(e.tasks) ? e.tasks.map((C) => ({ ...C })) : e.tasks ?? null, g = Array.isArray(e.next) ? [...e.next] : e.next ?? null, x = typeof e.created_at == "string" && e.created_at.trim() ? e.created_at : typeof e.createdAt == "string" && e.createdAt.trim() ? e.createdAt : new Date(Date.now() - t).toISOString(), b = {
175
+ const r = (Array.isArray((y = e.values) == null ? void 0 : y.messages) ? e.values.messages : []).map((C) => lx(C)).filter((C) => !!C), o = er(e.metadata) ?? {}, s = Vl(e.config), a = er(e.parent_config ?? e.parentConfig), i = Vl(a), l = Gn(s, ["checkpoint_id", "checkpointId"]), c = Gn(s, ["checkpoint_ns", "checkpointNs"]), d = Gn(i, ["checkpoint_id", "checkpointId"]), f = Gn(i, ["checkpoint_id", "checkpointId"]) ?? null, m = Gn(i, ["checkpoint_ns", "checkpointNs"]) ?? null, p = er(e.config), v = Array.isArray(e.tasks) ? e.tasks.map((C) => ({ ...C })) : e.tasks ?? null, g = Array.isArray(e.next) ? [...e.next] : e.next ?? null, x = typeof e.created_at == "string" && e.created_at.trim() ? e.created_at : typeof e.createdAt == "string" && e.createdAt.trim() ? e.createdAt : new Date(Date.now() - t).toISOString(), b = {
176
176
  ...o,
177
177
  step: ax(o, ["step"]) ?? 0,
178
178
  source: Gn(o, ["source"]) ?? null
@@ -186,11 +186,11 @@ function ix(e, t) {
186
186
  createdAt: x,
187
187
  parentId: d ?? null,
188
188
  messages: w,
189
- nextCursor: p,
189
+ nextCursor: f,
190
190
  nextCursorNs: m,
191
191
  interrupt: fx(r, t),
192
192
  metadata: b,
193
- config: f ?? null,
193
+ config: p ?? null,
194
194
  parentConfig: a ?? null,
195
195
  next: g,
196
196
  tasks: v
@@ -285,11 +285,11 @@ function hx() {
285
285
  ql = 1;
286
286
  var e = M, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
287
287
  function a(i, l, c) {
288
- var d, p = {}, m = null, f = null;
289
- c !== void 0 && (m = "" + c), l.key !== void 0 && (m = "" + l.key), l.ref !== void 0 && (f = l.ref);
290
- for (d in l) r.call(l, d) && !s.hasOwnProperty(d) && (p[d] = l[d]);
291
- if (i && i.defaultProps) for (d in l = i.defaultProps, l) p[d] === void 0 && (p[d] = l[d]);
292
- return { $$typeof: t, type: i, key: m, ref: f, props: p, _owner: o.current };
288
+ var d, f = {}, m = null, p = null;
289
+ c !== void 0 && (m = "" + c), l.key !== void 0 && (m = "" + l.key), l.ref !== void 0 && (p = l.ref);
290
+ for (d in l) r.call(l, d) && !s.hasOwnProperty(d) && (f[d] = l[d]);
291
+ if (i && i.defaultProps) for (d in l = i.defaultProps, l) f[d] === void 0 && (f[d] = l[d]);
292
+ return { $$typeof: t, type: i, key: m, ref: p, props: f, _owner: o.current };
293
293
  }
294
294
  return Wr.Fragment = n, Wr.jsx = a, Wr.jsxs = a, Wr;
295
295
  }
@@ -306,7 +306,7 @@ var Vr = {};
306
306
  var Gl;
307
307
  function mx() {
308
308
  return Gl || (Gl = 1, process.env.NODE_ENV !== "production" && function() {
309
- var e = M, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), f = Symbol.for("react.offscreen"), v = Symbol.iterator, g = "@@iterator";
309
+ var e = M, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), i = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), v = Symbol.iterator, g = "@@iterator";
310
310
  function x(I) {
311
311
  if (I === null || typeof I != "object")
312
312
  return null;
@@ -334,7 +334,7 @@ function mx() {
334
334
  var C = !1, S = !1, T = !1, k = !1, R = !1, _;
335
335
  _ = Symbol.for("react.module.reference");
336
336
  function O(I) {
337
- return !!(typeof I == "string" || typeof I == "function" || I === r || I === s || R || I === o || I === c || I === d || k || I === f || C || S || T || typeof I == "object" && I !== null && (I.$$typeof === m || I.$$typeof === p || I.$$typeof === a || I.$$typeof === i || I.$$typeof === l || // This needs to include all possible module reference object
337
+ return !!(typeof I == "string" || typeof I == "function" || I === r || I === s || R || I === o || I === c || I === d || k || I === p || C || S || T || typeof I == "object" && I !== null && (I.$$typeof === m || I.$$typeof === f || I.$$typeof === a || I.$$typeof === i || I.$$typeof === l || // This needs to include all possible module reference object
338
338
  // types supported by any Flight configuration anywhere since
339
339
  // we don't know which Flight build this will end up being used
340
340
  // with.
@@ -381,7 +381,7 @@ function mx() {
381
381
  return W(ue._context) + ".Provider";
382
382
  case l:
383
383
  return $(I, I.render, "ForwardRef");
384
- case p:
384
+ case f:
385
385
  var ke = I.displayName || null;
386
386
  return ke !== null ? ke : H(I.type) || "Memo";
387
387
  case m: {
@@ -571,7 +571,7 @@ function mx() {
571
571
  switch (I.$$typeof) {
572
572
  case l:
573
573
  return ae(I.render);
574
- case p:
574
+ case f:
575
575
  return ge(I.type, ee, ue);
576
576
  case m: {
577
577
  var ke = I, Ye = ke._payload, nt = ke._init;
@@ -630,7 +630,7 @@ function mx() {
630
630
  function qe(I) {
631
631
  return "" + I;
632
632
  }
633
- function Le(I) {
633
+ function $e(I) {
634
634
  if (He(I))
635
635
  return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ve(I)), qe(I);
636
636
  }
@@ -713,7 +713,7 @@ function mx() {
713
713
  function zt(I, ee, ue, ke, Ye) {
714
714
  {
715
715
  var nt, ie = {}, ce = null, Te = null;
716
- ue !== void 0 && (Le(ue), ce = "" + ue), Tt(ee) && (Le(ee.key), ce = "" + ee.key), Mt(ee) && (Te = ee.ref, gt(ee, Ye));
716
+ ue !== void 0 && ($e(ue), ce = "" + ue), Tt(ee) && ($e(ee.key), ce = "" + ee.key), Mt(ee) && (Te = ee.ref, gt(ee, Ye));
717
717
  for (nt in ee)
718
718
  we.call(ee, nt) && !pt.hasOwnProperty(nt) && (ie[nt] = ee[nt]);
719
719
  if (I && I.defaultProps) {
@@ -757,7 +757,7 @@ Check the render method of \`` + I + "`.";
757
757
  return "";
758
758
  }
759
759
  var xe = {};
760
- function $e(I) {
760
+ function Fe(I) {
761
761
  {
762
762
  var ee = pe();
763
763
  if (!ee) {
@@ -774,7 +774,7 @@ Check the top-level render call using <` + ue + ">.");
774
774
  if (!I._store || I._store.validated || I.key != null)
775
775
  return;
776
776
  I._store.validated = !0;
777
- var ue = $e(ee);
777
+ var ue = Fe(ee);
778
778
  if (xe[ue])
779
779
  return;
780
780
  xe[ue] = !0;
@@ -811,7 +811,7 @@ Check the top-level render call using <` + ue + ">.");
811
811
  ue = ee.propTypes;
812
812
  else if (typeof ee == "object" && (ee.$$typeof === l || // Note: Memo only checks outer props here.
813
813
  // Inner props are checked in the reconciler.
814
- ee.$$typeof === p))
814
+ ee.$$typeof === f))
815
815
  ue = ee.propTypes;
816
816
  else
817
817
  return;
@@ -918,14 +918,14 @@ const VI = ({
918
918
  /* @__PURE__ */ u.jsxs("div", { className: "relative flex-1 overflow-y-auto pt-4 pb-2 pr-1", children: [
919
919
  /* @__PURE__ */ u.jsx("div", { className: "absolute left-0 right-0 top-1 px-2 pb-3 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground", children: /* @__PURE__ */ u.jsx("span", { children: "Timeline" }) }),
920
920
  /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute left-3 top-0 bottom-0 w-px bg-border/40" }),
921
- /* @__PURE__ */ u.jsx("div", { className: "flex flex-col gap-3 pt-6 pr-2", children: c.map((f) => {
922
- const v = d === f.id, g = (r == null ? void 0 : r.get(f.id)) ?? null;
921
+ /* @__PURE__ */ u.jsx("div", { className: "flex flex-col gap-3 pt-6 pr-2", children: c.map((p) => {
922
+ const v = d === p.id, g = (r == null ? void 0 : r.get(p.id)) ?? null;
923
923
  return /* @__PURE__ */ u.jsxs(
924
924
  "button",
925
925
  {
926
926
  type: "button",
927
927
  disabled: !n,
928
- onClick: () => n == null ? void 0 : n(f.id),
928
+ onClick: () => n == null ? void 0 : n(p.id),
929
929
  className: `relative flex items-start gap-2 text-left text-[11px] transition ${v ? "text-primary" : "text-muted-foreground"} ${n ? "hover:text-foreground" : "cursor-default opacity-70"}`,
930
930
  children: [
931
931
  /* @__PURE__ */ u.jsx(
@@ -936,10 +936,10 @@ const VI = ({
936
936
  }
937
937
  ),
938
938
  /* @__PURE__ */ u.jsxs("span", { className: "flex-1", children: [
939
- /* @__PURE__ */ u.jsx("span", { className: "block font-medium leading-tight", children: f.label || "User input" }),
939
+ /* @__PURE__ */ u.jsx("span", { className: "block font-medium leading-tight", children: p.label || "User input" }),
940
940
  /* @__PURE__ */ u.jsxs("span", { className: "text-[9px] uppercase tracking-wide text-muted-foreground/70", children: [
941
- f.step !== null ? `STEP ${f.step}` : "STEP —",
942
- f.next ? ` - ${f.next}` : ""
941
+ p.step !== null ? `STEP ${p.step}` : "STEP —",
942
+ p.next ? ` - ${p.next}` : ""
943
943
  ] }),
944
944
  g && /* @__PURE__ */ u.jsx(
945
945
  "p",
@@ -952,7 +952,7 @@ const VI = ({
952
952
  ] })
953
953
  ]
954
954
  },
955
- f.id
955
+ p.id
956
956
  );
957
957
  }) })
958
958
  ] }),
@@ -1316,29 +1316,29 @@ function Ps(e, t, n) {
1316
1316
  }
1317
1317
  return Ka(v) ? !0 : (t.append(Xl(x, g, s), c(v)), !1);
1318
1318
  }
1319
- const p = [], m = Object.assign(rv, {
1319
+ const f = [], m = Object.assign(rv, {
1320
1320
  defaultVisitor: d,
1321
1321
  convertValue: c,
1322
1322
  isVisitable: Ka
1323
1323
  });
1324
- function f(v, g) {
1324
+ function p(v, g) {
1325
1325
  if (!z.isUndefined(v)) {
1326
- if (p.indexOf(v) !== -1)
1326
+ if (f.indexOf(v) !== -1)
1327
1327
  throw Error("Circular reference detected in " + g.join("."));
1328
- p.push(v), z.forEach(v, function(b, w) {
1328
+ f.push(v), z.forEach(v, function(b, w) {
1329
1329
  (!(z.isUndefined(b) || b === null) && o.call(
1330
1330
  t,
1331
1331
  b,
1332
1332
  z.isString(w) ? w.trim() : w,
1333
1333
  g,
1334
1334
  m
1335
- )) === !0 && f(b, g ? g.concat(w) : [w]);
1336
- }), p.pop();
1335
+ )) === !0 && p(b, g ? g.concat(w) : [w]);
1336
+ }), f.pop();
1337
1337
  }
1338
1338
  }
1339
1339
  if (!z.isObject(e))
1340
1340
  throw new TypeError("data must be an object");
1341
- return f(e), t;
1341
+ return p(e), t;
1342
1342
  }
1343
1343
  function Jl(e) {
1344
1344
  const t = {
@@ -1653,8 +1653,8 @@ let Gt = class {
1653
1653
  const d = Kr(l);
1654
1654
  if (!d)
1655
1655
  throw new Error("header name must be a non-empty string");
1656
- const p = z.findKey(o, d);
1657
- (!p || o[p] === void 0 || c === !0 || c === void 0 && o[p] !== !1) && (o[p || l] = Jo(i));
1656
+ const f = z.findKey(o, d);
1657
+ (!f || o[f] === void 0 || c === !0 || c === void 0 && o[f] !== !1) && (o[f || l] = Jo(i));
1658
1658
  }
1659
1659
  const a = (i, l) => z.forEach(i, (c, d) => s(c, d, l));
1660
1660
  if (z.isPlainObject(t) || t instanceof this.constructor)
@@ -1817,13 +1817,13 @@ function Cv(e, t) {
1817
1817
  return t = t !== void 0 ? t : 1e3, function(l) {
1818
1818
  const c = Date.now(), d = r[s];
1819
1819
  a || (a = c), n[o] = l, r[o] = c;
1820
- let p = s, m = 0;
1821
- for (; p !== o; )
1822
- m += n[p++], p = p % e;
1820
+ let f = s, m = 0;
1821
+ for (; f !== o; )
1822
+ m += n[f++], f = f % e;
1823
1823
  if (o = (o + 1) % e, o === s && (s = (s + 1) % e), c - a < t)
1824
1824
  return;
1825
- const f = d && c - d;
1826
- return f ? Math.round(m * 1e3 / f) : void 0;
1825
+ const p = d && c - d;
1826
+ return p ? Math.round(m * 1e3 / p) : void 0;
1827
1827
  };
1828
1828
  }
1829
1829
  function Ev(e, t) {
@@ -1832,10 +1832,10 @@ function Ev(e, t) {
1832
1832
  n = d, o = null, s && (clearTimeout(s), s = null), e(...c);
1833
1833
  };
1834
1834
  return [(...c) => {
1835
- const d = Date.now(), p = d - n;
1836
- p >= r ? a(c, d) : (o = c, s || (s = setTimeout(() => {
1835
+ const d = Date.now(), f = d - n;
1836
+ f >= r ? a(c, d) : (o = c, s || (s = setTimeout(() => {
1837
1837
  s = null, a(o);
1838
- }, r - p)));
1838
+ }, r - f)));
1839
1839
  }, () => o && a(o)];
1840
1840
  }
1841
1841
  const us = (e, t, n = 3) => {
@@ -1844,7 +1844,7 @@ const us = (e, t, n = 3) => {
1844
1844
  return Ev((s) => {
1845
1845
  const a = s.loaded, i = s.lengthComputable ? s.total : void 0, l = a - r, c = o(l), d = a <= i;
1846
1846
  r = a;
1847
- const p = {
1847
+ const f = {
1848
1848
  loaded: a,
1849
1849
  total: i,
1850
1850
  progress: i ? a / i : void 0,
@@ -1855,7 +1855,7 @@ const us = (e, t, n = 3) => {
1855
1855
  lengthComputable: i != null,
1856
1856
  [t ? "download" : "upload"]: !0
1857
1857
  };
1858
- e(p);
1858
+ e(f);
1859
1859
  }, n);
1860
1860
  }, ec = (e, t) => {
1861
1861
  const n = e != null;
@@ -1908,14 +1908,14 @@ const nc = (e) => e instanceof Gt ? { ...e } : e;
1908
1908
  function or(e, t) {
1909
1909
  t = t || {};
1910
1910
  const n = {};
1911
- function r(c, d, p, m) {
1911
+ function r(c, d, f, m) {
1912
1912
  return z.isPlainObject(c) && z.isPlainObject(d) ? z.merge.call({ caseless: m }, c, d) : z.isPlainObject(d) ? z.merge({}, d) : z.isArray(d) ? d.slice() : d;
1913
1913
  }
1914
- function o(c, d, p, m) {
1914
+ function o(c, d, f, m) {
1915
1915
  if (z.isUndefined(d)) {
1916
1916
  if (!z.isUndefined(c))
1917
- return r(void 0, c, p, m);
1918
- } else return r(c, d, p, m);
1917
+ return r(void 0, c, f, m);
1918
+ } else return r(c, d, f, m);
1919
1919
  }
1920
1920
  function s(c, d) {
1921
1921
  if (!z.isUndefined(d))
@@ -1927,10 +1927,10 @@ function or(e, t) {
1927
1927
  return r(void 0, c);
1928
1928
  } else return r(void 0, d);
1929
1929
  }
1930
- function i(c, d, p) {
1931
- if (p in t)
1930
+ function i(c, d, f) {
1931
+ if (f in t)
1932
1932
  return r(c, d);
1933
- if (p in e)
1933
+ if (f in e)
1934
1934
  return r(void 0, c);
1935
1935
  }
1936
1936
  const l = {
@@ -1962,11 +1962,11 @@ function or(e, t) {
1962
1962
  socketPath: a,
1963
1963
  responseEncoding: a,
1964
1964
  validateStatus: i,
1965
- headers: (c, d, p) => o(nc(c), nc(d), p, !0)
1965
+ headers: (c, d, f) => o(nc(c), nc(d), f, !0)
1966
1966
  };
1967
1967
  return z.forEach(Object.keys({ ...e, ...t }), function(d) {
1968
- const p = l[d] || o, m = p(e[d], t[d], d);
1969
- z.isUndefined(m) && p !== i || (n[d] = m);
1968
+ const f = l[d] || o, m = f(e[d], t[d], d);
1969
+ z.isUndefined(m) && f !== i || (n[d] = m);
1970
1970
  }), n;
1971
1971
  }
1972
1972
  const rd = (e) => {
@@ -1980,8 +1980,8 @@ const rd = (e) => {
1980
1980
  a.setContentType(void 0);
1981
1981
  else if (z.isFunction(n.getHeaders)) {
1982
1982
  const l = n.getHeaders(), c = ["content-type", "content-length"];
1983
- Object.entries(l).forEach(([d, p]) => {
1984
- c.includes(d.toLowerCase()) && a.set(d, p);
1983
+ Object.entries(l).forEach(([d, f]) => {
1984
+ c.includes(d.toLowerCase()) && a.set(d, f);
1985
1985
  });
1986
1986
  }
1987
1987
  }
@@ -1995,9 +1995,9 @@ const rd = (e) => {
1995
1995
  const o = rd(e);
1996
1996
  let s = o.data;
1997
1997
  const a = Gt.from(o.headers).normalize();
1998
- let { responseType: i, onUploadProgress: l, onDownloadProgress: c } = o, d, p, m, f, v;
1998
+ let { responseType: i, onUploadProgress: l, onDownloadProgress: c } = o, d, f, m, p, v;
1999
1999
  function g() {
2000
- f && f(), v && v(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
2000
+ p && p(), v && v(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
2001
2001
  }
2002
2002
  let x = new XMLHttpRequest();
2003
2003
  x.open(o.method.toUpperCase(), o.url, !0), x.timeout = o.timeout;
@@ -2038,7 +2038,7 @@ const rd = (e) => {
2038
2038
  )), x = null;
2039
2039
  }, s === void 0 && a.setContentType(null), "setRequestHeader" in x && z.forEach(a.toJSON(), function(C, S) {
2040
2040
  x.setRequestHeader(S, C);
2041
- }), z.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), i && i !== "json" && (x.responseType = o.responseType), c && ([m, v] = us(c, !0), x.addEventListener("progress", m)), l && x.upload && ([p, f] = us(l), x.upload.addEventListener("progress", p), x.upload.addEventListener("loadend", f)), (o.cancelToken || o.signal) && (d = (y) => {
2041
+ }), z.isUndefined(o.withCredentials) || (x.withCredentials = !!o.withCredentials), i && i !== "json" && (x.responseType = o.responseType), c && ([m, v] = us(c, !0), x.addEventListener("progress", m)), l && x.upload && ([f, p] = us(l), x.upload.addEventListener("progress", f), x.upload.addEventListener("loadend", p)), (o.cancelToken || o.signal) && (d = (y) => {
2042
2042
  x && (r(!y || y.type ? new Dr(null, e, x) : y), x.abort(), x = null);
2043
2043
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
2044
2044
  const w = Tv(o.url);
@@ -2112,9 +2112,9 @@ const rd = (e) => {
2112
2112
  i(), l.close();
2113
2113
  return;
2114
2114
  }
2115
- let p = d.byteLength;
2115
+ let f = d.byteLength;
2116
2116
  if (n) {
2117
- let m = s += p;
2117
+ let m = s += f;
2118
2118
  n(m);
2119
2119
  }
2120
2120
  l.enqueue(new Uint8Array(d));
@@ -2157,11 +2157,11 @@ const rd = (e) => {
2157
2157
  }
2158
2158
  }).headers.has("Content-Type");
2159
2159
  return v && !g;
2160
- }), d = a && i && ic(() => z.isReadableStream(new r("").body)), p = {
2160
+ }), d = a && i && ic(() => z.isReadableStream(new r("").body)), f = {
2161
2161
  stream: d && ((v) => v.body)
2162
2162
  };
2163
2163
  o && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((v) => {
2164
- !p[v] && (p[v] = (g, x) => {
2164
+ !f[v] && (f[v] = (g, x) => {
2165
2165
  let b = g && g[v];
2166
2166
  if (b)
2167
2167
  return b.call(g);
@@ -2182,7 +2182,7 @@ const rd = (e) => {
2182
2182
  return v.byteLength;
2183
2183
  if (z.isURLSearchParams(v) && (v = v + ""), z.isString(v))
2184
2184
  return (await l(v)).byteLength;
2185
- }, f = async (v, g) => {
2185
+ }, p = async (v, g) => {
2186
2186
  const x = z.toFiniteNumber(v.getContentLength());
2187
2187
  return x ?? m(g);
2188
2188
  };
@@ -2208,7 +2208,7 @@ const rd = (e) => {
2208
2208
  });
2209
2209
  let K;
2210
2210
  try {
2211
- if (T && c && x !== "get" && x !== "head" && (K = await f(R, b)) !== 0) {
2211
+ if (T && c && x !== "get" && x !== "head" && (K = await p(R, b)) !== 0) {
2212
2212
  let G = new n(g, {
2213
2213
  method: "POST",
2214
2214
  body: b,
@@ -2252,7 +2252,7 @@ const rd = (e) => {
2252
2252
  );
2253
2253
  }
2254
2254
  k = k || "text";
2255
- let F = await p[z.findKey(p, k) || "text"](j, v);
2255
+ let F = await f[z.findKey(f, k) || "text"](j, v);
2256
2256
  return !E && N && N(), await new Promise((G, A) => {
2257
2257
  td(G, A, {
2258
2258
  data: F,
@@ -2470,31 +2470,31 @@ let tr = class {
2470
2470
  this.interceptors.response.forEach(function(g) {
2471
2471
  c.push(g.fulfilled, g.rejected);
2472
2472
  });
2473
- let d, p = 0, m;
2473
+ let d, f = 0, m;
2474
2474
  if (!l) {
2475
2475
  const v = [cc.bind(this), void 0];
2476
- for (v.unshift(...i), v.push(...c), m = v.length, d = Promise.resolve(n); p < m; )
2477
- d = d.then(v[p++], v[p++]);
2476
+ for (v.unshift(...i), v.push(...c), m = v.length, d = Promise.resolve(n); f < m; )
2477
+ d = d.then(v[f++], v[f++]);
2478
2478
  return d;
2479
2479
  }
2480
2480
  m = i.length;
2481
- let f = n;
2482
- for (; p < m; ) {
2483
- const v = i[p++], g = i[p++];
2481
+ let p = n;
2482
+ for (; f < m; ) {
2483
+ const v = i[f++], g = i[f++];
2484
2484
  try {
2485
- f = v(f);
2485
+ p = v(p);
2486
2486
  } catch (x) {
2487
2487
  g.call(this, x);
2488
2488
  break;
2489
2489
  }
2490
2490
  }
2491
2491
  try {
2492
- d = cc.call(this, f);
2492
+ d = cc.call(this, p);
2493
2493
  } catch (v) {
2494
2494
  return Promise.reject(v);
2495
2495
  }
2496
- for (p = 0, m = c.length; p < m; )
2497
- d = d.then(c[p++], c[p++]);
2496
+ for (f = 0, m = c.length; f < m; )
2497
+ d = d.then(c[f++], c[f++]);
2498
2498
  return d;
2499
2499
  }
2500
2500
  getUri(t) {
@@ -3007,14 +3007,14 @@ function dd(e, t, n, r) {
3007
3007
  return { newParts: e, newMeta: o, changed: !1 };
3008
3008
  o.lastSeq = r;
3009
3009
  }
3010
- const s = t.filter((p) => p.type === "text").map((p) => p.text ?? "").join(""), a = t.filter((p) => p.type !== "text"), i = o.lastText ?? ud(e);
3010
+ const s = t.filter((f) => f.type === "text").map((f) => f.text ?? "").join(""), a = t.filter((f) => f.type !== "text"), i = o.lastText ?? ud(e);
3011
3011
  let l = "", c = e.slice();
3012
3012
  if (s) {
3013
- const p = nw(i, s);
3014
- if (p === "" ? l = "" : p === s ? l = s : l = p, l) {
3013
+ const f = nw(i, s);
3014
+ if (f === "" ? l = "" : f === s ? l = s : l = f, l) {
3015
3015
  const m = c[c.length - 1];
3016
3016
  if ((m == null ? void 0 : m.type) === "text") {
3017
- const f = m.text ?? "", v = { ...m, text: f + l };
3017
+ const p = m.text ?? "", v = { ...m, text: p + l };
3018
3018
  c = [...c.slice(0, c.length - 1), v];
3019
3019
  } else
3020
3020
  c = [...c, { type: "text", text: l }];
@@ -3059,7 +3059,7 @@ function fd(e) {
3059
3059
  return t[t.length - 1] || null;
3060
3060
  }
3061
3061
  function ow(e = {}) {
3062
- const t = Qe(() => An(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s = Fe(e.headers ?? {}), a = e.credentials ?? "include", [i, l] = de(!1), [c, d] = de(null), [p, m] = de(""), [f, v] = de(null), [g, x] = de(0), [b, w] = de(!1), [y, C] = de(null), S = Fe(null), T = Fe(!0), k = Fe(0), R = Fe(null), _ = Fe(null), O = Fe(null), $ = Fe(null), W = Fe({
3062
+ const t = Qe(() => An(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s = Le(e.headers ?? {}), a = e.credentials ?? "include", [i, l] = de(!1), [c, d] = de(null), [f, m] = de(""), [p, v] = de(null), [g, x] = de(0), [b, w] = de(!1), [y, C] = de(null), S = Le(null), T = Le(!0), k = Le(0), R = Le(null), _ = Le(null), O = Le(null), $ = Le(null), W = Le({
3063
3063
  messageId: null,
3064
3064
  lastSeq: null,
3065
3065
  lastText: ""
@@ -3093,9 +3093,9 @@ function ow(e = {}) {
3093
3093
  var He;
3094
3094
  try {
3095
3095
  const qe = JSON.parse(JSON.stringify(Ve));
3096
- return (He = qe == null ? void 0 : qe.payload) != null && He.files_info && Array.isArray(qe.payload.files_info) && (qe.payload.files_info = qe.payload.files_info.map((Le) => ({
3097
- ...Le,
3098
- data: Le != null && Le.data ? `<base64 ${String(Le.data).length} chars>` : Le == null ? void 0 : Le.data
3096
+ return (He = qe == null ? void 0 : qe.payload) != null && He.files_info && Array.isArray(qe.payload.files_info) && (qe.payload.files_info = qe.payload.files_info.map(($e) => ({
3097
+ ...$e,
3098
+ data: $e != null && $e.data ? `<base64 ${String($e.data).length} chars>` : $e == null ? void 0 : $e.data
3099
3099
  }))), qe;
3100
3100
  } catch {
3101
3101
  return Ve;
@@ -3135,13 +3135,13 @@ function ow(e = {}) {
3135
3135
  ...Ve,
3136
3136
  ...He,
3137
3137
  ...s.current
3138
- }, Le = {
3138
+ }, $e = {
3139
3139
  "Content-Type": "application/json",
3140
3140
  Accept: "text/event-stream",
3141
3141
  ...qe
3142
3142
  }, Ue = await fetch(t + n, {
3143
3143
  method: "POST",
3144
- headers: Le,
3144
+ headers: $e,
3145
3145
  body: JSON.stringify(D),
3146
3146
  signal: F.signal,
3147
3147
  credentials: a
@@ -3191,9 +3191,9 @@ function ow(e = {}) {
3191
3191
  for (; (xe = it.indexOf(`
3192
3192
 
3193
3193
  `)) >= 0; ) {
3194
- const $e = it.slice(0, xe);
3194
+ const Fe = it.slice(0, xe);
3195
3195
  it = it.slice(xe + 2);
3196
- const Ge = $e.split(/\r?\n/), kt = [];
3196
+ const Ge = Fe.split(/\r?\n/), kt = [];
3197
3197
  for (const Je of Ge)
3198
3198
  if (!(!Je || Je.startsWith(":")) && Je.startsWith("data:")) {
3199
3199
  const dt = Je.slice(5);
@@ -3321,14 +3321,14 @@ function ow(e = {}) {
3321
3321
  G = "error", A = He, d(He), (at = E == null ? void 0 : E.onError) == null || at.call(E, He), P || ((yt = E == null ? void 0 : E.onConnectionError) == null || yt.call(E, He), P = !0);
3322
3322
  }
3323
3323
  } finally {
3324
- const Ve = k.current, He = _.current, qe = O.current, Le = $.current, Ue = G ?? (F.signal.aborted ? "aborted" : A ? "error" : "complete");
3324
+ const Ve = k.current, He = _.current, qe = O.current, $e = $.current, Ue = G ?? (F.signal.aborted ? "aborted" : A ? "error" : "complete");
3325
3325
  try {
3326
3326
  (Nt = E == null ? void 0 : E.onClosed) == null || Nt.call(E, {
3327
3327
  reason: Ue,
3328
3328
  lastSeq: Ve,
3329
3329
  lastCheckpointId: He,
3330
3330
  lastCheckpointNs: qe,
3331
- lastStateHistory: Le,
3331
+ lastStateHistory: $e,
3332
3332
  error: A
3333
3333
  });
3334
3334
  } catch (pt) {
@@ -3346,9 +3346,9 @@ function ow(e = {}) {
3346
3346
  }, []), {
3347
3347
  isStreaming: i,
3348
3348
  error: c,
3349
- assistantText: p,
3349
+ assistantText: f,
3350
3350
  assistantMessage: y,
3351
- lastCheckpointId: f,
3351
+ lastCheckpointId: p,
3352
3352
  lastSeq: g,
3353
3353
  connected: b,
3354
3354
  stream: V,
@@ -3407,7 +3407,7 @@ function iw({
3407
3407
  onThreadChange: r,
3408
3408
  onCurrentThreadDeleted: o
3409
3409
  }) {
3410
- const [s, a] = de([]), [i, l] = de(t), [c, d] = de(!1), [p, m] = de(null), [f, v] = de([]), [g, x] = de(!1), [, b] = de(null), [w, y] = de(null), [C, S] = de(!1), T = Fe(i), k = Fe(/* @__PURE__ */ new Map());
3410
+ const [s, a] = de([]), [i, l] = de(t), [c, d] = de(!1), [f, m] = de(null), [p, v] = de([]), [g, x] = de(!1), [, b] = de(null), [w, y] = de(null), [C, S] = de(!1), T = Le(i), k = Le(/* @__PURE__ */ new Map());
3411
3411
  Ze(() => {
3412
3412
  T.current = i;
3413
3413
  }, [i]);
@@ -3538,8 +3538,8 @@ function iw({
3538
3538
  currentThreadIdRef: T,
3539
3539
  setCurrentThreadId: l,
3540
3540
  isLoadingThreads: c,
3541
- threadsError: p,
3542
- sharedThreads: f,
3541
+ threadsError: f,
3542
+ sharedThreads: p,
3543
3543
  isLoadingSharedThreads: g,
3544
3544
  actions: K,
3545
3545
  addThreadFromEvent: V,
@@ -3562,9 +3562,9 @@ function lw({
3562
3562
  currentThreadIdRef: l,
3563
3563
  isLoadingThreads: c,
3564
3564
  threadsError: d,
3565
- sharedThreads: p,
3565
+ sharedThreads: f,
3566
3566
  isLoadingSharedThreads: m,
3567
- actions: f,
3567
+ actions: p,
3568
3568
  addThreadFromEvent: v,
3569
3569
  shareInFlight: g,
3570
3570
  shareStatus: x,
@@ -3582,9 +3582,9 @@ function lw({
3582
3582
  currentThreadIdRef: l,
3583
3583
  isLoading: c,
3584
3584
  error: d,
3585
- sharedThreads: p,
3585
+ sharedThreads: f,
3586
3586
  isLoadingSharedThreads: m,
3587
- actions: f,
3587
+ actions: p,
3588
3588
  shareInFlight: g,
3589
3589
  shareStatus: x,
3590
3590
  clearShareStatus: b,
@@ -3597,9 +3597,9 @@ function lw({
3597
3597
  l,
3598
3598
  c,
3599
3599
  d,
3600
- p,
3601
- m,
3602
3600
  f,
3601
+ m,
3602
+ p,
3603
3603
  g,
3604
3604
  x,
3605
3605
  b,
@@ -3852,7 +3852,7 @@ function ww(e, t) {
3852
3852
  }
3853
3853
  }
3854
3854
  function bw(e = []) {
3855
- const [t, n] = jg(ww, { ...vw, messages: e }), r = Fe([]), o = Fe(null), s = Fe(null), a = he(() => {
3855
+ const [t, n] = jg(ww, { ...vw, messages: e }), r = Le([]), o = Le(null), s = Le(null), a = he(() => {
3856
3856
  o.current !== null && typeof window < "u" && window.cancelAnimationFrame(o.current), s.current !== null && clearTimeout(s.current), o.current = null, s.current = null;
3857
3857
  const d = r.current;
3858
3858
  d.length && (r.current = [], n({ type: "batch", payload: { events: d } }));
@@ -3866,9 +3866,9 @@ function bw(e = []) {
3866
3866
  }, []);
3867
3867
  const c = Qe(() => ({
3868
3868
  reset: (d) => n({ type: "reset", payload: { messages: d } }),
3869
- seed: (d, p) => n({ type: "seed", payload: { messages: d, ...p ?? {} } }),
3869
+ seed: (d, f) => n({ type: "seed", payload: { messages: d, ...f ?? {} } }),
3870
3870
  prepend: (d) => n({ type: "prepend", payload: { messages: d } }),
3871
- pushUser: (d, p) => n({ type: "user_message", payload: { message: d, editingMessageId: p } }),
3871
+ pushUser: (d, f) => n({ type: "user_message", payload: { message: d, editingMessageId: f } }),
3872
3872
  onEvent: l
3873
3873
  }), [l]);
3874
3874
  return { state: t, dispatch: n, ...c };
@@ -3905,12 +3905,12 @@ function wc(e, t) {
3905
3905
  if (!s) return e;
3906
3906
  const a = e.messages, i = a.findIndex((S) => S.id === s && S.role === "assistant");
3907
3907
  if (i === -1) return e;
3908
- const l = a[i], c = e.messagesStreamMeta, d = c ?? {}, p = d[s], m = p ?? { lastSeq: null, lastText: ud(l.content) }, f = t.seq ?? null;
3909
- if (f !== null && typeof f == "number" && typeof m.lastSeq == "number" && f <= m.lastSeq)
3910
- return console.debug("[MessageReducer] skipping delta - seq <= lastSeq", { seq: f, lastSeq: m.lastSeq }), e;
3911
- const { newParts: v, newMeta: g, changed: x } = dd(l.content, t.delta, m, f);
3908
+ const l = a[i], c = e.messagesStreamMeta, d = c ?? {}, f = d[s], m = f ?? { lastSeq: null, lastText: ud(l.content) }, p = t.seq ?? null;
3909
+ if (p !== null && typeof p == "number" && typeof m.lastSeq == "number" && p <= m.lastSeq)
3910
+ return console.debug("[MessageReducer] skipping delta - seq <= lastSeq", { seq: p, lastSeq: m.lastSeq }), e;
3911
+ const { newParts: v, newMeta: g, changed: x } = dd(l.content, t.delta, m, p);
3912
3912
  if (!x) return e;
3913
- const b = { ...l, content: v }, w = So(a, i, b), y = !p || p.lastSeq !== g.lastSeq || p.lastText !== g.lastText, C = y ? { ...d, [s]: g } : c;
3913
+ const b = { ...l, content: v }, w = So(a, i, b), y = !f || f.lastSeq !== g.lastSeq || f.lastText !== g.lastText, C = y ? { ...d, [s]: g } : c;
3914
3914
  return y ? {
3915
3915
  ...e,
3916
3916
  messages: w,
@@ -3924,13 +3924,13 @@ function wc(e, t) {
3924
3924
  if (i >= 0) {
3925
3925
  const l = a[i];
3926
3926
  if (!((n = l.content) == null ? void 0 : n.some((d) => {
3927
- var p;
3928
- return (d == null ? void 0 : d.type) === "text" && ((p = d.text) == null ? void 0 : p.trim());
3927
+ var f;
3928
+ return (d == null ? void 0 : d.type) === "text" && ((f = d.text) == null ? void 0 : f.trim());
3929
3929
  }))) {
3930
3930
  console.debug("[MessageReducer] pruning assistant message with no visible text", {
3931
3931
  id: l.id,
3932
- contentTypes: (r = l.content) == null ? void 0 : r.map((p) => p == null ? void 0 : p.type),
3933
- contentPreview: (o = l.content) == null ? void 0 : o.map((p) => (p == null ? void 0 : p.type) === "text" ? String(p.text).slice(0, 100) : p == null ? void 0 : p.type)
3932
+ contentTypes: (r = l.content) == null ? void 0 : r.map((f) => f == null ? void 0 : f.type),
3933
+ contentPreview: (o = l.content) == null ? void 0 : o.map((f) => (f == null ? void 0 : f.type) === "text" ? String(f.text).slice(0, 100) : f == null ? void 0 : f.type)
3934
3934
  });
3935
3935
  const d = [...a.slice(0, i), ...a.slice(i + 1)];
3936
3936
  return { ...e, assemblingId: null, messages: d };
@@ -4070,17 +4070,17 @@ function Cw(e, t) {
4070
4070
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
4071
4071
  };
4072
4072
  t.artifact && (d.artifact = t.artifact);
4073
- const p = xd(a, d), m = t.artifact ?? a.artifact, f = {
4074
- ...p,
4073
+ const f = xd(a, d), m = t.artifact ?? a.artifact, p = {
4074
+ ...f,
4075
4075
  name: t.name ?? t.tool ?? a.name,
4076
4076
  content: c,
4077
4077
  artifact: m,
4078
4078
  additionalKwargs: {
4079
- ...p.additionalKwargs ?? {},
4079
+ ...f.additionalKwargs ?? {},
4080
4080
  toolStreaming: !1
4081
4081
  }
4082
4082
  };
4083
- return { ...e, messages: So(o, s, f) };
4083
+ return { ...e, messages: So(o, s, p) };
4084
4084
  }
4085
4085
  function Ew({
4086
4086
  api: e,
@@ -4095,10 +4095,10 @@ function Ew({
4095
4095
  isStreaming: c,
4096
4096
  getMessages: d
4097
4097
  }) {
4098
- const [p, m] = de(null), v = Qe(
4099
- () => Yn(p),
4100
- [p]
4101
- ).checkpoints, g = sx(v), x = g.timeline, [b, w] = de(!1), [y, C] = de(null), [S, T] = de(!1), [k, R] = de(!1), [_, O] = de(!1), [$, W] = de(null), H = Fe(o), N = Fe(null), K = Fe(null), V = Fe(null), D = Fe(null), j = Fe(null), E = Fe(/* @__PURE__ */ new Map());
4098
+ const [f, m] = de(null), v = Qe(
4099
+ () => Yn(f),
4100
+ [f]
4101
+ ).checkpoints, g = sx(v), x = g.timeline, [b, w] = de(!1), [y, C] = de(null), [S, T] = de(!1), [k, R] = de(!1), [_, O] = de(!1), [$, W] = de(null), H = Le(o), N = Le(null), K = Le(null), V = Le(null), D = Le(null), j = Le(null), E = Le(/* @__PURE__ */ new Map());
4102
4102
  Ze(() => {
4103
4103
  H.current = o;
4104
4104
  }, [o]);
@@ -4329,7 +4329,7 @@ function Rw({
4329
4329
  isStreaming: s,
4330
4330
  onError: a
4331
4331
  }) {
4332
- const { api: i } = Os(), { currentThreadId: l } = To(), { state: c, seed: d, prepend: p, pushUser: m, onEvent: f } = bw(), {
4332
+ const { api: i } = Os(), { currentThreadId: l } = To(), { state: c, seed: d, prepend: f, pushUser: m, onEvent: p } = bw(), {
4333
4333
  threadCheckpoints: v,
4334
4334
  threadTimeline: g,
4335
4335
  checkpointIndex: x,
@@ -4350,7 +4350,7 @@ function Rw({
4350
4350
  } = Ew({
4351
4351
  api: i,
4352
4352
  seed: d,
4353
- prepend: p,
4353
+ prepend: f,
4354
4354
  onError: a,
4355
4355
  currentThreadId: l,
4356
4356
  initialThreadId: t,
@@ -4409,7 +4409,7 @@ function Rw({
4409
4409
  markStreamPendingThread: H,
4410
4410
  resetHistoryState: N,
4411
4411
  pushUser: m,
4412
- onEvent: f
4412
+ onEvent: p
4413
4413
  }),
4414
4414
  [
4415
4415
  l,
@@ -4436,7 +4436,7 @@ function Rw({
4436
4436
  H,
4437
4437
  N,
4438
4438
  m,
4439
- f
4439
+ p
4440
4440
  ]
4441
4441
  ), P = Qe(
4442
4442
  () => ({
@@ -4490,7 +4490,7 @@ function jw({
4490
4490
  onConnectionError: l,
4491
4491
  onToolEnd: c
4492
4492
  }) {
4493
- const { api: d, baseUrl: p } = Os(), m = Qe(() => An(p), [p]), { stream: f, stop: v, isStreaming: g, error: x, setToken: b } = ow({ baseUrl: m }), [w, y] = de(!1);
4493
+ const { api: d, baseUrl: f } = Os(), m = Qe(() => An(f), [f]), { stream: p, stop: v, isStreaming: g, error: x, setToken: b } = ow({ baseUrl: m }), [w, y] = de(!1);
4494
4494
  return Ze(() => {
4495
4495
  y(g);
4496
4496
  }, [g]), /* @__PURE__ */ u.jsx(
@@ -4512,7 +4512,7 @@ function jw({
4512
4512
  _w,
4513
4513
  {
4514
4514
  api: d,
4515
- streamApi: { stream: f, stop: v, isStreaming: g, error: x, setToken: b },
4515
+ streamApi: { stream: p, stop: v, isStreaming: g, error: x, setToken: b },
4516
4516
  onError: s,
4517
4517
  onAuthError: a,
4518
4518
  onConnectionError: l,
@@ -4534,7 +4534,7 @@ function _w({
4534
4534
  onConnectionError: s,
4535
4535
  onToolEnd: a
4536
4536
  }) {
4537
- const { stream: i, stop: l, isStreaming: c, error: d, setToken: p } = n, { setCurrentThreadId: m, currentThreadIdRef: f, addThreadFromEvent: v } = To(), {
4537
+ const { stream: i, stop: l, isStreaming: c, error: d, setToken: f } = n, { setCurrentThreadId: m, currentThreadIdRef: p, addThreadFromEvent: v } = To(), {
4538
4538
  checkpoint: g,
4539
4539
  timelineCheckpoints: x,
4540
4540
  handleStateHistoryEvent: b,
@@ -4545,9 +4545,9 @@ function _w({
4545
4545
  onEvent: T
4546
4546
  } = Ds(), { registerClearThread: k, registerRespondToInterrupt: R } = kw(), _ = he(
4547
4547
  (D) => {
4548
- v(D), f.current !== D.threadId && ((D.created ?? !f.current) && w(D.threadId), y(D.threadId), m(D.threadId));
4548
+ v(D), p.current !== D.threadId && ((D.created ?? !p.current) && w(D.threadId), y(D.threadId), m(D.threadId));
4549
4549
  },
4550
- [v, w, y, m, f]
4550
+ [v, w, y, m, p]
4551
4551
  ), O = he(
4552
4552
  (D) => {
4553
4553
  D.type === "thread_info" ? _(D) : D.type === "state_history" ? b(D) : D.type === "tool.end" ? a == null || a(D) : T(D);
@@ -4568,13 +4568,13 @@ function _w({
4568
4568
  });
4569
4569
  },
4570
4570
  [i, O, r, o, s]
4571
- ), W = Fe(g);
4571
+ ), W = Le(g);
4572
4572
  Ze(() => {
4573
4573
  W.current = g;
4574
4574
  }, [g]);
4575
4575
  const H = he(
4576
4576
  async (D, j, E) => {
4577
- const F = f.current;
4577
+ const F = p.current;
4578
4578
  if (!F)
4579
4579
  throw new Error("No active thread to handle interrupt");
4580
4580
  const G = j ? E ?? !0 : !1, A = W.current, P = {
@@ -4585,7 +4585,7 @@ function _w({
4585
4585
  };
4586
4586
  $(P);
4587
4587
  },
4588
- [f, $]
4588
+ [p, $]
4589
4589
  );
4590
4590
  Ze(() => {
4591
4591
  R(H);
@@ -4603,7 +4603,7 @@ function _w({
4603
4603
  }, [N, k]);
4604
4604
  const K = he(
4605
4605
  async (D, j) => {
4606
- let E = f.current;
4606
+ let E = p.current;
4607
4607
  const F = (D == null ? void 0 : D.text) ?? "", G = (D == null ? void 0 : D.attachments) ?? [], A = (F == null ? void 0 : F.trim()) ?? "", P = { ...(D == null ? void 0 : D.payload) ?? {} }, q = Array.isArray(P.messages) ? P.messages : void 0;
4608
4608
  q && delete P.messages;
4609
4609
  const X = !!(q && q.length);
@@ -4641,7 +4641,7 @@ function _w({
4641
4641
  };
4642
4642
  $(Ne);
4643
4643
  },
4644
- [g, f, w, S, $, x]
4644
+ [g, p, w, S, $, x]
4645
4645
  ), V = Qe(
4646
4646
  () => ({
4647
4647
  isStreaming: c,
@@ -4650,9 +4650,9 @@ function _w({
4650
4650
  submit: K,
4651
4651
  send: K,
4652
4652
  stop: l,
4653
- setAuthToken: p
4653
+ setAuthToken: f
4654
4654
  }),
4655
- [c, d, K, l, p]
4655
+ [c, d, K, l, f]
4656
4656
  );
4657
4657
  return /* @__PURE__ */ u.jsx(bd.Provider, { value: V, children: e });
4658
4658
  }
@@ -4679,7 +4679,7 @@ function Mw(e, t) {
4679
4679
  return !0;
4680
4680
  }
4681
4681
  function Ow(e) {
4682
- const t = Fe(e), n = Fe(e);
4682
+ const t = Le(e), n = Le(e);
4683
4683
  return Mw(t.current, e) || (t.current = e, n.current = e), n.current;
4684
4684
  }
4685
4685
  function Jr({
@@ -4695,14 +4695,14 @@ function Jr({
4695
4695
  onThreadChange: c,
4696
4696
  onToolEnd: d
4697
4697
  }) {
4698
- const p = Ow(t), m = qr(i), f = qr(l), v = qr(a), g = qr(c), x = qr(d), b = Qe(
4698
+ const f = Ow(t), m = qr(i), p = qr(l), v = qr(a), g = qr(c), x = qr(d), b = Qe(
4699
4699
  () => ({
4700
4700
  initialThreadId: n,
4701
4701
  initialCheckpointId: r,
4702
4702
  initialCheckpointNs: o,
4703
4703
  autoLoadInitial: s,
4704
4704
  onError: m,
4705
- onAuthError: f,
4705
+ onAuthError: p,
4706
4706
  onConnectionError: v,
4707
4707
  onThreadChange: g,
4708
4708
  onToolEnd: x
@@ -4713,16 +4713,16 @@ function Jr({
4713
4713
  o,
4714
4714
  s,
4715
4715
  m,
4716
- f,
4716
+ p,
4717
4717
  v,
4718
4718
  g,
4719
4719
  x
4720
4720
  ]
4721
4721
  );
4722
- return /* @__PURE__ */ u.jsx(Jv, { apiConfig: p, children: /* @__PURE__ */ u.jsx(jw, { ...b, children: e }) });
4722
+ return /* @__PURE__ */ u.jsx(Jv, { apiConfig: f, children: /* @__PURE__ */ u.jsx(jw, { ...b, children: e }) });
4723
4723
  }
4724
4724
  function qr(e) {
4725
- const t = Fe(e);
4725
+ const t = Le(e);
4726
4726
  return Ze(() => {
4727
4727
  t.current = e;
4728
4728
  }, [e]), he((...n) => {
@@ -4923,18 +4923,18 @@ function xn(e, t = []) {
4923
4923
  function r(s, a) {
4924
4924
  const i = h.createContext(a), l = n.length;
4925
4925
  n = [...n, a];
4926
- const c = (p) => {
4926
+ const c = (f) => {
4927
4927
  var b;
4928
- const { scope: m, children: f, ...v } = p, g = ((b = m == null ? void 0 : m[e]) == null ? void 0 : b[l]) || i, x = h.useMemo(() => v, Object.values(v));
4929
- return /* @__PURE__ */ u.jsx(g.Provider, { value: x, children: f });
4928
+ const { scope: m, children: p, ...v } = f, g = ((b = m == null ? void 0 : m[e]) == null ? void 0 : b[l]) || i, x = h.useMemo(() => v, Object.values(v));
4929
+ return /* @__PURE__ */ u.jsx(g.Provider, { value: x, children: p });
4930
4930
  };
4931
4931
  c.displayName = s + "Provider";
4932
- function d(p, m) {
4932
+ function d(f, m) {
4933
4933
  var g;
4934
- const f = ((g = m == null ? void 0 : m[e]) == null ? void 0 : g[l]) || i, v = h.useContext(f);
4934
+ const p = ((g = m == null ? void 0 : m[e]) == null ? void 0 : g[l]) || i, v = h.useContext(p);
4935
4935
  if (v) return v;
4936
4936
  if (a !== void 0) return a;
4937
- throw new Error(`\`${p}\` must be used within \`${s}\``);
4937
+ throw new Error(`\`${f}\` must be used within \`${s}\``);
4938
4938
  }
4939
4939
  return [c, d];
4940
4940
  }
@@ -4960,8 +4960,8 @@ function Uw(...e) {
4960
4960
  }));
4961
4961
  return function(s) {
4962
4962
  const a = r.reduce((i, { useScope: l, scopeName: c }) => {
4963
- const p = l(s)[`__scope${c}`];
4964
- return { ...i, ...p };
4963
+ const f = l(s)[`__scope${c}`];
4964
+ return { ...i, ...f };
4965
4965
  }, {});
4966
4966
  return h.useMemo(() => ({ [`__scope${t.scopeName}`]: a }), [a]);
4967
4967
  };
@@ -4984,18 +4984,18 @@ function On({
4984
4984
  {
4985
4985
  const d = h.useRef(e !== void 0);
4986
4986
  h.useEffect(() => {
4987
- const p = d.current;
4988
- p !== i && console.warn(
4989
- `${r} is changing from ${p ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
4987
+ const f = d.current;
4988
+ f !== i && console.warn(
4989
+ `${r} is changing from ${f ? "controlled" : "uncontrolled"} to ${i ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
4990
4990
  ), d.current = i;
4991
4991
  }, [i, r]);
4992
4992
  }
4993
4993
  const c = h.useCallback(
4994
4994
  (d) => {
4995
- var p;
4995
+ var f;
4996
4996
  if (i) {
4997
4997
  const m = Kw(d) ? d(e) : d;
4998
- m !== e && ((p = a.current) == null || p.call(a, m));
4998
+ m !== e && ((f = a.current) == null || f.call(a, m));
4999
4999
  } else
5000
5000
  s(d);
5001
5001
  },
@@ -5062,26 +5062,26 @@ function Ls(e) {
5062
5062
  }
5063
5063
  );
5064
5064
  c.displayName = i;
5065
- const d = e + "CollectionItemSlot", p = "data-radix-collection-item", m = Rr(d), f = M.forwardRef(
5065
+ const d = e + "CollectionItemSlot", f = "data-radix-collection-item", m = Rr(d), p = M.forwardRef(
5066
5066
  (g, x) => {
5067
5067
  const { scope: b, children: w, ...y } = g, C = M.useRef(null), S = ze(x, C), T = s(d, b);
5068
- return M.useEffect(() => (T.itemMap.set(C, { ref: C, ...y }), () => void T.itemMap.delete(C))), /* @__PURE__ */ u.jsx(m, { [p]: "", ref: S, children: w });
5068
+ return M.useEffect(() => (T.itemMap.set(C, { ref: C, ...y }), () => void T.itemMap.delete(C))), /* @__PURE__ */ u.jsx(m, { [f]: "", ref: S, children: w });
5069
5069
  }
5070
5070
  );
5071
- f.displayName = d;
5071
+ p.displayName = d;
5072
5072
  function v(g) {
5073
5073
  const x = s(e + "CollectionConsumer", g);
5074
5074
  return M.useCallback(() => {
5075
5075
  const w = x.collectionRef.current;
5076
5076
  if (!w) return [];
5077
- const y = Array.from(w.querySelectorAll(`[${p}]`));
5077
+ const y = Array.from(w.querySelectorAll(`[${f}]`));
5078
5078
  return Array.from(x.itemMap.values()).sort(
5079
5079
  (T, k) => y.indexOf(T.ref.current) - y.indexOf(k.ref.current)
5080
5080
  );
5081
5081
  }, [x.collectionRef, x.itemMap]);
5082
5082
  }
5083
5083
  return [
5084
- { Provider: a, Slot: c, ItemSlot: f },
5084
+ { Provider: a, Slot: c, ItemSlot: p },
5085
5085
  v,
5086
5086
  r
5087
5087
  ];
@@ -5123,7 +5123,7 @@ var Xw = "DismissableLayer", Za = "dismissableLayer.update", Jw = "dismissableLa
5123
5123
  onInteractOutside: a,
5124
5124
  onDismiss: i,
5125
5125
  ...l
5126
- } = e, c = h.useContext(kd), [d, p] = h.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, f] = h.useState({}), v = ze(t, (k) => p(k)), g = Array.from(c.layers), [x] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), b = g.indexOf(x), w = d ? g.indexOf(d) : -1, y = c.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= b, S = eb((k) => {
5126
+ } = e, c = h.useContext(kd), [d, f] = h.useState(null), m = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, p] = h.useState({}), v = ze(t, (k) => f(k)), g = Array.from(c.layers), [x] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), b = g.indexOf(x), w = d ? g.indexOf(d) : -1, y = c.layersWithOutsidePointerEventsDisabled.size > 0, C = w >= b, S = eb((k) => {
5127
5127
  const R = k.target, _ = [...c.branches].some((O) => O.contains(R));
5128
5128
  !C || _ || (o == null || o(k), a == null || a(k), k.defaultPrevented || i == null || i());
5129
5129
  }, m), T = tb((k) => {
@@ -5140,7 +5140,7 @@ var Xw = "DismissableLayer", Za = "dismissableLayer.update", Jw = "dismissableLa
5140
5140
  }, [d, m, n, c]), h.useEffect(() => () => {
5141
5141
  d && (c.layers.delete(d), c.layersWithOutsidePointerEventsDisabled.delete(d), Cc());
5142
5142
  }, [d, c]), h.useEffect(() => {
5143
- const k = () => f({});
5143
+ const k = () => p({});
5144
5144
  return document.addEventListener(Za, k), () => document.removeEventListener(Za, k);
5145
5145
  }, []), /* @__PURE__ */ u.jsx(
5146
5146
  ve.div,
@@ -5245,7 +5245,7 @@ var Ca = "focusScope.autoFocusOnMount", Ea = "focusScope.autoFocusOnUnmount", kc
5245
5245
  onMountAutoFocus: o,
5246
5246
  onUnmountAutoFocus: s,
5247
5247
  ...a
5248
- } = e, [i, l] = h.useState(null), c = wt(o), d = wt(s), p = h.useRef(null), m = ze(t, (g) => l(g)), f = h.useRef({
5248
+ } = e, [i, l] = h.useState(null), c = wt(o), d = wt(s), f = h.useRef(null), m = ze(t, (g) => l(g)), p = h.useRef({
5249
5249
  paused: !1,
5250
5250
  pause() {
5251
5251
  this.paused = !0;
@@ -5257,13 +5257,13 @@ var Ca = "focusScope.autoFocusOnMount", Ea = "focusScope.autoFocusOnUnmount", kc
5257
5257
  h.useEffect(() => {
5258
5258
  if (r) {
5259
5259
  let g = function(y) {
5260
- if (f.paused || !i) return;
5260
+ if (p.paused || !i) return;
5261
5261
  const C = y.target;
5262
- i.contains(C) ? p.current = C : Pn(p.current, { select: !0 });
5262
+ i.contains(C) ? f.current = C : Pn(f.current, { select: !0 });
5263
5263
  }, x = function(y) {
5264
- if (f.paused || !i) return;
5264
+ if (p.paused || !i) return;
5265
5265
  const C = y.relatedTarget;
5266
- C !== null && (i.contains(C) || Pn(p.current, { select: !0 }));
5266
+ C !== null && (i.contains(C) || Pn(f.current, { select: !0 }));
5267
5267
  }, b = function(y) {
5268
5268
  if (document.activeElement === document.body)
5269
5269
  for (const S of y)
@@ -5275,9 +5275,9 @@ var Ca = "focusScope.autoFocusOnMount", Ea = "focusScope.autoFocusOnUnmount", kc
5275
5275
  document.removeEventListener("focusin", g), document.removeEventListener("focusout", x), w.disconnect();
5276
5276
  };
5277
5277
  }
5278
- }, [r, i, f.paused]), h.useEffect(() => {
5278
+ }, [r, i, p.paused]), h.useEffect(() => {
5279
5279
  if (i) {
5280
- Ic.add(f);
5280
+ Ic.add(p);
5281
5281
  const g = document.activeElement;
5282
5282
  if (!i.contains(g)) {
5283
5283
  const b = new CustomEvent(Ca, kc);
@@ -5286,21 +5286,21 @@ var Ca = "focusScope.autoFocusOnMount", Ea = "focusScope.autoFocusOnUnmount", kc
5286
5286
  return () => {
5287
5287
  i.removeEventListener(Ca, c), setTimeout(() => {
5288
5288
  const b = new CustomEvent(Ea, kc);
5289
- i.addEventListener(Ea, d), i.dispatchEvent(b), b.defaultPrevented || Pn(g ?? document.body, { select: !0 }), i.removeEventListener(Ea, d), Ic.remove(f);
5289
+ i.addEventListener(Ea, d), i.dispatchEvent(b), b.defaultPrevented || Pn(g ?? document.body, { select: !0 }), i.removeEventListener(Ea, d), Ic.remove(p);
5290
5290
  }, 0);
5291
5291
  };
5292
5292
  }
5293
- }, [i, c, d, f]);
5293
+ }, [i, c, d, p]);
5294
5294
  const v = h.useCallback(
5295
5295
  (g) => {
5296
- if (!n && !r || f.paused) return;
5296
+ if (!n && !r || p.paused) return;
5297
5297
  const x = g.key === "Tab" && !g.altKey && !g.ctrlKey && !g.metaKey, b = document.activeElement;
5298
5298
  if (x && b) {
5299
5299
  const w = g.currentTarget, [y, C] = ab(w);
5300
5300
  y && C ? !g.shiftKey && b === C ? (g.preventDefault(), n && Pn(y, { select: !0 })) : g.shiftKey && b === y && (g.preventDefault(), n && Pn(C, { select: !0 })) : b === w && g.preventDefault();
5301
5301
  }
5302
5302
  },
5303
- [n, r, f.paused]
5303
+ [n, r, p.paused]
5304
5304
  );
5305
5305
  return /* @__PURE__ */ u.jsx(ve.div, { tabIndex: -1, ...a, ref: m, onKeyDown: v });
5306
5306
  });
@@ -5486,48 +5486,48 @@ function _c(e, t, n) {
5486
5486
  reference: r,
5487
5487
  floating: o
5488
5488
  } = e;
5489
- const s = Sn(t), a = zi(t), i = Bi(a), l = _n(t), c = s === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, m = r[i] / 2 - o[i] / 2;
5490
- let f;
5489
+ const s = Sn(t), a = zi(t), i = Bi(a), l = _n(t), c = s === "y", d = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, m = r[i] / 2 - o[i] / 2;
5490
+ let p;
5491
5491
  switch (l) {
5492
5492
  case "top":
5493
- f = {
5493
+ p = {
5494
5494
  x: d,
5495
5495
  y: r.y - o.height
5496
5496
  };
5497
5497
  break;
5498
5498
  case "bottom":
5499
- f = {
5499
+ p = {
5500
5500
  x: d,
5501
5501
  y: r.y + r.height
5502
5502
  };
5503
5503
  break;
5504
5504
  case "right":
5505
- f = {
5505
+ p = {
5506
5506
  x: r.x + r.width,
5507
- y: p
5507
+ y: f
5508
5508
  };
5509
5509
  break;
5510
5510
  case "left":
5511
- f = {
5511
+ p = {
5512
5512
  x: r.x - o.width,
5513
- y: p
5513
+ y: f
5514
5514
  };
5515
5515
  break;
5516
5516
  default:
5517
- f = {
5517
+ p = {
5518
5518
  x: r.x,
5519
5519
  y: r.y
5520
5520
  };
5521
5521
  }
5522
5522
  switch ($r(t)) {
5523
5523
  case "start":
5524
- f[a] -= m * (n && c ? -1 : 1);
5524
+ p[a] -= m * (n && c ? -1 : 1);
5525
5525
  break;
5526
5526
  case "end":
5527
- f[a] += m * (n && c ? -1 : 1);
5527
+ p[a] += m * (n && c ? -1 : 1);
5528
5528
  break;
5529
5529
  }
5530
- return f;
5530
+ return p;
5531
5531
  }
5532
5532
  const Cb = async (e, t, n) => {
5533
5533
  const {
@@ -5542,8 +5542,8 @@ const Cb = async (e, t, n) => {
5542
5542
  strategy: o
5543
5543
  }), {
5544
5544
  x: d,
5545
- y: p
5546
- } = _c(c, r, l), m = r, f = {}, v = 0;
5545
+ y: f
5546
+ } = _c(c, r, l), m = r, p = {}, v = 0;
5547
5547
  for (let g = 0; g < i.length; g++) {
5548
5548
  const {
5549
5549
  name: x,
@@ -5555,11 +5555,11 @@ const Cb = async (e, t, n) => {
5555
5555
  reset: S
5556
5556
  } = await b({
5557
5557
  x: d,
5558
- y: p,
5558
+ y: f,
5559
5559
  initialPlacement: r,
5560
5560
  placement: m,
5561
5561
  strategy: o,
5562
- middlewareData: f,
5562
+ middlewareData: p,
5563
5563
  rects: c,
5564
5564
  platform: a,
5565
5565
  elements: {
@@ -5567,10 +5567,10 @@ const Cb = async (e, t, n) => {
5567
5567
  floating: t
5568
5568
  }
5569
5569
  });
5570
- d = w ?? d, p = y ?? p, f = {
5571
- ...f,
5570
+ d = w ?? d, f = y ?? f, p = {
5571
+ ...p,
5572
5572
  [x]: {
5573
- ...f[x],
5573
+ ...p[x],
5574
5574
  ...C
5575
5575
  }
5576
5576
  }, S && v <= 50 && (v++, typeof S == "object" && (S.placement && (m = S.placement), S.rects && (c = S.rects === !0 ? await a.getElementRects({
@@ -5579,15 +5579,15 @@ const Cb = async (e, t, n) => {
5579
5579
  strategy: o
5580
5580
  }) : S.rects), {
5581
5581
  x: d,
5582
- y: p
5582
+ y: f
5583
5583
  } = _c(c, m, l)), g = -1);
5584
5584
  }
5585
5585
  return {
5586
5586
  x: d,
5587
- y: p,
5587
+ y: f,
5588
5588
  placement: m,
5589
5589
  strategy: o,
5590
- middlewareData: f
5590
+ middlewareData: p
5591
5591
  };
5592
5592
  };
5593
5593
  async function oo(e, t) {
@@ -5603,15 +5603,15 @@ async function oo(e, t) {
5603
5603
  } = e, {
5604
5604
  boundary: c = "clippingAncestors",
5605
5605
  rootBoundary: d = "viewport",
5606
- elementContext: p = "floating",
5606
+ elementContext: f = "floating",
5607
5607
  altBoundary: m = !1,
5608
- padding: f = 0
5609
- } = jn(t, e), v = Ad(f), x = i[m ? p === "floating" ? "reference" : "floating" : p], b = hs(await s.getClippingRect({
5608
+ padding: p = 0
5609
+ } = jn(t, e), v = Ad(p), x = i[m ? f === "floating" ? "reference" : "floating" : f], b = hs(await s.getClippingRect({
5610
5610
  element: (n = await (s.isElement == null ? void 0 : s.isElement(x))) == null || n ? x : x.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(i.floating)),
5611
5611
  boundary: c,
5612
5612
  rootBoundary: d,
5613
5613
  strategy: l
5614
- })), w = p === "floating" ? {
5614
+ })), w = f === "floating" ? {
5615
5615
  x: r,
5616
5616
  y: o,
5617
5617
  width: a.floating.width,
@@ -5653,17 +5653,17 @@ const Eb = (e) => ({
5653
5653
  } = jn(e, t) || {};
5654
5654
  if (c == null)
5655
5655
  return {};
5656
- const p = Ad(d), m = {
5656
+ const f = Ad(d), m = {
5657
5657
  x: n,
5658
5658
  y: r
5659
- }, f = zi(o), v = Bi(f), g = await a.getDimensions(c), x = f === "y", b = x ? "top" : "left", w = x ? "bottom" : "right", y = x ? "clientHeight" : "clientWidth", C = s.reference[v] + s.reference[f] - m[f] - s.floating[v], S = m[f] - s.reference[f], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
5659
+ }, p = zi(o), v = Bi(p), g = await a.getDimensions(c), x = p === "y", b = x ? "top" : "left", w = x ? "bottom" : "right", y = x ? "clientHeight" : "clientWidth", C = s.reference[v] + s.reference[p] - m[p] - s.floating[v], S = m[p] - s.reference[p], T = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(c));
5660
5660
  let k = T ? T[y] : 0;
5661
5661
  (!k || !await (a.isElement == null ? void 0 : a.isElement(T))) && (k = i.floating[y] || s.floating[v]);
5662
- const R = C / 2 - S / 2, _ = k / 2 - g[v] / 2 - 1, O = Dn(p[b], _), $ = Dn(p[w], _), W = O, H = k - g[v] - $, N = k / 2 - g[v] / 2 + R, K = Qa(W, N, H), V = !l.arrow && $r(o) != null && N !== K && s.reference[v] / 2 - (N < W ? O : $) - g[v] / 2 < 0, D = V ? N < W ? N - W : N - H : 0;
5662
+ const R = C / 2 - S / 2, _ = k / 2 - g[v] / 2 - 1, O = Dn(f[b], _), $ = Dn(f[w], _), W = O, H = k - g[v] - $, N = k / 2 - g[v] / 2 + R, K = Qa(W, N, H), V = !l.arrow && $r(o) != null && N !== K && s.reference[v] / 2 - (N < W ? O : $) - g[v] / 2 < 0, D = V ? N < W ? N - W : N - H : 0;
5663
5663
  return {
5664
- [f]: m[f] + D,
5664
+ [p]: m[p] + D,
5665
5665
  data: {
5666
- [f]: K,
5666
+ [p]: K,
5667
5667
  centerOffset: N - K - D,
5668
5668
  ...V && {
5669
5669
  alignmentOffset: D
@@ -5687,9 +5687,9 @@ const Eb = (e) => ({
5687
5687
  elements: c
5688
5688
  } = t, {
5689
5689
  mainAxis: d = !0,
5690
- crossAxis: p = !0,
5690
+ crossAxis: f = !0,
5691
5691
  fallbackPlacements: m,
5692
- fallbackStrategy: f = "bestFit",
5692
+ fallbackStrategy: p = "bestFit",
5693
5693
  fallbackAxisSideDirection: v = "none",
5694
5694
  flipAlignment: g = !0,
5695
5695
  ...x
@@ -5700,7 +5700,7 @@ const Eb = (e) => ({
5700
5700
  !m && T && S.push(...Sb(i, g, v, C));
5701
5701
  const k = [i, ...S], R = await oo(t, x), _ = [];
5702
5702
  let O = ((r = s.flip) == null ? void 0 : r.overflows) || [];
5703
- if (d && _.push(R[b]), p) {
5703
+ if (d && _.push(R[b]), f) {
5704
5704
  const N = xb(o, a, C);
5705
5705
  _.push(R[N[0]], R[N[1]]);
5706
5706
  }
@@ -5710,7 +5710,7 @@ const Eb = (e) => ({
5710
5710
  }], !_.every((N) => N <= 0)) {
5711
5711
  var $, W;
5712
5712
  const N = ((($ = s.flip) == null ? void 0 : $.index) || 0) + 1, K = k[N];
5713
- if (K && (!(p === "alignment" ? w !== Sn(K) : !1) || // We leave the current main axis only if every placement on that axis
5713
+ if (K && (!(f === "alignment" ? w !== Sn(K) : !1) || // We leave the current main axis only if every placement on that axis
5714
5714
  // overflows the main axis.
5715
5715
  O.every((j) => Sn(j.placement) === w ? j.overflows[0] > 0 : !0)))
5716
5716
  return {
@@ -5724,7 +5724,7 @@ const Eb = (e) => ({
5724
5724
  };
5725
5725
  let V = (W = O.filter((D) => D.overflows[0] <= 0).sort((D, j) => D.overflows[1] - j.overflows[1])[0]) == null ? void 0 : W.placement;
5726
5726
  if (!V)
5727
- switch (f) {
5727
+ switch (p) {
5728
5728
  case "bestFit": {
5729
5729
  var H;
5730
5730
  const D = (H = O.filter((j) => {
@@ -5812,26 +5812,26 @@ async function Ib(e, t) {
5812
5812
  placement: n,
5813
5813
  platform: r,
5814
5814
  elements: o
5815
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = _n(n), i = $r(n), l = Sn(n) === "y", c = jd.has(a) ? -1 : 1, d = s && l ? -1 : 1, p = jn(t, e);
5815
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), a = _n(n), i = $r(n), l = Sn(n) === "y", c = jd.has(a) ? -1 : 1, d = s && l ? -1 : 1, f = jn(t, e);
5816
5816
  let {
5817
5817
  mainAxis: m,
5818
- crossAxis: f,
5818
+ crossAxis: p,
5819
5819
  alignmentAxis: v
5820
- } = typeof p == "number" ? {
5821
- mainAxis: p,
5820
+ } = typeof f == "number" ? {
5821
+ mainAxis: f,
5822
5822
  crossAxis: 0,
5823
5823
  alignmentAxis: null
5824
5824
  } : {
5825
- mainAxis: p.mainAxis || 0,
5826
- crossAxis: p.crossAxis || 0,
5827
- alignmentAxis: p.alignmentAxis
5825
+ mainAxis: f.mainAxis || 0,
5826
+ crossAxis: f.crossAxis || 0,
5827
+ alignmentAxis: f.alignmentAxis
5828
5828
  };
5829
- return i && typeof v == "number" && (f = i === "end" ? v * -1 : v), l ? {
5830
- x: f * d,
5829
+ return i && typeof v == "number" && (p = i === "end" ? v * -1 : v), l ? {
5830
+ x: p * d,
5831
5831
  y: m * c
5832
5832
  } : {
5833
5833
  x: m * c,
5834
- y: f * d
5834
+ y: p * d
5835
5835
  };
5836
5836
  }
5837
5837
  const Nb = function(e) {
@@ -5884,20 +5884,20 @@ const Nb = function(e) {
5884
5884
  } = jn(e, t), c = {
5885
5885
  x: n,
5886
5886
  y: r
5887
- }, d = await oo(t, l), p = Sn(_n(o)), m = Fi(p);
5888
- let f = c[m], v = c[p];
5887
+ }, d = await oo(t, l), f = Sn(_n(o)), m = Fi(f);
5888
+ let p = c[m], v = c[f];
5889
5889
  if (s) {
5890
- const x = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", w = f + d[x], y = f - d[b];
5891
- f = Qa(w, f, y);
5890
+ const x = m === "y" ? "top" : "left", b = m === "y" ? "bottom" : "right", w = p + d[x], y = p - d[b];
5891
+ p = Qa(w, p, y);
5892
5892
  }
5893
5893
  if (a) {
5894
- const x = p === "y" ? "top" : "left", b = p === "y" ? "bottom" : "right", w = v + d[x], y = v - d[b];
5894
+ const x = f === "y" ? "top" : "left", b = f === "y" ? "bottom" : "right", w = v + d[x], y = v - d[b];
5895
5895
  v = Qa(w, v, y);
5896
5896
  }
5897
5897
  const g = i.fn({
5898
5898
  ...t,
5899
- [m]: f,
5900
- [p]: v
5899
+ [m]: p,
5900
+ [f]: v
5901
5901
  });
5902
5902
  return {
5903
5903
  ...g,
@@ -5906,7 +5906,7 @@ const Nb = function(e) {
5906
5906
  y: g.y - r,
5907
5907
  enabled: {
5908
5908
  [m]: s,
5909
- [p]: a
5909
+ [f]: a
5910
5910
  }
5911
5911
  }
5912
5912
  };
@@ -5929,8 +5929,8 @@ const Nb = function(e) {
5929
5929
  } = jn(e, t), d = {
5930
5930
  x: n,
5931
5931
  y: r
5932
- }, p = Sn(o), m = Fi(p);
5933
- let f = d[m], v = d[p];
5932
+ }, f = Sn(o), m = Fi(f);
5933
+ let p = d[m], v = d[f];
5934
5934
  const g = jn(i, t), x = typeof g == "number" ? {
5935
5935
  mainAxis: g,
5936
5936
  crossAxis: 0
@@ -5941,16 +5941,16 @@ const Nb = function(e) {
5941
5941
  };
5942
5942
  if (l) {
5943
5943
  const y = m === "y" ? "height" : "width", C = s.reference[m] - s.floating[y] + x.mainAxis, S = s.reference[m] + s.reference[y] - x.mainAxis;
5944
- f < C ? f = C : f > S && (f = S);
5944
+ p < C ? p = C : p > S && (p = S);
5945
5945
  }
5946
5946
  if (c) {
5947
5947
  var b, w;
5948
- const y = m === "y" ? "width" : "height", C = jd.has(_n(o)), S = s.reference[p] - s.floating[y] + (C && ((b = a.offset) == null ? void 0 : b[p]) || 0) + (C ? 0 : x.crossAxis), T = s.reference[p] + s.reference[y] + (C ? 0 : ((w = a.offset) == null ? void 0 : w[p]) || 0) - (C ? x.crossAxis : 0);
5948
+ const y = m === "y" ? "width" : "height", C = jd.has(_n(o)), S = s.reference[f] - s.floating[y] + (C && ((b = a.offset) == null ? void 0 : b[f]) || 0) + (C ? 0 : x.crossAxis), T = s.reference[f] + s.reference[y] + (C ? 0 : ((w = a.offset) == null ? void 0 : w[f]) || 0) - (C ? x.crossAxis : 0);
5949
5949
  v < S ? v = S : v > T && (v = T);
5950
5950
  }
5951
5951
  return {
5952
- [m]: f,
5953
- [p]: v
5952
+ [m]: p,
5953
+ [f]: v
5954
5954
  };
5955
5955
  }
5956
5956
  };
@@ -5969,17 +5969,17 @@ const Nb = function(e) {
5969
5969
  apply: l = () => {
5970
5970
  },
5971
5971
  ...c
5972
- } = jn(e, t), d = await oo(t, c), p = _n(o), m = $r(o), f = Sn(o) === "y", {
5972
+ } = jn(e, t), d = await oo(t, c), f = _n(o), m = $r(o), p = Sn(o) === "y", {
5973
5973
  width: v,
5974
5974
  height: g
5975
5975
  } = s.floating;
5976
5976
  let x, b;
5977
- p === "top" || p === "bottom" ? (x = p, b = m === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (b = p, x = m === "end" ? "top" : "bottom");
5977
+ f === "top" || f === "bottom" ? (x = f, b = m === (await (a.isRTL == null ? void 0 : a.isRTL(i.floating)) ? "start" : "end") ? "left" : "right") : (b = f, x = m === "end" ? "top" : "bottom");
5978
5978
  const w = g - d.top - d.bottom, y = v - d.left - d.right, C = Dn(g - d[x], w), S = Dn(v - d[b], y), T = !t.middlewareData.shift;
5979
5979
  let k = C, R = S;
5980
5980
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = y), (r = t.middlewareData.shift) != null && r.enabled.y && (k = w), T && !m) {
5981
5981
  const O = Zt(d.left, 0), $ = Zt(d.right, 0), W = Zt(d.top, 0), H = Zt(d.bottom, 0);
5982
- f ? R = v - 2 * (O !== 0 || $ !== 0 ? O + $ : Zt(d.left, d.right)) : k = g - 2 * (W !== 0 || H !== 0 ? W + H : Zt(d.top, d.bottom));
5982
+ p ? R = v - 2 * (O !== 0 || $ !== 0 ? O + $ : Zt(d.left, d.right)) : k = g - 2 * (W !== 0 || H !== 0 ? W + H : Zt(d.top, d.bottom));
5983
5983
  }
5984
5984
  await l({
5985
5985
  ...t,
@@ -6154,18 +6154,18 @@ function ar(e, t, n, r) {
6154
6154
  let a = Cn(1);
6155
6155
  t && (r ? pn(r) && (a = Cr(r)) : a = Cr(e));
6156
6156
  const i = Ub(s, n, r) ? Od(s) : Cn(0);
6157
- let l = (o.left + i.x) / a.x, c = (o.top + i.y) / a.y, d = o.width / a.x, p = o.height / a.y;
6157
+ let l = (o.left + i.x) / a.x, c = (o.top + i.y) / a.y, d = o.width / a.x, f = o.height / a.y;
6158
6158
  if (s) {
6159
- const m = en(s), f = r && pn(r) ? en(r) : r;
6159
+ const m = en(s), p = r && pn(r) ? en(r) : r;
6160
6160
  let v = m, g = ti(v);
6161
- for (; g && r && f !== v; ) {
6161
+ for (; g && r && p !== v; ) {
6162
6162
  const x = Cr(g), b = g.getBoundingClientRect(), w = hn(g), y = b.left + (g.clientLeft + parseFloat(w.paddingLeft)) * x.x, C = b.top + (g.clientTop + parseFloat(w.paddingTop)) * x.y;
6163
- l *= x.x, c *= x.y, d *= x.x, p *= x.y, l += y, c += C, v = en(g), g = ti(v);
6163
+ l *= x.x, c *= x.y, d *= x.x, f *= x.y, l += y, c += C, v = en(g), g = ti(v);
6164
6164
  }
6165
6165
  }
6166
6166
  return hs({
6167
6167
  width: d,
6168
- height: p,
6168
+ height: f,
6169
6169
  x: l,
6170
6170
  y: c
6171
6171
  });
@@ -6195,12 +6195,12 @@ function Wb(e) {
6195
6195
  scrollLeft: 0,
6196
6196
  scrollTop: 0
6197
6197
  }, c = Cn(1);
6198
- const d = Cn(0), p = En(r);
6199
- if ((p || !p && !s) && ((Fr(r) !== "body" || Co(a)) && (l = Hs(r)), En(r))) {
6200
- const f = ar(r);
6201
- c = Cr(r), d.x = f.x + r.clientLeft, d.y = f.y + r.clientTop;
6198
+ const d = Cn(0), f = En(r);
6199
+ if ((f || !f && !s) && ((Fr(r) !== "body" || Co(a)) && (l = Hs(r)), En(r))) {
6200
+ const p = ar(r);
6201
+ c = Cr(r), d.x = p.x + r.clientLeft, d.y = p.y + r.clientTop;
6202
6202
  }
6203
- const m = a && !p && !s ? Dd(a, l) : Cn(0);
6203
+ const m = a && !f && !s ? Dd(a, l) : Cn(0);
6204
6204
  return {
6205
6205
  width: n.width * c.x,
6206
6206
  height: n.height * c.y,
@@ -6233,7 +6233,7 @@ function qb(e, t) {
6233
6233
  }
6234
6234
  const c = Us(r);
6235
6235
  if (c <= 0) {
6236
- const d = r.ownerDocument, p = d.body, m = getComputedStyle(p), f = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, v = Math.abs(r.clientWidth - p.clientWidth - f);
6236
+ const d = r.ownerDocument, f = d.body, m = getComputedStyle(f), p = d.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, v = Math.abs(r.clientWidth - f.clientWidth - p);
6237
6237
  v <= Dc && (s -= v);
6238
6238
  } else c <= Dc && (s += c);
6239
6239
  return {
@@ -6297,8 +6297,8 @@ function Jb(e) {
6297
6297
  strategy: o
6298
6298
  } = e;
6299
6299
  const a = [...n === "clippingAncestors" ? zs(t) ? [] : Xb(t, this._c) : [].concat(n), r], i = a[0], l = a.reduce((c, d) => {
6300
- const p = Lc(t, d, o);
6301
- return c.top = Zt(p.top, c.top), c.right = Dn(p.right, c.right), c.bottom = Dn(p.bottom, c.bottom), c.left = Zt(p.left, c.left), c;
6300
+ const f = Lc(t, d, o);
6301
+ return c.top = Zt(f.top, c.top), c.right = Dn(f.right, c.right), c.bottom = Dn(f.bottom, c.bottom), c.left = Zt(f.left, c.left), c;
6302
6302
  }, Lc(t, i, o));
6303
6303
  return {
6304
6304
  width: l.right - l.left,
@@ -6329,13 +6329,13 @@ function Qb(e, t, n) {
6329
6329
  }
6330
6330
  if (r || !r && !s)
6331
6331
  if ((Fr(t) !== "body" || Co(o)) && (i = Hs(t)), r) {
6332
- const f = ar(t, !0, s, t);
6333
- l.x = f.x + t.clientLeft, l.y = f.y + t.clientTop;
6332
+ const p = ar(t, !0, s, t);
6333
+ l.x = p.x + t.clientLeft, l.y = p.y + t.clientTop;
6334
6334
  } else o && c();
6335
6335
  s && !r && o && c();
6336
- const d = o && !r && !s ? Dd(o, i) : Cn(0), p = a.left + i.scrollLeft - l.x - d.x, m = a.top + i.scrollTop - l.y - d.y;
6336
+ const d = o && !r && !s ? Dd(o, i) : Cn(0), f = a.left + i.scrollLeft - l.x - d.x, m = a.top + i.scrollTop - l.y - d.y;
6337
6337
  return {
6338
- x: p,
6338
+ x: f,
6339
6339
  y: m,
6340
6340
  width: a.width,
6341
6341
  height: a.height
@@ -6411,13 +6411,13 @@ function ry(e, t) {
6411
6411
  i === void 0 && (i = !1), l === void 0 && (l = 1), s();
6412
6412
  const c = e.getBoundingClientRect(), {
6413
6413
  left: d,
6414
- top: p,
6414
+ top: f,
6415
6415
  width: m,
6416
- height: f
6416
+ height: p
6417
6417
  } = c;
6418
- if (i || t(), !m || !f)
6418
+ if (i || t(), !m || !p)
6419
6419
  return;
6420
- const v = $o(p), g = $o(o.clientWidth - (d + m)), x = $o(o.clientHeight - (p + f)), b = $o(d), y = {
6420
+ const v = $o(f), g = $o(o.clientWidth - (d + m)), x = $o(o.clientHeight - (f + p)), b = $o(d), y = {
6421
6421
  rootMargin: -v + "px " + -g + "px " + -x + "px " + -b + "px",
6422
6422
  threshold: Zt(0, Dn(1, l)) || 1
6423
6423
  };
@@ -6460,15 +6460,15 @@ function oy(e, t, n, r) {
6460
6460
  passive: !0
6461
6461
  }), s && b.addEventListener("resize", n);
6462
6462
  });
6463
- const p = c && i ? ry(c, n) : null;
6464
- let m = -1, f = null;
6465
- a && (f = new ResizeObserver((b) => {
6463
+ const f = c && i ? ry(c, n) : null;
6464
+ let m = -1, p = null;
6465
+ a && (p = new ResizeObserver((b) => {
6466
6466
  let [w] = b;
6467
- w && w.target === c && f && (f.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
6467
+ w && w.target === c && p && (p.unobserve(t), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
6468
6468
  var y;
6469
- (y = f) == null || y.observe(t);
6469
+ (y = p) == null || y.observe(t);
6470
6470
  })), n();
6471
- }), c && !l && f.observe(c), f.observe(t));
6471
+ }), c && !l && p.observe(c), p.observe(t));
6472
6472
  let v, g = l ? ar(e) : null;
6473
6473
  l && x();
6474
6474
  function x() {
@@ -6479,7 +6479,7 @@ function oy(e, t, n, r) {
6479
6479
  var b;
6480
6480
  d.forEach((w) => {
6481
6481
  o && w.removeEventListener("scroll", n), s && w.removeEventListener("resize", n);
6482
- }), p == null || p(), (b = f) == null || b.disconnect(), f = null, l && cancelAnimationFrame(v);
6482
+ }), f == null || f(), (b = p) == null || b.disconnect(), p = null, l && cancelAnimationFrame(v);
6483
6483
  };
6484
6484
  }
6485
6485
  const sy = Nb, ay = Ab, iy = kb, ly = _b, cy = Rb, Fc = Eb, uy = jb, dy = (e, t, n) => {
@@ -6554,15 +6554,15 @@ function hy(e) {
6554
6554
  transform: i = !0,
6555
6555
  whileElementsMounted: l,
6556
6556
  open: c
6557
- } = e, [d, p] = h.useState({
6557
+ } = e, [d, f] = h.useState({
6558
6558
  x: 0,
6559
6559
  y: 0,
6560
6560
  strategy: n,
6561
6561
  placement: t,
6562
6562
  middlewareData: {},
6563
6563
  isPositioned: !1
6564
- }), [m, f] = h.useState(r);
6565
- ms(m, r) || f(r);
6564
+ }), [m, p] = h.useState(r);
6565
+ ms(m, r) || p(r);
6566
6566
  const [v, g] = h.useState(null), [x, b] = h.useState(null), w = h.useCallback((j) => {
6567
6567
  j !== T.current && (T.current = j, g(j));
6568
6568
  }, []), y = h.useCallback((j) => {
@@ -6585,12 +6585,12 @@ function hy(e) {
6585
6585
  isPositioned: W.current !== !1
6586
6586
  };
6587
6587
  N.current && !ms(R.current, F) && (R.current = F, go.flushSync(() => {
6588
- p(F);
6588
+ f(F);
6589
6589
  }));
6590
6590
  });
6591
6591
  }, [m, t, n, $, W]);
6592
6592
  ts(() => {
6593
- c === !1 && R.current.isPositioned && (R.current.isPositioned = !1, p((j) => ({
6593
+ c === !1 && R.current.isPositioned && (R.current.isPositioned = !1, f((j) => ({
6594
6594
  ...j,
6595
6595
  isPositioned: !1
6596
6596
  })));
@@ -6752,9 +6752,9 @@ var Ki = "PopperContent", [ky, Ry] = Ud(Ki), Gd = h.forwardRef(
6752
6752
  avoidCollisions: l = !0,
6753
6753
  collisionBoundary: c = [],
6754
6754
  collisionPadding: d = 0,
6755
- sticky: p = "partial",
6755
+ sticky: f = "partial",
6756
6756
  hideWhenDetached: m = !1,
6757
- updatePositionStrategy: f = "optimized",
6757
+ updatePositionStrategy: p = "optimized",
6758
6758
  onPlaced: v,
6759
6759
  ...g
6760
6760
  } = e, x = Wd(Ki, n), [b, w] = h.useState(null), y = ze(t, (ae) => w(ae)), [C, S] = h.useState(null), T = Hd(C), k = (T == null ? void 0 : T.width) ?? 0, R = (T == null ? void 0 : T.height) ?? 0, _ = r + (s !== "center" ? "-" + s : ""), O = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], W = $.length > 0, H = {
@@ -6767,7 +6767,7 @@ var Ki = "PopperContent", [ky, Ry] = Ud(Ki), Gd = h.forwardRef(
6767
6767
  strategy: "fixed",
6768
6768
  placement: _,
6769
6769
  whileElementsMounted: (...ae) => oy(...ae, {
6770
- animationFrame: f === "always"
6770
+ animationFrame: p === "always"
6771
6771
  }),
6772
6772
  elements: {
6773
6773
  reference: x.anchor
@@ -6777,7 +6777,7 @@ var Ki = "PopperContent", [ky, Ry] = Ud(Ki), Gd = h.forwardRef(
6777
6777
  l && xy({
6778
6778
  mainAxis: !0,
6779
6779
  crossAxis: !1,
6780
- limiter: p === "partial" ? vy() : void 0,
6780
+ limiter: f === "partial" ? vy() : void 0,
6781
6781
  ...H
6782
6782
  }),
6783
6783
  l && wy({ ...H }),
@@ -6913,9 +6913,9 @@ var Ay = (e) => ({
6913
6913
  options: e,
6914
6914
  fn(t) {
6915
6915
  var x, b, w;
6916
- const { placement: n, rects: r, middlewareData: o } = t, a = ((x = o.arrow) == null ? void 0 : x.centerOffset) !== 0, i = a ? 0 : e.arrowWidth, l = a ? 0 : e.arrowHeight, [c, d] = Jd(n), p = { start: "0%", center: "50%", end: "100%" }[d], m = (((b = o.arrow) == null ? void 0 : b.x) ?? 0) + i / 2, f = (((w = o.arrow) == null ? void 0 : w.y) ?? 0) + l / 2;
6916
+ const { placement: n, rects: r, middlewareData: o } = t, a = ((x = o.arrow) == null ? void 0 : x.centerOffset) !== 0, i = a ? 0 : e.arrowWidth, l = a ? 0 : e.arrowHeight, [c, d] = Jd(n), f = { start: "0%", center: "50%", end: "100%" }[d], m = (((b = o.arrow) == null ? void 0 : b.x) ?? 0) + i / 2, p = (((w = o.arrow) == null ? void 0 : w.y) ?? 0) + l / 2;
6917
6917
  let v = "", g = "";
6918
- return c === "bottom" ? (v = a ? p : `${m}px`, g = `${-l}px`) : c === "top" ? (v = a ? p : `${m}px`, g = `${r.floating.height + l}px`) : c === "right" ? (v = `${-l}px`, g = a ? p : `${f}px`) : c === "left" && (v = `${r.floating.width + l}px`, g = a ? p : `${f}px`), { data: { x: v, y: g } };
6918
+ return c === "bottom" ? (v = a ? f : `${m}px`, g = `${-l}px`) : c === "top" ? (v = a ? f : `${m}px`, g = `${r.floating.height + l}px`) : c === "right" ? (v = `${-l}px`, g = a ? f : `${p}px`) : c === "left" && (v = `${r.floating.width + l}px`, g = a ? f : `${p}px`), { data: { x: v, y: g } };
6919
6919
  }
6920
6920
  });
6921
6921
  function Jd(e) {
@@ -6958,25 +6958,25 @@ function Py(e) {
6958
6958
  }, [i]), _t(() => {
6959
6959
  const c = r.current, d = o.current;
6960
6960
  if (d !== e) {
6961
- const m = s.current, f = Fo(c);
6962
- e ? l("MOUNT") : f === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(d && m !== f ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
6961
+ const m = s.current, p = Fo(c);
6962
+ e ? l("MOUNT") : p === "none" || (c == null ? void 0 : c.display) === "none" ? l("UNMOUNT") : l(d && m !== p ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
6963
6963
  }
6964
6964
  }, [e, l]), _t(() => {
6965
6965
  if (t) {
6966
6966
  let c;
6967
- const d = t.ownerDocument.defaultView ?? window, p = (f) => {
6968
- const g = Fo(r.current).includes(CSS.escape(f.animationName));
6969
- if (f.target === t && g && (l("ANIMATION_END"), !o.current)) {
6967
+ const d = t.ownerDocument.defaultView ?? window, f = (p) => {
6968
+ const g = Fo(r.current).includes(CSS.escape(p.animationName));
6969
+ if (p.target === t && g && (l("ANIMATION_END"), !o.current)) {
6970
6970
  const x = t.style.animationFillMode;
6971
6971
  t.style.animationFillMode = "forwards", c = d.setTimeout(() => {
6972
6972
  t.style.animationFillMode === "forwards" && (t.style.animationFillMode = x);
6973
6973
  });
6974
6974
  }
6975
- }, m = (f) => {
6976
- f.target === t && (s.current = Fo(r.current));
6975
+ }, m = (p) => {
6976
+ p.target === t && (s.current = Fo(r.current));
6977
6977
  };
6978
- return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", p), t.addEventListener("animationend", p), () => {
6979
- d.clearTimeout(c), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", p), t.removeEventListener("animationend", p);
6978
+ return t.addEventListener("animationstart", m), t.addEventListener("animationcancel", f), t.addEventListener("animationend", f), () => {
6979
+ d.clearTimeout(c), t.removeEventListener("animationstart", m), t.removeEventListener("animationcancel", f), t.removeEventListener("animationend", f);
6980
6980
  };
6981
6981
  } else
6982
6982
  l("ANIMATION_END");
@@ -7013,8 +7013,8 @@ var By = h.forwardRef((e, t) => {
7013
7013
  onCurrentTabStopIdChange: l,
7014
7014
  onEntryFocus: c,
7015
7015
  preventScrollOnEntryFocus: d = !1,
7016
- ...p
7017
- } = e, m = h.useRef(null), f = ze(t, m), v = $s(s), [g, x] = On({
7016
+ ...f
7017
+ } = e, m = h.useRef(null), p = ze(t, m), v = $s(s), [g, x] = On({
7018
7018
  prop: a,
7019
7019
  defaultProp: i ?? null,
7020
7020
  onChange: l,
@@ -7050,8 +7050,8 @@ var By = h.forwardRef((e, t) => {
7050
7050
  {
7051
7051
  tabIndex: b || T === 0 ? -1 : 0,
7052
7052
  "data-orientation": r,
7053
- ...p,
7054
- ref: f,
7053
+ ...f,
7054
+ ref: p,
7055
7055
  style: { outline: "none", ...e.style },
7056
7056
  onMouseDown: le(e.onMouseDown, () => {
7057
7057
  S.current = !0;
@@ -7083,11 +7083,11 @@ var By = h.forwardRef((e, t) => {
7083
7083
  tabStopId: s,
7084
7084
  children: a,
7085
7085
  ...i
7086
- } = e, l = Bt(), c = s || l, d = Fy(tf, n), p = d.currentTabStopId === c, m = Zd(n), { onFocusableItemAdd: f, onFocusableItemRemove: v, currentTabStopId: g } = d;
7086
+ } = e, l = Bt(), c = s || l, d = Fy(tf, n), f = d.currentTabStopId === c, m = Zd(n), { onFocusableItemAdd: p, onFocusableItemRemove: v, currentTabStopId: g } = d;
7087
7087
  return h.useEffect(() => {
7088
7088
  if (r)
7089
- return f(), () => v();
7090
- }, [r, f, v]), /* @__PURE__ */ u.jsx(
7089
+ return p(), () => v();
7090
+ }, [r, p, v]), /* @__PURE__ */ u.jsx(
7091
7091
  ni.ItemSlot,
7092
7092
  {
7093
7093
  scope: n,
@@ -7097,7 +7097,7 @@ var By = h.forwardRef((e, t) => {
7097
7097
  children: /* @__PURE__ */ u.jsx(
7098
7098
  ve.span,
7099
7099
  {
7100
- tabIndex: p ? 0 : -1,
7100
+ tabIndex: f ? 0 : -1,
7101
7101
  "data-orientation": d.orientation,
7102
7102
  ...i,
7103
7103
  ref: t,
@@ -7125,7 +7125,7 @@ var By = h.forwardRef((e, t) => {
7125
7125
  setTimeout(() => rf(y));
7126
7126
  }
7127
7127
  }),
7128
- children: typeof a == "function" ? a({ isCurrentTabStop: p, hasTabStop: g != null }) : a
7128
+ children: typeof a == "function" ? a({ isCurrentTabStop: f, hasTabStop: g != null }) : a
7129
7129
  }
7130
7130
  )
7131
7131
  }
@@ -7178,17 +7178,17 @@ var Vy = ef, Ky = nf, qy = function(e) {
7178
7178
  }, Yy = function(e, t, n, r) {
7179
7179
  var o = Gy(t, Array.isArray(e) ? e : [e]);
7180
7180
  zo[n] || (zo[n] = /* @__PURE__ */ new WeakMap());
7181
- var s = zo[n], a = [], i = /* @__PURE__ */ new Set(), l = new Set(o), c = function(p) {
7182
- !p || i.has(p) || (i.add(p), c(p.parentNode));
7181
+ var s = zo[n], a = [], i = /* @__PURE__ */ new Set(), l = new Set(o), c = function(f) {
7182
+ !f || i.has(f) || (i.add(f), c(f.parentNode));
7183
7183
  };
7184
7184
  o.forEach(c);
7185
- var d = function(p) {
7186
- !p || l.has(p) || Array.prototype.forEach.call(p.children, function(m) {
7185
+ var d = function(f) {
7186
+ !f || l.has(f) || Array.prototype.forEach.call(f.children, function(m) {
7187
7187
  if (i.has(m))
7188
7188
  d(m);
7189
7189
  else
7190
7190
  try {
7191
- var f = m.getAttribute(r), v = f !== null && f !== "false", g = (vr.get(m) || 0) + 1, x = (s.get(m) || 0) + 1;
7191
+ var p = m.getAttribute(r), v = p !== null && p !== "false", g = (vr.get(m) || 0) + 1, x = (s.get(m) || 0) + 1;
7192
7192
  vr.set(m, g), s.set(m, x), a.push(m), g === 1 && v && Bo.set(m, !0), x === 1 && m.setAttribute(n, "true"), v || m.setAttribute(r, "true");
7193
7193
  } catch (b) {
7194
7194
  console.error("aria-hidden: cannot operate on ", m, b);
@@ -7196,9 +7196,9 @@ var Vy = ef, Ky = nf, qy = function(e) {
7196
7196
  });
7197
7197
  };
7198
7198
  return d(t), i.clear(), Na++, function() {
7199
- a.forEach(function(p) {
7200
- var m = vr.get(p) - 1, f = s.get(p) - 1;
7201
- vr.set(p, m), s.set(p, f), m || (Bo.has(p) || p.removeAttribute(r), Bo.delete(p)), f || p.removeAttribute(n);
7199
+ a.forEach(function(f) {
7200
+ var m = vr.get(f) - 1, p = s.get(f) - 1;
7201
+ vr.set(f, m), s.set(f, p), m || (Bo.has(f) || f.removeAttribute(r), Bo.delete(f)), p || f.removeAttribute(n);
7202
7202
  }), Na--, Na || (vr = /* @__PURE__ */ new WeakMap(), vr = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakMap(), zo = {});
7203
7203
  };
7204
7204
  }, Ji = function(e, t, n) {
@@ -7356,11 +7356,11 @@ var lf = o0(), ja = function() {
7356
7356
  onScrollCapture: ja,
7357
7357
  onWheelCapture: ja,
7358
7358
  onTouchMoveCapture: ja
7359
- }), o = r[0], s = r[1], a = e.forwardProps, i = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, p = e.shards, m = e.sideCar, f = e.noRelative, v = e.noIsolation, g = e.inert, x = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, y = e.gapMode, C = sf(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, T = t0([n, t]), k = yn(yn({}, C), o);
7359
+ }), o = r[0], s = r[1], a = e.forwardProps, i = e.children, l = e.className, c = e.removeScrollBar, d = e.enabled, f = e.shards, m = e.sideCar, p = e.noRelative, v = e.noIsolation, g = e.inert, x = e.allowPinchZoom, b = e.as, w = b === void 0 ? "div" : b, y = e.gapMode, C = sf(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, T = t0([n, t]), k = yn(yn({}, C), o);
7360
7360
  return h.createElement(
7361
7361
  h.Fragment,
7362
7362
  null,
7363
- d && h.createElement(S, { sideCar: lf, removeScrollBar: c, shards: p, noRelative: f, noIsolation: v, inert: g, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: y }),
7363
+ d && h.createElement(S, { sideCar: lf, removeScrollBar: c, shards: f, noRelative: p, noIsolation: v, inert: g, setCallbacks: s, allowPinchZoom: !!x, lockRef: n, gapMode: y }),
7364
7364
  a ? h.cloneElement(h.Children.only(i), yn(yn({}, k), { ref: T })) : h.createElement(w, yn({}, k, { className: l, ref: T }), i)
7365
7365
  );
7366
7366
  });
@@ -7559,12 +7559,12 @@ var wr = ri ? { passive: !1 } : !1, w0 = function(e) {
7559
7559
  }, C0 = function(e, t) {
7560
7560
  return e === "h" && t === "rtl" ? -1 : 1;
7561
7561
  }, E0 = function(e, t, n, r, o) {
7562
- var s = C0(e, window.getComputedStyle(t).direction), a = s * r, i = n.target, l = t.contains(i), c = !1, d = a > 0, p = 0, m = 0;
7562
+ var s = C0(e, window.getComputedStyle(t).direction), a = s * r, i = n.target, l = t.contains(i), c = !1, d = a > 0, f = 0, m = 0;
7563
7563
  do {
7564
7564
  if (!i)
7565
7565
  break;
7566
- var f = ff(e, i), v = f[0], g = f[1], x = f[2], b = g - x - s * v;
7567
- (v || b) && df(e, i) && (p += b, m += v);
7566
+ var p = ff(e, i), v = p[0], g = p[1], x = p[2], b = g - x - s * v;
7567
+ (v || b) && df(e, i) && (f += b, m += v);
7568
7568
  var w = i.parentNode;
7569
7569
  i = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
7570
7570
  } while (
@@ -7572,7 +7572,7 @@ var wr = ri ? { passive: !1 } : !1, w0 = function(e) {
7572
7572
  !l && i !== document.body || // self content
7573
7573
  l && (t.contains(i) || t === i)
7574
7574
  );
7575
- return (d && Math.abs(p) < 1 || !d && Math.abs(m) < 1) && (c = !0), c;
7575
+ return (d && Math.abs(f) < 1 || !d && Math.abs(m) < 1) && (c = !0), c;
7576
7576
  }, Uo = function(e) {
7577
7577
  return "changedTouches" in e ? [e.changedTouches[0].clientX, e.changedTouches[0].clientY] : [0, 0];
7578
7578
  }, Wc = function(e) {
@@ -7645,15 +7645,15 @@ function N0(e) {
7645
7645
  }, 1);
7646
7646
  }, []), d = h.useCallback(function(g) {
7647
7647
  n.current = Uo(g), r.current = void 0;
7648
- }, []), p = h.useCallback(function(g) {
7648
+ }, []), f = h.useCallback(function(g) {
7649
7649
  c(g.type, Wc(g), g.target, i(g, e.lockRef.current));
7650
7650
  }, []), m = h.useCallback(function(g) {
7651
7651
  c(g.type, Uo(g), g.target, i(g, e.lockRef.current));
7652
7652
  }, []);
7653
7653
  h.useEffect(function() {
7654
7654
  return br.push(s), e.setCallbacks({
7655
- onScrollCapture: p,
7656
- onWheelCapture: p,
7655
+ onScrollCapture: f,
7656
+ onWheelCapture: f,
7657
7657
  onTouchMoveCapture: m
7658
7658
  }), document.addEventListener("wheel", l, wr), document.addEventListener("touchmove", l, wr), document.addEventListener("touchstart", d, wr), function() {
7659
7659
  br = br.filter(function(g) {
@@ -7661,12 +7661,12 @@ function N0(e) {
7661
7661
  }), document.removeEventListener("wheel", l, wr), document.removeEventListener("touchmove", l, wr), document.removeEventListener("touchstart", d, wr);
7662
7662
  };
7663
7663
  }, []);
7664
- var f = e.removeScrollBar, v = e.inert;
7664
+ var p = e.removeScrollBar, v = e.inert;
7665
7665
  return h.createElement(
7666
7666
  h.Fragment,
7667
7667
  null,
7668
7668
  v ? h.createElement(s, { styles: R0(o) }) : null,
7669
- f ? h.createElement(v0, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
7669
+ p ? h.createElement(v0, { noRelative: e.noRelative, gapMode: e.gapMode }) : null
7670
7670
  );
7671
7671
  }
7672
7672
  function A0(e) {
@@ -7690,27 +7690,27 @@ var oi = ["Enter", " "], _0 = ["ArrowDown", "PageUp", "Home"], pf = ["ArrowUp",
7690
7690
  Br,
7691
7691
  Qd
7692
7692
  ]), Ks = Br(), mf = Qd(), [$0, pr] = fr(Ro), [F0, Io] = fr(Ro), gf = (e) => {
7693
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i = Ks(t), [l, c] = h.useState(null), d = h.useRef(!1), p = wt(s), m = $s(o);
7693
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: a = !0 } = e, i = Ks(t), [l, c] = h.useState(null), d = h.useRef(!1), f = wt(s), m = $s(o);
7694
7694
  return h.useEffect(() => {
7695
- const f = () => {
7695
+ const p = () => {
7696
7696
  d.current = !0, document.addEventListener("pointerdown", v, { capture: !0, once: !0 }), document.addEventListener("pointermove", v, { capture: !0, once: !0 });
7697
7697
  }, v = () => d.current = !1;
7698
- return document.addEventListener("keydown", f, { capture: !0 }), () => {
7699
- document.removeEventListener("keydown", f, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
7698
+ return document.addEventListener("keydown", p, { capture: !0 }), () => {
7699
+ document.removeEventListener("keydown", p, { capture: !0 }), document.removeEventListener("pointerdown", v, { capture: !0 }), document.removeEventListener("pointermove", v, { capture: !0 });
7700
7700
  };
7701
7701
  }, []), /* @__PURE__ */ u.jsx(qi, { ...i, children: /* @__PURE__ */ u.jsx(
7702
7702
  $0,
7703
7703
  {
7704
7704
  scope: t,
7705
7705
  open: n,
7706
- onOpenChange: p,
7706
+ onOpenChange: f,
7707
7707
  content: l,
7708
7708
  onContentChange: c,
7709
7709
  children: /* @__PURE__ */ u.jsx(
7710
7710
  F0,
7711
7711
  {
7712
7712
  scope: t,
7713
- onClose: h.useCallback(() => p(!1), [p]),
7713
+ onClose: h.useCallback(() => f(!1), [f]),
7714
7714
  isUsingKeyboardRef: d,
7715
7715
  dir: m,
7716
7716
  modal: a,
@@ -7788,9 +7788,9 @@ var an = "MenuContent", [H0, el] = fr(an), wf = h.forwardRef(
7788
7788
  onEntryFocus: l,
7789
7789
  onEscapeKeyDown: c,
7790
7790
  onPointerDownOutside: d,
7791
- onFocusOutside: p,
7791
+ onFocusOutside: f,
7792
7792
  onInteractOutside: m,
7793
- onDismiss: f,
7793
+ onDismiss: p,
7794
7794
  disableOutsideScroll: v,
7795
7795
  ...g
7796
7796
  } = e, x = pr(an, n), b = Io(an, n), w = Ks(n), y = mf(n), C = D0(n), [S, T] = h.useState(null), k = h.useRef(null), R = ze(t, k, x.onContentChange), _ = h.useRef(0), O = h.useRef(""), $ = h.useRef(0), W = h.useRef(null), H = h.useRef("right"), N = h.useRef(0), K = v ? Vs : h.Fragment, V = v ? { as: V0, allowPinchZoom: !0 } : void 0, D = (E) => {
@@ -7850,9 +7850,9 @@ var an = "MenuContent", [H0, el] = fr(an), wf = h.forwardRef(
7850
7850
  disableOutsidePointerEvents: i,
7851
7851
  onEscapeKeyDown: c,
7852
7852
  onPointerDownOutside: d,
7853
- onFocusOutside: p,
7853
+ onFocusOutside: f,
7854
7854
  onInteractOutside: m,
7855
- onDismiss: f,
7855
+ onDismiss: p,
7856
7856
  children: /* @__PURE__ */ u.jsx(
7857
7857
  Vy,
7858
7858
  {
@@ -7931,10 +7931,10 @@ bf.displayName = q0;
7931
7931
  var gs = "MenuItem", Kc = "menu.itemSelect", qs = h.forwardRef(
7932
7932
  (e, t) => {
7933
7933
  const { disabled: n = !1, onSelect: r, ...o } = e, s = h.useRef(null), a = Io(gs, e.__scopeMenu), i = el(gs, e.__scopeMenu), l = ze(t, s), c = h.useRef(!1), d = () => {
7934
- const p = s.current;
7935
- if (!n && p) {
7934
+ const f = s.current;
7935
+ if (!n && f) {
7936
7936
  const m = new CustomEvent(Kc, { bubbles: !0, cancelable: !0 });
7937
- p.addEventListener(Kc, (f) => r == null ? void 0 : r(f), { once: !0 }), Li(p, m), m.defaultPrevented ? c.current = !1 : a.onClose();
7937
+ f.addEventListener(Kc, (p) => r == null ? void 0 : r(p), { once: !0 }), Li(f, m), m.defaultPrevented ? c.current = !1 : a.onClose();
7938
7938
  }
7939
7939
  };
7940
7940
  return /* @__PURE__ */ u.jsx(
@@ -7944,17 +7944,17 @@ var gs = "MenuItem", Kc = "menu.itemSelect", qs = h.forwardRef(
7944
7944
  ref: l,
7945
7945
  disabled: n,
7946
7946
  onClick: le(e.onClick, d),
7947
- onPointerDown: (p) => {
7947
+ onPointerDown: (f) => {
7948
7948
  var m;
7949
- (m = e.onPointerDown) == null || m.call(e, p), c.current = !0;
7949
+ (m = e.onPointerDown) == null || m.call(e, f), c.current = !0;
7950
7950
  },
7951
- onPointerUp: le(e.onPointerUp, (p) => {
7951
+ onPointerUp: le(e.onPointerUp, (f) => {
7952
7952
  var m;
7953
- c.current || (m = p.currentTarget) == null || m.click();
7953
+ c.current || (m = f.currentTarget) == null || m.click();
7954
7954
  }),
7955
- onKeyDown: le(e.onKeyDown, (p) => {
7955
+ onKeyDown: le(e.onKeyDown, (f) => {
7956
7956
  const m = i.searchRef.current !== "";
7957
- n || m && p.key === " " || oi.includes(p.key) && (p.currentTarget.click(), p.preventDefault());
7957
+ n || m && f.key === " " || oi.includes(f.key) && (f.currentTarget.click(), f.preventDefault());
7958
7958
  })
7959
7959
  }
7960
7960
  );
@@ -7963,10 +7963,10 @@ var gs = "MenuItem", Kc = "menu.itemSelect", qs = h.forwardRef(
7963
7963
  qs.displayName = gs;
7964
7964
  var yf = h.forwardRef(
7965
7965
  (e, t) => {
7966
- const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, a = el(gs, n), i = mf(n), l = h.useRef(null), c = ze(t, l), [d, p] = h.useState(!1), [m, f] = h.useState("");
7966
+ const { __scopeMenu: n, disabled: r = !1, textValue: o, ...s } = e, a = el(gs, n), i = mf(n), l = h.useRef(null), c = ze(t, l), [d, f] = h.useState(!1), [m, p] = h.useState("");
7967
7967
  return h.useEffect(() => {
7968
7968
  const v = l.current;
7969
- v && f((v.textContent ?? "").trim());
7969
+ v && p((v.textContent ?? "").trim());
7970
7970
  }, [s.children]), /* @__PURE__ */ u.jsx(
7971
7971
  ao.ItemSlot,
7972
7972
  {
@@ -7992,8 +7992,8 @@ var yf = h.forwardRef(
7992
7992
  e.onPointerLeave,
7993
7993
  io((v) => a.onItemLeave(v))
7994
7994
  ),
7995
- onFocus: le(e.onFocus, () => p(!0)),
7996
- onBlur: le(e.onBlur, () => p(!1))
7995
+ onFocus: le(e.onFocus, () => f(!0)),
7996
+ onBlur: le(e.onBlur, () => f(!1))
7997
7997
  }
7998
7998
  ) })
7999
7999
  }
@@ -8106,9 +8106,9 @@ var eS = "MenuSub", [xN, jf] = fr(eS), Yr = "MenuSubTrigger", _f = h.forwardRef(
8106
8106
  a.current && window.clearTimeout(a.current), a.current = null;
8107
8107
  }, []);
8108
8108
  return h.useEffect(() => d, [d]), h.useEffect(() => {
8109
- const p = i.current;
8109
+ const f = i.current;
8110
8110
  return () => {
8111
- window.clearTimeout(p), l(null);
8111
+ window.clearTimeout(f), l(null);
8112
8112
  };
8113
8113
  }, [i, l]), /* @__PURE__ */ u.jsx(Zi, { asChild: !0, ...c, children: /* @__PURE__ */ u.jsx(
8114
8114
  yf,
@@ -8120,31 +8120,31 @@ var eS = "MenuSub", [xN, jf] = fr(eS), Yr = "MenuSubTrigger", _f = h.forwardRef(
8120
8120
  "data-state": Of(n.open),
8121
8121
  ...e,
8122
8122
  ref: Mn(t, o.onTriggerChange),
8123
- onClick: (p) => {
8123
+ onClick: (f) => {
8124
8124
  var m;
8125
- (m = e.onClick) == null || m.call(e, p), !(e.disabled || p.defaultPrevented) && (p.currentTarget.focus(), n.open || n.onOpenChange(!0));
8125
+ (m = e.onClick) == null || m.call(e, f), !(e.disabled || f.defaultPrevented) && (f.currentTarget.focus(), n.open || n.onOpenChange(!0));
8126
8126
  },
8127
8127
  onPointerMove: le(
8128
8128
  e.onPointerMove,
8129
- io((p) => {
8130
- s.onItemEnter(p), !p.defaultPrevented && !e.disabled && !n.open && !a.current && (s.onPointerGraceIntentChange(null), a.current = window.setTimeout(() => {
8129
+ io((f) => {
8130
+ s.onItemEnter(f), !f.defaultPrevented && !e.disabled && !n.open && !a.current && (s.onPointerGraceIntentChange(null), a.current = window.setTimeout(() => {
8131
8131
  n.onOpenChange(!0), d();
8132
8132
  }, 100));
8133
8133
  })
8134
8134
  ),
8135
8135
  onPointerLeave: le(
8136
8136
  e.onPointerLeave,
8137
- io((p) => {
8138
- var f, v;
8137
+ io((f) => {
8138
+ var p, v;
8139
8139
  d();
8140
- const m = (f = n.content) == null ? void 0 : f.getBoundingClientRect();
8140
+ const m = (p = n.content) == null ? void 0 : p.getBoundingClientRect();
8141
8141
  if (m) {
8142
8142
  const g = (v = n.content) == null ? void 0 : v.dataset.side, x = g === "right", b = x ? -5 : 5, w = m[x ? "left" : "right"], y = m[x ? "right" : "left"];
8143
8143
  s.onPointerGraceIntentChange({
8144
8144
  area: [
8145
8145
  // Apply a bleed on clientX to ensure that our exit point is
8146
8146
  // consistently within polygon bounds
8147
- { x: p.clientX + b, y: p.clientY },
8147
+ { x: f.clientX + b, y: f.clientY },
8148
8148
  { x: w, y: m.top },
8149
8149
  { x: y, y: m.top },
8150
8150
  { x: y, y: m.bottom },
@@ -8156,15 +8156,15 @@ var eS = "MenuSub", [xN, jf] = fr(eS), Yr = "MenuSubTrigger", _f = h.forwardRef(
8156
8156
  300
8157
8157
  );
8158
8158
  } else {
8159
- if (s.onTriggerLeave(p), p.defaultPrevented) return;
8159
+ if (s.onTriggerLeave(f), f.defaultPrevented) return;
8160
8160
  s.onPointerGraceIntentChange(null);
8161
8161
  }
8162
8162
  })
8163
8163
  ),
8164
- onKeyDown: le(e.onKeyDown, (p) => {
8165
- var f;
8164
+ onKeyDown: le(e.onKeyDown, (f) => {
8165
+ var p;
8166
8166
  const m = s.searchRef.current !== "";
8167
- e.disabled || m && p.key === " " || M0[r.dir].includes(p.key) && (n.onOpenChange(!0), (f = n.content) == null || f.focus(), p.preventDefault());
8167
+ e.disabled || m && f.key === " " || M0[r.dir].includes(f.key) && (n.onOpenChange(!0), (p = n.content) == null || p.focus(), f.preventDefault());
8168
8168
  })
8169
8169
  }
8170
8170
  ) });
@@ -8187,8 +8187,8 @@ var Pf = "MenuSubContent", Mf = h.forwardRef(
8187
8187
  disableOutsideScroll: !1,
8188
8188
  trapFocus: !1,
8189
8189
  onOpenAutoFocus: (d) => {
8190
- var p;
8191
- a.isUsingKeyboardRef.current && ((p = l.current) == null || p.focus()), d.preventDefault();
8190
+ var f;
8191
+ a.isUsingKeyboardRef.current && ((f = l.current) == null || f.focus()), d.preventDefault();
8192
8192
  },
8193
8193
  onCloseAutoFocus: (d) => d.preventDefault(),
8194
8194
  onFocusOutside: le(e.onFocusOutside, (d) => {
@@ -8198,9 +8198,9 @@ var Pf = "MenuSubContent", Mf = h.forwardRef(
8198
8198
  a.onClose(), d.preventDefault();
8199
8199
  }),
8200
8200
  onKeyDown: le(e.onKeyDown, (d) => {
8201
- var f;
8202
- const p = d.currentTarget.contains(d.target), m = O0[a.dir].includes(d.key);
8203
- p && m && (s.onOpenChange(!1), (f = i.trigger) == null || f.focus(), d.preventDefault());
8201
+ var p;
8202
+ const f = d.currentTarget.contains(d.target), m = O0[a.dir].includes(d.key);
8203
+ f && m && (s.onOpenChange(!1), (p = i.trigger) == null || p.focus(), d.preventDefault());
8204
8204
  })
8205
8205
  }
8206
8206
  ) }) }) });
@@ -8237,8 +8237,8 @@ function oS(e, t) {
8237
8237
  const { x: n, y: r } = e;
8238
8238
  let o = !1;
8239
8239
  for (let s = 0, a = t.length - 1; s < t.length; a = s++) {
8240
- const i = t[s], l = t[a], c = i.x, d = i.y, p = l.x, m = l.y;
8241
- d > r != m > r && n < (p - c) * (r - d) / (m - d) + c && (o = !o);
8240
+ const i = t[s], l = t[a], c = i.x, d = i.y, f = l.x, m = l.y;
8241
+ d > r != m > r && n < (f - c) * (r - d) / (m - d) + c && (o = !o);
8242
8242
  }
8243
8243
  return o;
8244
8244
  }
@@ -8262,7 +8262,7 @@ var aS = gf, iS = Zi, lS = vf, cS = wf, uS = nl, dS = bf, fS = qs, pS = Sf, hS =
8262
8262
  defaultOpen: s,
8263
8263
  onOpenChange: a,
8264
8264
  modal: i = !0
8265
- } = e, l = Ht(t), c = h.useRef(null), [d, p] = On({
8265
+ } = e, l = Ht(t), c = h.useRef(null), [d, f] = On({
8266
8266
  prop: o,
8267
8267
  defaultProp: s ?? !1,
8268
8268
  onChange: a,
@@ -8276,10 +8276,10 @@ var aS = gf, iS = Zi, lS = vf, cS = wf, uS = nl, dS = bf, fS = qs, pS = Sf, hS =
8276
8276
  triggerRef: c,
8277
8277
  contentId: Bt(),
8278
8278
  open: d,
8279
- onOpenChange: p,
8280
- onOpenToggle: h.useCallback(() => p((m) => !m), [p]),
8279
+ onOpenChange: f,
8280
+ onOpenToggle: h.useCallback(() => f((m) => !m), [f]),
8281
8281
  modal: i,
8282
- children: /* @__PURE__ */ u.jsx(aS, { ...l, open: d, onOpenChange: p, dir: r, modal: i, children: n })
8282
+ children: /* @__PURE__ */ u.jsx(aS, { ...l, open: d, onOpenChange: f, dir: r, modal: i, children: n })
8283
8283
  }
8284
8284
  );
8285
8285
  };
@@ -8564,9 +8564,9 @@ function GS({
8564
8564
  onSend: l,
8565
8565
  onCancelEdit: c,
8566
8566
  onStop: d,
8567
- className: p = "",
8567
+ className: f = "",
8568
8568
  textareaClassName: m = "",
8569
- allowEmptySend: f = !1,
8569
+ allowEmptySend: p = !1,
8570
8570
  validate: v,
8571
8571
  onValidationError: g
8572
8572
  }) {
@@ -8604,7 +8604,7 @@ function GS({
8604
8604
  async (P) => {
8605
8605
  P && P.preventDefault();
8606
8606
  const q = (y ?? "").trim();
8607
- if (!q && !f || N(q))
8607
+ if (!q && !p || N(q))
8608
8608
  return;
8609
8609
  const X = ++k.current;
8610
8610
  R.current = {
@@ -8626,7 +8626,7 @@ function GS({
8626
8626
  }
8627
8627
  });
8628
8628
  },
8629
- [y, l, f, x, i, N]
8629
+ [y, l, p, x, i, N]
8630
8630
  ), j = M.useCallback((P) => {
8631
8631
  const q = P.target.value;
8632
8632
  V(q, { fromUser: !0 }), R.current && (R.current.shouldClear = !1), T.current && (T.current.style.height = "auto", T.current.style.height = `${T.current.scrollHeight}px`), O && N(q.trim());
@@ -8636,7 +8636,7 @@ function GS({
8636
8636
  },
8637
8637
  [D, t, c]
8638
8638
  ), A = `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${t ? "border-[hsl(var(--ring))] bg-[hsl(var(--card))] text-[hsl(var(--card-foreground))] dark:bg-[hsl(var(--card))] dark:text-[hsl(var(--card-foreground))]" : ""} ${m}`;
8639
- return /* @__PURE__ */ u.jsx("form", { onSubmit: (P) => void D(P), className: `w-full ${p}`, children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
8639
+ return /* @__PURE__ */ u.jsx("form", { onSubmit: (P) => void D(P), className: `w-full ${f}`, children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
8640
8640
  /* @__PURE__ */ u.jsxs("div", { className: "flex-1", children: [
8641
8641
  /* @__PURE__ */ u.jsx(
8642
8642
  ap,
@@ -8677,7 +8677,7 @@ function GS({
8677
8677
  size: "icon",
8678
8678
  className: "shrink-0",
8679
8679
  title: t ? "Save changes" : "Send message",
8680
- disabled: o || !y.trim() && !f || C,
8680
+ disabled: o || !y.trim() && !p || C,
8681
8681
  children: /* @__PURE__ */ u.jsx(Hg, { size: 16 })
8682
8682
  }
8683
8683
  ) })
@@ -8978,21 +8978,21 @@ function cl(e, t, n) {
8978
8978
  function aT(e, t, n, r, o, s, a, i, l) {
8979
8979
  const c = M.useCallback(
8980
8980
  (d) => {
8981
- const p = iT(d.children, t, i ? "offsetWidth" : "offsetHeight", o);
8981
+ const f = iT(d.children, t, i ? "offsetWidth" : "offsetHeight", o);
8982
8982
  let m = d.parentElement;
8983
8983
  for (; !m.dataset.virtuosoScroller; )
8984
8984
  m = m.parentElement;
8985
- const f = m.lastElementChild.dataset.viewportType === "window";
8985
+ const p = m.lastElementChild.dataset.viewportType === "window";
8986
8986
  let v;
8987
- f && (v = m.ownerDocument.defaultView);
8988
- const g = a ? i ? a.scrollLeft : a.scrollTop : f ? i ? v.scrollX || v.document.documentElement.scrollLeft : v.scrollY || v.document.documentElement.scrollTop : i ? m.scrollLeft : m.scrollTop, x = a ? i ? a.scrollWidth : a.scrollHeight : f ? i ? v.document.documentElement.scrollWidth : v.document.documentElement.scrollHeight : i ? m.scrollWidth : m.scrollHeight, b = a ? i ? a.offsetWidth : a.offsetHeight : f ? i ? v.innerWidth : v.innerHeight : i ? m.offsetWidth : m.offsetHeight;
8987
+ p && (v = m.ownerDocument.defaultView);
8988
+ const g = a ? i ? a.scrollLeft : a.scrollTop : p ? i ? v.scrollX || v.document.documentElement.scrollLeft : v.scrollY || v.document.documentElement.scrollTop : i ? m.scrollLeft : m.scrollTop, x = a ? i ? a.scrollWidth : a.scrollHeight : p ? i ? v.document.documentElement.scrollWidth : v.document.documentElement.scrollHeight : i ? m.scrollWidth : m.scrollHeight, b = a ? i ? a.offsetWidth : a.offsetHeight : p ? i ? v.innerWidth : v.innerHeight : i ? m.offsetWidth : m.offsetHeight;
8989
8989
  r({
8990
8990
  scrollHeight: x,
8991
8991
  scrollTop: Math.max(g, 0),
8992
8992
  viewportHeight: b
8993
8993
  }), s == null || s(
8994
8994
  i ? Xc("column-gap", getComputedStyle(d).columnGap, o) : Xc("row-gap", getComputedStyle(d).rowGap, o)
8995
- ), p !== null && e(p);
8995
+ ), f !== null && e(f);
8996
8996
  },
8997
8997
  [e, t, o, s, a, r, i]
8998
8998
  );
@@ -9010,8 +9010,8 @@ function iT(e, t, n, r) {
9010
9010
  const l = parseInt(i.dataset.index), c = parseFloat(i.dataset.knownSize), d = t(i, n);
9011
9011
  if (d === 0 && r("Zero-sized element, this should not happen", { child: i }, Yt.ERROR), d === c)
9012
9012
  continue;
9013
- const p = s[s.length - 1];
9014
- s.length === 0 || p.size !== d || p.endIndex !== l - 1 ? s.push({ endIndex: l, size: d, startIndex: l }) : s[s.length - 1].endIndex++;
9013
+ const f = s[s.length - 1];
9014
+ s.length === 0 || f.size !== d || f.endIndex !== l - 1 ? s.push({ endIndex: l, size: d, startIndex: l }) : s[s.length - 1].endIndex++;
9015
9015
  }
9016
9016
  return s;
9017
9017
  }
@@ -9024,16 +9024,16 @@ function up(e, t, n) {
9024
9024
  if (!(l != null && l.offsetParent))
9025
9025
  return;
9026
9026
  const c = l.getBoundingClientRect(), d = c.width;
9027
- let p, m;
9027
+ let f, m;
9028
9028
  if (t) {
9029
- const f = t.getBoundingClientRect(), v = c.top - f.top;
9030
- m = f.height - Math.max(0, v), p = v + t.scrollTop;
9029
+ const p = t.getBoundingClientRect(), v = c.top - p.top;
9030
+ m = p.height - Math.max(0, v), f = v + t.scrollTop;
9031
9031
  } else {
9032
- const f = a.current.ownerDocument.defaultView;
9033
- m = f.innerHeight - Math.max(0, c.top), p = c.top + f.scrollY;
9032
+ const p = a.current.ownerDocument.defaultView;
9033
+ m = p.innerHeight - Math.max(0, c.top), f = c.top + p.scrollY;
9034
9034
  }
9035
9035
  r.current = {
9036
- offsetTop: p,
9036
+ offsetTop: f,
9037
9037
  visibleHeight: m,
9038
9038
  visibleWidth: d
9039
9039
  }, e(r.current);
@@ -9063,7 +9063,7 @@ function up(e, t, n) {
9063
9063
  }
9064
9064
  const Ut = Xe(
9065
9065
  () => {
9066
- const e = We(), t = We(), n = re(0), r = We(), o = re(0), s = We(), a = We(), i = re(0), l = re(0), c = re(0), d = re(0), p = We(), m = We(), f = re(!1), v = re(!1), g = re(!1);
9066
+ const e = We(), t = We(), n = re(0), r = We(), o = re(0), s = We(), a = We(), i = re(0), l = re(0), c = re(0), d = re(0), f = We(), m = We(), p = re(!1), v = re(!1), g = re(!1);
9067
9067
  return be(
9068
9068
  te(
9069
9069
  e,
@@ -9087,9 +9087,9 @@ const Ut = Xe(
9087
9087
  // input
9088
9088
  scrollContainerState: e,
9089
9089
  scrollHeight: a,
9090
- scrollingInProgress: f,
9090
+ scrollingInProgress: p,
9091
9091
  // signals
9092
- scrollTo: p,
9092
+ scrollTo: f,
9093
9093
  scrollTop: t,
9094
9094
  skipAnimationFrameInResizeObserver: g,
9095
9095
  smoothScrollTargetReached: r,
@@ -9304,8 +9304,8 @@ function dT(e, t) {
9304
9304
  if (i.some(vT(r)))
9305
9305
  continue;
9306
9306
  let l = !1, c = !1;
9307
- for (const { end: d, start: p, value: m } of i)
9308
- l ? (o >= p || s === m) && (e = ai(e, p)) : (c = m !== s, l = !0), d > o && o >= p && m !== s && (e = Qt(e, o + 1, m));
9307
+ for (const { end: d, start: f, value: m } of i)
9308
+ l ? (o >= f || s === m) && (e = ai(e, f)) : (c = m !== s, l = !0), d > o && o >= f && m !== s && (e = Qt(e, o + 1, m));
9309
9309
  c && (e = Qt(e, a, s));
9310
9310
  }
9311
9311
  return [e, n];
@@ -9347,20 +9347,20 @@ function mT(e, [t, n, r, o]) {
9347
9347
  const s = e.sizeTree;
9348
9348
  let a = s, i = 0;
9349
9349
  if (n.length > 0 && ot(s) && t.length === 2) {
9350
- const m = t[0].size, f = t[1].size;
9351
- a = n.reduce((v, g) => Qt(Qt(v, g, m), g + 1, f), a);
9350
+ const m = t[0].size, p = t[1].size;
9351
+ a = n.reduce((v, g) => Qt(Qt(v, g, m), g + 1, p), a);
9352
9352
  } else
9353
9353
  [a, i] = dT(a, t);
9354
9354
  if (a === s)
9355
9355
  return e;
9356
- const { lastIndex: l, lastOffset: c, lastSize: d, offsetTree: p } = ci(e.offsetTree, i, a, o);
9356
+ const { lastIndex: l, lastOffset: c, lastSize: d, offsetTree: f } = ci(e.offsetTree, i, a, o);
9357
9357
  return {
9358
9358
  groupIndices: n,
9359
- groupOffsetTree: n.reduce((m, f) => Qt(m, f, fo(f, p, o)), kr()),
9359
+ groupOffsetTree: n.reduce((m, p) => Qt(m, p, fo(p, f, o)), kr()),
9360
9360
  lastIndex: l,
9361
9361
  lastOffset: c,
9362
9362
  lastSize: d,
9363
- offsetTree: p,
9363
+ offsetTree: f,
9364
9364
  sizeTree: a
9365
9365
  };
9366
9366
  }
@@ -9385,7 +9385,7 @@ function ci(e, t, n, r) {
9385
9385
  } else
9386
9386
  o = [];
9387
9387
  for (const { start: c, value: d } of Zs(n, t, 1 / 0)) {
9388
- const p = c - s, m = p * a + i + p * r;
9388
+ const f = c - s, m = f * a + i + f * r;
9389
9389
  o.push({
9390
9390
  index: c,
9391
9391
  offset: m,
@@ -9411,8 +9411,8 @@ const wT = {
9411
9411
  offsetWidth: "width"
9412
9412
  }, Rn = Xe(
9413
9413
  ([{ log: e }, { recalcInProgress: t }]) => {
9414
- const n = We(), r = We(), o = Ft(r, 0), s = We(), a = We(), i = re(0), l = re([]), c = re(void 0), d = re(void 0), p = re((S, T) => $n(S, wT[T])), m = re(void 0), f = re(0), v = uT(), g = Ft(
9415
- te(n, Be(l, e, f), Tn(mT, v), ct()),
9414
+ const n = We(), r = We(), o = Ft(r, 0), s = We(), a = We(), i = re(0), l = re([]), c = re(void 0), d = re(void 0), f = re((S, T) => $n(S, wT[T])), m = re(void 0), p = re(0), v = uT(), g = Ft(
9415
+ te(n, Be(l, e, p), Tn(mT, v), ct()),
9416
9416
  v
9417
9417
  ), x = Ft(
9418
9418
  te(
@@ -9430,7 +9430,7 @@ const wT = {
9430
9430
  te(
9431
9431
  l,
9432
9432
  Ie((S) => S.length > 0),
9433
- Be(g, f),
9433
+ Be(g, p),
9434
9434
  fe(([S, T, k]) => {
9435
9435
  const R = S.reduce((_, O, $) => Qt(_, O, fo(O, T.offsetTree, k) || $), kr());
9436
9436
  return {
@@ -9575,7 +9575,7 @@ const wT = {
9575
9575
  const C = tn(
9576
9576
  te(
9577
9577
  a,
9578
- Be(g, f),
9578
+ Be(g, p),
9579
9579
  fe(([S, { offsetTree: T }, k]) => {
9580
9580
  const R = -S;
9581
9581
  return fo(R, T, k);
@@ -9585,7 +9585,7 @@ const wT = {
9585
9585
  return be(
9586
9586
  te(
9587
9587
  a,
9588
- Be(g, f),
9588
+ Be(g, p),
9589
9589
  fe(([S, T, k]) => {
9590
9590
  if (T.groupIndices.length > 0) {
9591
9591
  if (ot(T.sizeTree))
@@ -9627,9 +9627,9 @@ const wT = {
9627
9627
  defaultItemSize: d,
9628
9628
  firstItemIndex: i,
9629
9629
  fixedItemSize: c,
9630
- gap: f,
9630
+ gap: p,
9631
9631
  groupIndices: l,
9632
- itemSize: p,
9632
+ itemSize: f,
9633
9633
  listRefresh: w,
9634
9634
  shiftWith: a,
9635
9635
  shiftWithOffset: C,
@@ -9712,19 +9712,19 @@ const No = Xe(
9712
9712
  scrollingInProgress: l,
9713
9713
  scrollTo: c,
9714
9714
  smoothScrollTargetReached: d,
9715
- viewportHeight: p
9715
+ viewportHeight: f
9716
9716
  },
9717
9717
  { log: m }
9718
9718
  ]) => {
9719
- const f = We(), v = We(), g = re(0);
9719
+ const p = We(), v = We(), g = re(0);
9720
9720
  let x = null, b = null, w = null;
9721
9721
  function y() {
9722
9722
  x && (x(), x = null), w && (w(), w = null), b && (clearTimeout(b), b = null), Oe(l, !1);
9723
9723
  }
9724
9724
  return be(
9725
9725
  te(
9726
- f,
9727
- Be(n, p, r, g, i, a, m),
9726
+ p,
9727
+ Be(n, f, r, g, i, a, m),
9728
9728
  Be(e, s, o),
9729
9729
  fe(
9730
9730
  ([
@@ -9737,7 +9737,7 @@ const No = Xe(
9737
9737
  let G = fo(F, S.offsetTree, W) + _;
9738
9738
  V === "end" ? (G += H + mn(S.sizeTree, F)[1] - T + N, F === E && (G += O)) : V === "center" ? G += (H + mn(S.sizeTree, F)[1] - T + N) / 2 : G -= R, j && (G += j);
9739
9739
  const A = (P) => {
9740
- y(), P ? ($("retrying to scroll to", { location: C }, Yt.DEBUG), Oe(f, C)) : (Oe(v, !0), $("list did not change, scroll successful", {}, Yt.DEBUG));
9740
+ y(), P ? ($("retrying to scroll to", { location: C }, Yt.DEBUG), Oe(p, C)) : (Oe(v, !0), $("list did not change, scroll successful", {}, Yt.DEBUG));
9741
9741
  };
9742
9742
  if (y(), D === "smooth") {
9743
9743
  let P = !1;
@@ -9757,7 +9757,7 @@ const No = Xe(
9757
9757
  c
9758
9758
  ), {
9759
9759
  scrollTargetReached: v,
9760
- scrollToIndex: f,
9760
+ scrollToIndex: p,
9761
9761
  topListHeight: g
9762
9762
  };
9763
9763
  },
@@ -9790,7 +9790,7 @@ const Ao = Xe(
9790
9790
  te(
9791
9791
  a,
9792
9792
  Be(l),
9793
- Ie(([d, p]) => !!p),
9793
+ Ie(([d, f]) => !!f),
9794
9794
  bn(!1)
9795
9795
  ),
9796
9796
  i
@@ -9798,7 +9798,7 @@ const Ao = Xe(
9798
9798
  te(
9799
9799
  a,
9800
9800
  Be(l),
9801
- Ie(([d, p]) => !!p),
9801
+ Ie(([d, f]) => !!f),
9802
9802
  bn(!1)
9803
9803
  ),
9804
9804
  c
@@ -9806,7 +9806,7 @@ const Ao = Xe(
9806
9806
  te(
9807
9807
  St(t, a),
9808
9808
  Be(i, n, e, c),
9809
- Ie(([[, d], p, { sizeTree: m }, f, v]) => d && (!ot(m) || il(f)) && !p && !v),
9809
+ Ie(([[, d], f, { sizeTree: m }, p, v]) => d && (!ot(m) || il(p)) && !f && !v),
9810
9810
  Be(l)
9811
9811
  ),
9812
9812
  ([, d]) => {
@@ -9840,19 +9840,19 @@ const po = "up", Zr = "down", TT = "none", CT = {
9840
9840
  viewportHeight: 0
9841
9841
  }
9842
9842
  }, ET = 0, jo = Xe(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
9843
- const a = re(!1), i = re(!0), l = We(), c = We(), d = re(4), p = re(ET), m = Ft(
9843
+ const a = re(!1), i = re(!0), l = We(), c = We(), d = re(4), f = re(ET), m = Ft(
9844
9844
  te(
9845
9845
  si(te(Re(o), ir(1), bn(!0)), te(Re(o), ir(1), bn(!1), Yc(100))),
9846
9846
  ct()
9847
9847
  ),
9848
9848
  !1
9849
- ), f = Ft(
9849
+ ), p = Ft(
9850
9850
  te(si(te(n, bn(!0)), te(n, bn(!1), Yc(200))), ct()),
9851
9851
  !1
9852
9852
  );
9853
9853
  be(
9854
9854
  te(
9855
- St(Re(o), Re(p)),
9855
+ St(Re(o), Re(f)),
9856
9856
  fe(([w, y]) => w <= y),
9857
9857
  ct()
9858
9858
  ),
@@ -9933,7 +9933,7 @@ const po = "up", Zr = "down", TT = "none", CT = {
9933
9933
  fe(({ scrollTop: w }) => w),
9934
9934
  ct(),
9935
9935
  Tn(
9936
- (w, y) => vt(f) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? po : Zr, prevScrollTop: y },
9936
+ (w, y) => vt(p) ? { direction: w.direction, prevScrollTop: y } : { direction: y < w.prevScrollTop ? po : Zr, prevScrollTop: y },
9937
9937
  { direction: Zr, prevScrollTop: 0 }
9938
9938
  ),
9939
9939
  fe((w) => w.direction)
@@ -9963,7 +9963,7 @@ const po = "up", Zr = "down", TT = "none", CT = {
9963
9963
  atBottomStateChange: l,
9964
9964
  atBottomThreshold: d,
9965
9965
  atTopStateChange: c,
9966
- atTopThreshold: p,
9966
+ atTopThreshold: f,
9967
9967
  isAtBottom: a,
9968
9968
  isAtTop: i,
9969
9969
  isScrolling: m,
@@ -9997,9 +9997,9 @@ const hl = Xe(
9997
9997
  fe(
9998
9998
  ([
9999
9999
  d,
10000
- p,
10000
+ f,
10001
10001
  m,
10002
- [f, v],
10002
+ [p, v],
10003
10003
  g,
10004
10004
  x,
10005
10005
  b,
@@ -10009,9 +10009,9 @@ const hl = Xe(
10009
10009
  const C = d - w, S = x + b, T = Math.max(m - C, 0);
10010
10010
  let k = Qc;
10011
10011
  const R = tu(y, ws), _ = tu(y, bs);
10012
- return f -= w, f += m + b, v += m + b, v -= w, f > d + S - R && (k = po), v < d - T + p + _ && (k = Zr), k !== Qc ? [
10012
+ return p -= w, p += m + b, v += m + b, v -= w, p > d + S - R && (k = po), v < d - T + f + _ && (k = Zr), k !== Qc ? [
10013
10013
  Math.max(C - m - eu(g, ws, k) - R, 0),
10014
- C - T - b + p + eu(g, bs, k) + _
10014
+ C - T - b + f + eu(g, bs, k) + _
10015
10015
  ] : null;
10016
10016
  }
10017
10017
  ),
@@ -10062,14 +10062,14 @@ function ss(e, t, n, r, o, s) {
10062
10062
  const g = e[e.length - 1];
10063
10063
  d = g.offset + g.size;
10064
10064
  }
10065
- const p = n - a, m = i + p * l + (p - 1) * r, f = c, v = m - d;
10065
+ const f = n - a, m = i + f * l + (f - 1) * r, p = c, v = m - d;
10066
10066
  return {
10067
10067
  bottom: d,
10068
10068
  firstItemIndex: s,
10069
10069
  items: nu(e, o, s),
10070
10070
  offsetBottom: v,
10071
10071
  offsetTop: c,
10072
- top: f,
10072
+ top: p,
10073
10073
  topItems: nu(t, o, s),
10074
10074
  topListHeight: t.reduce((g, x) => x.size + g, 0),
10075
10075
  totalCount: n
@@ -10083,9 +10083,9 @@ function Tp(e, t, n, r, o, s) {
10083
10083
  break;
10084
10084
  a++;
10085
10085
  }
10086
- const i = e + a, l = pl(t, i), c = Array.from({ length: i }).map((d, p) => ({
10087
- data: s[p + l],
10088
- index: p + l,
10086
+ const i = e + a, l = pl(t, i), c = Array.from({ length: i }).map((d, f) => ({
10087
+ data: s[f + l],
10088
+ index: f + l,
10089
10089
  offset: 0,
10090
10090
  size: 0
10091
10091
  }));
@@ -10123,9 +10123,9 @@ const mr = Xe(
10123
10123
  s,
10124
10124
  { listBoundary: a, topListHeight: i, visibleRange: l },
10125
10125
  { initialTopMostItemIndex: c, scrolledToInitialItem: d },
10126
- { topListHeight: p },
10126
+ { topListHeight: f },
10127
10127
  m,
10128
- { didMount: f },
10128
+ { didMount: p },
10129
10129
  { recalcInProgress: v }
10130
10130
  ]) => {
10131
10131
  const g = re([]), x = re(0), b = We();
@@ -10133,7 +10133,7 @@ const mr = Xe(
10133
10133
  const w = Ft(
10134
10134
  te(
10135
10135
  St(
10136
- f,
10136
+ p,
10137
10137
  v,
10138
10138
  Re(l, uo),
10139
10139
  Re(o),
@@ -10229,8 +10229,8 @@ const mr = Xe(
10229
10229
  w,
10230
10230
  fe((T) => T.topListHeight)
10231
10231
  ),
10232
- p
10233
- ), be(p, i), be(
10232
+ f
10233
+ ), be(f, i), be(
10234
10234
  te(
10235
10235
  w,
10236
10236
  fe((T) => [T.top, T.bottom])
@@ -10297,7 +10297,7 @@ const mr = Xe(
10297
10297
  const s = We(), a = Ft(
10298
10298
  te(
10299
10299
  St(n, e, r, t, o),
10300
- fe(([i, l, c, d, p]) => i + l + c + d + p.offsetBottom + p.bottom)
10300
+ fe(([i, l, c, d, f]) => i + l + c + d + f.offsetBottom + f.bottom)
10301
10301
  ),
10302
10302
  0
10303
10303
  );
@@ -10341,8 +10341,8 @@ const mr = Xe(
10341
10341
  d,
10342
10342
  Be(t, l, n, s, o, r, i),
10343
10343
  Be(e),
10344
- fe(([[p, m, f, v, g, x, b, w], y]) => {
10345
- const { align: C, behavior: S, calculateViewLocation: T = IT, done: k, ...R } = p, _ = wp(p, m, v - 1), O = fo(_, m.offsetTree, y) + g + x, $ = O + mn(m.sizeTree, _)[1], W = w + x, H = w + f - b, N = T({
10344
+ fe(([[f, m, p, v, g, x, b, w], y]) => {
10345
+ const { align: C, behavior: S, calculateViewLocation: T = IT, done: k, ...R } = f, _ = wp(f, m, v - 1), O = fo(_, m.offsetTree, y) + g + x, $ = O + mn(m.sizeTree, _)[1], W = w + x, H = w + p - b, N = T({
10346
10346
  itemBottom: $,
10347
10347
  itemTop: O,
10348
10348
  locationParams: { align: C, behavior: S, ...R },
@@ -10360,7 +10360,7 @@ const mr = Xe(
10360
10360
  k
10361
10361
  ) : k && k(), N;
10362
10362
  }),
10363
- Ie((p) => p !== null)
10363
+ Ie((f) => f !== null)
10364
10364
  ),
10365
10365
  c
10366
10366
  ), {
@@ -10381,9 +10381,9 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
10381
10381
  { scrolledToInitialItem: i },
10382
10382
  { didMount: l, propsReady: c },
10383
10383
  { log: d },
10384
- { scrollingInProgress: p },
10384
+ { scrollingInProgress: f },
10385
10385
  { context: m },
10386
- { scrollIntoView: f }
10386
+ { scrollIntoView: p }
10387
10387
  ]) => {
10388
10388
  const v = re(!1), g = We();
10389
10389
  let x = null;
@@ -10397,7 +10397,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
10397
10397
  tt(
10398
10398
  te(
10399
10399
  St(te(Re(t), ir(1)), l),
10400
- Be(Re(v), s, i, p),
10400
+ Be(Re(v), s, i, f),
10401
10401
  fe(([[S, T], k, R, _, O]) => {
10402
10402
  let $ = T && _, W = "auto";
10403
10403
  return $ && (W = NT(k, R || O), $ = $ && !!W), { followOutputBehavior: W, shouldFollow: $, totalCount: S };
@@ -10453,16 +10453,16 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
10453
10453
  ), tt(
10454
10454
  te(
10455
10455
  St(te(C, ir(1)), l),
10456
- Be(Re(y), i, p, m),
10456
+ Be(Re(y), i, f, m),
10457
10457
  fe(([[S, T], k, R, _, O]) => T && R && (k == null ? void 0 : k({ context: O, totalCount: S, scrollingInProgress: _ }))),
10458
10458
  Ie((S) => !!S),
10459
10459
  Nn(0)
10460
10460
  ),
10461
10461
  (S) => {
10462
10462
  x && (x(), x = null), vt(n) ? requestAnimationFrame(() => {
10463
- vt(d)("scrolling into view", {}), Oe(f, S);
10463
+ vt(d)("scrolling into view", {}), Oe(p, S);
10464
10464
  }) : x = fn(e, () => {
10465
- vt(d)("scrolling into view", {}), Oe(f, S), x = null;
10465
+ vt(d)("scrolling into view", {}), Oe(p, S), x = null;
10466
10466
  });
10467
10467
  }
10468
10468
  ), { autoscrollToBottom: g, followOutput: v, scrollIntoViewOnChange: y };
@@ -10485,7 +10485,7 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
10485
10485
  Be(s),
10486
10486
  Ie(([, l]) => l !== 0),
10487
10487
  Be(o, r, t, n, e),
10488
- fe(([[, l], c, d, p, m, f = []]) => Tp(l, c, d, p, m, f))
10488
+ fe(([[, l], c, d, f, m, p = []]) => Tp(l, c, d, f, m, p))
10489
10489
  ),
10490
10490
  a
10491
10491
  ), {}),
@@ -10590,23 +10590,23 @@ const NT = (e, t) => typeof e == "function" ? ru(e(t)) : t && ru(e), AT = Xe(
10590
10590
  { didMount: s },
10591
10591
  { useWindowScroll: a, windowScrollContainerState: i, windowViewportRect: l }
10592
10592
  ]) => {
10593
- const c = We(), d = re(void 0), p = re(null), m = re(null);
10594
- return be(i, p), be(l, m), tt(
10593
+ const c = We(), d = re(void 0), f = re(null), m = re(null);
10594
+ return be(i, f), be(l, m), tt(
10595
10595
  te(
10596
10596
  c,
10597
- Be(t, r, a, p, m, n)
10597
+ Be(t, r, a, f, m, n)
10598
10598
  ),
10599
- ([f, v, g, x, b, w, y]) => {
10599
+ ([p, v, g, x, b, w, y]) => {
10600
10600
  const C = gT(v.sizeTree);
10601
- x && b !== null && w !== null && (g = b.scrollTop - w.offsetTop), g -= y, f({ ranges: C, scrollTop: g });
10601
+ x && b !== null && w !== null && (g = b.scrollTop - w.offsetTop), g -= y, p({ ranges: C, scrollTop: g });
10602
10602
  }
10603
10603
  ), be(te(d, Ie(il), fe(MT)), o), be(
10604
10604
  te(
10605
10605
  s,
10606
10606
  Be(d),
10607
- Ie(([, f]) => f !== void 0),
10607
+ Ie(([, p]) => p !== void 0),
10608
10608
  ct(),
10609
- fe(([, f]) => f.ranges)
10609
+ fe(([, p]) => p.ranges)
10610
10610
  ),
10611
10611
  e
10612
10612
  ), {
@@ -10639,8 +10639,8 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10639
10639
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
10640
10640
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: a, scrollDirection: i },
10641
10641
  { listState: l },
10642
- { beforeUnshiftWith: c, gap: d, shiftWithOffset: p, sizes: m },
10643
- { log: f },
10642
+ { beforeUnshiftWith: c, gap: d, shiftWithOffset: f, sizes: m },
10643
+ { log: p },
10644
10644
  { recalcInProgress: v }
10645
10645
  ]) => {
10646
10646
  const g = tn(
@@ -10656,7 +10656,7 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10656
10656
  [0, [], 0, 0]
10657
10657
  ),
10658
10658
  Ie(([b]) => b !== 0),
10659
- Be(r, i, n, o, f, v),
10659
+ Be(r, i, n, o, p, v),
10660
10660
  Ie(([, b, w, y, , , C]) => !C && !y && b !== 0 && w === po),
10661
10661
  fe(([[b], , , , , w]) => (w("Upward scrolling compensation", { amount: b }, Yt.DEBUG), b))
10662
10662
  )
@@ -10676,7 +10676,7 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10676
10676
  x
10677
10677
  ), be(
10678
10678
  te(
10679
- p,
10679
+ f,
10680
10680
  fe((b) => ({ top: -b }))
10681
10681
  ),
10682
10682
  t
@@ -10766,9 +10766,9 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10766
10766
  sizes: l,
10767
10767
  statefulTotalCount: c,
10768
10768
  totalCount: d,
10769
- trackItemSizes: p
10769
+ trackItemSizes: f
10770
10770
  },
10771
- { initialItemFinalLocationReached: m, initialTopMostItemIndex: f, scrolledToInitialItem: v },
10771
+ { initialItemFinalLocationReached: m, initialTopMostItemIndex: p, scrolledToInitialItem: v },
10772
10772
  g,
10773
10773
  x,
10774
10774
  b,
@@ -10792,7 +10792,7 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10792
10792
  gap: o,
10793
10793
  groupCounts: R,
10794
10794
  initialItemFinalLocationReached: m,
10795
- initialTopMostItemIndex: f,
10795
+ initialTopMostItemIndex: p,
10796
10796
  scrolledToInitialItem: v,
10797
10797
  sizeRanges: i,
10798
10798
  topItemCount: k,
@@ -10806,7 +10806,7 @@ const DT = Ip(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10806
10806
  scrollToIndex: S,
10807
10807
  // output
10808
10808
  statefulTotalCount: c,
10809
- trackItemSizes: p,
10809
+ trackItemSizes: f,
10810
10810
  // exported from stateFlagsSystem
10811
10811
  ...C,
10812
10812
  // the bag of IO from featureGroup1System
@@ -10864,7 +10864,7 @@ function Ap(e, t, n) {
10864
10864
  function d(x) {
10865
10865
  return a.reduce((b, w) => (b[w] = tT(x[t.events[w]]), b), {});
10866
10866
  }
10867
- const p = M.forwardRef((x, b) => {
10867
+ const f = M.forwardRef((x, b) => {
10868
10868
  const { children: w, ...y } = x, [C] = M.useState(() => Js(rT(e), (k) => {
10869
10869
  l(k, y);
10870
10870
  })), [S] = M.useState(Gc(d, C));
@@ -10887,7 +10887,7 @@ function Ap(e, t, n) {
10887
10887
  },
10888
10888
  [b, x]
10889
10889
  );
10890
- }, f = (x) => {
10890
+ }, p = (x) => {
10891
10891
  const b = M.useContext(i)[x], w = M.useCallback(
10892
10892
  (y) => tt(b, y),
10893
10893
  [b]
@@ -10905,9 +10905,9 @@ function Ap(e, t, n) {
10905
10905
  }),
10906
10906
  [b, w]
10907
10907
  ), w;
10908
- }, g = M.version.startsWith("18") ? f : v;
10908
+ }, g = M.version.startsWith("18") ? p : v;
10909
10909
  return {
10910
- Component: p,
10910
+ Component: f,
10911
10911
  useEmitter: (x, b) => {
10912
10912
  const w = M.useContext(i)[x];
10913
10913
  Wo(() => tt(w, b), [b, w]);
@@ -10926,21 +10926,21 @@ function BT(e) {
10926
10926
  function Mp(e, t, n, r = Hr, o, s) {
10927
10927
  const a = M.useRef(null), i = M.useRef(null), l = M.useRef(null), c = M.useCallback(
10928
10928
  (m) => {
10929
- let f, v, g;
10929
+ let p, v, g;
10930
10930
  const x = m.target;
10931
10931
  if (BT(x) || Oa(x)) {
10932
10932
  const w = Oa(x) ? x : x.defaultView;
10933
- g = s ? w.scrollX : w.scrollY, f = s ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight, v = s ? w.innerWidth : w.innerHeight;
10933
+ g = s ? w.scrollX : w.scrollY, p = s ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight, v = s ? w.innerWidth : w.innerHeight;
10934
10934
  } else
10935
- g = s ? x.scrollLeft : x.scrollTop, f = s ? x.scrollWidth : x.scrollHeight, v = s ? x.offsetWidth : x.offsetHeight;
10935
+ g = s ? x.scrollLeft : x.scrollTop, p = s ? x.scrollWidth : x.scrollHeight, v = s ? x.offsetWidth : x.offsetHeight;
10936
10936
  const b = () => {
10937
10937
  e({
10938
- scrollHeight: f,
10938
+ scrollHeight: p,
10939
10939
  scrollTop: Math.max(g, 0),
10940
10940
  viewportHeight: v
10941
10941
  });
10942
10942
  };
10943
- m.suppressFlushSync ? b() : ki.flushSync(b), i.current !== null && (g === i.current || g <= 0 || g === f - v) && (i.current = null, t(!0), l.current && (clearTimeout(l.current), l.current = null));
10943
+ m.suppressFlushSync ? b() : ki.flushSync(b), i.current !== null && (g === i.current || g <= 0 || g === p - v) && (i.current = null, t(!0), l.current && (clearTimeout(l.current), l.current = null));
10944
10944
  },
10945
10945
  [e, t, s]
10946
10946
  );
@@ -10951,15 +10951,15 @@ function Mp(e, t, n, r = Hr, o, s) {
10951
10951
  };
10952
10952
  }, [a, c, n, r, o]);
10953
10953
  function d(m) {
10954
- const f = a.current;
10955
- if (!f || (s ? "offsetWidth" in f && f.offsetWidth === 0 : "offsetHeight" in f && f.offsetHeight === 0))
10954
+ const p = a.current;
10955
+ if (!p || (s ? "offsetWidth" in p && p.offsetWidth === 0 : "offsetHeight" in p && p.offsetHeight === 0))
10956
10956
  return;
10957
10957
  const v = m.behavior === "smooth";
10958
10958
  let g, x, b;
10959
- Oa(f) ? (x = Math.max(
10960
- $n(f.document.documentElement, s ? "width" : "height"),
10961
- s ? f.document.documentElement.scrollWidth : f.document.documentElement.scrollHeight
10962
- ), g = s ? f.innerWidth : f.innerHeight, b = s ? window.scrollX : window.scrollY) : (x = f[s ? "scrollWidth" : "scrollHeight"], g = $n(f, s ? "width" : "height"), b = f[s ? "scrollLeft" : "scrollTop"]);
10959
+ Oa(p) ? (x = Math.max(
10960
+ $n(p.document.documentElement, s ? "width" : "height"),
10961
+ s ? p.document.documentElement.scrollWidth : p.document.documentElement.scrollHeight
10962
+ ), g = s ? p.innerWidth : p.innerHeight, b = s ? window.scrollX : window.scrollY) : (x = p[s ? "scrollWidth" : "scrollHeight"], g = $n(p, s ? "width" : "height"), b = p[s ? "scrollLeft" : "scrollTop"]);
10963
10963
  const w = x - g;
10964
10964
  if (m.top = Math.ceil(Math.max(Math.min(w, m.top), 0)), Sp(g, x) || m.top === b) {
10965
10965
  e({ scrollHeight: x, scrollTop: b, viewportHeight: g }), v && t(!0);
@@ -10967,12 +10967,12 @@ function Mp(e, t, n, r = Hr, o, s) {
10967
10967
  }
10968
10968
  v ? (i.current = m.top, l.current && clearTimeout(l.current), l.current = setTimeout(() => {
10969
10969
  l.current = null, i.current = null, t(!0);
10970
- }, 1e3)) : i.current = null, s && (m = { behavior: m.behavior, left: m.top }), f.scrollTo(m);
10970
+ }, 1e3)) : i.current = null, s && (m = { behavior: m.behavior, left: m.top }), p.scrollTo(m);
10971
10971
  }
10972
- function p(m) {
10972
+ function f(m) {
10973
10973
  s && (m = { behavior: m.behavior, left: m.top }), a.current.scrollBy(m);
10974
10974
  }
10975
- return { scrollByCallback: p, scrollerRef: a, scrollToCallback: d };
10975
+ return { scrollByCallback: f, scrollerRef: a, scrollToCallback: d };
10976
10976
  }
10977
10977
  const Da = "-webkit-sticky", ou = "sticky", gl = Ip(() => {
10978
10978
  if (typeof document > "u")
@@ -11013,12 +11013,12 @@ const zT = /* @__PURE__ */ Xe(() => {
11013
11013
  ([e, t]) => ({ ...e, ...t }),
11014
11014
  ut(Np, zT)
11015
11015
  ), UT = ({ height: e }) => /* @__PURE__ */ u.jsx("div", { style: { height: e } }), WT = { overflowAnchor: "none", position: gl(), zIndex: 1 }, Op = { overflowAnchor: "none" }, VT = { ...Op, display: "inline-block", height: "100%" }, su = /* @__PURE__ */ M.memo(function({ showTopList: e = !1 }) {
11016
- const t = je("listState"), n = on("sizeRanges"), r = je("useWindowScroll"), o = je("customScrollParent"), s = on("windowScrollContainerState"), a = on("scrollContainerState"), i = o || r ? s : a, l = je("itemContent"), c = je("context"), d = je("groupContent"), p = je("trackItemSizes"), m = je("itemSize"), f = je("log"), v = on("gap"), g = je("horizontalDirection"), { callbackRef: x } = aT(
11016
+ const t = je("listState"), n = on("sizeRanges"), r = je("useWindowScroll"), o = je("customScrollParent"), s = on("windowScrollContainerState"), a = on("scrollContainerState"), i = o || r ? s : a, l = je("itemContent"), c = je("context"), d = je("groupContent"), f = je("trackItemSizes"), m = je("itemSize"), p = je("log"), v = on("gap"), g = je("horizontalDirection"), { callbackRef: x } = aT(
11017
11017
  n,
11018
11018
  m,
11019
- p,
11020
- e ? Hr : i,
11021
11019
  f,
11020
+ e ? Hr : i,
11021
+ p,
11022
11022
  v,
11023
11023
  o,
11024
11024
  g,
@@ -11146,21 +11146,21 @@ const XT = /* @__PURE__ */ M.memo(function() {
11146
11146
  });
11147
11147
  function Dp({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11148
11148
  return M.memo(function({ children: r, style: o, context: s, ...a }) {
11149
- const i = n("scrollContainerState"), l = t("ScrollerComponent"), c = n("smoothScrollTargetReached"), d = t("scrollerRef"), p = t("horizontalDirection") || !1, { scrollByCallback: m, scrollerRef: f, scrollToCallback: v } = Mp(
11149
+ const i = n("scrollContainerState"), l = t("ScrollerComponent"), c = n("smoothScrollTargetReached"), d = t("scrollerRef"), f = t("horizontalDirection") || !1, { scrollByCallback: m, scrollerRef: p, scrollToCallback: v } = Mp(
11150
11150
  i,
11151
11151
  c,
11152
11152
  l,
11153
11153
  d,
11154
11154
  void 0,
11155
- p
11155
+ f
11156
11156
  );
11157
11157
  return e("scrollTo", v), e("scrollBy", m), /* @__PURE__ */ u.jsx(
11158
11158
  l,
11159
11159
  {
11160
11160
  "data-testid": "virtuoso-scroller",
11161
11161
  "data-virtuoso-scroller": !0,
11162
- ref: f,
11163
- style: { ...p ? qT : KT, ...o },
11162
+ ref: p,
11163
+ style: { ...f ? qT : KT, ...o },
11164
11164
  tabIndex: 0,
11165
11165
  ...a,
11166
11166
  ...$t(l, s),
@@ -11171,7 +11171,7 @@ function Dp({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11171
11171
  }
11172
11172
  function Lp({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11173
11173
  return M.memo(function({ children: r, style: o, context: s, ...a }) {
11174
- const i = n("windowScrollContainerState"), l = t("ScrollerComponent"), c = n("smoothScrollTargetReached"), d = t("totalListHeight"), p = t("deviation"), m = t("customScrollParent"), f = M.useRef(null), v = t("scrollerRef"), { scrollByCallback: g, scrollerRef: x, scrollToCallback: b } = Mp(
11174
+ const i = n("windowScrollContainerState"), l = t("ScrollerComponent"), c = n("smoothScrollTargetReached"), d = t("totalListHeight"), f = t("deviation"), m = t("customScrollParent"), p = M.useRef(null), v = t("scrollerRef"), { scrollByCallback: g, scrollerRef: x, scrollToCallback: b } = Mp(
11175
11175
  i,
11176
11176
  c,
11177
11177
  l,
@@ -11180,15 +11180,15 @@ function Lp({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11180
11180
  );
11181
11181
  return Pp(() => {
11182
11182
  var w;
11183
- return x.current = m || ((w = f.current) == null ? void 0 : w.ownerDocument.defaultView), () => {
11183
+ return x.current = m || ((w = p.current) == null ? void 0 : w.ownerDocument.defaultView), () => {
11184
11184
  x.current = null;
11185
11185
  };
11186
11186
  }, [x, m]), e("windowScrollTo", b), e("scrollBy", g), /* @__PURE__ */ u.jsx(
11187
11187
  l,
11188
11188
  {
11189
- ref: f,
11189
+ ref: p,
11190
11190
  "data-virtuoso-scroller": !0,
11191
- style: { position: "relative", ...o, ...d !== 0 ? { height: d + p } : {} },
11191
+ style: { position: "relative", ...o, ...d !== 0 ? { height: d + f } : {} },
11192
11192
  ...a,
11193
11193
  ...$t(l, s),
11194
11194
  children: r
@@ -11300,7 +11300,7 @@ const ZT = ({ children: e }) => {
11300
11300
  ] })), r = re(null), o = re(null), s = re({}), a = re(xl), i = re(Hr), l = (c, d = null) => Ft(
11301
11301
  te(
11302
11302
  s,
11303
- fe((p) => p[c]),
11303
+ fe((f) => f[c]),
11304
11304
  ct()
11305
11305
  ),
11306
11306
  d
@@ -11363,9 +11363,9 @@ function cC(e, t) {
11363
11363
  const uC = /* @__PURE__ */ Xe(
11364
11364
  ([
11365
11365
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
11366
- { footerHeight: o, headerHeight: s, scrollBy: a, scrollContainerState: i, scrollTo: l, scrollTop: c, smoothScrollTargetReached: d, viewportHeight: p },
11366
+ { footerHeight: o, headerHeight: s, scrollBy: a, scrollContainerState: i, scrollTo: l, scrollTop: c, smoothScrollTargetReached: d, viewportHeight: f },
11367
11367
  m,
11368
- f,
11368
+ p,
11369
11369
  { didMount: v, propsReady: g },
11370
11370
  { customScrollParent: x, useWindowScroll: b, windowScrollContainerState: w, windowScrollTo: y, windowViewportRect: C },
11371
11371
  S
@@ -11415,7 +11415,7 @@ const uC = /* @__PURE__ */ Xe(
11415
11415
  _,
11416
11416
  fe(({ height: L }) => L)
11417
11417
  ),
11418
- p
11418
+ f
11419
11419
  ), be(
11420
11420
  te(
11421
11421
  St(
@@ -11470,8 +11470,8 @@ const uC = /* @__PURE__ */ Xe(
11470
11470
  const Ve = $p(Nt, yt, _e);
11471
11471
  let He, qe;
11472
11472
  we ? Y === 0 && Q === 0 && ge > 0 ? (He = 0, qe = ge - 1) : (He = Ve * ys((Y + Ee) / (at + Ee)), qe = Ve * iu((Q + Ee) / (at + Ee)) - 1, qe = La(L - 1, Qr(qe, Ve - 1)), He = La(qe, Qr(0, He))) : (He = 0, qe = -1);
11473
- const Le = cu(He, qe, se), { bottom: Ue, top: pt } = uu(ae, J, B, Le), Pt = iu(L / Ve), it = Pt * at + (Pt - 1) * Ee - Ue;
11474
- return { bottom: Ue, itemHeight: at, items: Le, itemWidth: yt, offsetBottom: it, offsetTop: pt, top: pt };
11473
+ const $e = cu(He, qe, se), { bottom: Ue, top: pt } = uu(ae, J, B, $e), Pt = iu(L / Ve), it = Pt * at + (Pt - 1) * Ee - Ue;
11474
+ return { bottom: Ue, itemHeight: at, items: $e, itemWidth: yt, offsetBottom: it, offsetTop: pt, top: pt };
11475
11475
  }
11476
11476
  )
11477
11477
  ),
@@ -11536,7 +11536,7 @@ const uC = /* @__PURE__ */ Xe(
11536
11536
  Nn(0)
11537
11537
  )
11538
11538
  );
11539
- be(oe, f.scrollSeekRangeChanged), be(
11539
+ be(oe, p.scrollSeekRangeChanged), be(
11540
11540
  te(
11541
11541
  $,
11542
11542
  Be(_, O, T, K),
@@ -11589,7 +11589,7 @@ const uC = /* @__PURE__ */ Xe(
11589
11589
  windowScrollContainerState: w,
11590
11590
  windowScrollTo: y,
11591
11591
  windowViewportRect: C,
11592
- ...f,
11592
+ ...p,
11593
11593
  // output
11594
11594
  gridState: R,
11595
11595
  horizontalDirection: A,
@@ -11622,10 +11622,10 @@ function ui(e, t, n, r) {
11622
11622
  return a > 0 ? a + t.row : a;
11623
11623
  }
11624
11624
  const dC = /* @__PURE__ */ Xe(() => {
11625
- const e = re((p) => `Item ${p}`), t = re({}), n = re(null), r = re("virtuoso-grid-item"), o = re("virtuoso-grid-list"), s = re(xl), a = re("div"), i = re(Hr), l = (p, m = null) => Ft(
11625
+ const e = re((f) => `Item ${f}`), t = re({}), n = re(null), r = re("virtuoso-grid-item"), o = re("virtuoso-grid-list"), s = re(xl), a = re("div"), i = re(Hr), l = (f, m = null) => Ft(
11626
11626
  te(
11627
11627
  t,
11628
- fe((f) => f[p]),
11628
+ fe((p) => p[f]),
11629
11629
  ct()
11630
11630
  ),
11631
11631
  m
@@ -11652,7 +11652,7 @@ const dC = /* @__PURE__ */ Xe(() => {
11652
11652
  ([e, t]) => ({ ...e, ...t }),
11653
11653
  ut(uC, dC)
11654
11654
  ), pC = /* @__PURE__ */ M.memo(function() {
11655
- const e = ft("gridState"), t = ft("listClassName"), n = ft("itemClassName"), r = ft("itemContent"), o = ft("computeItemKey"), s = ft("isSeeking"), a = sn("scrollHeight"), i = ft("ItemComponent"), l = ft("ListComponent"), c = ft("ScrollSeekPlaceholder"), d = ft("context"), p = sn("itemDimensions"), m = sn("gap"), f = ft("log"), v = ft("stateRestoreInProgress"), g = sn("reportReadyState"), x = hr(
11655
+ const e = ft("gridState"), t = ft("listClassName"), n = ft("itemClassName"), r = ft("itemContent"), o = ft("computeItemKey"), s = ft("isSeeking"), a = sn("scrollHeight"), i = ft("ItemComponent"), l = ft("ListComponent"), c = ft("ScrollSeekPlaceholder"), d = ft("context"), f = sn("itemDimensions"), m = sn("gap"), p = ft("log"), v = ft("stateRestoreInProgress"), g = sn("reportReadyState"), x = hr(
11656
11656
  M.useMemo(
11657
11657
  () => (b) => {
11658
11658
  const w = b.parentElement.parentElement.scrollHeight;
@@ -11660,14 +11660,14 @@ const dC = /* @__PURE__ */ Xe(() => {
11660
11660
  const y = b.firstChild;
11661
11661
  if (y) {
11662
11662
  const { height: C, width: S } = y.getBoundingClientRect();
11663
- p({ height: C, width: S });
11663
+ f({ height: C, width: S });
11664
11664
  }
11665
11665
  m({
11666
- column: du("column-gap", getComputedStyle(b).columnGap, f),
11667
- row: du("row-gap", getComputedStyle(b).rowGap, f)
11666
+ column: du("column-gap", getComputedStyle(b).columnGap, p),
11667
+ row: du("row-gap", getComputedStyle(b).rowGap, p)
11668
11668
  });
11669
11669
  },
11670
- [a, p, m, f]
11670
+ [a, f, m, p]
11671
11671
  ),
11672
11672
  !0,
11673
11673
  !1
@@ -11830,7 +11830,7 @@ var ta = "Dialog", [Bp, wN] = xn(ta), [yC, vn] = Bp(ta), zp = (e) => {
11830
11830
  descriptionId: Bt(),
11831
11831
  open: c,
11832
11832
  onOpenChange: d,
11833
- onOpenToggle: h.useCallback(() => d((p) => !p), [d]),
11833
+ onOpenToggle: h.useCallback(() => d((f) => !f), [d]),
11834
11834
  modal: a,
11835
11835
  children: n
11836
11836
  }
@@ -12210,7 +12210,7 @@ function Rl() {
12210
12210
  };
12211
12211
  }
12212
12212
  function $C({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
12213
- const [s, a] = de(!1), [i, l] = de(null), [c, d] = de(null), { toast: p } = Rl(), m = M.useCallback(async () => {
12213
+ const [s, a] = de(!1), [i, l] = de(null), [c, d] = de(null), { toast: f } = Rl(), m = M.useCallback(async () => {
12214
12214
  if (n) {
12215
12215
  a(!0), d(null), l(null);
12216
12216
  try {
@@ -12226,12 +12226,12 @@ function $C({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
12226
12226
  Ze(() => {
12227
12227
  e && n && m();
12228
12228
  }, [e, n, m]);
12229
- const f = async () => {
12229
+ const p = async () => {
12230
12230
  if (n)
12231
12231
  try {
12232
- await Yv(n), p({ title: "Download started", description: `Downloading ${r}` });
12232
+ await Yv(n), f({ title: "Download started", description: `Downloading ${r}` });
12233
12233
  } catch (b) {
12234
- console.error("Failed to download file:", b), p({ title: "Download failed", description: String(b), variant: "destructive" });
12234
+ console.error("Failed to download file:", b), f({ title: "Download failed", description: String(b), variant: "destructive" });
12235
12235
  }
12236
12236
  }, v = async () => {
12237
12237
  if (n)
@@ -12239,7 +12239,7 @@ function $C({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
12239
12239
  const b = await hc(n), w = new Blob([b], { type: o }), y = URL.createObjectURL(w);
12240
12240
  window.open(y, "_blank"), URL.revokeObjectURL(y);
12241
12241
  } catch (b) {
12242
- console.error("Failed to open file externally:", b), p({ title: "Failed to open file", description: String(b), variant: "destructive" });
12242
+ console.error("Failed to open file externally:", b), f({ title: "Failed to open file", description: String(b), variant: "destructive" });
12243
12243
  }
12244
12244
  }, g = () => s ? /* @__PURE__ */ u.jsxs("div", { className: "flex items-center justify-center py-12", children: [
12245
12245
  /* @__PURE__ */ u.jsx(cs, { className: "h-8 w-8 animate-spin mr-3" }),
@@ -12304,7 +12304,7 @@ function $C({ isOpen: e, onClose: t, fileId: n, fileName: r, mimeType: o }) {
12304
12304
  {
12305
12305
  variant: "outline",
12306
12306
  size: "sm",
12307
- onClick: f,
12307
+ onClick: p,
12308
12308
  className: "flex items-center gap-2",
12309
12309
  children: [
12310
12310
  /* @__PURE__ */ u.jsx(Ug, { className: "h-4 w-4" }),
@@ -12573,7 +12573,7 @@ class Il {
12573
12573
  list(t) {
12574
12574
  let n = this.rules.block.list.exec(t);
12575
12575
  if (n) {
12576
- let r, o, s, a, i, l, c, d, p, m, f, v, g = n[1].trim();
12576
+ let r, o, s, a, i, l, c, d, f, m, p, v, g = n[1].trim();
12577
12577
  const x = g.length > 1, b = {
12578
12578
  type: "list",
12579
12579
  raw: "",
@@ -12586,35 +12586,35 @@ class Il {
12586
12586
  const w = new RegExp(`^( {0,3}${g})((?:[ ][^\\n]*)?(?:\\n|$))`);
12587
12587
  for (; t && (v = !1, !(!(n = w.exec(t)) || this.rules.block.hr.test(t))); ) {
12588
12588
  if (r = n[0], t = t.substring(r.length), d = n[2].split(`
12589
- `, 1)[0].replace(/^\t+/, (C) => " ".repeat(3 * C.length)), p = t.split(`
12590
- `, 1)[0], this.options.pedantic ? (a = 2, f = d.trimLeft()) : (a = n[2].search(/[^ ]/), a = a > 4 ? 1 : a, f = d.slice(a), a += n[1].length), l = !1, !d && /^ *$/.test(p) && (r += p + `
12591
- `, t = t.substring(p.length + 1), v = !0), !v) {
12589
+ `, 1)[0].replace(/^\t+/, (C) => " ".repeat(3 * C.length)), f = t.split(`
12590
+ `, 1)[0], this.options.pedantic ? (a = 2, p = d.trimLeft()) : (a = n[2].search(/[^ ]/), a = a > 4 ? 1 : a, p = d.slice(a), a += n[1].length), l = !1, !d && /^ *$/.test(f) && (r += f + `
12591
+ `, t = t.substring(f.length + 1), v = !0), !v) {
12592
12592
  const C = new RegExp(`^ {0,${Math.min(3, a - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), S = new RegExp(`^ {0,${Math.min(3, a - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), T = new RegExp(`^ {0,${Math.min(3, a - 1)}}(?:\`\`\`|~~~)`), k = new RegExp(`^ {0,${Math.min(3, a - 1)}}#`);
12593
12593
  for (; t && (m = t.split(`
12594
- `, 1)[0], p = m, this.options.pedantic && (p = p.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(T.test(p) || k.test(p) || C.test(p) || S.test(t))); ) {
12595
- if (p.search(/[^ ]/) >= a || !p.trim())
12596
- f += `
12597
- ` + p.slice(a);
12594
+ `, 1)[0], f = m, this.options.pedantic && (f = f.replace(/^ {1,4}(?=( {4})*[^ ])/g, " ")), !(T.test(f) || k.test(f) || C.test(f) || S.test(t))); ) {
12595
+ if (f.search(/[^ ]/) >= a || !f.trim())
12596
+ p += `
12597
+ ` + f.slice(a);
12598
12598
  else {
12599
12599
  if (l || d.search(/[^ ]/) >= 4 || T.test(d) || k.test(d) || S.test(d))
12600
12600
  break;
12601
- f += `
12602
- ` + p;
12601
+ p += `
12602
+ ` + f;
12603
12603
  }
12604
- !l && !p.trim() && (l = !0), r += m + `
12605
- `, t = t.substring(m.length + 1), d = p.slice(a);
12604
+ !l && !f.trim() && (l = !0), r += m + `
12605
+ `, t = t.substring(m.length + 1), d = f.slice(a);
12606
12606
  }
12607
12607
  }
12608
- b.loose || (c ? b.loose = !0 : /\n *\n *$/.test(r) && (c = !0)), this.options.gfm && (o = /^\[[ xX]\] /.exec(f), o && (s = o[0] !== "[ ] ", f = f.replace(/^\[[ xX]\] +/, ""))), b.items.push({
12608
+ b.loose || (c ? b.loose = !0 : /\n *\n *$/.test(r) && (c = !0)), this.options.gfm && (o = /^\[[ xX]\] /.exec(p), o && (s = o[0] !== "[ ] ", p = p.replace(/^\[[ xX]\] +/, ""))), b.items.push({
12609
12609
  type: "list_item",
12610
12610
  raw: r,
12611
12611
  task: !!o,
12612
12612
  checked: s,
12613
12613
  loose: !1,
12614
- text: f
12614
+ text: p
12615
12615
  }), b.raw += r;
12616
12616
  }
12617
- b.items[b.items.length - 1].raw = r.trimRight(), b.items[b.items.length - 1].text = f.trimRight(), b.raw = b.raw.trimRight();
12617
+ b.items[b.items.length - 1].raw = r.trimRight(), b.items[b.items.length - 1].text = p.trimRight(), b.raw = b.raw.trimRight();
12618
12618
  const y = b.items.length;
12619
12619
  for (i = 0; i < y; i++)
12620
12620
  if (this.lexer.state.top = !1, b.items[i].tokens = this.lexer.blockTokens(b.items[i].text, []), !b.loose) {
@@ -12787,8 +12787,8 @@ class Il {
12787
12787
  if (!s || s && (r === "" || this.rules.inline.punctuation.exec(r))) {
12788
12788
  const a = o[0].length - 1;
12789
12789
  let i, l, c = a, d = 0;
12790
- const p = o[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
12791
- for (p.lastIndex = 0, n = n.slice(-1 * t.length + a); (o = p.exec(n)) != null; ) {
12790
+ const f = o[0][0] === "*" ? this.rules.inline.emStrong.rDelimAst : this.rules.inline.emStrong.rDelimUnd;
12791
+ for (f.lastIndex = 0, n = n.slice(-1 * t.length + a); (o = f.exec(n)) != null; ) {
12792
12792
  if (i = o[1] || o[2] || o[3] || o[4] || o[5] || o[6], !i) continue;
12793
12793
  if (l = i.length, o[3] || o[4]) {
12794
12794
  c += l;
@@ -12809,12 +12809,12 @@ class Il {
12809
12809
  tokens: this.lexer.inlineTokens(v)
12810
12810
  };
12811
12811
  }
12812
- const f = m.slice(2, -2);
12812
+ const p = m.slice(2, -2);
12813
12813
  return {
12814
12814
  type: "strong",
12815
12815
  raw: m,
12816
- text: f,
12817
- tokens: this.lexer.inlineTokens(f)
12816
+ text: p,
12817
+ tokens: this.lexer.inlineTokens(p)
12818
12818
  };
12819
12819
  }
12820
12820
  }
@@ -13243,10 +13243,10 @@ class Fn {
13243
13243
  }
13244
13244
  if (s = t, this.options.extensions && this.options.extensions.startInline) {
13245
13245
  let d = 1 / 0;
13246
- const p = t.slice(1);
13246
+ const f = t.slice(1);
13247
13247
  let m;
13248
- this.options.extensions.startInline.forEach(function(f) {
13249
- m = f.call({ lexer: this }, p), typeof m == "number" && m >= 0 && (d = Math.min(d, m));
13248
+ this.options.extensions.startInline.forEach(function(p) {
13249
+ m = p.call({ lexer: this }, f), typeof m == "number" && m >= 0 && (d = Math.min(d, m));
13250
13250
  }), d < 1 / 0 && d >= 0 && (s = t.substring(0, d + 1));
13251
13251
  }
13252
13252
  if (r = this.tokenizer.inlineText(s, eE)) {
@@ -13498,14 +13498,14 @@ class Bn {
13498
13498
  * Parse Loop
13499
13499
  */
13500
13500
  parse(t, n = !0) {
13501
- let r = "", o, s, a, i, l, c, d, p, m, f, v, g, x, b, w, y, C, S, T;
13501
+ let r = "", o, s, a, i, l, c, d, f, m, p, v, g, x, b, w, y, C, S, T;
13502
13502
  const k = t.length;
13503
13503
  for (o = 0; o < k; o++) {
13504
- if (f = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[f.type] && (T = this.options.extensions.renderers[f.type].call({ parser: this }, f), T !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(f.type))) {
13504
+ if (p = t[o], this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[p.type] && (T = this.options.extensions.renderers[p.type].call({ parser: this }, p), T !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "paragraph", "text"].includes(p.type))) {
13505
13505
  r += T || "";
13506
13506
  continue;
13507
13507
  }
13508
- switch (f.type) {
13508
+ switch (p.type) {
13509
13509
  case "space":
13510
13510
  continue;
13511
13511
  case "hr": {
@@ -13514,45 +13514,45 @@ class Bn {
13514
13514
  }
13515
13515
  case "heading": {
13516
13516
  r += this.renderer.heading(
13517
- this.parseInline(f.tokens),
13518
- f.depth,
13519
- lh(this.parseInline(f.tokens, this.textRenderer)),
13517
+ this.parseInline(p.tokens),
13518
+ p.depth,
13519
+ lh(this.parseInline(p.tokens, this.textRenderer)),
13520
13520
  this.slugger
13521
13521
  );
13522
13522
  continue;
13523
13523
  }
13524
13524
  case "code": {
13525
13525
  r += this.renderer.code(
13526
- f.text,
13527
- f.lang,
13528
- f.escaped
13526
+ p.text,
13527
+ p.lang,
13528
+ p.escaped
13529
13529
  );
13530
13530
  continue;
13531
13531
  }
13532
13532
  case "table": {
13533
- for (p = "", d = "", i = f.header.length, s = 0; s < i; s++)
13533
+ for (f = "", d = "", i = p.header.length, s = 0; s < i; s++)
13534
13534
  d += this.renderer.tablecell(
13535
- this.parseInline(f.header[s].tokens),
13536
- { header: !0, align: f.align[s] }
13535
+ this.parseInline(p.header[s].tokens),
13536
+ { header: !0, align: p.align[s] }
13537
13537
  );
13538
- for (p += this.renderer.tablerow(d), m = "", i = f.rows.length, s = 0; s < i; s++) {
13539
- for (c = f.rows[s], d = "", l = c.length, a = 0; a < l; a++)
13538
+ for (f += this.renderer.tablerow(d), m = "", i = p.rows.length, s = 0; s < i; s++) {
13539
+ for (c = p.rows[s], d = "", l = c.length, a = 0; a < l; a++)
13540
13540
  d += this.renderer.tablecell(
13541
13541
  this.parseInline(c[a].tokens),
13542
- { header: !1, align: f.align[a] }
13542
+ { header: !1, align: p.align[a] }
13543
13543
  );
13544
13544
  m += this.renderer.tablerow(d);
13545
13545
  }
13546
- r += this.renderer.table(p, m);
13546
+ r += this.renderer.table(f, m);
13547
13547
  continue;
13548
13548
  }
13549
13549
  case "blockquote": {
13550
- m = this.parse(f.tokens), r += this.renderer.blockquote(m);
13550
+ m = this.parse(p.tokens), r += this.renderer.blockquote(m);
13551
13551
  continue;
13552
13552
  }
13553
13553
  case "list": {
13554
- for (v = f.ordered, g = f.start, x = f.loose, i = f.items.length, m = "", s = 0; s < i; s++)
13555
- w = f.items[s], y = w.checked, C = w.task, b = "", w.task && (S = this.renderer.checkbox(y), x ? w.tokens.length > 0 && w.tokens[0].type === "paragraph" ? (w.tokens[0].text = S + " " + w.tokens[0].text, w.tokens[0].tokens && w.tokens[0].tokens.length > 0 && w.tokens[0].tokens[0].type === "text" && (w.tokens[0].tokens[0].text = S + " " + w.tokens[0].tokens[0].text)) : w.tokens.unshift({
13554
+ for (v = p.ordered, g = p.start, x = p.loose, i = p.items.length, m = "", s = 0; s < i; s++)
13555
+ w = p.items[s], y = w.checked, C = w.task, b = "", w.task && (S = this.renderer.checkbox(y), x ? w.tokens.length > 0 && w.tokens[0].type === "paragraph" ? (w.tokens[0].text = S + " " + w.tokens[0].text, w.tokens[0].tokens && w.tokens[0].tokens.length > 0 && w.tokens[0].tokens[0].type === "text" && (w.tokens[0].tokens[0].text = S + " " + w.tokens[0].tokens[0].text)) : w.tokens.unshift({
13556
13556
  type: "text",
13557
13557
  text: S
13558
13558
  }) : b += S), b += this.parse(w.tokens, x), m += this.renderer.listitem(b, C, y);
@@ -13560,22 +13560,22 @@ class Bn {
13560
13560
  continue;
13561
13561
  }
13562
13562
  case "html": {
13563
- r += this.renderer.html(f.text);
13563
+ r += this.renderer.html(p.text);
13564
13564
  continue;
13565
13565
  }
13566
13566
  case "paragraph": {
13567
- r += this.renderer.paragraph(this.parseInline(f.tokens));
13567
+ r += this.renderer.paragraph(this.parseInline(p.tokens));
13568
13568
  continue;
13569
13569
  }
13570
13570
  case "text": {
13571
- for (m = f.tokens ? this.parseInline(f.tokens) : f.text; o + 1 < k && t[o + 1].type === "text"; )
13572
- f = t[++o], m += `
13573
- ` + (f.tokens ? this.parseInline(f.tokens) : f.text);
13571
+ for (m = p.tokens ? this.parseInline(p.tokens) : p.text; o + 1 < k && t[o + 1].type === "text"; )
13572
+ p = t[++o], m += `
13573
+ ` + (p.tokens ? this.parseInline(p.tokens) : p.text);
13574
13574
  r += n ? this.renderer.paragraph(m) : m;
13575
13575
  continue;
13576
13576
  }
13577
13577
  default: {
13578
- const R = 'Token with "' + f.type + '" type was not found.';
13578
+ const R = 'Token with "' + p.type + '" type was not found.';
13579
13579
  if (this.options.silent) {
13580
13580
  console.error(R);
13581
13581
  return;
@@ -13710,27 +13710,27 @@ function dh(e, t) {
13710
13710
  let l;
13711
13711
  try {
13712
13712
  r.hooks && (n = r.hooks.preprocess(n)), l = e(n, r);
13713
- } catch (p) {
13714
- return a(p);
13713
+ } catch (f) {
13714
+ return a(f);
13715
13715
  }
13716
- const c = function(p) {
13716
+ const c = function(f) {
13717
13717
  let m;
13718
- if (!p)
13718
+ if (!f)
13719
13719
  try {
13720
13720
  r.walkTokens && ye.walkTokens(l, r.walkTokens), m = t(l, r), r.hooks && (m = r.hooks.postprocess(m));
13721
- } catch (f) {
13722
- p = f;
13721
+ } catch (p) {
13722
+ f = p;
13723
13723
  }
13724
- return r.highlight = i, p ? a(p) : o(null, m);
13724
+ return r.highlight = i, f ? a(f) : o(null, m);
13725
13725
  };
13726
13726
  if (!i || i.length < 3 || (delete r.highlight, !l.length)) return c();
13727
13727
  let d = 0;
13728
- ye.walkTokens(l, function(p) {
13729
- p.type === "code" && (d++, setTimeout(() => {
13730
- i(p.text, p.lang, function(m, f) {
13728
+ ye.walkTokens(l, function(f) {
13729
+ f.type === "code" && (d++, setTimeout(() => {
13730
+ i(f.text, f.lang, function(m, p) {
13731
13731
  if (m)
13732
13732
  return c(m);
13733
- f != null && f !== p.text && (p.text = f, p.escaped = !0), d--, d === 0 && c();
13733
+ p != null && p !== f.text && (f.text = p, f.escaped = !0), d--, d === 0 && c();
13734
13734
  });
13735
13735
  }, 0));
13736
13736
  }), d === 0 && c();
@@ -14300,18 +14300,18 @@ function fE({ message: e, viewMode: t, isStreaming: n = !1 }) {
14300
14300
  const d = typeof c == "string" ? Pi(c) ?? c : c;
14301
14301
  if (d && typeof d == "object")
14302
14302
  return /* @__PURE__ */ u.jsx(vh, { data: d });
14303
- const p = typeof d == "string" ? d : (() => {
14303
+ const f = typeof d == "string" ? d : (() => {
14304
14304
  try {
14305
14305
  return Nr(d);
14306
14306
  } catch {
14307
14307
  return String(d ?? "");
14308
14308
  }
14309
14309
  })();
14310
- return /* @__PURE__ */ u.jsx("pre", { className: "whitespace-pre-wrap break-words font-sans text-sm text-foreground/90", children: p });
14310
+ return /* @__PURE__ */ u.jsx("pre", { className: "whitespace-pre-wrap break-words font-sans text-sm text-foreground/90", children: f });
14311
14311
  }, i = (c) => {
14312
14312
  if (c == null) return null;
14313
- const { content: d, isMarkdown: p } = uw(c);
14314
- return p ? /* @__PURE__ */ u.jsx(Mo, { content: d, className: "text-current" }) : a(c);
14313
+ const { content: d, isMarkdown: f } = uw(c);
14314
+ return f ? /* @__PURE__ */ u.jsx(Mo, { content: d, className: "text-current" }) : a(c);
14315
14315
  }, l = () => {
14316
14316
  const c = e.content.find((m) => m.type !== "tool_call");
14317
14317
  if (!c)
@@ -14321,14 +14321,14 @@ function fE({ message: e, viewMode: t, isStreaming: n = !1 }) {
14321
14321
  "…"
14322
14322
  ] }) });
14323
14323
  if (c.type === "text") {
14324
- const f = (c.text ?? "").trim();
14325
- if (!f)
14324
+ const p = (c.text ?? "").trim();
14325
+ if (!p)
14326
14326
  return null;
14327
- const v = ro(f);
14327
+ const v = ro(p);
14328
14328
  return i(v);
14329
14329
  }
14330
- const d = no(c), p = ro(d);
14331
- return i(p);
14330
+ const d = no(c), f = ro(d);
14331
+ return i(f);
14332
14332
  };
14333
14333
  return /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
14334
14334
  s && /* @__PURE__ */ u.jsx(aE, { artifact: s, idx: 0 }),
@@ -14339,29 +14339,29 @@ function fE({ message: e, viewMode: t, isStreaming: n = !1 }) {
14339
14339
  function pE(e) {
14340
14340
  const { allowFileOpen: t, currentThreadId: n } = e, { toast: r } = Rl(), [o, s] = de({}), [a, i] = de(null), [l, c] = de(!1), d = he(() => {
14341
14341
  c(!1), i(null);
14342
- }, []), p = he((f) => {
14343
- i(f), c(!0);
14342
+ }, []), f = he((p) => {
14343
+ i(p), c(!0);
14344
14344
  }, []), m = he(
14345
- async (f, v, g) => {
14345
+ async (p, v, g) => {
14346
14346
  var x, b;
14347
14347
  if (!t) {
14348
- f.preventDefault();
14348
+ p.preventDefault();
14349
14349
  return;
14350
14350
  }
14351
14351
  if (o[g]) {
14352
- f.preventDefault();
14352
+ p.preventDefault();
14353
14353
  return;
14354
14354
  }
14355
14355
  try {
14356
14356
  const w = String(v.url ?? ""), y = w.match(/\/chat\/files\/([^/]+)(?:\/(view|download))?/);
14357
14357
  if (y) {
14358
- f.preventDefault();
14358
+ p.preventDefault();
14359
14359
  const C = y[1], S = v.name || `file_${C}`, T = v.mimeType || "application/octet-stream";
14360
- p({ id: C, name: S, mimeType: T });
14360
+ f({ id: C, name: S, mimeType: T });
14361
14361
  return;
14362
14362
  }
14363
14363
  if (w.startsWith("data:")) {
14364
- f.preventDefault(), s((S) => ({ ...S, [g]: !0 }));
14364
+ p.preventDefault(), s((S) => ({ ...S, [g]: !0 }));
14365
14365
  const C = r({ title: "Fetching file...", description: "", open: !0 });
14366
14366
  try {
14367
14367
  const S = await Xv(n ?? void 0);
@@ -14372,7 +14372,7 @@ function pE(e) {
14372
14372
  throw new Error(`File "${v.name}" is not yet available on the server`);
14373
14373
  if (!T.id || !T.filename)
14374
14374
  throw new Error("Invalid file data received from server");
14375
- p({
14375
+ f({
14376
14376
  id: T.id,
14377
14377
  name: v.name || T.filename || `file_${T.id}`,
14378
14378
  mimeType: v.mimeType || T.mime_type || "application/octet-stream"
@@ -14398,7 +14398,7 @@ function pE(e) {
14398
14398
  console.error("File click error:", w), s((y) => ({ ...y, [g]: !1 }));
14399
14399
  }
14400
14400
  },
14401
- [t, o, r, n, p]
14401
+ [t, o, r, n, f]
14402
14402
  );
14403
14403
  return {
14404
14404
  uploadingFiles: o,
@@ -14455,9 +14455,9 @@ const mE = {
14455
14455
  editingMessageId: l,
14456
14456
  onEdit: c,
14457
14457
  onRegenerate: d,
14458
- onCancelEdit: p,
14458
+ onCancelEdit: f,
14459
14459
  activeInterrupt: m,
14460
- disableInterruptActions: f,
14460
+ disableInterruptActions: p,
14461
14461
  onInterruptActionStart: v,
14462
14462
  onInterruptActionEnd: g,
14463
14463
  showToolMessages: x,
@@ -14491,9 +14491,9 @@ const mE = {
14491
14491
  layoutSize: a,
14492
14492
  onEdit: c,
14493
14493
  onRegenerate: () => d(n),
14494
- onCancelEdit: p,
14494
+ onCancelEdit: f,
14495
14495
  activeInterrupt: m,
14496
- disableInterruptActions: f,
14496
+ disableInterruptActions: p,
14497
14497
  onInterruptActionStart: v,
14498
14498
  onInterruptActionEnd: g,
14499
14499
  showToolMessages: x,
@@ -14508,19 +14508,19 @@ const mE = {
14508
14508
  });
14509
14509
  bh.displayName = "MessageRow";
14510
14510
  function gE(e, t, n) {
14511
- const [r, o] = de(e);
14511
+ const [r, o] = de(e), s = Le(e);
14512
14512
  return Ze(() => {
14513
14513
  if (!t) {
14514
- o(e);
14514
+ o(e), s.current = e;
14515
14515
  return;
14516
14516
  }
14517
- const s = e.map((a) => {
14518
- if (a.type !== "text")
14519
- return a;
14520
- const i = a.text ?? "", l = n(i);
14521
- return l === i ? a : { ...a, text: l };
14517
+ const a = e.map((i, l) => {
14518
+ if (i.type !== "text")
14519
+ return i;
14520
+ const c = i.text ?? "", d = n(c), f = s.current[l];
14521
+ return d !== c && f ? f : { ...i, text: d };
14522
14522
  });
14523
- o(s);
14523
+ s.current = a, o(a);
14524
14524
  }, [e, t, n]), r;
14525
14525
  }
14526
14526
  function xE({
@@ -14535,9 +14535,9 @@ function xE({
14535
14535
  fileParts: l,
14536
14536
  interruptParts: c,
14537
14537
  isStreamingMessage: d,
14538
- enableStreamingMarkdownBuffer: p,
14538
+ enableStreamingMarkdownBuffer: f,
14539
14539
  defaultMessage: m,
14540
- handleFileClick: f,
14540
+ handleFileClick: p,
14541
14541
  uploadingFiles: v,
14542
14542
  handleInterruptApprove: g,
14543
14543
  handleInterruptReject: x,
@@ -14555,7 +14555,7 @@ function xE({
14555
14555
  const $ = he(() => /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 p-2 bg-muted/30 rounded", children: [
14556
14556
  /* @__PURE__ */ u.jsx(cs, { className: "h-4 w-4 text-muted-foreground" }),
14557
14557
  /* @__PURE__ */ u.jsx("span", { className: "text-sm text-muted-foreground", children: "File upload" })
14558
- ] }), []), W = p ?? !0, H = he(
14558
+ ] }), []), W = f ?? !0, H = he(
14559
14559
  (D) => vE(D, d),
14560
14560
  [d]
14561
14561
  ), N = gE(
@@ -14595,7 +14595,7 @@ function xE({
14595
14595
  "a",
14596
14596
  {
14597
14597
  href: E.url,
14598
- onClick: (G) => f(G, E, j),
14598
+ onClick: (G) => p(G, E, j),
14599
14599
  className: `inline-flex items-center gap-2 rounded px-2 py-1 text-xs bg-gray-100 border hover:bg-gray-200
14600
14600
  dark:bg-background/10 dark:border-border/30 dark:hover:bg-background/20`,
14601
14601
  children: [
@@ -14631,7 +14631,7 @@ function xE({
14631
14631
  R,
14632
14632
  _,
14633
14633
  b,
14634
- f,
14634
+ p,
14635
14635
  g,
14636
14636
  x,
14637
14637
  k,
@@ -14712,9 +14712,9 @@ function TE({
14712
14712
  isCompactLayout: l,
14713
14713
  showActions: c,
14714
14714
  isEditing: d,
14715
- messageRole: p,
14715
+ messageRole: f,
14716
14716
  toolViewMode: m,
14717
- toolMeta: f,
14717
+ toolMeta: p,
14718
14718
  onToggleToolView: v,
14719
14719
  onCopy: g,
14720
14720
  onEdit: x,
@@ -14758,8 +14758,8 @@ function TE({
14758
14758
  (_.key === "Enter" || _.key === " ") && (_.preventDefault(), v());
14759
14759
  },
14760
14760
  children: [
14761
- /* @__PURE__ */ u.jsx("span", { children: f.name ?? "Tool Output" }),
14762
- f.toolCallId && /* @__PURE__ */ u.jsx("span", { className: "opacity-70", children: f.toolCallId.slice(0, 8) }),
14761
+ /* @__PURE__ */ u.jsx("span", { children: p.name ?? "Tool Output" }),
14762
+ p.toolCallId && /* @__PURE__ */ u.jsx("span", { className: "opacity-70", children: p.toolCallId.slice(0, 8) }),
14763
14763
  m === "expanded" ? /* @__PURE__ */ u.jsx(Ri, { className: "h-3 w-3" }) : /* @__PURE__ */ u.jsx(Ns, { className: "h-3 w-3" })
14764
14764
  ]
14765
14765
  }
@@ -14835,7 +14835,7 @@ function TE({
14835
14835
  children: /* @__PURE__ */ u.jsx(Pu, { className: ne(R ? "text-success" : r, l ? "h-3 w-3" : "h-4 w-4") })
14836
14836
  }
14837
14837
  ) }),
14838
- p === "user" && x && /* @__PURE__ */ u.jsx(
14838
+ f === "user" && x && /* @__PURE__ */ u.jsx(
14839
14839
  rt,
14840
14840
  {
14841
14841
  variant: "ghost",
@@ -14846,7 +14846,7 @@ function TE({
14846
14846
  children: /* @__PURE__ */ u.jsx(Mu, { className: ne(r, l ? "h-3 w-3" : "h-4 w-4") })
14847
14847
  }
14848
14848
  ),
14849
- p === "assistant" && b && /* @__PURE__ */ u.jsx(
14849
+ f === "assistant" && b && /* @__PURE__ */ u.jsx(
14850
14850
  rt,
14851
14851
  {
14852
14852
  variant: "ghost",
@@ -14876,9 +14876,9 @@ const Al = Pg(function({
14876
14876
  layoutSize: l = "desktop",
14877
14877
  truncateUserMessages: c = !0,
14878
14878
  userMessagePreviewLength: d = 500,
14879
- showToolMessages: p = !0,
14879
+ showToolMessages: f = !0,
14880
14880
  customStyles: m = {},
14881
- streamingDebounceMs: f = 300,
14881
+ streamingDebounceMs: p = 300,
14882
14882
  enableStreamingMarkdownBuffer: v,
14883
14883
  onEdit: g,
14884
14884
  onRegenerate: x,
@@ -14920,7 +14920,7 @@ const Al = Pg(function({
14920
14920
  toolMeta: we,
14921
14921
  toolRaw: Ne,
14922
14922
  isToolStreaming: _e
14923
- } = Q, Ee = v ?? f !== 0, at = (w == null ? void 0 : w.id) ?? (w == null ? void 0 : w.interrupt_id), yt = es(at), Nt = w == null ? void 0 : w.value, Ve = he(async () => {
14923
+ } = Q, Ee = v ?? p !== 0, at = (w == null ? void 0 : w.id) ?? (w == null ? void 0 : w.interrupt_id), yt = es(at), Nt = w == null ? void 0 : w.value, Ve = he(async () => {
14924
14924
  const Ce = F ? Ne : ge;
14925
14925
  async function Z(pe) {
14926
14926
  if (navigator.clipboard && typeof navigator.clipboard.writeText == "function") {
@@ -14952,7 +14952,7 @@ const Al = Pg(function({
14952
14952
  g(t.id, Ce, Z);
14953
14953
  }, [g, t.id, F, Ne, ge, t]), qe = he(() => {
14954
14954
  x == null || x(n);
14955
- }, [x, n]), Le = he(() => {
14955
+ }, [x, n]), $e = he(() => {
14956
14956
  H((Ce) => Ce === "expanded" ? "preview" : "expanded");
14957
14957
  }, []), Ue = he(() => {
14958
14958
  const Z = ne(j ? "h-3 w-3" : "h-4 w-4", "opacity-60 flex-shrink-0", Y);
@@ -15056,7 +15056,7 @@ const Al = Pg(function({
15056
15056
  {
15057
15057
  message: t,
15058
15058
  isToolMessage: F,
15059
- showToolMessages: p,
15059
+ showToolMessages: f,
15060
15060
  toolViewMode: W,
15061
15061
  isToolStreaming: _e,
15062
15062
  contentParts: J,
@@ -15087,7 +15087,7 @@ const Al = Pg(function({
15087
15087
  }, [zt, R]), Ke = he(() => {
15088
15088
  !xt || !R || R(xt.id, void 0, !!xt.isLatestAttempt);
15089
15089
  }, [xt, R]);
15090
- return F && !p ? null : A && G ? /* @__PURE__ */ u.jsx("div", { className: ne(pt(), m.container), children: /* @__PURE__ */ u.jsxs("div", { className: ne(Pt(), m.content), children: [
15090
+ return F && !f ? null : A && G ? /* @__PURE__ */ u.jsx("div", { className: ne(pt(), m.container), children: /* @__PURE__ */ u.jsxs("div", { className: ne(Pt(), m.content), children: [
15091
15091
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 mb-2 pb-2 border-b border-current/10", children: [
15092
15092
  /* @__PURE__ */ u.jsx(xa, { className: ne("h-4 w-4", Y) }),
15093
15093
  i && /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Assistant" })
@@ -15118,7 +15118,7 @@ const Al = Pg(function({
15118
15118
  messageRole: E,
15119
15119
  toolViewMode: W,
15120
15120
  toolMeta: we,
15121
- onToggleToolView: Le,
15121
+ onToggleToolView: $e,
15122
15122
  onCopy: Ve,
15123
15123
  onEdit: He,
15124
15124
  onRegenerate: qe,
@@ -15197,7 +15197,7 @@ const Al = Pg(function({
15197
15197
  )
15198
15198
  ] });
15199
15199
  }, (e, t) => {
15200
- var l, c, d, p, m, f, v, g;
15200
+ var l, c, d, f, m, p, v, g;
15201
15201
  if (t.isStreamingMessage || e.isStreamingMessage || !(e.message.id === t.message.id && xc(e.message) === xc(t.message))) return !1;
15202
15202
  const o = [
15203
15203
  "isEditing",
@@ -15208,7 +15208,7 @@ const Al = Pg(function({
15208
15208
  "truncateUserMessages",
15209
15209
  "userMessagePreviewLength",
15210
15210
  "showToolMessages"
15211
- ].every((x) => e[x] === t[x]), s = ((l = e.customStyles) == null ? void 0 : l.container) === ((c = t.customStyles) == null ? void 0 : c.container) && ((d = e.customStyles) == null ? void 0 : d.content) === ((p = t.customStyles) == null ? void 0 : p.content) && ((m = e.customStyles) == null ? void 0 : m.actions) === ((f = t.customStyles) == null ? void 0 : f.actions) && ((v = e.customStyles) == null ? void 0 : v.header) === ((g = t.customStyles) == null ? void 0 : g.header);
15211
+ ].every((x) => e[x] === t[x]), s = ((l = e.customStyles) == null ? void 0 : l.container) === ((c = t.customStyles) == null ? void 0 : c.container) && ((d = e.customStyles) == null ? void 0 : d.content) === ((f = t.customStyles) == null ? void 0 : f.content) && ((m = e.customStyles) == null ? void 0 : m.actions) === ((p = t.customStyles) == null ? void 0 : p.actions) && ((v = e.customStyles) == null ? void 0 : v.header) === ((g = t.customStyles) == null ? void 0 : g.header);
15212
15212
  if (!o || !s)
15213
15213
  return !1;
15214
15214
  const a = vc(e.message), i = vc(t.message);
@@ -15227,9 +15227,9 @@ const yh = M.forwardRef(({
15227
15227
  onEdit: l,
15228
15228
  onRegenerate: c,
15229
15229
  onCancelEdit: d,
15230
- className: p,
15230
+ className: f,
15231
15231
  style: m,
15232
- emptyMessage: f,
15232
+ emptyMessage: p,
15233
15233
  followNewMessages: v = !0,
15234
15234
  isNavigatingCheckpoint: g = !1,
15235
15235
  onScrollAway: x,
@@ -15245,7 +15245,7 @@ const yh = M.forwardRef(({
15245
15245
  createSyntheticThinkingMessage: O = !0,
15246
15246
  forceSyntheticThinking: $ = !1
15247
15247
  }, W) => {
15248
- const H = Fe(null), N = Fe(null), K = Fe(!1), V = Fe(!1), [D, j] = de(!0), E = Qe(() => w ? e.some((B) => B.role === "default_message" ? !1 : Array.isArray(B == null ? void 0 : B.content) && B.content.some(
15248
+ const H = Le(null), N = Le(null), K = Le(!1), V = Le(!1), [D, j] = de(!0), E = Qe(() => w ? e.some((B) => B.role === "default_message" ? !1 : Array.isArray(B == null ? void 0 : B.content) && B.content.some(
15249
15249
  (ae) => ae && ae.type === "interrupt" && (ae.id ?? ae.interrupt_id) === w.id
15250
15250
  )) : !1, [w, e]), F = Qe(() => {
15251
15251
  if (!w || E)
@@ -15297,15 +15297,15 @@ const yh = M.forwardRef(({
15297
15297
  }
15298
15298
  };
15299
15299
  }, [i]), oe = Qe(() => !v || g ? !1 : D ? "auto" : !1, [D, v, g]), U = Qe(() => {
15300
- if (typeof f != "string") return null;
15301
- const B = f.trim();
15300
+ if (typeof p != "string") return null;
15301
+ const B = p.trim();
15302
15302
  return !B || P && P.length > 0 ? null : {
15303
15303
  id: "default-message",
15304
15304
  role: "default_message",
15305
15305
  content: B,
15306
15306
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
15307
15307
  };
15308
- }, [f, P]), L = ["flex h-full flex-col md:flex-row", p].filter(Boolean).join(" "), Y = () => U ? /* @__PURE__ */ u.jsx("div", { className: "p-6 h-full overflow-y-auto", children: /* @__PURE__ */ u.jsx("div", { className: "w-full max-w-full", children: /* @__PURE__ */ u.jsx(
15308
+ }, [p, P]), L = ["flex h-full flex-col md:flex-row", f].filter(Boolean).join(" "), Y = () => U ? /* @__PURE__ */ u.jsx("div", { className: "p-6 h-full overflow-y-auto", children: /* @__PURE__ */ u.jsx("div", { className: "w-full max-w-full", children: /* @__PURE__ */ u.jsx(
15309
15309
  Al,
15310
15310
  {
15311
15311
  message: U,
@@ -15322,7 +15322,7 @@ const yh = M.forwardRef(({
15322
15322
  onCancelEdit: () => {
15323
15323
  }
15324
15324
  }
15325
- ) }) }) : /* @__PURE__ */ u.jsx("div", { className: "flex h-full items-center justify-center py-8 text-center text-muted-foreground", children: f ?? "No messages yet. Start a conversation!" }), Q = P.length, J = Q > 0;
15325
+ ) }) }) : /* @__PURE__ */ u.jsx("div", { className: "flex h-full items-center justify-center py-8 text-center text-muted-foreground", children: p ?? "No messages yet. Start a conversation!" }), Q = P.length, J = Q > 0;
15326
15326
  return Ze(() => {
15327
15327
  var B, ae;
15328
15328
  if (Q === 0) {
@@ -15422,9 +15422,9 @@ function to({
15422
15422
  enableExcelUpload: l = !1,
15423
15423
  enableMessageEditing: c = !0,
15424
15424
  showToolMessages: d = !0,
15425
- payloadExtras: p = {},
15425
+ payloadExtras: f = {},
15426
15426
  customStyles: m = {},
15427
- onMessageSent: f,
15427
+ onMessageSent: p,
15428
15428
  onExcelUploadSuccess: v,
15429
15429
  onError: g
15430
15430
  }) {
@@ -15448,16 +15448,16 @@ function to({
15448
15448
  q(!0);
15449
15449
  }, []), L = he(() => {
15450
15450
  q(!1);
15451
- }, []), Y = !!A || P, [Q, J] = de(null), [B, ae] = de(""), [se, ge] = de(null), [we, Ne] = de(null), [_e, Ee] = de([]), [at, yt] = de(0), [Nt, Ve] = de(0), [He, qe] = de(!1), [Le, Ue] = de(null), [pt, Pt] = de(null), [it, Mt] = de(!1), [Tt, gt] = de(null), At = Fe(!1), [Ct, Et] = de(() => bu.value), zt = Fe(Ct), xt = Fe(null), Me = he((ie) => {
15451
+ }, []), Y = !!A || P, [Q, J] = de(null), [B, ae] = de(""), [se, ge] = de(null), [we, Ne] = de(null), [_e, Ee] = de([]), [at, yt] = de(0), [Nt, Ve] = de(0), [He, qe] = de(!1), [$e, Ue] = de(null), [pt, Pt] = de(null), [it, Mt] = de(!1), [Tt, gt] = de(null), At = Le(!1), [Ct, Et] = de(() => bu.value), zt = Le(Ct), xt = Le(null), Me = he((ie) => {
15452
15452
  bu.value = ie, Et(ie);
15453
- }, []), [Ke, Ce] = de(!1), Z = Fe(null), pe = Fe(null), et = Fe(null), xe = he(() => {
15453
+ }, []), [Ke, Ce] = de(!1), Z = Le(null), pe = Le(null), et = Le(null), xe = he(() => {
15454
15454
  pe.current && (pe.current.value = ""), et.current && (et.current.value = ""), yt((ie) => ie + 1), Ve((ie) => ie + 1);
15455
- }, []), $e = he(
15455
+ }, []), Fe = he(
15456
15456
  (ie) => {
15457
15457
  Me(ie);
15458
15458
  },
15459
15459
  [Me]
15460
- ), Ge = Fe(!1);
15460
+ ), Ge = Le(!1);
15461
15461
  Ze(() => {
15462
15462
  Ge.current && !H && (Ee([]), xe()), Ge.current = H;
15463
15463
  }, [H, xe]), Ze(() => {
@@ -15507,7 +15507,7 @@ function to({
15507
15507
  {
15508
15508
  text: ce || "",
15509
15509
  attachments: _e,
15510
- payload: p
15510
+ payload: f
15511
15511
  },
15512
15512
  {
15513
15513
  checkpointId: Te,
@@ -15515,7 +15515,7 @@ function to({
15515
15515
  edit: !!Q,
15516
15516
  originalMessageId: Q ?? void 0
15517
15517
  }
15518
- ), f == null || f(ce), oe(!0), Me(""), Ne(null), Ee([]), xe(), J(null), ae(""), ge(null);
15518
+ ), p == null || p(ce), oe(!0), Me(""), Ne(null), Ee([]), xe(), J(null), ae(""), ge(null);
15519
15519
  } catch (Te) {
15520
15520
  const De = (Te == null ? void 0 : Te.message) || "Failed to send message";
15521
15521
  Ne(De), g == null || g(De), oe(!1);
@@ -15551,7 +15551,7 @@ function to({
15551
15551
  }
15552
15552
  })();
15553
15553
  lt && V(
15554
- { text: lt, payload: p },
15554
+ { text: lt, payload: f },
15555
15555
  {
15556
15556
  checkpointId: E ?? void 0,
15557
15557
  checkpointNs: F ?? void 0,
@@ -15559,7 +15559,7 @@ function to({
15559
15559
  originalMessageId: ce.id
15560
15560
  }
15561
15561
  );
15562
- }, [y, V, E, F, p]), dt = (ie) => {
15562
+ }, [y, V, E, F, f]), dt = (ie) => {
15563
15563
  const ce = Array.from(ie.target.files || []);
15564
15564
  Ee((Te) => [...Te, ...ce]), ie.target.value = "";
15565
15565
  }, nn = (ie) => {
@@ -15573,7 +15573,7 @@ function to({
15573
15573
  Ue(null), Pt(null), qe(!0);
15574
15574
  try {
15575
15575
  await V(
15576
- { attachments: [ce], payload: p },
15576
+ { attachments: [ce], payload: f },
15577
15577
  {
15578
15578
  checkpointId: E ?? void 0,
15579
15579
  checkpointNs: F ?? void 0
@@ -15745,7 +15745,7 @@ function to({
15745
15745
  " Uploading Excel file..."
15746
15746
  ] }),
15747
15747
  pt && !He && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: pt }),
15748
- Le && !He && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: Le })
15748
+ $e && !He && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-red-200 bg-red-50 px-3 py-2 text-red-600", children: $e })
15749
15749
  ] })
15750
15750
  ] }),
15751
15751
  we && /* @__PURE__ */ u.jsx("div", { className: "mb-3 text-sm text-red-600 bg-red-50 border border-red-200 rounded px-3 py-2", children: we }),
@@ -15793,7 +15793,7 @@ function to({
15793
15793
  initialValue: B,
15794
15794
  editingMessageId: Q,
15795
15795
  value: Ct,
15796
- onValueChange: $e,
15796
+ onValueChange: Fe,
15797
15797
  placeholder: Q ? "Edit your message..." : t,
15798
15798
  isStreaming: H,
15799
15799
  disabled: Y,
@@ -15813,7 +15813,7 @@ function di(e, t, n, r, o, s, a) {
15813
15813
  if (s === t.length) return o === e.length ? yu : IE;
15814
15814
  var i = `${o},${s}`;
15815
15815
  if (a[i] !== void 0) return a[i];
15816
- for (var l = r.charAt(s), c = n.indexOf(l, o), d = 0, p, m, f, v; c >= 0; ) p = di(e, t, n, r, c + 1, s + 1, a), p > d && (c === o ? p *= yu : NE.test(e.charAt(c - 1)) ? (p *= EE, f = e.slice(o, c - 1).match(AE), f && o > 0 && (p *= Math.pow(za, f.length))) : jE.test(e.charAt(c - 1)) ? (p *= CE, v = e.slice(o, c - 1).match(Sh), v && o > 0 && (p *= Math.pow(za, v.length))) : (p *= kE, o > 0 && (p *= Math.pow(za, c - o))), e.charAt(c) !== t.charAt(s) && (p *= RE)), (p < Ba && n.charAt(c - 1) === r.charAt(s + 1) || r.charAt(s + 1) === r.charAt(s) && n.charAt(c - 1) !== r.charAt(s)) && (m = di(e, t, n, r, c + 1, s + 2, a), m * Ba > p && (p = m * Ba)), p > d && (d = p), c = n.indexOf(l, c + 1);
15816
+ for (var l = r.charAt(s), c = n.indexOf(l, o), d = 0, f, m, p, v; c >= 0; ) f = di(e, t, n, r, c + 1, s + 1, a), f > d && (c === o ? f *= yu : NE.test(e.charAt(c - 1)) ? (f *= EE, p = e.slice(o, c - 1).match(AE), p && o > 0 && (f *= Math.pow(za, p.length))) : jE.test(e.charAt(c - 1)) ? (f *= CE, v = e.slice(o, c - 1).match(Sh), v && o > 0 && (f *= Math.pow(za, v.length))) : (f *= kE, o > 0 && (f *= Math.pow(za, c - o))), e.charAt(c) !== t.charAt(s) && (f *= RE)), (f < Ba && n.charAt(c - 1) === r.charAt(s + 1) || r.charAt(s + 1) === r.charAt(s) && n.charAt(c - 1) !== r.charAt(s)) && (m = di(e, t, n, r, c + 1, s + 2, a), m * Ba > f && (f = m * Ba)), f > d && (d = f), c = n.indexOf(l, c + 1);
15817
15817
  return a[i] = d, d;
15818
15818
  }
15819
15819
  function Su(e) {
@@ -15826,7 +15826,7 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', PE = '[cmdk-group-head
15826
15826
  let n = Sr(() => {
15827
15827
  var A, P;
15828
15828
  return { search: "", value: (P = (A = e.value) != null ? A : e.defaultValue) != null ? P : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
15829
- }), r = Sr(() => /* @__PURE__ */ new Set()), o = Sr(() => /* @__PURE__ */ new Map()), s = Sr(() => /* @__PURE__ */ new Map()), a = Sr(() => /* @__PURE__ */ new Set()), i = Ih(e), { label: l, children: c, value: d, onValueChange: p, filter: m, shouldFilter: f, loop: v, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, w = Bt(), y = Bt(), C = Bt(), S = h.useRef(null), T = VE();
15829
+ }), r = Sr(() => /* @__PURE__ */ new Set()), o = Sr(() => /* @__PURE__ */ new Map()), s = Sr(() => /* @__PURE__ */ new Map()), a = Sr(() => /* @__PURE__ */ new Set()), i = Ih(e), { label: l, children: c, value: d, onValueChange: f, filter: m, shouldFilter: p, loop: v, disablePointerSelection: g = !1, vimBindings: x = !0, ...b } = e, w = Bt(), y = Bt(), C = Bt(), S = h.useRef(null), T = VE();
15830
15830
  cr(() => {
15831
15831
  if (d !== void 0) {
15832
15832
  let A = d.trim();
@@ -16003,26 +16003,26 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', PE = '[cmdk-group-head
16003
16003
  cr(() => {
16004
16004
  if (!c) return i.item(o, a == null ? void 0 : a.id);
16005
16005
  }, [c]);
16006
- let d = Nh(o, s, [e.value, e.children, s], e.keywords), p = jl(), m = zn((T) => T.value && T.value === d.current), f = zn((T) => c || i.filter() === !1 ? !0 : T.search ? T.filtered.items.get(o) > 0 : !0);
16006
+ let d = Nh(o, s, [e.value, e.children, s], e.keywords), f = jl(), m = zn((T) => T.value && T.value === d.current), p = zn((T) => c || i.filter() === !1 ? !0 : T.search ? T.filtered.items.get(o) > 0 : !0);
16007
16007
  h.useEffect(() => {
16008
16008
  let T = s.current;
16009
16009
  if (!(!T || e.disabled)) return T.addEventListener(fi, v), () => T.removeEventListener(fi, v);
16010
- }, [f, e.onSelect, e.disabled]);
16010
+ }, [p, e.onSelect, e.disabled]);
16011
16011
  function v() {
16012
16012
  var T, k;
16013
16013
  g(), (k = (T = l.current).onSelect) == null || k.call(T, d.current);
16014
16014
  }
16015
16015
  function g() {
16016
- p.setState("value", d.current, !0);
16016
+ f.setState("value", d.current, !0);
16017
16017
  }
16018
- if (!f) return null;
16018
+ if (!p) return null;
16019
16019
  let { disabled: x, value: b, onSelect: w, forceMount: y, keywords: C, ...S } = e;
16020
16020
  return h.createElement(ve.div, { ref: Mn(s, t), ...S, id: o, "cmdk-item": "", role: "option", "aria-disabled": !!x, "aria-selected": !!m, "data-disabled": !!x, "data-selected": !!m, onPointerMove: x || i.getDisablePointerSelection() ? void 0 : g, onClick: x ? void 0 : v }, e.children);
16021
16021
  }), DE = h.forwardRef((e, t) => {
16022
- let { heading: n, children: r, forceMount: o, ...s } = e, a = Bt(), i = h.useRef(null), l = h.useRef(null), c = Bt(), d = Oo(), p = zn((f) => o || d.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(a) : !0);
16022
+ let { heading: n, children: r, forceMount: o, ...s } = e, a = Bt(), i = h.useRef(null), l = h.useRef(null), c = Bt(), d = Oo(), f = zn((p) => o || d.filter() === !1 ? !0 : p.search ? p.filtered.groups.has(a) : !0);
16023
16023
  cr(() => d.group(a), []), Nh(a, i, [e.value, e.heading, l]);
16024
16024
  let m = h.useMemo(() => ({ id: a, forceMount: o }), [o]);
16025
- return h.createElement(ve.div, { ref: Mn(i, t), ...s, "cmdk-group": "", role: "presentation", hidden: p ? void 0 : !0 }, n && h.createElement("div", { ref: l, "cmdk-group-heading": "", "aria-hidden": !0, id: c }, n), ra(e, (f) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, h.createElement(kh.Provider, { value: m }, f))));
16025
+ return h.createElement(ve.div, { ref: Mn(i, t), ...s, "cmdk-group": "", role: "presentation", hidden: f ? void 0 : !0 }, n && h.createElement("div", { ref: l, "cmdk-group-heading": "", "aria-hidden": !0, id: c }, n), ra(e, (p) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, h.createElement(kh.Provider, { value: m }, p))));
16026
16026
  }), LE = h.forwardRef((e, t) => {
16027
16027
  let { alwaysRender: n, ...r } = e, o = h.useRef(null), s = zn((a) => !a.search);
16028
16028
  return !n && !s ? null : h.createElement(ve.div, { ref: Mn(o, t), ...r, "cmdk-separator": "", role: "separator" });
@@ -16037,14 +16037,14 @@ var Gr = '[cmdk-group=""]', Ha = '[cmdk-group-items=""]', PE = '[cmdk-group-head
16037
16037
  let { children: n, label: r = "Suggestions", ...o } = e, s = h.useRef(null), a = h.useRef(null), i = zn((c) => c.selectedItemId), l = Oo();
16038
16038
  return h.useEffect(() => {
16039
16039
  if (a.current && s.current) {
16040
- let c = a.current, d = s.current, p, m = new ResizeObserver(() => {
16041
- p = requestAnimationFrame(() => {
16042
- let f = c.offsetHeight;
16043
- d.style.setProperty("--cmdk-list-height", f.toFixed(1) + "px");
16040
+ let c = a.current, d = s.current, f, m = new ResizeObserver(() => {
16041
+ f = requestAnimationFrame(() => {
16042
+ let p = c.offsetHeight;
16043
+ d.style.setProperty("--cmdk-list-height", p.toFixed(1) + "px");
16044
16044
  });
16045
16045
  });
16046
16046
  return m.observe(c), () => {
16047
- cancelAnimationFrame(p), m.unobserve(c);
16047
+ cancelAnimationFrame(f), m.unobserve(c);
16048
16048
  };
16049
16049
  }
16050
16050
  }, []), h.createElement(ve.div, { ref: Mn(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": r, id: l.listId }, ra(e, (c) => h.createElement("div", { ref: Mn(a, l.listInnerRef), "cmdk-list-sizer": "" }, c)));
@@ -16206,7 +16206,7 @@ var _l = "ScrollArea", [Dh, yN] = xn(_l), [XE, cn] = Dh(_l), Lh = h.forwardRef(
16206
16206
  dir: o,
16207
16207
  scrollHideDelay: s = 600,
16208
16208
  ...a
16209
- } = e, [i, l] = h.useState(null), [c, d] = h.useState(null), [p, m] = h.useState(null), [f, v] = h.useState(null), [g, x] = h.useState(null), [b, w] = h.useState(0), [y, C] = h.useState(0), [S, T] = h.useState(!1), [k, R] = h.useState(!1), _ = ze(t, ($) => l($)), O = $s(o);
16209
+ } = e, [i, l] = h.useState(null), [c, d] = h.useState(null), [f, m] = h.useState(null), [p, v] = h.useState(null), [g, x] = h.useState(null), [b, w] = h.useState(0), [y, C] = h.useState(0), [S, T] = h.useState(!1), [k, R] = h.useState(!1), _ = ze(t, ($) => l($)), O = $s(o);
16210
16210
  return /* @__PURE__ */ u.jsx(
16211
16211
  XE,
16212
16212
  {
@@ -16217,9 +16217,9 @@ var _l = "ScrollArea", [Dh, yN] = xn(_l), [XE, cn] = Dh(_l), Lh = h.forwardRef(
16217
16217
  scrollArea: i,
16218
16218
  viewport: c,
16219
16219
  onViewportChange: d,
16220
- content: p,
16220
+ content: f,
16221
16221
  onContentChange: m,
16222
- scrollbarX: f,
16222
+ scrollbarX: p,
16223
16223
  onScrollbarXChange: v,
16224
16224
  scrollbarXEnabled: S,
16225
16225
  onScrollbarXEnabledChange: T,
@@ -16350,10 +16350,10 @@ var JE = h.forwardRef((e, t) => {
16350
16350
  }, [i, o.scrollHideDelay, l]), h.useEffect(() => {
16351
16351
  const c = o.viewport, d = s ? "scrollLeft" : "scrollTop";
16352
16352
  if (c) {
16353
- let p = c[d];
16353
+ let f = c[d];
16354
16354
  const m = () => {
16355
- const f = c[d];
16356
- p !== f && (l("SCROLL"), a()), p = f;
16355
+ const p = c[d];
16356
+ f !== p && (l("SCROLL"), a()), f = p;
16357
16357
  };
16358
16358
  return c.addEventListener("scroll", m), () => c.removeEventListener("scroll", m);
16359
16359
  }
@@ -16396,8 +16396,8 @@ var JE = h.forwardRef((e, t) => {
16396
16396
  onThumbPointerUp: () => a.current = 0,
16397
16397
  onThumbPointerDown: (m) => a.current = m
16398
16398
  };
16399
- function p(m, f) {
16400
- return ok(m, a.current, i, f);
16399
+ function f(m, p) {
16400
+ return ok(m, a.current, i, p);
16401
16401
  }
16402
16402
  return n === "horizontal" ? /* @__PURE__ */ u.jsx(
16403
16403
  QE,
@@ -16406,15 +16406,15 @@ var JE = h.forwardRef((e, t) => {
16406
16406
  ref: t,
16407
16407
  onThumbPositionChange: () => {
16408
16408
  if (o.viewport && s.current) {
16409
- const m = o.viewport.scrollLeft, f = Cu(m, i, o.dir);
16410
- s.current.style.transform = `translate3d(${f}px, 0, 0)`;
16409
+ const m = o.viewport.scrollLeft, p = Cu(m, i, o.dir);
16410
+ s.current.style.transform = `translate3d(${p}px, 0, 0)`;
16411
16411
  }
16412
16412
  },
16413
16413
  onWheelScroll: (m) => {
16414
16414
  o.viewport && (o.viewport.scrollLeft = m);
16415
16415
  },
16416
16416
  onDragScroll: (m) => {
16417
- o.viewport && (o.viewport.scrollLeft = p(m, o.dir));
16417
+ o.viewport && (o.viewport.scrollLeft = f(m, o.dir));
16418
16418
  }
16419
16419
  }
16420
16420
  ) : n === "vertical" ? /* @__PURE__ */ u.jsx(
@@ -16424,15 +16424,15 @@ var JE = h.forwardRef((e, t) => {
16424
16424
  ref: t,
16425
16425
  onThumbPositionChange: () => {
16426
16426
  if (o.viewport && s.current) {
16427
- const m = o.viewport.scrollTop, f = Cu(m, i);
16428
- s.current.style.transform = `translate3d(0, ${f}px, 0)`;
16427
+ const m = o.viewport.scrollTop, p = Cu(m, i);
16428
+ s.current.style.transform = `translate3d(0, ${p}px, 0)`;
16429
16429
  }
16430
16430
  },
16431
16431
  onWheelScroll: (m) => {
16432
16432
  o.viewport && (o.viewport.scrollTop = m);
16433
16433
  },
16434
16434
  onDragScroll: (m) => {
16435
- o.viewport && (o.viewport.scrollTop = p(m));
16435
+ o.viewport && (o.viewport.scrollTop = f(m));
16436
16436
  }
16437
16437
  }
16438
16438
  ) : null;
@@ -16456,10 +16456,10 @@ var JE = h.forwardRef((e, t) => {
16456
16456
  },
16457
16457
  onThumbPointerDown: (d) => e.onThumbPointerDown(d.x),
16458
16458
  onDragScroll: (d) => e.onDragScroll(d.x),
16459
- onWheelScroll: (d, p) => {
16459
+ onWheelScroll: (d, f) => {
16460
16460
  if (s.viewport) {
16461
16461
  const m = s.viewport.scrollLeft + d.deltaX;
16462
- e.onWheelScroll(m), qh(m, p) && d.preventDefault();
16462
+ e.onWheelScroll(m), qh(m, f) && d.preventDefault();
16463
16463
  }
16464
16464
  },
16465
16465
  onResize: () => {
@@ -16496,10 +16496,10 @@ var JE = h.forwardRef((e, t) => {
16496
16496
  },
16497
16497
  onThumbPointerDown: (d) => e.onThumbPointerDown(d.y),
16498
16498
  onDragScroll: (d) => e.onDragScroll(d.y),
16499
- onWheelScroll: (d, p) => {
16499
+ onWheelScroll: (d, f) => {
16500
16500
  if (s.viewport) {
16501
16501
  const m = s.viewport.scrollTop + d.deltaY;
16502
- e.onWheelScroll(m), qh(m, p) && d.preventDefault();
16502
+ e.onWheelScroll(m), qh(m, f) && d.preventDefault();
16503
16503
  }
16504
16504
  },
16505
16505
  onResize: () => {
@@ -16526,9 +16526,9 @@ var JE = h.forwardRef((e, t) => {
16526
16526
  onThumbPositionChange: l,
16527
16527
  onDragScroll: c,
16528
16528
  onWheelScroll: d,
16529
- onResize: p,
16529
+ onResize: f,
16530
16530
  ...m
16531
- } = e, f = cn(In, n), [v, g] = h.useState(null), x = ze(t, (_) => g(_)), b = h.useRef(null), w = h.useRef(""), y = f.viewport, C = r.content - r.viewport, S = wt(d), T = wt(l), k = sa(p, 10);
16531
+ } = e, p = cn(In, n), [v, g] = h.useState(null), x = ze(t, (_) => g(_)), b = h.useRef(null), w = h.useRef(""), y = p.viewport, C = r.content - r.viewport, S = wt(d), T = wt(l), k = sa(f, 10);
16532
16532
  function R(_) {
16533
16533
  if (b.current) {
16534
16534
  const O = _.clientX - b.current.left, $ = _.clientY - b.current.top;
@@ -16541,7 +16541,7 @@ var JE = h.forwardRef((e, t) => {
16541
16541
  (v == null ? void 0 : v.contains($)) && S(O, C);
16542
16542
  };
16543
16543
  return document.addEventListener("wheel", _, { passive: !1 }), () => document.removeEventListener("wheel", _, { passive: !1 });
16544
- }, [y, v, C, S]), h.useEffect(T, [r, T]), jr(v, k), jr(f.content, k), /* @__PURE__ */ u.jsx(
16544
+ }, [y, v, C, S]), h.useEffect(T, [r, T]), jr(v, k), jr(p.content, k), /* @__PURE__ */ u.jsx(
16545
16545
  tk,
16546
16546
  {
16547
16547
  scope: n,
@@ -16558,12 +16558,12 @@ var JE = h.forwardRef((e, t) => {
16558
16558
  ref: x,
16559
16559
  style: { position: "absolute", ...m.style },
16560
16560
  onPointerDown: le(e.onPointerDown, (_) => {
16561
- _.button === 0 && (_.target.setPointerCapture(_.pointerId), b.current = v.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", f.viewport && (f.viewport.style.scrollBehavior = "auto"), R(_));
16561
+ _.button === 0 && (_.target.setPointerCapture(_.pointerId), b.current = v.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", p.viewport && (p.viewport.style.scrollBehavior = "auto"), R(_));
16562
16562
  }),
16563
16563
  onPointerMove: le(e.onPointerMove, R),
16564
16564
  onPointerUp: le(e.onPointerUp, (_) => {
16565
16565
  const O = _.target;
16566
- O.hasPointerCapture(_.pointerId) && O.releasePointerCapture(_.pointerId), document.body.style.webkitUserSelect = w.current, f.viewport && (f.viewport.style.scrollBehavior = ""), b.current = null;
16566
+ O.hasPointerCapture(_.pointerId) && O.releasePointerCapture(_.pointerId), document.body.style.webkitUserSelect = w.current, p.viewport && (p.viewport.style.scrollBehavior = ""), b.current = null;
16567
16567
  })
16568
16568
  }
16569
16569
  )
@@ -16578,20 +16578,20 @@ var JE = h.forwardRef((e, t) => {
16578
16578
  (e, t) => {
16579
16579
  const { __scopeScrollArea: n, style: r, ...o } = e, s = cn(Es, n), a = zh(Es, n), { onThumbPositionChange: i } = a, l = ze(
16580
16580
  t,
16581
- (p) => a.onThumbChange(p)
16581
+ (f) => a.onThumbChange(f)
16582
16582
  ), c = h.useRef(void 0), d = sa(() => {
16583
16583
  c.current && (c.current(), c.current = void 0);
16584
16584
  }, 100);
16585
16585
  return h.useEffect(() => {
16586
- const p = s.viewport;
16587
- if (p) {
16586
+ const f = s.viewport;
16587
+ if (f) {
16588
16588
  const m = () => {
16589
16589
  if (d(), !c.current) {
16590
- const f = sk(p, i);
16591
- c.current = f, i();
16590
+ const p = sk(f, i);
16591
+ c.current = p, i();
16592
16592
  }
16593
16593
  };
16594
- return i(), p.addEventListener("scroll", m), () => p.removeEventListener("scroll", m);
16594
+ return i(), f.addEventListener("scroll", m), () => f.removeEventListener("scroll", m);
16595
16595
  }
16596
16596
  }, [s.viewport, d, i]), /* @__PURE__ */ u.jsx(
16597
16597
  ve.div,
@@ -16604,8 +16604,8 @@ var JE = h.forwardRef((e, t) => {
16604
16604
  height: "var(--radix-scroll-area-thumb-height)",
16605
16605
  ...r
16606
16606
  },
16607
- onPointerDownCapture: le(e.onPointerDownCapture, (p) => {
16608
- const f = p.target.getBoundingClientRect(), v = p.clientX - f.left, g = p.clientY - f.top;
16607
+ onPointerDownCapture: le(e.onPointerDownCapture, (f) => {
16608
+ const p = f.target.getBoundingClientRect(), v = f.clientX - p.left, g = f.clientY - p.top;
16609
16609
  a.onThumbPointerDown({ x: v, y: g });
16610
16610
  }),
16611
16611
  onPointerUp: le(e.onPointerUp, a.onThumbPointerUp)
@@ -16624,12 +16624,12 @@ Wh.displayName = Ol;
16624
16624
  var rk = h.forwardRef((e, t) => {
16625
16625
  const { __scopeScrollArea: n, ...r } = e, o = cn(Ol, n), [s, a] = h.useState(0), [i, l] = h.useState(0), c = !!(s && i);
16626
16626
  return jr(o.scrollbarX, () => {
16627
- var p;
16628
- const d = ((p = o.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
16627
+ var f;
16628
+ const d = ((f = o.scrollbarX) == null ? void 0 : f.offsetHeight) || 0;
16629
16629
  o.onCornerHeightChange(d), l(d);
16630
16630
  }), jr(o.scrollbarY, () => {
16631
- var p;
16632
- const d = ((p = o.scrollbarY) == null ? void 0 : p.offsetWidth) || 0;
16631
+ var f;
16632
+ const d = ((f = o.scrollbarY) == null ? void 0 : f.offsetWidth) || 0;
16633
16633
  o.onCornerWidthChange(d), a(d);
16634
16634
  }), c ? /* @__PURE__ */ u.jsx(
16635
16635
  ve.div,
@@ -16660,8 +16660,8 @@ function oa(e) {
16660
16660
  return Math.max(r, 18);
16661
16661
  }
16662
16662
  function ok(e, t, n, r = "ltr") {
16663
- const o = oa(n), s = o / 2, a = t || s, i = o - a, l = n.scrollbar.paddingStart + a, c = n.scrollbar.size - n.scrollbar.paddingEnd - i, d = n.content - n.viewport, p = r === "ltr" ? [0, d] : [d * -1, 0];
16664
- return Kh([l, c], p)(e);
16663
+ const o = oa(n), s = o / 2, a = t || s, i = o - a, l = n.scrollbar.paddingStart + a, c = n.scrollbar.size - n.scrollbar.paddingEnd - i, d = n.content - n.viewport, f = r === "ltr" ? [0, d] : [d * -1, 0];
16664
+ return Kh([l, c], f)(e);
16665
16665
  }
16666
16666
  function Cu(e, t, n = "ltr") {
16667
16667
  const r = oa(t), o = t.scrollbar.paddingStart + t.scrollbar.paddingEnd, s = t.scrollbar.size - o, a = t.content - t.viewport, i = s - r, l = n === "ltr" ? [0, a] : [a * -1, 0], c = pi(e, l);
@@ -16764,9 +16764,9 @@ function dk({
16764
16764
  onCancelEditing: l,
16765
16765
  onShare: c,
16766
16766
  onDelete: d,
16767
- showEditTitle: p,
16767
+ showEditTitle: f,
16768
16768
  showDeleteButton: m,
16769
- formatDate: f,
16769
+ formatDate: p,
16770
16770
  getDisplayThreadTitle: v,
16771
16771
  secondaryLine: g,
16772
16772
  itemClassName: x,
@@ -16810,7 +16810,7 @@ function dk({
16810
16810
  /* @__PURE__ */ u.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: v(e) }),
16811
16811
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
16812
16812
  /* @__PURE__ */ u.jsx(Xg, { size: 10 }),
16813
- /* @__PURE__ */ u.jsx("span", { children: f(e.updatedAt || e.createdAt) })
16813
+ /* @__PURE__ */ u.jsx("span", { children: p(e.updatedAt || e.createdAt) })
16814
16814
  ] }),
16815
16815
  g && /* @__PURE__ */ u.jsx("div", { className: "text-[11px] text-muted-foreground mt-1", children: g })
16816
16816
  ] }) }),
@@ -16829,7 +16829,7 @@ function dk({
16829
16829
  ]
16830
16830
  }
16831
16831
  ),
16832
- p && n !== e.threadId && /* @__PURE__ */ u.jsxs(
16832
+ f && n !== e.threadId && /* @__PURE__ */ u.jsxs(
16833
16833
  nr,
16834
16834
  {
16835
16835
  onClick: (S) => {
@@ -16905,9 +16905,9 @@ function hi({
16905
16905
  onThreadSelect: l,
16906
16906
  onThreadCreate: c,
16907
16907
  onThreadDelete: d,
16908
- view: p,
16908
+ view: f,
16909
16909
  defaultView: m,
16910
- onViewChange: f,
16910
+ onViewChange: p,
16911
16911
  viewOptions: v,
16912
16912
  viewState: g,
16913
16913
  showHeader: x = !0,
@@ -16926,11 +16926,11 @@ function hi({
16926
16926
  shareInFlight: $,
16927
16927
  shareStatus: W,
16928
16928
  clearShareStatus: H
16929
- } = To(), { createThread: N, deleteThread: K, renameThread: V, shareThread: D } = O, { loadThread: j } = Ds(), E = a ?? T, [F, G] = de(Array.isArray(C) ? C : []), A = Fe(F.length > 0), P = Fe(null), q = Fe(0), [X, oe] = de(null), [U, L] = de(""), [Y, Q] = de(!1), [J, B] = de(!1), [ae, se] = de(null), [ge, we] = de(""), Ne = v && v.length > 0 ? v : mk, _e = hk({ defaultView: m }), Ee = g ?? _e, at = p ?? Ee.view, yt = he(
16929
+ } = To(), { createThread: N, deleteThread: K, renameThread: V, shareThread: D } = O, { loadThread: j } = Ds(), E = a ?? T, [F, G] = de(Array.isArray(C) ? C : []), A = Le(F.length > 0), P = Le(null), q = Le(0), [X, oe] = de(null), [U, L] = de(""), [Y, Q] = de(!1), [J, B] = de(!1), [ae, se] = de(null), [ge, we] = de(""), Ne = v && v.length > 0 ? v : mk, _e = hk({ defaultView: m }), Ee = g ?? _e, at = f ?? Ee.view, yt = he(
16930
16930
  (Z) => {
16931
- p || Ee.setView(Z), f == null || f(Z);
16931
+ f || Ee.setView(Z), p == null || p(Z);
16932
16932
  },
16933
- [p, f, Ee]
16933
+ [f, p, Ee]
16934
16934
  ), Nt = Ne.find((Z) => Z.key === at) ?? Ne[0], Ve = (Z) => {
16935
16935
  se(Z), we(""), B(!0);
16936
16936
  }, He = () => {
@@ -16945,7 +16945,7 @@ function hi({
16945
16945
  }
16946
16946
  },
16947
16947
  [He, $, ae, D]
16948
- ), Le = Qe(() => {
16948
+ ), $e = Qe(() => {
16949
16949
  const Z = b ?? [], pe = ge.trim().toLowerCase();
16950
16950
  return pe ? y ? Z.filter((et) => y(et, pe)) : Z.filter((et) => `${et.label} ${et.secondaryLabel ?? ""}`.toLowerCase().includes(pe)) : Z;
16951
16951
  }, [b, ge, y]), Ue = at === "shared", pt = Ue ? S : F, Pt = Ue ? _ : R, it = Ue ? "No shared conversations yet" : "No conversations yet", Mt = (Z) => {
@@ -17016,8 +17016,8 @@ function hi({
17016
17016
  }, Me = (Z) => {
17017
17017
  if (!Z) return "";
17018
17018
  try {
17019
- const pe = new Date(Z), xe = (/* @__PURE__ */ new Date()).getTime() - pe.getTime(), $e = Math.floor(xe / (1e3 * 60 * 60 * 24));
17020
- return $e === 0 ? pe.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : $e === 1 ? "Yesterday" : $e < 7 ? `${$e} days ago` : pe.toLocaleDateString();
17019
+ const pe = new Date(Z), xe = (/* @__PURE__ */ new Date()).getTime() - pe.getTime(), Fe = Math.floor(xe / (1e3 * 60 * 60 * 24));
17020
+ return Fe === 0 ? pe.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }) : Fe === 1 ? "Yesterday" : Fe < 7 ? `${Fe} days ago` : pe.toLocaleDateString();
17021
17021
  } catch {
17022
17022
  return "";
17023
17023
  }
@@ -17142,7 +17142,7 @@ function hi({
17142
17142
  /* @__PURE__ */ u.jsx(Xn, { className: "h-4 w-4 animate-spin" }),
17143
17143
  "Loading recipients…"
17144
17144
  ] }) : "No matching recipients found" }),
17145
- Le.length > 0 && /* @__PURE__ */ u.jsx(Mh, { heading: "Recipients", children: Le.map((Z) => /* @__PURE__ */ u.jsx(Oh, { onSelect: () => qe(Z), children: /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-start text-sm", children: [
17145
+ $e.length > 0 && /* @__PURE__ */ u.jsx(Mh, { heading: "Recipients", children: $e.map((Z) => /* @__PURE__ */ u.jsx(Oh, { onSelect: () => qe(Z), children: /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-start text-sm", children: [
17146
17146
  /* @__PURE__ */ u.jsx("span", { className: "font-medium", children: Z.label }),
17147
17147
  Z.secondaryLabel && /* @__PURE__ */ u.jsx("span", { className: "text-xs text-muted-foreground", children: Z.secondaryLabel })
17148
17148
  ] }) }, Z.id)) })
@@ -17438,9 +17438,9 @@ var yk = aa, Sk = [" ", "Enter", "ArrowUp", "ArrowDown"], Tk = [" ", "Enter"], u
17438
17438
  onValueChange: l,
17439
17439
  dir: c,
17440
17440
  name: d,
17441
- autoComplete: p,
17441
+ autoComplete: f,
17442
17442
  disabled: m,
17443
- required: f,
17443
+ required: p,
17444
17444
  form: v
17445
17445
  } = e, g = ca(t), [x, b] = h.useState(null), [w, y] = h.useState(null), [C, S] = h.useState(!1), T = $s(c), [k, R] = On({
17446
17446
  prop: r,
@@ -17456,7 +17456,7 @@ var yk = aa, Sk = [" ", "Enter", "ArrowUp", "ArrowDown"], Tk = [" ", "Enter"], u
17456
17456
  return /* @__PURE__ */ u.jsx(qi, { ...g, children: /* @__PURE__ */ u.jsxs(
17457
17457
  Ek,
17458
17458
  {
17459
- required: f,
17459
+ required: p,
17460
17460
  scope: t,
17461
17461
  trigger: x,
17462
17462
  onTriggerChange: b,
@@ -17493,10 +17493,10 @@ var yk = aa, Sk = [" ", "Enter", "ArrowUp", "ArrowDown"], Tk = [" ", "Enter"], u
17493
17493
  Rm,
17494
17494
  {
17495
17495
  "aria-hidden": !0,
17496
- required: f,
17496
+ required: p,
17497
17497
  tabIndex: -1,
17498
17498
  name: d,
17499
- autoComplete: p,
17499
+ autoComplete: f,
17500
17500
  value: _,
17501
17501
  onChange: (V) => O(V.target.value),
17502
17502
  disabled: m,
@@ -17515,11 +17515,11 @@ var yk = aa, Sk = [" ", "Enter", "ArrowUp", "ArrowDown"], Tk = [" ", "Enter"], u
17515
17515
  rm.displayName = ur;
17516
17516
  var om = "SelectTrigger", sm = h.forwardRef(
17517
17517
  (e, t) => {
17518
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = ca(n), a = Vn(om, n), i = a.disabled || r, l = ze(t, a.onTriggerChange), c = la(n), d = h.useRef("touch"), [p, m, f] = Nm((g) => {
17518
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = ca(n), a = Vn(om, n), i = a.disabled || r, l = ze(t, a.onTriggerChange), c = la(n), d = h.useRef("touch"), [f, m, p] = Nm((g) => {
17519
17519
  const x = c().filter((y) => !y.disabled), b = x.find((y) => y.value === a.value), w = Am(x, g, b);
17520
17520
  w !== void 0 && a.onValueChange(w.value);
17521
17521
  }), v = (g) => {
17522
- i || (a.onOpenChange(!0), f()), g && (a.triggerPointerDownPosRef.current = {
17522
+ i || (a.onOpenChange(!0), p()), g && (a.triggerPointerDownPosRef.current = {
17523
17523
  x: Math.round(g.pageX),
17524
17524
  y: Math.round(g.pageY)
17525
17525
  });
@@ -17549,7 +17549,7 @@ var om = "SelectTrigger", sm = h.forwardRef(
17549
17549
  x.hasPointerCapture(g.pointerId) && x.releasePointerCapture(g.pointerId), g.button === 0 && g.ctrlKey === !1 && g.pointerType === "mouse" && (v(g), g.preventDefault());
17550
17550
  }),
17551
17551
  onKeyDown: le(o.onKeyDown, (g) => {
17552
- const x = p.current !== "";
17552
+ const x = f.current !== "";
17553
17553
  !(g.ctrlKey || g.altKey || g.metaKey) && g.key.length === 1 && m(g.key), !(x && g.key === " ") && Sk.includes(g.key) && (v(), g.preventDefault());
17554
17554
  })
17555
17555
  }
@@ -17559,14 +17559,14 @@ var om = "SelectTrigger", sm = h.forwardRef(
17559
17559
  sm.displayName = om;
17560
17560
  var am = "SelectValue", im = h.forwardRef(
17561
17561
  (e, t) => {
17562
- const { __scopeSelect: n, className: r, style: o, children: s, placeholder: a = "", ...i } = e, l = Vn(am, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, p = ze(t, l.onValueNodeChange);
17562
+ const { __scopeSelect: n, className: r, style: o, children: s, placeholder: a = "", ...i } = e, l = Vn(am, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, f = ze(t, l.onValueNodeChange);
17563
17563
  return _t(() => {
17564
17564
  c(d);
17565
17565
  }, [c, d]), /* @__PURE__ */ u.jsx(
17566
17566
  ve.span,
17567
17567
  {
17568
17568
  ...i,
17569
- ref: p,
17569
+ ref: f,
17570
17570
  style: { pointerEvents: "none" },
17571
17571
  children: Im(l.value) ? /* @__PURE__ */ u.jsx(u.Fragment, { children: a }) : s
17572
17572
  }
@@ -17613,9 +17613,9 @@ var dn = 10, [dm, Kn] = Ur(dr), Ak = "SelectContentImpl", jk = Rr("SelectContent
17613
17613
  sideOffset: l,
17614
17614
  align: c,
17615
17615
  alignOffset: d,
17616
- arrowPadding: p,
17616
+ arrowPadding: f,
17617
17617
  collisionBoundary: m,
17618
- collisionPadding: f,
17618
+ collisionPadding: p,
17619
17619
  sticky: v,
17620
17620
  hideWhenDetached: g,
17621
17621
  avoidCollisions: x,
@@ -17684,9 +17684,9 @@ var dn = 10, [dm, Kn] = Ur(dr), Ak = "SelectContentImpl", jk = Rr("SelectContent
17684
17684
  sideOffset: l,
17685
17685
  align: c,
17686
17686
  alignOffset: d,
17687
- arrowPadding: p,
17687
+ arrowPadding: f,
17688
17688
  collisionBoundary: m,
17689
- collisionPadding: f,
17689
+ collisionPadding: p,
17690
17690
  sticky: v,
17691
17691
  hideWhenDetached: g,
17692
17692
  avoidCollisions: x
@@ -17771,7 +17771,7 @@ var dn = 10, [dm, Kn] = Ur(dr), Ak = "SelectContentImpl", jk = Rr("SelectContent
17771
17771
  );
17772
17772
  fm.displayName = Ak;
17773
17773
  var _k = "SelectItemAlignedPosition", pm = h.forwardRef((e, t) => {
17774
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Vn(dr, n), a = Kn(dr, n), [i, l] = h.useState(null), [c, d] = h.useState(null), p = ze(t, (k) => d(k)), m = la(n), f = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = h.useCallback(() => {
17774
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Vn(dr, n), a = Kn(dr, n), [i, l] = h.useState(null), [c, d] = h.useState(null), f = ze(t, (k) => d(k)), m = la(n), p = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = h.useCallback(() => {
17775
17775
  if (s.trigger && s.valueNode && i && c && g && x && b) {
17776
17776
  const k = s.trigger.getBoundingClientRect(), R = c.getBoundingClientRect(), _ = s.valueNode.getBoundingClientRect(), O = b.getBoundingClientRect();
17777
17777
  if (s.dir !== "rtl") {
@@ -17812,7 +17812,7 @@ var _k = "SelectItemAlignedPosition", pm = h.forwardRef((e, t) => {
17812
17812
  ) + Y;
17813
17813
  i.style.height = ae + "px", g.scrollTop = L - q + g.offsetTop;
17814
17814
  }
17815
- i.style.margin = `${dn}px 0`, i.style.minHeight = F + "px", i.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => f.current = !0);
17815
+ i.style.margin = `${dn}px 0`, i.style.minHeight = F + "px", i.style.maxHeight = W + "px", r == null || r(), requestAnimationFrame(() => p.current = !0);
17816
17816
  }
17817
17817
  }, [
17818
17818
  m,
@@ -17842,7 +17842,7 @@ var _k = "SelectItemAlignedPosition", pm = h.forwardRef((e, t) => {
17842
17842
  {
17843
17843
  scope: n,
17844
17844
  contentWrapper: i,
17845
- shouldExpandOnScrollRef: f,
17845
+ shouldExpandOnScrollRef: p,
17846
17846
  onScrollButtonChange: T,
17847
17847
  children: /* @__PURE__ */ u.jsx(
17848
17848
  "div",
@@ -17858,7 +17858,7 @@ var _k = "SelectItemAlignedPosition", pm = h.forwardRef((e, t) => {
17858
17858
  ve.div,
17859
17859
  {
17860
17860
  ...o,
17861
- ref: p,
17861
+ ref: f,
17862
17862
  style: {
17863
17863
  // When we get the height of the content, it includes borders. If we were to set
17864
17864
  // the height without having `boxSizing: 'border-box'` it would be too big.
@@ -17938,14 +17938,14 @@ var [Mk, Dl] = Ur(dr, {}), gi = "SelectViewport", hm = h.forwardRef(
17938
17938
  ...o.style
17939
17939
  },
17940
17940
  onScroll: le(o.onScroll, (c) => {
17941
- const d = c.currentTarget, { contentWrapper: p, shouldExpandOnScrollRef: m } = a;
17942
- if (m != null && m.current && p) {
17943
- const f = Math.abs(l.current - d.scrollTop);
17944
- if (f > 0) {
17945
- const v = window.innerHeight - dn * 2, g = parseFloat(p.style.minHeight), x = parseFloat(p.style.height), b = Math.max(g, x);
17941
+ const d = c.currentTarget, { contentWrapper: f, shouldExpandOnScrollRef: m } = a;
17942
+ if (m != null && m.current && f) {
17943
+ const p = Math.abs(l.current - d.scrollTop);
17944
+ if (p > 0) {
17945
+ const v = window.innerHeight - dn * 2, g = parseFloat(f.style.minHeight), x = parseFloat(f.style.height), b = Math.max(g, x);
17946
17946
  if (b < v) {
17947
- const w = b + f, y = Math.min(v, w), C = w - y;
17948
- p.style.height = y + "px", p.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, p.style.justifyContent = "flex-end");
17947
+ const w = b + p, y = Math.min(v, w), C = w - y;
17948
+ f.style.height = y + "px", f.style.bottom === "0px" && (d.scrollTop = C > 0 ? C : 0, f.style.justifyContent = "flex-end");
17949
17949
  }
17950
17950
  }
17951
17951
  }
@@ -17979,7 +17979,7 @@ var Rs = "SelectItem", [$k, vm] = Ur(Rs), wm = h.forwardRef(
17979
17979
  disabled: o = !1,
17980
17980
  textValue: s,
17981
17981
  ...a
17982
- } = e, i = Vn(Rs, n), l = Kn(Rs, n), c = i.value === r, [d, p] = h.useState(s ?? ""), [m, f] = h.useState(!1), v = ze(
17982
+ } = e, i = Vn(Rs, n), l = Kn(Rs, n), c = i.value === r, [d, f] = h.useState(s ?? ""), [m, p] = h.useState(!1), v = ze(
17983
17983
  t,
17984
17984
  (w) => {
17985
17985
  var y;
@@ -18001,7 +18001,7 @@ var Rs = "SelectItem", [$k, vm] = Ur(Rs), wm = h.forwardRef(
18001
18001
  textId: g,
18002
18002
  isSelected: c,
18003
18003
  onItemTextChange: h.useCallback((w) => {
18004
- p((y) => y || ((w == null ? void 0 : w.textContent) ?? "").trim());
18004
+ f((y) => y || ((w == null ? void 0 : w.textContent) ?? "").trim());
18005
18005
  }, []),
18006
18006
  children: /* @__PURE__ */ u.jsx(
18007
18007
  ia.ItemSlot,
@@ -18023,8 +18023,8 @@ var Rs = "SelectItem", [$k, vm] = Ur(Rs), wm = h.forwardRef(
18023
18023
  tabIndex: o ? void 0 : -1,
18024
18024
  ...a,
18025
18025
  ref: v,
18026
- onFocus: le(a.onFocus, () => f(!0)),
18027
- onBlur: le(a.onBlur, () => f(!1)),
18026
+ onFocus: le(a.onFocus, () => p(!0)),
18027
+ onBlur: le(a.onBlur, () => p(!1)),
18028
18028
  onClick: le(a.onClick, () => {
18029
18029
  x.current !== "mouse" && b();
18030
18030
  }),
@@ -18057,17 +18057,17 @@ var Rs = "SelectItem", [$k, vm] = Ur(Rs), wm = h.forwardRef(
18057
18057
  wm.displayName = Rs;
18058
18058
  var Xr = "SelectItemText", bm = h.forwardRef(
18059
18059
  (e, t) => {
18060
- const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Vn(Xr, n), i = Kn(Xr, n), l = vm(Xr, n), c = Rk(Xr, n), [d, p] = h.useState(null), m = ze(
18060
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Vn(Xr, n), i = Kn(Xr, n), l = vm(Xr, n), c = Rk(Xr, n), [d, f] = h.useState(null), m = ze(
18061
18061
  t,
18062
- (b) => p(b),
18062
+ (b) => f(b),
18063
18063
  l.onItemTextChange,
18064
18064
  (b) => {
18065
18065
  var w;
18066
18066
  return (w = i.itemTextRefCallback) == null ? void 0 : w.call(i, b, l.value, l.disabled);
18067
18067
  }
18068
- ), f = d == null ? void 0 : d.textContent, v = h.useMemo(
18069
- () => /* @__PURE__ */ u.jsx("option", { value: l.value, disabled: l.disabled, children: f }, l.value),
18070
- [l.disabled, l.value, f]
18068
+ ), p = d == null ? void 0 : d.textContent, v = h.useMemo(
18069
+ () => /* @__PURE__ */ u.jsx("option", { value: l.value, disabled: l.disabled, children: p }, l.value),
18070
+ [l.disabled, l.value, p]
18071
18071
  ), { onNativeOptionAdd: g, onNativeOptionRemove: x } = c;
18072
18072
  return _t(() => (g(v), () => x(v)), [g, x, v]), /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
18073
18073
  /* @__PURE__ */ u.jsx(ve.span, { id: l.textId, ...s, ref: m }),
@@ -18137,7 +18137,7 @@ var Em = h.forwardRef((e, t) => {
18137
18137
  }, []);
18138
18138
  return h.useEffect(() => () => l(), [l]), _t(() => {
18139
18139
  var d;
18140
- const c = i().find((p) => p.ref.current === document.activeElement);
18140
+ const c = i().find((f) => f.ref.current === document.activeElement);
18141
18141
  (d = c == null ? void 0 : c.ref.current) == null || d.scrollIntoView({ block: "nearest" });
18142
18142
  }, [i]), /* @__PURE__ */ u.jsx(
18143
18143
  ve.div,
@@ -18183,8 +18183,8 @@ var zk = "SelectBubbleInput", Rm = h.forwardRef(
18183
18183
  "value"
18184
18184
  ).set;
18185
18185
  if (a !== t && d) {
18186
- const p = new Event("change", { bubbles: !0 });
18187
- d.call(i, t), i.dispatchEvent(p);
18186
+ const f = new Event("change", { bubbles: !0 });
18187
+ d.call(i, t), i.dispatchEvent(f);
18188
18188
  }
18189
18189
  }, [a, t]), /* @__PURE__ */ u.jsx(
18190
18190
  ve.select,
@@ -18378,8 +18378,8 @@ var ua = "Switch", [sR, NN] = xn(ua), [aR, iR] = sR(ua), Hm = h.forwardRef(
18378
18378
  value: l = "on",
18379
18379
  onCheckedChange: c,
18380
18380
  form: d,
18381
- ...p
18382
- } = e, [m, f] = h.useState(null), v = ze(t, (y) => f(y)), g = h.useRef(!1), x = m ? d || !!m.closest("form") : !0, [b, w] = On({
18381
+ ...f
18382
+ } = e, [m, p] = h.useState(null), v = ze(t, (y) => p(y)), g = h.useRef(!1), x = m ? d || !!m.closest("form") : !0, [b, w] = On({
18383
18383
  prop: o,
18384
18384
  defaultProp: s ?? !1,
18385
18385
  onChange: c,
@@ -18397,7 +18397,7 @@ var ua = "Switch", [sR, NN] = xn(ua), [aR, iR] = sR(ua), Hm = h.forwardRef(
18397
18397
  "data-disabled": i ? "" : void 0,
18398
18398
  disabled: i,
18399
18399
  value: l,
18400
- ...p,
18400
+ ...f,
18401
18401
  ref: v,
18402
18402
  onClick: le(e.onClick, (y) => {
18403
18403
  w((C) => !C), x && (g.current = y.isPropagationStopped(), g.current || y.stopPropagation());
@@ -18449,13 +18449,13 @@ var lR = "SwitchBubbleInput", Vm = h.forwardRef(
18449
18449
  return h.useEffect(() => {
18450
18450
  const d = a.current;
18451
18451
  if (!d) return;
18452
- const p = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(
18453
- p,
18452
+ const f = window.HTMLInputElement.prototype, p = Object.getOwnPropertyDescriptor(
18453
+ f,
18454
18454
  "checked"
18455
18455
  ).set;
18456
- if (l !== n && f) {
18456
+ if (l !== n && p) {
18457
18457
  const v = new Event("click", { bubbles: r });
18458
- f.call(d, n), d.dispatchEvent(v);
18458
+ p.call(d, n), d.dispatchEvent(v);
18459
18459
  }
18460
18460
  }, [l, n, r]), /* @__PURE__ */ u.jsx(
18461
18461
  "input",
@@ -18628,7 +18628,7 @@ var ho = "Tooltip", [wR, pa] = da(ho), Jm = (e) => {
18628
18628
  onOpenChange: s,
18629
18629
  disableHoverableContent: a,
18630
18630
  delayDuration: i
18631
- } = e, l = Ll(ho, e.__scopeTooltip), c = fa(t), [d, p] = h.useState(null), m = Bt(), f = h.useRef(0), v = a ?? l.disableHoverableContent, g = i ?? l.delayDuration, x = h.useRef(!1), [b, w] = On({
18631
+ } = e, l = Ll(ho, e.__scopeTooltip), c = fa(t), [d, f] = h.useState(null), m = Bt(), p = h.useRef(0), v = a ?? l.disableHoverableContent, g = i ?? l.delayDuration, x = h.useRef(!1), [b, w] = On({
18632
18632
  prop: r,
18633
18633
  defaultProp: o ?? !1,
18634
18634
  onChange: (k) => {
@@ -18636,16 +18636,16 @@ var ho = "Tooltip", [wR, pa] = da(ho), Jm = (e) => {
18636
18636
  },
18637
18637
  caller: ho
18638
18638
  }), y = h.useMemo(() => b ? x.current ? "delayed-open" : "instant-open" : "closed", [b]), C = h.useCallback(() => {
18639
- window.clearTimeout(f.current), f.current = 0, x.current = !1, w(!0);
18639
+ window.clearTimeout(p.current), p.current = 0, x.current = !1, w(!0);
18640
18640
  }, [w]), S = h.useCallback(() => {
18641
- window.clearTimeout(f.current), f.current = 0, w(!1);
18641
+ window.clearTimeout(p.current), p.current = 0, w(!1);
18642
18642
  }, [w]), T = h.useCallback(() => {
18643
- window.clearTimeout(f.current), f.current = window.setTimeout(() => {
18644
- x.current = !0, w(!0), f.current = 0;
18643
+ window.clearTimeout(p.current), p.current = window.setTimeout(() => {
18644
+ x.current = !0, w(!0), p.current = 0;
18645
18645
  }, g);
18646
18646
  }, [g, w]);
18647
18647
  return h.useEffect(() => () => {
18648
- f.current && (window.clearTimeout(f.current), f.current = 0);
18648
+ p.current && (window.clearTimeout(p.current), p.current = 0);
18649
18649
  }, []), /* @__PURE__ */ u.jsx(qi, { ...c, children: /* @__PURE__ */ u.jsx(
18650
18650
  wR,
18651
18651
  {
@@ -18654,12 +18654,12 @@ var ho = "Tooltip", [wR, pa] = da(ho), Jm = (e) => {
18654
18654
  open: b,
18655
18655
  stateAttribute: y,
18656
18656
  trigger: d,
18657
- onTriggerChange: p,
18657
+ onTriggerChange: f,
18658
18658
  onTriggerEnter: h.useCallback(() => {
18659
18659
  l.isOpenDelayedRef.current ? T() : C();
18660
18660
  }, [l.isOpenDelayedRef, T, C]),
18661
18661
  onTriggerLeave: h.useCallback(() => {
18662
- v ? S() : (window.clearTimeout(f.current), f.current = 0);
18662
+ v ? S() : (window.clearTimeout(p.current), p.current = 0);
18663
18663
  }, [S, v]),
18664
18664
  onOpen: C,
18665
18665
  onClose: S,
@@ -18671,8 +18671,8 @@ var ho = "Tooltip", [wR, pa] = da(ho), Jm = (e) => {
18671
18671
  Jm.displayName = ho;
18672
18672
  var yi = "TooltipTrigger", Zm = h.forwardRef(
18673
18673
  (e, t) => {
18674
- const { __scopeTooltip: n, ...r } = e, o = pa(yi, n), s = Ll(yi, n), a = fa(n), i = h.useRef(null), l = ze(t, i, o.onTriggerChange), c = h.useRef(!1), d = h.useRef(!1), p = h.useCallback(() => c.current = !1, []);
18675
- return h.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ u.jsx(Gi, { asChild: !0, ...a, children: /* @__PURE__ */ u.jsx(
18674
+ const { __scopeTooltip: n, ...r } = e, o = pa(yi, n), s = Ll(yi, n), a = fa(n), i = h.useRef(null), l = ze(t, i, o.onTriggerChange), c = h.useRef(!1), d = h.useRef(!1), f = h.useCallback(() => c.current = !1, []);
18675
+ return h.useEffect(() => () => document.removeEventListener("pointerup", f), [f]), /* @__PURE__ */ u.jsx(Gi, { asChild: !0, ...a, children: /* @__PURE__ */ u.jsx(
18676
18676
  ve.button,
18677
18677
  {
18678
18678
  "aria-describedby": o.open ? o.contentId : void 0,
@@ -18686,7 +18686,7 @@ var yi = "TooltipTrigger", Zm = h.forwardRef(
18686
18686
  o.onTriggerLeave(), d.current = !1;
18687
18687
  }),
18688
18688
  onPointerDown: le(e.onPointerDown, () => {
18689
- o.open && o.onClose(), c.current = !0, document.addEventListener("pointerup", p, { once: !0 });
18689
+ o.open && o.onClose(), c.current = !0, document.addEventListener("pointerup", f, { once: !0 });
18690
18690
  }),
18691
18691
  onFocus: le(e.onFocus, () => {
18692
18692
  c.current || o.onOpen();
@@ -18706,23 +18706,23 @@ var bR = "TooltipPortal", [PN, yR] = da(bR, {
18706
18706
  return /* @__PURE__ */ u.jsx(Xt, { present: r || a.open, children: a.disableHoverableContent ? /* @__PURE__ */ u.jsx(eg, { side: o, ...s, ref: t }) : /* @__PURE__ */ u.jsx(SR, { side: o, ...s, ref: t }) });
18707
18707
  }
18708
18708
  ), SR = h.forwardRef((e, t) => {
18709
- const n = pa(_r, e.__scopeTooltip), r = Ll(_r, e.__scopeTooltip), o = h.useRef(null), s = ze(t, o), [a, i] = h.useState(null), { trigger: l, onClose: c } = n, d = o.current, { onPointerInTransitChange: p } = r, m = h.useCallback(() => {
18710
- i(null), p(!1);
18711
- }, [p]), f = h.useCallback(
18709
+ const n = pa(_r, e.__scopeTooltip), r = Ll(_r, e.__scopeTooltip), o = h.useRef(null), s = ze(t, o), [a, i] = h.useState(null), { trigger: l, onClose: c } = n, d = o.current, { onPointerInTransitChange: f } = r, m = h.useCallback(() => {
18710
+ i(null), f(!1);
18711
+ }, [f]), p = h.useCallback(
18712
18712
  (v, g) => {
18713
18713
  const x = v.currentTarget, b = { x: v.clientX, y: v.clientY }, w = RR(b, x.getBoundingClientRect()), y = IR(b, w), C = NR(g.getBoundingClientRect()), S = jR([...y, ...C]);
18714
- i(S), p(!0);
18714
+ i(S), f(!0);
18715
18715
  },
18716
- [p]
18716
+ [f]
18717
18717
  );
18718
18718
  return h.useEffect(() => () => m(), [m]), h.useEffect(() => {
18719
18719
  if (l && d) {
18720
- const v = (x) => f(x, d), g = (x) => f(x, l);
18720
+ const v = (x) => p(x, d), g = (x) => p(x, l);
18721
18721
  return l.addEventListener("pointerleave", v), d.addEventListener("pointerleave", g), () => {
18722
18722
  l.removeEventListener("pointerleave", v), d.removeEventListener("pointerleave", g);
18723
18723
  };
18724
18724
  }
18725
- }, [l, d, f, m]), h.useEffect(() => {
18725
+ }, [l, d, p, m]), h.useEffect(() => {
18726
18726
  if (a) {
18727
18727
  const v = (g) => {
18728
18728
  const x = g.target, b = { x: g.clientX, y: g.clientY }, w = (l == null ? void 0 : l.contains(x)) || (d == null ? void 0 : d.contains(x)), y = !AR(b, a);
@@ -18743,11 +18743,11 @@ var bR = "TooltipPortal", [PN, yR] = da(bR, {
18743
18743
  } = e, l = pa(_r, n), c = fa(n), { onClose: d } = l;
18744
18744
  return h.useEffect(() => (document.addEventListener(bi, d), () => document.removeEventListener(bi, d)), [d]), h.useEffect(() => {
18745
18745
  if (l.trigger) {
18746
- const p = (m) => {
18747
- const f = m.target;
18748
- f != null && f.contains(l.trigger) && d();
18746
+ const f = (m) => {
18747
+ const p = m.target;
18748
+ p != null && p.contains(l.trigger) && d();
18749
18749
  };
18750
- return window.addEventListener("scroll", p, { capture: !0 }), () => window.removeEventListener("scroll", p, { capture: !0 });
18750
+ return window.addEventListener("scroll", f, { capture: !0 }), () => window.removeEventListener("scroll", f, { capture: !0 });
18751
18751
  }
18752
18752
  }, [l.trigger, d]), /* @__PURE__ */ u.jsx(
18753
18753
  Lr,
@@ -18756,7 +18756,7 @@ var bR = "TooltipPortal", [PN, yR] = da(bR, {
18756
18756
  disableOutsidePointerEvents: !1,
18757
18757
  onEscapeKeyDown: s,
18758
18758
  onPointerDownOutside: a,
18759
- onFocusOutside: (p) => p.preventDefault(),
18759
+ onFocusOutside: (f) => f.preventDefault(),
18760
18760
  onDismiss: d,
18761
18761
  children: /* @__PURE__ */ u.jsxs(
18762
18762
  Yi,
@@ -18852,8 +18852,8 @@ function AR(e, t) {
18852
18852
  const { x: n, y: r } = e;
18853
18853
  let o = !1;
18854
18854
  for (let s = 0, a = t.length - 1; s < t.length; a = s++) {
18855
- const i = t[s], l = t[a], c = i.x, d = i.y, p = l.x, m = l.y;
18856
- d > r != m > r && n < (p - c) * (r - d) / (m - d) + c && (o = !o);
18855
+ const i = t[s], l = t[a], c = i.x, d = i.y, f = l.x, m = l.y;
18856
+ d > r != m > r && n < (f - c) * (r - d) / (m - d) + c && (o = !o);
18857
18857
  }
18858
18858
  return o;
18859
18859
  }
@@ -18908,7 +18908,7 @@ var $l = "ToastProvider", [Fl, LR, $R] = Ls("Toast"), [rg, LN] = xn("Toast", [$R
18908
18908
  swipeDirection: o = "right",
18909
18909
  swipeThreshold: s = 50,
18910
18910
  children: a
18911
- } = e, [i, l] = h.useState(null), [c, d] = h.useState(0), p = h.useRef(!1), m = h.useRef(!1);
18911
+ } = e, [i, l] = h.useState(null), [c, d] = h.useState(0), f = h.useRef(!1), m = h.useRef(!1);
18912
18912
  return n.trim() || console.error(
18913
18913
  `Invalid prop \`label\` supplied to \`${$l}\`. Expected non-empty \`string\`.`
18914
18914
  ), /* @__PURE__ */ u.jsx(Fl.Provider, { scope: t, children: /* @__PURE__ */ u.jsx(
@@ -18922,9 +18922,9 @@ var $l = "ToastProvider", [Fl, LR, $R] = Ls("Toast"), [rg, LN] = xn("Toast", [$R
18922
18922
  toastCount: c,
18923
18923
  viewport: i,
18924
18924
  onViewportChange: l,
18925
- onToastAdd: h.useCallback(() => d((f) => f + 1), []),
18926
- onToastRemove: h.useCallback(() => d((f) => f - 1), []),
18927
- isFocusedToastEscapeKeyDownRef: p,
18925
+ onToastAdd: h.useCallback(() => d((p) => p + 1), []),
18926
+ onToastRemove: h.useCallback(() => d((p) => p - 1), []),
18927
+ isFocusedToastEscapeKeyDownRef: f,
18928
18928
  isClosePausedRef: m,
18929
18929
  children: a
18930
18930
  }
@@ -18938,15 +18938,15 @@ var sg = "ToastViewport", BR = ["F8"], Si = "toast.viewportPause", Ti = "toast.v
18938
18938
  hotkey: r = BR,
18939
18939
  label: o = "Notifications ({hotkey})",
18940
18940
  ...s
18941
- } = e, a = ha(sg, n), i = LR(n), l = h.useRef(null), c = h.useRef(null), d = h.useRef(null), p = h.useRef(null), m = ze(t, p, a.onViewportChange), f = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), v = a.toastCount > 0;
18941
+ } = e, a = ha(sg, n), i = LR(n), l = h.useRef(null), c = h.useRef(null), d = h.useRef(null), f = h.useRef(null), m = ze(t, f, a.onViewportChange), p = r.join("+").replace(/Key/g, "").replace(/Digit/g, ""), v = a.toastCount > 0;
18942
18942
  h.useEffect(() => {
18943
18943
  const x = (b) => {
18944
18944
  var y;
18945
- r.length !== 0 && r.every((C) => b[C] || b.code === C) && ((y = p.current) == null || y.focus());
18945
+ r.length !== 0 && r.every((C) => b[C] || b.code === C) && ((y = f.current) == null || y.focus());
18946
18946
  };
18947
18947
  return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
18948
18948
  }, [r]), h.useEffect(() => {
18949
- const x = l.current, b = p.current;
18949
+ const x = l.current, b = f.current;
18950
18950
  if (v && x && b) {
18951
18951
  const w = () => {
18952
18952
  if (!a.isClosePausedRef.current) {
@@ -18979,7 +18979,7 @@ var sg = "ToastViewport", BR = ["F8"], Si = "toast.viewportPause", Ti = "toast.v
18979
18979
  [i]
18980
18980
  );
18981
18981
  return h.useEffect(() => {
18982
- const x = p.current;
18982
+ const x = f.current;
18983
18983
  if (x) {
18984
18984
  const b = (w) => {
18985
18985
  var S, T, k;
@@ -19001,7 +19001,7 @@ var sg = "ToastViewport", BR = ["F8"], Si = "toast.viewportPause", Ti = "toast.v
19001
19001
  {
19002
19002
  ref: l,
19003
19003
  role: "region",
19004
- "aria-label": o.replace("{hotkey}", f),
19004
+ "aria-label": o.replace("{hotkey}", p),
19005
19005
  tabIndex: -1,
19006
19006
  style: { pointerEvents: v ? void 0 : "none" },
19007
19007
  children: [
@@ -19077,15 +19077,15 @@ var Do = "Toast", zR = "toast.swipeStart", HR = "toast.swipeMove", UR = "toast.s
19077
19077
  c.currentTarget.setAttribute("data-swipe", "start");
19078
19078
  }),
19079
19079
  onSwipeMove: le(e.onSwipeMove, (c) => {
19080
- const { x: d, y: p } = c.detail.delta;
19081
- c.currentTarget.setAttribute("data-swipe", "move"), c.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${d}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${p}px`);
19080
+ const { x: d, y: f } = c.detail.delta;
19081
+ c.currentTarget.setAttribute("data-swipe", "move"), c.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${d}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${f}px`);
19082
19082
  }),
19083
19083
  onSwipeCancel: le(e.onSwipeCancel, (c) => {
19084
19084
  c.currentTarget.setAttribute("data-swipe", "cancel"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
19085
19085
  }),
19086
19086
  onSwipeEnd: le(e.onSwipeEnd, (c) => {
19087
- const { x: d, y: p } = c.detail.delta;
19088
- c.currentTarget.setAttribute("data-swipe", "end"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${d}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${p}px`), l(!1);
19087
+ const { x: d, y: f } = c.detail.delta;
19088
+ c.currentTarget.setAttribute("data-swipe", "end"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), c.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${d}px`), c.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${f}px`), l(!1);
19089
19089
  })
19090
19090
  }
19091
19091
  ) });
@@ -19107,9 +19107,9 @@ var [VR, KR] = rg(Do, {
19107
19107
  onPause: l,
19108
19108
  onResume: c,
19109
19109
  onSwipeStart: d,
19110
- onSwipeMove: p,
19110
+ onSwipeMove: f,
19111
19111
  onSwipeCancel: m,
19112
- onSwipeEnd: f,
19112
+ onSwipeEnd: p,
19113
19113
  ...v
19114
19114
  } = e, g = ha(Do, n), [x, b] = h.useState(null), w = ze(t, (N) => b(N)), y = h.useRef(null), C = h.useRef(null), S = o || g.duration, T = h.useRef(0), k = h.useRef(S), R = h.useRef(0), { onToastAdd: _, onToastRemove: O } = g, $ = wt(() => {
19115
19115
  var K;
@@ -19173,7 +19173,7 @@ var [VR, KR] = rg(Do, {
19173
19173
  onPointerMove: le(e.onPointerMove, (N) => {
19174
19174
  if (!y.current) return;
19175
19175
  const K = N.clientX - y.current.x, V = N.clientY - y.current.y, D = !!C.current, j = ["left", "right"].includes(g.swipeDirection), E = ["left", "up"].includes(g.swipeDirection) ? Math.min : Math.max, F = j ? E(0, K) : 0, G = j ? 0 : E(0, V), A = N.pointerType === "touch" ? 10 : 2, P = { x: F, y: G }, q = { originalEvent: N, delta: P };
19176
- D ? (C.current = P, qo(HR, p, q, {
19176
+ D ? (C.current = P, qo(HR, f, q, {
19177
19177
  discrete: !1
19178
19178
  })) : Ru(P, g.swipeDirection, A) ? (C.current = P, qo(zR, d, q, {
19179
19179
  discrete: !1
@@ -19183,7 +19183,7 @@ var [VR, KR] = rg(Do, {
19183
19183
  const K = C.current, V = N.target;
19184
19184
  if (V.hasPointerCapture(N.pointerId) && V.releasePointerCapture(N.pointerId), C.current = null, y.current = null, K) {
19185
19185
  const D = N.currentTarget, j = { originalEvent: N, delta: K };
19186
- Ru(K, g.swipeDirection, g.swipeThreshold) ? qo(WR, f, j, {
19186
+ Ru(K, g.swipeDirection, g.swipeThreshold) ? qo(WR, p, j, {
19187
19187
  discrete: !0
19188
19188
  }) : qo(
19189
19189
  UR,
@@ -19411,21 +19411,21 @@ function $N() {
19411
19411
  }
19412
19412
  var oI = (e, t, n, r, o, s, a, i) => {
19413
19413
  let l = document.documentElement, c = ["light", "dark"];
19414
- function d(f) {
19414
+ function d(p) {
19415
19415
  (Array.isArray(e) ? e : [e]).forEach((v) => {
19416
19416
  let g = v === "class", x = g && s ? o.map((b) => s[b] || b) : o;
19417
- g ? (l.classList.remove(...x), l.classList.add(s && s[f] ? s[f] : f)) : l.setAttribute(v, f);
19418
- }), p(f);
19417
+ g ? (l.classList.remove(...x), l.classList.add(s && s[p] ? s[p] : p)) : l.setAttribute(v, p);
19418
+ }), f(p);
19419
19419
  }
19420
- function p(f) {
19421
- i && c.includes(f) && (l.style.colorScheme = f);
19420
+ function f(p) {
19421
+ i && c.includes(p) && (l.style.colorScheme = p);
19422
19422
  }
19423
19423
  function m() {
19424
19424
  return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
19425
19425
  }
19426
19426
  if (r) d(r);
19427
19427
  else try {
19428
- let f = localStorage.getItem(t) || n, v = a && f === "system" ? m() : f;
19428
+ let p = localStorage.getItem(t) || n, v = a && p === "system" ? m() : p;
19429
19429
  d(v);
19430
19430
  } catch {
19431
19431
  }
@@ -19529,11 +19529,11 @@ function jI(e) {
19529
19529
  return t && r.push(t), n && r.push(n), r;
19530
19530
  }
19531
19531
  var _I = (e) => {
19532
- var t, n, r, o, s, a, i, l, c, d, p;
19533
- let { invert: m, toast: f, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: y, toasts: C, expanded: S, removeToast: T, defaultRichColors: k, closeButton: R, style: _, cancelButtonStyle: O, actionButtonStyle: $, className: W = "", descriptionClassName: H = "", duration: N, position: K, gap: V, loadingIcon: D, expandByDefault: j, classNames: E, icons: F, closeButtonAriaLabel: G = "Close toast", pauseWhenPageIsHidden: A } = e, [P, q] = M.useState(null), [X, oe] = M.useState(null), [U, L] = M.useState(!1), [Y, Q] = M.useState(!1), [J, B] = M.useState(!1), [ae, se] = M.useState(!1), [ge, we] = M.useState(!1), [Ne, _e] = M.useState(0), [Ee, at] = M.useState(0), yt = M.useRef(f.duration || N || Iu), Nt = M.useRef(null), Ve = M.useRef(null), He = y === 0, qe = y + 1 <= b, Le = f.type, Ue = f.dismissible !== !1, pt = f.className || "", Pt = f.descriptionClassName || "", it = M.useMemo(() => w.findIndex((xe) => xe.toastId === f.id) || 0, [w, f.id]), Mt = M.useMemo(() => {
19532
+ var t, n, r, o, s, a, i, l, c, d, f;
19533
+ let { invert: m, toast: p, unstyled: v, interacting: g, setHeights: x, visibleToasts: b, heights: w, index: y, toasts: C, expanded: S, removeToast: T, defaultRichColors: k, closeButton: R, style: _, cancelButtonStyle: O, actionButtonStyle: $, className: W = "", descriptionClassName: H = "", duration: N, position: K, gap: V, loadingIcon: D, expandByDefault: j, classNames: E, icons: F, closeButtonAriaLabel: G = "Close toast", pauseWhenPageIsHidden: A } = e, [P, q] = M.useState(null), [X, oe] = M.useState(null), [U, L] = M.useState(!1), [Y, Q] = M.useState(!1), [J, B] = M.useState(!1), [ae, se] = M.useState(!1), [ge, we] = M.useState(!1), [Ne, _e] = M.useState(0), [Ee, at] = M.useState(0), yt = M.useRef(p.duration || N || Iu), Nt = M.useRef(null), Ve = M.useRef(null), He = y === 0, qe = y + 1 <= b, $e = p.type, Ue = p.dismissible !== !1, pt = p.className || "", Pt = p.descriptionClassName || "", it = M.useMemo(() => w.findIndex((xe) => xe.toastId === p.id) || 0, [w, p.id]), Mt = M.useMemo(() => {
19534
19534
  var xe;
19535
- return (xe = f.closeButton) != null ? xe : R;
19536
- }, [f.closeButton, R]), Tt = M.useMemo(() => f.duration || N || Iu, [f.duration, N]), gt = M.useRef(0), At = M.useRef(0), Ct = M.useRef(0), Et = M.useRef(null), [zt, xt] = K.split("-"), Me = M.useMemo(() => w.reduce((xe, $e, Ge) => Ge >= it ? xe : xe + $e.height, 0), [w, it]), Ke = gI(), Ce = f.invert || m, Z = Le === "loading";
19535
+ return (xe = p.closeButton) != null ? xe : R;
19536
+ }, [p.closeButton, R]), Tt = M.useMemo(() => p.duration || N || Iu, [p.duration, N]), gt = M.useRef(0), At = M.useRef(0), Ct = M.useRef(0), Et = M.useRef(null), [zt, xt] = K.split("-"), Me = M.useMemo(() => w.reduce((xe, Fe, Ge) => Ge >= it ? xe : xe + Fe.height, 0), [w, it]), Ke = gI(), Ce = p.invert || m, Z = $e === "loading";
19537
19537
  At.current = M.useMemo(() => it * V + Me, [it, Me]), M.useEffect(() => {
19538
19538
  yt.current = Tt;
19539
19539
  }, [Tt]), M.useEffect(() => {
@@ -19541,73 +19541,73 @@ var _I = (e) => {
19541
19541
  }, []), M.useEffect(() => {
19542
19542
  let xe = Ve.current;
19543
19543
  if (xe) {
19544
- let $e = xe.getBoundingClientRect().height;
19545
- return at($e), x((Ge) => [{ toastId: f.id, height: $e, position: f.position }, ...Ge]), () => x((Ge) => Ge.filter((kt) => kt.toastId !== f.id));
19544
+ let Fe = xe.getBoundingClientRect().height;
19545
+ return at(Fe), x((Ge) => [{ toastId: p.id, height: Fe, position: p.position }, ...Ge]), () => x((Ge) => Ge.filter((kt) => kt.toastId !== p.id));
19546
19546
  }
19547
- }, [x, f.id]), M.useLayoutEffect(() => {
19547
+ }, [x, p.id]), M.useLayoutEffect(() => {
19548
19548
  if (!U) return;
19549
- let xe = Ve.current, $e = xe.style.height;
19549
+ let xe = Ve.current, Fe = xe.style.height;
19550
19550
  xe.style.height = "auto";
19551
19551
  let Ge = xe.getBoundingClientRect().height;
19552
- xe.style.height = $e, at(Ge), x((kt) => kt.find((Rt) => Rt.toastId === f.id) ? kt.map((Rt) => Rt.toastId === f.id ? { ...Rt, height: Ge } : Rt) : [{ toastId: f.id, height: Ge, position: f.position }, ...kt]);
19553
- }, [U, f.title, f.description, x, f.id]);
19552
+ xe.style.height = Fe, at(Ge), x((kt) => kt.find((Rt) => Rt.toastId === p.id) ? kt.map((Rt) => Rt.toastId === p.id ? { ...Rt, height: Ge } : Rt) : [{ toastId: p.id, height: Ge, position: p.position }, ...kt]);
19553
+ }, [U, p.title, p.description, x, p.id]);
19554
19554
  let pe = M.useCallback(() => {
19555
- Q(!0), _e(At.current), x((xe) => xe.filter(($e) => $e.toastId !== f.id)), setTimeout(() => {
19556
- T(f);
19555
+ Q(!0), _e(At.current), x((xe) => xe.filter((Fe) => Fe.toastId !== p.id)), setTimeout(() => {
19556
+ T(p);
19557
19557
  }, AI);
19558
- }, [f, T, x, At]);
19558
+ }, [p, T, x, At]);
19559
19559
  M.useEffect(() => {
19560
- if (f.promise && Le === "loading" || f.duration === 1 / 0 || f.type === "loading") return;
19560
+ if (p.promise && $e === "loading" || p.duration === 1 / 0 || p.type === "loading") return;
19561
19561
  let xe;
19562
19562
  return S || g || A && Ke ? (() => {
19563
19563
  if (Ct.current < gt.current) {
19564
- let $e = (/* @__PURE__ */ new Date()).getTime() - gt.current;
19565
- yt.current = yt.current - $e;
19564
+ let Fe = (/* @__PURE__ */ new Date()).getTime() - gt.current;
19565
+ yt.current = yt.current - Fe;
19566
19566
  }
19567
19567
  Ct.current = (/* @__PURE__ */ new Date()).getTime();
19568
19568
  })() : yt.current !== 1 / 0 && (gt.current = (/* @__PURE__ */ new Date()).getTime(), xe = setTimeout(() => {
19569
- var $e;
19570
- ($e = f.onAutoClose) == null || $e.call(f, f), pe();
19569
+ var Fe;
19570
+ (Fe = p.onAutoClose) == null || Fe.call(p, p), pe();
19571
19571
  }, yt.current)), () => clearTimeout(xe);
19572
- }, [S, g, f, Le, A, Ke, pe]), M.useEffect(() => {
19573
- f.delete && pe();
19574
- }, [pe, f.delete]);
19572
+ }, [S, g, p, $e, A, Ke, pe]), M.useEffect(() => {
19573
+ p.delete && pe();
19574
+ }, [pe, p.delete]);
19575
19575
  function et() {
19576
- var xe, $e, Ge;
19577
- return F != null && F.loading ? M.createElement("div", { className: un(E == null ? void 0 : E.loader, (xe = f == null ? void 0 : f.classNames) == null ? void 0 : xe.loader, "sonner-loader"), "data-visible": Le === "loading" }, F.loading) : D ? M.createElement("div", { className: un(E == null ? void 0 : E.loader, ($e = f == null ? void 0 : f.classNames) == null ? void 0 : $e.loader, "sonner-loader"), "data-visible": Le === "loading" }, D) : M.createElement(uI, { className: un(E == null ? void 0 : E.loader, (Ge = f == null ? void 0 : f.classNames) == null ? void 0 : Ge.loader), visible: Le === "loading" });
19576
+ var xe, Fe, Ge;
19577
+ return F != null && F.loading ? M.createElement("div", { className: un(E == null ? void 0 : E.loader, (xe = p == null ? void 0 : p.classNames) == null ? void 0 : xe.loader, "sonner-loader"), "data-visible": $e === "loading" }, F.loading) : D ? M.createElement("div", { className: un(E == null ? void 0 : E.loader, (Fe = p == null ? void 0 : p.classNames) == null ? void 0 : Fe.loader, "sonner-loader"), "data-visible": $e === "loading" }, D) : M.createElement(uI, { className: un(E == null ? void 0 : E.loader, (Ge = p == null ? void 0 : p.classNames) == null ? void 0 : Ge.loader), visible: $e === "loading" });
19578
19578
  }
19579
- return M.createElement("li", { tabIndex: 0, ref: Ve, className: un(W, pt, E == null ? void 0 : E.toast, (t = f == null ? void 0 : f.classNames) == null ? void 0 : t.toast, E == null ? void 0 : E.default, E == null ? void 0 : E[Le], (n = f == null ? void 0 : f.classNames) == null ? void 0 : n[Le]), "data-sonner-toast": "", "data-rich-colors": (r = f.richColors) != null ? r : k, "data-styled": !(f.jsx || f.unstyled || v), "data-mounted": U, "data-promise": !!f.promise, "data-swiped": ge, "data-removed": Y, "data-visible": qe, "data-y-position": zt, "data-x-position": xt, "data-index": y, "data-front": He, "data-swiping": J, "data-dismissible": Ue, "data-type": Le, "data-invert": Ce, "data-swipe-out": ae, "data-swipe-direction": X, "data-expanded": !!(S || j && U), style: { "--index": y, "--toasts-before": y, "--z-index": C.length - y, "--offset": `${Y ? Ne : At.current}px`, "--initial-height": j ? "auto" : `${Ee}px`, ..._, ...f.style }, onDragEnd: () => {
19579
+ return M.createElement("li", { tabIndex: 0, ref: Ve, className: un(W, pt, E == null ? void 0 : E.toast, (t = p == null ? void 0 : p.classNames) == null ? void 0 : t.toast, E == null ? void 0 : E.default, E == null ? void 0 : E[$e], (n = p == null ? void 0 : p.classNames) == null ? void 0 : n[$e]), "data-sonner-toast": "", "data-rich-colors": (r = p.richColors) != null ? r : k, "data-styled": !(p.jsx || p.unstyled || v), "data-mounted": U, "data-promise": !!p.promise, "data-swiped": ge, "data-removed": Y, "data-visible": qe, "data-y-position": zt, "data-x-position": xt, "data-index": y, "data-front": He, "data-swiping": J, "data-dismissible": Ue, "data-type": $e, "data-invert": Ce, "data-swipe-out": ae, "data-swipe-direction": X, "data-expanded": !!(S || j && U), style: { "--index": y, "--toasts-before": y, "--z-index": C.length - y, "--offset": `${Y ? Ne : At.current}px`, "--initial-height": j ? "auto" : `${Ee}px`, ..._, ...p.style }, onDragEnd: () => {
19580
19580
  B(!1), q(null), Et.current = null;
19581
19581
  }, onPointerDown: (xe) => {
19582
19582
  Z || !Ue || (Nt.current = /* @__PURE__ */ new Date(), _e(At.current), xe.target.setPointerCapture(xe.pointerId), xe.target.tagName !== "BUTTON" && (B(!0), Et.current = { x: xe.clientX, y: xe.clientY }));
19583
19583
  }, onPointerUp: () => {
19584
- var xe, $e, Ge, kt;
19584
+ var xe, Fe, Ge, kt;
19585
19585
  if (ae || !Ue) return;
19586
19586
  Et.current = null;
19587
- let Rt = Number(((xe = Ve.current) == null ? void 0 : xe.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), jt = Number((($e = Ve.current) == null ? void 0 : $e.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Ot = (/* @__PURE__ */ new Date()).getTime() - ((Ge = Nt.current) == null ? void 0 : Ge.getTime()), Ae = P === "x" ? Rt : jt, ht = Math.abs(Ae) / Ot;
19587
+ let Rt = Number(((xe = Ve.current) == null ? void 0 : xe.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), jt = Number(((Fe = Ve.current) == null ? void 0 : Fe.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Ot = (/* @__PURE__ */ new Date()).getTime() - ((Ge = Nt.current) == null ? void 0 : Ge.getTime()), Ae = P === "x" ? Rt : jt, ht = Math.abs(Ae) / Ot;
19588
19588
  if (Math.abs(Ae) >= NI || ht > 0.11) {
19589
- _e(At.current), (kt = f.onDismiss) == null || kt.call(f, f), oe(P === "x" ? Rt > 0 ? "right" : "left" : jt > 0 ? "down" : "up"), pe(), se(!0), we(!1);
19589
+ _e(At.current), (kt = p.onDismiss) == null || kt.call(p, p), oe(P === "x" ? Rt > 0 ? "right" : "left" : jt > 0 ? "down" : "up"), pe(), se(!0), we(!1);
19590
19590
  return;
19591
19591
  }
19592
19592
  B(!1), q(null);
19593
19593
  }, onPointerMove: (xe) => {
19594
- var $e, Ge, kt, Rt;
19595
- if (!Et.current || !Ue || (($e = window.getSelection()) == null ? void 0 : $e.toString().length) > 0) return;
19594
+ var Fe, Ge, kt, Rt;
19595
+ if (!Et.current || !Ue || ((Fe = window.getSelection()) == null ? void 0 : Fe.toString().length) > 0) return;
19596
19596
  let jt = xe.clientY - Et.current.y, Ot = xe.clientX - Et.current.x, Ae = (Ge = e.swipeDirections) != null ? Ge : jI(K);
19597
19597
  !P && (Math.abs(Ot) > 1 || Math.abs(jt) > 1) && q(Math.abs(Ot) > Math.abs(jt) ? "x" : "y");
19598
19598
  let ht = { x: 0, y: 0 };
19599
19599
  P === "y" ? (Ae.includes("top") || Ae.includes("bottom")) && (Ae.includes("top") && jt < 0 || Ae.includes("bottom") && jt > 0) && (ht.y = jt) : P === "x" && (Ae.includes("left") || Ae.includes("right")) && (Ae.includes("left") && Ot < 0 || Ae.includes("right") && Ot > 0) && (ht.x = Ot), (Math.abs(ht.x) > 0 || Math.abs(ht.y) > 0) && we(!0), (kt = Ve.current) == null || kt.style.setProperty("--swipe-amount-x", `${ht.x}px`), (Rt = Ve.current) == null || Rt.style.setProperty("--swipe-amount-y", `${ht.y}px`);
19600
- } }, Mt && !f.jsx ? M.createElement("button", { "aria-label": G, "data-disabled": Z, "data-close-button": !0, onClick: Z || !Ue ? () => {
19600
+ } }, Mt && !p.jsx ? M.createElement("button", { "aria-label": G, "data-disabled": Z, "data-close-button": !0, onClick: Z || !Ue ? () => {
19601
19601
  } : () => {
19602
19602
  var xe;
19603
- pe(), (xe = f.onDismiss) == null || xe.call(f, f);
19604
- }, className: un(E == null ? void 0 : E.closeButton, (o = f == null ? void 0 : f.classNames) == null ? void 0 : o.closeButton) }, (s = F == null ? void 0 : F.close) != null ? s : mI) : null, f.jsx || ga(f.title) ? f.jsx ? f.jsx : typeof f.title == "function" ? f.title() : f.title : M.createElement(M.Fragment, null, Le || f.icon || f.promise ? M.createElement("div", { "data-icon": "", className: un(E == null ? void 0 : E.icon, (a = f == null ? void 0 : f.classNames) == null ? void 0 : a.icon) }, f.promise || f.type === "loading" && !f.icon ? f.icon || et() : null, f.type !== "loading" ? f.icon || (F == null ? void 0 : F[Le]) || lI(Le) : null) : null, M.createElement("div", { "data-content": "", className: un(E == null ? void 0 : E.content, (i = f == null ? void 0 : f.classNames) == null ? void 0 : i.content) }, M.createElement("div", { "data-title": "", className: un(E == null ? void 0 : E.title, (l = f == null ? void 0 : f.classNames) == null ? void 0 : l.title) }, typeof f.title == "function" ? f.title() : f.title), f.description ? M.createElement("div", { "data-description": "", className: un(H, Pt, E == null ? void 0 : E.description, (c = f == null ? void 0 : f.classNames) == null ? void 0 : c.description) }, typeof f.description == "function" ? f.description() : f.description) : null), ga(f.cancel) ? f.cancel : f.cancel && Go(f.cancel) ? M.createElement("button", { "data-button": !0, "data-cancel": !0, style: f.cancelButtonStyle || O, onClick: (xe) => {
19605
- var $e, Ge;
19606
- Go(f.cancel) && Ue && ((Ge = ($e = f.cancel).onClick) == null || Ge.call($e, xe), pe());
19607
- }, className: un(E == null ? void 0 : E.cancelButton, (d = f == null ? void 0 : f.classNames) == null ? void 0 : d.cancelButton) }, f.cancel.label) : null, ga(f.action) ? f.action : f.action && Go(f.action) ? M.createElement("button", { "data-button": !0, "data-action": !0, style: f.actionButtonStyle || $, onClick: (xe) => {
19608
- var $e, Ge;
19609
- Go(f.action) && ((Ge = ($e = f.action).onClick) == null || Ge.call($e, xe), !xe.defaultPrevented && pe());
19610
- }, className: un(E == null ? void 0 : E.actionButton, (p = f == null ? void 0 : f.classNames) == null ? void 0 : p.actionButton) }, f.action.label) : null));
19603
+ pe(), (xe = p.onDismiss) == null || xe.call(p, p);
19604
+ }, className: un(E == null ? void 0 : E.closeButton, (o = p == null ? void 0 : p.classNames) == null ? void 0 : o.closeButton) }, (s = F == null ? void 0 : F.close) != null ? s : mI) : null, p.jsx || ga(p.title) ? p.jsx ? p.jsx : typeof p.title == "function" ? p.title() : p.title : M.createElement(M.Fragment, null, $e || p.icon || p.promise ? M.createElement("div", { "data-icon": "", className: un(E == null ? void 0 : E.icon, (a = p == null ? void 0 : p.classNames) == null ? void 0 : a.icon) }, p.promise || p.type === "loading" && !p.icon ? p.icon || et() : null, p.type !== "loading" ? p.icon || (F == null ? void 0 : F[$e]) || lI($e) : null) : null, M.createElement("div", { "data-content": "", className: un(E == null ? void 0 : E.content, (i = p == null ? void 0 : p.classNames) == null ? void 0 : i.content) }, M.createElement("div", { "data-title": "", className: un(E == null ? void 0 : E.title, (l = p == null ? void 0 : p.classNames) == null ? void 0 : l.title) }, typeof p.title == "function" ? p.title() : p.title), p.description ? M.createElement("div", { "data-description": "", className: un(H, Pt, E == null ? void 0 : E.description, (c = p == null ? void 0 : p.classNames) == null ? void 0 : c.description) }, typeof p.description == "function" ? p.description() : p.description) : null), ga(p.cancel) ? p.cancel : p.cancel && Go(p.cancel) ? M.createElement("button", { "data-button": !0, "data-cancel": !0, style: p.cancelButtonStyle || O, onClick: (xe) => {
19605
+ var Fe, Ge;
19606
+ Go(p.cancel) && Ue && ((Ge = (Fe = p.cancel).onClick) == null || Ge.call(Fe, xe), pe());
19607
+ }, className: un(E == null ? void 0 : E.cancelButton, (d = p == null ? void 0 : p.classNames) == null ? void 0 : d.cancelButton) }, p.cancel.label) : null, ga(p.action) ? p.action : p.action && Go(p.action) ? M.createElement("button", { "data-button": !0, "data-action": !0, style: p.actionButtonStyle || $, onClick: (xe) => {
19608
+ var Fe, Ge;
19609
+ Go(p.action) && ((Ge = (Fe = p.action).onClick) == null || Ge.call(Fe, xe), !xe.defaultPrevented && pe());
19610
+ }, className: un(E == null ? void 0 : E.actionButton, (f = p == null ? void 0 : p.classNames) == null ? void 0 : f.actionButton) }, p.action.label) : null));
19611
19611
  };
19612
19612
  function Nu() {
19613
19613
  if (typeof window > "u" || typeof document > "u") return "ltr";
@@ -19629,7 +19629,7 @@ function PI(e, t) {
19629
19629
  }), n;
19630
19630
  }
19631
19631
  var MI = Og(function(e, t) {
19632
- let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: p, duration: m, style: f, visibleToasts: v = CI, toastOptions: g, dir: x = Nu(), gap: b = II, loadingIcon: w, icons: y, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: S } = e, [T, k] = M.useState([]), R = M.useMemo(() => Array.from(new Set([r].concat(T.filter((A) => A.position).map((A) => A.position)))), [T, r]), [_, O] = M.useState([]), [$, W] = M.useState(!1), [H, N] = M.useState(!1), [K, V] = M.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), D = M.useRef(null), j = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), E = M.useRef(null), F = M.useRef(!1), G = M.useCallback((A) => {
19632
+ let { invert: n, position: r = "bottom-right", hotkey: o = ["altKey", "KeyT"], expand: s, closeButton: a, className: i, offset: l, mobileOffset: c, theme: d = "light", richColors: f, duration: m, style: p, visibleToasts: v = CI, toastOptions: g, dir: x = Nu(), gap: b = II, loadingIcon: w, icons: y, containerAriaLabel: C = "Notifications", pauseWhenPageIsHidden: S } = e, [T, k] = M.useState([]), R = M.useMemo(() => Array.from(new Set([r].concat(T.filter((A) => A.position).map((A) => A.position)))), [T, r]), [_, O] = M.useState([]), [$, W] = M.useState(!1), [H, N] = M.useState(!1), [K, V] = M.useState(d !== "system" ? d : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), D = M.useRef(null), j = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), E = M.useRef(null), F = M.useRef(!1), G = M.useCallback((A) => {
19633
19633
  k((P) => {
19634
19634
  var q;
19635
19635
  return (q = P.find((X) => X.id === A.id)) != null && q.delete || Kt.dismiss(A.id), P.filter(({ id: X }) => X !== A.id);
@@ -19683,7 +19683,7 @@ var MI = Og(function(e, t) {
19683
19683
  }, [D.current]), M.createElement("section", { ref: t, "aria-label": `${C} ${j}`, tabIndex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false", suppressHydrationWarning: !0 }, R.map((A, P) => {
19684
19684
  var q;
19685
19685
  let [X, oe] = A.split("-");
19686
- return T.length ? M.createElement("ol", { key: A, dir: x === "auto" ? Nu() : x, tabIndex: -1, ref: D, className: i, "data-sonner-toaster": !0, "data-theme": K, "data-y-position": X, "data-lifted": $ && T.length > 1 && !s, "data-x-position": oe, style: { "--front-toast-height": `${((q = _[0]) == null ? void 0 : q.height) || 0}px`, "--width": `${RI}px`, "--gap": `${b}px`, ...f, ...PI(l, c) }, onBlur: (U) => {
19686
+ return T.length ? M.createElement("ol", { key: A, dir: x === "auto" ? Nu() : x, tabIndex: -1, ref: D, className: i, "data-sonner-toaster": !0, "data-theme": K, "data-y-position": X, "data-lifted": $ && T.length > 1 && !s, "data-x-position": oe, style: { "--front-toast-height": `${((q = _[0]) == null ? void 0 : q.height) || 0}px`, "--width": `${RI}px`, "--gap": `${b}px`, ...p, ...PI(l, c) }, onBlur: (U) => {
19687
19687
  F.current && !U.currentTarget.contains(U.relatedTarget) && (F.current = !1, E.current && (E.current.focus({ preventScroll: !0 }), E.current = null));
19688
19688
  }, onFocus: (U) => {
19689
19689
  U.target instanceof HTMLElement && U.target.dataset.dismissible === "false" || F.current || (F.current = !0, E.current = U.relatedTarget);
@@ -19693,7 +19693,7 @@ var MI = Og(function(e, t) {
19693
19693
  U.target instanceof HTMLElement && U.target.dataset.dismissible === "false" || N(!0);
19694
19694
  }, onPointerUp: () => N(!1) }, T.filter((U) => !U.position && P === 0 || U.position === A).map((U, L) => {
19695
19695
  var Y, Q;
19696
- return M.createElement(_I, { key: U.id, icons: y, index: L, toast: U, defaultRichColors: p, duration: (Y = g == null ? void 0 : g.duration) != null ? Y : m, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (Q = g == null ? void 0 : g.closeButton) != null ? Q : a, interacting: H, position: A, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: G, toasts: T.filter((J) => J.position == U.position), heights: _.filter((J) => J.position == U.position), setHeights: O, expandByDefault: s, gap: b, loadingIcon: w, expanded: $, pauseWhenPageIsHidden: S, swipeDirections: e.swipeDirections });
19696
+ return M.createElement(_I, { key: U.id, icons: y, index: L, toast: U, defaultRichColors: f, duration: (Y = g == null ? void 0 : g.duration) != null ? Y : m, className: g == null ? void 0 : g.className, descriptionClassName: g == null ? void 0 : g.descriptionClassName, invert: n, visibleToasts: v, closeButton: (Q = g == null ? void 0 : g.closeButton) != null ? Q : a, interacting: H, position: A, style: g == null ? void 0 : g.style, unstyled: g == null ? void 0 : g.unstyled, classNames: g == null ? void 0 : g.classNames, cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle, actionButtonStyle: g == null ? void 0 : g.actionButtonStyle, removeToast: G, toasts: T.filter((J) => J.position == U.position), heights: _.filter((J) => J.position == U.position), setHeights: O, expandByDefault: s, gap: b, loadingIcon: w, expanded: $, pauseWhenPageIsHidden: S, swipeDirections: e.swipeDirections });
19697
19697
  })) : null;
19698
19698
  }));
19699
19699
  });