react-virtuoso 4.18.21 → 4.18.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { jsx as G, jsxs as jt } from "react/jsx-runtime";
2
- import E, { createElement as Kt } from "react";
1
+ import { jsx as A, jsxs as Kt } from "react/jsx-runtime";
2
+ import E, { createElement as jt } from "react";
3
3
  import To from "react-dom";
4
4
  const Ee = 0, Pt = 1, Qt = 2, _n = 4;
5
5
  function In(t) {
@@ -17,7 +17,7 @@ function Sn(t, e) {
17
17
  function wo(t, e) {
18
18
  return (n) => t(e, n);
19
19
  }
20
- function Ke(t) {
20
+ function je(t) {
21
21
  return t !== void 0;
22
22
  }
23
23
  function yo(...t) {
@@ -36,20 +36,20 @@ function bo(t, e) {
36
36
  function st(...t) {
37
37
  return t;
38
38
  }
39
- function Z(t, e) {
39
+ function X(t, e) {
40
40
  return t(Pt, e);
41
41
  }
42
- function _(t, e) {
42
+ function N(t, e) {
43
43
  t(Ee, e);
44
44
  }
45
- function je(t) {
45
+ function Ke(t) {
46
46
  t(Qt);
47
47
  }
48
48
  function et(t) {
49
49
  return t(_n);
50
50
  }
51
- function B(t, e) {
52
- return Z(t, wo(e, Ee));
51
+ function z(t, e) {
52
+ return X(t, wo(e, Ee));
53
53
  }
54
54
  function kt(t, e) {
55
55
  const n = t(Pt, (o) => {
@@ -92,10 +92,10 @@ function v(t, ...e) {
92
92
  return ((o, r) => {
93
93
  switch (o) {
94
94
  case Qt:
95
- je(t);
95
+ Ke(t);
96
96
  return;
97
97
  case Pt:
98
- return Z(t, n(r));
98
+ return X(t, n(r));
99
99
  }
100
100
  });
101
101
  }
@@ -123,7 +123,7 @@ function D(...t) {
123
123
  const r = 2 ** t.length - 1;
124
124
  return t.forEach((s, i) => {
125
125
  const l = 2 ** i;
126
- Z(s, (u) => {
126
+ X(s, (u) => {
127
127
  const f = n;
128
128
  n |= l, e[i] = u, f !== r && n === r && o && (o(), o = null);
129
129
  });
@@ -143,7 +143,7 @@ function Ho(t) {
143
143
  return function(r, s) {
144
144
  switch (r) {
145
145
  case Pt:
146
- return s ? n === s ? void 0 : (o(), n = s, e = Z(t, s), e) : (o(), te);
146
+ return s ? n === s ? void 0 : (o(), n = s, e = X(t, s), e) : (o(), te);
147
147
  case Qt:
148
148
  o(), n = null;
149
149
  return;
@@ -152,7 +152,7 @@ function Ho(t) {
152
152
  }
153
153
  function y(t) {
154
154
  let e = t;
155
- const n = K();
155
+ const n = j();
156
156
  return ((o, r) => {
157
157
  switch (o) {
158
158
  case Ee:
@@ -169,9 +169,9 @@ function y(t) {
169
169
  });
170
170
  }
171
171
  function pt(t, e) {
172
- return ke(y(e), (n) => B(t, n));
172
+ return ke(y(e), (n) => z(t, n));
173
173
  }
174
- function K() {
174
+ function j() {
175
175
  const t = [];
176
176
  return ((e, n) => {
177
177
  switch (e) {
@@ -192,10 +192,10 @@ function K() {
192
192
  });
193
193
  }
194
194
  function Ct(t) {
195
- return ke(K(), (e) => B(t, e));
195
+ return ke(j(), (e) => z(t, e));
196
196
  }
197
197
  const Eo = { singleton: !0 };
198
- function q(t, e = [], n = Eo) {
198
+ function Y(t, e = [], n = Eo) {
199
199
  const { singleton: o } = n;
200
200
  return {
201
201
  constructor: t,
@@ -215,22 +215,22 @@ function Lo(t) {
215
215
  return n(t);
216
216
  }
217
217
  function dt(...t) {
218
- const e = K(), n = Array.from({ length: t.length });
218
+ const e = j(), n = Array.from({ length: t.length });
219
219
  let o = 0;
220
220
  const r = 2 ** t.length - 1;
221
221
  return t.forEach((s, i) => {
222
222
  const l = 2 ** i;
223
- Z(s, (u) => {
224
- n[i] = u, o |= l, o === r && _(e, n);
223
+ X(s, (u) => {
224
+ n[i] = u, o |= l, o === r && N(e, n);
225
225
  });
226
226
  }), function(s, i) {
227
227
  switch (s) {
228
228
  case Qt: {
229
- je(e);
229
+ Ke(e);
230
230
  return;
231
231
  }
232
232
  case Pt:
233
- return o === r && i(n), Z(e, i);
233
+ return o === r && i(n), X(e, i);
234
234
  }
235
235
  };
236
236
  }
@@ -243,7 +243,7 @@ function be(...t) {
243
243
  case Qt:
244
244
  return;
245
245
  case Pt:
246
- return yo(...t.map((o) => Z(o, n)));
246
+ return yo(...t.map((o) => X(o, n)));
247
247
  }
248
248
  };
249
249
  }
@@ -261,12 +261,12 @@ const gt = {
261
261
  [gt.ERROR]: "error",
262
262
  [gt.INFO]: "log",
263
263
  [gt.WARN]: "warn"
264
- }, zo = () => typeof globalThis > "u" ? window : globalThis, Gt = q(
264
+ }, Bo = () => typeof globalThis > "u" ? window : globalThis, Gt = Y(
265
265
  () => {
266
266
  const t = y(gt.ERROR);
267
267
  return {
268
268
  log: y((n, o, r = gt.INFO) => {
269
- const s = zo().VIRTUOSO_LOG_LEVEL ?? et(t);
269
+ const s = Bo().VIRTUOSO_LOG_LEVEL ?? et(t);
270
270
  r >= s && console[Oo[r]](
271
271
  "%creact-virtuoso: %c%s %o",
272
272
  "color: #0253b3; font-weight: bold",
@@ -281,11 +281,11 @@ const gt = {
281
281
  [],
282
282
  { singleton: !0 }
283
283
  );
284
- function Bo(t) {
284
+ function zo(t) {
285
285
  return "self" in t ? t.document.documentElement : t;
286
286
  }
287
287
  function Dn(t) {
288
- const e = Bo(t);
288
+ const e = zo(t);
289
289
  return e.ownerDocument.defaultView.getComputedStyle(e).direction === "rtl";
290
290
  }
291
291
  function Dt(t, e) {
@@ -322,9 +322,9 @@ function $n(t, e, n, o, r, s, i, l, u) {
322
322
  const m = h.lastElementChild?.dataset.viewportType === "window";
323
323
  let x;
324
324
  m && (x = h.ownerDocument.defaultView);
325
- const R = i ? l ? i.scrollWidth : i.scrollHeight : m ? l ? x.document.documentElement.scrollWidth : x.document.documentElement.scrollHeight : l ? h.scrollWidth : h.scrollHeight, I = i ? l ? i.offsetWidth : i.offsetHeight : m ? l ? x.innerWidth : x.innerHeight : l ? h.offsetWidth : h.offsetHeight, T = i ? l ? Dt(i, i.scrollLeft) : i.scrollTop : m ? l ? Dt(x, x.scrollX || x.document.documentElement.scrollLeft) : x.scrollY || x.document.documentElement.scrollTop : l ? Dt(h, h.scrollLeft) : h.scrollTop;
325
+ const b = i ? l ? i.scrollWidth : i.scrollHeight : m ? l ? x.document.documentElement.scrollWidth : x.document.documentElement.scrollHeight : l ? h.scrollWidth : h.scrollHeight, I = i ? l ? i.offsetWidth : i.offsetHeight : m ? l ? x.innerWidth : x.innerHeight : l ? h.offsetWidth : h.offsetHeight, T = i ? l ? Dt(i, i.scrollLeft) : i.scrollTop : m ? l ? Dt(x, x.scrollX || x.document.documentElement.scrollLeft) : x.scrollY || x.document.documentElement.scrollTop : l ? Dt(h, h.scrollLeft) : h.scrollTop;
326
326
  o({
327
- scrollHeight: R,
327
+ scrollHeight: b,
328
328
  scrollTop: Math.max(T, 0),
329
329
  viewportHeight: I
330
330
  }), s?.(
@@ -376,8 +376,8 @@ function Ye(t, e, n) {
376
376
  const f = u.getBoundingClientRect(), d = Ge(u);
377
377
  let g, h, m;
378
378
  if (e) {
379
- const x = e.getBoundingClientRect(), R = f.top - x.top;
380
- h = Ge(e), m = Ht(x.height - Math.max(0, R), 1 / d), g = Ht(R, 1 / h) + e.scrollTop;
379
+ const x = e.getBoundingClientRect(), b = f.top - x.top;
380
+ h = Ge(e), m = Ht(x.height - Math.max(0, b), 1 / d), g = Ht(b, 1 / h) + e.scrollTop;
381
381
  } else {
382
382
  const x = i.current.ownerDocument.defaultView;
383
383
  h = 1, m = Ht(x.innerHeight - Math.max(0, f.top), 1 / d), g = f.top + x.scrollY;
@@ -411,29 +411,29 @@ function Ye(t, e, n) {
411
411
  };
412
412
  }, [l, e, i]), s;
413
413
  }
414
- const It = q(
414
+ const It = Y(
415
415
  () => {
416
- const t = K(), e = K(), n = y(0), o = K(), r = K(), s = y(0), i = K(), l = K(), u = y(0), f = y(0), d = y(0), g = y(0), h = K(), m = K(), x = y(!1), R = y(!1), I = y(!1);
417
- return B(
416
+ const t = j(), e = j(), n = y(0), o = j(), r = j(), s = y(0), i = j(), l = j(), u = y(0), f = y(0), d = y(0), g = y(0), h = j(), m = j(), x = y(!1), b = y(!1), I = y(!1);
417
+ return z(
418
418
  v(
419
419
  t,
420
420
  k(({ scrollTop: T }) => T)
421
421
  ),
422
422
  e
423
- ), B(
423
+ ), z(
424
424
  v(
425
425
  t,
426
426
  k(({ scrollHeight: T }) => T)
427
427
  ),
428
428
  l
429
- ), B(e, s), {
429
+ ), z(e, s), {
430
430
  deviation: n,
431
431
  deviationCommitted: o,
432
432
  fixedFooterHeight: d,
433
433
  fixedHeaderHeight: f,
434
434
  footerHeight: g,
435
435
  headerHeight: u,
436
- horizontalDirection: R,
436
+ horizontalDirection: b,
437
437
  scrollBy: m,
438
438
  // input
439
439
  scrollContainerState: t,
@@ -503,8 +503,8 @@ function Ae(t, e) {
503
503
  return r;
504
504
  if (J(r))
505
505
  return o;
506
- const [s, i] = jn(o);
507
- return we(ht(t, { k: s, l: Kn(o), v: i }));
506
+ const [s, i] = Kn(o);
507
+ return we(ht(t, { k: s, l: jn(o), v: i }));
508
508
  }
509
509
  return e < n ? we(ht(t, { l: Ae(o, e) })) : we(ht(t, { r: Ae(r, e) }));
510
510
  }
@@ -560,14 +560,14 @@ function ht(t, e) {
560
560
  e.r === void 0 ? t.r : e.r
561
561
  );
562
562
  }
563
- function Kn(t) {
564
- return J(t.r) ? t.l : we(ht(t, { r: Kn(t.r) }));
563
+ function jn(t) {
564
+ return J(t.r) ? t.l : we(ht(t, { r: jn(t.r) }));
565
565
  }
566
566
  function Fe(t) {
567
567
  return J(t) || t.lvl > t.r.lvl;
568
568
  }
569
- function jn(t) {
570
- return J(t.r) ? [t.k, t.v] : jn(t.r);
569
+ function Kn(t) {
570
+ return J(t.r) ? [t.k, t.v] : Kn(t.r);
571
571
  }
572
572
  function qn(t, e, n, o = ce, r = ce) {
573
573
  return { k: t, l: o, lvl: n, r, v: e };
@@ -592,7 +592,7 @@ function Zn(t, e) {
592
592
  function Jt(t, e) {
593
593
  return !!(t && t[0] === e[0] && t[1] === e[1]);
594
594
  }
595
- const Ze = q(
595
+ const Ze = Y(
596
596
  () => ({ recalcInProgress: y(!1) }),
597
597
  [],
598
598
  { singleton: !0 }
@@ -666,8 +666,8 @@ function Go({ offset: t }, e) {
666
666
  function ae(t, e, n) {
667
667
  if (e.length === 0)
668
668
  return 0;
669
- const { index: o, offset: r, size: s } = Xn(e, t, Xe), i = t - o, l = s * i + (i - 1) * n + r;
670
- return l > 0 ? l + n : l;
669
+ const { index: o, offset: r, size: s } = Xn(e, t, Xe);
670
+ return r + (t - o) * (s + n);
671
671
  }
672
672
  function Jn(t, e) {
673
673
  if (!Oe(e))
@@ -693,7 +693,7 @@ function _o(t, [e, n, o, r]) {
693
693
  let i = s, l = 0;
694
694
  if (n.length > 0 && J(s) && e.length === 2) {
695
695
  const h = e[0].size, m = e[1].size;
696
- i = n.reduce((x, R) => xt(xt(x, R, h), R + 1, m), i);
696
+ i = n.reduce((x, b) => xt(xt(x, b, h), b + 1, m), i);
697
697
  } else
698
698
  [i, l] = Wo(i, e);
699
699
  if (i === s)
@@ -755,22 +755,22 @@ function $o(t) {
755
755
  const Uo = {
756
756
  offsetHeight: "height",
757
757
  offsetWidth: "width"
758
- }, Mt = q(
758
+ }, Mt = Y(
759
759
  ([{ log: t }, { recalcInProgress: e }]) => {
760
- const n = K(), o = K(), r = pt(o, 0), s = K(), i = K(), l = y(0), u = y([]), f = y(void 0), d = y(void 0), g = y(void 0), h = y(void 0), m = y((a, p) => Lt(a, Uo[p])), x = y(void 0), R = y(0), I = wn(), T = K(), c = pt(
760
+ const n = j(), o = j(), r = pt(o, 0), s = j(), i = j(), l = y(0), u = y([]), f = y(void 0), d = y(void 0), g = y(void 0), h = y(void 0), m = y((a, p) => Lt(a, Uo[p])), x = y(void 0), b = y(0), I = wn(), T = j(), c = pt(
761
761
  v(
762
762
  be(n, T),
763
- D(u, t, R),
764
- Et((a, [p, ...b]) => {
763
+ D(u, t, b),
764
+ Et((a, [p, ...R]) => {
765
765
  if (p === null) {
766
- const [O] = b;
766
+ const [O] = R;
767
767
  return {
768
768
  ...wn(),
769
769
  groupIndices: O,
770
- groupOffsetTree: O.reduce((z, F, N) => xt(z, F, N), $t())
770
+ groupOffsetTree: O.reduce((B, F, G) => xt(B, F, G), $t())
771
771
  };
772
772
  }
773
- return _o(a, [p, ...b]);
773
+ return _o(a, [p, ...R]);
774
774
  }, I),
775
775
  ot()
776
776
  ),
@@ -787,13 +787,13 @@ const Uo = {
787
787
  ),
788
788
  []
789
789
  );
790
- B(
790
+ z(
791
791
  v(
792
792
  u,
793
793
  V((a) => a.length > 0),
794
- D(c, R),
795
- k(([a, p, b]) => {
796
- const O = a.reduce((z, F, N) => xt(z, F, ae(F, p.offsetTree, b) || N), $t());
794
+ D(c, b),
795
+ k(([a, p, R]) => {
796
+ const O = a.reduce((B, F, G) => xt(B, F, ae(F, p.offsetTree, R) || G), $t());
797
797
  return {
798
798
  ...p,
799
799
  groupIndices: a,
@@ -802,21 +802,21 @@ const Uo = {
802
802
  })
803
803
  ),
804
804
  c
805
- ), B(
805
+ ), z(
806
806
  v(
807
807
  o,
808
808
  D(c),
809
809
  V(([a, { lastIndex: p }]) => a < p),
810
- k(([a, { lastIndex: p, lastSize: b }]) => [
810
+ k(([a, { lastIndex: p, lastSize: R }]) => [
811
811
  {
812
812
  endIndex: p,
813
- size: b,
813
+ size: R,
814
814
  startIndex: a
815
815
  }
816
816
  ])
817
817
  ),
818
818
  n
819
- ), B(f, d);
819
+ ), z(f, d);
820
820
  const S = pt(
821
821
  v(
822
822
  f,
@@ -824,59 +824,59 @@ const Uo = {
824
824
  ),
825
825
  !0
826
826
  );
827
- B(
827
+ z(
828
828
  v(
829
829
  d,
830
830
  V((a) => a !== void 0 && J(et(c).sizeTree)),
831
831
  k((a) => {
832
- const p = et(g), b = et(u).length > 0;
833
- return p !== void 0 && p !== 0 ? b ? [
832
+ const p = et(g), R = et(u).length > 0;
833
+ return p !== void 0 && p !== 0 ? R ? [
834
834
  { endIndex: 0, size: p, startIndex: 0 },
835
835
  { endIndex: 1, size: a, startIndex: 1 }
836
836
  ] : [] : [{ endIndex: 0, size: a, startIndex: 0 }];
837
837
  })
838
838
  ),
839
839
  n
840
- ), B(
840
+ ), z(
841
841
  v(
842
842
  h,
843
843
  V((a) => a !== void 0 && a.length > 0 && J(et(c).sizeTree)),
844
844
  k((a) => {
845
845
  const p = [];
846
- let b = a[0], O = 0;
847
- for (let z = 1; z < a.length; z++) {
848
- const F = a[z];
849
- F !== b && (p.push({
850
- endIndex: z - 1,
851
- size: b,
846
+ let R = a[0], O = 0;
847
+ for (let B = 1; B < a.length; B++) {
848
+ const F = a[B];
849
+ F !== R && (p.push({
850
+ endIndex: B - 1,
851
+ size: R,
852
852
  startIndex: O
853
- }), b = F, O = z);
853
+ }), R = F, O = B);
854
854
  }
855
855
  return p.push({
856
856
  endIndex: a.length - 1,
857
- size: b,
857
+ size: R,
858
858
  startIndex: O
859
859
  }), p;
860
860
  })
861
861
  ),
862
862
  n
863
- ), B(
863
+ ), z(
864
864
  v(
865
865
  u,
866
866
  D(g, d),
867
867
  V(([, a, p]) => a !== void 0 && p !== void 0),
868
- k(([a, p, b]) => {
868
+ k(([a, p, R]) => {
869
869
  const O = [];
870
- for (let z = 0; z < a.length; z++) {
871
- const F = a[z], N = a[z + 1];
870
+ for (let B = 0; B < a.length; B++) {
871
+ const F = a[B], G = a[B + 1];
872
872
  O.push({
873
873
  startIndex: F,
874
874
  endIndex: F,
875
875
  size: p
876
- }), N !== void 0 && O.push({
876
+ }), G !== void 0 && O.push({
877
877
  startIndex: F + 1,
878
- endIndex: N - 1,
879
- size: b
878
+ endIndex: G - 1,
879
+ size: R
880
880
  });
881
881
  }
882
882
  return O;
@@ -889,16 +889,16 @@ const Uo = {
889
889
  n,
890
890
  D(c),
891
891
  Et(
892
- ({ sizes: a }, [p, b]) => ({
893
- changed: b !== a,
894
- sizes: b
892
+ ({ sizes: a }, [p, R]) => ({
893
+ changed: R !== a,
894
+ sizes: R
895
895
  }),
896
896
  { changed: !1, sizes: I }
897
897
  ),
898
898
  k((a) => a.changed)
899
899
  )
900
900
  );
901
- Z(
901
+ X(
902
902
  v(
903
903
  l,
904
904
  Et(
@@ -910,13 +910,13 @@ const Uo = {
910
910
  (a) => {
911
911
  const { groupIndices: p } = et(c);
912
912
  if (a > 0)
913
- _(e, !0), _(s, a + yn(a, p));
913
+ N(e, !0), N(s, a + yn(a, p));
914
914
  else if (a < 0) {
915
- const b = et(C);
916
- b.length > 0 && (a -= yn(-a, b)), _(i, a);
915
+ const R = et(C);
916
+ R.length > 0 && (a -= yn(-a, R)), N(i, a);
917
917
  }
918
918
  }
919
- ), Z(v(l, D(t)), ([a, p]) => {
919
+ ), X(v(l, D(t)), ([a, p]) => {
920
920
  a < 0 && p(
921
921
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
922
922
  { firstItemIndex: l },
@@ -924,37 +924,37 @@ const Uo = {
924
924
  );
925
925
  });
926
926
  const L = Ct(s);
927
- B(
927
+ z(
928
928
  v(
929
929
  s,
930
930
  D(c),
931
931
  k(([a, p]) => {
932
- const b = p.groupIndices.length > 0, O = [], z = p.lastSize;
933
- if (b) {
932
+ const R = p.groupIndices.length > 0, O = [], B = p.lastSize;
933
+ if (R) {
934
934
  const F = ue(p.sizeTree, 0);
935
- let N = 0, X = 0;
936
- for (; N < a; ) {
937
- const Y = p.groupIndices[X], it = p.groupIndices.length === X + 1 ? 1 / 0 : p.groupIndices[X + 1] - Y - 1;
935
+ let G = 0, q = 0;
936
+ for (; G < a; ) {
937
+ const Z = p.groupIndices[q], it = p.groupIndices.length === q + 1 ? 1 / 0 : p.groupIndices[q + 1] - Z - 1;
938
938
  O.push({
939
- endIndex: Y,
939
+ endIndex: Z,
940
940
  size: F,
941
- startIndex: Y
941
+ startIndex: Z
942
942
  }), O.push({
943
- endIndex: Y + 1 + it - 1,
944
- size: z,
945
- startIndex: Y + 1
946
- }), X++, N += it + 1;
943
+ endIndex: Z + 1 + it - 1,
944
+ size: B,
945
+ startIndex: Z + 1
946
+ }), q++, G += it + 1;
947
947
  }
948
948
  const M = Ut(p.sizeTree);
949
- return N !== a && M.shift(), M.reduce(
950
- (Y, { k: it, v: ct }) => {
951
- let mt = Y.ranges;
952
- return Y.prevSize !== 0 && (mt = [
953
- ...Y.ranges,
949
+ return G !== a && M.shift(), M.reduce(
950
+ (Z, { k: it, v: ct }) => {
951
+ let mt = Z.ranges;
952
+ return Z.prevSize !== 0 && (mt = [
953
+ ...Z.ranges,
954
954
  {
955
955
  endIndex: it + a - 1,
956
- size: Y.prevSize,
957
- startIndex: Y.prevIndex
956
+ size: Z.prevSize,
957
+ startIndex: Z.prevIndex
958
958
  }
959
959
  ]), {
960
960
  prevIndex: it + a,
@@ -970,14 +970,14 @@ const Uo = {
970
970
  ).ranges;
971
971
  }
972
972
  return Ut(p.sizeTree).reduce(
973
- (F, { k: N, v: X }) => ({
974
- prevIndex: N + a,
975
- prevSize: X,
976
- ranges: [...F.ranges, { endIndex: N + a - 1, size: F.prevSize, startIndex: F.prevIndex }]
973
+ (F, { k: G, v: q }) => ({
974
+ prevIndex: G + a,
975
+ prevSize: q,
976
+ ranges: [...F.ranges, { endIndex: G + a - 1, size: F.prevSize, startIndex: F.prevIndex }]
977
977
  }),
978
978
  {
979
979
  prevIndex: 0,
980
- prevSize: z,
980
+ prevSize: B,
981
981
  ranges: []
982
982
  }
983
983
  ).ranges;
@@ -988,30 +988,30 @@ const Uo = {
988
988
  const P = Ct(
989
989
  v(
990
990
  i,
991
- D(c, R),
992
- k(([a, { offsetTree: p }, b]) => {
991
+ D(c, b),
992
+ k(([a, { offsetTree: p }, R]) => {
993
993
  const O = -a;
994
- return ae(O, p, b);
994
+ return ae(O, p, R);
995
995
  })
996
996
  )
997
997
  );
998
- return B(
998
+ return z(
999
999
  v(
1000
1000
  i,
1001
- D(c, R),
1002
- k(([a, p, b]) => {
1001
+ D(c, b),
1002
+ k(([a, p, R]) => {
1003
1003
  if (p.groupIndices.length > 0) {
1004
1004
  if (J(p.sizeTree))
1005
1005
  return p;
1006
1006
  let F = $t();
1007
- const N = et(C);
1008
- let X = 0, M = 0, ft = 0;
1009
- for (; X < -a; ) {
1010
- ft = N[M];
1011
- const it = N[M + 1] - ft - 1;
1012
- M++, X += it + 1;
1007
+ const G = et(C);
1008
+ let q = 0, M = 0, ft = 0;
1009
+ for (; q < -a; ) {
1010
+ ft = G[M];
1011
+ const it = G[M + 1] - ft - 1;
1012
+ M++, q += it + 1;
1013
1013
  }
1014
- if (F = Ut(p.sizeTree).reduce((it, { k: ct, v: mt }) => xt(it, Math.max(0, ct + a), mt), F), X !== -a) {
1014
+ if (F = Ut(p.sizeTree).reduce((it, { k: ct, v: mt }) => xt(it, Math.max(0, ct + a), mt), F), q !== -a) {
1015
1015
  const it = ue(p.sizeTree, ft);
1016
1016
  F = xt(F, 0, it);
1017
1017
  const ct = Ot(p.sizeTree, -a + 1)[1];
@@ -1020,14 +1020,14 @@ const Uo = {
1020
1020
  return {
1021
1021
  ...p,
1022
1022
  sizeTree: F,
1023
- ...De(p.offsetTree, 0, F, b)
1023
+ ...De(p.offsetTree, 0, F, R)
1024
1024
  };
1025
1025
  }
1026
- const z = Ut(p.sizeTree).reduce((F, { k: N, v: X }) => xt(F, Math.max(0, N + a), X), $t());
1026
+ const B = Ut(p.sizeTree).reduce((F, { k: G, v: q }) => xt(F, Math.max(0, G + a), q), $t());
1027
1027
  return {
1028
1028
  ...p,
1029
- sizeTree: z,
1030
- ...De(p.offsetTree, 0, z, b)
1029
+ sizeTree: B,
1030
+ ...De(p.offsetTree, 0, B, R)
1031
1031
  };
1032
1032
  })
1033
1033
  ),
@@ -1040,7 +1040,7 @@ const Uo = {
1040
1040
  firstItemIndex: l,
1041
1041
  fixedItemSize: f,
1042
1042
  fixedGroupSize: g,
1043
- gap: R,
1043
+ gap: b,
1044
1044
  groupIndices: u,
1045
1045
  heightEstimates: h,
1046
1046
  itemSize: m,
@@ -1060,7 +1060,7 @@ const Uo = {
1060
1060
  st(Gt, Ze),
1061
1061
  { singleton: !0 }
1062
1062
  );
1063
- function Ko(t) {
1063
+ function jo(t) {
1064
1064
  return t.reduce(
1065
1065
  (e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
1066
1066
  {
@@ -1069,9 +1069,9 @@ function Ko(t) {
1069
1069
  }
1070
1070
  );
1071
1071
  }
1072
- const to = q(
1072
+ const to = Y(
1073
1073
  ([{ groupIndices: t, resetSizes: e, sizeRanges: n, sizes: o, statefulTotalCount: r, totalCount: s, trackItemSizes: i }, { headerHeight: l, scrollTop: u }]) => {
1074
- const f = K(), d = K(), g = Ct(v(f, k(Ko))), h = pt(
1074
+ const f = j(), d = j(), g = Ct(v(f, k(jo))), h = pt(
1075
1075
  v(
1076
1076
  n,
1077
1077
  D(r, t),
@@ -1080,7 +1080,7 @@ const to = q(
1080
1080
  ),
1081
1081
  !1
1082
1082
  );
1083
- return B(
1083
+ return z(
1084
1084
  v(
1085
1085
  g,
1086
1086
  Et(([, m], x) => [m, x], [
@@ -1088,30 +1088,30 @@ const to = q(
1088
1088
  { groupIndices: [], totalCount: 0 }
1089
1089
  ]),
1090
1090
  D(o, i, h),
1091
- V(([[m, x], { sizeTree: R }, I, T]) => {
1091
+ V(([[m, x], { sizeTree: b }, I, T]) => {
1092
1092
  const c = m.groupIndices.length > 0 && m.totalCount === m.groupIndices.length, C = x.totalCount > x.groupIndices.length;
1093
- return I && !T && c && C && !J(R);
1093
+ return I && !T && c && C && !J(b);
1094
1094
  }),
1095
1095
  vt(null)
1096
1096
  ),
1097
1097
  e
1098
- ), B(
1098
+ ), z(
1099
1099
  v(
1100
1100
  g,
1101
1101
  k((m) => m.totalCount)
1102
1102
  ),
1103
1103
  s
1104
- ), B(
1104
+ ), z(
1105
1105
  v(
1106
1106
  g,
1107
1107
  k((m) => m.groupIndices)
1108
1108
  ),
1109
1109
  t
1110
- ), B(
1110
+ ), z(
1111
1111
  v(
1112
1112
  dt(u, o, l),
1113
1113
  V(([m, x]) => Oe(x)),
1114
- k(([m, x, R]) => Ot(x.groupOffsetTree, Math.max(m - R, 0), "v")[0]),
1114
+ k(([m, x, b]) => Ot(x.groupOffsetTree, Math.max(m - b, 0), "v")[0]),
1115
1115
  ot(),
1116
1116
  k((m) => [m])
1117
1117
  ),
@@ -1119,7 +1119,7 @@ const to = q(
1119
1119
  ), { groupCounts: f, topItemsIndexes: d };
1120
1120
  },
1121
1121
  st(Mt, It)
1122
- ), At = q(
1122
+ ), At = Y(
1123
1123
  ([{ log: t }]) => {
1124
1124
  const e = y(!1), n = Ct(
1125
1125
  v(
@@ -1128,18 +1128,18 @@ const to = q(
1128
1128
  ot()
1129
1129
  )
1130
1130
  );
1131
- return Z(e, (o) => {
1131
+ return X(e, (o) => {
1132
1132
  o && et(t)("props updated", {}, gt.DEBUG);
1133
1133
  }), { didMount: n, propsReady: e };
1134
1134
  },
1135
1135
  st(Gt),
1136
1136
  { singleton: !0 }
1137
- ), jo = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1137
+ ), Ko = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1138
1138
  function eo(t) {
1139
1139
  const e = typeof t == "number" ? { index: t } : { ...t };
1140
- return e.align || (e.align = "start"), (!e.behavior || !jo) && (e.behavior = "auto"), e.offset === void 0 && (e.offset = 0), e;
1140
+ return e.align || (e.align = "start"), (!e.behavior || !Ko) && (e.behavior = "auto"), e.offset === void 0 && (e.offset = 0), e;
1141
1141
  }
1142
- const he = q(
1142
+ const he = Y(
1143
1143
  ([
1144
1144
  { gap: t, listRefresh: e, sizes: n, totalCount: o },
1145
1145
  {
@@ -1154,41 +1154,41 @@ const he = q(
1154
1154
  },
1155
1155
  { log: h }
1156
1156
  ]) => {
1157
- const m = K(), x = K(), R = y(0);
1157
+ const m = j(), x = j(), b = y(0);
1158
1158
  let I = null, T = null, c = null;
1159
1159
  function C() {
1160
- I !== null && (I(), I = null), c !== null && (c(), c = null), T && (clearTimeout(T), T = null), _(u, !1);
1160
+ I !== null && (I(), I = null), c !== null && (c(), c = null), T && (clearTimeout(T), T = null), N(u, !1);
1161
1161
  }
1162
- return B(
1162
+ return z(
1163
1163
  v(
1164
1164
  m,
1165
- D(n, g, o, R, l, i, h),
1165
+ D(n, g, o, b, l, i, h),
1166
1166
  D(t, s, r),
1167
1167
  k(
1168
1168
  ([
1169
- [S, w, L, P, a, p, b, O],
1170
- z,
1169
+ [S, w, L, P, a, p, R, O],
1170
+ B,
1171
1171
  F,
1172
- N
1172
+ G
1173
1173
  ]) => {
1174
- const X = eo(S), { align: M, behavior: ft, offset: Y } = X, it = P - 1, ct = Qn(X, w, it);
1175
- let mt = ae(ct, w.offsetTree, z) + p;
1176
- M === "end" ? (mt += F + Ot(w.sizeTree, ct)[1] - L + N, ct === it && (mt += b)) : M === "center" ? mt += (F + Ot(w.sizeTree, ct)[1] - L + N) / 2 : mt -= a, Y !== void 0 && Y !== 0 && (mt += Y);
1177
- const zt = (Rt) => {
1178
- C(), Rt ? (O("retrying to scroll to", { location: S }, gt.DEBUG), _(m, S)) : (_(x, !0), O("list did not change, scroll successful", {}, gt.DEBUG));
1174
+ const q = eo(S), { align: M, behavior: ft, offset: Z } = q, it = P - 1, ct = Qn(q, w, it);
1175
+ let mt = ae(ct, w.offsetTree, B) + p;
1176
+ M === "end" ? (mt += F + Ot(w.sizeTree, ct)[1] - L + G, ct === it && (mt += R)) : M === "center" ? mt += (F + Ot(w.sizeTree, ct)[1] - L + G) / 2 : mt -= a, Z !== void 0 && Z !== 0 && (mt += Z);
1177
+ const Bt = (Rt) => {
1178
+ C(), Rt ? (O("retrying to scroll to", { location: S }, gt.DEBUG), N(m, S)) : (N(x, !0), O("list did not change, scroll successful", {}, gt.DEBUG));
1179
1179
  };
1180
1180
  if (C(), ft === "smooth") {
1181
1181
  let Rt = !1;
1182
- c = Z(e, (wt) => {
1182
+ c = X(e, (wt) => {
1183
1183
  Rt = Rt || wt;
1184
1184
  }), I = kt(d, () => {
1185
- zt(Rt);
1185
+ Bt(Rt);
1186
1186
  });
1187
1187
  } else
1188
- I = kt(v(e, qo(150)), zt);
1188
+ I = kt(v(e, qo(150)), Bt);
1189
1189
  return T = setTimeout(() => {
1190
1190
  C();
1191
- }, 1200), _(u, !0), O("scrolling from index to", { behavior: ft, index: ct, top: mt }, gt.DEBUG), { behavior: ft, top: mt };
1191
+ }, 1200), N(u, !0), O("scrolling from index to", { behavior: ft, index: ct, top: mt }, gt.DEBUG), { behavior: ft, top: mt };
1192
1192
  }
1193
1193
  )
1194
1194
  ),
@@ -1196,7 +1196,7 @@ const he = q(
1196
1196
  ), {
1197
1197
  scrollTargetReached: x,
1198
1198
  scrollToIndex: m,
1199
- topListHeight: R
1199
+ topListHeight: b
1200
1200
  };
1201
1201
  },
1202
1202
  st(Mt, It, Gt),
@@ -1226,10 +1226,10 @@ function Qe(t, e) {
1226
1226
  function $e(t) {
1227
1227
  return t === void 0 ? !0 : typeof t == "number" ? t === 0 : t.index === 0 && (t.align === void 0 || t.align === "start") && (t.offset === void 0 || t.offset === 0);
1228
1228
  }
1229
- const pe = q(
1229
+ const pe = Y(
1230
1230
  ([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
1231
1231
  const l = y(!0), u = y(0), f = y(!0);
1232
- return B(
1232
+ return z(
1233
1233
  v(
1234
1234
  i,
1235
1235
  D(u),
@@ -1237,7 +1237,7 @@ const pe = q(
1237
1237
  vt(!1)
1238
1238
  ),
1239
1239
  l
1240
- ), B(
1240
+ ), z(
1241
1241
  v(
1242
1242
  i,
1243
1243
  D(u),
@@ -1245,24 +1245,24 @@ const pe = q(
1245
1245
  vt(!1)
1246
1246
  ),
1247
1247
  f
1248
- ), Z(
1248
+ ), X(
1249
1249
  v(
1250
1250
  dt(e, i),
1251
1251
  D(l, n, t, f),
1252
- V(([[, d], g, { sizeTree: h }, m, x]) => d && (!J(h) || Ke(m)) && !g && !x),
1252
+ V(([[, d], g, { sizeTree: h }, m, x]) => d && (!J(h) || je(m)) && !g && !x),
1253
1253
  D(u)
1254
1254
  ),
1255
1255
  ([, d]) => {
1256
1256
  if (d === void 0) {
1257
- _(l, !0), _(f, !0);
1257
+ N(l, !0), N(f, !0);
1258
1258
  return;
1259
1259
  }
1260
1260
  kt(r, () => {
1261
- _(f, !0);
1261
+ N(f, !0);
1262
1262
  }), Je(4, () => {
1263
1263
  kt(o, () => {
1264
- _(l, !0);
1265
- }), _(s, d);
1264
+ N(l, !0);
1265
+ }), N(s, d);
1266
1266
  });
1267
1267
  }
1268
1268
  ), {
@@ -1286,8 +1286,8 @@ const de = "up", re = "down", Yo = "none", Zo = {
1286
1286
  scrollTop: 0,
1287
1287
  viewportHeight: 0
1288
1288
  }
1289
- }, Xo = 0, ge = q(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1290
- const i = y(!1), l = y(!0), u = K(), f = K(), d = y(4), g = y(Xo), h = pt(
1289
+ }, Xo = 0, ge = Y(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1290
+ const i = y(!1), l = y(!0), u = j(), f = j(), d = y(4), g = y(Xo), h = pt(
1291
1291
  v(
1292
1292
  be(v(W(r), qt(1), vt(!0)), v(W(r), qt(1), vt(!1), xn(100))),
1293
1293
  ot()
@@ -1297,42 +1297,42 @@ const de = "up", re = "down", Yo = "none", Zo = {
1297
1297
  v(be(v(n, vt(!0)), v(n, vt(!1), xn(200))), ot()),
1298
1298
  !1
1299
1299
  );
1300
- B(
1300
+ z(
1301
1301
  v(
1302
1302
  dt(W(r), W(g)),
1303
1303
  k(([c, C]) => c <= C),
1304
1304
  ot()
1305
1305
  ),
1306
1306
  l
1307
- ), B(v(l, Vt(50)), f);
1307
+ ), z(v(l, Vt(50)), f);
1308
1308
  const x = Ct(
1309
1309
  v(
1310
1310
  dt(o, W(s), W(e), W(t), W(d)),
1311
1311
  Et((c, [{ scrollHeight: C, scrollTop: S }, w, L, P, a]) => {
1312
- const p = S + w - C > -a, b = {
1312
+ const p = S + w - C > -a, R = {
1313
1313
  scrollHeight: C,
1314
1314
  scrollTop: S,
1315
1315
  viewportHeight: w
1316
1316
  };
1317
1317
  if (p) {
1318
- let z, F;
1319
- return S > c.state.scrollTop ? (z = "SCROLLED_DOWN", F = c.state.scrollTop - S) : (z = "SIZE_DECREASED", F = c.state.scrollTop - S || c.scrollTopDelta), {
1318
+ let B, F;
1319
+ return S > c.state.scrollTop ? (B = "SCROLLED_DOWN", F = c.state.scrollTop - S) : (B = "SIZE_DECREASED", F = c.state.scrollTop - S || c.scrollTopDelta), {
1320
1320
  atBottom: !0,
1321
- atBottomBecause: z,
1321
+ atBottomBecause: B,
1322
1322
  scrollTopDelta: F,
1323
- state: b
1323
+ state: R
1324
1324
  };
1325
1325
  }
1326
1326
  let O;
1327
- return b.scrollHeight > c.state.scrollHeight ? O = "SIZE_INCREASED" : w < c.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : S < c.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1327
+ return R.scrollHeight > c.state.scrollHeight ? O = "SIZE_INCREASED" : w < c.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : S < c.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1328
1328
  atBottom: !1,
1329
1329
  notAtBottomBecause: O,
1330
- state: b
1330
+ state: R
1331
1331
  };
1332
1332
  }, Zo),
1333
1333
  ot((c, C) => c !== void 0 && c.atBottom === C.atBottom)
1334
1334
  )
1335
- ), R = pt(
1335
+ ), b = pt(
1336
1336
  v(
1337
1337
  o,
1338
1338
  Et(
@@ -1361,19 +1361,19 @@ const de = "up", re = "down", Yo = "none", Zo = {
1361
1361
  { changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
1362
1362
  ),
1363
1363
  V((c) => c.changed),
1364
- k((c) => c.jump)
1364
+ k(({ jump: c }) => ({ jump: c }))
1365
1365
  ),
1366
- 0
1366
+ { jump: 0 }
1367
1367
  );
1368
- B(
1368
+ z(
1369
1369
  v(
1370
1370
  x,
1371
1371
  k((c) => c.atBottom)
1372
1372
  ),
1373
1373
  i
1374
- ), B(v(i, Vt(50)), u);
1374
+ ), z(v(i, Vt(50)), u);
1375
1375
  const I = y(re);
1376
- B(
1376
+ z(
1377
1377
  v(
1378
1378
  o,
1379
1379
  k(({ scrollTop: c }) => c),
@@ -1385,16 +1385,16 @@ const de = "up", re = "down", Yo = "none", Zo = {
1385
1385
  k((c) => c.direction)
1386
1386
  ),
1387
1387
  I
1388
- ), B(v(o, Vt(50), vt(Yo)), I);
1388
+ ), z(v(o, Vt(50), vt(Yo)), I);
1389
1389
  const T = y(0);
1390
- return B(
1390
+ return z(
1391
1391
  v(
1392
1392
  h,
1393
1393
  V((c) => !c),
1394
1394
  vt(0)
1395
1395
  ),
1396
1396
  T
1397
- ), B(
1397
+ ), z(
1398
1398
  v(
1399
1399
  r,
1400
1400
  Vt(100),
@@ -1413,7 +1413,7 @@ const de = "up", re = "down", Yo = "none", Zo = {
1413
1413
  isAtBottom: i,
1414
1414
  isAtTop: l,
1415
1415
  isScrolling: h,
1416
- lastJumpDueToItemResize: R,
1416
+ lastJumpDueToItemResize: b,
1417
1417
  scrollDirection: I,
1418
1418
  scrollVelocity: T
1419
1419
  };
@@ -1424,9 +1424,9 @@ function Rn(t, e, n) {
1424
1424
  function Hn(t, e) {
1425
1425
  return typeof t == "number" ? t : t[e] ?? 0;
1426
1426
  }
1427
- const tn = q(
1427
+ const tn = Y(
1428
1428
  ([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
1429
- const s = K(), i = y(0), l = y(0), u = y(0), f = pt(
1429
+ const s = j(), i = y(0), l = y(0), u = y(0), f = pt(
1430
1430
  v(
1431
1431
  dt(
1432
1432
  W(o),
@@ -1445,7 +1445,7 @@ const tn = q(
1445
1445
  g,
1446
1446
  h,
1447
1447
  [m, x],
1448
- R,
1448
+ b,
1449
1449
  I,
1450
1450
  T,
1451
1451
  c,
@@ -1455,8 +1455,8 @@ const tn = q(
1455
1455
  let P = bn;
1456
1456
  const a = Hn(C, fe), p = Hn(C, me);
1457
1457
  return m -= c, m += h + T, x += h + T, x -= c, m > d + w - a && (P = de), x < d - L + g + p && (P = re), P !== bn ? [
1458
- Math.max(S - h - Rn(R, fe, P) - a, 0),
1459
- S - L - T + g + Rn(R, me, P) + p
1458
+ Math.max(S - h - Rn(b, fe, P) - a, 0),
1459
+ S - L - T + g + Rn(b, me, P) + p
1460
1460
  ] : null;
1461
1461
  }
1462
1462
  ),
@@ -1507,8 +1507,8 @@ function ye(t, e, n, o, r, s) {
1507
1507
  let f = 0, d = 0;
1508
1508
  if (t.length > 0) {
1509
1509
  f = t[0].offset;
1510
- const R = t[t.length - 1];
1511
- d = R.offset + R.size;
1510
+ const b = t[t.length - 1];
1511
+ d = b.offset + b.size;
1512
1512
  }
1513
1513
  const g = n - i, h = l + g * u + (g - 1) * o, m = f, x = h - d;
1514
1514
  return {
@@ -1519,7 +1519,7 @@ function ye(t, e, n, o, r, s) {
1519
1519
  offsetTop: f,
1520
1520
  top: m,
1521
1521
  topItems: En(e, r, s),
1522
- topListHeight: e.reduce((R, I) => I.size + R, 0),
1522
+ topListHeight: e.reduce((b, I) => I.size + b, 0),
1523
1523
  totalCount: n
1524
1524
  };
1525
1525
  }
@@ -1568,7 +1568,7 @@ function En(t, e, n) {
1568
1568
  function kn(t, e) {
1569
1569
  return t === void 0 ? 0 : typeof t == "number" ? t : t[e] ?? 0;
1570
1570
  }
1571
- const Yt = q(
1571
+ const Yt = Y(
1572
1572
  ([
1573
1573
  { data: t, firstItemIndex: e, gap: n, sizes: o, totalCount: r },
1574
1574
  s,
@@ -1579,15 +1579,15 @@ const Yt = q(
1579
1579
  { didMount: m },
1580
1580
  { recalcInProgress: x }
1581
1581
  ]) => {
1582
- const R = y([]), I = y(0), T = pt(
1582
+ const b = y([]), I = y(0), T = pt(
1583
1583
  v(
1584
1584
  o,
1585
1585
  V(({ sizeTree: a }) => !J(a)),
1586
1586
  vt(!0)
1587
1587
  ),
1588
1588
  !1
1589
- ), c = K(), C = y(0);
1590
- B(s.topItemsIndexes, R);
1589
+ ), c = j(), C = y(0);
1590
+ z(s.topItemsIndexes, b);
1591
1591
  const S = pt(
1592
1592
  v(
1593
1593
  dt(
@@ -1598,99 +1598,99 @@ const Yt = q(
1598
1598
  W(o),
1599
1599
  W(f),
1600
1600
  d,
1601
- W(R),
1601
+ W(b),
1602
1602
  W(e),
1603
1603
  W(n),
1604
1604
  W(C),
1605
1605
  t,
1606
1606
  W(I)
1607
1607
  ),
1608
- V(([a, p, , b, , , , , , , , O]) => {
1609
- const z = O !== void 0 && O.length !== b;
1610
- return a && !p && !z;
1608
+ V(([a, p, , R, , , , , , , , O]) => {
1609
+ const B = O !== void 0 && O.length !== R;
1610
+ return a && !p && !B;
1611
1611
  }),
1612
1612
  k(
1613
1613
  ([
1614
1614
  ,
1615
1615
  ,
1616
1616
  [a, p],
1617
- b,
1617
+ R,
1618
1618
  O,
1619
- z,
1619
+ B,
1620
1620
  F,
1621
- N,
1622
- X,
1621
+ G,
1622
+ q,
1623
1623
  M,
1624
1624
  ft,
1625
- Y,
1625
+ Z,
1626
1626
  it
1627
1627
  ]) => {
1628
- const ct = O, { offsetTree: mt, sizeTree: zt } = ct;
1629
- if (b === 0)
1630
- return { ...Me, totalCount: b };
1628
+ const ct = O, { offsetTree: mt, sizeTree: Bt } = ct;
1629
+ if (R === 0)
1630
+ return { ...Me, totalCount: R };
1631
1631
  if (a === 0 && p === 0)
1632
- return it === 0 ? { ...Me, totalCount: b } : oo(it, z, O, X, M, Y);
1633
- if (J(zt))
1632
+ return it === 0 ? { ...Me, totalCount: R } : oo(it, B, O, q, M, Z);
1633
+ if (J(Bt))
1634
1634
  return it > 0 && !et(T) ? null : ye(
1635
- Jo(Qe(z, b), ct, Y, b),
1635
+ Jo(Qe(B, R), ct, Z, R),
1636
1636
  [],
1637
- b,
1637
+ R,
1638
1638
  M,
1639
1639
  ct,
1640
- X
1640
+ q
1641
1641
  );
1642
1642
  const Rt = [];
1643
- if (N.length > 0) {
1644
- const $ = N[0], j = N[N.length - 1];
1643
+ if (G.length > 0) {
1644
+ const $ = G[0], K = G[G.length - 1];
1645
1645
  let lt = 0;
1646
- for (const tt of Xt(zt, $, j)) {
1647
- const Q = tt.value, ut = Math.max(tt.start, $), St = Math.min(tt.end, j);
1646
+ for (const tt of Xt(Bt, $, K)) {
1647
+ const Q = tt.value, ut = Math.max(tt.start, $), St = Math.min(tt.end, K);
1648
1648
  for (let at = ut; at <= St; at++)
1649
- Rt.push({ data: Y?.[at], index: at, offset: lt, size: Q }), lt += Q;
1649
+ Rt.push({ data: Z?.[at], index: at, offset: lt, size: Q }), lt += Q;
1650
1650
  }
1651
1651
  }
1652
1652
  if (!F)
1653
- return ye([], Rt, b, M, ct, X);
1654
- const wt = N.length > 0 ? N[N.length - 1] + 1 : 0, Se = Ao(mt, a, p, wt);
1653
+ return ye([], Rt, R, M, ct, q);
1654
+ const wt = G.length > 0 ? G[G.length - 1] + 1 : 0, Se = Ao(mt, a, p, wt);
1655
1655
  if (Se.length === 0)
1656
1656
  return null;
1657
- const ee = b - 1, Bt = ke([], ($) => {
1658
- for (const j of Se) {
1659
- const lt = j.value;
1660
- let tt = lt.offset, Q = j.start;
1657
+ const ee = R - 1, zt = ke([], ($) => {
1658
+ for (const K of Se) {
1659
+ const lt = K.value;
1660
+ let tt = lt.offset, Q = K.start;
1661
1661
  const ut = lt.size;
1662
1662
  if (lt.offset < a) {
1663
1663
  Q += Math.floor((a - lt.offset + M) / (ut + M));
1664
- const at = Q - j.start;
1664
+ const at = Q - K.start;
1665
1665
  tt += at * ut + at * M;
1666
1666
  }
1667
1667
  Q < wt && (tt += (wt - Q) * ut, Q = wt);
1668
- const St = Math.min(j.end, ee);
1668
+ const St = Math.min(K.end, ee);
1669
1669
  for (let at = Q; at <= St && !(tt >= p); at++)
1670
- $.push({ data: Y?.[at], index: at, offset: tt, size: ut }), tt += ut + M;
1670
+ $.push({ data: Z?.[at], index: at, offset: tt, size: ut }), tt += ut + M;
1671
1671
  }
1672
1672
  }), ne = kn(ft, fe), H = kn(ft, me);
1673
- if (Bt.length > 0 && (ne > 0 || H > 0)) {
1674
- const $ = Bt[0], j = Bt[Bt.length - 1];
1673
+ if (zt.length > 0 && (ne > 0 || H > 0)) {
1674
+ const $ = zt[0], K = zt[zt.length - 1];
1675
1675
  if (ne > 0 && $.index > wt) {
1676
1676
  const lt = Math.min(ne, $.index - wt), tt = [];
1677
1677
  let Q = $.offset;
1678
1678
  for (let ut = $.index - 1; ut >= $.index - lt; ut--) {
1679
- const at = Xt(zt, ut, ut)[0]?.value ?? $.size;
1680
- Q -= at + M, tt.unshift({ data: Y?.[ut], index: ut, offset: Q, size: at });
1679
+ const at = Xt(Bt, ut, ut)[0]?.value ?? $.size;
1680
+ Q -= at + M, tt.unshift({ data: Z?.[ut], index: ut, offset: Q, size: at });
1681
1681
  }
1682
- Bt.unshift(...tt);
1682
+ zt.unshift(...tt);
1683
1683
  }
1684
- if (H > 0 && j.index < ee) {
1685
- const lt = Math.min(H, ee - j.index);
1686
- let tt = j.offset + j.size + M;
1687
- for (let Q = j.index + 1; Q <= j.index + lt; Q++) {
1688
- const St = Xt(zt, Q, Q)[0]?.value ?? j.size;
1689
- Bt.push({ data: Y?.[Q], index: Q, offset: tt, size: St }), tt += St + M;
1684
+ if (H > 0 && K.index < ee) {
1685
+ const lt = Math.min(H, ee - K.index);
1686
+ let tt = K.offset + K.size + M;
1687
+ for (let Q = K.index + 1; Q <= K.index + lt; Q++) {
1688
+ const St = Xt(Bt, Q, Q)[0]?.value ?? K.size;
1689
+ zt.push({ data: Z?.[Q], index: Q, offset: tt, size: St }), tt += St + M;
1690
1690
  }
1691
1691
  }
1692
1692
  }
1693
- return ye(Bt, Rt, b, M, ct, X);
1693
+ return ye(zt, Rt, R, M, ct, q);
1694
1694
  }
1695
1695
  ),
1696
1696
  //@ts-expect-error filter needs to be fixed
@@ -1699,26 +1699,26 @@ const Yt = q(
1699
1699
  ),
1700
1700
  Me
1701
1701
  );
1702
- B(
1702
+ z(
1703
1703
  v(
1704
1704
  t,
1705
- V(Ke),
1705
+ V(je),
1706
1706
  k((a) => a?.length)
1707
1707
  ),
1708
1708
  r
1709
- ), B(
1709
+ ), z(
1710
1710
  v(
1711
1711
  S,
1712
1712
  k((a) => a.topListHeight)
1713
1713
  ),
1714
1714
  g
1715
- ), B(g, l), B(
1715
+ ), z(g, l), z(
1716
1716
  v(
1717
1717
  S,
1718
1718
  k((a) => [a.top, a.bottom])
1719
1719
  ),
1720
1720
  i
1721
- ), B(
1721
+ ), z(
1722
1722
  v(
1723
1723
  S,
1724
1724
  k((a) => a.items)
@@ -1731,9 +1731,9 @@ const Yt = q(
1731
1731
  V(({ items: a }) => a.length > 0),
1732
1732
  D(r, t),
1733
1733
  V(([{ items: a }, p]) => a[a.length - 1].originalIndex === p - 1),
1734
- k(([{ items: a }, p, b]) => {
1735
- const O = a[a.length - 1], z = O.type === "group" ? O.index + 1 : (O.groupIndex ?? -1) + 1;
1736
- return [p - 1 - z, b];
1734
+ k(([{ items: a }, p, R]) => {
1735
+ const O = a[a.length - 1], B = O.type === "group" ? O.index + 1 : (O.groupIndex ?? -1) + 1;
1736
+ return [p - 1 - B, R];
1737
1737
  }),
1738
1738
  ot(Jt),
1739
1739
  // when every group is empty, only headers render and there is no item index to report.
@@ -1755,13 +1755,13 @@ const Yt = q(
1755
1755
  V(({ items: a }) => a.length > 0),
1756
1756
  // oxlint-disable-next-line array-callback-return -- callback always returns after trimming group sentinels
1757
1757
  k(({ items: a }) => {
1758
- let p = 0, b = a.length - 1;
1759
- for (; a[p].type === "group" && p < b; )
1758
+ let p = 0, R = a.length - 1;
1759
+ for (; a[p].type === "group" && p < R; )
1760
1760
  p++;
1761
- for (; a[b].type === "group" && b > p; )
1762
- b--;
1761
+ for (; a[R].type === "group" && R > p; )
1762
+ R--;
1763
1763
  return {
1764
- endIndex: a[b].index,
1764
+ endIndex: a[R].index,
1765
1765
  startIndex: a[p].index
1766
1766
  };
1767
1767
  }),
@@ -1776,7 +1776,7 @@ const Yt = q(
1776
1776
  minOverscanItemCount: C,
1777
1777
  rangeChanged: P,
1778
1778
  startReached: L,
1779
- topItemsIndexes: R,
1779
+ topItemsIndexes: b,
1780
1780
  ...h
1781
1781
  };
1782
1782
  },
@@ -1791,20 +1791,20 @@ const Yt = q(
1791
1791
  Ze
1792
1792
  ),
1793
1793
  { singleton: !0 }
1794
- ), ro = q(
1794
+ ), ro = Y(
1795
1795
  ([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
1796
- const s = K(), i = pt(
1796
+ const s = j(), i = pt(
1797
1797
  v(
1798
1798
  dt(n, t, o, e, r),
1799
1799
  k(([l, u, f, d, g]) => l + u + f + d + g.offsetBottom + g.bottom)
1800
1800
  ),
1801
1801
  0
1802
1802
  );
1803
- return B(W(i), s), { totalListHeight: i, totalListHeightChanged: s };
1803
+ return z(W(i), s), { totalListHeight: i, totalListHeightChanged: s };
1804
1804
  },
1805
1805
  st(It, Yt),
1806
1806
  { singleton: !0 }
1807
- ), Qo = q(
1807
+ ), Qo = Y(
1808
1808
  ([{ viewportHeight: t }, { totalListHeight: e }]) => {
1809
1809
  const n = y(!1), o = pt(
1810
1810
  v(
@@ -1820,7 +1820,7 @@ const Yt = q(
1820
1820
  },
1821
1821
  st(It, ro),
1822
1822
  { singleton: !0 }
1823
- ), so = q(() => ({
1823
+ ), so = Y(() => ({
1824
1824
  context: y(null)
1825
1825
  })), tr = ({
1826
1826
  itemBottom: t,
@@ -1828,27 +1828,27 @@ const Yt = q(
1828
1828
  locationParams: { align: n, behavior: o, ...r },
1829
1829
  viewportBottom: s,
1830
1830
  viewportTop: i
1831
- }) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null, io = q(
1831
+ }) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null, io = Y(
1832
1832
  ([
1833
1833
  { gap: t, sizes: e, totalCount: n },
1834
1834
  { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: u },
1835
1835
  { scrollToIndex: f }
1836
1836
  ]) => {
1837
- const d = K();
1838
- return B(
1837
+ const d = j();
1838
+ return z(
1839
1839
  v(
1840
1840
  d,
1841
1841
  D(e, u, n, s, r, o, l),
1842
1842
  D(t),
1843
- k(([[g, h, m, x, R, I, T, c], C]) => {
1844
- const { calculateViewLocation: S = tr, done: w, ...L } = g, P = Qn(g, h, x - 1), a = ae(P, h.offsetTree, C) + R + I, p = a + Ot(h.sizeTree, P)[1], b = c + I, O = c + m - T, z = S({
1843
+ k(([[g, h, m, x, b, I, T, c], C]) => {
1844
+ const { calculateViewLocation: S = tr, done: w, ...L } = g, P = Qn(g, h, x - 1), a = ae(P, h.offsetTree, C) + b + I, p = a + Ot(h.sizeTree, P)[1], R = c + I, O = c + m - T, B = S({
1845
1845
  itemBottom: p,
1846
1846
  itemTop: a,
1847
1847
  locationParams: L,
1848
1848
  viewportBottom: O,
1849
- viewportTop: b
1849
+ viewportTop: R
1850
1850
  });
1851
- return z === null ? w?.() : w && kt(
1851
+ return B === null ? w?.() : w && kt(
1852
1852
  v(
1853
1853
  i,
1854
1854
  V((F) => !F),
@@ -1857,7 +1857,7 @@ const Yt = q(
1857
1857
  qt(et(i) ? 1 : 2)
1858
1858
  ),
1859
1859
  w
1860
- ), z;
1860
+ ), B;
1861
1861
  }),
1862
1862
  V((g) => g !== null)
1863
1863
  ),
@@ -1872,7 +1872,7 @@ const Yt = q(
1872
1872
  function Ln(t) {
1873
1873
  return t === !1 ? !1 : t === "smooth" ? "smooth" : "auto";
1874
1874
  }
1875
- const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
1875
+ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = Y(
1876
1876
  ([
1877
1877
  { listRefresh: t, totalCount: e, fixedItemSize: n, data: o },
1878
1878
  { atBottomState: r, isAtBottom: s },
@@ -1884,22 +1884,22 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
1884
1884
  { context: h },
1885
1885
  { scrollIntoView: m }
1886
1886
  ]) => {
1887
- const x = y(!1), R = K();
1887
+ const x = y(!1), b = j();
1888
1888
  let I = null;
1889
1889
  function T(w) {
1890
- _(i, {
1890
+ N(i, {
1891
1891
  align: "end",
1892
1892
  behavior: w,
1893
1893
  index: "LAST"
1894
1894
  });
1895
1895
  }
1896
- Z(
1896
+ X(
1897
1897
  v(
1898
1898
  dt(v(W(e), qt(1)), u),
1899
1899
  D(W(x), s, l, g),
1900
- k(([[w, L], P, a, p, b]) => {
1901
- let O = L && p, z = "auto";
1902
- return O && (z = er(P, a || b), O = O && z !== !1), { followOutputBehavior: z, shouldFollow: O, totalCount: w };
1900
+ k(([[w, L], P, a, p, R]) => {
1901
+ let O = L && p, B = "auto";
1902
+ return O && (B = er(P, a || R), O = O && B !== !1), { followOutputBehavior: B, shouldFollow: O, totalCount: w };
1903
1903
  }),
1904
1904
  V(({ shouldFollow: w }) => w)
1905
1905
  ),
@@ -1917,7 +1917,7 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
1917
1917
  });
1918
1918
  setTimeout(L, 100);
1919
1919
  }
1920
- Z(
1920
+ X(
1921
1921
  v(
1922
1922
  dt(W(x), e, f),
1923
1923
  V(([w, , L]) => w !== !1 && L),
@@ -1931,13 +1931,13 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
1931
1931
  ([, w]) => {
1932
1932
  et(l) && c(w !== !1);
1933
1933
  }
1934
- ), Z(R, () => {
1934
+ ), X(b, () => {
1935
1935
  c(et(x) !== !1);
1936
- }), Z(dt(W(x), r), ([w, L]) => {
1936
+ }), X(dt(W(x), r), ([w, L]) => {
1937
1937
  w !== !1 && !L.atBottom && L.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && T("auto");
1938
1938
  });
1939
- const C = y(null), S = K();
1940
- return B(
1939
+ const C = y(null), S = j();
1940
+ return z(
1941
1941
  be(
1942
1942
  v(
1943
1943
  W(o),
@@ -1946,22 +1946,22 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
1946
1946
  v(W(e))
1947
1947
  ),
1948
1948
  S
1949
- ), Z(
1949
+ ), X(
1950
1950
  v(
1951
1951
  dt(v(S, qt(1)), u),
1952
1952
  D(W(C), l, g, h),
1953
- k(([[w, L], P, a, p, b]) => L && a && P?.({ context: b, totalCount: w, scrollingInProgress: p })),
1953
+ k(([[w, L], P, a, p, R]) => L && a && P?.({ context: R, totalCount: w, scrollingInProgress: p })),
1954
1954
  V((w) => !!w),
1955
1955
  Vt(0)
1956
1956
  ),
1957
1957
  (w) => {
1958
1958
  I !== null && (I(), I = null), et(n) === void 0 ? I = kt(t, () => {
1959
- et(d)("scrolling into view", {}), _(m, w), I = null;
1959
+ et(d)("scrolling into view", {}), N(m, w), I = null;
1960
1960
  }) : requestAnimationFrame(() => {
1961
- et(d)("scrolling into view", {}), _(m, w);
1961
+ et(d)("scrolling into view", {}), N(m, w);
1962
1962
  });
1963
1963
  }
1964
- ), { autoscrollToBottom: R, followOutput: x, scrollIntoViewOnChange: C };
1964
+ ), { autoscrollToBottom: b, followOutput: x, scrollIntoViewOnChange: C };
1965
1965
  },
1966
1966
  st(
1967
1967
  Mt,
@@ -1974,8 +1974,8 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
1974
1974
  so,
1975
1975
  io
1976
1976
  )
1977
- ), or = q(
1978
- ([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (B(
1977
+ ), or = Y(
1978
+ ([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (z(
1979
1979
  v(
1980
1980
  l,
1981
1981
  D(s),
@@ -1987,10 +1987,10 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
1987
1987
  ), {}),
1988
1988
  st(Mt, pe, Yt, At),
1989
1989
  { singleton: !0 }
1990
- ), rr = q(
1990
+ ), rr = Y(
1991
1991
  ([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
1992
1992
  const o = y(0);
1993
- return Z(
1993
+ return X(
1994
1994
  v(
1995
1995
  t,
1996
1996
  D(o),
@@ -2006,7 +2006,7 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2006
2006
  ),
2007
2007
  () => {
2008
2008
  requestAnimationFrame(() => {
2009
- _(e, r);
2009
+ N(e, r);
2010
2010
  });
2011
2011
  }
2012
2012
  );
@@ -2017,10 +2017,10 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2017
2017
  },
2018
2018
  st(At, It, Yt),
2019
2019
  { singleton: !0 }
2020
- ), lo = q(
2020
+ ), lo = Y(
2021
2021
  ([{ scrollVelocity: t }]) => {
2022
- const e = y(!1), n = K(), o = y(!1);
2023
- return B(
2022
+ const e = y(!1), n = j(), o = y(!1);
2023
+ return z(
2024
2024
  v(
2025
2025
  t,
2026
2026
  D(o, e, n),
@@ -2037,7 +2037,7 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2037
2037
  ot()
2038
2038
  ),
2039
2039
  e
2040
- ), Z(
2040
+ ), X(
2041
2041
  v(dt(e, t, n), D(o)),
2042
2042
  ([[r, s, i], l]) => {
2043
2043
  r && l !== !1 && l !== void 0 && l.change && l.change(s, i);
@@ -2046,15 +2046,15 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2046
2046
  },
2047
2047
  st(ge),
2048
2048
  { singleton: !0 }
2049
- ), en = q(([{ scrollBy: t, scrollContainerState: e, scrollTo: n }]) => {
2050
- const o = K(), r = K(), s = K(), i = K(), l = y(!1), u = y(void 0), f = pt(
2049
+ ), en = Y(([{ scrollBy: t, scrollContainerState: e, scrollTo: n }]) => {
2050
+ const o = j(), r = j(), s = j(), i = j(), l = y(!1), u = y(void 0), f = pt(
2051
2051
  v(
2052
2052
  r,
2053
2053
  k(({ zoomRatio: d }) => d ?? 1)
2054
2054
  ),
2055
2055
  1
2056
2056
  );
2057
- return B(
2057
+ return z(
2058
2058
  v(
2059
2059
  dt(o, r),
2060
2060
  k(([{ scrollTop: d, viewportHeight: g }, { listHeight: h, offsetTop: m, zoomRatio: x = 1 }]) => ({
@@ -2064,7 +2064,7 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2064
2064
  }))
2065
2065
  ),
2066
2066
  e
2067
- ), B(
2067
+ ), z(
2068
2068
  v(
2069
2069
  n,
2070
2070
  D(r),
@@ -2074,7 +2074,7 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2074
2074
  }))
2075
2075
  ),
2076
2076
  s
2077
- ), B(
2077
+ ), z(
2078
2078
  v(
2079
2079
  t,
2080
2080
  D(f),
@@ -2094,7 +2094,7 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2094
2094
  windowScrollTo: s,
2095
2095
  windowViewportRect: r
2096
2096
  };
2097
- }, st(It)), sr = q(
2097
+ }, st(It)), sr = Y(
2098
2098
  ([
2099
2099
  { sizeRanges: t, sizes: e },
2100
2100
  { headerHeight: n, scrollTop: o },
@@ -2102,17 +2102,17 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2102
2102
  { didMount: s },
2103
2103
  { useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: u }
2104
2104
  ]) => {
2105
- const f = K(), d = y(void 0), g = y(null), h = y(null);
2106
- return B(l, g), B(u, h), Z(
2105
+ const f = j(), d = y(void 0), g = y(null), h = y(null);
2106
+ return z(l, g), z(u, h), X(
2107
2107
  v(
2108
2108
  f,
2109
2109
  D(e, o, i, g, h, n)
2110
2110
  ),
2111
- ([m, x, R, I, T, c, C]) => {
2111
+ ([m, x, b, I, T, c, C]) => {
2112
2112
  const S = No(x.sizeTree);
2113
- I && T !== null && c !== null && (R = Ht(T.scrollTop - c.offsetTop, c.zoomRatio ?? 1)), R -= C, m({ ranges: S, scrollTop: R });
2113
+ I && T !== null && c !== null && (b = Ht(T.scrollTop - c.offsetTop, c.zoomRatio ?? 1)), b -= C, m({ ranges: S, scrollTop: b });
2114
2114
  }
2115
- ), B(v(d, V(Ke), k(ir)), r), B(
2115
+ ), z(v(d, V(je), k(ir)), r), z(
2116
2116
  v(
2117
2117
  s,
2118
2118
  D(d),
@@ -2131,9 +2131,9 @@ const er = (t, e) => typeof t == "function" ? Ln(t(e)) : e && Ln(t), nr = q(
2131
2131
  function ir(t) {
2132
2132
  return { align: "start", index: 0, offset: t.scrollTop };
2133
2133
  }
2134
- const lr = q(([{ topItemsIndexes: t }]) => {
2134
+ const lr = Y(([{ topItemsIndexes: t }]) => {
2135
2135
  const e = y(0);
2136
- return B(
2136
+ return z(
2137
2137
  v(
2138
2138
  e,
2139
2139
  V((n) => n >= 0),
@@ -2146,47 +2146,47 @@ function co(t) {
2146
2146
  let e = !1, n;
2147
2147
  return (() => (e || (e = !0, n = t()), n));
2148
2148
  }
2149
- const cr = co(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), ur = q(
2149
+ const cr = co(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), ur = Y(
2150
2150
  ([
2151
2151
  { deviation: t, deviationCommitted: e, scrollBy: n, scrollingInProgress: o, scrollTop: r },
2152
2152
  { isAtBottom: s, isScrolling: i, lastJumpDueToItemResize: l, scrollDirection: u },
2153
2153
  { listState: f },
2154
2154
  { beforeUnshiftWith: d, gap: g, shiftWithOffset: h, sizes: m },
2155
2155
  { log: x },
2156
- { recalcInProgress: R }
2156
+ { recalcInProgress: b }
2157
2157
  ]) => {
2158
2158
  const I = Ct(
2159
2159
  v(
2160
2160
  f,
2161
2161
  D(l),
2162
2162
  Et(
2163
- ([, S, w, L], [{ bottom: P, items: a, offsetBottom: p, totalCount: b }, O]) => {
2164
- const z = P + p;
2165
- let F = 0;
2166
- return w === b && S.length > 0 && a.length > 0 && (a[0].originalIndex === 0 && S[0].originalIndex === 0 || (F = z - L, F !== 0 && (F += O))), [F, a, b, z];
2163
+ ([, S, w, L, P], [{ bottom: a, items: p, offsetBottom: R, totalCount: O }, B]) => {
2164
+ const F = a + R;
2165
+ let G = 0, q = P;
2166
+ return w === O && S.length > 0 && p.length > 0 && (p[0].originalIndex === 0 && S[0].originalIndex === 0 || (G = F - L, G !== 0 && B !== q && (G += B.jump, q = B))), [G, p, O, F, q];
2167
2167
  },
2168
- [0, [], 0, 0]
2168
+ [0, [], 0, 0, void 0]
2169
2169
  ),
2170
2170
  V(([S]) => S !== 0),
2171
- D(r, u, o, s, x, R),
2171
+ D(r, u, o, s, x, b),
2172
2172
  V(([, S, w, L, , , P]) => !P && !L && S !== 0 && w === de),
2173
2173
  k(([[S], , , , , w]) => (w("Upward scrolling compensation", { amount: S }, gt.DEBUG), S))
2174
2174
  )
2175
2175
  );
2176
2176
  function T(S) {
2177
- S > 0 ? (_(n, { behavior: "auto", top: -S }), _(t, 0)) : (_(t, 0), _(n, { behavior: "auto", top: -S }));
2177
+ S > 0 ? (N(n, { behavior: "auto", top: -S }), N(t, 0)) : (N(t, 0), N(n, { behavior: "auto", top: -S }));
2178
2178
  }
2179
- Z(v(I, D(t, i)), ([S, w, L]) => {
2180
- L && cr() ? _(t, w - S) : T(-S);
2181
- }), Z(
2179
+ X(v(I, D(t, i)), ([S, w, L]) => {
2180
+ L && cr() ? N(t, w - S) : T(-S);
2181
+ }), X(
2182
2182
  v(
2183
- dt(pt(i, !1), t, R),
2183
+ dt(pt(i, !1), t, b),
2184
2184
  V(([S, w, L]) => !S && !L && w !== 0),
2185
2185
  k(([S, w]) => w),
2186
2186
  Vt(1)
2187
2187
  ),
2188
2188
  T
2189
- ), B(
2189
+ ), z(
2190
2190
  v(
2191
2191
  h,
2192
2192
  k((S) => ({ top: -S }))
@@ -2198,40 +2198,40 @@ const cr = co(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2198
2198
  if (c === null)
2199
2199
  return;
2200
2200
  const { offset: S } = c;
2201
- c = null, _(n, { top: S }), requestAnimationFrame(() => {
2202
- _(t, 0), _(R, !1);
2201
+ c = null, N(n, { top: S }), requestAnimationFrame(() => {
2202
+ N(t, 0), N(b, !1);
2203
2203
  });
2204
2204
  }
2205
- return Z(e, (S) => {
2205
+ return X(e, (S) => {
2206
2206
  c === null || !c.acknowledgeable || S === c.offset && C();
2207
- }), Z(
2207
+ }), X(
2208
2208
  v(
2209
2209
  d,
2210
2210
  D(m, g),
2211
2211
  k(([S, { groupIndices: w, lastSize: L, sizeTree: P }, a]) => {
2212
- function p(N) {
2213
- return N * (L + a);
2212
+ function p(G) {
2213
+ return G * (L + a);
2214
2214
  }
2215
2215
  if (w.length === 0)
2216
2216
  return p(S);
2217
- let b = 0;
2217
+ let R = 0;
2218
2218
  const O = ue(P, 0);
2219
- let z = 0, F = 0;
2220
- for (; z < S; ) {
2221
- z++, b += O;
2222
- let N = w.length === F + 1 ? 1 / 0 : w[F + 1] - w[F] - 1;
2223
- z + N > S && (b -= O, N = S - z + 1), z += N, b += p(N), F++;
2219
+ let B = 0, F = 0;
2220
+ for (; B < S; ) {
2221
+ B++, R += O;
2222
+ let G = w.length === F + 1 ? 1 / 0 : w[F + 1] - w[F] - 1;
2223
+ B + G > S && (R -= O, G = S - B + 1), B += G, R += p(G), F++;
2224
2224
  }
2225
- return b;
2225
+ return R;
2226
2226
  })
2227
2227
  ),
2228
2228
  (S) => {
2229
- c = { acknowledgeable: et(t) !== S, offset: S }, _(t, S), requestAnimationFrame(C);
2229
+ c = { acknowledgeable: et(t) !== S, offset: S }, N(t, S), requestAnimationFrame(C);
2230
2230
  }
2231
2231
  ), { deviation: t };
2232
2232
  },
2233
2233
  st(It, ge, Yt, Mt, Gt, Ze)
2234
- ), ar = q(
2234
+ ), ar = Y(
2235
2235
  ([
2236
2236
  t,
2237
2237
  e,
@@ -2270,7 +2270,7 @@ const cr = co(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2270
2270
  Gt,
2271
2271
  so
2272
2272
  )
2273
- ), uo = q(
2273
+ ), uo = Y(
2274
2274
  ([
2275
2275
  {
2276
2276
  data: t,
@@ -2288,7 +2288,7 @@ const cr = co(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2288
2288
  totalCount: h,
2289
2289
  trackItemSizes: m
2290
2290
  },
2291
- { initialItemFinalLocationReached: x, initialTopMostItemIndex: R, scrolledToInitialItem: I },
2291
+ { initialItemFinalLocationReached: x, initialTopMostItemIndex: b, scrolledToInitialItem: I },
2292
2292
  T,
2293
2293
  c,
2294
2294
  C,
@@ -2299,13 +2299,13 @@ const cr = co(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2299
2299
  { groupCounts: a },
2300
2300
  p
2301
2301
  ]) => {
2302
- const { listState: b, minOverscanItemCount: O, topItemsIndexes: z, rangeChanged: F, ...N } = S;
2303
- return B(F, p.scrollSeekRangeChanged), B(
2302
+ const { listState: R, minOverscanItemCount: O, topItemsIndexes: B, rangeChanged: F, ...G } = S;
2303
+ return z(F, p.scrollSeekRangeChanged), z(
2304
2304
  v(
2305
2305
  dt(p.windowViewportRect, T.headerHeight, T.fixedHeaderHeight),
2306
2306
  // Keep a measurement range active when a window-scrolling list starts below the viewport.
2307
2307
  // One content pixel beyond the headers is enough to render the probe item and estimate the full list height.
2308
- k(([X, M, ft]) => Math.max(M + ft + 1, X.visibleHeight))
2308
+ k(([q, M, ft]) => Math.max(M + ft + 1, q.visibleHeight))
2309
2309
  ),
2310
2310
  T.viewportHeight
2311
2311
  ), {
@@ -2318,17 +2318,17 @@ const cr = co(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2318
2318
  groupCounts: a,
2319
2319
  heightEstimates: l,
2320
2320
  initialItemFinalLocationReached: x,
2321
- initialTopMostItemIndex: R,
2321
+ initialTopMostItemIndex: b,
2322
2322
  scrolledToInitialItem: I,
2323
2323
  sizeRanges: f,
2324
2324
  topItemCount: P,
2325
- topItemsIndexes: z,
2325
+ topItemsIndexes: B,
2326
2326
  // input
2327
2327
  totalCount: h,
2328
2328
  ...C,
2329
2329
  groupIndices: i,
2330
2330
  itemSize: u,
2331
- listState: b,
2331
+ listState: R,
2332
2332
  minOverscanItemCount: O,
2333
2333
  scrollToIndex: w,
2334
2334
  // output
@@ -2336,7 +2336,7 @@ const cr = co(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2336
2336
  trackItemSizes: m,
2337
2337
  // exported from stateFlagsSystem
2338
2338
  rangeChanged: F,
2339
- ...N,
2339
+ ...G,
2340
2340
  // the bag of IO from featureGroup1System
2341
2341
  ...p,
2342
2342
  ...T,
@@ -2372,22 +2372,22 @@ const Te = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2372
2372
  function nn(t, e, n) {
2373
2373
  const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
2374
2374
  function u(T, c) {
2375
- T.propsReady !== void 0 && _(T.propsReady, !1);
2375
+ T.propsReady !== void 0 && N(T.propsReady, !1);
2376
2376
  for (const C of o) {
2377
2377
  const S = T[e.required[C]];
2378
- _(S, c[C]);
2378
+ N(S, c[C]);
2379
2379
  }
2380
2380
  for (const C of r)
2381
2381
  if (C in c) {
2382
2382
  const S = T[e.optional[C]];
2383
- _(S, c[C]);
2383
+ N(S, c[C]);
2384
2384
  }
2385
- T.propsReady !== void 0 && _(T.propsReady, !0);
2385
+ T.propsReady !== void 0 && N(T.propsReady, !0);
2386
2386
  }
2387
2387
  function f(T) {
2388
2388
  return s.reduce((c, C) => (c[C] = (S) => {
2389
2389
  const w = T[e.methods[C]];
2390
- _(w, S);
2390
+ N(w, S);
2391
2391
  }, c), {});
2392
2392
  }
2393
2393
  function d(T) {
@@ -2399,26 +2399,26 @@ function nn(t, e, n) {
2399
2399
  })), [P] = E.useState(Sn(d, L));
2400
2400
  Te(() => {
2401
2401
  for (const p of i)
2402
- p in w && Z(P[p], w[p]);
2402
+ p in w && X(P[p], w[p]);
2403
2403
  return () => {
2404
- Object.values(P).map(je);
2404
+ Object.values(P).map(Ke);
2405
2405
  };
2406
2406
  }, [w, P, L]), Te(() => {
2407
2407
  u(L, w);
2408
2408
  }), E.useImperativeHandle(C, In(f(L)));
2409
2409
  const a = n;
2410
- return /* @__PURE__ */ G(l.Provider, { value: L, children: n === void 0 ? S : /* @__PURE__ */ G(a, { ...dr([...o, ...r, ...i], w), children: S }) });
2410
+ return /* @__PURE__ */ A(l.Provider, { value: L, children: n === void 0 ? S : /* @__PURE__ */ A(a, { ...dr([...o, ...r, ...i], w), children: S }) });
2411
2411
  }), h = (T) => {
2412
2412
  const c = E.useContext(l);
2413
2413
  return E.useCallback(
2414
2414
  (C) => {
2415
- _(c[T], C);
2415
+ N(c[T], C);
2416
2416
  },
2417
2417
  [c, T]
2418
2418
  );
2419
2419
  }, m = (T) => {
2420
2420
  const C = E.useContext(l)[T], S = E.useCallback(
2421
- (w) => Z(C, w),
2421
+ (w) => X(C, w),
2422
2422
  [C]
2423
2423
  );
2424
2424
  return E.useSyncExternalStore(
@@ -2429,19 +2429,19 @@ function nn(t, e, n) {
2429
2429
  }, x = (T) => {
2430
2430
  const C = E.useContext(l)[T], [S, w] = E.useState(Sn(et, C));
2431
2431
  return Te(
2432
- () => Z(C, (L) => {
2432
+ () => X(C, (L) => {
2433
2433
  L !== S && w(In(L));
2434
2434
  }),
2435
2435
  [C, S]
2436
2436
  ), S;
2437
- }, R = parseInt(E.version, 10) >= 18 ? m : x;
2437
+ }, b = parseInt(E.version, 10) >= 18 ? m : x;
2438
2438
  return {
2439
2439
  Component: g,
2440
2440
  useEmitter: (T, c) => {
2441
2441
  const S = E.useContext(l)[T];
2442
- Te(() => Z(S, c), [c, S]);
2442
+ Te(() => X(S, c), [c, S]);
2443
2443
  },
2444
- useEmitterValue: R,
2444
+ useEmitterValue: b,
2445
2445
  usePublisher: h
2446
2446
  };
2447
2447
  }
@@ -2460,21 +2460,21 @@ function fr(t) {
2460
2460
  function fo(t, e, n, o = te, r, s) {
2461
2461
  const i = E.useRef(null), l = E.useRef(null), u = E.useRef(null), f = E.useCallback(
2462
2462
  (h) => {
2463
- let m, x, R;
2463
+ let m, x, b;
2464
2464
  const I = h.target;
2465
2465
  if (fr(I) || We(I)) {
2466
2466
  const c = We(I) ? I : I.defaultView;
2467
- R = s === !0 ? Dt(c, c.scrollX) : c.scrollY, m = s === !0 ? c.document.documentElement.scrollWidth : c.document.documentElement.scrollHeight, x = s === !0 ? c.innerWidth : c.innerHeight;
2467
+ b = s === !0 ? Dt(c, c.scrollX) : c.scrollY, m = s === !0 ? c.document.documentElement.scrollWidth : c.document.documentElement.scrollHeight, x = s === !0 ? c.innerWidth : c.innerHeight;
2468
2468
  } else
2469
- R = s === !0 ? Dt(I, I.scrollLeft) : I.scrollTop, m = s === !0 ? I.scrollWidth : I.scrollHeight, x = s === !0 ? I.offsetWidth : I.offsetHeight;
2469
+ b = s === !0 ? Dt(I, I.scrollLeft) : I.scrollTop, m = s === !0 ? I.scrollWidth : I.scrollHeight, x = s === !0 ? I.offsetWidth : I.offsetHeight;
2470
2470
  const T = () => {
2471
2471
  t({
2472
2472
  scrollHeight: m,
2473
- scrollTop: Math.max(R, 0),
2473
+ scrollTop: Math.max(b, 0),
2474
2474
  viewportHeight: x
2475
2475
  });
2476
2476
  };
2477
- h.suppressFlushSync === !0 ? T() : To.flushSync(T), l.current !== null && (Math.abs(R - l.current) < 1 || R <= 0 || R === m - x) && (l.current = null, e(!0), u.current && (clearTimeout(u.current), u.current = null));
2477
+ h.suppressFlushSync === !0 ? T() : To.flushSync(T), l.current !== null && (Math.abs(b - l.current) < 1 || b <= 0 || b === m - x) && (l.current = null, e(!0), u.current && (clearTimeout(u.current), u.current = null));
2478
2478
  },
2479
2479
  [t, e, s]
2480
2480
  );
@@ -2489,19 +2489,19 @@ function fo(t, e, n, o = te, r, s) {
2489
2489
  if (!m || (s === !0 ? "offsetWidth" in m && m.offsetWidth === 0 : "offsetHeight" in m && m.offsetHeight === 0))
2490
2490
  return;
2491
2491
  const x = h.behavior === "smooth";
2492
- let R, I, T;
2492
+ let b, I, T;
2493
2493
  We(m) ? (I = Math.max(
2494
2494
  Lt(m.document.documentElement, s === !0 ? "width" : "height"),
2495
2495
  s === !0 ? m.document.documentElement.scrollWidth : m.document.documentElement.scrollHeight
2496
- ), R = s === !0 ? m.innerWidth : m.innerHeight, T = s === !0 ? Dt(m, m.scrollX) : m.scrollY) : (I = m[s === !0 ? "scrollWidth" : "scrollHeight"], R = Lt(m, s === !0 ? "width" : "height", m), T = s === !0 ? Dt(m, m.scrollLeft) : m.scrollTop);
2497
- const c = I - R;
2496
+ ), b = s === !0 ? m.innerWidth : m.innerHeight, T = s === !0 ? Dt(m, m.scrollX) : m.scrollY) : (I = m[s === !0 ? "scrollWidth" : "scrollHeight"], b = Lt(m, s === !0 ? "width" : "height", m), T = s === !0 ? Dt(m, m.scrollLeft) : m.scrollTop);
2497
+ const c = I - b;
2498
2498
  if (h.top === void 0) {
2499
2499
  m.scrollTo(h);
2500
2500
  return;
2501
2501
  }
2502
2502
  const C = Math.ceil(Math.max(Math.min(c, h.top), 0));
2503
- if (h.top = C, no(R, I) || C === T) {
2504
- t({ scrollHeight: I, scrollTop: T, viewportHeight: R }), x && e(!0);
2503
+ if (h.top = C, no(b, I) || C === T) {
2504
+ t({ scrollHeight: I, scrollTop: T, viewportHeight: b }), x && e(!0);
2505
2505
  return;
2506
2506
  }
2507
2507
  x ? (l.current = C, u.current && clearTimeout(u.current), u.current = setTimeout(() => {
@@ -2524,7 +2524,7 @@ function fo(t, e, n, o = te, r, s) {
2524
2524
  function rn(t) {
2525
2525
  return t;
2526
2526
  }
2527
- const mr = /* @__PURE__ */ q(() => {
2527
+ const mr = /* @__PURE__ */ Y(() => {
2528
2528
  const t = y((l) => `Item ${l}`), e = y((l) => `Group ${l}`), n = y({}), o = y(rn), r = y("div"), s = y(te), i = (l, u = null) => pt(
2529
2529
  v(
2530
2530
  n,
@@ -2550,20 +2550,20 @@ const mr = /* @__PURE__ */ q(() => {
2550
2550
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
2551
2551
  TopItemListComponent: i("TopItemList")
2552
2552
  };
2553
- }), hr = /* @__PURE__ */ q(
2553
+ }), hr = /* @__PURE__ */ Y(
2554
2554
  ([t, e]) => ({ ...t, ...e }),
2555
2555
  st(uo, mr)
2556
- ), pr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), gr = { overflowAnchor: "none", position: on(), zIndex: 1 }, mo = { overflowAnchor: "none" }, Ir = { ...mo, display: "inline-block", height: "100%" }, zn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2557
- const n = A("listState"), o = Tt("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), u = s || r ? i : l, f = A("itemContent"), d = A("context"), g = A("groupContent"), h = A("trackItemSizes"), m = A("itemSize"), x = A("log"), R = Tt("gap"), I = A("horizontalDirection"), { callbackRef: T } = $n(
2556
+ ), pr = ({ height: t }) => /* @__PURE__ */ A("div", { style: { height: t } }), gr = { overflowAnchor: "none", position: on(), zIndex: 1 }, mo = { overflowAnchor: "none" }, Ir = { ...mo, display: "inline-block", height: "100%" }, Bn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2557
+ const n = _("listState"), o = Tt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), u = s || r ? i : l, f = _("itemContent"), d = _("context"), g = _("groupContent"), h = _("trackItemSizes"), m = _("itemSize"), x = _("log"), b = Tt("gap"), I = _("horizontalDirection"), { callbackRef: T } = $n(
2558
2558
  o,
2559
2559
  m,
2560
2560
  h,
2561
2561
  e ? te : u,
2562
2562
  x,
2563
- R,
2563
+ b,
2564
2564
  s,
2565
2565
  I,
2566
- A("skipAnimationFrameInResizeObserver")
2566
+ _("skipAnimationFrameInResizeObserver")
2567
2567
  ), [c, C] = E.useState(0);
2568
2568
  un("deviation", (M) => {
2569
2569
  c !== M && C(M);
@@ -2572,7 +2572,7 @@ const mr = /* @__PURE__ */ q(() => {
2572
2572
  Le(() => {
2573
2573
  S(c);
2574
2574
  }, [c, S]);
2575
- const w = A("EmptyPlaceholder"), L = A("ScrollSeekPlaceholder") ?? pr, P = A("ListComponent"), a = A("ItemComponent"), p = A("GroupComponent"), b = A("computeItemKey"), O = A("isSeeking"), z = A("groupIndices").length > 0, F = A("alignToBottom"), N = A("initialItemFinalLocationReached"), X = e ? {} : {
2575
+ const w = _("EmptyPlaceholder"), L = _("ScrollSeekPlaceholder") ?? pr, P = _("ListComponent"), a = _("ItemComponent"), p = _("GroupComponent"), R = _("computeItemKey"), O = _("isSeeking"), B = _("groupIndices").length > 0, F = _("alignToBottom"), G = _("initialItemFinalLocationReached"), q = e ? {} : {
2576
2576
  boxSizing: "border-box",
2577
2577
  ...I ? {
2578
2578
  display: "inline-block",
@@ -2586,39 +2586,39 @@ const mr = /* @__PURE__ */ q(() => {
2586
2586
  paddingBottom: n.offsetBottom,
2587
2587
  paddingTop: n.offsetTop
2588
2588
  },
2589
- ...N ? {} : { visibility: "hidden" }
2589
+ ...G ? {} : { visibility: "hidden" }
2590
2590
  };
2591
- return !e && n.totalCount === 0 && w !== null && w !== void 0 ? /* @__PURE__ */ G(w, { ...rt(w, d) }) : /* @__PURE__ */ G(
2591
+ return !e && n.totalCount === 0 && w !== null && w !== void 0 ? /* @__PURE__ */ A(w, { ...rt(w, d) }) : /* @__PURE__ */ A(
2592
2592
  P,
2593
2593
  {
2594
2594
  ...rt(P, d),
2595
2595
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2596
2596
  ref: T,
2597
- style: X,
2597
+ style: q,
2598
2598
  children: (e ? n.topItems : n.items).map((M) => {
2599
- const ft = M.originalIndex, Y = b(ft + n.firstItemIndex, M.data, d);
2600
- return O ? /* @__PURE__ */ Kt(
2599
+ const ft = M.originalIndex, Z = R(ft + n.firstItemIndex, M.data, d);
2600
+ return O ? /* @__PURE__ */ jt(
2601
2601
  L,
2602
2602
  {
2603
2603
  ...rt(L, d),
2604
2604
  height: M.size,
2605
2605
  index: M.index,
2606
- key: Y,
2606
+ key: Z,
2607
2607
  type: M.type || "item",
2608
2608
  ...M.type === "group" ? {} : { groupIndex: M.groupIndex }
2609
2609
  }
2610
- ) : M.type === "group" ? /* @__PURE__ */ Kt(
2610
+ ) : M.type === "group" ? /* @__PURE__ */ jt(
2611
2611
  p,
2612
2612
  {
2613
2613
  ...rt(p, d),
2614
2614
  "data-index": ft,
2615
2615
  "data-item-index": M.index,
2616
2616
  "data-known-size": M.size,
2617
- key: Y,
2617
+ key: Z,
2618
2618
  style: gr
2619
2619
  },
2620
2620
  g(M.index, d)
2621
- ) : /* @__PURE__ */ Kt(
2621
+ ) : /* @__PURE__ */ jt(
2622
2622
  a,
2623
2623
  {
2624
2624
  ...rt(a, d),
@@ -2627,10 +2627,10 @@ const mr = /* @__PURE__ */ q(() => {
2627
2627
  "data-item-group-index": M.groupIndex,
2628
2628
  "data-item-index": M.index,
2629
2629
  "data-known-size": M.size,
2630
- key: Y,
2630
+ key: Z,
2631
2631
  style: I ? Ir : mo
2632
2632
  },
2633
- z ? f(M.index, M.groupIndex, M.data, d) : f(M.index, M.data, d)
2633
+ B ? f(M.index, M.groupIndex, M.data, d) : f(M.index, M.data, d)
2634
2634
  );
2635
2635
  })
2636
2636
  }
@@ -2645,14 +2645,14 @@ const mr = /* @__PURE__ */ q(() => {
2645
2645
  outline: "none",
2646
2646
  overflowX: "auto",
2647
2647
  position: "relative"
2648
- }, ze = (t) => ({
2648
+ }, Be = (t) => ({
2649
2649
  height: "100%",
2650
2650
  position: "absolute",
2651
2651
  top: 0,
2652
2652
  width: "100%",
2653
2653
  ...t ? { display: "flex", flexDirection: "column" } : void 0
2654
2654
  }), sn = (t, e, n = 0) => ({
2655
- ...ze(t),
2655
+ ...Be(t),
2656
2656
  position: e ? "relative" : "absolute",
2657
2657
  top: e ? -n : 0
2658
2658
  }), vr = {
@@ -2669,7 +2669,7 @@ function ho(t, e) {
2669
2669
  return { item: typeof t == "string" ? void 0 : e };
2670
2670
  }
2671
2671
  const Tr = /* @__PURE__ */ E.memo(function() {
2672
- const e = A("HeaderComponent"), n = Tt("headerHeight"), o = A("HeaderFooterTag"), r = Ft(
2672
+ const e = _("HeaderComponent"), n = Tt("headerHeight"), o = _("HeaderFooterTag"), r = Ft(
2673
2673
  E.useMemo(
2674
2674
  () => (i) => {
2675
2675
  n(Lt(i, "height"));
@@ -2677,11 +2677,11 @@ const Tr = /* @__PURE__ */ E.memo(function() {
2677
2677
  [n]
2678
2678
  ),
2679
2679
  !0,
2680
- A("skipAnimationFrameInResizeObserver")
2681
- ), s = A("context");
2682
- return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
2680
+ _("skipAnimationFrameInResizeObserver")
2681
+ ), s = _("context");
2682
+ return e != null ? /* @__PURE__ */ A(o, { ref: r, children: /* @__PURE__ */ A(e, { ...rt(e, s) }) }) : null;
2683
2683
  }), Cr = /* @__PURE__ */ E.memo(function() {
2684
- const e = A("FooterComponent"), n = Tt("footerHeight"), o = A("HeaderFooterTag"), r = Ft(
2684
+ const e = _("FooterComponent"), n = Tt("footerHeight"), o = _("HeaderFooterTag"), r = Ft(
2685
2685
  E.useMemo(
2686
2686
  () => (i) => {
2687
2687
  n(Lt(i, "height"));
@@ -2689,13 +2689,13 @@ const Tr = /* @__PURE__ */ E.memo(function() {
2689
2689
  [n]
2690
2690
  ),
2691
2691
  !0,
2692
- A("skipAnimationFrameInResizeObserver")
2693
- ), s = A("context");
2694
- return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
2692
+ _("skipAnimationFrameInResizeObserver")
2693
+ ), s = _("context");
2694
+ return e != null ? /* @__PURE__ */ A(o, { ref: r, children: /* @__PURE__ */ A(e, { ...rt(e, s) }) }) : null;
2695
2695
  });
2696
2696
  function ln({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2697
2697
  return E.memo(function({ children: s, style: i, context: l, ...u }) {
2698
- const f = n("scrollContainerState"), d = e("ScrollerComponent"), g = n("smoothScrollTargetReached"), h = e("scrollerRef"), m = e("horizontalDirection") || !1, { scrollByCallback: x, scrollerRef: R, scrollToCallback: I } = fo(
2698
+ const f = n("scrollContainerState"), d = e("ScrollerComponent"), g = n("smoothScrollTargetReached"), h = e("scrollerRef"), m = e("horizontalDirection") || !1, { scrollByCallback: x, scrollerRef: b, scrollToCallback: I } = fo(
2699
2699
  f,
2700
2700
  g,
2701
2701
  d,
@@ -2715,12 +2715,12 @@ function ln({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2715
2715
  },
2716
2716
  [T, f, g]
2717
2717
  );
2718
- return t("scrollTo", T ? S : I), t("scrollBy", x), /* @__PURE__ */ G(
2718
+ return t("scrollTo", T ? S : I), t("scrollBy", x), /* @__PURE__ */ A(
2719
2719
  d,
2720
2720
  {
2721
2721
  "data-testid": "virtuoso-scroller",
2722
2722
  "data-virtuoso-scroller": !0,
2723
- ref: R,
2723
+ ref: b,
2724
2724
  style: { ...m ? xr : Sr, ...i },
2725
2725
  tabIndex: 0,
2726
2726
  ...u,
@@ -2732,19 +2732,19 @@ function ln({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2732
2732
  }
2733
2733
  function cn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2734
2734
  return E.memo(function({ children: s, style: i, context: l, ...u }) {
2735
- const f = n("windowScrollContainerState"), d = e("ScrollerComponent"), g = n("smoothScrollTargetReached"), h = e("totalListHeight"), m = e("deviation"), x = e("customScrollParent"), R = E.useRef(null), I = e("scrollerRef"), { scrollByCallback: T, scrollerRef: c, scrollToCallback: C } = fo(
2735
+ const f = n("windowScrollContainerState"), d = e("ScrollerComponent"), g = n("smoothScrollTargetReached"), h = e("totalListHeight"), m = e("deviation"), x = e("customScrollParent"), b = E.useRef(null), I = e("scrollerRef"), { scrollByCallback: T, scrollerRef: c, scrollToCallback: C } = fo(
2736
2736
  f,
2737
2737
  g,
2738
2738
  d,
2739
2739
  I,
2740
2740
  x
2741
2741
  );
2742
- return Le(() => (c.current = x ?? R.current?.ownerDocument.defaultView, () => {
2742
+ return Le(() => (c.current = x ?? b.current?.ownerDocument.defaultView, () => {
2743
2743
  c.current = null;
2744
- }), [c, x]), t("windowScrollTo", C), t("windowScrollBy", T), /* @__PURE__ */ G(
2744
+ }), [c, x]), t("windowScrollTo", C), t("windowScrollBy", T), /* @__PURE__ */ A(
2745
2745
  d,
2746
2746
  {
2747
- ref: R,
2747
+ ref: b,
2748
2748
  "data-virtuoso-scroller": !0,
2749
2749
  style: { position: "relative", ...i, ...h === 0 ? void 0 : { height: h + m } },
2750
2750
  ...u,
@@ -2755,39 +2755,39 @@ function cn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2755
2755
  });
2756
2756
  }
2757
2757
  const wr = ({ children: t }) => {
2758
- const e = E.useContext(Ie), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
2758
+ const e = E.useContext(Ie), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r = _("alignToBottom"), s = _("horizontalDirection"), i = E.useMemo(
2759
2759
  () => ie(n, (u) => Lt(u, s ? "width" : "height")),
2760
2760
  [n, s]
2761
- ), l = Ft(i, !0, A("skipAnimationFrameInResizeObserver"));
2761
+ ), l = Ft(i, !0, _("skipAnimationFrameInResizeObserver"));
2762
2762
  return E.useEffect(() => {
2763
2763
  e && (n(e.viewportHeight), o(e.itemHeight));
2764
- }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: l, style: ze(r), children: t });
2764
+ }, [e, n, o]), /* @__PURE__ */ A("div", { "data-viewport-type": "element", ref: l, style: Be(r), children: t });
2765
2765
  }, yr = ({ children: t }) => {
2766
- const e = E.useContext(Ie), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = Ye(
2766
+ const e = E.useContext(Ie), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = _("customScrollParent"), s = _("useWindowScroll"), i = _("topListHeight"), l = Ye(
2767
2767
  n,
2768
2768
  r,
2769
- A("skipAnimationFrameInResizeObserver")
2770
- ), u = A("alignToBottom");
2769
+ _("skipAnimationFrameInResizeObserver")
2770
+ ), u = _("alignToBottom");
2771
2771
  return E.useEffect(() => {
2772
2772
  e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2773
- }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: sn(u, s, i), children: t });
2773
+ }, [e, n, o]), /* @__PURE__ */ A("div", { "data-viewport-type": "window", ref: l, style: sn(u, s, i), children: t });
2774
2774
  }, br = ({ children: t }) => {
2775
- const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...vr, marginTop: `${n}px` }, r = A("context");
2776
- return /* @__PURE__ */ G(e, { style: o, ...rt(e, r), children: t });
2775
+ const e = _("TopItemListComponent") ?? "div", n = _("headerHeight"), o = { ...vr, marginTop: `${n}px` }, r = _("context");
2776
+ return /* @__PURE__ */ A(e, { style: o, ...rt(e, r), children: t });
2777
2777
  }, Rr = /* @__PURE__ */ E.memo(function(e) {
2778
- const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
2779
- return /* @__PURE__ */ jt(r || n ? Er : Hr, { ...e, context: s, children: [
2780
- o && /* @__PURE__ */ G(br, { children: /* @__PURE__ */ G(zn, { showTopList: !0 }) }),
2781
- /* @__PURE__ */ jt(r || n ? yr : wr, { children: [
2782
- /* @__PURE__ */ G(Tr, {}),
2783
- /* @__PURE__ */ G(zn, {}),
2784
- /* @__PURE__ */ G(Cr, {})
2778
+ const n = _("useWindowScroll"), o = _("topItemsIndexes").length > 0, r = _("customScrollParent"), s = _("context");
2779
+ return /* @__PURE__ */ Kt(r || n ? Er : Hr, { ...e, context: s, children: [
2780
+ o && /* @__PURE__ */ A(br, { children: /* @__PURE__ */ A(Bn, { showTopList: !0 }) }),
2781
+ /* @__PURE__ */ Kt(r || n ? yr : wr, { children: [
2782
+ /* @__PURE__ */ A(Tr, {}),
2783
+ /* @__PURE__ */ A(Bn, {}),
2784
+ /* @__PURE__ */ A(Cr, {})
2785
2785
  ] })
2786
2786
  ] });
2787
2787
  }), {
2788
2788
  Component: po,
2789
2789
  useEmitter: un,
2790
- useEmitterValue: A,
2790
+ useEmitterValue: _,
2791
2791
  usePublisher: Tt
2792
2792
  } = /* @__PURE__ */ nn(
2793
2793
  hr,
@@ -2851,11 +2851,11 @@ const wr = ({ children: t }) => {
2851
2851
  }
2852
2852
  },
2853
2853
  Rr
2854
- ), Hr = /* @__PURE__ */ ln({ useEmitter: un, useEmitterValue: A, usePublisher: Tt }), Er = /* @__PURE__ */ cn({ useEmitter: un, useEmitterValue: A, usePublisher: Tt }), ss = po, is = po, kr = /* @__PURE__ */ q(() => {
2855
- const t = y((f) => /* @__PURE__ */ jt("td", { children: [
2854
+ ), Hr = /* @__PURE__ */ ln({ useEmitter: un, useEmitterValue: _, usePublisher: Tt }), Er = /* @__PURE__ */ cn({ useEmitter: un, useEmitterValue: _, usePublisher: Tt }), ss = po, is = po, kr = /* @__PURE__ */ Y(() => {
2855
+ const t = y((f) => /* @__PURE__ */ Kt("td", { children: [
2856
2856
  "Item $",
2857
2857
  f
2858
- ] })), e = y(null), n = y((f) => /* @__PURE__ */ jt("td", { colSpan: 1e3, children: [
2858
+ ] })), e = y(null), n = y((f) => /* @__PURE__ */ Kt("td", { colSpan: 1e3, children: [
2859
2859
  "Group ",
2860
2860
  f
2861
2861
  ] })), o = y(null), r = y(null), s = y({}), i = y(rn), l = y(te), u = (f, d = null) => pt(
@@ -2886,14 +2886,14 @@ const wr = ({ children: t }) => {
2886
2886
  TableRowComponent: u("TableRow", "tr"),
2887
2887
  GroupComponent: u("Group", "tr")
2888
2888
  };
2889
- }), Lr = /* @__PURE__ */ q(
2889
+ }), Lr = /* @__PURE__ */ Y(
2890
2890
  ([t, e]) => ({ ...t, ...e }),
2891
2891
  st(uo, kr)
2892
- ), Or = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), zr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), Br = { overflowAnchor: "none" }, Bn = { position: on(), zIndex: 2, overflowAnchor: "none" }, Fn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2892
+ ), Or = ({ height: t }) => /* @__PURE__ */ A("tr", { children: /* @__PURE__ */ A("td", { style: { height: t } }) }), Br = ({ height: t }) => /* @__PURE__ */ A("tr", { children: /* @__PURE__ */ A("td", { style: { border: 0, height: t, padding: 0 } }) }), zr = { overflowAnchor: "none" }, zn = { position: on(), zIndex: 2, overflowAnchor: "none" }, Fn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2893
2893
  const n = U("listState"), o = U("computeItemKey"), r = U("firstItemIndex"), s = U("context"), i = U("isSeeking"), l = U("fixedHeaderHeight"), u = U("groupIndices").length > 0, f = U("itemContent"), d = U("groupContent"), g = U("ScrollSeekPlaceholder") ?? Or, h = U("GroupComponent"), m = U("TableRowComponent"), x = (e ? n.topItems : []).reduce((I, T, c) => (c === 0 ? I.push(T.size) : I.push(I[c - 1] + T.size), I), []);
2894
2894
  return (e ? n.topItems : n.items).map((I) => {
2895
2895
  const T = I.originalIndex, c = o(T + r, I.data, s), C = e ? T === 0 ? 0 : x[T - 1] : 0;
2896
- return i ? /* @__PURE__ */ Kt(
2896
+ return i ? /* @__PURE__ */ jt(
2897
2897
  g,
2898
2898
  {
2899
2899
  ...rt(g, s),
@@ -2902,7 +2902,7 @@ const wr = ({ children: t }) => {
2902
2902
  key: c,
2903
2903
  type: I.type || "item"
2904
2904
  }
2905
- ) : I.type === "group" ? /* @__PURE__ */ Kt(
2905
+ ) : I.type === "group" ? /* @__PURE__ */ jt(
2906
2906
  h,
2907
2907
  {
2908
2908
  ...rt(h, s),
@@ -2911,12 +2911,12 @@ const wr = ({ children: t }) => {
2911
2911
  "data-known-size": I.size,
2912
2912
  key: c,
2913
2913
  style: {
2914
- ...Bn,
2914
+ ...zn,
2915
2915
  top: l
2916
2916
  }
2917
2917
  },
2918
2918
  d(I.index, s)
2919
- ) : /* @__PURE__ */ Kt(
2919
+ ) : /* @__PURE__ */ jt(
2920
2920
  m,
2921
2921
  {
2922
2922
  ...rt(m, s),
@@ -2926,7 +2926,7 @@ const wr = ({ children: t }) => {
2926
2926
  "data-known-size": I.size,
2927
2927
  "data-item-group-index": I.groupIndex,
2928
2928
  key: c,
2929
- style: e ? { ...Bn, top: l + C } : Br
2929
+ style: e ? { ...zn, top: l + C } : zr
2930
2930
  },
2931
2931
  u ? f(I.index, I.groupIndex, I.data, s) : f(I.index, I.data, s)
2932
2932
  );
@@ -2942,22 +2942,22 @@ const wr = ({ children: t }) => {
2942
2942
  s,
2943
2943
  !1,
2944
2944
  U("skipAnimationFrameInResizeObserver")
2945
- ), [x, R] = E.useState(0);
2946
- an("deviation", (z) => {
2947
- x !== z && (m.current.style.marginTop = `${z}px`, R(z));
2945
+ ), [x, b] = E.useState(0);
2946
+ an("deviation", (B) => {
2947
+ x !== B && (m.current.style.marginTop = `${B}px`, b(B));
2948
2948
  });
2949
2949
  const I = yt("deviationCommitted");
2950
2950
  Le(() => {
2951
2951
  I(x);
2952
2952
  }, [x, I]);
2953
- const T = U("EmptyPlaceholder"), c = U("FillerRow") ?? zr, C = U("TableBodyComponent"), S = U("paddingTopAddition"), w = U("statefulTotalCount"), L = U("context");
2953
+ const T = U("EmptyPlaceholder"), c = U("FillerRow") ?? Br, C = U("TableBodyComponent"), S = U("paddingTopAddition"), w = U("statefulTotalCount"), L = U("context");
2954
2954
  if (w === 0 && T !== null && T !== void 0)
2955
- return /* @__PURE__ */ G(T, { ...rt(T, L) });
2956
- const P = (n ? e.topItems : []).reduce((z, F) => z + F.size, 0), a = e.offsetTop + S + x - P, p = e.offsetBottom, b = a > 0 ? /* @__PURE__ */ G(c, { context: L, height: a }, "padding-top") : null, O = p > 0 ? /* @__PURE__ */ G(c, { context: L, height: p }, "padding-bottom") : null;
2957
- return /* @__PURE__ */ jt(C, { "data-testid": "virtuoso-item-list", ref: h, ...rt(C, L), children: [
2958
- b,
2959
- n && /* @__PURE__ */ G(Fn, { showTopList: !0 }),
2960
- /* @__PURE__ */ G(Fn, {}),
2955
+ return /* @__PURE__ */ A(T, { ...rt(T, L) });
2956
+ const P = (n ? e.topItems : []).reduce((B, F) => B + F.size, 0), a = e.offsetTop + S + x - P, p = e.offsetBottom, R = a > 0 ? /* @__PURE__ */ A(c, { context: L, height: a }, "padding-top") : null, O = p > 0 ? /* @__PURE__ */ A(c, { context: L, height: p }, "padding-bottom") : null;
2957
+ return /* @__PURE__ */ Kt(C, { "data-testid": "virtuoso-item-list", ref: h, ...rt(C, L), children: [
2958
+ R,
2959
+ n && /* @__PURE__ */ A(Fn, { showTopList: !0 }),
2960
+ /* @__PURE__ */ A(Fn, {}),
2961
2961
  O
2962
2962
  ] });
2963
2963
  }), Mr = ({ children: t }) => {
@@ -2968,7 +2968,7 @@ const wr = ({ children: t }) => {
2968
2968
  );
2969
2969
  return E.useEffect(() => {
2970
2970
  e && (n(e.viewportHeight), o(e.itemHeight));
2971
- }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: r, style: ze(!1), children: t });
2971
+ }, [e, n, o]), /* @__PURE__ */ A("div", { "data-viewport-type": "element", ref: r, style: Be(!1), children: t });
2972
2972
  }, Vr = ({ children: t }) => {
2973
2973
  const e = E.useContext(Ie), n = yt("windowViewportRect"), o = yt("fixedItemHeight"), r = U("customScrollParent"), s = U("useWindowScroll"), i = Ye(
2974
2974
  n,
@@ -2977,7 +2977,7 @@ const wr = ({ children: t }) => {
2977
2977
  );
2978
2978
  return E.useEffect(() => {
2979
2979
  e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2980
- }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: sn(!1, s), children: t });
2980
+ }, [e, n, o]), /* @__PURE__ */ A("div", { "data-viewport-type": "window", ref: i, style: sn(!1, s), children: t });
2981
2981
  }, Wr = /* @__PURE__ */ E.memo(function(e) {
2982
2982
  const n = U("useWindowScroll"), o = U("customScrollParent"), r = yt("fixedHeaderHeight"), s = yt("fixedFooterHeight"), i = U("fixedHeaderContent"), l = U("fixedFooterContent"), u = U("context"), f = Ft(
2983
2983
  E.useMemo(() => ie(r, (c) => Lt(c, "height")), [r]),
@@ -2987,7 +2987,7 @@ const wr = ({ children: t }) => {
2987
2987
  E.useMemo(() => ie(s, (c) => Lt(c, "height")), [s]),
2988
2988
  !0,
2989
2989
  U("skipAnimationFrameInResizeObserver")
2990
- ), g = o || n ? Gr : Pr, h = o || n ? Vr : Mr, m = U("TableComponent"), x = U("TableHeadComponent"), R = U("TableFooterComponent"), I = i ? /* @__PURE__ */ G(
2990
+ ), g = o || n ? Gr : Pr, h = o || n ? Vr : Mr, m = U("TableComponent"), x = U("TableHeadComponent"), b = U("TableFooterComponent"), I = i ? /* @__PURE__ */ A(
2991
2991
  x,
2992
2992
  {
2993
2993
  ref: f,
@@ -2996,19 +2996,19 @@ const wr = ({ children: t }) => {
2996
2996
  children: i()
2997
2997
  },
2998
2998
  "TableHead"
2999
- ) : null, T = l ? /* @__PURE__ */ G(
3000
- R,
2999
+ ) : null, T = l ? /* @__PURE__ */ A(
3000
+ b,
3001
3001
  {
3002
3002
  ref: d,
3003
3003
  style: { bottom: 0, position: "sticky", zIndex: 1 },
3004
- ...rt(R, u),
3004
+ ...rt(b, u),
3005
3005
  children: l()
3006
3006
  },
3007
3007
  "TableFoot"
3008
3008
  ) : null;
3009
- return /* @__PURE__ */ G(g, { ...e, ...rt(g, u), children: /* @__PURE__ */ G(h, { children: /* @__PURE__ */ jt(m, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...rt(m, u), children: [
3009
+ return /* @__PURE__ */ A(g, { ...e, ...rt(g, u), children: /* @__PURE__ */ A(h, { children: /* @__PURE__ */ Kt(m, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...rt(m, u), children: [
3010
3010
  I,
3011
- /* @__PURE__ */ G(Fr, {}, "TableBody"),
3011
+ /* @__PURE__ */ A(Fr, {}, "TableBody"),
3012
3012
  T
3013
3013
  ] }) }) });
3014
3014
  }), {
@@ -3107,91 +3107,91 @@ function Ce(t, e) {
3107
3107
  function Nr(t, e) {
3108
3108
  return t !== void 0 && t.column === e.column && t.row === e.row;
3109
3109
  }
3110
- const Dr = /* @__PURE__ */ q(
3110
+ const Dr = /* @__PURE__ */ Y(
3111
3111
  ([
3112
3112
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
3113
3113
  { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: u, scrollTop: f, smoothScrollTargetReached: d, viewportHeight: g },
3114
3114
  h,
3115
3115
  m,
3116
- { didMount: x, propsReady: R },
3116
+ { didMount: x, propsReady: b },
3117
3117
  { customScrollParent: I, useWindowScroll: T, windowScrollBy: c, windowScrollContainerState: C, windowScrollTo: S, windowViewportRect: w },
3118
3118
  L
3119
3119
  ]) => {
3120
- const P = y(0), a = y(0), p = y(Mn), b = y({ height: 0, width: 0 }), O = y({ height: 0, width: 0 }), z = K(), F = K(), N = y(0), X = y(null), M = y({ column: 0, row: 0 }), ft = K(), Y = K(), it = y(!1), ct = y(0), mt = y(!0), zt = y(!1), Rt = y(!1);
3121
- Z(
3120
+ const P = y(0), a = y(0), p = y(Mn), R = y({ height: 0, width: 0 }), O = y({ height: 0, width: 0 }), B = j(), F = j(), G = y(0), q = y(null), M = y({ column: 0, row: 0 }), ft = j(), Z = j(), it = y(!1), ct = y(0), mt = y(!0), Bt = y(!1), Rt = y(!1);
3121
+ X(
3122
3122
  v(
3123
3123
  x,
3124
3124
  D(ct),
3125
3125
  V(([H, $]) => !$e($))
3126
3126
  ),
3127
3127
  () => {
3128
- _(mt, !1);
3128
+ N(mt, !1);
3129
3129
  }
3130
- ), Z(
3130
+ ), X(
3131
3131
  v(
3132
- dt(x, mt, O, b, ct, zt),
3133
- V(([H, $, j, lt, , tt]) => H && !$ && j.height !== 0 && lt.height !== 0 && !tt)
3132
+ dt(x, mt, O, R, ct, Bt),
3133
+ V(([H, $, K, lt, , tt]) => H && !$ && K.height !== 0 && lt.height !== 0 && !tt)
3134
3134
  ),
3135
3135
  ([, , , , H]) => {
3136
3136
  if (H === void 0) {
3137
- _(mt, !0);
3137
+ N(mt, !0);
3138
3138
  return;
3139
3139
  }
3140
- _(zt, !0), Je(1, () => {
3141
- _(z, H);
3140
+ N(Bt, !0), Je(1, () => {
3141
+ N(B, H);
3142
3142
  }), kt(v(f), () => {
3143
- _(e, [0, 0]), _(mt, !0);
3143
+ N(e, [0, 0]), N(mt, !0);
3144
3144
  });
3145
3145
  }
3146
- ), B(
3146
+ ), z(
3147
3147
  v(
3148
- Y,
3148
+ Z,
3149
3149
  V((H) => H != null && H.scrollTop > 0),
3150
3150
  vt(0)
3151
3151
  ),
3152
3152
  a
3153
- ), Z(
3153
+ ), X(
3154
3154
  v(
3155
3155
  x,
3156
- D(Y),
3156
+ D(Z),
3157
3157
  V(([, H]) => H != null)
3158
3158
  ),
3159
3159
  ([, H]) => {
3160
- H && (_(b, H.viewport), _(O, H.item), _(M, H.gap), H.scrollTop > 0 && (_(it, !0), kt(v(f, qt(1)), ($) => {
3161
- _(it, !1);
3162
- }), _(u, { top: H.scrollTop })));
3160
+ H && (N(R, H.viewport), N(O, H.item), N(M, H.gap), H.scrollTop > 0 && (N(it, !0), kt(v(f, qt(1)), ($) => {
3161
+ N(it, !1);
3162
+ }), N(u, { top: H.scrollTop })));
3163
3163
  }
3164
- ), B(
3164
+ ), z(
3165
3165
  v(
3166
- b,
3166
+ R,
3167
3167
  k(({ height: H }) => H)
3168
3168
  ),
3169
3169
  g
3170
- ), B(
3170
+ ), z(
3171
3171
  v(
3172
3172
  dt(
3173
- W(b, Ce),
3173
+ W(R, Ce),
3174
3174
  W(O, Ce),
3175
3175
  W(M, (H, $) => H !== void 0 && H.column === $.column && H.row === $.row),
3176
3176
  W(f)
3177
3177
  ),
3178
- k(([H, $, j, lt]) => ({
3179
- gap: j,
3178
+ k(([H, $, K, lt]) => ({
3179
+ gap: K,
3180
3180
  item: $,
3181
3181
  scrollTop: lt,
3182
3182
  viewport: H
3183
3183
  }))
3184
3184
  ),
3185
3185
  ft
3186
- ), B(
3186
+ ), z(
3187
3187
  v(
3188
3188
  dt(
3189
3189
  W(P),
3190
3190
  o,
3191
3191
  W(M, Nr),
3192
3192
  W(O, Ce),
3193
- W(b, Ce),
3194
- W(X),
3193
+ W(R, Ce),
3194
+ W(q),
3195
3195
  W(a),
3196
3196
  W(it),
3197
3197
  W(mt),
@@ -3201,7 +3201,7 @@ const Dr = /* @__PURE__ */ q(
3201
3201
  k(
3202
3202
  ([
3203
3203
  H,
3204
- [$, j],
3204
+ [$, K],
3205
3205
  lt,
3206
3206
  tt,
3207
3207
  Q,
@@ -3211,35 +3211,35 @@ const Dr = /* @__PURE__ */ q(
3211
3211
  at,
3212
3212
  _t
3213
3213
  ]) => {
3214
- const { column: Wt, row: oe } = lt, { height: xe, width: Be } = tt, { width: dn } = Q;
3214
+ const { column: Wt, row: oe } = lt, { height: xe, width: ze } = tt, { width: dn } = Q;
3215
3215
  if (St === 0 && (H === 0 || dn === 0))
3216
3216
  return Mn;
3217
- if (Be === 0) {
3217
+ if (ze === 0) {
3218
3218
  const gn = Qe(_t, H), vo = gn + Math.max(St - 1, 0);
3219
3219
  return _r(Pn(gn, vo, ut));
3220
3220
  }
3221
- const ve = Io(dn, Be, Wt);
3221
+ const ve = Io(dn, ze, Wt);
3222
3222
  let Zt, Nt;
3223
- at ? $ === 0 && j === 0 && St > 0 ? (Zt = 0, Nt = St - 1) : (Zt = ve * He(($ + oe) / (xe + oe)), Nt = ve * Vn((j + oe) / (xe + oe)) - 1, Nt = Pe(H - 1, se(Nt, ve - 1)), Zt = Pe(Nt, se(0, Zt))) : (Zt = 0, Nt = -1);
3223
+ at ? $ === 0 && K === 0 && St > 0 ? (Zt = 0, Nt = St - 1) : (Zt = ve * He(($ + oe) / (xe + oe)), Nt = ve * Vn((K + oe) / (xe + oe)) - 1, Nt = Pe(H - 1, se(Nt, ve - 1)), Zt = Pe(Nt, se(0, Zt))) : (Zt = 0, Nt = -1);
3224
3224
  const fn = Pn(Zt, Nt, ut), { bottom: mn, top: hn } = Gn(Q, lt, tt, fn), pn = Vn(H / ve), xo = pn * xe + (pn - 1) * oe - mn;
3225
- return { bottom: mn, itemHeight: xe, items: fn, itemWidth: Be, offsetBottom: xo, offsetTop: hn, top: hn };
3225
+ return { bottom: mn, itemHeight: xe, items: fn, itemWidth: ze, offsetBottom: xo, offsetTop: hn, top: hn };
3226
3226
  }
3227
3227
  )
3228
3228
  ),
3229
3229
  p
3230
- ), B(
3230
+ ), z(
3231
3231
  v(
3232
- X,
3232
+ q,
3233
3233
  V((H) => H !== null),
3234
3234
  k((H) => H.length)
3235
3235
  ),
3236
3236
  P
3237
- ), B(
3237
+ ), z(
3238
3238
  v(
3239
- dt(b, O, p, M),
3240
- V(([H, $, { items: j }]) => j.length > 0 && $.height !== 0 && H.height !== 0),
3241
- k(([H, $, { items: j }, lt]) => {
3242
- const { bottom: tt, top: Q } = Gn(H, lt, $, j);
3239
+ dt(R, O, p, M),
3240
+ V(([H, $, { items: K }]) => K.length > 0 && $.height !== 0 && H.height !== 0),
3241
+ k(([H, $, { items: K }, lt]) => {
3242
+ const { bottom: tt, top: Q } = Gn(H, lt, $, K);
3243
3243
  return [Q, tt];
3244
3244
  }),
3245
3245
  ot(Jt)
@@ -3247,7 +3247,7 @@ const Dr = /* @__PURE__ */ q(
3247
3247
  e
3248
3248
  );
3249
3249
  const wt = y(!1);
3250
- B(
3250
+ z(
3251
3251
  v(
3252
3252
  f,
3253
3253
  D(wt),
@@ -3261,17 +3261,17 @@ const Dr = /* @__PURE__ */ q(
3261
3261
  // A data publish rebuilds gridState before it updates totalCount. Skipping that intermediate step
3262
3262
  // avoids reporting the previous end index against the new data.
3263
3263
  V(([{ items: H }, $]) => {
3264
- const j = et(X);
3265
- return H.length > 0 && (j === null || j.length === $);
3264
+ const K = et(q);
3265
+ return H.length > 0 && (K === null || K.length === $);
3266
3266
  }),
3267
3267
  D(wt),
3268
- V(([[H, $], j]) => {
3268
+ V(([[H, $], K]) => {
3269
3269
  const tt = H.items[H.items.length - 1].index === $ - 1;
3270
- return (j || H.bottom > 0 && H.itemHeight > 0 && H.offsetBottom === 0 && H.items.length === $) && tt;
3270
+ return (K || H.bottom > 0 && H.itemHeight > 0 && H.offsetBottom === 0 && H.items.length === $) && tt;
3271
3271
  }),
3272
3272
  // Keying on the data array lets replaced data with a previously reported length fire again, matching
3273
3273
  // the list. withLatestFrom(data) subscribes after gridState and would still hold the previous array.
3274
- k(([[, H]]) => [H - 1, et(X)]),
3274
+ k(([[, H]]) => [H - 1, et(q)]),
3275
3275
  ot(Jt),
3276
3276
  k(([H]) => H)
3277
3277
  )
@@ -3282,7 +3282,7 @@ const Dr = /* @__PURE__ */ q(
3282
3282
  vt(0),
3283
3283
  ot()
3284
3284
  )
3285
- ), Bt = Ct(
3285
+ ), zt = Ct(
3286
3286
  v(
3287
3287
  W(p),
3288
3288
  D(it),
@@ -3295,16 +3295,16 @@ const Dr = /* @__PURE__ */ q(
3295
3295
  Vt(0)
3296
3296
  )
3297
3297
  );
3298
- B(Bt, m.scrollSeekRangeChanged), B(
3298
+ z(zt, m.scrollSeekRangeChanged), z(
3299
3299
  v(
3300
- z,
3301
- D(b, O, P, M),
3302
- k(([H, $, j, lt, tt]) => {
3300
+ B,
3301
+ D(R, O, P, M),
3302
+ k(([H, $, K, lt, tt]) => {
3303
3303
  const Q = eo(H), { align: ut, behavior: St, offset: at } = Q;
3304
3304
  let _t = Q.index;
3305
3305
  _t === "LAST" && (_t = lt - 1), _t = se(0, Pe(lt - 1, _t));
3306
- let Wt = Ue($, tt, j, _t);
3307
- return ut === "end" ? Wt = Wn(Wt - $.height + j.height) : ut === "center" && (Wt = Wn(Wt - $.height / 2 + j.height / 2)), at !== void 0 && at !== 0 && (Wt += at), { behavior: St, top: Wt };
3306
+ let Wt = Ue($, tt, K, _t);
3307
+ return ut === "end" ? Wt = Wn(Wt - $.height + K.height) : ut === "center" && (Wt = Wn(Wt - $.height / 2 + K.height / 2)), at !== void 0 && at !== 0 && (Wt += at), { behavior: St, top: Wt };
3308
3308
  })
3309
3309
  ),
3310
3310
  u
@@ -3316,17 +3316,17 @@ const Dr = /* @__PURE__ */ q(
3316
3316
  ),
3317
3317
  0
3318
3318
  );
3319
- return B(
3319
+ return z(
3320
3320
  v(
3321
3321
  w,
3322
3322
  k((H) => ({ height: H.visibleHeight, width: H.visibleWidth }))
3323
3323
  ),
3324
- b
3324
+ R
3325
3325
  ), {
3326
3326
  customScrollParent: I,
3327
3327
  // input
3328
- data: X,
3329
- deviation: N,
3328
+ data: q,
3329
+ deviation: G,
3330
3330
  footerHeight: r,
3331
3331
  gap: M,
3332
3332
  headerHeight: s,
@@ -3334,17 +3334,17 @@ const Dr = /* @__PURE__ */ q(
3334
3334
  initialItemCount: a,
3335
3335
  itemDimensions: O,
3336
3336
  overscan: n,
3337
- restoreStateFrom: Y,
3337
+ restoreStateFrom: Z,
3338
3338
  scrollBy: i,
3339
3339
  scrollContainerState: l,
3340
3340
  scrollHeight: F,
3341
3341
  scrollTo: u,
3342
- scrollToIndex: z,
3342
+ scrollToIndex: B,
3343
3343
  scrollTop: f,
3344
3344
  smoothScrollTargetReached: d,
3345
3345
  totalCount: P,
3346
3346
  useWindowScroll: T,
3347
- viewportDimensions: b,
3347
+ viewportDimensions: R,
3348
3348
  windowScrollBy: c,
3349
3349
  windowScrollContainerState: C,
3350
3350
  windowScrollTo: S,
@@ -3357,8 +3357,8 @@ const Dr = /* @__PURE__ */ q(
3357
3357
  totalListHeight: ne,
3358
3358
  ...h,
3359
3359
  endReached: Se,
3360
- propsReady: R,
3361
- rangeChanged: Bt,
3360
+ propsReady: b,
3361
+ rangeChanged: zt,
3362
3362
  startReached: ee,
3363
3363
  stateChanged: ft,
3364
3364
  stateRestoreInProgress: it,
@@ -3381,7 +3381,7 @@ function Ue(t, e, n, o) {
3381
3381
  const r = Io(t.width, n.width, e.column), s = He(o / r), i = s * n.height + se(0, s - 1) * e.row;
3382
3382
  return i > 0 ? i + e.row : i;
3383
3383
  }
3384
- const $r = /* @__PURE__ */ q(() => {
3384
+ const $r = /* @__PURE__ */ Y(() => {
3385
3385
  const t = y((g) => `Item ${g}`), e = y({}), n = y(null), o = y("virtuoso-grid-item"), r = y("virtuoso-grid-list"), s = y(rn), i = y("div"), l = y(te), u = (g, h = null) => pt(
3386
3386
  v(
3387
3387
  e,
@@ -3390,7 +3390,7 @@ const $r = /* @__PURE__ */ q(() => {
3390
3390
  ),
3391
3391
  h
3392
3392
  ), f = y(!1), d = y(!1);
3393
- return B(W(d), f), {
3393
+ return z(W(d), f), {
3394
3394
  components: e,
3395
3395
  computeItemKey: s,
3396
3396
  context: n,
@@ -3408,11 +3408,11 @@ const $r = /* @__PURE__ */ q(() => {
3408
3408
  scrollerRef: l,
3409
3409
  ScrollSeekPlaceholder: u("ScrollSeekPlaceholder", "div")
3410
3410
  };
3411
- }), Ur = /* @__PURE__ */ q(
3411
+ }), Ur = /* @__PURE__ */ Y(
3412
3412
  ([t, e]) => ({ ...t, ...e }),
3413
3413
  st(Dr, $r)
3414
- ), Kr = /* @__PURE__ */ E.memo(function() {
3415
- const e = nt("gridState"), n = nt("listClassName"), o = nt("itemClassName"), r = nt("itemContent"), s = nt("computeItemKey"), i = nt("isSeeking"), l = bt("scrollHeight"), u = nt("ItemComponent"), f = nt("ListComponent"), d = nt("ScrollSeekPlaceholder"), g = nt("context"), h = bt("itemDimensions"), m = bt("gap"), x = nt("log"), R = nt("stateRestoreInProgress"), I = bt("reportReadyState"), T = Ft(
3414
+ ), jr = /* @__PURE__ */ E.memo(function() {
3415
+ const e = nt("gridState"), n = nt("listClassName"), o = nt("itemClassName"), r = nt("itemContent"), s = nt("computeItemKey"), i = nt("isSeeking"), l = bt("scrollHeight"), u = nt("ItemComponent"), f = nt("ListComponent"), d = nt("ScrollSeekPlaceholder"), g = nt("context"), h = bt("itemDimensions"), m = bt("gap"), x = nt("log"), b = nt("stateRestoreInProgress"), I = bt("reportReadyState"), T = Ft(
3416
3416
  E.useMemo(
3417
3417
  () => (c) => {
3418
3418
  const C = c.parentElement.parentElement.scrollHeight;
@@ -3430,7 +3430,7 @@ const $r = /* @__PURE__ */ q(() => {
3430
3430
  );
3431
3431
  return Le(() => {
3432
3432
  e.itemHeight > 0 && e.itemWidth > 0 && I(!0);
3433
- }, [e]), R ? null : /* @__PURE__ */ G(
3433
+ }, [e]), b ? null : /* @__PURE__ */ A(
3434
3434
  f,
3435
3435
  {
3436
3436
  className: n,
@@ -3440,7 +3440,7 @@ const $r = /* @__PURE__ */ q(() => {
3440
3440
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
3441
3441
  children: e.items.map((c) => {
3442
3442
  const C = s(c.index, c.data, g);
3443
- return i ? /* @__PURE__ */ G(
3443
+ return i ? /* @__PURE__ */ A(
3444
3444
  d,
3445
3445
  {
3446
3446
  ...rt(d, g),
@@ -3449,7 +3449,7 @@ const $r = /* @__PURE__ */ q(() => {
3449
3449
  width: e.itemWidth
3450
3450
  },
3451
3451
  C
3452
- ) : /* @__PURE__ */ Kt(
3452
+ ) : /* @__PURE__ */ jt(
3453
3453
  u,
3454
3454
  {
3455
3455
  ...rt(u, g),
@@ -3462,7 +3462,7 @@ const $r = /* @__PURE__ */ q(() => {
3462
3462
  })
3463
3463
  }
3464
3464
  );
3465
- }), jr = E.memo(function() {
3465
+ }), Kr = E.memo(function() {
3466
3466
  const e = nt("HeaderComponent"), n = bt("headerHeight"), o = nt("headerFooterTag"), r = Ft(
3467
3467
  E.useMemo(
3468
3468
  () => (i) => {
@@ -3473,7 +3473,7 @@ const $r = /* @__PURE__ */ q(() => {
3473
3473
  !0,
3474
3474
  !1
3475
3475
  ), s = nt("context");
3476
- return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
3476
+ return e != null ? /* @__PURE__ */ A(o, { ref: r, children: /* @__PURE__ */ A(e, { ...rt(e, s) }) }) : null;
3477
3477
  }), qr = E.memo(function() {
3478
3478
  const e = nt("FooterComponent"), n = bt("footerHeight"), o = nt("headerFooterTag"), r = Ft(
3479
3479
  E.useMemo(
@@ -3485,7 +3485,7 @@ const $r = /* @__PURE__ */ q(() => {
3485
3485
  !0,
3486
3486
  !1
3487
3487
  ), s = nt("context");
3488
- return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...rt(e, s) }) }) : null;
3488
+ return e != null ? /* @__PURE__ */ A(o, { ref: r, children: /* @__PURE__ */ A(e, { ...rt(e, s) }) }) : null;
3489
3489
  }), Yr = ({ children: t }) => {
3490
3490
  const e = E.useContext(ao), n = bt("itemDimensions"), o = bt("viewportDimensions"), r = Ft(
3491
3491
  E.useMemo(
@@ -3499,18 +3499,18 @@ const $r = /* @__PURE__ */ q(() => {
3499
3499
  );
3500
3500
  return E.useEffect(() => {
3501
3501
  e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
3502
- }, [e, o, n]), /* @__PURE__ */ G("div", { ref: r, style: ze(!1), children: t });
3502
+ }, [e, o, n]), /* @__PURE__ */ A("div", { ref: r, style: Be(!1), children: t });
3503
3503
  }, Zr = ({ children: t }) => {
3504
3504
  const e = E.useContext(ao), n = bt("windowViewportRect"), o = bt("itemDimensions"), r = nt("customScrollParent"), s = nt("useWindowScroll"), i = Ye(n, r, !1);
3505
3505
  return E.useEffect(() => {
3506
3506
  e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
3507
- }, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: sn(!1, s), children: t });
3507
+ }, [e, n, o]), /* @__PURE__ */ A("div", { ref: i, style: sn(!1, s), children: t });
3508
3508
  }, Xr = /* @__PURE__ */ E.memo(function({ ...e }) {
3509
3509
  const n = nt("useWindowScroll"), o = nt("customScrollParent"), r = o || n ? ts : Qr, s = o || n ? Zr : Yr, i = nt("context");
3510
- return /* @__PURE__ */ G(r, { ...e, ...rt(r, i), children: /* @__PURE__ */ jt(s, { children: [
3511
- /* @__PURE__ */ G(jr, {}),
3512
- /* @__PURE__ */ G(Kr, {}),
3513
- /* @__PURE__ */ G(qr, {})
3510
+ return /* @__PURE__ */ A(r, { ...e, ...rt(r, i), children: /* @__PURE__ */ Kt(s, { children: [
3511
+ /* @__PURE__ */ A(Kr, {}),
3512
+ /* @__PURE__ */ A(jr, {}),
3513
+ /* @__PURE__ */ A(qr, {})
3514
3514
  ] }) });
3515
3515
  }), {
3516
3516
  Component: Jr,