teodor-new-chat-ui 4.3.461 → 4.3.463

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
@@ -9,7 +9,7 @@ import { clsx as Bg } from "clsx";
9
9
  import { twMerge as zg } from "tailwind-merge";
10
10
  import * as vo from "react-dom";
11
11
  import Ri from "react-dom";
12
- import { ChevronRight as ju, Check as Ns, Circle as Hg, Square as Ug, Send as Wg, X as Qn, ExternalLink as _u, Download as Vg, Image as Kg, FileText as Ul, Loader as us, Search as Pu, ChevronUp as Ii, ChevronDown as As, ChevronLeft as qg, Copy as Mu, Edit as Ou, RotateCcw as Du, Bot as va, Wrench as Gg, User as Yg, Loader2 as Xn, Edit3 as wo, Paperclip as Wl, Plus as Xg, FileSpreadsheet as Jg, Calendar as Zg, MoreHorizontal as Lu, Share2 as Qg, Trash2 as ex, MessageSquare as $u, Maximize2 as tx, Minimize2 as nx, History as rx } from "lucide-react";
12
+ import { ChevronRight as ju, Check as Ns, Circle as Hg, Square as Ug, Send as Wg, X as er, ExternalLink as _u, Download as Vg, Image as Kg, FileText as Ul, Loader as us, Search as Pu, ChevronUp as Ii, ChevronDown as As, ChevronLeft as qg, Copy as Mu, Edit as Ou, RotateCcw as Du, Bot as va, Wrench as Gg, User as Yg, Loader2 as Jn, Edit3 as wo, Paperclip as Wl, Plus as Xg, FileSpreadsheet as Jg, Calendar as Zg, MoreHorizontal as Lu, Share2 as Qg, Trash2 as ex, MessageSquare as $u, Maximize2 as tx, Minimize2 as nx, History as rx } from "lucide-react";
13
13
  const Vl = 120;
14
14
  function ox(e) {
15
15
  if (!Array.isArray(e))
@@ -134,11 +134,11 @@ function VI(e, t) {
134
134
  function ix(e) {
135
135
  return Ue(() => sx(e), [e]);
136
136
  }
137
- function er(e) {
137
+ function tr(e) {
138
138
  if (!(!e || typeof e != "object" || Array.isArray(e)))
139
139
  return { ...e };
140
140
  }
141
- function Gn(e, t) {
141
+ function Yn(e, t) {
142
142
  if (e)
143
143
  for (const n of t) {
144
144
  const r = e[n];
@@ -156,11 +156,11 @@ function lx(e, t) {
156
156
  return null;
157
157
  }
158
158
  function Kl(e) {
159
- const t = er(e);
159
+ const t = tr(e);
160
160
  if (t)
161
- return er(t.configurable) ?? t;
161
+ return tr(t.configurable) ?? t;
162
162
  }
163
- function Yn(e) {
163
+ function Xn(e) {
164
164
  const r = [...(Array.isArray(e == null ? void 0 : e.checkpoints) ? (e == null ? void 0 : e.checkpoints) ?? [] : e != null && e.checkpoints ? Object.values(e.checkpoints) : []).map((s, a) => cx(s, a)).filter((s) => !!s)].sort((s, a) => ql(a.createdAt) - ql(s.createdAt)), o = r[0] ?? null;
165
165
  return {
166
166
  threadId: (e == null ? void 0 : e.threadId) ?? "",
@@ -172,10 +172,10 @@ function Yn(e) {
172
172
  function cx(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) => ux(C)).filter((C) => !!C), o = er(e.metadata) ?? {}, s = Kl(e.config), a = er(e.parent_config ?? e.parentConfig), i = Kl(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) => ux(C)).filter((C) => !!C), o = tr(e.metadata) ?? {}, s = Kl(e.config), a = tr(e.parent_config ?? e.parentConfig), i = Kl(a), l = Yn(s, ["checkpoint_id", "checkpointId"]), c = Yn(s, ["checkpoint_ns", "checkpointNs"]), d = Yn(i, ["checkpoint_id", "checkpointId"]), p = Yn(i, ["checkpoint_id", "checkpointId"]) ?? null, m = Yn(i, ["checkpoint_ns", "checkpointNs"]) ?? null, f = tr(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: lx(o, ["step"]) ?? 0,
178
- source: Gn(o, ["source"]) ?? null
178
+ source: Yn(o, ["source"]) ?? null
179
179
  }, w = r.map((C) => ({
180
180
  ...C,
181
181
  checkpointId: l ?? null
@@ -544,8 +544,8 @@ function xx() {
544
544
  } finally {
545
545
  J = !1, ne.current = tt, $(), Error.prepareStackTrace = Xe;
546
546
  }
547
- var vr = I ? I.displayName || I.name : "", qn = vr ? D(vr) : "";
548
- return typeof I == "function" && Q.set(I, qn), qn;
547
+ var vr = I ? I.displayName || I.name : "", Gn = vr ? D(vr) : "";
548
+ return typeof I == "function" && Q.set(I, Gn), Gn;
549
549
  }
550
550
  function ae(I, ee, de) {
551
551
  return z(I, !1);
@@ -867,17 +867,17 @@ Check the top-level render call using <` + de + ">.");
867
867
  Ct(pt, I);
868
868
  }
869
869
  if (ye.call(ee, "key")) {
870
- var qn = H(I), Wt = Object.keys(ee).filter(function(Ag) {
870
+ var Gn = H(I), Wt = Object.keys(ee).filter(function(Ag) {
871
871
  return Ag !== "key";
872
872
  }), ga = Wt.length > 0 ? "{key: someKey, " + Wt.join(": ..., ") + ": ...}" : "{key: someKey}";
873
- if (!Ot[qn + ga]) {
873
+ if (!Ot[Gn + ga]) {
874
874
  var Ng = Wt.length > 0 ? "{" + Wt.join(": ..., ") + ": ...}" : "{}";
875
875
  w(`A props object containing a "key" prop is being spread into JSX:
876
876
  let props = %s;
877
877
  <%s {...props} />
878
878
  React keys must be passed directly to JSX without using spread:
879
879
  let props = %s;
880
- <%s key={someKey} {...props} />`, ga, qn, Ng, qn), Ot[qn + ga] = !0;
880
+ <%s key={someKey} {...props} />`, ga, Gn, Ng, Gn), Ot[Gn + ga] = !0;
881
881
  }
882
882
  }
883
883
  return I === r ? Nt(it) : Et(it), it;
@@ -1031,7 +1031,7 @@ function Wu(e, t) {
1031
1031
  return o;
1032
1032
  return null;
1033
1033
  }
1034
- const Jn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Vu = (e) => !Nr(e) && e !== Jn;
1034
+ const Zn = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Vu = (e) => !Nr(e) && e !== Zn;
1035
1035
  function Ka() {
1036
1036
  const { caseless: e, skipUndefined: t } = Vu(this) && this || {}, n = {}, r = (o, s) => {
1037
1037
  const a = e && Wu(n, s) || s;
@@ -1140,14 +1140,14 @@ const Zx = (e) => {
1140
1140
  return r;
1141
1141
  };
1142
1142
  return n(e, 0);
1143
- }, Qx = gn("AsyncFunction"), ev = (e) => e && (yo(e) || qt(e)) && qt(e.then) && qt(e.catch), qu = ((e, t) => e ? setImmediate : t ? ((n, r) => (Jn.addEventListener("message", ({ source: o, data: s }) => {
1144
- o === Jn && s === n && r.length && r.shift()();
1143
+ }, Qx = gn("AsyncFunction"), ev = (e) => e && (yo(e) || qt(e)) && qt(e.then) && qt(e.catch), qu = ((e, t) => e ? setImmediate : t ? ((n, r) => (Zn.addEventListener("message", ({ source: o, data: s }) => {
1144
+ o === Zn && s === n && r.length && r.shift()();
1145
1145
  }, !1), (o) => {
1146
- r.push(o), Jn.postMessage(n, "*");
1146
+ r.push(o), Zn.postMessage(n, "*");
1147
1147
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
1148
1148
  typeof setImmediate == "function",
1149
- qt(Jn.postMessage)
1150
- ), tv = typeof queueMicrotask < "u" ? queueMicrotask.bind(Jn) : typeof process < "u" && process.nextTick || qu, nv = (e) => e != null && qt(e[js]), W = {
1149
+ qt(Zn.postMessage)
1150
+ ), tv = typeof queueMicrotask < "u" ? queueMicrotask.bind(Zn) : typeof process < "u" && process.nextTick || qu, nv = (e) => e != null && qt(e[js]), W = {
1151
1151
  isArray: Dr,
1152
1152
  isArrayBuffer: Hu,
1153
1153
  isBuffer: bo,
@@ -1197,7 +1197,7 @@ const Zx = (e) => {
1197
1197
  noop: Yx,
1198
1198
  toFiniteNumber: Xx,
1199
1199
  findKey: Wu,
1200
- global: Jn,
1200
+ global: Zn,
1201
1201
  isContextDefined: Vu,
1202
1202
  isSpecCompliantForm: Jx,
1203
1203
  toJSONObject: Zx,
@@ -1905,7 +1905,7 @@ function rd(e, t, n) {
1905
1905
  return e && (r || n == !1) ? jv(e, t) : t;
1906
1906
  }
1907
1907
  const rc = (e) => e instanceof Gt ? { ...e } : e;
1908
- function sr(e, t) {
1908
+ function ar(e, t) {
1909
1909
  t = t || {};
1910
1910
  const n = {};
1911
1911
  function r(c, d, p, m) {
@@ -1970,7 +1970,7 @@ function sr(e, t) {
1970
1970
  }), n;
1971
1971
  }
1972
1972
  const od = (e) => {
1973
- const t = sr({}, e);
1973
+ const t = ar({}, e);
1974
1974
  let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: a, auth: i } = t;
1975
1975
  if (t.headers = a = Gt.from(a), t.url = Zu(rd(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), i && a.set(
1976
1976
  "Authorization",
@@ -2403,7 +2403,7 @@ const Qo = {
2403
2403
  assertOptions: Hv,
2404
2404
  validators: Os
2405
2405
  }, wn = Qo.validators;
2406
- let tr = class {
2406
+ let nr = class {
2407
2407
  constructor(t) {
2408
2408
  this.defaults = t || {}, this.interceptors = {
2409
2409
  request: new Ql(),
@@ -2436,7 +2436,7 @@ let tr = class {
2436
2436
  }
2437
2437
  }
2438
2438
  _request(t, n) {
2439
- typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = sr(this.defaults, n);
2439
+ typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = ar(this.defaults, n);
2440
2440
  const { transitional: r, paramsSerializer: o, headers: s } = n;
2441
2441
  r !== void 0 && Qo.assertOptions(r, {
2442
2442
  silentJSONParsing: wn.transitional(wn.boolean),
@@ -2498,14 +2498,14 @@ let tr = class {
2498
2498
  return d;
2499
2499
  }
2500
2500
  getUri(t) {
2501
- t = sr(this.defaults, t);
2501
+ t = ar(this.defaults, t);
2502
2502
  const n = rd(t.baseURL, t.url, t.allowAbsoluteUrls);
2503
2503
  return Zu(n, t.params, t.paramsSerializer);
2504
2504
  }
2505
2505
  };
2506
2506
  W.forEach(["delete", "get", "head", "options"], function(t) {
2507
- tr.prototype[t] = function(n, r) {
2508
- return this.request(sr(r || {}, {
2507
+ nr.prototype[t] = function(n, r) {
2508
+ return this.request(ar(r || {}, {
2509
2509
  method: t,
2510
2510
  url: n,
2511
2511
  data: (r || {}).data
@@ -2515,7 +2515,7 @@ W.forEach(["delete", "get", "head", "options"], function(t) {
2515
2515
  W.forEach(["post", "put", "patch"], function(t) {
2516
2516
  function n(r) {
2517
2517
  return function(s, a, i) {
2518
- return this.request(sr(i || {}, {
2518
+ return this.request(ar(i || {}, {
2519
2519
  method: t,
2520
2520
  headers: r ? {
2521
2521
  "Content-Type": "multipart/form-data"
@@ -2525,7 +2525,7 @@ W.forEach(["post", "put", "patch"], function(t) {
2525
2525
  }));
2526
2526
  };
2527
2527
  }
2528
- tr.prototype[t] = n(), tr.prototype[t + "Form"] = n(!0);
2528
+ nr.prototype[t] = n(), nr.prototype[t + "Form"] = n(!0);
2529
2529
  });
2530
2530
  let Uv = class ld {
2531
2531
  constructor(t) {
@@ -2677,13 +2677,13 @@ Object.entries(Xa).forEach(([e, t]) => {
2677
2677
  Xa[t] = e;
2678
2678
  });
2679
2679
  function cd(e) {
2680
- const t = new tr(e), n = Bu(tr.prototype.request, t);
2681
- return W.extend(n, tr.prototype, t, { allOwnKeys: !0 }), W.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2682
- return cd(sr(e, o));
2680
+ const t = new nr(e), n = Bu(nr.prototype.request, t);
2681
+ return W.extend(n, nr.prototype, t, { allOwnKeys: !0 }), W.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
2682
+ return cd(ar(e, o));
2683
2683
  }, n;
2684
2684
  }
2685
2685
  const wt = cd(To);
2686
- wt.Axios = tr;
2686
+ wt.Axios = nr;
2687
2687
  wt.CanceledError = Lr;
2688
2688
  wt.CancelToken = Uv;
2689
2689
  wt.isCancel = td;
@@ -2696,7 +2696,7 @@ wt.all = function(t) {
2696
2696
  };
2697
2697
  wt.spread = Wv;
2698
2698
  wt.isAxiosError = Vv;
2699
- wt.mergeConfig = sr;
2699
+ wt.mergeConfig = ar;
2700
2700
  wt.AxiosHeaders = Gt;
2701
2701
  wt.formToJSON = (e) => ed(W.isHTMLForm(e) ? new FormData(e) : e);
2702
2702
  wt.getAdapter = ad.getAdapter;
@@ -2869,7 +2869,7 @@ class _i {
2869
2869
  return Vt(r);
2870
2870
  }
2871
2871
  }
2872
- const ar = new _i(), dN = _i, fN = _i;
2872
+ const Mn = new _i(), dN = _i, fN = _i;
2873
2873
  async function Pi(e, t) {
2874
2874
  return await rn(e, {
2875
2875
  responseType: "blob",
@@ -2913,7 +2913,7 @@ async function Zv(e, t = 50, n = 0) {
2913
2913
  }
2914
2914
  const ud = Mr(null);
2915
2915
  function Qv({ children: e, apiConfig: t }) {
2916
- const n = ar;
2916
+ const n = Mn;
2917
2917
  if (t) {
2918
2918
  const o = n.baseUrl, s = n.getAuthToken();
2919
2919
  t.baseUrl && t.baseUrl !== o && n.updateConfig({
@@ -2966,7 +2966,7 @@ function Ds() {
2966
2966
  return e;
2967
2967
  }
2968
2968
  function nw(e) {
2969
- return !!e && typeof e == "object" && e.protocolVersion === "v1" && "data" in e;
2969
+ return !!e && typeof e == "object" && "data" in e;
2970
2970
  }
2971
2971
  function Ta(e) {
2972
2972
  return e.filter((t) => {
@@ -3072,8 +3072,12 @@ function aw(e = {}) {
3072
3072
  lastText: ""
3073
3073
  };
3074
3074
  }, []), Y = me(() => {
3075
- var F;
3076
- console.debug("[use-chat] stop() invoked - aborting stream"), (F = S.current) == null || F.abort(), S.current = null, R.current = null, l(!1), w(!1), E.current = 0, x(0);
3075
+ var P, k;
3076
+ console.debug("[use-chat] stop() invoked - aborting stream");
3077
+ const F = (P = R.current) == null ? void 0 : P.threadId;
3078
+ F && Mn.cancelRun(F).catch((V) => {
3079
+ console.warn("[use-chat] cancel run failed:", V);
3080
+ }), (k = S.current) == null || k.abort(), S.current = null, R.current = null, l(!1), w(!1), E.current = 0, x(0);
3077
3081
  }, []), q = me(
3078
3082
  (F, P, k) => {
3079
3083
  S.current && (S.current.abort(), S.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && m(""), v(null), _.current = null, O.current = null, L.current = null, C(null), K.current = {
@@ -3244,7 +3248,7 @@ function aw(e = {}) {
3244
3248
  else if (Ae.type === "state_history") {
3245
3249
  L.current = Ae;
3246
3250
  try {
3247
- const ut = Yn(Ae).latest;
3251
+ const ut = Xn(Ae).latest;
3248
3252
  ut && (_.current = ut.checkpointId ?? null, O.current = ut.checkpointNs ?? null, v(ut.checkpointId ?? null));
3249
3253
  } catch (Ze) {
3250
3254
  console.warn("[use-chat] Failed to hydrate state_history payload", Ze);
@@ -3952,7 +3956,7 @@ function bc(e, t) {
3952
3956
  return { ...e, messages: [...e.messages, s] };
3953
3957
  }
3954
3958
  if (t.type === "state_history") {
3955
- const s = Yn(t), a = s.interrupt, i = s.latest, l = a === null ? rw(e.messages) : e.messages;
3959
+ const s = Xn(t), a = s.interrupt, i = s.latest, l = a === null ? rw(e.messages) : e.messages;
3956
3960
  return {
3957
3961
  ...e,
3958
3962
  messages: l,
@@ -4096,7 +4100,7 @@ function Rw({
4096
4100
  getMessages: d
4097
4101
  }) {
4098
4102
  const [p, m] = fe(null), v = Ue(
4099
- () => Yn(p),
4103
+ () => Xn(p),
4100
4104
  [p]
4101
4105
  ).checkpoints, g = ix(v), x = g.timeline, [b, w] = fe(!1), [y, C] = fe(null), [S, T] = fe(!1), [E, R] = fe(!1), [_, O] = fe(!1), [L, K] = fe(null), H = Le(o), N = Le(null), Y = Le(null), q = Le(null), F = Le(null), P = Le(null), k = Le(/* @__PURE__ */ new Map());
4102
4106
  Qe(() => {
@@ -4143,7 +4147,7 @@ function Rw({
4143
4147
  );
4144
4148
  return;
4145
4149
  }
4146
- const { checkpoints: Ne } = Yn(Ce), Ee = Ne.find((at) => at.messages && at.messages.length > 0) ?? (z ? Ne.find((at) => at.checkpointId === z) : null) ?? Ne[0];
4150
+ const { checkpoints: Ne } = Xn(Ce), Ee = Ne.find((at) => at.messages && at.messages.length > 0) ?? (z ? Ne.find((at) => at.checkpointId === z) : null) ?? Ne[0];
4147
4151
  t((Ee == null ? void 0 : Ee.messages) ?? [], {
4148
4152
  checkpointId: (Ee == null ? void 0 : Ee.checkpointId) ?? null,
4149
4153
  checkpointNs: (Ee == null ? void 0 : Ee.checkpointNs) ?? null
@@ -4178,7 +4182,7 @@ function Rw({
4178
4182
  const z = Z.threadId ?? H.current;
4179
4183
  if (!z || H.current && H.current !== z)
4180
4184
  return;
4181
- const { checkpoints: ae } = Yn(Z);
4185
+ const { checkpoints: ae } = Xn(Z);
4182
4186
  if (!ae.length)
4183
4187
  return;
4184
4188
  const se = ae.find((ye) => ye.messages && ye.messages.length > 0) ?? ae.find((ye) => !!ye.checkpointId) ?? ae[0], ge = q.current === z;
@@ -4206,7 +4210,7 @@ function Rw({
4206
4210
  );
4207
4211
  return;
4208
4212
  }
4209
- const { checkpoints: ye } = Yn(ge), Ce = ye.find(
4213
+ const { checkpoints: ye } = Xn(ge), Ce = ye.find(
4210
4214
  (Ne) => Ne.checkpointId === Z && (z ? Ne.checkpointNs === z : !0)
4211
4215
  );
4212
4216
  if (!Ce) {
@@ -4244,7 +4248,7 @@ function Rw({
4244
4248
  });
4245
4249
  if (H.current !== z)
4246
4250
  return;
4247
- const { checkpoints: se } = Yn(ae);
4251
+ const { checkpoints: se } = Xn(ae);
4248
4252
  if (se.length > 0) {
4249
4253
  const ge = se[se.length - 1];
4250
4254
  n((ge == null ? void 0 : ge.messages) ?? []), w(!!(ge != null && ge.nextCursor)), C((ge == null ? void 0 : ge.nextCursor) ?? null);
@@ -4449,10 +4453,10 @@ function Nw({
4449
4453
  }
4450
4454
  function yc(e, t) {
4451
4455
  if (!e) return null;
4452
- const n = er(e);
4456
+ const n = tr(e);
4453
4457
  if (!n) return null;
4454
- const r = er(n.configurable) ?? n;
4455
- return Gn(r, t) ?? null;
4458
+ const r = tr(n.configurable) ?? n;
4459
+ return Yn(r, t) ?? null;
4456
4460
  }
4457
4461
  function Aw(e) {
4458
4462
  const t = yc(e, ["checkpoint_id", "checkpointId"]);
@@ -4773,11 +4777,11 @@ function Fw() {
4773
4777
  return t && (e.baseUrl = t), n && (e.apiKey = n), e;
4774
4778
  }
4775
4779
  function Bw() {
4776
- const e = Fw(), t = ar.getAuthToken(), n = Td();
4780
+ const e = Fw(), t = Mn.getAuthToken(), n = Td();
4777
4781
  return {
4778
4782
  apiBaseUrl: Ed(
4779
4783
  e.baseUrl,
4780
- ar.baseUrl,
4784
+ Mn.baseUrl,
4781
4785
  n
4782
4786
  ),
4783
4787
  apiKey: t || e.apiKey || Cd() || "",
@@ -4807,13 +4811,13 @@ function Hw(e) {
4807
4811
  ...e,
4808
4812
  apiBaseUrl: An(e.apiBaseUrl)
4809
4813
  };
4810
- localStorage.setItem(kd, JSON.stringify(t)), t.apiKey && ar.setAuthToken(t.apiKey);
4814
+ localStorage.setItem(kd, JSON.stringify(t)), t.apiKey && Mn.setAuthToken(t.apiKey);
4811
4815
  } catch (t) {
4812
4816
  console.error("Failed to save settings:", t);
4813
4817
  }
4814
4818
  }
4815
4819
  function gN() {
4816
- const e = Bw(), t = zw(), n = ar.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
4820
+ const e = Bw(), t = zw(), n = Mn.getAuthToken(), r = typeof t.apiBaseUrl == "string" ? t.apiBaseUrl : void 0;
4817
4821
  return {
4818
4822
  ...e,
4819
4823
  ...t,
@@ -4821,14 +4825,14 @@ function gN() {
4821
4825
  apiKey: n || t.apiKey || e.apiKey,
4822
4826
  // Always use the current base URL from API client
4823
4827
  apiBaseUrl: Ed(
4824
- ar.baseUrl,
4828
+ Mn.baseUrl,
4825
4829
  r,
4826
4830
  e.apiBaseUrl
4827
4831
  )
4828
4832
  };
4829
4833
  }
4830
4834
  function xN(e) {
4831
- ar.updateConfig({
4835
+ Mn.updateConfig({
4832
4836
  baseUrl: e.apiBaseUrl,
4833
4837
  authToken: e.apiKey ?? void 0
4834
4838
  }), Hw(e);
@@ -4885,7 +4889,7 @@ function Tc(e, t) {
4885
4889
  return e(t);
4886
4890
  e != null && (e.current = t);
4887
4891
  }
4888
- function Mn(...e) {
4892
+ function On(...e) {
4889
4893
  return (t) => {
4890
4894
  let n = !1;
4891
4895
  const r = e.map((o) => {
@@ -4902,7 +4906,7 @@ function Mn(...e) {
4902
4906
  };
4903
4907
  }
4904
4908
  function Be(...e) {
4905
- return h.useCallback(Mn(...e), e);
4909
+ return h.useCallback(On(...e), e);
4906
4910
  }
4907
4911
  function Ww(e, t) {
4908
4912
  const n = h.createContext(t), r = (s) => {
@@ -4970,7 +4974,7 @@ function Vw(...e) {
4970
4974
  }
4971
4975
  var At = globalThis != null && globalThis.document ? h.useLayoutEffect : () => {
4972
4976
  }, Kw = h[" useInsertionEffect ".trim().toString()] || At;
4973
- function On({
4977
+ function Dn({
4974
4978
  prop: e,
4975
4979
  defaultProp: t,
4976
4980
  onChange: n = () => {
@@ -5375,7 +5379,7 @@ function Bt(e) {
5375
5379
  n((r) => r ?? String(hb++));
5376
5380
  }, [e]), t ? `radix-${t}` : "";
5377
5381
  }
5378
- const mb = ["top", "right", "bottom", "left"], Dn = Math.min, Zt = Math.max, ps = Math.round, Fo = Math.floor, Cn = (e) => ({
5382
+ const mb = ["top", "right", "bottom", "left"], Ln = Math.min, Zt = Math.max, ps = Math.round, Fo = Math.floor, Cn = (e) => ({
5379
5383
  x: e,
5380
5384
  y: e
5381
5385
  }), gb = {
@@ -5388,7 +5392,7 @@ const mb = ["top", "right", "bottom", "left"], Dn = Math.min, Zt = Math.max, ps
5388
5392
  end: "start"
5389
5393
  };
5390
5394
  function ei(e, t, n) {
5391
- return Zt(e, Dn(t, n));
5395
+ return Zt(e, Ln(t, n));
5392
5396
  }
5393
5397
  function jn(e, t) {
5394
5398
  return typeof e == "function" ? e(t) : e;
@@ -5659,7 +5663,7 @@ const Rb = (e) => ({
5659
5663
  }, f = Hi(o), v = zi(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));
5660
5664
  let E = T ? T[y] : 0;
5661
5665
  (!E || !await (a.isElement == null ? void 0 : a.isElement(T))) && (E = i.floating[y] || s.floating[v]);
5662
- const R = C / 2 - S / 2, _ = E / 2 - g[v] / 2 - 1, O = Dn(p[b], _), L = Dn(p[w], _), K = O, H = E - g[v] - L, N = E / 2 - g[v] / 2 + R, Y = ei(K, N, H), q = !l.arrow && Fr(o) != null && N !== Y && s.reference[v] / 2 - (N < K ? O : L) - g[v] / 2 < 0, F = q ? N < K ? N - K : N - H : 0;
5666
+ const R = C / 2 - S / 2, _ = E / 2 - g[v] / 2 - 1, O = Ln(p[b], _), L = Ln(p[w], _), K = O, H = E - g[v] - L, N = E / 2 - g[v] / 2 + R, Y = ei(K, N, H), q = !l.arrow && Fr(o) != null && N !== Y && s.reference[v] / 2 - (N < K ? O : L) - g[v] / 2 < 0, F = q ? N < K ? N - K : N - H : 0;
5663
5667
  return {
5664
5668
  [f]: m[f] + F,
5665
5669
  data: {
@@ -5975,7 +5979,7 @@ const jb = function(e) {
5975
5979
  } = s.floating;
5976
5980
  let x, b;
5977
5981
  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");
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;
5982
+ const w = g - d.top - d.bottom, y = v - d.left - d.right, C = Ln(g - d[x], w), S = Ln(v - d[b], y), T = !t.middlewareData.shift;
5979
5983
  let E = C, R = S;
5980
5984
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (R = y), (r = t.middlewareData.shift) != null && r.enabled.y && (E = w), T && !m) {
5981
5985
  const O = Zt(d.left, 0), L = Zt(d.right, 0), K = Zt(d.top, 0), H = Zt(d.bottom, 0);
@@ -6051,13 +6055,13 @@ function Ui(e) {
6051
6055
  return Fb.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Bb.some((r) => (n.willChange || "").includes(r)) || zb.some((r) => (n.contain || "").includes(r));
6052
6056
  }
6053
6057
  function Hb(e) {
6054
- let t = Ln(e);
6058
+ let t = $n(e);
6055
6059
  for (; En(t) && !jr(t); ) {
6056
6060
  if (Ui(t))
6057
6061
  return t;
6058
6062
  if (Hs(t))
6059
6063
  return null;
6060
- t = Ln(t);
6064
+ t = $n(t);
6061
6065
  }
6062
6066
  return null;
6063
6067
  }
@@ -6080,7 +6084,7 @@ function Us(e) {
6080
6084
  scrollTop: e.scrollY
6081
6085
  };
6082
6086
  }
6083
- function Ln(e) {
6087
+ function $n(e) {
6084
6088
  if (Br(e) === "html")
6085
6089
  return e;
6086
6090
  const t = (
@@ -6093,7 +6097,7 @@ function Ln(e) {
6093
6097
  return Dc(t) ? t.host : t;
6094
6098
  }
6095
6099
  function Md(e) {
6096
- const t = Ln(e);
6100
+ const t = $n(e);
6097
6101
  return jr(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : En(t) && ko(t) ? t : Md(t);
6098
6102
  }
6099
6103
  function io(e, t, n) {
@@ -6273,7 +6277,7 @@ function $c(e, t, n) {
6273
6277
  return ms(r);
6274
6278
  }
6275
6279
  function $d(e, t) {
6276
- const n = Ln(e);
6280
+ const n = $n(e);
6277
6281
  return n === t || !pn(n) || jr(n) ? !1 : hn(n).position === "fixed" || $d(n, t);
6278
6282
  }
6279
6283
  function Zb(e, t) {
@@ -6282,10 +6286,10 @@ function Zb(e, t) {
6282
6286
  return n;
6283
6287
  let r = io(e, [], !1).filter((i) => pn(i) && Br(i) !== "body"), o = null;
6284
6288
  const s = hn(e).position === "fixed";
6285
- let a = s ? Ln(e) : e;
6289
+ let a = s ? $n(e) : e;
6286
6290
  for (; pn(a) && !jr(a); ) {
6287
6291
  const i = hn(a), l = Ui(a);
6288
- !l && i.position === "fixed" && (o = null), (s ? !l && !o : !l && i.position === "static" && !!o && Xb.has(o.position) || ko(a) && !l && $d(e, a)) ? r = r.filter((d) => d !== a) : o = i, a = Ln(a);
6292
+ !l && i.position === "fixed" && (o = null), (s ? !l && !o : !l && i.position === "static" && !!o && Xb.has(o.position) || ko(a) && !l && $d(e, a)) ? r = r.filter((d) => d !== a) : o = i, a = $n(a);
6289
6293
  }
6290
6294
  return t.set(e, r), r;
6291
6295
  }
@@ -6298,7 +6302,7 @@ function Qb(e) {
6298
6302
  } = e;
6299
6303
  const a = [...n === "clippingAncestors" ? Hs(t) ? [] : Zb(t, this._c) : [].concat(n), r], i = a[0], l = a.reduce((c, d) => {
6300
6304
  const p = $c(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;
6305
+ return c.top = Zt(p.top, c.top), c.right = Ln(p.right, c.right), c.bottom = Ln(p.bottom, c.bottom), c.left = Zt(p.left, c.left), c;
6302
6306
  }, $c(t, i, o));
6303
6307
  return {
6304
6308
  width: l.right - l.left,
@@ -6357,11 +6361,11 @@ function Fd(e, t) {
6357
6361
  if (Hs(e))
6358
6362
  return n;
6359
6363
  if (!En(e)) {
6360
- let o = Ln(e);
6364
+ let o = $n(e);
6361
6365
  for (; o && !jr(o); ) {
6362
6366
  if (pn(o) && !Ra(o))
6363
6367
  return o;
6364
- o = Ln(o);
6368
+ o = $n(o);
6365
6369
  }
6366
6370
  return n;
6367
6371
  }
@@ -6419,7 +6423,7 @@ function sy(e, t) {
6419
6423
  return;
6420
6424
  const v = Fo(p), g = Fo(o.clientWidth - (d + m)), x = Fo(o.clientHeight - (p + f)), b = Fo(d), y = {
6421
6425
  rootMargin: -v + "px " + -g + "px " + -x + "px " + -b + "px",
6422
- threshold: Zt(0, Dn(1, l)) || 1
6426
+ threshold: Zt(0, Ln(1, l)) || 1
6423
6427
  };
6424
6428
  let C = !0;
6425
6429
  function S(T) {
@@ -7014,7 +7018,7 @@ var Hy = h.forwardRef((e, t) => {
7014
7018
  onEntryFocus: c,
7015
7019
  preventScrollOnEntryFocus: d = !1,
7016
7020
  ...p
7017
- } = e, m = h.useRef(null), f = Be(t, m), v = Fs(s), [g, x] = On({
7021
+ } = e, m = h.useRef(null), f = Be(t, m), v = Fs(s), [g, x] = Dn({
7018
7022
  prop: a,
7019
7023
  defaultProp: i ?? null,
7020
7024
  onChange: l,
@@ -8119,7 +8123,7 @@ var nS = "MenuSub", [vN, _f] = pr(nS), Jr = "MenuSubTrigger", Pf = h.forwardRef(
8119
8123
  "aria-controls": o.contentId,
8120
8124
  "data-state": Df(n.open),
8121
8125
  ...e,
8122
- ref: Mn(t, o.onTriggerChange),
8126
+ ref: On(t, o.onTriggerChange),
8123
8127
  onClick: (p) => {
8124
8128
  var m;
8125
8129
  (m = e.onClick) == null || m.call(e, p), !(e.disabled || p.defaultPrevented) && (p.currentTarget.focus(), n.open || n.onOpenChange(!0));
@@ -8262,7 +8266,7 @@ var lS = xf, cS = Qi, uS = wf, dS = bf, fS = rl, pS = yf, hS = Gs, mS = Tf, gS =
8262
8266
  defaultOpen: s,
8263
8267
  onOpenChange: a,
8264
8268
  modal: i = !0
8265
- } = e, l = zt(t), c = h.useRef(null), [d, p] = On({
8269
+ } = e, l = zt(t), c = h.useRef(null), [d, p] = Dn({
8266
8270
  prop: o,
8267
8271
  defaultProp: s ?? !1,
8268
8272
  onChange: a,
@@ -8299,7 +8303,7 @@ var Ff = "DropdownMenuTrigger", Bf = h.forwardRef(
8299
8303
  "data-disabled": r ? "" : void 0,
8300
8304
  disabled: r,
8301
8305
  ...o,
8302
- ref: Mn(t, s.triggerRef),
8306
+ ref: On(t, s.triggerRef),
8303
8307
  onPointerDown: le(e.onPointerDown, (i) => {
8304
8308
  !r && i.button === 0 && i.ctrlKey === !1 && (s.onOpenToggle(), s.open || i.preventDefault());
8305
8309
  }),
@@ -8469,7 +8473,7 @@ const Xs = h.forwardRef(({ className: e, sideOffset: t = 4, ...n }, r) => /* @__
8469
8473
  }
8470
8474
  ) }));
8471
8475
  Xs.displayName = Zf.displayName;
8472
- const nr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ u.jsx(
8476
+ const rr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */ u.jsx(
8473
8477
  ep,
8474
8478
  {
8475
8479
  ref: r,
@@ -8481,7 +8485,7 @@ const nr = h.forwardRef(({ className: e, inset: t, ...n }, r) => /* @__PURE__ */
8481
8485
  ...n
8482
8486
  }
8483
8487
  ));
8484
- nr.displayName = ep.displayName;
8488
+ rr.displayName = ep.displayName;
8485
8489
  const VS = h.forwardRef(({ className: e, children: t, checked: n, ...r }, o) => /* @__PURE__ */ u.jsxs(
8486
8490
  tp,
8487
8491
  {
@@ -8683,7 +8687,7 @@ function XS({
8683
8687
  ) })
8684
8688
  ] }) });
8685
8689
  }
8686
- const JS = M.memo(XS), Js = 0, Hn = 1, Hr = 2, lp = 4;
8690
+ const JS = M.memo(XS), Js = 0, Un = 1, Hr = 2, lp = 4;
8687
8691
  function Gc(e) {
8688
8692
  return () => e;
8689
8693
  }
@@ -8719,7 +8723,7 @@ function ct(...e) {
8719
8723
  return e;
8720
8724
  }
8721
8725
  function et(e, t) {
8722
- return e(Hn, t);
8726
+ return e(Un, t);
8723
8727
  }
8724
8728
  function Me(e, t) {
8725
8729
  e(Js, t);
@@ -8734,7 +8738,7 @@ function we(e, t) {
8734
8738
  return et(e, QS(t, Js));
8735
8739
  }
8736
8740
  function fn(e, t) {
8737
- const n = e(Hn, (r) => {
8741
+ const n = e(Un, (r) => {
8738
8742
  n(), t(r);
8739
8743
  });
8740
8744
  return n;
@@ -8776,7 +8780,7 @@ function te(e, ...t) {
8776
8780
  case Hr:
8777
8781
  cl(e);
8778
8782
  return;
8779
- case Hn:
8783
+ case Un:
8780
8784
  return et(e, n(o));
8781
8785
  }
8782
8786
  };
@@ -8824,7 +8828,7 @@ function rT(e) {
8824
8828
  const r = () => t == null ? void 0 : t();
8825
8829
  return function(o, s) {
8826
8830
  switch (o) {
8827
- case Hn:
8831
+ case Un:
8828
8832
  return s ? n === s ? void 0 : (r(), n = s, t = et(e, s), t) : (r(), Ur);
8829
8833
  case Hr:
8830
8834
  r(), n = null;
@@ -8840,7 +8844,7 @@ function oe(e) {
8840
8844
  case Js:
8841
8845
  t = o;
8842
8846
  break;
8843
- case Hn: {
8847
+ case Un: {
8844
8848
  o(t);
8845
8849
  break;
8846
8850
  }
@@ -8865,7 +8869,7 @@ function Ve() {
8865
8869
  case Hr:
8866
8870
  e.splice(0, e.length);
8867
8871
  return;
8868
- case Hn:
8872
+ case Un:
8869
8873
  return e.push(n), () => {
8870
8874
  const r = e.indexOf(n);
8871
8875
  r > -1 && e.splice(r, 1);
@@ -8909,7 +8913,7 @@ function yt(...e) {
8909
8913
  cl(t);
8910
8914
  return;
8911
8915
  }
8912
- case Hn:
8916
+ case Un:
8913
8917
  return r === o && a(n), et(t, a);
8914
8918
  }
8915
8919
  };
@@ -8922,7 +8926,7 @@ function ai(...e) {
8922
8926
  switch (t) {
8923
8927
  case Hr:
8924
8928
  return;
8925
- case Hn:
8929
+ case Un:
8926
8930
  return eT(...e.map((r) => et(r, n)));
8927
8931
  }
8928
8932
  };
@@ -8933,7 +8937,7 @@ const aT = {
8933
8937
  3: "error",
8934
8938
  1: "log",
8935
8939
  2: "warn"
8936
- }, iT = () => typeof globalThis > "u" ? window : globalThis, Un = Je(
8940
+ }, iT = () => typeof globalThis > "u" ? window : globalThis, Wn = Je(
8937
8941
  () => {
8938
8942
  const e = oe(
8939
8943
  3
@@ -9157,8 +9161,8 @@ function ii(e, t) {
9157
9161
  }
9158
9162
  } else return t < n ? ss(kt(e, { l: ii(r, t) })) : ss(kt(e, { r: ii(o, t) }));
9159
9163
  }
9160
- function Zn(e) {
9161
- return rt(e) ? [] : [...Zn(e.l), { k: e.k, v: e.v }, ...Zn(e.r)];
9164
+ function Qn(e) {
9165
+ return rt(e) ? [] : [...Qn(e.l), { k: e.k, v: e.v }, ...Qn(e.r)];
9162
9166
  }
9163
9167
  function li(e, t, n) {
9164
9168
  if (rt(e))
@@ -9272,7 +9276,7 @@ function dT(e, t, n, r) {
9272
9276
  const o = ws(e, t, r), s = ws(e, n, r, o);
9273
9277
  return e.slice(o, s + 1);
9274
9278
  }
9275
- function $n(e, t) {
9279
+ function Fn(e, t) {
9276
9280
  return Math.round(e.getBoundingClientRect()[t]);
9277
9281
  }
9278
9282
  function ea(e) {
@@ -9365,7 +9369,7 @@ function xT(e, [t, n, r, o]) {
9365
9369
  };
9366
9370
  }
9367
9371
  function vT(e) {
9368
- return Zn(e).map(({ k: t, v: n }, r, o) => {
9372
+ return Qn(e).map(({ k: t, v: n }, r, o) => {
9369
9373
  const s = o[r + 1];
9370
9374
  return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: t };
9371
9375
  });
@@ -9411,7 +9415,7 @@ const yT = {
9411
9415
  offsetWidth: "width"
9412
9416
  }, Rn = Je(
9413
9417
  ([{ log: e }, { recalcInProgress: t }]) => {
9414
- const n = Ve(), r = Ve(), o = Ft(r, 0), s = Ve(), a = Ve(), i = oe(0), l = oe([]), c = oe(void 0), d = oe(void 0), p = oe((S, T) => $n(S, yT[T])), m = oe(void 0), f = oe(0), v = fT(), g = Ft(
9418
+ const n = Ve(), r = Ve(), o = Ft(r, 0), s = Ve(), a = Ve(), i = oe(0), l = oe([]), c = oe(void 0), d = oe(void 0), p = oe((S, T) => Fn(S, yT[T])), m = oe(void 0), f = oe(0), v = fT(), g = Ft(
9415
9419
  te(n, Fe(l, e, f), Tn(xT, v), lt()),
9416
9420
  v
9417
9421
  ), x = Ft(
@@ -9532,7 +9536,7 @@ const yT = {
9532
9536
  startIndex: N + 1
9533
9537
  }), K++, L += Y + 1;
9534
9538
  }
9535
- const H = Zn(T.sizeTree);
9539
+ const H = Qn(T.sizeTree);
9536
9540
  return L !== S && H.shift(), H.reduce(
9537
9541
  (N, { k: Y, v: q }) => {
9538
9542
  let F = N.ranges;
@@ -9556,7 +9560,7 @@ const yT = {
9556
9560
  }
9557
9561
  ).ranges;
9558
9562
  }
9559
- return Zn(T.sizeTree).reduce(
9563
+ return Qn(T.sizeTree).reduce(
9560
9564
  (O, { k: L, v: K }) => ({
9561
9565
  prevIndex: L + S,
9562
9566
  prevSize: K,
@@ -9598,7 +9602,7 @@ const yT = {
9598
9602
  const H = _[L + 1] - K - 1;
9599
9603
  L++, O += H + 1;
9600
9604
  }
9601
- if (R = Zn(T.sizeTree).reduce((H, { k: N, v: Y }) => Qt(H, Math.max(0, N + S), Y), R), O !== -S) {
9605
+ if (R = Qn(T.sizeTree).reduce((H, { k: N, v: Y }) => Qt(H, Math.max(0, N + S), Y), R), O !== -S) {
9602
9606
  const H = fo(T.sizeTree, K);
9603
9607
  R = Qt(R, 0, H);
9604
9608
  const N = mn(T.sizeTree, -S + 1)[1];
@@ -9610,7 +9614,7 @@ const yT = {
9610
9614
  ...ui(T.offsetTree, 0, R, E)
9611
9615
  };
9612
9616
  } else {
9613
- const R = Zn(T.sizeTree).reduce((_, { k: O, v: L }) => Qt(_, Math.max(0, O + S), L), Rr());
9617
+ const R = Qn(T.sizeTree).reduce((_, { k: O, v: L }) => Qt(_, Math.max(0, O + S), L), Rr());
9614
9618
  return {
9615
9619
  ...T,
9616
9620
  sizeTree: R,
@@ -9642,7 +9646,7 @@ const yT = {
9642
9646
  unshiftWith: s
9643
9647
  };
9644
9648
  },
9645
- ct(Un, dl),
9649
+ ct(Wn, dl),
9646
9650
  { singleton: !0 }
9647
9651
  );
9648
9652
  function ST(e) {
@@ -9681,7 +9685,7 @@ const yp = Je(
9681
9685
  ), { groupCounts: s, topItemsIndexes: a };
9682
9686
  },
9683
9687
  ct(Rn, Ht)
9684
- ), Wn = Je(
9688
+ ), Vn = Je(
9685
9689
  ([{ log: e }]) => {
9686
9690
  const t = oe(!1), n = tn(
9687
9691
  te(
@@ -9694,7 +9698,7 @@ const yp = Je(
9694
9698
  r && xt(e)("props updated", {}, Yt.DEBUG);
9695
9699
  }), { didMount: n, propsReady: t };
9696
9700
  },
9697
- ct(Un),
9701
+ ct(Wn),
9698
9702
  { singleton: !0 }
9699
9703
  ), TT = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
9700
9704
  function Sp(e) {
@@ -9761,7 +9765,7 @@ const jo = Je(
9761
9765
  topListHeight: g
9762
9766
  };
9763
9767
  },
9764
- ct(Rn, Ht, Un),
9768
+ ct(Rn, Ht, Wn),
9765
9769
  { singleton: !0 }
9766
9770
  );
9767
9771
  function CT(e) {
@@ -9824,7 +9828,7 @@ const _o = Je(
9824
9828
  scrolledToInitialItem: i
9825
9829
  };
9826
9830
  },
9827
- ct(Rn, Ht, jo, Wn),
9831
+ ct(Rn, Ht, jo, Vn),
9828
9832
  { singleton: !0 }
9829
9833
  );
9830
9834
  function Tp(e, t) {
@@ -10288,7 +10292,7 @@ const gr = Je(
10288
10292
  _o,
10289
10293
  jo,
10290
10294
  Po,
10291
- Wn,
10295
+ Vn,
10292
10296
  dl
10293
10297
  ),
10294
10298
  { singleton: !0 }
@@ -10367,7 +10371,7 @@ const gr = Je(
10367
10371
  scrollIntoView: d
10368
10372
  };
10369
10373
  },
10370
- ct(Rn, Ht, jo, gr, Un),
10374
+ ct(Rn, Ht, jo, gr, Wn),
10371
10375
  { singleton: !0 }
10372
10376
  );
10373
10377
  function ou(e) {
@@ -10472,8 +10476,8 @@ const jT = (e, t) => typeof e == "function" ? ou(e(t)) : t && ou(e), _T = Je(
10472
10476
  Po,
10473
10477
  jo,
10474
10478
  _o,
10479
+ Vn,
10475
10480
  Wn,
10476
- Un,
10477
10481
  Ht,
10478
10482
  kp,
10479
10483
  Rp
@@ -10489,7 +10493,7 @@ const jT = (e, t) => typeof e == "function" ? ou(e(t)) : t && ou(e), _T = Je(
10489
10493
  ),
10490
10494
  a
10491
10495
  ), {}),
10492
- ct(Rn, _o, gr, Wn),
10496
+ ct(Rn, _o, gr, Vn),
10493
10497
  { singleton: !0 }
10494
10498
  ), MT = Je(
10495
10499
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
@@ -10519,7 +10523,7 @@ const jT = (e, t) => typeof e == "function" ? ou(e(t)) : t && ou(e), _T = Je(
10519
10523
  initialScrollTop: r
10520
10524
  };
10521
10525
  },
10522
- ct(Wn, Ht, gr),
10526
+ ct(Vn, Ht, gr),
10523
10527
  { singleton: !0 }
10524
10528
  ), Ip = Je(
10525
10529
  ([{ scrollVelocity: e }]) => {
@@ -10614,7 +10618,7 @@ const jT = (e, t) => typeof e == "function" ? ou(e(t)) : t && ou(e), _T = Je(
10614
10618
  restoreStateFrom: d
10615
10619
  };
10616
10620
  },
10617
- ct(Rn, Ht, _o, Wn, gl)
10621
+ ct(Rn, Ht, _o, Vn, gl)
10618
10622
  );
10619
10623
  function DT(e) {
10620
10624
  return { align: "start", index: 0, offset: e.scrollTop };
@@ -10712,7 +10716,7 @@ const $T = Np(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10712
10716
  }
10713
10717
  ), { deviation: e };
10714
10718
  },
10715
- ct(Ht, Po, gr, Rn, Un, dl)
10719
+ ct(Ht, Po, gr, Rn, Wn, dl)
10716
10720
  ), BT = Je(
10717
10721
  ([
10718
10722
  e,
@@ -10742,14 +10746,14 @@ const $T = Np(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10742
10746
  ct(
10743
10747
  ml,
10744
10748
  PT,
10745
- Wn,
10749
+ Vn,
10746
10750
  Ip,
10747
10751
  Ep,
10748
10752
  MT,
10749
10753
  NT,
10750
10754
  gl,
10751
10755
  Rp,
10752
- Un,
10756
+ Wn,
10753
10757
  kp
10754
10758
  )
10755
10759
  ), Ap = Je(
@@ -10957,9 +10961,9 @@ function Op(e, t, n, r = Ur, o, s) {
10957
10961
  const v = m.behavior === "smooth";
10958
10962
  let g, x, b;
10959
10963
  Da(f) ? (x = Math.max(
10960
- $n(f.document.documentElement, s ? "width" : "height"),
10964
+ Fn(f.document.documentElement, s ? "width" : "height"),
10961
10965
  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"]);
10966
+ ), g = s ? f.innerWidth : f.innerHeight, b = s ? window.scrollX : window.scrollY) : (x = f[s ? "scrollWidth" : "scrollHeight"], g = Fn(f, s ? "width" : "height"), b = f[s ? "scrollLeft" : "scrollTop"]);
10963
10967
  const w = x - g;
10964
10968
  if (m.top = Math.ceil(Math.max(Math.min(w, m.top), 0)), Tp(g, x) || m.top === b) {
10965
10969
  e({ scrollHeight: x, scrollTop: b, viewportHeight: g }), v && t(!0);
@@ -11123,7 +11127,7 @@ const ZT = /* @__PURE__ */ M.memo(function() {
11123
11127
  const e = _e("HeaderComponent"), t = on("headerHeight"), n = _e("HeaderFooterTag"), r = mr(
11124
11128
  M.useMemo(
11125
11129
  () => (s) => {
11126
- t($n(s, "height"));
11130
+ t(Fn(s, "height"));
11127
11131
  },
11128
11132
  [t]
11129
11133
  ),
@@ -11135,7 +11139,7 @@ const ZT = /* @__PURE__ */ M.memo(function() {
11135
11139
  const e = _e("FooterComponent"), t = on("footerHeight"), n = _e("HeaderFooterTag"), r = mr(
11136
11140
  M.useMemo(
11137
11141
  () => (s) => {
11138
- t($n(s, "height"));
11142
+ t(Fn(s, "height"));
11139
11143
  },
11140
11144
  [t]
11141
11145
  ),
@@ -11198,7 +11202,7 @@ function $p({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
11198
11202
  }
11199
11203
  const eC = ({ children: e }) => {
11200
11204
  const t = M.useContext(_p), n = on("viewportHeight"), r = on("fixedItemHeight"), o = _e("alignToBottom"), s = _e("horizontalDirection"), a = M.useMemo(
11201
- () => cp(n, (l) => $n(l, s ? "width" : "height")),
11205
+ () => cp(n, (l) => Fn(l, s ? "width" : "height")),
11202
11206
  [n, s]
11203
11207
  ), i = mr(a, !0, _e("skipAnimationFrameInResizeObserver"));
11204
11208
  return M.useEffect(() => {
@@ -11605,7 +11609,7 @@ const fC = /* @__PURE__ */ Je(
11605
11609
  ...S
11606
11610
  };
11607
11611
  },
11608
- ct(ml, Ht, Po, Ip, Wn, gl, Un)
11612
+ ct(ml, Ht, Po, Ip, Vn, gl, Wn)
11609
11613
  );
11610
11614
  function Fp(e, t, n) {
11611
11615
  return to(1, Ss((e + n) / (Ss(t) + n)));
@@ -11710,7 +11714,7 @@ const pC = /* @__PURE__ */ Je(() => {
11710
11714
  const e = dt("HeaderComponent"), t = sn("headerHeight"), n = dt("headerFooterTag"), r = mr(
11711
11715
  M.useMemo(
11712
11716
  () => (s) => {
11713
- t($n(s, "height"));
11717
+ t(Fn(s, "height"));
11714
11718
  },
11715
11719
  [t]
11716
11720
  ),
@@ -11722,7 +11726,7 @@ const pC = /* @__PURE__ */ Je(() => {
11722
11726
  const e = dt("FooterComponent"), t = sn("footerHeight"), n = dt("headerFooterTag"), r = mr(
11723
11727
  M.useMemo(
11724
11728
  () => (s) => {
11725
- t($n(s, "height"));
11729
+ t(Fn(s, "height"));
11726
11730
  },
11727
11731
  [t]
11728
11732
  ),
@@ -11813,7 +11817,7 @@ var na = "Dialog", [zp, bN] = xn(na), [TC, vn] = zp(na), Hp = (e) => {
11813
11817
  defaultOpen: o,
11814
11818
  onOpenChange: s,
11815
11819
  modal: a = !0
11816
- } = e, i = h.useRef(null), l = h.useRef(null), [c, d] = On({
11820
+ } = e, i = h.useRef(null), l = h.useRef(null), [c, d] = Dn({
11817
11821
  prop: r,
11818
11822
  defaultProp: o ?? !1,
11819
11823
  onChange: s,
@@ -12030,7 +12034,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
12030
12034
  const o = (s = e.current) == null ? void 0 : s.getAttribute("aria-describedby");
12031
12035
  t && o && (document.getElementById(t) || console.warn(r));
12032
12036
  }, [r, e, t]), null;
12033
- }, Tl = Hp, _C = Wp, Cl = Kp, Mo = qp, Oo = Gp, rr = Xp, ra = Zp, rh = eh;
12037
+ }, Tl = Hp, _C = Wp, Cl = Kp, Mo = qp, Oo = Gp, or = Xp, ra = Zp, rh = eh;
12034
12038
  const oh = Tl, PC = Cl, sh = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12035
12039
  Mo,
12036
12040
  {
@@ -12050,7 +12054,7 @@ const El = h.forwardRef(({ className: e, children: t, ...n }, r) => {
12050
12054
  h.Children.forEach(i, (l) => {
12051
12055
  if (s || !h.isValidElement(l)) return;
12052
12056
  const c = l.type;
12053
- if (c === rr || (c == null ? void 0 : c.displayName) === rr.displayName || (c == null ? void 0 : c.name) === "DialogTitle") {
12057
+ if (c === or || (c == null ? void 0 : c.displayName) === or.displayName || (c == null ? void 0 : c.name) === "DialogTitle") {
12054
12058
  s = !0;
12055
12059
  return;
12056
12060
  }
@@ -12071,10 +12075,10 @@ const El = h.forwardRef(({ className: e, children: t, ...n }, r) => {
12071
12075
  ),
12072
12076
  ...n,
12073
12077
  children: [
12074
- !o && /* @__PURE__ */ u.jsx(rr, { className: "sr-only", children: "Dialog" }),
12078
+ !o && /* @__PURE__ */ u.jsx(or, { className: "sr-only", children: "Dialog" }),
12075
12079
  t,
12076
12080
  /* @__PURE__ */ u.jsxs(rh, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
12077
- /* @__PURE__ */ u.jsx(Qn, { className: "h-4 w-4" }),
12081
+ /* @__PURE__ */ u.jsx(er, { className: "h-4 w-4" }),
12078
12082
  /* @__PURE__ */ u.jsx("span", { className: "sr-only", children: "Close" })
12079
12083
  ] })
12080
12084
  ]
@@ -12098,7 +12102,7 @@ const kl = ({
12098
12102
  );
12099
12103
  kl.displayName = "DialogHeader";
12100
12104
  const Rl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12101
- rr,
12105
+ or,
12102
12106
  {
12103
12107
  ref: n,
12104
12108
  className: re(
@@ -12108,7 +12112,7 @@ const Rl = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12108
12112
  ...t
12109
12113
  }
12110
12114
  ));
12111
- Rl.displayName = rr.displayName;
12115
+ Rl.displayName = or.displayName;
12112
12116
  const MC = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
12113
12117
  ra,
12114
12118
  {
@@ -13045,7 +13049,7 @@ function wu(e) {
13045
13049
  r = e.charCodeAt(n), Math.random() > 0.5 && (r = "x" + r.toString(16)), t += "&#" + r + ";";
13046
13050
  return t;
13047
13051
  }
13048
- class Fn {
13052
+ class Bn {
13049
13053
  constructor(t) {
13050
13054
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || xr, this.options.tokenizer = this.options.tokenizer || new Nl(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = {
13051
13055
  inLink: !1,
@@ -13071,13 +13075,13 @@ class Fn {
13071
13075
  * Static Lex Method
13072
13076
  */
13073
13077
  static lex(t, n) {
13074
- return new Fn(n).lex(t);
13078
+ return new Bn(n).lex(t);
13075
13079
  }
13076
13080
  /**
13077
13081
  * Static Lex Inline Method
13078
13082
  */
13079
13083
  static lexInline(t, n) {
13080
- return new Fn(n).inlineTokens(t);
13084
+ return new Bn(n).inlineTokens(t);
13081
13085
  }
13082
13086
  /**
13083
13087
  * Preprocessing
@@ -13478,7 +13482,7 @@ class dh {
13478
13482
  return this.getNextSafeSlug(r, n.dryrun);
13479
13483
  }
13480
13484
  }
13481
- class Bn {
13485
+ class zn {
13482
13486
  constructor(t) {
13483
13487
  this.options = t || xr, this.options.renderer = this.options.renderer || new Al(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.textRenderer = new uh(), this.slugger = new dh();
13484
13488
  }
@@ -13486,13 +13490,13 @@ class Bn {
13486
13490
  * Static Parse Method
13487
13491
  */
13488
13492
  static parse(t, n) {
13489
- return new Bn(n).parse(t);
13493
+ return new zn(n).parse(t);
13490
13494
  }
13491
13495
  /**
13492
13496
  * Static Parse Inline Method
13493
13497
  */
13494
13498
  static parseInline(t, n) {
13495
- return new Bn(n).parseInline(t);
13499
+ return new zn(n).parseInline(t);
13496
13500
  }
13497
13501
  /**
13498
13502
  * Parse Loop
@@ -13750,7 +13754,7 @@ function fh(e, t) {
13750
13754
  };
13751
13755
  }
13752
13756
  function be(e, t, n) {
13753
- return fh(Fn.lex, Bn.parse)(e, t, n);
13757
+ return fh(Bn.lex, zn.parse)(e, t, n);
13754
13758
  }
13755
13759
  be.options = be.setOptions = function(e) {
13756
13760
  return be.defaults = { ...be.defaults, ...e }, zC(be.defaults), be;
@@ -13848,13 +13852,13 @@ be.walkTokens = function(e, t) {
13848
13852
  }
13849
13853
  return n;
13850
13854
  };
13851
- be.parseInline = fh(Fn.lexInline, Bn.parseInline);
13852
- be.Parser = Bn;
13853
- be.parser = Bn.parse;
13855
+ be.parseInline = fh(Bn.lexInline, zn.parseInline);
13856
+ be.Parser = zn;
13857
+ be.parser = zn.parse;
13854
13858
  be.Renderer = Al;
13855
13859
  be.TextRenderer = uh;
13856
- be.Lexer = Fn;
13857
- be.lexer = Fn.lex;
13860
+ be.Lexer = Bn;
13861
+ be.lexer = Bn.lex;
13858
13862
  be.Tokenizer = Nl;
13859
13863
  be.Slugger = dh;
13860
13864
  be.Hooks = Es;
@@ -13864,9 +13868,9 @@ be.setOptions;
13864
13868
  be.use;
13865
13869
  be.walkTokens;
13866
13870
  be.parseInline;
13867
- Bn.parse;
13868
- Fn.lex;
13869
- function or({
13871
+ zn.parse;
13872
+ Bn.lex;
13873
+ function sr({
13870
13874
  content: e,
13871
13875
  className: t = "",
13872
13876
  allowHtml: n = !1,
@@ -14030,7 +14034,7 @@ function iE({ artifact: e }) {
14030
14034
  typeof e.results == "string" && e.results.trim() && /* @__PURE__ */ u.jsxs("div", { className: "rounded border border-blue-100 bg-white/80 px-3 py-2 text-sm text-blue-900/90 space-y-1", children: [
14031
14035
  /* @__PURE__ */ u.jsx("p", { className: "text-[10px] font-semibold uppercase tracking-wide text-blue-500", children: "Results" }),
14032
14036
  /* @__PURE__ */ u.jsx(
14033
- or,
14037
+ sr,
14034
14038
  {
14035
14039
  content: e.results,
14036
14040
  allowHtml: !1,
@@ -14260,7 +14264,7 @@ function pE({
14260
14264
  }) {
14261
14265
  const s = Math.max(e.length - r, 0), a = e.substring(0, r);
14262
14266
  return /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col gap-1", children: [
14263
- /* @__PURE__ */ u.jsx("div", { className: re("text-sm text-[hsl(var(--chat-bubble-user-text))]", o && "text-xs"), children: t ? /* @__PURE__ */ u.jsx(or, { content: e, allowHtml: !1 }) : /* @__PURE__ */ u.jsxs(
14267
+ /* @__PURE__ */ u.jsx("div", { className: re("text-sm text-[hsl(var(--chat-bubble-user-text))]", o && "text-xs"), children: t ? /* @__PURE__ */ u.jsx(sr, { content: e, allowHtml: !1 }) : /* @__PURE__ */ u.jsxs(
14264
14268
  "pre",
14265
14269
  {
14266
14270
  className: re(
@@ -14311,7 +14315,7 @@ function hE({ message: e, viewMode: t, isStreaming: n = !1 }) {
14311
14315
  }, i = (c) => {
14312
14316
  if (c == null) return null;
14313
14317
  const { content: d, isMarkdown: p } = fw(c);
14314
- return p ? /* @__PURE__ */ u.jsx(or, { content: d, className: "text-current" }) : a(c);
14318
+ return p ? /* @__PURE__ */ u.jsx(sr, { content: d, className: "text-current" }) : a(c);
14315
14319
  }, l = () => {
14316
14320
  const c = e.content.find((m) => m.type !== "tool_call");
14317
14321
  if (!c)
@@ -14580,8 +14584,8 @@ function wE({
14580
14584
  if (!F) return null;
14581
14585
  const { stablePart: A, tailPart: B } = F;
14582
14586
  return !A && !B ? null : /* @__PURE__ */ u.jsxs("div", { className: "space-y-2", children: [
14583
- A ? /* @__PURE__ */ u.jsx(or, { content: A, allowHtml: !1 }) : null,
14584
- B ? /* @__PURE__ */ u.jsx(or, { content: B, allowHtml: !1 }) : null
14587
+ A ? /* @__PURE__ */ u.jsx(sr, { content: A, allowHtml: !1 }) : null,
14588
+ B ? /* @__PURE__ */ u.jsx(sr, { content: B, allowHtml: !1 }) : null
14585
14589
  ] });
14586
14590
  }, [F]), k = Ue(() => {
14587
14591
  if (!m)
@@ -14615,7 +14619,7 @@ function wE({
14615
14619
  isCompact: R
14616
14620
  },
14617
14621
  B
14618
- ) : /* @__PURE__ */ u.jsx(or, { content: $, allowHtml: !1 }, B);
14622
+ ) : /* @__PURE__ */ u.jsx(sr, { content: $, allowHtml: !1 }, B);
14619
14623
  }
14620
14624
  if (A.type === "image_url") {
14621
14625
  const $ = A;
@@ -15137,7 +15141,7 @@ const jl = Og(function({
15137
15141
  i && /* @__PURE__ */ u.jsx("span", { className: "font-medium text-sm", children: "Assistant" })
15138
15142
  ] }),
15139
15143
  /* @__PURE__ */ u.jsx(
15140
- or,
15144
+ sr,
15141
15145
  {
15142
15146
  content: j.content,
15143
15147
  className: "text-current"
@@ -15669,7 +15673,7 @@ function ro({
15669
15673
  onClick: () => _t(!0),
15670
15674
  className: "text-red-800 hover:bg-red-100",
15671
15675
  "aria-label": "Dismiss error",
15672
- children: /* @__PURE__ */ u.jsx(Qn, { size: 16 })
15676
+ children: /* @__PURE__ */ u.jsx(er, { size: 16 })
15673
15677
  }
15674
15678
  )
15675
15679
  ] }),
@@ -15711,16 +15715,16 @@ function ro({
15711
15715
  }
15712
15716
  ),
15713
15717
  (Y === "reconnecting" || Y === "connecting") && /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute top-3 right-3 z-20 rounded-full bg-muted/80 px-3 py-1 text-xs font-medium text-foreground shadow-sm backdrop-blur-sm dark:bg-muted/60", children: /* @__PURE__ */ u.jsxs("span", { className: "flex items-center gap-2", children: [
15714
- /* @__PURE__ */ u.jsx(Xn, { className: "h-3 w-3 animate-spin" }),
15718
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-3 w-3 animate-spin" }),
15715
15719
  Y === "reconnecting" ? "Reconnecting…" : "Connecting…"
15716
15720
  ] }) }),
15717
15721
  Y === "error" && /* @__PURE__ */ u.jsx("div", { className: "pointer-events-none absolute top-3 right-3 z-20 rounded-full bg-destructive/10 px-3 py-1 text-xs font-semibold text-destructive shadow-sm", children: "Connection lost" }),
15718
15722
  S && /* @__PURE__ */ u.jsxs("div", { className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/80 backdrop-blur-sm text-muted-foreground", children: [
15719
- /* @__PURE__ */ u.jsx(Xn, { className: "h-6 w-6 animate-spin" }),
15723
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-6 w-6 animate-spin" }),
15720
15724
  /* @__PURE__ */ u.jsx("span", { className: "text-xs font-semibold uppercase tracking-wide", children: "Loading messages…" })
15721
15725
  ] }),
15722
15726
  (C || Ke) && /* @__PURE__ */ u.jsxs("div", { className: "absolute inset-0 z-10 flex flex-col items-center justify-center gap-2 bg-background/80 backdrop-blur-sm text-muted-foreground", children: [
15723
- /* @__PURE__ */ u.jsx(Xn, { className: "h-6 w-6 animate-spin" }),
15727
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-6 w-6 animate-spin" }),
15724
15728
  /* @__PURE__ */ u.jsx("span", { className: "text-xs font-semibold uppercase tracking-wide", children: "Loading checkpoint…" })
15725
15729
  ] })
15726
15730
  ]
@@ -15739,7 +15743,7 @@ function ro({
15739
15743
  size: "sm",
15740
15744
  onClick: Ae,
15741
15745
  className: "text-blue-600 hover:bg-blue-100",
15742
- children: /* @__PURE__ */ u.jsx(Qn, { size: 16 })
15746
+ children: /* @__PURE__ */ u.jsx(er, { size: 16 })
15743
15747
  }
15744
15748
  )
15745
15749
  ] }) }),
@@ -15767,7 +15771,7 @@ function ro({
15767
15771
  onClick: () => nn(ce),
15768
15772
  className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
15769
15773
  "aria-label": `Remove ${ie.name}`,
15770
- children: /* @__PURE__ */ u.jsx(Qn, { size: 12 })
15774
+ children: /* @__PURE__ */ u.jsx(er, { size: 12 })
15771
15775
  }
15772
15776
  )
15773
15777
  ] }, ce)) })
@@ -15785,7 +15789,7 @@ function ro({
15785
15789
  Rt
15786
15790
  ),
15787
15791
  He && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
15788
- /* @__PURE__ */ u.jsx(Xn, { className: "h-4 w-4 animate-spin" }),
15792
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-4 w-4 animate-spin" }),
15789
15793
  " Uploading Excel file..."
15790
15794
  ] }),
15791
15795
  ht && !He && /* @__PURE__ */ u.jsx("div", { className: "text-sm rounded border border-emerald-200 bg-emerald-50 px-3 py-2 text-emerald-700", children: ht }),
@@ -15808,7 +15812,7 @@ function ro({
15808
15812
  }
15809
15813
  ) }),
15810
15814
  /* @__PURE__ */ u.jsxs(Xs, { align: "start", sideOffset: 6, className: "w-52", children: [
15811
- i && /* @__PURE__ */ u.jsxs(nr, { onClick: () => {
15815
+ i && /* @__PURE__ */ u.jsxs(rr, { onClick: () => {
15812
15816
  var ie;
15813
15817
  return (ie = ue.current) == null ? void 0 : ie.click();
15814
15818
  }, className: "cursor-pointer", children: [
@@ -15816,7 +15820,7 @@ function ro({
15816
15820
  " Attach files or images"
15817
15821
  ] }),
15818
15822
  l && /* @__PURE__ */ u.jsxs(
15819
- nr,
15823
+ rr,
15820
15824
  {
15821
15825
  onClick: () => {
15822
15826
  var ie;
@@ -16047,7 +16051,7 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
16047
16051
  ur(() => {
16048
16052
  if (!c) return i.item(o, a == null ? void 0 : a.id);
16049
16053
  }, [c]);
16050
- let d = jh(o, s, [e.value, e.children, s], e.keywords), p = _l(), 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);
16054
+ let d = jh(o, s, [e.value, e.children, s], e.keywords), p = _l(), m = Hn((T) => T.value && T.value === d.current), f = Hn((T) => c || i.filter() === !1 ? !0 : T.search ? T.filtered.items.get(o) > 0 : !0);
16051
16055
  h.useEffect(() => {
16052
16056
  let T = s.current;
16053
16057
  if (!(!T || e.disabled)) return T.addEventListener(pi, v), () => T.removeEventListener(pi, v);
@@ -16061,24 +16065,24 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
16061
16065
  }
16062
16066
  if (!f) return null;
16063
16067
  let { disabled: x, value: b, onSelect: w, forceMount: y, keywords: C, ...S } = e;
16064
- 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);
16068
+ return h.createElement(ve.div, { ref: On(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);
16065
16069
  }), LE = h.forwardRef((e, t) => {
16066
- let { heading: n, children: r, forceMount: o, ...s } = e, a = Bt(), i = h.useRef(null), l = h.useRef(null), c = Bt(), d = Do(), p = zn((f) => o || d.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(a) : !0);
16070
+ let { heading: n, children: r, forceMount: o, ...s } = e, a = Bt(), i = h.useRef(null), l = h.useRef(null), c = Bt(), d = Do(), p = Hn((f) => o || d.filter() === !1 ? !0 : f.search ? f.filtered.groups.has(a) : !0);
16067
16071
  ur(() => d.group(a), []), jh(a, i, [e.value, e.heading, l]);
16068
16072
  let m = h.useMemo(() => ({ id: a, forceMount: o }), [o]);
16069
- 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), oa(e, (f) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, h.createElement(Ih.Provider, { value: m }, f))));
16073
+ return h.createElement(ve.div, { ref: On(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), oa(e, (f) => h.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? c : void 0 }, h.createElement(Ih.Provider, { value: m }, f))));
16070
16074
  }), $E = h.forwardRef((e, t) => {
16071
- let { alwaysRender: n, ...r } = e, o = h.useRef(null), s = zn((a) => !a.search);
16072
- return !n && !s ? null : h.createElement(ve.div, { ref: Mn(o, t), ...r, "cmdk-separator": "", role: "separator" });
16075
+ let { alwaysRender: n, ...r } = e, o = h.useRef(null), s = Hn((a) => !a.search);
16076
+ return !n && !s ? null : h.createElement(ve.div, { ref: On(o, t), ...r, "cmdk-separator": "", role: "separator" });
16073
16077
  }), FE = h.forwardRef((e, t) => {
16074
- let { onValueChange: n, ...r } = e, o = e.value != null, s = _l(), a = zn((c) => c.search), i = zn((c) => c.selectedItemId), l = Do();
16078
+ let { onValueChange: n, ...r } = e, o = e.value != null, s = _l(), a = Hn((c) => c.search), i = Hn((c) => c.selectedItemId), l = Do();
16075
16079
  return h.useEffect(() => {
16076
16080
  e.value != null && s.setState("search", e.value);
16077
16081
  }, [e.value]), h.createElement(ve.input, { ref: t, ...r, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: !1, "aria-autocomplete": "list", role: "combobox", "aria-expanded": !0, "aria-controls": l.listId, "aria-labelledby": l.labelId, "aria-activedescendant": i, id: l.inputId, type: "text", value: o ? e.value : a, onChange: (c) => {
16078
16082
  o || s.setState("search", c.target.value), n == null || n(c.target.value);
16079
16083
  } });
16080
16084
  }), BE = h.forwardRef((e, t) => {
16081
- let { children: n, label: r = "Suggestions", ...o } = e, s = h.useRef(null), a = h.useRef(null), i = zn((c) => c.selectedItemId), l = Do();
16085
+ let { children: n, label: r = "Suggestions", ...o } = e, s = h.useRef(null), a = h.useRef(null), i = Hn((c) => c.selectedItemId), l = Do();
16082
16086
  return h.useEffect(() => {
16083
16087
  if (a.current && s.current) {
16084
16088
  let c = a.current, d = s.current, p, m = new ResizeObserver(() => {
@@ -16091,11 +16095,11 @@ var Xr = '[cmdk-group=""]', Ua = '[cmdk-group-items=""]', ME = '[cmdk-group-head
16091
16095
  cancelAnimationFrame(p), m.unobserve(c);
16092
16096
  };
16093
16097
  }
16094
- }, []), h.createElement(ve.div, { ref: Mn(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": r, id: l.listId }, oa(e, (c) => h.createElement("div", { ref: Mn(a, l.listInnerRef), "cmdk-list-sizer": "" }, c)));
16098
+ }, []), h.createElement(ve.div, { ref: On(s, t), ...o, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": i, "aria-label": r, id: l.listId }, oa(e, (c) => h.createElement("div", { ref: On(a, l.listInnerRef), "cmdk-list-sizer": "" }, c)));
16095
16099
  }), zE = h.forwardRef((e, t) => {
16096
16100
  let { open: n, onOpenChange: r, overlayClassName: o, contentClassName: s, container: a, ...i } = e;
16097
16101
  return h.createElement(Tl, { open: n, onOpenChange: r }, h.createElement(Cl, { container: a }, h.createElement(Mo, { "cmdk-overlay": "", className: o }), h.createElement(Oo, { "aria-label": e.label, "cmdk-dialog": "", className: s }, h.createElement(Nh, { ref: t, ...i }))));
16098
- }), HE = h.forwardRef((e, t) => zn((n) => n.filtered.count === 0) ? h.createElement(ve.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), UE = h.forwardRef((e, t) => {
16102
+ }), HE = h.forwardRef((e, t) => Hn((n) => n.filtered.count === 0) ? h.createElement(ve.div, { ref: t, ...e, "cmdk-empty": "", role: "presentation" }) : null), UE = h.forwardRef((e, t) => {
16099
16103
  let { progress: n, children: r, label: o = "Loading...", ...s } = e;
16100
16104
  return h.createElement(ve.div, { ref: t, ...s, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": o }, oa(e, (a) => h.createElement("div", { "aria-hidden": !0 }, a)));
16101
16105
  }), Jt = Object.assign(Nh, { List: BE, Item: DE, Input: FE, Group: LE, Separator: $E, Dialog: zE, Empty: HE, Loading: UE });
@@ -16124,7 +16128,7 @@ function Tr(e) {
16124
16128
  let t = h.useRef();
16125
16129
  return t.current === void 0 && (t.current = e()), t;
16126
16130
  }
16127
- function zn(e) {
16131
+ function Hn(e) {
16128
16132
  let t = _l(), n = () => e(t.snapshot());
16129
16133
  return h.useSyncExternalStore(t.subscribe, n, n);
16130
16134
  }
@@ -16849,7 +16853,7 @@ function fk({
16849
16853
  children: /* @__PURE__ */ u.jsx(Ns, { size: 12 })
16850
16854
  }
16851
16855
  ),
16852
- /* @__PURE__ */ u.jsx(nt, { variant: "ghost", size: "sm", onClick: l, className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Qn, { size: 12 }) })
16856
+ /* @__PURE__ */ u.jsx(nt, { variant: "ghost", size: "sm", onClick: l, className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(er, { size: 12 }) })
16853
16857
  ] }) : /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
16854
16858
  /* @__PURE__ */ u.jsx("div", { className: "font-medium text-sm truncate text-gray-900 dark:text-slate-100", children: v(e) }),
16855
16859
  /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-xs text-gray-500 dark:text-slate-400 mt-1", children: [
@@ -16862,7 +16866,7 @@ function fk({
16862
16866
  /* @__PURE__ */ u.jsx(il, { asChild: !0, children: /* @__PURE__ */ u.jsx(nt, { variant: "ghost", size: "sm", className: "h-6 w-6 p-0", children: /* @__PURE__ */ u.jsx(Lu, { size: 12 }) }) }),
16863
16867
  /* @__PURE__ */ u.jsxs(Xs, { align: "end", sideOffset: 6, className: "w-44", children: [
16864
16868
  /* @__PURE__ */ u.jsxs(
16865
- nr,
16869
+ rr,
16866
16870
  {
16867
16871
  onClick: (S) => {
16868
16872
  S.preventDefault(), c(e.threadId);
@@ -16874,7 +16878,7 @@ function fk({
16874
16878
  }
16875
16879
  ),
16876
16880
  p && n !== e.threadId && /* @__PURE__ */ u.jsxs(
16877
- nr,
16881
+ rr,
16878
16882
  {
16879
16883
  onClick: (S) => {
16880
16884
  S.preventDefault(), s(e, S);
@@ -16886,7 +16890,7 @@ function fk({
16886
16890
  }
16887
16891
  ),
16888
16892
  m && d && /* @__PURE__ */ u.jsxs(
16889
- nr,
16893
+ rr,
16890
16894
  {
16891
16895
  className: "text-red-400 hover:text-red-300",
16892
16896
  onClick: (S) => {
@@ -17103,7 +17107,7 @@ function mi({
17103
17107
  }
17104
17108
  ) }),
17105
17109
  /* @__PURE__ */ u.jsx(Xs, { align: "start", sideOffset: 6, className: "w-40", children: Ce.map((G) => /* @__PURE__ */ u.jsxs(
17106
- nr,
17110
+ rr,
17107
17111
  {
17108
17112
  className: "justify-between text-[12px]",
17109
17113
  onClick: (ue) => {
@@ -17128,7 +17132,7 @@ function mi({
17128
17132
  className: `flex-1 min-h-0 ${s.threadList || ""}`,
17129
17133
  style: o ? { maxHeight: o } : void 0,
17130
17134
  children: /* @__PURE__ */ u.jsx("div", { className: "p-2 space-y-1 pb-4", children: jt ? /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-center justify-center gap-2 py-8 text-slate-400", children: [
17131
- /* @__PURE__ */ u.jsx(Xn, { className: "h-5 w-5 animate-spin" }),
17135
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-5 w-5 animate-spin" }),
17132
17136
  /* @__PURE__ */ u.jsx("span", { className: "text-sm", children: "Loading threads…" })
17133
17137
  ] }) : ht.length === 0 ? /* @__PURE__ */ u.jsxs("div", { className: "text-center py-8 text-slate-400", children: [
17134
17138
  /* @__PURE__ */ u.jsx($u, { className: "w-8 h-8 mx-auto mb-2 opacity-40 text-slate-500" }),
@@ -17173,7 +17177,7 @@ function mi({
17173
17177
  ),
17174
17178
  /* @__PURE__ */ u.jsxs(Mh, { children: [
17175
17179
  K && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground", children: [
17176
- L && /* @__PURE__ */ u.jsx(Xn, { className: "h-3 w-3 animate-spin" }),
17180
+ L && /* @__PURE__ */ u.jsx(Jn, { className: "h-3 w-3 animate-spin" }),
17177
17181
  /* @__PURE__ */ u.jsx(
17178
17182
  "span",
17179
17183
  {
@@ -17183,7 +17187,7 @@ function mi({
17183
17187
  )
17184
17188
  ] }),
17185
17189
  /* @__PURE__ */ u.jsx(Oh, { children: w ? /* @__PURE__ */ u.jsxs("span", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
17186
- /* @__PURE__ */ u.jsx(Xn, { className: "h-4 w-4 animate-spin" }),
17190
+ /* @__PURE__ */ u.jsx(Jn, { className: "h-4 w-4 animate-spin" }),
17187
17191
  "Loading recipients…"
17188
17192
  ] }) : "No matching recipients found" }),
17189
17193
  Oe.length > 0 && /* @__PURE__ */ u.jsx(Dh, { heading: "Recipients", children: Oe.map((G) => /* @__PURE__ */ u.jsx(Lh, { onSelect: () => Ge(G), children: /* @__PURE__ */ u.jsxs("div", { className: "flex flex-col items-start text-sm", children: [
@@ -17470,7 +17474,7 @@ ia.displayName = yk;
17470
17474
  var Sk = ia, Tk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ck = [" ", "Enter"], dr = "Select", [la, ca, Ek] = $s(dr), [Wr, RN] = xn(dr, [
17471
17475
  Ek,
17472
17476
  zr
17473
- ]), ua = zr(), [kk, Vn] = Wr(dr), [Rk, Ik] = Wr(dr), sm = (e) => {
17477
+ ]), ua = zr(), [kk, Kn] = Wr(dr), [Rk, Ik] = Wr(dr), sm = (e) => {
17474
17478
  const {
17475
17479
  __scopeSelect: t,
17476
17480
  children: n,
@@ -17486,12 +17490,12 @@ var Sk = ia, Tk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ck = [" ", "Enter"], d
17486
17490
  disabled: m,
17487
17491
  required: f,
17488
17492
  form: v
17489
- } = e, g = ua(t), [x, b] = h.useState(null), [w, y] = h.useState(null), [C, S] = h.useState(!1), T = Fs(c), [E, R] = On({
17493
+ } = e, g = ua(t), [x, b] = h.useState(null), [w, y] = h.useState(null), [C, S] = h.useState(!1), T = Fs(c), [E, R] = Dn({
17490
17494
  prop: r,
17491
17495
  defaultProp: o ?? !1,
17492
17496
  onChange: s,
17493
17497
  caller: dr
17494
- }), [_, O] = On({
17498
+ }), [_, O] = Dn({
17495
17499
  prop: a,
17496
17500
  defaultProp: i,
17497
17501
  onChange: l,
@@ -17559,7 +17563,7 @@ var Sk = ia, Tk = [" ", "Enter", "ArrowUp", "ArrowDown"], Ck = [" ", "Enter"], d
17559
17563
  sm.displayName = dr;
17560
17564
  var am = "SelectTrigger", im = h.forwardRef(
17561
17565
  (e, t) => {
17562
- const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = ua(n), a = Vn(am, n), i = a.disabled || r, l = Be(t, a.onTriggerChange), c = ca(n), d = h.useRef("touch"), [p, m, f] = jm((g) => {
17566
+ const { __scopeSelect: n, disabled: r = !1, ...o } = e, s = ua(n), a = Kn(am, n), i = a.disabled || r, l = Be(t, a.onTriggerChange), c = ca(n), d = h.useRef("touch"), [p, m, f] = jm((g) => {
17563
17567
  const x = c().filter((y) => !y.disabled), b = x.find((y) => y.value === a.value), w = _m(x, g, b);
17564
17568
  w !== void 0 && a.onValueChange(w.value);
17565
17569
  }), v = (g) => {
@@ -17603,7 +17607,7 @@ var am = "SelectTrigger", im = h.forwardRef(
17603
17607
  im.displayName = am;
17604
17608
  var lm = "SelectValue", cm = h.forwardRef(
17605
17609
  (e, t) => {
17606
- const { __scopeSelect: n, className: r, style: o, children: s, placeholder: a = "", ...i } = e, l = Vn(lm, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, p = Be(t, l.onValueNodeChange);
17610
+ const { __scopeSelect: n, className: r, style: o, children: s, placeholder: a = "", ...i } = e, l = Kn(lm, n), { onValueNodeHasChildrenChange: c } = l, d = s !== void 0, p = Be(t, l.onValueNodeChange);
17607
17611
  return At(() => {
17608
17612
  c(d);
17609
17613
  }, [c, d]), /* @__PURE__ */ u.jsx(
@@ -17629,7 +17633,7 @@ var Ak = "SelectPortal", dm = (e) => /* @__PURE__ */ u.jsx(Ro, { asChild: !0, ..
17629
17633
  dm.displayName = Ak;
17630
17634
  var fr = "SelectContent", fm = h.forwardRef(
17631
17635
  (e, t) => {
17632
- const n = Vn(fr, e.__scopeSelect), [r, o] = h.useState();
17636
+ const n = Kn(fr, e.__scopeSelect), [r, o] = h.useState();
17633
17637
  if (At(() => {
17634
17638
  o(new DocumentFragment());
17635
17639
  }, []), !n.open) {
@@ -17643,7 +17647,7 @@ var fr = "SelectContent", fm = h.forwardRef(
17643
17647
  }
17644
17648
  );
17645
17649
  fm.displayName = fr;
17646
- var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent.RemoveScroll"), hm = h.forwardRef(
17650
+ var dn = 10, [pm, qn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent.RemoveScroll"), hm = h.forwardRef(
17647
17651
  (e, t) => {
17648
17652
  const {
17649
17653
  __scopeSelect: n,
@@ -17665,7 +17669,7 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17665
17669
  avoidCollisions: x,
17666
17670
  //
17667
17671
  ...b
17668
- } = e, w = Vn(fr, n), [y, C] = h.useState(null), [S, T] = h.useState(null), E = Be(t, (U) => C(U)), [R, _] = h.useState(null), [O, L] = h.useState(
17672
+ } = e, w = Kn(fr, n), [y, C] = h.useState(null), [S, T] = h.useState(null), E = Be(t, (U) => C(U)), [R, _] = h.useState(null), [O, L] = h.useState(
17669
17673
  null
17670
17674
  ), K = ca(n), [H, N] = h.useState(!1), Y = h.useRef(!1);
17671
17675
  h.useEffect(() => {
@@ -17815,7 +17819,7 @@ var dn = 10, [pm, Kn] = Wr(fr), jk = "SelectContentImpl", _k = Ir("SelectContent
17815
17819
  );
17816
17820
  hm.displayName = jk;
17817
17821
  var Pk = "SelectItemAlignedPosition", mm = h.forwardRef((e, t) => {
17818
- const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Vn(fr, n), a = Kn(fr, n), [i, l] = h.useState(null), [c, d] = h.useState(null), p = Be(t, (E) => d(E)), m = ca(n), f = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = h.useCallback(() => {
17822
+ const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Kn(fr, n), a = qn(fr, n), [i, l] = h.useState(null), [c, d] = h.useState(null), p = Be(t, (E) => d(E)), m = ca(n), f = h.useRef(!1), v = h.useRef(!0), { viewport: g, selectedItem: x, selectedItemText: b, focusSelectedItem: w } = a, y = h.useCallback(() => {
17819
17823
  if (s.trigger && s.valueNode && i && c && g && x && b) {
17820
17824
  const E = s.trigger.getBoundingClientRect(), R = c.getBoundingClientRect(), _ = s.valueNode.getBoundingClientRect(), O = b.getBoundingClientRect();
17821
17825
  if (s.dir !== "rtl") {
@@ -17950,7 +17954,7 @@ var Mk = "SelectPopperPosition", gi = h.forwardRef((e, t) => {
17950
17954
  gi.displayName = Mk;
17951
17955
  var [Ok, Ll] = Wr(fr, {}), xi = "SelectViewport", gm = h.forwardRef(
17952
17956
  (e, t) => {
17953
- const { __scopeSelect: n, nonce: r, ...o } = e, s = Kn(xi, n), a = Ll(xi, n), i = Be(t, s.onViewportChange), l = h.useRef(0);
17957
+ const { __scopeSelect: n, nonce: r, ...o } = e, s = qn(xi, n), a = Ll(xi, n), i = Be(t, s.onViewportChange), l = h.useRef(0);
17954
17958
  return /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
17955
17959
  /* @__PURE__ */ u.jsx(
17956
17960
  "style",
@@ -18023,7 +18027,7 @@ var Is = "SelectItem", [Fk, bm] = Wr(Is), ym = h.forwardRef(
18023
18027
  disabled: o = !1,
18024
18028
  textValue: s,
18025
18029
  ...a
18026
- } = e, i = Vn(Is, n), l = Kn(Is, n), c = i.value === r, [d, p] = h.useState(s ?? ""), [m, f] = h.useState(!1), v = Be(
18030
+ } = e, i = Kn(Is, n), l = qn(Is, n), c = i.value === r, [d, p] = h.useState(s ?? ""), [m, f] = h.useState(!1), v = Be(
18027
18031
  t,
18028
18032
  (w) => {
18029
18033
  var y;
@@ -18101,7 +18105,7 @@ var Is = "SelectItem", [Fk, bm] = Wr(Is), ym = h.forwardRef(
18101
18105
  ym.displayName = Is;
18102
18106
  var Zr = "SelectItemText", Sm = h.forwardRef(
18103
18107
  (e, t) => {
18104
- const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Vn(Zr, n), i = Kn(Zr, n), l = bm(Zr, n), c = Ik(Zr, n), [d, p] = h.useState(null), m = Be(
18108
+ const { __scopeSelect: n, className: r, style: o, ...s } = e, a = Kn(Zr, n), i = qn(Zr, n), l = bm(Zr, n), c = Ik(Zr, n), [d, p] = h.useState(null), m = Be(
18105
18109
  t,
18106
18110
  (b) => p(b),
18107
18111
  l.onItemTextChange,
@@ -18128,7 +18132,7 @@ var Tm = "SelectItemIndicator", Cm = h.forwardRef(
18128
18132
  );
18129
18133
  Cm.displayName = Tm;
18130
18134
  var vi = "SelectScrollUpButton", Em = h.forwardRef((e, t) => {
18131
- const n = Kn(vi, e.__scopeSelect), r = Ll(vi, e.__scopeSelect), [o, s] = h.useState(!1), a = Be(t, r.onScrollButtonChange);
18135
+ const n = qn(vi, e.__scopeSelect), r = Ll(vi, e.__scopeSelect), [o, s] = h.useState(!1), a = Be(t, r.onScrollButtonChange);
18132
18136
  return At(() => {
18133
18137
  if (n.viewport && n.isPositioned) {
18134
18138
  let i = function() {
@@ -18152,7 +18156,7 @@ var vi = "SelectScrollUpButton", Em = h.forwardRef((e, t) => {
18152
18156
  });
18153
18157
  Em.displayName = vi;
18154
18158
  var wi = "SelectScrollDownButton", km = h.forwardRef((e, t) => {
18155
- const n = Kn(wi, e.__scopeSelect), r = Ll(wi, e.__scopeSelect), [o, s] = h.useState(!1), a = Be(t, r.onScrollButtonChange);
18159
+ const n = qn(wi, e.__scopeSelect), r = Ll(wi, e.__scopeSelect), [o, s] = h.useState(!1), a = Be(t, r.onScrollButtonChange);
18156
18160
  return At(() => {
18157
18161
  if (n.viewport && n.isPositioned) {
18158
18162
  let i = function() {
@@ -18176,7 +18180,7 @@ var wi = "SelectScrollDownButton", km = h.forwardRef((e, t) => {
18176
18180
  });
18177
18181
  km.displayName = wi;
18178
18182
  var Rm = h.forwardRef((e, t) => {
18179
- const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = Kn("SelectScrollButton", n), a = h.useRef(null), i = ca(n), l = h.useCallback(() => {
18183
+ const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = qn("SelectScrollButton", n), a = h.useRef(null), i = ca(n), l = h.useCallback(() => {
18180
18184
  a.current !== null && (window.clearInterval(a.current), a.current = null);
18181
18185
  }, []);
18182
18186
  return h.useEffect(() => () => l(), [l]), At(() => {
@@ -18211,7 +18215,7 @@ var Rm = h.forwardRef((e, t) => {
18211
18215
  Im.displayName = Bk;
18212
18216
  var bi = "SelectArrow", zk = h.forwardRef(
18213
18217
  (e, t) => {
18214
- const { __scopeSelect: n, ...r } = e, o = ua(n), s = Vn(bi, n), a = Kn(bi, n);
18218
+ const { __scopeSelect: n, ...r } = e, o = ua(n), s = Kn(bi, n), a = qn(bi, n);
18215
18219
  return s.open && a.position === "popper" ? /* @__PURE__ */ u.jsx(Ji, { ...o, ...r, ref: t }) : null;
18216
18220
  }
18217
18221
  );
@@ -18423,7 +18427,7 @@ var da = "Switch", [aR, AN] = xn(da), [iR, lR] = aR(da), Wm = h.forwardRef(
18423
18427
  onCheckedChange: c,
18424
18428
  form: d,
18425
18429
  ...p
18426
- } = e, [m, f] = h.useState(null), v = Be(t, (y) => f(y)), g = h.useRef(!1), x = m ? d || !!m.closest("form") : !0, [b, w] = On({
18430
+ } = e, [m, f] = h.useState(null), v = Be(t, (y) => f(y)), g = h.useRef(!1), x = m ? d || !!m.closest("form") : !0, [b, w] = Dn({
18427
18431
  prop: o,
18428
18432
  defaultProp: s ?? !1,
18429
18433
  onChange: c,
@@ -18585,7 +18589,7 @@ const pR = xo(
18585
18589
  children: [
18586
18590
  n,
18587
18591
  /* @__PURE__ */ u.jsxs(rh, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
18588
- /* @__PURE__ */ u.jsx(Qn, { className: "h-4 w-4" }),
18592
+ /* @__PURE__ */ u.jsx(er, { className: "h-4 w-4" }),
18589
18593
  /* @__PURE__ */ u.jsx("span", { className: "sr-only", children: "Close" })
18590
18594
  ] })
18591
18595
  ]
@@ -18608,14 +18612,14 @@ const mR = ({
18608
18612
  );
18609
18613
  mR.displayName = "SheetHeader";
18610
18614
  const gR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
18611
- rr,
18615
+ or,
18612
18616
  {
18613
18617
  ref: n,
18614
18618
  className: re("text-lg font-semibold text-foreground", e),
18615
18619
  ...t
18616
18620
  }
18617
18621
  ));
18618
- gR.displayName = rr.displayName;
18622
+ gR.displayName = or.displayName;
18619
18623
  const xR = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
18620
18624
  ra,
18621
18625
  {
@@ -18672,7 +18676,7 @@ var go = "Tooltip", [bR, ha] = fa(go), Qm = (e) => {
18672
18676
  onOpenChange: s,
18673
18677
  disableHoverableContent: a,
18674
18678
  delayDuration: i
18675
- } = e, l = $l(go, e.__scopeTooltip), c = pa(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({
18679
+ } = e, l = $l(go, e.__scopeTooltip), c = pa(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] = Dn({
18676
18680
  prop: r,
18677
18681
  defaultProp: o ?? !1,
18678
18682
  onChange: (E) => {
@@ -19102,7 +19106,7 @@ var cg = "ToastFocusProxy", Ei = h.forwardRef(
19102
19106
  Ei.displayName = cg;
19103
19107
  var Lo = "Toast", HR = "toast.swipeStart", UR = "toast.swipeMove", WR = "toast.swipeCancel", VR = "toast.swipeEnd", ug = h.forwardRef(
19104
19108
  (e, t) => {
19105
- const { forceMount: n, open: r, defaultOpen: o, onOpenChange: s, ...a } = e, [i, l] = On({
19109
+ const { forceMount: n, open: r, defaultOpen: o, onOpenChange: s, ...a } = e, [i, l] = Dn({
19106
19110
  prop: r,
19107
19111
  defaultProp: o ?? !0,
19108
19112
  onChange: s,
@@ -19415,7 +19419,7 @@ const kg = h.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ u.jsx(
19415
19419
  ),
19416
19420
  "toast-close": "",
19417
19421
  ...t,
19418
- children: /* @__PURE__ */ u.jsx(Qn, { className: "h-4 w-4" })
19422
+ children: /* @__PURE__ */ u.jsx(er, { className: "h-4 w-4" })
19419
19423
  }
19420
19424
  ));
19421
19425
  kg.displayName = Tg.displayName;
@@ -19791,14 +19795,14 @@ export {
19791
19795
  Rl as DialogTitle,
19792
19796
  al as DropdownMenu,
19793
19797
  Xs as DropdownMenuContent,
19794
- nr as DropdownMenuItem,
19798
+ rr as DropdownMenuItem,
19795
19799
  il as DropdownMenuTrigger,
19796
19800
  BC as FileViewerModal,
19797
19801
  Yv as HISTORY_TIMEOUT_MS,
19798
19802
  Qh as Input,
19799
19803
  cE as InterruptPartRenderer,
19800
19804
  bk as Label,
19801
- or as MarkdownContent,
19805
+ sr as MarkdownContent,
19802
19806
  jl as MessageComponent,
19803
19807
  Th as MessageList,
19804
19808
  yh as MessageRow,
@@ -19841,7 +19845,7 @@ export {
19841
19845
  xN as applySettings,
19842
19846
  sx as buildCheckpointIndex,
19843
19847
  WI as buildCheckpointPreviewMap,
19844
- ar as chatApiClient,
19848
+ Mn as chatApiClient,
19845
19849
  hc as del,
19846
19850
  Jv as downloadFileById,
19847
19851
  Kl as extractConfigFields,
@@ -19858,7 +19862,7 @@ export {
19858
19862
  bh as getMessageDomKey,
19859
19863
  Fu as getPreviewForMessage,
19860
19864
  ln as httpClient,
19861
- Yn as hydrateHistorySnapshots,
19865
+ Xn as hydrateHistorySnapshots,
19862
19866
  nw as isEnvelope,
19863
19867
  Zv as listFiles,
19864
19868
  zw as loadStoredSettings,
@@ -19867,11 +19871,11 @@ export {
19867
19871
  tw as processAttachments,
19868
19872
  Xv as put,
19869
19873
  lx as readNumber,
19870
- Gn as readString,
19874
+ Yn as readString,
19871
19875
  An as resolveChatBaseUrl,
19872
19876
  Hw as saveSettings,
19873
19877
  Za as setChatToken,
19874
- er as toPlainObject,
19878
+ tr as toPlainObject,
19875
19879
  Vt as unwrap,
19876
19880
  Ds as useApi,
19877
19881
  ix as useCheckpointIndex,