@alxxsck/ai-assistant 3.1.0 → 3.1.1

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.
@@ -1,8 +1,8 @@
1
- import { jsxs as N, jsx as u, Fragment as $e } from "react/jsx-runtime";
1
+ import { jsxs as C, jsx as u, Fragment as $e } from "react/jsx-runtime";
2
2
  import * as le from "react";
3
- import B, { useRef as C, useCallback as R, useEffect as k, useState as I, useMemo as ce, useContext as Ae, createContext as Pe, useId as ut, useSyncExternalStore as Kn, Fragment as un, useReducer as ta, createRef as Lo, useLayoutEffect as Ne, forwardRef as na, createElement as $n, memo as ra } from "react";
4
- import { s as gt, p as qn, o as re, Y as be, V as aa, K as Se, y as ze, n as dt, a as Ut, u as Pt, b as Vt, t as Yn, T as ko, l as oa, f as sa, O as rn, c as ia, d as Xe, i as qt, e as Ro, A as Tr, g as ae, P as _e, h as ye, j as Bt, v as Fo, k as dn, m as Zn, q as ca, r as Xn, w as ke, C as Te, N as vt, x as Ve, z as Io, B as Oo, D as Po, E as Do, F as la, G as Ho, H as Uo, S as Vo, I as Jn, J as Bo, L as jo, M as Qn, Q as st, R as Wo, U as zo, W as Go, X as Ko, Z as qo, _ as ua, $ as da, a0 as Yo, a1 as Zo, a2 as Xo, a3 as Jo, a4 as Qo, a5 as es, a6 as fa, a7 as er, a8 as ha, a9 as ts, aa as ns, ab as rs, ac as as, ad as tr, ae as os, af as en, ag as ss, ah as is, ai as cs, aj as ls, ak as us, al as ds, am as wt, an as fs, ao as En, ap as hs, aq as Nt, ar as _n } from "./mount-BpvW4tbc.js";
5
- import { o as ms, L as ps, a as vs } from "./index-DCsPGgIk.js";
3
+ import B, { useRef as T, useCallback as R, useEffect as k, useState as I, useMemo as ce, useContext as Ae, createContext as De, useId as ut, useSyncExternalStore as Kn, Fragment as un, useReducer as ta, createRef as Lo, useLayoutEffect as Ne, forwardRef as na, createElement as $n, memo as ra } from "react";
4
+ import { s as gt, p as qn, o as re, Y as be, V as aa, K as Se, y as ze, n as dt, a as Ut, u as Pt, b as Vt, t as Yn, T as ko, l as oa, f as sa, O as rn, c as ia, d as Xe, i as qt, e as Ro, A as Tr, g as ae, P as _e, h as ye, j as Bt, v as Fo, k as dn, m as Zn, q as ca, r as Xn, w as ke, C as Te, N as vt, x as Ve, z as Io, B as Oo, D as Po, E as Do, F as la, G as Ho, H as Uo, S as Vo, I as Jn, J as Bo, L as jo, M as Qn, Q as st, R as Wo, U as zo, W as Go, X as Ko, Z as qo, _ as ua, $ as da, a0 as Yo, a1 as Zo, a2 as Xo, a3 as Jo, a4 as Qo, a5 as es, a6 as fa, a7 as er, a8 as ha, a9 as ts, aa as ns, ab as rs, ac as as, ad as tr, ae as os, af as en, ag as ss, ah as is, ai as cs, aj as ls, ak as us, al as ds, am as wt, an as fs, ao as En, ap as hs, aq as Nt, ar as _n } from "./mount-FL9HC10U.js";
5
+ import { o as ms, L as ps, a as vs } from "./index-BjqiRD4Q.js";
6
6
  import { createPortal as gs } from "react-dom";
7
7
  const ws = typeof document < "u" ? B.useLayoutEffect : () => {
8
8
  }, tt = (e) => {
@@ -141,7 +141,7 @@ function Ht(e, t, n = !0) {
141
141
  }
142
142
  Ht.isOpening = !1;
143
143
  function ga() {
144
- let e = C(/* @__PURE__ */ new Map()), t = R((a, o, i, s) => {
144
+ let e = T(/* @__PURE__ */ new Map()), t = R((a, o, i, s) => {
145
145
  let c = s?.once ? (...l) => {
146
146
  e.current.delete(i), i(...l);
147
147
  } : i;
@@ -186,7 +186,7 @@ function Rs(e, t) {
186
186
  });
187
187
  }
188
188
  function ba(e) {
189
- let t = C({
189
+ let t = T({
190
190
  isFocused: !1,
191
191
  observer: null
192
192
  });
@@ -335,7 +335,7 @@ function Vs(e) {
335
335
  };
336
336
  }
337
337
  function Bs(e) {
338
- let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: a } = e, o = C({
338
+ let { isDisabled: t, onBlurWithin: n, onFocusWithin: r, onFocusWithinChange: a } = e, o = T({
339
339
  isFocusWithin: !1
340
340
  }), { addGlobalListener: i, removeAllGlobalListeners: s } = ga(), c = R((h) => {
341
341
  h.currentTarget.contains(h.target) && o.current.isFocusWithin && !h.currentTarget.contains(h.relatedTarget) && (o.current.isFocusWithin = !1, s(), n && n(h), a && a(!1));
@@ -399,7 +399,7 @@ function js() {
399
399
  };
400
400
  }
401
401
  function Na(e) {
402
- let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: a } = e, [o, i] = I(!1), s = C({
402
+ let { onHoverStart: t, onHoverChange: n, onHoverEnd: r, isDisabled: a } = e, [o, i] = I(!1), s = T({
403
403
  isHovered: !1,
404
404
  ignoreEmulatedMouseEvents: !1,
405
405
  pointerType: "",
@@ -463,7 +463,7 @@ function Na(e) {
463
463
  };
464
464
  }
465
465
  function Aa(e = {}) {
466
- let { autoFocus: t = !1, isTextInput: n, within: r } = e, a = C({
466
+ let { autoFocus: t = !1, isTextInput: n, within: r } = e, a = T({
467
467
  isFocused: !1,
468
468
  isFocusVisible: t || Ta()
469
469
  }), [o, i] = I(!1), [s, c] = I(() => a.current.isFocused && a.current.isFocusVisible), l = R(() => c(a.current.isFocused && a.current.isFocusVisible), []), g = R((d) => {
@@ -512,7 +512,7 @@ function Gs(e, t) {
512
512
  return !(!e || !t || e.right < t.left || e.left > t.right || e.bottom < t.top || e.top > t.bottom);
513
513
  }
514
514
  function Ks({ disabled: e = !1 } = {}) {
515
- let t = C(null), [n, r] = I(!1), a = qn(), o = re(() => {
515
+ let t = T(null), [n, r] = I(!1), a = qn(), o = re(() => {
516
516
  t.current = null, r(!1), a.dispose();
517
517
  }), i = re((s) => {
518
518
  if (a.dispose(), t.current === null) {
@@ -533,7 +533,7 @@ function Ks({ disabled: e = !1 } = {}) {
533
533
  function nt(e) {
534
534
  return ce(() => e, Object.values(e));
535
535
  }
536
- let qs = Pe(void 0);
536
+ let qs = De(void 0);
537
537
  function hn() {
538
538
  return Ae(qs);
539
539
  }
@@ -550,7 +550,7 @@ function Js(e, t) {
550
550
  let { features: r = 1, ...a } = e, o = { ref: t, "aria-hidden": (r & 2) === 2 ? !0 : (n = a["aria-hidden"]) != null ? n : void 0, hidden: (r & 4) === 4 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(r & 4) === 4 && (r & 2) !== 2 && { display: "none" } } };
551
551
  return Se()({ ourProps: o, theirProps: a, slot: {}, defaultTag: Xs, name: "Hidden" });
552
552
  }
553
- let Pn = be(Js), Qs = Pe(void 0);
553
+ let Pn = be(Js), Qs = De(void 0);
554
554
  function Ma() {
555
555
  return Ae(Qs);
556
556
  }
@@ -581,7 +581,7 @@ function Ar(e) {
581
581
  function ri(e) {
582
582
  return je(e) ? e.matches('a[href],audio[controls],button,details,embed,iframe,img[usemap],input:not([type="hidden"]),label,select,textarea,video[controls]') : !1;
583
583
  }
584
- let mn = Pe(null);
584
+ let mn = De(null);
585
585
  mn.displayName = "DescriptionContext";
586
586
  function _a() {
587
587
  let e = Ae(mn);
@@ -614,7 +614,7 @@ function ii(e, t) {
614
614
  }
615
615
  let ci = be(ii), li = Object.assign(ci, {});
616
616
  var La = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(La || {});
617
- let or = Pe(null);
617
+ let or = De(null);
618
618
  or.displayName = "LabelContext";
619
619
  function ka() {
620
620
  let e = Ae(or);
@@ -651,7 +651,7 @@ function fi(e, t) {
651
651
  }
652
652
  let hi = be(fi);
653
653
  Object.assign(hi, {});
654
- let mi = Pe(() => {
654
+ let mi = De(() => {
655
655
  });
656
656
  function pi({ value: e, children: t }) {
657
657
  return B.createElement(mi.Provider, { value: e }, t);
@@ -670,10 +670,10 @@ var vi = Object.defineProperty, gi = (e, t, n) => t in e ? vi(e, t, { enumerable
670
670
  }, Me = (e, t, n) => (Fa(e, t, "read from private field"), n ? n.call(e) : t.get(e)), Cn = (e, t, n) => {
671
671
  if (t.has(e)) throw TypeError("Cannot add the same private member more than once");
672
672
  t instanceof WeakSet ? t.add(e) : t.set(e, n);
673
- }, Sr = (e, t, n, r) => (Fa(e, t, "write to private field"), t.set(e, n), n), Ie, _t, Lt;
673
+ }, Sr = (e, t, n, r) => (Fa(e, t, "write to private field"), t.set(e, n), n), Oe, _t, Lt;
674
674
  let bi = class {
675
675
  constructor(t) {
676
- Cn(this, Ie, {}), Cn(this, _t, new Ra(() => /* @__PURE__ */ new Set())), Cn(this, Lt, /* @__PURE__ */ new Set()), wi(this, "disposables", Ut()), Sr(this, Ie, t), gt.isServer && this.disposables.microTask(() => {
676
+ Cn(this, Oe, {}), Cn(this, _t, new Ra(() => /* @__PURE__ */ new Set())), Cn(this, Lt, /* @__PURE__ */ new Set()), wi(this, "disposables", Ut()), Sr(this, Oe, t), gt.isServer && this.disposables.microTask(() => {
677
677
  this.dispose();
678
678
  });
679
679
  }
@@ -681,12 +681,12 @@ let bi = class {
681
681
  this.disposables.dispose();
682
682
  }
683
683
  get state() {
684
- return Me(this, Ie);
684
+ return Me(this, Oe);
685
685
  }
686
686
  subscribe(t, n) {
687
687
  if (gt.isServer) return () => {
688
688
  };
689
- let r = { selector: t, callback: n, current: t(Me(this, Ie)) };
689
+ let r = { selector: t, callback: n, current: t(Me(this, Oe)) };
690
690
  return Me(this, Lt).add(r), this.disposables.add(() => {
691
691
  Me(this, Lt).delete(r);
692
692
  });
@@ -698,18 +698,18 @@ let bi = class {
698
698
  }));
699
699
  }
700
700
  send(t) {
701
- let n = this.reduce(Me(this, Ie), t);
702
- if (n !== Me(this, Ie)) {
703
- Sr(this, Ie, n);
701
+ let n = this.reduce(Me(this, Oe), t);
702
+ if (n !== Me(this, Oe)) {
703
+ Sr(this, Oe, n);
704
704
  for (let r of Me(this, Lt)) {
705
- let a = r.selector(Me(this, Ie));
705
+ let a = r.selector(Me(this, Oe));
706
706
  Ia(r.current, a) || (r.current = a, r.callback(a));
707
707
  }
708
- for (let r of Me(this, _t).get(t.type)) r(Me(this, Ie), t);
708
+ for (let r of Me(this, _t).get(t.type)) r(Me(this, Oe), t);
709
709
  }
710
710
  }
711
711
  };
712
- Ie = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap();
712
+ Oe = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap();
713
713
  function Ia(e, t) {
714
714
  return Object.is(e, t) ? !0 : typeof e != "object" || e === null || typeof t != "object" || t === null ? !1 : Array.isArray(e) && Array.isArray(t) ? e.length !== t.length ? !1 : Tn(e[Symbol.iterator](), t[Symbol.iterator]()) : e instanceof Map && t instanceof Map || e instanceof Set && t instanceof Set ? e.size !== t.size ? !1 : Tn(e.entries(), t.entries()) : Mr(e) && Mr(t) ? Tn(Object.entries(e)[Symbol.iterator](), Object.entries(t)[Symbol.iterator]()) : !1;
715
715
  }
@@ -781,13 +781,13 @@ function Ni() {
781
781
  var _ = h(A);
782
782
  return f !== void 0 && f(S, _) ? (w = A, S) : (w = A, x = _);
783
783
  }
784
- var b = !1, w, x, T = g === void 0 ? null : g;
784
+ var b = !1, w, x, N = g === void 0 ? null : g;
785
785
  return [
786
786
  function() {
787
787
  return y(l());
788
788
  },
789
- T === null ? void 0 : function() {
790
- return y(T());
789
+ N === null ? void 0 : function() {
790
+ return y(N());
791
791
  }
792
792
  ];
793
793
  },
@@ -833,13 +833,13 @@ function Ai() {
833
833
  var _ = h(A);
834
834
  return f !== void 0 && f(S, _) ? (w = A, S) : (w = A, x = _);
835
835
  }
836
- var b = !1, w, x, T = g === void 0 ? null : g;
836
+ var b = !1, w, x, N = g === void 0 ? null : g;
837
837
  return [
838
838
  function() {
839
839
  return y(l());
840
840
  },
841
- T === null ? void 0 : function() {
842
- return y(T());
841
+ N === null ? void 0 : function() {
842
+ return y(N());
843
843
  }
844
844
  ];
845
845
  },
@@ -1037,7 +1037,7 @@ function Bi(e, t, n) {
1037
1037
  })(t);
1038
1038
  for (let h of g) if (h !== null && (h.contains(l) || s.composed && s.composedPath().includes(h))) return;
1039
1039
  return !Oi(l, Ha.Loose) && l.tabIndex !== -1 && s.preventDefault(), r.current(s, l);
1040
- }, [r, t]), o = C(null);
1040
+ }, [r, t]), o = T(null);
1041
1041
  Jt(e, "pointerdown", (s) => {
1042
1042
  var c, l;
1043
1043
  Ir() || (o.current = ((l = (c = s.composedPath) == null ? void 0 : c.call(s)) == null ? void 0 : l[0]) || s.target);
@@ -1046,7 +1046,7 @@ function Bi(e, t, n) {
1046
1046
  let c = o.current;
1047
1047
  return o.current = null, a(s, () => c);
1048
1048
  }, !0);
1049
- let i = C({ x: 0, y: 0 });
1049
+ let i = T({ x: 0, y: 0 });
1050
1050
  Jt(e, "touchstart", (s) => {
1051
1051
  i.current.x = s.touches[0].clientX, i.current.y = s.touches[0].clientY;
1052
1052
  }, !0), Jt(e, "touchend", (s) => {
@@ -1187,7 +1187,7 @@ function Yi(e, t, n = () => [document.body]) {
1187
1187
  });
1188
1188
  }
1189
1189
  function ir(e, t) {
1190
- let n = C([]), r = re(e);
1190
+ let n = T([]), r = re(e);
1191
1191
  k(() => {
1192
1192
  let a = [...n.current];
1193
1193
  for (let [o, i] of t.entries()) if (n.current[o] !== i) {
@@ -1212,14 +1212,14 @@ Zi(() => {
1212
1212
  window.addEventListener("click", e, { capture: !0 }), window.addEventListener("mousedown", e, { capture: !0 }), window.addEventListener("focus", e, { capture: !0 }), document.body.addEventListener("click", e, { capture: !0 }), document.body.addEventListener("mousedown", e, { capture: !0 }), document.body.addEventListener("focus", e, { capture: !0 });
1213
1213
  });
1214
1214
  function ja(e) {
1215
- let t = re(e), n = C(!1);
1215
+ let t = re(e), n = T(!1);
1216
1216
  k(() => (n.current = !1, () => {
1217
1217
  n.current = !0, Yn(() => {
1218
1218
  n.current && t();
1219
1219
  });
1220
1220
  }), [t]);
1221
1221
  }
1222
- let Wa = Pe(!1);
1222
+ let Wa = De(!1);
1223
1223
  function Xi() {
1224
1224
  return Ae(Wa);
1225
1225
  }
@@ -1244,7 +1244,7 @@ function Ji(e) {
1244
1244
  }, [n, a, t]), r;
1245
1245
  }
1246
1246
  let za = un, Qi = be(function(e, t) {
1247
- let { ownerDocument: n = null, ...r } = e, a = C(null), o = ze(ko((f) => {
1247
+ let { ownerDocument: n = null, ...r } = e, a = T(null), o = ze(ko((f) => {
1248
1248
  a.current = f;
1249
1249
  }), t), i = sr(a.current), s = n ?? i, c = Ji(s), l = Ae(Un), g = qn(), h = Se();
1250
1250
  return ja(() => {
@@ -1258,14 +1258,14 @@ function ec(e, t) {
1258
1258
  let n = ze(t), { enabled: r = !0, ownerDocument: a, ...o } = e, i = Se();
1259
1259
  return r ? B.createElement(Qi, { ...o, ownerDocument: a, ref: n }) : i({ ourProps: { ref: n }, theirProps: o, slot: {}, defaultTag: za, name: "Portal" });
1260
1260
  }
1261
- let tc = un, Ga = Pe(null);
1261
+ let tc = un, Ga = De(null);
1262
1262
  function nc(e, t) {
1263
1263
  let { target: n, ...r } = e, a = { ref: ze(t) }, o = Se();
1264
1264
  return B.createElement(Ga.Provider, { value: n }, o({ ourProps: a, theirProps: r, defaultTag: tc, name: "Popover.Group" }));
1265
1265
  }
1266
- let Un = Pe(null);
1266
+ let Un = De(null);
1267
1267
  function rc() {
1268
- let e = Ae(Un), t = C([]), n = re((o) => (t.current.push(o), e && e.register(o), () => r(o))), r = re((o) => {
1268
+ let e = Ae(Un), t = T([]), n = re((o) => (t.current.push(o), e && e.register(o), () => r(o))), r = re((o) => {
1269
1269
  let i = t.current.indexOf(o);
1270
1270
  i !== -1 && t.current.splice(i, 1), e && e.unregister(o);
1271
1271
  }), a = ce(() => ({ register: n, unregister: r, portals: t }), [n, r, t]);
@@ -1302,7 +1302,7 @@ function cc({ defaultContainers: e = [], portals: t, mainTreeNode: n } = {}) {
1302
1302
  });
1303
1303
  return { resolveContainers: r, contains: re((a) => r().some((o) => o.contains(a))) };
1304
1304
  }
1305
- let qa = Pe(null);
1305
+ let qa = De(null);
1306
1306
  function Hr({ children: e, node: t }) {
1307
1307
  let [n, r] = I(null), a = Ya(t ?? n);
1308
1308
  return B.createElement(qa.Provider, { value: a }, e, a === null && B.createElement(Pn, { features: sn.Hidden, ref: (o) => {
@@ -1321,7 +1321,7 @@ function Ya(e = null) {
1321
1321
  }
1322
1322
  var kt = ((e) => (e[e.Forwards = 0] = "Forwards", e[e.Backwards = 1] = "Backwards", e))(kt || {});
1323
1323
  function lc() {
1324
- let e = C(0);
1324
+ let e = T(0);
1325
1325
  return Va(!0, "keydown", (t) => {
1326
1326
  t.key === "Tab" && (e.current = t.shiftKey ? 1 : 0);
1327
1327
  }, !0), e;
@@ -1336,7 +1336,7 @@ function Za(e) {
1336
1336
  let uc = "div";
1337
1337
  var ot = ((e) => (e[e.None = 0] = "None", e[e.InitialFocus = 1] = "InitialFocus", e[e.TabLock = 2] = "TabLock", e[e.FocusLock = 4] = "FocusLock", e[e.RestoreFocus = 8] = "RestoreFocus", e[e.AutoFocus = 16] = "AutoFocus", e))(ot || {});
1338
1338
  function dc(e, t) {
1339
- let n = C(null), r = ze(n, t), { initialFocus: a, initialFocusFallback: o, containers: i, features: s = 15, ...c } = e;
1339
+ let n = T(null), r = ze(n, t), { initialFocus: a, initialFocusFallback: o, containers: i, features: s = 15, ...c } = e;
1340
1340
  oa() || (s = 0);
1341
1341
  let l = sr(n.current);
1342
1342
  pc(s, { ownerDocument: l });
@@ -1345,14 +1345,14 @@ function dc(e, t) {
1345
1345
  let h = lc(), f = re((w) => {
1346
1346
  if (!et(n.current)) return;
1347
1347
  let x = n.current;
1348
- ((T) => T())(() => {
1348
+ ((N) => N())(() => {
1349
1349
  Pt(h.current, { [kt.Forwards]: () => {
1350
1350
  It(x, Be.First, { skipElements: [w.relatedTarget, o] });
1351
1351
  }, [kt.Backwards]: () => {
1352
1352
  It(x, Be.Last, { skipElements: [w.relatedTarget, o] });
1353
1353
  } });
1354
1354
  });
1355
- }), d = Wt(!!(s & 2), "focus-trap#tab-lock"), m = qn(), v = C(!1), y = { ref: r, onKeyDown(w) {
1355
+ }), d = Wt(!!(s & 2), "focus-trap#tab-lock"), m = qn(), v = T(!1), y = { ref: r, onKeyDown(w) {
1356
1356
  w.key == "Tab" && (v.current = !0, m.requestAnimationFrame(() => {
1357
1357
  v.current = !1;
1358
1358
  }));
@@ -1360,14 +1360,14 @@ function dc(e, t) {
1360
1360
  if (!(s & 4)) return;
1361
1361
  let x = Za(i);
1362
1362
  et(n.current) && x.add(n.current);
1363
- let T = w.relatedTarget;
1364
- Qe(T) && T.dataset.headlessuiFocusGuard !== "true" && (Xa(x, T) || (v.current ? It(n.current, Pt(h.current, { [kt.Forwards]: () => Be.Next, [kt.Backwards]: () => Be.Previous }) | Be.WrapAround, { relativeTo: w.target }) : Qe(w.target) && We(w.target)));
1363
+ let N = w.relatedTarget;
1364
+ Qe(N) && N.dataset.headlessuiFocusGuard !== "true" && (Xa(x, N) || (v.current ? It(n.current, Pt(h.current, { [kt.Forwards]: () => Be.Next, [kt.Backwards]: () => Be.Previous }) | Be.WrapAround, { relativeTo: w.target }) : Qe(w.target) && We(w.target)));
1365
1365
  } }, b = Se();
1366
1366
  return B.createElement(B.Fragment, null, d && B.createElement(Pn, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: f, features: sn.Focusable }), b({ ourProps: y, theirProps: c, defaultTag: uc, name: "FocusTrap" }), d && B.createElement(Pn, { as: "button", type: "button", "data-headlessui-focus-guard": !0, onFocus: f, features: sn.Focusable }));
1367
1367
  }
1368
1368
  let fc = be(dc), hc = Object.assign(fc, { features: ot });
1369
1369
  function mc(e = !0) {
1370
- let t = C(Je.slice());
1370
+ let t = T(Je.slice());
1371
1371
  return ir(([n], [r]) => {
1372
1372
  r === !0 && n === !1 && Yn(() => {
1373
1373
  t.current.splice(0);
@@ -1386,7 +1386,7 @@ function pc(e, { ownerDocument: t }) {
1386
1386
  });
1387
1387
  }
1388
1388
  function vc(e, { ownerDocument: t, container: n, initialFocus: r, initialFocusFallback: a }) {
1389
- let o = C(null), i = Wt(!!(e & 1), "focus-trap#initial-focus"), s = sa();
1389
+ let o = T(null), i = Wt(!!(e & 1), "focus-trap#initial-focus"), s = sa();
1390
1390
  return ir(() => {
1391
1391
  if (e === 0) return;
1392
1392
  if (!i) {
@@ -1437,7 +1437,7 @@ function Xa(e, t) {
1437
1437
  var wc = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(wc || {}), bc = ((e) => (e[e.SetTitleId = 0] = "SetTitleId", e))(bc || {});
1438
1438
  let yc = { 0(e, t) {
1439
1439
  return e.titleId === t.id ? e : { ...e, titleId: t.id };
1440
- } }, cr = Pe(null);
1440
+ } }, cr = De(null);
1441
1441
  cr.displayName = "DialogContext";
1442
1442
  function pn(e) {
1443
1443
  let t = Ae(cr);
@@ -1451,13 +1451,13 @@ function xc(e, t) {
1451
1451
  return Pt(t.type, yc, e, t);
1452
1452
  }
1453
1453
  let Ur = be(function(e, t) {
1454
- let n = ut(), { id: r = `headlessui-dialog-${n}`, open: a, onClose: o, initialFocus: i, role: s = "dialog", autoFocus: c = !0, __demoMode: l = !1, unmount: g = !1, ...h } = e, f = C(!1);
1454
+ let n = ut(), { id: r = `headlessui-dialog-${n}`, open: a, onClose: o, initialFocus: i, role: s = "dialog", autoFocus: c = !0, __demoMode: l = !1, unmount: g = !1, ...h } = e, f = T(!1);
1455
1455
  s = (function() {
1456
1456
  return s === "dialog" || s === "alertdialog" ? s : (f.current || (f.current = !0, console.warn(`Invalid role [${s}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)), "dialog");
1457
1457
  })();
1458
1458
  let d = ia();
1459
1459
  a === void 0 && d !== null && (a = (d & qt.Open) === qt.Open);
1460
- let m = C(null), v = ze(m, t), y = sr(m.current), b = a ? 0 : 1, [w, x] = ta(xc, { titleId: null, descriptionId: null, panelRef: Lo() }), T = re(() => o(!1)), A = re((G) => x({ type: 0, id: G })), S = oa() ? b === 0 : !1, [_, L] = rc(), F = { get current() {
1460
+ let m = T(null), v = ze(m, t), y = sr(m.current), b = a ? 0 : 1, [w, x] = ta(xc, { titleId: null, descriptionId: null, panelRef: Lo() }), N = re(() => o(!1)), A = re((G) => x({ type: 0, id: G })), S = oa() ? b === 0 : !1, [_, L] = rc(), F = { get current() {
1461
1461
  var G;
1462
1462
  return (G = w.panelRef.current) != null ? G : m.current;
1463
1463
  } }, q = Ya(), { resolveContainers: M } = cc({ mainTreeNode: q, portals: _, defaultContainers: [F] }), U = d !== null ? (d & qt.Closing) === qt.Closing : !1;
@@ -1474,14 +1474,14 @@ let Ur = be(function(e, t) {
1474
1474
  }, [V, r, S]);
1475
1475
  let D = Da(V, R((G) => V.selectors.isTop(G, r), [V, r]));
1476
1476
  Bi(D, M, (G) => {
1477
- G.preventDefault(), T();
1477
+ G.preventDefault(), N();
1478
1478
  }), sc(D, y?.defaultView, (G) => {
1479
- G.preventDefault(), G.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), T();
1480
- }), Yi(l || U ? !1 : S, y, M), Li(S, m, T);
1481
- let [J, we] = oi(), Y = ce(() => [{ dialogState: b, close: T, setTitleId: A, unmount: g }, w], [b, T, A, g, w]), ue = nt({ open: b === 0 }), pe = { ref: v, id: r, role: s, tabIndex: -1, "aria-modal": l ? void 0 : b === 0 ? !0 : void 0, "aria-labelledby": w.titleId, "aria-describedby": J, unmount: g }, ve = !ic(), Q = ot.None;
1479
+ G.preventDefault(), G.stopPropagation(), document.activeElement && "blur" in document.activeElement && typeof document.activeElement.blur == "function" && document.activeElement.blur(), N();
1480
+ }), Yi(l || U ? !1 : S, y, M), Li(S, m, N);
1481
+ let [J, we] = oi(), Y = ce(() => [{ dialogState: b, close: N, setTitleId: A, unmount: g }, w], [b, N, A, g, w]), ue = nt({ open: b === 0 }), pe = { ref: v, id: r, role: s, tabIndex: -1, "aria-modal": l ? void 0 : b === 0 ? !0 : void 0, "aria-labelledby": w.titleId, "aria-describedby": J, unmount: g }, ve = !ic(), Q = ot.None;
1482
1482
  S && !l && (Q |= ot.RestoreFocus, Q |= ot.TabLock, c && (Q |= ot.AutoFocus), ve && (Q |= ot.InitialFocus));
1483
1483
  let fe = Se();
1484
- return B.createElement(Ro, null, B.createElement(Dr, { force: !0 }, B.createElement(oc, null, B.createElement(cr.Provider, { value: Y }, B.createElement(Ka, { target: m }, B.createElement(Dr, { force: !1 }, B.createElement(we, { slot: ue }, B.createElement(L, null, B.createElement(hc, { initialFocus: i, initialFocusFallback: m, containers: M, features: Q }, B.createElement(pi, { value: T }, fe({ ourProps: pe, theirProps: h, slot: ue, defaultTag: Ec, features: Cc, visible: b === 0, name: "Dialog" })))))))))));
1484
+ return B.createElement(Ro, null, B.createElement(Dr, { force: !0 }, B.createElement(oc, null, B.createElement(cr.Provider, { value: Y }, B.createElement(Ka, { target: m }, B.createElement(Dr, { force: !1 }, B.createElement(we, { slot: ue }, B.createElement(L, null, B.createElement(hc, { initialFocus: i, initialFocusFallback: m, containers: M, features: Q }, B.createElement(pi, { value: N }, fe({ ourProps: pe, theirProps: h, slot: ue, defaultTag: Ec, features: Cc, visible: b === 0, name: "Dialog" })))))))))));
1485
1485
  }), Ec = "div", Cc = Tr.RenderStrategy | Tr.Static;
1486
1486
  function Tc(e, t) {
1487
1487
  let { transition: n = !1, open: r, ...a } = e, o = ia(), i = e.hasOwnProperty("open") || o !== null, s = e.hasOwnProperty("onClose");
@@ -1523,7 +1523,7 @@ function eo({
1523
1523
  className: t,
1524
1524
  ...n
1525
1525
  }) {
1526
- return /* @__PURE__ */ N(
1526
+ return /* @__PURE__ */ C(
1527
1527
  "div",
1528
1528
  {
1529
1529
  ...n,
@@ -1589,7 +1589,7 @@ function no({ className: e }) {
1589
1589
  open: h,
1590
1590
  surfaceEpisodeId: f,
1591
1591
  api: d
1592
- } = Bt(), m = C(null), [v, y] = I(() => /* @__PURE__ */ new Set()), b = n?.commandId, w = R(() => {
1592
+ } = Bt(), m = T(null), [v, y] = I(() => /* @__PURE__ */ new Set()), b = n?.commandId, w = R(() => {
1593
1593
  b && y((A) => {
1594
1594
  if (A.has(b)) return A;
1595
1595
  const S = new Set(A);
@@ -1614,15 +1614,15 @@ function no({ className: e }) {
1614
1614
  f,
1615
1615
  x
1616
1616
  ), !n) return null;
1617
- const T = h && !r && n.attention === "NUDGE_ONCE" && !v.has(n.commandId);
1618
- return /* @__PURE__ */ N(
1617
+ const N = h && !r && n.attention === "NUDGE_ONCE" && !v.has(n.commandId);
1618
+ return /* @__PURE__ */ C(
1619
1619
  "div",
1620
1620
  {
1621
1621
  ref: m,
1622
1622
  className: ae("flex max-w-full flex-col gap-1.5", e),
1623
1623
  children: [
1624
1624
  n.text && /* @__PURE__ */ u("p", { className: "max-w-72 text-sm leading-5 break-words whitespace-pre-wrap text-white/90", children: n.text }),
1625
- /* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
1625
+ /* @__PURE__ */ C("div", { className: "flex items-center gap-2", children: [
1626
1626
  /* @__PURE__ */ u(
1627
1627
  ee,
1628
1628
  {
@@ -1633,7 +1633,7 @@ function no({ className: e }) {
1633
1633
  },
1634
1634
  className: ae(
1635
1635
  "chat-cta-primary chat-cta-action data-disabled:opacity-50",
1636
- T && "chat-attention-nudge-once"
1636
+ N && "chat-attention-nudge-once"
1637
1637
  ),
1638
1638
  children: a
1639
1639
  }
@@ -1663,7 +1663,7 @@ function no({ className: e }) {
1663
1663
  children: t("cta.openTelegram", { username: i })
1664
1664
  }
1665
1665
  ),
1666
- c && /* @__PURE__ */ N("p", { className: "max-w-72 text-xs text-white/65", children: [
1666
+ c && /* @__PURE__ */ C("p", { className: "max-w-72 text-xs text-white/65", children: [
1667
1667
  t("cta.manualCommand"),
1668
1668
  " ",
1669
1669
  /* @__PURE__ */ u("code", { className: "break-all", dir: "ltr", children: c })
@@ -1733,7 +1733,7 @@ function Xc({
1733
1733
  meter: h = Fo,
1734
1734
  spectrumSource: f
1735
1735
  }) {
1736
- const d = C(null), m = C(null), v = C(s), y = e === "connecting";
1736
+ const d = T(null), m = T(null), v = T(s), y = e === "connecting";
1737
1737
  return Ne(() => {
1738
1738
  v.current = s;
1739
1739
  }, [s]), k(() => {
@@ -1746,8 +1746,8 @@ function Xc({
1746
1746
  return;
1747
1747
  }
1748
1748
  if (!x) return;
1749
- const T = window.matchMedia?.("(prefers-reduced-motion: reduce)");
1750
- let A = T?.matches ?? !1, S = 0, _ = 1, L = null, F = null, q = 0, M = new Float32Array(2), U = new Float32Array(2), V = new Float32Array(1), D = new Float32Array(1), J = null;
1749
+ const N = window.matchMedia?.("(prefers-reduced-motion: reduce)");
1750
+ let A = N?.matches ?? !1, S = 0, _ = 1, L = null, F = null, q = 0, M = new Float32Array(2), U = new Float32Array(2), V = new Float32Array(1), D = new Float32Array(1), J = null;
1751
1751
  const we = e === "ready" && n, Y = (X, se, ie, te, Ee, $) => {
1752
1752
  const Ke = typeof x.roundRect == "function";
1753
1753
  Ke && x.beginPath();
@@ -1804,18 +1804,18 @@ function Xc({
1804
1804
  ), Ke = Math.max(
1805
1805
  Ye,
1806
1806
  S - St - Ee - Mt - At
1807
- ), de = _ > 1 ? ($ - Ye) / (_ - 1) : 0, he = _ > 1 ? (Ke - Ye) / (_ - 1) : 0, De = St, qe = Ee + Mt + At;
1807
+ ), de = _ > 1 ? ($ - Ye) / (_ - 1) : 0, he = _ > 1 ? (Ke - Ye) / (_ - 1) : 0, He = St, qe = Ee + Mt + At;
1808
1808
  x.clearRect(0, 0, S, Bn), x.fillStyle = "#8b889b", x.globalAlpha = 0.52, Y(
1809
1809
  V,
1810
1810
  D,
1811
- De,
1811
+ He,
1812
1812
  de,
1813
1813
  qe,
1814
1814
  he
1815
1815
  ), te > 0.01 && J && (x.fillStyle = J, x.globalAlpha = Math.min(1, te * 1.2), Y(
1816
1816
  V,
1817
1817
  D,
1818
- De,
1818
+ He,
1819
1819
  de,
1820
1820
  qe,
1821
1821
  he
@@ -1828,8 +1828,8 @@ function Xc({
1828
1828
  oe = !0;
1829
1829
  break;
1830
1830
  }
1831
- const He = Math.abs(q - se) > 3e-3;
1832
- !A && we && (f !== void 0 && se > 3e-3 || He || oe) && ve();
1831
+ const Re = Math.abs(q - se) > 3e-3;
1832
+ !A && we && (f !== void 0 && se > 3e-3 || Re || oe) && ve();
1833
1833
  }, pe = (X) => {
1834
1834
  L = null, ue(X);
1835
1835
  }, ve = (X = !1) => {
@@ -1857,14 +1857,14 @@ function Xc({
1857
1857
  }
1858
1858
  ve(!0);
1859
1859
  }, G = () => {
1860
- A = T?.matches ?? !1, ve(!0);
1860
+ A = N?.matches ?? !1, ve(!0);
1861
1861
  }, Z = [];
1862
1862
  we && Z.push(h.subscribe("input", () => ve()));
1863
1863
  const ge = typeof ResizeObserver > "u" ? null : new ResizeObserver(() => Q());
1864
- return ge?.observe(b), window.addEventListener("resize", Q), document.addEventListener("visibilitychange", fe), T?.addEventListener?.("change", G), Q(), () => {
1865
- Z.forEach((X) => X()), ge?.disconnect(), window.removeEventListener("resize", Q), document.removeEventListener("visibilitychange", fe), T?.removeEventListener?.("change", G), L !== null && cancelAnimationFrame(L);
1864
+ return ge?.observe(b), window.addEventListener("resize", Q), document.addEventListener("visibilitychange", fe), N?.addEventListener?.("change", G), Q(), () => {
1865
+ Z.forEach((X) => X()), ge?.disconnect(), window.removeEventListener("resize", Q), document.removeEventListener("visibilitychange", fe), N?.removeEventListener?.("change", G), L !== null && cancelAnimationFrame(L);
1866
1866
  };
1867
- }, [s, h, n, e, f]), /* @__PURE__ */ N(
1867
+ }, [s, h, n, e, f]), /* @__PURE__ */ C(
1868
1868
  "div",
1869
1869
  {
1870
1870
  className: ae("voice-composer", g),
@@ -1874,7 +1874,7 @@ function Xc({
1874
1874
  "data-voice-phase": e,
1875
1875
  children: [
1876
1876
  /* @__PURE__ */ u("span", { "aria-live": "polite", className: "sr-only", children: r }),
1877
- /* @__PURE__ */ N("div", { className: "voice-composer__track", children: [
1877
+ /* @__PURE__ */ C("div", { className: "voice-composer__track", children: [
1878
1878
  /* @__PURE__ */ u(
1879
1879
  "span",
1880
1880
  {
@@ -1892,7 +1892,7 @@ function Xc({
1892
1892
  "data-voice-wave-canvas": !0
1893
1893
  }
1894
1894
  ),
1895
- /* @__PURE__ */ N(
1895
+ /* @__PURE__ */ C(
1896
1896
  ee,
1897
1897
  {
1898
1898
  type: "button",
@@ -1967,11 +1967,11 @@ function Jc({
1967
1967
  endVoiceChat: f,
1968
1968
  acceptConversation: d,
1969
1969
  declineConversation: m
1970
- } = Xn(), v = ke(($) => $.pendingInvitation), y = ke(($) => $.status), b = ke(($) => $.errorMessage), w = ke(($) => $.errorCode), x = ke(($) => $.generation), T = ke(($) => $.microphoneMutedByUser), A = ke(
1970
+ } = Xn(), v = ke(($) => $.pendingInvitation), y = ke(($) => $.status), b = ke(($) => $.errorMessage), w = ke(($) => $.errorCode), x = ke(($) => $.generation), N = ke(($) => $.microphoneMutedByUser), A = ke(
1971
1971
  ($) => $.session !== null || $.socket !== null
1972
1972
  ), S = ke(
1973
1973
  ($) => $.assistantResponseInProgress
1974
- ), _ = ke(($) => $.assistantAudioPlaying), [L, F] = I(!1), [q, M] = I(null), U = C(!1), V = C(x), D = C(t), [J, we] = I(
1974
+ ), _ = ke(($) => $.assistantAudioPlaying), [L, F] = I(!1), [q, M] = I(null), U = T(!1), V = T(x), D = T(t), [J, we] = I(
1975
1975
  !!v
1976
1976
  ), Y = r && !l && !J && !v && !A && y === "idle" && !w && !b;
1977
1977
  k(() => {
@@ -1998,7 +1998,7 @@ function Jc({
1998
1998
  await ue();
1999
1999
  return;
2000
2000
  }
2001
- if (!T) {
2001
+ if (!N) {
2002
2002
  h();
2003
2003
  return;
2004
2004
  }
@@ -2011,7 +2011,7 @@ function Jc({
2011
2011
  ue,
2012
2012
  o,
2013
2013
  a,
2014
- T,
2014
+ N,
2015
2015
  v,
2016
2016
  g,
2017
2017
  h
@@ -2034,46 +2034,46 @@ function Jc({
2034
2034
  r,
2035
2035
  g
2036
2036
  ]);
2037
- const Q = ce(() => c === vt.Unavailable ? n(Ve.connectionFailed) : c === vt.Offline ? n(Ve.offline) : w ? n(Io[w]) : b || null, [c, n, w, b]), fe = ce(() => n(_ ? "voice.speaking" : l || y === "connecting" || Y ? "voice.connecting" : S ? "chat.thinking" : y === "speaking" ? "voice.speaking" : v ? "voice.incoming" : T ? "voice.muted" : "voice.startTalking"), [
2037
+ const Q = ce(() => c === vt.Unavailable ? n(Ve.connectionFailed) : c === vt.Offline ? n(Ve.offline) : w ? n(Io[w]) : b || null, [c, n, w, b]), fe = ce(() => n(_ ? "voice.speaking" : l || y === "connecting" || Y ? "voice.connecting" : S ? "chat.thinking" : y === "speaking" ? "voice.speaking" : v ? "voice.incoming" : N ? "voice.muted" : "voice.startTalking"), [
2038
2038
  _,
2039
2039
  S,
2040
2040
  Y,
2041
2041
  l,
2042
- T,
2042
+ N,
2043
2043
  v,
2044
2044
  n,
2045
2045
  y
2046
2046
  ]), G = !i && Q, Z = l || y === "connecting" || Y ? "connecting" : "ready", ge = _ ? "speaking" : S ? "thinking" : "idle", X = {
2047
2047
  phase: Z,
2048
2048
  assistantActivity: ge,
2049
- microphoneEnabled: !T
2049
+ microphoneEnabled: !N
2050
2050
  }, [se, ie] = I(X);
2051
2051
  Ne(() => {
2052
2052
  t || ie({
2053
2053
  phase: Z,
2054
2054
  assistantActivity: ge,
2055
- microphoneEnabled: !T
2055
+ microphoneEnabled: !N
2056
2056
  });
2057
2057
  }, [
2058
2058
  ge,
2059
2059
  Z,
2060
2060
  t,
2061
- T
2061
+ N
2062
2062
  ]);
2063
2063
  const te = q ?? (t ? se : X), Ee = R(() => {
2064
2064
  M({
2065
2065
  phase: Z,
2066
2066
  assistantActivity: ge,
2067
- microphoneEnabled: !T
2067
+ microphoneEnabled: !N
2068
2068
  }), f(), s(Te.text);
2069
2069
  }, [
2070
2070
  ge,
2071
2071
  Z,
2072
2072
  f,
2073
- T,
2073
+ N,
2074
2074
  s
2075
2075
  ]);
2076
- return /* @__PURE__ */ N(
2076
+ return /* @__PURE__ */ C(
2077
2077
  "div",
2078
2078
  {
2079
2079
  className: ae(
@@ -2089,11 +2089,11 @@ function Jc({
2089
2089
  source: to.ReactionMessage
2090
2090
  }
2091
2091
  ),
2092
- v && !i && /* @__PURE__ */ N("div", { className: "chat-voice-card mb-5 flex max-w-70 flex-col items-center gap-2.5 p-4 text-center text-white", children: [
2092
+ v && !i && /* @__PURE__ */ C("div", { className: "chat-voice-card mb-5 flex max-w-70 flex-col items-center gap-2.5 p-4 text-center text-white", children: [
2093
2093
  /* @__PURE__ */ u("p", { className: "text-sm font-semibold", children: n("voice.calling") }),
2094
2094
  /* @__PURE__ */ u("p", { className: "text-[13px] leading-5 text-white/80", children: v.text }),
2095
2095
  /* @__PURE__ */ u("p", { className: "text-xs text-white/70", children: n("voice.aiDisclosure") }),
2096
- /* @__PURE__ */ N("div", { className: "flex gap-2", children: [
2096
+ /* @__PURE__ */ C("div", { className: "flex gap-2", children: [
2097
2097
  /* @__PURE__ */ u(
2098
2098
  ee,
2099
2099
  {
@@ -2129,7 +2129,7 @@ function Jc({
2129
2129
  assistantActivity: te.assistantActivity,
2130
2130
  microphoneEnabled: te.microphoneEnabled,
2131
2131
  statusLabel: fe,
2132
- microphoneLabel: n(v ? "voice.accept" : T ? "voice.unmuteMicrophone" : "voice.muteMicrophone"),
2132
+ microphoneLabel: n(v ? "voice.accept" : N ? "voice.unmuteMicrophone" : "voice.muteMicrophone"),
2133
2133
  closeLabel: n("voice.switchToText"),
2134
2134
  disabled: L || l,
2135
2135
  frozen: !!(q || t || !r),
@@ -2314,7 +2314,7 @@ function io({
2314
2314
  ...n
2315
2315
  }) {
2316
2316
  const { t: r } = ye();
2317
- return /* @__PURE__ */ N(
2317
+ return /* @__PURE__ */ C(
2318
2318
  "div",
2319
2319
  {
2320
2320
  ...n,
@@ -2351,7 +2351,7 @@ const Al = () => document.visibilityState === "hidden", Sl = (e, t) => {
2351
2351
  const [n] = I(() => {
2352
2352
  const i = Po();
2353
2353
  return t && e.startsWith(t) && (i.setTarget(t), i.flush()), i;
2354
- }), r = C(null), [a, o] = I(
2354
+ }), r = T(null), [a, o] = I(
2355
2355
  () => n.getSnapshot()
2356
2356
  );
2357
2357
  return k(() => {
@@ -2397,7 +2397,7 @@ function Ml({
2397
2397
  finished: a = !1,
2398
2398
  onSettled: o
2399
2399
  }) {
2400
- const i = Sl(r, n), s = C(void 0), c = C(o), l = ce(
2400
+ const i = Sl(r, n), s = T(void 0), c = T(o), l = ce(
2401
2401
  () => Do(i.displayedText),
2402
2402
  [i.displayedText]
2403
2403
  );
@@ -2491,10 +2491,10 @@ function mo({
2491
2491
  onDownload: n
2492
2492
  }) {
2493
2493
  const { t: r } = ye();
2494
- return e?.length ? /* @__PURE__ */ N("div", { className: "chat-attachments", "aria-label": r("attachment.listLabel"), children: [
2494
+ return e?.length ? /* @__PURE__ */ C("div", { className: "chat-attachments", "aria-label": r("attachment.listLabel"), children: [
2495
2495
  e.map((a) => {
2496
2496
  const o = !!lo(a), i = a.kind === "image" ? wl : lr;
2497
- return /* @__PURE__ */ N("article", { className: "chat-attachment-card", children: [
2497
+ return /* @__PURE__ */ C("article", { className: "chat-attachment-card", children: [
2498
2498
  a.previewUrl && a.kind === "image" ? /* @__PURE__ */ u(
2499
2499
  "img",
2500
2500
  {
@@ -2503,11 +2503,11 @@ function mo({
2503
2503
  className: "chat-attachment-card__thumbnail"
2504
2504
  }
2505
2505
  ) : /* @__PURE__ */ u("span", { className: "chat-attachment-card__icon", "aria-hidden": "true", children: /* @__PURE__ */ u(i, { className: "h-4 w-4" }) }),
2506
- /* @__PURE__ */ N("div", { className: "min-w-0 flex-1", children: [
2506
+ /* @__PURE__ */ C("div", { className: "min-w-0 flex-1", children: [
2507
2507
  /* @__PURE__ */ u("p", { className: "truncate text-xs font-semibold text-white/90", children: a.fileName }),
2508
2508
  /* @__PURE__ */ u("p", { className: "mt-0.5 truncate text-[10px] text-white/48", children: co(a.size) })
2509
2509
  ] }),
2510
- /* @__PURE__ */ N("div", { className: "flex shrink-0 items-center gap-0.5", children: [
2510
+ /* @__PURE__ */ C("div", { className: "flex shrink-0 items-center gap-0.5", children: [
2511
2511
  o && t && /* @__PURE__ */ u(
2512
2512
  ee,
2513
2513
  {
@@ -2593,7 +2593,7 @@ function Fl({
2593
2593
  size: o,
2594
2594
  className: i
2595
2595
  }) {
2596
- const s = la(), c = C(null), [l, g] = I(!1), [h, f] = I(null), [d, m] = I(!1), [v, y] = I(0), [b, w] = I(0), [x, T] = I(
2596
+ const s = la(), c = T(null), [l, g] = I(!1), [h, f] = I(null), [d, m] = I(!1), [v, y] = I(0), [b, w] = I(0), [x, N] = I(
2597
2597
  () => typeof IntersectionObserver != "function"
2598
2598
  ), A = a?.avatarAsset ?? null, S = a?.contractState === "LEGACY" ? a.legacyAvatarUrl : null, _ = !!(S && !l);
2599
2599
  return k(() => {
@@ -2602,7 +2602,7 @@ function Fl({
2602
2602
  return;
2603
2603
  const F = new IntersectionObserver(
2604
2604
  (q) => {
2605
- q.some(({ isIntersecting: M }) => M) && (T(!0), F.disconnect());
2605
+ q.some(({ isIntersecting: M }) => M) && (N(!0), F.disconnect());
2606
2606
  },
2607
2607
  { rootMargin: "160px" }
2608
2608
  );
@@ -2637,7 +2637,7 @@ function Fl({
2637
2637
  x,
2638
2638
  b,
2639
2639
  s
2640
- ]), /* @__PURE__ */ N(
2640
+ ]), /* @__PURE__ */ C(
2641
2641
  "span",
2642
2642
  {
2643
2643
  ref: c,
@@ -2707,7 +2707,7 @@ const Il = ra(function({
2707
2707
  const { t: s } = ye(), c = Ae(Vo), { scenarioChoiceSubmissionController: l } = Zn(), { settleMessageStream: g } = Jn(), h = Bo(t), f = t.author.type === _e.Agent, d = jo(t.id), [m, v] = I(() => Date.now()), [y, b] = I(), [w, x] = I(() => ({
2708
2708
  active: !!(f && d),
2709
2709
  text: f && d ? "" : h
2710
- })), T = C(null), A = C(null), [S, _] = I(() => /* @__PURE__ */ new Set()), L = Qn(), F = !!c?.open && t.conversationId === L, q = c ? F : !0, { author: M } = t, U = t.status === st.Failed || t.status === st.Cancelled, V = t.status === st.Completed || U, D = ce(() => Wo(t), [t]), J = ce(
2710
+ })), N = T(null), A = T(null), [S, _] = I(() => /* @__PURE__ */ new Set()), L = Qn(), F = !!c?.open && t.conversationId === L, q = c ? F : !0, { author: M } = t, U = t.status === st.Failed || t.status === st.Cancelled, V = t.status === st.Completed || U, D = ce(() => Wo(t), [t]), J = ce(
2711
2711
  () => ({
2712
2712
  principalId: c?.runtime.getPrincipalSessionId() ?? "anonymous",
2713
2713
  inputRequestId: D?.inputRequestId ?? `none:${t.id}`
@@ -2731,8 +2731,8 @@ const Il = ra(function({
2731
2731
  if (H.has(fe)) return H;
2732
2732
  const oe = new Set(H);
2733
2733
  if (oe.add(fe), oe.size > 64) {
2734
- const He = oe.values().next().value;
2735
- He !== void 0 && oe.delete(He);
2734
+ const Re = oe.values().next().value;
2735
+ Re !== void 0 && oe.delete(Re);
2736
2736
  }
2737
2737
  return oe;
2738
2738
  });
@@ -2752,14 +2752,14 @@ const Il = ra(function({
2752
2752
  } : null,
2753
2753
  [D]
2754
2754
  ), te = R(() => {
2755
- const H = T.current;
2755
+ const H = N.current;
2756
2756
  return H ? !!(H.querySelector(
2757
2757
  ".chat-message-content"
2758
2758
  )?.textContent?.trim() || H.querySelector(".chat-attachments")) : !1;
2759
2759
  }, []);
2760
2760
  Vn(
2761
2761
  c?.runtime,
2762
- T,
2762
+ N,
2763
2763
  F,
2764
2764
  c?.surfaceEpisodeId ?? null,
2765
2765
  se,
@@ -2773,12 +2773,12 @@ const Il = ra(function({
2773
2773
  );
2774
2774
  const Ee = R(
2775
2775
  (H) => {
2776
- T.current = H, typeof o == "function" ? o(H) : o && (o.current = H);
2776
+ N.current = H, typeof o == "function" ? o(H) : o && (o.current = H);
2777
2777
  },
2778
2778
  [o]
2779
2779
  ), $ = f ? d : void 0;
2780
2780
  !$ && (w.active || w.text !== h) ? x({ active: !1, text: h }) : $ && !w.active && x({ active: !0, text: w.text });
2781
- const de = (V ? h : "") || $?.text || "", he = !!($ && ($.done || V)), De = !!($ && de && (!he || y !== $.sequence)), qe = De ? "" : Go(t);
2781
+ const de = (V ? h : "") || $?.text || "", he = !!($ && ($.done || V)), He = !!($ && de && (!he || y !== $.sequence)), qe = He ? "" : Go(t);
2782
2782
  k(() => {
2783
2783
  if (!D || D.lifecycle?.status !== "PENDING") return;
2784
2784
  const H = Ko(D, Date.now());
@@ -2818,7 +2818,7 @@ const Il = ra(function({
2818
2818
  l
2819
2819
  ]
2820
2820
  );
2821
- return U ? null : /* @__PURE__ */ N(
2821
+ return U ? null : /* @__PURE__ */ C(
2822
2822
  "div",
2823
2823
  {
2824
2824
  ref: Ee,
@@ -2830,7 +2830,7 @@ const Il = ra(function({
2830
2830
  a
2831
2831
  ),
2832
2832
  children: [
2833
- f && /* @__PURE__ */ N("div", { className: "chat-message-identity flex max-w-full items-center gap-1.5 ps-0.5", children: [
2833
+ f && /* @__PURE__ */ C("div", { className: "chat-message-identity flex max-w-full items-center gap-1.5 ps-0.5", children: [
2834
2834
  /* @__PURE__ */ u(
2835
2835
  ur,
2836
2836
  {
@@ -2856,7 +2856,7 @@ const Il = ra(function({
2856
2856
  "self-end": M.type === _e.Customer
2857
2857
  }
2858
2858
  ),
2859
- children: De && $ ? /* @__PURE__ */ u("div", { className: "chat-message-content w-full min-w-0 break-words", children: /* @__PURE__ */ u(
2859
+ children: He && $ ? /* @__PURE__ */ u("div", { className: "chat-message-content w-full min-w-0 break-words", children: /* @__PURE__ */ u(
2860
2860
  Ml,
2861
2861
  {
2862
2862
  stableText: $.stableText,
@@ -2889,7 +2889,7 @@ const Il = ra(function({
2889
2889
  onDownload: r ? (H) => r(H, t.conversationId) : void 0
2890
2890
  }
2891
2891
  ),
2892
- D && Q && pe !== "terminal" && /* @__PURE__ */ N(
2892
+ D && Q && pe !== "terminal" && /* @__PURE__ */ C(
2893
2893
  "div",
2894
2894
  {
2895
2895
  ref: A,
@@ -2898,12 +2898,12 @@ const Il = ra(function({
2898
2898
  "aria-label": s("chat.chooseAnswer"),
2899
2899
  children: [
2900
2900
  D.options.map((H) => {
2901
- const oe = ve === H.id, He = pe === "submitting", me = q && H.attention === "NUDGE_ONCE" && !He && !S.has(D.inputRequestId);
2901
+ const oe = ve === H.id, Re = pe === "submitting", me = q && H.attention === "NUDGE_ONCE" && !Re && !S.has(D.inputRequestId);
2902
2902
  return /* @__PURE__ */ u(
2903
2903
  ee,
2904
2904
  {
2905
2905
  type: "button",
2906
- disabled: He,
2906
+ disabled: Re,
2907
2907
  "aria-pressed": oe,
2908
2908
  "data-presentation": H.presentation,
2909
2909
  "data-attention": me ? "NUDGE_ONCE" : "NONE",
@@ -2936,7 +2936,7 @@ function Dl({
2936
2936
  threadId: a,
2937
2937
  threshold: o = 80
2938
2938
  }) {
2939
- const i = C(!0), s = C(!1), c = C(null), l = C(null), g = C(r), h = C(n), f = C(a), d = R(() => {
2939
+ const i = T(!0), s = T(!1), c = T(null), l = T(null), g = T(r), h = T(n), f = T(a), d = R(() => {
2940
2940
  c.current !== null && (window.cancelAnimationFrame(c.current), c.current = null);
2941
2941
  }, []), m = R(() => {
2942
2942
  l.current !== null && (window.clearTimeout(l.current), l.current = null);
@@ -2955,16 +2955,16 @@ function Dl({
2955
2955
  }, [m, e, o]), b = R(
2956
2956
  (w) => {
2957
2957
  if (s.current) return;
2958
- const x = w.currentTarget, T = x.scrollHeight - x.scrollTop - x.clientHeight;
2959
- i.current = T <= o;
2958
+ const x = w.currentTarget, N = x.scrollHeight - x.scrollTop - x.clientHeight;
2959
+ i.current = N <= o;
2960
2960
  },
2961
2961
  [o]
2962
2962
  );
2963
2963
  return Ne(() => {
2964
2964
  const w = e.current;
2965
2965
  if (!w) return;
2966
- const x = g.current, T = f.current !== a, A = r > x, S = A && !T && h.current !== void 0 && h.current !== n;
2967
- if (T && (i.current = !0), S)
2966
+ const x = g.current, N = f.current !== a, A = r > x, S = A && !N && h.current !== void 0 && h.current !== n;
2967
+ if (N && (i.current = !0), S)
2968
2968
  d(), m(), s.current = !1;
2969
2969
  else if (i.current) {
2970
2970
  d(), m();
@@ -2989,19 +2989,19 @@ function Dl({
2989
2989
  ]), k(() => {
2990
2990
  const w = e.current, x = t.current;
2991
2991
  if (!w || !x) return;
2992
- let T = null;
2993
- return typeof ResizeObserver < "u" && (T = new ResizeObserver(() => {
2992
+ let N = null;
2993
+ return typeof ResizeObserver < "u" && (N = new ResizeObserver(() => {
2994
2994
  s.current || !i.current || c.current !== null || (c.current = window.requestAnimationFrame(() => {
2995
2995
  c.current = null, i.current && w.scrollTo({ top: w.scrollHeight, behavior: "auto" });
2996
2996
  }));
2997
- }), T.observe(x)), w.addEventListener("scrollend", v), w.addEventListener("wheel", y, {
2997
+ }), N.observe(x)), w.addEventListener("scrollend", v), w.addEventListener("wheel", y, {
2998
2998
  passive: !0
2999
2999
  }), w.addEventListener("touchstart", y, {
3000
3000
  passive: !0
3001
3001
  }), w.addEventListener("pointerdown", y, {
3002
3002
  passive: !0
3003
3003
  }), () => {
3004
- T?.disconnect(), w.removeEventListener("scrollend", v), w.removeEventListener("wheel", y), w.removeEventListener("touchstart", y), w.removeEventListener("pointerdown", y), d(), m(), s.current = !1;
3004
+ N?.disconnect(), w.removeEventListener("scrollend", v), w.removeEventListener("wheel", y), w.removeEventListener("touchstart", y), w.removeEventListener("pointerdown", y), d(), m(), s.current = !1;
3005
3005
  };
3006
3006
  }, [
3007
3007
  d,
@@ -3035,7 +3035,7 @@ function Ul({
3035
3035
  onPreviewAttachment: t,
3036
3036
  onDownloadAttachment: n
3037
3037
  }) {
3038
- return /* @__PURE__ */ N(
3038
+ return /* @__PURE__ */ C(
3039
3039
  "div",
3040
3040
  {
3041
3041
  "data-author": "customer",
@@ -3164,14 +3164,14 @@ function Wl() {
3164
3164
  role: "status",
3165
3165
  "aria-label": e("chat.loadingOlder"),
3166
3166
  className: "flex flex-col gap-2 px-2 py-3",
3167
- children: /* @__PURE__ */ u("div", { "aria-hidden": "true", className: "flex flex-col gap-2", children: jl.map((t) => /* @__PURE__ */ N(
3167
+ children: /* @__PURE__ */ u("div", { "aria-hidden": "true", className: "flex flex-col gap-2", children: jl.map((t) => /* @__PURE__ */ C(
3168
3168
  "div",
3169
3169
  {
3170
3170
  style: { "--chat-skeleton-delay": t },
3171
3171
  className: "chat-list-pagination-skeleton chat-message-skeleton-bubble flex h-14 items-center gap-3 rounded-2xl border border-white/[0.05] bg-white/[0.035] px-3",
3172
3172
  children: [
3173
3173
  /* @__PURE__ */ u("span", { className: "h-8 w-8 shrink-0 rounded-full bg-[#68d8ff]/[0.1]" }),
3174
- /* @__PURE__ */ N("span", { className: "flex flex-1 flex-col gap-2", children: [
3174
+ /* @__PURE__ */ C("span", { className: "flex flex-1 flex-col gap-2", children: [
3175
3175
  /* @__PURE__ */ u("span", { className: "h-2 w-[42%] rounded-full bg-white/[0.11]" }),
3176
3176
  /* @__PURE__ */ u("span", { className: "h-2 w-[76%] rounded-full bg-white/[0.07]" })
3177
3177
  ] })
@@ -3201,7 +3201,7 @@ function po({
3201
3201
  resetKey: a,
3202
3202
  rootMargin: o = "160px 0px"
3203
3203
  }) {
3204
- const i = C(null), s = C(!1), c = C(0), l = C(!0), [g, h] = I(null), f = R(async () => {
3204
+ const i = T(null), s = T(!1), c = T(0), l = T(!0), [g, h] = I(null), f = R(async () => {
3205
3205
  if (!t || n || s.current) return;
3206
3206
  const d = c.current;
3207
3207
  s.current = !0, h(null);
@@ -3255,7 +3255,7 @@ function Gl({
3255
3255
  isLoading: r,
3256
3256
  itemCount: a
3257
3257
  }) {
3258
- const o = C(null), i = C(null), [s, c] = I(0), l = R(() => {
3258
+ const o = T(null), i = T(null), [s, c] = I(0), l = R(() => {
3259
3259
  o.current = null, i.current?.(), i.current = null;
3260
3260
  }, []), g = R(() => {
3261
3261
  const h = e.current;
@@ -3321,10 +3321,10 @@ function Gl({
3321
3321
  );
3322
3322
  for (const S of b.slice(0, w + 1))
3323
3323
  y?.observe(S);
3324
- const x = () => l(), T = () => {
3324
+ const x = () => l(), N = () => {
3325
3325
  Math.abs(f.scrollTop - m) > 1 && l();
3326
3326
  };
3327
- f.addEventListener("scroll", T, {
3327
+ f.addEventListener("scroll", N, {
3328
3328
  passive: !0
3329
3329
  }), f.addEventListener("wheel", x, { passive: !0 }), f.addEventListener("touchstart", x, {
3330
3330
  passive: !0
@@ -3332,7 +3332,7 @@ function Gl({
3332
3332
  passive: !0
3333
3333
  });
3334
3334
  const A = () => {
3335
- y?.disconnect(), d !== null && window.cancelAnimationFrame(d), f.removeEventListener("scroll", T), f.removeEventListener("wheel", x), f.removeEventListener("touchstart", x), f.removeEventListener("pointerdown", x);
3335
+ y?.disconnect(), d !== null && window.cancelAnimationFrame(d), f.removeEventListener("scroll", N), f.removeEventListener("wheel", x), f.removeEventListener("touchstart", x), f.removeEventListener("pointerdown", x);
3336
3336
  };
3337
3337
  return i.current = A, () => {
3338
3338
  i.current === A && (i.current = null), A();
@@ -3369,7 +3369,7 @@ const Xr = 10, zn = 20 * 1024 * 1024, Jr = 50 * 1024 * 1024, vo = [
3369
3369
  ".csv",
3370
3370
  ".txt"
3371
3371
  ].join(",");
3372
- class Oe extends Error {
3372
+ class Pe extends Error {
3373
3373
  constructor(t, n) {
3374
3374
  super(t), this.code = t, this.status = n, this.name = "ChatAttachmentApiError";
3375
3375
  }
@@ -3397,7 +3397,7 @@ const ql = {
3397
3397
  }, Qt = (e) => e ? `?${new URLSearchParams({ conversationId: e }).toString()}` : "", Zl = (e) => {
3398
3398
  const t = new URL(e), n = t.hostname === "localhost" || t.hostname === "127.0.0.1" || t.hostname === "::1" || t.hostname.endsWith(".localhost");
3399
3399
  if (t.protocol !== "https:" && !(t.protocol === "http:" && n))
3400
- throw new Oe("CHAT_ATTACHMENT_UPLOAD_URL_UNSAFE");
3400
+ throw new Pe("CHAT_ATTACHMENT_UPLOAD_URL_UNSAFE");
3401
3401
  return t.href;
3402
3402
  }, Xl = async (e) => {
3403
3403
  try {
@@ -3443,7 +3443,7 @@ const ql = {
3443
3443
  }), s.addEventListener("load", () => {
3444
3444
  s.status >= 200 && s.status < 300 ? l(o) : l(
3445
3445
  () => i(
3446
- new Oe(
3446
+ new Pe(
3447
3447
  `CHAT_ATTACHMENT_STORAGE_HTTP_${s.status}`,
3448
3448
  s.status
3449
3449
  )
@@ -3452,7 +3452,7 @@ const ql = {
3452
3452
  }), s.addEventListener(
3453
3453
  "error",
3454
3454
  () => l(
3455
- () => i(new Oe("CHAT_ATTACHMENT_UPLOAD_FAILED"))
3455
+ () => i(new Pe("CHAT_ATTACHMENT_UPLOAD_FAILED"))
3456
3456
  )
3457
3457
  ), s.addEventListener(
3458
3458
  "abort",
@@ -3469,7 +3469,7 @@ const ql = {
3469
3469
  }
3470
3470
  });
3471
3471
  if (!v.ok)
3472
- throw v.status === 401 && t.onSessionExpired(), new Oe(
3472
+ throw v.status === 401 && t.onSessionExpired(), new Pe(
3473
3473
  await Xl(v),
3474
3474
  v.status
3475
3475
  );
@@ -3493,11 +3493,11 @@ const ql = {
3493
3493
  { signal: v }
3494
3494
  ), f = (d, m) => {
3495
3495
  if (d.state !== "READY" || !d.canAttach)
3496
- throw new Oe(
3496
+ throw new Pe(
3497
3497
  d.failureCode || `CHAT_ATTACHMENT_${d.state}`
3498
3498
  );
3499
3499
  if (d.id !== m.id || d.contentType !== m.contentType || d.sizeBytes !== m.sizeBytes)
3500
- throw new Oe("CHAT_ATTACHMENT_CONTRACT_MISMATCH");
3500
+ throw new Pe("CHAT_ATTACHMENT_CONTRACT_MISMATCH");
3501
3501
  return {
3502
3502
  id: d.id,
3503
3503
  fileName: d.displayFilename,
@@ -3516,15 +3516,15 @@ const ql = {
3516
3516
  }) {
3517
3517
  const w = d.name.normalize("NFC").trim();
3518
3518
  if (!go(w))
3519
- throw new Oe("CHAT_ATTACHMENT_FILENAME_INVALID");
3519
+ throw new Pe("CHAT_ATTACHMENT_FILENAME_INVALID");
3520
3520
  if (d.size < 1 || d.size > zn)
3521
- throw new Oe("CHAT_ATTACHMENT_SIZE_INVALID");
3521
+ throw new Pe("CHAT_ATTACHMENT_SIZE_INVALID");
3522
3522
  const x = Gn(d);
3523
3523
  if (!x)
3524
- throw new Oe(
3524
+ throw new Pe(
3525
3525
  "CHAT_ATTACHMENT_CONTENT_TYPE_UNSUPPORTED"
3526
3526
  );
3527
- let T;
3527
+ let N;
3528
3528
  try {
3529
3529
  Ot(v), b?.("preparing");
3530
3530
  const A = await o(d);
@@ -3543,7 +3543,7 @@ const ql = {
3543
3543
  signal: v
3544
3544
  }
3545
3545
  );
3546
- T = S.id, b?.("uploading"), await a({
3546
+ N = S.id, b?.("uploading"), await a({
3547
3547
  file: d,
3548
3548
  uploadUrl: Zl(S.uploadUrl),
3549
3549
  requiredHeaders: S.requiredHeaders,
@@ -3561,7 +3561,7 @@ const ql = {
3561
3561
  );
3562
3562
  for (let L = 0; _.state === "SCANNING"; L += 1) {
3563
3563
  if (L >= c)
3564
- throw new Oe("CHAT_ATTACHMENT_SCAN_TIMEOUT");
3564
+ throw new Pe("CHAT_ATTACHMENT_SCAN_TIMEOUT");
3565
3565
  await i(s, v), _ = await h(S.id, m, v);
3566
3566
  }
3567
3567
  return f(_, {
@@ -3570,7 +3570,7 @@ const ql = {
3570
3570
  sizeBytes: d.size
3571
3571
  });
3572
3572
  } catch (A) {
3573
- throw T && g({ attachmentId: T, conversationId: m }).catch(() => {
3573
+ throw N && g({ attachmentId: N, conversationId: m }).catch(() => {
3574
3574
  }), A;
3575
3575
  }
3576
3576
  },
@@ -3590,11 +3590,11 @@ function nu({
3590
3590
  transport: n,
3591
3591
  onClose: r
3592
3592
  }) {
3593
- const { t: a } = ye(), o = e ? lo(e) : null, [i, s] = I(void 0), [c, l] = I(!1), [g, h] = I(!1), [f, d] = I(!1), m = C(0), v = C(void 0), y = C(void 0), b = R(() => {
3593
+ const { t: a } = ye(), o = e ? lo(e) : null, [i, s] = I(void 0), [c, l] = I(!1), [g, h] = I(!1), [f, d] = I(!1), m = T(0), v = T(void 0), y = T(void 0), b = R(() => {
3594
3594
  v.current && URL.revokeObjectURL(v.current), v.current = void 0, s(void 0);
3595
3595
  }, []), w = R(async () => {
3596
3596
  if (!e || !o) return;
3597
- const T = ++m.current;
3597
+ const N = ++m.current;
3598
3598
  y.current?.abort();
3599
3599
  const A = new AbortController();
3600
3600
  y.current = A, b(), l(!1), h(!1), d(!0);
@@ -3608,15 +3608,15 @@ function nu({
3608
3608
  e,
3609
3609
  A.signal
3610
3610
  );
3611
- if (T !== m.current) {
3611
+ if (N !== m.current) {
3612
3612
  URL.revokeObjectURL(_);
3613
3613
  return;
3614
3614
  }
3615
3615
  v.current = _, s(_);
3616
3616
  } catch {
3617
- T === m.current && l(!0);
3617
+ N === m.current && l(!0);
3618
3618
  } finally {
3619
- T === m.current && (d(!1), y.current === A && (y.current = void 0));
3619
+ N === m.current && (d(!1), y.current === A && (y.current = void 0));
3620
3620
  }
3621
3621
  }, [e, t, o, b, n]);
3622
3622
  k(() => {
@@ -3635,10 +3635,10 @@ function nu({
3635
3635
  );
3636
3636
  const x = ce(() => {
3637
3637
  if (!e) return "";
3638
- const T = e.size / (1024 * 1024), A = T >= 0.1 ? `${T.toFixed(1)} MB` : `${Math.max(1, Math.round(e.size / 1024))} KB`;
3638
+ const N = e.size / (1024 * 1024), A = N >= 0.1 ? `${N.toFixed(1)} MB` : `${Math.max(1, Math.round(e.size / 1024))} KB`;
3639
3639
  return `${e.mediaType} · ${A}`;
3640
3640
  }, [e]);
3641
- return /* @__PURE__ */ u(Xe, { show: !!e, children: /* @__PURE__ */ N(
3641
+ return /* @__PURE__ */ u(Xe, { show: !!e, children: /* @__PURE__ */ C(
3642
3642
  Rc,
3643
3643
  {
3644
3644
  open: !!e,
@@ -3666,14 +3666,14 @@ function nu({
3666
3666
  leave: "duration-150 ease-in",
3667
3667
  leaveFrom: "translate-y-0 scale-100 opacity-100",
3668
3668
  leaveTo: "translate-y-2 scale-[0.98] opacity-0",
3669
- children: /* @__PURE__ */ N(Ja, { className: "flex max-h-[min(82vh,760px)] w-[min(92vw,920px)] flex-col overflow-hidden rounded-2xl border border-white/14 bg-[#0c1119]/96 text-white shadow-[0_30px_90px_rgba(0,0,0,.58),0_0_0_1px_rgba(104,216,255,.05)]", children: [
3670
- /* @__PURE__ */ N("header", { className: "flex min-h-14 items-center gap-3 border-b border-white/10 px-4 py-3", children: [
3669
+ children: /* @__PURE__ */ C(Ja, { className: "flex max-h-[min(82vh,760px)] w-[min(92vw,920px)] flex-col overflow-hidden rounded-2xl border border-white/14 bg-[#0c1119]/96 text-white shadow-[0_30px_90px_rgba(0,0,0,.58),0_0_0_1px_rgba(104,216,255,.05)]", children: [
3670
+ /* @__PURE__ */ C("header", { className: "flex min-h-14 items-center gap-3 border-b border-white/10 px-4 py-3", children: [
3671
3671
  /* @__PURE__ */ u("div", { className: "flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-[#68d8ff]/24 bg-[#68d8ff]/10 text-[#68d8ff]", children: /* @__PURE__ */ u(lr, { "aria-hidden": "true", className: "h-4.5 w-4.5" }) }),
3672
- /* @__PURE__ */ N("div", { className: "min-w-0 flex-1", children: [
3672
+ /* @__PURE__ */ C("div", { className: "min-w-0 flex-1", children: [
3673
3673
  /* @__PURE__ */ u(Qa, { className: "truncate text-sm font-semibold", children: e?.fileName ?? "" }),
3674
3674
  /* @__PURE__ */ u("p", { className: "truncate text-[11px] text-white/50", children: x })
3675
3675
  ] }),
3676
- e && /* @__PURE__ */ N(
3676
+ e && /* @__PURE__ */ C(
3677
3677
  ee,
3678
3678
  {
3679
3679
  type: "button",
@@ -3711,7 +3711,7 @@ function nu({
3711
3711
  children: a("attachment.downloadFailed")
3712
3712
  }
3713
3713
  ),
3714
- /* @__PURE__ */ u("div", { className: "relative flex min-h-64 flex-1 items-center justify-center overflow-auto bg-[radial-gradient(circle_at_50%_20%,rgba(104,216,255,.08),transparent_46%),#080c12] p-3 sm:p-5", children: f ? /* @__PURE__ */ N(
3714
+ /* @__PURE__ */ u("div", { className: "relative flex min-h-64 flex-1 items-center justify-center overflow-auto bg-[radial-gradient(circle_at_50%_20%,rgba(104,216,255,.08),transparent_46%),#080c12] p-3 sm:p-5", children: f ? /* @__PURE__ */ C(
3715
3715
  "div",
3716
3716
  {
3717
3717
  role: "status",
@@ -3721,7 +3721,7 @@ function nu({
3721
3721
  a("attachment.loadingPreview")
3722
3722
  ]
3723
3723
  }
3724
- ) : c ? /* @__PURE__ */ N("div", { className: "max-w-sm text-center", children: [
3724
+ ) : c ? /* @__PURE__ */ C("div", { className: "max-w-sm text-center", children: [
3725
3725
  /* @__PURE__ */ u(
3726
3726
  "p",
3727
3727
  {
@@ -3799,7 +3799,7 @@ function su({
3799
3799
  onPreviewAttachment: r,
3800
3800
  onDownloadAttachment: a
3801
3801
  }) {
3802
- const o = C(!1), i = C(!0);
3802
+ const o = T(!1), i = T(!0);
3803
3803
  Ne(() => {
3804
3804
  i.current = t || n, t || (o.current = !0);
3805
3805
  }, [t, n]);
@@ -3850,7 +3850,7 @@ function iu() {
3850
3850
  c(o, i).catch((p) => {
3851
3851
  console.error("voice init error", p);
3852
3852
  }), s(Te.voice);
3853
- }, [i, o, s, c]), [v, y] = I(!1), [b, w] = I(), [x, T] = I(null), [A, S] = I(() => /* @__PURE__ */ new Map()), _ = C(A), L = A.get(l) ?? Qr, F = R(
3853
+ }, [i, o, s, c]), [v, y] = I(!1), [b, w] = I(), [x, N] = I(null), [A, S] = I(() => /* @__PURE__ */ new Map()), _ = T(A), L = A.get(l) ?? Qr, F = R(
3854
3854
  (p, E) => {
3855
3855
  S((j) => {
3856
3856
  const O = j.get(p) ?? Qr, K = typeof E == "function" ? E(O) : E, P = new Map(j);
@@ -3861,16 +3861,16 @@ function iu() {
3861
3861
  ), q = R(
3862
3862
  (p) => F(l, p),
3863
3863
  [l, F]
3864
- ), M = C(null), U = C(null), V = C(null), D = C(null), J = C(null), we = C(/* @__PURE__ */ new Set()), Y = C(/* @__PURE__ */ new Map()), ue = C(/* @__PURE__ */ new Map()), pe = C(/* @__PURE__ */ new Set()), ve = C(/* @__PURE__ */ new Set()), Q = C(/* @__PURE__ */ new Set()), fe = C(0), {
3864
+ ), M = T(null), U = T(null), V = T(null), D = T(null), J = T(null), we = T(/* @__PURE__ */ new Set()), Y = T(/* @__PURE__ */ new Map()), ue = T(/* @__PURE__ */ new Map()), pe = T(/* @__PURE__ */ new Set()), ve = T(/* @__PURE__ */ new Set()), Q = T(/* @__PURE__ */ new Set()), fe = T(0), {
3865
3865
  cancelThreadMessagesRequest: G,
3866
3866
  clearSendError: Z,
3867
3867
  fetchOlderThreadMessages: ge,
3868
3868
  sendMessage: X,
3869
3869
  setLatestReadMessageDate: se
3870
- } = Jn(), ie = ua(), te = da(), Ee = Yo(), $ = ca(), Ke = Zo(), de = Xo(), he = Jo(), De = Qo(), qe = es("ASSISTANT"), ft = fa(), H = er(), oe = ha(
3870
+ } = Jn(), ie = ua(), te = da(), Ee = Yo(), $ = ca(), Ke = Zo(), de = Xo(), he = Jo(), He = Qo(), qe = es("ASSISTANT"), ft = fa(), H = er(), oe = ha(
3871
3871
  H,
3872
3872
  ft
3873
- ), [He, me] = I(
3873
+ ), [Re, me] = I(
3874
3874
  () => !oe
3875
3875
  ), [bo, dr] = I(
3876
3876
  () => !oe
@@ -3878,8 +3878,8 @@ function iu() {
3878
3878
  networkStatus: xt,
3879
3879
  networkStatusChangedAt: Et,
3880
3880
  anycableService: vn,
3881
- endUserTypingClient: Re
3882
- } = Zn(), Fe = o.attachments?.enabled !== !1 && H.contractState === "CURRENT" && H.humanSupport === "ASSIGNED", at = !!f.trim() ? "send" : oe ? null : "voice";
3881
+ endUserTypingClient: Fe
3882
+ } = Zn(), Ie = o.attachments?.enabled !== !1 && H.contractState === "CURRENT" && H.humanSupport === "ASSIGNED", at = !!f.trim() ? "send" : oe ? null : "voice";
3883
3883
  Ne(() => {
3884
3884
  if (oe) {
3885
3885
  dr(!1);
@@ -3910,12 +3910,12 @@ function iu() {
3910
3910
  ), fr = L.reduce(
3911
3911
  (p, E) => p + E.file.size,
3912
3912
  0
3913
- ), zt = Fe && !$ && L.length < ht && fr < Ct, Ue = ce(
3913
+ ), zt = Ie && !$ && L.length < ht && fr < Ct, Ue = ce(
3914
3914
  () => o.attachments?.transport ?? tu(o, i),
3915
3915
  [i, o]
3916
- ), hr = C(Ue);
3916
+ ), hr = T(Ue);
3917
3917
  hr.current = Ue;
3918
- const mt = C(!0), mr = !ft && (!!qe?.active || Ee), pr = ce(() => {
3918
+ const mt = T(!0), mr = !ft && (!!qe?.active || Ee), pr = ce(() => {
3919
3919
  const p = Ce.map((E) => ({
3920
3920
  type: "canonical",
3921
3921
  message: E
@@ -3943,7 +3943,7 @@ function iu() {
3943
3943
  containerRef: D,
3944
3944
  contentRef: J,
3945
3945
  firstMessageId: Ce[0]?.id,
3946
- messageCount: Ce.length + +!!rt + Number(mr) + +!!r,
3946
+ messageCount: Ce.length + +!!rt + Number(mr) + +!!r + Number(Re),
3947
3947
  threadId: l
3948
3948
  }), { captureAnchor: vr, clearAnchor: gr } = Gl({
3949
3949
  containerRef: D,
@@ -3988,16 +3988,16 @@ function iu() {
3988
3988
  p.forEach((W) => W.abort()), E.forEach((W) => URL.revokeObjectURL(W)), p.clear(), E.clear(), j.clear();
3989
3989
  };
3990
3990
  }, []), k(
3991
- () => () => Re?.stop(),
3992
- [l, Re]
3991
+ () => () => Fe?.stop(),
3992
+ [l, Fe]
3993
3993
  ), k(() => {
3994
3994
  const p = () => {
3995
- document.visibilityState === "hidden" && Re?.stop();
3995
+ document.visibilityState === "hidden" && Fe?.stop();
3996
3996
  };
3997
3997
  return document.addEventListener("visibilitychange", p), () => document.removeEventListener("visibilitychange", p);
3998
- }, [Re]), k(() => {
3999
- xt !== vt.Available && Re?.stop();
4000
- }, [Re, xt]), k(
3998
+ }, [Fe]), k(() => {
3999
+ xt !== vt.Available && Fe?.stop();
4000
+ }, [Fe, xt]), k(
4001
4001
  () => () => {
4002
4002
  l && G(l);
4003
4003
  },
@@ -4032,7 +4032,7 @@ function iu() {
4032
4032
  const Gt = Ce.findLast(
4033
4033
  (p) => p.author.type === _e.Agent && p.author.role === "ASSISTANT"
4034
4034
  );
4035
- if (!De && Gt?.status === st.Failed) {
4035
+ if (!He && Gt?.status === st.Failed) {
4036
4036
  const p = Date.parse(Gt.updatedAt);
4037
4037
  Number.isFinite(p) && Tt.push({
4038
4038
  key: `assistant:${Gt.id}:${Gt.updatedAt}`,
@@ -4102,7 +4102,7 @@ function iu() {
4102
4102
  },
4103
4103
  [Ue, F]
4104
4104
  ), xr = (p) => {
4105
- if ($ || !Fe || !p) return;
4105
+ if ($ || !Ie || !p) return;
4106
4106
  const E = [];
4107
4107
  let j = fr, O;
4108
4108
  for (const P of Array.from(p)) {
@@ -4215,7 +4215,7 @@ function iu() {
4215
4215
  }, So = (p) => {
4216
4216
  !Kt(p) && !v || (p.preventDefault(), fe.current = Math.max(0, fe.current - 1), fe.current === 0 && y(!1));
4217
4217
  }, Mo = (p) => {
4218
- !Kt(p) && !v || (p.preventDefault(), fe.current = 0, y(!1), !($ || !Fe) && (zt ? xr(p.dataTransfer.files) : L.length >= ht ? w(t("attachment.tooMany", { count: ht })) : w(
4218
+ !Kt(p) && !v || (p.preventDefault(), fe.current = 0, y(!1), !($ || !Ie) && (zt ? xr(p.dataTransfer.files) : L.length >= ht ? w(t("attachment.tooMany", { count: ht })) : w(
4219
4219
  t("attachment.totalTooLarge", {
4220
4220
  size: Math.round(Ct / (1024 * 1024))
4221
4221
  })
@@ -4224,9 +4224,9 @@ function iu() {
4224
4224
  const p = l, E = f.trim(), j = L.flatMap(
4225
4225
  ({ attachment: ne, state: z }) => z === "ready" && ne ? [ne] : []
4226
4226
  );
4227
- if ($ || !E || De || !Fe && L.length > 0 || L.some(({ state: ne }) => ne !== "ready"))
4227
+ if ($ || !E || He || !Ie && L.length > 0 || L.some(({ state: ne }) => ne !== "ready"))
4228
4228
  return;
4229
- Re?.stop(), V.current !== null && (window.clearTimeout(V.current), V.current = null), d(""), M.current && (M.current.style.height = "auto");
4229
+ Fe?.stop(), V.current !== null && (window.clearTimeout(V.current), V.current = null), d(""), M.current && (M.current.style.height = "auto");
4230
4230
  const O = L.map(({ id: ne }) => ne), K = new Set(O);
4231
4231
  O.forEach(
4232
4232
  (ne) => ve.current.add(ne)
@@ -4268,7 +4268,7 @@ function iu() {
4268
4268
  );
4269
4269
  }).catch(P);
4270
4270
  }, $o = R(
4271
- (p, E) => T({ attachment: p, conversationId: E }),
4271
+ (p, E) => N({ attachment: p, conversationId: E }),
4272
4272
  []
4273
4273
  ), _o = R(
4274
4274
  (p, E) => {
@@ -4280,7 +4280,7 @@ function iu() {
4280
4280
  },
4281
4281
  [Ue, t]
4282
4282
  );
4283
- return /* @__PURE__ */ N(
4283
+ return /* @__PURE__ */ C(
4284
4284
  "div",
4285
4285
  {
4286
4286
  "aria-busy": $,
@@ -4318,7 +4318,7 @@ function iu() {
4318
4318
  {
4319
4319
  role: "alert",
4320
4320
  className: "pointer-events-none absolute top-2 right-0 left-0 z-20 flex justify-center px-4",
4321
- children: /* @__PURE__ */ N(
4321
+ children: /* @__PURE__ */ C(
4322
4322
  ee,
4323
4323
  {
4324
4324
  type: "button",
@@ -4337,7 +4337,7 @@ function iu() {
4337
4337
  )
4338
4338
  }
4339
4339
  ),
4340
- Fe && v && /* @__PURE__ */ u("div", { className: "chat-attachment-dropzone", "aria-hidden": "true", children: /* @__PURE__ */ N("div", { className: "chat-attachment-dropzone__content", children: [
4340
+ Ie && v && /* @__PURE__ */ u("div", { className: "chat-attachment-dropzone", "aria-hidden": "true", children: /* @__PURE__ */ C("div", { className: "chat-attachment-dropzone__content", children: [
4341
4341
  /* @__PURE__ */ u(Gr, { className: "h-5 w-5" }),
4342
4342
  /* @__PURE__ */ u("span", { children: t("attachment.dropFiles") }),
4343
4343
  /* @__PURE__ */ u("small", { children: t("attachment.limits", {
@@ -4346,111 +4346,114 @@ function iu() {
4346
4346
  total: Math.round(Ct / (1024 * 1024))
4347
4347
  }) })
4348
4348
  ] }) }),
4349
- /* @__PURE__ */ u(
4349
+ /* @__PURE__ */ C(
4350
4350
  "div",
4351
4351
  {
4352
4352
  ref: D,
4353
4353
  onScroll: yo,
4354
- "data-message-veil": He ? bo ? "on" : "revealing" : "off",
4354
+ "data-message-veil": Re ? bo ? "on" : "revealing" : "off",
4355
4355
  className: "chat-message-viewport chat-scrollbar flex h-0 min-h-0 flex-1 flex-col overflow-y-auto px-1 [overflow-anchor:none]",
4356
- children: /* @__PURE__ */ N(
4357
- "div",
4358
- {
4359
- ref: J,
4360
- "aria-busy": wn || he,
4361
- className: "chat-timeline relative z-1 flex min-h-full shrink-0 flex-col justify-end gap-2 pt-3 pb-3",
4362
- children: [
4363
- (de || he) && /* @__PURE__ */ N("div", { className: "relative flex h-7 shrink-0 items-center justify-center", children: [
4364
- /* @__PURE__ */ u(
4365
- "div",
4356
+ children: [
4357
+ /* @__PURE__ */ u("div", { className: "chat-message-veil-spacer", "aria-hidden": "true" }),
4358
+ /* @__PURE__ */ C(
4359
+ "div",
4360
+ {
4361
+ ref: J,
4362
+ "aria-busy": wn || he,
4363
+ className: "chat-timeline relative z-1 flex min-h-full shrink-0 flex-col justify-end gap-2 pt-3 pb-3",
4364
+ children: [
4365
+ (de || he) && /* @__PURE__ */ C("div", { className: "relative flex h-7 shrink-0 items-center justify-center", children: [
4366
+ /* @__PURE__ */ u(
4367
+ "div",
4368
+ {
4369
+ ref: Eo,
4370
+ "aria-hidden": "true",
4371
+ className: "absolute top-0 h-px w-full"
4372
+ }
4373
+ ),
4374
+ !he && !wr && /* @__PURE__ */ u(
4375
+ ee,
4376
+ {
4377
+ type: "button",
4378
+ "aria-label": t("chat.loadPreviousMessages"),
4379
+ onClick: () => {
4380
+ br();
4381
+ },
4382
+ className: "rounded-full border border-white/10 bg-black/20 px-3 py-1 text-[11px] text-white/65 transition-colors hover:border-[#68d8ff]/30 hover:text-white/90",
4383
+ children: t("chat.loadPreviousMessages")
4384
+ }
4385
+ )
4386
+ ] }),
4387
+ /* @__PURE__ */ C("div", { className: "relative w-full", children: [
4388
+ /* @__PURE__ */ u(
4389
+ Xe,
4390
+ {
4391
+ show: wn,
4392
+ enter: "transition-[opacity,transform] duration-[220ms] ease-out motion-reduce:transition-none",
4393
+ enterFrom: "translate-y-1.5 opacity-0 motion-reduce:translate-y-0",
4394
+ enterTo: "translate-y-0 opacity-100",
4395
+ leave: "transition-[opacity,transform] duration-[180ms] ease-in motion-reduce:transition-none",
4396
+ leaveFrom: "translate-y-0 opacity-100",
4397
+ leaveTo: "-translate-y-1 opacity-0 motion-reduce:translate-y-0",
4398
+ children: /* @__PURE__ */ u("div", { className: "pointer-events-none absolute right-0 bottom-0 left-0", children: /* @__PURE__ */ u(Bl, {}) })
4399
+ }
4400
+ ),
4401
+ /* @__PURE__ */ u(
4402
+ Xe,
4403
+ {
4404
+ show: !wn,
4405
+ enter: "transition-[opacity,transform] delay-75 duration-[220ms] ease-out motion-reduce:transition-none motion-reduce:delay-0",
4406
+ enterFrom: "translate-y-2 opacity-0 motion-reduce:translate-y-0",
4407
+ enterTo: "translate-y-0 opacity-100",
4408
+ leave: "transition-opacity duration-100 ease-out motion-reduce:transition-none",
4409
+ leaveFrom: "opacity-100",
4410
+ leaveTo: "opacity-0",
4411
+ children: /* @__PURE__ */ u("div", { className: "flex w-full flex-col gap-2", children: /* @__PURE__ */ u(
4412
+ su,
4413
+ {
4414
+ timeline: pr,
4415
+ isInitialHistoryLoading: Ke,
4416
+ isOlderHistoryLoading: he,
4417
+ onPreviewAttachment: $o,
4418
+ onDownloadAttachment: _o
4419
+ },
4420
+ l ?? "new-conversation"
4421
+ ) })
4422
+ }
4423
+ )
4424
+ ] }),
4425
+ mr && /* @__PURE__ */ u(
4426
+ Hl,
4366
4427
  {
4367
- ref: Eo,
4368
- "aria-hidden": "true",
4369
- className: "absolute top-0 h-px w-full"
4428
+ label: qe?.active ? "Lola is typing" : void 0
4370
4429
  }
4371
4430
  ),
4372
- !he && !wr && /* @__PURE__ */ u(
4373
- ee,
4374
- {
4375
- type: "button",
4376
- "aria-label": t("chat.loadPreviousMessages"),
4377
- onClick: () => {
4378
- br();
4379
- },
4380
- className: "rounded-full border border-white/10 bg-black/20 px-3 py-1 text-[11px] text-white/65 transition-colors hover:border-[#68d8ff]/30 hover:text-white/90",
4381
- children: t("chat.loadPreviousMessages")
4382
- }
4383
- )
4384
- ] }),
4385
- /* @__PURE__ */ N("div", { className: "relative w-full", children: [
4386
4431
  /* @__PURE__ */ u(
4387
4432
  Xe,
4388
4433
  {
4389
- show: wn,
4390
- enter: "transition-[opacity,transform] duration-[220ms] ease-out motion-reduce:transition-none",
4434
+ show: yn.visible,
4435
+ enter: "transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-opacity motion-reduce:duration-100",
4391
4436
  enterFrom: "translate-y-1.5 opacity-0 motion-reduce:translate-y-0",
4392
4437
  enterTo: "translate-y-0 opacity-100",
4393
- leave: "transition-[opacity,transform] duration-[180ms] ease-in motion-reduce:transition-none",
4438
+ leave: "transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-opacity motion-reduce:duration-100",
4394
4439
  leaveFrom: "translate-y-0 opacity-100",
4395
- leaveTo: "-translate-y-1 opacity-0 motion-reduce:translate-y-0",
4396
- children: /* @__PURE__ */ u("div", { className: "pointer-events-none absolute right-0 bottom-0 left-0", children: /* @__PURE__ */ u(Bl, {}) })
4397
- }
4398
- ),
4399
- /* @__PURE__ */ u(
4400
- Xe,
4401
- {
4402
- show: !wn,
4403
- enter: "transition-[opacity,transform] delay-75 duration-[220ms] ease-out motion-reduce:transition-none motion-reduce:delay-0",
4404
- enterFrom: "translate-y-2 opacity-0 motion-reduce:translate-y-0",
4405
- enterTo: "translate-y-0 opacity-100",
4406
- leave: "transition-opacity duration-100 ease-out motion-reduce:transition-none",
4407
- leaveFrom: "opacity-100",
4408
- leaveTo: "opacity-0",
4409
- children: /* @__PURE__ */ u("div", { className: "flex w-full flex-col gap-2", children: /* @__PURE__ */ u(
4410
- su,
4440
+ leaveTo: "translate-y-1 opacity-0 motion-reduce:translate-y-0",
4441
+ children: /* @__PURE__ */ u(
4442
+ eo,
4411
4443
  {
4412
- timeline: pr,
4413
- isInitialHistoryLoading: Ke,
4414
- isOlderHistoryLoading: he,
4415
- onPreviewAttachment: $o,
4416
- onDownloadAttachment: _o
4417
- },
4418
- l ?? "new-conversation"
4419
- ) })
4420
- }
4444
+ role: "status",
4445
+ "aria-live": "polite",
4446
+ message: yn.notice?.message ?? "",
4447
+ className: "mt-2"
4448
+ }
4449
+ )
4450
+ },
4451
+ yn.notice?.key ?? "no-chat-error"
4421
4452
  )
4422
- ] }),
4423
- mr && /* @__PURE__ */ u(
4424
- Hl,
4425
- {
4426
- label: qe?.active ? "Lola is typing" : void 0
4427
- }
4428
- ),
4429
- /* @__PURE__ */ u(
4430
- Xe,
4431
- {
4432
- show: yn.visible,
4433
- enter: "transition-[opacity,transform] duration-200 ease-out motion-reduce:transition-opacity motion-reduce:duration-100",
4434
- enterFrom: "translate-y-1.5 opacity-0 motion-reduce:translate-y-0",
4435
- enterTo: "translate-y-0 opacity-100",
4436
- leave: "transition-[opacity,transform] duration-150 ease-out motion-reduce:transition-opacity motion-reduce:duration-100",
4437
- leaveFrom: "translate-y-0 opacity-100",
4438
- leaveTo: "translate-y-1 opacity-0 motion-reduce:translate-y-0",
4439
- children: /* @__PURE__ */ u(
4440
- eo,
4441
- {
4442
- role: "status",
4443
- "aria-live": "polite",
4444
- message: yn.notice?.message ?? "",
4445
- className: "mt-2"
4446
- }
4447
- )
4448
- },
4449
- yn.notice?.key ?? "no-chat-error"
4450
- )
4451
- ]
4452
- }
4453
- )
4453
+ ]
4454
+ }
4455
+ )
4456
+ ]
4454
4457
  }
4455
4458
  ),
4456
4459
  L.length > 0 && /* @__PURE__ */ u(
@@ -4459,33 +4462,33 @@ function iu() {
4459
4462
  className: "chat-composer-attachments",
4460
4463
  "aria-label": t("attachment.filesToSend"),
4461
4464
  "aria-live": "polite",
4462
- children: L.map((p) => /* @__PURE__ */ N("div", { className: "chat-composer-attachment", children: [
4465
+ children: L.map((p) => /* @__PURE__ */ C("div", { className: "chat-composer-attachment", children: [
4463
4466
  /* @__PURE__ */ u("div", { className: "chat-composer-attachment__preview", children: p.localPreviewUrl ? /* @__PURE__ */ u("img", { src: p.localPreviewUrl, alt: "" }) : /* @__PURE__ */ u(lr, { "aria-hidden": "true", className: "h-4 w-4" }) }),
4464
- /* @__PURE__ */ N("div", { className: "min-w-0 flex-1", children: [
4467
+ /* @__PURE__ */ C("div", { className: "min-w-0 flex-1", children: [
4465
4468
  /* @__PURE__ */ u("p", { className: "truncate text-[11px] font-semibold text-white/88", children: p.file.name }),
4466
- /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1.5 text-[10px]", children: p.state === "preparing" ? /* @__PURE__ */ N($e, { children: [
4469
+ /* @__PURE__ */ u("div", { className: "mt-0.5 flex items-center gap-1.5 text-[10px]", children: p.state === "preparing" ? /* @__PURE__ */ C($e, { children: [
4467
4470
  /* @__PURE__ */ u(tn, { className: "h-3 w-3 animate-spin text-[#68d8ff]" }),
4468
4471
  /* @__PURE__ */ u("span", { className: "text-white/52", children: t("attachment.preparing") })
4469
- ] }) : p.state === "uploading" ? /* @__PURE__ */ N($e, { children: [
4472
+ ] }) : p.state === "uploading" ? /* @__PURE__ */ C($e, { children: [
4470
4473
  /* @__PURE__ */ u("span", { className: "text-[#a9eaff]", children: t("attachment.uploading") }),
4471
- /* @__PURE__ */ N("span", { className: "text-white/44 tabular-nums", children: [
4474
+ /* @__PURE__ */ C("span", { className: "text-white/44 tabular-nums", children: [
4472
4475
  Math.round(p.progress * 100),
4473
4476
  "%"
4474
4477
  ] })
4475
- ] }) : p.state === "scanning" ? /* @__PURE__ */ N($e, { children: [
4478
+ ] }) : p.state === "scanning" ? /* @__PURE__ */ C($e, { children: [
4476
4479
  /* @__PURE__ */ u(qr, { className: "h-3 w-3 animate-pulse text-amber-200" }),
4477
4480
  /* @__PURE__ */ u("span", { className: "text-amber-100/74", children: t("attachment.scanning") })
4478
- ] }) : p.state === "ready" ? /* @__PURE__ */ N($e, { children: [
4481
+ ] }) : p.state === "ready" ? /* @__PURE__ */ C($e, { children: [
4479
4482
  /* @__PURE__ */ u(il, { className: "h-3 w-3 text-[#8df0c8]" }),
4480
4483
  /* @__PURE__ */ u("span", { className: "text-[#a6ebce]", children: t("attachment.ready") }),
4481
4484
  /* @__PURE__ */ u("span", { className: "text-white/38", children: co(p.file.size) })
4482
- ] }) : p.state === "removing" ? /* @__PURE__ */ N($e, { children: [
4485
+ ] }) : p.state === "removing" ? /* @__PURE__ */ C($e, { children: [
4483
4486
  /* @__PURE__ */ u(tn, { className: "h-3 w-3 animate-spin text-[#68d8ff]" }),
4484
4487
  /* @__PURE__ */ u("span", { className: "text-[#a9eaff]", children: t("attachment.removing") })
4485
- ] }) : p.state === "sending" ? /* @__PURE__ */ N($e, { children: [
4488
+ ] }) : p.state === "sending" ? /* @__PURE__ */ C($e, { children: [
4486
4489
  /* @__PURE__ */ u(qr, { className: "h-3 w-3 animate-pulse text-[#8df0c8]" }),
4487
4490
  /* @__PURE__ */ u("span", { className: "text-[#a6ebce]", children: t("attachment.sending") })
4488
- ] }) : /* @__PURE__ */ N($e, { children: [
4491
+ ] }) : /* @__PURE__ */ C($e, { children: [
4489
4492
  /* @__PURE__ */ u(ml, { className: "h-3 w-3 text-red-200" }),
4490
4493
  /* @__PURE__ */ u("span", { className: "text-red-100/80", children: t("attachment.uploadFailed") })
4491
4494
  ] }) }),
@@ -4497,7 +4500,7 @@ function iu() {
4497
4500
  }
4498
4501
  ) })
4499
4502
  ] }),
4500
- p.state === "failed" && Fe && /* @__PURE__ */ u(
4503
+ p.state === "failed" && Ie && /* @__PURE__ */ u(
4501
4504
  ee,
4502
4505
  {
4503
4506
  type: "button",
@@ -4540,8 +4543,8 @@ function iu() {
4540
4543
  children: b
4541
4544
  }
4542
4545
  ),
4543
- Fe && L.some(({ state: p }) => p === "ready") && !f.trim() && /* @__PURE__ */ u("p", { className: "px-2 pb-1 text-[10px] leading-4 text-white/48", children: t("attachment.messageRequired") }),
4544
- !Fe && L.length > 0 && /* @__PURE__ */ u(
4546
+ Ie && L.some(({ state: p }) => p === "ready") && !f.trim() && /* @__PURE__ */ u("p", { className: "px-2 pb-1 text-[10px] leading-4 text-white/48", children: t("attachment.messageRequired") }),
4547
+ !Ie && L.length > 0 && /* @__PURE__ */ u(
4545
4548
  "p",
4546
4549
  {
4547
4550
  role: "status",
@@ -4549,7 +4552,7 @@ function iu() {
4549
4552
  children: t("attachment.disabled")
4550
4553
  }
4551
4554
  ),
4552
- /* @__PURE__ */ N("div", { className: "chat-composer flex shrink-0 flex-row items-end", children: [
4555
+ /* @__PURE__ */ C("div", { className: "chat-composer flex shrink-0 flex-row items-end", children: [
4553
4556
  /* @__PURE__ */ u("div", { className: "chat-composer__input flex min-w-0 flex-1 items-end", children: /* @__PURE__ */ u(
4554
4557
  Oc,
4555
4558
  {
@@ -4560,10 +4563,10 @@ function iu() {
4560
4563
  "aria-label": t("chat.messageLabel"),
4561
4564
  "data-chat-route-focus": !0,
4562
4565
  placeholder: t("chat.messagePlaceholder"),
4563
- onBlur: () => Re?.stop(),
4566
+ onBlur: () => Fe?.stop(),
4564
4567
  onChange: (p) => {
4565
4568
  const E = p.target.value;
4566
- d(E), l && E.trim() ? Re?.markActivity(l) : Re?.stop();
4569
+ d(E), l && E.trim() ? Fe?.markActivity(l) : Fe?.stop();
4567
4570
  },
4568
4571
  onInput: (p) => {
4569
4572
  const E = p.currentTarget;
@@ -4581,8 +4584,8 @@ function iu() {
4581
4584
  className: "no-scrollbar block h-[38px] min-h-[38px] w-full resize-none overflow-y-auto border-none bg-transparent px-4 py-[9px] text-[16px] leading-5 font-normal text-white outline-none placeholder:text-[14px] placeholder:text-[#858585]"
4582
4585
  }
4583
4586
  ) }),
4584
- /* @__PURE__ */ N("div", { className: "chat-composer__actions flex shrink-0 items-center", children: [
4585
- Fe && /* @__PURE__ */ N($e, { children: [
4587
+ /* @__PURE__ */ C("div", { className: "chat-composer__actions flex shrink-0 items-center", children: [
4588
+ Ie && /* @__PURE__ */ C($e, { children: [
4586
4589
  /* @__PURE__ */ u(
4587
4590
  "input",
4588
4591
  {
@@ -4608,13 +4611,13 @@ function iu() {
4608
4611
  }
4609
4612
  )
4610
4613
  ] }),
4611
- at && /* @__PURE__ */ N(
4614
+ at && /* @__PURE__ */ C(
4612
4615
  ee,
4613
4616
  {
4614
4617
  type: "button",
4615
4618
  "aria-label": t(at === "send" ? "chat.send" : "chat.switchToVoice"),
4616
4619
  "data-mode": at,
4617
- disabled: $ || at === "send" && (De || !Fe && L.length > 0 || L.some(({ state: p }) => p !== "ready")),
4620
+ disabled: $ || at === "send" && (He || !Ie && L.length > 0 || L.some(({ state: p }) => p !== "ready")),
4618
4621
  className: "chat-composer-action chat-composer-primary-action",
4619
4622
  onClick: () => {
4620
4623
  at === "send" ? Cr() : m();
@@ -4659,7 +4662,7 @@ function iu() {
4659
4662
  attachment: x?.attachment ?? null,
4660
4663
  conversationId: x?.conversationId,
4661
4664
  transport: Ue,
4662
- onClose: () => T(null)
4665
+ onClose: () => N(null)
4663
4666
  }
4664
4667
  )
4665
4668
  ]
@@ -4672,7 +4675,7 @@ function lu({
4672
4675
  presentation: t
4673
4676
  }) {
4674
4677
  const { t: n } = ye(), r = t.contractState === "CURRENT" && t.humanSupport === "ROUTING", a = t.identity === "SUPPORT" && t.displayName === "Support" && t.avatarAsset === null && t.presentationVersion === null, o = (r || a ? null : t.displayName) ?? (t.identity === "LOLA" ? "Lola" : n("identity.support")), i = n("identity.online"), s = r ? "SUPPORT" : t.identity === "LOLA" ? "LOLA" : t.avatarAsset ? "HUMAN" : "SUPPORT", c = t.contractState === "CURRENT" && !r ? t : null;
4675
- return /* @__PURE__ */ N(
4678
+ return /* @__PURE__ */ C(
4676
4679
  "div",
4677
4680
  {
4678
4681
  "data-contract-state": t.contractState.toLowerCase(),
@@ -4691,8 +4694,8 @@ function lu({
4691
4694
  className: "chat-responder-avatar h-10 w-10 text-[13px]"
4692
4695
  }
4693
4696
  ),
4694
- /* @__PURE__ */ N("span", { className: "flex min-w-0 flex-col gap-1 text-start", children: [
4695
- /* @__PURE__ */ N("strong", { className: "chat-responder-name flex min-w-0 items-center gap-1.5 text-[16px] leading-4 font-bold text-white", children: [
4697
+ /* @__PURE__ */ C("span", { className: "flex min-w-0 flex-col gap-1 text-start", children: [
4698
+ /* @__PURE__ */ C("strong", { className: "chat-responder-name flex min-w-0 items-center gap-1.5 text-[16px] leading-4 font-bold text-white", children: [
4696
4699
  /* @__PURE__ */ u("span", { className: "truncate", children: o }),
4697
4700
  t.humanSupport === "ASSIGNED" ? /* @__PURE__ */ u(
4698
4701
  "span",
@@ -4712,7 +4715,7 @@ function lu({
4712
4715
  }
4713
4716
  ) : null
4714
4717
  ] }),
4715
- /* @__PURE__ */ u("small", { className: "chat-responder-status flex min-w-0 items-center text-[11px] leading-[13px] font-normal text-[#8b889b]", children: /* @__PURE__ */ N(
4718
+ /* @__PURE__ */ u("small", { className: "chat-responder-status flex min-w-0 items-center text-[11px] leading-[13px] font-normal text-[#8b889b]", children: /* @__PURE__ */ C(
4716
4719
  "span",
4717
4720
  {
4718
4721
  "data-human-support-status": !0,
@@ -4730,7 +4733,7 @@ function lu({
4730
4733
  }
4731
4734
  ) })
4732
4735
  ] }),
4733
- /* @__PURE__ */ N(
4736
+ /* @__PURE__ */ C(
4734
4737
  "span",
4735
4738
  {
4736
4739
  role: "status",
@@ -4769,7 +4772,7 @@ function hu(e, t) {
4769
4772
  const n = {
4770
4773
  conversationId: e,
4771
4774
  presentation: Mn(t)
4772
- }, r = C(n), a = C(n), [o, i] = I(n), s = C(null), c = () => {
4775
+ }, r = T(n), a = T(n), [o, i] = I(n), s = T(null), c = () => {
4773
4776
  s.current !== null && (window.clearTimeout(s.current), s.current = null);
4774
4777
  };
4775
4778
  return Ne(() => {
@@ -4804,7 +4807,7 @@ function mu({
4804
4807
  draggable: n = !1,
4805
4808
  dragLabel: r
4806
4809
  }) {
4807
- return /* @__PURE__ */ N(
4810
+ return /* @__PURE__ */ C(
4808
4811
  "div",
4809
4812
  {
4810
4813
  className: ae(
@@ -4866,7 +4869,7 @@ function pu({
4866
4869
  presentation: f
4867
4870
  }
4868
4871
  ),
4869
- actions: /* @__PURE__ */ N($e, { children: [
4872
+ actions: /* @__PURE__ */ C($e, { children: [
4870
4873
  /* @__PURE__ */ u(
4871
4874
  ee,
4872
4875
  {
@@ -4897,7 +4900,7 @@ function pu({
4897
4900
  function vu({
4898
4901
  className: e
4899
4902
  }) {
4900
- return /* @__PURE__ */ N(
4903
+ return /* @__PURE__ */ C(
4901
4904
  "div",
4902
4905
  {
4903
4906
  className: ae(
@@ -4969,7 +4972,7 @@ const yu = ra(function({
4969
4972
  onSelect: i
4970
4973
  }) {
4971
4974
  const { locale: s, t: c } = ye(), l = ss(r), h = (a.identity === "SUPPORT" && a.displayName === "Support" && a.avatarAsset === null && a.presentationVersion === null ? null : a.displayName?.trim()) || (a.identity === "LOLA" ? "Lola" : c("identity.support")), f = r.author.presentation, d = f?.displayName === "Support" && f.avatarAsset === null && f.presentationVersion === null ? c("identity.support") : f?.displayName?.trim(), m = r.author.type === _e.Agent ? d ?? r.author.displayName?.trim() ?? (r.author.role === "ADMIN" ? a.identity === "SUPPORT" ? h : c("identity.support") : r.author.role === "SYSTEM" ? c("identity.system") : "Lola") : null, v = a.identity === "LOLA" ? "LOLA" : a.avatarAsset !== null ? "HUMAN" : "SUPPORT", y = n?.trim() || c("chat.new");
4972
- return /* @__PURE__ */ N(
4975
+ return /* @__PURE__ */ C(
4973
4976
  "button",
4974
4977
  {
4975
4978
  type: "button",
@@ -4995,8 +4998,8 @@ const yu = ra(function({
4995
4998
  className: "chat-list-item-avatar h-12 w-12 text-[14px]"
4996
4999
  }
4997
5000
  ),
4998
- /* @__PURE__ */ N("span", { className: "chat-list-item-copy flex min-w-0 flex-1 items-start gap-2", children: [
4999
- /* @__PURE__ */ N("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
5001
+ /* @__PURE__ */ C("span", { className: "chat-list-item-copy flex min-w-0 flex-1 items-start gap-2", children: [
5002
+ /* @__PURE__ */ C("span", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [
5000
5003
  /* @__PURE__ */ u(
5001
5004
  "strong",
5002
5005
  {
@@ -5005,13 +5008,13 @@ const yu = ra(function({
5005
5008
  children: y
5006
5009
  }
5007
5010
  ),
5008
- /* @__PURE__ */ N(
5011
+ /* @__PURE__ */ C(
5009
5012
  "span",
5010
5013
  {
5011
5014
  dir: "auto",
5012
5015
  className: "chat-list-item-preview line-clamp-2 text-[14px] leading-[19px] text-white/56",
5013
5016
  children: [
5014
- m ? /* @__PURE__ */ N("span", { className: "font-medium text-white/58", children: [
5017
+ m ? /* @__PURE__ */ C("span", { className: "font-medium text-white/58", children: [
5015
5018
  m,
5016
5019
  ":",
5017
5020
  " "
@@ -5038,14 +5041,14 @@ function Eu({
5038
5041
  className: e,
5039
5042
  ...t
5040
5043
  }) {
5041
- const { direction: n, t: r } = ye(), a = dn(), o = tr(), i = C(null), s = is(), {
5044
+ const { direction: n, t: r } = ye(), a = dn(), o = tr(), i = T(null), s = is(), {
5042
5045
  cancelConversationPagination: c,
5043
5046
  clearSendError: l,
5044
5047
  createNewConversation: g,
5045
5048
  fetchMoreConversations: h,
5046
5049
  setCurrentThread: f
5047
5050
  } = Jn(), d = ua(), m = da(), v = cs(), y = ls(), b = us(), w = ds(o.state), x = w === wt.Voice ? Te.voice : Te.text;
5048
- function T() {
5051
+ function N() {
5049
5052
  a(-1);
5050
5053
  }
5051
5054
  function A() {
@@ -5089,7 +5092,7 @@ function Eu({
5089
5092
  c();
5090
5093
  },
5091
5094
  [c]
5092
- ), /* @__PURE__ */ N(
5095
+ ), /* @__PURE__ */ C(
5093
5096
  "div",
5094
5097
  {
5095
5098
  ...t,
@@ -5098,11 +5101,11 @@ function Eu({
5098
5101
  e
5099
5102
  ),
5100
5103
  children: [
5101
- /* @__PURE__ */ N("header", { className: "chat-list-header flex min-h-16 shrink-0 items-center gap-3 px-4 pt-1", children: [
5104
+ /* @__PURE__ */ C("header", { className: "chat-list-header flex min-h-16 shrink-0 items-center gap-3 px-4 pt-1", children: [
5102
5105
  /* @__PURE__ */ u(
5103
5106
  ee,
5104
5107
  {
5105
- onClick: T,
5108
+ onClick: N,
5106
5109
  "aria-label": r("chat.back"),
5107
5110
  "data-chat-route-focus": !0,
5108
5111
  className: "chat-icon-button chat-history-back-button h-8 w-8 shrink-0 rounded-[13px]",
@@ -5116,7 +5119,7 @@ function Eu({
5116
5119
  ),
5117
5120
  /* @__PURE__ */ u("h1", { className: "chat-list-title min-w-0 flex-1 text-start text-[20px] leading-6 font-bold tracking-[-0.02em] text-white/95", children: r("chat.listTitle") })
5118
5121
  ] }),
5119
- /* @__PURE__ */ N(
5122
+ /* @__PURE__ */ C(
5120
5123
  "div",
5121
5124
  {
5122
5125
  ref: i,
@@ -5125,7 +5128,7 @@ function Eu({
5125
5128
  "aria-busy": b,
5126
5129
  className: "chat-list-content chat-scrollbar flex flex-1 flex-col overflow-y-auto px-4 pt-5 pb-[max(16px,var(--lola-safe-area-inset-bottom))]",
5127
5130
  children: [
5128
- /* @__PURE__ */ N(
5131
+ /* @__PURE__ */ C(
5129
5132
  ee,
5130
5133
  {
5131
5134
  onClick: A,
@@ -5227,14 +5230,14 @@ function ea({
5227
5230
  freezeVoicePresentation: t = !1
5228
5231
  }) {
5229
5232
  const n = e === wt.Text;
5230
- return /* @__PURE__ */ N($e, { children: [
5233
+ return /* @__PURE__ */ C($e, { children: [
5231
5234
  /* @__PURE__ */ u("div", { className: "pointer-events-none absolute inset-0", children: /* @__PURE__ */ u(
5232
5235
  vu,
5233
5236
  {
5234
5237
  className: n ? "opacity-100" : "opacity-0"
5235
5238
  }
5236
5239
  ) }),
5237
- /* @__PURE__ */ N("div", { className: "relative z-5 flex h-full min-h-0 w-full flex-col", children: [
5240
+ /* @__PURE__ */ C("div", { className: "relative z-5 flex h-full min-h-0 w-full flex-col", children: [
5238
5241
  /* @__PURE__ */ u(pu, { className: "shrink-0" }),
5239
5242
  /* @__PURE__ */ u("div", { className: "chat-mode-content flex min-h-0 flex-1 flex-col justify-end", children: e === wt.Voice ? /* @__PURE__ */ u(Jc, { freezePresentation: t }) : /* @__PURE__ */ u(iu, {}) })
5240
5243
  ] })
@@ -5249,7 +5252,7 @@ function Cu({
5249
5252
  a,
5250
5253
  r
5251
5254
  ) && n;
5252
- return /* @__PURE__ */ N(hs, { location: e, children: [
5255
+ return /* @__PURE__ */ C(hs, { location: e, children: [
5253
5256
  /* @__PURE__ */ u(
5254
5257
  Nt,
5255
5258
  {
@@ -5261,7 +5264,7 @@ function Cu({
5261
5264
  Nt,
5262
5265
  {
5263
5266
  path: Te.voice,
5264
- element: /* @__PURE__ */ N($e, { children: [
5267
+ element: /* @__PURE__ */ C($e, { children: [
5265
5268
  /* @__PURE__ */ u(
5266
5269
  ea,
5267
5270
  {
@@ -5284,7 +5287,7 @@ function Tu() {
5284
5287
  }, []), /* @__PURE__ */ u(_n, { to: Te.text, replace: !0 });
5285
5288
  }
5286
5289
  function Ru() {
5287
- const { setAvatarCoveredByChatList: e } = Bt(), t = tr(), n = C(null), r = C(t.pathname), [a, o] = I(!1), [i, s] = I(() => ({ location: t, transition: null }));
5290
+ const { setAvatarCoveredByChatList: e } = Bt(), t = tr(), n = T(null), r = T(t.pathname), [a, o] = I(!1), [i, s] = I(() => ({ location: t, transition: null }));
5288
5291
  if (t.key !== i.location.key) {
5289
5292
  const f = i.transition?.to ?? i.location, d = fs(
5290
5293
  f.pathname,