teodor-new-chat-ui 3.0.39 → 3.0.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as f from "react";
2
- import Y, { useState as be, useRef as vt, useCallback as Ye, useEffect as Ze, useReducer as yh, useMemo as wn, createContext as cc, useContext as uc, createElement as no, useLayoutEffect as Sh } from "react";
2
+ import Y, { useState as be, useRef as bt, useCallback as qe, useEffect as et, useReducer as yh, useMemo as wn, createContext as cc, useContext as uc, createElement as no, useLayoutEffect as Sh } from "react";
3
3
  import * as Bo from "react-dom";
4
4
  import dc from "react-dom";
5
5
  import { Square as fc, Send as Ch, ChevronUp as dr, ChevronDown as zn, Copy as Da, Edit as La, RotateCcw as Ks, Bot as Fa, Wrench as Th, User as Eh, Image as Rh, Loader as Ih, ChevronRight as Nh, Check as Pi, Circle as Ah, X as hr, Edit3 as pc, Paperclip as Ba, Loader2 as jh, Plus as Ph, FileSpreadsheet as kh, MessageSquarePlus as _h, MessageSquare as Oh, Calendar as Mh, Trash2 as Dh, PanelLeft as Lh, Settings as Fh, Server as Bh, EyeOff as Hh, Eye as $h, Layout as zh, MessageCircle as Uh, Save as Wh } from "lucide-react";
@@ -240,42 +240,42 @@ function Xh() {
240
240
  }), typeof Reflect == "object" && Reflect.construct) {
241
241
  try {
242
242
  Reflect.construct(je, []);
243
- } catch (Zt) {
244
- ve = Zt;
243
+ } catch (tn) {
244
+ ve = tn;
245
245
  }
246
246
  Reflect.construct(T, [], je);
247
247
  } else {
248
248
  try {
249
249
  je.call();
250
- } catch (Zt) {
251
- ve = Zt;
250
+ } catch (tn) {
251
+ ve = tn;
252
252
  }
253
253
  T.call(je.prototype);
254
254
  }
255
255
  } else {
256
256
  try {
257
257
  throw Error();
258
- } catch (Zt) {
259
- ve = Zt;
258
+ } catch (tn) {
259
+ ve = tn;
260
260
  }
261
261
  T();
262
262
  }
263
- } catch (Zt) {
264
- if (Zt && ve && typeof Zt.stack == "string") {
265
- for (var Ie = Zt.stack.split(`
266
- `), lt = ve.stack.split(`
267
- `), Ke = Ie.length - 1, Je = lt.length - 1; Ke >= 1 && Je >= 0 && Ie[Ke] !== lt[Je]; )
268
- Je--;
269
- for (; Ke >= 1 && Je >= 0; Ke--, Je--)
270
- if (Ie[Ke] !== lt[Je]) {
271
- if (Ke !== 1 || Je !== 1)
263
+ } catch (tn) {
264
+ if (tn && ve && typeof tn.stack == "string") {
265
+ for (var Ie = tn.stack.split(`
266
+ `), dt = ve.stack.split(`
267
+ `), Xe = Ie.length - 1, Qe = dt.length - 1; Xe >= 1 && Qe >= 0 && Ie[Xe] !== dt[Qe]; )
268
+ Qe--;
269
+ for (; Xe >= 1 && Qe >= 0; Xe--, Qe--)
270
+ if (Ie[Xe] !== dt[Qe]) {
271
+ if (Xe !== 1 || Qe !== 1)
272
272
  do
273
- if (Ke--, Je--, Je < 0 || Ie[Ke] !== lt[Je]) {
274
- var St = `
275
- ` + Ie[Ke].replace(" at new ", " at ");
276
- return T.displayName && St.includes("<anonymous>") && (St = St.replace("<anonymous>", T.displayName)), typeof T == "function" && re.set(T, St), St;
273
+ if (Xe--, Qe--, Qe < 0 || Ie[Xe] !== dt[Qe]) {
274
+ var Et = `
275
+ ` + Ie[Xe].replace(" at new ", " at ");
276
+ return T.displayName && Et.includes("<anonymous>") && (Et = Et.replace("<anonymous>", T.displayName)), typeof T == "function" && re.set(T, Et), Et;
277
277
  }
278
- while (Ke >= 1 && Je >= 0);
278
+ while (Xe >= 1 && Qe >= 0);
279
279
  break;
280
280
  }
281
281
  }
@@ -285,7 +285,7 @@ function Xh() {
285
285
  var Dn = T ? T.displayName || T.name : "", Ma = Dn ? k(Dn) : "";
286
286
  return typeof T == "function" && re.set(T, Ma), Ma;
287
287
  }
288
- function Oe(T, $, ne) {
288
+ function Me(T, $, ne) {
289
289
  return ie(T, !1);
290
290
  }
291
291
  function ue(T) {
@@ -308,7 +308,7 @@ function Xh() {
308
308
  if (typeof T == "object")
309
309
  switch (T.$$typeof) {
310
310
  case c:
311
- return Oe(T.render);
311
+ return Me(T.render);
312
312
  case p:
313
313
  return Ae(T.type, $, ne);
314
314
  case h: {
@@ -337,48 +337,48 @@ function Xh() {
337
337
  var Ie = void 0;
338
338
  try {
339
339
  if (typeof T[je] != "function") {
340
- var lt = Error((ve || "React class") + ": " + ne + " type `" + je + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[je] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
- throw lt.name = "Invariant Violation", lt;
340
+ var dt = Error((ve || "React class") + ": " + ne + " type `" + je + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof T[je] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
341
+ throw dt.name = "Invariant Violation", dt;
342
342
  }
343
343
  Ie = T[je]($, je, ve, ne, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
344
- } catch (Ke) {
345
- Ie = Ke;
344
+ } catch (Xe) {
345
+ Ie = Xe;
346
346
  }
347
347
  Ie && !(Ie instanceof Error) && (W(De), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", ve || "React class", ne, je, typeof Ie), W(null)), Ie instanceof Error && !(Ie.message in fe) && (fe[Ie.message] = !0, W(De), b("Failed %s type: %s", ne, Ie.message), W(null));
348
348
  }
349
349
  }
350
350
  }
351
351
  var ye = Array.isArray;
352
- function Me(T) {
352
+ function _e(T) {
353
353
  return ye(T);
354
354
  }
355
- function tt(T) {
355
+ function Ge(T) {
356
356
  {
357
357
  var $ = typeof Symbol == "function" && Symbol.toStringTag, ne = $ && T[Symbol.toStringTag] || T.constructor.name || "Object";
358
358
  return ne;
359
359
  }
360
360
  }
361
- function $e(T) {
361
+ function nt(T) {
362
362
  try {
363
- return Ve(T), !1;
363
+ return Ke(T), !1;
364
364
  } catch {
365
365
  return !0;
366
366
  }
367
367
  }
368
- function Ve(T) {
368
+ function Ke(T) {
369
369
  return "" + T;
370
370
  }
371
- function ft(T) {
372
- if ($e(T))
373
- return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tt(T)), Ve(T);
371
+ function Tt(T) {
372
+ if (nt(T))
373
+ return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ge(T)), Ke(T);
374
374
  }
375
- var at = w.ReactCurrentOwner, nn = {
375
+ var We = w.ReactCurrentOwner, it = {
376
376
  key: !0,
377
377
  ref: !0,
378
378
  __self: !0,
379
379
  __source: !0
380
- }, $t, rn;
381
- function on(T) {
380
+ }, Ye, at;
381
+ function kt(T) {
382
382
  if (le.call(T, "ref")) {
383
383
  var $ = Object.getOwnPropertyDescriptor(T, "ref").get;
384
384
  if ($ && $.isReactWarning)
@@ -395,12 +395,12 @@ function Xh() {
395
395
  return T.key !== void 0;
396
396
  }
397
397
  function On(T, $) {
398
- typeof T.ref == "string" && at.current;
398
+ typeof T.ref == "string" && We.current;
399
399
  }
400
- function Ge(T, $) {
400
+ function Ve(T, $) {
401
401
  {
402
402
  var ne = function() {
403
- $t || ($t = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", $));
403
+ Ye || (Ye = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", $));
404
404
  };
405
405
  ne.isReactWarning = !0, Object.defineProperty(T, "key", {
406
406
  get: ne,
@@ -411,7 +411,7 @@ function Xh() {
411
411
  function ir(T, $) {
412
412
  {
413
413
  var ne = function() {
414
- rn || (rn = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", $));
414
+ at || (at = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", $));
415
415
  };
416
416
  ne.isReactWarning = !0, Object.defineProperty(T, "ref", {
417
417
  get: ne,
@@ -450,20 +450,20 @@ function Xh() {
450
450
  };
451
451
  function ys(T, $, ne, ve, De) {
452
452
  {
453
- var Be, je = {}, Ie = null, lt = null;
454
- ne !== void 0 && (ft(ne), Ie = "" + ne), xn($) && (ft($.key), Ie = "" + $.key), on($) && (lt = $.ref, On($, De));
453
+ var Be, je = {}, Ie = null, dt = null;
454
+ ne !== void 0 && (Tt(ne), Ie = "" + ne), xn($) && (Tt($.key), Ie = "" + $.key), kt($) && (dt = $.ref, On($, De));
455
455
  for (Be in $)
456
- le.call($, Be) && !nn.hasOwnProperty(Be) && (je[Be] = $[Be]);
456
+ le.call($, Be) && !it.hasOwnProperty(Be) && (je[Be] = $[Be]);
457
457
  if (T && T.defaultProps) {
458
- var Ke = T.defaultProps;
459
- for (Be in Ke)
460
- je[Be] === void 0 && (je[Be] = Ke[Be]);
458
+ var Xe = T.defaultProps;
459
+ for (Be in Xe)
460
+ je[Be] === void 0 && (je[Be] = Xe[Be]);
461
461
  }
462
- if (Ie || lt) {
463
- var Je = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
- Ie && Ge(je, Je), lt && ir(je, Je);
462
+ if (Ie || dt) {
463
+ var Qe = typeof T == "function" ? T.displayName || T.name || "Unknown" : T;
464
+ Ie && Ve(je, Qe), dt && ir(je, Qe);
465
465
  }
466
- return ws(T, Ie, lt, De, ve, at.current, je);
466
+ return ws(T, Ie, dt, De, ve, We.current, je);
467
467
  }
468
468
  }
469
469
  var q = w.ReactCurrentOwner, se = w.ReactDebugCurrentFrame;
@@ -476,10 +476,10 @@ function Xh() {
476
476
  }
477
477
  var Pe;
478
478
  Pe = !1;
479
- function At(T) {
479
+ function _t(T) {
480
480
  return typeof T == "object" && T !== null && T.$$typeof === t;
481
481
  }
482
- function jt() {
482
+ function Ot() {
483
483
  {
484
484
  if (q.current) {
485
485
  var T = G(q.current.type);
@@ -497,7 +497,7 @@ Check the render method of \`` + T + "`.";
497
497
  var Pa = {};
498
498
  function hh(T) {
499
499
  {
500
- var $ = jt();
500
+ var $ = Ot();
501
501
  if (!$) {
502
502
  var ne = typeof T == "string" ? T : T.displayName || T.name;
503
503
  ne && ($ = `
@@ -524,18 +524,18 @@ Check the top-level render call using <` + ne + ">.");
524
524
  {
525
525
  if (typeof T != "object")
526
526
  return;
527
- if (Me(T))
527
+ if (_e(T))
528
528
  for (var ne = 0; ne < T.length; ne++) {
529
529
  var ve = T[ne];
530
- At(ve) && ka(ve, $);
530
+ _t(ve) && ka(ve, $);
531
531
  }
532
- else if (At(T))
532
+ else if (_t(T))
533
533
  T._store && (T._store.validated = !0);
534
534
  else if (T) {
535
535
  var De = g(T);
536
536
  if (typeof De == "function" && De !== T.entries)
537
537
  for (var Be = De.call(T), je; !(je = Be.next()).done; )
538
- At(je.value) && ka(je.value, $);
538
+ _t(je.value) && ka(je.value, $);
539
539
  }
540
540
  }
541
541
  }
@@ -582,28 +582,28 @@ Check the top-level render call using <` + ne + ">.");
582
582
  if (!je) {
583
583
  var Ie = "";
584
584
  (T === void 0 || typeof T == "object" && T !== null && Object.keys(T).length === 0) && (Ie += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
585
- var lt = Mn();
586
- lt ? Ie += lt : Ie += jt();
587
- var Ke;
588
- T === null ? Ke = "null" : Me(T) ? Ke = "array" : T !== void 0 && T.$$typeof === t ? (Ke = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Ke = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Ke, Ie);
585
+ var dt = Mn();
586
+ dt ? Ie += dt : Ie += Ot();
587
+ var Xe;
588
+ T === null ? Xe = "null" : _e(T) ? Xe = "array" : T !== void 0 && T.$$typeof === t ? (Xe = "<" + (G(T.type) || "Unknown") + " />", Ie = " Did you accidentally export a JSX literal instead of a component?") : Xe = typeof T, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Xe, Ie);
589
589
  }
590
- var Je = ys(T, $, ne, De, Be);
591
- if (Je == null)
592
- return Je;
590
+ var Qe = ys(T, $, ne, De, Be);
591
+ if (Qe == null)
592
+ return Qe;
593
593
  if (je) {
594
- var St = $.children;
595
- if (St !== void 0)
594
+ var Et = $.children;
595
+ if (Et !== void 0)
596
596
  if (ve)
597
- if (Me(St)) {
598
- for (var Dn = 0; Dn < St.length; Dn++)
599
- _a(St[Dn], T);
600
- Object.freeze && Object.freeze(St);
597
+ if (_e(Et)) {
598
+ for (var Dn = 0; Dn < Et.length; Dn++)
599
+ _a(Et[Dn], T);
600
+ Object.freeze && Object.freeze(Et);
601
601
  } else
602
602
  b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
603
603
  else
604
- _a(St, T);
604
+ _a(Et, T);
605
605
  }
606
- return T === r ? gh(Je) : mh(Je), Je;
606
+ return T === r ? gh(Qe) : mh(Qe), Qe;
607
607
  }
608
608
  }
609
609
  function vh(T, $, ne) {
@@ -626,16 +626,16 @@ function hc(e, t) {
626
626
  const { toString: qh } = Object.prototype, { getPrototypeOf: ki } = Object, { iterator: Ho, toStringTag: mc } = Symbol, $o = /* @__PURE__ */ ((e) => (t) => {
627
627
  const n = qh.call(t);
628
628
  return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
629
- })(/* @__PURE__ */ Object.create(null)), Ft = (e) => (e = e.toLowerCase(), (t) => $o(t) === e), zo = (e) => (t) => typeof t === e, { isArray: Zn } = Array, Kn = zo("undefined");
629
+ })(/* @__PURE__ */ Object.create(null)), zt = (e) => (e = e.toLowerCase(), (t) => $o(t) === e), zo = (e) => (t) => typeof t === e, { isArray: Zn } = Array, Kn = zo("undefined");
630
630
  function _r(e) {
631
- return e !== null && !Kn(e) && e.constructor !== null && !Kn(e.constructor) && pt(e.constructor.isBuffer) && e.constructor.isBuffer(e);
631
+ return e !== null && !Kn(e) && e.constructor !== null && !Kn(e.constructor) && mt(e.constructor.isBuffer) && e.constructor.isBuffer(e);
632
632
  }
633
- const gc = Ft("ArrayBuffer");
633
+ const gc = zt("ArrayBuffer");
634
634
  function Jh(e) {
635
635
  let t;
636
636
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && gc(e.buffer), t;
637
637
  }
638
- const Zh = zo("string"), pt = zo("function"), vc = zo("number"), Or = (e) => e !== null && typeof e == "object", Qh = (e) => e === !0 || e === !1, ro = (e) => {
638
+ const Zh = zo("string"), mt = zo("function"), vc = zo("number"), Or = (e) => e !== null && typeof e == "object", Qh = (e) => e === !0 || e === !1, ro = (e) => {
639
639
  if ($o(e) !== "object")
640
640
  return !1;
641
641
  const t = ki(e);
@@ -648,11 +648,11 @@ const Zh = zo("string"), pt = zo("function"), vc = zo("number"), Or = (e) => e !
648
648
  } catch {
649
649
  return !1;
650
650
  }
651
- }, tm = Ft("Date"), nm = Ft("File"), rm = Ft("Blob"), om = Ft("FileList"), sm = (e) => Or(e) && pt(e.pipe), im = (e) => {
651
+ }, tm = zt("Date"), nm = zt("File"), rm = zt("Blob"), om = zt("FileList"), sm = (e) => Or(e) && mt(e.pipe), im = (e) => {
652
652
  let t;
653
- return e && (typeof FormData == "function" && e instanceof FormData || pt(e.append) && ((t = $o(e)) === "formdata" || // detect form-data instance
654
- t === "object" && pt(e.toString) && e.toString() === "[object FormData]"));
655
- }, am = Ft("URLSearchParams"), [lm, cm, um, dm] = ["ReadableStream", "Request", "Response", "Headers"].map(Ft), fm = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
653
+ return e && (typeof FormData == "function" && e instanceof FormData || mt(e.append) && ((t = $o(e)) === "formdata" || // detect form-data instance
654
+ t === "object" && mt(e.toString) && e.toString() === "[object FormData]"));
655
+ }, am = zt("URLSearchParams"), [lm, cm, um, dm] = ["ReadableStream", "Request", "Response", "Headers"].map(zt), fm = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
656
656
  function Mr(e, t, { allOwnKeys: n = !1 } = {}) {
657
657
  if (e === null || typeof e > "u")
658
658
  return;
@@ -691,7 +691,7 @@ function Xs() {
691
691
  return n;
692
692
  }
693
693
  const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
694
- n && pt(o) ? e[s] = hc(o, n) : e[s] = o;
694
+ n && mt(o) ? e[s] = hc(o, n) : e[s] = o;
695
695
  }, { allOwnKeys: r }), e), hm = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), mm = (e, t, n, r) => {
696
696
  e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
697
697
  value: t.prototype
@@ -732,12 +732,12 @@ const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
732
732
  for (; (n = e.exec(t)) !== null; )
733
733
  r.push(n);
734
734
  return r;
735
- }, Sm = Ft("HTMLFormElement"), Cm = (e) => e.toLowerCase().replace(
735
+ }, Sm = zt("HTMLFormElement"), Cm = (e) => e.toLowerCase().replace(
736
736
  /[-_\s]([a-z\d])(\w*)/g,
737
737
  function(n, r, o) {
738
738
  return r.toUpperCase() + o;
739
739
  }
740
- ), za = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tm = Ft("RegExp"), wc = (e, t) => {
740
+ ), za = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tm = zt("RegExp"), wc = (e, t) => {
741
741
  const n = Object.getOwnPropertyDescriptors(e), r = {};
742
742
  Mr(n, (o, s) => {
743
743
  let i;
@@ -745,10 +745,10 @@ const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
745
745
  }), Object.defineProperties(e, r);
746
746
  }, Em = (e) => {
747
747
  wc(e, (t, n) => {
748
- if (pt(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
748
+ if (mt(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
749
749
  return !1;
750
750
  const r = e[n];
751
- if (pt(r)) {
751
+ if (mt(r)) {
752
752
  if (t.enumerable = !1, "writable" in t) {
753
753
  t.writable = !1;
754
754
  return;
@@ -768,7 +768,7 @@ const pm = (e, t, n, { allOwnKeys: r } = {}) => (Mr(t, (o, s) => {
768
768
  }, Im = () => {
769
769
  }, Nm = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
770
770
  function Am(e) {
771
- return !!(e && pt(e.append) && e[mc] === "FormData" && e[Ho]);
771
+ return !!(e && mt(e.append) && e[mc] === "FormData" && e[Ho]);
772
772
  }
773
773
  const jm = (e) => {
774
774
  const t = new Array(10), n = (r, o) => {
@@ -789,14 +789,14 @@ const jm = (e) => {
789
789
  return r;
790
790
  };
791
791
  return n(e, 0);
792
- }, Pm = Ft("AsyncFunction"), km = (e) => e && (Or(e) || pt(e)) && pt(e.then) && pt(e.catch), yc = ((e, t) => e ? setImmediate : t ? ((n, r) => (yn.addEventListener("message", ({ source: o, data: s }) => {
792
+ }, Pm = zt("AsyncFunction"), km = (e) => e && (Or(e) || mt(e)) && mt(e.then) && mt(e.catch), yc = ((e, t) => e ? setImmediate : t ? ((n, r) => (yn.addEventListener("message", ({ source: o, data: s }) => {
793
793
  o === yn && s === n && r.length && r.shift()();
794
794
  }, !1), (o) => {
795
795
  r.push(o), yn.postMessage(n, "*");
796
796
  }))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
797
797
  typeof setImmediate == "function",
798
- pt(yn.postMessage)
799
- ), _m = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || yc, Om = (e) => e != null && pt(e[Ho]), A = {
798
+ mt(yn.postMessage)
799
+ ), _m = typeof queueMicrotask < "u" ? queueMicrotask.bind(yn) : typeof process < "u" && process.nextTick || yc, Om = (e) => e != null && mt(e[Ho]), A = {
800
800
  isArray: Zn,
801
801
  isArrayBuffer: gc,
802
802
  isBuffer: _r,
@@ -817,7 +817,7 @@ const jm = (e) => {
817
817
  isFile: nm,
818
818
  isBlob: rm,
819
819
  isRegExp: Tm,
820
- isFunction: pt,
820
+ isFunction: mt,
821
821
  isStream: sm,
822
822
  isURLSearchParams: am,
823
823
  isTypedArray: bm,
@@ -830,7 +830,7 @@ const jm = (e) => {
830
830
  inherits: mm,
831
831
  toFlatObject: gm,
832
832
  kindOf: $o,
833
- kindOfTest: Ft,
833
+ kindOfTest: zt,
834
834
  endsWith: vm,
835
835
  toArray: xm,
836
836
  forEachEntry: wm,
@@ -1110,14 +1110,14 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Vm
1110
1110
  hasStandardBrowserWebWorkerEnv: Wm,
1111
1111
  navigator: Js,
1112
1112
  origin: Vm
1113
- }, Symbol.toStringTag, { value: "Module" })), ot = {
1113
+ }, Symbol.toStringTag, { value: "Module" })), lt = {
1114
1114
  ...Gm,
1115
1115
  ...zm
1116
1116
  };
1117
1117
  function Km(e, t) {
1118
- return Uo(e, new ot.classes.URLSearchParams(), {
1118
+ return Uo(e, new lt.classes.URLSearchParams(), {
1119
1119
  visitor: function(n, r, o, s) {
1120
- return ot.isNode && A.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1120
+ return lt.isNode && A.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
1121
1121
  },
1122
1122
  ...t
1123
1123
  });
@@ -1212,8 +1212,8 @@ const Dr = {
1212
1212
  maxContentLength: -1,
1213
1213
  maxBodyLength: -1,
1214
1214
  env: {
1215
- FormData: ot.classes.FormData,
1216
- Blob: ot.classes.Blob
1215
+ FormData: lt.classes.FormData,
1216
+ Blob: lt.classes.Blob
1217
1217
  },
1218
1218
  validateStatus: function(t) {
1219
1219
  return t >= 200 && t < 300;
@@ -1292,7 +1292,7 @@ function ng(e, t) {
1292
1292
  });
1293
1293
  });
1294
1294
  }
1295
- let ht = class {
1295
+ let gt = class {
1296
1296
  constructor(t) {
1297
1297
  t && this.set(t);
1298
1298
  }
@@ -1418,8 +1418,8 @@ let ht = class {
1418
1418
  return A.isArray(t) ? t.forEach(s) : s(t), this;
1419
1419
  }
1420
1420
  };
1421
- ht.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1422
- A.reduceDescriptors(ht.prototype, ({ value: e }, t) => {
1421
+ gt.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
1422
+ A.reduceDescriptors(gt.prototype, ({ value: e }, t) => {
1423
1423
  let n = t[0].toUpperCase() + t.slice(1);
1424
1424
  return {
1425
1425
  get: () => e,
@@ -1428,9 +1428,9 @@ A.reduceDescriptors(ht.prototype, ({ value: e }, t) => {
1428
1428
  }
1429
1429
  };
1430
1430
  });
1431
- A.freezeMethods(ht);
1431
+ A.freezeMethods(gt);
1432
1432
  function Cs(e, t) {
1433
- const n = this || Dr, r = t || n, o = ht.from(r.headers);
1433
+ const n = this || Dr, r = t || n, o = gt.from(r.headers);
1434
1434
  let s = r.data;
1435
1435
  return A.forEach(e, function(a) {
1436
1436
  s = a.call(n, s, o.normalize(), t ? t.status : void 0);
@@ -1513,10 +1513,10 @@ const So = (e, t, n = 3) => {
1513
1513
  total: e,
1514
1514
  loaded: r
1515
1515
  }), t[1]];
1516
- }, Ya = (e) => (...t) => A.asap(() => e(...t)), ig = ot.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, ot.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1517
- new URL(ot.origin),
1518
- ot.navigator && /(msie|trident)/i.test(ot.navigator.userAgent)
1519
- ) : () => !0, ag = ot.hasStandardBrowserEnv ? (
1516
+ }, Ya = (e) => (...t) => A.asap(() => e(...t)), ig = lt.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, lt.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
1517
+ new URL(lt.origin),
1518
+ lt.navigator && /(msie|trident)/i.test(lt.navigator.userAgent)
1519
+ ) : () => !0, ag = lt.hasStandardBrowserEnv ? (
1520
1520
  // Standard browser envs support document.cookie
1521
1521
  {
1522
1522
  write(e, t, n, r, o, s) {
@@ -1553,7 +1553,7 @@ function Pc(e, t, n) {
1553
1553
  let r = !lg(t);
1554
1554
  return e && (r || n == !1) ? cg(e, t) : t;
1555
1555
  }
1556
- const Xa = (e) => e instanceof ht ? { ...e } : e;
1556
+ const Xa = (e) => e instanceof gt ? { ...e } : e;
1557
1557
  function Tn(e, t) {
1558
1558
  t = t || {};
1559
1559
  const n = {};
@@ -1621,11 +1621,11 @@ function Tn(e, t) {
1621
1621
  const kc = (e) => {
1622
1622
  const t = Tn({}, e);
1623
1623
  let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: a } = t;
1624
- if (t.headers = i = ht.from(i), t.url = Rc(Pc(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
1624
+ if (t.headers = i = gt.from(i), t.url = Rc(Pc(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
1625
1625
  "Authorization",
1626
1626
  "Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
1627
1627
  ), A.isFormData(n)) {
1628
- if (ot.hasStandardBrowserEnv || ot.hasStandardBrowserWebWorkerEnv)
1628
+ if (lt.hasStandardBrowserEnv || lt.hasStandardBrowserWebWorkerEnv)
1629
1629
  i.setContentType(void 0);
1630
1630
  else if (A.isFunction(n.getHeaders)) {
1631
1631
  const c = n.getHeaders(), u = ["content-type", "content-length"];
@@ -1634,7 +1634,7 @@ const kc = (e) => {
1634
1634
  });
1635
1635
  }
1636
1636
  }
1637
- if (ot.hasStandardBrowserEnv && (r && A.isFunction(r) && (r = r(t)), r || r !== !1 && ig(t.url))) {
1637
+ if (lt.hasStandardBrowserEnv && (r && A.isFunction(r) && (r = r(t)), r || r !== !1 && ig(t.url))) {
1638
1638
  const c = o && s && ag.read(s);
1639
1639
  c && i.set(o, c);
1640
1640
  }
@@ -1643,7 +1643,7 @@ const kc = (e) => {
1643
1643
  return new Promise(function(n, r) {
1644
1644
  const o = kc(e);
1645
1645
  let s = o.data;
1646
- const i = ht.from(o.headers).normalize();
1646
+ const i = gt.from(o.headers).normalize();
1647
1647
  let { responseType: a, onUploadProgress: c, onDownloadProgress: u } = o, d, p, h, x, m;
1648
1648
  function v() {
1649
1649
  x && x(), m && m(), o.cancelToken && o.cancelToken.unsubscribe(d), o.signal && o.signal.removeEventListener("abort", d);
@@ -1653,7 +1653,7 @@ const kc = (e) => {
1653
1653
  function w() {
1654
1654
  if (!g)
1655
1655
  return;
1656
- const y = ht.from(
1656
+ const y = gt.from(
1657
1657
  "getAllResponseHeaders" in g && g.getAllResponseHeaders()
1658
1658
  ), S = {
1659
1659
  data: !a || a === "text" || a === "json" ? g.responseText : g.response,
@@ -1691,7 +1691,7 @@ const kc = (e) => {
1691
1691
  g && (r(!y || y.type ? new Qn(null, e, g) : y), g.abort(), g = null);
1692
1692
  }, o.cancelToken && o.cancelToken.subscribe(d), o.signal && (o.signal.aborted ? d() : o.signal.addEventListener("abort", d)));
1693
1693
  const b = rg(o.url);
1694
- if (b && ot.protocols.indexOf(b) === -1) {
1694
+ if (b && lt.protocols.indexOf(b) === -1) {
1695
1695
  r(new Se("Unsupported protocol " + b + ":", Se.ERR_BAD_REQUEST, e));
1696
1696
  return;
1697
1697
  }
@@ -1798,7 +1798,7 @@ const kc = (e) => {
1798
1798
  return !1;
1799
1799
  const a = o && Vr(Za), c = o && (typeof Qa == "function" ? /* @__PURE__ */ ((m) => (v) => m.encode(v))(new Qa()) : async (m) => new Uint8Array(await new n(m).arrayBuffer())), u = s && a && el(() => {
1800
1800
  let m = !1;
1801
- const v = new n(ot.origin, {
1801
+ const v = new n(lt.origin, {
1802
1802
  body: new Za(),
1803
1803
  method: "POST",
1804
1804
  get duplex() {
@@ -1823,7 +1823,7 @@ const kc = (e) => {
1823
1823
  if (A.isBlob(m))
1824
1824
  return m.size;
1825
1825
  if (A.isSpecCompliantForm(m))
1826
- return (await new n(ot.origin, {
1826
+ return (await new n(lt.origin, {
1827
1827
  method: "POST",
1828
1828
  body: m
1829
1829
  }).arrayBuffer()).byteLength;
@@ -1905,7 +1905,7 @@ const kc = (e) => {
1905
1905
  return !O && N && N(), await new Promise((Q, ae) => {
1906
1906
  jc(Q, ae, {
1907
1907
  data: z,
1908
- headers: ht.from(F.headers),
1908
+ headers: gt.from(F.headers),
1909
1909
  status: F.status,
1910
1910
  statusText: F.statusText,
1911
1911
  config: m,
@@ -1986,7 +1986,7 @@ function Ts(e) {
1986
1986
  throw new Qn(null, e);
1987
1987
  }
1988
1988
  function nl(e) {
1989
- return Ts(e), e.headers = ht.from(e.headers), e.data = Cs.call(
1989
+ return Ts(e), e.headers = gt.from(e.headers), e.data = Cs.call(
1990
1990
  e,
1991
1991
  e.transformRequest
1992
1992
  ), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Oc.getAdapter(e.adapter || Dr.adapter, e)(e).then(function(r) {
@@ -1994,13 +1994,13 @@ function nl(e) {
1994
1994
  e,
1995
1995
  e.transformResponse,
1996
1996
  r
1997
- ), r.headers = ht.from(r.headers), r;
1997
+ ), r.headers = gt.from(r.headers), r;
1998
1998
  }, function(r) {
1999
1999
  return Ac(r) || (Ts(e), r && r.response && (r.response.data = Cs.call(
2000
2000
  e,
2001
2001
  e.transformResponse,
2002
2002
  r.response
2003
- ), r.response.headers = ht.from(r.response.headers))), Promise.reject(r);
2003
+ ), r.response.headers = gt.from(r.response.headers))), Promise.reject(r);
2004
2004
  });
2005
2005
  }
2006
2006
  const Mc = "1.12.2", Wo = {};
@@ -2051,7 +2051,7 @@ function wg(e, t, n) {
2051
2051
  const so = {
2052
2052
  assertOptions: wg,
2053
2053
  validators: Wo
2054
- }, zt = so.validators;
2054
+ }, Vt = so.validators;
2055
2055
  let Cn = class {
2056
2056
  constructor(t) {
2057
2057
  this.defaults = t || {}, this.interceptors = {
@@ -2088,17 +2088,17 @@ let Cn = class {
2088
2088
  typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = Tn(this.defaults, n);
2089
2089
  const { transitional: r, paramsSerializer: o, headers: s } = n;
2090
2090
  r !== void 0 && so.assertOptions(r, {
2091
- silentJSONParsing: zt.transitional(zt.boolean),
2092
- forcedJSONParsing: zt.transitional(zt.boolean),
2093
- clarifyTimeoutError: zt.transitional(zt.boolean)
2091
+ silentJSONParsing: Vt.transitional(Vt.boolean),
2092
+ forcedJSONParsing: Vt.transitional(Vt.boolean),
2093
+ clarifyTimeoutError: Vt.transitional(Vt.boolean)
2094
2094
  }, !1), o != null && (A.isFunction(o) ? n.paramsSerializer = {
2095
2095
  serialize: o
2096
2096
  } : so.assertOptions(o, {
2097
- encode: zt.function,
2098
- serialize: zt.function
2097
+ encode: Vt.function,
2098
+ serialize: Vt.function
2099
2099
  }, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), so.assertOptions(n, {
2100
- baseUrl: zt.spelling("baseURL"),
2101
- withXsrfToken: zt.spelling("withXSRFToken")
2100
+ baseUrl: Vt.spelling("baseURL"),
2101
+ withXsrfToken: Vt.spelling("withXSRFToken")
2102
2102
  }, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
2103
2103
  let i = s && A.merge(
2104
2104
  s.common,
@@ -2109,7 +2109,7 @@ let Cn = class {
2109
2109
  (m) => {
2110
2110
  delete s[m];
2111
2111
  }
2112
- ), n.headers = ht.concat(i, s);
2112
+ ), n.headers = gt.concat(i, s);
2113
2113
  const a = [];
2114
2114
  let c = !0;
2115
2115
  this.interceptors.request.forEach(function(v) {
@@ -2331,26 +2331,26 @@ function Lc(e) {
2331
2331
  return Lc(Tn(e, o));
2332
2332
  }, n;
2333
2333
  }
2334
- const qe = Lc(Dr);
2335
- qe.Axios = Cn;
2336
- qe.CanceledError = Qn;
2337
- qe.CancelToken = yg;
2338
- qe.isCancel = Ac;
2339
- qe.VERSION = Mc;
2340
- qe.toFormData = Uo;
2341
- qe.AxiosError = Se;
2342
- qe.Cancel = qe.CanceledError;
2343
- qe.all = function(t) {
2334
+ const Ze = Lc(Dr);
2335
+ Ze.Axios = Cn;
2336
+ Ze.CanceledError = Qn;
2337
+ Ze.CancelToken = yg;
2338
+ Ze.isCancel = Ac;
2339
+ Ze.VERSION = Mc;
2340
+ Ze.toFormData = Uo;
2341
+ Ze.AxiosError = Se;
2342
+ Ze.Cancel = Ze.CanceledError;
2343
+ Ze.all = function(t) {
2344
2344
  return Promise.all(t);
2345
2345
  };
2346
- qe.spread = Sg;
2347
- qe.isAxiosError = Cg;
2348
- qe.mergeConfig = Tn;
2349
- qe.AxiosHeaders = ht;
2350
- qe.formToJSON = (e) => Nc(A.isHTMLForm(e) ? new FormData(e) : e);
2351
- qe.getAdapter = Oc.getAdapter;
2352
- qe.HttpStatusCode = Qs;
2353
- qe.default = qe;
2346
+ Ze.spread = Sg;
2347
+ Ze.isAxiosError = Cg;
2348
+ Ze.mergeConfig = Tn;
2349
+ Ze.AxiosHeaders = gt;
2350
+ Ze.formToJSON = (e) => Nc(A.isHTMLForm(e) ? new FormData(e) : e);
2351
+ Ze.getAdapter = Oc.getAdapter;
2352
+ Ze.HttpStatusCode = Qs;
2353
+ Ze.default = Ze;
2354
2354
  const {
2355
2355
  Axios: CT,
2356
2356
  AxiosError: TT,
@@ -2368,7 +2368,7 @@ const {
2368
2368
  formToJSON: DT,
2369
2369
  getAdapter: LT,
2370
2370
  mergeConfig: FT
2371
- } = qe, Es = {};
2371
+ } = Ze, Es = {};
2372
2372
  function Ln() {
2373
2373
  var e;
2374
2374
  try {
@@ -2390,41 +2390,41 @@ function sl(e) {
2390
2390
  function Ig(e) {
2391
2391
  return ti.add(e), () => ti.delete(e);
2392
2392
  }
2393
- const It = qe.create({
2393
+ const jt = Ze.create({
2394
2394
  // Only set baseURL when configured — do NOT fall back to localhost. Falling back causes
2395
2395
  // noisy network requests to the frontend Dev server when the backend isn't configured.
2396
2396
  ...ei ? { baseURL: ei } : {},
2397
2397
  timeout: 3e4,
2398
2398
  withCredentials: !0
2399
2399
  });
2400
- It.interceptors.request.use((e) => (Co && (e.headers.Authorization = `Bearer ${Co}`), e));
2401
- It.interceptors.response.use(
2400
+ jt.interceptors.request.use((e) => (Co && (e.headers.Authorization = `Bearer ${Co}`), e));
2401
+ jt.interceptors.response.use(
2402
2402
  (e) => e,
2403
2403
  (e) => Promise.reject(e)
2404
2404
  );
2405
- async function Pt(e, t) {
2406
- return It.defaults.baseURL ? (await It.get(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
2405
+ async function Mt(e, t) {
2406
+ return jt.defaults.baseURL ? (await jt.get(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
2407
2407
  }
2408
2408
  async function Gr(e, t, n) {
2409
- return It.defaults.baseURL ? (await It.post(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2409
+ return jt.defaults.baseURL ? (await jt.post(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2410
2410
  }
2411
2411
  async function Ng(e, t, n) {
2412
- return It.defaults.baseURL ? (await It.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2412
+ return jt.defaults.baseURL ? (await jt.put(e, t, n)).data : Promise.reject(new Error("API base URL is not configured"));
2413
2413
  }
2414
2414
  async function Ag(e, t) {
2415
- return It.defaults.baseURL ? (await It.delete(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
2415
+ return jt.defaults.baseURL ? (await jt.delete(e, t)).data : Promise.reject(new Error("API base URL is not configured"));
2416
2416
  }
2417
- function ct(e) {
2417
+ function ft(e) {
2418
2418
  return e && typeof e == "object" && "data" in e ? e.data : e;
2419
2419
  }
2420
2420
  class jg {
2421
2421
  // ---- Configuration ----
2422
2422
  get baseUrl() {
2423
- const t = It.defaults.baseURL || "";
2423
+ const t = jt.defaults.baseURL || "";
2424
2424
  return String(t).replace(/\/+$|^\s+|\s+$/g, "");
2425
2425
  }
2426
2426
  updateConfig(t) {
2427
- t.baseUrl && (It.defaults.baseURL = String(t.baseUrl).replace(/\/+$/g, "")), t.authToken !== void 0 && sl(t.authToken);
2427
+ t.baseUrl && (jt.defaults.baseURL = String(t.baseUrl).replace(/\/+$/g, "")), t.authToken !== void 0 && sl(t.authToken);
2428
2428
  }
2429
2429
  // ---- Token Management ----
2430
2430
  getAuthToken() {
@@ -2438,41 +2438,41 @@ class jg {
2438
2438
  }
2439
2439
  // ---- Thread Management ----
2440
2440
  async listThreads() {
2441
- const t = await Pt("/chat/threads"), n = ct(t);
2441
+ const t = await Mt("/chat/threads"), n = ft(t);
2442
2442
  return (n == null ? void 0 : n.items) ?? (t == null ? void 0 : t.items) ?? [];
2443
2443
  }
2444
2444
  async createThread(t) {
2445
2445
  const r = await Gr("/chat/threads", t ? { title: t } : void 0);
2446
- return ct(r);
2446
+ return ft(r);
2447
2447
  }
2448
2448
  async updateThread(t, n) {
2449
2449
  const r = await Ng(`/chat/threads/${t}`, { title: n });
2450
- return ct(r);
2450
+ return ft(r);
2451
2451
  }
2452
2452
  async deleteThread(t) {
2453
2453
  const n = await Ag(`/chat/threads/${t}`);
2454
- return ct(n);
2454
+ return ft(n);
2455
2455
  }
2456
2456
  async threadInfo(t) {
2457
- const n = await Pt(`/chat/threads/${t}/info`);
2458
- return ct(n);
2457
+ const n = await Mt(`/chat/threads/${t}/info`);
2458
+ return ft(n);
2459
2459
  }
2460
2460
  // ---- Agents ----
2461
2461
  async listAgents() {
2462
- const t = await Pt("/chat/agents"), n = ct(t);
2462
+ const t = await Mt("/chat/agents"), n = ft(t);
2463
2463
  return (n == null ? void 0 : n.items) ?? [];
2464
2464
  }
2465
2465
  async getAgent(t) {
2466
- const n = await Pt(`/chat/agents/${t}`);
2467
- return ct(n);
2466
+ const n = await Mt(`/chat/agents/${t}`);
2467
+ return ft(n);
2468
2468
  }
2469
2469
  async getAgentSchema(t) {
2470
- const n = await Pt(`/chat/agents/${t}/schema`);
2471
- return ct(n);
2470
+ const n = await Mt(`/chat/agents/${t}/schema`);
2471
+ return ft(n);
2472
2472
  }
2473
2473
  // ---- Messages & State ----
2474
2474
  async getMessages(t) {
2475
- const n = await Pt(`/chat/threads/${t.threadId}/messages`, {
2475
+ const n = await Mt(`/chat/threads/${t.threadId}/messages`, {
2476
2476
  params: {
2477
2477
  thread_id: t.threadId,
2478
2478
  checkpoint_id: t.checkpointId,
@@ -2481,34 +2481,34 @@ class jg {
2481
2481
  before_id: t.beforeId ?? void 0
2482
2482
  }
2483
2483
  });
2484
- return ct(n);
2484
+ return ft(n);
2485
2485
  }
2486
2486
  async getState(t) {
2487
- const n = await Pt(`/chat/threads/${t.threadId}/state`, {
2487
+ const n = await Mt(`/chat/threads/${t.threadId}/state`, {
2488
2488
  params: {
2489
2489
  thread_id: t.threadId,
2490
2490
  checkpoint_id: t.checkpointId,
2491
2491
  checkpoint_ns: t.checkpointNs
2492
2492
  }
2493
2493
  });
2494
- return ct(n);
2494
+ return ft(n);
2495
2495
  }
2496
2496
  async getStateHistory(t) {
2497
- const n = await Pt(`/chat/threads/${t.threadId}/state/history`, {
2497
+ const n = await Mt(`/chat/threads/${t.threadId}/state/history`, {
2498
2498
  params: {
2499
2499
  thread_id: t.threadId,
2500
2500
  checkpoint_id: t.checkpointId,
2501
2501
  checkpoint_ns: t.checkpointNs
2502
2502
  }
2503
2503
  });
2504
- return ct(n);
2504
+ return ft(n);
2505
2505
  }
2506
2506
  // ---- Checkpoints ----
2507
2507
  async listCheckpoints(t) {
2508
- const n = await Pt(`/chat/threads/${t}/checkpoints`, {
2508
+ const n = await Mt(`/chat/threads/${t}/checkpoints`, {
2509
2509
  params: { thread_id: t }
2510
2510
  });
2511
- return ct(n);
2511
+ return ft(n);
2512
2512
  }
2513
2513
  // ---- File Uploads ----
2514
2514
  async uploadExcel(t, n = "/upload_excel", r = {}) {
@@ -2517,7 +2517,7 @@ class jg {
2517
2517
  const a = await Gr(n, o, {
2518
2518
  headers: { Accept: "application/json" },
2519
2519
  maxBodyLength: 1 / 0
2520
- }), c = ct(a);
2520
+ }), c = ft(a);
2521
2521
  return Ln() && console.debug("[api.uploadExcel] <-", c), c;
2522
2522
  }
2523
2523
  // ---- File Uploads ----
@@ -2527,7 +2527,7 @@ class jg {
2527
2527
  const o = await Gr(n, r, {
2528
2528
  headers: { Accept: "application/json" },
2529
2529
  maxBodyLength: 1 / 0
2530
- }), s = ct(o);
2530
+ }), s = ft(o);
2531
2531
  if (Ln() && console.debug("[api.uploadImage] <-", s), !(s != null && s.url))
2532
2532
  throw new Error("Invalid upload response: missing url");
2533
2533
  return {
@@ -2542,7 +2542,7 @@ class jg {
2542
2542
  o && (s.thread_id = o), Ln() && console.debug("[api.uploadFile] ->", "/chat/files/upload", s);
2543
2543
  const i = await Gr("/chat/files/upload", s, {
2544
2544
  headers: { Accept: "application/json" }
2545
- }), a = ct(i);
2545
+ }), a = ft(i);
2546
2546
  if (Ln() && console.debug("[api.uploadFile] <-", a), !(a != null && a.id))
2547
2547
  throw new Error("Invalid upload response: missing id");
2548
2548
  return a;
@@ -2550,14 +2550,14 @@ class jg {
2550
2550
  }
2551
2551
  const ln = new jg();
2552
2552
  function Pg(e = {}) {
2553
- const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = be(e.token ?? null), s = vt(e.headers ?? {}), [i, a] = be(!1), [c, u] = be(null), [d, p] = be(""), [h, x] = be(null), m = vt(null), v = Ye((y) => {
2553
+ const t = e.baseUrl ?? "/api/chat", n = e.streamPath ?? "/runs/stream", [r, o] = be(e.token ?? null), s = bt(e.headers ?? {}), [i, a] = be(!1), [c, u] = be(null), [d, p] = be(""), [h, x] = be(null), m = bt(null), v = qe((y) => {
2554
2554
  o(y);
2555
- }, []), g = Ye(() => {
2555
+ }, []), g = qe(() => {
2556
2556
  var y;
2557
2557
  (y = m.current) == null || y.abort(), m.current = null, a(!1);
2558
- }, []), w = Ye(() => {
2558
+ }, []), w = qe(() => {
2559
2559
  p(""), x(null), u(null);
2560
- }, []), b = Ye(
2560
+ }, []), b = qe(
2561
2561
  (y, R, S) => {
2562
2562
  m.current && (m.current.abort(), m.current = null), a(!0), u(null), e.autoAppendAssistant !== !1 && p("");
2563
2563
  const C = new AbortController();
@@ -2667,7 +2667,7 @@ function Pg(e = {}) {
2667
2667
  },
2668
2668
  [t, r, e.autoAppendAssistant]
2669
2669
  );
2670
- return Ze(() => () => {
2670
+ return et(() => () => {
2671
2671
  var y;
2672
2672
  return (y = m.current) == null ? void 0 : y.abort();
2673
2673
  }, []), {
@@ -2807,7 +2807,7 @@ function Mg(e, t) {
2807
2807
  }
2808
2808
  }
2809
2809
  function Dg(e = []) {
2810
- const [t, n] = yh(Mg, { ...Og, messages: e }), r = Ye((s) => {
2810
+ const [t, n] = yh(Mg, { ...Og, messages: e }), r = qe((s) => {
2811
2811
  n({ type: "event", payload: { ev: s } });
2812
2812
  }, []), o = wn(() => ({
2813
2813
  reset: (s) => n({ type: "reset", payload: { messages: s } }),
@@ -2953,7 +2953,7 @@ async function Wg(e, t = [], n, r, o, s) {
2953
2953
  const Fc = cc(null);
2954
2954
  function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialThreadId: o = null, historyPageSize: s, autoLoadInitial: i = !0, enableFileAgentRouting: a = !1, fileAgentId: c = "invoice_reader" }) {
2955
2955
  const u = ln;
2956
- Ze(() => {
2956
+ et(() => {
2957
2957
  t && u.updateConfig({
2958
2958
  baseUrl: t.baseUrl,
2959
2959
  authToken: t.apiKey
@@ -2968,7 +2968,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2968
2968
  // Ensure the path matches the chat endpoint
2969
2969
  streamPath: "/chat/runs/stream"
2970
2970
  }), [v, g] = be(() => typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
2971
- Ze(() => {
2971
+ et(() => {
2972
2972
  m(typeof u.getAuthToken == "function" ? u.getAuthToken() : null);
2973
2973
  const W = u.onTokenChange((te) => {
2974
2974
  g(te), m(te);
@@ -2977,40 +2977,60 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
2977
2977
  W();
2978
2978
  };
2979
2979
  }, [u, m]);
2980
- const w = Ye((W) => {
2980
+ const w = qe((W) => {
2981
2981
  u.setAuthToken(W);
2982
- }, [u]), { state: b, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Dg(), I = s && s > 0 ? s : 6, [j, P] = be(!1), [D, H] = be(!1), [G, N] = be(null), [_, M] = be(void 0), V = Ye(
2982
+ }, [u]), { state: b, seed: y, prepend: R, pushUser: S, onEvent: C, reset: E } = Dg(), I = s && s > 0 ? s : 6, [j, P] = be(!1), [D, H] = be(!1), [G, N] = be(null), [_, M] = be(void 0), V = qe(
2983
2983
  (W, te) => {
2984
2984
  const ye = Array.isArray(W == null ? void 0 : W.messages) ? W.messages : [];
2985
- te === "replace" ? y(ye) : te === "prepend" && ye.length && R(ye), N((W == null ? void 0 : W.nextCursor) ?? null), P(!!(W != null && W.hasMore)), M((Me) => (W == null ? void 0 : W.checkpointId) ?? Me ?? void 0);
2985
+ te === "replace" ? y(ye) : te === "prepend" && ye.length && R(ye), N((W == null ? void 0 : W.nextCursor) ?? null), P(!!(W != null && W.hasMore)), M((_e) => (W == null ? void 0 : W.checkpointId) ?? _e ?? void 0);
2986
2986
  },
2987
2987
  [y, R]
2988
- ), [F, O] = be([]), [z, Q] = be(null), ae = Ye(async () => {
2988
+ ), [F, O] = be([]), [z, Q] = be(null), ae = qe(async () => {
2989
2989
  const W = await u.listThreads();
2990
2990
  O(W);
2991
- }, [u]), [U, ee] = be(!1), pe = Ye(
2991
+ }, [u]), [U, ee] = be(!1), pe = qe(
2992
2992
  async (W) => {
2993
- const te = (W == null ? void 0 : W.maxAttempts) ?? 5, ye = (W == null ? void 0 : W.baseDelayMs) ?? 500, Me = (W == null ? void 0 : W.timeoutMs) ?? 2e3;
2993
+ const te = (W == null ? void 0 : W.maxAttempts) ?? 5, ye = (W == null ? void 0 : W.baseDelayMs) ?? 500, _e = (W == null ? void 0 : W.timeoutMs) ?? 2e3;
2994
2994
  if (!u.baseUrl) return !1;
2995
- const tt = async () => {
2995
+ const Ge = u.baseUrl.replace(/\/+$/, ""), nt = [
2996
+ "/health",
2997
+ "/api/health",
2998
+ "/",
2999
+ // root
3000
+ "/api/v2/health",
3001
+ "/api/v2/chat/health"
3002
+ ], Ke = async (We) => {
2996
3003
  try {
2997
- const $e = new AbortController(), Ve = setTimeout(() => $e.abort(), Me), ft = u.baseUrl.replace(/\/+$/, "") + "/health", at = await fetch(ft, { method: "GET", signal: $e.signal });
2998
- return clearTimeout(Ve), at.ok;
3004
+ const it = new AbortController(), Ye = setTimeout(() => it.abort(), _e), at = await fetch(We, { method: "GET", signal: it.signal });
3005
+ return clearTimeout(Ye), at.ok;
3006
+ } catch {
3007
+ return !1;
3008
+ }
3009
+ }, Tt = async (We) => {
3010
+ try {
3011
+ const it = new AbortController(), Ye = setTimeout(() => it.abort(), _e), at = await fetch(We, { method: "HEAD", signal: it.signal });
3012
+ return clearTimeout(Ye), at.ok;
2999
3013
  } catch {
3000
3014
  return !1;
3001
3015
  }
3002
3016
  };
3003
- for (let $e = 0; $e < te; $e++) {
3004
- if (console.debug(`[ChatProvider] health-check attempt ${$e + 1}/${te}`), await tt())
3005
- return ee(!0), !0;
3006
- const Ve = ye * Math.pow(2, $e);
3007
- await new Promise((ft) => setTimeout(ft, Ve));
3017
+ for (let We = 0; We < te; We++) {
3018
+ console.debug(`[ChatProvider] health-check attempt ${We + 1}/${te}`);
3019
+ for (const Ye of nt) {
3020
+ let at = Ye;
3021
+ Ge.endsWith("/api") && Ye.startsWith("/api") && (at = Ye.replace(/^\/api/, "") || "/");
3022
+ const kt = at === "/" ? Ge + "/" : Ge + at;
3023
+ if (console.debug(`[ChatProvider] checking ${kt}`), await Ke(kt) || Ye === "/" && await Tt(Ge + "/"))
3024
+ return ee(!0), !0;
3025
+ }
3026
+ const it = ye * Math.pow(2, We);
3027
+ await new Promise((Ye) => setTimeout(Ye, it));
3008
3028
  }
3009
3029
  return ee(!1), !1;
3010
3030
  },
3011
3031
  [u.baseUrl]
3012
3032
  );
3013
- Ze(() => {
3033
+ et(() => {
3014
3034
  let W = !0;
3015
3035
  if (!u.baseUrl) {
3016
3036
  console.debug("[ChatProvider] skipping initial refreshThreads: api.baseUrl not configured");
@@ -3027,11 +3047,11 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3027
3047
  })(), () => {
3028
3048
  W = !1;
3029
3049
  };
3030
- }, [ae, u.baseUrl, pe]), Ze(() => {
3050
+ }, [ae, u.baseUrl, pe]), et(() => {
3031
3051
  r == null || r(z);
3032
3052
  }, [z, r]);
3033
- const we = vt(null);
3034
- Ze(() => {
3053
+ const we = bt(null);
3054
+ et(() => {
3035
3055
  if (o && i) {
3036
3056
  if (!u.baseUrl) {
3037
3057
  console.debug("[ChatProvider] skipping initial load: api.baseUrl not configured");
@@ -3045,7 +3065,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3045
3065
  }));
3046
3066
  }
3047
3067
  }, [o, i, u.baseUrl, U]);
3048
- const X = vt(null), k = Ye(
3068
+ const X = bt(null), k = qe(
3049
3069
  async (W, te, ye) => {
3050
3070
  if (!u.baseUrl) {
3051
3071
  console.debug("[ChatProvider] skipping loadThread: api.baseUrl not configured");
@@ -3055,23 +3075,23 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3055
3075
  X.current = W;
3056
3076
  try {
3057
3077
  P(!1), N(null), M(void 0);
3058
- const Me = await u.getMessages({
3078
+ const _e = await u.getMessages({
3059
3079
  threadId: W,
3060
3080
  checkpointId: te,
3061
3081
  checkpointNs: ye,
3062
3082
  limit: I
3063
3083
  });
3064
- Q(W), V(Me, "replace");
3084
+ Q(W), V(_e, "replace");
3065
3085
  } finally {
3066
3086
  X.current = null;
3067
3087
  }
3068
3088
  }
3069
3089
  },
3070
3090
  [u, V]
3071
- ), J = Ye(async (W) => {
3091
+ ), J = qe(async (W) => {
3072
3092
  const te = await u.listCheckpoints(W);
3073
3093
  return $g(te, W);
3074
- }, [u]), re = Ye(async (W) => {
3094
+ }, [u]), re = qe(async (W) => {
3075
3095
  if (!z) throw new Error("No active thread");
3076
3096
  P(!1), N(null), M(void 0);
3077
3097
  const te = await u.getMessages({
@@ -3080,11 +3100,11 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3080
3100
  limit: I
3081
3101
  });
3082
3102
  V(te, "replace");
3083
- }, [u, z, V, I]), ce = Ye(async () => {
3103
+ }, [u, z, V, I]), ce = qe(async () => {
3084
3104
  if (!z) throw new Error("No active thread");
3085
3105
  await k(z);
3086
- }, [z, k]), ie = vt(!1);
3087
- Ze(() => {
3106
+ }, [z, k]), ie = bt(!1);
3107
+ et(() => {
3088
3108
  const W = ie.current;
3089
3109
  if (ie.current = d, W && !d && z) {
3090
3110
  const te = b.lastCheckpointId ?? void 0;
@@ -3105,64 +3125,64 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3105
3125
  })();
3106
3126
  }
3107
3127
  }, [d, z, b.lastCheckpointId, u, V, ae]);
3108
- const Oe = Ye(async (W) => {
3128
+ const Me = qe(async (W) => {
3109
3129
  const te = await u.createThread(W);
3110
3130
  return await ae(), await k(te.threadId), te.threadId;
3111
- }, [u, ae, k]), ue = Ye(async (W) => {
3131
+ }, [u, ae, k]), ue = qe(async (W) => {
3112
3132
  await u.deleteThread(W), await ae(), z === W && (Q(null), E([]), P(!1), N(null), M(void 0));
3113
- }, [u, ae, z, E]), Ae = Ye(async (W, te) => {
3133
+ }, [u, ae, z, E]), Ae = qe(async (W, te) => {
3114
3134
  await u.updateThread(W, te), await ae();
3115
- }, [u, ae]), le = Ye(async (W, te) => {
3135
+ }, [u, ae]), le = qe(async (W, te) => {
3116
3136
  var On;
3117
- const ye = (te == null ? void 0 : te.attachments) || [], { contentParts: Me, filesInfo: tt } = await Wg(
3137
+ const ye = (te == null ? void 0 : te.attachments) || [], { contentParts: _e, filesInfo: Ge } = await Wg(
3118
3138
  u,
3119
3139
  ye,
3120
3140
  t == null ? void 0 : t.uploadPath,
3121
3141
  a,
3122
3142
  c,
3123
3143
  z
3124
- ), $e = [];
3125
- W && $e.push({ type: "text", text: W });
3126
- for (const Ge of Me) $e.push(Ge);
3127
- const Ve = {
3144
+ ), nt = [];
3145
+ W && nt.push({ type: "text", text: W });
3146
+ for (const Ve of _e) nt.push(Ve);
3147
+ const Ke = {
3128
3148
  id: ((On = crypto.randomUUID) == null ? void 0 : On.call(crypto)) || `user-${Date.now()}`,
3129
3149
  role: "user",
3130
- content: $e,
3150
+ content: nt,
3131
3151
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
3132
3152
  checkpointId: (te == null ? void 0 : te.checkpointId) ?? b.lastCheckpointId ?? void 0
3133
3153
  };
3134
- S(Ve);
3135
- const ft = {
3136
- ...Ve,
3137
- content: Ve.content.filter((Ge) => Ge.type === "text" || Ge.type === "image_url")
3138
- }, at = { ...(te == null ? void 0 : te.payloadExtras) ?? {} }, nn = !!at.edit, $t = at.originalMessageId, rn = typeof $t == "string" ? $t : void 0, on = ye && ye.length > 0, xn = {
3154
+ S(Ke);
3155
+ const Tt = {
3156
+ ...Ke,
3157
+ content: Ke.content.filter((Ve) => Ve.type === "text" || Ve.type === "image_url")
3158
+ }, We = { ...(te == null ? void 0 : te.payloadExtras) ?? {} }, it = !!We.edit, Ye = We.originalMessageId, at = typeof Ye == "string" ? Ye : void 0, kt = ye && ye.length > 0, xn = {
3139
3159
  ...z ? { threadId: z } : {},
3140
3160
  payload: {
3141
- messages: [ft],
3142
- attachments: Ve.content.filter((Ge) => Ge.type === "file").map((Ge) => ({ type: "file", url: Ge.url, mimeType: Ge.mimeType, name: Ge.name, size: Ge.size })),
3143
- files_info: tt,
3144
- ...a && on && c ? { agent_id: c } : {},
3145
- ...at
3161
+ messages: [Tt],
3162
+ attachments: Ke.content.filter((Ve) => Ve.type === "file").map((Ve) => ({ type: "file", url: Ve.url, mimeType: Ve.mimeType, name: Ve.name, size: Ve.size })),
3163
+ files_info: Ge,
3164
+ ...a && kt && c ? { agent_id: c } : {},
3165
+ ...We
3146
3166
  },
3147
3167
  checkpointId: (te == null ? void 0 : te.checkpointId) ?? b.lastCheckpointId ?? void 0,
3148
3168
  checkpointNs: te == null ? void 0 : te.checkpointNs,
3149
3169
  nodeFilter: te == null ? void 0 : te.nodeFilter,
3150
3170
  config: te == null ? void 0 : te.config,
3151
- edit: nn,
3152
- originalMessageId: rn
3171
+ edit: it,
3172
+ originalMessageId: at
3153
3173
  };
3154
3174
  h(
3155
3175
  xn,
3156
- (Ge) => C(Ge),
3176
+ (Ve) => C(Ve),
3157
3177
  {
3158
- onError: (Ge) => console.warn("stream error", Ge),
3159
- onOpen: ({ threadId: Ge, created: ir }) => {
3160
- !z && Ge && (Q(Ge), ir && ae().catch(() => {
3178
+ onError: (Ve) => console.warn("stream error", Ve),
3179
+ onOpen: ({ threadId: Ve, created: ir }) => {
3180
+ !z && Ve && (Q(Ve), ir && ae().catch(() => {
3161
3181
  }));
3162
3182
  }
3163
3183
  }
3164
3184
  );
3165
- }, [z, S, h, C, b.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, ae, Q, a, c]), fe = Ye(
3185
+ }, [z, S, h, C, b.lastCheckpointId, u, t == null ? void 0 : t.uploadPath, ae, Q, a, c]), fe = qe(
3166
3186
  async (W) => {
3167
3187
  if (!z) throw new Error("No active thread");
3168
3188
  if (D || !j) return;
@@ -3204,7 +3224,7 @@ function io({ children: e, apiConfig: t, onError: n, onThreadChange: r, initialT
3204
3224
  navigateToCheckpoint: re,
3205
3225
  returnToLatest: ce,
3206
3226
  refreshThreads: ae,
3207
- createThread: Oe,
3227
+ createThread: Me,
3208
3228
  deleteThread: ue,
3209
3229
  renameThread: Ae,
3210
3230
  loadThread: k,
@@ -3250,7 +3270,7 @@ function Go(e, t) {
3250
3270
  function Yg(e, t) {
3251
3271
  return t(e);
3252
3272
  }
3253
- function Ue(...e) {
3273
+ function ze(...e) {
3254
3274
  return e;
3255
3275
  }
3256
3276
  function Le(e, t) {
@@ -3262,13 +3282,13 @@ function Ce(e, t) {
3262
3282
  function Li(e) {
3263
3283
  e(er);
3264
3284
  }
3265
- function Xe(e) {
3285
+ function Je(e) {
3266
3286
  return e(Bc);
3267
3287
  }
3268
3288
  function de(e, t) {
3269
3289
  return Le(e, Gg(t, Vo));
3270
3290
  }
3271
- function _t(e, t) {
3291
+ function Lt(e, t) {
3272
3292
  const n = e(pn, (r) => {
3273
3293
  n(), t(r);
3274
3294
  });
@@ -3285,7 +3305,7 @@ function cl(e) {
3285
3305
  function $c(e, t) {
3286
3306
  return e === t;
3287
3307
  }
3288
- function ze(e = $c) {
3308
+ function $e(e = $c) {
3289
3309
  let t;
3290
3310
  return (n) => (r) => {
3291
3311
  e(t, r) || (t = r, n(r));
@@ -3299,7 +3319,7 @@ function me(e) {
3299
3319
  function oe(e) {
3300
3320
  return (t) => Hc(t, e);
3301
3321
  }
3302
- function Ut(e) {
3322
+ function Gt(e) {
3303
3323
  return (t) => () => {
3304
3324
  t(e);
3305
3325
  };
@@ -3316,7 +3336,7 @@ function B(e, ...t) {
3316
3336
  }
3317
3337
  };
3318
3338
  }
3319
- function Vt(e, t) {
3339
+ function Yt(e, t) {
3320
3340
  return (n) => (r) => {
3321
3341
  n(t = e(t, r));
3322
3342
  };
@@ -3326,7 +3346,7 @@ function En(e) {
3326
3346
  e > 0 ? e-- : t(n);
3327
3347
  };
3328
3348
  }
3329
- function Qt(e) {
3349
+ function nn(e) {
3330
3350
  let t = null, n;
3331
3351
  return (r) => (o) => {
3332
3352
  t = o, !n && (n = setTimeout(() => {
@@ -3385,7 +3405,7 @@ function K(e) {
3385
3405
  return n(r, o);
3386
3406
  };
3387
3407
  }
3388
- function it(e, t) {
3408
+ function ut(e, t) {
3389
3409
  return Go(K(t), (n) => de(e, n));
3390
3410
  }
3391
3411
  function Ne() {
@@ -3408,10 +3428,10 @@ function Ne() {
3408
3428
  }
3409
3429
  };
3410
3430
  }
3411
- function wt(e) {
3431
+ function St(e) {
3412
3432
  return Go(Ne(), (t) => de(e, t));
3413
3433
  }
3414
- function _e(e, t = [], { singleton: n } = { singleton: !0 }) {
3434
+ function Oe(e, t = [], { singleton: n } = { singleton: !0 }) {
3415
3435
  return {
3416
3436
  constructor: e,
3417
3437
  dependencies: t,
@@ -3429,7 +3449,7 @@ function Zg(e) {
3429
3449
  };
3430
3450
  return n(e);
3431
3451
  }
3432
- function Qe(...e) {
3452
+ function tt(...e) {
3433
3453
  const t = Ne(), n = new Array(e.length);
3434
3454
  let r = 0;
3435
3455
  const o = Math.pow(2, e.length) - 1;
@@ -3450,7 +3470,7 @@ function Qe(...e) {
3450
3470
  };
3451
3471
  }
3452
3472
  function he(e, t = $c) {
3453
- return B(e, ze(t));
3473
+ return B(e, $e(t));
3454
3474
  }
3455
3475
  function ri(...e) {
3456
3476
  return function(t, n) {
@@ -3462,13 +3482,13 @@ function ri(...e) {
3462
3482
  }
3463
3483
  };
3464
3484
  }
3465
- var mt = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(mt || {});
3485
+ var vt = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(vt || {});
3466
3486
  const Qg = {
3467
3487
  0: "debug",
3468
3488
  3: "error",
3469
3489
  1: "log",
3470
3490
  2: "warn"
3471
- }, ev = () => typeof globalThis > "u" ? window : globalThis, hn = _e(
3491
+ }, ev = () => typeof globalThis > "u" ? window : globalThis, hn = Oe(
3472
3492
  () => {
3473
3493
  const e = K(
3474
3494
  3
@@ -3477,7 +3497,7 @@ const Qg = {
3477
3497
  return {
3478
3498
  log: K((t, n, r = 1) => {
3479
3499
  var o;
3480
- const s = (o = ev().VIRTUOSO_LOG_LEVEL) != null ? o : Xe(e);
3500
+ const s = (o = ev().VIRTUOSO_LOG_LEVEL) != null ? o : Je(e);
3481
3501
  r >= s && console[Qg[r]](
3482
3502
  "%creact-virtuoso: %c%s %o",
3483
3503
  "color: #0253b3; font-weight: bold",
@@ -3543,7 +3563,7 @@ function nv(e, t, n, r) {
3543
3563
  if (a.dataset.index === void 0)
3544
3564
  continue;
3545
3565
  const c = parseInt(a.dataset.index), u = parseFloat(a.dataset.knownSize), d = t(a, n);
3546
- if (d === 0 && r("Zero-sized element, this should not happen", { child: a }, mt.ERROR), d === u)
3566
+ if (d === 0 && r("Zero-sized element, this should not happen", { child: a }, vt.ERROR), d === u)
3547
3567
  continue;
3548
3568
  const p = s[s.length - 1];
3549
3569
  s.length === 0 || p.size !== d || p.endIndex !== c - 1 ? s.push({ endIndex: c, size: d, startIndex: c }) : s[s.length - 1].endIndex++;
@@ -3551,7 +3571,7 @@ function nv(e, t, n, r) {
3551
3571
  return s;
3552
3572
  }
3553
3573
  function ul(e, t, n) {
3554
- return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, mt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
3574
+ return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, vt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
3555
3575
  }
3556
3576
  function zc(e, t, n) {
3557
3577
  const r = Y.useRef(null), o = Y.useCallback(
@@ -3596,7 +3616,7 @@ function zc(e, t, n) {
3596
3616
  }
3597
3617
  }, [a, t, i]), s;
3598
3618
  }
3599
- const ut = _e(
3619
+ const pt = Oe(
3600
3620
  () => {
3601
3621
  const e = Ne(), t = Ne(), n = K(0), r = Ne(), o = K(0), s = Ne(), i = Ne(), a = K(0), c = K(0), u = K(0), d = K(0), p = Ne(), h = Ne(), x = K(!1), m = K(!1), v = K(!1);
3602
3622
  return de(
@@ -3655,19 +3675,19 @@ function Sr(e, t) {
3655
3675
  if (!He(e))
3656
3676
  return t === e.k ? e.v : t < e.k ? Sr(e.l, t) : Sr(e.r, t);
3657
3677
  }
3658
- function Mt(e, t, n = "k") {
3678
+ function Bt(e, t, n = "k") {
3659
3679
  if (He(e))
3660
3680
  return [-1 / 0, void 0];
3661
3681
  if (Number(e[n]) === t)
3662
3682
  return [e.k, e.v];
3663
3683
  if (Number(e[n]) < t) {
3664
- const r = Mt(e.r, t, n);
3684
+ const r = Bt(e.r, t, n);
3665
3685
  return r[0] === -1 / 0 ? [e.k, e.v] : r;
3666
3686
  }
3667
- return Mt(e.l, t, n);
3687
+ return Bt(e.l, t, n);
3668
3688
  }
3669
- function bt(e, t, n) {
3670
- return He(e) ? Gc(t, n, 1) : t === e.k ? et(e, { k: t, v: n }) : t < e.k ? dl(et(e, { l: bt(e.l, t, n) })) : dl(et(e, { r: bt(e.r, t, n) }));
3689
+ function yt(e, t, n) {
3690
+ return He(e) ? Gc(t, n, 1) : t === e.k ? rt(e, { k: t, v: n }) : t < e.k ? dl(rt(e, { l: yt(e.l, t, n) })) : dl(rt(e, { r: yt(e.r, t, n) }));
3671
3691
  }
3672
3692
  function Un() {
3673
3693
  return yr;
@@ -3675,7 +3695,7 @@ function Un() {
3675
3695
  function Ko(e, t, n) {
3676
3696
  if (He(e))
3677
3697
  return [];
3678
- const r = Mt(e, t)[0];
3698
+ const r = Bt(e, t)[0];
3679
3699
  return rv(si(e, r, n));
3680
3700
  }
3681
3701
  function oi(e, t) {
@@ -3688,9 +3708,9 @@ function oi(e, t) {
3688
3708
  return r;
3689
3709
  {
3690
3710
  const [s, i] = Vc(r);
3691
- return ao(et(e, { k: s, l: Wc(r), v: i }));
3711
+ return ao(rt(e, { k: s, l: Wc(r), v: i }));
3692
3712
  }
3693
- } else return t < n ? ao(et(e, { l: oi(r, t) })) : ao(et(e, { r: oi(o, t) }));
3713
+ } else return t < n ? ao(rt(e, { l: oi(r, t) })) : ao(rt(e, { r: oi(o, t) }));
3694
3714
  }
3695
3715
  function Sn(e) {
3696
3716
  return He(e) ? [] : [...Sn(e.l), { k: e.k, v: e.v }, ...Sn(e.r)];
@@ -3708,12 +3728,12 @@ function ao(e) {
3708
3728
  return e;
3709
3729
  if (n > r.lvl + 1) {
3710
3730
  if (Ns(t))
3711
- return Kc(et(e, { lvl: n - 1 }));
3731
+ return Kc(rt(e, { lvl: n - 1 }));
3712
3732
  if (!He(t) && !He(t.r))
3713
- return et(t.r, {
3714
- l: et(t, { r: t.r.l }),
3733
+ return rt(t.r, {
3734
+ l: rt(t, { r: t.r.l }),
3715
3735
  lvl: n,
3716
- r: et(e, {
3736
+ r: rt(e, {
3717
3737
  l: t.r.r,
3718
3738
  lvl: n - 1
3719
3739
  })
@@ -3721,22 +3741,22 @@ function ao(e) {
3721
3741
  throw new Error("Unexpected empty nodes");
3722
3742
  } else {
3723
3743
  if (Ns(e))
3724
- return ii(et(e, { lvl: n - 1 }));
3744
+ return ii(rt(e, { lvl: n - 1 }));
3725
3745
  if (!He(r) && !He(r.l)) {
3726
3746
  const o = r.l, s = Ns(o) ? r.lvl - 1 : r.lvl;
3727
- return et(o, {
3728
- l: et(e, {
3747
+ return rt(o, {
3748
+ l: rt(e, {
3729
3749
  lvl: n - 1,
3730
3750
  r: o.l
3731
3751
  }),
3732
3752
  lvl: o.lvl + 1,
3733
- r: ii(et(r, { l: o.r, lvl: s }))
3753
+ r: ii(rt(r, { l: o.r, lvl: s }))
3734
3754
  });
3735
3755
  } else
3736
3756
  throw new Error("Unexpected empty nodes");
3737
3757
  }
3738
3758
  }
3739
- function et(e, t) {
3759
+ function rt(e, t) {
3740
3760
  return Gc(
3741
3761
  t.k !== void 0 ? t.k : e.k,
3742
3762
  t.v !== void 0 ? t.v : e.v,
@@ -3746,7 +3766,7 @@ function et(e, t) {
3746
3766
  );
3747
3767
  }
3748
3768
  function Wc(e) {
3749
- return He(e.r) ? e.l : ao(et(e, { r: Wc(e.r) }));
3769
+ return He(e.r) ? e.l : ao(rt(e, { r: Wc(e.r) }));
3750
3770
  }
3751
3771
  function Ns(e) {
3752
3772
  return He(e) || e.lvl > e.r.lvl;
@@ -3762,11 +3782,11 @@ function dl(e) {
3762
3782
  }
3763
3783
  function Kc(e) {
3764
3784
  const { l: t } = e;
3765
- return !He(t) && t.lvl === e.lvl ? et(t, { r: et(e, { l: t.r }) }) : e;
3785
+ return !He(t) && t.lvl === e.lvl ? rt(t, { r: rt(e, { l: t.r }) }) : e;
3766
3786
  }
3767
3787
  function ii(e) {
3768
3788
  const { lvl: t, r: n } = e;
3769
- return !He(n) && !He(n.r) && n.lvl === t && n.r.lvl === t ? et(n, { l: et(e, { r: n.l }), lvl: t + 1 }) : e;
3789
+ return !He(n) && !He(n.r) && n.lvl === t && n.r.lvl === t ? rt(n, { l: rt(e, { r: n.l }), lvl: t + 1 }) : e;
3770
3790
  }
3771
3791
  function rv(e) {
3772
3792
  return Uc(e, ({ k: t, v: n }) => ({ index: t, value: n }));
@@ -3777,7 +3797,7 @@ function Yc(e, t) {
3777
3797
  function Cr(e, t) {
3778
3798
  return !!(e && e[0] === t[0] && e[1] === t[1]);
3779
3799
  }
3780
- const Bi = _e(
3800
+ const Bi = Oe(
3781
3801
  () => ({ recalcInProgress: K(!1) }),
3782
3802
  [],
3783
3803
  { singleton: !0 }
@@ -3832,7 +3852,7 @@ function iv(e, t) {
3832
3852
  for (const r of t) {
3833
3853
  const { endIndex: o, size: s, startIndex: i } = r;
3834
3854
  if (n = Math.min(n, i), He(e)) {
3835
- e = bt(e, 0, s);
3855
+ e = yt(e, 0, s);
3836
3856
  continue;
3837
3857
  }
3838
3858
  const a = Ko(e, i - 1, o + 1);
@@ -3840,8 +3860,8 @@ function iv(e, t) {
3840
3860
  continue;
3841
3861
  let c = !1, u = !1;
3842
3862
  for (const { end: d, start: p, value: h } of a)
3843
- c ? (o >= p || s === h) && (e = oi(e, p)) : (u = h !== s, c = !0), d > o && o >= p && h !== s && (e = bt(e, o + 1, h));
3844
- u && (e = bt(e, i, s));
3863
+ c ? (o >= p || s === h) && (e = oi(e, p)) : (u = h !== s, c = !0), d > o && o >= p && h !== s && (e = yt(e, o + 1, h));
3864
+ u && (e = yt(e, i, s));
3845
3865
  }
3846
3866
  return [e, n];
3847
3867
  }
@@ -3878,12 +3898,12 @@ function cv(e, t, n, r = 0) {
3878
3898
  return r > 0 && (t = Math.max(t, Xc(e, r, Hi).offset)), Uc(ov(e, t, n, lv), fv);
3879
3899
  }
3880
3900
  function uv(e, [t, n, r, o]) {
3881
- t.length > 0 && r("received item sizes", t, mt.DEBUG);
3901
+ t.length > 0 && r("received item sizes", t, vt.DEBUG);
3882
3902
  const s = e.sizeTree;
3883
3903
  let i = s, a = 0;
3884
3904
  if (n.length > 0 && He(s) && t.length === 2) {
3885
3905
  const h = t[0].size, x = t[1].size;
3886
- i = n.reduce((m, v) => bt(bt(m, v, h), v + 1, x), i);
3906
+ i = n.reduce((m, v) => yt(yt(m, v, h), v + 1, x), i);
3887
3907
  } else
3888
3908
  [i, a] = iv(i, t);
3889
3909
  if (i === s)
@@ -3891,7 +3911,7 @@ function uv(e, [t, n, r, o]) {
3891
3911
  const { lastIndex: c, lastOffset: u, lastSize: d, offsetTree: p } = ai(e.offsetTree, a, i, o);
3892
3912
  return {
3893
3913
  groupIndices: n,
3894
- groupOffsetTree: n.reduce((h, x) => bt(h, x, Tr(x, p, o)), Un()),
3914
+ groupOffsetTree: n.reduce((h, x) => yt(h, x, Tr(x, p, o)), Un()),
3895
3915
  lastIndex: c,
3896
3916
  lastOffset: u,
3897
3917
  lastSize: d,
@@ -3915,8 +3935,8 @@ function ai(e, t, n, r) {
3915
3935
  let o = e, s = 0, i = 0, a = 0, c = 0;
3916
3936
  if (t !== 0) {
3917
3937
  c = To(o, t - 1, Hi), a = o[c].offset;
3918
- const u = Mt(n, t - 1);
3919
- s = u[0], i = u[1], o.length && o[c].size === Mt(n, t)[1] && (c -= 1), o = o.slice(0, c + 1);
3938
+ const u = Bt(n, t - 1);
3939
+ s = u[0], i = u[1], o.length && o[c].size === Bt(n, t)[1] && (c -= 1), o = o.slice(0, c + 1);
3920
3940
  } else
3921
3941
  o = [];
3922
3942
  for (const { start: u, value: d } of Ko(n, t, 1 / 0)) {
@@ -3944,16 +3964,16 @@ function pv(e) {
3944
3964
  const hv = {
3945
3965
  offsetHeight: "height",
3946
3966
  offsetWidth: "width"
3947
- }, Xt = _e(
3967
+ }, Zt = Oe(
3948
3968
  ([{ log: e }, { recalcInProgress: t }]) => {
3949
- const n = Ne(), r = Ne(), o = it(r, 0), s = Ne(), i = Ne(), a = K(0), c = K([]), u = K(void 0), d = K(void 0), p = K((S, C) => cn(S, hv[C])), h = K(void 0), x = K(0), m = sv(), v = it(
3950
- B(n, Te(c, e, x), Vt(uv, m), ze()),
3969
+ const n = Ne(), r = Ne(), o = ut(r, 0), s = Ne(), i = Ne(), a = K(0), c = K([]), u = K(void 0), d = K(void 0), p = K((S, C) => cn(S, hv[C])), h = K(void 0), x = K(0), m = sv(), v = ut(
3970
+ B(n, Te(c, e, x), Yt(uv, m), $e()),
3951
3971
  m
3952
- ), g = it(
3972
+ ), g = ut(
3953
3973
  B(
3954
3974
  c,
3955
- ze(),
3956
- Vt((S, C) => ({ current: C, prev: S.current }), {
3975
+ $e(),
3976
+ Yt((S, C) => ({ current: C, prev: S.current }), {
3957
3977
  current: [],
3958
3978
  prev: []
3959
3979
  }),
@@ -3967,7 +3987,7 @@ const hv = {
3967
3987
  me((S) => S.length > 0),
3968
3988
  Te(v, x),
3969
3989
  oe(([S, C, E]) => {
3970
- const I = S.reduce((j, P, D) => bt(j, P, Tr(P, C.offsetTree, E) || D), Un());
3990
+ const I = S.reduce((j, P, D) => yt(j, P, Tr(P, C.offsetTree, E) || D), Un());
3971
3991
  return {
3972
3992
  ...C,
3973
3993
  groupIndices: S,
@@ -3991,7 +4011,7 @@ const hv = {
3991
4011
  ),
3992
4012
  n
3993
4013
  ), de(u, d);
3994
- const w = it(
4014
+ const w = ut(
3995
4015
  B(
3996
4016
  u,
3997
4017
  oe((S) => S === void 0)
@@ -4001,16 +4021,16 @@ const hv = {
4001
4021
  de(
4002
4022
  B(
4003
4023
  d,
4004
- me((S) => S !== void 0 && He(Xe(v).sizeTree)),
4024
+ me((S) => S !== void 0 && He(Je(v).sizeTree)),
4005
4025
  oe((S) => [{ endIndex: 0, size: S, startIndex: 0 }])
4006
4026
  ),
4007
4027
  n
4008
4028
  );
4009
- const b = wt(
4029
+ const b = St(
4010
4030
  B(
4011
4031
  n,
4012
4032
  Te(v),
4013
- Vt(
4033
+ Yt(
4014
4034
  ({ sizes: S }, [C, E]) => ({
4015
4035
  changed: E !== S,
4016
4036
  sizes: E
@@ -4023,18 +4043,18 @@ const hv = {
4023
4043
  Le(
4024
4044
  B(
4025
4045
  a,
4026
- Vt(
4046
+ Yt(
4027
4047
  (S, C) => ({ diff: S.prev - C, prev: C }),
4028
4048
  { diff: 0, prev: 0 }
4029
4049
  ),
4030
4050
  oe((S) => S.diff)
4031
4051
  ),
4032
4052
  (S) => {
4033
- const { groupIndices: C } = Xe(v);
4053
+ const { groupIndices: C } = Je(v);
4034
4054
  if (S > 0)
4035
4055
  Ce(t, !0), Ce(s, S + fl(S, C));
4036
4056
  else if (S < 0) {
4037
- const E = Xe(g);
4057
+ const E = Je(g);
4038
4058
  E.length > 0 && (S -= fl(-S, E)), Ce(i, S);
4039
4059
  }
4040
4060
  }
@@ -4042,10 +4062,10 @@ const hv = {
4042
4062
  S < 0 && C(
4043
4063
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
4044
4064
  { firstItemIndex: a },
4045
- mt.ERROR
4065
+ vt.ERROR
4046
4066
  );
4047
4067
  });
4048
- const y = wt(s);
4068
+ const y = St(s);
4049
4069
  de(
4050
4070
  B(
4051
4071
  s,
@@ -4107,7 +4127,7 @@ const hv = {
4107
4127
  ),
4108
4128
  n
4109
4129
  );
4110
- const R = wt(
4130
+ const R = St(
4111
4131
  B(
4112
4132
  i,
4113
4133
  Te(v, x),
@@ -4126,18 +4146,18 @@ const hv = {
4126
4146
  if (He(C.sizeTree))
4127
4147
  return C;
4128
4148
  let I = Un();
4129
- const j = Xe(g);
4149
+ const j = Je(g);
4130
4150
  let P = 0, D = 0, H = 0;
4131
4151
  for (; P < -S; ) {
4132
4152
  H = j[D];
4133
4153
  const G = j[D + 1] - H - 1;
4134
4154
  D++, P += G + 1;
4135
4155
  }
4136
- if (I = Sn(C.sizeTree).reduce((G, { k: N, v: _ }) => bt(G, Math.max(0, N + S), _), I), P !== -S) {
4156
+ if (I = Sn(C.sizeTree).reduce((G, { k: N, v: _ }) => yt(G, Math.max(0, N + S), _), I), P !== -S) {
4137
4157
  const G = Sr(C.sizeTree, H);
4138
- I = bt(I, 0, G);
4139
- const N = Mt(C.sizeTree, -S + 1)[1];
4140
- I = bt(I, 1, N);
4158
+ I = yt(I, 0, G);
4159
+ const N = Bt(C.sizeTree, -S + 1)[1];
4160
+ I = yt(I, 1, N);
4141
4161
  }
4142
4162
  return {
4143
4163
  ...C,
@@ -4145,7 +4165,7 @@ const hv = {
4145
4165
  ...ai(C.offsetTree, 0, I, E)
4146
4166
  };
4147
4167
  } else {
4148
- const I = Sn(C.sizeTree).reduce((j, { k: P, v: D }) => bt(j, Math.max(0, P + S), D), Un());
4168
+ const I = Sn(C.sizeTree).reduce((j, { k: P, v: D }) => yt(j, Math.max(0, P + S), D), Un());
4149
4169
  return {
4150
4170
  ...C,
4151
4171
  sizeTree: I,
@@ -4177,7 +4197,7 @@ const hv = {
4177
4197
  unshiftWith: s
4178
4198
  };
4179
4199
  },
4180
- Ue(hn, Bi),
4200
+ ze(hn, Bi),
4181
4201
  { singleton: !0 }
4182
4202
  );
4183
4203
  function mv(e) {
@@ -4189,9 +4209,9 @@ function mv(e) {
4189
4209
  }
4190
4210
  );
4191
4211
  }
4192
- const Zc = _e(
4212
+ const Zc = Oe(
4193
4213
  ([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
4194
- const s = Ne(), i = Ne(), a = wt(B(s, oe(mv)));
4214
+ const s = Ne(), i = Ne(), a = St(B(s, oe(mv)));
4195
4215
  return de(
4196
4216
  B(
4197
4217
  a,
@@ -4206,37 +4226,37 @@ const Zc = _e(
4206
4226
  e
4207
4227
  ), de(
4208
4228
  B(
4209
- Qe(o, t, r),
4229
+ tt(o, t, r),
4210
4230
  me(([c, u]) => Yo(u)),
4211
- oe(([c, u, d]) => Mt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
4212
- ze(),
4231
+ oe(([c, u, d]) => Bt(u.groupOffsetTree, Math.max(c - d, 0), "v")[0]),
4232
+ $e(),
4213
4233
  oe((c) => [c])
4214
4234
  ),
4215
4235
  i
4216
4236
  ), { groupCounts: s, topItemsIndexes: i };
4217
4237
  },
4218
- Ue(Xt, ut)
4219
- ), mn = _e(
4238
+ ze(Zt, pt)
4239
+ ), mn = Oe(
4220
4240
  ([{ log: e }]) => {
4221
- const t = K(!1), n = wt(
4241
+ const t = K(!1), n = St(
4222
4242
  B(
4223
4243
  t,
4224
4244
  me((r) => r),
4225
- ze()
4245
+ $e()
4226
4246
  )
4227
4247
  );
4228
4248
  return Le(t, (r) => {
4229
- r && Xe(e)("props updated", {}, mt.DEBUG);
4249
+ r && Je(e)("props updated", {}, vt.DEBUG);
4230
4250
  }), { didMount: n, propsReady: t };
4231
4251
  },
4232
- Ue(hn),
4252
+ ze(hn),
4233
4253
  { singleton: !0 }
4234
4254
  ), gv = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
4235
4255
  function Qc(e) {
4236
4256
  const t = typeof e == "number" ? { index: e } : e;
4237
4257
  return t.align || (t.align = "start"), (!t.behavior || !gv) && (t.behavior = "auto"), t.offset || (t.offset = 0), t;
4238
4258
  }
4239
- const Lr = _e(
4259
+ const Lr = Oe(
4240
4260
  ([
4241
4261
  { gap: e, listRefresh: t, sizes: n, totalCount: r },
4242
4262
  {
@@ -4270,22 +4290,22 @@ const Lr = _e(
4270
4290
  ]) => {
4271
4291
  const _ = Qc(R), { align: M, behavior: V, offset: F } = _, O = E - 1, z = Jc(_, S, O);
4272
4292
  let Q = Tr(z, S.offsetTree, H) + j;
4273
- M === "end" ? (Q += G + Mt(S.sizeTree, z)[1] - C + N, z === O && (Q += P)) : M === "center" ? Q += (G + Mt(S.sizeTree, z)[1] - C + N) / 2 : Q -= I, F && (Q += F);
4293
+ M === "end" ? (Q += G + Bt(S.sizeTree, z)[1] - C + N, z === O && (Q += P)) : M === "center" ? Q += (G + Bt(S.sizeTree, z)[1] - C + N) / 2 : Q -= I, F && (Q += F);
4274
4294
  const ae = (U) => {
4275
- y(), U ? (D("retrying to scroll to", { location: R }, mt.DEBUG), Ce(x, R)) : (Ce(m, !0), D("list did not change, scroll successful", {}, mt.DEBUG));
4295
+ y(), U ? (D("retrying to scroll to", { location: R }, vt.DEBUG), Ce(x, R)) : (Ce(m, !0), D("list did not change, scroll successful", {}, vt.DEBUG));
4276
4296
  };
4277
4297
  if (y(), V === "smooth") {
4278
4298
  let U = !1;
4279
4299
  b = Le(t, (ee) => {
4280
4300
  U = U || ee;
4281
- }), g = _t(d, () => {
4301
+ }), g = Lt(d, () => {
4282
4302
  ae(U);
4283
4303
  });
4284
4304
  } else
4285
- g = _t(B(t, vv(150)), ae);
4305
+ g = Lt(B(t, vv(150)), ae);
4286
4306
  return w = setTimeout(() => {
4287
4307
  y();
4288
- }, 1200), Ce(c, !0), D("scrolling from index to", { behavior: V, index: z, top: Q }, mt.DEBUG), { behavior: V, top: Q };
4308
+ }, 1200), Ce(c, !0), D("scrolling from index to", { behavior: V, index: z, top: Q }, vt.DEBUG), { behavior: V, top: Q };
4289
4309
  }
4290
4310
  )
4291
4311
  ),
@@ -4296,7 +4316,7 @@ const Lr = _e(
4296
4316
  topListHeight: v
4297
4317
  };
4298
4318
  },
4299
- Ue(Xt, ut, hn),
4319
+ ze(Zt, pt, hn),
4300
4320
  { singleton: !0 }
4301
4321
  );
4302
4322
  function vv(e) {
@@ -4318,7 +4338,7 @@ function zi(e, t) {
4318
4338
  const n = t - 1;
4319
4339
  return typeof e == "number" ? e : e.index === "LAST" ? n : e.index;
4320
4340
  }
4321
- const Fr = _e(
4341
+ const Fr = Oe(
4322
4342
  ([{ defaultItemSize: e, listRefresh: t, sizes: n }, { scrollTop: r }, { scrollTargetReached: o, scrollToIndex: s }, { didMount: i }]) => {
4323
4343
  const a = K(!0), c = K(0), u = K(!0);
4324
4344
  return de(
@@ -4326,7 +4346,7 @@ const Fr = _e(
4326
4346
  i,
4327
4347
  Te(c),
4328
4348
  me(([d, p]) => !!p),
4329
- Ut(!1)
4349
+ Gt(!1)
4330
4350
  ),
4331
4351
  a
4332
4352
  ), de(
@@ -4334,21 +4354,21 @@ const Fr = _e(
4334
4354
  i,
4335
4355
  Te(c),
4336
4356
  me(([d, p]) => !!p),
4337
- Ut(!1)
4357
+ Gt(!1)
4338
4358
  ),
4339
4359
  u
4340
4360
  ), Le(
4341
4361
  B(
4342
- Qe(t, i),
4362
+ tt(t, i),
4343
4363
  Te(a, n, e, u),
4344
4364
  me(([[, d], p, { sizeTree: h }, x, m]) => d && (!He(h) || Di(x)) && !p && !m),
4345
4365
  Te(c)
4346
4366
  ),
4347
4367
  ([, d]) => {
4348
- _t(o, () => {
4368
+ Lt(o, () => {
4349
4369
  Ce(u, !0);
4350
4370
  }), $i(4, () => {
4351
- _t(r, () => {
4371
+ Lt(r, () => {
4352
4372
  Ce(a, !0);
4353
4373
  }), Ce(s, d);
4354
4374
  });
@@ -4359,7 +4379,7 @@ const Fr = _e(
4359
4379
  scrolledToInitialItem: a
4360
4380
  };
4361
4381
  },
4362
- Ue(Xt, ut, Lr, mn),
4382
+ ze(Zt, pt, Lr, mn),
4363
4383
  { singleton: !0 }
4364
4384
  );
4365
4385
  function eu(e, t) {
@@ -4374,29 +4394,29 @@ const Er = "up", mr = "down", xv = "none", bv = {
4374
4394
  scrollTop: 0,
4375
4395
  viewportHeight: 0
4376
4396
  }
4377
- }, wv = 0, Br = _e(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4378
- const i = K(!1), a = K(!0), c = Ne(), u = Ne(), d = K(4), p = K(wv), h = it(
4397
+ }, wv = 0, Br = Oe(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: s }]) => {
4398
+ const i = K(!1), a = K(!0), c = Ne(), u = Ne(), d = K(4), p = K(wv), h = ut(
4379
4399
  B(
4380
- ri(B(he(o), En(1), Ut(!0)), B(he(o), En(1), Ut(!1), cl(100))),
4381
- ze()
4400
+ ri(B(he(o), En(1), Gt(!0)), B(he(o), En(1), Gt(!1), cl(100))),
4401
+ $e()
4382
4402
  ),
4383
4403
  !1
4384
- ), x = it(
4385
- B(ri(B(n, Ut(!0)), B(n, Ut(!1), cl(200))), ze()),
4404
+ ), x = ut(
4405
+ B(ri(B(n, Gt(!0)), B(n, Gt(!1), cl(200))), $e()),
4386
4406
  !1
4387
4407
  );
4388
4408
  de(
4389
4409
  B(
4390
- Qe(he(o), he(p)),
4410
+ tt(he(o), he(p)),
4391
4411
  oe(([b, y]) => b <= y),
4392
- ze()
4412
+ $e()
4393
4413
  ),
4394
4414
  a
4395
- ), de(B(a, Qt(50)), u);
4396
- const m = wt(
4415
+ ), de(B(a, nn(50)), u);
4416
+ const m = St(
4397
4417
  B(
4398
- Qe(r, he(s), he(t), he(e), he(d)),
4399
- Vt((b, [{ scrollHeight: y, scrollTop: R }, S, C, E, I]) => {
4418
+ tt(r, he(s), he(t), he(e), he(d)),
4419
+ Yt((b, [{ scrollHeight: y, scrollTop: R }, S, C, E, I]) => {
4400
4420
  const j = R + S - y > -I, P = {
4401
4421
  scrollHeight: y,
4402
4422
  scrollTop: R,
@@ -4418,12 +4438,12 @@ const Er = "up", mr = "down", xv = "none", bv = {
4418
4438
  state: P
4419
4439
  };
4420
4440
  }, bv),
4421
- ze((b, y) => b && b.atBottom === y.atBottom)
4441
+ $e((b, y) => b && b.atBottom === y.atBottom)
4422
4442
  )
4423
- ), v = it(
4443
+ ), v = ut(
4424
4444
  B(
4425
4445
  r,
4426
- Vt(
4446
+ Yt(
4427
4447
  (b, { scrollHeight: y, scrollTop: R, viewportHeight: S }) => {
4428
4448
  if (eu(b.scrollHeight, y))
4429
4449
  return {
@@ -4460,36 +4480,36 @@ const Er = "up", mr = "down", xv = "none", bv = {
4460
4480
  oe((b) => b.atBottom)
4461
4481
  ),
4462
4482
  i
4463
- ), de(B(i, Qt(50)), c);
4483
+ ), de(B(i, nn(50)), c);
4464
4484
  const g = K(mr);
4465
4485
  de(
4466
4486
  B(
4467
4487
  r,
4468
4488
  oe(({ scrollTop: b }) => b),
4469
- ze(),
4470
- Vt(
4471
- (b, y) => Xe(x) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? Er : mr, prevScrollTop: y },
4489
+ $e(),
4490
+ Yt(
4491
+ (b, y) => Je(x) ? { direction: b.direction, prevScrollTop: y } : { direction: y < b.prevScrollTop ? Er : mr, prevScrollTop: y },
4472
4492
  { direction: mr, prevScrollTop: 0 }
4473
4493
  ),
4474
4494
  oe((b) => b.direction)
4475
4495
  ),
4476
4496
  g
4477
- ), de(B(r, Qt(50), Ut(xv)), g);
4497
+ ), de(B(r, nn(50), Gt(xv)), g);
4478
4498
  const w = K(0);
4479
4499
  return de(
4480
4500
  B(
4481
4501
  h,
4482
4502
  me((b) => !b),
4483
- Ut(0)
4503
+ Gt(0)
4484
4504
  ),
4485
4505
  w
4486
4506
  ), de(
4487
4507
  B(
4488
4508
  o,
4489
- Qt(100),
4509
+ nn(100),
4490
4510
  Te(h),
4491
4511
  me(([b, y]) => !!y),
4492
- Vt(([b, y], [R]) => [y, R], [0, 0]),
4512
+ Yt(([b, y], [R]) => [y, R], [0, 0]),
4493
4513
  oe(([b, y]) => y - b)
4494
4514
  ),
4495
4515
  w
@@ -4506,7 +4526,7 @@ const Er = "up", mr = "down", xv = "none", bv = {
4506
4526
  scrollDirection: g,
4507
4527
  scrollVelocity: w
4508
4528
  };
4509
- }, Ue(ut)), Eo = "top", Ro = "bottom", pl = "none";
4529
+ }, ze(pt)), Eo = "top", Ro = "bottom", pl = "none";
4510
4530
  function hl(e, t, n) {
4511
4531
  return typeof e == "number" ? n === Er && t === Eo || n === mr && t === Ro ? e : 0 : n === Er ? t === Eo ? e.main : e.reverse : t === Ro ? e.main : e.reverse;
4512
4532
  }
@@ -4514,11 +4534,11 @@ function ml(e, t) {
4514
4534
  var n;
4515
4535
  return typeof e == "number" ? e : (n = e[t]) != null ? n : 0;
4516
4536
  }
4517
- const Ui = _e(
4537
+ const Ui = Oe(
4518
4538
  ([{ deviation: e, fixedHeaderHeight: t, headerHeight: n, scrollTop: r, viewportHeight: o }]) => {
4519
- const s = Ne(), i = K(0), a = K(0), c = K(0), u = it(
4539
+ const s = Ne(), i = K(0), a = K(0), c = K(0), u = ut(
4520
4540
  B(
4521
- Qe(
4541
+ tt(
4522
4542
  he(r),
4523
4543
  he(o),
4524
4544
  he(n),
@@ -4551,7 +4571,7 @@ const Ui = _e(
4551
4571
  }
4552
4572
  ),
4553
4573
  me((d) => d != null),
4554
- ze(Cr)
4574
+ $e(Cr)
4555
4575
  ),
4556
4576
  [0, 0]
4557
4577
  );
@@ -4565,14 +4585,14 @@ const Ui = _e(
4565
4585
  visibleRange: u
4566
4586
  };
4567
4587
  },
4568
- Ue(ut),
4588
+ ze(pt),
4569
4589
  { singleton: !0 }
4570
4590
  );
4571
4591
  function yv(e, t, n) {
4572
4592
  if (Yo(t)) {
4573
4593
  const r = qc(e, t);
4574
4594
  return [
4575
- { index: Mt(t.groupOffsetTree, r)[0], offset: 0, size: 0 },
4595
+ { index: Bt(t.groupOffsetTree, r)[0], offset: 0, size: 0 },
4576
4596
  { data: n == null ? void 0 : n[0], index: r, offset: 0, size: 0 }
4577
4597
  ];
4578
4598
  }
@@ -4652,7 +4672,7 @@ function gl(e, t, n) {
4652
4672
  }
4653
4673
  return s;
4654
4674
  }
4655
- const Pn = _e(
4675
+ const Pn = Oe(
4656
4676
  ([
4657
4677
  { data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: o },
4658
4678
  s,
@@ -4665,9 +4685,9 @@ const Pn = _e(
4665
4685
  ]) => {
4666
4686
  const v = K([]), g = K(0), w = Ne();
4667
4687
  de(s.topItemsIndexes, v);
4668
- const b = it(
4688
+ const b = ut(
4669
4689
  B(
4670
- Qe(
4690
+ tt(
4671
4691
  x,
4672
4692
  m,
4673
4693
  he(c, Cr),
@@ -4698,7 +4718,7 @@ const Pn = _e(
4698
4718
  N,
4699
4719
  _
4700
4720
  ]) => {
4701
- const M = j, { offsetTree: V, sizeTree: F } = M, O = Xe(g);
4721
+ const M = j, { offsetTree: V, sizeTree: F } = M, O = Je(g);
4702
4722
  if (I === 0)
4703
4723
  return { ...As, totalCount: I };
4704
4724
  if (C === 0 && E === 0)
@@ -4748,7 +4768,7 @@ const Pn = _e(
4748
4768
  ),
4749
4769
  //@ts-expect-error filter needs to be fixed
4750
4770
  me((C) => C !== null),
4751
- ze()
4771
+ $e()
4752
4772
  ),
4753
4773
  As
4754
4774
  );
@@ -4778,25 +4798,25 @@ const Pn = _e(
4778
4798
  ),
4779
4799
  w
4780
4800
  );
4781
- const y = wt(
4801
+ const y = St(
4782
4802
  B(
4783
4803
  b,
4784
4804
  me(({ items: C }) => C.length > 0),
4785
4805
  Te(o, e),
4786
4806
  me(([{ items: C }, E]) => C[C.length - 1].originalIndex === E - 1),
4787
4807
  oe(([, C, E]) => [C - 1, E]),
4788
- ze(Cr),
4808
+ $e(Cr),
4789
4809
  oe(([C]) => C)
4790
4810
  )
4791
- ), R = wt(
4811
+ ), R = St(
4792
4812
  B(
4793
4813
  b,
4794
- Qt(200),
4814
+ nn(200),
4795
4815
  me(({ items: C, topItems: E }) => C.length > 0 && C[0].originalIndex === E.length),
4796
4816
  oe(({ items: C }) => C[0].index),
4797
- ze()
4817
+ $e()
4798
4818
  )
4799
- ), S = wt(
4819
+ ), S = St(
4800
4820
  B(
4801
4821
  b,
4802
4822
  me(({ items: C }) => C.length > 0),
@@ -4811,13 +4831,13 @@ const Pn = _e(
4811
4831
  startIndex: C[E].index
4812
4832
  };
4813
4833
  }),
4814
- ze(Yc)
4834
+ $e(Yc)
4815
4835
  )
4816
4836
  );
4817
4837
  return { endReached: y, initialItemCount: g, itemsRendered: w, listState: b, rangeChanged: S, startReached: R, topItemsIndexes: v, ...h };
4818
4838
  },
4819
- Ue(
4820
- Xt,
4839
+ ze(
4840
+ Zt,
4821
4841
  Zc,
4822
4842
  Ui,
4823
4843
  Fr,
@@ -4827,36 +4847,36 @@ const Pn = _e(
4827
4847
  Bi
4828
4848
  ),
4829
4849
  { singleton: !0 }
4830
- ), nu = _e(
4850
+ ), nu = Oe(
4831
4851
  ([{ fixedFooterHeight: e, fixedHeaderHeight: t, footerHeight: n, headerHeight: r }, { listState: o }]) => {
4832
- const s = Ne(), i = it(
4852
+ const s = Ne(), i = ut(
4833
4853
  B(
4834
- Qe(n, e, r, t, o),
4854
+ tt(n, e, r, t, o),
4835
4855
  oe(([a, c, u, d, p]) => a + c + u + d + p.offsetBottom + p.bottom)
4836
4856
  ),
4837
4857
  0
4838
4858
  );
4839
4859
  return de(he(i), s), { totalListHeight: i, totalListHeightChanged: s };
4840
4860
  },
4841
- Ue(ut, Pn),
4861
+ ze(pt, Pn),
4842
4862
  { singleton: !0 }
4843
- ), Sv = _e(
4863
+ ), Sv = Oe(
4844
4864
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
4845
- const n = K(!1), r = it(
4865
+ const n = K(!1), r = ut(
4846
4866
  B(
4847
- Qe(n, e, t),
4867
+ tt(n, e, t),
4848
4868
  me(([o]) => o),
4849
4869
  oe(([, o, s]) => Math.max(0, o - s)),
4850
- Qt(0),
4851
- ze()
4870
+ nn(0),
4871
+ $e()
4852
4872
  ),
4853
4873
  0
4854
4874
  );
4855
4875
  return { alignToBottom: n, paddingTopAddition: r };
4856
4876
  },
4857
- Ue(ut, nu),
4877
+ ze(pt, nu),
4858
4878
  { singleton: !0 }
4859
- ), ru = _e(() => ({
4879
+ ), ru = Oe(() => ({
4860
4880
  context: K(null)
4861
4881
  })), Cv = ({
4862
4882
  itemBottom: e,
@@ -4864,7 +4884,7 @@ const Pn = _e(
4864
4884
  locationParams: { align: n, behavior: r, ...o },
4865
4885
  viewportBottom: s,
4866
4886
  viewportTop: i
4867
- }) => t < i ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, ou = _e(
4887
+ }) => t < i ? { ...o, align: n ?? "start", behavior: r } : e > s ? { ...o, align: n ?? "end", behavior: r } : null, ou = Oe(
4868
4888
  ([
4869
4889
  { gap: e, sizes: t, totalCount: n },
4870
4890
  { fixedFooterHeight: r, fixedHeaderHeight: o, headerHeight: s, scrollingInProgress: i, scrollTop: a, viewportHeight: c },
@@ -4877,20 +4897,20 @@ const Pn = _e(
4877
4897
  Te(t, c, n, s, o, r, a),
4878
4898
  Te(e),
4879
4899
  oe(([[p, h, x, m, v, g, w, b], y]) => {
4880
- const { align: R, behavior: S, calculateViewLocation: C = Cv, done: E, ...I } = p, j = Jc(p, h, m - 1), P = Tr(j, h.offsetTree, y) + v + g, D = P + Mt(h.sizeTree, j)[1], H = b + g, G = b + x - w, N = C({
4900
+ const { align: R, behavior: S, calculateViewLocation: C = Cv, done: E, ...I } = p, j = Jc(p, h, m - 1), P = Tr(j, h.offsetTree, y) + v + g, D = P + Bt(h.sizeTree, j)[1], H = b + g, G = b + x - w, N = C({
4881
4901
  itemBottom: D,
4882
4902
  itemTop: P,
4883
4903
  locationParams: { align: R, behavior: S, ...I },
4884
4904
  viewportBottom: G,
4885
4905
  viewportTop: H
4886
4906
  });
4887
- return N ? E && _t(
4907
+ return N ? E && Lt(
4888
4908
  B(
4889
4909
  i,
4890
4910
  me((_) => !_),
4891
4911
  // skips the initial publish of false, and the cleanup call.
4892
4912
  // but if scrollingInProgress is true, we skip the initial publish.
4893
- En(Xe(i) ? 1 : 2)
4913
+ En(Je(i) ? 1 : 2)
4894
4914
  ),
4895
4915
  E
4896
4916
  ) : E && E(), N;
@@ -4902,13 +4922,13 @@ const Pn = _e(
4902
4922
  scrollIntoView: d
4903
4923
  };
4904
4924
  },
4905
- Ue(Xt, ut, Lr, Pn, hn),
4925
+ ze(Zt, pt, Lr, Pn, hn),
4906
4926
  { singleton: !0 }
4907
4927
  );
4908
4928
  function vl(e) {
4909
4929
  return e ? e === "smooth" ? "smooth" : "auto" : !1;
4910
4930
  }
4911
- const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4931
+ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = Oe(
4912
4932
  ([
4913
4933
  { listRefresh: e, totalCount: t, fixedItemSize: n, data: r },
4914
4934
  { atBottomState: o, isAtBottom: s },
@@ -4931,7 +4951,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4931
4951
  }
4932
4952
  Le(
4933
4953
  B(
4934
- Qe(B(he(t), En(1)), c),
4954
+ tt(B(he(t), En(1)), c),
4935
4955
  Te(he(m), s, a, p),
4936
4956
  oe(([[S, C], E, I, j, P]) => {
4937
4957
  let D = C && j, H = "auto";
@@ -4940,24 +4960,24 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4940
4960
  me(({ shouldFollow: S }) => S)
4941
4961
  ),
4942
4962
  ({ followOutputBehavior: S, totalCount: C }) => {
4943
- g && (g(), g = null), Xe(n) ? requestAnimationFrame(() => {
4944
- Xe(d)("following output to ", { totalCount: C }, mt.DEBUG), w(S);
4945
- }) : g = _t(e, () => {
4946
- Xe(d)("following output to ", { totalCount: C }, mt.DEBUG), w(S), g = null;
4963
+ g && (g(), g = null), Je(n) ? requestAnimationFrame(() => {
4964
+ Je(d)("following output to ", { totalCount: C }, vt.DEBUG), w(S);
4965
+ }) : g = Lt(e, () => {
4966
+ Je(d)("following output to ", { totalCount: C }, vt.DEBUG), w(S), g = null;
4947
4967
  });
4948
4968
  }
4949
4969
  );
4950
4970
  function b(S) {
4951
- const C = _t(o, (E) => {
4952
- S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !g && (Xe(d)("scrolling to bottom due to increased size", {}, mt.DEBUG), w("auto"));
4971
+ const C = Lt(o, (E) => {
4972
+ S && !E.atBottom && E.notAtBottomBecause === "SIZE_INCREASED" && !g && (Je(d)("scrolling to bottom due to increased size", {}, vt.DEBUG), w("auto"));
4953
4973
  });
4954
4974
  setTimeout(C, 100);
4955
4975
  }
4956
4976
  Le(
4957
4977
  B(
4958
- Qe(he(m), t, u),
4978
+ tt(he(m), t, u),
4959
4979
  me(([S, , C]) => S && C),
4960
- Vt(
4980
+ Yt(
4961
4981
  ({ value: S }, [, C]) => ({ refreshed: S === C, value: C }),
4962
4982
  { refreshed: !1, value: 0 }
4963
4983
  ),
@@ -4965,11 +4985,11 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4965
4985
  Te(m, t)
4966
4986
  ),
4967
4987
  ([, S]) => {
4968
- Xe(a) && b(S !== !1);
4988
+ Je(a) && b(S !== !1);
4969
4989
  }
4970
4990
  ), Le(v, () => {
4971
- b(Xe(m) !== !1);
4972
- }), Le(Qe(he(m), o), ([S, C]) => {
4991
+ b(Je(m) !== !1);
4992
+ }), Le(tt(he(m), o), ([S, C]) => {
4973
4993
  S && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && w("auto");
4974
4994
  });
4975
4995
  const y = K(null), R = Ne();
@@ -4987,33 +5007,33 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
4987
5007
  R
4988
5008
  ), Le(
4989
5009
  B(
4990
- Qe(B(R, En(1)), c),
5010
+ tt(B(R, En(1)), c),
4991
5011
  Te(he(y), a, p, h),
4992
5012
  oe(([[S, C], E, I, j, P]) => C && I && (E == null ? void 0 : E({ context: P, totalCount: S, scrollingInProgress: j }))),
4993
5013
  me((S) => !!S),
4994
- Qt(0)
5014
+ nn(0)
4995
5015
  ),
4996
5016
  (S) => {
4997
- g && (g(), g = null), Xe(n) ? requestAnimationFrame(() => {
4998
- Xe(d)("scrolling into view", {}), Ce(x, S);
4999
- }) : g = _t(e, () => {
5000
- Xe(d)("scrolling into view", {}), Ce(x, S), g = null;
5017
+ g && (g(), g = null), Je(n) ? requestAnimationFrame(() => {
5018
+ Je(d)("scrolling into view", {}), Ce(x, S);
5019
+ }) : g = Lt(e, () => {
5020
+ Je(d)("scrolling into view", {}), Ce(x, S), g = null;
5001
5021
  });
5002
5022
  }
5003
5023
  ), { autoscrollToBottom: v, followOutput: m, scrollIntoViewOnChange: y };
5004
5024
  },
5005
- Ue(
5006
- Xt,
5025
+ ze(
5026
+ Zt,
5007
5027
  Br,
5008
5028
  Lr,
5009
5029
  Fr,
5010
5030
  mn,
5011
5031
  hn,
5012
- ut,
5032
+ pt,
5013
5033
  ru,
5014
5034
  ou
5015
5035
  )
5016
- ), Rv = _e(
5036
+ ), Rv = Oe(
5017
5037
  ([{ data: e, firstItemIndex: t, gap: n, sizes: r }, { initialTopMostItemIndex: o }, { initialItemCount: s, listState: i }, { didMount: a }]) => (de(
5018
5038
  B(
5019
5039
  a,
@@ -5024,9 +5044,9 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5024
5044
  ),
5025
5045
  i
5026
5046
  ), {}),
5027
- Ue(Xt, Fr, Pn, mn),
5047
+ ze(Zt, Fr, Pn, mn),
5028
5048
  { singleton: !0 }
5029
- ), Iv = _e(
5049
+ ), Iv = Oe(
5030
5050
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
5031
5051
  const r = K(0);
5032
5052
  return Le(
@@ -5037,7 +5057,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5037
5057
  oe(([, o]) => ({ top: o }))
5038
5058
  ),
5039
5059
  (o) => {
5040
- _t(
5060
+ Lt(
5041
5061
  B(
5042
5062
  n,
5043
5063
  En(1),
@@ -5054,9 +5074,9 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5054
5074
  initialScrollTop: r
5055
5075
  };
5056
5076
  },
5057
- Ue(mn, ut, Pn),
5077
+ ze(mn, pt, Pn),
5058
5078
  { singleton: !0 }
5059
- ), su = _e(
5079
+ ), su = Oe(
5060
5080
  ([{ scrollVelocity: e }]) => {
5061
5081
  const t = K(!1), n = Ne(), r = K(!1);
5062
5082
  return de(
@@ -5073,23 +5093,23 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5073
5093
  return !0;
5074
5094
  return i;
5075
5095
  }),
5076
- ze()
5096
+ $e()
5077
5097
  ),
5078
5098
  t
5079
5099
  ), Le(
5080
- B(Qe(t, e, n), Te(r)),
5100
+ B(tt(t, e, n), Te(r)),
5081
5101
  ([[o, s, i], a]) => {
5082
5102
  o && a && a.change && a.change(s, i);
5083
5103
  }
5084
5104
  ), { isSeeking: t, scrollSeekConfiguration: r, scrollSeekRangeChanged: n, scrollVelocity: e };
5085
5105
  },
5086
- Ue(Br),
5106
+ ze(Br),
5087
5107
  { singleton: !0 }
5088
- ), Wi = _e(([{ scrollContainerState: e, scrollTo: t }]) => {
5108
+ ), Wi = Oe(([{ scrollContainerState: e, scrollTo: t }]) => {
5089
5109
  const n = Ne(), r = Ne(), o = Ne(), s = K(!1), i = K(void 0);
5090
5110
  return de(
5091
5111
  B(
5092
- Qe(n, r),
5112
+ tt(n, r),
5093
5113
  oe(([{ scrollHeight: a, scrollTop: c, viewportHeight: u }, { offsetTop: d }]) => ({
5094
5114
  scrollHeight: a,
5095
5115
  scrollTop: Math.max(0, c - d),
@@ -5117,7 +5137,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5117
5137
  windowScrollTo: o,
5118
5138
  windowViewportRect: r
5119
5139
  };
5120
- }, Ue(ut)), Nv = _e(
5140
+ }, ze(pt)), Nv = Oe(
5121
5141
  ([
5122
5142
  { sizeRanges: e, sizes: t },
5123
5143
  { headerHeight: n, scrollTop: r },
@@ -5140,7 +5160,7 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5140
5160
  s,
5141
5161
  Te(d),
5142
5162
  me(([, x]) => x !== void 0),
5143
- ze(),
5163
+ $e(),
5144
5164
  oe(([, x]) => x.ranges)
5145
5165
  ),
5146
5166
  e
@@ -5149,12 +5169,12 @@ const Tv = (e, t) => typeof e == "function" ? vl(e(t)) : t && vl(e), Ev = _e(
5149
5169
  restoreStateFrom: d
5150
5170
  };
5151
5171
  },
5152
- Ue(Xt, ut, Fr, mn, Wi)
5172
+ ze(Zt, pt, Fr, mn, Wi)
5153
5173
  );
5154
5174
  function Av(e) {
5155
5175
  return { align: "start", index: 0, offset: e.scrollTop };
5156
5176
  }
5157
- const jv = _e(([{ topItemsIndexes: e }]) => {
5177
+ const jv = Oe(([{ topItemsIndexes: e }]) => {
5158
5178
  const t = K(0);
5159
5179
  return de(
5160
5180
  B(
@@ -5164,12 +5184,12 @@ const jv = _e(([{ topItemsIndexes: e }]) => {
5164
5184
  ),
5165
5185
  e
5166
5186
  ), { topItemCount: t };
5167
- }, Ue(Pn));
5187
+ }, ze(Pn));
5168
5188
  function iu(e) {
5169
5189
  let t = !1, n;
5170
5190
  return () => (t || (t = !0, n = e()), n);
5171
5191
  }
5172
- const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), kv = _e(
5192
+ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), kv = Oe(
5173
5193
  ([
5174
5194
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
5175
5195
  { isAtBottom: o, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: a },
@@ -5178,11 +5198,11 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5178
5198
  { log: x },
5179
5199
  { recalcInProgress: m }
5180
5200
  ]) => {
5181
- const v = wt(
5201
+ const v = St(
5182
5202
  B(
5183
5203
  c,
5184
5204
  Te(i),
5185
- Vt(
5205
+ Yt(
5186
5206
  ([, w, b, y], [{ bottom: R, items: S, offsetBottom: C, totalCount: E }, I]) => {
5187
5207
  const j = R + C;
5188
5208
  let P = 0;
@@ -5193,7 +5213,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5193
5213
  me(([w]) => w !== 0),
5194
5214
  Te(r, a, n, o, x, m),
5195
5215
  me(([, w, b, y, , , R]) => !R && !y && w !== 0 && b === Er),
5196
- oe(([[w], , , , , b]) => (b("Upward scrolling compensation", { amount: w }, mt.DEBUG), w))
5216
+ oe(([[w], , , , , b]) => (b("Upward scrolling compensation", { amount: w }, vt.DEBUG), w))
5197
5217
  )
5198
5218
  );
5199
5219
  function g(w) {
@@ -5203,10 +5223,10 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5203
5223
  y && Pv() ? Ce(e, b - w) : g(-w);
5204
5224
  }), Le(
5205
5225
  B(
5206
- Qe(it(s, !1), e, m),
5226
+ tt(ut(s, !1), e, m),
5207
5227
  me(([w, b, y]) => !w && !y && b !== 0),
5208
5228
  oe(([w, b]) => b),
5209
- Qt(1)
5229
+ nn(1)
5210
5230
  ),
5211
5231
  g
5212
5232
  ), de(
@@ -5247,8 +5267,8 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5247
5267
  }
5248
5268
  ), { deviation: e };
5249
5269
  },
5250
- Ue(ut, Br, Pn, Xt, hn, Bi)
5251
- ), _v = _e(
5270
+ ze(pt, Br, Pn, Zt, hn, Bi)
5271
+ ), _v = Oe(
5252
5272
  ([
5253
5273
  e,
5254
5274
  t,
@@ -5274,7 +5294,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5274
5294
  ...u,
5275
5295
  ...d
5276
5296
  }),
5277
- Ue(
5297
+ ze(
5278
5298
  Ui,
5279
5299
  Rv,
5280
5300
  mn,
@@ -5287,7 +5307,7 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5287
5307
  hn,
5288
5308
  ru
5289
5309
  )
5290
- ), au = _e(
5310
+ ), au = Oe(
5291
5311
  ([
5292
5312
  {
5293
5313
  data: e,
@@ -5350,10 +5370,10 @@ const Pv = iu(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
5350
5370
  sizes: c,
5351
5371
  ...g
5352
5372
  }),
5353
- Ue(
5354
- Xt,
5373
+ ze(
5374
+ Zt,
5355
5375
  Fr,
5356
- ut,
5376
+ pt,
5357
5377
  Nv,
5358
5378
  Ev,
5359
5379
  Pn,
@@ -5429,11 +5449,11 @@ function lu(e, t, n) {
5429
5449
  );
5430
5450
  return Y.useSyncExternalStore(
5431
5451
  b,
5432
- () => Xe(w),
5433
- () => Xe(w)
5452
+ () => Je(w),
5453
+ () => Je(w)
5434
5454
  );
5435
5455
  }, m = (g) => {
5436
- const w = Y.useContext(a)[g], [b, y] = Y.useState(ll(Xe, w));
5456
+ const w = Y.useContext(a)[g], [b, y] = Y.useState(ll(Je, w));
5437
5457
  return Kr(
5438
5458
  () => Le(w, (R) => {
5439
5459
  R !== b && y(al(R));
@@ -5518,12 +5538,12 @@ const Ps = "-webkit-sticky", xl = "sticky", Vi = iu(() => {
5518
5538
  function Gi(e) {
5519
5539
  return e;
5520
5540
  }
5521
- const Dv = /* @__PURE__ */ _e(() => {
5522
- const e = K((a) => `Item ${a}`), t = K((a) => `Group ${a}`), n = K({}), r = K(Gi), o = K("div"), s = K(tr), i = (a, c = null) => it(
5541
+ const Dv = /* @__PURE__ */ Oe(() => {
5542
+ const e = K((a) => `Item ${a}`), t = K((a) => `Group ${a}`), n = K({}), r = K(Gi), o = K("div"), s = K(tr), i = (a, c = null) => ut(
5523
5543
  B(
5524
5544
  n,
5525
5545
  oe((u) => u[a]),
5526
- ze()
5546
+ $e()
5527
5547
  ),
5528
5548
  c
5529
5549
  );
@@ -5544,11 +5564,11 @@ const Dv = /* @__PURE__ */ _e(() => {
5544
5564
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
5545
5565
  TopItemListComponent: i("TopItemList")
5546
5566
  };
5547
- }), Lv = /* @__PURE__ */ _e(
5567
+ }), Lv = /* @__PURE__ */ Oe(
5548
5568
  ([e, t]) => ({ ...e, ...t }),
5549
- Ue(au, Dv)
5569
+ ze(au, Dv)
5550
5570
  ), Fv = ({ height: e }) => /* @__PURE__ */ l.jsx("div", { style: { height: e } }), Bv = { overflowAnchor: "none", position: Vi(), zIndex: 1 }, pu = { overflowAnchor: "none" }, Hv = { ...pu, display: "inline-block", height: "100%" }, bl = /* @__PURE__ */ Y.memo(function({ showTopList: e = !1 }) {
5551
- const t = xe("listState"), n = Tt("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = Tt("windowScrollContainerState"), i = Tt("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), p = xe("trackItemSizes"), h = xe("itemSize"), x = xe("log"), m = Tt("gap"), v = xe("horizontalDirection"), { callbackRef: g } = tv(
5571
+ const t = xe("listState"), n = It("sizeRanges"), r = xe("useWindowScroll"), o = xe("customScrollParent"), s = It("windowScrollContainerState"), i = It("scrollContainerState"), a = o || r ? s : i, c = xe("itemContent"), u = xe("context"), d = xe("groupContent"), p = xe("trackItemSizes"), h = xe("itemSize"), x = xe("log"), m = It("gap"), v = xe("horizontalDirection"), { callbackRef: g } = tv(
5552
5572
  n,
5553
5573
  h,
5554
5574
  p,
@@ -5578,10 +5598,10 @@ const Dv = /* @__PURE__ */ _e(() => {
5578
5598
  },
5579
5599
  ...H ? {} : { visibility: "hidden" }
5580
5600
  };
5581
- return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...st(y, u) }) : /* @__PURE__ */ l.jsx(
5601
+ return !e && t.totalCount === 0 && y ? /* @__PURE__ */ l.jsx(y, { ...ct(y, u) }) : /* @__PURE__ */ l.jsx(
5582
5602
  S,
5583
5603
  {
5584
- ...st(S, u),
5604
+ ...ct(S, u),
5585
5605
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
5586
5606
  ref: g,
5587
5607
  style: G,
@@ -5590,7 +5610,7 @@ const Dv = /* @__PURE__ */ _e(() => {
5590
5610
  return j ? /* @__PURE__ */ no(
5591
5611
  R,
5592
5612
  {
5593
- ...st(R, u),
5613
+ ...ct(R, u),
5594
5614
  height: N.size,
5595
5615
  index: N.index,
5596
5616
  key: M,
@@ -5600,7 +5620,7 @@ const Dv = /* @__PURE__ */ _e(() => {
5600
5620
  ) : N.type === "group" ? /* @__PURE__ */ no(
5601
5621
  E,
5602
5622
  {
5603
- ...st(E, u),
5623
+ ...ct(E, u),
5604
5624
  "data-index": _,
5605
5625
  "data-item-index": N.index,
5606
5626
  "data-known-size": N.size,
@@ -5611,7 +5631,7 @@ const Dv = /* @__PURE__ */ _e(() => {
5611
5631
  ) : /* @__PURE__ */ no(
5612
5632
  C,
5613
5633
  {
5614
- ...st(C, u),
5634
+ ...ct(C, u),
5615
5635
  ...Wv(C, N.data),
5616
5636
  "data-index": _,
5617
5637
  "data-item-group-index": N.groupIndex,
@@ -5647,7 +5667,7 @@ const Dv = /* @__PURE__ */ _e(() => {
5647
5667
  width: "100%",
5648
5668
  zIndex: 1
5649
5669
  };
5650
- function st(e, t) {
5670
+ function ct(e, t) {
5651
5671
  if (typeof e != "string")
5652
5672
  return { context: t };
5653
5673
  }
@@ -5655,7 +5675,7 @@ function Wv(e, t) {
5655
5675
  return { item: typeof e == "string" ? void 0 : t };
5656
5676
  }
5657
5677
  const Vv = /* @__PURE__ */ Y.memo(function() {
5658
- const e = xe("HeaderComponent"), t = Tt("headerHeight"), n = xe("HeaderFooterTag"), r = jn(
5678
+ const e = xe("HeaderComponent"), t = It("headerHeight"), n = xe("HeaderFooterTag"), r = jn(
5659
5679
  Y.useMemo(
5660
5680
  () => (s) => {
5661
5681
  t(cn(s, "height"));
@@ -5665,9 +5685,9 @@ const Vv = /* @__PURE__ */ Y.memo(function() {
5665
5685
  !0,
5666
5686
  xe("skipAnimationFrameInResizeObserver")
5667
5687
  ), o = xe("context");
5668
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...st(e, o) }) }) : null;
5688
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
5669
5689
  }), Gv = /* @__PURE__ */ Y.memo(function() {
5670
- const e = xe("FooterComponent"), t = Tt("footerHeight"), n = xe("HeaderFooterTag"), r = jn(
5690
+ const e = xe("FooterComponent"), t = It("footerHeight"), n = xe("HeaderFooterTag"), r = jn(
5671
5691
  Y.useMemo(
5672
5692
  () => (s) => {
5673
5693
  t(cn(s, "height"));
@@ -5677,7 +5697,7 @@ const Vv = /* @__PURE__ */ Y.memo(function() {
5677
5697
  !0,
5678
5698
  xe("skipAnimationFrameInResizeObserver")
5679
5699
  ), o = xe("context");
5680
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...st(e, o) }) }) : null;
5700
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
5681
5701
  });
5682
5702
  function hu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5683
5703
  return Y.memo(function({ children: r, style: o, context: s, ...i }) {
@@ -5698,7 +5718,7 @@ function hu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5698
5718
  style: { ...p ? zv : $v, ...o },
5699
5719
  tabIndex: 0,
5700
5720
  ...i,
5701
- ...st(c, s),
5721
+ ...ct(c, s),
5702
5722
  children: r
5703
5723
  }
5704
5724
  );
@@ -5725,14 +5745,14 @@ function mu({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
5725
5745
  "data-virtuoso-scroller": !0,
5726
5746
  style: { position: "relative", ...o, ...d !== 0 ? { height: d + p } : {} },
5727
5747
  ...i,
5728
- ...st(c, s),
5748
+ ...ct(c, s),
5729
5749
  children: r
5730
5750
  }
5731
5751
  );
5732
5752
  });
5733
5753
  }
5734
5754
  const Kv = ({ children: e }) => {
5735
- const t = Y.useContext(cu), n = Tt("viewportHeight"), r = Tt("fixedItemHeight"), o = xe("alignToBottom"), s = xe("horizontalDirection"), i = Y.useMemo(
5755
+ const t = Y.useContext(cu), n = It("viewportHeight"), r = It("fixedItemHeight"), o = xe("alignToBottom"), s = xe("horizontalDirection"), i = Y.useMemo(
5736
5756
  () => Hc(n, (c) => cn(c, s ? "width" : "height")),
5737
5757
  [n, s]
5738
5758
  ), a = jn(i, !0, xe("skipAnimationFrameInResizeObserver"));
@@ -5740,7 +5760,7 @@ const Kv = ({ children: e }) => {
5740
5760
  t && (n(t.viewportHeight), r(t.itemHeight));
5741
5761
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "element", ref: a, style: Xo(o), children: e });
5742
5762
  }, Yv = ({ children: e }) => {
5743
- const t = Y.useContext(cu), n = Tt("windowViewportRect"), r = Tt("fixedItemHeight"), o = xe("customScrollParent"), s = zc(
5763
+ const t = Y.useContext(cu), n = It("windowViewportRect"), r = It("fixedItemHeight"), o = xe("customScrollParent"), s = zc(
5744
5764
  n,
5745
5765
  o,
5746
5766
  xe("skipAnimationFrameInResizeObserver")
@@ -5750,7 +5770,7 @@ const Kv = ({ children: e }) => {
5750
5770
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { "data-viewport-type": "window", ref: s, style: Xo(i), children: e });
5751
5771
  }, Xv = ({ children: e }) => {
5752
5772
  const t = xe("TopItemListComponent") || "div", n = xe("headerHeight"), r = { ...Uv, marginTop: `${n}px` }, o = xe("context");
5753
- return /* @__PURE__ */ l.jsx(t, { style: r, ...st(t, o), children: e });
5773
+ return /* @__PURE__ */ l.jsx(t, { style: r, ...ct(t, o), children: e });
5754
5774
  }, qv = /* @__PURE__ */ Y.memo(function(e) {
5755
5775
  const t = xe("useWindowScroll"), n = xe("topItemsIndexes").length > 0, r = xe("customScrollParent"), o = xe("context");
5756
5776
  return /* @__PURE__ */ l.jsxs(r || t ? Qv : Zv, { ...e, context: o, children: [
@@ -5765,7 +5785,7 @@ const Kv = ({ children: e }) => {
5765
5785
  Component: Jv,
5766
5786
  useEmitter: Ki,
5767
5787
  useEmitterValue: xe,
5768
- usePublisher: Tt
5788
+ usePublisher: It
5769
5789
  } = /* @__PURE__ */ lu(
5770
5790
  Lv,
5771
5791
  {
@@ -5825,18 +5845,18 @@ const Kv = ({ children: e }) => {
5825
5845
  }
5826
5846
  },
5827
5847
  qv
5828
- ), Zv = /* @__PURE__ */ hu({ useEmitter: Ki, useEmitterValue: xe, usePublisher: Tt }), Qv = /* @__PURE__ */ mu({ useEmitter: Ki, useEmitterValue: xe, usePublisher: Tt }), ex = Jv, tx = /* @__PURE__ */ _e(() => {
5848
+ ), Zv = /* @__PURE__ */ hu({ useEmitter: Ki, useEmitterValue: xe, usePublisher: It }), Qv = /* @__PURE__ */ mu({ useEmitter: Ki, useEmitterValue: xe, usePublisher: It }), ex = Jv, tx = /* @__PURE__ */ Oe(() => {
5829
5849
  const e = K((u) => /* @__PURE__ */ l.jsxs("td", { children: [
5830
5850
  "Item $",
5831
5851
  u
5832
5852
  ] })), t = K(null), n = K((u) => /* @__PURE__ */ l.jsxs("td", { colSpan: 1e3, children: [
5833
5853
  "Group ",
5834
5854
  u
5835
- ] })), r = K(null), o = K(null), s = K({}), i = K(Gi), a = K(tr), c = (u, d = null) => it(
5855
+ ] })), r = K(null), o = K(null), s = K({}), i = K(Gi), a = K(tr), c = (u, d = null) => ut(
5836
5856
  B(
5837
5857
  s,
5838
5858
  oe((p) => p[u]),
5839
- ze()
5859
+ $e()
5840
5860
  ),
5841
5861
  d
5842
5862
  );
@@ -5861,7 +5881,7 @@ const Kv = ({ children: e }) => {
5861
5881
  GroupComponent: c("Group", "tr")
5862
5882
  };
5863
5883
  });
5864
- Ue(au, tx);
5884
+ ze(au, tx);
5865
5885
  Vi();
5866
5886
  const wl = {
5867
5887
  bottom: 0,
@@ -5895,7 +5915,7 @@ function Yr(e, t) {
5895
5915
  function ox(e, t) {
5896
5916
  return e && e.column === t.column && e.row === t.row;
5897
5917
  }
5898
- const sx = /* @__PURE__ */ _e(
5918
+ const sx = /* @__PURE__ */ Oe(
5899
5919
  ([
5900
5920
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
5901
5921
  { footerHeight: o, headerHeight: s, scrollBy: i, scrollContainerState: a, scrollTo: c, scrollTop: u, smoothScrollTargetReached: d, viewportHeight: p },
@@ -5917,13 +5937,13 @@ const sx = /* @__PURE__ */ _e(
5917
5937
  }
5918
5938
  ), Le(
5919
5939
  B(
5920
- Qe(m, z, P, j, O, Q),
5940
+ tt(m, z, P, j, O, Q),
5921
5941
  me(([k, J, re, ce, , ie]) => k && !J && re.height !== 0 && ce.height !== 0 && !ie)
5922
5942
  ),
5923
5943
  ([, , , , k]) => {
5924
5944
  Ce(Q, !0), $i(1, () => {
5925
5945
  Ce(D, k);
5926
- }), _t(B(u), () => {
5946
+ }), Lt(B(u), () => {
5927
5947
  Ce(t, [0, 0]), Ce(z, !0);
5928
5948
  });
5929
5949
  }
@@ -5931,7 +5951,7 @@ const sx = /* @__PURE__ */ _e(
5931
5951
  B(
5932
5952
  V,
5933
5953
  me((k) => k != null && k.scrollTop > 0),
5934
- Ut(0)
5954
+ Gt(0)
5935
5955
  ),
5936
5956
  E
5937
5957
  ), Le(
@@ -5941,7 +5961,7 @@ const sx = /* @__PURE__ */ _e(
5941
5961
  me(([, k]) => k != null)
5942
5962
  ),
5943
5963
  ([, k]) => {
5944
- k && (Ce(j, k.viewport), Ce(P, k.item), Ce(_, k.gap), k.scrollTop > 0 && (Ce(F, !0), _t(B(u, En(1)), (J) => {
5964
+ k && (Ce(j, k.viewport), Ce(P, k.item), Ce(_, k.gap), k.scrollTop > 0 && (Ce(F, !0), Lt(B(u, En(1)), (J) => {
5945
5965
  Ce(F, !1);
5946
5966
  }), Ce(c, { top: k.scrollTop })));
5947
5967
  }
@@ -5953,7 +5973,7 @@ const sx = /* @__PURE__ */ _e(
5953
5973
  p
5954
5974
  ), de(
5955
5975
  B(
5956
- Qe(
5976
+ tt(
5957
5977
  he(j, Yr),
5958
5978
  he(P, Yr),
5959
5979
  he(_, (k, J) => k && k.column === J.column && k.row === J.row),
@@ -5969,7 +5989,7 @@ const sx = /* @__PURE__ */ _e(
5969
5989
  M
5970
5990
  ), de(
5971
5991
  B(
5972
- Qe(
5992
+ tt(
5973
5993
  he(C),
5974
5994
  r,
5975
5995
  he(_, ox),
@@ -5988,25 +6008,25 @@ const sx = /* @__PURE__ */ _e(
5988
6008
  [J, re],
5989
6009
  ce,
5990
6010
  ie,
5991
- Oe,
6011
+ Me,
5992
6012
  ue,
5993
6013
  Ae,
5994
6014
  ,
5995
6015
  le,
5996
6016
  fe
5997
6017
  ]) => {
5998
- const { column: ke, row: W } = ce, { height: te, width: ye } = ie, { width: Me } = Oe;
5999
- if (Ae === 0 && (k === 0 || Me === 0))
6018
+ const { column: ke, row: W } = ce, { height: te, width: ye } = ie, { width: _e } = Me;
6019
+ if (Ae === 0 && (k === 0 || _e === 0))
6000
6020
  return wl;
6001
6021
  if (ye === 0) {
6002
- const on = zi(fe, k), xn = on + Math.max(Ae - 1, 0);
6003
- return rx(Cl(on, xn, ue));
6022
+ const kt = zi(fe, k), xn = kt + Math.max(Ae - 1, 0);
6023
+ return rx(Cl(kt, xn, ue));
6004
6024
  }
6005
- const tt = gu(Me, ye, ke);
6006
- let $e, Ve;
6007
- le ? J === 0 && re === 0 && Ae > 0 ? ($e = 0, Ve = Ae - 1) : ($e = tt * Io((J + W) / (te + W)), Ve = tt * yl((re + W) / (te + W)) - 1, Ve = ks(k - 1, gr(Ve, tt - 1)), $e = ks(Ve, gr(0, $e))) : ($e = 0, Ve = -1);
6008
- const ft = Cl($e, Ve, ue), { bottom: at, top: nn } = Tl(Oe, ce, ie, ft), $t = yl(k / tt), rn = $t * te + ($t - 1) * W - at;
6009
- return { bottom: at, itemHeight: te, items: ft, itemWidth: ye, offsetBottom: rn, offsetTop: nn, top: nn };
6025
+ const Ge = gu(_e, ye, ke);
6026
+ let nt, Ke;
6027
+ le ? J === 0 && re === 0 && Ae > 0 ? (nt = 0, Ke = Ae - 1) : (nt = Ge * Io((J + W) / (te + W)), Ke = Ge * yl((re + W) / (te + W)) - 1, Ke = ks(k - 1, gr(Ke, Ge - 1)), nt = ks(Ke, gr(0, nt))) : (nt = 0, Ke = -1);
6028
+ const Tt = Cl(nt, Ke, ue), { bottom: We, top: it } = Tl(Me, ce, ie, Tt), Ye = yl(k / Ge), at = Ye * te + (Ye - 1) * W - We;
6029
+ return { bottom: We, itemHeight: te, items: Tt, itemWidth: ye, offsetBottom: at, offsetTop: it, top: it };
6010
6030
  }
6011
6031
  )
6012
6032
  ),
@@ -6020,13 +6040,13 @@ const sx = /* @__PURE__ */ _e(
6020
6040
  C
6021
6041
  ), de(
6022
6042
  B(
6023
- Qe(j, P, I, _),
6043
+ tt(j, P, I, _),
6024
6044
  me(([k, J, { items: re }]) => re.length > 0 && J.height !== 0 && k.height !== 0),
6025
6045
  oe(([k, J, { items: re }, ce]) => {
6026
- const { bottom: ie, top: Oe } = Tl(k, ce, J, re);
6027
- return [Oe, ie];
6046
+ const { bottom: ie, top: Me } = Tl(k, ce, J, re);
6047
+ return [Me, ie];
6028
6048
  }),
6029
- ze(Cr)
6049
+ $e(Cr)
6030
6050
  ),
6031
6051
  t
6032
6052
  );
@@ -6039,9 +6059,9 @@ const sx = /* @__PURE__ */ _e(
6039
6059
  ),
6040
6060
  U
6041
6061
  );
6042
- const ee = wt(
6062
+ const ee = St(
6043
6063
  B(
6044
- Qe(I, C),
6064
+ tt(I, C),
6045
6065
  me(([{ items: k }]) => k.length > 0),
6046
6066
  Te(U),
6047
6067
  me(([[k, J], re]) => {
@@ -6049,16 +6069,16 @@ const sx = /* @__PURE__ */ _e(
6049
6069
  return (re || k.bottom > 0 && k.itemHeight > 0 && k.offsetBottom === 0 && k.items.length === J) && ce;
6050
6070
  }),
6051
6071
  oe(([[, k]]) => k - 1),
6052
- ze()
6072
+ $e()
6053
6073
  )
6054
- ), pe = wt(
6074
+ ), pe = St(
6055
6075
  B(
6056
6076
  he(I),
6057
6077
  me(({ items: k }) => k.length > 0 && k[0].index === 0),
6058
- Ut(0),
6059
- ze()
6078
+ Gt(0),
6079
+ $e()
6060
6080
  )
6061
- ), we = wt(
6081
+ ), we = St(
6062
6082
  B(
6063
6083
  he(I),
6064
6084
  Te(F),
@@ -6067,8 +6087,8 @@ const sx = /* @__PURE__ */ _e(
6067
6087
  endIndex: k[k.length - 1].index,
6068
6088
  startIndex: k[0].index
6069
6089
  })),
6070
- ze(Yc),
6071
- Qt(0)
6090
+ $e(Yc),
6091
+ nn(0)
6072
6092
  )
6073
6093
  );
6074
6094
  de(we, x.scrollSeekRangeChanged), de(
@@ -6076,8 +6096,8 @@ const sx = /* @__PURE__ */ _e(
6076
6096
  D,
6077
6097
  Te(j, P, C, _),
6078
6098
  oe(([k, J, re, ce, ie]) => {
6079
- const Oe = Qc(k), { align: ue, behavior: Ae, offset: le } = Oe;
6080
- let fe = Oe.index;
6099
+ const Me = Qc(k), { align: ue, behavior: Ae, offset: le } = Me;
6100
+ let fe = Me.index;
6081
6101
  fe === "LAST" && (fe = ce - 1), fe = gr(0, fe, ks(ce - 1, fe));
6082
6102
  let ke = li(J, ie, re, fe);
6083
6103
  return ue === "end" ? ke = Sl(ke - J.height + re.height) : ue === "center" && (ke = Sl(ke - J.height / 2 + re.height / 2)), le && (ke += le), { behavior: Ae, top: ke };
@@ -6085,7 +6105,7 @@ const sx = /* @__PURE__ */ _e(
6085
6105
  ),
6086
6106
  c
6087
6107
  );
6088
- const X = it(
6108
+ const X = ut(
6089
6109
  B(
6090
6110
  I,
6091
6111
  oe((k) => k.offsetBottom + k.bottom)
@@ -6140,7 +6160,7 @@ const sx = /* @__PURE__ */ _e(
6140
6160
  ...S
6141
6161
  };
6142
6162
  },
6143
- Ue(Ui, ut, Br, su, mn, Wi, hn)
6163
+ ze(Ui, pt, Br, su, mn, Wi, hn)
6144
6164
  );
6145
6165
  function gu(e, t, n) {
6146
6166
  return gr(1, Io((e + n) / (Io(t) + n)));
@@ -6156,12 +6176,12 @@ function li(e, t, n, r) {
6156
6176
  const o = gu(e.width, n.width, t.column), s = Io(r / o), i = s * n.height + gr(0, s - 1) * t.row;
6157
6177
  return i > 0 ? i + t.row : i;
6158
6178
  }
6159
- const ix = /* @__PURE__ */ _e(() => {
6160
- const e = K((p) => `Item ${p}`), t = K({}), n = K(null), r = K("virtuoso-grid-item"), o = K("virtuoso-grid-list"), s = K(Gi), i = K("div"), a = K(tr), c = (p, h = null) => it(
6179
+ const ix = /* @__PURE__ */ Oe(() => {
6180
+ const e = K((p) => `Item ${p}`), t = K({}), n = K(null), r = K("virtuoso-grid-item"), o = K("virtuoso-grid-list"), s = K(Gi), i = K("div"), a = K(tr), c = (p, h = null) => ut(
6161
6181
  B(
6162
6182
  t,
6163
6183
  oe((x) => x[p]),
6164
- ze()
6184
+ $e()
6165
6185
  ),
6166
6186
  h
6167
6187
  ), u = K(!1), d = K(!1);
@@ -6183,11 +6203,11 @@ const ix = /* @__PURE__ */ _e(() => {
6183
6203
  scrollerRef: a,
6184
6204
  ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
6185
6205
  };
6186
- }), ax = /* @__PURE__ */ _e(
6206
+ }), ax = /* @__PURE__ */ Oe(
6187
6207
  ([e, t]) => ({ ...e, ...t }),
6188
- Ue(sx, ix)
6208
+ ze(sx, ix)
6189
6209
  ), lx = /* @__PURE__ */ Y.memo(function() {
6190
- const e = We("gridState"), t = We("listClassName"), n = We("itemClassName"), r = We("itemContent"), o = We("computeItemKey"), s = We("isSeeking"), i = Et("scrollHeight"), a = We("ItemComponent"), c = We("ListComponent"), u = We("ScrollSeekPlaceholder"), d = We("context"), p = Et("itemDimensions"), h = Et("gap"), x = We("log"), m = We("stateRestoreInProgress"), v = Et("reportReadyState"), g = jn(
6210
+ const e = Ue("gridState"), t = Ue("listClassName"), n = Ue("itemClassName"), r = Ue("itemContent"), o = Ue("computeItemKey"), s = Ue("isSeeking"), i = Nt("scrollHeight"), a = Ue("ItemComponent"), c = Ue("ListComponent"), u = Ue("ScrollSeekPlaceholder"), d = Ue("context"), p = Nt("itemDimensions"), h = Nt("gap"), x = Ue("log"), m = Ue("stateRestoreInProgress"), v = Nt("reportReadyState"), g = jn(
6191
6211
  Y.useMemo(
6192
6212
  () => (w) => {
6193
6213
  const b = w.parentElement.parentElement.scrollHeight;
@@ -6214,7 +6234,7 @@ const ix = /* @__PURE__ */ _e(() => {
6214
6234
  {
6215
6235
  className: t,
6216
6236
  ref: g,
6217
- ...st(c, d),
6237
+ ...ct(c, d),
6218
6238
  "data-testid": "virtuoso-item-list",
6219
6239
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
6220
6240
  children: e.items.map((w) => {
@@ -6222,7 +6242,7 @@ const ix = /* @__PURE__ */ _e(() => {
6222
6242
  return s ? /* @__PURE__ */ l.jsx(
6223
6243
  u,
6224
6244
  {
6225
- ...st(u, d),
6245
+ ...ct(u, d),
6226
6246
  height: e.itemHeight,
6227
6247
  index: w.index,
6228
6248
  width: e.itemWidth
@@ -6231,7 +6251,7 @@ const ix = /* @__PURE__ */ _e(() => {
6231
6251
  ) : /* @__PURE__ */ no(
6232
6252
  a,
6233
6253
  {
6234
- ...st(a, d),
6254
+ ...ct(a, d),
6235
6255
  className: n,
6236
6256
  "data-index": w.index,
6237
6257
  key: b
@@ -6242,7 +6262,7 @@ const ix = /* @__PURE__ */ _e(() => {
6242
6262
  }
6243
6263
  );
6244
6264
  }), cx = Y.memo(function() {
6245
- const e = We("HeaderComponent"), t = Et("headerHeight"), n = We("headerFooterTag"), r = jn(
6265
+ const e = Ue("HeaderComponent"), t = Nt("headerHeight"), n = Ue("headerFooterTag"), r = jn(
6246
6266
  Y.useMemo(
6247
6267
  () => (s) => {
6248
6268
  t(cn(s, "height"));
@@ -6251,10 +6271,10 @@ const ix = /* @__PURE__ */ _e(() => {
6251
6271
  ),
6252
6272
  !0,
6253
6273
  !1
6254
- ), o = We("context");
6255
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...st(e, o) }) }) : null;
6274
+ ), o = Ue("context");
6275
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
6256
6276
  }), ux = Y.memo(function() {
6257
- const e = We("FooterComponent"), t = Et("footerHeight"), n = We("headerFooterTag"), r = jn(
6277
+ const e = Ue("FooterComponent"), t = Nt("footerHeight"), n = Ue("headerFooterTag"), r = jn(
6258
6278
  Y.useMemo(
6259
6279
  () => (s) => {
6260
6280
  t(cn(s, "height"));
@@ -6263,10 +6283,10 @@ const ix = /* @__PURE__ */ _e(() => {
6263
6283
  ),
6264
6284
  !0,
6265
6285
  !1
6266
- ), o = We("context");
6267
- return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...st(e, o) }) }) : null;
6286
+ ), o = Ue("context");
6287
+ return e ? /* @__PURE__ */ l.jsx(n, { ref: r, children: /* @__PURE__ */ l.jsx(e, { ...ct(e, o) }) }) : null;
6268
6288
  }), dx = ({ children: e }) => {
6269
- const t = Y.useContext(uu), n = Et("itemDimensions"), r = Et("viewportDimensions"), o = jn(
6289
+ const t = Y.useContext(uu), n = Nt("itemDimensions"), r = Nt("viewportDimensions"), o = jn(
6270
6290
  Y.useMemo(
6271
6291
  () => (s) => {
6272
6292
  r(s.getBoundingClientRect());
@@ -6280,21 +6300,21 @@ const ix = /* @__PURE__ */ _e(() => {
6280
6300
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
6281
6301
  }, [t, r, n]), /* @__PURE__ */ l.jsx("div", { ref: o, style: Xo(!1), children: e });
6282
6302
  }, fx = ({ children: e }) => {
6283
- const t = Y.useContext(uu), n = Et("windowViewportRect"), r = Et("itemDimensions"), o = We("customScrollParent"), s = zc(n, o, !1);
6303
+ const t = Y.useContext(uu), n = Nt("windowViewportRect"), r = Nt("itemDimensions"), o = Ue("customScrollParent"), s = zc(n, o, !1);
6284
6304
  return Y.useEffect(() => {
6285
6305
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
6286
6306
  }, [t, n, r]), /* @__PURE__ */ l.jsx("div", { ref: s, style: Xo(!1), children: e });
6287
6307
  }, px = /* @__PURE__ */ Y.memo(function({ ...e }) {
6288
- const t = We("useWindowScroll"), n = We("customScrollParent"), r = n || t ? mx : hx, o = n || t ? fx : dx, s = We("context");
6289
- return /* @__PURE__ */ l.jsx(r, { ...e, ...st(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
6308
+ const t = Ue("useWindowScroll"), n = Ue("customScrollParent"), r = n || t ? mx : hx, o = n || t ? fx : dx, s = Ue("context");
6309
+ return /* @__PURE__ */ l.jsx(r, { ...e, ...ct(r, s), children: /* @__PURE__ */ l.jsxs(o, { children: [
6290
6310
  /* @__PURE__ */ l.jsx(cx, {}),
6291
6311
  /* @__PURE__ */ l.jsx(lx, {}),
6292
6312
  /* @__PURE__ */ l.jsx(ux, {})
6293
6313
  ] }) });
6294
6314
  }), {
6295
6315
  useEmitter: vu,
6296
- useEmitterValue: We,
6297
- usePublisher: Et
6316
+ useEmitterValue: Ue,
6317
+ usePublisher: Nt
6298
6318
  } = /* @__PURE__ */ lu(
6299
6319
  ax,
6300
6320
  {
@@ -6336,9 +6356,9 @@ const ix = /* @__PURE__ */ _e(() => {
6336
6356
  }
6337
6357
  },
6338
6358
  px
6339
- ), hx = /* @__PURE__ */ hu({ useEmitter: vu, useEmitterValue: We, usePublisher: Et }), mx = /* @__PURE__ */ mu({ useEmitter: vu, useEmitterValue: We, usePublisher: Et });
6359
+ ), hx = /* @__PURE__ */ hu({ useEmitter: vu, useEmitterValue: Ue, usePublisher: Nt }), mx = /* @__PURE__ */ mu({ useEmitter: vu, useEmitterValue: Ue, usePublisher: Nt });
6340
6360
  function El(e, t, n) {
6341
- return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, mt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
6361
+ return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, vt.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
6342
6362
  }
6343
6363
  function L(...e) {
6344
6364
  return Kh(Gh(e));
@@ -6524,7 +6544,7 @@ function wx(e, t) {
6524
6544
  }
6525
6545
  return [r, o];
6526
6546
  }
6527
- function Bt(e, t = []) {
6547
+ function Ut(e, t = []) {
6528
6548
  let n = [];
6529
6549
  function r(s, i) {
6530
6550
  const a = f.createContext(i), c = n.length;
@@ -6574,8 +6594,8 @@ function yx(...e) {
6574
6594
  };
6575
6595
  return n.scopeName = t.scopeName, n;
6576
6596
  }
6577
- var nt = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
6578
- }, Sx = f[" useInsertionEffect ".trim().toString()] || nt;
6597
+ var ot = globalThis != null && globalThis.document ? f.useLayoutEffect : () => {
6598
+ }, Sx = f[" useInsertionEffect ".trim().toString()] || ot;
6579
6599
  function un({
6580
6600
  prop: e,
6581
6601
  defaultProp: t,
@@ -6679,11 +6699,11 @@ function wu(e, t) {
6679
6699
  function Rx(e, t) {
6680
6700
  return f.useReducer((n, r) => t[n][r] ?? n, e);
6681
6701
  }
6682
- var gt = (e) => {
6702
+ var xt = (e) => {
6683
6703
  const { present: t, children: n } = e, r = Ix(t), o = typeof n == "function" ? n({ present: r.isPresent }) : f.Children.only(n), s = Re(r.ref, Nx(o));
6684
6704
  return typeof n == "function" || r.isPresent ? f.cloneElement(o, { ref: s }) : null;
6685
6705
  };
6686
- gt.displayName = "Presence";
6706
+ xt.displayName = "Presence";
6687
6707
  function Ix(e) {
6688
6708
  const [t, n] = f.useState(), r = f.useRef(null), o = f.useRef(e), s = f.useRef("none"), i = e ? "mounted" : "unmounted", [a, c] = Rx(i, {
6689
6709
  mounted: {
@@ -6701,13 +6721,13 @@ function Ix(e) {
6701
6721
  return f.useEffect(() => {
6702
6722
  const u = Xr(r.current);
6703
6723
  s.current = a === "mounted" ? u : "none";
6704
- }, [a]), nt(() => {
6724
+ }, [a]), ot(() => {
6705
6725
  const u = r.current, d = o.current;
6706
6726
  if (d !== e) {
6707
6727
  const h = s.current, x = Xr(u);
6708
6728
  e ? c("MOUNT") : x === "none" || (u == null ? void 0 : u.display) === "none" ? c("UNMOUNT") : c(d && h !== x ? "ANIMATION_OUT" : "UNMOUNT"), o.current = e;
6709
6729
  }
6710
- }, [e, c]), nt(() => {
6730
+ }, [e, c]), ot(() => {
6711
6731
  if (t) {
6712
6732
  let u;
6713
6733
  const d = t.ownerDocument.defaultView ?? window, p = (x) => {
@@ -6743,13 +6763,13 @@ function Nx(e) {
6743
6763
  }
6744
6764
  var Ax = f[" useId ".trim().toString()] || (() => {
6745
6765
  }), jx = 0;
6746
- function Ot(e) {
6766
+ function Ft(e) {
6747
6767
  const [t, n] = f.useState(Ax());
6748
- return nt(() => {
6768
+ return ot(() => {
6749
6769
  n((r) => r ?? String(jx++));
6750
6770
  }, [e]), e || (t ? `radix-${t}` : "");
6751
6771
  }
6752
- var qo = "Collapsible", [Px, BT] = Bt(qo), [kx, Xi] = Px(qo), yu = f.forwardRef(
6772
+ var qo = "Collapsible", [Px, BT] = Ut(qo), [kx, Xi] = Px(qo), yu = f.forwardRef(
6753
6773
  (e, t) => {
6754
6774
  const {
6755
6775
  __scopeCollapsible: n,
@@ -6769,7 +6789,7 @@ var qo = "Collapsible", [Px, BT] = Bt(qo), [kx, Xi] = Px(qo), yu = f.forwardRef(
6769
6789
  {
6770
6790
  scope: n,
6771
6791
  disabled: s,
6772
- contentId: Ot(),
6792
+ contentId: Ft(),
6773
6793
  open: c,
6774
6794
  onOpenToggle: f.useCallback(() => u((d) => !d), [u]),
6775
6795
  children: /* @__PURE__ */ l.jsx(
@@ -6809,7 +6829,7 @@ Cu.displayName = Su;
6809
6829
  var qi = "CollapsibleContent", _x = f.forwardRef(
6810
6830
  (e, t) => {
6811
6831
  const { forceMount: n, ...r } = e, o = Xi(qi, e.__scopeCollapsible);
6812
- return /* @__PURE__ */ l.jsx(gt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(Ox, { ...r, ref: t, present: s }) });
6832
+ return /* @__PURE__ */ l.jsx(xt, { present: n || o.open, children: ({ present: s }) => /* @__PURE__ */ l.jsx(Ox, { ...r, ref: t, present: s }) });
6813
6833
  }
6814
6834
  );
6815
6835
  _x.displayName = qi;
@@ -6818,7 +6838,7 @@ var Ox = f.forwardRef((e, t) => {
6818
6838
  return f.useEffect(() => {
6819
6839
  const b = requestAnimationFrame(() => g.current = !1);
6820
6840
  return () => cancelAnimationFrame(b);
6821
- }, []), nt(() => {
6841
+ }, []), ot(() => {
6822
6842
  const b = u.current;
6823
6843
  if (b) {
6824
6844
  w.current = w.current || {
@@ -6912,7 +6932,7 @@ function Lx(e) {
6912
6932
  }
6913
6933
  function qr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx("div", { "aria-busy": !0, children: "Rendering…" }) }) {
6914
6934
  const r = Lx(e), [o, s] = be(() => ur.get(r) ?? null);
6915
- Ze(() => {
6935
+ et(() => {
6916
6936
  if (ur.has(r)) {
6917
6937
  const m = ur.get(r) ?? null;
6918
6938
  s(m);
@@ -6989,7 +7009,7 @@ function qr({ content: e, className: t = "", fallback: n = /* @__PURE__ */ l.jsx
6989
7009
  }, [o]), o ? /* @__PURE__ */ l.jsx("div", { ref: i, className: L("markdown prose max-w-none break-words dark:prose-invert", t), dangerouslySetInnerHTML: { __html: o } }) : /* @__PURE__ */ l.jsx("div", { className: L("markdown prose max-w-none break-words dark:prose-invert", t), children: n });
6990
7010
  }
6991
7011
  async function Tu(e, t) {
6992
- return await Pt(e, {
7012
+ return await Mt(e, {
6993
7013
  responseType: "blob",
6994
7014
  onDownloadProgress: (r) => {
6995
7015
  try {
@@ -7012,7 +7032,7 @@ async function Fx(e, t) {
7012
7032
  const n = await Tu(`/chat/files/${e}/download`, t), r = URL.createObjectURL(n);
7013
7033
  let o = `file_${e}`;
7014
7034
  try {
7015
- const i = await Pt(`/chat/files/${e}`);
7035
+ const i = await Mt(`/chat/files/${e}`);
7016
7036
  o = (i == null ? void 0 : i.filename) ?? o;
7017
7037
  } catch {
7018
7038
  }
@@ -7113,7 +7133,7 @@ function Eu() {
7113
7133
  const fo = "prose prose-sm max-w-none break-words dark:prose-invert prose-headings:break-words prose-p:break-words prose-li:break-words prose-td:break-words prose-th:break-words prose-a:break-all prose-code:break-words prose-blockquote:break-words";
7114
7134
  function Wx({ className: e }) {
7115
7135
  const [t, n] = be(0);
7116
- return Ze(() => {
7136
+ return et(() => {
7117
7137
  const r = setInterval(() => n((o) => (o + 1) % 4), 500);
7118
7138
  return () => clearInterval(r);
7119
7139
  }, []), /* @__PURE__ */ l.jsxs(
@@ -7183,10 +7203,10 @@ const Vx = Y.memo(function({
7183
7203
  if (G[le]) return;
7184
7204
  N((ye) => ({ ...ye, [le]: !0 }));
7185
7205
  try {
7186
- const ye = H({ title: te === "download" ? "Downloading file..." : "Opening file...", description: "", open: !0 }), Me = (tt) => {
7187
- ye.update({ id: ye.id, description: `Progress: ${(tt * 100).toFixed(0)}%` });
7206
+ const ye = H({ title: te === "download" ? "Downloading file..." : "Opening file...", description: "", open: !0 }), _e = (Ge) => {
7207
+ ye.update({ id: ye.id, description: `Progress: ${(Ge * 100).toFixed(0)}%` });
7188
7208
  };
7189
- te === "download" ? await Fx(W, Me) : await jl(W, Me), ye.update({ id: ye.id, title: "Done", description: void 0 });
7209
+ te === "download" ? await Fx(W, _e) : await jl(W, _e), ye.update({ id: ye.id, title: "Done", description: void 0 });
7190
7210
  } catch (ye) {
7191
7211
  console.error("Failed to fetch server file:", ye), H({ title: "Failed to fetch file", description: String(ye), open: !0 });
7192
7212
  } finally {
@@ -7198,21 +7218,21 @@ const Vx = Y.memo(function({
7198
7218
  }
7199
7219
  if (fe.startsWith("data:")) {
7200
7220
  if (ue.preventDefault(), G[le]) return;
7201
- N((Me) => ({ ...Me, [le]: !0 }));
7221
+ N((_e) => ({ ..._e, [le]: !0 }));
7202
7222
  const W = fe.split(",")[1] ?? "";
7203
7223
  let te = Ae.mimeType ?? "application/octet-stream";
7204
7224
  const ye = fe.substring(5, fe.indexOf(","));
7205
7225
  ye && ye.includes(";") ? te = ye.split(";")[0] || te : ye && !ye.includes(";") && (te = ye || te);
7206
7226
  try {
7207
- const Me = H({ title: "Uploading file...", description: "", open: !0 }), tt = await ln.uploadFile(W, Ae.name ?? "file", te, D ?? void 0);
7208
- if (tt && tt.id) {
7209
- const $e = tt.id;
7210
- await jl($e, (Ve) => Me.update({ id: Me.id, description: `Progress: ${(Ve * 100).toFixed(0)}%` })), Me.update({ id: Me.id, title: "Done", description: void 0 });
7227
+ const _e = H({ title: "Uploading file...", description: "", open: !0 }), Ge = await ln.uploadFile(W, Ae.name ?? "file", te, D ?? void 0);
7228
+ if (Ge && Ge.id) {
7229
+ const nt = Ge.id;
7230
+ await jl(nt, (Ke) => _e.update({ id: _e.id, description: `Progress: ${(Ke * 100).toFixed(0)}%` })), _e.update({ id: _e.id, title: "Done", description: void 0 });
7211
7231
  }
7212
- } catch (Me) {
7213
- console.error("Failed to upload file for viewing:", Me), H({ title: "Failed to upload file", description: String(Me), open: !0 });
7232
+ } catch (_e) {
7233
+ console.error("Failed to upload file for viewing:", _e), H({ title: "Failed to upload file", description: String(_e), open: !0 });
7214
7234
  } finally {
7215
- N((Me) => ({ ...Me, [le]: !1 }));
7235
+ N((_e) => ({ ..._e, [le]: !1 }));
7216
7236
  }
7217
7237
  }
7218
7238
  } finally {
@@ -7399,7 +7419,7 @@ const Vx = Y.memo(function({
7399
7419
  );
7400
7420
  }) })
7401
7421
  ] });
7402
- }, Oe = wn(() => Zx(t), [t]);
7422
+ }, Me = wn(() => Zx(t), [t]);
7403
7423
  return /* @__PURE__ */ l.jsx("div", { className: L(J(), m.container), children: /* @__PURE__ */ l.jsxs("div", { className: L(re(), m.content), children: [
7404
7424
  (a || c || V) && /* @__PURE__ */ l.jsxs(
7405
7425
  "div",
@@ -7413,7 +7433,7 @@ const Vx = Y.memo(function({
7413
7433
  children: [
7414
7434
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center gap-2", children: [
7415
7435
  k(),
7416
- c && Oe && /* @__PURE__ */ l.jsx("span", { className: L("font-medium", _ ? "text-xs" : "text-sm"), children: Oe }),
7436
+ c && Me && /* @__PURE__ */ l.jsx("span", { className: L("font-medium", _ ? "text-xs" : "text-sm"), children: Me }),
7417
7437
  V && z.name && /* @__PURE__ */ l.jsxs(
7418
7438
  bu,
7419
7439
  {
@@ -7683,7 +7703,7 @@ function Zx(e) {
7683
7703
  }
7684
7704
  function Qx(e, t) {
7685
7705
  const [n, r] = be(e);
7686
- return Ze(() => {
7706
+ return et(() => {
7687
7707
  if (!t) {
7688
7708
  r(e);
7689
7709
  return;
@@ -7823,7 +7843,7 @@ function sb(e) {
7823
7843
  return typeof e == "string" ? t = e : typeof e == "object" && e !== null ? t = JSON.stringify(e) : t = String(e), ob(t), rb(t);
7824
7844
  }
7825
7845
  function Zi(e) {
7826
- const t = e + "CollectionProvider", [n, r] = Bt(t), [o, s] = n(
7846
+ const t = e + "CollectionProvider", [n, r] = Ut(t), [o, s] = n(
7827
7847
  t,
7828
7848
  { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
7829
7849
  ), i = (v) => {
@@ -7867,7 +7887,7 @@ function Jo(e) {
7867
7887
  const t = f.useContext(ib);
7868
7888
  return e || t || "ltr";
7869
7889
  }
7870
- function rt(e) {
7890
+ function st(e) {
7871
7891
  const t = f.useRef(e);
7872
7892
  return f.useEffect(() => {
7873
7893
  t.current = e;
@@ -7877,7 +7897,7 @@ function rt(e) {
7877
7897
  }, []);
7878
7898
  }
7879
7899
  function ab(e, t = globalThis == null ? void 0 : globalThis.document) {
7880
- const n = rt(e);
7900
+ const n = st(e);
7881
7901
  f.useEffect(() => {
7882
7902
  const r = (o) => {
7883
7903
  o.key === "Escape" && n(o);
@@ -7950,7 +7970,7 @@ var db = "DismissableLayerBranch", fb = f.forwardRef((e, t) => {
7950
7970
  });
7951
7971
  fb.displayName = db;
7952
7972
  function pb(e, t = globalThis == null ? void 0 : globalThis.document) {
7953
- const n = rt(e), r = f.useRef(!1), o = f.useRef(() => {
7973
+ const n = st(e), r = f.useRef(!1), o = f.useRef(() => {
7954
7974
  });
7955
7975
  return f.useEffect(() => {
7956
7976
  const s = (a) => {
@@ -7980,7 +8000,7 @@ function pb(e, t = globalThis == null ? void 0 : globalThis.document) {
7980
8000
  };
7981
8001
  }
7982
8002
  function hb(e, t = globalThis == null ? void 0 : globalThis.document) {
7983
- const n = rt(e), r = f.useRef(!1);
8003
+ const n = st(e), r = f.useRef(!1);
7984
8004
  return f.useEffect(() => {
7985
8005
  const o = (s) => {
7986
8006
  s.target && !r.current && Au(ub, n, { originalEvent: s }, {
@@ -8021,7 +8041,7 @@ var Ls = "focusScope.autoFocusOnMount", Fs = "focusScope.autoFocusOnUnmount", Dl
8021
8041
  onMountAutoFocus: o,
8022
8042
  onUnmountAutoFocus: s,
8023
8043
  ...i
8024
- } = e, [a, c] = f.useState(null), u = rt(o), d = rt(s), p = f.useRef(null), h = Re(t, (v) => c(v)), x = f.useRef({
8044
+ } = e, [a, c] = f.useState(null), u = st(o), d = st(s), p = f.useRef(null), h = Re(t, (v) => c(v)), x = f.useRef({
8025
8045
  paused: !1,
8026
8046
  pause() {
8027
8047
  this.paused = !0;
@@ -8143,7 +8163,7 @@ function Bl(e, t) {
8143
8163
  function yb(e) {
8144
8164
  return e.filter((t) => t.tagName !== "A");
8145
8165
  }
8146
- const Sb = ["top", "right", "bottom", "left"], dn = Math.min, xt = Math.max, Ao = Math.round, Jr = Math.floor, Kt = (e) => ({
8166
+ const Sb = ["top", "right", "bottom", "left"], dn = Math.min, wt = Math.max, Ao = Math.round, Jr = Math.floor, qt = (e) => ({
8147
8167
  x: e,
8148
8168
  y: e
8149
8169
  }), Cb = {
@@ -8156,12 +8176,12 @@ const Sb = ["top", "right", "bottom", "left"], dn = Math.min, xt = Math.max, Ao
8156
8176
  end: "start"
8157
8177
  };
8158
8178
  function pi(e, t, n) {
8159
- return xt(e, dn(t, n));
8179
+ return wt(e, dn(t, n));
8160
8180
  }
8161
- function en(e, t) {
8181
+ function rn(e, t) {
8162
8182
  return typeof e == "function" ? e(t) : e;
8163
8183
  }
8164
- function tn(e) {
8184
+ function on(e) {
8165
8185
  return e.split("-")[0];
8166
8186
  }
8167
8187
  function nr(e) {
@@ -8174,11 +8194,11 @@ function ta(e) {
8174
8194
  return e === "y" ? "height" : "width";
8175
8195
  }
8176
8196
  const Eb = /* @__PURE__ */ new Set(["top", "bottom"]);
8177
- function Gt(e) {
8178
- return Eb.has(tn(e)) ? "y" : "x";
8197
+ function Xt(e) {
8198
+ return Eb.has(on(e)) ? "y" : "x";
8179
8199
  }
8180
8200
  function na(e) {
8181
- return ea(Gt(e));
8201
+ return ea(Xt(e));
8182
8202
  }
8183
8203
  function Rb(e, t, n) {
8184
8204
  n === void 0 && (n = !1);
@@ -8208,7 +8228,7 @@ function jb(e, t, n) {
8208
8228
  }
8209
8229
  function Pb(e, t, n, r) {
8210
8230
  const o = nr(e);
8211
- let s = jb(tn(e), n === "start", r);
8231
+ let s = jb(on(e), n === "start", r);
8212
8232
  return o && (s = s.map((i) => i + "-" + o), t && (s = s.concat(s.map(hi)))), s;
8213
8233
  }
8214
8234
  function jo(e) {
@@ -8254,7 +8274,7 @@ function zl(e, t, n) {
8254
8274
  reference: r,
8255
8275
  floating: o
8256
8276
  } = e;
8257
- const s = Gt(t), i = na(t), a = ta(i), c = tn(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, h = r[a] / 2 - o[a] / 2;
8277
+ const s = Xt(t), i = na(t), a = ta(i), c = on(t), u = s === "y", d = r.x + r.width / 2 - o.width / 2, p = r.y + r.height / 2 - o.height / 2, h = r[a] / 2 - o[a] / 2;
8258
8278
  let x;
8259
8279
  switch (c) {
8260
8280
  case "top":
@@ -8374,7 +8394,7 @@ async function Rr(e, t) {
8374
8394
  elementContext: p = "floating",
8375
8395
  altBoundary: h = !1,
8376
8396
  padding: x = 0
8377
- } = en(t, e), m = Pu(x), g = a[h ? p === "floating" ? "reference" : "floating" : p], w = Po(await s.getClippingRect({
8397
+ } = rn(t, e), m = Pu(x), g = a[h ? p === "floating" ? "reference" : "floating" : p], w = Po(await s.getClippingRect({
8378
8398
  element: (n = await (s.isElement == null ? void 0 : s.isElement(g))) == null || n ? g : g.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
8379
8399
  boundary: u,
8380
8400
  rootBoundary: d,
@@ -8418,7 +8438,7 @@ const Ob = (e) => ({
8418
8438
  } = t, {
8419
8439
  element: u,
8420
8440
  padding: d = 0
8421
- } = en(e, t) || {};
8441
+ } = rn(e, t) || {};
8422
8442
  if (u == null)
8423
8443
  return {};
8424
8444
  const p = Pu(d), h = {
@@ -8461,10 +8481,10 @@ const Ob = (e) => ({
8461
8481
  fallbackAxisSideDirection: m = "none",
8462
8482
  flipAlignment: v = !0,
8463
8483
  ...g
8464
- } = en(e, t);
8484
+ } = rn(e, t);
8465
8485
  if ((n = s.arrow) != null && n.alignmentOffset)
8466
8486
  return {};
8467
- const w = tn(o), b = Gt(a), y = tn(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = h || (y || !v ? [jo(a)] : Ib(a)), C = m !== "none";
8487
+ const w = on(o), b = Xt(a), y = on(a) === a, R = await (c.isRTL == null ? void 0 : c.isRTL(u.floating)), S = h || (y || !v ? [jo(a)] : Ib(a)), C = m !== "none";
8468
8488
  !h && C && S.push(...Pb(a, v, m, R));
8469
8489
  const E = [a, ...S], I = await Rr(t, g), j = [];
8470
8490
  let P = ((r = s.flip) == null ? void 0 : r.overflows) || [];
@@ -8478,9 +8498,9 @@ const Ob = (e) => ({
8478
8498
  }], !j.every((N) => N <= 0)) {
8479
8499
  var D, H;
8480
8500
  const N = (((D = s.flip) == null ? void 0 : D.index) || 0) + 1, _ = E[N];
8481
- if (_ && (!(p === "alignment" ? b !== Gt(_) : !1) || // We leave the current main axis only if every placement on that axis
8501
+ if (_ && (!(p === "alignment" ? b !== Xt(_) : !1) || // We leave the current main axis only if every placement on that axis
8482
8502
  // overflows the main axis.
8483
- P.every((F) => Gt(F.placement) === b ? F.overflows[0] > 0 : !0)))
8503
+ P.every((F) => Xt(F.placement) === b ? F.overflows[0] > 0 : !0)))
8484
8504
  return {
8485
8505
  data: {
8486
8506
  index: N,
@@ -8497,7 +8517,7 @@ const Ob = (e) => ({
8497
8517
  var G;
8498
8518
  const V = (G = P.filter((F) => {
8499
8519
  if (C) {
8500
- const O = Gt(F.placement);
8520
+ const O = Xt(F.placement);
8501
8521
  return O === b || // Create a bias to the `y` side axis due to horizontal
8502
8522
  // reading directions favoring greater width.
8503
8523
  O === "y";
@@ -8543,7 +8563,7 @@ const Db = function(e) {
8543
8563
  } = t, {
8544
8564
  strategy: r = "referenceHidden",
8545
8565
  ...o
8546
- } = en(e, t);
8566
+ } = rn(e, t);
8547
8567
  switch (r) {
8548
8568
  case "referenceHidden": {
8549
8569
  const s = await Rr(t, {
@@ -8580,7 +8600,7 @@ async function Lb(e, t) {
8580
8600
  placement: n,
8581
8601
  platform: r,
8582
8602
  elements: o
8583
- } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = tn(n), a = nr(n), c = Gt(n) === "y", u = ku.has(i) ? -1 : 1, d = s && c ? -1 : 1, p = en(t, e);
8603
+ } = e, s = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), i = on(n), a = nr(n), c = Xt(n) === "y", u = ku.has(i) ? -1 : 1, d = s && c ? -1 : 1, p = rn(t, e);
8584
8604
  let {
8585
8605
  mainAxis: h,
8586
8606
  crossAxis: x,
@@ -8649,10 +8669,10 @@ const Fb = function(e) {
8649
8669
  }
8650
8670
  },
8651
8671
  ...c
8652
- } = en(e, t), u = {
8672
+ } = rn(e, t), u = {
8653
8673
  x: n,
8654
8674
  y: r
8655
- }, d = await Rr(t, c), p = Gt(tn(o)), h = ea(p);
8675
+ }, d = await Rr(t, c), p = Xt(on(o)), h = ea(p);
8656
8676
  let x = u[h], m = u[p];
8657
8677
  if (s) {
8658
8678
  const g = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", b = x + d[g], y = x - d[w];
@@ -8694,12 +8714,12 @@ const Fb = function(e) {
8694
8714
  offset: a = 0,
8695
8715
  mainAxis: c = !0,
8696
8716
  crossAxis: u = !0
8697
- } = en(e, t), d = {
8717
+ } = rn(e, t), d = {
8698
8718
  x: n,
8699
8719
  y: r
8700
- }, p = Gt(o), h = ea(p);
8720
+ }, p = Xt(o), h = ea(p);
8701
8721
  let x = d[h], m = d[p];
8702
- const v = en(a, t), g = typeof v == "number" ? {
8722
+ const v = rn(a, t), g = typeof v == "number" ? {
8703
8723
  mainAxis: v,
8704
8724
  crossAxis: 0
8705
8725
  } : {
@@ -8713,7 +8733,7 @@ const Fb = function(e) {
8713
8733
  }
8714
8734
  if (u) {
8715
8735
  var w, b;
8716
- const y = h === "y" ? "width" : "height", R = ku.has(tn(o)), S = s.reference[p] - s.floating[y] + (R && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (R ? 0 : g.crossAxis), C = s.reference[p] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[p]) || 0) - (R ? g.crossAxis : 0);
8736
+ const y = h === "y" ? "width" : "height", R = ku.has(on(o)), S = s.reference[p] - s.floating[y] + (R && ((w = i.offset) == null ? void 0 : w[p]) || 0) + (R ? 0 : g.crossAxis), C = s.reference[p] + s.reference[y] + (R ? 0 : ((b = i.offset) == null ? void 0 : b[p]) || 0) - (R ? g.crossAxis : 0);
8717
8737
  m < S ? m = S : m > C && (m = C);
8718
8738
  }
8719
8739
  return {
@@ -8737,7 +8757,7 @@ const Fb = function(e) {
8737
8757
  apply: c = () => {
8738
8758
  },
8739
8759
  ...u
8740
- } = en(e, t), d = await Rr(t, u), p = tn(o), h = nr(o), x = Gt(o) === "y", {
8760
+ } = rn(e, t), d = await Rr(t, u), p = on(o), h = nr(o), x = Xt(o) === "y", {
8741
8761
  width: m,
8742
8762
  height: v
8743
8763
  } = s.floating;
@@ -8746,8 +8766,8 @@ const Fb = function(e) {
8746
8766
  const b = v - d.top - d.bottom, y = m - d.left - d.right, R = dn(v - d[g], b), S = dn(m - d[w], y), C = !t.middlewareData.shift;
8747
8767
  let E = R, I = S;
8748
8768
  if ((n = t.middlewareData.shift) != null && n.enabled.x && (I = y), (r = t.middlewareData.shift) != null && r.enabled.y && (E = b), C && !h) {
8749
- const P = xt(d.left, 0), D = xt(d.right, 0), H = xt(d.top, 0), G = xt(d.bottom, 0);
8750
- x ? I = m - 2 * (P !== 0 || D !== 0 ? P + D : xt(d.left, d.right)) : E = v - 2 * (H !== 0 || G !== 0 ? H + G : xt(d.top, d.bottom));
8769
+ const P = wt(d.left, 0), D = wt(d.right, 0), H = wt(d.top, 0), G = wt(d.bottom, 0);
8770
+ x ? I = m - 2 * (P !== 0 || D !== 0 ? P + D : wt(d.left, d.right)) : E = v - 2 * (H !== 0 || G !== 0 ? H + G : wt(d.top, d.bottom));
8751
8771
  }
8752
8772
  await c({
8753
8773
  ...t,
@@ -8769,25 +8789,25 @@ function Qo() {
8769
8789
  function rr(e) {
8770
8790
  return _u(e) ? (e.nodeName || "").toLowerCase() : "#document";
8771
8791
  }
8772
- function yt(e) {
8792
+ function Ct(e) {
8773
8793
  var t;
8774
8794
  return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
8775
8795
  }
8776
- function qt(e) {
8796
+ function Qt(e) {
8777
8797
  var t;
8778
8798
  return (t = (_u(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
8779
8799
  }
8780
8800
  function _u(e) {
8781
- return Qo() ? e instanceof Node || e instanceof yt(e).Node : !1;
8801
+ return Qo() ? e instanceof Node || e instanceof Ct(e).Node : !1;
8782
8802
  }
8783
- function Dt(e) {
8784
- return Qo() ? e instanceof Element || e instanceof yt(e).Element : !1;
8803
+ function Ht(e) {
8804
+ return Qo() ? e instanceof Element || e instanceof Ct(e).Element : !1;
8785
8805
  }
8786
- function Yt(e) {
8787
- return Qo() ? e instanceof HTMLElement || e instanceof yt(e).HTMLElement : !1;
8806
+ function Jt(e) {
8807
+ return Qo() ? e instanceof HTMLElement || e instanceof Ct(e).HTMLElement : !1;
8788
8808
  }
8789
8809
  function Vl(e) {
8790
- return !Qo() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof yt(e).ShadowRoot;
8810
+ return !Qo() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof Ct(e).ShadowRoot;
8791
8811
  }
8792
8812
  const zb = /* @__PURE__ */ new Set(["inline", "contents"]);
8793
8813
  function $r(e) {
@@ -8796,7 +8816,7 @@ function $r(e) {
8796
8816
  overflowX: n,
8797
8817
  overflowY: r,
8798
8818
  display: o
8799
- } = Lt(e);
8819
+ } = $t(e);
8800
8820
  return /auto|scroll|overlay|hidden|clip/.test(t + r + n) && !zb.has(o);
8801
8821
  }
8802
8822
  const Ub = /* @__PURE__ */ new Set(["table", "td", "th"]);
@@ -8815,12 +8835,12 @@ function es(e) {
8815
8835
  }
8816
8836
  const Gb = ["transform", "translate", "scale", "rotate", "perspective"], Kb = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Yb = ["paint", "layout", "strict", "content"];
8817
8837
  function ra(e) {
8818
- const t = oa(), n = Dt(e) ? Lt(e) : e;
8838
+ const t = oa(), n = Ht(e) ? $t(e) : e;
8819
8839
  return Gb.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !t && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !t && (n.filter ? n.filter !== "none" : !1) || Kb.some((r) => (n.willChange || "").includes(r)) || Yb.some((r) => (n.contain || "").includes(r));
8820
8840
  }
8821
8841
  function Xb(e) {
8822
8842
  let t = fn(e);
8823
- for (; Yt(t) && !Yn(t); ) {
8843
+ for (; Jt(t) && !Yn(t); ) {
8824
8844
  if (ra(t))
8825
8845
  return t;
8826
8846
  if (es(t))
@@ -8836,11 +8856,11 @@ const qb = /* @__PURE__ */ new Set(["html", "body", "#document"]);
8836
8856
  function Yn(e) {
8837
8857
  return qb.has(rr(e));
8838
8858
  }
8839
- function Lt(e) {
8840
- return yt(e).getComputedStyle(e);
8859
+ function $t(e) {
8860
+ return Ct(e).getComputedStyle(e);
8841
8861
  }
8842
8862
  function ts(e) {
8843
- return Dt(e) ? {
8863
+ return Ht(e) ? {
8844
8864
  scrollLeft: e.scrollLeft,
8845
8865
  scrollTop: e.scrollTop
8846
8866
  } : {
@@ -8856,18 +8876,18 @@ function fn(e) {
8856
8876
  e.assignedSlot || // DOM Element detected.
8857
8877
  e.parentNode || // ShadowRoot detected.
8858
8878
  Vl(e) && e.host || // Fallback.
8859
- qt(e)
8879
+ Qt(e)
8860
8880
  );
8861
8881
  return Vl(t) ? t.host : t;
8862
8882
  }
8863
8883
  function Ou(e) {
8864
8884
  const t = fn(e);
8865
- return Yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Yt(t) && $r(t) ? t : Ou(t);
8885
+ return Yn(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Jt(t) && $r(t) ? t : Ou(t);
8866
8886
  }
8867
8887
  function Ir(e, t, n) {
8868
8888
  var r;
8869
8889
  t === void 0 && (t = []), n === void 0 && (n = !0);
8870
- const o = Ou(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = yt(o);
8890
+ const o = Ou(e), s = o === ((r = e.ownerDocument) == null ? void 0 : r.body), i = Ct(o);
8871
8891
  if (s) {
8872
8892
  const a = mi(i);
8873
8893
  return t.concat(i, i.visualViewport || [], $r(o) ? o : [], a && n ? Ir(a) : []);
@@ -8878,9 +8898,9 @@ function mi(e) {
8878
8898
  return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
8879
8899
  }
8880
8900
  function Mu(e) {
8881
- const t = Lt(e);
8901
+ const t = $t(e);
8882
8902
  let n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0;
8883
- const o = Yt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
8903
+ const o = Jt(e), s = o ? e.offsetWidth : n, i = o ? e.offsetHeight : r, a = Ao(n) !== s || Ao(r) !== i;
8884
8904
  return a && (n = s, r = i), {
8885
8905
  width: n,
8886
8906
  height: r,
@@ -8888,12 +8908,12 @@ function Mu(e) {
8888
8908
  };
8889
8909
  }
8890
8910
  function sa(e) {
8891
- return Dt(e) ? e : e.contextElement;
8911
+ return Ht(e) ? e : e.contextElement;
8892
8912
  }
8893
8913
  function Wn(e) {
8894
8914
  const t = sa(e);
8895
- if (!Yt(t))
8896
- return Kt(1);
8915
+ if (!Jt(t))
8916
+ return qt(1);
8897
8917
  const n = t.getBoundingClientRect(), {
8898
8918
  width: r,
8899
8919
  height: o,
@@ -8905,30 +8925,30 @@ function Wn(e) {
8905
8925
  y: a
8906
8926
  };
8907
8927
  }
8908
- const Jb = /* @__PURE__ */ Kt(0);
8928
+ const Jb = /* @__PURE__ */ qt(0);
8909
8929
  function Du(e) {
8910
- const t = yt(e);
8930
+ const t = Ct(e);
8911
8931
  return !oa() || !t.visualViewport ? Jb : {
8912
8932
  x: t.visualViewport.offsetLeft,
8913
8933
  y: t.visualViewport.offsetTop
8914
8934
  };
8915
8935
  }
8916
8936
  function Zb(e, t, n) {
8917
- return t === void 0 && (t = !1), !n || t && n !== yt(e) ? !1 : t;
8937
+ return t === void 0 && (t = !1), !n || t && n !== Ct(e) ? !1 : t;
8918
8938
  }
8919
8939
  function Rn(e, t, n, r) {
8920
8940
  t === void 0 && (t = !1), n === void 0 && (n = !1);
8921
8941
  const o = e.getBoundingClientRect(), s = sa(e);
8922
- let i = Kt(1);
8923
- t && (r ? Dt(r) && (i = Wn(r)) : i = Wn(e));
8924
- const a = Zb(s, n, r) ? Du(s) : Kt(0);
8942
+ let i = qt(1);
8943
+ t && (r ? Ht(r) && (i = Wn(r)) : i = Wn(e));
8944
+ const a = Zb(s, n, r) ? Du(s) : qt(0);
8925
8945
  let c = (o.left + a.x) / i.x, u = (o.top + a.y) / i.y, d = o.width / i.x, p = o.height / i.y;
8926
8946
  if (s) {
8927
- const h = yt(s), x = r && Dt(r) ? yt(r) : r;
8947
+ const h = Ct(s), x = r && Ht(r) ? Ct(r) : r;
8928
8948
  let m = h, v = mi(m);
8929
8949
  for (; v && r && x !== m; ) {
8930
- const g = Wn(v), w = v.getBoundingClientRect(), b = Lt(v), y = w.left + (v.clientLeft + parseFloat(b.paddingLeft)) * g.x, R = w.top + (v.clientTop + parseFloat(b.paddingTop)) * g.y;
8931
- c *= g.x, u *= g.y, d *= g.x, p *= g.y, c += y, u += R, m = yt(v), v = mi(m);
8950
+ const g = Wn(v), w = v.getBoundingClientRect(), b = $t(v), y = w.left + (v.clientLeft + parseFloat(b.paddingLeft)) * g.x, R = w.top + (v.clientTop + parseFloat(b.paddingTop)) * g.y;
8951
+ c *= g.x, u *= g.y, d *= g.x, p *= g.y, c += y, u += R, m = Ct(v), v = mi(m);
8932
8952
  }
8933
8953
  }
8934
8954
  return Po({
@@ -8940,7 +8960,7 @@ function Rn(e, t, n, r) {
8940
8960
  }
8941
8961
  function ns(e, t) {
8942
8962
  const n = ts(e).scrollLeft;
8943
- return t ? t.left + n : Rn(qt(e)).left + n;
8963
+ return t ? t.left + n : Rn(Qt(e)).left + n;
8944
8964
  }
8945
8965
  function Lu(e, t) {
8946
8966
  const n = e.getBoundingClientRect(), r = n.left + t.scrollLeft - ns(e, n), o = n.top + t.scrollTop;
@@ -8956,19 +8976,19 @@ function Qb(e) {
8956
8976
  offsetParent: r,
8957
8977
  strategy: o
8958
8978
  } = e;
8959
- const s = o === "fixed", i = qt(r), a = t ? es(t.floating) : !1;
8979
+ const s = o === "fixed", i = Qt(r), a = t ? es(t.floating) : !1;
8960
8980
  if (r === i || a && s)
8961
8981
  return n;
8962
8982
  let c = {
8963
8983
  scrollLeft: 0,
8964
8984
  scrollTop: 0
8965
- }, u = Kt(1);
8966
- const d = Kt(0), p = Yt(r);
8967
- if ((p || !p && !s) && ((rr(r) !== "body" || $r(i)) && (c = ts(r)), Yt(r))) {
8985
+ }, u = qt(1);
8986
+ const d = qt(0), p = Jt(r);
8987
+ if ((p || !p && !s) && ((rr(r) !== "body" || $r(i)) && (c = ts(r)), Jt(r))) {
8968
8988
  const x = Rn(r);
8969
8989
  u = Wn(r), d.x = x.x + r.clientLeft, d.y = x.y + r.clientTop;
8970
8990
  }
8971
- const h = i && !p && !s ? Lu(i, c) : Kt(0);
8991
+ const h = i && !p && !s ? Lu(i, c) : qt(0);
8972
8992
  return {
8973
8993
  width: n.width * u.x,
8974
8994
  height: n.height * u.y,
@@ -8980,10 +9000,10 @@ function ew(e) {
8980
9000
  return Array.from(e.getClientRects());
8981
9001
  }
8982
9002
  function tw(e) {
8983
- const t = qt(e), n = ts(e), r = e.ownerDocument.body, o = xt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = xt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
9003
+ const t = Qt(e), n = ts(e), r = e.ownerDocument.body, o = wt(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), s = wt(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
8984
9004
  let i = -n.scrollLeft + ns(e);
8985
9005
  const a = -n.scrollTop;
8986
- return Lt(r).direction === "rtl" && (i += xt(t.clientWidth, r.clientWidth) - o), {
9006
+ return $t(r).direction === "rtl" && (i += wt(t.clientWidth, r.clientWidth) - o), {
8987
9007
  width: o,
8988
9008
  height: s,
8989
9009
  x: i,
@@ -8992,7 +9012,7 @@ function tw(e) {
8992
9012
  }
8993
9013
  const Gl = 25;
8994
9014
  function nw(e, t) {
8995
- const n = yt(e), r = qt(e), o = n.visualViewport;
9015
+ const n = Ct(e), r = Qt(e), o = n.visualViewport;
8996
9016
  let s = r.clientWidth, i = r.clientHeight, a = 0, c = 0;
8997
9017
  if (o) {
8998
9018
  s = o.width, i = o.height;
@@ -9013,7 +9033,7 @@ function nw(e, t) {
9013
9033
  }
9014
9034
  const rw = /* @__PURE__ */ new Set(["absolute", "fixed"]);
9015
9035
  function ow(e, t) {
9016
- const n = Rn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Yt(e) ? Wn(e) : Kt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
9036
+ const n = Rn(e, !0, t === "fixed"), r = n.top + e.clientTop, o = n.left + e.clientLeft, s = Jt(e) ? Wn(e) : qt(1), i = e.clientWidth * s.x, a = e.clientHeight * s.y, c = o * s.x, u = r * s.y;
9017
9037
  return {
9018
9038
  width: i,
9019
9039
  height: a,
@@ -9026,8 +9046,8 @@ function Kl(e, t, n) {
9026
9046
  if (t === "viewport")
9027
9047
  r = nw(e, n);
9028
9048
  else if (t === "document")
9029
- r = tw(qt(e));
9030
- else if (Dt(t))
9049
+ r = tw(Qt(e));
9050
+ else if (Ht(t))
9031
9051
  r = ow(t, n);
9032
9052
  else {
9033
9053
  const o = Du(e);
@@ -9042,17 +9062,17 @@ function Kl(e, t, n) {
9042
9062
  }
9043
9063
  function Fu(e, t) {
9044
9064
  const n = fn(e);
9045
- return n === t || !Dt(n) || Yn(n) ? !1 : Lt(n).position === "fixed" || Fu(n, t);
9065
+ return n === t || !Ht(n) || Yn(n) ? !1 : $t(n).position === "fixed" || Fu(n, t);
9046
9066
  }
9047
9067
  function sw(e, t) {
9048
9068
  const n = t.get(e);
9049
9069
  if (n)
9050
9070
  return n;
9051
- let r = Ir(e, [], !1).filter((a) => Dt(a) && rr(a) !== "body"), o = null;
9052
- const s = Lt(e).position === "fixed";
9071
+ let r = Ir(e, [], !1).filter((a) => Ht(a) && rr(a) !== "body"), o = null;
9072
+ const s = $t(e).position === "fixed";
9053
9073
  let i = s ? fn(e) : e;
9054
- for (; Dt(i) && !Yn(i); ) {
9055
- const a = Lt(i), c = ra(i);
9074
+ for (; Ht(i) && !Yn(i); ) {
9075
+ const a = $t(i), c = ra(i);
9056
9076
  !c && a.position === "fixed" && (o = null), (s ? !c && !o : !c && a.position === "static" && !!o && rw.has(o.position) || $r(i) && !c && Fu(e, i)) ? r = r.filter((d) => d !== i) : o = a, i = fn(i);
9057
9077
  }
9058
9078
  return t.set(e, r), r;
@@ -9066,7 +9086,7 @@ function iw(e) {
9066
9086
  } = e;
9067
9087
  const i = [...n === "clippingAncestors" ? es(t) ? [] : sw(t, this._c) : [].concat(n), r], a = i[0], c = i.reduce((u, d) => {
9068
9088
  const p = Kl(t, d, o);
9069
- return u.top = xt(p.top, u.top), u.right = dn(p.right, u.right), u.bottom = dn(p.bottom, u.bottom), u.left = xt(p.left, u.left), u;
9089
+ return u.top = wt(p.top, u.top), u.right = dn(p.right, u.right), u.bottom = dn(p.bottom, u.bottom), u.left = wt(p.left, u.left), u;
9070
9090
  }, Kl(t, a, o));
9071
9091
  return {
9072
9092
  width: c.right - c.left,
@@ -9086,12 +9106,12 @@ function aw(e) {
9086
9106
  };
9087
9107
  }
9088
9108
  function lw(e, t, n) {
9089
- const r = Yt(t), o = qt(t), s = n === "fixed", i = Rn(e, !0, s, t);
9109
+ const r = Jt(t), o = Qt(t), s = n === "fixed", i = Rn(e, !0, s, t);
9090
9110
  let a = {
9091
9111
  scrollLeft: 0,
9092
9112
  scrollTop: 0
9093
9113
  };
9094
- const c = Kt(0);
9114
+ const c = qt(0);
9095
9115
  function u() {
9096
9116
  c.x = ns(o);
9097
9117
  }
@@ -9101,7 +9121,7 @@ function lw(e, t, n) {
9101
9121
  c.x = x.x + t.clientLeft, c.y = x.y + t.clientTop;
9102
9122
  } else o && u();
9103
9123
  s && !r && o && u();
9104
- const d = o && !r && !s ? Lu(o, a) : Kt(0), p = i.left + a.scrollLeft - c.x - d.x, h = i.top + a.scrollTop - c.y - d.y;
9124
+ const d = o && !r && !s ? Lu(o, a) : qt(0), p = i.left + a.scrollLeft - c.x - d.x, h = i.top + a.scrollTop - c.y - d.y;
9105
9125
  return {
9106
9126
  x: p,
9107
9127
  y: h,
@@ -9110,24 +9130,24 @@ function lw(e, t, n) {
9110
9130
  };
9111
9131
  }
9112
9132
  function Bs(e) {
9113
- return Lt(e).position === "static";
9133
+ return $t(e).position === "static";
9114
9134
  }
9115
9135
  function Yl(e, t) {
9116
- if (!Yt(e) || Lt(e).position === "fixed")
9136
+ if (!Jt(e) || $t(e).position === "fixed")
9117
9137
  return null;
9118
9138
  if (t)
9119
9139
  return t(e);
9120
9140
  let n = e.offsetParent;
9121
- return qt(e) === n && (n = n.ownerDocument.body), n;
9141
+ return Qt(e) === n && (n = n.ownerDocument.body), n;
9122
9142
  }
9123
9143
  function Bu(e, t) {
9124
- const n = yt(e);
9144
+ const n = Ct(e);
9125
9145
  if (es(e))
9126
9146
  return n;
9127
- if (!Yt(e)) {
9147
+ if (!Jt(e)) {
9128
9148
  let o = fn(e);
9129
9149
  for (; o && !Yn(o); ) {
9130
- if (Dt(o) && !Bs(o))
9150
+ if (Ht(o) && !Bs(o))
9131
9151
  return o;
9132
9152
  o = fn(o);
9133
9153
  }
@@ -9151,18 +9171,18 @@ const cw = async function(e) {
9151
9171
  };
9152
9172
  };
9153
9173
  function uw(e) {
9154
- return Lt(e).direction === "rtl";
9174
+ return $t(e).direction === "rtl";
9155
9175
  }
9156
9176
  const dw = {
9157
9177
  convertOffsetParentRelativeRectToViewportRelativeRect: Qb,
9158
- getDocumentElement: qt,
9178
+ getDocumentElement: Qt,
9159
9179
  getClippingRect: iw,
9160
9180
  getOffsetParent: Bu,
9161
9181
  getElementRects: cw,
9162
9182
  getClientRects: ew,
9163
9183
  getDimensions: aw,
9164
9184
  getScale: Wn,
9165
- isElement: Dt,
9185
+ isElement: Ht,
9166
9186
  isRTL: uw
9167
9187
  };
9168
9188
  function Hu(e, t) {
@@ -9170,7 +9190,7 @@ function Hu(e, t) {
9170
9190
  }
9171
9191
  function fw(e, t) {
9172
9192
  let n = null, r;
9173
- const o = qt(e);
9193
+ const o = Qt(e);
9174
9194
  function s() {
9175
9195
  var a;
9176
9196
  clearTimeout(r), (a = n) == null || a.disconnect(), n = null;
@@ -9187,7 +9207,7 @@ function fw(e, t) {
9187
9207
  return;
9188
9208
  const m = Jr(p), v = Jr(o.clientWidth - (d + h)), g = Jr(o.clientHeight - (p + x)), w = Jr(d), y = {
9189
9209
  rootMargin: -m + "px " + -v + "px " + -g + "px " + -w + "px",
9190
- threshold: xt(0, dn(1, c)) || 1
9210
+ threshold: wt(0, dn(1, c)) || 1
9191
9211
  };
9192
9212
  let R = !0;
9193
9213
  function S(C) {
@@ -9472,7 +9492,7 @@ zu.displayName = kw;
9472
9492
  var _w = zu;
9473
9493
  function Uu(e) {
9474
9494
  const [t, n] = f.useState(void 0);
9475
- return nt(() => {
9495
+ return ot(() => {
9476
9496
  if (e) {
9477
9497
  n({ width: e.offsetWidth, height: e.offsetHeight });
9478
9498
  const r = new ResizeObserver((o) => {
@@ -9492,7 +9512,7 @@ function Uu(e) {
9492
9512
  n(void 0);
9493
9513
  }, [e]), t;
9494
9514
  }
9495
- var ia = "Popper", [Wu, or] = Bt(ia), [Ow, Vu] = Wu(ia), Gu = (e) => {
9515
+ var ia = "Popper", [Wu, or] = Ut(ia), [Ow, Vu] = Wu(ia), Gu = (e) => {
9496
9516
  const { __scopePopper: t, children: n } = e, [r, o] = f.useState(null);
9497
9517
  return /* @__PURE__ */ l.jsx(Ow, { scope: t, anchor: r, onAnchorChange: o, children: n });
9498
9518
  };
@@ -9525,7 +9545,7 @@ var aa = "PopperContent", [Mw, Dw] = Wu(aa), Xu = f.forwardRef(
9525
9545
  updatePositionStrategy: x = "optimized",
9526
9546
  onPlaced: m,
9527
9547
  ...v
9528
- } = e, g = Vu(aa, n), [w, b] = f.useState(null), y = Re(t, (Oe) => b(Oe)), [R, S] = f.useState(null), C = Uu(R), E = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, j = r + (s !== "center" ? "-" + s : ""), P = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, D = Array.isArray(u) ? u : [u], H = D.length > 0, G = {
9548
+ } = e, g = Vu(aa, n), [w, b] = f.useState(null), y = Re(t, (Me) => b(Me)), [R, S] = f.useState(null), C = Uu(R), E = (C == null ? void 0 : C.width) ?? 0, I = (C == null ? void 0 : C.height) ?? 0, j = r + (s !== "center" ? "-" + s : ""), P = typeof d == "number" ? d : { top: 0, right: 0, bottom: 0, left: 0, ...d }, D = Array.isArray(u) ? u : [u], H = D.length > 0, G = {
9529
9549
  padding: P,
9530
9550
  boundary: D.filter(Fw),
9531
9551
  // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
@@ -9534,7 +9554,7 @@ var aa = "PopperContent", [Mw, Dw] = Wu(aa), Xu = f.forwardRef(
9534
9554
  // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
9535
9555
  strategy: "fixed",
9536
9556
  placement: j,
9537
- whileElementsMounted: (...Oe) => pw(...Oe, {
9557
+ whileElementsMounted: (...Me) => pw(...Me, {
9538
9558
  animationFrame: x === "always"
9539
9559
  }),
9540
9560
  elements: {
@@ -9551,8 +9571,8 @@ var aa = "PopperContent", [Mw, Dw] = Wu(aa), Xu = f.forwardRef(
9551
9571
  c && Nw({ ...G }),
9552
9572
  Aw({
9553
9573
  ...G,
9554
- apply: ({ elements: Oe, rects: ue, availableWidth: Ae, availableHeight: le }) => {
9555
- const { width: fe, height: ke } = ue.reference, W = Oe.floating.style;
9574
+ apply: ({ elements: Me, rects: ue, availableWidth: Ae, availableHeight: le }) => {
9575
+ const { width: fe, height: ke } = ue.reference, W = Me.floating.style;
9556
9576
  W.setProperty("--radix-popper-available-width", `${Ae}px`), W.setProperty("--radix-popper-available-height", `${le}px`), W.setProperty("--radix-popper-anchor-width", `${fe}px`), W.setProperty("--radix-popper-anchor-height", `${ke}px`);
9557
9577
  }
9558
9578
  }),
@@ -9560,12 +9580,12 @@ var aa = "PopperContent", [Mw, Dw] = Wu(aa), Xu = f.forwardRef(
9560
9580
  Bw({ arrowWidth: E, arrowHeight: I }),
9561
9581
  h && jw({ strategy: "referenceHidden", ...G })
9562
9582
  ]
9563
- }), [O, z] = Zu(M), Q = rt(m);
9564
- nt(() => {
9583
+ }), [O, z] = Zu(M), Q = st(m);
9584
+ ot(() => {
9565
9585
  V && (Q == null || Q());
9566
9586
  }, [V, Q]);
9567
9587
  const ae = (X = F.arrow) == null ? void 0 : X.x, U = (k = F.arrow) == null ? void 0 : k.y, ee = ((J = F.arrow) == null ? void 0 : J.centerOffset) !== 0, [pe, we] = f.useState();
9568
- return nt(() => {
9588
+ return ot(() => {
9569
9589
  w && we(window.getComputedStyle(w).zIndex);
9570
9590
  }, [w]), /* @__PURE__ */ l.jsx(
9571
9591
  "div",
@@ -9693,12 +9713,12 @@ function Zu(e) {
9693
9713
  var la = Gu, ca = Yu, ua = Xu, da = Ju, Hw = "Portal", rs = f.forwardRef((e, t) => {
9694
9714
  var a;
9695
9715
  const { container: n, ...r } = e, [o, s] = f.useState(!1);
9696
- nt(() => s(!0), []);
9716
+ ot(() => s(!0), []);
9697
9717
  const i = n || o && ((a = globalThis == null ? void 0 : globalThis.document) == null ? void 0 : a.body);
9698
9718
  return i ? dc.createPortal(/* @__PURE__ */ l.jsx(ge.div, { ...r, ref: t }), i) : null;
9699
9719
  });
9700
9720
  rs.displayName = Hw;
9701
- var $s = "rovingFocusGroup.onEntryFocus", $w = { bubbles: !1, cancelable: !0 }, zr = "RovingFocusGroup", [gi, Qu, zw] = Zi(zr), [Uw, ed] = Bt(
9721
+ var $s = "rovingFocusGroup.onEntryFocus", $w = { bubbles: !1, cancelable: !0 }, zr = "RovingFocusGroup", [gi, Qu, zw] = Zi(zr), [Uw, ed] = Ut(
9702
9722
  zr,
9703
9723
  [zw]
9704
9724
  ), [Ww, Vw] = Uw(zr), td = f.forwardRef(
@@ -9722,7 +9742,7 @@ var Gw = f.forwardRef((e, t) => {
9722
9742
  defaultProp: a ?? null,
9723
9743
  onChange: c,
9724
9744
  caller: zr
9725
- }), [w, b] = f.useState(!1), y = rt(u), R = Qu(n), S = f.useRef(!1), [C, E] = f.useState(0);
9745
+ }), [w, b] = f.useState(!1), y = st(u), R = Qu(n), S = f.useRef(!1), [C, E] = f.useState(0);
9726
9746
  return f.useEffect(() => {
9727
9747
  const I = h.current;
9728
9748
  if (I)
@@ -9786,7 +9806,7 @@ var Gw = f.forwardRef((e, t) => {
9786
9806
  tabStopId: s,
9787
9807
  children: i,
9788
9808
  ...a
9789
- } = e, c = Ot(), u = s || c, d = Vw(nd, n), p = d.currentTabStopId === u, h = Qu(n), { onFocusableItemAdd: x, onFocusableItemRemove: m, currentTabStopId: v } = d;
9809
+ } = e, c = Ft(), u = s || c, d = Vw(nd, n), p = d.currentTabStopId === u, h = Qu(n), { onFocusableItemAdd: x, onFocusableItemRemove: m, currentTabStopId: v } = d;
9790
9810
  return f.useEffect(() => {
9791
9811
  if (r)
9792
9812
  return x(), () => m();
@@ -9910,14 +9930,14 @@ var Jw = td, Zw = rd, Qw = function(e) {
9910
9930
  return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), ty(r, o, n, "aria-hidden")) : function() {
9911
9931
  return null;
9912
9932
  };
9913
- }, Wt = function() {
9914
- return Wt = Object.assign || function(t) {
9933
+ }, Kt = function() {
9934
+ return Kt = Object.assign || function(t) {
9915
9935
  for (var n, r = 1, o = arguments.length; r < o; r++) {
9916
9936
  n = arguments[r];
9917
9937
  for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
9918
9938
  }
9919
9939
  return t;
9920
- }, Wt.apply(this, arguments);
9940
+ }, Kt.apply(this, arguments);
9921
9941
  };
9922
9942
  function id(e, t) {
9923
9943
  var n = {};
@@ -10038,7 +10058,7 @@ function cy(e, t) {
10038
10058
  function uy(e) {
10039
10059
  e === void 0 && (e = {});
10040
10060
  var t = cy(null);
10041
- return t.options = Wt({ async: !0, ssr: !1 }, e), t;
10061
+ return t.options = Kt({ async: !0, ssr: !1 }, e), t;
10042
10062
  }
10043
10063
  var ad = function(e) {
10044
10064
  var t = e.sideCar, n = id(e, ["sideCar"]);
@@ -10047,7 +10067,7 @@ var ad = function(e) {
10047
10067
  var r = t.read();
10048
10068
  if (!r)
10049
10069
  throw new Error("Sidecar medium not found");
10050
- return f.createElement(r, Wt({}, n));
10070
+ return f.createElement(r, Kt({}, n));
10051
10071
  };
10052
10072
  ad.isSideCarExport = !0;
10053
10073
  function dy(e, t) {
@@ -10059,12 +10079,12 @@ var ld = uy(), Ws = function() {
10059
10079
  onScrollCapture: Ws,
10060
10080
  onWheelCapture: Ws,
10061
10081
  onTouchMoveCapture: Ws
10062
- }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, x = e.noRelative, m = e.noIsolation, v = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, R = id(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = ay([n, t]), E = Wt(Wt({}, R), o);
10082
+ }), o = r[0], s = r[1], i = e.forwardProps, a = e.children, c = e.className, u = e.removeScrollBar, d = e.enabled, p = e.shards, h = e.sideCar, x = e.noRelative, m = e.noIsolation, v = e.inert, g = e.allowPinchZoom, w = e.as, b = w === void 0 ? "div" : w, y = e.gapMode, R = id(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = h, C = ay([n, t]), E = Kt(Kt({}, R), o);
10063
10083
  return f.createElement(
10064
10084
  f.Fragment,
10065
10085
  null,
10066
10086
  d && f.createElement(S, { sideCar: ld, removeScrollBar: u, shards: p, noRelative: x, noIsolation: m, inert: v, setCallbacks: s, allowPinchZoom: !!g, lockRef: n, gapMode: y }),
10067
- i ? f.cloneElement(f.Children.only(a), Wt(Wt({}, E), { ref: C })) : f.createElement(b, Wt({}, E, { className: c, ref: C }), a)
10087
+ i ? f.cloneElement(f.Children.only(a), Kt(Kt({}, E), { ref: C })) : f.createElement(b, Kt({}, E, { className: c, ref: C }), a)
10068
10088
  );
10069
10089
  });
10070
10090
  os.defaultProps = {
@@ -10379,7 +10399,7 @@ function Dy(e) {
10379
10399
  }
10380
10400
  const Ly = dy(ld, My);
10381
10401
  var ss = f.forwardRef(function(e, t) {
10382
- return f.createElement(os, Wt({}, e, { ref: t, sideCar: Ly }));
10402
+ return f.createElement(os, Kt({}, e, { ref: t, sideCar: Ly }));
10383
10403
  });
10384
10404
  ss.classNames = os.classNames;
10385
10405
  var xi = ["Enter", " "], Fy = ["ArrowDown", "PageUp", "Home"], pd = ["ArrowUp", "PageDown", "End"], By = [...Fy, ...pd], Hy = {
@@ -10388,12 +10408,12 @@ var xi = ["Enter", " "], Fy = ["ArrowDown", "PageUp", "Home"], pd = ["ArrowUp",
10388
10408
  }, $y = {
10389
10409
  ltr: ["ArrowLeft"],
10390
10410
  rtl: ["ArrowRight"]
10391
- }, Ur = "Menu", [Nr, zy, Uy] = Zi(Ur), [kn, hd] = Bt(Ur, [
10411
+ }, Ur = "Menu", [Nr, zy, Uy] = Zi(Ur), [kn, hd] = Ut(Ur, [
10392
10412
  Uy,
10393
10413
  or,
10394
10414
  ed
10395
10415
  ]), is = or(), md = ed(), [Wy, _n] = kn(Ur), [Vy, Wr] = kn(Ur), gd = (e) => {
10396
- const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = is(t), [c, u] = f.useState(null), d = f.useRef(!1), p = rt(s), h = Jo(o);
10416
+ const { __scopeMenu: t, open: n = !1, children: r, dir: o, onOpenChange: s, modal: i = !0 } = e, a = is(t), [c, u] = f.useState(null), d = f.useRef(!1), p = st(s), h = Jo(o);
10397
10417
  return f.useEffect(() => {
10398
10418
  const x = () => {
10399
10419
  d.current = !0, document.addEventListener("pointerdown", m, { capture: !0, once: !0 }), document.addEventListener("pointermove", m, { capture: !0, once: !0 });
@@ -10435,17 +10455,17 @@ var ha = "MenuPortal", [Ky, vd] = kn(ha, {
10435
10455
  forceMount: void 0
10436
10456
  }), xd = (e) => {
10437
10457
  const { __scopeMenu: t, forceMount: n, children: r, container: o } = e, s = _n(ha, t);
10438
- return /* @__PURE__ */ l.jsx(Ky, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(gt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: r }) }) });
10458
+ return /* @__PURE__ */ l.jsx(Ky, { scope: t, forceMount: n, children: /* @__PURE__ */ l.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: r }) }) });
10439
10459
  };
10440
10460
  xd.displayName = ha;
10441
- var Rt = "MenuContent", [Yy, ma] = kn(Rt), bd = f.forwardRef(
10461
+ var At = "MenuContent", [Yy, ma] = kn(At), bd = f.forwardRef(
10442
10462
  (e, t) => {
10443
- const n = vd(Rt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(Rt, e.__scopeMenu), i = Wr(Rt, e.__scopeMenu);
10444
- return /* @__PURE__ */ l.jsx(Nr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Nr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(Xy, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(qy, { ...o, ref: t }) }) }) });
10463
+ const n = vd(At, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(At, e.__scopeMenu), i = Wr(At, e.__scopeMenu);
10464
+ return /* @__PURE__ */ l.jsx(Nr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Nr.Slot, { scope: e.__scopeMenu, children: i.modal ? /* @__PURE__ */ l.jsx(Xy, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(qy, { ...o, ref: t }) }) }) });
10445
10465
  }
10446
10466
  ), Xy = f.forwardRef(
10447
10467
  (e, t) => {
10448
- const n = _n(Rt, e.__scopeMenu), r = f.useRef(null), o = Re(t, r);
10468
+ const n = _n(At, e.__scopeMenu), r = f.useRef(null), o = Re(t, r);
10449
10469
  return f.useEffect(() => {
10450
10470
  const s = r.current;
10451
10471
  if (s) return fa(s);
@@ -10467,7 +10487,7 @@ var Rt = "MenuContent", [Yy, ma] = kn(Rt), bd = f.forwardRef(
10467
10487
  );
10468
10488
  }
10469
10489
  ), qy = f.forwardRef((e, t) => {
10470
- const n = _n(Rt, e.__scopeMenu);
10490
+ const n = _n(At, e.__scopeMenu);
10471
10491
  return /* @__PURE__ */ l.jsx(
10472
10492
  ga,
10473
10493
  {
@@ -10496,7 +10516,7 @@ var Rt = "MenuContent", [Yy, ma] = kn(Rt), bd = f.forwardRef(
10496
10516
  onDismiss: x,
10497
10517
  disableOutsideScroll: m,
10498
10518
  ...v
10499
- } = e, g = _n(Rt, n), w = Wr(Rt, n), b = is(n), y = md(n), R = zy(n), [S, C] = f.useState(null), E = f.useRef(null), I = Re(t, E, g.onContentChange), j = f.useRef(0), P = f.useRef(""), D = f.useRef(0), H = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), _ = m ? ss : f.Fragment, M = m ? { as: Jy, allowPinchZoom: !0 } : void 0, V = (O) => {
10519
+ } = e, g = _n(At, n), w = Wr(At, n), b = is(n), y = md(n), R = zy(n), [S, C] = f.useState(null), E = f.useRef(null), I = Re(t, E, g.onContentChange), j = f.useRef(0), P = f.useRef(""), D = f.useRef(0), H = f.useRef(null), G = f.useRef("right"), N = f.useRef(0), _ = m ? ss : f.Fragment, M = m ? { as: Jy, allowPinchZoom: !0 } : void 0, V = (O) => {
10500
10520
  var X, k;
10501
10521
  const z = P.current + O, Q = R().filter((J) => !J.disabled), ae = document.activeElement, U = (X = Q.find((J) => J.ref.current === ae)) == null ? void 0 : X.textValue, ee = Q.map((J) => J.textValue), pe = cS(ee, z, U), we = (k = Q.find((J) => J.textValue === pe)) == null ? void 0 : k.ref.current;
10502
10522
  (function J(re) {
@@ -10616,7 +10636,7 @@ var Rt = "MenuContent", [Yy, ma] = kn(Rt), bd = f.forwardRef(
10616
10636
  );
10617
10637
  }
10618
10638
  );
10619
- bd.displayName = Rt;
10639
+ bd.displayName = At;
10620
10640
  var Zy = "MenuGroup", va = f.forwardRef(
10621
10641
  (e, t) => {
10622
10642
  const { __scopeMenu: n, ...r } = e;
@@ -10729,7 +10749,7 @@ var Cd = "MenuRadioGroup", [tS, nS] = kn(
10729
10749
  } }
10730
10750
  ), Td = f.forwardRef(
10731
10751
  (e, t) => {
10732
- const { value: n, onValueChange: r, ...o } = e, s = rt(r);
10752
+ const { value: n, onValueChange: r, ...o } = e, s = st(r);
10733
10753
  return /* @__PURE__ */ l.jsx(tS, { scope: e.__scopeMenu, value: n, onValueChange: s, children: /* @__PURE__ */ l.jsx(va, { ...o, ref: t }) });
10734
10754
  }
10735
10755
  );
@@ -10765,7 +10785,7 @@ var xa = "MenuItemIndicator", [Id, rS] = kn(
10765
10785
  (e, t) => {
10766
10786
  const { __scopeMenu: n, forceMount: r, ...o } = e, s = rS(xa, n);
10767
10787
  return /* @__PURE__ */ l.jsx(
10768
- gt,
10788
+ xt,
10769
10789
  {
10770
10790
  present: r || Oo(s.checked) || s.checked === !0,
10771
10791
  children: /* @__PURE__ */ l.jsx(
@@ -10876,8 +10896,8 @@ var iS = "MenuSub", [HT, Pd] = kn(iS), fr = "MenuSubTrigger", kd = f.forwardRef(
10876
10896
  kd.displayName = fr;
10877
10897
  var _d = "MenuSubContent", Od = f.forwardRef(
10878
10898
  (e, t) => {
10879
- const n = vd(Rt, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(Rt, e.__scopeMenu), i = Wr(Rt, e.__scopeMenu), a = Pd(_d, e.__scopeMenu), c = f.useRef(null), u = Re(t, c);
10880
- return /* @__PURE__ */ l.jsx(Nr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Nr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
10899
+ const n = vd(At, e.__scopeMenu), { forceMount: r = n.forceMount, ...o } = e, s = _n(At, e.__scopeMenu), i = Wr(At, e.__scopeMenu), a = Pd(_d, e.__scopeMenu), c = f.useRef(null), u = Re(t, c);
10900
+ return /* @__PURE__ */ l.jsx(Nr.Provider, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(Nr.Slot, { scope: e.__scopeMenu, children: /* @__PURE__ */ l.jsx(
10881
10901
  ga,
10882
10902
  {
10883
10903
  id: a.contentId,
@@ -10953,10 +10973,10 @@ function dS(e, t) {
10953
10973
  function Ar(e) {
10954
10974
  return (t) => t.pointerType === "mouse" ? e(t) : void 0;
10955
10975
  }
10956
- var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS = Td, yS = Rd, SS = Nd, CS = Ad, TS = jd, ES = kd, RS = Od, ls = "DropdownMenu", [IS, $T] = Bt(
10976
+ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS = Td, yS = Rd, SS = Nd, CS = Ad, TS = jd, ES = kd, RS = Od, ls = "DropdownMenu", [IS, $T] = Ut(
10957
10977
  ls,
10958
10978
  [hd]
10959
- ), dt = hd(), [NS, Dd] = IS(ls), Ld = (e) => {
10979
+ ), ht = hd(), [NS, Dd] = IS(ls), Ld = (e) => {
10960
10980
  const {
10961
10981
  __scopeDropdownMenu: t,
10962
10982
  children: n,
@@ -10965,7 +10985,7 @@ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS =
10965
10985
  defaultOpen: s,
10966
10986
  onOpenChange: i,
10967
10987
  modal: a = !0
10968
- } = e, c = dt(t), u = f.useRef(null), [d, p] = un({
10988
+ } = e, c = ht(t), u = f.useRef(null), [d, p] = un({
10969
10989
  prop: o,
10970
10990
  defaultProp: s ?? !1,
10971
10991
  onChange: i,
@@ -10975,9 +10995,9 @@ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS =
10975
10995
  NS,
10976
10996
  {
10977
10997
  scope: t,
10978
- triggerId: Ot(),
10998
+ triggerId: Ft(),
10979
10999
  triggerRef: u,
10980
- contentId: Ot(),
11000
+ contentId: Ft(),
10981
11001
  open: d,
10982
11002
  onOpenChange: p,
10983
11003
  onOpenToggle: f.useCallback(() => p((h) => !h), [p]),
@@ -10989,7 +11009,7 @@ var fS = gd, pS = pa, hS = xd, mS = bd, gS = va, vS = wd, xS = as, bS = Sd, wS =
10989
11009
  Ld.displayName = ls;
10990
11010
  var Fd = "DropdownMenuTrigger", Bd = f.forwardRef(
10991
11011
  (e, t) => {
10992
- const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Dd(Fd, n), i = dt(n);
11012
+ const { __scopeDropdownMenu: n, disabled: r = !1, ...o } = e, s = Dd(Fd, n), i = ht(n);
10993
11013
  return /* @__PURE__ */ l.jsx(pS, { asChild: !0, ...i, children: /* @__PURE__ */ l.jsx(
10994
11014
  ge.button,
10995
11015
  {
@@ -11015,13 +11035,13 @@ var Fd = "DropdownMenuTrigger", Bd = f.forwardRef(
11015
11035
  );
11016
11036
  Bd.displayName = Fd;
11017
11037
  var AS = "DropdownMenuPortal", Hd = (e) => {
11018
- const { __scopeDropdownMenu: t, ...n } = e, r = dt(t);
11038
+ const { __scopeDropdownMenu: t, ...n } = e, r = ht(t);
11019
11039
  return /* @__PURE__ */ l.jsx(hS, { ...r, ...n });
11020
11040
  };
11021
11041
  Hd.displayName = AS;
11022
11042
  var $d = "DropdownMenuContent", zd = f.forwardRef(
11023
11043
  (e, t) => {
11024
- const { __scopeDropdownMenu: n, ...r } = e, o = Dd($d, n), s = dt(n), i = f.useRef(!1);
11044
+ const { __scopeDropdownMenu: n, ...r } = e, o = Dd($d, n), s = ht(n), i = f.useRef(!1);
11025
11045
  return /* @__PURE__ */ l.jsx(
11026
11046
  mS,
11027
11047
  {
@@ -11053,64 +11073,64 @@ var $d = "DropdownMenuContent", zd = f.forwardRef(
11053
11073
  zd.displayName = $d;
11054
11074
  var jS = "DropdownMenuGroup", PS = f.forwardRef(
11055
11075
  (e, t) => {
11056
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11076
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11057
11077
  return /* @__PURE__ */ l.jsx(gS, { ...o, ...r, ref: t });
11058
11078
  }
11059
11079
  );
11060
11080
  PS.displayName = jS;
11061
11081
  var kS = "DropdownMenuLabel", Ud = f.forwardRef(
11062
11082
  (e, t) => {
11063
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11083
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11064
11084
  return /* @__PURE__ */ l.jsx(vS, { ...o, ...r, ref: t });
11065
11085
  }
11066
11086
  );
11067
11087
  Ud.displayName = kS;
11068
11088
  var _S = "DropdownMenuItem", Wd = f.forwardRef(
11069
11089
  (e, t) => {
11070
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11090
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11071
11091
  return /* @__PURE__ */ l.jsx(xS, { ...o, ...r, ref: t });
11072
11092
  }
11073
11093
  );
11074
11094
  Wd.displayName = _S;
11075
11095
  var OS = "DropdownMenuCheckboxItem", Vd = f.forwardRef((e, t) => {
11076
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11096
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11077
11097
  return /* @__PURE__ */ l.jsx(bS, { ...o, ...r, ref: t });
11078
11098
  });
11079
11099
  Vd.displayName = OS;
11080
11100
  var MS = "DropdownMenuRadioGroup", DS = f.forwardRef((e, t) => {
11081
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11101
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11082
11102
  return /* @__PURE__ */ l.jsx(wS, { ...o, ...r, ref: t });
11083
11103
  });
11084
11104
  DS.displayName = MS;
11085
11105
  var LS = "DropdownMenuRadioItem", Gd = f.forwardRef((e, t) => {
11086
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11106
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11087
11107
  return /* @__PURE__ */ l.jsx(yS, { ...o, ...r, ref: t });
11088
11108
  });
11089
11109
  Gd.displayName = LS;
11090
11110
  var FS = "DropdownMenuItemIndicator", Kd = f.forwardRef((e, t) => {
11091
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11111
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11092
11112
  return /* @__PURE__ */ l.jsx(SS, { ...o, ...r, ref: t });
11093
11113
  });
11094
11114
  Kd.displayName = FS;
11095
11115
  var BS = "DropdownMenuSeparator", Yd = f.forwardRef((e, t) => {
11096
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11116
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11097
11117
  return /* @__PURE__ */ l.jsx(CS, { ...o, ...r, ref: t });
11098
11118
  });
11099
11119
  Yd.displayName = BS;
11100
11120
  var HS = "DropdownMenuArrow", $S = f.forwardRef(
11101
11121
  (e, t) => {
11102
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11122
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11103
11123
  return /* @__PURE__ */ l.jsx(TS, { ...o, ...r, ref: t });
11104
11124
  }
11105
11125
  );
11106
11126
  $S.displayName = HS;
11107
11127
  var zS = "DropdownMenuSubTrigger", Xd = f.forwardRef((e, t) => {
11108
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11128
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11109
11129
  return /* @__PURE__ */ l.jsx(ES, { ...o, ...r, ref: t });
11110
11130
  });
11111
11131
  Xd.displayName = zS;
11112
11132
  var US = "DropdownMenuSubContent", qd = f.forwardRef((e, t) => {
11113
- const { __scopeDropdownMenu: n, ...r } = e, o = dt(n);
11133
+ const { __scopeDropdownMenu: n, ...r } = e, o = ht(n);
11114
11134
  return /* @__PURE__ */ l.jsx(
11115
11135
  RS,
11116
11136
  {
@@ -11271,15 +11291,15 @@ function vo({
11271
11291
  loadOlderMessages: j,
11272
11292
  api: P
11273
11293
  } = Mi(), [D, H] = be(null), [G, N] = be(""), [_, M] = be(null), [V, F] = be([]), [O, z] = be(!1), [Q, ae] = be(null), [U, ee] = be(null), [pe, we] = be(!1), [X, k] = be(null), [J, re] = be([]), [ce, ie] = be(null);
11274
- vt(null);
11275
- const Oe = vt(null), ue = vt(null), Ae = vt(null), le = vt(!1), fe = vt(!0), ke = vt(0), W = vt(null), [te, ye] = be("desktop");
11276
- Ze(() => {
11294
+ bt(null);
11295
+ const Me = bt(null), ue = bt(null), Ae = bt(null), le = bt(!1), fe = bt(!0), ke = bt(0), W = bt(null), [te, ye] = be("desktop");
11296
+ et(() => {
11277
11297
  const q = () => {
11278
11298
  const se = window.innerWidth;
11279
11299
  ye(se < 640 ? "phone" : se < 1024 ? "tablet" : "desktop");
11280
11300
  };
11281
11301
  return q(), window.addEventListener("resize", q), () => window.removeEventListener("resize", q);
11282
- }, []), Ze(() => {
11302
+ }, []), et(() => {
11283
11303
  let q = !1;
11284
11304
  if (!h) {
11285
11305
  re([]), ie(null), W.current = null;
@@ -11292,20 +11312,20 @@ function vo({
11292
11312
  if (!(Ee && Ee.threadId === se.threadId && Ee.checkpointId === se.checkpointId))
11293
11313
  return R(h).then((Pe) => {
11294
11314
  if (q) return;
11295
- const At = ((Pe == null ? void 0 : Pe.checkpoints) ?? []).slice().sort((jt, Mn) => new Date(Mn.createdAt).getTime() - new Date(jt.createdAt).getTime());
11296
- re(At), ie((jt) => {
11315
+ const _t = ((Pe == null ? void 0 : Pe.checkpoints) ?? []).slice().sort((Ot, Mn) => new Date(Mn.createdAt).getTime() - new Date(Ot.createdAt).getTime());
11316
+ re(_t), ie((Ot) => {
11297
11317
  var Mn;
11298
- return jt ?? ((Mn = At[0]) == null ? void 0 : Mn.checkpointId) ?? null;
11318
+ return Ot ?? ((Mn = _t[0]) == null ? void 0 : Mn.checkpointId) ?? null;
11299
11319
  }), W.current = se;
11300
11320
  }).catch((Pe) => {
11301
11321
  console.error("ChatInterface - listCheckpoints error:", Pe), q || (re([]), W.current = null);
11302
11322
  }), () => {
11303
11323
  q = !0;
11304
11324
  };
11305
- }, [h, y, R]), Ze(() => {
11325
+ }, [h, y, R]), et(() => {
11306
11326
  y && ie(y);
11307
11327
  }, [y]);
11308
- const Me = Ye(async () => {
11328
+ const _e = qe(async () => {
11309
11329
  if (!E || I) return;
11310
11330
  const q = Ae.current;
11311
11331
  if (!q) return;
@@ -11322,19 +11342,19 @@ function vo({
11322
11342
  le.current = !1;
11323
11343
  return;
11324
11344
  }
11325
- const At = Pe.scrollHeight;
11326
- Pe.scrollTop = Ee + (At - se);
11327
- const jt = At - Pe.scrollTop - Pe.clientHeight;
11328
- fe.current = jt <= 32, le.current = !1;
11345
+ const _t = Pe.scrollHeight;
11346
+ Pe.scrollTop = Ee + (_t - se);
11347
+ const Ot = _t - Pe.scrollTop - Pe.clientHeight;
11348
+ fe.current = Ot <= 32, le.current = !1;
11329
11349
  });
11330
11350
  }
11331
11351
  }, [E, I, j]);
11332
- Ze(() => {
11352
+ et(() => {
11333
11353
  x.length < ke.current && (fe.current = !0), ke.current = x.length;
11334
- }, [x.length]), Ze(() => {
11354
+ }, [x.length]), et(() => {
11335
11355
  const q = Ae.current;
11336
11356
  q && (le.current || fe.current && (q.scrollTop = q.scrollHeight, fe.current = !0));
11337
- }, [x]), Ze(() => {
11357
+ }, [x]), et(() => {
11338
11358
  (async () => {
11339
11359
  try {
11340
11360
  const se = await P.getAgent("default");
@@ -11343,10 +11363,10 @@ function vo({
11343
11363
  console.warn("Failed to fetch default message:", se), k(null);
11344
11364
  }
11345
11365
  })();
11346
- }, [P]), Ze(() => {
11366
+ }, [P]), et(() => {
11347
11367
  g && !pe && (p == null || p(g));
11348
11368
  }, [g, pe, p]);
11349
- const tt = (q) => {
11369
+ const Ge = (q) => {
11350
11370
  if (q.length > po)
11351
11371
  return `Message too long (${q.length}/${po} characters)`;
11352
11372
  try {
@@ -11354,7 +11374,7 @@ function vo({
11354
11374
  } catch (se) {
11355
11375
  return (se == null ? void 0 : se.message) || "Invalid message";
11356
11376
  }
11357
- }, $e = (q) => {
11377
+ }, nt = (q) => {
11358
11378
  const se = q.content || [], Ee = se.filter((Pe) => Pe.type === "text").map((Pe) => Pe.text).join("");
11359
11379
  if (Ee) return Ee;
11360
11380
  try {
@@ -11362,11 +11382,11 @@ function vo({
11362
11382
  } catch {
11363
11383
  return String(se);
11364
11384
  }
11365
- }, Ve = async (q) => {
11385
+ }, Ke = async (q) => {
11366
11386
  const se = q.trim();
11367
11387
  if (!(!se && V.length === 0)) {
11368
11388
  if (se) {
11369
- const Ee = tt(se);
11389
+ const Ee = Ge(se);
11370
11390
  if (Ee) {
11371
11391
  M(Ee);
11372
11392
  return;
@@ -11379,29 +11399,29 @@ function vo({
11379
11399
  M(Pe), p == null || p(Pe);
11380
11400
  }
11381
11401
  }
11382
- }, ft = Y.useCallback((q, se) => {
11402
+ }, Tt = Y.useCallback((q, se) => {
11383
11403
  a && (H(q), N(se), M(null));
11384
- }, [a]), at = Y.useCallback(() => {
11404
+ }, [a]), We = Y.useCallback(() => {
11385
11405
  H(null), N(""), M(null);
11386
- }, []), nn = Ye((q, se) => {
11387
- ft(q, se);
11388
- }, [ft]), $t = Ye((q) => {
11406
+ }, []), it = qe((q, se) => {
11407
+ Tt(q, se);
11408
+ }, [Tt]), Ye = qe((q) => {
11389
11409
  for (let se = q - 1; se >= 0; se--)
11390
11410
  if (x[se].role === "user") {
11391
- const Ee = $e(x[se]);
11411
+ const Ee = nt(x[se]);
11392
11412
  Ee && w(Ee, { checkpointId: ce || y || void 0 });
11393
11413
  break;
11394
11414
  }
11395
- }, [x, w, ce, y, $e]), rn = (q) => {
11415
+ }, [x, w, ce, y, nt]), at = (q) => {
11396
11416
  const se = Array.from(q.target.files || []);
11397
11417
  F((Ee) => [...Ee, ...se]);
11398
- }, on = (q) => F((se) => se.filter((Ee, Pe) => q !== Pe)), xn = async (q) => {
11418
+ }, kt = (q) => F((se) => se.filter((Ee, Pe) => q !== Pe)), xn = async (q) => {
11399
11419
  const se = (q.target.files || [])[0];
11400
11420
  if (se) {
11401
11421
  ae(null), ee(null), z(!0);
11402
11422
  try {
11403
- const Ee = await P.uploadExcel(se), Pe = Ee.sheets.map((jt) => `${jt.sheetName} -> ${jt.tableName}`).join(", "), At = Pe ? `Uploaded ${se.name} (${Ee.sheets.length} sheet${Ee.sheets.length === 1 ? "" : "s"}: ${Pe})` : `Uploaded ${se.name}`;
11404
- ee(At), d == null || d({ file: se, response: Ee });
11423
+ const Ee = await P.uploadExcel(se), Pe = Ee.sheets.map((Ot) => `${Ot.sheetName} -> ${Ot.tableName}`).join(", "), _t = Pe ? `Uploaded ${se.name} (${Ee.sheets.length} sheet${Ee.sheets.length === 1 ? "" : "s"}: ${Pe})` : `Uploaded ${se.name}`;
11424
+ ee(_t), d == null || d({ file: se, response: Ee });
11405
11425
  } catch (Ee) {
11406
11426
  const Pe = Ee instanceof Error ? Ee.message : "Failed to upload Excel file";
11407
11427
  console.error("Excel upload failed", Ee), ae(Pe), p == null || p(Pe);
@@ -11413,7 +11433,7 @@ function vo({
11413
11433
  if (!q) return "Unknown";
11414
11434
  const se = Date.parse(q);
11415
11435
  return Number.isNaN(se) ? q : new Date(se).toLocaleString();
11416
- }, Ge = async (q) => {
11436
+ }, Ve = async (q) => {
11417
11437
  if (h) {
11418
11438
  if (!q) {
11419
11439
  await C(), ie(null);
@@ -11446,7 +11466,7 @@ function vo({
11446
11466
  value: ce ?? "",
11447
11467
  onChange: (q) => {
11448
11468
  const se = q.target.value || null;
11449
- Ge(se);
11469
+ Ve(se);
11450
11470
  },
11451
11471
  children: [
11452
11472
  /* @__PURE__ */ l.jsx("option", { value: "", children: "Latest" }),
@@ -11471,7 +11491,7 @@ function vo({
11471
11491
  overscan: 120,
11472
11492
  increaseViewportBy: { top: 200, bottom: 200 },
11473
11493
  startReached: () => {
11474
- Me();
11494
+ _e();
11475
11495
  },
11476
11496
  style: { height: "100%", overscrollBehavior: "contain" },
11477
11497
  components: {
@@ -11502,9 +11522,9 @@ function vo({
11502
11522
  layoutSize: te,
11503
11523
  truncateToolMessages: !1,
11504
11524
  toolMessagePreviewLength: 200,
11505
- onEdit: nn,
11506
- onRegenerate: () => $t(q),
11507
- onCancelEdit: at
11525
+ onEdit: it,
11526
+ onRegenerate: () => Ye(q),
11527
+ onCancelEdit: We
11508
11528
  },
11509
11529
  se.id ?? `msg-${se.role}-${q}-${se.createdAt ?? ""}`
11510
11530
  )
@@ -11523,7 +11543,7 @@ function vo({
11523
11543
  {
11524
11544
  variant: "ghost",
11525
11545
  size: "sm",
11526
- onClick: at,
11546
+ onClick: We,
11527
11547
  className: "text-blue-600 hover:bg-blue-100",
11528
11548
  children: /* @__PURE__ */ l.jsx(hr, { size: 16 })
11529
11549
  }
@@ -11534,10 +11554,10 @@ function vo({
11534
11554
  /* @__PURE__ */ l.jsx(
11535
11555
  "input",
11536
11556
  {
11537
- ref: Oe,
11557
+ ref: Me,
11538
11558
  type: "file",
11539
11559
  multiple: !0,
11540
- onChange: (q) => rn(q),
11560
+ onChange: (q) => at(q),
11541
11561
  className: "hidden"
11542
11562
  }
11543
11563
  ),
@@ -11549,7 +11569,7 @@ function vo({
11549
11569
  {
11550
11570
  variant: "ghost",
11551
11571
  size: "sm",
11552
- onClick: () => on(se),
11572
+ onClick: () => kt(se),
11553
11573
  className: "h-4 w-4 p-0 text-gray-500 dark:text-gray-400 hover:text-red-500 dark:hover:text-red-400",
11554
11574
  "aria-label": `Remove ${q.name}`,
11555
11575
  children: /* @__PURE__ */ l.jsx(hr, { size: 12 })
@@ -11594,7 +11614,7 @@ function vo({
11594
11614
  /* @__PURE__ */ l.jsxs(af, { align: "start", sideOffset: 6, className: "w-52", children: [
11595
11615
  s && /* @__PURE__ */ l.jsxs(bi, { onClick: () => {
11596
11616
  var q;
11597
- return (q = Oe.current) == null ? void 0 : q.click();
11617
+ return (q = Me.current) == null ? void 0 : q.click();
11598
11618
  }, className: "cursor-pointer", children: [
11599
11619
  /* @__PURE__ */ l.jsx(Ba, { className: "h-4 w-4 mr-2" }),
11600
11620
  " Attach files or images"
@@ -11624,8 +11644,8 @@ function vo({
11624
11644
  isStreaming: m,
11625
11645
  disabled: !1,
11626
11646
  maxLength: po,
11627
- onSend: Ve,
11628
- onCancelEdit: at,
11647
+ onSend: Ke,
11648
+ onCancelEdit: We,
11629
11649
  textareaClassName: `resize-none min-h-[44px] max-h-[20rem] w-full transition-colors ${D ? "border-blue-400 bg-blue-50 text-blue-900 dark:border-blue-500 dark:bg-blue-950/60 dark:text-blue-50" : ""} ${_ ? "border-red-400" : ""} ${c.textarea || ""}`
11630
11650
  }
11631
11651
  ) }),
@@ -11666,7 +11686,7 @@ function wi(e, [t, n]) {
11666
11686
  function t0(e, t) {
11667
11687
  return f.useReducer((n, r) => t[n][r] ?? n, e);
11668
11688
  }
11669
- var wa = "ScrollArea", [lf, zT] = Bt(wa), [n0, Nt] = lf(wa), cf = f.forwardRef(
11689
+ var wa = "ScrollArea", [lf, zT] = Ut(wa), [n0, Pt] = lf(wa), cf = f.forwardRef(
11670
11690
  (e, t) => {
11671
11691
  const {
11672
11692
  __scopeScrollArea: n,
@@ -11719,7 +11739,7 @@ var wa = "ScrollArea", [lf, zT] = Bt(wa), [n0, Nt] = lf(wa), cf = f.forwardRef(
11719
11739
  cf.displayName = wa;
11720
11740
  var uf = "ScrollAreaViewport", df = f.forwardRef(
11721
11741
  (e, t) => {
11722
- const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = Nt(uf, n), a = f.useRef(null), c = Re(t, a, i.onViewportChange);
11742
+ const { __scopeScrollArea: n, children: r, nonce: o, ...s } = e, i = Pt(uf, n), a = f.useRef(null), c = Re(t, a, i.onViewportChange);
11723
11743
  return /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
11724
11744
  /* @__PURE__ */ l.jsx(
11725
11745
  "style",
@@ -11759,17 +11779,17 @@ var uf = "ScrollAreaViewport", df = f.forwardRef(
11759
11779
  }
11760
11780
  );
11761
11781
  df.displayName = uf;
11762
- var Jt = "ScrollAreaScrollbar", ya = f.forwardRef(
11782
+ var en = "ScrollAreaScrollbar", ya = f.forwardRef(
11763
11783
  (e, t) => {
11764
- const { forceMount: n, ...r } = e, o = Nt(Jt, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
11784
+ const { forceMount: n, ...r } = e, o = Pt(en, e.__scopeScrollArea), { onScrollbarXEnabledChange: s, onScrollbarYEnabledChange: i } = o, a = e.orientation === "horizontal";
11765
11785
  return f.useEffect(() => (a ? s(!0) : i(!0), () => {
11766
11786
  a ? s(!1) : i(!1);
11767
11787
  }), [a, s, i]), o.type === "hover" ? /* @__PURE__ */ l.jsx(r0, { ...r, ref: t, forceMount: n }) : o.type === "scroll" ? /* @__PURE__ */ l.jsx(o0, { ...r, ref: t, forceMount: n }) : o.type === "auto" ? /* @__PURE__ */ l.jsx(ff, { ...r, ref: t, forceMount: n }) : o.type === "always" ? /* @__PURE__ */ l.jsx(Sa, { ...r, ref: t }) : null;
11768
11788
  }
11769
11789
  );
11770
- ya.displayName = Jt;
11790
+ ya.displayName = en;
11771
11791
  var r0 = f.forwardRef((e, t) => {
11772
- const { forceMount: n, ...r } = e, o = Nt(Jt, e.__scopeScrollArea), [s, i] = f.useState(!1);
11792
+ const { forceMount: n, ...r } = e, o = Pt(en, e.__scopeScrollArea), [s, i] = f.useState(!1);
11773
11793
  return f.useEffect(() => {
11774
11794
  const a = o.scrollArea;
11775
11795
  let c = 0;
@@ -11783,7 +11803,7 @@ var r0 = f.forwardRef((e, t) => {
11783
11803
  window.clearTimeout(c), a.removeEventListener("pointerenter", u), a.removeEventListener("pointerleave", d);
11784
11804
  };
11785
11805
  }
11786
- }, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ l.jsx(gt, { present: n || s, children: /* @__PURE__ */ l.jsx(
11806
+ }, [o.scrollArea, o.scrollHideDelay]), /* @__PURE__ */ l.jsx(xt, { present: n || s, children: /* @__PURE__ */ l.jsx(
11787
11807
  ff,
11788
11808
  {
11789
11809
  "data-state": s ? "visible" : "hidden",
@@ -11792,7 +11812,7 @@ var r0 = f.forwardRef((e, t) => {
11792
11812
  }
11793
11813
  ) });
11794
11814
  }), o0 = f.forwardRef((e, t) => {
11795
- const { forceMount: n, ...r } = e, o = Nt(Jt, e.__scopeScrollArea), s = e.orientation === "horizontal", i = us(() => c("SCROLL_END"), 100), [a, c] = t0("hidden", {
11815
+ const { forceMount: n, ...r } = e, o = Pt(en, e.__scopeScrollArea), s = e.orientation === "horizontal", i = us(() => c("SCROLL_END"), 100), [a, c] = t0("hidden", {
11796
11816
  hidden: {
11797
11817
  SCROLL: "scrolling"
11798
11818
  },
@@ -11825,7 +11845,7 @@ var r0 = f.forwardRef((e, t) => {
11825
11845
  };
11826
11846
  return u.addEventListener("scroll", h), () => u.removeEventListener("scroll", h);
11827
11847
  }
11828
- }, [o.viewport, s, c, i]), /* @__PURE__ */ l.jsx(gt, { present: n || a !== "hidden", children: /* @__PURE__ */ l.jsx(
11848
+ }, [o.viewport, s, c, i]), /* @__PURE__ */ l.jsx(xt, { present: n || a !== "hidden", children: /* @__PURE__ */ l.jsx(
11829
11849
  Sa,
11830
11850
  {
11831
11851
  "data-state": a === "hidden" ? "hidden" : "visible",
@@ -11836,13 +11856,13 @@ var r0 = f.forwardRef((e, t) => {
11836
11856
  }
11837
11857
  ) });
11838
11858
  }), ff = f.forwardRef((e, t) => {
11839
- const n = Nt(Jt, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = f.useState(!1), a = e.orientation === "horizontal", c = us(() => {
11859
+ const n = Pt(en, e.__scopeScrollArea), { forceMount: r, ...o } = e, [s, i] = f.useState(!1), a = e.orientation === "horizontal", c = us(() => {
11840
11860
  if (n.viewport) {
11841
11861
  const u = n.viewport.offsetWidth < n.viewport.scrollWidth, d = n.viewport.offsetHeight < n.viewport.scrollHeight;
11842
11862
  i(a ? u : d);
11843
11863
  }
11844
11864
  }, 10);
11845
- return Xn(n.viewport, c), Xn(n.content, c), /* @__PURE__ */ l.jsx(gt, { present: r || s, children: /* @__PURE__ */ l.jsx(
11865
+ return Xn(n.viewport, c), Xn(n.content, c), /* @__PURE__ */ l.jsx(xt, { present: r || s, children: /* @__PURE__ */ l.jsx(
11846
11866
  Sa,
11847
11867
  {
11848
11868
  "data-state": s ? "visible" : "hidden",
@@ -11851,7 +11871,7 @@ var r0 = f.forwardRef((e, t) => {
11851
11871
  }
11852
11872
  ) });
11853
11873
  }), Sa = f.forwardRef((e, t) => {
11854
- const { orientation: n = "vertical", ...r } = e, o = Nt(Jt, e.__scopeScrollArea), s = f.useRef(null), i = f.useRef(0), [a, c] = f.useState({
11874
+ const { orientation: n = "vertical", ...r } = e, o = Pt(en, e.__scopeScrollArea), s = f.useRef(null), i = f.useRef(0), [a, c] = f.useState({
11855
11875
  content: 0,
11856
11876
  viewport: 0,
11857
11877
  scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
@@ -11905,7 +11925,7 @@ var r0 = f.forwardRef((e, t) => {
11905
11925
  }
11906
11926
  ) : null;
11907
11927
  }), s0 = f.forwardRef((e, t) => {
11908
- const { sizes: n, onSizesChange: r, ...o } = e, s = Nt(Jt, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarXChange);
11928
+ const { sizes: n, onSizesChange: r, ...o } = e, s = Pt(en, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarXChange);
11909
11929
  return f.useEffect(() => {
11910
11930
  c.current && a(getComputedStyle(c.current));
11911
11931
  }, [c]), /* @__PURE__ */ l.jsx(
@@ -11944,7 +11964,7 @@ var r0 = f.forwardRef((e, t) => {
11944
11964
  }
11945
11965
  );
11946
11966
  }), i0 = f.forwardRef((e, t) => {
11947
- const { sizes: n, onSizesChange: r, ...o } = e, s = Nt(Jt, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarYChange);
11967
+ const { sizes: n, onSizesChange: r, ...o } = e, s = Pt(en, e.__scopeScrollArea), [i, a] = f.useState(), c = f.useRef(null), u = Re(t, c, s.onScrollbarYChange);
11948
11968
  return f.useEffect(() => {
11949
11969
  c.current && a(getComputedStyle(c.current));
11950
11970
  }, [c]), /* @__PURE__ */ l.jsx(
@@ -11983,7 +12003,7 @@ var r0 = f.forwardRef((e, t) => {
11983
12003
  }
11984
12004
  }
11985
12005
  );
11986
- }), [a0, pf] = lf(Jt), hf = f.forwardRef((e, t) => {
12006
+ }), [a0, pf] = lf(en), hf = f.forwardRef((e, t) => {
11987
12007
  const {
11988
12008
  __scopeScrollArea: n,
11989
12009
  sizes: r,
@@ -11996,7 +12016,7 @@ var r0 = f.forwardRef((e, t) => {
11996
12016
  onWheelScroll: d,
11997
12017
  onResize: p,
11998
12018
  ...h
11999
- } = e, x = Nt(Jt, n), [m, v] = f.useState(null), g = Re(t, (j) => v(j)), w = f.useRef(null), b = f.useRef(""), y = x.viewport, R = r.content - r.viewport, S = rt(d), C = rt(c), E = us(p, 10);
12019
+ } = e, x = Pt(en, n), [m, v] = f.useState(null), g = Re(t, (j) => v(j)), w = f.useRef(null), b = f.useRef(""), y = x.viewport, R = r.content - r.viewport, S = st(d), C = st(c), E = us(p, 10);
12000
12020
  function I(j) {
12001
12021
  if (w.current) {
12002
12022
  const P = j.clientX - w.current.left, D = j.clientY - w.current.top;
@@ -12015,10 +12035,10 @@ var r0 = f.forwardRef((e, t) => {
12015
12035
  scope: n,
12016
12036
  scrollbar: m,
12017
12037
  hasThumb: o,
12018
- onThumbChange: rt(s),
12019
- onThumbPointerUp: rt(i),
12038
+ onThumbChange: st(s),
12039
+ onThumbPointerUp: st(i),
12020
12040
  onThumbPositionChange: C,
12021
- onThumbPointerDown: rt(a),
12041
+ onThumbPointerDown: st(a),
12022
12042
  children: /* @__PURE__ */ l.jsx(
12023
12043
  ge.div,
12024
12044
  {
@@ -12040,11 +12060,11 @@ var r0 = f.forwardRef((e, t) => {
12040
12060
  }), Mo = "ScrollAreaThumb", mf = f.forwardRef(
12041
12061
  (e, t) => {
12042
12062
  const { forceMount: n, ...r } = e, o = pf(Mo, e.__scopeScrollArea);
12043
- return /* @__PURE__ */ l.jsx(gt, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(l0, { ref: t, ...r }) });
12063
+ return /* @__PURE__ */ l.jsx(xt, { present: n || o.hasThumb, children: /* @__PURE__ */ l.jsx(l0, { ref: t, ...r }) });
12044
12064
  }
12045
12065
  ), l0 = f.forwardRef(
12046
12066
  (e, t) => {
12047
- const { __scopeScrollArea: n, style: r, ...o } = e, s = Nt(Mo, n), i = pf(Mo, n), { onThumbPositionChange: a } = i, c = Re(
12067
+ const { __scopeScrollArea: n, style: r, ...o } = e, s = Pt(Mo, n), i = pf(Mo, n), { onThumbPositionChange: a } = i, c = Re(
12048
12068
  t,
12049
12069
  (p) => i.onThumbChange(p)
12050
12070
  ), u = f.useRef(void 0), d = us(() => {
@@ -12084,13 +12104,13 @@ var r0 = f.forwardRef((e, t) => {
12084
12104
  mf.displayName = Mo;
12085
12105
  var Ca = "ScrollAreaCorner", gf = f.forwardRef(
12086
12106
  (e, t) => {
12087
- const n = Nt(Ca, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
12107
+ const n = Pt(Ca, e.__scopeScrollArea), r = !!(n.scrollbarX && n.scrollbarY);
12088
12108
  return n.type !== "scroll" && r ? /* @__PURE__ */ l.jsx(c0, { ...e, ref: t }) : null;
12089
12109
  }
12090
12110
  );
12091
12111
  gf.displayName = Ca;
12092
12112
  var c0 = f.forwardRef((e, t) => {
12093
- const { __scopeScrollArea: n, ...r } = e, o = Nt(Ca, n), [s, i] = f.useState(0), [a, c] = f.useState(0), u = !!(s && a);
12113
+ const { __scopeScrollArea: n, ...r } = e, o = Pt(Ca, n), [s, i] = f.useState(0), [a, c] = f.useState(0), u = !!(s && a);
12094
12114
  return Xn(o.scrollbarX, () => {
12095
12115
  var p;
12096
12116
  const d = ((p = o.scrollbarX) == null ? void 0 : p.offsetHeight) || 0;
@@ -12154,14 +12174,14 @@ var d0 = (e, t = () => {
12154
12174
  }(), () => window.cancelAnimationFrame(r);
12155
12175
  };
12156
12176
  function us(e, t) {
12157
- const n = rt(e), r = f.useRef(0);
12177
+ const n = st(e), r = f.useRef(0);
12158
12178
  return f.useEffect(() => () => window.clearTimeout(r.current), []), f.useCallback(() => {
12159
12179
  window.clearTimeout(r.current), r.current = window.setTimeout(n, t);
12160
12180
  }, [n, t]);
12161
12181
  }
12162
12182
  function Xn(e, t) {
12163
- const n = rt(t);
12164
- nt(() => {
12183
+ const n = st(t);
12184
+ ot(() => {
12165
12185
  let r = 0;
12166
12186
  if (e) {
12167
12187
  const o = new ResizeObserver(() => {
@@ -12226,7 +12246,7 @@ function yi({
12226
12246
  deleteThread: g,
12227
12247
  renameThread: w
12228
12248
  } = Mi(), [b, y] = be(h ?? []), [R, S] = be(!1), [C, E] = be(null), [I, j] = be(null), [P, D] = be(""), [H, G] = be(!1);
12229
- Ze(() => {
12249
+ et(() => {
12230
12250
  y(h ?? []);
12231
12251
  }, [h]);
12232
12252
  const N = async (U) => {
@@ -12462,7 +12482,7 @@ const Ta = f.forwardRef(
12462
12482
  )
12463
12483
  );
12464
12484
  Ta.displayName = Rf.displayName;
12465
- var ds = "Dialog", [If, KT] = Bt(ds), [T0, Ht] = If(ds), Nf = (e) => {
12485
+ var ds = "Dialog", [If, KT] = Ut(ds), [T0, Wt] = If(ds), Nf = (e) => {
12466
12486
  const {
12467
12487
  __scopeDialog: t,
12468
12488
  children: n,
@@ -12482,9 +12502,9 @@ var ds = "Dialog", [If, KT] = Bt(ds), [T0, Ht] = If(ds), Nf = (e) => {
12482
12502
  scope: t,
12483
12503
  triggerRef: a,
12484
12504
  contentRef: c,
12485
- contentId: Ot(),
12486
- titleId: Ot(),
12487
- descriptionId: Ot(),
12505
+ contentId: Ft(),
12506
+ titleId: Ft(),
12507
+ descriptionId: Ft(),
12488
12508
  open: u,
12489
12509
  onOpenChange: d,
12490
12510
  onOpenToggle: f.useCallback(() => d((p) => !p), [d]),
@@ -12496,7 +12516,7 @@ var ds = "Dialog", [If, KT] = Bt(ds), [T0, Ht] = If(ds), Nf = (e) => {
12496
12516
  Nf.displayName = ds;
12497
12517
  var Af = "DialogTrigger", jf = f.forwardRef(
12498
12518
  (e, t) => {
12499
- const { __scopeDialog: n, ...r } = e, o = Ht(Af, n), s = Re(t, o.triggerRef);
12519
+ const { __scopeDialog: n, ...r } = e, o = Wt(Af, n), s = Re(t, o.triggerRef);
12500
12520
  return /* @__PURE__ */ l.jsx(
12501
12521
  ge.button,
12502
12522
  {
@@ -12516,20 +12536,20 @@ jf.displayName = Af;
12516
12536
  var Ea = "DialogPortal", [E0, Pf] = If(Ea, {
12517
12537
  forceMount: void 0
12518
12538
  }), kf = (e) => {
12519
- const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Ht(Ea, t);
12520
- return /* @__PURE__ */ l.jsx(E0, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(gt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: i }) })) });
12539
+ const { __scopeDialog: t, forceMount: n, children: r, container: o } = e, s = Wt(Ea, t);
12540
+ return /* @__PURE__ */ l.jsx(E0, { scope: t, forceMount: n, children: f.Children.map(r, (i) => /* @__PURE__ */ l.jsx(xt, { present: n || s.open, children: /* @__PURE__ */ l.jsx(rs, { asChild: !0, container: o, children: i }) })) });
12521
12541
  };
12522
12542
  kf.displayName = Ea;
12523
12543
  var Lo = "DialogOverlay", _f = f.forwardRef(
12524
12544
  (e, t) => {
12525
- const n = Pf(Lo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Ht(Lo, e.__scopeDialog);
12526
- return s.modal ? /* @__PURE__ */ l.jsx(gt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(I0, { ...o, ref: t }) }) : null;
12545
+ const n = Pf(Lo, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(Lo, e.__scopeDialog);
12546
+ return s.modal ? /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: /* @__PURE__ */ l.jsx(I0, { ...o, ref: t }) }) : null;
12527
12547
  }
12528
12548
  );
12529
12549
  _f.displayName = Lo;
12530
12550
  var R0 = Gn("DialogOverlay.RemoveScroll"), I0 = f.forwardRef(
12531
12551
  (e, t) => {
12532
- const { __scopeDialog: n, ...r } = e, o = Ht(Lo, n);
12552
+ const { __scopeDialog: n, ...r } = e, o = Wt(Lo, n);
12533
12553
  return (
12534
12554
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
12535
12555
  // ie. when `Overlay` and `Content` are siblings
@@ -12546,14 +12566,14 @@ var R0 = Gn("DialogOverlay.RemoveScroll"), I0 = f.forwardRef(
12546
12566
  }
12547
12567
  ), In = "DialogContent", Of = f.forwardRef(
12548
12568
  (e, t) => {
12549
- const n = Pf(In, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Ht(In, e.__scopeDialog);
12550
- return /* @__PURE__ */ l.jsx(gt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(N0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(A0, { ...o, ref: t }) });
12569
+ const n = Pf(In, e.__scopeDialog), { forceMount: r = n.forceMount, ...o } = e, s = Wt(In, e.__scopeDialog);
12570
+ return /* @__PURE__ */ l.jsx(xt, { present: r || s.open, children: s.modal ? /* @__PURE__ */ l.jsx(N0, { ...o, ref: t }) : /* @__PURE__ */ l.jsx(A0, { ...o, ref: t }) });
12551
12571
  }
12552
12572
  );
12553
12573
  Of.displayName = In;
12554
12574
  var N0 = f.forwardRef(
12555
12575
  (e, t) => {
12556
- const n = Ht(In, e.__scopeDialog), r = f.useRef(null), o = Re(t, n.contentRef, r);
12576
+ const n = Wt(In, e.__scopeDialog), r = f.useRef(null), o = Re(t, n.contentRef, r);
12557
12577
  return f.useEffect(() => {
12558
12578
  const s = r.current;
12559
12579
  if (s) return fa(s);
@@ -12581,7 +12601,7 @@ var N0 = f.forwardRef(
12581
12601
  }
12582
12602
  ), A0 = f.forwardRef(
12583
12603
  (e, t) => {
12584
- const n = Ht(In, e.__scopeDialog), r = f.useRef(!1), o = f.useRef(!1);
12604
+ const n = Wt(In, e.__scopeDialog), r = f.useRef(!1), o = f.useRef(!1);
12585
12605
  return /* @__PURE__ */ l.jsx(
12586
12606
  Mf,
12587
12607
  {
@@ -12604,7 +12624,7 @@ var N0 = f.forwardRef(
12604
12624
  }
12605
12625
  ), Mf = f.forwardRef(
12606
12626
  (e, t) => {
12607
- const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Ht(In, n), c = f.useRef(null), u = Re(t, c);
12627
+ const { __scopeDialog: n, trapFocus: r, onOpenAutoFocus: o, onCloseAutoFocus: s, ...i } = e, a = Wt(In, n), c = f.useRef(null), u = Re(t, c);
12608
12628
  return Qi(), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
12609
12629
  /* @__PURE__ */ l.jsx(
12610
12630
  Zo,
@@ -12637,21 +12657,21 @@ var N0 = f.forwardRef(
12637
12657
  }
12638
12658
  ), Ra = "DialogTitle", Df = f.forwardRef(
12639
12659
  (e, t) => {
12640
- const { __scopeDialog: n, ...r } = e, o = Ht(Ra, n);
12660
+ const { __scopeDialog: n, ...r } = e, o = Wt(Ra, n);
12641
12661
  return /* @__PURE__ */ l.jsx(ge.h2, { id: o.titleId, ...r, ref: t });
12642
12662
  }
12643
12663
  );
12644
12664
  Df.displayName = Ra;
12645
12665
  var Lf = "DialogDescription", Ff = f.forwardRef(
12646
12666
  (e, t) => {
12647
- const { __scopeDialog: n, ...r } = e, o = Ht(Lf, n);
12667
+ const { __scopeDialog: n, ...r } = e, o = Wt(Lf, n);
12648
12668
  return /* @__PURE__ */ l.jsx(ge.p, { id: o.descriptionId, ...r, ref: t });
12649
12669
  }
12650
12670
  );
12651
12671
  Ff.displayName = Lf;
12652
12672
  var Bf = "DialogClose", Hf = f.forwardRef(
12653
12673
  (e, t) => {
12654
- const { __scopeDialog: n, ...r } = e, o = Ht(Bf, n);
12674
+ const { __scopeDialog: n, ...r } = e, o = Wt(Bf, n);
12655
12675
  return /* @__PURE__ */ l.jsx(
12656
12676
  ge.button,
12657
12677
  {
@@ -12801,7 +12821,7 @@ var Zf = Object.freeze({
12801
12821
  )
12802
12822
  );
12803
12823
  Qf.displayName = H0;
12804
- var $0 = Qf, [fs, XT] = Bt("Tooltip", [
12824
+ var $0 = Qf, [fs, XT] = Ut("Tooltip", [
12805
12825
  or
12806
12826
  ]), ps = or(), ep = "TooltipProvider", z0 = 700, Si = "tooltip.open", [U0, Aa] = fs(ep), tp = (e) => {
12807
12827
  const {
@@ -12848,7 +12868,7 @@ var Pr = "Tooltip", [W0, hs] = fs(Pr), np = (e) => {
12848
12868
  onOpenChange: s,
12849
12869
  disableHoverableContent: i,
12850
12870
  delayDuration: a
12851
- } = e, c = Aa(Pr, e.__scopeTooltip), u = ps(t), [d, p] = f.useState(null), h = Ot(), x = f.useRef(0), m = i ?? c.disableHoverableContent, v = a ?? c.delayDuration, g = f.useRef(!1), [w, b] = un({
12871
+ } = e, c = Aa(Pr, e.__scopeTooltip), u = ps(t), [d, p] = f.useState(null), h = Ft(), x = f.useRef(0), m = i ?? c.disableHoverableContent, v = a ?? c.delayDuration, g = f.useRef(!1), [w, b] = un({
12852
12872
  prop: r,
12853
12873
  defaultProp: o ?? !1,
12854
12874
  onChange: (E) => {
@@ -12923,7 +12943,7 @@ var V0 = "TooltipPortal", [qT, G0] = fs(V0, {
12923
12943
  }), qn = "TooltipContent", op = f.forwardRef(
12924
12944
  (e, t) => {
12925
12945
  const n = G0(qn, e.__scopeTooltip), { forceMount: r = n.forceMount, side: o = "top", ...s } = e, i = hs(qn, e.__scopeTooltip);
12926
- return /* @__PURE__ */ l.jsx(gt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ l.jsx(sp, { side: o, ...s, ref: t }) : /* @__PURE__ */ l.jsx(K0, { side: o, ...s, ref: t }) });
12946
+ return /* @__PURE__ */ l.jsx(xt, { present: r || i.open, children: i.disableHoverableContent ? /* @__PURE__ */ l.jsx(sp, { side: o, ...s, ref: t }) : /* @__PURE__ */ l.jsx(K0, { side: o, ...s, ref: t }) });
12927
12947
  }
12928
12948
  ), K0 = f.forwardRef((e, t) => {
12929
12949
  const n = hs(qn, e.__scopeTooltip), r = Aa(qn, e.__scopeTooltip), o = f.useRef(null), s = Re(t, o), [i, a] = f.useState(null), { trigger: c, onClose: u } = n, d = o.current, { onPointerInTransitChange: p } = r, h = f.useCallback(() => {
@@ -13673,7 +13693,7 @@ Sp.displayName = NC;
13673
13693
  var Cp = Sp;
13674
13694
  const AC = kr(
13675
13695
  "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
13676
- ), Ct = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13696
+ ), Rt = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13677
13697
  Cp,
13678
13698
  {
13679
13699
  ref: n,
@@ -13681,12 +13701,12 @@ const AC = kr(
13681
13701
  ...t
13682
13702
  }
13683
13703
  ));
13684
- Ct.displayName = Cp.displayName;
13704
+ Rt.displayName = Cp.displayName;
13685
13705
  function Tp(e) {
13686
13706
  const t = f.useRef({ value: e, previous: e });
13687
13707
  return f.useMemo(() => (t.current.value !== e && (t.current.previous = t.current.value, t.current.value = e), t.current.previous), [e]);
13688
13708
  }
13689
- var gs = "Switch", [jC, ZT] = Bt(gs), [PC, kC] = jC(gs), Ep = f.forwardRef(
13709
+ var gs = "Switch", [jC, ZT] = Ut(gs), [PC, kC] = jC(gs), Ep = f.forwardRef(
13690
13710
  (e, t) => {
13691
13711
  const {
13692
13712
  __scopeSwitch: n,
@@ -13823,7 +13843,7 @@ const an = f.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ l.jsx(
13823
13843
  }
13824
13844
  ));
13825
13845
  an.displayName = jp.displayName;
13826
- var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Select", [vs, xs, LC] = Zi(Nn), [sr, QT] = Bt(Nn, [
13846
+ var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Select", [vs, xs, LC] = Zi(Nn), [sr, QT] = Ut(Nn, [
13827
13847
  LC,
13828
13848
  or
13829
13849
  ]), bs = or(), [FC, gn] = sr(Nn), [BC, HC] = sr(Nn), Pp = (e) => {
@@ -13864,7 +13884,7 @@ var MC = [" ", "Enter", "ArrowUp", "ArrowDown"], DC = [" ", "Enter"], Nn = "Sele
13864
13884
  onValueNodeChange: y,
13865
13885
  valueNodeHasChildren: R,
13866
13886
  onValueNodeHasChildrenChange: S,
13867
- contentId: Ot(),
13887
+ contentId: Ft(),
13868
13888
  value: j,
13869
13889
  onValueChange: P,
13870
13890
  open: E,
@@ -13960,7 +13980,7 @@ _p.displayName = kp;
13960
13980
  var Op = "SelectValue", Mp = f.forwardRef(
13961
13981
  (e, t) => {
13962
13982
  const { __scopeSelect: n, className: r, style: o, children: s, placeholder: i = "", ...a } = e, c = gn(Op, n), { onValueNodeHasChildrenChange: u } = c, d = s !== void 0, p = Re(t, c.onValueNodeChange);
13963
- return nt(() => {
13983
+ return ot(() => {
13964
13984
  u(d);
13965
13985
  }, [u, d]), /* @__PURE__ */ l.jsx(
13966
13986
  ge.span,
@@ -13986,7 +14006,7 @@ Lp.displayName = zC;
13986
14006
  var An = "SelectContent", Fp = f.forwardRef(
13987
14007
  (e, t) => {
13988
14008
  const n = gn(An, e.__scopeSelect), [r, o] = f.useState();
13989
- if (nt(() => {
14009
+ if (ot(() => {
13990
14010
  o(new DocumentFragment());
13991
14011
  }, []), !n.open) {
13992
14012
  const s = r;
@@ -13999,7 +14019,7 @@ var An = "SelectContent", Fp = f.forwardRef(
13999
14019
  }
14000
14020
  );
14001
14021
  Fp.displayName = An;
14002
- var kt = 10, [Bp, vn] = sr(An), UC = "SelectContentImpl", WC = Gn("SelectContent.RemoveScroll"), Hp = f.forwardRef(
14022
+ var Dt = 10, [Bp, vn] = sr(An), UC = "SelectContentImpl", WC = Gn("SelectContent.RemoveScroll"), Hp = f.forwardRef(
14003
14023
  (e, t) => {
14004
14024
  const {
14005
14025
  __scopeSelect: n,
@@ -14175,44 +14195,44 @@ var VC = "SelectItemAlignedPosition", $p = f.forwardRef((e, t) => {
14175
14195
  if (s.trigger && s.valueNode && a && u && v && g && w) {
14176
14196
  const E = s.trigger.getBoundingClientRect(), I = u.getBoundingClientRect(), j = s.valueNode.getBoundingClientRect(), P = w.getBoundingClientRect();
14177
14197
  if (s.dir !== "rtl") {
14178
- const ce = P.left - I.left, ie = j.left - ce, Oe = E.left - ie, ue = E.width + Oe, Ae = Math.max(ue, I.width), le = window.innerWidth - kt, fe = wi(ie, [
14179
- kt,
14198
+ const ce = P.left - I.left, ie = j.left - ce, Me = E.left - ie, ue = E.width + Me, Ae = Math.max(ue, I.width), le = window.innerWidth - Dt, fe = wi(ie, [
14199
+ Dt,
14180
14200
  // Prevents the content from going off the starting edge of the
14181
14201
  // viewport. It may still go off the ending edge, but this can be
14182
14202
  // controlled by the user since they may want to manage overflow in a
14183
14203
  // specific way.
14184
14204
  // https://github.com/radix-ui/primitives/issues/2049
14185
- Math.max(kt, le - Ae)
14205
+ Math.max(Dt, le - Ae)
14186
14206
  ]);
14187
14207
  a.style.minWidth = ue + "px", a.style.left = fe + "px";
14188
14208
  } else {
14189
- const ce = I.right - P.right, ie = window.innerWidth - j.right - ce, Oe = window.innerWidth - E.right - ie, ue = E.width + Oe, Ae = Math.max(ue, I.width), le = window.innerWidth - kt, fe = wi(ie, [
14190
- kt,
14191
- Math.max(kt, le - Ae)
14209
+ const ce = I.right - P.right, ie = window.innerWidth - j.right - ce, Me = window.innerWidth - E.right - ie, ue = E.width + Me, Ae = Math.max(ue, I.width), le = window.innerWidth - Dt, fe = wi(ie, [
14210
+ Dt,
14211
+ Math.max(Dt, le - Ae)
14192
14212
  ]);
14193
14213
  a.style.minWidth = ue + "px", a.style.right = fe + "px";
14194
14214
  }
14195
- const D = h(), H = window.innerHeight - kt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), _ = parseInt(N.borderTopWidth, 10), M = parseInt(N.paddingTop, 10), V = parseInt(N.borderBottomWidth, 10), F = parseInt(N.paddingBottom, 10), O = _ + M + G + F + V, z = Math.min(g.offsetHeight * 5, O), Q = window.getComputedStyle(v), ae = parseInt(Q.paddingTop, 10), U = parseInt(Q.paddingBottom, 10), ee = E.top + E.height / 2 - kt, pe = H - ee, we = g.offsetHeight / 2, X = g.offsetTop + we, k = _ + M + X, J = O - k;
14215
+ const D = h(), H = window.innerHeight - Dt * 2, G = v.scrollHeight, N = window.getComputedStyle(u), _ = parseInt(N.borderTopWidth, 10), M = parseInt(N.paddingTop, 10), V = parseInt(N.borderBottomWidth, 10), F = parseInt(N.paddingBottom, 10), O = _ + M + G + F + V, z = Math.min(g.offsetHeight * 5, O), Q = window.getComputedStyle(v), ae = parseInt(Q.paddingTop, 10), U = parseInt(Q.paddingBottom, 10), ee = E.top + E.height / 2 - Dt, pe = H - ee, we = g.offsetHeight / 2, X = g.offsetTop + we, k = _ + M + X, J = O - k;
14196
14216
  if (k <= ee) {
14197
14217
  const ce = D.length > 0 && g === D[D.length - 1].ref.current;
14198
14218
  a.style.bottom = "0px";
14199
- const ie = u.clientHeight - v.offsetTop - v.offsetHeight, Oe = Math.max(
14219
+ const ie = u.clientHeight - v.offsetTop - v.offsetHeight, Me = Math.max(
14200
14220
  pe,
14201
14221
  we + // viewport might have padding bottom, include it to avoid a scrollable viewport
14202
14222
  (ce ? U : 0) + ie + V
14203
- ), ue = k + Oe;
14223
+ ), ue = k + Me;
14204
14224
  a.style.height = ue + "px";
14205
14225
  } else {
14206
14226
  const ce = D.length > 0 && g === D[0].ref.current;
14207
14227
  a.style.top = "0px";
14208
- const Oe = Math.max(
14228
+ const Me = Math.max(
14209
14229
  ee,
14210
14230
  _ + v.offsetTop + // viewport might have padding top, include it to avoid a scrollable viewport
14211
14231
  (ce ? ae : 0) + we
14212
14232
  ) + J;
14213
- a.style.height = Oe + "px", v.scrollTop = k - ee + v.offsetTop;
14233
+ a.style.height = Me + "px", v.scrollTop = k - ee + v.offsetTop;
14214
14234
  }
14215
- a.style.margin = `${kt}px 0`, a.style.minHeight = z + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => x.current = !0);
14235
+ a.style.margin = `${Dt}px 0`, a.style.minHeight = z + "px", a.style.maxHeight = H + "px", r == null || r(), requestAnimationFrame(() => x.current = !0);
14216
14236
  }
14217
14237
  }, [
14218
14238
  h,
@@ -14226,9 +14246,9 @@ var VC = "SelectItemAlignedPosition", $p = f.forwardRef((e, t) => {
14226
14246
  s.dir,
14227
14247
  r
14228
14248
  ]);
14229
- nt(() => y(), [y]);
14249
+ ot(() => y(), [y]);
14230
14250
  const [R, S] = f.useState();
14231
- nt(() => {
14251
+ ot(() => {
14232
14252
  u && S(window.getComputedStyle(u).zIndex);
14233
14253
  }, [u]);
14234
14254
  const C = f.useCallback(
@@ -14279,7 +14299,7 @@ var GC = "SelectPopperPosition", Ti = f.forwardRef((e, t) => {
14279
14299
  const {
14280
14300
  __scopeSelect: n,
14281
14301
  align: r = "start",
14282
- collisionPadding: o = kt,
14302
+ collisionPadding: o = Dt,
14283
14303
  ...s
14284
14304
  } = e, i = bs(n);
14285
14305
  return /* @__PURE__ */ l.jsx(
@@ -14342,7 +14362,7 @@ var [KC, ja] = sr(An, {}), Ei = "SelectViewport", zp = f.forwardRef(
14342
14362
  if (h != null && h.current && p) {
14343
14363
  const x = Math.abs(c.current - d.scrollTop);
14344
14364
  if (x > 0) {
14345
- const m = window.innerHeight - kt * 2, v = parseFloat(p.style.minHeight), g = parseFloat(p.style.height), w = Math.max(v, g);
14365
+ const m = window.innerHeight - Dt * 2, v = parseFloat(p.style.minHeight), g = parseFloat(p.style.height), w = Math.max(v, g);
14346
14366
  if (w < m) {
14347
14367
  const b = w + x, y = Math.min(m, b), R = b - y;
14348
14368
  p.style.height = y + "px", p.style.bottom === "0px" && (d.scrollTop = R > 0 ? R : 0, p.style.justifyContent = "flex-end");
@@ -14359,7 +14379,7 @@ var [KC, ja] = sr(An, {}), Ei = "SelectViewport", zp = f.forwardRef(
14359
14379
  zp.displayName = Ei;
14360
14380
  var Up = "SelectGroup", [YC, XC] = sr(Up), qC = f.forwardRef(
14361
14381
  (e, t) => {
14362
- const { __scopeSelect: n, ...r } = e, o = Ot();
14382
+ const { __scopeSelect: n, ...r } = e, o = Ft();
14363
14383
  return /* @__PURE__ */ l.jsx(YC, { scope: n, id: o, children: /* @__PURE__ */ l.jsx(ge.div, { role: "group", "aria-labelledby": o, ...r, ref: t }) });
14364
14384
  }
14365
14385
  );
@@ -14385,7 +14405,7 @@ var Fo = "SelectItem", [JC, Gp] = sr(Fo), Kp = f.forwardRef(
14385
14405
  var y;
14386
14406
  return (y = c.itemRefCallback) == null ? void 0 : y.call(c, b, r, o);
14387
14407
  }
14388
- ), v = Ot(), g = f.useRef("touch"), w = () => {
14408
+ ), v = Ft(), g = f.useRef("touch"), w = () => {
14389
14409
  o || (a.onValueChange(r), a.onOpenChange(!1));
14390
14410
  };
14391
14411
  if (r === "")
@@ -14469,7 +14489,7 @@ var pr = "SelectItemText", Yp = f.forwardRef(
14469
14489
  () => /* @__PURE__ */ l.jsx("option", { value: c.value, disabled: c.disabled, children: x }, c.value),
14470
14490
  [c.disabled, c.value, x]
14471
14491
  ), { onNativeOptionAdd: v, onNativeOptionRemove: g } = u;
14472
- return nt(() => (v(m), () => g(m)), [v, g, m]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
14492
+ return ot(() => (v(m), () => g(m)), [v, g, m]), /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
14473
14493
  /* @__PURE__ */ l.jsx(ge.span, { id: c.textId, ...s, ref: h }),
14474
14494
  c.isSelected && i.valueNode && !i.valueNodeHasChildren ? Bo.createPortal(s.children, i.valueNode) : null
14475
14495
  ] });
@@ -14485,7 +14505,7 @@ var Xp = "SelectItemIndicator", qp = f.forwardRef(
14485
14505
  qp.displayName = Xp;
14486
14506
  var Ri = "SelectScrollUpButton", Jp = f.forwardRef((e, t) => {
14487
14507
  const n = vn(Ri, e.__scopeSelect), r = ja(Ri, e.__scopeSelect), [o, s] = f.useState(!1), i = Re(t, r.onScrollButtonChange);
14488
- return nt(() => {
14508
+ return ot(() => {
14489
14509
  if (n.viewport && n.isPositioned) {
14490
14510
  let a = function() {
14491
14511
  const u = c.scrollTop > 0;
@@ -14509,7 +14529,7 @@ var Ri = "SelectScrollUpButton", Jp = f.forwardRef((e, t) => {
14509
14529
  Jp.displayName = Ri;
14510
14530
  var Ii = "SelectScrollDownButton", Zp = f.forwardRef((e, t) => {
14511
14531
  const n = vn(Ii, e.__scopeSelect), r = ja(Ii, e.__scopeSelect), [o, s] = f.useState(!1), i = Re(t, r.onScrollButtonChange);
14512
- return nt(() => {
14532
+ return ot(() => {
14513
14533
  if (n.viewport && n.isPositioned) {
14514
14534
  let a = function() {
14515
14535
  const u = c.scrollHeight - c.clientHeight, d = Math.ceil(c.scrollTop) < u;
@@ -14535,7 +14555,7 @@ var Qp = f.forwardRef((e, t) => {
14535
14555
  const { __scopeSelect: n, onAutoScroll: r, ...o } = e, s = vn("SelectScrollButton", n), i = f.useRef(null), a = xs(n), c = f.useCallback(() => {
14536
14556
  i.current !== null && (window.clearInterval(i.current), i.current = null);
14537
14557
  }, []);
14538
- return f.useEffect(() => () => c(), [c]), nt(() => {
14558
+ return f.useEffect(() => () => c(), [c]), ot(() => {
14539
14559
  var d;
14540
14560
  const u = a().find((p) => p.ref.current === document.activeElement);
14541
14561
  (d = u == null ? void 0 : u.ref.current) == null || d.scrollIntoView({ block: "nearest" });
@@ -14602,7 +14622,7 @@ function nh(e) {
14602
14622
  return e === "" || e === void 0;
14603
14623
  }
14604
14624
  function rh(e) {
14605
- const t = rt(e), n = f.useRef(""), r = f.useRef(0), o = f.useCallback(
14625
+ const t = st(e), n = f.useRef(""), r = f.useRef(0), o = f.useCallback(
14606
14626
  (i) => {
14607
14627
  const a = n.current + i;
14608
14628
  t(a), function c(u) {
@@ -14806,10 +14826,10 @@ const pT = {
14806
14826
  };
14807
14827
  function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14808
14828
  const [r, o] = be(!1), [s, i] = be(!1), [a, c] = be(e), [u, d] = be(!1), { toast: p } = Eu();
14809
- Ze(() => {
14829
+ et(() => {
14810
14830
  const g = JSON.stringify(a) !== JSON.stringify(e);
14811
14831
  d(g);
14812
- }, [a, e]), Ze(() => {
14832
+ }, [a, e]), et(() => {
14813
14833
  c(e);
14814
14834
  }, [e]);
14815
14835
  const h = () => {
@@ -14858,7 +14878,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14858
14878
  ] }) }),
14859
14879
  /* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
14860
14880
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
14861
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "api-url", children: "API Base URL" }),
14881
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "api-url", children: "API Base URL" }),
14862
14882
  /* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
14863
14883
  /* @__PURE__ */ l.jsx(
14864
14884
  jr,
@@ -14876,7 +14896,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14876
14896
  ] })
14877
14897
  ] }),
14878
14898
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
14879
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "enable-auth", children: "Enable Authentication" }),
14899
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "enable-auth", children: "Enable Authentication" }),
14880
14900
  /* @__PURE__ */ l.jsx(
14881
14901
  an,
14882
14902
  {
@@ -14890,7 +14910,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14890
14910
  )
14891
14911
  ] }),
14892
14912
  a.api.enableAuth && /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
14893
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "auth-token", children: "Authentication Token" }),
14913
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "auth-token", children: "Authentication Token" }),
14894
14914
  /* @__PURE__ */ l.jsxs("div", { className: "flex gap-2", children: [
14895
14915
  /* @__PURE__ */ l.jsx(
14896
14916
  jr,
@@ -14925,7 +14945,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14925
14945
  ] }) }),
14926
14946
  /* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
14927
14947
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
14928
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "layout", children: "Layout Style" }),
14948
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "layout", children: "Layout Style" }),
14929
14949
  /* @__PURE__ */ l.jsxs(
14930
14950
  ac,
14931
14951
  {
@@ -14946,7 +14966,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14946
14966
  )
14947
14967
  ] }),
14948
14968
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-2", children: [
14949
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "theme", children: "Theme" }),
14969
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "theme", children: "Theme" }),
14950
14970
  /* @__PURE__ */ l.jsxs(
14951
14971
  ac,
14952
14972
  {
@@ -14969,7 +14989,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14969
14989
  /* @__PURE__ */ l.jsx(Ta, {}),
14970
14990
  /* @__PURE__ */ l.jsxs("div", { className: "space-y-3", children: [
14971
14991
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
14972
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
14992
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "show-timestamps", children: "Show Timestamps" }),
14973
14993
  /* @__PURE__ */ l.jsx(
14974
14994
  an,
14975
14995
  {
@@ -14983,7 +15003,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14983
15003
  )
14984
15004
  ] }),
14985
15005
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
14986
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
15006
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "show-agent-names", children: "Show Agent Names" }),
14987
15007
  /* @__PURE__ */ l.jsx(
14988
15008
  an,
14989
15009
  {
@@ -14997,7 +15017,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
14997
15017
  )
14998
15018
  ] }),
14999
15019
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
15000
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "compact-messages", children: "Compact Messages" }),
15020
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "compact-messages", children: "Compact Messages" }),
15001
15021
  /* @__PURE__ */ l.jsx(
15002
15022
  an,
15003
15023
  {
@@ -15021,7 +15041,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
15021
15041
  /* @__PURE__ */ l.jsxs(yo, { className: "space-y-4", children: [
15022
15042
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
15023
15043
  /* @__PURE__ */ l.jsxs("div", { children: [
15024
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
15044
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "auto-save", children: "Auto-save Conversations" }),
15025
15045
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Automatically save messages to threads" })
15026
15046
  ] }),
15027
15047
  /* @__PURE__ */ l.jsx(
@@ -15038,7 +15058,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
15038
15058
  ] }),
15039
15059
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
15040
15060
  /* @__PURE__ */ l.jsxs("div", { children: [
15041
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "enable-streaming", children: "Enable Streaming" }),
15061
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "enable-streaming", children: "Enable Streaming" }),
15042
15062
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Stream responses in real-time" })
15043
15063
  ] }),
15044
15064
  /* @__PURE__ */ l.jsx(
@@ -15055,7 +15075,7 @@ function eE({ settings: e, onSettingsChange: t, className: n = "" }) {
15055
15075
  ] }),
15056
15076
  /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between", children: [
15057
15077
  /* @__PURE__ */ l.jsxs("div", { children: [
15058
- /* @__PURE__ */ l.jsx(Ct, { htmlFor: "typing-indicator", children: "Typing Indicator" }),
15078
+ /* @__PURE__ */ l.jsx(Rt, { htmlFor: "typing-indicator", children: "Typing Indicator" }),
15059
15079
  /* @__PURE__ */ l.jsx("p", { className: "text-sm text-muted-foreground", children: "Show typing indicator during responses" })
15060
15080
  ] }),
15061
15081
  /* @__PURE__ */ l.jsx(
@@ -15180,7 +15200,7 @@ export {
15180
15200
  ln as chatApiClient,
15181
15201
  tE as default,
15182
15202
  Ag as del,
15183
- Pt as get,
15203
+ Mt as get,
15184
15204
  Rg as getChatToken,
15185
15205
  VT as getCurrentSettings,
15186
15206
  g0 as getDefaultApiConfig,