vpschatbotwidget 1.2.2 → 1.2.3

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.
@@ -176,36 +176,36 @@ function Xs(e) {
176
176
  if (!d.ok) {
177
177
  if (d.status === 404 || d.status === 405)
178
178
  return await this.sendMessage(r, o, s, a);
179
- const w = await mr(d);
179
+ const S = await mr(d);
180
180
  throw Jo(
181
- w,
181
+ S,
182
182
  "I couldn't process that request right now.",
183
183
  d.status
184
184
  );
185
185
  }
186
186
  if (!d.body || (u = (f = d.headers) == null ? void 0 : f.get("content-type")) != null && u.includes("application/json")) {
187
- const w = Xo(await mr(d));
188
- if (typeof w.answer != "string" || !w.usage)
187
+ const S = Xo(await mr(d));
188
+ if (typeof S.answer != "string" || !S.usage)
189
189
  throw { message: "The response stream ended unexpectedly." };
190
190
  return {
191
- requestId: w.request_id,
192
- sessionId: w.session_id,
193
- answer: w.answer,
194
- sources: (w.sources || []).map(pr),
195
- toolCalls: (w.tool_calls || []).map(hr),
196
- usage: gr(w.usage),
197
- durationMs: w.duration_ms
191
+ requestId: S.request_id,
192
+ sessionId: S.session_id,
193
+ answer: S.answer,
194
+ sources: (S.sources || []).map(pr),
195
+ toolCalls: (S.tool_calls || []).map(hr),
196
+ usage: gr(S.usage),
197
+ durationMs: S.duration_ms
198
198
  };
199
199
  }
200
200
  const h = d.body.getReader(), p = new TextDecoder();
201
201
  let g = "";
202
- const m = { value: null }, v = (w) => {
203
- const S = w.split(/\r?\n/).filter((C) => C.startsWith("data:")).map((C) => C.slice(5).trimStart()).join(`
202
+ const m = { value: null }, v = (S) => {
203
+ const w = S.split(/\r?\n/).filter((C) => C.startsWith("data:")).map((C) => C.slice(5).trimStart()).join(`
204
204
  `);
205
- if (!S) return;
205
+ if (!w) return;
206
206
  let T = {};
207
207
  try {
208
- const C = JSON.parse(S);
208
+ const C = JSON.parse(w);
209
209
  if (!C || typeof C != "object") return;
210
210
  T = C;
211
211
  } catch {
@@ -233,9 +233,9 @@ function Xs(e) {
233
233
  };
234
234
  try {
235
235
  for (; !m.value; ) {
236
- const { done: w, value: S } = await h.read();
237
- if (w) break;
238
- if (g += p.decode(S, { stream: !0 }), g.length > 1e6)
236
+ const { done: S, value: w } = await h.read();
237
+ if (S) break;
238
+ if (g += p.decode(w, { stream: !0 }), g.length > 1e6)
239
239
  throw { message: "The response stream was too large." };
240
240
  const T = g.split(/\r?\n\r?\n/);
241
241
  g = T.pop() || "";
@@ -408,43 +408,43 @@ const Js = ({
408
408
  ...n !== void 0 ? { role: n } : {},
409
409
  ...r !== void 0 ? { roleId: r } : {},
410
410
  ...o !== void 0 ? { client: o } : {}
411
- }), [t, n, r, o]), w = Mt(() => s === "" ? null : {
411
+ }), [t, n, r, o]), S = Mt(() => s === "" ? null : {
412
412
  id: "welcome-default",
413
413
  role: "assistant",
414
414
  content: s || la,
415
415
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
416
416
  status: "complete"
417
- }, [s]), [S, T] = Ce(null), [C, R] = Ce(() => w ? [w] : []), [P, O] = Ce("idle"), [M, F] = Ce(null), A = Ae(null), D = Ae(!1), I = Ae(null), x = Ae(null), _ = Ae(!1), [U, N] = Ce([]), [k, Y] = Ce(g), { soundEnabled: K, toggleSound: le, prepareSound: ie, playSound: L } = ca();
417
+ }, [s]), [w, T] = Ce(null), [C, R] = Ce(() => S ? [S] : []), [P, O] = Ce("idle"), [M, F] = Ce(null), A = Ae(null), D = Ae(!1), I = Ae(null), x = Ae(null), _ = Ae(!1), [U, N] = Ce([]), [k, Y] = Ce(g), { soundEnabled: K, toggleSound: le, prepareSound: ie, playSound: L } = ca();
418
418
  Ue.useEffect(() => Y(g), [g]), Ue.useEffect(() => {
419
419
  var J;
420
- let j = !0;
420
+ let W = !0;
421
421
  return N([]), (J = v.listModels) == null || J.call(v).then((ce) => {
422
- j && N((ce == null ? void 0 : ce.models) || []);
422
+ W && N((ce == null ? void 0 : ce.models) || []);
423
423
  }).catch(() => {
424
424
  }), () => {
425
- j = !1;
425
+ W = !1;
426
426
  };
427
427
  }, [v]);
428
- const X = Ve((j) => {
429
- !_.current && (j === "auto" || U.some((J) => J.id === j && J.configured)) && Y(j);
428
+ const X = Ve((W) => {
429
+ !_.current && (W === "auto" || U.some((J) => J.id === W && J.configured)) && Y(W);
430
430
  }, [U]);
431
431
  Ue.useEffect(() => () => {
432
- var j;
433
- return (j = I.current) == null ? void 0 : j.abort();
432
+ var W;
433
+ return (W = I.current) == null ? void 0 : W.abort();
434
434
  }, []), Ue.useLayoutEffect(() => {
435
- const j = x.current;
436
- if (!j) return;
437
- const J = C.find((he) => he.id === j.messageId), ce = performance.now();
438
- (J == null ? void 0 : J.status) === "complete" && j.completedAt !== void 0 ? (At("completion-to-commit", j.completedAt, ce), At("submit-to-complete-commit", j.startedAt, ce), x.current = null) : (J == null ? void 0 : J.status) === "pending" && J.content && j.firstTokenAt !== void 0 && !j.firstCommitRecorded && (At("first-token-to-commit", j.firstTokenAt, ce), j.firstCommitRecorded = !0);
435
+ const W = x.current;
436
+ if (!W) return;
437
+ const J = C.find((he) => he.id === W.messageId), ce = performance.now();
438
+ (J == null ? void 0 : J.status) === "complete" && W.completedAt !== void 0 ? (At("completion-to-commit", W.completedAt, ce), At("submit-to-complete-commit", W.startedAt, ce), x.current = null) : (J == null ? void 0 : J.status) === "pending" && J.content && W.firstTokenAt !== void 0 && !W.firstCommitRecorded && (At("first-token-to-commit", W.firstTokenAt, ce), W.firstCommitRecorded = !0);
439
439
  }, [C]);
440
- const B = Ve(async (j) => {
441
- if (S) return S;
440
+ const B = Ve(async (W) => {
441
+ if (w) return w;
442
442
  O("connecting");
443
- const J = await v.createSession(j);
444
- if (j.aborted) throw new DOMException("Aborted", "AbortError");
443
+ const J = await v.createSession(W);
444
+ if (W.aborted) throw new DOMException("Aborted", "AbortError");
445
445
  return T(J.sessionId), J.sessionId;
446
- }, [S, v]), $ = Ve(
447
- async (j) => {
446
+ }, [w, v]), $ = Ve(
447
+ async (W) => {
448
448
  if (_.current) return;
449
449
  ie(), _.current = !0;
450
450
  const J = new AbortController();
@@ -453,11 +453,11 @@ const Js = ({
453
453
  const Ie = () => {
454
454
  ce !== void 0 && cancelAnimationFrame(ce), ce = void 0;
455
455
  };
456
- A.current = j;
456
+ A.current = W;
457
457
  const Fe = {
458
458
  id: Qo("user"),
459
459
  role: "user",
460
- content: j,
460
+ content: W,
461
461
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
462
462
  status: "complete"
463
463
  }, xe = Qo("asst"), Le = "Preparing your answer…", ze = {
@@ -471,15 +471,15 @@ const Js = ({
471
471
  progressSteps: [Le]
472
472
  }, H = performance.now(), G = { messageId: xe, startedAt: H };
473
473
  x.current = G, R((be) => [...be, Fe, ze]), O("awaiting"), F(null);
474
- const we = (be) => {
474
+ const Se = (be) => {
475
475
  const ge = be.trim();
476
476
  !ge || J.signal.aborted || R(
477
477
  (V) => V.map(
478
- (q) => q.id === xe && q.progressText !== ge ? {
479
- ...q,
478
+ (j) => j.id === xe && j.progressText !== ge ? {
479
+ ...j,
480
480
  progressText: ge,
481
- progressSteps: [...q.progressSteps ?? [], ge]
482
- } : q
481
+ progressSteps: [...j.progressSteps ?? [], ge]
482
+ } : j
483
483
  )
484
484
  );
485
485
  };
@@ -488,27 +488,27 @@ const Js = ({
488
488
  At("request-preparation", H, ge);
489
489
  const V = v.sendMessageStream ? await v.sendMessageStream(
490
490
  be,
491
- j,
491
+ W,
492
492
  {
493
493
  roleId: E.roleId,
494
494
  client: E.client,
495
495
  modelId: k
496
496
  },
497
- we,
498
- (q) => {
499
- J.signal.aborted || (q && G.firstTokenAt === void 0 && (G.firstTokenAt = performance.now(), At("first-token-received", ge, G.firstTokenAt)), he += q, ce === void 0 && (ce = requestAnimationFrame(() => {
497
+ Se,
498
+ (j) => {
499
+ J.signal.aborted || (j && G.firstTokenAt === void 0 && (G.firstTokenAt = performance.now(), At("first-token-received", ge, G.firstTokenAt)), he += j, ce === void 0 && (ce = requestAnimationFrame(() => {
500
500
  ce = void 0, J.signal.aborted || R((Z) => Z.map((se) => se.id === xe ? { ...se, content: he } : se));
501
501
  })));
502
502
  },
503
503
  J.signal
504
- ) : await v.sendMessage(be, j, {
504
+ ) : await v.sendMessage(be, W, {
505
505
  roleId: E.roleId,
506
506
  client: E.client,
507
507
  modelId: k
508
508
  }, J.signal);
509
509
  if (Ie(), J.signal.aborted) return;
510
510
  G.messageId = V.requestId || xe, G.completedAt = performance.now(), At("completion-received", ge, G.completedAt, V.requestId), R(
511
- (q) => q.map(
511
+ (j) => j.map(
512
512
  (Z) => Z.id === xe ? {
513
513
  ...Z,
514
514
  id: V.requestId || xe,
@@ -530,7 +530,7 @@ const Js = ({
530
530
  const ge = ua(be);
531
531
  R(
532
532
  (V) => V.map(
533
- (q) => q.id === xe ? { ...q, content: ge, status: "error", progressText: void 0 } : q
533
+ (j) => j.id === xe ? { ...j, content: ge, status: "error", progressText: void 0 } : j
534
534
  )
535
535
  ), F(ge), O("error");
536
536
  } finally {
@@ -539,33 +539,33 @@ const Js = ({
539
539
  },
540
540
  [B, v, E.client, E.roleId, k, ie, L]
541
541
  ), Q = Ve(
542
- async (j) => {
543
- const J = j.trim();
542
+ async (W) => {
543
+ const J = W.trim();
544
544
  !J || P === "awaiting" || P === "connecting" || await $(J);
545
545
  },
546
546
  [$, P]
547
547
  ), re = Ve(async () => {
548
548
  if (_.current) return;
549
- const j = A.current;
550
- j && (R((J) => J.filter((ce) => ce.status !== "error")), await $(j));
549
+ const W = A.current;
550
+ W && (R((J) => J.filter((ce) => ce.status !== "error")), await $(W));
551
551
  }, [$]), ee = Ve(() => {
552
- const j = I.current;
553
- j && (j.abort(), I.current = null, _.current = !1, x.current = null, R((J) => J.map(
552
+ const W = I.current;
553
+ W && (W.abort(), I.current = null, _.current = !1, x.current = null, R((J) => J.map(
554
554
  (ce) => ce.status === "pending" ? { ...ce, status: "stopped", progressText: void 0 } : ce
555
555
  )), O("idle"));
556
556
  }, []), te = Ve(
557
- (j, J) => {
557
+ (W, J) => {
558
558
  R((ce) => ce.map(
559
- (he) => he.id === j ? { ...he, feedback: he.feedback === J ? void 0 : J } : he
559
+ (he) => he.id === W ? { ...he, feedback: he.feedback === J ? void 0 : J } : he
560
560
  ));
561
561
  },
562
562
  []
563
- ), W = Ve(async () => {
563
+ ), q = Ve(async () => {
564
564
  }, []), ne = Ve(() => {
565
565
  }, []), oe = Ve(async () => {
566
- var j;
567
- (j = I.current) == null || j.abort(), I.current = null, _.current = !1, T(null), R(w ? [w] : []), O("idle"), F(null), A.current = null, S && await v.closeSession(S);
568
- }, [S, v, w]);
566
+ var W;
567
+ (W = I.current) == null || W.abort(), I.current = null, _.current = !1, T(null), R(S ? [S] : []), O("idle"), F(null), A.current = null, w && await v.closeSession(w);
568
+ }, [w, v, S]);
569
569
  Ue.useEffect(() => {
570
570
  !a || D.current || (D.current = !0, Q(a));
571
571
  }, [a, Q]);
@@ -574,12 +574,12 @@ const Js = ({
574
574
  messages: C,
575
575
  status: P,
576
576
  error: M,
577
- sessionId: S,
577
+ sessionId: w,
578
578
  pendingTicket: null,
579
579
  ticketBusy: !1,
580
580
  lastTicket: null,
581
581
  suggestions: i,
582
- showSuggestions: !c && (C.length === 0 || C.length === 1 && C[0].id === "welcome-default"),
582
+ showSuggestions: !c && P === "idle" && (C.length === 0 || C.length === 1 && C[0].id === "welcome-default" || C.some((W) => W.role === "assistant" && W.status === "complete" && !W.id.startsWith("welcome"))),
583
583
  suggestionBadgesEnabled: !c,
584
584
  userContext: E,
585
585
  apiBaseUrl: v.apiBaseUrl,
@@ -591,7 +591,7 @@ const Js = ({
591
591
  stopResponse: ee,
592
592
  toggleMessageFeedback: te,
593
593
  retryLast: re,
594
- confirmTicket: W,
594
+ confirmTicket: q,
595
595
  cancelTicket: ne,
596
596
  resetConversation: oe,
597
597
  models: U,
@@ -602,7 +602,7 @@ const Js = ({
602
602
  C,
603
603
  P,
604
604
  M,
605
- S,
605
+ w,
606
606
  i,
607
607
  c,
608
608
  E,
@@ -615,7 +615,7 @@ const Js = ({
615
615
  ee,
616
616
  te,
617
617
  re,
618
- W,
618
+ q,
619
619
  ne,
620
620
  oe,
621
621
  U,
@@ -844,7 +844,7 @@ const si = ye("CircleCheck", [
844
844
  * This source code is licensed under the ISC license.
845
845
  * See the LICENSE file in the root directory of this source tree.
846
846
  */
847
- const Sa = ye("ClipboardCheck", [
847
+ const wa = ye("ClipboardCheck", [
848
848
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
849
849
  [
850
850
  "path",
@@ -871,7 +871,7 @@ const ii = ye("Copy", [
871
871
  * This source code is licensed under the ISC license.
872
872
  * See the LICENSE file in the root directory of this source tree.
873
873
  */
874
- const wa = ye("ExternalLink", [
874
+ const Sa = ye("ExternalLink", [
875
875
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
876
876
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
877
877
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
@@ -1325,7 +1325,7 @@ function vi(e) {
1325
1325
  function Xa(e, t) {
1326
1326
  return t ? e ? (...n) => {
1327
1327
  const r = n[0];
1328
- if (Si(r)) {
1328
+ if (wi(r)) {
1329
1329
  const s = r;
1330
1330
  Vn(s);
1331
1331
  const i = t(...n);
@@ -1338,7 +1338,7 @@ function Xa(e, t) {
1338
1338
  function yi(e) {
1339
1339
  return e && ((...t) => {
1340
1340
  const n = t[0];
1341
- return Si(n) && Vn(n), e(...t);
1341
+ return wi(n) && Vn(n), e(...t);
1342
1342
  });
1343
1343
  }
1344
1344
  function Vn(e) {
@@ -1349,7 +1349,7 @@ function Vn(e) {
1349
1349
  function Ei(e, t) {
1350
1350
  return t ? e ? t + " " + e : t : e;
1351
1351
  }
1352
- function Si(e) {
1352
+ function wi(e) {
1353
1353
  return e != null && typeof e == "object" && "nativeEvent" in e;
1354
1354
  }
1355
1355
  function vt(e, t, n = {}) {
@@ -1460,7 +1460,7 @@ function ns(e) {
1460
1460
  return "__unserializable__";
1461
1461
  }
1462
1462
  }
1463
- function wi() {
1463
+ function Si() {
1464
1464
  const [, e] = y.useState({});
1465
1465
  return y.useCallback(() => {
1466
1466
  e({});
@@ -1468,7 +1468,7 @@ function wi() {
1468
1468
  }
1469
1469
  let rs = 0;
1470
1470
  function cl(e, t = "mui") {
1471
- const n = y.useRef(void 0), r = wi(), o = e ?? n.current;
1471
+ const n = y.useRef(void 0), r = Si(), o = e ?? n.current;
1472
1472
  return y.useEffect(() => {
1473
1473
  n.current == null && (rs += 1, n.current = `${t}-${rs}`, e == null && r());
1474
1474
  }, [e, t, r]), o;
@@ -1511,7 +1511,7 @@ const Ti = "none", nr = "trigger-press", Xe = "trigger-hover", Mn = "trigger-foc
1511
1511
  function uo(e) {
1512
1512
  y.useEffect(e, Wa);
1513
1513
  }
1514
- const Sn = null;
1514
+ const wn = null;
1515
1515
  let ss = globalThis.requestAnimationFrame;
1516
1516
  class fl {
1517
1517
  constructor() {
@@ -1547,12 +1547,12 @@ class fl {
1547
1547
  n < 0 || n >= this.callbacks.length || this.callbacks[n] !== null && (this.callbacks[n] = null, this.callbacksCount -= 1);
1548
1548
  }
1549
1549
  }
1550
- let wn = new fl();
1550
+ let Sn = new fl();
1551
1551
  class De {
1552
1552
  constructor() {
1553
- ae(this, "currentId", Sn);
1553
+ ae(this, "currentId", wn);
1554
1554
  ae(this, "cancel", () => {
1555
- this.currentId !== Sn && (wn.cancel(this.currentId), this.currentId = Sn);
1555
+ this.currentId !== wn && (Sn.cancel(this.currentId), this.currentId = wn);
1556
1556
  });
1557
1557
  ae(this, "disposeEffect", () => this.cancel);
1558
1558
  }
@@ -1560,17 +1560,17 @@ class De {
1560
1560
  return new De();
1561
1561
  }
1562
1562
  static request(t) {
1563
- return wn.request(t);
1563
+ return Sn.request(t);
1564
1564
  }
1565
1565
  static cancel(t) {
1566
- return wn.cancel(t);
1566
+ return Sn.cancel(t);
1567
1567
  }
1568
1568
  /**
1569
1569
  * Executes `fn` after `delay`, clearing any previously scheduled call.
1570
1570
  */
1571
1571
  request(t) {
1572
- this.cancel(), this.currentId = wn.request(() => {
1573
- this.currentId = Sn, t();
1572
+ this.cancel(), this.currentId = Sn.request(() => {
1573
+ this.currentId = wn, t();
1574
1574
  });
1575
1575
  }
1576
1576
  }
@@ -1668,9 +1668,9 @@ const po = "data-starting-style", gl = "data-ending-style", ml = {
1668
1668
  transitionStatus(e) {
1669
1669
  return e === "starting" ? ml : e === "ending" ? bl : null;
1670
1670
  }
1671
- }, vl = "data-open", yl = "data-closed", Cn = po, El = "data-panel-open", Sl = {
1671
+ }, vl = "data-open", yl = "data-closed", Cn = po, El = "data-panel-open", wl = {
1672
1672
  [vl]: ""
1673
- }, wl = {
1673
+ }, Sl = {
1674
1674
  [yl]: ""
1675
1675
  }, Cl = {
1676
1676
  open(e) {
@@ -1680,7 +1680,7 @@ const po = "data-starting-style", gl = "data-ending-style", ml = {
1680
1680
  }
1681
1681
  }, Tl = {
1682
1682
  open(e) {
1683
- return e ? Sl : wl;
1683
+ return e ? wl : Sl;
1684
1684
  }
1685
1685
  }, Pi = {
1686
1686
  ...Tl,
@@ -1770,11 +1770,11 @@ function sr(e) {
1770
1770
  return !1;
1771
1771
  }
1772
1772
  }
1773
- const xl = /transform|translate|scale|rotate|perspective|filter/, Pl = /paint|layout|strict|content/, St = (e) => !!e && e !== "none";
1773
+ const xl = /transform|translate|scale|rotate|perspective|filter/, Pl = /paint|layout|strict|content/, wt = (e) => !!e && e !== "none";
1774
1774
  let vr;
1775
1775
  function mo(e) {
1776
1776
  const t = me(e) ? qe(e) : e;
1777
- return St(t.transform) || St(t.translate) || St(t.scale) || St(t.rotate) || St(t.perspective) || !bo() && (St(t.backdropFilter) || St(t.filter)) || xl.test(t.willChange || "") || Pl.test(t.contain || "");
1777
+ return wt(t.transform) || wt(t.translate) || wt(t.scale) || wt(t.rotate) || wt(t.perspective) || !bo() && (wt(t.backdropFilter) || wt(t.filter)) || xl.test(t.willChange || "") || Pl.test(t.contain || "");
1778
1778
  }
1779
1779
  function Ol(e) {
1780
1780
  let t = ht(e);
@@ -1924,56 +1924,56 @@ function Ai(e = {}) {
1924
1924
  onKeyUp: m,
1925
1925
  onKeyDown: v,
1926
1926
  onPointerDown: E,
1927
- ...w
1927
+ ...S
1928
1928
  } = h;
1929
1929
  return ao({
1930
- onClick(S) {
1930
+ onClick(w) {
1931
1931
  if (t) {
1932
- S.preventDefault();
1932
+ w.preventDefault();
1933
1933
  return;
1934
1934
  }
1935
- p == null || p(S);
1935
+ p == null || p(w);
1936
1936
  },
1937
- onMouseDown(S) {
1938
- t || g == null || g(S);
1937
+ onMouseDown(w) {
1938
+ t || g == null || g(w);
1939
1939
  },
1940
- onKeyDown(S) {
1941
- if (t || (Vn(S), v == null || v(S), S.baseUIHandlerPrevented))
1940
+ onKeyDown(w) {
1941
+ if (t || (Vn(w), v == null || v(w), w.baseUIHandlerPrevented))
1942
1942
  return;
1943
- const T = S.target === S.currentTarget, C = S.currentTarget, R = Tn(C), P = !o && Al(C), O = T && (o ? R : !P), M = S.key === "Enter", F = S.key === " ", A = C.getAttribute("role"), D = (A == null ? void 0 : A.startsWith("menuitem")) || A === "option" || A === "gridcell";
1943
+ const T = w.target === w.currentTarget, C = w.currentTarget, R = Tn(C), P = !o && Al(C), O = T && (o ? R : !P), M = w.key === "Enter", F = w.key === " ", A = C.getAttribute("role"), D = (A == null ? void 0 : A.startsWith("menuitem")) || A === "option" || A === "gridcell";
1944
1944
  if (T && a && F) {
1945
- if (S.defaultPrevented && D)
1945
+ if (w.defaultPrevented && D)
1946
1946
  return;
1947
- S.preventDefault(), (!o || R) && (S.preventBaseUIHandler(), yr(C, S));
1947
+ w.preventDefault(), (!o || R) && (w.preventBaseUIHandler(), yr(C, w));
1948
1948
  return;
1949
1949
  }
1950
1950
  if (!O || o || !F && !M) {
1951
- T && P && F && S.preventDefault();
1951
+ T && P && F && w.preventDefault();
1952
1952
  return;
1953
1953
  }
1954
- S.defaultPrevented || (S.preventDefault(), M && (S.preventBaseUIHandler(), yr(C, S)));
1954
+ w.defaultPrevented || (w.preventDefault(), M && (w.preventBaseUIHandler(), yr(C, w)));
1955
1955
  },
1956
- onKeyUp(S) {
1956
+ onKeyUp(w) {
1957
1957
  if (!t) {
1958
- if (Vn(S), m == null || m(S), S.target === S.currentTarget && o && a && Tn(S.currentTarget) && S.key === " ") {
1959
- S.preventDefault();
1958
+ if (Vn(w), m == null || m(w), w.target === w.currentTarget && o && a && Tn(w.currentTarget) && w.key === " ") {
1959
+ w.preventDefault();
1960
1960
  return;
1961
1961
  }
1962
- S.baseUIHandlerPrevented || S.target === S.currentTarget && !o && !a && !S.defaultPrevented && S.key === " " && (S.preventBaseUIHandler(), yr(S.currentTarget, S));
1962
+ w.baseUIHandlerPrevented || w.target === w.currentTarget && !o && !a && !w.defaultPrevented && w.key === " " && (w.preventBaseUIHandler(), yr(w.currentTarget, w));
1963
1963
  }
1964
1964
  },
1965
- onPointerDown(S) {
1965
+ onPointerDown(w) {
1966
1966
  if (t) {
1967
- S.preventDefault();
1967
+ w.preventDefault();
1968
1968
  return;
1969
1969
  }
1970
- E == null || E(S);
1970
+ E == null || E(w);
1971
1971
  }
1972
1972
  }, o ? {
1973
1973
  type: "button"
1974
1974
  } : {
1975
1975
  role: "button"
1976
- }, l, w);
1976
+ }, l, S);
1977
1977
  }, [t, l, a, o]), d = fe((h) => {
1978
1978
  i.current = h, f();
1979
1979
  });
@@ -2024,7 +2024,7 @@ const kl = {
2024
2024
  });
2025
2025
  });
2026
2026
  process.env.NODE_ENV !== "production" && (ki.displayName = "CollapsibleTrigger");
2027
- function Se(e, t, n, r) {
2027
+ function we(e, t, n, r) {
2028
2028
  return e.addEventListener(t, n, r), () => {
2029
2029
  e.removeEventListener(t, n, r);
2030
2030
  };
@@ -2180,7 +2180,7 @@ function Fl(e) {
2180
2180
  setMounted: a,
2181
2181
  setOpen: l,
2182
2182
  transitionStatus: f
2183
- } = e, u = y.useRef(null), d = y.useRef(null), [h, p] = y.useState(kt), g = y.useRef(kt), m = y.useRef(!1), v = y.useRef(c), E = y.useRef(!1), [w, S] = y.useState(!1), T = y.useRef(null), C = Nr(t, u), R = Je(c), P = Ni(u), O = !c && !s, M = w ? "idle" : f, F = c && // These 2 refs are safe to read in render, they are only written from committed
2183
+ } = e, u = y.useRef(null), d = y.useRef(null), [h, p] = y.useState(kt), g = y.useRef(kt), m = y.useRef(!1), v = y.useRef(c), E = y.useRef(!1), [S, w] = y.useState(!1), T = y.useRef(null), C = Nr(t, u), R = Je(c), P = Ni(u), O = !c && !s, M = S ? "idle" : f, F = c && // These 2 refs are safe to read in render, they are only written from committed
2184
2184
  // layout/effect paths and gate one-shot motion suppression for the next open
2185
2185
  // lifecycle. They intentionally expose the last committed motion snapshot.
2186
2186
  (v.current || E.current), A = !c && s && // These 2 refs are also safe to read in render, both hold the last committed
@@ -2199,8 +2199,8 @@ function Fl(e) {
2199
2199
  c && s && d.current === "css-animation" && (E.current = !0);
2200
2200
  });
2201
2201
  pe(() => {
2202
- !w || f === "starting" || S(!1);
2203
- }, [w, f]), y.useEffect(() => () => {
2202
+ !S || f === "starting" || w(!1);
2203
+ }, [S, f]), y.useEffect(() => () => {
2204
2204
  U(), x();
2205
2205
  }, [U, x]), pe(() => {
2206
2206
  c || (v.current = !1, E.current = !1);
@@ -2216,7 +2216,7 @@ function Fl(e) {
2216
2216
  if (c && f === "starting") {
2217
2217
  const ie = m.current;
2218
2218
  if (m.current = !1, Y === "none") {
2219
- I(Nt(k)), S(!0);
2219
+ I(Nt(k)), w(!0);
2220
2220
  return;
2221
2221
  }
2222
2222
  if (Y === "css-transition") {
@@ -2224,7 +2224,7 @@ function Fl(e) {
2224
2224
  if (I(Nt(k)), !ie)
2225
2225
  return B;
2226
2226
  const $ = xn(k, "transition-duration", "0s");
2227
- return _($), S(!0), B;
2227
+ return _($), w(!0), B;
2228
2228
  }
2229
2229
  I(Nt(k));
2230
2230
  const L = xn(k, "animation-name", "none");
@@ -2233,7 +2233,7 @@ function Fl(e) {
2233
2233
  return;
2234
2234
  }
2235
2235
  const X = xn(k, "animation-duration", "0s");
2236
- L(), _(X), S(!0);
2236
+ L(), _(X), w(!0);
2237
2237
  return;
2238
2238
  }
2239
2239
  if (!c && s && (f === "idle" || f === "starting")) {
@@ -2295,7 +2295,7 @@ function Fl(e) {
2295
2295
  R.current || (B && (m.current = !1), $ && Y.setAttribute(Cn, ""), Y.setAttribute("hidden", "until-found"));
2296
2296
  }));
2297
2297
  });
2298
- }, X = Se(Y, "beforematch", (B) => {
2298
+ }, X = we(Y, "beforematch", (B) => {
2299
2299
  const $ = Oe(Ti, B);
2300
2300
  if (i(!0, $), $.isCanceled) {
2301
2301
  ie(!1, !1);
@@ -2396,7 +2396,7 @@ const Vl = "--collapsible-panel-height", $l = "--collapsible-panel-width", Mi =
2396
2396
  setOpen: m,
2397
2397
  state: v,
2398
2398
  transitionStatus: E
2399
- } = xi(), w = o ?? !1, S = s ?? !1, T = c || void 0, C = T ?? f;
2399
+ } = xi(), S = o ?? !1, w = s ?? !1, T = c || void 0, C = T ?? f;
2400
2400
  pe(() => (g((U) => T ?? (U === null ? void 0 : U)), () => {
2401
2401
  g((U) => U === T ? null : U);
2402
2402
  }), [T, g]);
@@ -2410,9 +2410,9 @@ const Vl = "--collapsible-panel-height", $l = "--collapsible-panel-width", Mi =
2410
2410
  width: D
2411
2411
  } = Fl({
2412
2412
  externalRef: n,
2413
- hiddenUntilFound: w,
2413
+ hiddenUntilFound: S,
2414
2414
  id: C,
2415
- keepMounted: S,
2415
+ keepMounted: w,
2416
2416
  mounted: u,
2417
2417
  onOpenChange: d,
2418
2418
  open: h,
@@ -2453,7 +2453,7 @@ const Vl = "--collapsible-panel-height", $l = "--collapsible-panel-width", Mi =
2453
2453
  return F ? _ : null;
2454
2454
  });
2455
2455
  process.env.NODE_ENV !== "production" && (Mi.displayName = "CollapsiblePanel");
2456
- function wt({ className: e, ...t }) {
2456
+ function St({ className: e, ...t }) {
2457
2457
  return /* @__PURE__ */ b("div", { "data-slot": "trace", className: ue("trace", e), ...t });
2458
2458
  }
2459
2459
  function Vt({
@@ -2513,7 +2513,7 @@ const Hl = ({ message: e, onRetry: t }) => /* @__PURE__ */ b(
2513
2513
  className: "chat-error-banner",
2514
2514
  role: "alert",
2515
2515
  children: /* @__PURE__ */ z(so, { children: [
2516
- /* @__PURE__ */ b(wt, { className: "chat-message-body", children: /* @__PURE__ */ z(Vt, { status: "error", children: [
2516
+ /* @__PURE__ */ b(St, { className: "chat-message-body", children: /* @__PURE__ */ z(Vt, { status: "error", children: [
2517
2517
  /* @__PURE__ */ b(Tt, { children: /* @__PURE__ */ b(Ea, { size: 14 }) }),
2518
2518
  /* @__PURE__ */ b($t, { className: "chat-error-title", children: e })
2519
2519
  ] }) }),
@@ -2541,7 +2541,7 @@ const Hl = ({ message: e, onRetry: t }) => /* @__PURE__ */ b(
2541
2541
  },
2542
2542
  qa: {
2543
2543
  label: "QA",
2544
- Icon: Sa,
2544
+ Icon: wa,
2545
2545
  variant: "env-badge--qa",
2546
2546
  tooltip: "Quality Assurance build"
2547
2547
  }
@@ -2829,28 +2829,28 @@ const tu = ({
2829
2829
  placeholder: r = "Ask something…",
2830
2830
  ref: o
2831
2831
  }) => {
2832
- const { suggestions: s, showSuggestions: i, suggestionBadgesEnabled: c, models: a, selectedModelId: l, selectModel: f } = er(), [u, d] = Ce(""), h = Ae(null), p = Ar(), g = Ar(), m = (S) => {
2833
- S && (S.style.height = "auto", S.style.height = `${Math.min(S.scrollHeight, 96)}px`);
2832
+ const { suggestions: s, showSuggestions: i, suggestionBadgesEnabled: c, models: a, selectedModelId: l, selectModel: f } = er(), [u, d] = Ce(""), h = Ae(null), p = Ar(), g = Ar(), m = (w) => {
2833
+ w && (w.style.height = "auto", w.style.height = `${Math.min(w.scrollHeight, 96)}px`);
2834
2834
  };
2835
2835
  jl(n, h), Qc(o, () => ({
2836
- edit(S) {
2836
+ edit(w) {
2837
2837
  var T;
2838
- n || (d(S), (T = h.current) == null || T.focus());
2838
+ n || (d(w), (T = h.current) == null || T.focus());
2839
2839
  }
2840
2840
  }), [n]), Ke(() => {
2841
2841
  m(h.current);
2842
2842
  }, [u]);
2843
2843
  const v = Mt(() => {
2844
2844
  if (!c || n) return [];
2845
- const S = u.trim();
2846
- return S ? eu(s, S) : i ? s : [];
2847
- }, [n, i, c, s, u]), E = (S) => {
2848
- d(S.query);
2845
+ const w = u.trim();
2846
+ return w ? eu(s, w) : i ? s : [];
2847
+ }, [n, i, c, s, u]), E = (w) => {
2848
+ d(w.query);
2849
2849
  const T = h.current;
2850
2850
  T == null || T.focus();
2851
- }, w = () => {
2852
- const S = u.trim();
2853
- !S || n || (e(S), d(""));
2851
+ }, S = () => {
2852
+ const w = u.trim();
2853
+ !w || n || (e(w), d(""));
2854
2854
  };
2855
2855
  return /* @__PURE__ */ z("div", { className: "chat-input-wrapper", children: [
2856
2856
  /* @__PURE__ */ b(
@@ -2862,8 +2862,8 @@ const tu = ({
2862
2862
  disabled: n
2863
2863
  }
2864
2864
  ),
2865
- /* @__PURE__ */ z("form", { onSubmit: (S) => {
2866
- S.preventDefault(), w();
2865
+ /* @__PURE__ */ z("form", { onSubmit: (w) => {
2866
+ w.preventDefault(), S();
2867
2867
  }, children: [
2868
2868
  /* @__PURE__ */ b("label", { htmlFor: p, className: "sr-only", children: "Chat message" }),
2869
2869
  /* @__PURE__ */ z(Gl, { children: [
@@ -2876,10 +2876,10 @@ const tu = ({
2876
2876
  value: u,
2877
2877
  disabled: n,
2878
2878
  placeholder: r,
2879
- onChange: (S) => d(S.target.value),
2880
- onKeyDown: (S) => {
2879
+ onChange: (w) => d(w.target.value),
2880
+ onKeyDown: (w) => {
2881
2881
  var T;
2882
- S.key === "Enter" && !S.shiftKey && !S.nativeEvent.isComposing && (S.preventDefault(), (T = S.currentTarget.form) == null || T.requestSubmit());
2882
+ w.key === "Enter" && !w.shiftKey && !w.nativeEvent.isComposing && (w.preventDefault(), (T = w.currentTarget.form) == null || T.requestSubmit());
2883
2883
  }
2884
2884
  }
2885
2885
  ),
@@ -2892,10 +2892,10 @@ const tu = ({
2892
2892
  id: g,
2893
2893
  value: l,
2894
2894
  disabled: n,
2895
- onChange: (S) => f(S.target.value),
2895
+ onChange: (w) => f(w.target.value),
2896
2896
  children: [
2897
2897
  /* @__PURE__ */ b("option", { value: "auto", children: "Automatic" }),
2898
- a.map((S) => /* @__PURE__ */ b("option", { value: S.id, disabled: !S.configured, children: S.label }, S.id))
2898
+ a.map((w) => /* @__PURE__ */ b("option", { value: w.id, disabled: !w.configured, children: w.label }, w.id))
2899
2899
  ]
2900
2900
  }
2901
2901
  )
@@ -3038,7 +3038,7 @@ function $i(e, t) {
3038
3038
  function Dn(e, t) {
3039
3039
  return e.getBoundingClientRect().top - t.getBoundingClientRect().top;
3040
3040
  }
3041
- function Su({ content: e, scrollTop: t, spacer: n, viewport: r }) {
3041
+ function wu({ content: e, scrollTop: t, spacer: n, viewport: r }) {
3042
3042
  let o = Eo({ content: e, spacer: n, viewport: r });
3043
3043
  return t + r.clientHeight - o;
3044
3044
  }
@@ -3050,7 +3050,7 @@ function Eo({ content: e, spacer: t, viewport: n }) {
3050
3050
  }
3051
3051
  return c;
3052
3052
  }
3053
- function wu(e) {
3053
+ function Su(e) {
3054
3054
  return Math.max(0, e.scrollHeight - e.clientHeight);
3055
3055
  }
3056
3056
  function Hi(e) {
@@ -3095,8 +3095,8 @@ function Pu(e, t) {
3095
3095
  return e.currentAnchorId !== t.currentAnchorId || e.visibleMessageIds.length !== t.visibleMessageIds.length ? !1 : e.visibleMessageIds.every((n, r) => n === t.visibleMessageIds[r]);
3096
3096
  }
3097
3097
  function Ou({ autoScroll: e, defaultScrollPosition: t, scrollEdgeThreshold: n, scrollMargin: r, scrollPreviousItemPeek: o }) {
3098
- let s = y.useRef(e), i = y.useRef(!1), c = y.useRef(null), a = y.useRef(!1), l = y.useRef(n), f = y.useRef(0), u = y.useRef(null), d = y.useRef(0), h = y.useRef(e ? "following-bottom" : "free-scrolling"), p = y.useRef(/* @__PURE__ */ new Map()), g = y.useRef(null), m = y.useRef(null), v = y.useRef(null), E = y.useRef(o), w = y.useRef(!0), S = y.useRef(null), T = y.useRef(r), C = y.useRef(null), R = y.useRef(0), P = y.useRef(0), O = y.useRef(null), M = y.useRef(null), F = y.useRef(null), A = y.useRef(null), D = y.useRef(null), I = y.useRef(null), x = y.useRef(null), _ = y.useRef(null), U = y.useRef(null), N = y.useRef(/* @__PURE__ */ new Set()), k = y.useRef(/* @__PURE__ */ new WeakSet());
3099
- return F.current === null && (F.current = fs(t === "end" || t === "last-anchor", (Y, K) => Y === K)), A.current === null && (A.current = fs(Vi, xu)), U.current === null && (U.current = Ru()), s.current = e, l.current = n, T.current = r, E.current = o, { autoScrollRef: s, autoscrollingRef: i, autoscrollingTimeoutRef: D, streamingTurnRef: v, contentRef: c, defaultScrollPositionAppliedRef: a, firstItemRef: u, itemCountRef: f, lastScrollTopRef: d, messageElementsRef: p, modeRef: h, pendingScrollFrameRef: C, pendingScrollToMessageRef: g, prependRestoreRef: m, preserveScrollOnPrependRef: w, pendingDefaultScrollStore: F.current, rootRef: S, scrollEdgeThresholdRef: l, scrollMarginRef: T, scrollPreviousItemPeekRef: E, spacerGapRef: R, spacerHeightRef: P, spacerRef: O, stateFrameRef: M, stateStore: A.current, viewportRef: I, visibilityFrameRef: x, visibilityObserverRef: _, visibilityStore: U.current, visibleMessageIdsRef: N, handledScrollAnchorsRef: k };
3098
+ let s = y.useRef(e), i = y.useRef(!1), c = y.useRef(null), a = y.useRef(!1), l = y.useRef(n), f = y.useRef(0), u = y.useRef(null), d = y.useRef(0), h = y.useRef(e ? "following-bottom" : "free-scrolling"), p = y.useRef(/* @__PURE__ */ new Map()), g = y.useRef(null), m = y.useRef(null), v = y.useRef(null), E = y.useRef(o), S = y.useRef(!0), w = y.useRef(null), T = y.useRef(r), C = y.useRef(null), R = y.useRef(0), P = y.useRef(0), O = y.useRef(null), M = y.useRef(null), F = y.useRef(null), A = y.useRef(null), D = y.useRef(null), I = y.useRef(null), x = y.useRef(null), _ = y.useRef(null), U = y.useRef(null), N = y.useRef(/* @__PURE__ */ new Set()), k = y.useRef(/* @__PURE__ */ new WeakSet());
3099
+ return F.current === null && (F.current = fs(t === "end" || t === "last-anchor", (Y, K) => Y === K)), A.current === null && (A.current = fs(Vi, xu)), U.current === null && (U.current = Ru()), s.current = e, l.current = n, T.current = r, E.current = o, { autoScrollRef: s, autoscrollingRef: i, autoscrollingTimeoutRef: D, streamingTurnRef: v, contentRef: c, defaultScrollPositionAppliedRef: a, firstItemRef: u, itemCountRef: f, lastScrollTopRef: d, messageElementsRef: p, modeRef: h, pendingScrollFrameRef: C, pendingScrollToMessageRef: g, prependRestoreRef: m, preserveScrollOnPrependRef: S, pendingDefaultScrollStore: F.current, rootRef: w, scrollEdgeThresholdRef: l, scrollMarginRef: T, scrollPreviousItemPeekRef: E, spacerGapRef: R, spacerHeightRef: P, spacerRef: O, stateFrameRef: M, stateStore: A.current, viewportRef: I, visibilityFrameRef: x, visibilityObserverRef: _, visibilityStore: U.current, visibleMessageIdsRef: N, handledScrollAnchorsRef: k };
3100
3100
  }
3101
3101
  function Ui(e) {
3102
3102
  e.pendingDefaultScrollStore.setSnapshot(!1);
@@ -3105,7 +3105,7 @@ function Fn(e) {
3105
3105
  e.defaultScrollPositionAppliedRef.current = !0, Ui(e);
3106
3106
  }
3107
3107
  function Iu({ refs: e, commitScrollState: t, scheduleStateCommit: n, scheduleVisibilitySync: r }) {
3108
- let { streamingTurnRef: o, autoScrollRef: s, autoscrollingRef: i, autoscrollingTimeoutRef: c, contentRef: a, itemCountRef: l, messageElementsRef: f, modeRef: u, pendingScrollToMessageRef: d, prependRestoreRef: h, scrollMarginRef: p, scrollPreviousItemPeekRef: g, spacerGapRef: m, spacerHeightRef: v, spacerRef: E, viewportRef: w } = e, S = y.useCallback((A) => {
3108
+ let { streamingTurnRef: o, autoScrollRef: s, autoscrollingRef: i, autoscrollingTimeoutRef: c, contentRef: a, itemCountRef: l, messageElementsRef: f, modeRef: u, pendingScrollToMessageRef: d, prependRestoreRef: h, scrollMarginRef: p, scrollPreviousItemPeekRef: g, spacerGapRef: m, spacerHeightRef: v, spacerRef: E, viewportRef: S } = e, w = y.useCallback((A) => {
3109
3109
  c.current !== null && (window.clearTimeout(c.current), c.current = null), i.current !== A && (i.current = A, t()), A && (c.current = window.setTimeout(() => {
3110
3110
  c.current = null, i.current = !1, t();
3111
3111
  }, uu));
@@ -3115,21 +3115,21 @@ function Iu({ refs: e, commitScrollState: t, scheduleStateCommit: n, scheduleVis
3115
3115
  let I = Math.max(0, Math.ceil(A));
3116
3116
  v.current !== I && (v.current = I, D.hidden = I === 0, D.style.height = `${I}px`, D.style.marginTop = I > 0 ? `${-m.current}px` : "");
3117
3117
  }, []), C = y.useCallback((A, { behavior: D = "auto", autoscrolling: I = !1 } = {}) => {
3118
- let x = w.current;
3118
+ let x = S.current;
3119
3119
  if (!x) return;
3120
3120
  let _ = Math.max(0, A);
3121
3121
  if (Math.abs(x.scrollTop - _) <= Hn) {
3122
3122
  x.scrollTop = _, t();
3123
3123
  return;
3124
3124
  }
3125
- I && S(!0), x.scrollTo({ top: _, behavior: D }), n();
3126
- }, [t, n, S]), R = y.useCallback(({ behavior: A = "auto" } = {}) => w.current ? (T(0), o.current = null, u.current = "free-scrolling", C(0, { behavior: A }), r(), !0) : !1, [r, C, T]), P = y.useCallback(({ behavior: A = "auto" } = {}) => {
3127
- let D = w.current;
3128
- return D ? (T(0), o.current = null, u.current = s.current ? "following-bottom" : "free-scrolling", C(wu(D), { autoscrolling: !0, behavior: A }), r(), !0) : !1;
3125
+ I && w(!0), x.scrollTo({ top: _, behavior: D }), n();
3126
+ }, [t, n, w]), R = y.useCallback(({ behavior: A = "auto" } = {}) => S.current ? (T(0), o.current = null, u.current = "free-scrolling", C(0, { behavior: A }), r(), !0) : !1, [r, C, T]), P = y.useCallback(({ behavior: A = "auto" } = {}) => {
3127
+ let D = S.current;
3128
+ return D ? (T(0), o.current = null, u.current = s.current ? "following-bottom" : "free-scrolling", C(Su(D), { autoscrolling: !0, behavior: A }), r(), !0) : !1;
3129
3129
  }, [r, C, T]), O = y.useCallback((A, { align: D = "start", behavior: I = "auto", scrollMargin: x = p.current } = {}, { keepPreviousPeek: _ = !1 } = {}) => {
3130
- let U = a.current, N = w.current;
3130
+ let U = a.current, N = S.current;
3131
3131
  if (!U || !N || !U.contains(A)) return !1;
3132
- let k = Eu({ align: D, element: A, scrollMargin: _ ? x + g.current : x, spacer: E.current, viewport: N }), Y = Su({ content: U, scrollTop: k, spacer: E.current, viewport: N });
3132
+ let k = Eu({ align: D, element: A, scrollMargin: _ ? x + g.current : x, spacer: E.current, viewport: N }), Y = wu({ content: U, scrollTop: k, spacer: E.current, viewport: N });
3133
3133
  return T(Y), h.current = { element: A, viewportTop: Dn(A, N) }, u.current = _ ? "anchored-to-message" : "settling-jump", o.current = _ ? A : null, C(k, { behavior: I }), r(), !0;
3134
3134
  }, [r, C, T]), M = y.useCallback(() => {
3135
3135
  let A = o.current;
@@ -3151,20 +3151,20 @@ function ds(e, t) {
3151
3151
  }, [e, t]);
3152
3152
  }
3153
3153
  function _u({ autoScroll: e = !1, defaultScrollPosition: t = "end", scrollEdgeThreshold: n = cu, scrollPreviousItemPeek: r = au, scrollMargin: o = lu }) {
3154
- let s = Ou({ autoScroll: e, defaultScrollPosition: t, scrollEdgeThreshold: n, scrollMargin: o, scrollPreviousItemPeek: r }), { streamingTurnRef: i, autoScrollRef: c, autoscrollingRef: a, autoscrollingTimeoutRef: l, contentRef: f, defaultScrollPositionAppliedRef: u, firstItemRef: d, itemCountRef: h, lastScrollTopRef: p, messageElementsRef: g, modeRef: m, pendingScrollFrameRef: v, pendingScrollToMessageRef: E, prependRestoreRef: w, preserveScrollOnPrependRef: S, pendingDefaultScrollStore: T, rootRef: C, scrollEdgeThresholdRef: R, scrollMarginRef: P, scrollPreviousItemPeekRef: O, spacerGapRef: M, spacerHeightRef: F, spacerRef: A, stateFrameRef: D, stateStore: I, viewportRef: x, visibilityFrameRef: _, visibilityObserverRef: U, visibilityStore: N, visibleMessageIdsRef: k, handledScrollAnchorsRef: Y } = s, K = y.useRef(t);
3154
+ let s = Ou({ autoScroll: e, defaultScrollPosition: t, scrollEdgeThreshold: n, scrollMargin: o, scrollPreviousItemPeek: r }), { streamingTurnRef: i, autoScrollRef: c, autoscrollingRef: a, autoscrollingTimeoutRef: l, contentRef: f, defaultScrollPositionAppliedRef: u, firstItemRef: d, itemCountRef: h, lastScrollTopRef: p, messageElementsRef: g, modeRef: m, pendingScrollFrameRef: v, pendingScrollToMessageRef: E, prependRestoreRef: S, preserveScrollOnPrependRef: w, pendingDefaultScrollStore: T, rootRef: C, scrollEdgeThresholdRef: R, scrollMarginRef: P, scrollPreviousItemPeekRef: O, spacerGapRef: M, spacerHeightRef: F, spacerRef: A, stateFrameRef: D, stateStore: I, viewportRef: x, visibilityFrameRef: _, visibilityObserverRef: U, visibilityStore: N, visibleMessageIdsRef: k, handledScrollAnchorsRef: Y } = s, K = y.useRef(t);
3155
3155
  K.current !== t && (K.current = t, u.current = !1);
3156
3156
  let le = y.useCallback((V) => {
3157
- let q = C.current, Z = x.current, se = [V.start && "start", V.end && "end"].filter(Boolean).join(" "), Ne = a.current;
3158
- for (let Re of [q, Z]) Re && (se ? Re.setAttribute("data-scrollable", se) : Re.removeAttribute("data-scrollable"), Re.toggleAttribute("data-autoscrolling", Ne));
3157
+ let j = C.current, Z = x.current, se = [V.start && "start", V.end && "end"].filter(Boolean).join(" "), Ne = a.current;
3158
+ for (let Re of [j, Z]) Re && (se ? Re.setAttribute("data-scrollable", se) : Re.removeAttribute("data-scrollable"), Re.toggleAttribute("data-autoscrolling", Ne));
3159
3159
  }, []), ie = y.useCallback((V) => {
3160
3160
  var se;
3161
- let q = ((se = x.current) == null ? void 0 : se.scrollTop) ?? 0, Z = q < p.current - Hn;
3162
- p.current = q, c.current && !V.end && m.current !== "settling-jump" && m.current !== "anchored-to-message" ? m.current = "following-bottom" : m.current === "following-bottom" && V.end && Z && !a.current && (m.current = "free-scrolling");
3161
+ let j = ((se = x.current) == null ? void 0 : se.scrollTop) ?? 0, Z = j < p.current - Hn;
3162
+ p.current = j, c.current && !V.end && m.current !== "settling-jump" && m.current !== "anchored-to-message" ? m.current = "following-bottom" : m.current === "following-bottom" && V.end && Z && !a.current && (m.current = "free-scrolling");
3163
3163
  }, []), L = y.useCallback(() => {
3164
3164
  let V = pu({ content: f.current, scrollEdgeThreshold: R.current, spacer: A.current, viewport: x.current });
3165
3165
  ie(V);
3166
- let q = m.current === "following-bottom" ? { ...V, end: !1 } : V;
3167
- le(q), I.setSnapshot(q);
3166
+ let j = m.current === "following-bottom" ? { ...V, end: !1 } : V;
3167
+ le(j), I.setSnapshot(j);
3168
3168
  }, [ie, I, le]), X = y.useCallback(() => {
3169
3169
  D.current === null && (D.current = window.requestAnimationFrame(() => {
3170
3170
  D.current = null, L();
@@ -3173,55 +3173,55 @@ function _u({ autoScroll: e = !1, defaultScrollPosition: t = "end", scrollEdgeTh
3173
3173
  N.hasListeners() && _.current === null && (_.current = window.requestAnimationFrame(() => {
3174
3174
  _.current = null, N.hasListeners() && N.setSnapshot(hu({ content: f.current, scrollMargin: P.current, scrollPreviousItemPeek: O.current, spacer: A.current, viewport: x.current, visibleMessageIds: k.current }));
3175
3175
  }));
3176
- }, [N]), { flushPendingScrollToMessage: $, reanchorToAnchoredMessage: Q, scrollToElement: re, scrollToEnd: ee, scrollToMessage: te, scrollToStart: W } = Iu({ refs: s, commitScrollState: L, scheduleStateCommit: X, scheduleVisibilitySync: B }), ne = y.useCallback(() => {
3177
- let V = w.current, q = x.current;
3178
- if (!V || !q || !V.element.isConnected) return !1;
3179
- let Z = Dn(V.element, q) - V.viewportTop;
3180
- return Math.abs(Z) <= Hn ? !1 : (q.scrollTop += Z, V.viewportTop = Dn(V.element, q), X(), B(), !0);
3176
+ }, [N]), { flushPendingScrollToMessage: $, reanchorToAnchoredMessage: Q, scrollToElement: re, scrollToEnd: ee, scrollToMessage: te, scrollToStart: q } = Iu({ refs: s, commitScrollState: L, scheduleStateCommit: X, scheduleVisibilitySync: B }), ne = y.useCallback(() => {
3177
+ let V = S.current, j = x.current;
3178
+ if (!V || !j || !V.element.isConnected) return !1;
3179
+ let Z = Dn(V.element, j) - V.viewportTop;
3180
+ return Math.abs(Z) <= Hn ? !1 : (j.scrollTop += Z, V.viewportTop = Dn(V.element, j), X(), B(), !0);
3181
3181
  }, [X, B]), oe = y.useCallback(() => {
3182
- let V = f.current, q = x.current;
3183
- if (!V || !q) {
3184
- w.current = null;
3182
+ let V = f.current, j = x.current;
3183
+ if (!V || !j) {
3184
+ S.current = null;
3185
3185
  return;
3186
3186
  }
3187
- let Z = yu({ content: V, spacer: A.current, viewport: q });
3188
- w.current = Z ? { element: Z, viewportTop: Dn(Z, q) } : null;
3187
+ let Z = yu({ content: V, spacer: A.current, viewport: j });
3188
+ S.current = Z ? { element: Z, viewportTop: Dn(Z, j) } : null;
3189
3189
  }, []), ve = y.useCallback(() => {
3190
3190
  v.current === null && (v.current = window.requestAnimationFrame(() => {
3191
3191
  v.current = null, $() && oe();
3192
3192
  }));
3193
- }, [oe, $]), j = y.useCallback(() => {
3193
+ }, [oe, $]), W = y.useCallback(() => {
3194
3194
  if (!t || u.current || h.current === 0) return !1;
3195
3195
  let V = !1;
3196
3196
  if (t === "last-anchor") {
3197
- let q = f.current, Z = x.current, se = q && Z ? vu(on(q, A.current)) : null;
3198
- if (!q || !Z || !se) V = ee({ behavior: "auto" });
3197
+ let j = f.current, Z = x.current, se = j && Z ? vu(on(j, A.current)) : null;
3198
+ if (!j || !Z || !se) V = ee({ behavior: "auto" });
3199
3199
  else {
3200
3200
  let Ne = $i(se, Z);
3201
- V = Eo({ content: q, spacer: A.current, viewport: Z }) - Ne <= Z.clientHeight ? ee({ behavior: "auto" }) : re(se, { align: "start" }, { keepPreviousPeek: !0 });
3201
+ V = Eo({ content: j, spacer: A.current, viewport: Z }) - Ne <= Z.clientHeight ? ee({ behavior: "auto" }) : re(se, { align: "start" }, { keepPreviousPeek: !0 });
3202
3202
  }
3203
- } else V = t === "end" ? ee({ behavior: "auto" }) : W({ behavior: "auto" });
3203
+ } else V = t === "end" ? ee({ behavior: "auto" }) : q({ behavior: "auto" });
3204
3204
  return V ? (Fn(s), !0) : !1;
3205
- }, [t, re, ee, W]), J = y.useCallback(() => {
3205
+ }, [t, re, ee, q]), J = y.useCallback(() => {
3206
3206
  let V = f.current;
3207
3207
  if (!V) return;
3208
- let q = on(V, A.current), Z = h.current, se = d.current;
3209
- h.current = q.length, d.current = q[0] ?? null, (() => {
3208
+ let j = on(V, A.current), Z = h.current, se = d.current;
3209
+ h.current = j.length, d.current = j[0] ?? null, (() => {
3210
3210
  if ($()) return;
3211
3211
  if (Z === 0) {
3212
- if (j() || q.length > 0 && c.current && ee({ behavior: "auto" })) return;
3212
+ if (W() || j.length > 0 && c.current && ee({ behavior: "auto" })) return;
3213
3213
  L(), B();
3214
3214
  return;
3215
3215
  }
3216
- let Ne = se ? q.indexOf(se) : -1;
3217
- if (S.current && Ne > 0) {
3216
+ let Ne = se ? j.indexOf(se) : -1;
3217
+ if (w.current && Ne > 0) {
3218
3218
  ne();
3219
3219
  return;
3220
3220
  }
3221
- if (q.length > Z) {
3222
- let Re = gu(q, Z);
3221
+ if (j.length > Z) {
3222
+ let Re = gu(j, Z);
3223
3223
  if (Re) {
3224
- if (c.current && m.current === "following-bottom" && bu(q, Z)) {
3224
+ if (c.current && m.current === "following-bottom" && bu(j, Z)) {
3225
3225
  ee({ behavior: "auto" });
3226
3226
  return;
3227
3227
  }
@@ -3229,8 +3229,8 @@ function _u({ autoScroll: e = !1, defaultScrollPosition: t = "end", scrollEdgeTh
3229
3229
  return;
3230
3230
  }
3231
3231
  }
3232
- if (q.length === Z) {
3233
- let Re = mu(q, Y.current);
3232
+ if (j.length === Z) {
3233
+ let Re = mu(j, Y.current);
3234
3234
  if (Re) {
3235
3235
  re(Re, { align: "start" }, { keepPreviousPeek: !0 }), Y.current.add(Re);
3236
3236
  return;
@@ -3238,7 +3238,7 @@ function _u({ autoScroll: e = !1, defaultScrollPosition: t = "end", scrollEdgeTh
3238
3238
  }
3239
3239
  m.current === "following-bottom" && c.current ? ee({ behavior: "auto" }) : (L(), B());
3240
3240
  })(), oe();
3241
- }, [j, oe, L, $, ne, B, re, ee]), ce = y.useCallback(() => {
3241
+ }, [W, oe, L, $, ne, B, re, ee]), ce = y.useCallback(() => {
3242
3242
  if (m.current === "following-bottom" && c.current) {
3243
3243
  ee({ behavior: "auto" });
3244
3244
  return;
@@ -3256,24 +3256,24 @@ function _u({ autoScroll: e = !1, defaultScrollPosition: t = "end", scrollEdgeTh
3256
3256
  B();
3257
3257
  return;
3258
3258
  }
3259
- U.current || (U.current = new IntersectionObserver((q) => {
3260
- for (let Z of q) {
3259
+ U.current || (U.current = new IntersectionObserver((j) => {
3260
+ for (let Z of j) {
3261
3261
  let se = Z.target.dataset.messageId;
3262
3262
  se && (Z.isIntersecting ? k.current.add(se) : k.current.delete(se));
3263
3263
  }
3264
3264
  B();
3265
- }, { root: V, rootMargin: `${-(P.current + O.current)}px 0px 0px 0px`, threshold: [0, 0.01, 0.5, 1] })), g.current.forEach((q) => {
3265
+ }, { root: V, rootMargin: `${-(P.current + O.current)}px 0px 0px 0px`, threshold: [0, 0.01, 0.5, 1] })), g.current.forEach((j) => {
3266
3266
  var Z;
3267
- (Z = U.current) == null || Z.observe(q);
3267
+ (Z = U.current) == null || Z.observe(j);
3268
3268
  }), B();
3269
3269
  }
3270
3270
  }, [B, N]), Ie = y.useCallback(() => {
3271
3271
  var V;
3272
3272
  _.current !== null && (window.cancelAnimationFrame(_.current), _.current = null), (V = U.current) == null || V.disconnect(), U.current = null, k.current.clear(), N.setSnapshot(zn);
3273
- }, [N]), Fe = y.useCallback((V, q, Z) => {
3273
+ }, [N]), Fe = y.useCallback((V, j, Z) => {
3274
3274
  var se, Ne, Re;
3275
- if (q) {
3276
- g.current.set(V, q), (se = U.current) == null || se.observe(q), B(), ((Ne = E.current) == null ? void 0 : Ne.messageId) === V && ve();
3275
+ if (j) {
3276
+ g.current.set(V, j), (se = U.current) == null || se.observe(j), B(), ((Ne = E.current) == null ? void 0 : Ne.messageId) === V && ve();
3277
3277
  return;
3278
3278
  }
3279
3279
  Z && g.current.get(V) === Z && (g.current.delete(V), k.current.delete(V), (Re = U.current) == null || Re.unobserve(Z), B());
@@ -3281,14 +3281,14 @@ function _u({ autoScroll: e = !1, defaultScrollPosition: t = "end", scrollEdgeTh
3281
3281
  (m.current === "following-bottom" || m.current === "anchored-to-message" || m.current === "settling-jump") && (i.current = null, m.current = "free-scrolling");
3282
3282
  }, []), Le = y.useCallback(() => le(I.getSnapshot()), [I, le]), ze = ds(C, Le), H = ds(x, Le), G = y.useCallback((V) => {
3283
3283
  f.current = V;
3284
- }, []), we = y.useCallback((V) => {
3284
+ }, []), Se = y.useCallback((V) => {
3285
3285
  A.current = V, M.current = Tu((V == null ? void 0 : V.parentElement) ?? null);
3286
3286
  }, []), be = y.useCallback(() => {
3287
3287
  L(), B(), oe();
3288
- }, [oe, L, B]), ge = y.useMemo(() => ({ handleContentChange: J, handleResize: ce, observeVisibility: he, pendingDefaultScrollStore: T, preserveScrollOnPrependRef: S, scrollToEnd: ee, scrollToMessage: te, scrollToStart: W, setContentElement: G, setRootElement: ze, setSpacerElement: we, setViewportElement: H, stateStore: I, syncAfterScroll: be, unobserveVisibility: Ie, userScrollIntent: xe, viewportRef: x, visibilityStore: N }), [J, ce, he, T, ee, te, W, G, ze, we, H, I, be, Ie, xe, N]);
3288
+ }, [oe, L, B]), ge = y.useMemo(() => ({ handleContentChange: J, handleResize: ce, observeVisibility: he, pendingDefaultScrollStore: T, preserveScrollOnPrependRef: w, scrollToEnd: ee, scrollToMessage: te, scrollToStart: q, setContentElement: G, setRootElement: ze, setSpacerElement: Se, setViewportElement: H, stateStore: I, syncAfterScroll: be, unobserveVisibility: Ie, userScrollIntent: xe, viewportRef: x, visibilityStore: N }), [J, ce, he, T, ee, te, q, G, ze, Se, H, I, be, Ie, xe, N]);
3289
3289
  return y.useLayoutEffect(() => {
3290
- j() || h.current === 0 && Ui(s);
3291
- }, [j]), y.useEffect(() => () => {
3290
+ W() || h.current === 0 && Ui(s);
3291
+ }, [W]), y.useEffect(() => () => {
3292
3292
  var V;
3293
3293
  D.current !== null && (window.cancelAnimationFrame(D.current), D.current = null), _.current !== null && (window.cancelAnimationFrame(_.current), _.current = null), l.current !== null && (window.clearTimeout(l.current), l.current = null), v.current !== null && (window.cancelAnimationFrame(v.current), v.current = null), (V = U.current) == null || V.disconnect(), U.current = null;
3294
3294
  }, []), y.useLayoutEffect(() => {
@@ -3333,10 +3333,10 @@ function Du({ "aria-label": e, children: t, onKeyDown: n, onScroll: r, onTouchMo
3333
3333
  var P;
3334
3334
  h(R), (P = un(c)) == null || P(R);
3335
3335
  }, [c, h]);
3336
- function w(R) {
3336
+ function S(R) {
3337
3337
  p(), r == null || r(R);
3338
3338
  }
3339
- function S(R) {
3339
+ function w(R) {
3340
3340
  g(), s == null || s(R);
3341
3341
  }
3342
3342
  function T(R) {
@@ -3354,7 +3354,7 @@ function Du({ "aria-label": e, children: t, onKeyDown: n, onScroll: r, onTouchMo
3354
3354
  return O.observe(R), () => {
3355
3355
  window.cancelAnimationFrame(P), O.disconnect();
3356
3356
  };
3357
- }, [u, m]), b("div", { ref: E, role: a ?? "region", "aria-label": e ?? "Messages", tabIndex: l ?? 0, onKeyDown: C, onScroll: w, onTouchMove: T, onWheel: S, ...f, ...v ? { "data-pending-scroll": "" } : null, children: t });
3357
+ }, [u, m]), b("div", { ref: E, role: a ?? "region", "aria-label": e ?? "Messages", tabIndex: l ?? 0, onKeyDown: C, onScroll: S, onTouchMove: T, onWheel: w, ...f, ...v ? { "data-pending-scroll": "" } : null, children: t });
3358
3358
  }
3359
3359
  function Fu({ "aria-relevant": e, children: t, ref: n, role: r, spacerClassName: o, ...s }) {
3360
3360
  let { handleContentChange: i, handleResize: c, setContentElement: a, setSpacerElement: l } = fn(), f = y.useRef(null), u = y.useCallback((d) => {
@@ -3559,7 +3559,7 @@ function qu({ message: e, onFeedback: t }) {
3559
3559
  ] })
3560
3560
  ] });
3561
3561
  }
3562
- function So(e) {
3562
+ function wo(e) {
3563
3563
  const t = e.trim();
3564
3564
  if (!/[\u0000-\u001f\u007f]/.test(t) && /^(https?:\/\/|mailto:|\/(?!\/)|#)/i.test(t))
3565
3565
  return t;
@@ -3573,13 +3573,13 @@ function hs(e) {
3573
3573
  function Gu() {
3574
3574
  return !!(typeof window < "u" && window.document && window.document.createElement);
3575
3575
  }
3576
- function wo(e, t) {
3576
+ function So(e, t) {
3577
3577
  const n = Object.keys(e), r = Object.keys(t);
3578
3578
  if (n.length !== r.length) return !1;
3579
3579
  const o = JSON.stringify(Object.keys(e.breakpoints || {})), s = JSON.stringify(Object.keys(t.breakpoints || {}));
3580
3580
  return o !== s ? !1 : n.every((i) => {
3581
3581
  const c = e[i], a = t[i];
3582
- return typeof c == "function" ? `${c}` == `${a}` : !hs(c) || !hs(a) ? c === a : wo(c, a);
3582
+ return typeof c == "function" ? `${c}` == `${a}` : !hs(c) || !hs(a) ? c === a : So(c, a);
3583
3583
  });
3584
3584
  }
3585
3585
  function gs(e) {
@@ -3590,7 +3590,7 @@ function Ku(e, t) {
3590
3590
  const n = gs(e), r = gs(t);
3591
3591
  return n.every((o, s) => {
3592
3592
  const i = r[s];
3593
- return wo(o, i);
3593
+ return So(o, i);
3594
3594
  });
3595
3595
  }
3596
3596
  function Co(e) {
@@ -3817,8 +3817,8 @@ function Yi(e, t, n) {
3817
3817
  }
3818
3818
  function ef(e, t, n, r, o, s, i, c, a, l, f, u, d, h, p, g, m, v, E) {
3819
3819
  const {
3820
- cross: w,
3821
- direction: S
3820
+ cross: S,
3821
+ direction: w
3822
3822
  } = e, T = ["INPUT", "SELECT", "TEXTAREA"], C = {
3823
3823
  passive: !1
3824
3824
  }, R = an(), P = an(), O = Rt(50, 225).constrain(h.measure(20)), M = {
@@ -3829,10 +3829,10 @@ function ef(e, t, n, r, o, s, i, c, a, l, f, u, d, h, p, g, m, v, E) {
3829
3829
  touch: 600
3830
3830
  }, A = p ? 43 : 25;
3831
3831
  let D = !1, I = 0, x = 0, _ = !1, U = !1, N = !1, k = !1;
3832
- function Y(W) {
3832
+ function Y(q) {
3833
3833
  if (!E) return;
3834
3834
  function ne(ve) {
3835
- (cr(E) || E(W, ve)) && B(ve);
3835
+ (cr(E) || E(q, ve)) && B(ve);
3836
3836
  }
3837
3837
  const oe = t;
3838
3838
  R.add(oe, "dragstart", (ve) => ve.preventDefault(), C).add(oe, "touchmove", () => {
@@ -3843,38 +3843,38 @@ function ef(e, t, n, r, o, s, i, c, a, l, f, u, d, h, p, g, m, v, E) {
3843
3843
  R.clear(), P.clear();
3844
3844
  }
3845
3845
  function le() {
3846
- const W = k ? n : t;
3847
- P.add(W, "touchmove", $, C).add(W, "touchend", Q).add(W, "mousemove", $, C).add(W, "mouseup", Q);
3846
+ const q = k ? n : t;
3847
+ P.add(q, "touchmove", $, C).add(q, "touchend", Q).add(q, "mousemove", $, C).add(q, "mouseup", Q);
3848
3848
  }
3849
- function ie(W) {
3850
- const ne = W.nodeName || "";
3849
+ function ie(q) {
3850
+ const ne = q.nodeName || "";
3851
3851
  return T.includes(ne);
3852
3852
  }
3853
3853
  function L() {
3854
3854
  return (p ? F : M)[k ? "mouse" : "touch"];
3855
3855
  }
3856
- function X(W, ne) {
3857
- const oe = u.add(To(W) * -1), ve = f.byDistance(W, !p).distance;
3858
- return p || Te(W) < O ? ve : m && ne ? ve * 0.5 : f.byIndex(oe.get(), 0).distance;
3856
+ function X(q, ne) {
3857
+ const oe = u.add(To(q) * -1), ve = f.byDistance(q, !p).distance;
3858
+ return p || Te(q) < O ? ve : m && ne ? ve * 0.5 : f.byIndex(oe.get(), 0).distance;
3859
3859
  }
3860
- function B(W) {
3861
- const ne = Ur(W, r);
3862
- k = ne, N = p && ne && !W.buttons && D, D = Qt(o.get(), i.get()) >= 2, !(ne && W.button !== 0) && (ie(W.target) || (_ = !0, s.pointerDown(W), l.useFriction(0).useDuration(0), o.set(i), le(), I = s.readPoint(W), x = s.readPoint(W, w), d.emit("pointerDown")));
3860
+ function B(q) {
3861
+ const ne = Ur(q, r);
3862
+ k = ne, N = p && ne && !q.buttons && D, D = Qt(o.get(), i.get()) >= 2, !(ne && q.button !== 0) && (ie(q.target) || (_ = !0, s.pointerDown(q), l.useFriction(0).useDuration(0), o.set(i), le(), I = s.readPoint(q), x = s.readPoint(q, S), d.emit("pointerDown")));
3863
3863
  }
3864
- function $(W) {
3865
- if (!Ur(W, r) && W.touches.length >= 2) return Q(W);
3866
- const oe = s.readPoint(W), ve = s.readPoint(W, w), j = Qt(oe, I), J = Qt(ve, x);
3867
- if (!U && !k && (!W.cancelable || (U = j > J, !U)))
3868
- return Q(W);
3869
- const ce = s.pointerMove(W);
3870
- j > g && (N = !0), l.useFriction(0.3).useDuration(0.75), c.start(), o.add(S(ce)), W.preventDefault();
3864
+ function $(q) {
3865
+ if (!Ur(q, r) && q.touches.length >= 2) return Q(q);
3866
+ const oe = s.readPoint(q), ve = s.readPoint(q, S), W = Qt(oe, I), J = Qt(ve, x);
3867
+ if (!U && !k && (!q.cancelable || (U = W > J, !U)))
3868
+ return Q(q);
3869
+ const ce = s.pointerMove(q);
3870
+ W > g && (N = !0), l.useFriction(0.3).useDuration(0.75), c.start(), o.add(w(ce)), q.preventDefault();
3871
3871
  }
3872
- function Q(W) {
3873
- const oe = f.byDistance(0, !1).index !== u.get(), ve = s.pointerUp(W) * L(), j = X(S(ve), oe), J = Yu(ve, j), ce = A - 10 * J, he = v + J / 50;
3874
- U = !1, _ = !1, P.clear(), l.useDuration(ce).useFriction(he), a.distance(j, !p), k = !1, d.emit("pointerUp");
3872
+ function Q(q) {
3873
+ const oe = f.byDistance(0, !1).index !== u.get(), ve = s.pointerUp(q) * L(), W = X(w(ve), oe), J = Yu(ve, W), ce = A - 10 * J, he = v + J / 50;
3874
+ U = !1, _ = !1, P.clear(), l.useDuration(ce).useFriction(he), a.distance(W, !p), k = !1, d.emit("pointerUp");
3875
3875
  }
3876
- function re(W) {
3877
- N && (W.stopPropagation(), W.preventDefault(), N = !1);
3876
+ function re(q) {
3877
+ N && (q.stopPropagation(), q.preventDefault(), N = !1);
3878
3878
  }
3879
3879
  function ee() {
3880
3880
  return _;
@@ -3952,9 +3952,9 @@ function of(e, t, n, r, o, s, i) {
3952
3952
  if (!s) return;
3953
3953
  l = d(e), f = r.map(d);
3954
3954
  function v(E) {
3955
- for (const w of E) {
3955
+ for (const S of E) {
3956
3956
  if (u) return;
3957
- const S = w.target === e, T = r.indexOf(w.target), C = S ? l : f[T], R = d(S ? e : r[T]);
3957
+ const w = S.target === e, T = r.indexOf(S.target), C = w ? l : f[T], R = d(w ? e : r[T]);
3958
3958
  if (Te(R - C) >= 0.5) {
3959
3959
  m.reInit(), t.emit("resize");
3960
3960
  break;
@@ -3996,15 +3996,15 @@ function sf(e, t, n, r, o, s) {
3996
3996
  return i;
3997
3997
  }
3998
3998
  function v() {
3999
- return w(o);
3999
+ return S(o);
4000
4000
  }
4001
4001
  function E() {
4002
- return S(s);
4002
+ return w(s);
4003
4003
  }
4004
- function w(C) {
4004
+ function S(C) {
4005
4005
  return a = C, T;
4006
4006
  }
4007
- function S(C) {
4007
+ function w(C) {
4008
4008
  return l = C, T;
4009
4009
  }
4010
4010
  const T = {
@@ -4015,8 +4015,8 @@ function sf(e, t, n, r, o, s) {
4015
4015
  settled: h,
4016
4016
  useBaseFriction: E,
4017
4017
  useBaseDuration: v,
4018
- useFriction: S,
4019
- useDuration: w
4018
+ useFriction: w,
4019
+ useDuration: S
4020
4020
  };
4021
4021
  return T;
4022
4022
  }
@@ -4054,8 +4054,8 @@ function af(e, t, n, r, o) {
4054
4054
  const {
4055
4055
  min: m,
4056
4056
  max: v
4057
- } = s, E = s.constrain(p), w = !g, S = Ro(n, g);
4058
- return w ? v : S || l(m, E) ? m : l(v, E) ? v : E;
4057
+ } = s, E = s.constrain(p), S = !g, w = Ro(n, g);
4058
+ return S ? v : w || l(m, E) ? m : l(v, E) ? v : E;
4059
4059
  }).map((p) => parseFloat(p.toFixed(3)));
4060
4060
  }
4061
4061
  function d() {
@@ -4141,12 +4141,12 @@ function pf(e, t, n, r, o, s) {
4141
4141
  return n.length === 1 ? [s] : h ? d : d.slice(c, a).map((p, g, m) => {
4142
4142
  const v = !g, E = Ro(m, g);
4143
4143
  if (v) {
4144
- const w = Ze(m[0]) + 1;
4145
- return bs(w);
4144
+ const S = Ze(m[0]) + 1;
4145
+ return bs(S);
4146
4146
  }
4147
4147
  if (E) {
4148
- const w = dn(s) - Ze(m)[0] + 1;
4149
- return bs(w, Ze(m)[0]);
4148
+ const S = dn(s) - Ze(m)[0] + 1;
4149
+ return bs(S, Ze(m)[0]);
4150
4150
  }
4151
4151
  return p;
4152
4152
  });
@@ -4165,10 +4165,10 @@ function hf(e, t, n, r, o) {
4165
4165
  return p.concat().sort((g, m) => Te(g) - Te(m))[0];
4166
4166
  }
4167
4167
  function l(p) {
4168
- const g = e ? i(p) : c(p), m = t.map((E, w) => ({
4168
+ const g = e ? i(p) : c(p), m = t.map((E, S) => ({
4169
4169
  diff: f(E - g, 0),
4170
- index: w
4171
- })).sort((E, w) => Te(E.diff) - Te(w.diff)), {
4170
+ index: S
4171
+ })).sort((E, S) => Te(E.diff) - Te(S.diff)), {
4172
4172
  index: v
4173
4173
  } = m[0];
4174
4174
  return {
@@ -4194,12 +4194,12 @@ function hf(e, t, n, r, o) {
4194
4194
  const m = o.get() + p, {
4195
4195
  index: v,
4196
4196
  distance: E
4197
- } = l(m), w = !e && s(m);
4198
- if (!g || w) return {
4197
+ } = l(m), S = !e && s(m);
4198
+ if (!g || S) return {
4199
4199
  index: v,
4200
4200
  distance: p
4201
4201
  };
4202
- const S = t[v] - E, T = p + f(S, 0);
4202
+ const w = t[v] - E, T = p + f(w, 0);
4203
4203
  return {
4204
4204
  index: v,
4205
4205
  distance: T
@@ -4240,7 +4240,7 @@ function mf(e, t, n, r, o, s, i, c) {
4240
4240
  function p(g) {
4241
4241
  if ((/* @__PURE__ */ new Date()).getTime() - l > 10) return;
4242
4242
  i.emit("slideFocusStart"), e.scrollLeft = 0;
4243
- const E = n.findIndex((w) => w.includes(g));
4243
+ const E = n.findIndex((S) => S.includes(g));
4244
4244
  Co(E) && (o.useDuration(0), r.index(E, 0), i.emit("slideFocus"));
4245
4245
  }
4246
4246
  s.add(document, "keydown", u, !1), t.forEach((g, m) => {
@@ -4341,7 +4341,7 @@ function bf(e, t, n, r, o, s, i, c, a) {
4341
4341
  const R = t - i[0] - 1, P = p(f, R);
4342
4342
  return m(P, -n, !0);
4343
4343
  }
4344
- function w() {
4344
+ function S() {
4345
4345
  return d.every(({
4346
4346
  index: R
4347
4347
  }) => {
@@ -4349,7 +4349,7 @@ function bf(e, t, n, r, o, s, i, c, a) {
4349
4349
  return h(P, t) <= 0.1;
4350
4350
  });
4351
4351
  }
4352
- function S() {
4352
+ function w() {
4353
4353
  d.forEach((R) => {
4354
4354
  const {
4355
4355
  target: P,
@@ -4363,9 +4363,9 @@ function bf(e, t, n, r, o, s, i, c, a) {
4363
4363
  d.forEach((R) => R.translate.clear());
4364
4364
  }
4365
4365
  return {
4366
- canLoop: w,
4366
+ canLoop: S,
4367
4367
  clear: T,
4368
- loop: S,
4368
+ loop: w,
4369
4369
  loopPoints: d
4370
4370
  };
4371
4371
  }
@@ -4448,9 +4448,9 @@ function Ef(e, t, n, r, o, s) {
4448
4448
  return parseFloat(E.getPropertyValue(`margin-${a}`));
4449
4449
  }
4450
4450
  function m() {
4451
- return n.map((E, w, S) => {
4452
- const T = !w, C = Ro(S, w);
4453
- return T ? d[w] + f : C ? d[w] + u : S[w + 1][c] - E[c];
4451
+ return n.map((E, S, w) => {
4452
+ const T = !S, C = Ro(w, S);
4453
+ return T ? d[S] + f : C ? d[S] + u : w[S + 1][c] - E[c];
4454
4454
  }).map(Te);
4455
4455
  }
4456
4456
  return {
@@ -4460,21 +4460,21 @@ function Ef(e, t, n, r, o, s) {
4460
4460
  endGap: u
4461
4461
  };
4462
4462
  }
4463
- function Sf(e, t, n, r, o, s, i, c, a) {
4463
+ function wf(e, t, n, r, o, s, i, c, a) {
4464
4464
  const {
4465
4465
  startEdge: l,
4466
4466
  endEdge: f,
4467
4467
  direction: u
4468
4468
  } = e, d = Co(n);
4469
4469
  function h(v, E) {
4470
- return sn(v).filter((w) => w % E === 0).map((w) => v.slice(w, w + E));
4470
+ return sn(v).filter((S) => S % E === 0).map((S) => v.slice(S, S + E));
4471
4471
  }
4472
4472
  function p(v) {
4473
- return v.length ? sn(v).reduce((E, w, S) => {
4474
- const T = Ze(E) || 0, C = T === 0, R = w === dn(v), P = o[l] - s[T][l], O = o[l] - s[w][f], M = !r && C ? u(i) : 0, F = !r && R ? u(c) : 0, A = Te(O - F - (P + M));
4475
- return S && A > t + a && E.push(w), R && E.push(v.length), E;
4476
- }, []).map((E, w, S) => {
4477
- const T = Math.max(S[w - 1] || 0);
4473
+ return v.length ? sn(v).reduce((E, S, w) => {
4474
+ const T = Ze(E) || 0, C = T === 0, R = S === dn(v), P = o[l] - s[T][l], O = o[l] - s[S][f], M = !r && C ? u(i) : 0, F = !r && R ? u(c) : 0, A = Te(O - F - (P + M));
4475
+ return w && A > t + a && E.push(S), R && E.push(v.length), E;
4476
+ }, []).map((E, S, w) => {
4477
+ const T = Math.max(w[S - 1] || 0);
4478
4478
  return v.slice(T, E);
4479
4479
  }) : [];
4480
4480
  }
@@ -4485,7 +4485,7 @@ function Sf(e, t, n, r, o, s, i, c, a) {
4485
4485
  groupSlides: g
4486
4486
  };
4487
4487
  }
4488
- function wf(e, t, n, r, o, s, i) {
4488
+ function Sf(e, t, n, r, o, s, i) {
4489
4489
  const {
4490
4490
  align: c,
4491
4491
  axis: a,
@@ -4499,8 +4499,8 @@ function wf(e, t, n, r, o, s, i) {
4499
4499
  slidesToScroll: m,
4500
4500
  skipSnaps: v,
4501
4501
  containScroll: E,
4502
- watchResize: w,
4503
- watchSlides: S,
4502
+ watchResize: S,
4503
+ watchSlides: w,
4504
4504
  watchDrag: T,
4505
4505
  watchFocus: C
4506
4506
  } = s, R = 2, P = nf(), O = P.measure(t), M = n.map(P.measure), F = Qu(a, l), A = F.measureSize(O), D = rf(A), I = Ju(c, A), x = !u && !!E, _ = u || !!E, {
@@ -4508,7 +4508,7 @@ function wf(e, t, n, r, o, s, i) {
4508
4508
  slideSizesWithGaps: N,
4509
4509
  startGap: k,
4510
4510
  endGap: Y
4511
- } = Ef(F, O, M, n, _, o), K = Sf(F, A, m, u, O, M, k, Y, R), {
4511
+ } = Ef(F, O, M, n, _, o), K = wf(F, A, m, u, O, M, k, Y, R), {
4512
4512
  snaps: le,
4513
4513
  snapsAligned: ie
4514
4514
  } = df(F, I, O, M, K), L = -Ze(le) + Ze(N), {
@@ -4516,18 +4516,18 @@ function wf(e, t, n, r, o, s, i) {
4516
4516
  scrollContainLimit: B
4517
4517
  } = af(A, L, ie, E, R), $ = x ? X : ie, {
4518
4518
  limit: Q
4519
- } = lf(L, $, u), re = Yi(dn($), f, u), ee = re.clone(), te = sn(n), W = ({
4519
+ } = lf(L, $, u), re = Yi(dn($), f, u), ee = re.clone(), te = sn(n), q = ({
4520
4520
  dragHandler: V,
4521
- scrollBody: q,
4521
+ scrollBody: j,
4522
4522
  scrollBounds: Z,
4523
4523
  options: {
4524
4524
  loop: se
4525
4525
  }
4526
4526
  }) => {
4527
- se || Z.constrain(V.pointerDown()), q.seek();
4527
+ se || Z.constrain(V.pointerDown()), j.seek();
4528
4528
  }, ne = ({
4529
4529
  scrollBody: V,
4530
- translate: q,
4530
+ translate: j,
4531
4531
  location: Z,
4532
4532
  offsetLocation: se,
4533
4533
  previousLocation: Ne,
@@ -4544,10 +4544,10 @@ function wf(e, t, n, r, o, s, i) {
4544
4544
  const jt = V.settled(), mn = !ot.shouldConstrain(), Gt = yt ? jt : jt && mn, Kt = Gt && !ut.pointerDown();
4545
4545
  Kt && It.stop();
4546
4546
  const bn = Z.get() * Et + Ne.get() * (1 - Et);
4547
- se.set(bn), yt && (Re.loop(V.direction()), Ot.loop()), q.to(se.get()), Kt && rt.emit("settle"), Gt || rt.emit("scroll");
4548
- }, oe = Zu(r, o, () => W(ge), (V) => ne(ge, V)), ve = 0.68, j = $[re.get()], J = Jt(j), ce = Jt(j), he = Jt(j), Ie = Jt(j), Fe = sf(J, he, ce, Ie, d, ve), xe = hf(u, $, L, Q, Ie), Le = gf(oe, re, ee, Fe, xe, Ie, i), ze = ff(Q), H = an(), G = yf(t, n, i, g), {
4549
- slideRegistry: we
4550
- } = pf(x, E, $, B, K, te), be = mf(e, n, we, Le, Fe, H, i, C), ge = {
4547
+ se.set(bn), yt && (Re.loop(V.direction()), Ot.loop()), j.to(se.get()), Kt && rt.emit("settle"), Gt || rt.emit("scroll");
4548
+ }, oe = Zu(r, o, () => q(ge), (V) => ne(ge, V)), ve = 0.68, W = $[re.get()], J = Jt(W), ce = Jt(W), he = Jt(W), Ie = Jt(W), Fe = sf(J, he, ce, Ie, d, ve), xe = hf(u, $, L, Q, Ie), Le = gf(oe, re, ee, Fe, xe, Ie, i), ze = ff(Q), H = an(), G = yf(t, n, i, g), {
4549
+ slideRegistry: Se
4550
+ } = pf(x, E, $, B, K, te), be = mf(e, n, Se, Le, Fe, H, i, C), ge = {
4551
4551
  ownerDocument: r,
4552
4552
  ownerWindow: o,
4553
4553
  eventHandler: i,
@@ -4565,7 +4565,7 @@ function wf(e, t, n, r, o, s, i) {
4565
4565
  offsetLocation: he,
4566
4566
  previousLocation: ce,
4567
4567
  options: s,
4568
- resizeHandler: of(t, i, o, n, F, w, P),
4568
+ resizeHandler: of(t, i, o, n, F, S, P),
4569
4569
  scrollBody: Fe,
4570
4570
  scrollBounds: cf(Q, he, Ie, Fe, D),
4571
4571
  scrollLooper: uf(L, Q, he, [J, he, ce, Ie]),
@@ -4576,10 +4576,10 @@ function wf(e, t, n, r, o, s, i) {
4576
4576
  scrollTo: Le,
4577
4577
  slideLooper: bf(F, A, L, U, N, le, $, he, n),
4578
4578
  slideFocus: be,
4579
- slidesHandler: vf(t, i, S),
4579
+ slidesHandler: vf(t, i, w),
4580
4580
  slidesInView: G,
4581
4581
  slideIndexes: te,
4582
- slideRegistry: we,
4582
+ slideRegistry: Se,
4583
4583
  slidesToScroll: K,
4584
4584
  target: Ie,
4585
4585
  translate: Xi(F, t)
@@ -4681,36 +4681,36 @@ function Un(e, t, n) {
4681
4681
  off: h,
4682
4682
  emit: p
4683
4683
  } = a, g = F;
4684
- let m = !1, v, E = l(Tf, Un.globalOptions), w = l(E), S = [], T, C, R;
4684
+ let m = !1, v, E = l(Tf, Un.globalOptions), S = l(E), w = [], T, C, R;
4685
4685
  function P() {
4686
4686
  const {
4687
4687
  container: te,
4688
- slides: W
4689
- } = w;
4688
+ slides: q
4689
+ } = S;
4690
4690
  C = (zr(te) ? e.querySelector(te) : te) || e.children[0];
4691
- const oe = zr(W) ? C.querySelectorAll(W) : W;
4691
+ const oe = zr(q) ? C.querySelectorAll(q) : q;
4692
4692
  R = [].slice.call(oe || C.children);
4693
4693
  }
4694
4694
  function O(te) {
4695
- const W = wf(e, C, R, r, o, te, a);
4696
- if (te.loop && !W.slideLooper.canLoop()) {
4695
+ const q = Sf(e, C, R, r, o, te, a);
4696
+ if (te.loop && !q.slideLooper.canLoop()) {
4697
4697
  const ne = Object.assign({}, te, {
4698
4698
  loop: !1
4699
4699
  });
4700
4700
  return O(ne);
4701
4701
  }
4702
- return W;
4702
+ return q;
4703
4703
  }
4704
- function M(te, W) {
4705
- m || (E = l(E, te), w = f(E), S = W || S, P(), v = O(w), u([E, ...S.map(({
4704
+ function M(te, q) {
4705
+ m || (E = l(E, te), S = f(E), w = q || w, P(), v = O(S), u([E, ...w.map(({
4706
4706
  options: ne
4707
- }) => ne)]).forEach((ne) => c.add(ne, "change", F)), w.active && (v.translate.to(v.location.get()), v.animation.init(), v.slidesInView.init(), v.slideFocus.init(ee), v.eventHandler.init(ee), v.resizeHandler.init(ee), v.slidesHandler.init(ee), v.options.loop && v.slideLooper.loop(), C.offsetParent && R.length && v.dragHandler.init(ee), T = i.init(ee, S)));
4707
+ }) => ne)]).forEach((ne) => c.add(ne, "change", F)), S.active && (v.translate.to(v.location.get()), v.animation.init(), v.slidesInView.init(), v.slideFocus.init(ee), v.eventHandler.init(ee), v.resizeHandler.init(ee), v.slidesHandler.init(ee), v.options.loop && v.slideLooper.loop(), C.offsetParent && R.length && v.dragHandler.init(ee), T = i.init(ee, w)));
4708
4708
  }
4709
- function F(te, W) {
4709
+ function F(te, q) {
4710
4710
  const ne = K();
4711
4711
  A(), M(l({
4712
4712
  startIndex: ne
4713
- }, te), W), a.emit("reInit");
4713
+ }, te), q), a.emit("reInit");
4714
4714
  }
4715
4715
  function A() {
4716
4716
  v.dragHandler.destroy(), v.eventStore.clear(), v.translate.clear(), v.slideLooper.clear(), v.resizeHandler.destroy(), v.slidesHandler.destroy(), v.slidesInView.destroy(), v.animation.destroy(), i.destroy(), c.clear();
@@ -4718,16 +4718,16 @@ function Un(e, t, n) {
4718
4718
  function D() {
4719
4719
  m || (m = !0, c.clear(), A(), a.emit("destroy"), a.clear());
4720
4720
  }
4721
- function I(te, W, ne) {
4722
- !w.active || m || (v.scrollBody.useBaseFriction().useDuration(W === !0 ? 0 : w.duration), v.scrollTo.index(te, ne || 0));
4721
+ function I(te, q, ne) {
4722
+ !S.active || m || (v.scrollBody.useBaseFriction().useDuration(q === !0 ? 0 : S.duration), v.scrollTo.index(te, ne || 0));
4723
4723
  }
4724
4724
  function x(te) {
4725
- const W = v.index.add(1).get();
4726
- I(W, te, -1);
4725
+ const q = v.index.add(1).get();
4726
+ I(q, te, -1);
4727
4727
  }
4728
4728
  function _(te) {
4729
- const W = v.index.add(-1).get();
4730
- I(W, te, 1);
4729
+ const q = v.index.add(-1).get();
4730
+ I(q, te, 1);
4731
4731
  }
4732
4732
  function U() {
4733
4733
  return v.index.add(1).get() !== K();
@@ -4799,7 +4799,7 @@ function xo(e = {}, t = []) {
4799
4799
  o && o.reInit(n.current, r.current);
4800
4800
  }, [o]);
4801
4801
  return Ke(() => {
4802
- wo(n.current, e) || (n.current = e, a());
4802
+ So(n.current, e) || (n.current = e, a());
4803
4803
  }, [e, a]), Ke(() => {
4804
4804
  Ku(r.current, t) || (r.current = t, a());
4805
4805
  }, [t, a]), Ke(() => {
@@ -5098,12 +5098,12 @@ function ld(e) {
5098
5098
  function Jr(e) {
5099
5099
  return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
5100
5100
  }
5101
- const Ss = ["left", "right"], ws = ["right", "left"], ud = ["top", "bottom"], fd = ["bottom", "top"];
5101
+ const ws = ["left", "right"], Ss = ["right", "left"], ud = ["top", "bottom"], fd = ["bottom", "top"];
5102
5102
  function dd(e, t, n) {
5103
5103
  switch (e) {
5104
5104
  case "top":
5105
5105
  case "bottom":
5106
- return n ? t ? ws : Ss : t ? Ss : ws;
5106
+ return n ? t ? Ss : ws : t ? ws : Ss;
5107
5107
  case "left":
5108
5108
  case "right":
5109
5109
  return t ? ud : fd;
@@ -5190,16 +5190,16 @@ function Ed(e) {
5190
5190
  return !1;
5191
5191
  for (let t = e; t; t = vd(t)) {
5192
5192
  const n = t !== e, r = He(t) === "slot";
5193
- if (t.hasAttribute("inert") || n && He(t) === "details" && !t.open && !yd(e, t) || t.hasAttribute("hidden") || !r && !Sd(t, n))
5193
+ if (t.hasAttribute("inert") || n && He(t) === "details" && !t.open && !yd(e, t) || t.hasAttribute("hidden") || !r && !wd(t, n))
5194
5194
  return !1;
5195
5195
  }
5196
5196
  return !0;
5197
5197
  }
5198
- function Sd(e, t) {
5198
+ function wd(e, t) {
5199
5199
  const n = qe(e);
5200
5200
  return t ? n.display !== "none" : md(e, n);
5201
5201
  }
5202
- function wd(e) {
5202
+ function Sd(e) {
5203
5203
  const t = e.tabIndex;
5204
5204
  if (t < 0) {
5205
5205
  const n = He(e);
@@ -5208,22 +5208,22 @@ function wd(e) {
5208
5208
  }
5209
5209
  return t;
5210
5210
  }
5211
- function Sr(e) {
5211
+ function wr(e) {
5212
5212
  if (He(e) !== "input")
5213
5213
  return null;
5214
5214
  const t = e;
5215
5215
  return t.type === "radio" && t.name !== "" ? t : null;
5216
5216
  }
5217
5217
  function Cd(e, t) {
5218
- const n = Sr(e);
5218
+ const n = wr(e);
5219
5219
  if (!n)
5220
5220
  return !0;
5221
5221
  const r = t.find((o) => {
5222
- const s = Sr(o);
5222
+ const s = wr(o);
5223
5223
  return (s == null ? void 0 : s.name) === n.name && s.form === n.form && s.checked;
5224
5224
  });
5225
5225
  return r ? r === n : t.find((o) => {
5226
- const s = Sr(o);
5226
+ const s = wr(o);
5227
5227
  return (s == null ? void 0 : s.name) === n.name && s.form === n.form;
5228
5228
  }) === n;
5229
5229
  }
@@ -5253,7 +5253,7 @@ function Td(e) {
5253
5253
  }
5254
5254
  function lc(e) {
5255
5255
  const t = Td(e);
5256
- return t.filter((n) => wd(n) >= 0 && Cd(n, t));
5256
+ return t.filter((n) => Sd(n) >= 0 && Cd(n, t));
5257
5257
  }
5258
5258
  function uc(e, t) {
5259
5259
  const n = lc(e), r = n.length;
@@ -5268,7 +5268,7 @@ function Rd(e) {
5268
5268
  function xd(e) {
5269
5269
  return uc(Qe(e).body, -1) || e;
5270
5270
  }
5271
- function wr(e, t) {
5271
+ function Sr(e, t) {
5272
5272
  const n = t || e.currentTarget, r = e.relatedTarget;
5273
5273
  return !r || !Pe(n, r);
5274
5274
  }
@@ -5361,16 +5361,16 @@ const Nd = /* @__PURE__ */ y.forwardRef(function(t, n) {
5361
5361
  ref: n,
5362
5362
  componentProps: t,
5363
5363
  elementProps: l
5364
- }), h = y.useRef(null), p = y.useRef(null), g = y.useRef(null), m = y.useRef(null), [v, E] = y.useState(null), w = y.useRef(!1), S = v == null ? void 0 : v.modal, T = v == null ? void 0 : v.open, C = !!v && !v.modal && v.open && !!f;
5364
+ }), h = y.useRef(null), p = y.useRef(null), g = y.useRef(null), m = y.useRef(null), [v, E] = y.useState(null), S = y.useRef(!1), w = v == null ? void 0 : v.modal, T = v == null ? void 0 : v.open, C = !!v && !v.modal && v.open && !!f;
5365
5365
  y.useEffect(() => {
5366
- if (!f || S)
5366
+ if (!f || w)
5367
5367
  return;
5368
5368
  function P(O) {
5369
- f && O.relatedTarget && wr(O) && (O.type === "focusin" ? w.current && (Cs(f), w.current = !1) : (Pd(f), w.current = !0));
5369
+ f && O.relatedTarget && Sr(O) && (O.type === "focusin" ? S.current && (Cs(f), S.current = !1) : (Pd(f), S.current = !0));
5370
5370
  }
5371
- return pt(Se(f, "focusin", P, !0), Se(f, "focusout", P, !0));
5372
- }, [f, S]), pe(() => {
5373
- !f || T !== !0 || !w.current || (Cs(f), w.current = !1);
5371
+ return pt(we(f, "focusin", P, !0), we(f, "focusout", P, !0));
5372
+ }, [f, w]), pe(() => {
5373
+ !f || T !== !0 || !S.current || (Cs(f), S.current = !1);
5374
5374
  }, [T, f]);
5375
5375
  const R = y.useMemo(() => ({
5376
5376
  beforeOutsideRef: h,
@@ -5388,7 +5388,7 @@ const Nd = /* @__PURE__ */ y.forwardRef(function(t, n) {
5388
5388
  ref: h,
5389
5389
  onFocus: (P) => {
5390
5390
  var O;
5391
- if (wr(P, f))
5391
+ if (Sr(P, f))
5392
5392
  (O = g.current) == null || O.focus();
5393
5393
  else {
5394
5394
  const M = v ? v.domReference : null, F = xd(M);
@@ -5404,7 +5404,7 @@ const Nd = /* @__PURE__ */ y.forwardRef(function(t, n) {
5404
5404
  ref: p,
5405
5405
  onFocus: (P) => {
5406
5406
  var O;
5407
- if (wr(P, f))
5407
+ if (Sr(P, f))
5408
5408
  (O = m.current) == null || O.focus();
5409
5409
  else {
5410
5410
  const M = v ? v.domReference : null, F = Rd(M);
@@ -5518,8 +5518,8 @@ function $d(e, t = {}) {
5518
5518
  events: d
5519
5519
  } = e.context, h = hn(a), p = fe(typeof o == "function" ? o : () => !1), g = typeof o == "function" ? p : o, m = g !== !1, v = fe(() => s), {
5520
5520
  escapeKey: E,
5521
- outsidePress: w
5522
- } = Vd(c), S = y.useRef(!1), T = y.useRef(!1), C = y.useRef(!1), R = y.useRef(!1), P = y.useRef(!1), O = y.useRef(""), M = y.useRef(null), F = Zt(), A = Zt(), D = Zt(), I = fe(() => {
5521
+ outsidePress: S
5522
+ } = Vd(c), w = y.useRef(!1), T = y.useRef(!1), C = y.useRef(!1), R = y.useRef(!1), P = y.useRef(!1), O = y.useRef(""), M = y.useRef(null), F = Zt(), A = Zt(), D = Zt(), I = fe(() => {
5523
5523
  A.clear(), u.current.insideReactTree = !1;
5524
5524
  }), x = fe((L) => {
5525
5525
  var $;
@@ -5544,9 +5544,9 @@ function $d(e, t = {}) {
5544
5544
  if (!l || !n || L.button !== 0)
5545
5545
  return;
5546
5546
  const X = Ct(L.nativeEvent);
5547
- Pe(e.select("floatingElement"), X) && (S.current || (S.current = !0, T.current = !1));
5547
+ Pe(e.select("floatingElement"), X) && (w.current || (w.current = !0, T.current = !1));
5548
5548
  }), K = fe((L) => {
5549
- !l || !n || (L.defaultPrevented || L.nativeEvent.defaultPrevented) && S.current && (T.current = !0);
5549
+ !l || !n || (L.defaultPrevented || L.nativeEvent.defaultPrevented) && w.current && (T.current = !0);
5550
5550
  });
5551
5551
  y.useEffect(() => {
5552
5552
  function L(X) {
@@ -5558,7 +5558,7 @@ function $d(e, t = {}) {
5558
5558
  }, [d]), y.useEffect(() => I, [I]), y.useEffect(() => {
5559
5559
  if (!l || !n)
5560
5560
  return l || (R.current = !1, P.current = !1, O.current = "", M.current = null), I;
5561
- u.current.__escapeKeyBubbles = E, u.current.__outsidePressBubbles = w;
5561
+ u.current.__escapeKeyBubbles = E, u.current.__outsidePressBubbles = S;
5562
5562
  const L = new gt(), X = Qe(f);
5563
5563
  function B() {
5564
5564
  D.clear(), P.current = !0;
@@ -5579,23 +5579,23 @@ function $d(e, t = {}) {
5579
5579
  });
5580
5580
  }
5581
5581
  function re() {
5582
- S.current = !1, T.current = !1;
5582
+ w.current = !1, T.current = !1;
5583
5583
  }
5584
5584
  function ee() {
5585
- const H = O.current, G = H === "pen" || !H ? "mouse" : H, we = v(), be = typeof we == "function" ? we() : we;
5585
+ const H = O.current, G = H === "pen" || !H ? "mouse" : H, Se = v(), be = typeof Se == "function" ? Se() : Se;
5586
5586
  return typeof be == "string" ? be : be[G];
5587
5587
  }
5588
5588
  function te(H) {
5589
5589
  const G = ee();
5590
5590
  return G === "intentional" && H.type !== "click" || G === "sloppy" && H.type === "click";
5591
5591
  }
5592
- function W(H) {
5592
+ function q(H) {
5593
5593
  var be;
5594
- const G = (be = u.current.floatingContext) == null ? void 0 : be.nodeId, we = h && zt(h.nodesRef.current, G).some((ge) => {
5594
+ const G = (be = u.current.floatingContext) == null ? void 0 : be.nodeId, Se = h && zt(h.nodesRef.current, G).some((ge) => {
5595
5595
  var V;
5596
5596
  return Er(H, (V = ge.context) == null ? void 0 : V.elements.floating);
5597
5597
  });
5598
- return _(H) || we;
5598
+ return _(H) || Se;
5599
5599
  }
5600
5600
  function ne(H) {
5601
5601
  if (te(H)) {
@@ -5606,26 +5606,26 @@ function $d(e, t = {}) {
5606
5606
  I();
5607
5607
  return;
5608
5608
  }
5609
- const G = Ct(H), we = `[${_o("inert")}]`, be = me(G) ? G.getRootNode() : null, ge = Array.from((Bt(be) ? be : Qe(e.select("floatingElement"))).querySelectorAll(we)), V = e.context.triggerElements;
5609
+ const G = Ct(H), Se = `[${_o("inert")}]`, be = me(G) ? G.getRootNode() : null, ge = Array.from((Bt(be) ? be : Qe(e.select("floatingElement"))).querySelectorAll(Se)), V = e.context.triggerElements;
5610
5610
  if (G && (V.hasElement(G) || V.hasMatchingElement((Z) => Pe(Z, G))))
5611
5611
  return;
5612
- let q = me(G) ? G : null;
5613
- for (; q && !dt(q); ) {
5614
- const Z = ht(q);
5612
+ let j = me(G) ? G : null;
5613
+ for (; j && !dt(j); ) {
5614
+ const Z = ht(j);
5615
5615
  if (dt(Z) || !me(Z))
5616
5616
  break;
5617
- q = Z;
5617
+ j = Z;
5618
5618
  }
5619
5619
  if (!(ge.length && me(G) && !Qf(G) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
5620
5620
  !Pe(G, e.select("floatingElement")) && // If the target root element contains none of the markers, then the
5621
5621
  // element was injected after the floating element rendered.
5622
- ge.every((Z) => !Pe(q, Z)))) {
5622
+ ge.every((Z) => !Pe(j, Z)))) {
5623
5623
  if (ke(G) && !("touches" in H)) {
5624
5624
  const Z = dt(G), se = qe(G), Ne = /auto|scroll/, Re = Z || Ne.test(se.overflowX), Ot = Z || Ne.test(se.overflowY), ut = Re && G.clientWidth > 0 && G.scrollWidth > G.clientWidth, It = Ot && G.clientHeight > 0 && G.scrollHeight > G.clientHeight, rt = se.direction === "rtl", ot = It && (rt ? H.offsetX <= G.offsetWidth - G.clientWidth : H.offsetX > G.clientWidth), yt = ut && H.offsetY > G.clientHeight;
5625
5625
  if (ot || yt)
5626
5626
  return;
5627
5627
  }
5628
- if (!W(H)) {
5628
+ if (!q(H)) {
5629
5629
  if (ee() === "intentional") {
5630
5630
  if (H.detail !== 0 && !$f(H) && !R.current)
5631
5631
  return;
@@ -5655,24 +5655,24 @@ function $d(e, t = {}) {
5655
5655
  M.current && (M.current.dismissOnTouchEnd = !1, M.current.dismissOnMouseDown = !1);
5656
5656
  }));
5657
5657
  }
5658
- function j(H, G) {
5659
- const we = Ct(H);
5660
- if (!we)
5658
+ function W(H, G) {
5659
+ const Se = Ct(H);
5660
+ if (!Se)
5661
5661
  return;
5662
- const be = Se(we, H.type, () => {
5662
+ const be = we(Se, H.type, () => {
5663
5663
  G(H), be();
5664
5664
  });
5665
5665
  }
5666
5666
  function J(H) {
5667
- O.current = "touch", j(H, ve);
5667
+ O.current = "touch", W(H, ve);
5668
5668
  }
5669
5669
  function ce(H) {
5670
- F.clear(), H.type === "pointerdown" && (H.button === 0 && (R.current = !0), O.current = H.pointerType), !(H.type === "mousedown" && M.current && !M.current.dismissOnMouseDown) && j(H, (G) => {
5670
+ F.clear(), H.type === "pointerdown" && (H.button === 0 && (R.current = !0), O.current = H.pointerType), !(H.type === "mousedown" && M.current && !M.current.dismissOnMouseDown) && W(H, (G) => {
5671
5671
  G.type === "pointerdown" ? oe(G) : ne(G);
5672
5672
  });
5673
5673
  }
5674
5674
  function he(H) {
5675
- if (H.type === "pointercancel" && (R.current = !1), !S.current)
5675
+ if (H.type === "pointercancel" && (R.current = !1), !w.current)
5676
5676
  return;
5677
5677
  const G = T.current;
5678
5678
  if (re(), ee() === "intentional") {
@@ -5680,7 +5680,7 @@ function $d(e, t = {}) {
5680
5680
  G && Q();
5681
5681
  return;
5682
5682
  }
5683
- if (!W(H)) {
5683
+ if (!q(H)) {
5684
5684
  if (G) {
5685
5685
  Q();
5686
5686
  return;
@@ -5695,32 +5695,32 @@ function $d(e, t = {}) {
5695
5695
  const G = H.touches[0];
5696
5696
  if (!G)
5697
5697
  return;
5698
- const we = Math.abs(G.clientX - M.current.startX), be = Math.abs(G.clientY - M.current.startY), ge = Math.sqrt(we * we + be * be);
5698
+ const Se = Math.abs(G.clientX - M.current.startX), be = Math.abs(G.clientY - M.current.startY), ge = Math.sqrt(Se * Se + be * be);
5699
5699
  ge > 5 && (M.current.dismissOnTouchEnd = !0), ge > 10 && (ne(H), F.clear(), M.current = null);
5700
5700
  }
5701
5701
  function Fe(H) {
5702
- j(H, Ie);
5702
+ W(H, Ie);
5703
5703
  }
5704
5704
  function xe(H) {
5705
5705
  ee() !== "sloppy" || !M.current || _(H) || (M.current.dismissOnTouchEnd && ne(H), F.clear(), M.current = null);
5706
5706
  }
5707
5707
  function Le(H) {
5708
- j(H, xe);
5708
+ W(H, xe);
5709
5709
  }
5710
- const ze = pt(r && pt(Se(X, "keydown", N), Se(X, "compositionstart", B), Se(X, "compositionend", $)), m && pt(Se(X, "click", ce, !0), Se(X, "pointerdown", ce, !0), Se(X, "pointerup", he, !0), Se(X, "pointercancel", he, !0), Se(X, "mousedown", ce, !0), Se(X, "mouseup", he, !0), Se(X, "touchstart", J, {
5710
+ const ze = pt(r && pt(we(X, "keydown", N), we(X, "compositionstart", B), we(X, "compositionend", $)), m && pt(we(X, "click", ce, !0), we(X, "pointerdown", ce, !0), we(X, "pointerup", he, !0), we(X, "pointercancel", he, !0), we(X, "mousedown", ce, !0), we(X, "mouseup", he, !0), we(X, "touchstart", J, {
5711
5711
  capture: !0,
5712
5712
  passive: !0
5713
- }), Se(X, "touchmove", Fe, {
5713
+ }), we(X, "touchmove", Fe, {
5714
5714
  capture: !0,
5715
5715
  passive: !0
5716
- }), Se(X, "touchend", Le, {
5716
+ }), we(X, "touchend", Le, {
5717
5717
  capture: !0,
5718
5718
  passive: !0
5719
5719
  })));
5720
5720
  return () => {
5721
5721
  ze(), L.clear(), re(), C.current = !1;
5722
5722
  };
5723
- }, [u, f, r, m, g, l, n, E, w, N, I, v, x, _, h, e, F, D]);
5723
+ }, [u, f, r, m, g, l, n, E, S, N, I, v, x, _, h, e, F, D]);
5724
5724
  const le = y.useMemo(() => ({
5725
5725
  onKeyDown: N,
5726
5726
  onPointerDown: U,
@@ -6059,7 +6059,7 @@ function Yd(e) {
6059
6059
  pe(() => {
6060
6060
  t && c(!1);
6061
6061
  }, [t, c]);
6062
- const d = y.useRef(a), h = y.useRef(!1), p = wi(), g = () => {
6062
+ const d = y.useRef(a), h = y.useRef(!1), p = Si(), g = () => {
6063
6063
  d.current = !1, l(!1), s();
6064
6064
  };
6065
6065
  pe(() => {
@@ -6514,18 +6514,18 @@ function up() {
6514
6514
  function() {
6515
6515
  function v(C) {
6516
6516
  if (!E) {
6517
- if (E = !0, w = C, C = d(C), h !== void 0 && g.hasValue) {
6517
+ if (E = !0, S = C, C = d(C), h !== void 0 && g.hasValue) {
6518
6518
  var R = g.value;
6519
6519
  if (h(R, C))
6520
- return S = R;
6520
+ return w = R;
6521
6521
  }
6522
- return S = C;
6522
+ return w = C;
6523
6523
  }
6524
- if (R = S, r(w, C)) return R;
6524
+ if (R = w, r(S, C)) return R;
6525
6525
  var P = d(C);
6526
- return h !== void 0 && h(R, P) ? (w = C, R) : (w = C, S = P);
6526
+ return h !== void 0 && h(R, P) ? (S = C, R) : (S = C, w = P);
6527
6527
  }
6528
- var E = !1, w, S, T = u === void 0 ? null : u;
6528
+ var E = !1, S, w, T = u === void 0 ? null : u;
6529
6529
  return [
6530
6530
  function() {
6531
6531
  return v(f());
@@ -6574,19 +6574,19 @@ function fp() {
6574
6574
  function() {
6575
6575
  function v(C) {
6576
6576
  if (!E) {
6577
- if (E = !0, w = C, C = d(C), h !== void 0 && g.hasValue) {
6577
+ if (E = !0, S = C, C = d(C), h !== void 0 && g.hasValue) {
6578
6578
  var R = g.value;
6579
6579
  if (h(R, C))
6580
- return S = R;
6580
+ return w = R;
6581
6581
  }
6582
- return S = C;
6582
+ return w = C;
6583
6583
  }
6584
- if (R = S, r(w, C))
6584
+ if (R = w, r(S, C))
6585
6585
  return R;
6586
6586
  var P = d(C);
6587
- return h !== void 0 && h(R, P) ? (w = C, R) : (w = C, S = P);
6587
+ return h !== void 0 && h(R, P) ? (S = C, R) : (S = C, w = P);
6588
6588
  }
6589
- var E = !1, w, S, T = u === void 0 ? null : u;
6589
+ var E = !1, S, w, T = u === void 0 ? null : u;
6590
6590
  return [
6591
6591
  function() {
6592
6592
  return v(f());
@@ -6908,7 +6908,7 @@ const Ep = {
6908
6908
  floatingElement: (e) => e.floatingElement,
6909
6909
  floatingId: (e) => e.floatingId
6910
6910
  };
6911
- class Sp extends Fo {
6911
+ class wp extends Fo {
6912
6912
  constructor(n) {
6913
6913
  const {
6914
6914
  syncOnly: r,
@@ -6969,13 +6969,13 @@ class Sp extends Fo {
6969
6969
  this.syncOnly = r;
6970
6970
  }
6971
6971
  }
6972
- function wp(e, t, n = !1) {
6972
+ function Sp(e, t, n = !1) {
6973
6973
  return {
6974
6974
  open: !1,
6975
6975
  openProp: void 0,
6976
6976
  mounted: !1,
6977
6977
  transitionStatus: void 0,
6978
- floatingRootContext: new Sp({
6978
+ floatingRootContext: new wp({
6979
6979
  open: !1,
6980
6980
  transitionStatus: void 0,
6981
6981
  floatingElement: null,
@@ -7073,7 +7073,7 @@ function xp(e, t = {}) {
7073
7073
  function g() {
7074
7074
  a.current = !1;
7075
7075
  }
7076
- return pt(Se(d, "blur", h), Pr && Se(d, "keydown", p, !0), Pr && Se(d, "pointerdown", g, !0));
7076
+ return pt(we(d, "blur", h), Pr && we(d, "keydown", p, !0), Pr && we(d, "pointerdown", g, !0));
7077
7077
  }, [e, n]), y.useEffect(() => {
7078
7078
  if (!n)
7079
7079
  return;
@@ -7126,9 +7126,9 @@ function xp(e, t = {}) {
7126
7126
  u();
7127
7127
  const h = d.relatedTarget, p = d.nativeEvent, g = me(h) && h.hasAttribute(_o("focus-guard")) && h.getAttribute("data-type") === "outside";
7128
7128
  l.start(0, () => {
7129
- var w;
7129
+ var S;
7130
7130
  const m = e.select("domReferenceElement"), v = Gr(Qe(m));
7131
- !h && v === m || Pe((w = s.current.floatingContext) == null ? void 0 : w.refs.floating.current, v) || Pe(m, v) || g || Wn(h ?? v, e.context.triggerElements) || e.setOpen(!1, Oe(Mn, p));
7131
+ !h && v === m || Pe((S = s.current.floatingContext) == null ? void 0 : S.refs.floating.current, v) || Pe(m, v) || g || Wn(h ?? v, e.context.triggerElements) || e.setOpen(!1, Oe(Mn, p));
7132
7132
  });
7133
7133
  }
7134
7134
  };
@@ -7200,11 +7200,11 @@ function Pp(e, t = {}) {
7200
7200
  pe(() => {
7201
7201
  s || (u.pointerType = void 0, u.restTimeoutPending = !1, u.interactedInside = !1, g());
7202
7202
  }, [s, u, g]), y.useEffect(() => g, [g]), pe(() => {
7203
- var m, v, E, w, S;
7203
+ var m, v, E, S, w;
7204
7204
  if (n && s && (m = u.handleCloseOptions) != null && m.blockPointerEvents && p() && me(c) && i) {
7205
7205
  const T = c, C = i, R = Qe(i), P = (E = (v = l == null ? void 0 : l.nodesRef.current.find((A) => A.id === f)) == null ? void 0 : v.context) == null ? void 0 : E.elements.floating;
7206
7206
  P && (P.style.pointerEvents = "");
7207
- const O = u.pointerEventsScopeElement !== C ? u.pointerEventsScopeElement : null, M = P !== C ? P : null, F = ((S = (w = u.handleCloseOptions) == null ? void 0 : w.getScope) == null ? void 0 : S.call(w)) ?? O ?? M ?? Kr(T, "[data-rootownerid]") ?? R.body;
7207
+ const O = u.pointerEventsScopeElement !== C ? u.pointerEventsScopeElement : null, M = P !== C ? P : null, F = ((w = (S = u.handleCloseOptions) == null ? void 0 : S.getScope) == null ? void 0 : w.call(S)) ?? O ?? M ?? Kr(T, "[data-rootownerid]") ?? R.body;
7208
7208
  return yc(u, {
7209
7209
  scopeElement: F,
7210
7210
  referenceElement: T,
@@ -7233,10 +7233,10 @@ function Pp(e, t = {}) {
7233
7233
  }
7234
7234
  u.interactedInside = Kr(P, "[aria-haspopup]") != null;
7235
7235
  }
7236
- function w() {
7236
+ function S() {
7237
7237
  u.openChangeTimeout.clear(), d.clear(), l == null || l.events.off("floating.closed", T), g();
7238
7238
  }
7239
- function S(R) {
7239
+ function w(R) {
7240
7240
  var F;
7241
7241
  if (m() && l) {
7242
7242
  l.events.on("floating.closed", T);
@@ -7262,7 +7262,7 @@ function Pp(e, t = {}) {
7262
7262
  });
7263
7263
  }
7264
7264
  const C = i;
7265
- return pt(C && Se(C, "mouseenter", w), C && Se(C, "mouseleave", S), C && Se(C, "pointerdown", E, !0), () => {
7265
+ return pt(C && we(C, "mouseenter", S), C && we(C, "mouseleave", w), C && we(C, "pointerdown", E, !0), () => {
7266
7266
  l == null || l.events.off("floating.closed", T);
7267
7267
  });
7268
7268
  }, [n, i, e, a, r, o, p, h, g, u, l, f, d]);
@@ -7288,7 +7288,7 @@ function Ip(e, t = {}) {
7288
7288
  } = t, {
7289
7289
  dataRef: g,
7290
7290
  events: m
7291
- } = e.context, v = hn(l), E = Ec(e), w = y.useRef(!1), S = Je(o), T = Je(r), C = Je(i), R = Je(n), P = Je(h), O = Je(d), M = fe(() => {
7291
+ } = e.context, v = hn(l), E = Ec(e), S = y.useRef(!1), w = Je(o), T = Je(r), C = Je(i), R = Je(n), P = Je(h), O = Je(d), M = fe(() => {
7292
7292
  var x;
7293
7293
  return nc((x = g.current.openEvent) == null ? void 0 : x.type, E.interactedInside);
7294
7294
  }), F = fe(() => {
@@ -7313,7 +7313,7 @@ function Ip(e, t = {}) {
7313
7313
  if (!n)
7314
7314
  return;
7315
7315
  function x(_) {
7316
- _.open ? w.current = !1 : (w.current = _.reason === Xe, D(), E.openChangeTimeout.clear(), E.restTimeout.clear(), E.blockMouseMove = !0, E.restTimeoutPending = !1);
7316
+ _.open ? S.current = !1 : (S.current = _.reason === Xe, D(), E.openChangeTimeout.clear(), E.restTimeout.clear(), E.blockMouseMove = !0, E.restTimeoutPending = !1);
7317
7317
  }
7318
7318
  return m.on("openchange", x), () => {
7319
7319
  m.off("openchange", x);
@@ -7331,7 +7331,7 @@ function Ip(e, t = {}) {
7331
7331
  if (!me(_))
7332
7332
  return;
7333
7333
  function U(K) {
7334
- var j;
7334
+ var W;
7335
7335
  if (E.openChangeTimeout.clear(), E.blockMouseMove = !1, s && !jr(E.pointerType))
7336
7336
  return;
7337
7337
  const le = Es(C.current), ie = Yr(T.current, "open", E.pointerType), L = Ct(K), X = K.currentTarget ?? null, B = e.select("domReferenceElement");
@@ -7344,7 +7344,7 @@ function Ip(e, t = {}) {
7344
7344
  }
7345
7345
  }
7346
7346
  me(X) && me(B) && !e.context.triggerElements.hasElement(X) && Pe(X, B) && ($ = B);
7347
- const Q = $ == null ? !1 : A(B, $, L), re = e.select("open"), ee = ((j = O.current) == null ? void 0 : j.call(O)) ?? e.select("transitionStatus") === "ending", te = !re && ee && w.current, W = !Q && me($) && me(B) && Pe(B, $) && te, ne = le > 0 && !ie, oe = Q && (re || te) || W, ve = !re || Q;
7347
+ const Q = $ == null ? !1 : A(B, $, L), re = e.select("open"), ee = ((W = O.current) == null ? void 0 : W.call(O)) ?? e.select("transitionStatus") === "ending", te = !re && ee && S.current, q = !Q && me($) && me(B) && Pe(B, $) && te, ne = le > 0 && !ie, oe = Q && (re || te) || q, ve = !re || Q;
7348
7348
  if (oe) {
7349
7349
  F() && e.setOpen(!0, Oe(Xe, K, $));
7350
7350
  return;
@@ -7364,10 +7364,10 @@ function Ip(e, t = {}) {
7364
7364
  const L = g.current.floatingContext ?? (u == null ? void 0 : u());
7365
7365
  if (Wn(K.relatedTarget, e.context.triggerElements))
7366
7366
  return;
7367
- if (S.current && L) {
7367
+ if (w.current && L) {
7368
7368
  e.select("open") || E.openChangeTimeout.clear();
7369
7369
  const B = a.current;
7370
- E.handler = S.current({
7370
+ E.handler = w.current({
7371
7371
  ...L,
7372
7372
  tree: v,
7373
7373
  x: K.clientX,
@@ -7383,11 +7383,11 @@ function Ip(e, t = {}) {
7383
7383
  function k(K) {
7384
7384
  Pe(_, K.relatedTarget) || (E.openChangeTimeout.clear(), E.restTimeout.clear(), E.restTimeoutPending = !1);
7385
7385
  }
7386
- const Y = p ? Se(_, "mouseout", k) : void 0;
7387
- return c ? pt(Se(_, "mousemove", U, {
7386
+ const Y = p ? we(_, "mouseout", k) : void 0;
7387
+ return c ? pt(we(_, "mousemove", U, {
7388
7388
  once: !0
7389
- }), Se(_, "mouseenter", U), Se(_, "mouseleave", N), Y) : pt(Se(_, "mouseenter", U), Se(_, "mouseleave", N), Y);
7390
- }, [D, I, g, T, e, n, S, E, f, A, M, s, c, C, a, v, R, u, O, F, p]), y.useMemo(() => {
7389
+ }), we(_, "mouseenter", U), we(_, "mouseleave", N), Y) : pt(we(_, "mouseenter", U), we(_, "mouseleave", N), Y);
7390
+ }, [D, I, g, T, e, n, w, E, f, A, M, s, c, C, a, v, R, u, O, F, p]), y.useMemo(() => {
7391
7391
  if (!n)
7392
7392
  return;
7393
7393
  function x(_) {
@@ -7460,32 +7460,32 @@ function kp(e = {}) {
7460
7460
  }) => {
7461
7461
  const u = i == null ? void 0 : i.split("-")[0];
7462
7462
  let d = !1, h = null, p = null, g = typeof performance < "u" ? performance.now() : 0;
7463
- function m(E, w) {
7464
- const S = performance.now(), T = S - g;
7463
+ function m(E, S) {
7464
+ const w = performance.now(), T = w - g;
7465
7465
  if (h === null || p === null || T === 0)
7466
- return h = E, p = w, g = S, !1;
7467
- const C = E - h, R = w - p, P = C * C + R * R, O = T * T * _p;
7468
- return h = E, p = w, g = S, P < O;
7466
+ return h = E, p = S, g = w, !1;
7467
+ const C = E - h, R = S - p, P = C * C + R * R, O = T * T * _p;
7468
+ return h = E, p = S, g = w, P < O;
7469
7469
  }
7470
7470
  function v() {
7471
7471
  n.clear(), a();
7472
7472
  }
7473
- return function(w) {
7473
+ return function(S) {
7474
7474
  n.clear();
7475
- const S = c.domReference, T = c.floating;
7476
- if (!S || !T || u == null || o == null || s == null)
7475
+ const w = c.domReference, T = c.floating;
7476
+ if (!w || !T || u == null || o == null || s == null)
7477
7477
  return;
7478
7478
  const {
7479
7479
  clientX: C,
7480
7480
  clientY: R
7481
- } = w, P = Ct(w), O = w.type === "mouseleave", M = Pe(T, P), F = Pe(S, P);
7481
+ } = S, P = Ct(S), O = S.type === "mouseleave", M = Pe(T, P), F = Pe(w, P);
7482
7482
  if (M && (d = !0, !O))
7483
7483
  return;
7484
7484
  if (F && (d = !1, !O)) {
7485
7485
  d = !0;
7486
7486
  return;
7487
7487
  }
7488
- if (O && me(w.relatedTarget) && Pe(T, w.relatedTarget))
7488
+ if (O && me(S.relatedTarget) && Pe(T, S.relatedTarget))
7489
7489
  return;
7490
7490
  function A() {
7491
7491
  return !!(f && zt(f.nodesRef.current, l).length > 0);
@@ -7495,7 +7495,7 @@ function kp(e = {}) {
7495
7495
  }
7496
7496
  if (A())
7497
7497
  return;
7498
- const I = S.getBoundingClientRect(), x = T.getBoundingClientRect(), _ = o > x.right - x.width / 2, U = s > x.bottom - x.height / 2, N = x.width > I.width, k = x.height > I.height, Y = (N ? I : x).left, K = (N ? I : x).right, le = (k ? I : x).top, ie = (k ? I : x).bottom;
7498
+ const I = w.getBoundingClientRect(), x = T.getBoundingClientRect(), _ = o > x.right - x.width / 2, U = s > x.bottom - x.height / 2, N = x.width > I.width, k = x.height > I.height, Y = (N ? I : x).left, K = (N ? I : x).right, le = (k ? I : x).top, ie = (k ? I : x).bottom;
7499
7499
  if (u === "top" && s >= I.bottom - 1 || u === "bottom" && s <= I.top + 1 || u === "left" && o >= I.right - 1 || u === "right" && o <= I.left + 1) {
7500
7500
  D();
7501
7501
  return;
@@ -7623,20 +7623,20 @@ async function Np(e, t) {
7623
7623
  y: o,
7624
7624
  width: i.floating.width,
7625
7625
  height: i.floating.height
7626
- } : i.reference, w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), S = await (s.isElement == null ? void 0 : s.isElement(w)) && await (s.getScale == null ? void 0 : s.getScale(w)) || {
7626
+ } : i.reference, S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), w = await (s.isElement == null ? void 0 : s.isElement(S)) && await (s.getScale == null ? void 0 : s.getScale(S)) || {
7627
7627
  x: 1,
7628
7628
  y: 1
7629
7629
  }, T = Gn(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
7630
7630
  elements: c,
7631
7631
  rect: E,
7632
- offsetParent: w,
7632
+ offsetParent: S,
7633
7633
  strategy: a
7634
7634
  }) : E);
7635
7635
  return {
7636
- top: (v.top - T.top + p.top) / S.y,
7637
- bottom: (T.bottom - v.bottom + p.bottom) / S.y,
7638
- left: (v.left - T.left + p.left) / S.x,
7639
- right: (T.right - v.right + p.right) / S.x
7636
+ top: (v.top - T.top + p.top) / w.y,
7637
+ bottom: (T.bottom - v.bottom + p.bottom) / w.y,
7638
+ left: (v.left - T.left + p.left) / w.x,
7639
+ right: (T.right - v.right + p.right) / w.x
7640
7640
  };
7641
7641
  }
7642
7642
  const Mp = 50, Dp = async (e, t, n) => {
@@ -7666,8 +7666,8 @@ const Mp = 50, Dp = async (e, t, n) => {
7666
7666
  name: v,
7667
7667
  fn: E
7668
7668
  } = m, {
7669
- x: w,
7670
- y: S,
7669
+ x: S,
7670
+ y: w,
7671
7671
  data: T,
7672
7672
  reset: C
7673
7673
  } = await E({
@@ -7684,7 +7684,7 @@ const Mp = 50, Dp = async (e, t, n) => {
7684
7684
  floating: t
7685
7685
  }
7686
7686
  });
7687
- f = w ?? f, u = S ?? u, p[v] = {
7687
+ f = S ?? f, u = w ?? u, p[v] = {
7688
7688
  ...p[v],
7689
7689
  ...T
7690
7690
  }, C && h < Mp && (h++, typeof C == "object" && (C.placement && (d = C.placement), C.rects && (l = C.rects === !0 ? await i.getElementRects({
@@ -7727,12 +7727,12 @@ const Mp = 50, Dp = async (e, t, n) => {
7727
7727
  } = mt(e, t);
7728
7728
  if ((n = s.arrow) != null && n.alignmentOffset)
7729
7729
  return {};
7730
- const v = We(o), E = Ge(c), w = We(c) === c, S = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), T = d || (w || !g ? [jn(c)] : ld(c)), C = p !== "none";
7731
- !d && C && T.push(...pd(c, g, p, S));
7730
+ const v = We(o), E = Ge(c), S = We(c) === c, w = await (a.isRTL == null ? void 0 : a.isRTL(l.floating)), T = d || (S || !g ? [jn(c)] : ld(c)), C = p !== "none";
7731
+ !d && C && T.push(...pd(c, g, p, w));
7732
7732
  const R = [c, ...T], P = await a.detectOverflow(t, m), O = [];
7733
7733
  let M = ((r = s.flip) == null ? void 0 : r.overflows) || [];
7734
7734
  if (f && O.push(P[v]), u) {
7735
- const I = ad(o, i, S);
7735
+ const I = ad(o, i, w);
7736
7736
  O.push(P[I[0]], P[I[1]]);
7737
7737
  }
7738
7738
  if (M = [...M, {
@@ -7784,13 +7784,13 @@ const Mp = 50, Dp = async (e, t, n) => {
7784
7784
  return {};
7785
7785
  }
7786
7786
  };
7787
- }, Sc = /* @__PURE__ */ new Set(["left", "top"]);
7787
+ }, wc = /* @__PURE__ */ new Set(["left", "top"]);
7788
7788
  async function Lp(e, t) {
7789
7789
  const {
7790
7790
  placement: n,
7791
7791
  platform: r,
7792
7792
  elements: o
7793
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = We(n), c = nt(n), a = Ge(n) === "y", l = Sc.has(i) ? -1 : 1, f = s && a ? -1 : 1, u = mt(t, e);
7793
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = We(n), c = nt(n), a = Ge(n) === "y", l = wc.has(i) ? -1 : 1, f = s && a ? -1 : 1, u = mt(t, e);
7794
7794
  let {
7795
7795
  mainAxis: d,
7796
7796
  crossAxis: h,
@@ -7850,12 +7850,12 @@ const Bp = function(e) {
7850
7850
  limiter: a = {
7851
7851
  fn: (E) => {
7852
7852
  let {
7853
- x: w,
7854
- y: S
7853
+ x: S,
7854
+ y: w
7855
7855
  } = E;
7856
7856
  return {
7857
- x: w,
7858
- y: S
7857
+ x: S,
7858
+ y: w
7859
7859
  };
7860
7860
  }
7861
7861
  },
@@ -7865,7 +7865,7 @@ const Bp = function(e) {
7865
7865
  y: r
7866
7866
  }, u = await s.detectOverflow(t, l), d = Ge(o), h = Po(d);
7867
7867
  let p = f[h], g = f[d];
7868
- const m = (E, w) => rc(w + u[E === "y" ? "top" : "left"], w, w - u[E === "y" ? "bottom" : "right"]);
7868
+ const m = (E, S) => rc(S + u[E === "y" ? "top" : "left"], S, S - u[E === "y" ? "bottom" : "right"]);
7869
7869
  i && (p = m(h, p)), c && (g = m(d, g));
7870
7870
  const v = a.fn({
7871
7871
  ...t,
@@ -7917,8 +7917,8 @@ const Bp = function(e) {
7917
7917
  g < C ? g = C : g > R && (g = R);
7918
7918
  }
7919
7919
  if (u) {
7920
- var w, S;
7921
- const T = p === "y" ? "width" : "height", C = Sc.has(We(i)), R = c.reference[h] - c.floating[T] + (C && ((w = a.offset) == null ? void 0 : w[h]) || 0) + (C ? 0 : E.crossAxis), P = c.reference[h] + c.reference[T] + (C ? 0 : ((S = a.offset) == null ? void 0 : S[h]) || 0) - (C ? E.crossAxis : 0);
7920
+ var S, w;
7921
+ const T = p === "y" ? "width" : "height", C = wc.has(We(i)), R = c.reference[h] - c.floating[T] + (C && ((S = a.offset) == null ? void 0 : S[h]) || 0) + (C ? 0 : E.crossAxis), P = c.reference[h] + c.reference[T] + (C ? 0 : ((w = a.offset) == null ? void 0 : w[h]) || 0) - (C ? E.crossAxis : 0);
7922
7922
  m < R ? m = R : m > P && (m = P);
7923
7923
  }
7924
7924
  return {
@@ -7947,9 +7947,9 @@ const Bp = function(e) {
7947
7947
  } = r.floating;
7948
7948
  let p, g;
7949
7949
  l === "top" || l === "bottom" ? (p = l, g = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (g = l, p = f === "end" ? "top" : "bottom");
7950
- const m = h - a.top - a.bottom, v = d - a.left - a.right, E = Ht(h - a[p], m), w = Ht(d - a[g], v), S = t.middlewareData.shift, T = !S;
7951
- let C = E, R = w;
7952
- S != null && S.enabled.x && (R = v), S != null && S.enabled.y && (C = m), T && !f && (u ? R = d - 2 * ct(a.left, a.right) : C = h - 2 * ct(a.top, a.bottom)), await i({
7950
+ const m = h - a.top - a.bottom, v = d - a.left - a.right, E = Ht(h - a[p], m), S = Ht(d - a[g], v), w = t.middlewareData.shift, T = !w;
7951
+ let C = E, R = S;
7952
+ w != null && w.enabled.x && (R = v), w != null && w.enabled.y && (C = m), T && !f && (u ? R = d - 2 * ct(a.left, a.right) : C = h - 2 * ct(a.top, a.bottom)), await i({
7953
7953
  ...t,
7954
7954
  availableWidth: R,
7955
7955
  availableHeight: C
@@ -7963,7 +7963,7 @@ const Bp = function(e) {
7963
7963
  }
7964
7964
  };
7965
7965
  };
7966
- function wc(e) {
7966
+ function Sc(e) {
7967
7967
  const t = qe(e);
7968
7968
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
7969
7969
  const o = ke(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, c = qn(n) !== s || qn(r) !== i;
@@ -7984,7 +7984,7 @@ function Ft(e) {
7984
7984
  width: r,
7985
7985
  height: o,
7986
7986
  $: s
7987
- } = wc(t);
7987
+ } = Sc(t);
7988
7988
  let i = (s ? qn(n.width) : n.width) / r, c = (s ? qn(n.height) : n.height) / o;
7989
7989
  return (!i || !Number.isFinite(i)) && (i = 1), (!c || !Number.isFinite(c)) && (c = 1), {
7990
7990
  x: i,
@@ -8013,8 +8013,8 @@ function xt(e, t, n, r) {
8013
8013
  const d = _e(s), h = me(r) ? _e(r) : r;
8014
8014
  let p = d, g = Lr(p);
8015
8015
  for (; g && h !== p; ) {
8016
- const m = Ft(g), v = g.getBoundingClientRect(), E = qe(g), w = v.left + (g.clientLeft + parseFloat(E.paddingLeft)) * m.x, S = v.top + (g.clientTop + parseFloat(E.paddingTop)) * m.y;
8017
- a *= m.x, l *= m.y, f *= m.x, u *= m.y, a += w, l += S, p = _e(g), g = Lr(p);
8016
+ const m = Ft(g), v = g.getBoundingClientRect(), E = qe(g), S = v.left + (g.clientLeft + parseFloat(E.paddingLeft)) * m.x, w = v.top + (g.clientTop + parseFloat(E.paddingTop)) * m.y;
8017
+ a *= m.x, l *= m.y, f *= m.x, u *= m.y, a += S, l += w, p = _e(g), g = Lr(p);
8018
8018
  }
8019
8019
  }
8020
8020
  return Gn({
@@ -8161,7 +8161,7 @@ function Zp(e) {
8161
8161
  const {
8162
8162
  width: t,
8163
8163
  height: n
8164
- } = wc(e);
8164
+ } = Sc(e);
8165
8165
  return {
8166
8166
  width: t,
8167
8167
  height: n
@@ -8263,8 +8263,8 @@ function rh(e, t, n) {
8263
8263
  } = d;
8264
8264
  if (f || t(), !g || !m)
8265
8265
  return;
8266
- const v = Pn(p), E = Pn(s.clientWidth - (h + g)), w = Pn(s.clientHeight - (p + m)), S = Pn(h), C = {
8267
- rootMargin: -v + "px " + -E + "px " + -w + "px " + -S + "px",
8266
+ const v = Pn(p), E = Pn(s.clientWidth - (h + g)), S = Pn(s.clientHeight - (p + m)), w = Pn(h), C = {
8267
+ rootMargin: -v + "px " + -E + "px " + -S + "px " + -w + "px",
8268
8268
  threshold: ct(0, Ht(1, u)) || 1
8269
8269
  };
8270
8270
  let R = !0;
@@ -8314,8 +8314,8 @@ function Ls(e, t, n, r) {
8314
8314
  i && (h = new ResizeObserver((v) => {
8315
8315
  let [E] = v;
8316
8316
  E && E.target === l && h && t && (h.unobserve(t), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
8317
- var w;
8318
- (w = h) == null || w.observe(t);
8317
+ var S;
8318
+ (S = h) == null || S.observe(t);
8319
8319
  })), n();
8320
8320
  }), l && !a && h.observe(l), t && h.observe(t));
8321
8321
  let p, g = a ? xt(e) : null;
@@ -8412,9 +8412,9 @@ function dh(e) {
8412
8412
  Zn(d, r) || h(r);
8413
8413
  const [p, g] = y.useState(null), [m, v] = y.useState(null), E = y.useCallback((N) => {
8414
8414
  N !== C.current && (C.current = N, g(N));
8415
- }, []), w = y.useCallback((N) => {
8415
+ }, []), S = y.useCallback((N) => {
8416
8416
  N !== R.current && (R.current = N, v(N));
8417
- }, []), S = s || p, T = i || m, C = y.useRef(null), R = y.useRef(null), P = y.useRef(f), O = a != null, M = Ir(a), F = Ir(o), A = Ir(l), D = y.useCallback(() => {
8417
+ }, []), w = s || p, T = i || m, C = y.useRef(null), R = y.useRef(null), P = y.useRef(f), O = a != null, M = Ir(a), F = Ir(o), A = Ir(l), D = y.useCallback(() => {
8418
8418
  if (!C.current || !R.current)
8419
8419
  return;
8420
8420
  const N = {
@@ -8446,21 +8446,21 @@ function dh(e) {
8446
8446
  Ln(() => (I.current = !0, () => {
8447
8447
  I.current = !1;
8448
8448
  }), []), Ln(() => {
8449
- if (S && (C.current = S), T && (R.current = T), S && T) {
8449
+ if (w && (C.current = w), T && (R.current = T), w && T) {
8450
8450
  if (M.current)
8451
- return M.current(S, T, D);
8451
+ return M.current(w, T, D);
8452
8452
  D();
8453
8453
  }
8454
- }, [S, T, D, M, O]);
8454
+ }, [w, T, D, M, O]);
8455
8455
  const x = y.useMemo(() => ({
8456
8456
  reference: C,
8457
8457
  floating: R,
8458
8458
  setReference: E,
8459
- setFloating: w
8460
- }), [E, w]), _ = y.useMemo(() => ({
8461
- reference: S,
8459
+ setFloating: S
8460
+ }), [E, S]), _ = y.useMemo(() => ({
8461
+ reference: w,
8462
8462
  floating: T
8463
- }), [S, T]), U = y.useMemo(() => {
8463
+ }), [w, T]), U = y.useMemo(() => {
8464
8464
  const N = {
8465
8465
  position: n,
8466
8466
  left: 0,
@@ -8565,13 +8565,13 @@ class Eh extends Fo {
8565
8565
  });
8566
8566
  }
8567
8567
  }
8568
- function Sh() {
8568
+ function wh() {
8569
8569
  const e = new mc();
8570
8570
  return new vh(Object.freeze(_c(void 0, e)), Object.freeze(Ac(e)), Ic);
8571
8571
  }
8572
8572
  function _c(e, t, n, r = !1) {
8573
8573
  return {
8574
- ...wp(t, n, r),
8574
+ ...Sp(t, n, r),
8575
8575
  instantType: void 0,
8576
8576
  adaptiveOrigin: void 0,
8577
8577
  closeDelay: Oc,
@@ -8628,14 +8628,14 @@ function Vs(e) {
8628
8628
  children: [i && /* @__PURE__ */ b(Zd, {
8629
8629
  handle: i,
8630
8630
  store: f
8631
- }), m && /* @__PURE__ */ b(wh, {
8631
+ }), m && /* @__PURE__ */ b(Sh, {
8632
8632
  store: f
8633
8633
  }), typeof l == "function" ? l({
8634
8634
  payload: p
8635
8635
  }) : l]
8636
8636
  });
8637
8637
  }
8638
- function wh({
8638
+ function Sh({
8639
8639
  store: e
8640
8640
  }) {
8641
8641
  const t = e.useState("floatingRootContext"), n = $d(t);
@@ -8713,10 +8713,10 @@ const Dc = If(function(t, n) {
8713
8713
  } = t, d = gn(!0), p = Rp(l) ?? d;
8714
8714
  if (!p)
8715
8715
  throw new Error(process.env.NODE_ENV !== "production" ? "Base UI: <PreviewCard.Trigger> must be either used within a <PreviewCard.Root> component or provided with a handle." : Pt(89));
8716
- const g = Ci(c), m = p.useState("isTriggerActive", g), v = p.useState("isOpenedByTrigger", g), E = p.useState("floatingRootContext"), w = p.context.inlineRectCoordsRef, S = y.useRef(null), T = s ?? yh, C = i ?? Oc, {
8716
+ const g = Ci(c), m = p.useState("isTriggerActive", g), v = p.useState("isOpenedByTrigger", g), E = p.useState("floatingRootContext"), S = p.context.inlineRectCoordsRef, w = y.useRef(null), T = s ?? yh, C = i ?? Oc, {
8717
8717
  registerTrigger: R,
8718
8718
  isMountedByThisTrigger: P
8719
- } = rp(g, S, p, {
8719
+ } = rp(g, w, p, {
8720
8720
  payload: a,
8721
8721
  closeDelay: C
8722
8722
  }), O = Ip(E, {
@@ -8727,17 +8727,17 @@ const Dc = If(function(t, n) {
8727
8727
  open: T,
8728
8728
  close: C
8729
8729
  }),
8730
- triggerElementRef: S,
8730
+ triggerElementRef: w,
8731
8731
  isActiveTrigger: m,
8732
8732
  isClosing: () => p.select("transitionStatus") === "ending"
8733
8733
  }), M = xp(E, {
8734
8734
  delay: T
8735
8735
  }), F = {
8736
8736
  open: v
8737
- }, A = p.useState("triggerProps", P), D = qd(w, v);
8737
+ }, A = p.useState("triggerProps", P), D = qd(S, v);
8738
8738
  return vt("a", t, {
8739
8739
  state: F,
8740
- ref: [n, R, S],
8740
+ ref: [n, R, w],
8741
8741
  props: [O, M.reference, A, D, {
8742
8742
  id: g
8743
8743
  }, u],
@@ -8770,13 +8770,13 @@ function Rh(e) {
8770
8770
  reference: l
8771
8771
  }
8772
8772
  }
8773
- }), g = y.useCallback((w) => {
8774
- const S = me(w) ? {
8775
- getBoundingClientRect: () => w.getBoundingClientRect(),
8776
- getClientRects: () => w.getClientRects(),
8777
- contextElement: w
8778
- } : w;
8779
- f(S), p.refs.setReference(S);
8773
+ }), g = y.useCallback((S) => {
8774
+ const w = me(S) ? {
8775
+ getBoundingClientRect: () => S.getBoundingClientRect(),
8776
+ getClientRects: () => S.getClientRects(),
8777
+ contextElement: S
8778
+ } : S;
8779
+ f(w), p.refs.setReference(w);
8780
8780
  }, [p.refs]), m = y.useMemo(() => ({
8781
8781
  ...p.refs,
8782
8782
  setPositionReference: g,
@@ -8800,8 +8800,8 @@ function Rh(e) {
8800
8800
  i && (u.current = i);
8801
8801
  }, [i]), pe(() => {
8802
8802
  r.context.dataRef.current.floatingContext = E;
8803
- const w = d == null ? void 0 : d.nodesRef.current.find((S) => S.id === t);
8804
- w && (w.context = E);
8803
+ const S = d == null ? void 0 : d.nodesRef.current.find((w) => w.id === t);
8804
+ S && (S.context = E);
8805
8805
  }), y.useMemo(() => ({
8806
8806
  ...p,
8807
8807
  context: E,
@@ -8837,7 +8837,7 @@ const Ph = (e) => ({
8837
8837
  const u = oc(f), d = {
8838
8838
  x: n,
8839
8839
  y: r
8840
- }, h = Io(o), p = Oo(h), g = await i.getDimensions(l), m = h === "y", v = m ? "top" : "left", E = m ? "bottom" : "right", w = m ? "clientHeight" : "clientWidth", S = s.reference[p] + s.reference[h] - d[h] - s.floating[p], T = d[h] - s.reference[h], C = c.floating[w] || s.floating[p], R = S / 2 - T / 2, P = C / 2 - g[p] / 2 - 1, O = Math.min(u[v], P), M = Math.min(u[E], P), F = O, A = C - g[p] - M, D = C / 2 - g[p] / 2 + R, I = rc(F, D, A), x = !a.arrow && nt(o) != null && D !== I && s.reference[p] / 2 - (D < F ? O : M) - g[p] / 2 < 0, _ = x ? D < F ? D - F : D - A : 0;
8840
+ }, h = Io(o), p = Oo(h), g = await i.getDimensions(l), m = h === "y", v = m ? "top" : "left", E = m ? "bottom" : "right", S = m ? "clientHeight" : "clientWidth", w = s.reference[p] + s.reference[h] - d[h] - s.floating[p], T = d[h] - s.reference[h], C = c.floating[S] || s.floating[p], R = w / 2 - T / 2, P = C / 2 - g[p] / 2 - 1, O = Math.min(u[v], P), M = Math.min(u[E], P), F = O, A = C - g[p] - M, D = C / 2 - g[p] / 2 + R, I = rc(F, D, A), x = !a.arrow && nt(o) != null && D !== I && s.reference[p] / 2 - (D < F ? O : M) - g[p] / 2 < 0, _ = x ? D < F ? D - F : D - A : 0;
8841
8841
  return {
8842
8842
  [h]: d[h] + _,
8843
8843
  data: {
@@ -8933,8 +8933,8 @@ function Lh(e, t) {
8933
8933
  mounted: m,
8934
8934
  collisionAvoidance: v,
8935
8935
  shift: E,
8936
- nodeId: w,
8937
- adaptiveOrigin: S,
8936
+ nodeId: S,
8937
+ adaptiveOrigin: w,
8938
8938
  lazyFlip: T = !1,
8939
8939
  externalTree: C
8940
8940
  } = e, R = v.side || "flip", P = v.align || "flip", O = v.fallbackAxisSide || "end", M = (E == null ? void 0 : E.crossAxis) ?? !1, F = E == null ? void 0 : E.rootBoundary, A = typeof n == "function" ? n : void 0, D = fe(A), I = A ? D : n, x = Je(n), _ = Je(m), N = xh() === "rtl", [k, Y] = y.useState(null);
@@ -8959,12 +8959,12 @@ function Lh(e, t) {
8959
8959
  bottom: $.bottom || 0,
8960
8960
  left: $.left || 0
8961
8961
  });
8962
- const Q = 1, re = o === "bottom" ? Q : 0, ee = o === "top" ? Q : 0, te = o === "right" ? Q : 0, W = o === "left" ? Q : 0, ne = {
8962
+ const Q = 1, re = o === "bottom" ? Q : 0, ee = o === "top" ? Q : 0, te = o === "right" ? Q : 0, q = o === "left" ? Q : 0, ne = {
8963
8963
  boundary: a === "clipping-ancestors" ? "clippingAncestors" : a,
8964
8964
  padding: $
8965
- }, oe = y.useRef(null), ve = Je(s), j = Je(c), J = typeof s != "function" ? s : 0, ce = typeof c != "function" ? c : 0, he = [];
8965
+ }, oe = y.useRef(null), ve = Je(s), W = Je(c), J = typeof s != "function" ? s : 0, ce = typeof c != "function" ? c : 0, he = [];
8966
8966
  h && he.push(h), he.push(ph((de) => {
8967
- const Me = zs(de, o, N), je = typeof ve.current == "function" ? ve.current(Me) : ve.current, Be = typeof j.current == "function" ? j.current(Me) : j.current;
8967
+ const Me = zs(de, o, N), je = typeof ve.current == "function" ? ve.current(Me) : ve.current, Be = typeof W.current == "function" ? W.current(Me) : W.current;
8968
8968
  return {
8969
8969
  mainAxis: je,
8970
8970
  crossAxis: Be,
@@ -8977,7 +8977,7 @@ function Lh(e, t) {
8977
8977
  // Since the size() padding is smaller than the flip() padding, flip() will take precedence.
8978
8978
  padding: {
8979
8979
  top: $.top + Q + re,
8980
- right: $.right + Q + W,
8980
+ right: $.right + Q + q,
8981
8981
  bottom: $.bottom + Q + ee,
8982
8982
  left: $.left + Q + te
8983
8983
  },
@@ -9054,7 +9054,7 @@ function Lh(e, t) {
9054
9054
  let fr = _t === "top" || _t === "left" ? `calc(100% + ${Yt}px)` : `${-Yt}px`;
9055
9055
  return Fe && ft && Math.abs(((Yo = je.shift) == null ? void 0 : Yo.y) || 0) > Yt && (fr = `${Ye.reference.y + Ye.reference.height / 2 - vn}px`), Me.style.setProperty(Dh, ft ? `${En} ${fr}` : `${fr} ${En}`), {};
9056
9056
  }
9057
- }, Ih, S), pe(() => {
9057
+ }, Ih, w), pe(() => {
9058
9058
  !m && g && g.update({
9059
9059
  referenceElement: null,
9060
9060
  floatingElement: null,
@@ -9069,11 +9069,11 @@ function Lh(e, t) {
9069
9069
  }), [d]), {
9070
9070
  refs: H,
9071
9071
  elements: G,
9072
- x: we,
9072
+ x: Se,
9073
9073
  y: be,
9074
9074
  middlewareData: ge,
9075
9075
  update: V,
9076
- placement: q,
9076
+ placement: j,
9077
9077
  context: Z,
9078
9078
  isPositioned: se,
9079
9079
  floatingStyles: Ne
@@ -9084,16 +9084,16 @@ function Lh(e, t) {
9084
9084
  middleware: he,
9085
9085
  strategy: r,
9086
9086
  whileElementsMounted: p ? void 0 : (...de) => Ls(...de, ze),
9087
- nodeId: w,
9087
+ nodeId: S,
9088
9088
  externalTree: C
9089
9089
  }), {
9090
9090
  sideX: Re,
9091
9091
  sideY: Ot
9092
9092
  } = ge.adaptiveOrigin || _h, ut = se ? r : "fixed", It = y.useMemo(() => {
9093
9093
  let de;
9094
- return se ? S ? de = {
9094
+ return se ? w ? de = {
9095
9095
  position: ut,
9096
- [Re]: we,
9096
+ [Re]: Se,
9097
9097
  [Ot]: be
9098
9098
  } : de = {
9099
9099
  ...Ne,
@@ -9103,7 +9103,7 @@ function Lh(e, t) {
9103
9103
  top: 0,
9104
9104
  left: 0
9105
9105
  }, de[$s] = "100vw", de[Hs] = "100vh", se || (de.opacity = 0), de;
9106
- }, [S, ut, Re, we, Ot, be, Ne, se]), rt = y.useRef(null);
9106
+ }, [w, ut, Re, Se, Ot, be, Ne, se]), rt = y.useRef(null);
9107
9107
  pe(() => {
9108
9108
  if (!m)
9109
9109
  return;
@@ -9118,10 +9118,10 @@ function Lh(e, t) {
9118
9118
  if (p && m && G.reference && G.floating)
9119
9119
  return Ls(G.reference, G.floating, V, ze);
9120
9120
  }, [p, m, G, V, ze]);
9121
- const ot = We(q), yt = Lc(o, ot, N), Et = nt(q) || "center", jt = !!((Kt = ge.hide) != null && Kt.referenceHidden);
9121
+ const ot = We(j), yt = Lc(o, ot, N), Et = nt(j) || "center", jt = !!((Kt = ge.hide) != null && Kt.referenceHidden);
9122
9122
  pe(() => {
9123
- T && m && se && (ot !== L || K && Et !== X) && Y(q);
9124
- }, [T, K, m, se, q, ot, Et, L, X]);
9123
+ T && m && se && (ot !== L || K && Et !== X) && Y(j);
9124
+ }, [T, K, m, se, j, ot, Et, L, X]);
9125
9125
  const mn = y.useMemo(() => {
9126
9126
  var de, Me;
9127
9127
  return {
@@ -9191,7 +9191,7 @@ const Vc = /* @__PURE__ */ y.forwardRef(function(t, n) {
9191
9191
  collisionAvoidance: m = Id,
9192
9192
  style: v,
9193
9193
  ...E
9194
- } = t, w = gn(), S = Ch(), T = Dd(), C = w.useState("open"), R = w.useState("mounted"), P = w.useState("floatingRootContext"), O = w.useState("instantType"), M = w.useState("transitionStatus"), F = w.useState("adaptiveOrigin"), A = w.context.inlineRectCoordsRef, D = Fh({
9194
+ } = t, S = gn(), w = Ch(), T = Dd(), C = S.useState("open"), R = S.useState("mounted"), P = S.useState("floatingRootContext"), O = S.useState("instantType"), M = S.useState("transitionStatus"), F = S.useState("adaptiveOrigin"), A = S.context.inlineRectCoordsRef, D = Fh({
9195
9195
  anchor: s,
9196
9196
  floatingRootContext: P,
9197
9197
  positionMethod: i,
@@ -9205,7 +9205,7 @@ const Vc = /* @__PURE__ */ y.forwardRef(function(t, n) {
9205
9205
  collisionPadding: d,
9206
9206
  sticky: p,
9207
9207
  disableAnchorTracking: g,
9208
- keepMounted: S,
9208
+ keepMounted: w,
9209
9209
  nodeId: T,
9210
9210
  collisionAvoidance: m,
9211
9211
  adaptiveOrigin: F,
@@ -9224,7 +9224,7 @@ const Vc = /* @__PURE__ */ y.forwardRef(function(t, n) {
9224
9224
  styles: D.positionerStyles,
9225
9225
  transitionStatus: M,
9226
9226
  props: E,
9227
- refs: [n, w.useStateSetter("positionerElement")],
9227
+ refs: [n, S.useStateSetter("positionerElement")],
9228
9228
  hidden: !R,
9229
9229
  inert: !C
9230
9230
  });
@@ -9251,8 +9251,8 @@ const $c = /* @__PURE__ */ y.forwardRef(function(t, n) {
9251
9251
  open: f,
9252
9252
  ref: c.context.popupRef,
9253
9253
  onComplete() {
9254
- var E, w;
9255
- f && ((w = (E = c.context).onOpenChangeComplete) == null || w.call(E, !0));
9254
+ var E, S;
9255
+ f && ((S = (E = c.context).onOpenChangeComplete) == null || S.call(E, !0));
9256
9256
  }
9257
9257
  }), Pp(p, {
9258
9258
  closeDelay: g
@@ -9272,7 +9272,7 @@ const $c = /* @__PURE__ */ y.forwardRef(function(t, n) {
9272
9272
  process.env.NODE_ENV !== "production" && ($c.displayName = "PreviewCardPopup");
9273
9273
  class Vh extends Gd {
9274
9274
  constructor() {
9275
- super(Sh(), "PreviewCard");
9275
+ super(wh(), "PreviewCard");
9276
9276
  }
9277
9277
  /**
9278
9278
  * Opens the preview card and associates it with the trigger with the given id.
@@ -9504,7 +9504,7 @@ function tg(e) {
9504
9504
  return /* @__PURE__ */ b(Uc, { ...e, next: !0 });
9505
9505
  }
9506
9506
  function ng({ title: e, url: t, description: n, className: r, children: o, ...s }) {
9507
- const i = t ? So(t) : void 0;
9507
+ const i = t ? wo(t) : void 0;
9508
9508
  return /* @__PURE__ */ z("div", { className: ue("inline-citation-source", r), ...s, children: [
9509
9509
  /* @__PURE__ */ b("div", { className: "inline-citation-title", children: e || (i ? Qr(i) : "Source") }),
9510
9510
  i && /* @__PURE__ */ z("a", { href: i, target: "_blank", rel: "noopener noreferrer", children: [
@@ -9567,7 +9567,7 @@ const sg = ({
9567
9567
  /* @__PURE__ */ b(Tt, { children: /* @__PURE__ */ b(Ta, { size: 14 }) }),
9568
9568
  /* @__PURE__ */ b($t, { children: `${f.length} retrieved VPS ${u}` }),
9569
9569
  !s && /* @__PURE__ */ b(rn, { children: i ? "Hide Details" : "Inspect Sources" })
9570
- ] }), h = /* @__PURE__ */ b(wt, { className: "grounded-source-rows", children: f.map((p, g) => {
9570
+ ] }), h = /* @__PURE__ */ b(St, { className: "grounded-source-rows", children: f.map((p, g) => {
9571
9571
  const m = a === g, v = /* @__PURE__ */ z(Vt, { children: [
9572
9572
  /* @__PURE__ */ b(Tt, { children: /* @__PURE__ */ b(va, { size: 13 }) }),
9573
9573
  /* @__PURE__ */ z($t, { children: [
@@ -9596,10 +9596,10 @@ const sg = ({
9596
9596
  `${p.chunkId}-${g}`
9597
9597
  );
9598
9598
  }) });
9599
- return s ? /* @__PURE__ */ z(wt, { className: "grounded-sources-card", children: [
9599
+ return s ? /* @__PURE__ */ z(St, { className: "grounded-sources-card", children: [
9600
9600
  d,
9601
9601
  h
9602
- ] }) : /* @__PURE__ */ b(wt, { className: "grounded-sources-card", children: /* @__PURE__ */ z(Di, { open: i, onOpenChange: c, children: [
9602
+ ] }) : /* @__PURE__ */ b(St, { className: "grounded-sources-card", children: /* @__PURE__ */ z(Di, { open: i, onOpenChange: c, children: [
9603
9603
  /* @__PURE__ */ b(Fi, { children: d }),
9604
9604
  h,
9605
9605
  /* @__PURE__ */ b(Li, { children: /* @__PURE__ */ b("div", { className: "grounded-sources-details-list", children: f.map((p, g) => {
@@ -9627,14 +9627,14 @@ const sg = ({
9627
9627
  "a",
9628
9628
  {
9629
9629
  href: v.path,
9630
- onClick: (w) => {
9631
- w.preventDefault(), window.location.href = v.path;
9630
+ onClick: (S) => {
9631
+ S.preventDefault(), window.location.href = v.path;
9632
9632
  },
9633
9633
  className: "grounded-route-link",
9634
9634
  title: `Navigate to ${v.label}`,
9635
9635
  children: [
9636
9636
  /* @__PURE__ */ b("span", { children: v.label }),
9637
- /* @__PURE__ */ b(wa, { size: 10, "aria-hidden": "true" })
9637
+ /* @__PURE__ */ b(Sa, { size: 10, "aria-hidden": "true" })
9638
9638
  ]
9639
9639
  }
9640
9640
  )
@@ -9656,7 +9656,7 @@ const sg = ({
9656
9656
  function ig({ label: e, sources: t }) {
9657
9657
  const n = t.map((r) => {
9658
9658
  var i;
9659
- const o = eo(r), s = So(r.url || r.source) ?? ((i = Wc(r.source)) == null ? void 0 : i.path);
9659
+ const o = eo(r), s = wo(r.url || r.source) ?? ((i = Wc(r.source)) == null ? void 0 : i.path);
9660
9660
  return {
9661
9661
  key: r.chunkId,
9662
9662
  label: s || o,
@@ -9690,7 +9690,7 @@ function cg(e, t) {
9690
9690
  }
9691
9691
  const i = o.match(/^\[([^\]]+)\]\(([^)]+)\)$/);
9692
9692
  if (i) {
9693
- const c = i[1], a = i[2], l = So(a);
9693
+ const c = i[1], a = i[2], l = wo(a);
9694
9694
  if (!l) return /* @__PURE__ */ b(Ue.Fragment, { children: c }, s);
9695
9695
  const f = /^https?:\/\//i.test(a);
9696
9696
  return /* @__PURE__ */ b(
@@ -9875,7 +9875,7 @@ function fg({
9875
9875
  function h(p) {
9876
9876
  t === void 0 && a(p), r == null || r(p);
9877
9877
  }
9878
- return /* @__PURE__ */ b(qc.Provider, { value: { isStreaming: e, isOpen: d, setIsOpen: h, duration: o ?? l }, children: /* @__PURE__ */ b(wt, { className: s, children: /* @__PURE__ */ b(Di, { ...i, open: d, onOpenChange: h }) }) });
9878
+ return /* @__PURE__ */ b(qc.Provider, { value: { isStreaming: e, isOpen: d, setIsOpen: h, duration: o ?? l }, children: /* @__PURE__ */ b(St, { className: s, children: /* @__PURE__ */ b(Di, { ...i, open: d, onOpenChange: h }) }) });
9879
9879
  }
9880
9880
  function dg({
9881
9881
  getThinkingMessage: e,
@@ -9923,7 +9923,7 @@ const gg = ({
9923
9923
  description: s ? `${c.toFixed(1)}s` : void 0
9924
9924
  }
9925
9925
  ),
9926
- /* @__PURE__ */ b(pg, { children: /* @__PURE__ */ z(wt, { children: [
9926
+ /* @__PURE__ */ b(pg, { children: /* @__PURE__ */ z(St, { children: [
9927
9927
  n.map((u, d) => /* @__PURE__ */ z(ei, { children: [
9928
9928
  /* @__PURE__ */ b(fa, { children: /* @__PURE__ */ b("span", { className: "chat-progress-dot" }) }),
9929
9929
  /* @__PURE__ */ b(ti, { children: u })
@@ -9933,7 +9933,7 @@ const gg = ({
9933
9933
  /* @__PURE__ */ b($t, { children: hg(u.toolName) })
9934
9934
  ] }, `${u.toolName}-${d}`))
9935
9935
  ] }) })
9936
- ] }) : /* @__PURE__ */ b(wt, { className: "chat-response-trace", children: /* @__PURE__ */ z(Vt, { status: s ? "running" : void 0, children: [
9936
+ ] }) : /* @__PURE__ */ b(St, { className: "chat-response-trace", children: /* @__PURE__ */ z(Vt, { status: s ? "running" : void 0, children: [
9937
9937
  /* @__PURE__ */ b(Tt, { children: s ? /* @__PURE__ */ b(ci, { size: 14, className: "trace-spinner" }) : /* @__PURE__ */ b(si, { size: 14 }) }),
9938
9938
  /* @__PURE__ */ b($t, { children: s ? t || "Thinking" : i ? "Response stopped" : "Thought" }),
9939
9939
  s ? /* @__PURE__ */ z(rn, { "aria-hidden": "true", children: [
@@ -9990,7 +9990,7 @@ const gg = ({
9990
9990
  ] })
9991
9991
  ] });
9992
9992
  }, bg = ({ onEdit: e }) => {
9993
- const { messages: t, status: n } = er(), r = n === "awaiting" || n === "connecting", o = t.filter((s) => s.status !== "error");
9993
+ const { messages: t, status: n, suggestions: r, showSuggestions: o, sendMessage: s } = er(), i = n === "awaiting" || n === "connecting", c = t.filter((a) => a.status !== "error");
9994
9994
  return /* @__PURE__ */ b(
9995
9995
  Vu,
9996
9996
  {
@@ -9998,17 +9998,17 @@ const gg = ({
9998
9998
  defaultScrollPosition: "last-anchor",
9999
9999
  scrollPreviousItemPeek: 64,
10000
10000
  children: /* @__PURE__ */ z($u, { children: [
10001
- /* @__PURE__ */ b(Hu, { "aria-label": "Chat messages", children: /* @__PURE__ */ z(zu, { "aria-busy": r, children: [
10002
- o.length === 0 && /* @__PURE__ */ b(ps, { messageId: "welcome", children: /* @__PURE__ */ b(Wu, {}) }),
10003
- o.map((s) => /* @__PURE__ */ b(
10001
+ /* @__PURE__ */ b(Hu, { "aria-label": "Chat messages", children: /* @__PURE__ */ z(zu, { "aria-busy": i, children: [
10002
+ c.length === 0 && /* @__PURE__ */ b(ps, { messageId: "welcome", children: /* @__PURE__ */ b(Wu, {}) }),
10003
+ c.map((a) => /* @__PURE__ */ b(
10004
10004
  ps,
10005
10005
  {
10006
- messageId: s.streamId ?? s.id,
10007
- "data-role": s.role,
10008
- scrollAnchor: s.role === "user",
10009
- children: /* @__PURE__ */ b(mg, { message: s, onEdit: e })
10006
+ messageId: a.streamId ?? a.id,
10007
+ "data-role": a.role,
10008
+ scrollAnchor: a.role === "user",
10009
+ children: /* @__PURE__ */ b(mg, { message: a, onEdit: e })
10010
10010
  },
10011
- s.streamId ?? s.id
10011
+ a.streamId ?? a.id
10012
10012
  ))
10013
10013
  ] }) }),
10014
10014
  /* @__PURE__ */ b(Uu, {})
@@ -10074,7 +10074,7 @@ const gg = ({
10074
10074
  envStage: s,
10075
10075
  envPulse: i = !0
10076
10076
  }) => {
10077
- const { messages: c, sendMessage: a, stopResponse: l, status: f, error: u, resetConversation: d, retryLast: h, pendingTicket: p, soundEnabled: g, toggleSound: m } = er(), v = Ae(null), E = f === "awaiting" || f === "connecting", w = c[c.length - 1], S = E ? w == null ? void 0 : w.progressText : (w == null ? void 0 : w.status) === "stopped" ? "Response stopped" : void 0;
10077
+ const { messages: c, sendMessage: a, stopResponse: l, status: f, error: u, resetConversation: d, retryLast: h, pendingTicket: p, soundEnabled: g, toggleSound: m } = er(), v = Ae(null), E = f === "awaiting" || f === "connecting", S = c[c.length - 1], w = E ? S == null ? void 0 : S.progressText : (S == null ? void 0 : S.status) === "stopped" ? "Response stopped" : void 0;
10078
10078
  return /* @__PURE__ */ z(
10079
10079
  "section",
10080
10080
  {
@@ -10099,7 +10099,7 @@ const gg = ({
10099
10099
  var C;
10100
10100
  return (C = v.current) == null ? void 0 : C.edit(T);
10101
10101
  } }) }),
10102
- /* @__PURE__ */ b(ei, { className: "sr-only", role: "status", children: /* @__PURE__ */ b(ti, { children: S }) }),
10102
+ /* @__PURE__ */ b(ei, { className: "sr-only", role: "status", children: /* @__PURE__ */ b(ti, { children: w }) }),
10103
10103
  u && f === "error" && /* @__PURE__ */ b(Hl, { message: u, onRetry: () => void h() }),
10104
10104
  /* @__PURE__ */ b(vg, {}),
10105
10105
  /* @__PURE__ */ b(
@@ -10207,7 +10207,7 @@ const gg = ({
10207
10207
  children: /* @__PURE__ */ b(qs, { ...p })
10208
10208
  }
10209
10209
  );
10210
- }, Sg = ({
10210
+ }, wg = ({
10211
10211
  open: e,
10212
10212
  onClose: t,
10213
10213
  subtitle: n,
@@ -10242,7 +10242,7 @@ const gg = ({
10242
10242
  )
10243
10243
  }
10244
10244
  )
10245
- ] }), wg = 5, _r = 8, Kc = "vps-embedded-assistant-top";
10245
+ ] }), Sg = 5, _r = 8, Kc = "vps-embedded-assistant-top";
10246
10246
  function Cg(e, t, n) {
10247
10247
  return Math.min(n, Math.max(t, e));
10248
10248
  }
@@ -10309,7 +10309,7 @@ const xg = ({
10309
10309
  }, f = (d) => {
10310
10310
  if (n.current.pointerId !== d.pointerId) return;
10311
10311
  const h = d.clientY - n.current.startY;
10312
- if (!n.current.moved && Math.abs(h) < wg) return;
10312
+ if (!n.current.moved && Math.abs(h) < Sg) return;
10313
10313
  n.current.moved = !0, a(!0);
10314
10314
  const p = js(
10315
10315
  n.current.startTop + h,
@@ -10370,7 +10370,7 @@ const xg = ({
10370
10370
  return /* @__PURE__ */ z(Ut, { children: [
10371
10371
  r && !a && /* @__PURE__ */ b(xg, { onOpen: () => l(!0) }),
10372
10372
  /* @__PURE__ */ b(
10373
- Sg,
10373
+ wg,
10374
10374
  {
10375
10375
  open: a,
10376
10376
  onClose: () => l(!1),