teodor-new-chat-ui 4.3.372 → 4.3.374

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
@@ -72,14 +72,14 @@ function wg() {
72
72
  at.unshift("Warning: " + te), Function.prototype.apply.call(console[E], console, at);
73
73
  }
74
74
  }
75
- var T = !1, b = !1, C = !1, k = !1, R = !1, _;
76
- _ = Symbol.for("react.module.reference");
75
+ var T = !1, b = !1, C = !1, k = !1, R = !1, j;
76
+ j = Symbol.for("react.module.reference");
77
77
  function O(E) {
78
78
  return !!(typeof E == "string" || typeof E == "function" || E === r || E === s || R || E === o || E === c || E === d || k || E === h || T || b || C || typeof E == "object" && E !== null && (E.$$typeof === p || E.$$typeof === f || E.$$typeof === i || E.$$typeof === a || E.$$typeof === l || // This needs to include all possible module reference object
79
79
  // types supported by any Flight configuration anywhere since
80
80
  // we don't know which Flight build this will end up being used
81
81
  // with.
82
- E.$$typeof === _ || E.getModuleId !== void 0));
82
+ E.$$typeof === j || E.getModuleId !== void 0));
83
83
  }
84
84
  function $(E, te, ce) {
85
85
  var Ee = E.displayName;
@@ -136,7 +136,7 @@ function wg() {
136
136
  }
137
137
  return null;
138
138
  }
139
- var j = Object.assign, N = 0, I, B, D, P, H, Z, A;
139
+ var _ = Object.assign, N = 0, I, B, D, P, H, Z, A;
140
140
  function X() {
141
141
  }
142
142
  X.__reactDisabledLog = !0;
@@ -172,25 +172,25 @@ function wg() {
172
172
  writable: !0
173
173
  };
174
174
  Object.defineProperties(console, {
175
- log: j({}, E, {
175
+ log: _({}, E, {
176
176
  value: I
177
177
  }),
178
- info: j({}, E, {
178
+ info: _({}, E, {
179
179
  value: B
180
180
  }),
181
- warn: j({}, E, {
181
+ warn: _({}, E, {
182
182
  value: D
183
183
  }),
184
- error: j({}, E, {
184
+ error: _({}, E, {
185
185
  value: P
186
186
  }),
187
- group: j({}, E, {
187
+ group: _({}, E, {
188
188
  value: H
189
189
  }),
190
- groupCollapsed: j({}, E, {
190
+ groupCollapsed: _({}, E, {
191
191
  value: Z
192
192
  }),
193
- groupEnd: j({}, E, {
193
+ groupEnd: _({}, E, {
194
194
  value: A
195
195
  })
196
196
  });
@@ -1865,12 +1865,12 @@ const Fu = (e) => {
1865
1865
  onUploadProgress: C,
1866
1866
  responseType: k,
1867
1867
  headers: R,
1868
- withCredentials: _ = "same-origin",
1868
+ withCredentials: j = "same-origin",
1869
1869
  fetchOptions: O
1870
1870
  } = Fu(v), $ = t || fetch;
1871
1871
  k = k ? (k + "").toLowerCase() : "text";
1872
1872
  let q = Lx([w, S && S.toAbortSignal()], T), K = null;
1873
- const j = q && q.unsubscribe && (() => {
1873
+ const _ = q && q.unsubscribe && (() => {
1874
1874
  q.unsubscribe();
1875
1875
  });
1876
1876
  let N;
@@ -1889,7 +1889,7 @@ const Fu = (e) => {
1889
1889
  x = Fl(Z.body, Bl, X, U);
1890
1890
  }
1891
1891
  }
1892
- L.isString(_) || (_ = _ ? "include" : "omit");
1892
+ L.isString(j) || (j = j ? "include" : "omit");
1893
1893
  const I = s && "credentials" in n.prototype, B = {
1894
1894
  ...O,
1895
1895
  signal: q,
@@ -1897,12 +1897,12 @@ const Fu = (e) => {
1897
1897
  headers: R.normalize().toJSON(),
1898
1898
  body: x,
1899
1899
  duplex: "half",
1900
- credentials: I ? _ : void 0
1900
+ credentials: I ? j : void 0
1901
1901
  };
1902
1902
  K = s && new n(g, B);
1903
1903
  let D = await (s ? $(K, O) : $(g, B));
1904
1904
  const P = d && (k === "stream" || k === "response");
1905
- if (d && (b || P && j)) {
1905
+ if (d && (b || P && _)) {
1906
1906
  const Z = {};
1907
1907
  ["status", "statusText", "headers"].forEach((z) => {
1908
1908
  Z[z] = D[z];
@@ -1913,14 +1913,14 @@ const Fu = (e) => {
1913
1913
  ) || [];
1914
1914
  D = new r(
1915
1915
  Fl(D.body, Bl, X, () => {
1916
- U && U(), j && j();
1916
+ U && U(), _ && _();
1917
1917
  }),
1918
1918
  Z
1919
1919
  );
1920
1920
  }
1921
1921
  k = k || "text";
1922
1922
  let H = await f[L.findKey(f, k) || "text"](D, v);
1923
- return !P && j && j(), await new Promise((Z, A) => {
1923
+ return !P && _ && _(), await new Promise((Z, A) => {
1924
1924
  Lu(Z, A, {
1925
1925
  data: H,
1926
1926
  headers: qt.from(D.headers),
@@ -1931,7 +1931,7 @@ const Fu = (e) => {
1931
1931
  });
1932
1932
  });
1933
1933
  } catch (I) {
1934
- throw j && j(), I && I.name === "TypeError" && /Load failed|fetch/i.test(I.message) ? Object.assign(
1934
+ throw _ && _(), I && I.name === "TypeError" && /Load failed|fetch/i.test(I.message) ? Object.assign(
1935
1935
  new Oe("Network Error", Oe.ERR_NETWORK, v, K),
1936
1936
  {
1937
1937
  cause: I.cause || I
@@ -2675,7 +2675,7 @@ function xr(e) {
2675
2675
  }
2676
2676
  function Gu(e, t) {
2677
2677
  if (!Ta(e)) return null;
2678
- const n = e.values ?? { messages: [] }, r = Array.isArray(n == null ? void 0 : n.messages) ? n.messages : [], { messages: o, ...s } = n, i = Object.keys(s).length ? s : null, a = e.tasks, l = Array.isArray(a) ? a.filter((_) => !!_ && typeof _ == "object").map((_) => ({ ..._ })) : a === null ? null : void 0, c = r.map((_, O) => vy(_, O)).filter((_) => !!_), d = Bt(e.config), f = Bt(d == null ? void 0 : d.configurable), p = yt(f, ["checkpoint_id", "checkpointId"]), h = yt(f, ["checkpoint_ns", "checkpointNs"]), v = Bt(e == null ? void 0 : e.parentConfig), g = Bt(v == null ? void 0 : v.configurable), y = yt(g, ["checkpoint_id", "checkpointId"]) ?? null, x = yt(g, ["checkpoint_ns", "checkpointNs"]) ?? null, w = e == null ? void 0 : e.createdAt, S = typeof w == "string" && w.trim() ? w : new Date(Date.now() - t).toISOString(), T = c.slice().reverse().find((_) => _.role === "user") ?? null, b = Bt(e == null ? void 0 : e.metadata), C = yt(b, ["branch_label", "branchLabel"]), k = yt(g, ["checkpoint_id", "checkpointId"]), R = Array.isArray(e.next) ? [...e.next] : (e == null ? void 0 : e.next) === null ? null : void 0;
2678
+ const n = e.values ?? { messages: [] }, r = Array.isArray(n == null ? void 0 : n.messages) ? n.messages : [], { messages: o, ...s } = n, i = Object.keys(s).length ? s : null, a = e.tasks, l = Array.isArray(a) ? a.filter((j) => !!j && typeof j == "object").map((j) => ({ ...j })) : a === null ? null : void 0, c = r.map((j, O) => vy(j, O)).filter((j) => !!j), d = Bt(e.config), f = Bt(d == null ? void 0 : d.configurable), p = yt(f, ["checkpoint_id", "checkpointId"]), h = yt(f, ["checkpoint_ns", "checkpointNs"]), v = Bt(e == null ? void 0 : e.parentConfig), g = Bt(v == null ? void 0 : v.configurable), y = yt(g, ["checkpoint_id", "checkpointId"]) ?? null, x = yt(g, ["checkpoint_ns", "checkpointNs"]) ?? null, w = e == null ? void 0 : e.createdAt, S = typeof w == "string" && w.trim() ? w : new Date(Date.now() - t).toISOString(), T = c.slice().reverse().find((j) => j.role === "user") ?? null, b = Bt(e == null ? void 0 : e.metadata), C = yt(b, ["branch_label", "branchLabel"]), k = yt(g, ["checkpoint_id", "checkpointId"]), R = Array.isArray(e.next) ? [...e.next] : (e == null ? void 0 : e.next) === null ? null : void 0;
2679
2679
  return {
2680
2680
  messages: c,
2681
2681
  checkpointId: p ?? null,
@@ -3554,13 +3554,13 @@ function ic(e, t) {
3554
3554
  }
3555
3555
  return JSON.stringify(t.output ?? "");
3556
3556
  })()
3557
- }, _ = {
3557
+ }, j = {
3558
3558
  ...C,
3559
3559
  content: [R],
3560
3560
  artifact: t.artifact ?? C.artifact,
3561
3561
  additionalKwargs: { ...C.additionalKwargs ?? {} }
3562
3562
  };
3563
- x = Wo(x, b, _);
3563
+ x = Wo(x, b, j);
3564
3564
  }
3565
3565
  }
3566
3566
  const w = d, { messages: S, toolTimelines: T } = yr(x, e.toolTimelines);
@@ -3614,21 +3614,21 @@ function ic(e, t) {
3614
3614
  return t.type === "thread_info", e;
3615
3615
  }
3616
3616
  function Gy(e = {}) {
3617
- const t = Pe(() => En(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s = Fe(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = de(!1), [c, d] = de(null), [f, p] = de(""), [h, v] = de(null), [g, y] = de(0), [x, w] = de(!1), S = Fe(null), T = Fe(!0), b = Fe(0), C = Fe(null), k = Fe(null), R = Fe(null), _ = Fe(null), O = ue((j) => {
3618
- o(j);
3617
+ const t = Pe(() => En(e.baseUrl), [e.baseUrl]), n = e.streamPath ?? "/runs/stream", [r, o] = de(e.token ?? null), s = Fe(e.headers ?? {}), i = e.credentials ?? "include", [a, l] = de(!1), [c, d] = de(null), [f, p] = de(""), [h, v] = de(null), [g, y] = de(0), [x, w] = de(!1), S = Fe(null), T = Fe(!0), b = Fe(0), C = Fe(null), k = Fe(null), R = Fe(null), j = Fe(null), O = ue((_) => {
3618
+ o(_);
3619
3619
  }, []), $ = ue(() => {
3620
- p(""), v(null), d(null), k.current = null, R.current = null, _.current = null;
3620
+ p(""), v(null), d(null), k.current = null, R.current = null, j.current = null;
3621
3621
  }, []), q = ue(() => {
3622
- var j;
3623
- console.debug("[use-chat] stop() invoked - aborting stream"), (j = S.current) == null || j.abort(), S.current = null, C.current = null, l(!1), w(!1), b.current = 0, y(0);
3622
+ var _;
3623
+ console.debug("[use-chat] stop() invoked - aborting stream"), (_ = S.current) == null || _.abort(), S.current = null, C.current = null, l(!1), w(!1), b.current = 0, y(0);
3624
3624
  }, []), K = ue(
3625
- (j, N, I) => {
3626
- S.current && (S.current.abort(), S.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && p(""), v(null), k.current = null, R.current = null, _.current = null;
3625
+ (_, N, I) => {
3626
+ S.current && (S.current.abort(), S.current = null), l(!0), d(null), e.autoAppendAssistant !== !1 && p(""), v(null), k.current = null, R.current = null, j.current = null;
3627
3627
  const B = new AbortController();
3628
3628
  S.current = B;
3629
3629
  let D = null, P = null, H = !1;
3630
3630
  return C.current = {
3631
- threadId: j.threadId ?? null,
3631
+ threadId: _.threadId ?? null,
3632
3632
  headers: {}
3633
3633
  }, (async () => {
3634
3634
  var A, X, U, z, ne, W, M, V, F, ee, Y, ge, le, re, xe, ve, De, Ne;
@@ -3665,7 +3665,7 @@ function Gy(e = {}) {
3665
3665
  console.debug(
3666
3666
  "[use-chat] POST",
3667
3667
  t + n,
3668
- Z(j)
3668
+ Z(_)
3669
3669
  );
3670
3670
  let Xe = {};
3671
3671
  if (typeof window < "u")
@@ -3685,7 +3685,7 @@ function Gy(e = {}) {
3685
3685
  }, Ve = await fetch(t + n, {
3686
3686
  method: "POST",
3687
3687
  headers: Je,
3688
- body: JSON.stringify(j),
3688
+ body: JSON.stringify(_),
3689
3689
  signal: B.signal,
3690
3690
  credentials: i
3691
3691
  });
@@ -3758,7 +3758,7 @@ function Gy(e = {}) {
3758
3758
  if (Le.type === "checkpoint")
3759
3759
  k.current = Le.checkpointId ?? null, R.current = Le.checkpointNs ?? null, v(Le.checkpointId ?? null);
3760
3760
  else if (Le.type === "state_history") {
3761
- _.current = Le;
3761
+ j.current = Le;
3762
3762
  try {
3763
3763
  const Et = xr(Le).latest;
3764
3764
  Et && (k.current = Et.checkpointId ?? null, R.current = Et.checkpointNs ?? null, v(Et.checkpointId ?? null));
@@ -3822,7 +3822,7 @@ function Gy(e = {}) {
3822
3822
  D = "error", P = Xe, d(Xe), (ve = I == null ? void 0 : I.onError) == null || ve.call(I, Xe), H || ((De = I == null ? void 0 : I.onConnectionError) == null || De.call(I, Xe), H = !0);
3823
3823
  }
3824
3824
  } finally {
3825
- const We = b.current, Xe = k.current, ot = R.current, Je = _.current, Ve = D ?? (B.signal.aborted ? "aborted" : P ? "error" : "complete");
3825
+ const We = b.current, Xe = k.current, ot = R.current, Je = j.current, Ve = D ?? (B.signal.aborted ? "aborted" : P ? "error" : "complete");
3826
3826
  try {
3827
3827
  (Ne = I == null ? void 0 : I.onClosed) == null || Ne.call(I, {
3828
3828
  reason: Ve,
@@ -3842,8 +3842,8 @@ function Gy(e = {}) {
3842
3842
  [t, n, r, e.autoAppendAssistant]
3843
3843
  );
3844
3844
  return dt(() => () => {
3845
- var j;
3846
- T.current = !1, (j = S.current) == null || j.abort();
3845
+ var _;
3846
+ T.current = !1, (_ = S.current) == null || _.abort();
3847
3847
  }, []), {
3848
3848
  isStreaming: a,
3849
3849
  error: c,
@@ -4011,7 +4011,7 @@ function ov({
4011
4011
  }
4012
4012
  },
4013
4013
  [y, x, n, s, r, o, C]
4014
- ), { stream: R, stop: _, isStreaming: O, error: $, setToken: q } = Gy({
4014
+ ), { stream: R, stop: j, isStreaming: O, error: $, setToken: q } = Gy({
4015
4015
  baseUrl: e,
4016
4016
  token: void 0
4017
4017
  }), K = ue(
@@ -4088,19 +4088,19 @@ function ov({
4088
4088
  i,
4089
4089
  R
4090
4090
  ]
4091
- ), j = ue(() => {
4092
- h.current && (h.current.manualStop = !0), _();
4093
- }, [_]);
4091
+ ), _ = ue(() => {
4092
+ h.current && (h.current.manualStop = !0), j();
4093
+ }, [j]);
4094
4094
  return Pe(
4095
4095
  () => ({
4096
4096
  startStream: K,
4097
- stop: j,
4097
+ stop: _,
4098
4098
  isStreaming: O,
4099
4099
  error: $,
4100
4100
  setAuthToken: q,
4101
4101
  replayBufferedEvents: w
4102
4102
  }),
4103
- [K, j, O, $, q, w]
4103
+ [K, _, O, $, q, w]
4104
4104
  );
4105
4105
  }
4106
4106
  function sv({
@@ -4116,7 +4116,7 @@ function sv({
4116
4116
  isStreaming: c,
4117
4117
  getMessages: d
4118
4118
  }) {
4119
- const [f, p] = de([]), [h, v] = de([]), [g, y] = de(!1), [x, w] = de(null), [S, T] = de(!1), [b, C] = de(!1), [k, R] = de(!1), [_, O] = de(null), $ = Fe(o), q = Fe(null), K = Fe(null), j = Fe(null), N = Fe(null), I = Fe(!1), B = Fe(null), D = Fe(/* @__PURE__ */ new Map());
4119
+ const [f, p] = de([]), [h, v] = de([]), [g, y] = de(!1), [x, w] = de(null), [S, T] = de(!1), [b, C] = de(!1), [k, R] = de(!1), [j, O] = de(null), $ = Fe(o), q = Fe(null), K = Fe(null), _ = Fe(null), N = Fe(null), I = Fe(!1), B = Fe(null), D = Fe(/* @__PURE__ */ new Map());
4120
4120
  dt(() => {
4121
4121
  $.current = o;
4122
4122
  }, [o]);
@@ -4190,7 +4190,7 @@ function sv({
4190
4190
  ), A = ue((F) => {
4191
4191
  K.current = F;
4192
4192
  }, []), X = ue((F) => {
4193
- j.current = F;
4193
+ _.current = F;
4194
4194
  }, []), U = ue(
4195
4195
  (F) => {
4196
4196
  const ee = F.threadId ?? $.current;
@@ -4203,7 +4203,7 @@ function sv({
4203
4203
  t((le == null ? void 0 : le.messages) ?? [], {
4204
4204
  checkpointId: (le == null ? void 0 : le.checkpointId) ?? null,
4205
4205
  checkpointNs: (le == null ? void 0 : le.checkpointNs) ?? null
4206
- }), v(ge), p(Y), y(!!(le != null && le.nextCursor)), w((le == null ? void 0 : le.nextCursor) ?? null), B.current = `${ee}:latest`, K.current = null, j.current = null;
4206
+ }), v(ge), p(Y), y(!!(le != null && le.nextCursor)), w((le == null ? void 0 : le.nextCursor) ?? null), B.current = `${ee}:latest`, K.current = null, _.current = null;
4207
4207
  },
4208
4208
  [t]
4209
4209
  ), z = ue(
@@ -4279,7 +4279,7 @@ function sv({
4279
4279
  K.current = null, q.current = o;
4280
4280
  return;
4281
4281
  }
4282
- if (j.current === o) {
4282
+ if (_.current === o) {
4283
4283
  q.current = o;
4284
4284
  return;
4285
4285
  }
@@ -4310,7 +4310,7 @@ function sv({
4310
4310
  Z
4311
4311
  ]);
4312
4312
  const V = ue(() => {
4313
- p([]), v([]), y(!1), w(null), T(!1), C(!1), R(!1), O(null), K.current = null, j.current = null, q.current = null, B.current = null, N.current = null;
4313
+ p([]), v([]), y(!1), w(null), T(!1), C(!1), R(!1), O(null), K.current = null, _.current = null, q.current = null, B.current = null, N.current = null;
4314
4314
  }, []);
4315
4315
  return {
4316
4316
  threadCheckpoints: f,
@@ -4318,7 +4318,7 @@ function sv({
4318
4318
  isLoadingThread: S,
4319
4319
  isHistoryLoading: b,
4320
4320
  isLoadingCheckpoint: k,
4321
- threadStateError: _,
4321
+ threadStateError: j,
4322
4322
  hasMoreHistory: g,
4323
4323
  loadThread: Z,
4324
4324
  navigateToCheckpoint: z,
@@ -4381,7 +4381,7 @@ function lv({
4381
4381
  onThreadChange: r,
4382
4382
  onCurrentThreadDeleted: o
4383
4383
  }) {
4384
- const [s, i] = de([]), [a, l] = de(t), [c, d] = de(!1), [f, p] = de(null), [h, v] = de([]), [g, y] = de(!1), [, x] = de(null), [w, S] = de([]), [T, b] = de(!1), [, C] = de(null), [k, R] = de(null), [_, O] = de(!1), $ = Fe(a), q = Fe(/* @__PURE__ */ new Map());
4384
+ const [s, i] = de([]), [a, l] = de(t), [c, d] = de(!1), [f, p] = de(null), [h, v] = de([]), [g, y] = de(!1), [, x] = de(null), [w, S] = de([]), [T, b] = de(!1), [, C] = de(null), [k, R] = de(null), [j, O] = de(!1), $ = Fe(a), q = Fe(/* @__PURE__ */ new Map());
4385
4385
  dt(() => {
4386
4386
  $.current = a;
4387
4387
  }, [a]);
@@ -4396,7 +4396,7 @@ function lv({
4396
4396
  } finally {
4397
4397
  d(!1);
4398
4398
  }
4399
- }, [e, n]), j = ue(async () => {
4399
+ }, [e, n]), _ = ue(async () => {
4400
4400
  y(!0), x(null);
4401
4401
  try {
4402
4402
  const U = await e.listSharedThreads();
@@ -4422,8 +4422,8 @@ function lv({
4422
4422
  dt(() => {
4423
4423
  K(), N();
4424
4424
  }, [N, K]), dt(() => {
4425
- j();
4426
- }, [j]), dt(() => {
4425
+ _();
4426
+ }, [_]), dt(() => {
4427
4427
  r == null || r(a);
4428
4428
  }, [a, r]);
4429
4429
  const I = ue(
@@ -4467,7 +4467,7 @@ function lv({
4467
4467
  async (U, z) => {
4468
4468
  O(!0), R("Sharing thread…");
4469
4469
  try {
4470
- await e.shareThread(U, z), await j(), R("Shared successfully");
4470
+ await e.shareThread(U, z), await _(), R("Shared successfully");
4471
4471
  } catch (ne) {
4472
4472
  const W = av(ne);
4473
4473
  throw n == null || n(W), R(`Failed to share: ${W}`), new Error(W);
@@ -4475,29 +4475,29 @@ function lv({
4475
4475
  O(!1);
4476
4476
  }
4477
4477
  },
4478
- [e, n, j]
4478
+ [e, n, _]
4479
4479
  ), H = ue(
4480
4480
  async (U, z) => {
4481
4481
  try {
4482
- await e.unshareThread(U, z), await j();
4482
+ await e.unshareThread(U, z), await _();
4483
4483
  } catch (ne) {
4484
4484
  const W = String(ne);
4485
4485
  throw n == null || n(W), ne;
4486
4486
  }
4487
4487
  },
4488
- [e, n, j]
4488
+ [e, n, _]
4489
4489
  ), Z = Pe(
4490
4490
  () => ({
4491
4491
  createThread: I,
4492
4492
  deleteThread: B,
4493
4493
  renameThread: D,
4494
4494
  refreshThreads: K,
4495
- refreshSharedThreads: j,
4495
+ refreshSharedThreads: _,
4496
4496
  refreshSmartOrgUsers: N,
4497
4497
  shareThread: P,
4498
4498
  unshareThread: H
4499
4499
  }),
4500
- [I, B, D, K, j, N, P, H]
4500
+ [I, B, D, K, _, N, P, H]
4501
4501
  ), A = ue((U) => {
4502
4502
  if (!(U != null && U.threadId)) return;
4503
4503
  const z = {
@@ -4531,7 +4531,7 @@ function lv({
4531
4531
  isLoadingSmartOrgUsers: T,
4532
4532
  actions: Z,
4533
4533
  addThreadFromEvent: A,
4534
- shareInFlight: _,
4534
+ shareInFlight: j,
4535
4535
  shareStatus: k,
4536
4536
  clearShareStatus: X
4537
4537
  };
@@ -4558,12 +4558,12 @@ function cv({
4558
4558
  threadsError: C,
4559
4559
  sharedThreads: k,
4560
4560
  isLoadingSharedThreads: R,
4561
- smartOrgUsers: _,
4561
+ smartOrgUsers: j,
4562
4562
  isLoadingSmartOrgUsers: O,
4563
4563
  actions: $,
4564
4564
  addThreadFromEvent: q,
4565
4565
  shareInFlight: K,
4566
- shareStatus: j,
4566
+ shareStatus: _,
4567
4567
  clearShareStatus: N
4568
4568
  } = lv({
4569
4569
  api: c,
@@ -4695,11 +4695,11 @@ function cv({
4695
4695
  error: C,
4696
4696
  sharedThreads: k,
4697
4697
  isLoadingSharedThreads: R,
4698
- smartOrgUsers: _,
4698
+ smartOrgUsers: j,
4699
4699
  isLoadingSmartOrgUsers: O,
4700
4700
  actions: $,
4701
4701
  shareInFlight: K,
4702
- shareStatus: j,
4702
+ shareStatus: _,
4703
4703
  clearShareStatus: N
4704
4704
  }),
4705
4705
  [
@@ -4710,11 +4710,11 @@ function cv({
4710
4710
  C,
4711
4711
  k,
4712
4712
  R,
4713
- _,
4713
+ j,
4714
4714
  O,
4715
4715
  $,
4716
4716
  K,
4717
- j,
4717
+ _,
4718
4718
  N
4719
4719
  ]
4720
4720
  ), Nt = Pe(() => {
@@ -4910,7 +4910,7 @@ function fv({
4910
4910
  v || y(N), I && (a == null || a(N));
4911
4911
  },
4912
4912
  [v, a]
4913
- ), _ = se.useCallback(
4913
+ ), j = se.useCallback(
4914
4914
  async (N) => {
4915
4915
  N && N.preventDefault();
4916
4916
  const I = (x ?? "").trim();
@@ -4942,11 +4942,11 @@ function fv({
4942
4942
  R(I, { fromUser: !0 }), C.current && (C.current.shouldClear = !1), T.current && (T.current.style.height = "auto", T.current.style.height = `${T.current.scrollHeight}px`);
4943
4943
  }, [R]), $ = se.useCallback(
4944
4944
  (N) => {
4945
- N.key === "Enter" && !N.shiftKey ? (N.preventDefault(), _()) : N.key === "Escape" && t && (N.preventDefault(), c == null || c());
4945
+ N.key === "Enter" && !N.shiftKey ? (N.preventDefault(), j()) : N.key === "Escape" && t && (N.preventDefault(), c == null || c());
4946
4946
  },
4947
- [_, t, c]
4948
- ), j = `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))]" : ""} ${p}`;
4949
- return /* @__PURE__ */ u.jsx("form", { onSubmit: (N) => void _(N), className: `w-full ${f}`, children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
4947
+ [j, t, c]
4948
+ ), _ = `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))]" : ""} ${p}`;
4949
+ return /* @__PURE__ */ u.jsx("form", { onSubmit: (N) => void j(N), className: `w-full ${f}`, children: /* @__PURE__ */ u.jsxs("div", { className: "flex items-end gap-2", children: [
4950
4950
  /* @__PURE__ */ u.jsx("div", { className: "flex-1", children: /* @__PURE__ */ u.jsx(
4951
4951
  od,
4952
4952
  {
@@ -4955,7 +4955,7 @@ function fv({
4955
4955
  onChange: O,
4956
4956
  onKeyDown: $,
4957
4957
  placeholder: t ? "Edit your message..." : n,
4958
- className: j,
4958
+ className: _,
4959
4959
  disabled: o,
4960
4960
  maxLength: s,
4961
4961
  rows: 1,
@@ -5241,8 +5241,8 @@ var Sv = "DismissableLayer", Xi = "dismissableLayer.update", Cv = "dismissableLa
5241
5241
  onDismiss: a,
5242
5242
  ...l
5243
5243
  } = e, c = m.useContext(id), [d, f] = m.useState(null), p = (d == null ? void 0 : d.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, h] = m.useState({}), v = Ge(t, (k) => f(k)), g = Array.from(c.layers), [y] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), x = g.indexOf(y), w = d ? g.indexOf(d) : -1, S = c.layersWithOutsidePointerEventsDisabled.size > 0, T = w >= x, b = Ev((k) => {
5244
- const R = k.target, _ = [...c.branches].some((O) => O.contains(R));
5245
- !T || _ || (o == null || o(k), i == null || i(k), k.defaultPrevented || a == null || a());
5244
+ const R = k.target, j = [...c.branches].some((O) => O.contains(R));
5245
+ !T || j || (o == null || o(k), i == null || i(k), k.defaultPrevented || a == null || a());
5246
5246
  }, p), C = Rv((k) => {
5247
5247
  const R = k.target;
5248
5248
  [...c.branches].some((O) => O.contains(R)) || (s == null || s(k), i == null || i(k), k.defaultPrevented || a == null || a());
@@ -5776,12 +5776,12 @@ const Xv = (e) => ({
5776
5776
  }, h = _a(o), v = ja(h), g = await i.getDimensions(c), y = h === "y", x = y ? "top" : "left", w = y ? "bottom" : "right", S = y ? "clientHeight" : "clientWidth", T = s.reference[v] + s.reference[h] - p[h] - s.floating[v], b = p[h] - s.reference[h], C = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(c));
5777
5777
  let k = C ? C[S] : 0;
5778
5778
  (!k || !await (i.isElement == null ? void 0 : i.isElement(C))) && (k = a.floating[S] || s.floating[v]);
5779
- const R = T / 2 - b / 2, _ = k / 2 - g[v] / 2 - 1, O = On(f[x], _), $ = On(f[w], _), q = O, K = k - g[v] - $, j = k / 2 - g[v] / 2 + R, N = Ji(q, j, K), I = !l.arrow && jr(o) != null && j !== N && s.reference[v] / 2 - (j < q ? O : $) - g[v] / 2 < 0, B = I ? j < q ? j - q : j - K : 0;
5779
+ const R = T / 2 - b / 2, j = k / 2 - g[v] / 2 - 1, O = On(f[x], j), $ = On(f[w], j), q = O, K = k - g[v] - $, _ = k / 2 - g[v] / 2 + R, N = Ji(q, _, K), I = !l.arrow && jr(o) != null && _ !== N && s.reference[v] / 2 - (_ < q ? O : $) - g[v] / 2 < 0, B = I ? _ < q ? _ - q : _ - K : 0;
5780
5780
  return {
5781
5781
  [h]: p[h] + B,
5782
5782
  data: {
5783
5783
  [h]: N,
5784
- centerOffset: j - N - B,
5784
+ centerOffset: _ - N - B,
5785
5785
  ...I && {
5786
5786
  alignmentOffset: B
5787
5787
  }
@@ -5815,24 +5815,24 @@ const Xv = (e) => ({
5815
5815
  return {};
5816
5816
  const x = Nn(o), w = vn(a), S = Nn(a) === a, T = await (l.isRTL == null ? void 0 : l.isRTL(c.floating)), b = p || (S || !g ? [ss(a)] : Hv(a)), C = v !== "none";
5817
5817
  !p && C && b.push(...qv(a, g, v, T));
5818
- const k = [a, ...b], R = await Zr(t, y), _ = [];
5818
+ const k = [a, ...b], R = await Zr(t, y), j = [];
5819
5819
  let O = ((r = s.flip) == null ? void 0 : r.overflows) || [];
5820
- if (d && _.push(R[x]), f) {
5821
- const j = Uv(o, i, T);
5822
- _.push(R[j[0]], R[j[1]]);
5820
+ if (d && j.push(R[x]), f) {
5821
+ const _ = Uv(o, i, T);
5822
+ j.push(R[_[0]], R[_[1]]);
5823
5823
  }
5824
5824
  if (O = [...O, {
5825
5825
  placement: o,
5826
- overflows: _
5827
- }], !_.every((j) => j <= 0)) {
5826
+ overflows: j
5827
+ }], !j.every((_) => _ <= 0)) {
5828
5828
  var $, q;
5829
- const j = ((($ = s.flip) == null ? void 0 : $.index) || 0) + 1, N = k[j];
5829
+ const _ = ((($ = s.flip) == null ? void 0 : $.index) || 0) + 1, N = k[_];
5830
5830
  if (N && (!(f === "alignment" ? w !== vn(N) : !1) || // We leave the current main axis only if every placement on that axis
5831
5831
  // overflows the main axis.
5832
5832
  O.every((D) => vn(D.placement) === w ? D.overflows[0] > 0 : !0)))
5833
5833
  return {
5834
5834
  data: {
5835
- index: j,
5835
+ index: _,
5836
5836
  overflows: O
5837
5837
  },
5838
5838
  reset: {
@@ -6103,8 +6103,8 @@ const ew = function(e) {
6103
6103
  availableWidth: R,
6104
6104
  availableHeight: k
6105
6105
  });
6106
- const _ = await i.getDimensions(a.floating);
6107
- return v !== _.width || g !== _.height ? {
6106
+ const j = await i.getDimensions(a.floating);
6107
+ return v !== j.width || g !== j.height ? {
6108
6108
  reset: {
6109
6109
  rects: !0
6110
6110
  }
@@ -6684,7 +6684,7 @@ function Fw(e) {
6684
6684
  D !== C.current && (C.current = D, g(D));
6685
6685
  }, []), S = m.useCallback((D) => {
6686
6686
  D !== k.current && (k.current = D, x(D));
6687
- }, []), T = s || v, b = i || y, C = m.useRef(null), k = m.useRef(null), R = m.useRef(d), _ = l != null, O = Ci(l), $ = Ci(o), q = Ci(c), K = m.useCallback(() => {
6687
+ }, []), T = s || v, b = i || y, C = m.useRef(null), k = m.useRef(null), R = m.useRef(d), j = l != null, O = Ci(l), $ = Ci(o), q = Ci(c), K = m.useCallback(() => {
6688
6688
  if (!C.current || !k.current)
6689
6689
  return;
6690
6690
  const D = {
@@ -6701,7 +6701,7 @@ function Fw(e) {
6701
6701
  // setting it to `true` when `open === false` (must be specified).
6702
6702
  isPositioned: q.current !== !1
6703
6703
  };
6704
- j.current && !as(R.current, H) && (R.current = H, Es.flushSync(() => {
6704
+ _.current && !as(R.current, H) && (R.current = H, Es.flushSync(() => {
6705
6705
  f(H);
6706
6706
  }));
6707
6707
  });
@@ -6712,16 +6712,16 @@ function Fw(e) {
6712
6712
  isPositioned: !1
6713
6713
  })));
6714
6714
  }, [c]);
6715
- const j = m.useRef(!1);
6716
- Ko(() => (j.current = !0, () => {
6717
- j.current = !1;
6715
+ const _ = m.useRef(!1);
6716
+ Ko(() => (_.current = !0, () => {
6717
+ _.current = !1;
6718
6718
  }), []), Ko(() => {
6719
6719
  if (T && (C.current = T), b && (k.current = b), T && b) {
6720
6720
  if (O.current)
6721
6721
  return O.current(T, b, K);
6722
6722
  K();
6723
6723
  }
6724
- }, [T, b, K, O, _]);
6724
+ }, [T, b, K, O, j]);
6725
6725
  const N = m.useMemo(() => ({
6726
6726
  reference: C,
6727
6727
  floating: k,
@@ -6874,15 +6874,15 @@ var La = "PopperContent", [Jw, Zw] = Sd(La), Ed = m.forwardRef(
6874
6874
  updatePositionStrategy: h = "optimized",
6875
6875
  onPlaced: v,
6876
6876
  ...g
6877
- } = e, y = Cd(La, n), [x, w] = m.useState(null), S = Ge(t, (ge) => w(ge)), [T, b] = m.useState(null), C = bd(T), k = (C == null ? void 0 : C.width) ?? 0, R = (C == null ? void 0 : C.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], q = $.length > 0, K = {
6877
+ } = e, y = Cd(La, n), [x, w] = m.useState(null), S = Ge(t, (ge) => w(ge)), [T, b] = m.useState(null), C = bd(T), k = (C == null ? void 0 : C.width) ?? 0, R = (C == null ? void 0 : C.height) ?? 0, j = r + (s !== "center" ? "-" + s : ""), O = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, $ = Array.isArray(c) ? c : [c], q = $.length > 0, K = {
6878
6878
  padding: O,
6879
6879
  boundary: $.filter(eb),
6880
6880
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
6881
6881
  altBoundary: q
6882
- }, { refs: j, floatingStyles: N, placement: I, isPositioned: B, middlewareData: D } = Fw({
6882
+ }, { refs: _, floatingStyles: N, placement: I, isPositioned: B, middlewareData: D } = Fw({
6883
6883
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
6884
6884
  strategy: "fixed",
6885
- placement: _,
6885
+ placement: j,
6886
6886
  whileElementsMounted: (...ge) => Nw(...ge, {
6887
6887
  animationFrame: h === "always"
6888
6888
  }),
@@ -6919,7 +6919,7 @@ var La = "PopperContent", [Jw, Zw] = Sd(La), Ed = m.forwardRef(
6919
6919
  }, [x]), /* @__PURE__ */ u.jsx(
6920
6920
  "div",
6921
6921
  {
6922
- ref: j.setFloating,
6922
+ ref: _.setFloating,
6923
6923
  "data-radix-popper-content-wrapper": "",
6924
6924
  style: {
6925
6925
  ...N,
@@ -7174,8 +7174,8 @@ var db = m.forwardRef((e, t) => {
7174
7174
  b.current = !0;
7175
7175
  }),
7176
7176
  onFocus: he(e.onFocus, (R) => {
7177
- const _ = !b.current;
7178
- if (R.target === R.currentTarget && _ && !x) {
7177
+ const j = !b.current;
7178
+ if (R.target === R.currentTarget && j && !x) {
7179
7179
  const O = new CustomEvent(Ti, ib);
7180
7180
  if (R.currentTarget.dispatchEvent(O), !O.defaultPrevented) {
7181
7181
  const $ = T().filter((I) => I.focusable), q = $.find((I) => I.active), K = $.find((I) => I.id === g), N = [q, K, ...$].filter(
@@ -7734,8 +7734,8 @@ function e0(e) {
7734
7734
  return !1;
7735
7735
  if (!r.current && "changedTouches" in g && (S || T) && (r.current = b), !b)
7736
7736
  return !0;
7737
- var _ = r.current || b;
7738
- return Xb(_, y, g, _ === "h" ? S : T);
7737
+ var j = r.current || b;
7738
+ return Xb(j, y, g, j === "h" ? S : T);
7739
7739
  }, []), l = m.useCallback(function(g) {
7740
7740
  var y = g;
7741
7741
  if (!(!hr.length || hr[hr.length - 1] !== s)) {
@@ -7910,14 +7910,14 @@ var sn = "MenuContent", [p0, za] = ar(sn), tf = m.forwardRef(
7910
7910
  onDismiss: h,
7911
7911
  disableOutsideScroll: v,
7912
7912
  ...g
7913
- } = e, y = lr(sn, n), x = yo(sn, n), w = Ws(n), S = Jd(n), T = a0(n), [b, C] = m.useState(null), k = m.useRef(null), R = Ge(t, k, y.onContentChange), _ = m.useRef(0), O = m.useRef(""), $ = m.useRef(0), q = m.useRef(null), K = m.useRef("right"), j = m.useRef(0), N = v ? Hs : m.Fragment, I = v ? { as: g0, allowPinchZoom: !0 } : void 0, B = (P) => {
7913
+ } = e, y = lr(sn, n), x = yo(sn, n), w = Ws(n), S = Jd(n), T = a0(n), [b, C] = m.useState(null), k = m.useRef(null), R = Ge(t, k, y.onContentChange), j = m.useRef(0), O = m.useRef(""), $ = m.useRef(0), q = m.useRef(null), K = m.useRef("right"), _ = m.useRef(0), N = v ? Hs : m.Fragment, I = v ? { as: g0, allowPinchZoom: !0 } : void 0, B = (P) => {
7914
7914
  var W, M;
7915
7915
  const H = O.current + P, Z = T().filter((V) => !V.disabled), A = document.activeElement, X = (W = Z.find((V) => V.ref.current === A)) == null ? void 0 : W.textValue, U = Z.map((V) => V.textValue), z = R0(U, H, X), ne = (M = Z.find((V) => V.textValue === z)) == null ? void 0 : M.ref.current;
7916
7916
  (function V(F) {
7917
- O.current = F, window.clearTimeout(_.current), F !== "" && (_.current = window.setTimeout(() => V(""), 1e3));
7917
+ O.current = F, window.clearTimeout(j.current), F !== "" && (j.current = window.setTimeout(() => V(""), 1e3));
7918
7918
  })(H), ne && setTimeout(() => ne.focus());
7919
7919
  };
7920
- m.useEffect(() => () => window.clearTimeout(_.current), []), Na();
7920
+ m.useEffect(() => () => window.clearTimeout(j.current), []), Na();
7921
7921
  const D = m.useCallback((P) => {
7922
7922
  var Z, A;
7923
7923
  return K.current === ((Z = q.current) == null ? void 0 : Z.side) && A0(P, (A = q.current) == null ? void 0 : A.area);
@@ -8006,15 +8006,15 @@ var sn = "MenuContent", [p0, za] = ar(sn), tf = m.forwardRef(
8006
8006
  Yd.includes(P.key) && ne.reverse(), I0(ne);
8007
8007
  }),
8008
8008
  onBlur: he(e.onBlur, (P) => {
8009
- P.currentTarget.contains(P.target) || (window.clearTimeout(_.current), O.current = "");
8009
+ P.currentTarget.contains(P.target) || (window.clearTimeout(j.current), O.current = "");
8010
8010
  }),
8011
8011
  onPointerMove: he(
8012
8012
  e.onPointerMove,
8013
8013
  to((P) => {
8014
- const H = P.target, Z = j.current !== P.clientX;
8014
+ const H = P.target, Z = _.current !== P.clientX;
8015
8015
  if (P.currentTarget.contains(H) && Z) {
8016
- const A = P.clientX > j.current ? "right" : "left";
8017
- K.current = A, j.current = P.clientX;
8016
+ const A = P.clientX > _.current ? "right" : "left";
8017
+ K.current = A, _.current = P.clientX;
8018
8018
  }
8019
8019
  })
8020
8020
  )
@@ -9589,7 +9589,7 @@ const JS = {
9589
9589
  Ae((b) => b.length > 0),
9590
9590
  Be(g, h),
9591
9591
  fe(([b, C, k]) => {
9592
- const R = b.reduce((_, O, $) => Zt(_, O, so(O, C.offsetTree, k) || $), Sr());
9592
+ const R = b.reduce((j, O, $) => Zt(j, O, so(O, C.offsetTree, k) || $), Sr());
9593
9593
  return {
9594
9594
  ...C,
9595
9595
  groupIndices: b,
@@ -9673,32 +9673,32 @@ const JS = {
9673
9673
  s,
9674
9674
  Be(g),
9675
9675
  fe(([b, C]) => {
9676
- const k = C.groupIndices.length > 0, R = [], _ = C.lastSize;
9676
+ const k = C.groupIndices.length > 0, R = [], j = C.lastSize;
9677
9677
  if (k) {
9678
9678
  const O = ro(C.sizeTree, 0);
9679
9679
  let $ = 0, q = 0;
9680
9680
  for (; $ < b; ) {
9681
- const j = C.groupIndices[q], N = C.groupIndices.length === q + 1 ? 1 / 0 : C.groupIndices[q + 1] - j - 1;
9681
+ const _ = C.groupIndices[q], N = C.groupIndices.length === q + 1 ? 1 / 0 : C.groupIndices[q + 1] - _ - 1;
9682
9682
  R.push({
9683
- endIndex: j,
9683
+ endIndex: _,
9684
9684
  size: O,
9685
- startIndex: j
9685
+ startIndex: _
9686
9686
  }), R.push({
9687
- endIndex: j + 1 + N - 1,
9688
- size: _,
9689
- startIndex: j + 1
9687
+ endIndex: _ + 1 + N - 1,
9688
+ size: j,
9689
+ startIndex: _ + 1
9690
9690
  }), q++, $ += N + 1;
9691
9691
  }
9692
9692
  const K = Yn(C.sizeTree);
9693
9693
  return $ !== b && K.shift(), K.reduce(
9694
- (j, { k: N, v: I }) => {
9695
- let B = j.ranges;
9696
- return j.prevSize !== 0 && (B = [
9697
- ...j.ranges,
9694
+ (_, { k: N, v: I }) => {
9695
+ let B = _.ranges;
9696
+ return _.prevSize !== 0 && (B = [
9697
+ ..._.ranges,
9698
9698
  {
9699
9699
  endIndex: N + b - 1,
9700
- size: j.prevSize,
9701
- startIndex: j.prevIndex
9700
+ size: _.prevSize,
9701
+ startIndex: _.prevIndex
9702
9702
  }
9703
9703
  ]), {
9704
9704
  prevIndex: N + b,
@@ -9721,7 +9721,7 @@ const JS = {
9721
9721
  }),
9722
9722
  {
9723
9723
  prevIndex: 0,
9724
- prevSize: _,
9724
+ prevSize: j,
9725
9725
  ranges: []
9726
9726
  }
9727
9727
  ).ranges;
@@ -9748,18 +9748,18 @@ const JS = {
9748
9748
  if (ct(C.sizeTree))
9749
9749
  return C;
9750
9750
  let R = Sr();
9751
- const _ = Ct(y);
9751
+ const j = Ct(y);
9752
9752
  let O = 0, $ = 0, q = 0;
9753
9753
  for (; O < -b; ) {
9754
- q = _[$];
9755
- const K = _[$ + 1] - q - 1;
9754
+ q = j[$];
9755
+ const K = j[$ + 1] - q - 1;
9756
9756
  $++, O += K + 1;
9757
9757
  }
9758
- if (R = Yn(C.sizeTree).reduce((K, { k: j, v: N }) => Zt(K, Math.max(0, j + b), N), R), O !== -b) {
9758
+ if (R = Yn(C.sizeTree).reduce((K, { k: _, v: N }) => Zt(K, Math.max(0, _ + b), N), R), O !== -b) {
9759
9759
  const K = ro(C.sizeTree, q);
9760
9760
  R = Zt(R, 0, K);
9761
- const j = pn(C.sizeTree, -b + 1)[1];
9762
- R = Zt(R, 1, j);
9761
+ const _ = pn(C.sizeTree, -b + 1)[1];
9762
+ R = Zt(R, 1, _);
9763
9763
  }
9764
9764
  return {
9765
9765
  ...C,
@@ -9767,7 +9767,7 @@ const JS = {
9767
9767
  ...aa(C.offsetTree, 0, R, k)
9768
9768
  };
9769
9769
  } else {
9770
- const R = Yn(C.sizeTree).reduce((_, { k: O, v: $ }) => Zt(_, Math.max(0, O + b), $), Sr());
9770
+ const R = Yn(C.sizeTree).reduce((j, { k: O, v: $ }) => Zt(j, Math.max(0, O + b), $), Sr());
9771
9771
  return {
9772
9772
  ...C,
9773
9773
  sizeTree: R,
@@ -9885,14 +9885,14 @@ const vo = rt(
9885
9885
  Be(e, s, o),
9886
9886
  fe(
9887
9887
  ([
9888
- [T, b, C, k, R, _, O, $],
9888
+ [T, b, C, k, R, j, O, $],
9889
9889
  q,
9890
9890
  K,
9891
- j
9891
+ _
9892
9892
  ]) => {
9893
9893
  const N = rp(T), { align: I, behavior: B, offset: D } = N, P = k - 1, H = tp(N, b, P);
9894
- let Z = so(H, b.offsetTree, q) + _;
9895
- I === "end" ? (Z += K + pn(b.sizeTree, H)[1] - C + j, H === P && (Z += O)) : I === "center" ? Z += (K + pn(b.sizeTree, H)[1] - C + j) / 2 : Z -= R, D && (Z += D);
9894
+ let Z = so(H, b.offsetTree, q) + j;
9895
+ I === "end" ? (Z += K + pn(b.sizeTree, H)[1] - C + _, H === P && (Z += O)) : I === "center" ? Z += (K + pn(b.sizeTree, H)[1] - C + _) / 2 : Z -= R, D && (Z += D);
9896
9896
  const A = (X) => {
9897
9897
  S(), X ? ($("retrying to scroll to", { location: T }, Gt.DEBUG), $e(h, T)) : ($e(v, !0), $("list did not change, scroll successful", {}, Gt.DEBUG));
9898
9898
  };
@@ -10019,12 +10019,12 @@ const io = "up", Vr = "down", tC = "none", nC = {
10019
10019
  Q(
10020
10020
  kt(r, Re(s), Re(t), Re(e), Re(d)),
10021
10021
  wn((w, [{ scrollHeight: S, scrollTop: T }, b, C, k, R]) => {
10022
- const _ = T + b - S > -R, O = {
10022
+ const j = T + b - S > -R, O = {
10023
10023
  scrollHeight: S,
10024
10024
  scrollTop: T,
10025
10025
  viewportHeight: b
10026
10026
  };
10027
- if (_) {
10027
+ if (j) {
10028
10028
  let q, K;
10029
10029
  return T > w.state.scrollTop ? (q = "SCROLLED_DOWN", K = w.state.scrollTop - T) : (q = "SIZE_DECREASED", K = w.state.scrollTop - T || w.scrollTopDelta), {
10030
10030
  atBottom: !0,
@@ -10165,10 +10165,10 @@ const tl = rt(
10165
10165
  ]) => {
10166
10166
  const T = d - w, b = y + x, C = Math.max(p - T, 0);
10167
10167
  let k = Fc;
10168
- const R = zc(S, ds), _ = zc(S, fs);
10169
- return h -= w, h += p + x, v += p + x, v -= w, h > d + b - R && (k = io), v < d - C + f + _ && (k = Vr), k !== Fc ? [
10168
+ const R = zc(S, ds), j = zc(S, fs);
10169
+ return h -= w, h += p + x, v += p + x, v -= w, h > d + b - R && (k = io), v < d - C + f + j && (k = Vr), k !== Fc ? [
10170
10170
  Math.max(T - p - Bc(g, ds, k) - R, 0),
10171
- T - C - x + f + Bc(g, fs, k) + _
10171
+ T - C - x + f + Bc(g, fs, k) + j
10172
10172
  ] : null;
10173
10173
  }
10174
10174
  ),
@@ -10302,8 +10302,8 @@ const ur = rt(
10302
10302
  Re(n),
10303
10303
  e
10304
10304
  ),
10305
- Ae(([C, k, , R, , , , , , , _]) => {
10306
- const O = _ && _.length !== R;
10305
+ Ae(([C, k, , R, , , , , , , j]) => {
10306
+ const O = j && j.length !== R;
10307
10307
  return C && !k && !O;
10308
10308
  }),
10309
10309
  fe(
@@ -10312,25 +10312,25 @@ const ur = rt(
10312
10312
  ,
10313
10313
  [C, k],
10314
10314
  R,
10315
- _,
10315
+ j,
10316
10316
  O,
10317
10317
  $,
10318
10318
  q,
10319
10319
  K,
10320
- j,
10320
+ _,
10321
10321
  N
10322
10322
  ]) => {
10323
- const I = _, { offsetTree: B, sizeTree: D } = I, P = Ct(y);
10323
+ const I = j, { offsetTree: B, sizeTree: D } = I, P = Ct(y);
10324
10324
  if (R === 0)
10325
10325
  return { ...Ai, totalCount: R };
10326
10326
  if (C === 0 && k === 0)
10327
- return P === 0 ? { ...Ai, totalCount: R } : sp(P, O, _, K, j, N || []);
10327
+ return P === 0 ? { ...Ai, totalCount: R } : sp(P, O, j, K, _, N || []);
10328
10328
  if (ct(D))
10329
10329
  return P > 0 ? null : Zo(
10330
10330
  oC(el(O, R), I, N),
10331
10331
  [],
10332
10332
  R,
10333
- j,
10333
+ _,
10334
10334
  I,
10335
10335
  K
10336
10336
  );
@@ -10345,7 +10345,7 @@ const ur = rt(
10345
10345
  }
10346
10346
  }
10347
10347
  if (!$)
10348
- return Zo([], H, R, j, I, K);
10348
+ return Zo([], H, R, _, I, K);
10349
10349
  const Z = q.length > 0 ? q[q.length - 1] + 1 : 0, A = KS(B, C, k, Z);
10350
10350
  if (A.length === 0)
10351
10351
  return null;
@@ -10355,17 +10355,17 @@ const ur = rt(
10355
10355
  let M = W.offset, V = ne.start;
10356
10356
  const F = W.size;
10357
10357
  if (W.offset < C) {
10358
- V += Math.floor((C - W.offset + j) / (F + j));
10358
+ V += Math.floor((C - W.offset + _) / (F + _));
10359
10359
  const Y = V - ne.start;
10360
- M += Y * F + Y * j;
10360
+ M += Y * F + Y * _;
10361
10361
  }
10362
10362
  V < Z && (M += (Z - V) * F, V = Z);
10363
10363
  const ee = Math.min(ne.end, X);
10364
10364
  for (let Y = V; Y <= ee && !(M >= k); Y++)
10365
- z.push({ data: N == null ? void 0 : N[Y], index: Y, offset: M, size: F }), M += F + j;
10365
+ z.push({ data: N == null ? void 0 : N[Y], index: Y, offset: M, size: F }), M += F + _;
10366
10366
  }
10367
10367
  });
10368
- return Zo(U, H, R, j, I, K);
10368
+ return Zo(U, H, R, _, I, K);
10369
10369
  }
10370
10370
  ),
10371
10371
  //@ts-expect-error filter needs to be fixed
@@ -10499,14 +10499,14 @@ const ur = rt(
10499
10499
  Be(t, l, n, s, o, r, a),
10500
10500
  Be(e),
10501
10501
  fe(([[f, p, h, v, g, y, x, w], S]) => {
10502
- const { align: T, behavior: b, calculateViewLocation: C = iC, done: k, ...R } = f, _ = tp(f, p, v - 1), O = so(_, p.offsetTree, S) + g + y, $ = O + pn(p.sizeTree, _)[1], q = w + y, K = w + h - x, j = C({
10502
+ const { align: T, behavior: b, calculateViewLocation: C = iC, done: k, ...R } = f, j = tp(f, p, v - 1), O = so(j, p.offsetTree, S) + g + y, $ = O + pn(p.sizeTree, j)[1], q = w + y, K = w + h - x, _ = C({
10503
10503
  itemBottom: $,
10504
10504
  itemTop: O,
10505
10505
  locationParams: { align: T, behavior: b, ...R },
10506
10506
  viewportBottom: K,
10507
10507
  viewportTop: q
10508
10508
  });
10509
- return j ? k && un(
10509
+ return _ ? k && un(
10510
10510
  Q(
10511
10511
  i,
10512
10512
  Ae((N) => !N),
@@ -10515,7 +10515,7 @@ const ur = rt(
10515
10515
  nr(Ct(i) ? 1 : 2)
10516
10516
  ),
10517
10517
  k
10518
- ) : k && k(), j;
10518
+ ) : k && k(), _;
10519
10519
  }),
10520
10520
  Ae((f) => f !== null)
10521
10521
  ),
@@ -10555,8 +10555,8 @@ const aC = (e, t) => typeof e == "function" ? Hc(e(t)) : t && Hc(e), lC = rt(
10555
10555
  Q(
10556
10556
  kt(Q(Re(t), nr(1)), l),
10557
10557
  Be(Re(v), s, a, f),
10558
- fe(([[b, C], k, R, _, O]) => {
10559
- let $ = C && _, q = "auto";
10558
+ fe(([[b, C], k, R, j, O]) => {
10559
+ let $ = C && j, q = "auto";
10560
10560
  return $ && (q = aC(k, R || O), $ = $ && !!q), { followOutputBehavior: q, shouldFollow: $, totalCount: b };
10561
10561
  }),
10562
10562
  Ae(({ shouldFollow: b }) => b)
@@ -10611,7 +10611,7 @@ const aC = (e, t) => typeof e == "function" ? Hc(e(t)) : t && Hc(e), lC = rt(
10611
10611
  Q(
10612
10612
  kt(Q(T, nr(1)), l),
10613
10613
  Be(Re(S), a, f, p),
10614
- fe(([[b, C], k, R, _, O]) => C && R && (k == null ? void 0 : k({ context: O, totalCount: b, scrollingInProgress: _ }))),
10614
+ fe(([[b, C], k, R, j, O]) => C && R && (k == null ? void 0 : k({ context: O, totalCount: b, scrollingInProgress: j }))),
10615
10615
  Ae((b) => !!b),
10616
10616
  In(0)
10617
10617
  ),
@@ -10806,9 +10806,9 @@ const hC = up(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10806
10806
  Be(i),
10807
10807
  wn(
10808
10808
  ([, x, w, S], [{ bottom: T, items: b, offsetBottom: C, totalCount: k }, R]) => {
10809
- const _ = T + C;
10809
+ const j = T + C;
10810
10810
  let O = 0;
10811
- return w === k && x.length > 0 && b.length > 0 && (b[0].originalIndex === 0 && x[0].originalIndex === 0 || (O = _ - S, O !== 0 && (O += R))), [O, b, k, _];
10811
+ return w === k && x.length > 0 && b.length > 0 && (b[0].originalIndex === 0 && x[0].originalIndex === 0 || (O = j - S, O !== 0 && (O += R))), [O, b, k, j];
10812
10812
  },
10813
10813
  [0, [], 0, 0]
10814
10814
  ),
@@ -10850,11 +10850,11 @@ const hC = up(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10850
10850
  {
10851
10851
  let k = 0;
10852
10852
  const R = ro(T, 0);
10853
- let _ = 0, O = 0;
10854
- for (; _ < x; ) {
10855
- _++, k += R;
10853
+ let j = 0, O = 0;
10854
+ for (; j < x; ) {
10855
+ j++, k += R;
10856
10856
  let $ = w.length === O + 1 ? 1 / 0 : w[O + 1] - w[O] - 1;
10857
- _ + $ > x && (k -= R, $ = x - _ + 1), _ += $, k += C($), O++;
10857
+ j + $ > x && (k -= R, $ = x - j + 1), j += $, k += C($), O++;
10858
10858
  }
10859
10859
  return k;
10860
10860
  }
@@ -10934,10 +10934,10 @@ const hC = up(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10934
10934
  C,
10935
10935
  { topItemCount: k },
10936
10936
  { groupCounts: R },
10937
- _
10938
- ]) => (we(T.rangeChanged, _.scrollSeekRangeChanged), we(
10937
+ j
10938
+ ]) => (we(T.rangeChanged, j.scrollSeekRangeChanged), we(
10939
10939
  Q(
10940
- _.windowViewportRect,
10940
+ j.windowViewportRect,
10941
10941
  fe((O) => O.visibleHeight)
10942
10942
  ),
10943
10943
  g.viewportHeight
@@ -10967,7 +10967,7 @@ const hC = up(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
10967
10967
  // exported from stateFlagsSystem
10968
10968
  ...T,
10969
10969
  // the bag of IO from featureGroup1System
10970
- ..._,
10970
+ ...j,
10971
10971
  ...g,
10972
10972
  sizes: l,
10973
10973
  ...y
@@ -11181,10 +11181,10 @@ const vC = /* @__PURE__ */ rt(() => {
11181
11181
  g,
11182
11182
  _e("skipAnimationFrameInResizeObserver")
11183
11183
  ), [x, w] = se.useState(0);
11184
- sl("deviation", (j) => {
11185
- x !== j && w(j);
11184
+ sl("deviation", (_) => {
11185
+ x !== _ && w(_);
11186
11186
  });
11187
- const S = _e("EmptyPlaceholder"), T = _e("ScrollSeekPlaceholder") || bC, b = _e("ListComponent"), C = _e("ItemComponent"), k = _e("GroupComponent"), R = _e("computeItemKey"), _ = _e("isSeeking"), O = _e("groupIndices").length > 0, $ = _e("alignToBottom"), q = _e("initialItemFinalLocationReached"), K = e ? {} : {
11187
+ const S = _e("EmptyPlaceholder"), T = _e("ScrollSeekPlaceholder") || bC, b = _e("ListComponent"), C = _e("ItemComponent"), k = _e("GroupComponent"), R = _e("computeItemKey"), j = _e("isSeeking"), O = _e("groupIndices").length > 0, $ = _e("alignToBottom"), q = _e("initialItemFinalLocationReached"), K = e ? {} : {
11188
11188
  boxSizing: "border-box",
11189
11189
  ...g ? {
11190
11190
  display: "inline-block",
@@ -11207,42 +11207,42 @@ const vC = /* @__PURE__ */ rt(() => {
11207
11207
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
11208
11208
  ref: y,
11209
11209
  style: K,
11210
- children: (e ? t.topItems : t.items).map((j) => {
11211
- const N = j.originalIndex, I = R(N + t.firstItemIndex, j.data, c);
11212
- return _ ? /* @__PURE__ */ Bo(
11210
+ children: (e ? t.topItems : t.items).map((_) => {
11211
+ const N = _.originalIndex, I = R(N + t.firstItemIndex, _.data, c);
11212
+ return j ? /* @__PURE__ */ Bo(
11213
11213
  T,
11214
11214
  {
11215
11215
  ...$t(T, c),
11216
- height: j.size,
11217
- index: j.index,
11216
+ height: _.size,
11217
+ index: _.index,
11218
11218
  key: I,
11219
- type: j.type || "item",
11220
- ...j.type === "group" ? {} : { groupIndex: j.groupIndex }
11219
+ type: _.type || "item",
11220
+ ..._.type === "group" ? {} : { groupIndex: _.groupIndex }
11221
11221
  }
11222
- ) : j.type === "group" ? /* @__PURE__ */ Bo(
11222
+ ) : _.type === "group" ? /* @__PURE__ */ Bo(
11223
11223
  k,
11224
11224
  {
11225
11225
  ...$t(k, c),
11226
11226
  "data-index": N,
11227
- "data-item-index": j.index,
11228
- "data-known-size": j.size,
11227
+ "data-item-index": _.index,
11228
+ "data-known-size": _.size,
11229
11229
  key: I,
11230
11230
  style: SC
11231
11231
  },
11232
- d(j.index, c)
11232
+ d(_.index, c)
11233
11233
  ) : /* @__PURE__ */ Bo(
11234
11234
  C,
11235
11235
  {
11236
11236
  ...$t(C, c),
11237
- ...EC(C, j.data),
11237
+ ...EC(C, _.data),
11238
11238
  "data-index": N,
11239
- "data-item-group-index": j.groupIndex,
11240
- "data-item-index": j.index,
11241
- "data-known-size": j.size,
11239
+ "data-item-group-index": _.groupIndex,
11240
+ "data-item-index": _.index,
11241
+ "data-known-size": _.size,
11242
11242
  key: I,
11243
11243
  style: g ? CC : xp
11244
11244
  },
11245
- O ? l(j.index, j.groupIndex, j.data, c) : l(j.index, j.data, c)
11245
+ O ? l(_.index, _.groupIndex, _.data, c) : l(_.index, _.data, c)
11246
11246
  );
11247
11247
  })
11248
11248
  }
@@ -11527,7 +11527,7 @@ const UC = /* @__PURE__ */ rt(
11527
11527
  { customScrollParent: y, useWindowScroll: x, windowScrollContainerState: w, windowScrollTo: S, windowViewportRect: T },
11528
11528
  b
11529
11529
  ]) => {
11530
- const C = ie(0), k = ie(0), R = ie(Kc), _ = ie({ height: 0, width: 0 }), O = ie({ height: 0, width: 0 }), $ = qe(), q = qe(), K = ie(0), j = ie(null), N = ie({ column: 0, row: 0 }), I = qe(), B = qe(), D = ie(!1), P = ie(0), H = ie(!0), Z = ie(!1), A = ie(!1);
11530
+ const C = ie(0), k = ie(0), R = ie(Kc), j = ie({ height: 0, width: 0 }), O = ie({ height: 0, width: 0 }), $ = qe(), q = qe(), K = ie(0), _ = ie(null), N = ie({ column: 0, row: 0 }), I = qe(), B = qe(), D = ie(!1), P = ie(0), H = ie(!0), Z = ie(!1), A = ie(!1);
11531
11531
  it(
11532
11532
  Q(
11533
11533
  v,
@@ -11539,7 +11539,7 @@ const UC = /* @__PURE__ */ rt(
11539
11539
  }
11540
11540
  ), it(
11541
11541
  Q(
11542
- kt(v, H, O, _, P, Z),
11542
+ kt(v, H, O, j, P, Z),
11543
11543
  Ae(([M, V, F, ee, , Y]) => M && !V && F.height !== 0 && ee.height !== 0 && !Y)
11544
11544
  ),
11545
11545
  ([, , , , M]) => {
@@ -11563,20 +11563,20 @@ const UC = /* @__PURE__ */ rt(
11563
11563
  Ae(([, M]) => M != null)
11564
11564
  ),
11565
11565
  ([, M]) => {
11566
- M && ($e(_, M.viewport), $e(O, M.item), $e(N, M.gap), M.scrollTop > 0 && ($e(D, !0), un(Q(c, nr(1)), (V) => {
11566
+ M && ($e(j, M.viewport), $e(O, M.item), $e(N, M.gap), M.scrollTop > 0 && ($e(D, !0), un(Q(c, nr(1)), (V) => {
11567
11567
  $e(D, !1);
11568
11568
  }), $e(l, { top: M.scrollTop })));
11569
11569
  }
11570
11570
  ), we(
11571
11571
  Q(
11572
- _,
11572
+ j,
11573
11573
  fe(({ height: M }) => M)
11574
11574
  ),
11575
11575
  f
11576
11576
  ), we(
11577
11577
  Q(
11578
11578
  kt(
11579
- Re(_, Lo),
11579
+ Re(j, Lo),
11580
11580
  Re(O, Lo),
11581
11581
  Re(N, (M, V) => M && M.column === V.column && M.row === V.row),
11582
11582
  Re(c)
@@ -11596,8 +11596,8 @@ const UC = /* @__PURE__ */ rt(
11596
11596
  r,
11597
11597
  Re(N, zC),
11598
11598
  Re(O, Lo),
11599
- Re(_, Lo),
11600
- Re(j),
11599
+ Re(j, Lo),
11600
+ Re(_),
11601
11601
  Re(k),
11602
11602
  Re(D),
11603
11603
  Re(H),
@@ -11635,14 +11635,14 @@ const UC = /* @__PURE__ */ rt(
11635
11635
  R
11636
11636
  ), we(
11637
11637
  Q(
11638
- j,
11638
+ _,
11639
11639
  Ae((M) => M !== null),
11640
11640
  fe((M) => M.length)
11641
11641
  ),
11642
11642
  C
11643
11643
  ), we(
11644
11644
  Q(
11645
- kt(_, O, R, N),
11645
+ kt(j, O, R, N),
11646
11646
  Ae(([M, V, { items: F }]) => F.length > 0 && V.height !== 0 && M.height !== 0),
11647
11647
  fe(([M, V, { items: F }, ee]) => {
11648
11648
  const { bottom: Y, top: ge } = Xc(M, ee, V, F);
@@ -11696,7 +11696,7 @@ const UC = /* @__PURE__ */ rt(
11696
11696
  we(ne, h.scrollSeekRangeChanged), we(
11697
11697
  Q(
11698
11698
  $,
11699
- Be(_, O, C, N),
11699
+ Be(j, O, C, N),
11700
11700
  fe(([M, V, F, ee, Y]) => {
11701
11701
  const ge = rp(M), { align: le, behavior: re, offset: xe } = ge;
11702
11702
  let ve = ge.index;
@@ -11719,11 +11719,11 @@ const UC = /* @__PURE__ */ rt(
11719
11719
  T,
11720
11720
  fe((M) => ({ height: M.visibleHeight, width: M.visibleWidth }))
11721
11721
  ),
11722
- _
11722
+ j
11723
11723
  ), {
11724
11724
  customScrollParent: y,
11725
11725
  // input
11726
- data: j,
11726
+ data: _,
11727
11727
  deviation: K,
11728
11728
  footerHeight: o,
11729
11729
  gap: N,
@@ -11742,7 +11742,7 @@ const UC = /* @__PURE__ */ rt(
11742
11742
  smoothScrollTargetReached: d,
11743
11743
  totalCount: C,
11744
11744
  useWindowScroll: x,
11745
- viewportDimensions: _,
11745
+ viewportDimensions: j,
11746
11746
  windowScrollContainerState: w,
11747
11747
  windowScrollTo: S,
11748
11748
  windowViewportRect: T,
@@ -14718,10 +14718,10 @@ const yl = Hm(function({
14718
14718
  checkpointCandidates: C = [],
14719
14719
  activeCheckpointId: k = null,
14720
14720
  onSelectCheckpoint: R,
14721
- defaultCheckpointId: _ = null,
14721
+ defaultCheckpointId: j = null,
14722
14722
  messageParentCheckpointId: O = null
14723
14723
  }) {
14724
- const [$, q] = de(!1), [K, j] = de("preview"), [N, I] = de(!1), { currentThreadId: B } = Ia(), { respondToInterrupt: D } = Ea(), P = l === "phone" || l === "half-screen", H = t.role, Z = H === "tool", A = Pe(() => "type" in t && t.type === "default_message" ? t : null, [t]), X = !!A, U = !(r && H !== "user"), {
14724
+ const [$, q] = de(!1), [K, _] = de("preview"), [N, I] = de(!1), { currentThreadId: B } = Ia(), { respondToInterrupt: D } = Ea(), P = l === "phone" || l === "half-screen", H = t.role, Z = H === "tool", A = Pe(() => "type" in t && t.type === "default_message" ? t : null, [t]), X = !!A, U = !(r && H !== "user"), {
14725
14725
  uploadingFiles: z,
14726
14726
  handleFileClick: ne,
14727
14727
  fileViewerOpen: W,
@@ -15040,8 +15040,8 @@ const yl = Hm(function({
15040
15040
  F
15041
15041
  ]), Mt = Pe(() => A ? "Assistant" : oT(t), [A, t]), Me = Pe(() => A ? [] : Array.isArray(C) ? C : [], [C, A]), Wt = Pe(() => {
15042
15042
  var G;
15043
- return Me.length ? _ && Me.some((ye) => ye.id === _) ? _ : ((G = Me[0]) == null ? void 0 : G.id) ?? null : null;
15044
- }, [_, Me]), Ke = Pe(() => !Me.length || !k ? null : Me.some((G) => G.id === k) ? k : null, [k, Me]) ?? Wt, mt = H === "user" && Me.length > 0 && typeof R == "function", J = ue(
15043
+ return Me.length ? j && Me.some((ye) => ye.id === j) ? j : ((G = Me[0]) == null ? void 0 : G.id) ?? null : null;
15044
+ }, [j, Me]), Ke = Pe(() => !Me.length || !k ? null : Me.some((G) => G.id === k) ? k : null, [k, Me]) ?? Wt, mt = H === "user" && Me.length > 0 && typeof R == "function", J = ue(
15045
15045
  (G, ye = !1) => {
15046
15046
  if (!R) return;
15047
15047
  const Se = (G == null ? void 0 : G.id) ?? null, tt = (G == null ? void 0 : G.parentId) ?? O ?? null;
@@ -15089,9 +15089,9 @@ const yl = Hm(function({
15089
15089
  role: "button",
15090
15090
  tabIndex: 0,
15091
15091
  "aria-expanded": K === "expanded",
15092
- onClick: () => j((G) => G === "expanded" ? "preview" : "expanded"),
15092
+ onClick: () => _((G) => G === "expanded" ? "preview" : "expanded"),
15093
15093
  onKeyDown: (G) => {
15094
- (G.key === "Enter" || G.key === " ") && (G.preventDefault(), j((ye) => ye === "expanded" ? "preview" : "expanded"));
15094
+ (G.key === "Enter" || G.key === " ") && (G.preventDefault(), _((ye) => ye === "expanded" ? "preview" : "expanded"));
15095
15095
  },
15096
15096
  children: [
15097
15097
  /* @__PURE__ */ u.jsx("span", { children: Y.name ?? "Tool Output" }),
@@ -15388,16 +15388,16 @@ const th = (e, t) => (e == null ? void 0 : e.id) ?? `message-${t}`, nh = se.memo
15388
15388
  activeCheckpointId: C,
15389
15389
  onSelectCheckpoint: k
15390
15390
  }) {
15391
- const R = th(t, n), _ = "type" in t && t.type === "default_message", { checkpointCandidates: O, defaultCheckpointId: $, attemptMeta: q } = sk(t, {
15391
+ const R = th(t, n), j = "type" in t && t.type === "default_message", { checkpointCandidates: O, defaultCheckpointId: $, attemptMeta: q } = sk(t, {
15392
15392
  checkpointMetaById: w,
15393
15393
  checkpointIndexByKey: S,
15394
15394
  attemptMetaById: T,
15395
15395
  userMessageIdToAttempts: b
15396
- }), K = t && !_ ? t.additionalKwargs ?? {} : {}, j = t && !_ ? t.responseMetadata ?? {} : {}, N = (() => {
15396
+ }), K = t && !j ? t.additionalKwargs ?? {} : {}, _ = t && !j ? t.responseMetadata ?? {} : {}, N = (() => {
15397
15397
  if (typeof K.parentCheckpointId == "string")
15398
15398
  return K.parentCheckpointId;
15399
- if (typeof j.parentCheckpointId == "string")
15400
- return j.parentCheckpointId;
15399
+ if (typeof _.parentCheckpointId == "string")
15400
+ return _.parentCheckpointId;
15401
15401
  })();
15402
15402
  return /* @__PURE__ */ u.jsx(
15403
15403
  "div",
@@ -15467,12 +15467,12 @@ const rh = se.forwardRef(({
15467
15467
  showToolMessages: C = !0,
15468
15468
  showArtifactPreviews: k = !0,
15469
15469
  checkpointMetaById: R,
15470
- checkpointIndexByKey: _,
15470
+ checkpointIndexByKey: j,
15471
15471
  attemptMetaById: O,
15472
15472
  userMessageIdToAttempts: $,
15473
15473
  activeCheckpointId: q,
15474
15474
  onSelectCheckpoint: K,
15475
- createSyntheticThinkingMessage: j = !1
15475
+ createSyntheticThinkingMessage: _ = !1
15476
15476
  }, N) => {
15477
15477
  const I = Fe(null), B = Fe(null), D = Fe(!1), P = Fe(!1), [H, Z] = de(!0), A = Pe(() => w ? e.some((re) => "type" in re && re.type === "default_message" ? !1 : Array.isArray(re == null ? void 0 : re.content) && re.content.some(
15478
15478
  (xe) => xe && xe.type === "interrupt" && (xe.id ?? xe.interrupt_id) === w.id
@@ -15499,7 +15499,7 @@ const rh = se.forwardRef(({
15499
15499
  }
15500
15500
  ]
15501
15501
  };
15502
- }, [w, A]), U = Pe(() => X ? [...e, X] : e, [e, X]), z = Pe(() => !j || !t ? U : !U.some((xe) => xe.role === "assistant") && U.length > 0 ? [
15502
+ }, [w, A]), U = Pe(() => X ? [...e, X] : e, [e, X]), z = Pe(() => !_ || !t ? U : !U.some((xe) => xe.role === "assistant") && U.length > 0 ? [
15503
15503
  ...U,
15504
15504
  {
15505
15505
  id: "thinking-assistant",
@@ -15507,7 +15507,7 @@ const rh = se.forwardRef(({
15507
15507
  content: [],
15508
15508
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
15509
15509
  }
15510
- ] : U, [U, t, j]), ne = Pe(() => C ? z : z.filter((re) => (re == null ? void 0 : re.role) !== "tool"), [z, C]), W = ue((re) => {
15510
+ ] : U, [U, t, _]), ne = Pe(() => C ? z : z.filter((re) => (re == null ? void 0 : re.role) !== "tool"), [z, C]), W = ue((re) => {
15511
15511
  Z(re), y && y(!re), x && x(re);
15512
15512
  }, [y, x]), M = Pe(() => {
15513
15513
  if (a)
@@ -15627,7 +15627,7 @@ const rh = se.forwardRef(({
15627
15627
  showToolMessages: C,
15628
15628
  showArtifactPreviews: k,
15629
15629
  checkpointMetaById: R,
15630
- checkpointIndexByKey: _,
15630
+ checkpointIndexByKey: j,
15631
15631
  attemptMetaById: O,
15632
15632
  userMessageIdToAttempts: $,
15633
15633
  activeCheckpointId: q,
@@ -15667,12 +15667,12 @@ function Di({
15667
15667
  navigateToCheckpoint: C,
15668
15668
  returnToLatest: k,
15669
15669
  checkpoint: R,
15670
- checkpoints: _,
15670
+ checkpoints: j,
15671
15671
  interrupt: O,
15672
15672
  metadata: $,
15673
15673
  timelineCheckpoints: q,
15674
15674
  messagePreviews: K
15675
- } = Ea(), { isStreaming: j, error: N, connectionState: I, submit: B, stop: D } = uv(), P = w ?? x ?? null, H = (R == null ? void 0 : R.id) ?? null, Z = (R == null ? void 0 : R.namespace) ?? null, A = ($ == null ? void 0 : $.assemblingMessageId) ?? null, X = O, [U, z] = de(!1);
15675
+ } = Ea(), { isStreaming: _, error: N, connectionState: I, submit: B, stop: D } = uv(), P = w ?? x ?? null, H = (R == null ? void 0 : R.id) ?? null, Z = (R == null ? void 0 : R.namespace) ?? null, A = ($ == null ? void 0 : $.assemblingMessageId) ?? null, X = O, [U, z] = de(!1);
15676
15676
  dt(() => {
15677
15677
  X || z(!1);
15678
15678
  }, [X]);
@@ -15682,7 +15682,7 @@ function Di({
15682
15682
  z(!1);
15683
15683
  }, []), M = !!X || U, [V, F] = de(null), [ee, Y] = de(""), [ge, le] = de(null), [re, xe] = de(null), [ve, De] = de([]), [Ne, We] = de(0), [Xe, ot] = de(0), [Je, Ve] = de(!1), [lt, Nt] = de(null), [vt, It] = de(null), [Ie, Ue] = de(!1), [ht, St] = de(null), Mt = Fe(!1), [Me, Wt] = de(() => lu.value), Ye = Fe(Me), Ke = Fe(null), mt = ue((me) => {
15684
15684
  lu.value = me, Wt(me);
15685
- }, []), [J, ae] = de(!1), Ze = Fe(null), { checkpointMetaById: G, checkpointIndexByKey: ye, attemptMetaById: Se, userMessageIdToAttempts: tt } = TS(_), Le = q ?? [], gt = Fe(null), Qe = Fe(null), Et = ue(() => {
15685
+ }, []), [J, ae] = de(!1), Ze = Fe(null), { checkpointMetaById: G, checkpointIndexByKey: ye, attemptMetaById: Se, userMessageIdToAttempts: tt } = TS(j), Le = q ?? [], gt = Fe(null), Qe = Fe(null), Et = ue(() => {
15686
15686
  gt.current && (gt.current.value = ""), Qe.current && (Qe.current.value = ""), We((me) => me + 1), ot((me) => me + 1);
15687
15687
  }, []), Dr = ue(
15688
15688
  (me) => {
@@ -15691,8 +15691,8 @@ function Di({
15691
15691
  [mt]
15692
15692
  ), Lr = Fe(!1);
15693
15693
  dt(() => {
15694
- Lr.current && !j && (De([]), Et()), Lr.current = j;
15695
- }, [j, Et]);
15694
+ Lr.current && !_ && (De([]), Et()), Lr.current = _;
15695
+ }, [_, Et]);
15696
15696
  const [ko, li] = de("desktop");
15697
15697
  dt(() => {
15698
15698
  const me = () => {
@@ -15842,7 +15842,7 @@ function Di({
15842
15842
  });
15843
15843
  return;
15844
15844
  }
15845
- const ke = _.find((et) => et.checkpointId === me), je = (ke == null ? void 0 : ke.checkpointNs) ?? null;
15845
+ const ke = j.find((et) => et.checkpointId === me), je = (ke == null ? void 0 : ke.checkpointNs) ?? null;
15846
15846
  await C(me, je), requestAnimationFrame(() => {
15847
15847
  var et;
15848
15848
  (et = Ze.current) == null || et.scrollToTop();
@@ -15885,7 +15885,7 @@ function Di({
15885
15885
  className: "h-full",
15886
15886
  style: { height: "100%" },
15887
15887
  messages: S,
15888
- isStreaming: j,
15888
+ isStreaming: _,
15889
15889
  streamingAssistantId: A,
15890
15890
  streamingDebounceMs: typeof s == "number" ? s : o,
15891
15891
  followNewMessages: i,
@@ -16004,7 +16004,7 @@ function Di({
16004
16004
  type: "button",
16005
16005
  size: "icon",
16006
16006
  variant: "outline",
16007
- disabled: j || M,
16007
+ disabled: _ || M,
16008
16008
  title: "More input actions",
16009
16009
  className: p.moreButton || "",
16010
16010
  children: /* @__PURE__ */ u.jsx(eg, { size: 16 })
@@ -16042,7 +16042,7 @@ function Di({
16042
16042
  value: Me,
16043
16043
  onValueChange: Dr,
16044
16044
  placeholder: V ? "Edit your message..." : t,
16045
- isStreaming: j,
16045
+ isStreaming: _,
16046
16046
  disabled: M,
16047
16047
  maxLength: Xo,
16048
16048
  onSend: ui,
@@ -16070,7 +16070,7 @@ var vl = "ScrollArea", [oh, TE] = An(vl), [ak, ln] = oh(vl), sh = m.forwardRef(
16070
16070
  dir: o,
16071
16071
  scrollHideDelay: s = 600,
16072
16072
  ...i
16073
- } = e, [a, l] = m.useState(null), [c, d] = m.useState(null), [f, p] = m.useState(null), [h, v] = m.useState(null), [g, y] = m.useState(null), [x, w] = m.useState(0), [S, T] = m.useState(0), [b, C] = m.useState(!1), [k, R] = m.useState(!1), _ = Ge(t, ($) => l($)), O = Ps(o);
16073
+ } = e, [a, l] = m.useState(null), [c, d] = m.useState(null), [f, p] = m.useState(null), [h, v] = m.useState(null), [g, y] = m.useState(null), [x, w] = m.useState(0), [S, T] = m.useState(0), [b, C] = m.useState(!1), [k, R] = m.useState(!1), j = Ge(t, ($) => l($)), O = Ps(o);
16074
16074
  return /* @__PURE__ */ u.jsx(
16075
16075
  ak,
16076
16076
  {
@@ -16098,7 +16098,7 @@ var vl = "ScrollArea", [oh, TE] = An(vl), [ak, ln] = oh(vl), sh = m.forwardRef(
16098
16098
  {
16099
16099
  dir: O,
16100
16100
  ...i,
16101
- ref: _,
16101
+ ref: j,
16102
16102
  style: {
16103
16103
  position: "relative",
16104
16104
  // Pass corner sizes as CSS vars to reduce re-renders of context consumers
@@ -16392,19 +16392,19 @@ var lk = m.forwardRef((e, t) => {
16392
16392
  onWheelScroll: d,
16393
16393
  onResize: f,
16394
16394
  ...p
16395
- } = e, h = ln(kn, n), [v, g] = m.useState(null), y = Ge(t, (_) => g(_)), x = m.useRef(null), w = m.useRef(""), S = h.viewport, T = r.content - r.viewport, b = _t(d), C = _t(l), k = ni(f, 10);
16396
- function R(_) {
16395
+ } = e, h = ln(kn, n), [v, g] = m.useState(null), y = Ge(t, (j) => g(j)), x = m.useRef(null), w = m.useRef(""), S = h.viewport, T = r.content - r.viewport, b = _t(d), C = _t(l), k = ni(f, 10);
16396
+ function R(j) {
16397
16397
  if (x.current) {
16398
- const O = _.clientX - x.current.left, $ = _.clientY - x.current.top;
16398
+ const O = j.clientX - x.current.left, $ = j.clientY - x.current.top;
16399
16399
  c({ x: O, y: $ });
16400
16400
  }
16401
16401
  }
16402
16402
  return m.useEffect(() => {
16403
- const _ = (O) => {
16403
+ const j = (O) => {
16404
16404
  const $ = O.target;
16405
16405
  (v == null ? void 0 : v.contains($)) && b(O, T);
16406
16406
  };
16407
- return document.addEventListener("wheel", _, { passive: !1 }), () => document.removeEventListener("wheel", _, { passive: !1 });
16407
+ return document.addEventListener("wheel", j, { passive: !1 }), () => document.removeEventListener("wheel", j, { passive: !1 });
16408
16408
  }, [S, v, T, b]), m.useEffect(C, [r, C]), Rr(v, k), Rr(h.content, k), /* @__PURE__ */ u.jsx(
16409
16409
  fk,
16410
16410
  {
@@ -16421,13 +16421,13 @@ var lk = m.forwardRef((e, t) => {
16421
16421
  ...p,
16422
16422
  ref: y,
16423
16423
  style: { position: "absolute", ...p.style },
16424
- onPointerDown: he(e.onPointerDown, (_) => {
16425
- _.button === 0 && (_.target.setPointerCapture(_.pointerId), x.current = v.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", h.viewport && (h.viewport.style.scrollBehavior = "auto"), R(_));
16424
+ onPointerDown: he(e.onPointerDown, (j) => {
16425
+ j.button === 0 && (j.target.setPointerCapture(j.pointerId), x.current = v.getBoundingClientRect(), w.current = document.body.style.webkitUserSelect, document.body.style.webkitUserSelect = "none", h.viewport && (h.viewport.style.scrollBehavior = "auto"), R(j));
16426
16426
  }),
16427
16427
  onPointerMove: he(e.onPointerMove, R),
16428
- onPointerUp: he(e.onPointerUp, (_) => {
16429
- const O = _.target;
16430
- O.hasPointerCapture(_.pointerId) && O.releasePointerCapture(_.pointerId), document.body.style.webkitUserSelect = w.current, h.viewport && (h.viewport.style.scrollBehavior = ""), x.current = null;
16428
+ onPointerUp: he(e.onPointerUp, (j) => {
16429
+ const O = j.target;
16430
+ O.hasPointerCapture(j.pointerId) && O.releasePointerCapture(j.pointerId), document.body.style.webkitUserSelect = w.current, h.viewport && (h.viewport.style.scrollBehavior = ""), x.current = null;
16431
16431
  })
16432
16432
  }
16433
16433
  )
@@ -16638,7 +16638,7 @@ var zr = '[cmdk-group=""]', Fi = '[cmdk-group-items=""]', Rk = '[cmdk-group-head
16638
16638
  }
16639
16639
  if (C(7, () => {
16640
16640
  var V;
16641
- n.current.selectedItemId = (V = j()) == null ? void 0 : V.id, k.emit();
16641
+ n.current.selectedItemId = (V = _()) == null ? void 0 : V.id, k.emit();
16642
16642
  }), U || C(5, K), ((ne = a.current) == null ? void 0 : ne.value) !== void 0) {
16643
16643
  let V = X ?? "";
16644
16644
  (M = (W = a.current).onValueChange) == null || M.call(W, V);
@@ -16651,21 +16651,21 @@ var zr = '[cmdk-group=""]', Fi = '[cmdk-group-items=""]', Rk = '[cmdk-group-head
16651
16651
  i.current.forEach((A) => A());
16652
16652
  } }), []), R = m.useMemo(() => ({ value: (A, X, U) => {
16653
16653
  var z;
16654
- X !== ((z = s.current.get(A)) == null ? void 0 : z.value) && (s.current.set(A, { value: X, keywords: U }), n.current.filtered.items.set(A, _(X, U)), C(2, () => {
16654
+ X !== ((z = s.current.get(A)) == null ? void 0 : z.value) && (s.current.set(A, { value: X, keywords: U }), n.current.filtered.items.set(A, j(X, U)), C(2, () => {
16655
16655
  O(), k.emit();
16656
16656
  }));
16657
16657
  }, item: (A, X) => (r.current.add(A), X && (o.current.has(X) ? o.current.get(X).add(A) : o.current.set(X, /* @__PURE__ */ new Set([A]))), C(3, () => {
16658
16658
  q(), O(), n.current.value || $(), k.emit();
16659
16659
  }), () => {
16660
16660
  s.current.delete(A), r.current.delete(A), n.current.filtered.items.delete(A);
16661
- let U = j();
16661
+ let U = _();
16662
16662
  C(4, () => {
16663
16663
  q(), (U == null ? void 0 : U.getAttribute("id")) === A && $(), k.emit();
16664
16664
  });
16665
16665
  }), group: (A) => (o.current.has(A) || o.current.set(A, /* @__PURE__ */ new Set()), () => {
16666
16666
  s.current.delete(A), o.current.delete(A);
16667
16667
  }), filter: () => a.current.shouldFilter, label: l || e["aria-label"], getDisablePointerSelection: () => a.current.disablePointerSelection, listId: w, inputId: T, labelId: S, listInnerRef: b }), []);
16668
- function _(A, X) {
16668
+ function j(A, X) {
16669
16669
  var U, z;
16670
16670
  let ne = (z = (U = a.current) == null ? void 0 : U.filter) != null ? z : Nk;
16671
16671
  return A ? ne(A, n.current.search, X) : 0;
@@ -16707,7 +16707,7 @@ var zr = '[cmdk-group=""]', Fi = '[cmdk-group-items=""]', Rk = '[cmdk-group-head
16707
16707
  n.current.filtered.groups = /* @__PURE__ */ new Set();
16708
16708
  let ne = 0;
16709
16709
  for (let W of r.current) {
16710
- let M = (X = (A = s.current.get(W)) == null ? void 0 : A.value) != null ? X : "", V = (z = (U = s.current.get(W)) == null ? void 0 : U.keywords) != null ? z : [], F = _(M, V);
16710
+ let M = (X = (A = s.current.get(W)) == null ? void 0 : A.value) != null ? X : "", V = (z = (U = s.current.get(W)) == null ? void 0 : U.keywords) != null ? z : [], F = j(M, V);
16711
16711
  n.current.filtered.items.set(W, F), F > 0 && ne++;
16712
16712
  }
16713
16713
  for (let [W, M] of o.current) for (let V of M) if (n.current.filtered.items.get(V) > 0) {
@@ -16718,10 +16718,10 @@ var zr = '[cmdk-group=""]', Fi = '[cmdk-group-items=""]', Rk = '[cmdk-group-head
16718
16718
  }
16719
16719
  function K() {
16720
16720
  var A, X, U;
16721
- let z = j();
16721
+ let z = _();
16722
16722
  z && (((A = z.parentElement) == null ? void 0 : A.firstChild) === z && ((U = (X = z.closest(zr)) == null ? void 0 : X.querySelector(Rk)) == null || U.scrollIntoView({ block: "nearest" })), z.scrollIntoView({ block: "nearest" }));
16723
16723
  }
16724
- function j() {
16724
+ function _() {
16725
16725
  var A;
16726
16726
  return (A = b.current) == null ? void 0 : A.querySelector(`${wh}[aria-selected="true"]`);
16727
16727
  }
@@ -16735,11 +16735,11 @@ var zr = '[cmdk-group=""]', Fi = '[cmdk-group-items=""]', Rk = '[cmdk-group-head
16735
16735
  }
16736
16736
  function B(A) {
16737
16737
  var X;
16738
- let U = j(), z = N(), ne = z.findIndex((M) => M === U), W = z[ne + A];
16738
+ let U = _(), z = N(), ne = z.findIndex((M) => M === U), W = z[ne + A];
16739
16739
  (X = a.current) != null && X.loop && (W = ne + A < 0 ? z[z.length - 1] : ne + A === z.length ? z[0] : z[ne + A]), W && k.setState("value", W.getAttribute(mr));
16740
16740
  }
16741
16741
  function D(A) {
16742
- let X = j(), U = X == null ? void 0 : X.closest(zr), z;
16742
+ let X = _(), U = X == null ? void 0 : X.closest(zr), z;
16743
16743
  for (; U && !z; ) U = A > 0 ? $k(U, zr) : Fk(U, zr), z = U == null ? void 0 : U.querySelector(fu);
16744
16744
  z ? k.setState("value", z.getAttribute(mr)) : B(A);
16745
16745
  }
@@ -16781,7 +16781,7 @@ var zr = '[cmdk-group=""]', Fi = '[cmdk-group-items=""]', Rk = '[cmdk-group-head
16781
16781
  }
16782
16782
  case "Enter": {
16783
16783
  A.preventDefault();
16784
- let z = j();
16784
+ let z = _();
16785
16785
  if (z) {
16786
16786
  let ne = new Event(da);
16787
16787
  z.dispatchEvent(ne);
@@ -17142,9 +17142,9 @@ function hu({
17142
17142
  isLoadingSmartOrgUsers: C,
17143
17143
  actions: k,
17144
17144
  shareInFlight: R,
17145
- shareStatus: _,
17145
+ shareStatus: j,
17146
17146
  clearShareStatus: O
17147
- } = Ia(), { createThread: $, deleteThread: q, renameThread: K, shareThread: j } = k, { loadThread: N } = Ea(), I = i ?? x, [B, D] = de(Array.isArray(g) ? g : []), P = Fe(B.length > 0), H = Fe(null), Z = Fe(0), [A, X] = de(null), [U, z] = de(""), [ne, W] = de(!1), [M, V] = de(!1), [F, ee] = de(null), [Y, ge] = de(""), le = v && v.length > 0 ? v : Gk, [re, xe] = de(p ?? "default"), ve = f ?? re, De = ue(
17147
+ } = Ia(), { createThread: $, deleteThread: q, renameThread: K, shareThread: _ } = k, { loadThread: N } = Ea(), I = i ?? x, [B, D] = de(Array.isArray(g) ? g : []), P = Fe(B.length > 0), H = Fe(null), Z = Fe(0), [A, X] = de(null), [U, z] = de(""), [ne, W] = de(!1), [M, V] = de(!1), [F, ee] = de(null), [Y, ge] = de(""), le = v && v.length > 0 ? v : Gk, [re, xe] = de(p ?? "default"), ve = f ?? re, De = ue(
17148
17148
  (J) => {
17149
17149
  f || xe(J), h == null || h(J);
17150
17150
  },
@@ -17159,12 +17159,12 @@ function hu({
17159
17159
  const ae = J.user_id ?? J.id ?? J.username ?? J.email;
17160
17160
  if (ae)
17161
17161
  try {
17162
- await j(F, ae), setTimeout(() => Xe(), 600);
17162
+ await _(F, ae), setTimeout(() => Xe(), 600);
17163
17163
  } catch (Ze) {
17164
17164
  console.error("Failed to share thread:", Ze);
17165
17165
  }
17166
17166
  },
17167
- [Xe, R, F, j]
17167
+ [Xe, R, F, _]
17168
17168
  ), Je = Pe(() => {
17169
17169
  const J = Y.trim().toLowerCase();
17170
17170
  return J ? b.filter((ae) => `${ae.username ?? ""} ${ae.user_id ?? ""} ${ae.email ?? ""} ${ae.name ?? ""}`.toLowerCase().includes(J)) : b;
@@ -17249,9 +17249,9 @@ function hu({
17249
17249
  /* @__PURE__ */ u.jsxs(
17250
17250
  "div",
17251
17251
  {
17252
- className: s.header || "flex items-center gap-2 px-3 py-0 border-b border-slate-200 bg-white dark:border-slate-700 dark:bg-slate-900 shadow-sm",
17252
+ className: s.header || "flex items-center gap-1 px-1 py-0 border border-transparent bg-transparent shadow-none",
17253
17253
  children: [
17254
- /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 text-sm font-semibold text-slate-700 dark:text-slate-200 uppercase tracking-wide leading-tight", children: [
17254
+ /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-0 text-sm font-semibold text-slate-700 dark:text-slate-200 uppercase tracking-wide leading-tight", children: [
17255
17255
  /* @__PURE__ */ u.jsx("span", { children: "Current View" }),
17256
17256
  /* @__PURE__ */ u.jsxs(Ka, { children: [
17257
17257
  /* @__PURE__ */ u.jsx(qa, { asChild: !0, children: /* @__PURE__ */ u.jsx(
@@ -17345,9 +17345,15 @@ function hu({
17345
17345
  }
17346
17346
  ),
17347
17347
  /* @__PURE__ */ u.jsxs(Nh, { children: [
17348
- _ && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground", children: [
17348
+ j && /* @__PURE__ */ u.jsxs("div", { className: "flex items-center gap-2 px-3 py-2 text-xs text-muted-foreground", children: [
17349
17349
  R && /* @__PURE__ */ u.jsx(qn, { className: "h-3 w-3 animate-spin" }),
17350
- /* @__PURE__ */ u.jsx("span", { children: _ })
17350
+ /* @__PURE__ */ u.jsx(
17351
+ "span",
17352
+ {
17353
+ className: j.startsWith("Failed") ? "text-red-500" : j.startsWith("Shared") ? "text-emerald-500" : "text-slate-600 dark:text-slate-400",
17354
+ children: j
17355
+ }
17356
+ )
17351
17357
  ] }),
17352
17358
  /* @__PURE__ */ u.jsx(Ah, { children: C ? /* @__PURE__ */ u.jsxs("span", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
17353
17359
  /* @__PURE__ */ u.jsx(qn, { className: "h-4 w-4 animate-spin" }),
@@ -17616,12 +17622,12 @@ var oI = [" ", "Enter", "ArrowUp", "ArrowDown"], sI = [" ", "Enter"], sr = "Sele
17616
17622
  defaultProp: o ?? !1,
17617
17623
  onChange: s,
17618
17624
  caller: sr
17619
- }), [_, O] = Ir({
17625
+ }), [j, O] = Ir({
17620
17626
  prop: i,
17621
17627
  defaultProp: a,
17622
17628
  onChange: l,
17623
17629
  caller: sr
17624
- }), $ = m.useRef(null), q = y ? v || !!y.closest("form") : !0, [K, j] = m.useState(/* @__PURE__ */ new Set()), N = Array.from(K).map((I) => I.props.value).join(";");
17630
+ }), $ = m.useRef(null), q = y ? v || !!y.closest("form") : !0, [K, _] = m.useState(/* @__PURE__ */ new Set()), N = Array.from(K).map((I) => I.props.value).join(";");
17625
17631
  return /* @__PURE__ */ u.jsx(jd, { ...g, children: /* @__PURE__ */ u.jsxs(
17626
17632
  aI,
17627
17633
  {
@@ -17634,7 +17640,7 @@ var oI = [" ", "Enter", "ArrowUp", "ArrowDown"], sI = [" ", "Enter"], sr = "Sele
17634
17640
  valueNodeHasChildren: T,
17635
17641
  onValueNodeHasChildrenChange: b,
17636
17642
  contentId: zt(),
17637
- value: _,
17643
+ value: j,
17638
17644
  onValueChange: O,
17639
17645
  open: k,
17640
17646
  onOpenChange: R,
@@ -17647,10 +17653,10 @@ var oI = [" ", "Enter", "ArrowUp", "ArrowDown"], sI = [" ", "Enter"], sr = "Sele
17647
17653
  {
17648
17654
  scope: e.__scopeSelect,
17649
17655
  onNativeOptionAdd: m.useCallback((I) => {
17650
- j((B) => new Set(B).add(I));
17656
+ _((B) => new Set(B).add(I));
17651
17657
  }, []),
17652
17658
  onNativeOptionRemove: m.useCallback((I) => {
17653
- j((B) => {
17659
+ _((B) => {
17654
17660
  const D = new Set(B);
17655
17661
  return D.delete(I), D;
17656
17662
  });
@@ -17666,12 +17672,12 @@ var oI = [" ", "Enter", "ArrowUp", "ArrowDown"], sI = [" ", "Enter"], sr = "Sele
17666
17672
  tabIndex: -1,
17667
17673
  name: d,
17668
17674
  autoComplete: f,
17669
- value: _,
17675
+ value: j,
17670
17676
  onChange: (I) => O(I.target.value),
17671
17677
  disabled: p,
17672
17678
  form: v,
17673
17679
  children: [
17674
- _ === void 0 ? /* @__PURE__ */ u.jsx("option", { value: "" }) : null,
17680
+ j === void 0 ? /* @__PURE__ */ u.jsx("option", { value: "" }) : null,
17675
17681
  Array.from(K)
17676
17682
  ]
17677
17683
  },
@@ -17790,9 +17796,9 @@ var cn = 10, [Yh, Vn] = Or(ir), fI = "SelectContentImpl", pI = Tr("SelectContent
17790
17796
  avoidCollisions: y,
17791
17797
  //
17792
17798
  ...x
17793
- } = e, w = Wn(ir, n), [S, T] = m.useState(null), [b, C] = m.useState(null), k = Ge(t, (W) => T(W)), [R, _] = m.useState(null), [O, $] = m.useState(
17799
+ } = e, w = Wn(ir, n), [S, T] = m.useState(null), [b, C] = m.useState(null), k = Ge(t, (W) => T(W)), [R, j] = m.useState(null), [O, $] = m.useState(
17794
17800
  null
17795
- ), q = si(n), [K, j] = m.useState(!1), N = m.useRef(!1);
17801
+ ), q = si(n), [K, _] = m.useState(!1), N = m.useRef(!1);
17796
17802
  m.useEffect(() => {
17797
17803
  if (S) return $a(S);
17798
17804
  }, [S]), Na();
@@ -17839,7 +17845,7 @@ var cn = 10, [Yh, Vn] = Or(ir), fI = "SelectContentImpl", pI = Tr("SelectContent
17839
17845
  }), A = m.useCallback(
17840
17846
  (W, M, V) => {
17841
17847
  const F = !N.current && !V;
17842
- (w.value !== void 0 && w.value === M || F) && (_(W), F && (N.current = !0));
17848
+ (w.value !== void 0 && w.value === M || F) && (j(W), F && (N.current = !0));
17843
17849
  },
17844
17850
  [w.value]
17845
17851
  ), X = m.useCallback(() => S == null ? void 0 : S.focus(), [S]), U = m.useCallback(
@@ -17907,7 +17913,7 @@ var cn = 10, [Yh, Vn] = Or(ir), fI = "SelectContentImpl", pI = Tr("SelectContent
17907
17913
  onContextMenu: (W) => W.preventDefault(),
17908
17914
  ...x,
17909
17915
  ...ne,
17910
- onPlaced: () => j(!0),
17916
+ onPlaced: () => _(!0),
17911
17917
  ref: k,
17912
17918
  style: {
17913
17919
  // flex layout so we can place the scroll buttons properly
@@ -17942,9 +17948,9 @@ Xh.displayName = fI;
17942
17948
  var hI = "SelectItemAlignedPosition", Jh = m.forwardRef((e, t) => {
17943
17949
  const { __scopeSelect: n, onPlaced: r, ...o } = e, s = Wn(ir, n), i = Vn(ir, n), [a, l] = m.useState(null), [c, d] = m.useState(null), f = Ge(t, (k) => d(k)), p = si(n), h = m.useRef(!1), v = m.useRef(!0), { viewport: g, selectedItem: y, selectedItemText: x, focusSelectedItem: w } = i, S = m.useCallback(() => {
17944
17950
  if (s.trigger && s.valueNode && a && c && g && y && x) {
17945
- const k = s.trigger.getBoundingClientRect(), R = c.getBoundingClientRect(), _ = s.valueNode.getBoundingClientRect(), O = x.getBoundingClientRect();
17951
+ const k = s.trigger.getBoundingClientRect(), R = c.getBoundingClientRect(), j = s.valueNode.getBoundingClientRect(), O = x.getBoundingClientRect();
17946
17952
  if (s.dir !== "rtl") {
17947
- const ee = O.left - R.left, Y = _.left - ee, ge = k.left - Y, le = k.width + ge, re = Math.max(le, R.width), xe = window.innerWidth - cn, ve = ca(Y, [
17953
+ const ee = O.left - R.left, Y = j.left - ee, ge = k.left - Y, le = k.width + ge, re = Math.max(le, R.width), xe = window.innerWidth - cn, ve = ca(Y, [
17948
17954
  cn,
17949
17955
  // Prevents the content from going off the starting edge of the
17950
17956
  // viewport. It may still go off the ending edge, but this can be
@@ -17955,13 +17961,13 @@ var hI = "SelectItemAlignedPosition", Jh = m.forwardRef((e, t) => {
17955
17961
  ]);
17956
17962
  a.style.minWidth = le + "px", a.style.left = ve + "px";
17957
17963
  } else {
17958
- const ee = R.right - O.right, Y = window.innerWidth - _.right - ee, ge = window.innerWidth - k.right - Y, le = k.width + ge, re = Math.max(le, R.width), xe = window.innerWidth - cn, ve = ca(Y, [
17964
+ const ee = R.right - O.right, Y = window.innerWidth - j.right - ee, ge = window.innerWidth - k.right - Y, le = k.width + ge, re = Math.max(le, R.width), xe = window.innerWidth - cn, ve = ca(Y, [
17959
17965
  cn,
17960
17966
  Math.max(cn, xe - re)
17961
17967
  ]);
17962
17968
  a.style.minWidth = le + "px", a.style.right = ve + "px";
17963
17969
  }
17964
- const $ = p(), q = window.innerHeight - cn * 2, K = g.scrollHeight, j = window.getComputedStyle(c), N = parseInt(j.borderTopWidth, 10), I = parseInt(j.paddingTop, 10), B = parseInt(j.borderBottomWidth, 10), D = parseInt(j.paddingBottom, 10), P = N + I + K + D + B, H = Math.min(y.offsetHeight * 5, P), Z = window.getComputedStyle(g), A = parseInt(Z.paddingTop, 10), X = parseInt(Z.paddingBottom, 10), U = k.top + k.height / 2 - cn, z = q - U, ne = y.offsetHeight / 2, W = y.offsetTop + ne, M = N + I + W, V = P - M;
17970
+ const $ = p(), q = window.innerHeight - cn * 2, K = g.scrollHeight, _ = window.getComputedStyle(c), N = parseInt(_.borderTopWidth, 10), I = parseInt(_.paddingTop, 10), B = parseInt(_.borderBottomWidth, 10), D = parseInt(_.paddingBottom, 10), P = N + I + K + D + B, H = Math.min(y.offsetHeight * 5, P), Z = window.getComputedStyle(g), A = parseInt(Z.paddingTop, 10), X = parseInt(Z.paddingBottom, 10), U = k.top + k.height / 2 - cn, z = q - U, ne = y.offsetHeight / 2, W = y.offsetTop + ne, M = N + I + W, V = P - M;
17965
17971
  if (M <= U) {
17966
17972
  const ee = $.length > 0 && y === $[$.length - 1].ref.current;
17967
17973
  a.style.bottom = "0px";