react-virtuoso 4.12.6 → 4.12.7

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.mjs CHANGED
@@ -1,11 +1,11 @@
1
- import { jsx as z, jsxs as Kt, Fragment as io } from "react/jsx-runtime";
1
+ import { jsx as z, jsxs as Kt, Fragment as so } from "react/jsx-runtime";
2
2
  import H, { createElement as $t } from "react";
3
- import lo from "react-dom";
3
+ import io from "react-dom";
4
4
  const we = 0, zt = 1, qt = 2, En = 4;
5
5
  function ln(t) {
6
6
  return () => t;
7
7
  }
8
- function co(t) {
8
+ function lo(t) {
9
9
  t();
10
10
  }
11
11
  function ne(t, e) {
@@ -14,7 +14,7 @@ function ne(t, e) {
14
14
  function cn(t, e) {
15
15
  return () => t(e);
16
16
  }
17
- function kn(t, e) {
17
+ function co(t, e) {
18
18
  return (n) => t(e, n);
19
19
  }
20
20
  function Me(t) {
@@ -22,12 +22,12 @@ function Me(t) {
22
22
  }
23
23
  function uo(...t) {
24
24
  return () => {
25
- t.map(co);
25
+ t.map(lo);
26
26
  };
27
27
  }
28
28
  function Yt() {
29
29
  }
30
- function ye(t, e) {
30
+ function ve(t, e) {
31
31
  return e(t), t;
32
32
  }
33
33
  function ao(t, e) {
@@ -49,9 +49,9 @@ function lt(t) {
49
49
  return t(En);
50
50
  }
51
51
  function F(t, e) {
52
- return K(t, kn(e, we));
52
+ return K(t, co(e, we));
53
53
  }
54
- function Rt(t, e) {
54
+ function bt(t, e) {
55
55
  const n = t(zt, (o) => {
56
56
  n(), e(o);
57
57
  });
@@ -82,7 +82,7 @@ function P(t) {
82
82
  function E(t) {
83
83
  return (e) => ne(e, t);
84
84
  }
85
- function vt(t) {
85
+ function yt(t) {
86
86
  return (e) => () => {
87
87
  e(t);
88
88
  };
@@ -99,7 +99,7 @@ function x(t, ...e) {
99
99
  }
100
100
  };
101
101
  }
102
- function bt(t, e) {
102
+ function Rt(t, e) {
103
103
  return (n) => (o) => {
104
104
  n(e = t(e, o));
105
105
  };
@@ -124,8 +124,8 @@ function G(...t) {
124
124
  return t.forEach((s, i) => {
125
125
  const l = Math.pow(2, i);
126
126
  K(s, (c) => {
127
- const u = n;
128
- n = n | l, e[i] = c, u !== r && n === r && o && (o(), o = null);
127
+ const a = n;
128
+ n = n | l, e[i] = c, a !== r && n === r && o && (o(), o = null);
129
129
  });
130
130
  }), (s) => (i) => {
131
131
  const l = () => {
@@ -150,7 +150,7 @@ function mo(t) {
150
150
  }
151
151
  };
152
152
  }
153
- function y(t) {
153
+ function v(t) {
154
154
  let e = t;
155
155
  const n = $();
156
156
  return (o, r) => {
@@ -169,7 +169,7 @@ function y(t) {
169
169
  };
170
170
  }
171
171
  function ct(t, e) {
172
- return ye(y(e), (n) => F(t, n));
172
+ return ve(v(e), (n) => F(t, n));
173
173
  }
174
174
  function $() {
175
175
  const t = [];
@@ -192,7 +192,7 @@ function $() {
192
192
  };
193
193
  }
194
194
  function pt(t) {
195
- return ye($(), (e) => F(t, e));
195
+ return ve($(), (e) => F(t, e));
196
196
  }
197
197
  function U(t, e = [], { singleton: n } = { singleton: !0 }) {
198
198
  return {
@@ -253,12 +253,12 @@ const go = {
253
253
  2: "warn"
254
254
  }, Io = () => typeof globalThis > "u" ? window : globalThis, Vt = U(
255
255
  () => {
256
- const t = y(
256
+ const t = v(
257
257
  3
258
258
  /* ERROR */
259
259
  );
260
260
  return {
261
- log: y((n, o, r = 1) => {
261
+ log: v((n, o, r = 1) => {
262
262
  var i;
263
263
  const s = (i = Io().VIRTUOSO_LOG_LEVEL) != null ? i : lt(t);
264
264
  r >= s && console[go[r]](
@@ -280,24 +280,21 @@ function Ht(t, e, n) {
280
280
  }
281
281
  function _e(t, e, n) {
282
282
  const o = H.useRef(null);
283
- let r = (s) => {
283
+ let r = (i) => {
284
284
  };
285
- if (typeof ResizeObserver < "u") {
286
- const s = H.useMemo(() => new ResizeObserver((i) => {
287
- const l = () => {
288
- const c = i[0].target;
289
- c.offsetParent !== null && t(c);
290
- };
291
- n ? l() : requestAnimationFrame(l);
292
- }), [t]);
293
- r = (i) => {
294
- i && e ? (s.observe(i), o.current = i) : (o.current && s.unobserve(o.current), o.current = null);
285
+ const s = H.useMemo(() => typeof ResizeObserver < "u" ? new ResizeObserver((i) => {
286
+ const l = () => {
287
+ const c = i[0].target;
288
+ c.offsetParent !== null && t(c);
295
289
  };
296
- }
297
- return { callbackRef: r, ref: o };
298
- }
299
- function On(t, e, n, o, r, s, i, l, c) {
300
- const u = H.useCallback(
290
+ n ? l() : requestAnimationFrame(l);
291
+ }) : null, [t, n]);
292
+ return r = (i) => {
293
+ i && e ? (s == null || s.observe(i), o.current = i) : (o.current && (s == null || s.unobserve(o.current)), o.current = null);
294
+ }, { callbackRef: r, ref: o };
295
+ }
296
+ function kn(t, e, n, o, r, s, i, l, c) {
297
+ const a = H.useCallback(
301
298
  (f) => {
302
299
  const S = So(f.children, e, l ? "offsetWidth" : "offsetHeight", r);
303
300
  let p = f.parentElement;
@@ -315,9 +312,9 @@ function On(t, e, n, o, r, s, i, l, c) {
315
312
  l ? dn("column-gap", getComputedStyle(f).columnGap, r) : dn("row-gap", getComputedStyle(f).rowGap, r)
316
313
  ), S !== null && t(S);
317
314
  },
318
- [t, e, r, s, i, o]
315
+ [t, e, r, s, i, o, l]
319
316
  );
320
- return _e(u, n, c);
317
+ return _e(a, n, c);
321
318
  }
322
319
  function So(t, e, n, o) {
323
320
  const r = t.length;
@@ -328,8 +325,8 @@ function So(t, e, n, o) {
328
325
  const l = t.item(i);
329
326
  if (l.dataset.index === void 0)
330
327
  continue;
331
- const c = parseInt(l.dataset.index), u = parseFloat(l.dataset.knownSize), f = e(l, n);
332
- if (f === 0 && o("Zero-sized element, this should not happen", { child: l }, ht.ERROR), f === u)
328
+ const c = parseInt(l.dataset.index), a = parseFloat(l.dataset.knownSize), f = e(l, n);
329
+ if (f === 0 && o("Zero-sized element, this should not happen", { child: l }, ht.ERROR), f === a)
333
330
  continue;
334
331
  const S = s[s.length - 1];
335
332
  s.length === 0 || S.size !== f || S.endIndex !== c - 1 ? s.push({ endIndex: c, size: f, startIndex: c }) : s[s.length - 1].endIndex++;
@@ -344,14 +341,14 @@ function Ge(t, e, n) {
344
341
  (c) => {
345
342
  if (!(c != null && c.offsetParent))
346
343
  return;
347
- const u = c.getBoundingClientRect(), f = u.width;
344
+ const a = c.getBoundingClientRect(), f = a.width;
348
345
  let S, p;
349
346
  if (e) {
350
- const m = e.getBoundingClientRect(), w = u.top - m.top;
347
+ const m = e.getBoundingClientRect(), w = a.top - m.top;
351
348
  p = m.height - Math.max(0, w), S = w + e.scrollTop;
352
349
  } else {
353
350
  const m = i.current.ownerDocument.defaultView;
354
- p = m.innerHeight - Math.max(0, u.top), S = u.top + m.scrollY;
351
+ p = m.innerHeight - Math.max(0, a.top), S = a.top + m.scrollY;
355
352
  }
356
353
  o.current = {
357
354
  offsetTop: S,
@@ -359,6 +356,7 @@ function Ge(t, e, n) {
359
356
  visibleWidth: f
360
357
  }, t(o.current);
361
358
  },
359
+ // eslint-disable-next-line react-hooks/exhaustive-deps
362
360
  [t, e]
363
361
  ), { callbackRef: s, ref: i } = _e(r, !0, n), l = H.useCallback(() => {
364
362
  r(i.current);
@@ -367,23 +365,23 @@ function Ge(t, e, n) {
367
365
  var c;
368
366
  if (e) {
369
367
  e.addEventListener("scroll", l);
370
- const u = new ResizeObserver(() => {
368
+ const a = new ResizeObserver(() => {
371
369
  requestAnimationFrame(l);
372
370
  });
373
- return u.observe(e), () => {
374
- e.removeEventListener("scroll", l), u.unobserve(e);
371
+ return a.observe(e), () => {
372
+ e.removeEventListener("scroll", l), a.unobserve(e);
375
373
  };
376
374
  } else {
377
- const u = (c = i.current) == null ? void 0 : c.ownerDocument.defaultView;
378
- return u == null || u.addEventListener("scroll", l), u == null || u.addEventListener("resize", l), () => {
379
- u == null || u.removeEventListener("scroll", l), u == null || u.removeEventListener("resize", l);
375
+ const a = (c = i.current) == null ? void 0 : c.ownerDocument.defaultView;
376
+ return a == null || a.addEventListener("scroll", l), a == null || a.addEventListener("resize", l), () => {
377
+ a == null || a.removeEventListener("scroll", l), a == null || a.removeEventListener("resize", l);
380
378
  };
381
379
  }
382
- }, [l, e]), s;
380
+ }, [l, e, i]), s;
383
381
  }
384
382
  const at = U(
385
383
  () => {
386
- const t = $(), e = $(), n = y(0), o = $(), r = y(0), s = $(), i = $(), l = y(0), c = y(0), u = y(0), f = y(0), S = $(), p = $(), m = y(!1), w = y(!1), I = y(!1);
384
+ const t = $(), e = $(), n = v(0), o = $(), r = v(0), s = $(), i = $(), l = v(0), c = v(0), a = v(0), f = v(0), S = $(), p = $(), m = v(!1), w = v(!1), I = v(!1);
387
385
  return F(
388
386
  x(
389
387
  t,
@@ -398,7 +396,7 @@ const at = U(
398
396
  i
399
397
  ), F(e, r), {
400
398
  deviation: n,
401
- fixedFooterHeight: u,
399
+ fixedFooterHeight: a,
402
400
  fixedHeaderHeight: c,
403
401
  footerHeight: f,
404
402
  headerHeight: l,
@@ -421,7 +419,7 @@ const at = U(
421
419
  [],
422
420
  { singleton: !0 }
423
421
  ), oe = { lvl: 0 };
424
- function Fn(t, e) {
422
+ function On(t, e) {
425
423
  const n = t.length;
426
424
  if (n === 0)
427
425
  return [];
@@ -452,12 +450,12 @@ function Ct(t, e, n = "k") {
452
450
  return Ct(t.l, e, n);
453
451
  }
454
452
  function mt(t, e, n) {
455
- return j(t) ? Vn(e, n, 1) : e === t.k ? ot(t, { k: e, v: n }) : e < t.k ? fn(ot(t, { l: mt(t.l, e, n) })) : fn(ot(t, { r: mt(t.r, e, n) }));
453
+ return j(t) ? zn(e, n, 1) : e === t.k ? ot(t, { k: e, v: n }) : e < t.k ? fn(ot(t, { l: mt(t.l, e, n) })) : fn(ot(t, { r: mt(t.r, e, n) }));
456
454
  }
457
455
  function Ut() {
458
456
  return oe;
459
457
  }
460
- function ve(t, e, n) {
458
+ function ye(t, e, n) {
461
459
  if (j(t))
462
460
  return [];
463
461
  const o = Ct(t, e)[0];
@@ -472,8 +470,8 @@ function Le(t, e) {
472
470
  if (j(r))
473
471
  return o;
474
472
  {
475
- const [s, i] = zn(o);
476
- return ge(ot(t, { k: s, l: Ln(o), v: i }));
473
+ const [s, i] = Ln(o);
474
+ return ge(ot(t, { k: s, l: Fn(o), v: i }));
477
475
  }
478
476
  } else return e < n ? ge(ot(t, { l: Le(o, e) })) : ge(ot(t, { r: Le(r, e) }));
479
477
  }
@@ -493,7 +491,7 @@ function ge(t) {
493
491
  return t;
494
492
  if (n > o.lvl + 1) {
495
493
  if (Ee(e))
496
- return Pn(ot(t, { lvl: n - 1 }));
494
+ return Vn(ot(t, { lvl: n - 1 }));
497
495
  if (!j(e) && !j(e.r))
498
496
  return ot(e.r, {
499
497
  l: ot(e, { r: e.r.l }),
@@ -522,7 +520,7 @@ function ge(t) {
522
520
  }
523
521
  }
524
522
  function ot(t, e) {
525
- return Vn(
523
+ return zn(
526
524
  e.k !== void 0 ? e.k : t.k,
527
525
  e.v !== void 0 ? e.v : t.v,
528
526
  e.lvl !== void 0 ? e.lvl : t.lvl,
@@ -530,22 +528,22 @@ function ot(t, e) {
530
528
  e.r !== void 0 ? e.r : t.r
531
529
  );
532
530
  }
533
- function Ln(t) {
534
- return j(t.r) ? t.l : ge(ot(t, { r: Ln(t.r) }));
531
+ function Fn(t) {
532
+ return j(t.r) ? t.l : ge(ot(t, { r: Fn(t.r) }));
535
533
  }
536
534
  function Ee(t) {
537
535
  return j(t) || t.lvl > t.r.lvl;
538
536
  }
539
- function zn(t) {
540
- return j(t.r) ? [t.k, t.v] : zn(t.r);
537
+ function Ln(t) {
538
+ return j(t.r) ? [t.k, t.v] : Ln(t.r);
541
539
  }
542
- function Vn(t, e, n, o = oe, r = oe) {
540
+ function zn(t, e, n, o = oe, r = oe) {
543
541
  return { k: t, l: o, lvl: n, r, v: e };
544
542
  }
545
543
  function fn(t) {
546
- return Ve(Pn(t));
544
+ return Ve(Vn(t));
547
545
  }
548
- function Pn(t) {
546
+ function Vn(t) {
549
547
  const { l: e } = t;
550
548
  return !j(e) && e.lvl === t.lvl ? ot(e, { r: ot(t, { l: e.r }) }) : t;
551
549
  }
@@ -554,20 +552,20 @@ function Ve(t) {
554
552
  return !j(n) && !j(n.r) && n.lvl === e && n.r.lvl === e ? ot(n, { l: ot(t, { r: n.l }), lvl: e + 1 }) : t;
555
553
  }
556
554
  function xo(t) {
557
- return Fn(t, ({ k: e, v: n }) => ({ index: e, value: n }));
555
+ return On(t, ({ k: e, v: n }) => ({ index: e, value: n }));
558
556
  }
559
- function An(t, e) {
557
+ function Pn(t, e) {
560
558
  return !!(t && t.startIndex === e.startIndex && t.endIndex === e.endIndex);
561
559
  }
562
560
  function se(t, e) {
563
561
  return !!(t && t[0] === e[0] && t[1] === e[1]);
564
562
  }
565
563
  const Ne = U(
566
- () => ({ recalcInProgress: y(!1) }),
564
+ () => ({ recalcInProgress: v(!1) }),
567
565
  [],
568
566
  { singleton: !0 }
569
567
  );
570
- function Mn(t, e, n) {
568
+ function An(t, e, n) {
571
569
  return t[Se(t, e, n)];
572
570
  }
573
571
  function Se(t, e, n, o = 0) {
@@ -595,7 +593,7 @@ function To(t, e, n, o) {
595
593
  function wt(t, e) {
596
594
  return Math.round(t.getBoundingClientRect()[e]);
597
595
  }
598
- function be(t) {
596
+ function Re(t) {
599
597
  return !j(t.groupOffsetTree);
600
598
  }
601
599
  function De({ index: t }, e) {
@@ -620,49 +618,49 @@ function wo(t, e) {
620
618
  t = mt(t, 0, s);
621
619
  continue;
622
620
  }
623
- const l = ve(t, i - 1, r + 1);
624
- if (l.some(ko(o)))
621
+ const l = ye(t, i - 1, r + 1);
622
+ if (l.some(Bo(o)))
625
623
  continue;
626
- let c = !1, u = !1;
624
+ let c = !1, a = !1;
627
625
  for (const { end: f, start: S, value: p } of l)
628
- c ? (r >= S || s === p) && (t = Le(t, S)) : (u = p !== s, c = !0), f > r && r >= S && p !== s && (t = mt(t, r + 1, p));
629
- u && (t = mt(t, i, s));
626
+ c ? (r >= S || s === p) && (t = Le(t, S)) : (a = p !== s, c = !0), f > r && r >= S && p !== s && (t = mt(t, r + 1, p));
627
+ a && (t = mt(t, i, s));
630
628
  }
631
629
  return [t, n];
632
630
  }
633
- function yo(t) {
631
+ function vo(t) {
634
632
  return typeof t.groupIndex < "u";
635
633
  }
636
- function vo({ offset: t }, e) {
634
+ function yo({ offset: t }, e) {
637
635
  return e === t ? 0 : e < t ? -1 : 1;
638
636
  }
639
637
  function ie(t, e, n) {
640
638
  if (e.length === 0)
641
639
  return 0;
642
- const { index: o, offset: r, size: s } = Mn(e, t, De), i = t - o, l = s * i + (i - 1) * n + r;
640
+ const { index: o, offset: r, size: s } = An(e, t, De), i = t - o, l = s * i + (i - 1) * n + r;
643
641
  return l > 0 ? l + n : l;
644
642
  }
645
- function Wn(t, e) {
646
- if (!be(e))
643
+ function Mn(t, e) {
644
+ if (!Re(e))
647
645
  return t;
648
646
  let n = 0;
649
647
  for (; e.groupIndices[n] <= t + n; )
650
648
  n++;
651
649
  return t + n;
652
650
  }
653
- function _n(t, e, n) {
654
- if (yo(t))
651
+ function Wn(t, e, n) {
652
+ if (vo(t))
655
653
  return e.groupIndices[t.groupIndex] + 1;
656
654
  {
657
655
  const o = t.index === "LAST" ? n : t.index;
658
- let r = Wn(o, e);
656
+ let r = Mn(o, e);
659
657
  return r = Math.max(0, r, Math.min(n, r)), r;
660
658
  }
661
659
  }
662
- function bo(t, e, n, o = 0) {
663
- return o > 0 && (e = Math.max(e, Mn(t, o, De).offset)), Fn(To(t, e, n, vo), Eo);
660
+ function Ro(t, e, n, o = 0) {
661
+ return o > 0 && (e = Math.max(e, An(t, o, De).offset)), On(To(t, e, n, yo), Eo);
664
662
  }
665
- function Ro(t, [e, n, o, r]) {
663
+ function bo(t, [e, n, o, r]) {
666
664
  e.length > 0 && o("received item sizes", e, ht.DEBUG);
667
665
  const s = t.sizeTree;
668
666
  let i = s, l = 0;
@@ -673,12 +671,12 @@ function Ro(t, [e, n, o, r]) {
673
671
  [i, l] = wo(i, e);
674
672
  if (i === s)
675
673
  return t;
676
- const { lastIndex: c, lastOffset: u, lastSize: f, offsetTree: S } = Pe(t.offsetTree, l, i, r);
674
+ const { lastIndex: c, lastOffset: a, lastSize: f, offsetTree: S } = Pe(t.offsetTree, l, i, r);
677
675
  return {
678
676
  groupIndices: n,
679
677
  groupOffsetTree: n.reduce((p, m) => mt(p, m, ie(m, S, r)), Ut()),
680
678
  lastIndex: c,
681
- lastOffset: u,
679
+ lastOffset: a,
682
680
  lastSize: f,
683
681
  offsetTree: S,
684
682
  sizeTree: i
@@ -704,13 +702,13 @@ function Pe(t, e, n, o) {
704
702
  s = f[0], i = f[1], r.length && r[c].size === Ct(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
705
703
  } else
706
704
  r = [];
707
- for (const { start: u, value: f } of ve(n, e, 1 / 0)) {
708
- const S = u - s, p = S * i + l + S * o;
705
+ for (const { start: a, value: f } of ye(n, e, 1 / 0)) {
706
+ const S = a - s, p = S * i + l + S * o;
709
707
  r.push({
710
- index: u,
708
+ index: a,
711
709
  offset: p,
712
710
  size: f
713
- }), s = u, l = p, i = f;
711
+ }), s = a, l = p, i = f;
714
712
  }
715
713
  return {
716
714
  lastIndex: s,
@@ -722,23 +720,23 @@ function Pe(t, e, n, o) {
722
720
  function Eo(t) {
723
721
  return { index: t.index, value: t };
724
722
  }
725
- function ko(t) {
723
+ function Bo(t) {
726
724
  const { endIndex: e, size: n, startIndex: o } = t;
727
725
  return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
728
726
  }
729
- const Bo = {
727
+ const ko = {
730
728
  offsetHeight: "height",
731
729
  offsetWidth: "width"
732
730
  }, Et = U(
733
731
  ([{ log: t }, { recalcInProgress: e }]) => {
734
- const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l = y(0), c = y([]), u = y(void 0), f = y(void 0), S = y((h, d) => wt(h, Bo[d])), p = y(void 0), m = y(0), w = Co(), I = ct(
735
- x(n, G(c, t, m), bt(Ro, w), Y()),
732
+ const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l = v(0), c = v([]), a = v(void 0), f = v(void 0), S = v((h, d) => wt(h, ko[d])), p = v(void 0), m = v(0), w = Co(), I = ct(
733
+ x(n, G(c, t, m), Rt(bo, w), Y()),
736
734
  w
737
735
  ), C = ct(
738
736
  x(
739
737
  c,
740
738
  Y(),
741
- bt((h, d) => ({ current: d, prev: h.current }), {
739
+ Rt((h, d) => ({ current: d, prev: h.current }), {
742
740
  current: [],
743
741
  prev: []
744
742
  }),
@@ -751,12 +749,12 @@ const Bo = {
751
749
  c,
752
750
  P((h) => h.length > 0),
753
751
  G(I, m),
754
- E(([h, d, R]) => {
755
- const B = h.reduce((O, L, V) => mt(O, L, ie(L, d.offsetTree, R) || V), Ut());
752
+ E(([h, d, b]) => {
753
+ const k = h.reduce((O, L, V) => mt(O, L, ie(L, d.offsetTree, b) || V), Ut());
756
754
  return {
757
755
  ...d,
758
756
  groupIndices: h,
759
- groupOffsetTree: B
757
+ groupOffsetTree: k
760
758
  };
761
759
  })
762
760
  ),
@@ -766,19 +764,19 @@ const Bo = {
766
764
  o,
767
765
  G(I),
768
766
  P(([h, { lastIndex: d }]) => h < d),
769
- E(([h, { lastIndex: d, lastSize: R }]) => [
767
+ E(([h, { lastIndex: d, lastSize: b }]) => [
770
768
  {
771
769
  endIndex: d,
772
- size: R,
770
+ size: b,
773
771
  startIndex: h
774
772
  }
775
773
  ])
776
774
  ),
777
775
  n
778
- ), F(u, f);
776
+ ), F(a, f);
779
777
  const g = ct(
780
778
  x(
781
- u,
779
+ a,
782
780
  E((h) => h === void 0)
783
781
  ),
784
782
  !0
@@ -791,14 +789,14 @@ const Bo = {
791
789
  ),
792
790
  n
793
791
  );
794
- const a = pt(
792
+ const u = pt(
795
793
  x(
796
794
  n,
797
795
  G(I),
798
- bt(
799
- ({ sizes: h }, [d, R]) => ({
800
- changed: R !== h,
801
- sizes: R
796
+ Rt(
797
+ ({ sizes: h }, [d, b]) => ({
798
+ changed: b !== h,
799
+ sizes: b
802
800
  }),
803
801
  { changed: !1, sizes: w }
804
802
  ),
@@ -808,7 +806,7 @@ const Bo = {
808
806
  K(
809
807
  x(
810
808
  l,
811
- bt(
809
+ Rt(
812
810
  (h, d) => ({ diff: h.prev - d, prev: d }),
813
811
  { diff: 0, prev: 0 }
814
812
  ),
@@ -819,8 +817,8 @@ const Bo = {
819
817
  if (h > 0)
820
818
  W(e, !0), W(s, h + mn(h, d));
821
819
  else if (h < 0) {
822
- const R = lt(C);
823
- R.length > 0 && (h -= mn(-h, R)), W(i, h);
820
+ const b = lt(C);
821
+ b.length > 0 && (h -= mn(-h, b)), W(i, h);
824
822
  }
825
823
  }
826
824
  ), K(x(l, G(t)), ([h, d]) => {
@@ -836,32 +834,32 @@ const Bo = {
836
834
  s,
837
835
  G(I),
838
836
  E(([h, d]) => {
839
- const R = d.groupIndices.length > 0, B = [], O = d.lastSize;
840
- if (R) {
837
+ const b = d.groupIndices.length > 0, k = [], O = d.lastSize;
838
+ if (b) {
841
839
  const L = re(d.sizeTree, 0);
842
840
  let V = 0, D = 0;
843
841
  for (; V < h; ) {
844
- const k = d.groupIndices[D], q = d.groupIndices.length === D + 1 ? 1 / 0 : d.groupIndices[D + 1] - k - 1;
845
- B.push({
846
- endIndex: k,
842
+ const B = d.groupIndices[D], q = d.groupIndices.length === D + 1 ? 1 / 0 : d.groupIndices[D + 1] - B - 1;
843
+ k.push({
844
+ endIndex: B,
847
845
  size: L,
848
- startIndex: k
849
- }), B.push({
850
- endIndex: k + 1 + q - 1,
846
+ startIndex: B
847
+ }), k.push({
848
+ endIndex: B + 1 + q - 1,
851
849
  size: O,
852
- startIndex: k + 1
850
+ startIndex: B + 1
853
851
  }), D++, V += q + 1;
854
852
  }
855
853
  const J = _t(d.sizeTree);
856
854
  return V !== h && J.shift(), J.reduce(
857
- (k, { k: q, v: st }) => {
858
- let dt = k.ranges;
859
- return k.prevSize !== 0 && (dt = [
860
- ...k.ranges,
855
+ (B, { k: q, v: st }) => {
856
+ let dt = B.ranges;
857
+ return B.prevSize !== 0 && (dt = [
858
+ ...B.ranges,
861
859
  {
862
860
  endIndex: q + h - 1,
863
- size: k.prevSize,
864
- startIndex: k.prevIndex
861
+ size: B.prevSize,
862
+ startIndex: B.prevIndex
865
863
  }
866
864
  ]), {
867
865
  prevIndex: q + h,
@@ -872,7 +870,7 @@ const Bo = {
872
870
  {
873
871
  prevIndex: h,
874
872
  prevSize: 0,
875
- ranges: B
873
+ ranges: k
876
874
  }
877
875
  ).ranges;
878
876
  }
@@ -892,13 +890,13 @@ const Bo = {
892
890
  ),
893
891
  n
894
892
  );
895
- const b = pt(
893
+ const R = pt(
896
894
  x(
897
895
  i,
898
896
  G(I, m),
899
- E(([h, { offsetTree: d }, R]) => {
900
- const B = -h;
901
- return ie(B, d, R);
897
+ E(([h, { offsetTree: d }, b]) => {
898
+ const k = -h;
899
+ return ie(k, d, b);
902
900
  })
903
901
  )
904
902
  );
@@ -906,7 +904,7 @@ const Bo = {
906
904
  x(
907
905
  i,
908
906
  G(I, m),
909
- E(([h, d, R]) => {
907
+ E(([h, d, b]) => {
910
908
  if (d.groupIndices.length > 0) {
911
909
  if (j(d.sizeTree))
912
910
  return d;
@@ -915,26 +913,26 @@ const Bo = {
915
913
  let V = 0, D = 0, J = 0;
916
914
  for (; V < -h; ) {
917
915
  J = L[D];
918
- const k = L[D + 1] - J - 1;
919
- D++, V += k + 1;
916
+ const B = L[D + 1] - J - 1;
917
+ D++, V += B + 1;
920
918
  }
921
- if (O = _t(d.sizeTree).reduce((k, { k: q, v: st }) => mt(k, Math.max(0, q + h), st), O), V !== -h) {
922
- const k = re(d.sizeTree, J);
923
- O = mt(O, 0, k);
919
+ if (O = _t(d.sizeTree).reduce((B, { k: q, v: st }) => mt(B, Math.max(0, q + h), st), O), V !== -h) {
920
+ const B = re(d.sizeTree, J);
921
+ O = mt(O, 0, B);
924
922
  const q = Ct(d.sizeTree, -h + 1)[1];
925
923
  O = mt(O, 1, q);
926
924
  }
927
925
  return {
928
926
  ...d,
929
927
  sizeTree: O,
930
- ...Pe(d.offsetTree, 0, O, R)
928
+ ...Pe(d.offsetTree, 0, O, b)
931
929
  };
932
930
  } else {
933
931
  const O = _t(d.sizeTree).reduce((L, { k: V, v: D }) => mt(L, Math.max(0, V + h), D), Ut());
934
932
  return {
935
933
  ...d,
936
934
  sizeTree: O,
937
- ...Pe(d.offsetTree, 0, O, R)
935
+ ...Pe(d.offsetTree, 0, O, b)
938
936
  };
939
937
  }
940
938
  })
@@ -946,13 +944,13 @@ const Bo = {
946
944
  data: p,
947
945
  defaultItemSize: f,
948
946
  firstItemIndex: l,
949
- fixedItemSize: u,
947
+ fixedItemSize: a,
950
948
  gap: m,
951
949
  groupIndices: c,
952
950
  itemSize: S,
953
- listRefresh: a,
951
+ listRefresh: u,
954
952
  shiftWith: i,
955
- shiftWithOffset: b,
953
+ shiftWithOffset: R,
956
954
  sizeRanges: n,
957
955
  // output
958
956
  sizes: I,
@@ -974,7 +972,7 @@ function Oo(t) {
974
972
  }
975
973
  );
976
974
  }
977
- const Gn = U(
975
+ const _n = U(
978
976
  ([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
979
977
  const s = $(), i = $(), l = pt(x(s, E(Oo)));
980
978
  return F(
@@ -992,8 +990,8 @@ const Gn = U(
992
990
  ), F(
993
991
  x(
994
992
  rt(r, e, o),
995
- P(([c, u]) => be(u)),
996
- E(([c, u, f]) => Ct(u.groupOffsetTree, Math.max(c - f, 0), "v")[0]),
993
+ P(([c, a]) => Re(a)),
994
+ E(([c, a, f]) => Ct(a.groupOffsetTree, Math.max(c - f, 0), "v")[0]),
997
995
  Y(),
998
996
  E((c) => [c])
999
997
  ),
@@ -1003,7 +1001,7 @@ const Gn = U(
1003
1001
  X(Et, at)
1004
1002
  ), Pt = U(
1005
1003
  ([{ log: t }]) => {
1006
- const e = y(!1), n = pt(
1004
+ const e = v(!1), n = pt(
1007
1005
  x(
1008
1006
  e,
1009
1007
  P((o) => o),
@@ -1017,7 +1015,7 @@ const Gn = U(
1017
1015
  X(Vt),
1018
1016
  { singleton: !0 }
1019
1017
  ), Fo = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1020
- function Nn(t) {
1018
+ function Gn(t) {
1021
1019
  const e = typeof t == "number" ? { index: t } : t;
1022
1020
  return e.align || (e.align = "start"), (!e.behavior || !Fo) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
1023
1021
  }
@@ -1030,16 +1028,16 @@ const ce = U(
1030
1028
  footerHeight: i,
1031
1029
  headerHeight: l,
1032
1030
  scrollingInProgress: c,
1033
- scrollTo: u,
1031
+ scrollTo: a,
1034
1032
  smoothScrollTargetReached: f,
1035
1033
  viewportHeight: S
1036
1034
  },
1037
1035
  { log: p }
1038
1036
  ]) => {
1039
- const m = $(), w = $(), I = y(0);
1040
- let C = null, g = null, a = null;
1037
+ const m = $(), w = $(), I = v(0);
1038
+ let C = null, g = null, u = null;
1041
1039
  function T() {
1042
- C && (C(), C = null), a && (a(), a = null), g && (clearTimeout(g), g = null), W(c, !1);
1040
+ C && (C(), C = null), u && (u(), u = null), g && (clearTimeout(g), g = null), W(c, !1);
1043
1041
  }
1044
1042
  return F(
1045
1043
  x(
@@ -1048,33 +1046,33 @@ const ce = U(
1048
1046
  G(t, s, r),
1049
1047
  E(
1050
1048
  ([
1051
- [b, h, d, R, B, O, L, V],
1049
+ [R, h, d, b, k, O, L, V],
1052
1050
  D,
1053
1051
  J,
1054
1052
  nt
1055
1053
  ]) => {
1056
- const k = Nn(b), { align: q, behavior: st, offset: dt } = k, St = R - 1, ft = _n(k, h, St);
1054
+ const B = Gn(R), { align: q, behavior: st, offset: dt } = B, St = b - 1, ft = Wn(B, h, St);
1057
1055
  let ut = ie(ft, h.offsetTree, D) + O;
1058
- q === "end" ? (ut += J + Ct(h.sizeTree, ft)[1] - d + nt, ft === St && (ut += L)) : q === "center" ? ut += (J + Ct(h.sizeTree, ft)[1] - d + nt) / 2 : ut -= B, dt && (ut += dt);
1056
+ q === "end" ? (ut += J + Ct(h.sizeTree, ft)[1] - d + nt, ft === St && (ut += L)) : q === "center" ? ut += (J + Ct(h.sizeTree, ft)[1] - d + nt) / 2 : ut -= k, dt && (ut += dt);
1059
1057
  const At = (xt) => {
1060
- T(), xt ? (V("retrying to scroll to", { location: b }, ht.DEBUG), W(m, b)) : (W(w, !0), V("list did not change, scroll successful", {}, ht.DEBUG));
1058
+ T(), xt ? (V("retrying to scroll to", { location: R }, ht.DEBUG), W(m, R)) : (W(w, !0), V("list did not change, scroll successful", {}, ht.DEBUG));
1061
1059
  };
1062
1060
  if (T(), st === "smooth") {
1063
1061
  let xt = !1;
1064
- a = K(e, (Xt) => {
1062
+ u = K(e, (Xt) => {
1065
1063
  xt = xt || Xt;
1066
- }), C = Rt(f, () => {
1064
+ }), C = bt(f, () => {
1067
1065
  At(xt);
1068
1066
  });
1069
1067
  } else
1070
- C = Rt(x(e, Lo(150)), At);
1068
+ C = bt(x(e, Lo(150)), At);
1071
1069
  return g = setTimeout(() => {
1072
1070
  T();
1073
1071
  }, 1200), W(c, !0), V("scrolling from index to", { behavior: st, index: ft, top: ut }, ht.DEBUG), { behavior: st, top: ut };
1074
1072
  }
1075
1073
  )
1076
1074
  ),
1077
- u
1075
+ a
1078
1076
  ), {
1079
1077
  scrollTargetReached: w,
1080
1078
  scrollToIndex: m,
@@ -1105,13 +1103,13 @@ function Ue(t, e) {
1105
1103
  }
1106
1104
  const ue = U(
1107
1105
  ([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
1108
- const l = y(!0), c = y(0), u = y(!0);
1106
+ const l = v(!0), c = v(0), a = v(!0);
1109
1107
  return F(
1110
1108
  x(
1111
1109
  i,
1112
1110
  G(c),
1113
1111
  P(([f, S]) => !!S),
1114
- vt(!1)
1112
+ yt(!1)
1115
1113
  ),
1116
1114
  l
1117
1115
  ), F(
@@ -1119,27 +1117,27 @@ const ue = U(
1119
1117
  i,
1120
1118
  G(c),
1121
1119
  P(([f, S]) => !!S),
1122
- vt(!1)
1120
+ yt(!1)
1123
1121
  ),
1124
- u
1122
+ a
1125
1123
  ), K(
1126
1124
  x(
1127
1125
  rt(e, i),
1128
- G(l, n, t, u),
1126
+ G(l, n, t, a),
1129
1127
  P(([[, f], S, { sizeTree: p }, m, w]) => f && (!j(p) || Me(m)) && !S && !w),
1130
1128
  G(c)
1131
1129
  ),
1132
1130
  ([, f]) => {
1133
- Rt(r, () => {
1134
- W(u, !0);
1131
+ bt(r, () => {
1132
+ W(a, !0);
1135
1133
  }), $e(4, () => {
1136
- Rt(o, () => {
1134
+ bt(o, () => {
1137
1135
  W(l, !0);
1138
1136
  }), W(s, f);
1139
1137
  });
1140
1138
  }
1141
1139
  ), {
1142
- initialItemFinalLocationReached: u,
1140
+ initialItemFinalLocationReached: a,
1143
1141
  initialTopMostItemIndex: c,
1144
1142
  scrolledToInitialItem: l
1145
1143
  };
@@ -1147,7 +1145,7 @@ const ue = U(
1147
1145
  X(Et, at, ce, Pt),
1148
1146
  { singleton: !0 }
1149
1147
  );
1150
- function Dn(t, e) {
1148
+ function Nn(t, e) {
1151
1149
  return Math.abs(t - e) < 1.01;
1152
1150
  }
1153
1151
  const le = "up", te = "down", zo = "none", Vo = {
@@ -1160,36 +1158,36 @@ const le = "up", te = "down", zo = "none", Vo = {
1160
1158
  viewportHeight: 0
1161
1159
  }
1162
1160
  }, Po = 0, ae = U(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1163
- const i = y(!1), l = y(!0), c = $(), u = $(), f = y(4), S = y(Po), p = ct(
1161
+ const i = v(!1), l = v(!0), c = $(), a = $(), f = v(4), S = v(Po), p = ct(
1164
1162
  x(
1165
- an(x(A(r), jt(1), vt(!0)), x(A(r), jt(1), vt(!1), un(100))),
1163
+ an(x(A(r), jt(1), yt(!0)), x(A(r), jt(1), yt(!1), un(100))),
1166
1164
  Y()
1167
1165
  ),
1168
1166
  !1
1169
1167
  ), m = ct(
1170
- x(an(x(n, vt(!0)), x(n, vt(!1), un(200))), Y()),
1168
+ x(an(x(n, yt(!0)), x(n, yt(!1), un(200))), Y()),
1171
1169
  !1
1172
1170
  );
1173
1171
  F(
1174
1172
  x(
1175
1173
  rt(A(r), A(S)),
1176
- E(([a, T]) => a <= T),
1174
+ E(([u, T]) => u <= T),
1177
1175
  Y()
1178
1176
  ),
1179
1177
  l
1180
- ), F(x(l, Lt(50)), u);
1178
+ ), F(x(l, Lt(50)), a);
1181
1179
  const w = pt(
1182
1180
  x(
1183
1181
  rt(o, A(s), A(e), A(t), A(f)),
1184
- bt((a, [{ scrollHeight: T, scrollTop: b }, h, d, R, B]) => {
1185
- const O = b + h - T > -B, L = {
1182
+ Rt((u, [{ scrollHeight: T, scrollTop: R }, h, d, b, k]) => {
1183
+ const O = R + h - T > -k, L = {
1186
1184
  scrollHeight: T,
1187
- scrollTop: b,
1185
+ scrollTop: R,
1188
1186
  viewportHeight: h
1189
1187
  };
1190
1188
  if (O) {
1191
1189
  let D, J;
1192
- return b > a.state.scrollTop ? (D = "SCROLLED_DOWN", J = a.state.scrollTop - b) : (D = "SIZE_DECREASED", J = a.state.scrollTop - b || a.scrollTopDelta), {
1190
+ return R > u.state.scrollTop ? (D = "SCROLLED_DOWN", J = u.state.scrollTop - R) : (D = "SIZE_DECREASED", J = u.state.scrollTop - R || u.scrollTopDelta), {
1193
1191
  atBottom: !0,
1194
1192
  atBottomBecause: D,
1195
1193
  scrollTopDelta: J,
@@ -1197,75 +1195,75 @@ const le = "up", te = "down", zo = "none", Vo = {
1197
1195
  };
1198
1196
  }
1199
1197
  let V;
1200
- return L.scrollHeight > a.state.scrollHeight ? V = "SIZE_INCREASED" : h < a.state.viewportHeight ? V = "VIEWPORT_HEIGHT_DECREASING" : b < a.state.scrollTop ? V = "SCROLLING_UPWARDS" : V = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1198
+ return L.scrollHeight > u.state.scrollHeight ? V = "SIZE_INCREASED" : h < u.state.viewportHeight ? V = "VIEWPORT_HEIGHT_DECREASING" : R < u.state.scrollTop ? V = "SCROLLING_UPWARDS" : V = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1201
1199
  atBottom: !1,
1202
1200
  notAtBottomBecause: V,
1203
1201
  state: L
1204
1202
  };
1205
1203
  }, Vo),
1206
- Y((a, T) => a && a.atBottom === T.atBottom)
1204
+ Y((u, T) => u && u.atBottom === T.atBottom)
1207
1205
  )
1208
1206
  ), I = ct(
1209
1207
  x(
1210
1208
  o,
1211
- bt(
1212
- (a, { scrollHeight: T, scrollTop: b, viewportHeight: h }) => {
1213
- if (Dn(a.scrollHeight, T))
1209
+ Rt(
1210
+ (u, { scrollHeight: T, scrollTop: R, viewportHeight: h }) => {
1211
+ if (Nn(u.scrollHeight, T))
1214
1212
  return {
1215
1213
  changed: !1,
1216
1214
  jump: 0,
1217
1215
  scrollHeight: T,
1218
- scrollTop: b
1216
+ scrollTop: R
1219
1217
  };
1220
1218
  {
1221
- const d = T - (b + h) < 1;
1222
- return a.scrollTop !== b && d ? {
1219
+ const d = T - (R + h) < 1;
1220
+ return u.scrollTop !== R && d ? {
1223
1221
  changed: !0,
1224
- jump: a.scrollTop - b,
1222
+ jump: u.scrollTop - R,
1225
1223
  scrollHeight: T,
1226
- scrollTop: b
1224
+ scrollTop: R
1227
1225
  } : {
1228
1226
  changed: !0,
1229
1227
  jump: 0,
1230
1228
  scrollHeight: T,
1231
- scrollTop: b
1229
+ scrollTop: R
1232
1230
  };
1233
1231
  }
1234
1232
  },
1235
1233
  { changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
1236
1234
  ),
1237
- P((a) => a.changed),
1238
- E((a) => a.jump)
1235
+ P((u) => u.changed),
1236
+ E((u) => u.jump)
1239
1237
  ),
1240
1238
  0
1241
1239
  );
1242
1240
  F(
1243
1241
  x(
1244
1242
  w,
1245
- E((a) => a.atBottom)
1243
+ E((u) => u.atBottom)
1246
1244
  ),
1247
1245
  i
1248
1246
  ), F(x(i, Lt(50)), c);
1249
- const C = y(te);
1247
+ const C = v(te);
1250
1248
  F(
1251
1249
  x(
1252
1250
  o,
1253
- E(({ scrollTop: a }) => a),
1251
+ E(({ scrollTop: u }) => u),
1254
1252
  Y(),
1255
- bt(
1256
- (a, T) => lt(m) ? { direction: a.direction, prevScrollTop: T } : { direction: T < a.prevScrollTop ? le : te, prevScrollTop: T },
1253
+ Rt(
1254
+ (u, T) => lt(m) ? { direction: u.direction, prevScrollTop: T } : { direction: T < u.prevScrollTop ? le : te, prevScrollTop: T },
1257
1255
  { direction: te, prevScrollTop: 0 }
1258
1256
  ),
1259
- E((a) => a.direction)
1257
+ E((u) => u.direction)
1260
1258
  ),
1261
1259
  C
1262
- ), F(x(o, Lt(50), vt(zo)), C);
1263
- const g = y(0);
1260
+ ), F(x(o, Lt(50), yt(zo)), C);
1261
+ const g = v(0);
1264
1262
  return F(
1265
1263
  x(
1266
1264
  p,
1267
- P((a) => !a),
1268
- vt(0)
1265
+ P((u) => !u),
1266
+ yt(0)
1269
1267
  ),
1270
1268
  g
1271
1269
  ), F(
@@ -1273,16 +1271,16 @@ const le = "up", te = "down", zo = "none", Vo = {
1273
1271
  r,
1274
1272
  Lt(100),
1275
1273
  G(p),
1276
- P(([a, T]) => !!T),
1277
- bt(([a, T], [b]) => [T, b], [0, 0]),
1278
- E(([a, T]) => T - a)
1274
+ P(([u, T]) => !!T),
1275
+ Rt(([u, T], [R]) => [T, R], [0, 0]),
1276
+ E(([u, T]) => T - u)
1279
1277
  ),
1280
1278
  g
1281
1279
  ), {
1282
1280
  atBottomState: w,
1283
1281
  atBottomStateChange: c,
1284
1282
  atBottomThreshold: f,
1285
- atTopStateChange: u,
1283
+ atTopStateChange: a,
1286
1284
  atTopThreshold: S,
1287
1285
  isAtBottom: i,
1288
1286
  isAtTop: l,
@@ -1301,7 +1299,7 @@ function gn(t, e) {
1301
1299
  }
1302
1300
  const Ke = U(
1303
1301
  ([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
1304
- const s = $(), i = y(0), l = y(0), c = y(0), u = ct(
1302
+ const s = $(), i = v(0), l = v(0), c = v(0), a = ct(
1305
1303
  x(
1306
1304
  rt(
1307
1305
  A(o),
@@ -1323,15 +1321,15 @@ const Ke = U(
1323
1321
  I,
1324
1322
  C,
1325
1323
  g,
1326
- a,
1324
+ u,
1327
1325
  T
1328
1326
  ]) => {
1329
- const b = f - a, h = C + g, d = Math.max(p - b, 0);
1330
- let R = pn;
1331
- const B = gn(T, xe), O = gn(T, Te);
1332
- return m -= a, m += p + g, w += p + g, w -= a, m > f + h - B && (R = le), w < f - d + S + O && (R = te), R !== pn ? [
1333
- Math.max(b - p - hn(I, xe, R) - B, 0),
1334
- b - d - g + S + hn(I, Te, R) + O
1327
+ const R = f - u, h = C + g, d = Math.max(p - R, 0);
1328
+ let b = pn;
1329
+ const k = gn(T, xe), O = gn(T, Te);
1330
+ return m -= u, m += p + g, w += p + g, w -= u, m > f + h - k && (b = le), w < f - d + S + O && (b = te), b !== pn ? [
1331
+ Math.max(R - p - hn(I, xe, b) - k, 0),
1332
+ R - d - g + S + hn(I, Te, b) + O
1335
1333
  ] : null;
1336
1334
  }
1337
1335
  ),
@@ -1347,15 +1345,15 @@ const Ke = U(
1347
1345
  overscan: c,
1348
1346
  topListHeight: i,
1349
1347
  // output
1350
- visibleRange: u
1348
+ visibleRange: a
1351
1349
  };
1352
1350
  },
1353
1351
  X(at),
1354
1352
  { singleton: !0 }
1355
1353
  );
1356
1354
  function Ao(t, e, n) {
1357
- if (be(e)) {
1358
- const o = Wn(t, e);
1355
+ if (Re(e)) {
1356
+ const o = Mn(t, e);
1359
1357
  return [
1360
1358
  { index: Ct(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
1361
1359
  { data: n == null ? void 0 : n[0], index: o, offset: 0, size: 0 }
@@ -1363,7 +1361,7 @@ function Ao(t, e, n) {
1363
1361
  }
1364
1362
  return [{ data: n == null ? void 0 : n[0], index: t, offset: 0, size: 0 }];
1365
1363
  }
1366
- const ke = {
1364
+ const Be = {
1367
1365
  bottom: 0,
1368
1366
  firstItemIndex: 0,
1369
1367
  items: [],
@@ -1376,26 +1374,26 @@ const ke = {
1376
1374
  };
1377
1375
  function Ie(t, e, n, o, r, s) {
1378
1376
  const { lastIndex: i, lastOffset: l, lastSize: c } = r;
1379
- let u = 0, f = 0;
1377
+ let a = 0, f = 0;
1380
1378
  if (t.length > 0) {
1381
- u = t[0].offset;
1379
+ a = t[0].offset;
1382
1380
  const I = t[t.length - 1];
1383
1381
  f = I.offset + I.size;
1384
1382
  }
1385
- const S = n - i, p = l + S * c + (S - 1) * o, m = u, w = p - f;
1383
+ const S = n - i, p = l + S * c + (S - 1) * o, m = a, w = p - f;
1386
1384
  return {
1387
1385
  bottom: f,
1388
1386
  firstItemIndex: s,
1389
1387
  items: In(t, r, s),
1390
1388
  offsetBottom: w,
1391
- offsetTop: u,
1389
+ offsetTop: a,
1392
1390
  top: m,
1393
1391
  topItems: In(e, r, s),
1394
1392
  topListHeight: e.reduce((I, C) => C.size + I, 0),
1395
1393
  totalCount: n
1396
1394
  };
1397
1395
  }
1398
- function $n(t, e, n, o, r, s) {
1396
+ function Dn(t, e, n, o, r, s) {
1399
1397
  let i = 0;
1400
1398
  if (n.groupIndices.length > 0)
1401
1399
  for (const f of n.groupIndices) {
@@ -1403,36 +1401,36 @@ function $n(t, e, n, o, r, s) {
1403
1401
  break;
1404
1402
  i++;
1405
1403
  }
1406
- const l = t + i, c = Ue(e, l), u = Array.from({ length: l }).map((f, S) => ({
1404
+ const l = t + i, c = Ue(e, l), a = Array.from({ length: l }).map((f, S) => ({
1407
1405
  data: s[S + c],
1408
1406
  index: S + c,
1409
1407
  offset: 0,
1410
1408
  size: 0
1411
1409
  }));
1412
- return Ie(u, [], l, r, n, o);
1410
+ return Ie(a, [], l, r, n, o);
1413
1411
  }
1414
1412
  function In(t, e, n) {
1415
1413
  if (t.length === 0)
1416
1414
  return [];
1417
- if (!be(e))
1418
- return t.map((u) => ({ ...u, index: u.index + n, originalIndex: u.index }));
1419
- const o = t[0].index, r = t[t.length - 1].index, s = [], i = ve(e.groupOffsetTree, o, r);
1415
+ if (!Re(e))
1416
+ return t.map((a) => ({ ...a, index: a.index + n, originalIndex: a.index }));
1417
+ const o = t[0].index, r = t[t.length - 1].index, s = [], i = ye(e.groupOffsetTree, o, r);
1420
1418
  let l, c = 0;
1421
- for (const u of t) {
1422
- (!l || l.end < u.index) && (l = i.shift(), c = e.groupIndices.indexOf(l.start));
1419
+ for (const a of t) {
1420
+ (!l || l.end < a.index) && (l = i.shift(), c = e.groupIndices.indexOf(l.start));
1423
1421
  let f;
1424
- u.index === l.start ? f = {
1422
+ a.index === l.start ? f = {
1425
1423
  index: c,
1426
1424
  type: "group"
1427
1425
  } : f = {
1428
1426
  groupIndex: c,
1429
- index: u.index - (c + 1) + n
1427
+ index: a.index - (c + 1) + n
1430
1428
  }, s.push({
1431
1429
  ...f,
1432
- data: u.data,
1433
- offset: u.offset,
1434
- originalIndex: u.index,
1435
- size: u.size
1430
+ data: a.data,
1431
+ offset: a.offset,
1432
+ originalIndex: a.index,
1433
+ size: a.size
1436
1434
  });
1437
1435
  }
1438
1436
  return s;
@@ -1442,15 +1440,15 @@ const Gt = U(
1442
1440
  { data: t, firstItemIndex: e, gap: n, sizes: o, totalCount: r },
1443
1441
  s,
1444
1442
  { listBoundary: i, topListHeight: l, visibleRange: c },
1445
- { initialTopMostItemIndex: u, scrolledToInitialItem: f },
1443
+ { initialTopMostItemIndex: a, scrolledToInitialItem: f },
1446
1444
  { topListHeight: S },
1447
1445
  p,
1448
1446
  { didMount: m },
1449
1447
  { recalcInProgress: w }
1450
1448
  ]) => {
1451
- const I = y([]), C = y(0), g = $();
1449
+ const I = v([]), C = v(0), g = $();
1452
1450
  F(s.topItemsIndexes, I);
1453
- const a = ct(
1451
+ const u = ct(
1454
1452
  x(
1455
1453
  rt(
1456
1454
  m,
@@ -1458,84 +1456,84 @@ const Gt = U(
1458
1456
  A(c, se),
1459
1457
  A(r),
1460
1458
  A(o),
1461
- A(u),
1459
+ A(a),
1462
1460
  f,
1463
1461
  A(I),
1464
1462
  A(e),
1465
1463
  A(n),
1466
1464
  t
1467
1465
  ),
1468
- P(([d, R, , B, , , , , , , O]) => {
1469
- const L = O && O.length !== B;
1470
- return d && !R && !L;
1466
+ P(([d, b, , k, , , , , , , O]) => {
1467
+ const L = O && O.length !== k;
1468
+ return d && !b && !L;
1471
1469
  }),
1472
1470
  E(
1473
1471
  ([
1474
1472
  ,
1475
1473
  ,
1476
- [d, R],
1477
- B,
1474
+ [d, b],
1475
+ k,
1478
1476
  O,
1479
1477
  L,
1480
1478
  V,
1481
1479
  D,
1482
1480
  J,
1483
1481
  nt,
1484
- k
1482
+ B
1485
1483
  ]) => {
1486
1484
  const q = O, { offsetTree: st, sizeTree: dt } = q, St = lt(C);
1487
- if (B === 0)
1488
- return { ...ke, totalCount: B };
1489
- if (d === 0 && R === 0)
1490
- return St === 0 ? { ...ke, totalCount: B } : $n(St, L, O, J, nt, k || []);
1485
+ if (k === 0)
1486
+ return { ...Be, totalCount: k };
1487
+ if (d === 0 && b === 0)
1488
+ return St === 0 ? { ...Be, totalCount: k } : Dn(St, L, O, J, nt, B || []);
1491
1489
  if (j(dt))
1492
1490
  return St > 0 ? null : Ie(
1493
- Ao(Ue(L, B), q, k),
1491
+ Ao(Ue(L, k), q, B),
1494
1492
  [],
1495
- B,
1493
+ k,
1496
1494
  nt,
1497
1495
  q,
1498
1496
  J
1499
1497
  );
1500
1498
  const ft = [];
1501
1499
  if (D.length > 0) {
1502
- const Mt = D[0], yt = D[D.length - 1];
1503
- let kt = 0;
1504
- for (const v of ve(dt, Mt, yt)) {
1505
- const N = v.value, Q = Math.max(v.start, Mt), it = Math.min(v.end, yt);
1500
+ const Mt = D[0], vt = D[D.length - 1];
1501
+ let Bt = 0;
1502
+ for (const y of ye(dt, Mt, vt)) {
1503
+ const N = y.value, Q = Math.max(y.start, Mt), it = Math.min(y.end, vt);
1506
1504
  for (let tt = Q; tt <= it; tt++)
1507
- ft.push({ data: k == null ? void 0 : k[tt], index: tt, offset: kt, size: N }), kt += N;
1505
+ ft.push({ data: B == null ? void 0 : B[tt], index: tt, offset: Bt, size: N }), Bt += N;
1508
1506
  }
1509
1507
  }
1510
1508
  if (!V)
1511
- return Ie([], ft, B, nt, q, J);
1512
- const ut = D.length > 0 ? D[D.length - 1] + 1 : 0, At = bo(st, d, R, ut);
1509
+ return Ie([], ft, k, nt, q, J);
1510
+ const ut = D.length > 0 ? D[D.length - 1] + 1 : 0, At = Ro(st, d, b, ut);
1513
1511
  if (At.length === 0)
1514
1512
  return null;
1515
- const xt = B - 1, Xt = ye([], (Mt) => {
1516
- for (const yt of At) {
1517
- const kt = yt.value;
1518
- let v = kt.offset, N = yt.start;
1519
- const Q = kt.size;
1520
- if (kt.offset < d) {
1521
- N += Math.floor((d - kt.offset + nt) / (Q + nt));
1522
- const tt = N - yt.start;
1523
- v += tt * Q + tt * nt;
1513
+ const xt = k - 1, Xt = ve([], (Mt) => {
1514
+ for (const vt of At) {
1515
+ const Bt = vt.value;
1516
+ let y = Bt.offset, N = vt.start;
1517
+ const Q = Bt.size;
1518
+ if (Bt.offset < d) {
1519
+ N += Math.floor((d - Bt.offset + nt) / (Q + nt));
1520
+ const tt = N - vt.start;
1521
+ y += tt * Q + tt * nt;
1524
1522
  }
1525
- N < ut && (v += (ut - N) * Q, N = ut);
1526
- const it = Math.min(yt.end, xt);
1527
- for (let tt = N; tt <= it && !(v >= R); tt++)
1528
- Mt.push({ data: k == null ? void 0 : k[tt], index: tt, offset: v, size: Q }), v += Q + nt;
1523
+ N < ut && (y += (ut - N) * Q, N = ut);
1524
+ const it = Math.min(vt.end, xt);
1525
+ for (let tt = N; tt <= it && !(y >= b); tt++)
1526
+ Mt.push({ data: B == null ? void 0 : B[tt], index: tt, offset: y, size: Q }), y += Q + nt;
1529
1527
  }
1530
1528
  });
1531
- return Ie(Xt, ft, B, nt, q, J);
1529
+ return Ie(Xt, ft, k, nt, q, J);
1532
1530
  }
1533
1531
  ),
1534
1532
  //@ts-expect-error filter needs to be fixed
1535
1533
  P((d) => d !== null),
1536
1534
  Y()
1537
1535
  ),
1538
- ke
1536
+ Be
1539
1537
  );
1540
1538
  F(
1541
1539
  x(
@@ -1546,64 +1544,64 @@ const Gt = U(
1546
1544
  r
1547
1545
  ), F(
1548
1546
  x(
1549
- a,
1547
+ u,
1550
1548
  E((d) => d.topListHeight)
1551
1549
  ),
1552
1550
  S
1553
1551
  ), F(S, l), F(
1554
1552
  x(
1555
- a,
1553
+ u,
1556
1554
  E((d) => [d.top, d.bottom])
1557
1555
  ),
1558
1556
  i
1559
1557
  ), F(
1560
1558
  x(
1561
- a,
1559
+ u,
1562
1560
  E((d) => d.items)
1563
1561
  ),
1564
1562
  g
1565
1563
  );
1566
1564
  const T = pt(
1567
1565
  x(
1568
- a,
1566
+ u,
1569
1567
  P(({ items: d }) => d.length > 0),
1570
1568
  G(r, t),
1571
- P(([{ items: d }, R]) => d[d.length - 1].originalIndex === R - 1),
1572
- E(([, d, R]) => [d - 1, R]),
1569
+ P(([{ items: d }, b]) => d[d.length - 1].originalIndex === b - 1),
1570
+ E(([, d, b]) => [d - 1, b]),
1573
1571
  Y(se),
1574
1572
  E(([d]) => d)
1575
1573
  )
1576
- ), b = pt(
1574
+ ), R = pt(
1577
1575
  x(
1578
- a,
1576
+ u,
1579
1577
  Lt(200),
1580
- P(({ items: d, topItems: R }) => d.length > 0 && d[0].originalIndex === R.length),
1578
+ P(({ items: d, topItems: b }) => d.length > 0 && d[0].originalIndex === b.length),
1581
1579
  E(({ items: d }) => d[0].index),
1582
1580
  Y()
1583
1581
  )
1584
1582
  ), h = pt(
1585
1583
  x(
1586
- a,
1584
+ u,
1587
1585
  P(({ items: d }) => d.length > 0),
1588
1586
  E(({ items: d }) => {
1589
- let R = 0, B = d.length - 1;
1590
- for (; d[R].type === "group" && R < B; )
1591
- R++;
1592
- for (; d[B].type === "group" && B > R; )
1593
- B--;
1587
+ let b = 0, k = d.length - 1;
1588
+ for (; d[b].type === "group" && b < k; )
1589
+ b++;
1590
+ for (; d[k].type === "group" && k > b; )
1591
+ k--;
1594
1592
  return {
1595
- endIndex: d[B].index,
1596
- startIndex: d[R].index
1593
+ endIndex: d[k].index,
1594
+ startIndex: d[b].index
1597
1595
  };
1598
1596
  }),
1599
- Y(An)
1597
+ Y(Pn)
1600
1598
  )
1601
1599
  );
1602
- return { endReached: T, initialItemCount: C, itemsRendered: g, listState: a, rangeChanged: h, startReached: b, topItemsIndexes: I, ...p };
1600
+ return { endReached: T, initialItemCount: C, itemsRendered: g, listState: u, rangeChanged: h, startReached: R, topItemsIndexes: I, ...p };
1603
1601
  },
1604
1602
  X(
1605
1603
  Et,
1606
- Gn,
1604
+ _n,
1607
1605
  Ke,
1608
1606
  ue,
1609
1607
  ce,
@@ -1612,12 +1610,12 @@ const Gt = U(
1612
1610
  Ne
1613
1611
  ),
1614
1612
  { singleton: !0 }
1615
- ), Un = U(
1613
+ ), $n = U(
1616
1614
  ([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
1617
1615
  const s = $(), i = ct(
1618
1616
  x(
1619
1617
  rt(n, t, o, e, r),
1620
- E(([l, c, u, f, S]) => l + c + u + f + S.offsetBottom + S.bottom)
1618
+ E(([l, c, a, f, S]) => l + c + a + f + S.offsetBottom + S.bottom)
1621
1619
  ),
1622
1620
  0
1623
1621
  );
@@ -1627,7 +1625,7 @@ const Gt = U(
1627
1625
  { singleton: !0 }
1628
1626
  ), Mo = U(
1629
1627
  ([{ viewportHeight: t }, { totalListHeight: e }]) => {
1630
- const n = y(!1), o = ct(
1628
+ const n = v(!1), o = ct(
1631
1629
  x(
1632
1630
  rt(n, t, e),
1633
1631
  P(([r]) => r),
@@ -1639,7 +1637,7 @@ const Gt = U(
1639
1637
  );
1640
1638
  return { alignToBottom: n, paddingTopAddition: o };
1641
1639
  },
1642
- X(at, Un),
1640
+ X(at, $n),
1643
1641
  { singleton: !0 }
1644
1642
  );
1645
1643
  function Sn(t) {
@@ -1653,9 +1651,9 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1653
1651
  { scrolledToInitialItem: s },
1654
1652
  { didMount: i, propsReady: l },
1655
1653
  { log: c },
1656
- { scrollingInProgress: u }
1654
+ { scrollingInProgress: a }
1657
1655
  ]) => {
1658
- const f = y(!1), S = $();
1656
+ const f = v(!1), S = $();
1659
1657
  let p = null;
1660
1658
  function m(I) {
1661
1659
  W(r, {
@@ -1667,21 +1665,21 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1667
1665
  K(
1668
1666
  x(
1669
1667
  rt(x(A(e), jt(1)), i),
1670
- G(A(f), o, s, u),
1671
- E(([[I, C], g, a, T, b]) => {
1668
+ G(A(f), o, s, a),
1669
+ E(([[I, C], g, u, T, R]) => {
1672
1670
  let h = C && T, d = "auto";
1673
- return h && (d = Wo(g, a || b), h = h && !!d), { followOutputBehavior: d, shouldFollow: h, totalCount: I };
1671
+ return h && (d = Wo(g, u || R), h = h && !!d), { followOutputBehavior: d, shouldFollow: h, totalCount: I };
1674
1672
  }),
1675
1673
  P(({ shouldFollow: I }) => I)
1676
1674
  ),
1677
1675
  ({ followOutputBehavior: I, totalCount: C }) => {
1678
- p && (p(), p = null), p = Rt(t, () => {
1676
+ p && (p(), p = null), p = bt(t, () => {
1679
1677
  lt(c)("following output to ", { totalCount: C }, ht.DEBUG), m(I), p = null;
1680
1678
  });
1681
1679
  }
1682
1680
  );
1683
1681
  function w(I) {
1684
- const C = Rt(n, (g) => {
1682
+ const C = bt(n, (g) => {
1685
1683
  I && !g.atBottom && g.notAtBottomBecause === "SIZE_INCREASED" && !p && (lt(c)("scrolling to bottom due to increased size", {}, ht.DEBUG), m("auto"));
1686
1684
  });
1687
1685
  setTimeout(C, 100);
@@ -1690,7 +1688,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1690
1688
  x(
1691
1689
  rt(A(f), e, l),
1692
1690
  P(([I, , C]) => I && C),
1693
- bt(
1691
+ Rt(
1694
1692
  ({ value: I }, [, C]) => ({ refreshed: I === C, value: C }),
1695
1693
  { refreshed: !1, value: 0 }
1696
1694
  ),
@@ -1714,7 +1712,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1714
1712
  G(s),
1715
1713
  P(([, c]) => c !== 0),
1716
1714
  G(r, o, e, n, t),
1717
- E(([[, c], u, f, S, p, m = []]) => $n(c, u, f, S, p, m))
1715
+ E(([[, c], a, f, S, p, m = []]) => Dn(c, a, f, S, p, m))
1718
1716
  ),
1719
1717
  i
1720
1718
  ), {}),
@@ -1722,7 +1720,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1722
1720
  { singleton: !0 }
1723
1721
  ), No = U(
1724
1722
  ([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
1725
- const o = y(0);
1723
+ const o = v(0);
1726
1724
  return K(
1727
1725
  x(
1728
1726
  t,
@@ -1731,7 +1729,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1731
1729
  E(([, r]) => ({ top: r }))
1732
1730
  ),
1733
1731
  (r) => {
1734
- Rt(
1732
+ bt(
1735
1733
  x(
1736
1734
  n,
1737
1735
  jt(1),
@@ -1760,7 +1758,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1760
1758
  ([
1761
1759
  { gap: t, sizes: e, totalCount: n },
1762
1760
  { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
1763
- { scrollToIndex: u }
1761
+ { scrollToIndex: a }
1764
1762
  ]) => {
1765
1763
  const f = $();
1766
1764
  return F(
@@ -1768,46 +1766,46 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1768
1766
  f,
1769
1767
  G(e, c, n, s, r, o, l),
1770
1768
  G(t),
1771
- E(([[S, p, m, w, I, C, g, a], T]) => {
1772
- const { align: b, behavior: h, calculateViewLocation: d = Do, done: R, ...B } = S, O = _n(S, p, w - 1), L = ie(O, p.offsetTree, T) + I + C, V = L + Ct(p.sizeTree, O)[1], D = a + C, J = a + m - g, nt = d({
1769
+ E(([[S, p, m, w, I, C, g, u], T]) => {
1770
+ const { align: R, behavior: h, calculateViewLocation: d = Do, done: b, ...k } = S, O = Wn(S, p, w - 1), L = ie(O, p.offsetTree, T) + I + C, V = L + Ct(p.sizeTree, O)[1], D = u + C, J = u + m - g, nt = d({
1773
1771
  itemBottom: V,
1774
1772
  itemTop: L,
1775
- locationParams: { align: b, behavior: h, ...B },
1773
+ locationParams: { align: R, behavior: h, ...k },
1776
1774
  viewportBottom: J,
1777
1775
  viewportTop: D
1778
1776
  });
1779
- return nt ? R && Rt(
1777
+ return nt ? b && bt(
1780
1778
  x(
1781
1779
  i,
1782
- P((k) => !k),
1780
+ P((B) => !B),
1783
1781
  // skips the initial publish of false, and the cleanup call.
1784
1782
  // but if scrollingInProgress is true, we skip the initial publish.
1785
1783
  jt(lt(i) ? 1 : 2)
1786
1784
  ),
1787
- R
1788
- ) : R && R(), nt;
1785
+ b
1786
+ ) : b && b(), nt;
1789
1787
  }),
1790
1788
  P((S) => S !== null)
1791
1789
  ),
1792
- u
1790
+ a
1793
1791
  ), {
1794
1792
  scrollIntoView: f
1795
1793
  };
1796
1794
  },
1797
1795
  X(Et, at, ce, Gt, Vt),
1798
1796
  { singleton: !0 }
1799
- ), Kn = U(
1797
+ ), Un = U(
1800
1798
  ([{ scrollVelocity: t }]) => {
1801
- const e = y(!1), n = $(), o = y(!1);
1799
+ const e = v(!1), n = $(), o = v(!1);
1802
1800
  return F(
1803
1801
  x(
1804
1802
  t,
1805
1803
  G(o, e, n),
1806
1804
  P(([r, s]) => !!s),
1807
1805
  E(([r, s, i, l]) => {
1808
- const { enter: c, exit: u } = s;
1806
+ const { enter: c, exit: a } = s;
1809
1807
  if (i) {
1810
- if (u(r, l))
1808
+ if (a(r, l))
1811
1809
  return !1;
1812
1810
  } else if (c(r, l))
1813
1811
  return !0;
@@ -1826,14 +1824,14 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1826
1824
  X(ae),
1827
1825
  { singleton: !0 }
1828
1826
  ), je = U(([{ scrollContainerState: t, scrollTo: e }]) => {
1829
- const n = $(), o = $(), r = $(), s = y(!1), i = y(void 0);
1827
+ const n = $(), o = $(), r = $(), s = v(!1), i = v(void 0);
1830
1828
  return F(
1831
1829
  x(
1832
1830
  rt(n, o),
1833
- E(([{ scrollHeight: l, scrollTop: c, viewportHeight: u }, { offsetTop: f }]) => ({
1831
+ E(([{ scrollHeight: l, scrollTop: c, viewportHeight: a }, { offsetTop: f }]) => ({
1834
1832
  scrollHeight: l,
1835
1833
  scrollTop: Math.max(0, c - f),
1836
- viewportHeight: u
1834
+ viewportHeight: a
1837
1835
  }))
1838
1836
  ),
1839
1837
  t
@@ -1865,15 +1863,15 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1865
1863
  { didMount: s },
1866
1864
  { useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
1867
1865
  ]) => {
1868
- const u = $(), f = y(void 0), S = y(null), p = y(null);
1866
+ const a = $(), f = v(void 0), S = v(null), p = v(null);
1869
1867
  return F(l, S), F(c, p), K(
1870
1868
  x(
1871
- u,
1869
+ a,
1872
1870
  G(e, o, i, S, p, n)
1873
1871
  ),
1874
- ([m, w, I, C, g, a, T]) => {
1875
- const b = Ho(w.sizeTree);
1876
- C && g !== null && a !== null && (I = g.scrollTop - a.offsetTop), I -= T, m({ ranges: b, scrollTop: I });
1872
+ ([m, w, I, C, g, u, T]) => {
1873
+ const R = Ho(w.sizeTree);
1874
+ C && g !== null && u !== null && (I = g.scrollTop - u.offsetTop), I -= T, m({ ranges: R, scrollTop: I });
1877
1875
  }
1878
1876
  ), F(x(f, P(Me), E(Ko)), r), F(
1879
1877
  x(
@@ -1885,7 +1883,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1885
1883
  ),
1886
1884
  t
1887
1885
  ), {
1888
- getState: u,
1886
+ getState: a,
1889
1887
  restoreStateFrom: f
1890
1888
  };
1891
1889
  },
@@ -1895,7 +1893,7 @@ function Ko(t) {
1895
1893
  return { align: "start", index: 0, offset: t.scrollTop };
1896
1894
  }
1897
1895
  const jo = U(([{ topItemsIndexes: t }]) => {
1898
- const e = y(0);
1896
+ const e = v(0);
1899
1897
  return F(
1900
1898
  x(
1901
1899
  e,
@@ -1905,16 +1903,16 @@ const jo = U(([{ topItemsIndexes: t }]) => {
1905
1903
  t
1906
1904
  ), { topItemCount: e };
1907
1905
  }, X(Gt));
1908
- function jn(t) {
1906
+ function Kn(t) {
1909
1907
  let e = !1, n;
1910
1908
  return () => (e || (e = !0, n = t()), n);
1911
1909
  }
1912
- const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Yo = U(
1910
+ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Yo = U(
1913
1911
  ([
1914
1912
  { deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
1915
1913
  { isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
1916
1914
  { listState: c },
1917
- { beforeUnshiftWith: u, gap: f, shiftWithOffset: S, sizes: p },
1915
+ { beforeUnshiftWith: a, gap: f, shiftWithOffset: S, sizes: p },
1918
1916
  { log: m },
1919
1917
  { recalcInProgress: w }
1920
1918
  ]) => {
@@ -1922,30 +1920,30 @@ const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
1922
1920
  x(
1923
1921
  c,
1924
1922
  G(i),
1925
- bt(
1926
- ([, g, a, T], [{ bottom: b, items: h, offsetBottom: d, totalCount: R }, B]) => {
1927
- const O = b + d;
1923
+ Rt(
1924
+ ([, g, u, T], [{ bottom: R, items: h, offsetBottom: d, totalCount: b }, k]) => {
1925
+ const O = R + d;
1928
1926
  let L = 0;
1929
- return a === R && g.length > 0 && h.length > 0 && (h[0].originalIndex === 0 && g[0].originalIndex === 0 || (L = O - T, L !== 0 && (L += B))), [L, h, R, O];
1927
+ return u === b && g.length > 0 && h.length > 0 && (h[0].originalIndex === 0 && g[0].originalIndex === 0 || (L = O - T, L !== 0 && (L += k))), [L, h, b, O];
1930
1928
  },
1931
1929
  [0, [], 0, 0]
1932
1930
  ),
1933
1931
  P(([g]) => g !== 0),
1934
1932
  G(o, l, n, r, m, w),
1935
- P(([, g, a, T, , , b]) => !b && !T && g !== 0 && a === le),
1936
- E(([[g], , , , , a]) => (a("Upward scrolling compensation", { amount: g }, ht.DEBUG), g))
1933
+ P(([, g, u, T, , , R]) => !R && !T && g !== 0 && u === le),
1934
+ E(([[g], , , , , u]) => (u("Upward scrolling compensation", { amount: g }, ht.DEBUG), g))
1937
1935
  )
1938
1936
  );
1939
1937
  function C(g) {
1940
1938
  g > 0 ? (W(e, { behavior: "auto", top: -g }), W(t, 0)) : (W(t, 0), W(e, { behavior: "auto", top: -g }));
1941
1939
  }
1942
- return K(x(I, G(t, s)), ([g, a, T]) => {
1943
- T && qo() ? W(t, a - g) : C(-g);
1940
+ return K(x(I, G(t, s)), ([g, u, T]) => {
1941
+ T && qo() ? W(t, u - g) : C(-g);
1944
1942
  }), K(
1945
1943
  x(
1946
1944
  rt(ct(s, !1), t, w),
1947
- P(([g, a, T]) => !g && !T && a !== 0),
1948
- E(([g, a]) => a),
1945
+ P(([g, u, T]) => !g && !T && u !== 0),
1946
+ E(([g, u]) => u),
1949
1947
  Lt(1)
1950
1948
  ),
1951
1949
  C
@@ -1957,24 +1955,24 @@ const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
1957
1955
  e
1958
1956
  ), K(
1959
1957
  x(
1960
- u,
1958
+ a,
1961
1959
  G(p, f),
1962
- E(([g, { groupIndices: a, lastSize: T, sizeTree: b }, h]) => {
1963
- function d(R) {
1964
- return R * (T + h);
1960
+ E(([g, { groupIndices: u, lastSize: T, sizeTree: R }, h]) => {
1961
+ function d(b) {
1962
+ return b * (T + h);
1965
1963
  }
1966
- if (a.length === 0)
1964
+ if (u.length === 0)
1967
1965
  return d(g);
1968
1966
  {
1969
- let R = 0;
1970
- const B = re(b, 0);
1967
+ let b = 0;
1968
+ const k = re(R, 0);
1971
1969
  let O = 0, L = 0;
1972
1970
  for (; O < g; ) {
1973
- O++, R += B;
1974
- let V = a.length === L + 1 ? 1 / 0 : a[L + 1] - a[L] - 1;
1975
- O + V > g && (R -= B, V = g - O + 1), O += V, R += d(V), L++;
1971
+ O++, b += k;
1972
+ let V = u.length === L + 1 ? 1 / 0 : u[L + 1] - u[L] - 1;
1973
+ O + V > g && (b -= k, V = g - O + 1), O += V, b += d(V), L++;
1976
1974
  }
1977
- return R;
1975
+ return b;
1978
1976
  }
1979
1977
  })
1980
1978
  ),
@@ -1999,7 +1997,7 @@ const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
1999
1997
  i,
2000
1998
  l,
2001
1999
  c,
2002
- u
2000
+ a
2003
2001
  ]) => ({
2004
2002
  ...t,
2005
2003
  ...e,
@@ -2010,21 +2008,21 @@ const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2010
2008
  ...i,
2011
2009
  ...l,
2012
2010
  ...c,
2013
- ...u
2011
+ ...a
2014
2012
  }),
2015
2013
  X(
2016
2014
  Ke,
2017
2015
  Go,
2018
2016
  Pt,
2019
- Kn,
2020
2017
  Un,
2018
+ $n,
2021
2019
  No,
2022
2020
  Mo,
2023
2021
  je,
2024
2022
  $o,
2025
2023
  Vt
2026
2024
  )
2027
- ), qn = U(
2025
+ ), jn = U(
2028
2026
  ([
2029
2027
  {
2030
2028
  data: t,
@@ -2036,7 +2034,7 @@ const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2036
2034
  itemSize: i,
2037
2035
  sizeRanges: l,
2038
2036
  sizes: c,
2039
- statefulTotalCount: u,
2037
+ statefulTotalCount: a,
2040
2038
  totalCount: f,
2041
2039
  trackItemSizes: S
2042
2040
  },
@@ -2044,13 +2042,13 @@ const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2044
2042
  I,
2045
2043
  C,
2046
2044
  g,
2047
- { listState: a, topItemsIndexes: T, ...b },
2045
+ { listState: u, topItemsIndexes: T, ...R },
2048
2046
  { scrollToIndex: h },
2049
2047
  d,
2050
- { topItemCount: R },
2051
- { groupCounts: B },
2048
+ { topItemCount: b },
2049
+ { groupCounts: k },
2052
2050
  O
2053
- ]) => (F(b.rangeChanged, O.scrollSeekRangeChanged), F(
2051
+ ]) => (F(R.rangeChanged, O.scrollSeekRangeChanged), F(
2054
2052
  x(
2055
2053
  O.windowViewportRect,
2056
2054
  E((L) => L.visibleHeight)
@@ -2062,25 +2060,25 @@ const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2062
2060
  firstItemIndex: n,
2063
2061
  fixedItemHeight: o,
2064
2062
  gap: r,
2065
- groupCounts: B,
2063
+ groupCounts: k,
2066
2064
  initialItemFinalLocationReached: p,
2067
2065
  initialTopMostItemIndex: m,
2068
2066
  scrolledToInitialItem: w,
2069
2067
  sizeRanges: l,
2070
- topItemCount: R,
2068
+ topItemCount: b,
2071
2069
  topItemsIndexes: T,
2072
2070
  // input
2073
2071
  totalCount: f,
2074
2072
  ...g,
2075
2073
  groupIndices: s,
2076
2074
  itemSize: i,
2077
- listState: a,
2075
+ listState: u,
2078
2076
  scrollToIndex: h,
2079
2077
  // output
2080
- statefulTotalCount: u,
2078
+ statefulTotalCount: a,
2081
2079
  trackItemSizes: S,
2082
2080
  // exported from stateFlagsSystem
2083
- ...b,
2081
+ ...R,
2084
2082
  // the bag of IO from featureGroup1System
2085
2083
  ...O,
2086
2084
  ...I,
@@ -2097,7 +2095,7 @@ const qo = jn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2097
2095
  ce,
2098
2096
  Yo,
2099
2097
  jo,
2100
- Gn,
2098
+ _n,
2101
2099
  Zo
2102
2100
  )
2103
2101
  );
@@ -2114,87 +2112,95 @@ function Xo(t, e) {
2114
2112
  const pe = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
2115
2113
  function qe(t, e, n) {
2116
2114
  const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = H.createContext({});
2117
- function c(g, a) {
2115
+ function c(g, u) {
2118
2116
  g.propsReady && W(g.propsReady, !1);
2119
2117
  for (const T of o) {
2120
- const b = g[e.required[T]];
2121
- W(b, a[T]);
2118
+ const R = g[e.required[T]];
2119
+ W(R, u[T]);
2122
2120
  }
2123
2121
  for (const T of r)
2124
- if (T in a) {
2125
- const b = g[e.optional[T]];
2126
- W(b, a[T]);
2122
+ if (T in u) {
2123
+ const R = g[e.optional[T]];
2124
+ W(R, u[T]);
2127
2125
  }
2128
2126
  g.propsReady && W(g.propsReady, !0);
2129
2127
  }
2130
- function u(g) {
2131
- return s.reduce((a, T) => (a[T] = (b) => {
2128
+ function a(g) {
2129
+ return s.reduce((u, T) => (u[T] = (R) => {
2132
2130
  const h = g[e.methods[T]];
2133
- W(h, b);
2134
- }, a), {});
2131
+ W(h, R);
2132
+ }, u), {});
2135
2133
  }
2136
2134
  function f(g) {
2137
- return i.reduce((a, T) => (a[T] = mo(g[e.events[T]]), a), {});
2135
+ return i.reduce((u, T) => (u[T] = mo(g[e.events[T]]), u), {});
2138
2136
  }
2139
- const S = H.forwardRef((g, a) => {
2140
- const { children: T, ...b } = g, [h] = H.useState(() => ye(ho(t), (B) => {
2141
- c(B, b);
2137
+ const S = H.forwardRef((g, u) => {
2138
+ const { children: T, ...R } = g, [h] = H.useState(() => ve(ho(t), (k) => {
2139
+ c(k, R);
2142
2140
  })), [d] = H.useState(cn(f, h));
2143
2141
  pe(() => {
2144
- for (const B of i)
2145
- B in b && K(d[B], b[B]);
2142
+ for (const k of i)
2143
+ k in R && K(d[k], R[k]);
2146
2144
  return () => {
2147
2145
  Object.values(d).map(We);
2148
2146
  };
2149
- }, [b, d, h]), pe(() => {
2150
- c(h, b);
2151
- }), H.useImperativeHandle(a, ln(u(h)));
2152
- const R = n;
2153
- return /* @__PURE__ */ z(l.Provider, { value: h, children: n ? /* @__PURE__ */ z(R, { ...Xo([...o, ...r, ...i], b), children: T }) : T });
2154
- }), p = (g) => H.useCallback(kn(W, H.useContext(l)[g]), [g]), m = (g) => {
2155
- const T = H.useContext(l)[g], b = H.useCallback(
2147
+ }, [R, d, h]), pe(() => {
2148
+ c(h, R);
2149
+ }), H.useImperativeHandle(u, ln(a(h)));
2150
+ const b = n;
2151
+ return /* @__PURE__ */ z(l.Provider, { value: h, children: n ? /* @__PURE__ */ z(b, { ...Xo([...o, ...r, ...i], R), children: T }) : T });
2152
+ }), p = (g) => {
2153
+ const u = H.useContext(l);
2154
+ return H.useCallback(
2155
+ (T) => {
2156
+ W(u[g], T);
2157
+ },
2158
+ [u, g]
2159
+ );
2160
+ }, m = (g) => {
2161
+ const T = H.useContext(l)[g], R = H.useCallback(
2156
2162
  (h) => K(T, h),
2157
2163
  [T]
2158
2164
  );
2159
2165
  return H.useSyncExternalStore(
2160
- b,
2166
+ R,
2161
2167
  () => lt(T),
2162
2168
  () => lt(T)
2163
2169
  );
2164
2170
  }, w = (g) => {
2165
- const T = H.useContext(l)[g], [b, h] = H.useState(cn(lt, T));
2171
+ const T = H.useContext(l)[g], [R, h] = H.useState(cn(lt, T));
2166
2172
  return pe(
2167
2173
  () => K(T, (d) => {
2168
- d !== b && h(ln(d));
2174
+ d !== R && h(ln(d));
2169
2175
  }),
2170
- [T, b]
2171
- ), b;
2176
+ [T, R]
2177
+ ), R;
2172
2178
  }, I = H.version.startsWith("18") ? m : w;
2173
2179
  return {
2174
2180
  Component: S,
2175
- useEmitter: (g, a) => {
2176
- const b = H.useContext(l)[g];
2177
- pe(() => K(b, a), [a, b]);
2181
+ useEmitter: (g, u) => {
2182
+ const R = H.useContext(l)[g];
2183
+ pe(() => K(R, u), [u, R]);
2178
2184
  },
2179
2185
  useEmitterValue: I,
2180
2186
  usePublisher: p
2181
2187
  };
2182
2188
  }
2183
- const Re = H.createContext(void 0), Yn = H.createContext(void 0), Zn = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
2184
- function Be(t) {
2189
+ const be = H.createContext(void 0), qn = H.createContext(void 0), Yn = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
2190
+ function ke(t) {
2185
2191
  return "self" in t;
2186
2192
  }
2187
2193
  function Jo(t) {
2188
2194
  return "body" in t;
2189
2195
  }
2190
- function Xn(t, e, n, o = Yt, r, s) {
2191
- const i = H.useRef(null), l = H.useRef(null), c = H.useRef(null), u = H.useCallback(
2196
+ function Zn(t, e, n, o = Yt, r, s) {
2197
+ const i = H.useRef(null), l = H.useRef(null), c = H.useRef(null), a = H.useCallback(
2192
2198
  (p) => {
2193
2199
  let m, w, I;
2194
2200
  const C = p.target;
2195
- if (Jo(C) || Be(C)) {
2196
- const a = Be(C) ? C : C.defaultView;
2197
- I = s ? a.scrollX : a.scrollY, m = s ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, w = s ? a.innerWidth : a.innerHeight;
2201
+ if (Jo(C) || ke(C)) {
2202
+ const u = ke(C) ? C : C.defaultView;
2203
+ I = s ? u.scrollX : u.scrollY, m = s ? u.document.documentElement.scrollWidth : u.document.documentElement.scrollHeight, w = s ? u.innerWidth : u.innerHeight;
2198
2204
  } else
2199
2205
  I = s ? C.scrollLeft : C.scrollTop, m = s ? C.scrollWidth : C.scrollHeight, w = s ? C.offsetWidth : C.offsetHeight;
2200
2206
  const g = () => {
@@ -2204,28 +2210,28 @@ function Xn(t, e, n, o = Yt, r, s) {
2204
2210
  viewportHeight: w
2205
2211
  });
2206
2212
  };
2207
- p.suppressFlushSync ? g() : lo.flushSync(g), l.current !== null && (I === l.current || I <= 0 || I === m - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2213
+ p.suppressFlushSync ? g() : io.flushSync(g), l.current !== null && (I === l.current || I <= 0 || I === m - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2208
2214
  },
2209
- [t, e]
2215
+ [t, e, s]
2210
2216
  );
2211
2217
  H.useEffect(() => {
2212
2218
  const p = r || i.current;
2213
- return o(r || i.current), u({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", u, { passive: !0 }), () => {
2214
- o(null), p.removeEventListener("scroll", u);
2219
+ return o(r || i.current), a({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", a, { passive: !0 }), () => {
2220
+ o(null), p.removeEventListener("scroll", a);
2215
2221
  };
2216
- }, [i, u, n, o, r]);
2222
+ }, [i, a, n, o, r]);
2217
2223
  function f(p) {
2218
2224
  const m = i.current;
2219
2225
  if (!m || (s ? "offsetWidth" in m && m.offsetWidth === 0 : "offsetHeight" in m && m.offsetHeight === 0))
2220
2226
  return;
2221
2227
  const w = p.behavior === "smooth";
2222
2228
  let I, C, g;
2223
- Be(m) ? (C = Math.max(
2229
+ ke(m) ? (C = Math.max(
2224
2230
  wt(m.document.documentElement, s ? "width" : "height"),
2225
2231
  s ? m.document.documentElement.scrollWidth : m.document.documentElement.scrollHeight
2226
2232
  ), I = s ? m.innerWidth : m.innerHeight, g = s ? window.scrollX : window.scrollY) : (C = m[s ? "scrollWidth" : "scrollHeight"], I = wt(m, s ? "width" : "height"), g = m[s ? "scrollLeft" : "scrollTop"]);
2227
- const a = C - I;
2228
- if (p.top = Math.ceil(Math.max(Math.min(a, p.top), 0)), Dn(I, C) || p.top === g) {
2233
+ const u = C - I;
2234
+ if (p.top = Math.ceil(Math.max(Math.min(u, p.top), 0)), Nn(I, C) || p.top === g) {
2229
2235
  t({ scrollHeight: C, scrollTop: g, viewportHeight: I }), w && e(!0);
2230
2236
  return;
2231
2237
  }
@@ -2238,7 +2244,7 @@ function Xn(t, e, n, o = Yt, r, s) {
2238
2244
  }
2239
2245
  return { scrollByCallback: S, scrollerRef: i, scrollToCallback: f };
2240
2246
  }
2241
- const Oe = "-webkit-sticky", xn = "sticky", Jn = jn(() => {
2247
+ const Oe = "-webkit-sticky", xn = "sticky", Xn = Kn(() => {
2242
2248
  if (typeof document > "u")
2243
2249
  return xn;
2244
2250
  const t = document.createElement("div");
@@ -2248,13 +2254,13 @@ function Ye(t) {
2248
2254
  return t;
2249
2255
  }
2250
2256
  const Qo = /* @__PURE__ */ U(() => {
2251
- const t = y((c) => `Item ${c}`), e = y(null), n = y((c) => `Group ${c}`), o = y({}), r = y(Ye), s = y("div"), i = y(Yt), l = (c, u = null) => ct(
2257
+ const t = v((c) => `Item ${c}`), e = v(null), n = v((c) => `Group ${c}`), o = v({}), r = v(Ye), s = v("div"), i = v(Yt), l = (c, a = null) => ct(
2252
2258
  x(
2253
2259
  o,
2254
2260
  E((f) => f[c]),
2255
2261
  Y()
2256
2262
  ),
2257
- u
2263
+ a
2258
2264
  );
2259
2265
  return {
2260
2266
  components: o,
@@ -2276,9 +2282,9 @@ const Qo = /* @__PURE__ */ U(() => {
2276
2282
  };
2277
2283
  }), tr = /* @__PURE__ */ U(
2278
2284
  ([t, e]) => ({ ...t, ...e }),
2279
- X(qn, Qo)
2280
- ), er = ({ height: t }) => /* @__PURE__ */ z("div", { style: { height: t } }), nr = { overflowAnchor: "none", position: Jn(), zIndex: 1 }, Qn = { overflowAnchor: "none" }, or = { ...Qn, display: "inline-block", height: "100%" }, Tn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
2281
- const n = M("listState"), o = gt("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = gt("windowScrollContainerState"), l = gt("scrollContainerState"), c = s || r ? i : l, u = M("itemContent"), f = M("context"), S = M("groupContent"), p = M("trackItemSizes"), m = M("itemSize"), w = M("log"), I = gt("gap"), C = M("horizontalDirection"), { callbackRef: g } = On(
2285
+ X(jn, Qo)
2286
+ ), er = ({ height: t }) => /* @__PURE__ */ z("div", { style: { height: t } }), nr = { overflowAnchor: "none", position: Xn(), zIndex: 1 }, Jn = { overflowAnchor: "none" }, or = { ...Jn, display: "inline-block", height: "100%" }, Tn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
2287
+ const n = M("listState"), o = gt("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = gt("windowScrollContainerState"), l = gt("scrollContainerState"), c = s || r ? i : l, a = M("itemContent"), f = M("context"), S = M("groupContent"), p = M("trackItemSizes"), m = M("itemSize"), w = M("log"), I = gt("gap"), C = M("horizontalDirection"), { callbackRef: g } = kn(
2282
2288
  o,
2283
2289
  m,
2284
2290
  p,
@@ -2288,69 +2294,69 @@ const Qo = /* @__PURE__ */ U(() => {
2288
2294
  s,
2289
2295
  C,
2290
2296
  M("skipAnimationFrameInResizeObserver")
2291
- ), [a, T] = H.useState(0);
2292
- Je("deviation", (k) => {
2293
- a !== k && T(k);
2297
+ ), [u, T] = H.useState(0);
2298
+ Je("deviation", (B) => {
2299
+ u !== B && T(B);
2294
2300
  });
2295
- const b = M("EmptyPlaceholder"), h = M("ScrollSeekPlaceholder") || er, d = M("ListComponent"), R = M("ItemComponent"), B = M("GroupComponent"), O = M("computeItemKey"), L = M("isSeeking"), V = M("groupIndices").length > 0, D = M("alignToBottom"), J = M("initialItemFinalLocationReached"), nt = e ? {} : {
2301
+ const R = M("EmptyPlaceholder"), h = M("ScrollSeekPlaceholder") || er, d = M("ListComponent"), b = M("ItemComponent"), k = M("GroupComponent"), O = M("computeItemKey"), L = M("isSeeking"), V = M("groupIndices").length > 0, D = M("alignToBottom"), J = M("initialItemFinalLocationReached"), nt = e ? {} : {
2296
2302
  boxSizing: "border-box",
2297
2303
  ...C ? {
2298
2304
  display: "inline-block",
2299
2305
  height: "100%",
2300
- marginLeft: a !== 0 ? a : D ? "auto" : 0,
2306
+ marginLeft: u !== 0 ? u : D ? "auto" : 0,
2301
2307
  paddingLeft: n.offsetTop,
2302
2308
  paddingRight: n.offsetBottom,
2303
2309
  whiteSpace: "nowrap"
2304
2310
  } : {
2305
- marginTop: a !== 0 ? a : D ? "auto" : 0,
2311
+ marginTop: u !== 0 ? u : D ? "auto" : 0,
2306
2312
  paddingBottom: n.offsetBottom,
2307
2313
  paddingTop: n.offsetTop
2308
2314
  },
2309
2315
  ...J ? {} : { visibility: "hidden" }
2310
2316
  };
2311
- return !e && n.totalCount === 0 && b ? /* @__PURE__ */ z(b, { ...Z(b, f) }) : /* @__PURE__ */ z(
2317
+ return !e && n.totalCount === 0 && R ? /* @__PURE__ */ z(R, { ...Z(R, f) }) : /* @__PURE__ */ z(
2312
2318
  d,
2313
2319
  {
2314
2320
  ...Z(d, f),
2315
2321
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2316
2322
  ref: g,
2317
2323
  style: nt,
2318
- children: (e ? n.topItems : n.items).map((k) => {
2319
- const q = k.originalIndex, st = O(q + n.firstItemIndex, k.data, f);
2324
+ children: (e ? n.topItems : n.items).map((B) => {
2325
+ const q = B.originalIndex, st = O(q + n.firstItemIndex, B.data, f);
2320
2326
  return L ? /* @__PURE__ */ $t(
2321
2327
  h,
2322
2328
  {
2323
2329
  ...Z(h, f),
2324
- height: k.size,
2325
- index: k.index,
2330
+ height: B.size,
2331
+ index: B.index,
2326
2332
  key: st,
2327
- type: k.type || "item",
2328
- ...k.type === "group" ? {} : { groupIndex: k.groupIndex }
2333
+ type: B.type || "item",
2334
+ ...B.type === "group" ? {} : { groupIndex: B.groupIndex }
2329
2335
  }
2330
- ) : k.type === "group" ? /* @__PURE__ */ $t(
2331
- B,
2336
+ ) : B.type === "group" ? /* @__PURE__ */ $t(
2337
+ k,
2332
2338
  {
2333
- ...Z(B, f),
2339
+ ...Z(k, f),
2334
2340
  "data-index": q,
2335
- "data-item-index": k.index,
2336
- "data-known-size": k.size,
2341
+ "data-item-index": B.index,
2342
+ "data-known-size": B.size,
2337
2343
  key: st,
2338
2344
  style: nr
2339
2345
  },
2340
- S(k.index, f)
2346
+ S(B.index, f)
2341
2347
  ) : /* @__PURE__ */ $t(
2342
- R,
2348
+ b,
2343
2349
  {
2344
- ...Z(R, f),
2345
- ...to(R, k.data),
2350
+ ...Z(b, f),
2351
+ ...Qn(b, B.data),
2346
2352
  "data-index": q,
2347
- "data-item-group-index": k.groupIndex,
2348
- "data-item-index": k.index,
2349
- "data-known-size": k.size,
2353
+ "data-item-group-index": B.groupIndex,
2354
+ "data-item-index": B.index,
2355
+ "data-known-size": B.size,
2350
2356
  key: st,
2351
- style: C ? or : Qn
2357
+ style: C ? or : Jn
2352
2358
  },
2353
- V ? u(k.index, k.groupIndex, k.data, f) : u(k.index, k.data, f)
2359
+ V ? a(B.index, B.groupIndex, B.data, f) : a(B.index, B.data, f)
2354
2360
  );
2355
2361
  })
2356
2362
  }
@@ -2372,7 +2378,7 @@ const Qo = /* @__PURE__ */ U(() => {
2372
2378
  width: "100%",
2373
2379
  ...t ? { display: "flex", flexDirection: "column" } : {}
2374
2380
  }), ir = {
2375
- position: Jn(),
2381
+ position: Xn(),
2376
2382
  top: 0,
2377
2383
  width: "100%",
2378
2384
  zIndex: 1
@@ -2381,7 +2387,7 @@ function Z(t, e) {
2381
2387
  if (typeof t != "string")
2382
2388
  return { context: e };
2383
2389
  }
2384
- function to(t, e) {
2390
+ function Qn(t, e) {
2385
2391
  return { item: typeof t == "string" ? void 0 : e };
2386
2392
  }
2387
2393
  const lr = /* @__PURE__ */ H.memo(function() {
@@ -2411,16 +2417,16 @@ const lr = /* @__PURE__ */ H.memo(function() {
2411
2417
  });
2412
2418
  function Ze({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2413
2419
  return H.memo(function({ children: s, style: i, ...l }) {
2414
- const c = n("scrollContainerState"), u = e("ScrollerComponent"), f = n("smoothScrollTargetReached"), S = e("scrollerRef"), p = e("context"), m = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: I, scrollToCallback: C } = Xn(
2420
+ const c = n("scrollContainerState"), a = e("ScrollerComponent"), f = n("smoothScrollTargetReached"), S = e("scrollerRef"), p = e("context"), m = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: I, scrollToCallback: C } = Zn(
2415
2421
  c,
2416
2422
  f,
2417
- u,
2423
+ a,
2418
2424
  S,
2419
2425
  void 0,
2420
2426
  m
2421
2427
  );
2422
2428
  return t("scrollTo", C), t("scrollBy", w), /* @__PURE__ */ z(
2423
- u,
2429
+ a,
2424
2430
  {
2425
2431
  "data-testid": "virtuoso-scroller",
2426
2432
  "data-virtuoso-scroller": !0,
@@ -2428,7 +2434,7 @@ function Ze({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2428
2434
  style: { ...m ? sr : rr, ...i },
2429
2435
  tabIndex: 0,
2430
2436
  ...l,
2431
- ...Z(u, p),
2437
+ ...Z(a, p),
2432
2438
  children: s
2433
2439
  }
2434
2440
  );
@@ -2436,33 +2442,33 @@ function Ze({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2436
2442
  }
2437
2443
  function Xe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2438
2444
  return H.memo(function({ children: s, style: i, ...l }) {
2439
- const c = n("windowScrollContainerState"), u = e("ScrollerComponent"), f = n("smoothScrollTargetReached"), S = e("totalListHeight"), p = e("deviation"), m = e("customScrollParent"), w = e("context"), I = H.useRef(null), C = e("scrollerRef"), { scrollByCallback: g, scrollerRef: a, scrollToCallback: T } = Xn(
2445
+ const c = n("windowScrollContainerState"), a = e("ScrollerComponent"), f = n("smoothScrollTargetReached"), S = e("totalListHeight"), p = e("deviation"), m = e("customScrollParent"), w = e("context"), I = H.useRef(null), C = e("scrollerRef"), { scrollByCallback: g, scrollerRef: u, scrollToCallback: T } = Zn(
2440
2446
  c,
2441
2447
  f,
2442
- u,
2448
+ a,
2443
2449
  C,
2444
2450
  m
2445
2451
  );
2446
- return Zn(() => {
2447
- var b;
2448
- return a.current = m || ((b = I.current) == null ? void 0 : b.ownerDocument.defaultView), () => {
2449
- a.current = null;
2452
+ return Yn(() => {
2453
+ var R;
2454
+ return u.current = m || ((R = I.current) == null ? void 0 : R.ownerDocument.defaultView), () => {
2455
+ u.current = null;
2450
2456
  };
2451
- }, [a, m]), t("windowScrollTo", T), t("scrollBy", g), /* @__PURE__ */ z(
2452
- u,
2457
+ }, [u, m]), t("windowScrollTo", T), t("scrollBy", g), /* @__PURE__ */ z(
2458
+ a,
2453
2459
  {
2454
2460
  ref: I,
2455
2461
  "data-virtuoso-scroller": !0,
2456
2462
  style: { position: "relative", ...i, ...S !== 0 ? { height: S + p } : {} },
2457
2463
  ...l,
2458
- ...Z(u, w),
2464
+ ...Z(a, w),
2459
2465
  children: s
2460
2466
  }
2461
2467
  );
2462
2468
  });
2463
2469
  }
2464
2470
  const ur = ({ children: t }) => {
2465
- const e = H.useContext(Re), n = gt("viewportHeight"), o = gt("fixedItemHeight"), r = M("alignToBottom"), s = M("horizontalDirection"), i = H.useMemo(
2471
+ const e = H.useContext(be), n = gt("viewportHeight"), o = gt("fixedItemHeight"), r = M("alignToBottom"), s = M("horizontalDirection"), i = H.useMemo(
2466
2472
  () => ne(n, (c) => wt(c, s ? "width" : "height")),
2467
2473
  [n, s]
2468
2474
  ), l = Ht(i, !0, M("skipAnimationFrameInResizeObserver"));
@@ -2470,7 +2476,7 @@ const ur = ({ children: t }) => {
2470
2476
  e && (n(e.viewportHeight), o(e.itemHeight));
2471
2477
  }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "element", ref: l, style: Zt(r), children: t });
2472
2478
  }, ar = ({ children: t }) => {
2473
- const e = H.useContext(Re), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s = Ge(
2479
+ const e = H.useContext(be), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s = Ge(
2474
2480
  n,
2475
2481
  r,
2476
2482
  M("skipAnimationFrameInResizeObserver")
@@ -2492,79 +2498,79 @@ const ur = ({ children: t }) => {
2492
2498
  ] })
2493
2499
  ] });
2494
2500
  }), {
2495
- Component: eo,
2501
+ Component: to,
2496
2502
  useEmitter: Je,
2497
2503
  useEmitterValue: M,
2498
2504
  usePublisher: gt
2499
2505
  } = /* @__PURE__ */ qe(
2500
2506
  tr,
2501
2507
  {
2502
- events: {
2503
- atBottomStateChange: "atBottomStateChange",
2504
- atTopStateChange: "atTopStateChange",
2505
- endReached: "endReached",
2506
- groupIndices: "groupIndices",
2507
- isScrolling: "isScrolling",
2508
- itemsRendered: "itemsRendered",
2509
- rangeChanged: "rangeChanged",
2510
- startReached: "startReached",
2511
- totalListHeightChanged: "totalListHeightChanged"
2512
- },
2513
- methods: {
2514
- autoscrollToBottom: "autoscrollToBottom",
2515
- getState: "getState",
2516
- scrollBy: "scrollBy",
2517
- scrollIntoView: "scrollIntoView",
2518
- scrollTo: "scrollTo",
2519
- scrollToIndex: "scrollToIndex"
2520
- },
2508
+ required: {},
2521
2509
  optional: {
2522
- alignToBottom: "alignToBottom",
2510
+ restoreStateFrom: "restoreStateFrom",
2511
+ context: "context",
2512
+ followOutput: "followOutput",
2513
+ itemContent: "itemContent",
2514
+ groupContent: "groupContent",
2515
+ overscan: "overscan",
2516
+ increaseViewportBy: "increaseViewportBy",
2517
+ totalCount: "totalCount",
2518
+ groupCounts: "groupCounts",
2519
+ topItemCount: "topItemCount",
2520
+ firstItemIndex: "firstItemIndex",
2521
+ initialTopMostItemIndex: "initialTopMostItemIndex",
2522
+ components: "components",
2523
2523
  atBottomThreshold: "atBottomThreshold",
2524
2524
  atTopThreshold: "atTopThreshold",
2525
- components: "components",
2526
2525
  computeItemKey: "computeItemKey",
2527
- context: "context",
2528
- customScrollParent: "customScrollParent",
2529
- data: "data",
2530
2526
  defaultItemHeight: "defaultItemHeight",
2531
- firstItemIndex: "firstItemIndex",
2532
2527
  fixedItemHeight: "fixedItemHeight",
2533
- followOutput: "followOutput",
2534
- groupContent: "groupContent",
2535
- groupCounts: "groupCounts",
2528
+ itemSize: "itemSize",
2529
+ scrollSeekConfiguration: "scrollSeekConfiguration",
2536
2530
  headerFooterTag: "HeaderFooterTag",
2537
- horizontalDirection: "horizontalDirection",
2538
- increaseViewportBy: "increaseViewportBy",
2531
+ data: "data",
2539
2532
  initialItemCount: "initialItemCount",
2540
2533
  initialScrollTop: "initialScrollTop",
2541
- initialTopMostItemIndex: "initialTopMostItemIndex",
2542
- itemContent: "itemContent",
2543
- itemSize: "itemSize",
2544
- logLevel: "logLevel",
2545
- overscan: "overscan",
2546
- restoreStateFrom: "restoreStateFrom",
2534
+ alignToBottom: "alignToBottom",
2535
+ useWindowScroll: "useWindowScroll",
2536
+ customScrollParent: "customScrollParent",
2547
2537
  scrollerRef: "scrollerRef",
2548
- scrollSeekConfiguration: "scrollSeekConfiguration",
2549
- skipAnimationFrameInResizeObserver: "skipAnimationFrameInResizeObserver",
2550
- topItemCount: "topItemCount",
2551
- totalCount: "totalCount",
2552
- useWindowScroll: "useWindowScroll"
2538
+ logLevel: "logLevel",
2539
+ horizontalDirection: "horizontalDirection",
2540
+ skipAnimationFrameInResizeObserver: "skipAnimationFrameInResizeObserver"
2553
2541
  },
2554
- required: {}
2542
+ methods: {
2543
+ scrollToIndex: "scrollToIndex",
2544
+ scrollIntoView: "scrollIntoView",
2545
+ scrollTo: "scrollTo",
2546
+ scrollBy: "scrollBy",
2547
+ autoscrollToBottom: "autoscrollToBottom",
2548
+ getState: "getState"
2549
+ },
2550
+ events: {
2551
+ isScrolling: "isScrolling",
2552
+ endReached: "endReached",
2553
+ startReached: "startReached",
2554
+ rangeChanged: "rangeChanged",
2555
+ atBottomStateChange: "atBottomStateChange",
2556
+ atTopStateChange: "atTopStateChange",
2557
+ totalListHeightChanged: "totalListHeightChanged",
2558
+ itemsRendered: "itemsRendered",
2559
+ groupIndices: "groupIndices"
2560
+ }
2555
2561
  },
2556
2562
  fr
2557
- ), mr = /* @__PURE__ */ Ze({ useEmitter: Je, useEmitterValue: M, usePublisher: gt }), pr = /* @__PURE__ */ Xe({ useEmitter: Je, useEmitterValue: M, usePublisher: gt }), Kr = eo, jr = eo, hr = /* @__PURE__ */ U(() => {
2558
- const t = y((c) => /* @__PURE__ */ Kt("td", { children: [
2563
+ ), mr = /* @__PURE__ */ Ze({ useEmitter: Je, useEmitterValue: M, usePublisher: gt }), pr = /* @__PURE__ */ Xe({ useEmitter: Je, useEmitterValue: M, usePublisher: gt }), Kr = to, jr = to, hr = /* @__PURE__ */ U(() => {
2564
+ const t = v((c) => /* @__PURE__ */ Kt("td", { children: [
2559
2565
  "Item $",
2560
2566
  c
2561
- ] })), e = y(null), n = y(null), o = y(null), r = y({}), s = y(Ye), i = y(Yt), l = (c, u = null) => ct(
2567
+ ] })), e = v(null), n = v(null), o = v(null), r = v({}), s = v(Ye), i = v(Yt), l = (c, a = null) => ct(
2562
2568
  x(
2563
2569
  r,
2564
2570
  E((f) => f[c]),
2565
2571
  Y()
2566
2572
  ),
2567
- u
2573
+ a
2568
2574
  );
2569
2575
  return {
2570
2576
  components: r,
@@ -2586,9 +2592,9 @@ const ur = ({ children: t }) => {
2586
2592
  };
2587
2593
  }), gr = /* @__PURE__ */ U(
2588
2594
  ([t, e]) => ({ ...t, ...e }),
2589
- X(qn, hr)
2595
+ X(jn, hr)
2590
2596
  ), Ir = ({ height: t }) => /* @__PURE__ */ z("tr", { children: /* @__PURE__ */ z("td", { style: { height: t } }) }), Sr = ({ height: t }) => /* @__PURE__ */ z("tr", { children: /* @__PURE__ */ z("td", { style: { border: 0, height: t, padding: 0 } }) }), xr = { overflowAnchor: "none" }, Cn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
2591
- const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("isSeeking"), i = _("ScrollSeekPlaceholder") || Ir, l = _("context"), c = _("TableRowComponent"), u = _("fixedHeaderHeight"), f = _("itemContent"), S = (e ? n.topItems : []).reduce((m, w, I) => (I === 0 ? m.push(w.size) : m.push(m[I - 1] + w.size), m), []), p = (e ? n.topItems : n.items).map((m) => {
2597
+ const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("isSeeking"), i = _("ScrollSeekPlaceholder") || Ir, l = _("context"), c = _("TableRowComponent"), a = _("fixedHeaderHeight"), f = _("itemContent"), S = (e ? n.topItems : []).reduce((m, w, I) => (I === 0 ? m.push(w.size) : m.push(m[I - 1] + w.size), m), []), p = (e ? n.topItems : n.items).map((m) => {
2592
2598
  const w = m.originalIndex, I = o(w + r, m.data, l), C = e ? w === 0 ? 0 : S[w - 1] : 0;
2593
2599
  return s ? /* @__PURE__ */ $t(
2594
2600
  i,
@@ -2603,22 +2609,22 @@ const ur = ({ children: t }) => {
2603
2609
  c,
2604
2610
  {
2605
2611
  ...Z(c, l),
2606
- ...to(c, m.data),
2612
+ ...Qn(c, m.data),
2607
2613
  "data-index": w,
2608
2614
  "data-item-index": m.index,
2609
2615
  "data-known-size": m.size,
2610
2616
  key: I,
2611
- style: e ? { overflowAnchor: "none", position: "sticky", top: u + C, zIndex: 2 } : xr
2617
+ style: e ? { overflowAnchor: "none", position: "sticky", top: a + C, zIndex: 2 } : xr
2612
2618
  },
2613
2619
  f(m.index, m.data, l)
2614
2620
  );
2615
2621
  });
2616
- return /* @__PURE__ */ z(io, { children: p });
2622
+ return /* @__PURE__ */ z(so, { children: p });
2617
2623
  }), Tr = /* @__PURE__ */ H.memo(function() {
2618
- const e = _("listState"), n = _("topItemsIndexes").length > 0, o = Tt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), c = s || r ? i : l, u = _("trackItemSizes"), f = _("itemSize"), S = _("log"), { callbackRef: p, ref: m } = On(
2624
+ const e = _("listState"), n = _("topItemsIndexes").length > 0, o = Tt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), c = s || r ? i : l, a = _("trackItemSizes"), f = _("itemSize"), S = _("log"), { callbackRef: p, ref: m } = kn(
2619
2625
  o,
2620
2626
  f,
2621
- u,
2627
+ a,
2622
2628
  c,
2623
2629
  S,
2624
2630
  void 0,
@@ -2629,18 +2635,18 @@ const ur = ({ children: t }) => {
2629
2635
  Qe("deviation", (V) => {
2630
2636
  w !== V && (m.current.style.marginTop = `${V}px`, I(V));
2631
2637
  });
2632
- const C = _("EmptyPlaceholder"), g = _("FillerRow") || Sr, a = _("TableBodyComponent"), T = _("paddingTopAddition"), b = _("statefulTotalCount"), h = _("context");
2633
- if (b === 0 && C)
2638
+ const C = _("EmptyPlaceholder"), g = _("FillerRow") || Sr, u = _("TableBodyComponent"), T = _("paddingTopAddition"), R = _("statefulTotalCount"), h = _("context");
2639
+ if (R === 0 && C)
2634
2640
  return /* @__PURE__ */ z(C, { ...Z(C, h) });
2635
- const d = (n ? e.topItems : []).reduce((V, D) => V + D.size, 0), R = e.offsetTop + T + w - d, B = e.offsetBottom, O = R > 0 ? /* @__PURE__ */ z(g, { context: h, height: R }, "padding-top") : null, L = B > 0 ? /* @__PURE__ */ z(g, { context: h, height: B }, "padding-bottom") : null;
2636
- return /* @__PURE__ */ Kt(a, { "data-testid": "virtuoso-item-list", ref: p, ...Z(a, h), children: [
2641
+ const d = (n ? e.topItems : []).reduce((V, D) => V + D.size, 0), b = e.offsetTop + T + w - d, k = e.offsetBottom, O = b > 0 ? /* @__PURE__ */ z(g, { context: h, height: b }, "padding-top") : null, L = k > 0 ? /* @__PURE__ */ z(g, { context: h, height: k }, "padding-bottom") : null;
2642
+ return /* @__PURE__ */ Kt(u, { "data-testid": "virtuoso-item-list", ref: p, ...Z(u, h), children: [
2637
2643
  O,
2638
2644
  n && /* @__PURE__ */ z(Cn, { showTopList: !0 }),
2639
2645
  /* @__PURE__ */ z(Cn, {}),
2640
2646
  L
2641
2647
  ] });
2642
2648
  }), Cr = ({ children: t }) => {
2643
- const e = H.useContext(Re), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r = Ht(
2649
+ const e = H.useContext(be), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r = Ht(
2644
2650
  H.useMemo(() => ne(n, (s) => wt(s, "height")), [n]),
2645
2651
  !0,
2646
2652
  _("skipAnimationFrameInResizeObserver")
@@ -2649,7 +2655,7 @@ const ur = ({ children: t }) => {
2649
2655
  e && (n(e.viewportHeight), o(e.itemHeight));
2650
2656
  }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "element", ref: r, style: Zt(!1), children: t });
2651
2657
  }, wr = ({ children: t }) => {
2652
- const e = H.useContext(Re), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = _("customScrollParent"), s = Ge(
2658
+ const e = H.useContext(be), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = _("customScrollParent"), s = Ge(
2653
2659
  n,
2654
2660
  r,
2655
2661
  _("skipAnimationFrameInResizeObserver")
@@ -2657,19 +2663,19 @@ const ur = ({ children: t }) => {
2657
2663
  return H.useEffect(() => {
2658
2664
  e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2659
2665
  }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "window", ref: s, style: Zt(!1), children: t });
2660
- }, yr = /* @__PURE__ */ H.memo(function(e) {
2661
- const n = _("useWindowScroll"), o = _("customScrollParent"), r = Tt("fixedHeaderHeight"), s = Tt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), u = Ht(
2662
- H.useMemo(() => ne(r, (a) => wt(a, "height")), [r]),
2666
+ }, vr = /* @__PURE__ */ H.memo(function(e) {
2667
+ const n = _("useWindowScroll"), o = _("customScrollParent"), r = Tt("fixedHeaderHeight"), s = Tt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), a = Ht(
2668
+ H.useMemo(() => ne(r, (u) => wt(u, "height")), [r]),
2663
2669
  !0,
2664
2670
  _("skipAnimationFrameInResizeObserver")
2665
2671
  ), f = Ht(
2666
- H.useMemo(() => ne(s, (a) => wt(a, "height")), [s]),
2672
+ H.useMemo(() => ne(s, (u) => wt(u, "height")), [s]),
2667
2673
  !0,
2668
2674
  _("skipAnimationFrameInResizeObserver")
2669
- ), S = o || n ? Rr : br, p = o || n ? wr : Cr, m = _("TableComponent"), w = _("TableHeadComponent"), I = _("TableFooterComponent"), C = i ? /* @__PURE__ */ z(
2675
+ ), S = o || n ? br : Rr, p = o || n ? wr : Cr, m = _("TableComponent"), w = _("TableHeadComponent"), I = _("TableFooterComponent"), C = i ? /* @__PURE__ */ z(
2670
2676
  w,
2671
2677
  {
2672
- ref: u,
2678
+ ref: a,
2673
2679
  style: { position: "sticky", top: 0, zIndex: 2 },
2674
2680
  ...Z(w, c),
2675
2681
  children: i()
@@ -2691,66 +2697,66 @@ const ur = ({ children: t }) => {
2691
2697
  g
2692
2698
  ] }) }) });
2693
2699
  }), {
2694
- Component: vr,
2700
+ Component: yr,
2695
2701
  useEmitter: Qe,
2696
2702
  useEmitterValue: _,
2697
2703
  usePublisher: Tt
2698
2704
  } = /* @__PURE__ */ qe(
2699
2705
  gr,
2700
2706
  {
2701
- events: {
2702
- atBottomStateChange: "atBottomStateChange",
2703
- atTopStateChange: "atTopStateChange",
2704
- endReached: "endReached",
2705
- groupIndices: "groupIndices",
2706
- isScrolling: "isScrolling",
2707
- itemsRendered: "itemsRendered",
2708
- rangeChanged: "rangeChanged",
2709
- startReached: "startReached",
2710
- totalListHeightChanged: "totalListHeightChanged"
2711
- },
2712
- methods: {
2713
- getState: "getState",
2714
- scrollBy: "scrollBy",
2715
- scrollIntoView: "scrollIntoView",
2716
- scrollTo: "scrollTo",
2717
- scrollToIndex: "scrollToIndex"
2718
- },
2707
+ required: {},
2719
2708
  optional: {
2720
- alignToBottom: "alignToBottom",
2709
+ restoreStateFrom: "restoreStateFrom",
2710
+ context: "context",
2711
+ followOutput: "followOutput",
2712
+ firstItemIndex: "firstItemIndex",
2713
+ itemContent: "itemContent",
2714
+ fixedHeaderContent: "fixedHeaderContent",
2715
+ fixedFooterContent: "fixedFooterContent",
2716
+ overscan: "overscan",
2717
+ increaseViewportBy: "increaseViewportBy",
2718
+ totalCount: "totalCount",
2719
+ topItemCount: "topItemCount",
2720
+ initialTopMostItemIndex: "initialTopMostItemIndex",
2721
+ components: "components",
2722
+ groupCounts: "groupCounts",
2721
2723
  atBottomThreshold: "atBottomThreshold",
2722
2724
  atTopThreshold: "atTopThreshold",
2723
- components: "components",
2724
2725
  computeItemKey: "computeItemKey",
2725
- context: "context",
2726
- customScrollParent: "customScrollParent",
2727
- data: "data",
2728
2726
  defaultItemHeight: "defaultItemHeight",
2729
- firstItemIndex: "firstItemIndex",
2730
- fixedFooterContent: "fixedFooterContent",
2731
- fixedHeaderContent: "fixedHeaderContent",
2732
2727
  fixedItemHeight: "fixedItemHeight",
2733
- followOutput: "followOutput",
2734
- groupCounts: "groupCounts",
2735
- increaseViewportBy: "increaseViewportBy",
2728
+ itemSize: "itemSize",
2729
+ scrollSeekConfiguration: "scrollSeekConfiguration",
2730
+ data: "data",
2736
2731
  initialItemCount: "initialItemCount",
2737
2732
  initialScrollTop: "initialScrollTop",
2738
- initialTopMostItemIndex: "initialTopMostItemIndex",
2739
- itemContent: "itemContent",
2740
- itemSize: "itemSize",
2741
- logLevel: "logLevel",
2742
- overscan: "overscan",
2743
- restoreStateFrom: "restoreStateFrom",
2733
+ alignToBottom: "alignToBottom",
2734
+ useWindowScroll: "useWindowScroll",
2735
+ customScrollParent: "customScrollParent",
2744
2736
  scrollerRef: "scrollerRef",
2745
- scrollSeekConfiguration: "scrollSeekConfiguration",
2746
- topItemCount: "topItemCount",
2747
- totalCount: "totalCount",
2748
- useWindowScroll: "useWindowScroll"
2737
+ logLevel: "logLevel"
2749
2738
  },
2750
- required: {}
2739
+ methods: {
2740
+ scrollToIndex: "scrollToIndex",
2741
+ scrollIntoView: "scrollIntoView",
2742
+ scrollTo: "scrollTo",
2743
+ scrollBy: "scrollBy",
2744
+ getState: "getState"
2745
+ },
2746
+ events: {
2747
+ isScrolling: "isScrolling",
2748
+ endReached: "endReached",
2749
+ startReached: "startReached",
2750
+ rangeChanged: "rangeChanged",
2751
+ atBottomStateChange: "atBottomStateChange",
2752
+ atTopStateChange: "atTopStateChange",
2753
+ totalListHeightChanged: "totalListHeightChanged",
2754
+ itemsRendered: "itemsRendered",
2755
+ groupIndices: "groupIndices"
2756
+ }
2751
2757
  },
2752
- yr
2753
- ), br = /* @__PURE__ */ Ze({ useEmitter: Qe, useEmitterValue: _, usePublisher: Tt }), Rr = /* @__PURE__ */ Xe({ useEmitter: Qe, useEmitterValue: _, usePublisher: Tt }), qr = vr, wn = {
2758
+ vr
2759
+ ), Rr = /* @__PURE__ */ Ze({ useEmitter: Qe, useEmitterValue: _, usePublisher: Tt }), br = /* @__PURE__ */ Xe({ useEmitter: Qe, useEmitterValue: _, usePublisher: Tt }), qr = yr, wn = {
2754
2760
  bottom: 0,
2755
2761
  itemHeight: 0,
2756
2762
  items: [],
@@ -2766,8 +2772,8 @@ const ur = ({ children: t }) => {
2766
2772
  offsetBottom: 0,
2767
2773
  offsetTop: 0,
2768
2774
  top: 0
2769
- }, { ceil: yn, floor: Ce, max: ee, min: Fe, round: vn } = Math;
2770
- function bn(t, e, n) {
2775
+ }, { ceil: vn, floor: Ce, max: ee, min: Fe, round: yn } = Math;
2776
+ function Rn(t, e, n) {
2771
2777
  return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
2772
2778
  }
2773
2779
  function Er(t) {
@@ -2779,25 +2785,25 @@ function Er(t) {
2779
2785
  function he(t, e) {
2780
2786
  return t && t.width === e.width && t.height === e.height;
2781
2787
  }
2782
- function kr(t, e) {
2788
+ function Br(t, e) {
2783
2789
  return t && t.column === e.column && t.row === e.row;
2784
2790
  }
2785
- const Br = /* @__PURE__ */ U(
2791
+ const kr = /* @__PURE__ */ U(
2786
2792
  ([
2787
2793
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
2788
- { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: u, smoothScrollTargetReached: f, viewportHeight: S },
2794
+ { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached: f, viewportHeight: S },
2789
2795
  p,
2790
2796
  m,
2791
2797
  { didMount: w, propsReady: I },
2792
- { customScrollParent: C, useWindowScroll: g, windowScrollContainerState: a, windowScrollTo: T, windowViewportRect: b },
2798
+ { customScrollParent: C, useWindowScroll: g, windowScrollContainerState: u, windowScrollTo: T, windowViewportRect: R },
2793
2799
  h
2794
2800
  ]) => {
2795
- const d = y(0), R = y(0), B = y(wn), O = y({ height: 0, width: 0 }), L = y({ height: 0, width: 0 }), V = $(), D = $(), J = y(0), nt = y(null), k = y({ column: 0, row: 0 }), q = $(), st = $(), dt = y(!1), St = y(0), ft = y(!0), ut = y(!1), At = y(!1);
2801
+ const d = v(0), b = v(0), k = v(wn), O = v({ height: 0, width: 0 }), L = v({ height: 0, width: 0 }), V = $(), D = $(), J = v(0), nt = v(null), B = v({ column: 0, row: 0 }), q = $(), st = $(), dt = v(!1), St = v(0), ft = v(!0), ut = v(!1), At = v(!1);
2796
2802
  K(
2797
2803
  x(
2798
2804
  w,
2799
2805
  G(St),
2800
- P(([v, N]) => !!N)
2806
+ P(([y, N]) => !!N)
2801
2807
  ),
2802
2808
  () => {
2803
2809
  W(ft, !1);
@@ -2805,37 +2811,37 @@ const Br = /* @__PURE__ */ U(
2805
2811
  ), K(
2806
2812
  x(
2807
2813
  rt(w, ft, L, O, St, ut),
2808
- P(([v, N, Q, it, , tt]) => v && !N && Q.height !== 0 && it.height !== 0 && !tt)
2814
+ P(([y, N, Q, it, , tt]) => y && !N && Q.height !== 0 && it.height !== 0 && !tt)
2809
2815
  ),
2810
- ([, , , , v]) => {
2816
+ ([, , , , y]) => {
2811
2817
  W(ut, !0), $e(1, () => {
2812
- W(V, v);
2813
- }), Rt(x(u), () => {
2818
+ W(V, y);
2819
+ }), bt(x(a), () => {
2814
2820
  W(e, [0, 0]), W(ft, !0);
2815
2821
  });
2816
2822
  }
2817
2823
  ), F(
2818
2824
  x(
2819
2825
  st,
2820
- P((v) => v != null && v.scrollTop > 0),
2821
- vt(0)
2826
+ P((y) => y != null && y.scrollTop > 0),
2827
+ yt(0)
2822
2828
  ),
2823
- R
2829
+ b
2824
2830
  ), K(
2825
2831
  x(
2826
2832
  w,
2827
2833
  G(st),
2828
- P(([, v]) => v != null)
2834
+ P(([, y]) => y != null)
2829
2835
  ),
2830
- ([, v]) => {
2831
- v && (W(O, v.viewport), W(L, v.item), W(k, v.gap), v.scrollTop > 0 && (W(dt, !0), Rt(x(u, jt(1)), (N) => {
2836
+ ([, y]) => {
2837
+ y && (W(O, y.viewport), W(L, y.item), W(B, y.gap), y.scrollTop > 0 && (W(dt, !0), bt(x(a, jt(1)), (N) => {
2832
2838
  W(dt, !1);
2833
- }), W(c, { top: v.scrollTop })));
2839
+ }), W(c, { top: y.scrollTop })));
2834
2840
  }
2835
2841
  ), F(
2836
2842
  x(
2837
2843
  O,
2838
- E(({ height: v }) => v)
2844
+ E(({ height: y }) => y)
2839
2845
  ),
2840
2846
  S
2841
2847
  ), F(
@@ -2843,14 +2849,14 @@ const Br = /* @__PURE__ */ U(
2843
2849
  rt(
2844
2850
  A(O, he),
2845
2851
  A(L, he),
2846
- A(k, (v, N) => v && v.column === N.column && v.row === N.row),
2847
- A(u)
2852
+ A(B, (y, N) => y && y.column === N.column && y.row === N.row),
2853
+ A(a)
2848
2854
  ),
2849
- E(([v, N, Q, it]) => ({
2855
+ E(([y, N, Q, it]) => ({
2850
2856
  gap: Q,
2851
2857
  item: N,
2852
2858
  scrollTop: it,
2853
- viewport: v
2859
+ viewport: y
2854
2860
  }))
2855
2861
  ),
2856
2862
  q
@@ -2859,130 +2865,130 @@ const Br = /* @__PURE__ */ U(
2859
2865
  rt(
2860
2866
  A(d),
2861
2867
  o,
2862
- A(k, kr),
2868
+ A(B, Br),
2863
2869
  A(L, he),
2864
2870
  A(O, he),
2865
2871
  A(nt),
2866
- A(R),
2872
+ A(b),
2867
2873
  A(dt),
2868
2874
  A(ft),
2869
2875
  A(St)
2870
2876
  ),
2871
- P(([, , , , , , , v]) => !v),
2877
+ P(([, , , , , , , y]) => !y),
2872
2878
  E(
2873
2879
  ([
2874
- v,
2880
+ y,
2875
2881
  [N, Q],
2876
2882
  it,
2877
2883
  tt,
2878
- Bt,
2884
+ kt,
2879
2885
  Jt,
2880
2886
  Nt,
2881
2887
  ,
2882
2888
  de,
2883
2889
  Ot
2884
2890
  ]) => {
2885
- const { column: Ft, row: Qt } = it, { height: fe, width: He } = tt, { width: tn } = Bt;
2886
- if (Nt === 0 && (v === 0 || tn === 0))
2891
+ const { column: Ft, row: Qt } = it, { height: fe, width: He } = tt, { width: tn } = kt;
2892
+ if (Nt === 0 && (y === 0 || tn === 0))
2887
2893
  return wn;
2888
2894
  if (He === 0) {
2889
- const sn = Ue(Ot, v), so = sn + Math.max(Nt - 1, 0);
2890
- return Er(bn(sn, so, Jt));
2895
+ const sn = Ue(Ot, y), ro = sn + Math.max(Nt - 1, 0);
2896
+ return Er(Rn(sn, ro, Jt));
2891
2897
  }
2892
- const me = no(tn, He, Ft);
2898
+ const me = eo(tn, He, Ft);
2893
2899
  let Dt, Wt;
2894
- de ? N === 0 && Q === 0 && Nt > 0 ? (Dt = 0, Wt = Nt - 1) : (Dt = me * Ce((N + Qt) / (fe + Qt)), Wt = me * yn((Q + Qt) / (fe + Qt)) - 1, Wt = Fe(v - 1, ee(Wt, me - 1)), Dt = Fe(Wt, ee(0, Dt))) : (Dt = 0, Wt = -1);
2895
- const en = bn(Dt, Wt, Jt), { bottom: nn, top: on } = Rn(Bt, it, tt, en), rn = yn(v / me), ro = rn * fe + (rn - 1) * Qt - nn;
2896
- return { bottom: nn, itemHeight: fe, items: en, itemWidth: He, offsetBottom: ro, offsetTop: on, top: on };
2900
+ de ? N === 0 && Q === 0 && Nt > 0 ? (Dt = 0, Wt = Nt - 1) : (Dt = me * Ce((N + Qt) / (fe + Qt)), Wt = me * vn((Q + Qt) / (fe + Qt)) - 1, Wt = Fe(y - 1, ee(Wt, me - 1)), Dt = Fe(Wt, ee(0, Dt))) : (Dt = 0, Wt = -1);
2901
+ const en = Rn(Dt, Wt, Jt), { bottom: nn, top: on } = bn(kt, it, tt, en), rn = vn(y / me), oo = rn * fe + (rn - 1) * Qt - nn;
2902
+ return { bottom: nn, itemHeight: fe, items: en, itemWidth: He, offsetBottom: oo, offsetTop: on, top: on };
2897
2903
  }
2898
2904
  )
2899
2905
  ),
2900
- B
2906
+ k
2901
2907
  ), F(
2902
2908
  x(
2903
2909
  nt,
2904
- P((v) => v !== null),
2905
- E((v) => v.length)
2910
+ P((y) => y !== null),
2911
+ E((y) => y.length)
2906
2912
  ),
2907
2913
  d
2908
2914
  ), F(
2909
2915
  x(
2910
- rt(O, L, B, k),
2911
- P(([v, N, { items: Q }]) => Q.length > 0 && N.height !== 0 && v.height !== 0),
2912
- E(([v, N, { items: Q }, it]) => {
2913
- const { bottom: tt, top: Bt } = Rn(v, it, N, Q);
2914
- return [Bt, tt];
2916
+ rt(O, L, k, B),
2917
+ P(([y, N, { items: Q }]) => Q.length > 0 && N.height !== 0 && y.height !== 0),
2918
+ E(([y, N, { items: Q }, it]) => {
2919
+ const { bottom: tt, top: kt } = bn(y, it, N, Q);
2920
+ return [kt, tt];
2915
2921
  }),
2916
2922
  Y(se)
2917
2923
  ),
2918
2924
  e
2919
2925
  );
2920
- const xt = y(!1);
2926
+ const xt = v(!1);
2921
2927
  F(
2922
2928
  x(
2923
- u,
2929
+ a,
2924
2930
  G(xt),
2925
- E(([v, N]) => N || v !== 0)
2931
+ E(([y, N]) => N || y !== 0)
2926
2932
  ),
2927
2933
  xt
2928
2934
  );
2929
2935
  const Xt = pt(
2930
2936
  x(
2931
- rt(B, d),
2932
- P(([{ items: v }]) => v.length > 0),
2937
+ rt(k, d),
2938
+ P(([{ items: y }]) => y.length > 0),
2933
2939
  G(xt),
2934
- P(([[v, N], Q]) => {
2935
- const tt = v.items[v.items.length - 1].index === N - 1;
2936
- return (Q || v.bottom > 0 && v.itemHeight > 0 && v.offsetBottom === 0 && v.items.length === N) && tt;
2940
+ P(([[y, N], Q]) => {
2941
+ const tt = y.items[y.items.length - 1].index === N - 1;
2942
+ return (Q || y.bottom > 0 && y.itemHeight > 0 && y.offsetBottom === 0 && y.items.length === N) && tt;
2937
2943
  }),
2938
- E(([[, v]]) => v - 1),
2944
+ E(([[, y]]) => y - 1),
2939
2945
  Y()
2940
2946
  )
2941
2947
  ), Mt = pt(
2942
2948
  x(
2943
- A(B),
2944
- P(({ items: v }) => v.length > 0 && v[0].index === 0),
2945
- vt(0),
2949
+ A(k),
2950
+ P(({ items: y }) => y.length > 0 && y[0].index === 0),
2951
+ yt(0),
2946
2952
  Y()
2947
2953
  )
2948
- ), yt = pt(
2954
+ ), vt = pt(
2949
2955
  x(
2950
- A(B),
2956
+ A(k),
2951
2957
  G(dt),
2952
- P(([{ items: v }, N]) => v.length > 0 && !N),
2953
- E(([{ items: v }]) => ({
2954
- endIndex: v[v.length - 1].index,
2955
- startIndex: v[0].index
2958
+ P(([{ items: y }, N]) => y.length > 0 && !N),
2959
+ E(([{ items: y }]) => ({
2960
+ endIndex: y[y.length - 1].index,
2961
+ startIndex: y[0].index
2956
2962
  })),
2957
- Y(An),
2963
+ Y(Pn),
2958
2964
  Lt(0)
2959
2965
  )
2960
2966
  );
2961
- F(yt, m.scrollSeekRangeChanged), F(
2967
+ F(vt, m.scrollSeekRangeChanged), F(
2962
2968
  x(
2963
2969
  V,
2964
- G(O, L, d, k),
2965
- E(([v, N, Q, it, tt]) => {
2966
- const Bt = Nn(v), { align: Jt, behavior: Nt, offset: de } = Bt;
2967
- let Ot = Bt.index;
2970
+ G(O, L, d, B),
2971
+ E(([y, N, Q, it, tt]) => {
2972
+ const kt = Gn(y), { align: Jt, behavior: Nt, offset: de } = kt;
2973
+ let Ot = kt.index;
2968
2974
  Ot === "LAST" && (Ot = it - 1), Ot = ee(0, Ot, Fe(it - 1, Ot));
2969
2975
  let Ft = Ae(N, tt, Q, Ot);
2970
- return Jt === "end" ? Ft = vn(Ft - N.height + Q.height) : Jt === "center" && (Ft = vn(Ft - N.height / 2 + Q.height / 2)), de && (Ft += de), { behavior: Nt, top: Ft };
2976
+ return Jt === "end" ? Ft = yn(Ft - N.height + Q.height) : Jt === "center" && (Ft = yn(Ft - N.height / 2 + Q.height / 2)), de && (Ft += de), { behavior: Nt, top: Ft };
2971
2977
  })
2972
2978
  ),
2973
2979
  c
2974
2980
  );
2975
- const kt = ct(
2981
+ const Bt = ct(
2976
2982
  x(
2977
- B,
2978
- E((v) => v.offsetBottom + v.bottom)
2983
+ k,
2984
+ E((y) => y.offsetBottom + y.bottom)
2979
2985
  ),
2980
2986
  0
2981
2987
  );
2982
2988
  return F(
2983
2989
  x(
2984
- b,
2985
- E((v) => ({ height: v.visibleHeight, width: v.visibleWidth }))
2990
+ R,
2991
+ E((y) => ({ height: y.visibleHeight, width: y.visibleWidth }))
2986
2992
  ),
2987
2993
  O
2988
2994
  ), {
@@ -2991,10 +2997,10 @@ const Br = /* @__PURE__ */ U(
2991
2997
  data: nt,
2992
2998
  deviation: J,
2993
2999
  footerHeight: r,
2994
- gap: k,
3000
+ gap: B,
2995
3001
  headerHeight: s,
2996
3002
  increaseViewportBy: t,
2997
- initialItemCount: R,
3003
+ initialItemCount: b,
2998
3004
  itemDimensions: L,
2999
3005
  overscan: n,
3000
3006
  restoreStateFrom: st,
@@ -3003,36 +3009,36 @@ const Br = /* @__PURE__ */ U(
3003
3009
  scrollHeight: D,
3004
3010
  scrollTo: c,
3005
3011
  scrollToIndex: V,
3006
- scrollTop: u,
3012
+ scrollTop: a,
3007
3013
  smoothScrollTargetReached: f,
3008
3014
  totalCount: d,
3009
3015
  useWindowScroll: g,
3010
3016
  viewportDimensions: O,
3011
- windowScrollContainerState: a,
3017
+ windowScrollContainerState: u,
3012
3018
  windowScrollTo: T,
3013
- windowViewportRect: b,
3019
+ windowViewportRect: R,
3014
3020
  ...m,
3015
3021
  // output
3016
- gridState: B,
3022
+ gridState: k,
3017
3023
  horizontalDirection: At,
3018
3024
  initialTopMostItemIndex: St,
3019
- totalListHeight: kt,
3025
+ totalListHeight: Bt,
3020
3026
  ...p,
3021
3027
  endReached: Xt,
3022
3028
  propsReady: I,
3023
- rangeChanged: yt,
3029
+ rangeChanged: vt,
3024
3030
  startReached: Mt,
3025
3031
  stateChanged: q,
3026
3032
  stateRestoreInProgress: dt,
3027
3033
  ...h
3028
3034
  };
3029
3035
  },
3030
- X(Ke, at, ae, Kn, Pt, je, Vt)
3036
+ X(Ke, at, ae, Un, Pt, je, Vt)
3031
3037
  );
3032
- function no(t, e, n) {
3038
+ function eo(t, e, n) {
3033
3039
  return ee(1, Ce((t + n) / (Ce(e) + n)));
3034
3040
  }
3035
- function Rn(t, e, n, o) {
3041
+ function bn(t, e, n, o) {
3036
3042
  const { height: r } = n;
3037
3043
  if (r === void 0 || o.length === 0)
3038
3044
  return { bottom: 0, top: 0 };
@@ -3040,19 +3046,19 @@ function Rn(t, e, n, o) {
3040
3046
  return { bottom: Ae(t, e, n, o[o.length - 1].index) + r, top: s };
3041
3047
  }
3042
3048
  function Ae(t, e, n, o) {
3043
- const r = no(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + ee(0, s - 1) * e.row;
3049
+ const r = eo(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + ee(0, s - 1) * e.row;
3044
3050
  return i > 0 ? i + e.row : i;
3045
3051
  }
3046
3052
  const Or = /* @__PURE__ */ U(() => {
3047
- const t = y((S) => `Item ${S}`), e = y({}), n = y(null), o = y("virtuoso-grid-item"), r = y("virtuoso-grid-list"), s = y(Ye), i = y("div"), l = y(Yt), c = (S, p = null) => ct(
3053
+ const t = v((S) => `Item ${S}`), e = v({}), n = v(null), o = v("virtuoso-grid-item"), r = v("virtuoso-grid-list"), s = v(Ye), i = v("div"), l = v(Yt), c = (S, p = null) => ct(
3048
3054
  x(
3049
3055
  e,
3050
3056
  E((m) => m[S]),
3051
3057
  Y()
3052
3058
  ),
3053
3059
  p
3054
- ), u = y(!1), f = y(!1);
3055
- return F(A(f), u), {
3060
+ ), a = v(!1), f = v(!1);
3061
+ return F(A(f), a), {
3056
3062
  components: e,
3057
3063
  computeItemKey: s,
3058
3064
  context: n,
@@ -3064,7 +3070,7 @@ const Or = /* @__PURE__ */ U(() => {
3064
3070
  itemContent: t,
3065
3071
  listClassName: r,
3066
3072
  ListComponent: c("List", "div"),
3067
- readyStateChanged: u,
3073
+ readyStateChanged: a,
3068
3074
  reportReadyState: f,
3069
3075
  ScrollerComponent: c("Scroller", "div"),
3070
3076
  scrollerRef: l,
@@ -3072,21 +3078,21 @@ const Or = /* @__PURE__ */ U(() => {
3072
3078
  };
3073
3079
  }), Fr = /* @__PURE__ */ U(
3074
3080
  ([t, e]) => ({ ...t, ...e }),
3075
- X(Br, Or)
3081
+ X(kr, Or)
3076
3082
  ), Lr = /* @__PURE__ */ H.memo(function() {
3077
- const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = It("scrollHeight"), c = et("ItemComponent"), u = et("ListComponent"), f = et("ScrollSeekPlaceholder"), S = et("context"), p = It("itemDimensions"), m = It("gap"), w = et("log"), I = et("stateRestoreInProgress"), C = It("reportReadyState"), g = Ht(
3083
+ const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = It("scrollHeight"), c = et("ItemComponent"), a = et("ListComponent"), f = et("ScrollSeekPlaceholder"), S = et("context"), p = It("itemDimensions"), m = It("gap"), w = et("log"), I = et("stateRestoreInProgress"), C = It("reportReadyState"), g = Ht(
3078
3084
  H.useMemo(
3079
- () => (a) => {
3080
- const T = a.parentElement.parentElement.scrollHeight;
3085
+ () => (u) => {
3086
+ const T = u.parentElement.parentElement.scrollHeight;
3081
3087
  l(T);
3082
- const b = a.firstChild;
3083
- if (b) {
3084
- const { height: h, width: d } = b.getBoundingClientRect();
3088
+ const R = u.firstChild;
3089
+ if (R) {
3090
+ const { height: h, width: d } = R.getBoundingClientRect();
3085
3091
  p({ height: h, width: d });
3086
3092
  }
3087
3093
  m({
3088
- column: Hn("column-gap", getComputedStyle(a).columnGap, w),
3089
- row: Hn("row-gap", getComputedStyle(a).rowGap, w)
3094
+ column: Hn("column-gap", getComputedStyle(u).columnGap, w),
3095
+ row: Hn("row-gap", getComputedStyle(u).rowGap, w)
3090
3096
  });
3091
3097
  },
3092
3098
  [l, p, m, w]
@@ -3094,24 +3100,24 @@ const Or = /* @__PURE__ */ U(() => {
3094
3100
  !0,
3095
3101
  !1
3096
3102
  );
3097
- return Zn(() => {
3103
+ return Yn(() => {
3098
3104
  e.itemHeight > 0 && e.itemWidth > 0 && C(!0);
3099
3105
  }, [e]), I ? null : /* @__PURE__ */ z(
3100
- u,
3106
+ a,
3101
3107
  {
3102
3108
  className: n,
3103
3109
  ref: g,
3104
- ...Z(u, S),
3110
+ ...Z(a, S),
3105
3111
  "data-testid": "virtuoso-item-list",
3106
3112
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
3107
- children: e.items.map((a) => {
3108
- const T = s(a.index, a.data, S);
3113
+ children: e.items.map((u) => {
3114
+ const T = s(u.index, u.data, S);
3109
3115
  return i ? /* @__PURE__ */ z(
3110
3116
  f,
3111
3117
  {
3112
3118
  ...Z(f, S),
3113
3119
  height: e.itemHeight,
3114
- index: a.index,
3120
+ index: u.index,
3115
3121
  width: e.itemWidth
3116
3122
  },
3117
3123
  T
@@ -3120,10 +3126,10 @@ const Or = /* @__PURE__ */ U(() => {
3120
3126
  {
3121
3127
  ...Z(c, S),
3122
3128
  className: o,
3123
- "data-index": a.index,
3129
+ "data-index": u.index,
3124
3130
  key: T
3125
3131
  },
3126
- r(a.index, a.data, S)
3132
+ r(u.index, u.data, S)
3127
3133
  );
3128
3134
  })
3129
3135
  }
@@ -3153,7 +3159,7 @@ const Or = /* @__PURE__ */ U(() => {
3153
3159
  ), s = et("context");
3154
3160
  return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...Z(e, s) }) }) : null;
3155
3161
  }), Pr = ({ children: t }) => {
3156
- const e = H.useContext(Yn), n = It("itemDimensions"), o = It("viewportDimensions"), r = Ht(
3162
+ const e = H.useContext(qn), n = It("itemDimensions"), o = It("viewportDimensions"), r = Ht(
3157
3163
  H.useMemo(
3158
3164
  () => (s) => {
3159
3165
  o(s.getBoundingClientRect());
@@ -3167,7 +3173,7 @@ const Or = /* @__PURE__ */ U(() => {
3167
3173
  e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
3168
3174
  }, [e, o, n]), /* @__PURE__ */ z("div", { ref: r, style: Zt(!1), children: t });
3169
3175
  }, Ar = ({ children: t }) => {
3170
- const e = H.useContext(Yn), n = It("windowViewportRect"), o = It("itemDimensions"), r = et("customScrollParent"), s = Ge(n, r, !1);
3176
+ const e = H.useContext(qn), n = It("windowViewportRect"), o = It("itemDimensions"), r = et("customScrollParent"), s = Ge(n, r, !1);
3171
3177
  return H.useEffect(() => {
3172
3178
  e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
3173
3179
  }, [e, n, o]), /* @__PURE__ */ z("div", { ref: s, style: Zt(!1), children: t });
@@ -3180,51 +3186,51 @@ const Or = /* @__PURE__ */ U(() => {
3180
3186
  ] }) });
3181
3187
  }), {
3182
3188
  Component: Wr,
3183
- useEmitter: oo,
3189
+ useEmitter: no,
3184
3190
  useEmitterValue: et,
3185
3191
  usePublisher: It
3186
3192
  } = /* @__PURE__ */ qe(
3187
3193
  Fr,
3188
3194
  {
3189
- events: {
3190
- atBottomStateChange: "atBottomStateChange",
3191
- atTopStateChange: "atTopStateChange",
3192
- endReached: "endReached",
3193
- isScrolling: "isScrolling",
3194
- rangeChanged: "rangeChanged",
3195
- readyStateChanged: "readyStateChanged",
3196
- startReached: "startReached",
3197
- stateChanged: "stateChanged"
3198
- },
3199
- methods: {
3200
- scrollBy: "scrollBy",
3201
- scrollTo: "scrollTo",
3202
- scrollToIndex: "scrollToIndex"
3203
- },
3204
3195
  optional: {
3196
+ context: "context",
3197
+ totalCount: "totalCount",
3198
+ overscan: "overscan",
3199
+ itemContent: "itemContent",
3205
3200
  components: "components",
3206
3201
  computeItemKey: "computeItemKey",
3207
- context: "context",
3208
- customScrollParent: "customScrollParent",
3209
3202
  data: "data",
3210
- headerFooterTag: "headerFooterTag",
3211
- increaseViewportBy: "increaseViewportBy",
3212
3203
  initialItemCount: "initialItemCount",
3213
- initialTopMostItemIndex: "initialTopMostItemIndex",
3214
- itemClassName: "itemClassName",
3215
- itemContent: "itemContent",
3204
+ scrollSeekConfiguration: "scrollSeekConfiguration",
3205
+ headerFooterTag: "headerFooterTag",
3216
3206
  listClassName: "listClassName",
3207
+ itemClassName: "itemClassName",
3208
+ useWindowScroll: "useWindowScroll",
3209
+ customScrollParent: "customScrollParent",
3210
+ scrollerRef: "scrollerRef",
3217
3211
  logLevel: "logLevel",
3218
- overscan: "overscan",
3219
3212
  restoreStateFrom: "restoreStateFrom",
3220
- scrollerRef: "scrollerRef",
3221
- scrollSeekConfiguration: "scrollSeekConfiguration",
3222
- totalCount: "totalCount",
3223
- useWindowScroll: "useWindowScroll"
3213
+ initialTopMostItemIndex: "initialTopMostItemIndex",
3214
+ increaseViewportBy: "increaseViewportBy"
3215
+ },
3216
+ methods: {
3217
+ scrollTo: "scrollTo",
3218
+ scrollBy: "scrollBy",
3219
+ scrollToIndex: "scrollToIndex"
3220
+ },
3221
+ events: {
3222
+ isScrolling: "isScrolling",
3223
+ endReached: "endReached",
3224
+ startReached: "startReached",
3225
+ rangeChanged: "rangeChanged",
3226
+ atBottomStateChange: "atBottomStateChange",
3227
+ atTopStateChange: "atTopStateChange",
3228
+ stateChanged: "stateChanged",
3229
+ readyStateChanged: "readyStateChanged"
3224
3230
  }
3225
3231
  },
3226
3232
  Mr
3227
- ), _r = /* @__PURE__ */ Ze({ useEmitter: oo, useEmitterValue: et, usePublisher: It }), Gr = /* @__PURE__ */ Xe({ useEmitter: oo, useEmitterValue: et, usePublisher: It });
3233
+ ), _r = /* @__PURE__ */ Ze({ useEmitter: no, useEmitterValue: et, usePublisher: It }), Gr = /* @__PURE__ */ Xe({ useEmitter: no, useEmitterValue: et, usePublisher: It });
3228
3234
  function Hn(t, e, n) {
3229
3235
  return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, ht.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
3230
3236
  }
@@ -3235,6 +3241,6 @@ export {
3235
3241
  qr as TableVirtuoso,
3236
3242
  Kr as Virtuoso,
3237
3243
  Yr as VirtuosoGrid,
3238
- Yn as VirtuosoGridMockContext,
3239
- Re as VirtuosoMockContext
3244
+ qn as VirtuosoGridMockContext,
3245
+ be as VirtuosoMockContext
3240
3246
  };