react-virtuoso 4.12.7 → 4.12.8

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
@@ -45,10 +45,10 @@ function W(t, e) {
45
45
  function We(t) {
46
46
  t(qt);
47
47
  }
48
- function lt(t) {
48
+ function st(t) {
49
49
  return t(En);
50
50
  }
51
- function F(t, e) {
51
+ function O(t, e) {
52
52
  return K(t, co(e, we));
53
53
  }
54
54
  function bt(t, e) {
@@ -117,7 +117,7 @@ function Lt(t) {
117
117
  }, t));
118
118
  };
119
119
  }
120
- function G(...t) {
120
+ function _(...t) {
121
121
  const e = new Array(t.length);
122
122
  let n = 0, o = null;
123
123
  const r = Math.pow(2, t.length) - 1;
@@ -169,7 +169,7 @@ function v(t) {
169
169
  };
170
170
  }
171
171
  function ct(t, e) {
172
- return ve(v(e), (n) => F(t, n));
172
+ return ve(v(e), (n) => O(t, n));
173
173
  }
174
174
  function $() {
175
175
  const t = [];
@@ -191,8 +191,8 @@ function $() {
191
191
  }
192
192
  };
193
193
  }
194
- function pt(t) {
195
- return ve($(), (e) => F(t, e));
194
+ function ht(t) {
195
+ return ve($(), (e) => O(t, e));
196
196
  }
197
197
  function U(t, e = [], { singleton: n } = { singleton: !0 }) {
198
198
  return {
@@ -245,7 +245,7 @@ function an(...t) {
245
245
  }
246
246
  };
247
247
  }
248
- var ht = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t))(ht || {});
248
+ var mt = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t))(mt || {});
249
249
  const go = {
250
250
  0: "debug",
251
251
  3: "error",
@@ -260,7 +260,7 @@ const go = {
260
260
  return {
261
261
  log: v((n, o, r = 1) => {
262
262
  var i;
263
- const s = (i = Io().VIRTUOSO_LOG_LEVEL) != null ? i : lt(t);
263
+ const s = (i = Io().VIRTUOSO_LOG_LEVEL) != null ? i : st(t);
264
264
  r >= s && console[go[r]](
265
265
  "%creact-virtuoso: %c%s %o",
266
266
  "color: #0253b3; font-weight: bold",
@@ -276,9 +276,9 @@ const go = {
276
276
  { singleton: !0 }
277
277
  );
278
278
  function Ht(t, e, n) {
279
- return _e(t, e, n).callbackRef;
279
+ return Ge(t, e, n).callbackRef;
280
280
  }
281
- function _e(t, e, n) {
281
+ function Ge(t, e, n) {
282
282
  const o = H.useRef(null);
283
283
  let r = (i) => {
284
284
  };
@@ -295,26 +295,26 @@ function _e(t, e, n) {
295
295
  }
296
296
  function kn(t, e, n, o, r, s, i, l, c) {
297
297
  const a = H.useCallback(
298
- (f) => {
299
- const S = So(f.children, e, l ? "offsetWidth" : "offsetHeight", r);
300
- let p = f.parentElement;
301
- for (; !p.dataset.virtuosoScroller; )
302
- p = p.parentElement;
303
- const m = p.lastElementChild.dataset.viewportType === "window";
304
- let w;
305
- m && (w = p.ownerDocument.defaultView);
306
- const I = i ? l ? i.scrollLeft : i.scrollTop : m ? l ? w.scrollX || w.document.documentElement.scrollLeft : w.scrollY || w.document.documentElement.scrollTop : l ? p.scrollLeft : p.scrollTop, C = i ? l ? i.scrollWidth : i.scrollHeight : m ? l ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight : l ? p.scrollWidth : p.scrollHeight, g = i ? l ? i.offsetWidth : i.offsetHeight : m ? l ? w.innerWidth : w.innerHeight : l ? p.offsetWidth : p.offsetHeight;
298
+ (p) => {
299
+ const I = So(p.children, e, l ? "offsetWidth" : "offsetHeight", r);
300
+ let h = p.parentElement;
301
+ for (; !h.dataset.virtuosoScroller; )
302
+ h = h.parentElement;
303
+ const f = h.lastElementChild.dataset.viewportType === "window";
304
+ let C;
305
+ f && (C = h.ownerDocument.defaultView);
306
+ const w = i ? l ? i.scrollLeft : i.scrollTop : f ? l ? C.scrollX || C.document.documentElement.scrollLeft : C.scrollY || C.document.documentElement.scrollTop : l ? h.scrollLeft : h.scrollTop, S = i ? l ? i.scrollWidth : i.scrollHeight : f ? l ? C.document.documentElement.scrollWidth : C.document.documentElement.scrollHeight : l ? h.scrollWidth : h.scrollHeight, m = i ? l ? i.offsetWidth : i.offsetHeight : f ? l ? C.innerWidth : C.innerHeight : l ? h.offsetWidth : h.offsetHeight;
307
307
  o({
308
- scrollHeight: C,
309
- scrollTop: Math.max(I, 0),
310
- viewportHeight: g
308
+ scrollHeight: S,
309
+ scrollTop: Math.max(w, 0),
310
+ viewportHeight: m
311
311
  }), s == null || s(
312
- l ? dn("column-gap", getComputedStyle(f).columnGap, r) : dn("row-gap", getComputedStyle(f).rowGap, r)
313
- ), S !== null && t(S);
312
+ l ? dn("column-gap", getComputedStyle(p).columnGap, r) : dn("row-gap", getComputedStyle(p).rowGap, r)
313
+ ), I !== null && t(I);
314
314
  },
315
315
  [t, e, r, s, i, o, l]
316
316
  );
317
- return _e(a, n, c);
317
+ return Ge(a, n, c);
318
318
  }
319
319
  function So(t, e, n, o) {
320
320
  const r = t.length;
@@ -325,40 +325,40 @@ function So(t, e, n, o) {
325
325
  const l = t.item(i);
326
326
  if (l.dataset.index === void 0)
327
327
  continue;
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)
328
+ const c = parseInt(l.dataset.index), a = parseFloat(l.dataset.knownSize), p = e(l, n);
329
+ if (p === 0 && o("Zero-sized element, this should not happen", { child: l }, mt.ERROR), p === a)
330
330
  continue;
331
- const S = s[s.length - 1];
332
- s.length === 0 || S.size !== f || S.endIndex !== c - 1 ? s.push({ endIndex: c, size: f, startIndex: c }) : s[s.length - 1].endIndex++;
331
+ const I = s[s.length - 1];
332
+ s.length === 0 || I.size !== p || I.endIndex !== c - 1 ? s.push({ endIndex: c, size: p, startIndex: c }) : s[s.length - 1].endIndex++;
333
333
  }
334
334
  return s;
335
335
  }
336
336
  function dn(t, e, n) {
337
- 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);
337
+ return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, mt.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
338
338
  }
339
- function Ge(t, e, n) {
339
+ function _e(t, e, n) {
340
340
  const o = H.useRef(null), r = H.useCallback(
341
341
  (c) => {
342
342
  if (!(c != null && c.offsetParent))
343
343
  return;
344
- const a = c.getBoundingClientRect(), f = a.width;
345
- let S, p;
344
+ const a = c.getBoundingClientRect(), p = a.width;
345
+ let I, h;
346
346
  if (e) {
347
- const m = e.getBoundingClientRect(), w = a.top - m.top;
348
- p = m.height - Math.max(0, w), S = w + e.scrollTop;
347
+ const f = e.getBoundingClientRect(), C = a.top - f.top;
348
+ h = f.height - Math.max(0, C), I = C + e.scrollTop;
349
349
  } else {
350
- const m = i.current.ownerDocument.defaultView;
351
- p = m.innerHeight - Math.max(0, a.top), S = a.top + m.scrollY;
350
+ const f = i.current.ownerDocument.defaultView;
351
+ h = f.innerHeight - Math.max(0, a.top), I = a.top + f.scrollY;
352
352
  }
353
353
  o.current = {
354
- offsetTop: S,
355
- visibleHeight: p,
356
- visibleWidth: f
354
+ offsetTop: I,
355
+ visibleHeight: h,
356
+ visibleWidth: p
357
357
  }, t(o.current);
358
358
  },
359
359
  // eslint-disable-next-line react-hooks/exhaustive-deps
360
360
  [t, e]
361
- ), { callbackRef: s, ref: i } = _e(r, !0, n), l = H.useCallback(() => {
361
+ ), { callbackRef: s, ref: i } = Ge(r, !0, n), l = H.useCallback(() => {
362
362
  r(i.current);
363
363
  }, [r, i]);
364
364
  return H.useEffect(() => {
@@ -381,35 +381,35 @@ function Ge(t, e, n) {
381
381
  }
382
382
  const at = U(
383
383
  () => {
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);
385
- return F(
384
+ const t = $(), e = $(), n = v(0), o = $(), r = v(0), s = $(), i = $(), l = v(0), c = v(0), a = v(0), p = v(0), I = $(), h = $(), f = v(!1), C = v(!1), w = v(!1);
385
+ return O(
386
386
  x(
387
387
  t,
388
- E(({ scrollTop: C }) => C)
388
+ E(({ scrollTop: S }) => S)
389
389
  ),
390
390
  e
391
- ), F(
391
+ ), O(
392
392
  x(
393
393
  t,
394
- E(({ scrollHeight: C }) => C)
394
+ E(({ scrollHeight: S }) => S)
395
395
  ),
396
396
  i
397
- ), F(e, r), {
397
+ ), O(e, r), {
398
398
  deviation: n,
399
399
  fixedFooterHeight: a,
400
400
  fixedHeaderHeight: c,
401
- footerHeight: f,
401
+ footerHeight: p,
402
402
  headerHeight: l,
403
- horizontalDirection: w,
404
- scrollBy: p,
403
+ horizontalDirection: C,
404
+ scrollBy: h,
405
405
  // input
406
406
  scrollContainerState: t,
407
407
  scrollHeight: i,
408
- scrollingInProgress: m,
408
+ scrollingInProgress: f,
409
409
  // signals
410
- scrollTo: S,
410
+ scrollTo: I,
411
411
  scrollTop: e,
412
- skipAnimationFrameInResizeObserver: I,
412
+ skipAnimationFrameInResizeObserver: w,
413
413
  smoothScrollTargetReached: o,
414
414
  // state
415
415
  statefulScrollTop: r,
@@ -419,7 +419,7 @@ const at = U(
419
419
  [],
420
420
  { singleton: !0 }
421
421
  ), oe = { lvl: 0 };
422
- function On(t, e) {
422
+ function Fn(t, e) {
423
423
  const n = t.length;
424
424
  if (n === 0)
425
425
  return [];
@@ -449,8 +449,8 @@ function Ct(t, e, n = "k") {
449
449
  }
450
450
  return Ct(t.l, e, n);
451
451
  }
452
- function mt(t, 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) }));
452
+ function pt(t, 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: pt(t.l, e, n) })) : fn(ot(t, { r: pt(t.r, e, n) }));
454
454
  }
455
455
  function Ut() {
456
456
  return oe;
@@ -471,12 +471,12 @@ function Le(t, e) {
471
471
  return o;
472
472
  {
473
473
  const [s, i] = Ln(o);
474
- return ge(ot(t, { k: s, l: Fn(o), v: i }));
474
+ return ge(ot(t, { k: s, l: On(o), v: i }));
475
475
  }
476
476
  } else return e < n ? ge(ot(t, { l: Le(o, e) })) : ge(ot(t, { r: Le(r, e) }));
477
477
  }
478
- function _t(t) {
479
- return j(t) ? [] : [..._t(t.l), { k: t.k, v: t.v }, ..._t(t.r)];
478
+ function Gt(t) {
479
+ return j(t) ? [] : [...Gt(t.l), { k: t.k, v: t.v }, ...Gt(t.r)];
480
480
  }
481
481
  function ze(t, e, n) {
482
482
  if (j(t))
@@ -528,8 +528,8 @@ function ot(t, e) {
528
528
  e.r !== void 0 ? e.r : t.r
529
529
  );
530
530
  }
531
- function Fn(t) {
532
- return j(t.r) ? t.l : ge(ot(t, { r: Fn(t.r) }));
531
+ function On(t) {
532
+ return j(t.r) ? t.l : ge(ot(t, { r: On(t.r) }));
533
533
  }
534
534
  function Ee(t) {
535
535
  return j(t) || t.lvl > t.r.lvl;
@@ -552,7 +552,7 @@ function Ve(t) {
552
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;
553
553
  }
554
554
  function xo(t) {
555
- return On(t, ({ k: e, v: n }) => ({ index: e, value: n }));
555
+ return Fn(t, ({ k: e, v: n }) => ({ index: e, value: n }));
556
556
  }
557
557
  function Pn(t, e) {
558
558
  return !!(t && t.startIndex === e.startIndex && t.endIndex === e.endIndex);
@@ -615,16 +615,16 @@ function wo(t, e) {
615
615
  for (const o of e) {
616
616
  const { endIndex: r, size: s, startIndex: i } = o;
617
617
  if (n = Math.min(n, i), j(t)) {
618
- t = mt(t, 0, s);
618
+ t = pt(t, 0, s);
619
619
  continue;
620
620
  }
621
621
  const l = ye(t, i - 1, r + 1);
622
622
  if (l.some(Bo(o)))
623
623
  continue;
624
624
  let c = !1, a = !1;
625
- for (const { end: f, start: S, value: p } of l)
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));
625
+ for (const { end: p, start: I, value: h } of l)
626
+ c ? (r >= I || s === h) && (t = Le(t, I)) : (a = h !== s, c = !0), p > r && r >= I && h !== s && (t = pt(t, r + 1, h));
627
+ a && (t = pt(t, i, s));
628
628
  }
629
629
  return [t, n];
630
630
  }
@@ -658,32 +658,32 @@ function Wn(t, e, n) {
658
658
  }
659
659
  }
660
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);
661
+ return o > 0 && (e = Math.max(e, An(t, o, De).offset)), Fn(To(t, e, n, yo), Eo);
662
662
  }
663
663
  function bo(t, [e, n, o, r]) {
664
- e.length > 0 && o("received item sizes", e, ht.DEBUG);
664
+ e.length > 0 && o("received item sizes", e, mt.DEBUG);
665
665
  const s = t.sizeTree;
666
666
  let i = s, l = 0;
667
667
  if (n.length > 0 && j(s) && e.length === 2) {
668
- const p = e[0].size, m = e[1].size;
669
- i = n.reduce((w, I) => mt(mt(w, I, p), I + 1, m), i);
668
+ const h = e[0].size, f = e[1].size;
669
+ i = n.reduce((C, w) => pt(pt(C, w, h), w + 1, f), i);
670
670
  } else
671
671
  [i, l] = wo(i, e);
672
672
  if (i === s)
673
673
  return t;
674
- const { lastIndex: c, lastOffset: a, lastSize: f, offsetTree: S } = Pe(t.offsetTree, l, i, r);
674
+ const { lastIndex: c, lastOffset: a, lastSize: p, offsetTree: I } = Pe(t.offsetTree, l, i, r);
675
675
  return {
676
676
  groupIndices: n,
677
- groupOffsetTree: n.reduce((p, m) => mt(p, m, ie(m, S, r)), Ut()),
677
+ groupOffsetTree: n.reduce((h, f) => pt(h, f, ie(f, I, r)), Ut()),
678
678
  lastIndex: c,
679
679
  lastOffset: a,
680
- lastSize: f,
681
- offsetTree: S,
680
+ lastSize: p,
681
+ offsetTree: I,
682
682
  sizeTree: i
683
683
  };
684
684
  }
685
685
  function Ho(t) {
686
- return _t(t).map(({ k: e, v: n }, o, r) => {
686
+ return Gt(t).map(({ k: e, v: n }, o, r) => {
687
687
  const s = r[o + 1];
688
688
  return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: e };
689
689
  });
@@ -698,17 +698,17 @@ function Pe(t, e, n, o) {
698
698
  let r = t, s = 0, i = 0, l = 0, c = 0;
699
699
  if (e !== 0) {
700
700
  c = Se(r, e - 1, De), l = r[c].offset;
701
- const f = Ct(n, e - 1);
702
- s = f[0], i = f[1], r.length && r[c].size === Ct(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
701
+ const p = Ct(n, e - 1);
702
+ s = p[0], i = p[1], r.length && r[c].size === Ct(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
703
703
  } else
704
704
  r = [];
705
- for (const { start: a, value: f } of ye(n, e, 1 / 0)) {
706
- const S = a - s, p = S * i + l + S * o;
705
+ for (const { start: a, value: p } of ye(n, e, 1 / 0)) {
706
+ const I = a - s, h = I * i + l + I * o;
707
707
  r.push({
708
708
  index: a,
709
- offset: p,
710
- size: f
711
- }), s = a, l = p, i = f;
709
+ offset: h,
710
+ size: p
711
+ }), s = a, l = h, i = p;
712
712
  }
713
713
  return {
714
714
  lastIndex: s,
@@ -729,116 +729,116 @@ const ko = {
729
729
  offsetWidth: "width"
730
730
  }, Et = U(
731
731
  ([{ log: t }, { recalcInProgress: e }]) => {
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()),
734
- w
735
- ), C = ct(
732
+ const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l = v(0), c = v([]), a = v(void 0), p = v(void 0), I = v((g, d) => wt(g, ko[d])), h = v(void 0), f = v(0), C = Co(), w = ct(
733
+ x(n, _(c, t, f), Rt(bo, C), Y()),
734
+ C
735
+ ), S = ct(
736
736
  x(
737
737
  c,
738
738
  Y(),
739
- Rt((h, d) => ({ current: d, prev: h.current }), {
739
+ Rt((g, d) => ({ current: d, prev: g.current }), {
740
740
  current: [],
741
741
  prev: []
742
742
  }),
743
- E(({ prev: h }) => h)
743
+ E(({ prev: g }) => g)
744
744
  ),
745
745
  []
746
746
  );
747
- F(
747
+ O(
748
748
  x(
749
749
  c,
750
- P((h) => h.length > 0),
751
- G(I, m),
752
- E(([h, d, b]) => {
753
- const k = h.reduce((O, L, V) => mt(O, L, ie(L, d.offsetTree, b) || V), Ut());
750
+ P((g) => g.length > 0),
751
+ _(w, f),
752
+ E(([g, d, b]) => {
753
+ const k = g.reduce((F, L, V) => pt(F, L, ie(L, d.offsetTree, b) || V), Ut());
754
754
  return {
755
755
  ...d,
756
- groupIndices: h,
756
+ groupIndices: g,
757
757
  groupOffsetTree: k
758
758
  };
759
759
  })
760
760
  ),
761
- I
762
- ), F(
761
+ w
762
+ ), O(
763
763
  x(
764
764
  o,
765
- G(I),
766
- P(([h, { lastIndex: d }]) => h < d),
767
- E(([h, { lastIndex: d, lastSize: b }]) => [
765
+ _(w),
766
+ P(([g, { lastIndex: d }]) => g < d),
767
+ E(([g, { lastIndex: d, lastSize: b }]) => [
768
768
  {
769
769
  endIndex: d,
770
770
  size: b,
771
- startIndex: h
771
+ startIndex: g
772
772
  }
773
773
  ])
774
774
  ),
775
775
  n
776
- ), F(a, f);
777
- const g = ct(
776
+ ), O(a, p);
777
+ const m = ct(
778
778
  x(
779
779
  a,
780
- E((h) => h === void 0)
780
+ E((g) => g === void 0)
781
781
  ),
782
782
  !0
783
783
  );
784
- F(
784
+ O(
785
785
  x(
786
- f,
787
- P((h) => h !== void 0 && j(lt(I).sizeTree)),
788
- E((h) => [{ endIndex: 0, size: h, startIndex: 0 }])
786
+ p,
787
+ P((g) => g !== void 0 && j(st(w).sizeTree)),
788
+ E((g) => [{ endIndex: 0, size: g, startIndex: 0 }])
789
789
  ),
790
790
  n
791
791
  );
792
- const u = pt(
792
+ const u = ht(
793
793
  x(
794
794
  n,
795
- G(I),
795
+ _(w),
796
796
  Rt(
797
- ({ sizes: h }, [d, b]) => ({
798
- changed: b !== h,
797
+ ({ sizes: g }, [d, b]) => ({
798
+ changed: b !== g,
799
799
  sizes: b
800
800
  }),
801
- { changed: !1, sizes: w }
801
+ { changed: !1, sizes: C }
802
802
  ),
803
- E((h) => h.changed)
803
+ E((g) => g.changed)
804
804
  )
805
805
  );
806
806
  K(
807
807
  x(
808
808
  l,
809
809
  Rt(
810
- (h, d) => ({ diff: h.prev - d, prev: d }),
810
+ (g, d) => ({ diff: g.prev - d, prev: d }),
811
811
  { diff: 0, prev: 0 }
812
812
  ),
813
- E((h) => h.diff)
813
+ E((g) => g.diff)
814
814
  ),
815
- (h) => {
816
- const { groupIndices: d } = lt(I);
817
- if (h > 0)
818
- W(e, !0), W(s, h + mn(h, d));
819
- else if (h < 0) {
820
- const b = lt(C);
821
- b.length > 0 && (h -= mn(-h, b)), W(i, h);
815
+ (g) => {
816
+ const { groupIndices: d } = st(w);
817
+ if (g > 0)
818
+ W(e, !0), W(s, g + mn(g, d));
819
+ else if (g < 0) {
820
+ const b = st(S);
821
+ b.length > 0 && (g -= mn(-g, b)), W(i, g);
822
822
  }
823
823
  }
824
- ), K(x(l, G(t)), ([h, d]) => {
825
- h < 0 && d(
824
+ ), K(x(l, _(t)), ([g, d]) => {
825
+ g < 0 && d(
826
826
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
827
827
  { firstItemIndex: l },
828
- ht.ERROR
828
+ mt.ERROR
829
829
  );
830
830
  });
831
- const T = pt(s);
832
- F(
831
+ const T = ht(s);
832
+ O(
833
833
  x(
834
834
  s,
835
- G(I),
836
- E(([h, d]) => {
837
- const b = d.groupIndices.length > 0, k = [], O = d.lastSize;
835
+ _(w),
836
+ E(([g, d]) => {
837
+ const b = d.groupIndices.length > 0, k = [], F = d.lastSize;
838
838
  if (b) {
839
839
  const L = re(d.sizeTree, 0);
840
840
  let V = 0, D = 0;
841
- for (; V < h; ) {
841
+ for (; V < g; ) {
842
842
  const B = d.groupIndices[D], q = d.groupIndices.length === D + 1 ? 1 / 0 : d.groupIndices[D + 1] - B - 1;
843
843
  k.push({
844
844
  endIndex: B,
@@ -846,43 +846,43 @@ const ko = {
846
846
  startIndex: B
847
847
  }), k.push({
848
848
  endIndex: B + 1 + q - 1,
849
- size: O,
849
+ size: F,
850
850
  startIndex: B + 1
851
851
  }), D++, V += q + 1;
852
852
  }
853
- const J = _t(d.sizeTree);
854
- return V !== h && J.shift(), J.reduce(
855
- (B, { k: q, v: st }) => {
853
+ const J = Gt(d.sizeTree);
854
+ return V !== g && J.shift(), J.reduce(
855
+ (B, { k: q, v: it }) => {
856
856
  let dt = B.ranges;
857
857
  return B.prevSize !== 0 && (dt = [
858
858
  ...B.ranges,
859
859
  {
860
- endIndex: q + h - 1,
860
+ endIndex: q + g - 1,
861
861
  size: B.prevSize,
862
862
  startIndex: B.prevIndex
863
863
  }
864
864
  ]), {
865
- prevIndex: q + h,
866
- prevSize: st,
865
+ prevIndex: q + g,
866
+ prevSize: it,
867
867
  ranges: dt
868
868
  };
869
869
  },
870
870
  {
871
- prevIndex: h,
871
+ prevIndex: g,
872
872
  prevSize: 0,
873
873
  ranges: k
874
874
  }
875
875
  ).ranges;
876
876
  }
877
- return _t(d.sizeTree).reduce(
877
+ return Gt(d.sizeTree).reduce(
878
878
  (L, { k: V, v: D }) => ({
879
- prevIndex: V + h,
879
+ prevIndex: V + g,
880
880
  prevSize: D,
881
- ranges: [...L.ranges, { endIndex: V + h - 1, size: L.prevSize, startIndex: L.prevIndex }]
881
+ ranges: [...L.ranges, { endIndex: V + g - 1, size: L.prevSize, startIndex: L.prevIndex }]
882
882
  }),
883
883
  {
884
884
  prevIndex: 0,
885
- prevSize: O,
885
+ prevSize: F,
886
886
  ranges: []
887
887
  }
888
888
  ).ranges;
@@ -890,80 +890,80 @@ const ko = {
890
890
  ),
891
891
  n
892
892
  );
893
- const R = pt(
893
+ const R = ht(
894
894
  x(
895
895
  i,
896
- G(I, m),
897
- E(([h, { offsetTree: d }, b]) => {
898
- const k = -h;
896
+ _(w, f),
897
+ E(([g, { offsetTree: d }, b]) => {
898
+ const k = -g;
899
899
  return ie(k, d, b);
900
900
  })
901
901
  )
902
902
  );
903
- return F(
903
+ return O(
904
904
  x(
905
905
  i,
906
- G(I, m),
907
- E(([h, d, b]) => {
906
+ _(w, f),
907
+ E(([g, d, b]) => {
908
908
  if (d.groupIndices.length > 0) {
909
909
  if (j(d.sizeTree))
910
910
  return d;
911
- let O = Ut();
912
- const L = lt(C);
911
+ let F = Ut();
912
+ const L = st(S);
913
913
  let V = 0, D = 0, J = 0;
914
- for (; V < -h; ) {
914
+ for (; V < -g; ) {
915
915
  J = L[D];
916
916
  const B = L[D + 1] - J - 1;
917
917
  D++, V += B + 1;
918
918
  }
919
- if (O = _t(d.sizeTree).reduce((B, { k: q, v: st }) => mt(B, Math.max(0, q + h), st), O), V !== -h) {
919
+ if (F = Gt(d.sizeTree).reduce((B, { k: q, v: it }) => pt(B, Math.max(0, q + g), it), F), V !== -g) {
920
920
  const B = re(d.sizeTree, J);
921
- O = mt(O, 0, B);
922
- const q = Ct(d.sizeTree, -h + 1)[1];
923
- O = mt(O, 1, q);
921
+ F = pt(F, 0, B);
922
+ const q = Ct(d.sizeTree, -g + 1)[1];
923
+ F = pt(F, 1, q);
924
924
  }
925
925
  return {
926
926
  ...d,
927
- sizeTree: O,
928
- ...Pe(d.offsetTree, 0, O, b)
927
+ sizeTree: F,
928
+ ...Pe(d.offsetTree, 0, F, b)
929
929
  };
930
930
  } else {
931
- const O = _t(d.sizeTree).reduce((L, { k: V, v: D }) => mt(L, Math.max(0, V + h), D), Ut());
931
+ const F = Gt(d.sizeTree).reduce((L, { k: V, v: D }) => pt(L, Math.max(0, V + g), D), Ut());
932
932
  return {
933
933
  ...d,
934
- sizeTree: O,
935
- ...Pe(d.offsetTree, 0, O, b)
934
+ sizeTree: F,
935
+ ...Pe(d.offsetTree, 0, F, b)
936
936
  };
937
937
  }
938
938
  })
939
939
  ),
940
- I
940
+ w
941
941
  ), {
942
942
  beforeUnshiftWith: T,
943
943
  // input
944
- data: p,
945
- defaultItemSize: f,
944
+ data: h,
945
+ defaultItemSize: p,
946
946
  firstItemIndex: l,
947
947
  fixedItemSize: a,
948
- gap: m,
948
+ gap: f,
949
949
  groupIndices: c,
950
- itemSize: S,
950
+ itemSize: I,
951
951
  listRefresh: u,
952
952
  shiftWith: i,
953
953
  shiftWithOffset: R,
954
954
  sizeRanges: n,
955
955
  // output
956
- sizes: I,
956
+ sizes: w,
957
957
  statefulTotalCount: r,
958
958
  totalCount: o,
959
- trackItemSizes: g,
959
+ trackItemSizes: m,
960
960
  unshiftWith: s
961
961
  };
962
962
  },
963
963
  X(Vt, Ne),
964
964
  { singleton: !0 }
965
965
  );
966
- function Oo(t) {
966
+ function Fo(t) {
967
967
  return t.reduce(
968
968
  (e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
969
969
  {
@@ -972,26 +972,26 @@ function Oo(t) {
972
972
  }
973
973
  );
974
974
  }
975
- const _n = U(
975
+ const Gn = U(
976
976
  ([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
977
- const s = $(), i = $(), l = pt(x(s, E(Oo)));
978
- return F(
977
+ const s = $(), i = $(), l = ht(x(s, E(Fo)));
978
+ return O(
979
979
  x(
980
980
  l,
981
981
  E((c) => c.totalCount)
982
982
  ),
983
983
  n
984
- ), F(
984
+ ), O(
985
985
  x(
986
986
  l,
987
987
  E((c) => c.groupIndices)
988
988
  ),
989
989
  t
990
- ), F(
990
+ ), O(
991
991
  x(
992
992
  rt(r, e, o),
993
993
  P(([c, a]) => Re(a)),
994
- E(([c, a, f]) => Ct(a.groupOffsetTree, Math.max(c - f, 0), "v")[0]),
994
+ E(([c, a, p]) => Ct(a.groupOffsetTree, Math.max(c - p, 0), "v")[0]),
995
995
  Y(),
996
996
  E((c) => [c])
997
997
  ),
@@ -1001,7 +1001,7 @@ const _n = U(
1001
1001
  X(Et, at)
1002
1002
  ), Pt = U(
1003
1003
  ([{ log: t }]) => {
1004
- const e = v(!1), n = pt(
1004
+ const e = v(!1), n = ht(
1005
1005
  x(
1006
1006
  e,
1007
1007
  P((o) => o),
@@ -1009,15 +1009,15 @@ const _n = U(
1009
1009
  )
1010
1010
  );
1011
1011
  return K(e, (o) => {
1012
- o && lt(t)("props updated", {}, ht.DEBUG);
1012
+ o && st(t)("props updated", {}, mt.DEBUG);
1013
1013
  }), { didMount: n, propsReady: e };
1014
1014
  },
1015
1015
  X(Vt),
1016
1016
  { singleton: !0 }
1017
- ), Fo = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1018
- function Gn(t) {
1017
+ ), Oo = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1018
+ function _n(t) {
1019
1019
  const e = typeof t == "number" ? { index: t } : t;
1020
- return e.align || (e.align = "start"), (!e.behavior || !Fo) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
1020
+ return e.align || (e.align = "start"), (!e.behavior || !Oo) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
1021
1021
  }
1022
1022
  const ce = U(
1023
1023
  ([
@@ -1029,54 +1029,54 @@ const ce = U(
1029
1029
  headerHeight: l,
1030
1030
  scrollingInProgress: c,
1031
1031
  scrollTo: a,
1032
- smoothScrollTargetReached: f,
1033
- viewportHeight: S
1032
+ smoothScrollTargetReached: p,
1033
+ viewportHeight: I
1034
1034
  },
1035
- { log: p }
1035
+ { log: h }
1036
1036
  ]) => {
1037
- const m = $(), w = $(), I = v(0);
1038
- let C = null, g = null, u = null;
1037
+ const f = $(), C = $(), w = v(0);
1038
+ let S = null, m = null, u = null;
1039
1039
  function T() {
1040
- C && (C(), C = null), u && (u(), u = null), g && (clearTimeout(g), g = null), W(c, !1);
1040
+ S && (S(), S = null), u && (u(), u = null), m && (clearTimeout(m), m = null), W(c, !1);
1041
1041
  }
1042
- return F(
1042
+ return O(
1043
1043
  x(
1044
- m,
1045
- G(n, S, o, I, l, i, p),
1046
- G(t, s, r),
1044
+ f,
1045
+ _(n, I, o, w, l, i, h),
1046
+ _(t, s, r),
1047
1047
  E(
1048
1048
  ([
1049
- [R, h, d, b, k, O, L, V],
1049
+ [R, g, d, b, k, F, L, V],
1050
1050
  D,
1051
1051
  J,
1052
1052
  nt
1053
1053
  ]) => {
1054
- const B = Gn(R), { align: q, behavior: st, offset: dt } = B, St = b - 1, ft = Wn(B, h, St);
1055
- let ut = ie(ft, h.offsetTree, D) + O;
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);
1054
+ const B = _n(R), { align: q, behavior: it, offset: dt } = B, St = b - 1, ft = Wn(B, g, St);
1055
+ let ut = ie(ft, g.offsetTree, D) + F;
1056
+ q === "end" ? (ut += J + Ct(g.sizeTree, ft)[1] - d + nt, ft === St && (ut += L)) : q === "center" ? ut += (J + Ct(g.sizeTree, ft)[1] - d + nt) / 2 : ut -= k, dt && (ut += dt);
1057
1057
  const At = (xt) => {
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));
1058
+ T(), xt ? (V("retrying to scroll to", { location: R }, mt.DEBUG), W(f, R)) : (W(C, !0), V("list did not change, scroll successful", {}, mt.DEBUG));
1059
1059
  };
1060
- if (T(), st === "smooth") {
1060
+ if (T(), it === "smooth") {
1061
1061
  let xt = !1;
1062
1062
  u = K(e, (Xt) => {
1063
1063
  xt = xt || Xt;
1064
- }), C = bt(f, () => {
1064
+ }), S = bt(p, () => {
1065
1065
  At(xt);
1066
1066
  });
1067
1067
  } else
1068
- C = bt(x(e, Lo(150)), At);
1069
- return g = setTimeout(() => {
1068
+ S = bt(x(e, Lo(150)), At);
1069
+ return m = setTimeout(() => {
1070
1070
  T();
1071
- }, 1200), W(c, !0), V("scrolling from index to", { behavior: st, index: ft, top: ut }, ht.DEBUG), { behavior: st, top: ut };
1071
+ }, 1200), W(c, !0), V("scrolling from index to", { behavior: it, index: ft, top: ut }, mt.DEBUG), { behavior: it, top: ut };
1072
1072
  }
1073
1073
  )
1074
1074
  ),
1075
1075
  a
1076
1076
  ), {
1077
- scrollTargetReached: w,
1078
- scrollToIndex: m,
1079
- topListHeight: I
1077
+ scrollTargetReached: C,
1078
+ scrollToIndex: f,
1079
+ topListHeight: w
1080
1080
  };
1081
1081
  },
1082
1082
  X(Et, at, Vt),
@@ -1104,36 +1104,36 @@ function Ue(t, e) {
1104
1104
  const ue = U(
1105
1105
  ([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
1106
1106
  const l = v(!0), c = v(0), a = v(!0);
1107
- return F(
1107
+ return O(
1108
1108
  x(
1109
1109
  i,
1110
- G(c),
1111
- P(([f, S]) => !!S),
1110
+ _(c),
1111
+ P(([p, I]) => !!I),
1112
1112
  yt(!1)
1113
1113
  ),
1114
1114
  l
1115
- ), F(
1115
+ ), O(
1116
1116
  x(
1117
1117
  i,
1118
- G(c),
1119
- P(([f, S]) => !!S),
1118
+ _(c),
1119
+ P(([p, I]) => !!I),
1120
1120
  yt(!1)
1121
1121
  ),
1122
1122
  a
1123
1123
  ), K(
1124
1124
  x(
1125
1125
  rt(e, i),
1126
- G(l, n, t, a),
1127
- P(([[, f], S, { sizeTree: p }, m, w]) => f && (!j(p) || Me(m)) && !S && !w),
1128
- G(c)
1126
+ _(l, n, t, a),
1127
+ P(([[, p], I, { sizeTree: h }, f, C]) => p && (!j(h) || Me(f)) && !I && !C),
1128
+ _(c)
1129
1129
  ),
1130
- ([, f]) => {
1130
+ ([, p]) => {
1131
1131
  bt(r, () => {
1132
1132
  W(a, !0);
1133
1133
  }), $e(4, () => {
1134
1134
  bt(o, () => {
1135
1135
  W(l, !0);
1136
- }), W(s, f);
1136
+ }), W(s, p);
1137
1137
  });
1138
1138
  }
1139
1139
  ), {
@@ -1158,34 +1158,34 @@ const le = "up", te = "down", zo = "none", Vo = {
1158
1158
  viewportHeight: 0
1159
1159
  }
1160
1160
  }, Po = 0, ae = U(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1161
- const i = v(!1), l = v(!0), c = $(), a = $(), f = v(4), S = v(Po), p = ct(
1161
+ const i = v(!1), l = v(!0), c = $(), a = $(), p = v(4), I = v(Po), h = ct(
1162
1162
  x(
1163
1163
  an(x(A(r), jt(1), yt(!0)), x(A(r), jt(1), yt(!1), un(100))),
1164
1164
  Y()
1165
1165
  ),
1166
1166
  !1
1167
- ), m = ct(
1167
+ ), f = ct(
1168
1168
  x(an(x(n, yt(!0)), x(n, yt(!1), un(200))), Y()),
1169
1169
  !1
1170
1170
  );
1171
- F(
1171
+ O(
1172
1172
  x(
1173
- rt(A(r), A(S)),
1173
+ rt(A(r), A(I)),
1174
1174
  E(([u, T]) => u <= T),
1175
1175
  Y()
1176
1176
  ),
1177
1177
  l
1178
- ), F(x(l, Lt(50)), a);
1179
- const w = pt(
1178
+ ), O(x(l, Lt(50)), a);
1179
+ const C = ht(
1180
1180
  x(
1181
- rt(o, A(s), A(e), A(t), A(f)),
1182
- Rt((u, [{ scrollHeight: T, scrollTop: R }, h, d, b, k]) => {
1183
- const O = R + h - T > -k, L = {
1181
+ rt(o, A(s), A(e), A(t), A(p)),
1182
+ Rt((u, [{ scrollHeight: T, scrollTop: R }, g, d, b, k]) => {
1183
+ const F = R + g - T > -k, L = {
1184
1184
  scrollHeight: T,
1185
1185
  scrollTop: R,
1186
- viewportHeight: h
1186
+ viewportHeight: g
1187
1187
  };
1188
- if (O) {
1188
+ if (F) {
1189
1189
  let D, J;
1190
1190
  return R > u.state.scrollTop ? (D = "SCROLLED_DOWN", J = u.state.scrollTop - R) : (D = "SIZE_DECREASED", J = u.state.scrollTop - R || u.scrollTopDelta), {
1191
1191
  atBottom: !0,
@@ -1195,7 +1195,7 @@ const le = "up", te = "down", zo = "none", Vo = {
1195
1195
  };
1196
1196
  }
1197
1197
  let V;
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", {
1198
+ return L.scrollHeight > u.state.scrollHeight ? V = "SIZE_INCREASED" : g < u.state.viewportHeight ? V = "VIEWPORT_HEIGHT_DECREASING" : R < u.state.scrollTop ? V = "SCROLLING_UPWARDS" : V = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1199
1199
  atBottom: !1,
1200
1200
  notAtBottomBecause: V,
1201
1201
  state: L
@@ -1203,11 +1203,11 @@ const le = "up", te = "down", zo = "none", Vo = {
1203
1203
  }, Vo),
1204
1204
  Y((u, T) => u && u.atBottom === T.atBottom)
1205
1205
  )
1206
- ), I = ct(
1206
+ ), w = ct(
1207
1207
  x(
1208
1208
  o,
1209
1209
  Rt(
1210
- (u, { scrollHeight: T, scrollTop: R, viewportHeight: h }) => {
1210
+ (u, { scrollHeight: T, scrollTop: R, viewportHeight: g }) => {
1211
1211
  if (Nn(u.scrollHeight, T))
1212
1212
  return {
1213
1213
  changed: !1,
@@ -1216,7 +1216,7 @@ const le = "up", te = "down", zo = "none", Vo = {
1216
1216
  scrollTop: R
1217
1217
  };
1218
1218
  {
1219
- const d = T - (R + h) < 1;
1219
+ const d = T - (R + g) < 1;
1220
1220
  return u.scrollTop !== R && d ? {
1221
1221
  changed: !0,
1222
1222
  jump: u.scrollTop - R,
@@ -1237,57 +1237,57 @@ const le = "up", te = "down", zo = "none", Vo = {
1237
1237
  ),
1238
1238
  0
1239
1239
  );
1240
- F(
1240
+ O(
1241
1241
  x(
1242
- w,
1242
+ C,
1243
1243
  E((u) => u.atBottom)
1244
1244
  ),
1245
1245
  i
1246
- ), F(x(i, Lt(50)), c);
1247
- const C = v(te);
1248
- F(
1246
+ ), O(x(i, Lt(50)), c);
1247
+ const S = v(te);
1248
+ O(
1249
1249
  x(
1250
1250
  o,
1251
1251
  E(({ scrollTop: u }) => u),
1252
1252
  Y(),
1253
1253
  Rt(
1254
- (u, T) => lt(m) ? { direction: u.direction, prevScrollTop: T } : { direction: T < u.prevScrollTop ? le : te, prevScrollTop: T },
1254
+ (u, T) => st(f) ? { direction: u.direction, prevScrollTop: T } : { direction: T < u.prevScrollTop ? le : te, prevScrollTop: T },
1255
1255
  { direction: te, prevScrollTop: 0 }
1256
1256
  ),
1257
1257
  E((u) => u.direction)
1258
1258
  ),
1259
- C
1260
- ), F(x(o, Lt(50), yt(zo)), C);
1261
- const g = v(0);
1262
- return F(
1259
+ S
1260
+ ), O(x(o, Lt(50), yt(zo)), S);
1261
+ const m = v(0);
1262
+ return O(
1263
1263
  x(
1264
- p,
1264
+ h,
1265
1265
  P((u) => !u),
1266
1266
  yt(0)
1267
1267
  ),
1268
- g
1269
- ), F(
1268
+ m
1269
+ ), O(
1270
1270
  x(
1271
1271
  r,
1272
1272
  Lt(100),
1273
- G(p),
1273
+ _(h),
1274
1274
  P(([u, T]) => !!T),
1275
1275
  Rt(([u, T], [R]) => [T, R], [0, 0]),
1276
1276
  E(([u, T]) => T - u)
1277
1277
  ),
1278
- g
1278
+ m
1279
1279
  ), {
1280
- atBottomState: w,
1280
+ atBottomState: C,
1281
1281
  atBottomStateChange: c,
1282
- atBottomThreshold: f,
1282
+ atBottomThreshold: p,
1283
1283
  atTopStateChange: a,
1284
- atTopThreshold: S,
1284
+ atTopThreshold: I,
1285
1285
  isAtBottom: i,
1286
1286
  isAtTop: l,
1287
- isScrolling: p,
1288
- lastJumpDueToItemResize: I,
1289
- scrollDirection: C,
1290
- scrollVelocity: g
1287
+ isScrolling: h,
1288
+ lastJumpDueToItemResize: w,
1289
+ scrollDirection: S,
1290
+ scrollVelocity: m
1291
1291
  };
1292
1292
  }, X(at)), xe = "top", Te = "bottom", pn = "none";
1293
1293
  function hn(t, e, n) {
@@ -1314,26 +1314,26 @@ const Ke = U(
1314
1314
  ),
1315
1315
  E(
1316
1316
  ([
1317
- f,
1318
- S,
1319
1317
  p,
1320
- [m, w],
1321
1318
  I,
1322
- C,
1323
- g,
1319
+ h,
1320
+ [f, C],
1321
+ w,
1322
+ S,
1323
+ m,
1324
1324
  u,
1325
1325
  T
1326
1326
  ]) => {
1327
- const R = f - u, h = C + g, d = Math.max(p - R, 0);
1327
+ const R = p - u, g = S + m, d = Math.max(h - R, 0);
1328
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
1329
+ const k = gn(T, xe), F = gn(T, Te);
1330
+ return f -= u, f += h + m, C += h + m, C -= u, f > p + g - k && (b = le), C < p - d + I + F && (b = te), b !== pn ? [
1331
+ Math.max(R - h - hn(w, xe, b) - k, 0),
1332
+ R - d - m + I + hn(w, Te, b) + F
1333
1333
  ] : null;
1334
1334
  }
1335
1335
  ),
1336
- P((f) => f != null),
1336
+ P((p) => p != null),
1337
1337
  Y(se)
1338
1338
  ),
1339
1339
  [0, 0]
@@ -1374,36 +1374,36 @@ const Be = {
1374
1374
  };
1375
1375
  function Ie(t, e, n, o, r, s) {
1376
1376
  const { lastIndex: i, lastOffset: l, lastSize: c } = r;
1377
- let a = 0, f = 0;
1377
+ let a = 0, p = 0;
1378
1378
  if (t.length > 0) {
1379
1379
  a = t[0].offset;
1380
- const I = t[t.length - 1];
1381
- f = I.offset + I.size;
1380
+ const w = t[t.length - 1];
1381
+ p = w.offset + w.size;
1382
1382
  }
1383
- const S = n - i, p = l + S * c + (S - 1) * o, m = a, w = p - f;
1383
+ const I = n - i, h = l + I * c + (I - 1) * o, f = a, C = h - p;
1384
1384
  return {
1385
- bottom: f,
1385
+ bottom: p,
1386
1386
  firstItemIndex: s,
1387
1387
  items: In(t, r, s),
1388
- offsetBottom: w,
1388
+ offsetBottom: C,
1389
1389
  offsetTop: a,
1390
- top: m,
1390
+ top: f,
1391
1391
  topItems: In(e, r, s),
1392
- topListHeight: e.reduce((I, C) => C.size + I, 0),
1392
+ topListHeight: e.reduce((w, S) => S.size + w, 0),
1393
1393
  totalCount: n
1394
1394
  };
1395
1395
  }
1396
1396
  function Dn(t, e, n, o, r, s) {
1397
1397
  let i = 0;
1398
1398
  if (n.groupIndices.length > 0)
1399
- for (const f of n.groupIndices) {
1400
- if (f - i >= t)
1399
+ for (const p of n.groupIndices) {
1400
+ if (p - i >= t)
1401
1401
  break;
1402
1402
  i++;
1403
1403
  }
1404
- const l = t + i, c = Ue(e, l), a = Array.from({ length: l }).map((f, S) => ({
1405
- data: s[S + c],
1406
- index: S + c,
1404
+ const l = t + i, c = Ue(e, l), a = Array.from({ length: l }).map((p, I) => ({
1405
+ data: s[I + c],
1406
+ index: I + c,
1407
1407
  offset: 0,
1408
1408
  size: 0
1409
1409
  }));
@@ -1418,15 +1418,15 @@ function In(t, e, n) {
1418
1418
  let l, c = 0;
1419
1419
  for (const a of t) {
1420
1420
  (!l || l.end < a.index) && (l = i.shift(), c = e.groupIndices.indexOf(l.start));
1421
- let f;
1422
- a.index === l.start ? f = {
1421
+ let p;
1422
+ a.index === l.start ? p = {
1423
1423
  index: c,
1424
1424
  type: "group"
1425
- } : f = {
1425
+ } : p = {
1426
1426
  groupIndex: c,
1427
1427
  index: a.index - (c + 1) + n
1428
1428
  }, s.push({
1429
- ...f,
1429
+ ...p,
1430
1430
  data: a.data,
1431
1431
  offset: a.offset,
1432
1432
  originalIndex: a.index,
@@ -1435,36 +1435,36 @@ function In(t, e, n) {
1435
1435
  }
1436
1436
  return s;
1437
1437
  }
1438
- const Gt = U(
1438
+ const _t = U(
1439
1439
  ([
1440
1440
  { data: t, firstItemIndex: e, gap: n, sizes: o, totalCount: r },
1441
1441
  s,
1442
1442
  { listBoundary: i, topListHeight: l, visibleRange: c },
1443
- { initialTopMostItemIndex: a, scrolledToInitialItem: f },
1444
- { topListHeight: S },
1445
- p,
1446
- { didMount: m },
1447
- { recalcInProgress: w }
1443
+ { initialTopMostItemIndex: a, scrolledToInitialItem: p },
1444
+ { topListHeight: I },
1445
+ h,
1446
+ { didMount: f },
1447
+ { recalcInProgress: C }
1448
1448
  ]) => {
1449
- const I = v([]), C = v(0), g = $();
1450
- F(s.topItemsIndexes, I);
1449
+ const w = v([]), S = v(0), m = $();
1450
+ O(s.topItemsIndexes, w);
1451
1451
  const u = ct(
1452
1452
  x(
1453
1453
  rt(
1454
- m,
1455
- w,
1454
+ f,
1455
+ C,
1456
1456
  A(c, se),
1457
1457
  A(r),
1458
1458
  A(o),
1459
1459
  A(a),
1460
- f,
1461
- A(I),
1460
+ p,
1461
+ A(w),
1462
1462
  A(e),
1463
1463
  A(n),
1464
1464
  t
1465
1465
  ),
1466
- P(([d, b, , k, , , , , , , O]) => {
1467
- const L = O && O.length !== k;
1466
+ P(([d, b, , k, , , , , , , F]) => {
1467
+ const L = F && F.length !== k;
1468
1468
  return d && !b && !L;
1469
1469
  }),
1470
1470
  E(
@@ -1473,7 +1473,7 @@ const Gt = U(
1473
1473
  ,
1474
1474
  [d, b],
1475
1475
  k,
1476
- O,
1476
+ F,
1477
1477
  L,
1478
1478
  V,
1479
1479
  D,
@@ -1481,11 +1481,11 @@ const Gt = U(
1481
1481
  nt,
1482
1482
  B
1483
1483
  ]) => {
1484
- const q = O, { offsetTree: st, sizeTree: dt } = q, St = lt(C);
1484
+ const q = F, { offsetTree: it, sizeTree: dt } = q, St = st(S);
1485
1485
  if (k === 0)
1486
1486
  return { ...Be, totalCount: k };
1487
1487
  if (d === 0 && b === 0)
1488
- return St === 0 ? { ...Be, totalCount: k } : Dn(St, L, O, J, nt, B || []);
1488
+ return St === 0 ? { ...Be, totalCount: k } : Dn(St, L, F, J, nt, B || []);
1489
1489
  if (j(dt))
1490
1490
  return St > 0 ? null : Ie(
1491
1491
  Ao(Ue(L, k), q, B),
@@ -1500,14 +1500,14 @@ const Gt = U(
1500
1500
  const Mt = D[0], vt = D[D.length - 1];
1501
1501
  let Bt = 0;
1502
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);
1504
- for (let tt = Q; tt <= it; tt++)
1503
+ const N = y.value, Q = Math.max(y.start, Mt), lt = Math.min(y.end, vt);
1504
+ for (let tt = Q; tt <= lt; tt++)
1505
1505
  ft.push({ data: B == null ? void 0 : B[tt], index: tt, offset: Bt, size: N }), Bt += N;
1506
1506
  }
1507
1507
  }
1508
1508
  if (!V)
1509
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);
1510
+ const ut = D.length > 0 ? D[D.length - 1] + 1 : 0, At = Ro(it, d, b, ut);
1511
1511
  if (At.length === 0)
1512
1512
  return null;
1513
1513
  const xt = k - 1, Xt = ve([], (Mt) => {
@@ -1521,8 +1521,8 @@ const Gt = U(
1521
1521
  y += tt * Q + tt * nt;
1522
1522
  }
1523
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++)
1524
+ const lt = Math.min(vt.end, xt);
1525
+ for (let tt = N; tt <= lt && !(y >= b); tt++)
1526
1526
  Mt.push({ data: B == null ? void 0 : B[tt], index: tt, offset: y, size: Q }), y += Q + nt;
1527
1527
  }
1528
1528
  });
@@ -1535,43 +1535,43 @@ const Gt = U(
1535
1535
  ),
1536
1536
  Be
1537
1537
  );
1538
- F(
1538
+ O(
1539
1539
  x(
1540
1540
  t,
1541
1541
  P(Me),
1542
1542
  E((d) => d == null ? void 0 : d.length)
1543
1543
  ),
1544
1544
  r
1545
- ), F(
1545
+ ), O(
1546
1546
  x(
1547
1547
  u,
1548
1548
  E((d) => d.topListHeight)
1549
1549
  ),
1550
- S
1551
- ), F(S, l), F(
1550
+ I
1551
+ ), O(I, l), O(
1552
1552
  x(
1553
1553
  u,
1554
1554
  E((d) => [d.top, d.bottom])
1555
1555
  ),
1556
1556
  i
1557
- ), F(
1557
+ ), O(
1558
1558
  x(
1559
1559
  u,
1560
1560
  E((d) => d.items)
1561
1561
  ),
1562
- g
1562
+ m
1563
1563
  );
1564
- const T = pt(
1564
+ const T = ht(
1565
1565
  x(
1566
1566
  u,
1567
1567
  P(({ items: d }) => d.length > 0),
1568
- G(r, t),
1568
+ _(r, t),
1569
1569
  P(([{ items: d }, b]) => d[d.length - 1].originalIndex === b - 1),
1570
1570
  E(([, d, b]) => [d - 1, b]),
1571
1571
  Y(se),
1572
1572
  E(([d]) => d)
1573
1573
  )
1574
- ), R = pt(
1574
+ ), R = ht(
1575
1575
  x(
1576
1576
  u,
1577
1577
  Lt(200),
@@ -1579,7 +1579,7 @@ const Gt = U(
1579
1579
  E(({ items: d }) => d[0].index),
1580
1580
  Y()
1581
1581
  )
1582
- ), h = pt(
1582
+ ), g = ht(
1583
1583
  x(
1584
1584
  u,
1585
1585
  P(({ items: d }) => d.length > 0),
@@ -1597,11 +1597,11 @@ const Gt = U(
1597
1597
  Y(Pn)
1598
1598
  )
1599
1599
  );
1600
- return { endReached: T, initialItemCount: C, itemsRendered: g, listState: u, rangeChanged: h, startReached: R, topItemsIndexes: I, ...p };
1600
+ return { endReached: T, initialItemCount: S, itemsRendered: m, listState: u, rangeChanged: g, startReached: R, topItemsIndexes: w, ...h };
1601
1601
  },
1602
1602
  X(
1603
1603
  Et,
1604
- _n,
1604
+ Gn,
1605
1605
  Ke,
1606
1606
  ue,
1607
1607
  ce,
@@ -1615,13 +1615,13 @@ const Gt = U(
1615
1615
  const s = $(), i = ct(
1616
1616
  x(
1617
1617
  rt(n, t, o, e, r),
1618
- E(([l, c, a, f, S]) => l + c + a + f + S.offsetBottom + S.bottom)
1618
+ E(([l, c, a, p, I]) => l + c + a + p + I.offsetBottom + I.bottom)
1619
1619
  ),
1620
1620
  0
1621
1621
  );
1622
- return F(A(i), s), { totalListHeight: i, totalListHeightChanged: s };
1622
+ return O(A(i), s), { totalListHeight: i, totalListHeightChanged: s };
1623
1623
  },
1624
- X(at, Gt),
1624
+ X(at, _t),
1625
1625
  { singleton: !0 }
1626
1626
  ), Mo = U(
1627
1627
  ([{ viewportHeight: t }, { totalListHeight: e }]) => {
@@ -1643,80 +1643,82 @@ const Gt = U(
1643
1643
  function Sn(t) {
1644
1644
  return t ? t === "smooth" ? "smooth" : "auto" : !1;
1645
1645
  }
1646
- const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1646
+ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), Go = U(
1647
1647
  ([
1648
- { listRefresh: t, totalCount: e },
1649
- { atBottomState: n, isAtBottom: o },
1650
- { scrollToIndex: r },
1651
- { scrolledToInitialItem: s },
1652
- { didMount: i, propsReady: l },
1653
- { log: c },
1654
- { scrollingInProgress: a }
1648
+ { listRefresh: t, totalCount: e, fixedItemSize: n },
1649
+ { atBottomState: o, isAtBottom: r },
1650
+ { scrollToIndex: s },
1651
+ { scrolledToInitialItem: i },
1652
+ { didMount: l, propsReady: c },
1653
+ { log: a },
1654
+ { scrollingInProgress: p }
1655
1655
  ]) => {
1656
- const f = v(!1), S = $();
1657
- let p = null;
1658
- function m(I) {
1659
- W(r, {
1656
+ const I = v(!1), h = $();
1657
+ let f = null;
1658
+ function C(S) {
1659
+ W(s, {
1660
1660
  align: "end",
1661
- behavior: I,
1661
+ behavior: S,
1662
1662
  index: "LAST"
1663
1663
  });
1664
1664
  }
1665
1665
  K(
1666
1666
  x(
1667
- rt(x(A(e), jt(1)), i),
1668
- G(A(f), o, s, a),
1669
- E(([[I, C], g, u, T, R]) => {
1670
- let h = C && T, d = "auto";
1671
- return h && (d = Wo(g, u || R), h = h && !!d), { followOutputBehavior: d, shouldFollow: h, totalCount: I };
1667
+ rt(x(A(e), jt(1)), l),
1668
+ _(A(I), r, i, p),
1669
+ E(([[S, m], u, T, R, g]) => {
1670
+ let d = m && R, b = "auto";
1671
+ return d && (b = Wo(u, T || g), d = d && !!b), { followOutputBehavior: b, shouldFollow: d, totalCount: S };
1672
1672
  }),
1673
- P(({ shouldFollow: I }) => I)
1673
+ P(({ shouldFollow: S }) => S)
1674
1674
  ),
1675
- ({ followOutputBehavior: I, totalCount: C }) => {
1676
- p && (p(), p = null), p = bt(t, () => {
1677
- lt(c)("following output to ", { totalCount: C }, ht.DEBUG), m(I), p = null;
1675
+ ({ followOutputBehavior: S, totalCount: m }) => {
1676
+ f && (f(), f = null), st(n) ? requestAnimationFrame(() => {
1677
+ st(a)("following output to ", { totalCount: m }, mt.DEBUG), C(S);
1678
+ }) : f = bt(t, () => {
1679
+ st(a)("following output to ", { totalCount: m }, mt.DEBUG), C(S), f = null;
1678
1680
  });
1679
1681
  }
1680
1682
  );
1681
- function w(I) {
1682
- const C = bt(n, (g) => {
1683
- I && !g.atBottom && g.notAtBottomBecause === "SIZE_INCREASED" && !p && (lt(c)("scrolling to bottom due to increased size", {}, ht.DEBUG), m("auto"));
1683
+ function w(S) {
1684
+ const m = bt(o, (u) => {
1685
+ S && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && !f && (st(a)("scrolling to bottom due to increased size", {}, mt.DEBUG), C("auto"));
1684
1686
  });
1685
- setTimeout(C, 100);
1687
+ setTimeout(m, 100);
1686
1688
  }
1687
1689
  return K(
1688
1690
  x(
1689
- rt(A(f), e, l),
1690
- P(([I, , C]) => I && C),
1691
+ rt(A(I), e, c),
1692
+ P(([S, , m]) => S && m),
1691
1693
  Rt(
1692
- ({ value: I }, [, C]) => ({ refreshed: I === C, value: C }),
1694
+ ({ value: S }, [, m]) => ({ refreshed: S === m, value: m }),
1693
1695
  { refreshed: !1, value: 0 }
1694
1696
  ),
1695
- P(({ refreshed: I }) => I),
1696
- G(f, e)
1697
+ P(({ refreshed: S }) => S),
1698
+ _(I, e)
1697
1699
  ),
1698
- ([, I]) => {
1699
- lt(s) && w(I !== !1);
1700
+ ([, S]) => {
1701
+ st(i) && w(S !== !1);
1700
1702
  }
1701
- ), K(S, () => {
1702
- w(lt(f) !== !1);
1703
- }), K(rt(A(f), n), ([I, C]) => {
1704
- I && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && m("auto");
1705
- }), { autoscrollToBottom: S, followOutput: f };
1703
+ ), K(h, () => {
1704
+ w(st(I) !== !1);
1705
+ }), K(rt(A(I), o), ([S, m]) => {
1706
+ S && !m.atBottom && m.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && C("auto");
1707
+ }), { autoscrollToBottom: h, followOutput: I };
1706
1708
  },
1707
1709
  X(Et, ae, ce, ue, Pt, Vt, at)
1708
- ), Go = U(
1709
- ([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (F(
1710
+ ), _o = U(
1711
+ ([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (O(
1710
1712
  x(
1711
1713
  l,
1712
- G(s),
1714
+ _(s),
1713
1715
  P(([, c]) => c !== 0),
1714
- G(r, o, e, n, t),
1715
- E(([[, c], a, f, S, p, m = []]) => Dn(c, a, f, S, p, m))
1716
+ _(r, o, e, n, t),
1717
+ E(([[, c], a, p, I, h, f = []]) => Dn(c, a, p, I, h, f))
1716
1718
  ),
1717
1719
  i
1718
1720
  ), {}),
1719
- X(Et, ue, Gt, Pt),
1721
+ X(Et, ue, _t, Pt),
1720
1722
  { singleton: !0 }
1721
1723
  ), No = U(
1722
1724
  ([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
@@ -1724,7 +1726,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1724
1726
  return K(
1725
1727
  x(
1726
1728
  t,
1727
- G(o),
1729
+ _(o),
1728
1730
  P(([, r]) => r !== 0),
1729
1731
  E(([, r]) => ({ top: r }))
1730
1732
  ),
@@ -1746,7 +1748,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1746
1748
  initialScrollTop: o
1747
1749
  };
1748
1750
  },
1749
- X(Pt, at, Gt),
1751
+ X(Pt, at, _t),
1750
1752
  { singleton: !0 }
1751
1753
  ), Do = ({
1752
1754
  itemBottom: t,
@@ -1760,17 +1762,17 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1760
1762
  { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
1761
1763
  { scrollToIndex: a }
1762
1764
  ]) => {
1763
- const f = $();
1764
- return F(
1765
+ const p = $();
1766
+ return O(
1765
1767
  x(
1766
- f,
1767
- G(e, c, n, s, r, o, l),
1768
- G(t),
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({
1768
+ p,
1769
+ _(e, c, n, s, r, o, l),
1770
+ _(t),
1771
+ E(([[I, h, f, C, w, S, m, u], T]) => {
1772
+ const { align: R, behavior: g, calculateViewLocation: d = Do, done: b, ...k } = I, F = Wn(I, h, C - 1), L = ie(F, h.offsetTree, T) + w + S, V = L + Ct(h.sizeTree, F)[1], D = u + S, J = u + f - m, nt = d({
1771
1773
  itemBottom: V,
1772
1774
  itemTop: L,
1773
- locationParams: { align: R, behavior: h, ...k },
1775
+ locationParams: { align: R, behavior: g, ...k },
1774
1776
  viewportBottom: J,
1775
1777
  viewportTop: D
1776
1778
  });
@@ -1780,27 +1782,27 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1780
1782
  P((B) => !B),
1781
1783
  // skips the initial publish of false, and the cleanup call.
1782
1784
  // but if scrollingInProgress is true, we skip the initial publish.
1783
- jt(lt(i) ? 1 : 2)
1785
+ jt(st(i) ? 1 : 2)
1784
1786
  ),
1785
1787
  b
1786
1788
  ) : b && b(), nt;
1787
1789
  }),
1788
- P((S) => S !== null)
1790
+ P((I) => I !== null)
1789
1791
  ),
1790
1792
  a
1791
1793
  ), {
1792
- scrollIntoView: f
1794
+ scrollIntoView: p
1793
1795
  };
1794
1796
  },
1795
- X(Et, at, ce, Gt, Vt),
1797
+ X(Et, at, ce, _t, Vt),
1796
1798
  { singleton: !0 }
1797
1799
  ), Un = U(
1798
1800
  ([{ scrollVelocity: t }]) => {
1799
1801
  const e = v(!1), n = $(), o = v(!1);
1800
- return F(
1802
+ return O(
1801
1803
  x(
1802
1804
  t,
1803
- G(o, e, n),
1805
+ _(o, e, n),
1804
1806
  P(([r, s]) => !!s),
1805
1807
  E(([r, s, i, l]) => {
1806
1808
  const { enter: c, exit: a } = s;
@@ -1815,7 +1817,7 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1815
1817
  ),
1816
1818
  e
1817
1819
  ), K(
1818
- x(rt(e, t, n), G(o)),
1820
+ x(rt(e, t, n), _(o)),
1819
1821
  ([[r, s, i], l]) => {
1820
1822
  r && l && l.change && l.change(s, i);
1821
1823
  }
@@ -1825,20 +1827,20 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1825
1827
  { singleton: !0 }
1826
1828
  ), je = U(([{ scrollContainerState: t, scrollTo: e }]) => {
1827
1829
  const n = $(), o = $(), r = $(), s = v(!1), i = v(void 0);
1828
- return F(
1830
+ return O(
1829
1831
  x(
1830
1832
  rt(n, o),
1831
- E(([{ scrollHeight: l, scrollTop: c, viewportHeight: a }, { offsetTop: f }]) => ({
1833
+ E(([{ scrollHeight: l, scrollTop: c, viewportHeight: a }, { offsetTop: p }]) => ({
1832
1834
  scrollHeight: l,
1833
- scrollTop: Math.max(0, c - f),
1835
+ scrollTop: Math.max(0, c - p),
1834
1836
  viewportHeight: a
1835
1837
  }))
1836
1838
  ),
1837
1839
  t
1838
- ), F(
1840
+ ), O(
1839
1841
  x(
1840
1842
  e,
1841
- G(o),
1843
+ _(o),
1842
1844
  E(([l, { offsetTop: c }]) => ({
1843
1845
  ...l,
1844
1846
  top: l.top + c
@@ -1863,28 +1865,28 @@ const Wo = (t, e) => typeof t == "function" ? Sn(t(e)) : e && Sn(t), _o = U(
1863
1865
  { didMount: s },
1864
1866
  { useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
1865
1867
  ]) => {
1866
- const a = $(), f = v(void 0), S = v(null), p = v(null);
1867
- return F(l, S), F(c, p), K(
1868
+ const a = $(), p = v(void 0), I = v(null), h = v(null);
1869
+ return O(l, I), O(c, h), K(
1868
1870
  x(
1869
1871
  a,
1870
- G(e, o, i, S, p, n)
1872
+ _(e, o, i, I, h, n)
1871
1873
  ),
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 });
1874
+ ([f, C, w, S, m, u, T]) => {
1875
+ const R = Ho(C.sizeTree);
1876
+ S && m !== null && u !== null && (w = m.scrollTop - u.offsetTop), w -= T, f({ ranges: R, scrollTop: w });
1875
1877
  }
1876
- ), F(x(f, P(Me), E(Ko)), r), F(
1878
+ ), O(x(p, P(Me), E(Ko)), r), O(
1877
1879
  x(
1878
1880
  s,
1879
- G(f),
1880
- P(([, m]) => m !== void 0),
1881
+ _(p),
1882
+ P(([, f]) => f !== void 0),
1881
1883
  Y(),
1882
- E(([, m]) => m.ranges)
1884
+ E(([, f]) => f.ranges)
1883
1885
  ),
1884
1886
  t
1885
1887
  ), {
1886
1888
  getState: a,
1887
- restoreStateFrom: f
1889
+ restoreStateFrom: p
1888
1890
  };
1889
1891
  },
1890
1892
  X(Et, at, ue, Pt, je)
@@ -1894,7 +1896,7 @@ function Ko(t) {
1894
1896
  }
1895
1897
  const jo = U(([{ topItemsIndexes: t }]) => {
1896
1898
  const e = v(0);
1897
- return F(
1899
+ return O(
1898
1900
  x(
1899
1901
  e,
1900
1902
  P((n) => n >= 0),
@@ -1902,7 +1904,7 @@ const jo = U(([{ topItemsIndexes: t }]) => {
1902
1904
  ),
1903
1905
  t
1904
1906
  ), { topItemCount: e };
1905
- }, X(Gt));
1907
+ }, X(_t));
1906
1908
  function Kn(t) {
1907
1909
  let e = !1, n;
1908
1910
  return () => (e || (e = !0, n = t()), n);
@@ -1912,80 +1914,80 @@ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
1912
1914
  { deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
1913
1915
  { isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
1914
1916
  { listState: c },
1915
- { beforeUnshiftWith: a, gap: f, shiftWithOffset: S, sizes: p },
1916
- { log: m },
1917
- { recalcInProgress: w }
1917
+ { beforeUnshiftWith: a, gap: p, shiftWithOffset: I, sizes: h },
1918
+ { log: f },
1919
+ { recalcInProgress: C }
1918
1920
  ]) => {
1919
- const I = pt(
1921
+ const w = ht(
1920
1922
  x(
1921
1923
  c,
1922
- G(i),
1924
+ _(i),
1923
1925
  Rt(
1924
- ([, g, u, T], [{ bottom: R, items: h, offsetBottom: d, totalCount: b }, k]) => {
1925
- const O = R + d;
1926
+ ([, m, u, T], [{ bottom: R, items: g, offsetBottom: d, totalCount: b }, k]) => {
1927
+ const F = R + d;
1926
1928
  let L = 0;
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];
1929
+ return u === b && m.length > 0 && g.length > 0 && (g[0].originalIndex === 0 && m[0].originalIndex === 0 || (L = F - T, L !== 0 && (L += k))), [L, g, b, F];
1928
1930
  },
1929
1931
  [0, [], 0, 0]
1930
1932
  ),
1931
- P(([g]) => g !== 0),
1932
- G(o, l, n, r, m, w),
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))
1933
+ P(([m]) => m !== 0),
1934
+ _(o, l, n, r, f, C),
1935
+ P(([, m, u, T, , , R]) => !R && !T && m !== 0 && u === le),
1936
+ E(([[m], , , , , u]) => (u("Upward scrolling compensation", { amount: m }, mt.DEBUG), m))
1935
1937
  )
1936
1938
  );
1937
- function C(g) {
1938
- g > 0 ? (W(e, { behavior: "auto", top: -g }), W(t, 0)) : (W(t, 0), W(e, { behavior: "auto", top: -g }));
1939
+ function S(m) {
1940
+ m > 0 ? (W(e, { behavior: "auto", top: -m }), W(t, 0)) : (W(t, 0), W(e, { behavior: "auto", top: -m }));
1939
1941
  }
1940
- return K(x(I, G(t, s)), ([g, u, T]) => {
1941
- T && qo() ? W(t, u - g) : C(-g);
1942
+ return K(x(w, _(t, s)), ([m, u, T]) => {
1943
+ T && qo() ? W(t, u - m) : S(-m);
1942
1944
  }), K(
1943
1945
  x(
1944
- rt(ct(s, !1), t, w),
1945
- P(([g, u, T]) => !g && !T && u !== 0),
1946
- E(([g, u]) => u),
1946
+ rt(ct(s, !1), t, C),
1947
+ P(([m, u, T]) => !m && !T && u !== 0),
1948
+ E(([m, u]) => u),
1947
1949
  Lt(1)
1948
1950
  ),
1949
- C
1950
- ), F(
1951
+ S
1952
+ ), O(
1951
1953
  x(
1952
- S,
1953
- E((g) => ({ top: -g }))
1954
+ I,
1955
+ E((m) => ({ top: -m }))
1954
1956
  ),
1955
1957
  e
1956
1958
  ), K(
1957
1959
  x(
1958
1960
  a,
1959
- G(p, f),
1960
- E(([g, { groupIndices: u, lastSize: T, sizeTree: R }, h]) => {
1961
+ _(h, p),
1962
+ E(([m, { groupIndices: u, lastSize: T, sizeTree: R }, g]) => {
1961
1963
  function d(b) {
1962
- return b * (T + h);
1964
+ return b * (T + g);
1963
1965
  }
1964
1966
  if (u.length === 0)
1965
- return d(g);
1967
+ return d(m);
1966
1968
  {
1967
1969
  let b = 0;
1968
1970
  const k = re(R, 0);
1969
- let O = 0, L = 0;
1970
- for (; O < g; ) {
1971
- O++, b += k;
1971
+ let F = 0, L = 0;
1972
+ for (; F < m; ) {
1973
+ F++, b += k;
1972
1974
  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++;
1975
+ F + V > m && (b -= k, V = m - F + 1), F += V, b += d(V), L++;
1974
1976
  }
1975
1977
  return b;
1976
1978
  }
1977
1979
  })
1978
1980
  ),
1979
- (g) => {
1980
- W(t, g), requestAnimationFrame(() => {
1981
- W(e, { top: g }), requestAnimationFrame(() => {
1982
- W(t, 0), W(w, !1);
1981
+ (m) => {
1982
+ W(t, m), requestAnimationFrame(() => {
1983
+ W(e, { top: m }), requestAnimationFrame(() => {
1984
+ W(t, 0), W(C, !1);
1983
1985
  });
1984
1986
  });
1985
1987
  }
1986
1988
  ), { deviation: t };
1987
1989
  },
1988
- X(at, ae, Gt, Et, Vt, Ne)
1990
+ X(at, ae, _t, Et, Vt, Ne)
1989
1991
  ), Zo = U(
1990
1992
  ([
1991
1993
  t,
@@ -2012,7 +2014,7 @@ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2012
2014
  }),
2013
2015
  X(
2014
2016
  Ke,
2015
- Go,
2017
+ _o,
2016
2018
  Pt,
2017
2019
  Un,
2018
2020
  $n,
@@ -2035,25 +2037,25 @@ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2035
2037
  sizeRanges: l,
2036
2038
  sizes: c,
2037
2039
  statefulTotalCount: a,
2038
- totalCount: f,
2039
- trackItemSizes: S
2040
+ totalCount: p,
2041
+ trackItemSizes: I
2040
2042
  },
2041
- { initialItemFinalLocationReached: p, initialTopMostItemIndex: m, scrolledToInitialItem: w },
2042
- I,
2043
- C,
2044
- g,
2043
+ { initialItemFinalLocationReached: h, initialTopMostItemIndex: f, scrolledToInitialItem: C },
2044
+ w,
2045
+ S,
2046
+ m,
2045
2047
  { listState: u, topItemsIndexes: T, ...R },
2046
- { scrollToIndex: h },
2048
+ { scrollToIndex: g },
2047
2049
  d,
2048
2050
  { topItemCount: b },
2049
2051
  { groupCounts: k },
2050
- O
2051
- ]) => (F(R.rangeChanged, O.scrollSeekRangeChanged), F(
2052
+ F
2053
+ ]) => (O(R.rangeChanged, F.scrollSeekRangeChanged), O(
2052
2054
  x(
2053
- O.windowViewportRect,
2055
+ F.windowViewportRect,
2054
2056
  E((L) => L.visibleHeight)
2055
2057
  ),
2056
- I.viewportHeight
2058
+ w.viewportHeight
2057
2059
  ), {
2058
2060
  data: t,
2059
2061
  defaultItemHeight: e,
@@ -2061,41 +2063,41 @@ const qo = Kn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2061
2063
  fixedItemHeight: o,
2062
2064
  gap: r,
2063
2065
  groupCounts: k,
2064
- initialItemFinalLocationReached: p,
2065
- initialTopMostItemIndex: m,
2066
- scrolledToInitialItem: w,
2066
+ initialItemFinalLocationReached: h,
2067
+ initialTopMostItemIndex: f,
2068
+ scrolledToInitialItem: C,
2067
2069
  sizeRanges: l,
2068
2070
  topItemCount: b,
2069
2071
  topItemsIndexes: T,
2070
2072
  // input
2071
- totalCount: f,
2072
- ...g,
2073
+ totalCount: p,
2074
+ ...m,
2073
2075
  groupIndices: s,
2074
2076
  itemSize: i,
2075
2077
  listState: u,
2076
- scrollToIndex: h,
2078
+ scrollToIndex: g,
2077
2079
  // output
2078
2080
  statefulTotalCount: a,
2079
- trackItemSizes: S,
2081
+ trackItemSizes: I,
2080
2082
  // exported from stateFlagsSystem
2081
2083
  ...R,
2082
2084
  // the bag of IO from featureGroup1System
2083
- ...O,
2084
- ...I,
2085
+ ...F,
2086
+ ...w,
2085
2087
  sizes: c,
2086
- ...C
2088
+ ...S
2087
2089
  }),
2088
2090
  X(
2089
2091
  Et,
2090
2092
  ue,
2091
2093
  at,
2092
2094
  Uo,
2093
- _o,
2094
- Gt,
2095
+ Go,
2096
+ _t,
2095
2097
  ce,
2096
2098
  Yo,
2097
2099
  jo,
2098
- _n,
2100
+ Gn,
2099
2101
  Zo
2100
2102
  )
2101
2103
  );
@@ -2112,78 +2114,78 @@ function Xo(t, e) {
2112
2114
  const pe = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
2113
2115
  function qe(t, e, n) {
2114
2116
  const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = H.createContext({});
2115
- function c(g, u) {
2116
- g.propsReady && W(g.propsReady, !1);
2117
+ function c(m, u) {
2118
+ m.propsReady && W(m.propsReady, !1);
2117
2119
  for (const T of o) {
2118
- const R = g[e.required[T]];
2120
+ const R = m[e.required[T]];
2119
2121
  W(R, u[T]);
2120
2122
  }
2121
2123
  for (const T of r)
2122
2124
  if (T in u) {
2123
- const R = g[e.optional[T]];
2125
+ const R = m[e.optional[T]];
2124
2126
  W(R, u[T]);
2125
2127
  }
2126
- g.propsReady && W(g.propsReady, !0);
2128
+ m.propsReady && W(m.propsReady, !0);
2127
2129
  }
2128
- function a(g) {
2130
+ function a(m) {
2129
2131
  return s.reduce((u, T) => (u[T] = (R) => {
2130
- const h = g[e.methods[T]];
2131
- W(h, R);
2132
+ const g = m[e.methods[T]];
2133
+ W(g, R);
2132
2134
  }, u), {});
2133
2135
  }
2134
- function f(g) {
2135
- return i.reduce((u, T) => (u[T] = mo(g[e.events[T]]), u), {});
2136
+ function p(m) {
2137
+ return i.reduce((u, T) => (u[T] = mo(m[e.events[T]]), u), {});
2136
2138
  }
2137
- const S = H.forwardRef((g, u) => {
2138
- const { children: T, ...R } = g, [h] = H.useState(() => ve(ho(t), (k) => {
2139
+ const I = H.forwardRef((m, u) => {
2140
+ const { children: T, ...R } = m, [g] = H.useState(() => ve(ho(t), (k) => {
2139
2141
  c(k, R);
2140
- })), [d] = H.useState(cn(f, h));
2142
+ })), [d] = H.useState(cn(p, g));
2141
2143
  pe(() => {
2142
2144
  for (const k of i)
2143
2145
  k in R && K(d[k], R[k]);
2144
2146
  return () => {
2145
2147
  Object.values(d).map(We);
2146
2148
  };
2147
- }, [R, d, h]), pe(() => {
2148
- c(h, R);
2149
- }), H.useImperativeHandle(u, ln(a(h)));
2149
+ }, [R, d, g]), pe(() => {
2150
+ c(g, R);
2151
+ }), H.useImperativeHandle(u, ln(a(g)));
2150
2152
  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
+ return /* @__PURE__ */ z(l.Provider, { value: g, children: n ? /* @__PURE__ */ z(b, { ...Xo([...o, ...r, ...i], R), children: T }) : T });
2154
+ }), h = (m) => {
2153
2155
  const u = H.useContext(l);
2154
2156
  return H.useCallback(
2155
2157
  (T) => {
2156
- W(u[g], T);
2158
+ W(u[m], T);
2157
2159
  },
2158
- [u, g]
2160
+ [u, m]
2159
2161
  );
2160
- }, m = (g) => {
2161
- const T = H.useContext(l)[g], R = H.useCallback(
2162
- (h) => K(T, h),
2162
+ }, f = (m) => {
2163
+ const T = H.useContext(l)[m], R = H.useCallback(
2164
+ (g) => K(T, g),
2163
2165
  [T]
2164
2166
  );
2165
2167
  return H.useSyncExternalStore(
2166
2168
  R,
2167
- () => lt(T),
2168
- () => lt(T)
2169
+ () => st(T),
2170
+ () => st(T)
2169
2171
  );
2170
- }, w = (g) => {
2171
- const T = H.useContext(l)[g], [R, h] = H.useState(cn(lt, T));
2172
+ }, C = (m) => {
2173
+ const T = H.useContext(l)[m], [R, g] = H.useState(cn(st, T));
2172
2174
  return pe(
2173
2175
  () => K(T, (d) => {
2174
- d !== R && h(ln(d));
2176
+ d !== R && g(ln(d));
2175
2177
  }),
2176
2178
  [T, R]
2177
2179
  ), R;
2178
- }, I = H.version.startsWith("18") ? m : w;
2180
+ }, w = H.version.startsWith("18") ? f : C;
2179
2181
  return {
2180
- Component: S,
2181
- useEmitter: (g, u) => {
2182
- const R = H.useContext(l)[g];
2182
+ Component: I,
2183
+ useEmitter: (m, u) => {
2184
+ const R = H.useContext(l)[m];
2183
2185
  pe(() => K(R, u), [u, R]);
2184
2186
  },
2185
- useEmitterValue: I,
2186
- usePublisher: p
2187
+ useEmitterValue: w,
2188
+ usePublisher: h
2187
2189
  };
2188
2190
  }
2189
2191
  const be = H.createContext(void 0), qn = H.createContext(void 0), Yn = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
@@ -2195,60 +2197,60 @@ function Jo(t) {
2195
2197
  }
2196
2198
  function Zn(t, e, n, o = Yt, r, s) {
2197
2199
  const i = H.useRef(null), l = H.useRef(null), c = H.useRef(null), a = H.useCallback(
2198
- (p) => {
2199
- let m, w, I;
2200
- const C = p.target;
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;
2200
+ (h) => {
2201
+ let f, C, w;
2202
+ const S = h.target;
2203
+ if (Jo(S) || ke(S)) {
2204
+ const u = ke(S) ? S : S.defaultView;
2205
+ w = s ? u.scrollX : u.scrollY, f = s ? u.document.documentElement.scrollWidth : u.document.documentElement.scrollHeight, C = s ? u.innerWidth : u.innerHeight;
2204
2206
  } else
2205
- I = s ? C.scrollLeft : C.scrollTop, m = s ? C.scrollWidth : C.scrollHeight, w = s ? C.offsetWidth : C.offsetHeight;
2206
- const g = () => {
2207
+ w = s ? S.scrollLeft : S.scrollTop, f = s ? S.scrollWidth : S.scrollHeight, C = s ? S.offsetWidth : S.offsetHeight;
2208
+ const m = () => {
2207
2209
  t({
2208
- scrollHeight: m,
2209
- scrollTop: Math.max(I, 0),
2210
- viewportHeight: w
2210
+ scrollHeight: f,
2211
+ scrollTop: Math.max(w, 0),
2212
+ viewportHeight: C
2211
2213
  });
2212
2214
  };
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));
2215
+ h.suppressFlushSync ? m() : io.flushSync(m), l.current !== null && (w === l.current || w <= 0 || w === f - C) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2214
2216
  },
2215
2217
  [t, e, s]
2216
2218
  );
2217
2219
  H.useEffect(() => {
2218
- const p = r || i.current;
2219
- return o(r || i.current), a({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", a, { passive: !0 }), () => {
2220
- o(null), p.removeEventListener("scroll", a);
2220
+ const h = r || i.current;
2221
+ return o(r || i.current), a({ suppressFlushSync: !0, target: h }), h.addEventListener("scroll", a, { passive: !0 }), () => {
2222
+ o(null), h.removeEventListener("scroll", a);
2221
2223
  };
2222
2224
  }, [i, a, n, o, r]);
2223
- function f(p) {
2224
- const m = i.current;
2225
- if (!m || (s ? "offsetWidth" in m && m.offsetWidth === 0 : "offsetHeight" in m && m.offsetHeight === 0))
2225
+ function p(h) {
2226
+ const f = i.current;
2227
+ if (!f || (s ? "offsetWidth" in f && f.offsetWidth === 0 : "offsetHeight" in f && f.offsetHeight === 0))
2226
2228
  return;
2227
- const w = p.behavior === "smooth";
2228
- let I, C, g;
2229
- ke(m) ? (C = Math.max(
2230
- wt(m.document.documentElement, s ? "width" : "height"),
2231
- s ? m.document.documentElement.scrollWidth : m.document.documentElement.scrollHeight
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"]);
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) {
2235
- t({ scrollHeight: C, scrollTop: g, viewportHeight: I }), w && e(!0);
2229
+ const C = h.behavior === "smooth";
2230
+ let w, S, m;
2231
+ ke(f) ? (S = Math.max(
2232
+ wt(f.document.documentElement, s ? "width" : "height"),
2233
+ s ? f.document.documentElement.scrollWidth : f.document.documentElement.scrollHeight
2234
+ ), w = s ? f.innerWidth : f.innerHeight, m = s ? window.scrollX : window.scrollY) : (S = f[s ? "scrollWidth" : "scrollHeight"], w = wt(f, s ? "width" : "height"), m = f[s ? "scrollLeft" : "scrollTop"]);
2235
+ const u = S - w;
2236
+ if (h.top = Math.ceil(Math.max(Math.min(u, h.top), 0)), Nn(w, S) || h.top === m) {
2237
+ t({ scrollHeight: S, scrollTop: m, viewportHeight: w }), C && e(!0);
2236
2238
  return;
2237
2239
  }
2238
- w ? (l.current = p.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
2240
+ C ? (l.current = h.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
2239
2241
  c.current = null, l.current = null, e(!0);
2240
- }, 1e3)) : l.current = null, s && (p = { behavior: p.behavior, left: p.top }), m.scrollTo(p);
2242
+ }, 1e3)) : l.current = null, s && (h = { behavior: h.behavior, left: h.top }), f.scrollTo(h);
2241
2243
  }
2242
- function S(p) {
2243
- s && (p = { behavior: p.behavior, left: p.top }), i.current.scrollBy(p);
2244
+ function I(h) {
2245
+ s && (h = { behavior: h.behavior, left: h.top }), i.current.scrollBy(h);
2244
2246
  }
2245
- return { scrollByCallback: S, scrollerRef: i, scrollToCallback: f };
2247
+ return { scrollByCallback: I, scrollerRef: i, scrollToCallback: p };
2246
2248
  }
2247
- const Oe = "-webkit-sticky", xn = "sticky", Xn = Kn(() => {
2249
+ const Fe = "-webkit-sticky", xn = "sticky", Xn = Kn(() => {
2248
2250
  if (typeof document > "u")
2249
2251
  return xn;
2250
2252
  const t = document.createElement("div");
2251
- return t.style.position = Oe, t.style.position === Oe ? Oe : xn;
2253
+ return t.style.position = Fe, t.style.position === Fe ? Fe : xn;
2252
2254
  });
2253
2255
  function Ye(t) {
2254
2256
  return t;
@@ -2257,7 +2259,7 @@ const Qo = /* @__PURE__ */ U(() => {
2257
2259
  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(
2258
2260
  x(
2259
2261
  o,
2260
- E((f) => f[c]),
2262
+ E((p) => p[c]),
2261
2263
  Y()
2262
2264
  ),
2263
2265
  a
@@ -2284,23 +2286,23 @@ const Qo = /* @__PURE__ */ U(() => {
2284
2286
  ([t, e]) => ({ ...t, ...e }),
2285
2287
  X(jn, Qo)
2286
2288
  ), 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(
2289
+ 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"), p = M("context"), I = M("groupContent"), h = M("trackItemSizes"), f = M("itemSize"), C = M("log"), w = gt("gap"), S = M("horizontalDirection"), { callbackRef: m } = kn(
2288
2290
  o,
2289
- m,
2290
- p,
2291
+ f,
2292
+ h,
2291
2293
  e ? Yt : c,
2294
+ C,
2292
2295
  w,
2293
- I,
2294
2296
  s,
2295
- C,
2297
+ S,
2296
2298
  M("skipAnimationFrameInResizeObserver")
2297
2299
  ), [u, T] = H.useState(0);
2298
2300
  Je("deviation", (B) => {
2299
2301
  u !== B && T(B);
2300
2302
  });
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 ? {} : {
2303
+ const R = M("EmptyPlaceholder"), g = M("ScrollSeekPlaceholder") || er, d = M("ListComponent"), b = M("ItemComponent"), k = M("GroupComponent"), F = M("computeItemKey"), L = M("isSeeking"), V = M("groupIndices").length > 0, D = M("alignToBottom"), J = M("initialItemFinalLocationReached"), nt = e ? {} : {
2302
2304
  boxSizing: "border-box",
2303
- ...C ? {
2305
+ ...S ? {
2304
2306
  display: "inline-block",
2305
2307
  height: "100%",
2306
2308
  marginLeft: u !== 0 ? u : D ? "auto" : 0,
@@ -2314,49 +2316,49 @@ const Qo = /* @__PURE__ */ U(() => {
2314
2316
  },
2315
2317
  ...J ? {} : { visibility: "hidden" }
2316
2318
  };
2317
- return !e && n.totalCount === 0 && R ? /* @__PURE__ */ z(R, { ...Z(R, f) }) : /* @__PURE__ */ z(
2319
+ return !e && n.totalCount === 0 && R ? /* @__PURE__ */ z(R, { ...Z(R, p) }) : /* @__PURE__ */ z(
2318
2320
  d,
2319
2321
  {
2320
- ...Z(d, f),
2322
+ ...Z(d, p),
2321
2323
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2322
- ref: g,
2324
+ ref: m,
2323
2325
  style: nt,
2324
2326
  children: (e ? n.topItems : n.items).map((B) => {
2325
- const q = B.originalIndex, st = O(q + n.firstItemIndex, B.data, f);
2327
+ const q = B.originalIndex, it = F(q + n.firstItemIndex, B.data, p);
2326
2328
  return L ? /* @__PURE__ */ $t(
2327
- h,
2329
+ g,
2328
2330
  {
2329
- ...Z(h, f),
2331
+ ...Z(g, p),
2330
2332
  height: B.size,
2331
2333
  index: B.index,
2332
- key: st,
2334
+ key: it,
2333
2335
  type: B.type || "item",
2334
2336
  ...B.type === "group" ? {} : { groupIndex: B.groupIndex }
2335
2337
  }
2336
2338
  ) : B.type === "group" ? /* @__PURE__ */ $t(
2337
2339
  k,
2338
2340
  {
2339
- ...Z(k, f),
2341
+ ...Z(k, p),
2340
2342
  "data-index": q,
2341
2343
  "data-item-index": B.index,
2342
2344
  "data-known-size": B.size,
2343
- key: st,
2345
+ key: it,
2344
2346
  style: nr
2345
2347
  },
2346
- S(B.index, f)
2348
+ I(B.index, p)
2347
2349
  ) : /* @__PURE__ */ $t(
2348
2350
  b,
2349
2351
  {
2350
- ...Z(b, f),
2352
+ ...Z(b, p),
2351
2353
  ...Qn(b, B.data),
2352
2354
  "data-index": q,
2353
2355
  "data-item-group-index": B.groupIndex,
2354
2356
  "data-item-index": B.index,
2355
2357
  "data-known-size": B.size,
2356
- key: st,
2357
- style: C ? or : Jn
2358
+ key: it,
2359
+ style: S ? or : Jn
2358
2360
  },
2359
- V ? a(B.index, B.groupIndex, B.data, f) : a(B.index, B.data, f)
2361
+ V ? a(B.index, B.groupIndex, B.data, p) : a(B.index, B.data, p)
2360
2362
  );
2361
2363
  })
2362
2364
  }
@@ -2417,24 +2419,24 @@ const lr = /* @__PURE__ */ H.memo(function() {
2417
2419
  });
2418
2420
  function Ze({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2419
2421
  return H.memo(function({ children: s, style: i, ...l }) {
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(
2422
+ const c = n("scrollContainerState"), a = e("ScrollerComponent"), p = n("smoothScrollTargetReached"), I = e("scrollerRef"), h = e("context"), f = e("horizontalDirection") || !1, { scrollByCallback: C, scrollerRef: w, scrollToCallback: S } = Zn(
2421
2423
  c,
2422
- f,
2424
+ p,
2423
2425
  a,
2424
- S,
2426
+ I,
2425
2427
  void 0,
2426
- m
2428
+ f
2427
2429
  );
2428
- return t("scrollTo", C), t("scrollBy", w), /* @__PURE__ */ z(
2430
+ return t("scrollTo", S), t("scrollBy", C), /* @__PURE__ */ z(
2429
2431
  a,
2430
2432
  {
2431
2433
  "data-testid": "virtuoso-scroller",
2432
2434
  "data-virtuoso-scroller": !0,
2433
- ref: I,
2434
- style: { ...m ? sr : rr, ...i },
2435
+ ref: w,
2436
+ style: { ...f ? sr : rr, ...i },
2435
2437
  tabIndex: 0,
2436
2438
  ...l,
2437
- ...Z(a, p),
2439
+ ...Z(a, h),
2438
2440
  children: s
2439
2441
  }
2440
2442
  );
@@ -2442,26 +2444,26 @@ function Ze({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2442
2444
  }
2443
2445
  function Xe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2444
2446
  return H.memo(function({ children: s, style: i, ...l }) {
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(
2447
+ const c = n("windowScrollContainerState"), a = e("ScrollerComponent"), p = n("smoothScrollTargetReached"), I = e("totalListHeight"), h = e("deviation"), f = e("customScrollParent"), C = e("context"), w = H.useRef(null), S = e("scrollerRef"), { scrollByCallback: m, scrollerRef: u, scrollToCallback: T } = Zn(
2446
2448
  c,
2447
- f,
2449
+ p,
2448
2450
  a,
2449
- C,
2450
- m
2451
+ S,
2452
+ f
2451
2453
  );
2452
2454
  return Yn(() => {
2453
2455
  var R;
2454
- return u.current = m || ((R = I.current) == null ? void 0 : R.ownerDocument.defaultView), () => {
2456
+ return u.current = f || ((R = w.current) == null ? void 0 : R.ownerDocument.defaultView), () => {
2455
2457
  u.current = null;
2456
2458
  };
2457
- }, [u, m]), t("windowScrollTo", T), t("scrollBy", g), /* @__PURE__ */ z(
2459
+ }, [u, f]), t("windowScrollTo", T), t("scrollBy", m), /* @__PURE__ */ z(
2458
2460
  a,
2459
2461
  {
2460
- ref: I,
2462
+ ref: w,
2461
2463
  "data-virtuoso-scroller": !0,
2462
- style: { position: "relative", ...i, ...S !== 0 ? { height: S + p } : {} },
2464
+ style: { position: "relative", ...i, ...I !== 0 ? { height: I + h } : {} },
2463
2465
  ...l,
2464
- ...Z(a, w),
2466
+ ...Z(a, C),
2465
2467
  children: s
2466
2468
  }
2467
2469
  );
@@ -2476,7 +2478,7 @@ const ur = ({ children: t }) => {
2476
2478
  e && (n(e.viewportHeight), o(e.itemHeight));
2477
2479
  }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "element", ref: l, style: Zt(r), children: t });
2478
2480
  }, ar = ({ children: t }) => {
2479
- const e = H.useContext(be), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s = Ge(
2481
+ const e = H.useContext(be), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s = _e(
2480
2482
  n,
2481
2483
  r,
2482
2484
  M("skipAnimationFrameInResizeObserver")
@@ -2567,7 +2569,7 @@ const ur = ({ children: t }) => {
2567
2569
  ] })), e = v(null), n = v(null), o = v(null), r = v({}), s = v(Ye), i = v(Yt), l = (c, a = null) => ct(
2568
2570
  x(
2569
2571
  r,
2570
- E((f) => f[c]),
2572
+ E((p) => p[c]),
2571
2573
  Y()
2572
2574
  ),
2573
2575
  a
@@ -2594,53 +2596,53 @@ const ur = ({ children: t }) => {
2594
2596
  ([t, e]) => ({ ...t, ...e }),
2595
2597
  X(jn, hr)
2596
2598
  ), 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 }) {
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) => {
2598
- const w = m.originalIndex, I = o(w + r, m.data, l), C = e ? w === 0 ? 0 : S[w - 1] : 0;
2599
+ const n = G("listState"), o = G("computeItemKey"), r = G("firstItemIndex"), s = G("isSeeking"), i = G("ScrollSeekPlaceholder") || Ir, l = G("context"), c = G("TableRowComponent"), a = G("fixedHeaderHeight"), p = G("itemContent"), I = (e ? n.topItems : []).reduce((f, C, w) => (w === 0 ? f.push(C.size) : f.push(f[w - 1] + C.size), f), []), h = (e ? n.topItems : n.items).map((f) => {
2600
+ const C = f.originalIndex, w = o(C + r, f.data, l), S = e ? C === 0 ? 0 : I[C - 1] : 0;
2599
2601
  return s ? /* @__PURE__ */ $t(
2600
2602
  i,
2601
2603
  {
2602
2604
  ...Z(i, l),
2603
- height: m.size,
2604
- index: m.index,
2605
- key: I,
2606
- type: m.type || "item"
2605
+ height: f.size,
2606
+ index: f.index,
2607
+ key: w,
2608
+ type: f.type || "item"
2607
2609
  }
2608
2610
  ) : /* @__PURE__ */ $t(
2609
2611
  c,
2610
2612
  {
2611
2613
  ...Z(c, l),
2612
- ...Qn(c, m.data),
2613
- "data-index": w,
2614
- "data-item-index": m.index,
2615
- "data-known-size": m.size,
2616
- key: I,
2617
- style: e ? { overflowAnchor: "none", position: "sticky", top: a + C, zIndex: 2 } : xr
2614
+ ...Qn(c, f.data),
2615
+ "data-index": C,
2616
+ "data-item-index": f.index,
2617
+ "data-known-size": f.size,
2618
+ key: w,
2619
+ style: e ? { overflowAnchor: "none", position: "sticky", top: a + S, zIndex: 2 } : xr
2618
2620
  },
2619
- f(m.index, m.data, l)
2621
+ p(f.index, f.data, l)
2620
2622
  );
2621
2623
  });
2622
- return /* @__PURE__ */ z(so, { children: p });
2624
+ return /* @__PURE__ */ z(so, { children: h });
2623
2625
  }), Tr = /* @__PURE__ */ H.memo(function() {
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(
2626
+ const e = G("listState"), n = G("topItemsIndexes").length > 0, o = Tt("sizeRanges"), r = G("useWindowScroll"), s = G("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), c = s || r ? i : l, a = G("trackItemSizes"), p = G("itemSize"), I = G("log"), { callbackRef: h, ref: f } = kn(
2625
2627
  o,
2626
- f,
2628
+ p,
2627
2629
  a,
2628
2630
  c,
2629
- S,
2631
+ I,
2630
2632
  void 0,
2631
2633
  s,
2632
2634
  !1,
2633
- _("skipAnimationFrameInResizeObserver")
2634
- ), [w, I] = H.useState(0);
2635
+ G("skipAnimationFrameInResizeObserver")
2636
+ ), [C, w] = H.useState(0);
2635
2637
  Qe("deviation", (V) => {
2636
- w !== V && (m.current.style.marginTop = `${V}px`, I(V));
2638
+ C !== V && (f.current.style.marginTop = `${V}px`, w(V));
2637
2639
  });
2638
- const C = _("EmptyPlaceholder"), g = _("FillerRow") || Sr, u = _("TableBodyComponent"), T = _("paddingTopAddition"), R = _("statefulTotalCount"), h = _("context");
2639
- if (R === 0 && C)
2640
- return /* @__PURE__ */ z(C, { ...Z(C, h) });
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: [
2643
- O,
2640
+ const S = G("EmptyPlaceholder"), m = G("FillerRow") || Sr, u = G("TableBodyComponent"), T = G("paddingTopAddition"), R = G("statefulTotalCount"), g = G("context");
2641
+ if (R === 0 && S)
2642
+ return /* @__PURE__ */ z(S, { ...Z(S, g) });
2643
+ const d = (n ? e.topItems : []).reduce((V, D) => V + D.size, 0), b = e.offsetTop + T + C - d, k = e.offsetBottom, F = b > 0 ? /* @__PURE__ */ z(m, { context: g, height: b }, "padding-top") : null, L = k > 0 ? /* @__PURE__ */ z(m, { context: g, height: k }, "padding-bottom") : null;
2644
+ return /* @__PURE__ */ Kt(u, { "data-testid": "virtuoso-item-list", ref: h, ...Z(u, g), children: [
2645
+ F,
2644
2646
  n && /* @__PURE__ */ z(Cn, { showTopList: !0 }),
2645
2647
  /* @__PURE__ */ z(Cn, {}),
2646
2648
  L
@@ -2649,57 +2651,57 @@ const ur = ({ children: t }) => {
2649
2651
  const e = H.useContext(be), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r = Ht(
2650
2652
  H.useMemo(() => ne(n, (s) => wt(s, "height")), [n]),
2651
2653
  !0,
2652
- _("skipAnimationFrameInResizeObserver")
2654
+ G("skipAnimationFrameInResizeObserver")
2653
2655
  );
2654
2656
  return H.useEffect(() => {
2655
2657
  e && (n(e.viewportHeight), o(e.itemHeight));
2656
2658
  }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "element", ref: r, style: Zt(!1), children: t });
2657
2659
  }, wr = ({ children: t }) => {
2658
- const e = H.useContext(be), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = _("customScrollParent"), s = Ge(
2660
+ const e = H.useContext(be), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = G("customScrollParent"), s = _e(
2659
2661
  n,
2660
2662
  r,
2661
- _("skipAnimationFrameInResizeObserver")
2663
+ G("skipAnimationFrameInResizeObserver")
2662
2664
  );
2663
2665
  return H.useEffect(() => {
2664
2666
  e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2665
2667
  }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "window", ref: s, style: Zt(!1), children: t });
2666
2668
  }, 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(
2669
+ const n = G("useWindowScroll"), o = G("customScrollParent"), r = Tt("fixedHeaderHeight"), s = Tt("fixedFooterHeight"), i = G("fixedHeaderContent"), l = G("fixedFooterContent"), c = G("context"), a = Ht(
2668
2670
  H.useMemo(() => ne(r, (u) => wt(u, "height")), [r]),
2669
2671
  !0,
2670
- _("skipAnimationFrameInResizeObserver")
2671
- ), f = Ht(
2672
+ G("skipAnimationFrameInResizeObserver")
2673
+ ), p = Ht(
2672
2674
  H.useMemo(() => ne(s, (u) => wt(u, "height")), [s]),
2673
2675
  !0,
2674
- _("skipAnimationFrameInResizeObserver")
2675
- ), S = o || n ? br : Rr, p = o || n ? wr : Cr, m = _("TableComponent"), w = _("TableHeadComponent"), I = _("TableFooterComponent"), C = i ? /* @__PURE__ */ z(
2676
- w,
2676
+ G("skipAnimationFrameInResizeObserver")
2677
+ ), I = o || n ? br : Rr, h = o || n ? wr : Cr, f = G("TableComponent"), C = G("TableHeadComponent"), w = G("TableFooterComponent"), S = i ? /* @__PURE__ */ z(
2678
+ C,
2677
2679
  {
2678
2680
  ref: a,
2679
2681
  style: { position: "sticky", top: 0, zIndex: 2 },
2680
- ...Z(w, c),
2682
+ ...Z(C, c),
2681
2683
  children: i()
2682
2684
  },
2683
2685
  "TableHead"
2684
- ) : null, g = l ? /* @__PURE__ */ z(
2685
- I,
2686
+ ) : null, m = l ? /* @__PURE__ */ z(
2687
+ w,
2686
2688
  {
2687
- ref: f,
2689
+ ref: p,
2688
2690
  style: { bottom: 0, position: "sticky", zIndex: 1 },
2689
- ...Z(I, c),
2691
+ ...Z(w, c),
2690
2692
  children: l()
2691
2693
  },
2692
2694
  "TableFoot"
2693
2695
  ) : null;
2694
- return /* @__PURE__ */ z(S, { ...e, ...Z(S, c), children: /* @__PURE__ */ z(p, { children: /* @__PURE__ */ Kt(m, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...Z(m, c), children: [
2695
- C,
2696
+ return /* @__PURE__ */ z(I, { ...e, ...Z(I, c), children: /* @__PURE__ */ z(h, { children: /* @__PURE__ */ Kt(f, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...Z(f, c), children: [
2697
+ S,
2696
2698
  /* @__PURE__ */ z(Tr, {}, "TableBody"),
2697
- g
2699
+ m
2698
2700
  ] }) }) });
2699
2701
  }), {
2700
2702
  Component: yr,
2701
2703
  useEmitter: Qe,
2702
- useEmitterValue: _,
2704
+ useEmitterValue: G,
2703
2705
  usePublisher: Tt
2704
2706
  } = /* @__PURE__ */ qe(
2705
2707
  gr,
@@ -2756,7 +2758,7 @@ const ur = ({ children: t }) => {
2756
2758
  }
2757
2759
  },
2758
2760
  vr
2759
- ), Rr = /* @__PURE__ */ Ze({ useEmitter: Qe, useEmitterValue: _, usePublisher: Tt }), br = /* @__PURE__ */ Xe({ useEmitter: Qe, useEmitterValue: _, usePublisher: Tt }), qr = yr, wn = {
2761
+ ), Rr = /* @__PURE__ */ Ze({ useEmitter: Qe, useEmitterValue: G, usePublisher: Tt }), br = /* @__PURE__ */ Xe({ useEmitter: Qe, useEmitterValue: G, usePublisher: Tt }), qr = yr, wn = {
2760
2762
  bottom: 0,
2761
2763
  itemHeight: 0,
2762
2764
  items: [],
@@ -2772,7 +2774,7 @@ const ur = ({ children: t }) => {
2772
2774
  offsetBottom: 0,
2773
2775
  offsetTop: 0,
2774
2776
  top: 0
2775
- }, { ceil: vn, floor: Ce, max: ee, min: Fe, round: yn } = Math;
2777
+ }, { ceil: vn, floor: Ce, max: ee, min: Oe, round: yn } = Math;
2776
2778
  function Rn(t, e, n) {
2777
2779
  return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
2778
2780
  }
@@ -2791,18 +2793,18 @@ function Br(t, e) {
2791
2793
  const kr = /* @__PURE__ */ U(
2792
2794
  ([
2793
2795
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
2794
- { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached: f, viewportHeight: S },
2795
- p,
2796
- m,
2797
- { didMount: w, propsReady: I },
2798
- { customScrollParent: C, useWindowScroll: g, windowScrollContainerState: u, windowScrollTo: T, windowViewportRect: R },
2799
- h
2796
+ { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached: p, viewportHeight: I },
2797
+ h,
2798
+ f,
2799
+ { didMount: C, propsReady: w },
2800
+ { customScrollParent: S, useWindowScroll: m, windowScrollContainerState: u, windowScrollTo: T, windowViewportRect: R },
2801
+ g
2800
2802
  ]) => {
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);
2803
+ const d = v(0), b = v(0), k = v(wn), F = 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 = $(), it = $(), dt = v(!1), St = v(0), ft = v(!0), ut = v(!1), At = v(!1);
2802
2804
  K(
2803
2805
  x(
2804
- w,
2805
- G(St),
2806
+ C,
2807
+ _(St),
2806
2808
  P(([y, N]) => !!N)
2807
2809
  ),
2808
2810
  () => {
@@ -2810,8 +2812,8 @@ const kr = /* @__PURE__ */ U(
2810
2812
  }
2811
2813
  ), K(
2812
2814
  x(
2813
- rt(w, ft, L, O, St, ut),
2814
- P(([y, N, Q, it, , tt]) => y && !N && Q.height !== 0 && it.height !== 0 && !tt)
2815
+ rt(C, ft, L, F, St, ut),
2816
+ P(([y, N, Q, lt, , tt]) => y && !N && Q.height !== 0 && lt.height !== 0 && !tt)
2815
2817
  ),
2816
2818
  ([, , , , y]) => {
2817
2819
  W(ut, !0), $e(1, () => {
@@ -2820,54 +2822,54 @@ const kr = /* @__PURE__ */ U(
2820
2822
  W(e, [0, 0]), W(ft, !0);
2821
2823
  });
2822
2824
  }
2823
- ), F(
2825
+ ), O(
2824
2826
  x(
2825
- st,
2827
+ it,
2826
2828
  P((y) => y != null && y.scrollTop > 0),
2827
2829
  yt(0)
2828
2830
  ),
2829
2831
  b
2830
2832
  ), K(
2831
2833
  x(
2832
- w,
2833
- G(st),
2834
+ C,
2835
+ _(it),
2834
2836
  P(([, y]) => y != null)
2835
2837
  ),
2836
2838
  ([, 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) => {
2839
+ y && (W(F, y.viewport), W(L, y.item), W(B, y.gap), y.scrollTop > 0 && (W(dt, !0), bt(x(a, jt(1)), (N) => {
2838
2840
  W(dt, !1);
2839
2841
  }), W(c, { top: y.scrollTop })));
2840
2842
  }
2841
- ), F(
2843
+ ), O(
2842
2844
  x(
2843
- O,
2845
+ F,
2844
2846
  E(({ height: y }) => y)
2845
2847
  ),
2846
- S
2847
- ), F(
2848
+ I
2849
+ ), O(
2848
2850
  x(
2849
2851
  rt(
2850
- A(O, he),
2852
+ A(F, he),
2851
2853
  A(L, he),
2852
2854
  A(B, (y, N) => y && y.column === N.column && y.row === N.row),
2853
2855
  A(a)
2854
2856
  ),
2855
- E(([y, N, Q, it]) => ({
2857
+ E(([y, N, Q, lt]) => ({
2856
2858
  gap: Q,
2857
2859
  item: N,
2858
- scrollTop: it,
2860
+ scrollTop: lt,
2859
2861
  viewport: y
2860
2862
  }))
2861
2863
  ),
2862
2864
  q
2863
- ), F(
2865
+ ), O(
2864
2866
  x(
2865
2867
  rt(
2866
2868
  A(d),
2867
2869
  o,
2868
2870
  A(B, Br),
2869
2871
  A(L, he),
2870
- A(O, he),
2872
+ A(F, he),
2871
2873
  A(nt),
2872
2874
  A(b),
2873
2875
  A(dt),
@@ -2879,44 +2881,44 @@ const kr = /* @__PURE__ */ U(
2879
2881
  ([
2880
2882
  y,
2881
2883
  [N, Q],
2882
- it,
2884
+ lt,
2883
2885
  tt,
2884
2886
  kt,
2885
2887
  Jt,
2886
2888
  Nt,
2887
2889
  ,
2888
2890
  de,
2889
- Ot
2891
+ Ft
2890
2892
  ]) => {
2891
- const { column: Ft, row: Qt } = it, { height: fe, width: He } = tt, { width: tn } = kt;
2893
+ const { column: Ot, row: Qt } = lt, { height: fe, width: He } = tt, { width: tn } = kt;
2892
2894
  if (Nt === 0 && (y === 0 || tn === 0))
2893
2895
  return wn;
2894
2896
  if (He === 0) {
2895
- const sn = Ue(Ot, y), ro = sn + Math.max(Nt - 1, 0);
2897
+ const sn = Ue(Ft, y), ro = sn + Math.max(Nt - 1, 0);
2896
2898
  return Er(Rn(sn, ro, Jt));
2897
2899
  }
2898
- const me = eo(tn, He, Ft);
2900
+ const me = eo(tn, He, Ot);
2899
2901
  let Dt, Wt;
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
+ 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 = Oe(y - 1, ee(Wt, me - 1)), Dt = Oe(Wt, ee(0, Dt))) : (Dt = 0, Wt = -1);
2903
+ const en = Rn(Dt, Wt, Jt), { bottom: nn, top: on } = bn(kt, lt, tt, en), rn = vn(y / me), oo = rn * fe + (rn - 1) * Qt - nn;
2902
2904
  return { bottom: nn, itemHeight: fe, items: en, itemWidth: He, offsetBottom: oo, offsetTop: on, top: on };
2903
2905
  }
2904
2906
  )
2905
2907
  ),
2906
2908
  k
2907
- ), F(
2909
+ ), O(
2908
2910
  x(
2909
2911
  nt,
2910
2912
  P((y) => y !== null),
2911
2913
  E((y) => y.length)
2912
2914
  ),
2913
2915
  d
2914
- ), F(
2916
+ ), O(
2915
2917
  x(
2916
- rt(O, L, k, B),
2918
+ rt(F, L, k, B),
2917
2919
  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
+ E(([y, N, { items: Q }, lt]) => {
2921
+ const { bottom: tt, top: kt } = bn(y, lt, N, Q);
2920
2922
  return [kt, tt];
2921
2923
  }),
2922
2924
  Y(se)
@@ -2924,19 +2926,19 @@ const kr = /* @__PURE__ */ U(
2924
2926
  e
2925
2927
  );
2926
2928
  const xt = v(!1);
2927
- F(
2929
+ O(
2928
2930
  x(
2929
2931
  a,
2930
- G(xt),
2932
+ _(xt),
2931
2933
  E(([y, N]) => N || y !== 0)
2932
2934
  ),
2933
2935
  xt
2934
2936
  );
2935
- const Xt = pt(
2937
+ const Xt = ht(
2936
2938
  x(
2937
2939
  rt(k, d),
2938
2940
  P(([{ items: y }]) => y.length > 0),
2939
- G(xt),
2941
+ _(xt),
2940
2942
  P(([[y, N], Q]) => {
2941
2943
  const tt = y.items[y.items.length - 1].index === N - 1;
2942
2944
  return (Q || y.bottom > 0 && y.itemHeight > 0 && y.offsetBottom === 0 && y.items.length === N) && tt;
@@ -2944,17 +2946,17 @@ const kr = /* @__PURE__ */ U(
2944
2946
  E(([[, y]]) => y - 1),
2945
2947
  Y()
2946
2948
  )
2947
- ), Mt = pt(
2949
+ ), Mt = ht(
2948
2950
  x(
2949
2951
  A(k),
2950
2952
  P(({ items: y }) => y.length > 0 && y[0].index === 0),
2951
2953
  yt(0),
2952
2954
  Y()
2953
2955
  )
2954
- ), vt = pt(
2956
+ ), vt = ht(
2955
2957
  x(
2956
2958
  A(k),
2957
- G(dt),
2959
+ _(dt),
2958
2960
  P(([{ items: y }, N]) => y.length > 0 && !N),
2959
2961
  E(([{ items: y }]) => ({
2960
2962
  endIndex: y[y.length - 1].index,
@@ -2964,16 +2966,16 @@ const kr = /* @__PURE__ */ U(
2964
2966
  Lt(0)
2965
2967
  )
2966
2968
  );
2967
- F(vt, m.scrollSeekRangeChanged), F(
2969
+ O(vt, f.scrollSeekRangeChanged), O(
2968
2970
  x(
2969
2971
  V,
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;
2974
- Ot === "LAST" && (Ot = it - 1), Ot = ee(0, Ot, Fe(it - 1, Ot));
2975
- let Ft = Ae(N, tt, Q, Ot);
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 };
2972
+ _(F, L, d, B),
2973
+ E(([y, N, Q, lt, tt]) => {
2974
+ const kt = _n(y), { align: Jt, behavior: Nt, offset: de } = kt;
2975
+ let Ft = kt.index;
2976
+ Ft === "LAST" && (Ft = lt - 1), Ft = ee(0, Ft, Oe(lt - 1, Ft));
2977
+ let Ot = Ae(N, tt, Q, Ft);
2978
+ return Jt === "end" ? Ot = yn(Ot - N.height + Q.height) : Jt === "center" && (Ot = yn(Ot - N.height / 2 + Q.height / 2)), de && (Ot += de), { behavior: Nt, top: Ot };
2977
2979
  })
2978
2980
  ),
2979
2981
  c
@@ -2985,14 +2987,14 @@ const kr = /* @__PURE__ */ U(
2985
2987
  ),
2986
2988
  0
2987
2989
  );
2988
- return F(
2990
+ return O(
2989
2991
  x(
2990
2992
  R,
2991
2993
  E((y) => ({ height: y.visibleHeight, width: y.visibleWidth }))
2992
2994
  ),
2993
- O
2995
+ F
2994
2996
  ), {
2995
- customScrollParent: C,
2997
+ customScrollParent: S,
2996
2998
  // input
2997
2999
  data: nt,
2998
3000
  deviation: J,
@@ -3003,34 +3005,34 @@ const kr = /* @__PURE__ */ U(
3003
3005
  initialItemCount: b,
3004
3006
  itemDimensions: L,
3005
3007
  overscan: n,
3006
- restoreStateFrom: st,
3008
+ restoreStateFrom: it,
3007
3009
  scrollBy: i,
3008
3010
  scrollContainerState: l,
3009
3011
  scrollHeight: D,
3010
3012
  scrollTo: c,
3011
3013
  scrollToIndex: V,
3012
3014
  scrollTop: a,
3013
- smoothScrollTargetReached: f,
3015
+ smoothScrollTargetReached: p,
3014
3016
  totalCount: d,
3015
- useWindowScroll: g,
3016
- viewportDimensions: O,
3017
+ useWindowScroll: m,
3018
+ viewportDimensions: F,
3017
3019
  windowScrollContainerState: u,
3018
3020
  windowScrollTo: T,
3019
3021
  windowViewportRect: R,
3020
- ...m,
3022
+ ...f,
3021
3023
  // output
3022
3024
  gridState: k,
3023
3025
  horizontalDirection: At,
3024
3026
  initialTopMostItemIndex: St,
3025
3027
  totalListHeight: Bt,
3026
- ...p,
3028
+ ...h,
3027
3029
  endReached: Xt,
3028
- propsReady: I,
3030
+ propsReady: w,
3029
3031
  rangeChanged: vt,
3030
3032
  startReached: Mt,
3031
3033
  stateChanged: q,
3032
3034
  stateRestoreInProgress: dt,
3033
- ...h
3035
+ ...g
3034
3036
  };
3035
3037
  },
3036
3038
  X(Ke, at, ae, Un, Pt, je, Vt)
@@ -3049,16 +3051,16 @@ function Ae(t, e, n, o) {
3049
3051
  const r = eo(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + ee(0, s - 1) * e.row;
3050
3052
  return i > 0 ? i + e.row : i;
3051
3053
  }
3052
- const Or = /* @__PURE__ */ U(() => {
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(
3054
+ const Fr = /* @__PURE__ */ U(() => {
3055
+ const t = v((I) => `Item ${I}`), 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 = (I, h = null) => ct(
3054
3056
  x(
3055
3057
  e,
3056
- E((m) => m[S]),
3058
+ E((f) => f[I]),
3057
3059
  Y()
3058
3060
  ),
3059
- p
3060
- ), a = v(!1), f = v(!1);
3061
- return F(A(f), a), {
3061
+ h
3062
+ ), a = v(!1), p = v(!1);
3063
+ return O(A(p), a), {
3062
3064
  components: e,
3063
3065
  computeItemKey: s,
3064
3066
  context: n,
@@ -3071,51 +3073,51 @@ const Or = /* @__PURE__ */ U(() => {
3071
3073
  listClassName: r,
3072
3074
  ListComponent: c("List", "div"),
3073
3075
  readyStateChanged: a,
3074
- reportReadyState: f,
3076
+ reportReadyState: p,
3075
3077
  ScrollerComponent: c("Scroller", "div"),
3076
3078
  scrollerRef: l,
3077
3079
  ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
3078
3080
  };
3079
- }), Fr = /* @__PURE__ */ U(
3081
+ }), Or = /* @__PURE__ */ U(
3080
3082
  ([t, e]) => ({ ...t, ...e }),
3081
- X(kr, Or)
3083
+ X(kr, Fr)
3082
3084
  ), Lr = /* @__PURE__ */ H.memo(function() {
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(
3085
+ 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"), p = et("ScrollSeekPlaceholder"), I = et("context"), h = It("itemDimensions"), f = It("gap"), C = et("log"), w = et("stateRestoreInProgress"), S = It("reportReadyState"), m = Ht(
3084
3086
  H.useMemo(
3085
3087
  () => (u) => {
3086
3088
  const T = u.parentElement.parentElement.scrollHeight;
3087
3089
  l(T);
3088
3090
  const R = u.firstChild;
3089
3091
  if (R) {
3090
- const { height: h, width: d } = R.getBoundingClientRect();
3091
- p({ height: h, width: d });
3092
+ const { height: g, width: d } = R.getBoundingClientRect();
3093
+ h({ height: g, width: d });
3092
3094
  }
3093
- m({
3094
- column: Hn("column-gap", getComputedStyle(u).columnGap, w),
3095
- row: Hn("row-gap", getComputedStyle(u).rowGap, w)
3095
+ f({
3096
+ column: Hn("column-gap", getComputedStyle(u).columnGap, C),
3097
+ row: Hn("row-gap", getComputedStyle(u).rowGap, C)
3096
3098
  });
3097
3099
  },
3098
- [l, p, m, w]
3100
+ [l, h, f, C]
3099
3101
  ),
3100
3102
  !0,
3101
3103
  !1
3102
3104
  );
3103
3105
  return Yn(() => {
3104
- e.itemHeight > 0 && e.itemWidth > 0 && C(!0);
3105
- }, [e]), I ? null : /* @__PURE__ */ z(
3106
+ e.itemHeight > 0 && e.itemWidth > 0 && S(!0);
3107
+ }, [e]), w ? null : /* @__PURE__ */ z(
3106
3108
  a,
3107
3109
  {
3108
3110
  className: n,
3109
- ref: g,
3110
- ...Z(a, S),
3111
+ ref: m,
3112
+ ...Z(a, I),
3111
3113
  "data-testid": "virtuoso-item-list",
3112
3114
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
3113
3115
  children: e.items.map((u) => {
3114
- const T = s(u.index, u.data, S);
3116
+ const T = s(u.index, u.data, I);
3115
3117
  return i ? /* @__PURE__ */ z(
3116
- f,
3118
+ p,
3117
3119
  {
3118
- ...Z(f, S),
3120
+ ...Z(p, I),
3119
3121
  height: e.itemHeight,
3120
3122
  index: u.index,
3121
3123
  width: e.itemWidth
@@ -3124,12 +3126,12 @@ const Or = /* @__PURE__ */ U(() => {
3124
3126
  ) : /* @__PURE__ */ $t(
3125
3127
  c,
3126
3128
  {
3127
- ...Z(c, S),
3129
+ ...Z(c, I),
3128
3130
  className: o,
3129
3131
  "data-index": u.index,
3130
3132
  key: T
3131
3133
  },
3132
- r(u.index, u.data, S)
3134
+ r(u.index, u.data, I)
3133
3135
  );
3134
3136
  })
3135
3137
  }
@@ -3173,12 +3175,12 @@ const Or = /* @__PURE__ */ U(() => {
3173
3175
  e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
3174
3176
  }, [e, o, n]), /* @__PURE__ */ z("div", { ref: r, style: Zt(!1), children: t });
3175
3177
  }, Ar = ({ children: t }) => {
3176
- const e = H.useContext(qn), n = It("windowViewportRect"), o = It("itemDimensions"), r = et("customScrollParent"), s = Ge(n, r, !1);
3178
+ const e = H.useContext(qn), n = It("windowViewportRect"), o = It("itemDimensions"), r = et("customScrollParent"), s = _e(n, r, !1);
3177
3179
  return H.useEffect(() => {
3178
3180
  e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
3179
3181
  }, [e, n, o]), /* @__PURE__ */ z("div", { ref: s, style: Zt(!1), children: t });
3180
3182
  }, Mr = /* @__PURE__ */ H.memo(function({ ...e }) {
3181
- const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Gr : _r, s = o || n ? Ar : Pr, i = et("context");
3183
+ const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? _r : Gr, s = o || n ? Ar : Pr, i = et("context");
3182
3184
  return /* @__PURE__ */ z(r, { ...e, ...Z(r, i), children: /* @__PURE__ */ Kt(s, { children: [
3183
3185
  /* @__PURE__ */ z(zr, {}),
3184
3186
  /* @__PURE__ */ z(Lr, {}),
@@ -3190,7 +3192,7 @@ const Or = /* @__PURE__ */ U(() => {
3190
3192
  useEmitterValue: et,
3191
3193
  usePublisher: It
3192
3194
  } = /* @__PURE__ */ qe(
3193
- Fr,
3195
+ Or,
3194
3196
  {
3195
3197
  optional: {
3196
3198
  context: "context",
@@ -3230,14 +3232,14 @@ const Or = /* @__PURE__ */ U(() => {
3230
3232
  }
3231
3233
  },
3232
3234
  Mr
3233
- ), _r = /* @__PURE__ */ Ze({ useEmitter: no, useEmitterValue: et, usePublisher: It }), Gr = /* @__PURE__ */ Xe({ useEmitter: no, useEmitterValue: et, usePublisher: It });
3235
+ ), Gr = /* @__PURE__ */ Ze({ useEmitter: no, useEmitterValue: et, usePublisher: It }), _r = /* @__PURE__ */ Xe({ useEmitter: no, useEmitterValue: et, usePublisher: It });
3234
3236
  function Hn(t, e, n) {
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);
3237
+ return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, mt.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
3236
3238
  }
3237
3239
  const Yr = Wr;
3238
3240
  export {
3239
3241
  jr as GroupedVirtuoso,
3240
- ht as LogLevel,
3242
+ mt as LogLevel,
3241
3243
  qr as TableVirtuoso,
3242
3244
  Kr as Virtuoso,
3243
3245
  Yr as VirtuosoGrid,