react-virtuoso 4.18.9 → 4.18.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,11 +1,11 @@
1
1
  import { jsx as G, jsxs as $t } from "react/jsx-runtime";
2
2
  import E, { createElement as Dt } from "react";
3
- import xo from "react-dom";
4
- const we = 0, Pt = 1, Xt = 2, Pn = 4;
3
+ import go from "react-dom";
4
+ const we = 0, Pt = 1, Xt = 2, Vn = 4;
5
5
  function fn(t) {
6
6
  return () => t;
7
7
  }
8
- function vo(t) {
8
+ function Io(t) {
9
9
  t();
10
10
  }
11
11
  function re(t, e) {
@@ -14,15 +14,15 @@ function re(t, e) {
14
14
  function mn(t, e) {
15
15
  return () => t(e);
16
16
  }
17
- function To(t, e) {
17
+ function So(t, e) {
18
18
  return (n) => t(e, n);
19
19
  }
20
20
  function _e(t) {
21
21
  return t !== void 0;
22
22
  }
23
- function Co(...t) {
23
+ function xo(...t) {
24
24
  return () => {
25
- t.map(vo);
25
+ t.map(Io);
26
26
  };
27
27
  }
28
28
  function Jt() {
@@ -30,7 +30,7 @@ function Jt() {
30
30
  function ye(t, e) {
31
31
  return e(t), t;
32
32
  }
33
- function wo(t, e) {
33
+ function vo(t, e) {
34
34
  return e(t);
35
35
  }
36
36
  function rt(...t) {
@@ -39,17 +39,17 @@ function rt(...t) {
39
39
  function Y(t, e) {
40
40
  return t(Pt, e);
41
41
  }
42
- function _(t, e) {
42
+ function M(t, e) {
43
43
  t(we, e);
44
44
  }
45
45
  function Ne(t) {
46
46
  t(Xt);
47
47
  }
48
48
  function it(t) {
49
- return t(Pn);
49
+ return t(Vn);
50
50
  }
51
51
  function z(t, e) {
52
- return Y(t, To(e, we));
52
+ return Y(t, So(e, we));
53
53
  }
54
54
  function yt(t, e) {
55
55
  const n = t(Pt, (o) => {
@@ -65,10 +65,10 @@ function pn(t) {
65
65
  }, t);
66
66
  };
67
67
  }
68
- function Gn(t, e) {
68
+ function Wn(t, e) {
69
69
  return t === e;
70
70
  }
71
- function nt(t = Gn) {
71
+ function nt(t = Wn) {
72
72
  let e;
73
73
  return (n) => (o) => {
74
74
  t(e, o) || (e = o, n(o));
@@ -88,7 +88,7 @@ function Bt(t) {
88
88
  };
89
89
  }
90
90
  function x(t, ...e) {
91
- const n = yo(...e);
91
+ const n = To(...e);
92
92
  return ((o, r) => {
93
93
  switch (o) {
94
94
  case Xt:
@@ -134,10 +134,10 @@ function $(...t) {
134
134
  n === r ? l() : o = l;
135
135
  };
136
136
  }
137
- function yo(...t) {
138
- return (e) => t.reduceRight(wo, e);
137
+ function To(...t) {
138
+ return (e) => t.reduceRight(vo, e);
139
139
  }
140
- function bo(t) {
140
+ function Co(t) {
141
141
  let e, n;
142
142
  const o = () => e?.();
143
143
  return function(r, s) {
@@ -162,7 +162,7 @@ function T(t) {
162
162
  r(e);
163
163
  break;
164
164
  }
165
- case Pn:
165
+ case Vn:
166
166
  return e;
167
167
  }
168
168
  return n(o, r);
@@ -194,18 +194,18 @@ function U() {
194
194
  function Tt(t) {
195
195
  return ye(U(), (e) => z(t, e));
196
196
  }
197
- const Ro = { singleton: !0 };
198
- function j(t, e = [], n = Ro) {
197
+ const wo = { singleton: !0 };
198
+ function j(t, e = [], n = wo) {
199
199
  const { singleton: o } = n;
200
200
  return {
201
201
  constructor: t,
202
202
  dependencies: e,
203
- id: Ho(),
203
+ id: yo(),
204
204
  singleton: o
205
205
  };
206
206
  }
207
- const Ho = () => /* @__PURE__ */ Symbol("id");
208
- function Eo(t) {
207
+ const yo = () => /* @__PURE__ */ Symbol("id");
208
+ function bo(t) {
209
209
  const e = /* @__PURE__ */ new Map(), n = ({ constructor: o, dependencies: r, id: s, singleton: i }) => {
210
210
  if (i && e.has(s))
211
211
  return e.get(s);
@@ -221,7 +221,7 @@ function at(...t) {
221
221
  return t.forEach((s, i) => {
222
222
  const l = 2 ** i;
223
223
  Y(s, (c) => {
224
- n[i] = c, o |= l, o === r && _(e, n);
224
+ n[i] = c, o |= l, o === r && M(e, n);
225
225
  });
226
226
  }), function(s, i) {
227
227
  switch (s) {
@@ -234,7 +234,7 @@ function at(...t) {
234
234
  }
235
235
  };
236
236
  }
237
- function W(t, e = Gn) {
237
+ function W(t, e = Wn) {
238
238
  return x(t, nt(e));
239
239
  }
240
240
  function Fe(...t) {
@@ -243,7 +243,7 @@ function Fe(...t) {
243
243
  case Xt:
244
244
  return;
245
245
  case Pt:
246
- return Co(...t.map((o) => Y(o, n)));
246
+ return xo(...t.map((o) => Y(o, n)));
247
247
  }
248
248
  };
249
249
  }
@@ -256,18 +256,18 @@ const ft = {
256
256
  WARN: 2,
257
257
  /** Error messages for failures (default level) */
258
258
  ERROR: 3
259
- }, Bo = {
259
+ }, Ro = {
260
260
  [ft.DEBUG]: "debug",
261
261
  [ft.ERROR]: "error",
262
262
  [ft.INFO]: "log",
263
263
  [ft.WARN]: "warn"
264
- }, Oo = () => typeof globalThis > "u" ? window : globalThis, Gt = j(
264
+ }, Ho = () => typeof globalThis > "u" ? window : globalThis, Gt = j(
265
265
  () => {
266
266
  const t = T(ft.ERROR);
267
267
  return {
268
268
  log: T((n, o, r = ft.INFO) => {
269
- const s = Oo().VIRTUOSO_LOG_LEVEL ?? it(t);
270
- r >= s && console[Bo[r]](
269
+ const s = Ho().VIRTUOSO_LOG_LEVEL ?? it(t);
270
+ r >= s && console[Ro[r]](
271
271
  "%creact-virtuoso: %c%s %o",
272
272
  "color: #0253b3; font-weight: bold",
273
273
  "color: initial",
@@ -280,28 +280,21 @@ const ft = {
280
280
  },
281
281
  [],
282
282
  { singleton: !0 }
283
- ), Ve = /* @__PURE__ */ new WeakMap();
284
- function Mn(t) {
283
+ );
284
+ function Eo(t) {
285
285
  return "self" in t ? t.document.documentElement : t;
286
286
  }
287
- function Lo(t) {
288
- const e = Mn(t), n = Ve.get(e);
289
- if (n !== void 0)
290
- return n;
291
- const o = e.ownerDocument.defaultView.getComputedStyle(e).direction === "rtl";
292
- return Ve.set(e, o), o;
287
+ function Pn(t) {
288
+ const e = Eo(t);
289
+ return e.ownerDocument.defaultView.getComputedStyle(e).direction === "rtl";
293
290
  }
294
- function hn(t) {
295
- Ve.delete(Mn(t));
291
+ function _t(t, e) {
292
+ return Pn(t) ? -e : e;
296
293
  }
297
- function An(t, e) {
298
- return Lo(t) ? -e : e;
299
- }
300
- const _t = An;
301
- function gn(t, e) {
302
- return An(t, e);
294
+ function hn(t, e) {
295
+ return Pn(t) ? -e : e;
303
296
  }
304
- function Lt(t, e, n) {
297
+ function kt(t, e, n) {
305
298
  return De(t, e, n).callbackRef;
306
299
  }
307
300
  function De(t, e, n) {
@@ -319,10 +312,10 @@ function De(t, e, n) {
319
312
  i && e ? (s?.observe(i), o.current = i) : (o.current && s?.unobserve(o.current), o.current = null);
320
313
  }, { callbackRef: r, ref: o };
321
314
  }
322
- function _n(t, e, n, o, r, s, i, l, c) {
315
+ function Gn(t, e, n, o, r, s, i, l, c) {
323
316
  const d = E.useCallback(
324
317
  (m) => {
325
- const v = ko(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
318
+ const v = Bo(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
326
319
  let p = m.parentElement;
327
320
  for (; p.dataset.virtuosoScroller === void 0; )
328
321
  p = p.parentElement;
@@ -335,14 +328,14 @@ function _n(t, e, n, o, r, s, i, l, c) {
335
328
  scrollTop: Math.max(f, 0),
336
329
  viewportHeight: h
337
330
  }), s?.(
338
- l ? In("column-gap", getComputedStyle(m).columnGap, r) : In("row-gap", getComputedStyle(m).rowGap, r)
331
+ l ? gn("column-gap", getComputedStyle(m).columnGap, r) : gn("row-gap", getComputedStyle(m).rowGap, r)
339
332
  ), v !== null && t(v);
340
333
  },
341
334
  [t, e, r, s, i, o, l]
342
335
  );
343
336
  return De(d, n, c);
344
337
  }
345
- function ko(t, e, n, o) {
338
+ function Bo(t, e, n, o) {
346
339
  const r = t.length;
347
340
  if (r === 0)
348
341
  return null;
@@ -359,7 +352,7 @@ function ko(t, e, n, o) {
359
352
  }
360
353
  return s;
361
354
  }
362
- function In(t, e, n) {
355
+ function gn(t, e, n) {
363
356
  return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
364
357
  }
365
358
  function $e(t, e, n) {
@@ -444,7 +437,7 @@ const It = j(
444
437
  [],
445
438
  { singleton: !0 }
446
439
  ), se = { lvl: 0 };
447
- function Nn(t, e) {
440
+ function An(t, e) {
448
441
  const n = t.length;
449
442
  if (n === 0)
450
443
  return [];
@@ -475,7 +468,7 @@ function Rt(t, e, n = "k") {
475
468
  return Rt(t.l, e, n);
476
469
  }
477
470
  function vt(t, e, n) {
478
- return J(t) ? Un(e, n, 1) : e === t.k ? dt(t, { k: e, v: n }) : e < t.k ? Sn(dt(t, { l: vt(t.l, e, n) })) : Sn(dt(t, { r: vt(t.r, e, n) }));
471
+ return J(t) ? Nn(e, n, 1) : e === t.k ? dt(t, { k: e, v: n }) : e < t.k ? In(dt(t, { l: vt(t.l, e, n) })) : In(dt(t, { r: vt(t.r, e, n) }));
479
472
  }
480
473
  function Yt() {
481
474
  return se;
@@ -484,9 +477,9 @@ function Zt(t, e, n) {
484
477
  if (J(t))
485
478
  return [];
486
479
  const o = Rt(t, e)[0];
487
- return zo(Pe(t, o, n));
480
+ return Oo(We(t, o, n));
488
481
  }
489
- function We(t, e) {
482
+ function Ve(t, e) {
490
483
  if (J(t))
491
484
  return se;
492
485
  const { k: n, l: o, r } = t;
@@ -495,20 +488,20 @@ function We(t, e) {
495
488
  return r;
496
489
  if (J(r))
497
490
  return o;
498
- const [s, i] = $n(o);
499
- return xe(dt(t, { k: s, l: Dn(o), v: i }));
491
+ const [s, i] = _n(o);
492
+ return xe(dt(t, { k: s, l: Mn(o), v: i }));
500
493
  }
501
- return e < n ? xe(dt(t, { l: We(o, e) })) : xe(dt(t, { r: We(r, e) }));
494
+ return e < n ? xe(dt(t, { l: Ve(o, e) })) : xe(dt(t, { r: Ve(r, e) }));
502
495
  }
503
496
  function Nt(t) {
504
497
  return J(t) ? [] : [...Nt(t.l), { k: t.k, v: t.v }, ...Nt(t.r)];
505
498
  }
506
- function Pe(t, e, n) {
499
+ function We(t, e, n) {
507
500
  if (J(t))
508
501
  return [];
509
502
  const { k: o, l: r, r: s, v: i } = t;
510
503
  let l = [];
511
- return o > e && (l = l.concat(Pe(r, e, n))), o >= e && o <= n && l.push({ k: o, v: i }), o <= n && (l = l.concat(Pe(s, e, n))), l;
504
+ return o > e && (l = l.concat(We(r, e, n))), o >= e && o <= n && l.push({ k: o, v: i }), o <= n && (l = l.concat(We(s, e, n))), l;
512
505
  }
513
506
  function xe(t) {
514
507
  const { l: e, lvl: n, r: o } = t;
@@ -516,7 +509,7 @@ function xe(t) {
516
509
  return t;
517
510
  if (n > o.lvl + 1) {
518
511
  if (Be(e))
519
- return Kn(dt(t, { lvl: n - 1 }));
512
+ return Dn(dt(t, { lvl: n - 1 }));
520
513
  if (!J(e) && !J(e.r))
521
514
  return dt(e.r, {
522
515
  l: dt(e, { r: e.r.l }),
@@ -529,7 +522,7 @@ function xe(t) {
529
522
  throw new Error("Unexpected empty nodes");
530
523
  }
531
524
  if (Be(t))
532
- return Ge(dt(t, { lvl: n - 1 }));
525
+ return Pe(dt(t, { lvl: n - 1 }));
533
526
  if (!J(o) && !J(o.l)) {
534
527
  const r = o.l, s = Be(r) ? o.lvl - 1 : o.lvl;
535
528
  return dt(r, {
@@ -538,13 +531,13 @@ function xe(t) {
538
531
  r: r.l
539
532
  }),
540
533
  lvl: r.lvl + 1,
541
- r: Ge(dt(o, { l: r.r, lvl: s }))
534
+ r: Pe(dt(o, { l: r.r, lvl: s }))
542
535
  });
543
536
  }
544
537
  throw new Error("Unexpected empty nodes");
545
538
  }
546
539
  function dt(t, e) {
547
- return Un(
540
+ return Nn(
548
541
  e.k === void 0 ? t.k : e.k,
549
542
  e.v === void 0 ? t.v : e.v,
550
543
  e.lvl === void 0 ? t.lvl : e.lvl,
@@ -552,33 +545,33 @@ function dt(t, e) {
552
545
  e.r === void 0 ? t.r : e.r
553
546
  );
554
547
  }
555
- function Dn(t) {
556
- return J(t.r) ? t.l : xe(dt(t, { r: Dn(t.r) }));
548
+ function Mn(t) {
549
+ return J(t.r) ? t.l : xe(dt(t, { r: Mn(t.r) }));
557
550
  }
558
551
  function Be(t) {
559
552
  return J(t) || t.lvl > t.r.lvl;
560
553
  }
561
- function $n(t) {
562
- return J(t.r) ? [t.k, t.v] : $n(t.r);
554
+ function _n(t) {
555
+ return J(t.r) ? [t.k, t.v] : _n(t.r);
563
556
  }
564
- function Un(t, e, n, o = se, r = se) {
557
+ function Nn(t, e, n, o = se, r = se) {
565
558
  return { k: t, l: o, lvl: n, r, v: e };
566
559
  }
567
- function Sn(t) {
568
- return Ge(Kn(t));
560
+ function In(t) {
561
+ return Pe(Dn(t));
569
562
  }
570
- function Kn(t) {
563
+ function Dn(t) {
571
564
  const { l: e } = t;
572
565
  return !J(e) && e.lvl === t.lvl ? dt(e, { r: dt(t, { l: e.r }) }) : t;
573
566
  }
574
- function Ge(t) {
567
+ function Pe(t) {
575
568
  const { lvl: e, r: n } = t;
576
569
  return !J(n) && !J(n.r) && n.lvl === e && n.r.lvl === e ? dt(n, { l: dt(t, { r: n.l }), lvl: e + 1 }) : t;
577
570
  }
578
- function zo(t) {
579
- return Nn(t, ({ k: e, v: n }) => ({ index: e, value: n }));
571
+ function Oo(t) {
572
+ return An(t, ({ k: e, v: n }) => ({ index: e, value: n }));
580
573
  }
581
- function jn(t, e) {
574
+ function $n(t, e) {
582
575
  return !!(t && t.startIndex === e.startIndex && t.endIndex === e.endIndex);
583
576
  }
584
577
  function le(t, e) {
@@ -589,7 +582,7 @@ const Ue = j(
589
582
  [],
590
583
  { singleton: !0 }
591
584
  );
592
- function qn(t, e, n) {
585
+ function Un(t, e, n) {
593
586
  return t[Te(t, e, n)];
594
587
  }
595
588
  function Te(t, e, n, o = 0) {
@@ -610,7 +603,7 @@ function Te(t, e, n, o = 0) {
610
603
  }
611
604
  throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`);
612
605
  }
613
- function Fo(t, e, n, o) {
606
+ function ko(t, e, n, o) {
614
607
  const r = Te(t, e, o), s = Te(t, n, o, r);
615
608
  return t.slice(r, s + 1);
616
609
  }
@@ -623,7 +616,7 @@ function be(t) {
623
616
  function Ke({ index: t }, e) {
624
617
  return e === t ? 0 : e < t ? -1 : 1;
625
618
  }
626
- function Vo() {
619
+ function Lo() {
627
620
  return {
628
621
  groupIndices: [],
629
622
  groupOffsetTree: Yt(),
@@ -634,7 +627,7 @@ function Vo() {
634
627
  sizeTree: Yt()
635
628
  };
636
629
  }
637
- function Wo(t, e) {
630
+ function zo(t, e) {
638
631
  let n = J(t) ? 0 : 1 / 0;
639
632
  for (const o of e) {
640
633
  const { endIndex: r, size: s, startIndex: i } = o;
@@ -643,28 +636,28 @@ function Wo(t, e) {
643
636
  continue;
644
637
  }
645
638
  const l = Zt(t, i - 1, r + 1);
646
- if (l.some(Do(o)))
639
+ if (l.some(Mo(o)))
647
640
  continue;
648
641
  let c = !1, d = !1;
649
642
  for (const { end: m, start: v, value: p } of l)
650
- c ? (r >= v || s === p) && (t = We(t, v)) : (d = p !== s, c = !0), m > r && r >= v && p !== s && (t = vt(t, r + 1, p));
643
+ c ? (r >= v || s === p) && (t = Ve(t, v)) : (d = p !== s, c = !0), m > r && r >= v && p !== s && (t = vt(t, r + 1, p));
651
644
  d && (t = vt(t, i, s));
652
645
  }
653
646
  return [t, n];
654
647
  }
655
- function Po(t) {
648
+ function Fo(t) {
656
649
  return t.groupIndex !== void 0;
657
650
  }
658
- function Go({ offset: t }, e) {
651
+ function Vo({ offset: t }, e) {
659
652
  return e === t ? 0 : e < t ? -1 : 1;
660
653
  }
661
654
  function ce(t, e, n) {
662
655
  if (e.length === 0)
663
656
  return 0;
664
- const { index: o, offset: r, size: s } = qn(e, t, Ke), i = t - o, l = s * i + (i - 1) * n + r;
657
+ const { index: o, offset: r, size: s } = Un(e, t, Ke), i = t - o, l = s * i + (i - 1) * n + r;
665
658
  return l > 0 ? l + n : l;
666
659
  }
667
- function Yn(t, e) {
660
+ function Kn(t, e) {
668
661
  if (!be(e))
669
662
  return t;
670
663
  let n = 0;
@@ -672,17 +665,17 @@ function Yn(t, e) {
672
665
  n++;
673
666
  return t + n;
674
667
  }
675
- function Zn(t, e, n) {
676
- if (Po(t))
668
+ function jn(t, e, n) {
669
+ if (Fo(t))
677
670
  return e.groupIndices[t.groupIndex] + 1;
678
671
  const o = t.index === "LAST" ? n : t.index;
679
- let r = Yn(o, e);
672
+ let r = Kn(o, e);
680
673
  return r = Math.max(0, Math.min(n, r)), r;
681
674
  }
682
- function Mo(t, e, n, o = 0) {
683
- return o > 0 && (e = Math.max(e, qn(t, o, Ke).offset)), Nn(Fo(t, e, n, Go), No);
675
+ function Wo(t, e, n, o = 0) {
676
+ return o > 0 && (e = Math.max(e, Un(t, o, Ke).offset)), An(ko(t, e, n, Vo), Ao);
684
677
  }
685
- function Ao(t, [e, n, o, r]) {
678
+ function Po(t, [e, n, o, r]) {
686
679
  e.length > 0 && o("received item sizes", e, ft.DEBUG);
687
680
  const s = t.sizeTree;
688
681
  let i = s, l = 0;
@@ -690,10 +683,10 @@ function Ao(t, [e, n, o, r]) {
690
683
  const p = e[0].size, I = e[1].size;
691
684
  i = n.reduce((w, R) => vt(vt(w, R, p), R + 1, I), i);
692
685
  } else
693
- [i, l] = Wo(i, e);
686
+ [i, l] = zo(i, e);
694
687
  if (i === s)
695
688
  return t;
696
- const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: v } = Me(t.offsetTree, l, i, r);
689
+ const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: v } = Ge(t.offsetTree, l, i, r);
697
690
  return {
698
691
  groupIndices: n,
699
692
  groupOffsetTree: n.reduce((p, I) => vt(p, I, ce(I, v, r)), Yt()),
@@ -704,19 +697,19 @@ function Ao(t, [e, n, o, r]) {
704
697
  sizeTree: i
705
698
  };
706
699
  }
707
- function _o(t) {
700
+ function Go(t) {
708
701
  return Nt(t).map(({ k: e, v: n }, o, r) => {
709
702
  const s = r[o + 1];
710
703
  return { endIndex: s === void 0 ? 1 / 0 : s.k - 1, size: n, startIndex: e };
711
704
  });
712
705
  }
713
- function xn(t, e) {
706
+ function Sn(t, e) {
714
707
  let n = 0, o = 0;
715
708
  for (; n < t; )
716
709
  n += e[o + 1] - e[o] - 1, o++;
717
710
  return o - (n === t ? 0 : 1);
718
711
  }
719
- function Me(t, e, n, o) {
712
+ function Ge(t, e, n, o) {
720
713
  let r = t, s = 0, i = 0, l = 0, c = 0;
721
714
  if (e === 0)
722
715
  r = [];
@@ -740,20 +733,20 @@ function Me(t, e, n, o) {
740
733
  offsetTree: r
741
734
  };
742
735
  }
743
- function No(t) {
736
+ function Ao(t) {
744
737
  return { index: t.index, value: t };
745
738
  }
746
- function Do(t) {
739
+ function Mo(t) {
747
740
  const { endIndex: e, size: n, startIndex: o } = t;
748
741
  return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
749
742
  }
750
- const $o = {
743
+ const _o = {
751
744
  offsetHeight: "height",
752
745
  offsetWidth: "width"
753
- }, kt = j(
746
+ }, Lt = j(
754
747
  ([{ log: t }, { recalcInProgress: e }]) => {
755
- const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u, $o[g])), w = T(void 0), R = T(0), h = Vo(), f = ht(
756
- x(n, $(c, t, R), Ot(Ao, h), nt()),
748
+ const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u, _o[g])), w = T(void 0), R = T(0), h = Lo(), f = ht(
749
+ x(n, $(c, t, R), Ot(Po, h), nt()),
757
750
  h
758
751
  ), a = ht(
759
752
  x(
@@ -773,11 +766,11 @@ const $o = {
773
766
  P((u) => u.length > 0),
774
767
  $(f, R),
775
768
  B(([u, g, C]) => {
776
- const k = u.reduce((O, V, N) => vt(O, V, ce(V, g.offsetTree, C) || N), Yt());
769
+ const L = u.reduce((O, V, N) => vt(O, V, ce(V, g.offsetTree, C) || N), Yt());
777
770
  return {
778
771
  ...g,
779
772
  groupIndices: u,
780
- groupOffsetTree: k
773
+ groupOffsetTree: L
781
774
  };
782
775
  })
783
776
  ),
@@ -823,19 +816,19 @@ const $o = {
823
816
  P((u) => u !== void 0 && u.length > 0 && J(it(f).sizeTree)),
824
817
  B((u) => {
825
818
  const g = [];
826
- let C = u[0], k = 0;
819
+ let C = u[0], L = 0;
827
820
  for (let O = 1; O < u.length; O++) {
828
821
  const V = u[O];
829
822
  V !== C && (g.push({
830
823
  endIndex: O - 1,
831
824
  size: C,
832
- startIndex: k
833
- }), C = V, k = O);
825
+ startIndex: L
826
+ }), C = V, L = O);
834
827
  }
835
828
  return g.push({
836
829
  endIndex: u.length - 1,
837
830
  size: C,
838
- startIndex: k
831
+ startIndex: L
839
832
  }), g;
840
833
  })
841
834
  ),
@@ -846,20 +839,20 @@ const $o = {
846
839
  $(v, m),
847
840
  P(([, u, g]) => u !== void 0 && g !== void 0),
848
841
  B(([u, g, C]) => {
849
- const k = [];
842
+ const L = [];
850
843
  for (let O = 0; O < u.length; O++) {
851
844
  const V = u[O], N = u[O + 1];
852
- k.push({
845
+ L.push({
853
846
  startIndex: V,
854
847
  endIndex: V,
855
848
  size: g
856
- }), N !== void 0 && k.push({
849
+ }), N !== void 0 && L.push({
857
850
  startIndex: V + 1,
858
851
  endIndex: N - 1,
859
852
  size: C
860
853
  });
861
854
  }
862
- return k;
855
+ return L;
863
856
  })
864
857
  ),
865
858
  n
@@ -890,10 +883,10 @@ const $o = {
890
883
  (u) => {
891
884
  const { groupIndices: g } = it(f);
892
885
  if (u > 0)
893
- _(e, !0), _(s, u + xn(u, g));
886
+ M(e, !0), M(s, u + Sn(u, g));
894
887
  else if (u < 0) {
895
888
  const C = it(a);
896
- C.length > 0 && (u -= xn(-u, C)), _(i, u);
889
+ C.length > 0 && (u -= Sn(-u, C)), M(i, u);
897
890
  }
898
891
  }
899
892
  ), Y(x(l, $(t)), ([u, g]) => {
@@ -909,17 +902,17 @@ const $o = {
909
902
  s,
910
903
  $(f),
911
904
  B(([u, g]) => {
912
- const C = g.groupIndices.length > 0, k = [], O = g.lastSize;
905
+ const C = g.groupIndices.length > 0, L = [], O = g.lastSize;
913
906
  if (C) {
914
907
  const V = ie(g.sizeTree, 0);
915
908
  let N = 0, Z = 0;
916
909
  for (; N < u; ) {
917
910
  const q = g.groupIndices[Z], Q = g.groupIndices.length === Z + 1 ? 1 / 0 : g.groupIndices[Z + 1] - q - 1;
918
- k.push({
911
+ L.push({
919
912
  endIndex: q,
920
913
  size: V,
921
914
  startIndex: q
922
- }), k.push({
915
+ }), L.push({
923
916
  endIndex: q + 1 + Q - 1,
924
917
  size: O,
925
918
  startIndex: q + 1
@@ -928,8 +921,8 @@ const $o = {
928
921
  const F = Nt(g.sizeTree);
929
922
  return N !== u && F.shift(), F.reduce(
930
923
  (q, { k: Q, v: gt }) => {
931
- let ut = q.ranges;
932
- return q.prevSize !== 0 && (ut = [
924
+ let lt = q.ranges;
925
+ return q.prevSize !== 0 && (lt = [
933
926
  ...q.ranges,
934
927
  {
935
928
  endIndex: Q + u - 1,
@@ -939,13 +932,13 @@ const $o = {
939
932
  ]), {
940
933
  prevIndex: Q + u,
941
934
  prevSize: gt,
942
- ranges: ut
935
+ ranges: lt
943
936
  };
944
937
  },
945
938
  {
946
939
  prevIndex: u,
947
940
  prevSize: 0,
948
- ranges: k
941
+ ranges: L
949
942
  }
950
943
  ).ranges;
951
944
  }
@@ -965,13 +958,13 @@ const $o = {
965
958
  ),
966
959
  n
967
960
  );
968
- const L = Tt(
961
+ const k = Tt(
969
962
  x(
970
963
  i,
971
964
  $(f, R),
972
965
  B(([u, { offsetTree: g }, C]) => {
973
- const k = -u;
974
- return ce(k, g, C);
966
+ const L = -u;
967
+ return ce(L, g, C);
975
968
  })
976
969
  )
977
970
  );
@@ -991,7 +984,7 @@ const $o = {
991
984
  const Q = N[F + 1] - mt - 1;
992
985
  F++, Z += Q + 1;
993
986
  }
994
- if (V = Nt(g.sizeTree).reduce((Q, { k: gt, v: ut }) => vt(Q, Math.max(0, gt + u), ut), V), Z !== -u) {
987
+ if (V = Nt(g.sizeTree).reduce((Q, { k: gt, v: lt }) => vt(Q, Math.max(0, gt + u), lt), V), Z !== -u) {
995
988
  const Q = ie(g.sizeTree, mt);
996
989
  V = vt(V, 0, Q);
997
990
  const gt = Rt(g.sizeTree, -u + 1)[1];
@@ -1000,14 +993,14 @@ const $o = {
1000
993
  return {
1001
994
  ...g,
1002
995
  sizeTree: V,
1003
- ...Me(g.offsetTree, 0, V, C)
996
+ ...Ge(g.offsetTree, 0, V, C)
1004
997
  };
1005
998
  }
1006
999
  const O = Nt(g.sizeTree).reduce((V, { k: N, v: Z }) => vt(V, Math.max(0, N + u), Z), Yt());
1007
1000
  return {
1008
1001
  ...g,
1009
1002
  sizeTree: O,
1010
- ...Me(g.offsetTree, 0, O, C)
1003
+ ...Ge(g.offsetTree, 0, O, C)
1011
1004
  };
1012
1005
  })
1013
1006
  ),
@@ -1026,7 +1019,7 @@ const $o = {
1026
1019
  itemSize: I,
1027
1020
  listRefresh: H,
1028
1021
  shiftWith: i,
1029
- shiftWithOffset: L,
1022
+ shiftWithOffset: k,
1030
1023
  sizeRanges: n,
1031
1024
  // output
1032
1025
  sizes: f,
@@ -1039,7 +1032,7 @@ const $o = {
1039
1032
  rt(Gt, Ue),
1040
1033
  { singleton: !0 }
1041
1034
  );
1042
- function Uo(t) {
1035
+ function No(t) {
1043
1036
  return t.reduce(
1044
1037
  (e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
1045
1038
  {
@@ -1048,9 +1041,9 @@ function Uo(t) {
1048
1041
  }
1049
1042
  );
1050
1043
  }
1051
- const Xn = j(
1044
+ const qn = j(
1052
1045
  ([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
1053
- const s = U(), i = U(), l = Tt(x(s, B(Uo)));
1046
+ const s = U(), i = U(), l = Tt(x(s, B(No)));
1054
1047
  return z(
1055
1048
  x(
1056
1049
  l,
@@ -1074,8 +1067,8 @@ const Xn = j(
1074
1067
  i
1075
1068
  ), { groupCounts: s, topItemsIndexes: i };
1076
1069
  },
1077
- rt(kt, It)
1078
- ), Mt = j(
1070
+ rt(Lt, It)
1071
+ ), At = j(
1079
1072
  ([{ log: t }]) => {
1080
1073
  const e = T(!1), n = Tt(
1081
1074
  x(
@@ -1090,10 +1083,10 @@ const Xn = j(
1090
1083
  },
1091
1084
  rt(Gt),
1092
1085
  { singleton: !0 }
1093
- ), Ko = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1094
- function Jn(t) {
1086
+ ), Do = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1087
+ function Yn(t) {
1095
1088
  const e = typeof t == "number" ? { index: t } : { ...t };
1096
- return e.align || (e.align = "start"), (!e.behavior || !Ko) && (e.behavior = "auto"), e.offset === void 0 && (e.offset = 0), e;
1089
+ return e.align || (e.align = "start"), (!e.behavior || !Do) && (e.behavior = "auto"), e.offset === void 0 && (e.offset = 0), e;
1097
1090
  }
1098
1091
  const fe = j(
1099
1092
  ([
@@ -1113,7 +1106,7 @@ const fe = j(
1113
1106
  const I = U(), w = U(), R = T(0);
1114
1107
  let h = null, f = null, a = null;
1115
1108
  function S() {
1116
- h !== null && (h(), h = null), a !== null && (a(), a = null), f && (clearTimeout(f), f = null), _(c, !1);
1109
+ h !== null && (h(), h = null), a !== null && (a(), a = null), f && (clearTimeout(f), f = null), M(c, !1);
1117
1110
  }
1118
1111
  return z(
1119
1112
  x(
@@ -1122,16 +1115,16 @@ const fe = j(
1122
1115
  $(t, s, r),
1123
1116
  B(
1124
1117
  ([
1125
- [H, y, L, u, g, C, k, O],
1118
+ [H, y, k, u, g, C, L, O],
1126
1119
  V,
1127
1120
  N,
1128
1121
  Z
1129
1122
  ]) => {
1130
- const F = Jn(H), { align: mt, behavior: q, offset: Q } = F, gt = u - 1, ut = Zn(F, y, gt);
1131
- let St = ce(ut, y.offsetTree, V) + C;
1132
- mt === "end" ? (St += N + Rt(y.sizeTree, ut)[1] - L + Z, ut === gt && (St += k)) : mt === "center" ? St += (N + Rt(y.sizeTree, ut)[1] - L + Z) / 2 : St -= g, Q !== void 0 && Q !== 0 && (St += Q);
1123
+ const F = Yn(H), { align: mt, behavior: q, offset: Q } = F, gt = u - 1, lt = jn(F, y, gt);
1124
+ let St = ce(lt, y.offsetTree, V) + C;
1125
+ mt === "end" ? (St += N + Rt(y.sizeTree, lt)[1] - k + Z, lt === gt && (St += L)) : mt === "center" ? St += (N + Rt(y.sizeTree, lt)[1] - k + Z) / 2 : St -= g, Q !== void 0 && Q !== 0 && (St += Q);
1133
1126
  const Ft = (pt) => {
1134
- S(), pt ? (O("retrying to scroll to", { location: H }, ft.DEBUG), _(I, H)) : (_(w, !0), O("list did not change, scroll successful", {}, ft.DEBUG));
1127
+ S(), pt ? (O("retrying to scroll to", { location: H }, ft.DEBUG), M(I, H)) : (M(w, !0), O("list did not change, scroll successful", {}, ft.DEBUG));
1135
1128
  };
1136
1129
  if (S(), q === "smooth") {
1137
1130
  let pt = !1;
@@ -1141,10 +1134,10 @@ const fe = j(
1141
1134
  Ft(pt);
1142
1135
  });
1143
1136
  } else
1144
- h = yt(x(e, jo(150)), Ft);
1137
+ h = yt(x(e, $o(150)), Ft);
1145
1138
  return f = setTimeout(() => {
1146
1139
  S();
1147
- }, 1200), _(c, !0), O("scrolling from index to", { behavior: q, index: ut, top: St }, ft.DEBUG), { behavior: q, top: St };
1140
+ }, 1200), M(c, !0), O("scrolling from index to", { behavior: q, index: lt, top: St }, ft.DEBUG), { behavior: q, top: St };
1148
1141
  }
1149
1142
  )
1150
1143
  ),
@@ -1155,10 +1148,10 @@ const fe = j(
1155
1148
  topListHeight: R
1156
1149
  };
1157
1150
  },
1158
- rt(kt, It, Gt),
1151
+ rt(Lt, It, Gt),
1159
1152
  { singleton: !0 }
1160
1153
  );
1161
- function jo(t) {
1154
+ function $o(t) {
1162
1155
  return (e) => {
1163
1156
  const n = setTimeout(() => {
1164
1157
  e(!1);
@@ -1174,11 +1167,13 @@ function je(t, e) {
1174
1167
  });
1175
1168
  }
1176
1169
  function qe(t, e) {
1170
+ if (t === void 0)
1171
+ return 0;
1177
1172
  const n = e - 1, o = typeof t == "number" ? t : t.index === "LAST" ? n : t.index;
1178
1173
  return Math.max(0, Math.min(o, n));
1179
1174
  }
1180
- function vn(t) {
1181
- return typeof t == "number" ? t === 0 : t.index === 0 && (t.align === void 0 || t.align === "start") && (t.offset === void 0 || t.offset === 0);
1175
+ function Ae(t) {
1176
+ 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);
1182
1177
  }
1183
1178
  const me = j(
1184
1179
  ([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
@@ -1187,7 +1182,7 @@ const me = j(
1187
1182
  x(
1188
1183
  i,
1189
1184
  $(c),
1190
- P(([m, v]) => !vn(v)),
1185
+ P(([m, v]) => !Ae(v)),
1191
1186
  Bt(!1)
1192
1187
  ),
1193
1188
  l
@@ -1195,7 +1190,7 @@ const me = j(
1195
1190
  x(
1196
1191
  i,
1197
1192
  $(c),
1198
- P(([m, v]) => !vn(v)),
1193
+ P(([m, v]) => !Ae(v)),
1199
1194
  Bt(!1)
1200
1195
  ),
1201
1196
  d
@@ -1207,12 +1202,16 @@ const me = j(
1207
1202
  $(c)
1208
1203
  ),
1209
1204
  ([, m]) => {
1205
+ if (m === void 0) {
1206
+ M(l, !0), M(d, !0);
1207
+ return;
1208
+ }
1210
1209
  yt(r, () => {
1211
- _(d, !0);
1210
+ M(d, !0);
1212
1211
  }), je(4, () => {
1213
1212
  yt(o, () => {
1214
- _(l, !0);
1215
- }), _(s, m);
1213
+ M(l, !0);
1214
+ }), M(s, m);
1216
1215
  });
1217
1216
  }
1218
1217
  ), {
@@ -1221,13 +1220,13 @@ const me = j(
1221
1220
  scrolledToInitialItem: l
1222
1221
  };
1223
1222
  },
1224
- rt(kt, It, fe, Mt),
1223
+ rt(Lt, It, fe, At),
1225
1224
  { singleton: !0 }
1226
1225
  );
1227
- function Qn(t, e) {
1226
+ function Zn(t, e) {
1228
1227
  return Math.abs(t - e) < 1.01;
1229
1228
  }
1230
- const ue = "up", ne = "down", qo = "none", Yo = {
1229
+ const ue = "up", ne = "down", Uo = "none", Ko = {
1231
1230
  atBottom: !1,
1232
1231
  notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
1233
1232
  state: {
@@ -1236,8 +1235,8 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1236
1235
  scrollTop: 0,
1237
1236
  viewportHeight: 0
1238
1237
  }
1239
- }, Zo = 0, pe = j(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1240
- const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(Zo), p = ht(
1238
+ }, jo = 0, pe = j(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1239
+ const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(jo), p = ht(
1241
1240
  x(
1242
1241
  Fe(x(W(r), Ut(1), Bt(!0)), x(W(r), Ut(1), Bt(!1), pn(100))),
1243
1242
  nt()
@@ -1258,8 +1257,8 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1258
1257
  const w = Tt(
1259
1258
  x(
1260
1259
  at(o, W(s), W(e), W(t), W(m)),
1261
- Ot((a, [{ scrollHeight: S, scrollTop: H }, y, L, u, g]) => {
1262
- const C = H + y - S > -g, k = {
1260
+ Ot((a, [{ scrollHeight: S, scrollTop: H }, y, k, u, g]) => {
1261
+ const C = H + y - S > -g, L = {
1263
1262
  scrollHeight: S,
1264
1263
  scrollTop: H,
1265
1264
  viewportHeight: y
@@ -1270,16 +1269,16 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1270
1269
  atBottom: !0,
1271
1270
  atBottomBecause: V,
1272
1271
  scrollTopDelta: N,
1273
- state: k
1272
+ state: L
1274
1273
  };
1275
1274
  }
1276
1275
  let O;
1277
- return k.scrollHeight > a.state.scrollHeight ? O = "SIZE_INCREASED" : y < a.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : H < a.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1276
+ return L.scrollHeight > a.state.scrollHeight ? O = "SIZE_INCREASED" : y < a.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : H < a.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1278
1277
  atBottom: !1,
1279
1278
  notAtBottomBecause: O,
1280
- state: k
1279
+ state: L
1281
1280
  };
1282
- }, Yo),
1281
+ }, Ko),
1283
1282
  nt((a, S) => a !== void 0 && a.atBottom === S.atBottom)
1284
1283
  )
1285
1284
  ), R = ht(
@@ -1287,9 +1286,9 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1287
1286
  o,
1288
1287
  Ot(
1289
1288
  (a, { scrollHeight: S, scrollTop: H, viewportHeight: y }) => {
1290
- if (!Qn(a.scrollHeight, S)) {
1291
- const L = S - (H + y) < 1;
1292
- return a.scrollTop !== H && L ? {
1289
+ if (!Zn(a.scrollHeight, S)) {
1290
+ const k = S - (H + y) < 1;
1291
+ return a.scrollTop !== H && k ? {
1293
1292
  changed: !0,
1294
1293
  jump: a.scrollTop - H,
1295
1294
  scrollHeight: S,
@@ -1335,7 +1334,7 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1335
1334
  B((a) => a.direction)
1336
1335
  ),
1337
1336
  h
1338
- ), z(x(o, zt(50), Bt(qo)), h);
1337
+ ), z(x(o, zt(50), Bt(Uo)), h);
1339
1338
  const f = T(0);
1340
1339
  return z(
1341
1340
  x(
@@ -1367,11 +1366,11 @@ const ue = "up", ne = "down", qo = "none", Yo = {
1367
1366
  scrollDirection: h,
1368
1367
  scrollVelocity: f
1369
1368
  };
1370
- }, rt(It)), ae = "top", de = "bottom", Tn = "none";
1371
- function Cn(t, e, n) {
1369
+ }, rt(It)), ae = "top", de = "bottom", xn = "none";
1370
+ function vn(t, e, n) {
1372
1371
  return typeof t == "number" ? n === ue && e === ae || n === ne && e === de ? t : 0 : n === ue ? e === ae ? t.main : t.reverse : e === de ? t.main : t.reverse;
1373
1372
  }
1374
- function wn(t, e) {
1373
+ function Tn(t, e) {
1375
1374
  return typeof t == "number" ? t : t[e] ?? 0;
1376
1375
  }
1377
1376
  const Ye = j(
@@ -1401,12 +1400,12 @@ const Ye = j(
1401
1400
  a,
1402
1401
  S
1403
1402
  ]) => {
1404
- const H = m - a, y = h + f, L = Math.max(p - H, 0);
1405
- let u = Tn;
1406
- const g = wn(S, ae), C = wn(S, de);
1407
- return I -= a, I += p + f, w += p + f, w -= a, I > m + y - g && (u = ue), w < m - L + v + C && (u = ne), u !== Tn ? [
1408
- Math.max(H - p - Cn(R, ae, u) - g, 0),
1409
- H - L - f + v + Cn(R, de, u) + C
1403
+ const H = m - a, y = h + f, k = Math.max(p - H, 0);
1404
+ let u = xn;
1405
+ const g = Tn(S, ae), C = Tn(S, de);
1406
+ return I -= a, I += p + f, w += p + f, w -= a, I > m + y - g && (u = ue), w < m - k + v + C && (u = ne), u !== xn ? [
1407
+ Math.max(H - p - vn(R, ae, u) - g, 0),
1408
+ H - k - f + v + vn(R, de, u) + C
1410
1409
  ] : null;
1411
1410
  }
1412
1411
  ),
@@ -1428,9 +1427,9 @@ const Ye = j(
1428
1427
  rt(It),
1429
1428
  { singleton: !0 }
1430
1429
  );
1431
- function Xo(t, e, n) {
1430
+ function qo(t, e, n) {
1432
1431
  if (be(e)) {
1433
- const o = Yn(t, e);
1432
+ const o = Kn(t, e);
1434
1433
  return [
1435
1434
  { index: Rt(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
1436
1435
  { data: n?.[0], index: o, offset: 0, size: 0 }
@@ -1461,16 +1460,16 @@ function ve(t, e, n, o, r, s) {
1461
1460
  return {
1462
1461
  bottom: m,
1463
1462
  firstItemIndex: s,
1464
- items: yn(t, r, s),
1463
+ items: Cn(t, r, s),
1465
1464
  offsetBottom: w,
1466
1465
  offsetTop: d,
1467
1466
  top: I,
1468
- topItems: yn(e, r, s),
1467
+ topItems: Cn(e, r, s),
1469
1468
  topListHeight: e.reduce((R, h) => h.size + R, 0),
1470
1469
  totalCount: n
1471
1470
  };
1472
1471
  }
1473
- function to(t, e, n, o, r, s) {
1472
+ function Xn(t, e, n, o, r, s) {
1474
1473
  let i = 0;
1475
1474
  if (n.groupIndices.length > 0)
1476
1475
  for (const m of n.groupIndices) {
@@ -1486,7 +1485,7 @@ function to(t, e, n, o, r, s) {
1486
1485
  }));
1487
1486
  return ve(d, [], l, r, n, o);
1488
1487
  }
1489
- function yn(t, e, n) {
1488
+ function Cn(t, e, n) {
1490
1489
  if (t.length === 0)
1491
1490
  return [];
1492
1491
  if (!be(e))
@@ -1512,7 +1511,7 @@ function yn(t, e, n) {
1512
1511
  }
1513
1512
  return s;
1514
1513
  }
1515
- function bn(t, e) {
1514
+ function wn(t, e) {
1516
1515
  return t === void 0 ? 0 : typeof t == "number" ? t : t[e] ?? 0;
1517
1516
  }
1518
1517
  const Kt = j(
@@ -1544,8 +1543,8 @@ const Kt = j(
1544
1543
  W(a),
1545
1544
  t
1546
1545
  ),
1547
- P(([u, g, , C, , , , , , , , k]) => {
1548
- const O = k !== void 0 && k.length !== C;
1546
+ P(([u, g, , C, , , , , , , , L]) => {
1547
+ const O = L !== void 0 && L.length !== C;
1549
1548
  return u && !g && !O;
1550
1549
  }),
1551
1550
  B(
@@ -1554,7 +1553,7 @@ const Kt = j(
1554
1553
  ,
1555
1554
  [u, g],
1556
1555
  C,
1557
- k,
1556
+ L,
1558
1557
  O,
1559
1558
  V,
1560
1559
  N,
@@ -1563,14 +1562,14 @@ const Kt = j(
1563
1562
  mt,
1564
1563
  q
1565
1564
  ]) => {
1566
- const Q = k, { offsetTree: gt, sizeTree: ut } = Q, St = it(h);
1565
+ const Q = L, { offsetTree: gt, sizeTree: lt } = Q, St = it(h);
1567
1566
  if (C === 0)
1568
1567
  return { ...Oe, totalCount: C };
1569
1568
  if (u === 0 && g === 0)
1570
- return St === 0 ? { ...Oe, totalCount: C } : to(St, O, k, Z, F, q || []);
1571
- if (J(ut))
1569
+ return St === 0 ? { ...Oe, totalCount: C } : Xn(St, O, L, Z, F, q || []);
1570
+ if (J(lt))
1572
1571
  return St > 0 ? null : ve(
1573
- Xo(qe(O, C), Q, q),
1572
+ qo(qe(O, C), Q, q),
1574
1573
  [],
1575
1574
  C,
1576
1575
  F,
@@ -1581,41 +1580,41 @@ const Kt = j(
1581
1580
  if (N.length > 0) {
1582
1581
  const D = N[0], K = N[N.length - 1];
1583
1582
  let st = 0;
1584
- for (const tt of Zt(ut, D, K)) {
1585
- const X = tt.value, lt = Math.max(tt.start, D), xt = Math.min(tt.end, K);
1586
- for (let ct = lt; ct <= xt; ct++)
1587
- Ft.push({ data: q?.[ct], index: ct, offset: st, size: X }), st += X;
1583
+ for (const tt of Zt(lt, D, K)) {
1584
+ const X = tt.value, ct = Math.max(tt.start, D), xt = Math.min(tt.end, K);
1585
+ for (let ut = ct; ut <= xt; ut++)
1586
+ Ft.push({ data: q?.[ut], index: ut, offset: st, size: X }), st += X;
1588
1587
  }
1589
1588
  }
1590
1589
  if (!V)
1591
1590
  return ve([], Ft, C, F, Q, Z);
1592
- const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt = Mo(gt, u, g, pt);
1591
+ const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt = Wo(gt, u, g, pt);
1593
1592
  if (jt.length === 0)
1594
1593
  return null;
1595
1594
  const Qt = C - 1, Et = ye([], (D) => {
1596
1595
  for (const K of jt) {
1597
1596
  const st = K.value;
1598
1597
  let tt = st.offset, X = K.start;
1599
- const lt = st.size;
1598
+ const ct = st.size;
1600
1599
  if (st.offset < u) {
1601
- X += Math.floor((u - st.offset + F) / (lt + F));
1602
- const ct = X - K.start;
1603
- tt += ct * lt + ct * F;
1600
+ X += Math.floor((u - st.offset + F) / (ct + F));
1601
+ const ut = X - K.start;
1602
+ tt += ut * ct + ut * F;
1604
1603
  }
1605
- X < pt && (tt += (pt - X) * lt, X = pt);
1604
+ X < pt && (tt += (pt - X) * ct, X = pt);
1606
1605
  const xt = Math.min(K.end, Qt);
1607
- for (let ct = X; ct <= xt && !(tt >= g); ct++)
1608
- D.push({ data: q?.[ct], index: ct, offset: tt, size: lt }), tt += lt + F;
1606
+ for (let ut = X; ut <= xt && !(tt >= g); ut++)
1607
+ D.push({ data: q?.[ut], index: ut, offset: tt, size: ct }), tt += ct + F;
1609
1608
  }
1610
- }), te = bn(mt, ae), b = bn(mt, de);
1609
+ }), te = wn(mt, ae), b = wn(mt, de);
1611
1610
  if (Et.length > 0 && (te > 0 || b > 0)) {
1612
1611
  const D = Et[0], K = Et[Et.length - 1];
1613
1612
  if (te > 0 && D.index > pt) {
1614
1613
  const st = Math.min(te, D.index - pt), tt = [];
1615
1614
  let X = D.offset;
1616
- for (let lt = D.index - 1; lt >= D.index - st; lt--) {
1617
- const ct = Zt(ut, lt, lt)[0]?.value ?? D.size;
1618
- X -= ct + F, tt.unshift({ data: q?.[lt], index: lt, offset: X, size: ct });
1615
+ for (let ct = D.index - 1; ct >= D.index - st; ct--) {
1616
+ const ut = Zt(lt, ct, ct)[0]?.value ?? D.size;
1617
+ X -= ut + F, tt.unshift({ data: q?.[ct], index: ct, offset: X, size: ut });
1619
1618
  }
1620
1619
  Et.unshift(...tt);
1621
1620
  }
@@ -1623,7 +1622,7 @@ const Kt = j(
1623
1622
  const st = Math.min(b, Qt - K.index);
1624
1623
  let tt = K.offset + K.size + F;
1625
1624
  for (let X = K.index + 1; X <= K.index + st; X++) {
1626
- const xt = Zt(ut, X, X)[0]?.value ?? K.size;
1625
+ const xt = Zt(lt, X, X)[0]?.value ?? K.size;
1627
1626
  Et.push({ data: q?.[X], index: X, offset: tt, size: xt }), tt += xt + F;
1628
1627
  }
1629
1628
  }
@@ -1681,7 +1680,7 @@ const Kt = j(
1681
1680
  B(({ items: u }) => u[0].index),
1682
1681
  nt()
1683
1682
  )
1684
- ), L = Tt(
1683
+ ), k = Tt(
1685
1684
  x(
1686
1685
  S,
1687
1686
  P(({ items: u }) => u.length > 0),
@@ -1697,7 +1696,7 @@ const Kt = j(
1697
1696
  startIndex: u[g].index
1698
1697
  };
1699
1698
  }),
1700
- nt(jn)
1699
+ nt($n)
1701
1700
  )
1702
1701
  );
1703
1702
  return {
@@ -1706,24 +1705,24 @@ const Kt = j(
1706
1705
  itemsRendered: f,
1707
1706
  listState: S,
1708
1707
  minOverscanItemCount: a,
1709
- rangeChanged: L,
1708
+ rangeChanged: k,
1710
1709
  startReached: y,
1711
1710
  topItemsIndexes: R,
1712
1711
  ...p
1713
1712
  };
1714
1713
  },
1715
1714
  rt(
1716
- kt,
1717
- Xn,
1715
+ Lt,
1716
+ qn,
1718
1717
  Ye,
1719
1718
  me,
1720
1719
  fe,
1721
1720
  pe,
1722
- Mt,
1721
+ At,
1723
1722
  Ue
1724
1723
  ),
1725
1724
  { singleton: !0 }
1726
- ), eo = j(
1725
+ ), Jn = j(
1727
1726
  ([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
1728
1727
  const s = U(), i = ht(
1729
1728
  x(
@@ -1736,7 +1735,7 @@ const Kt = j(
1736
1735
  },
1737
1736
  rt(It, Kt),
1738
1737
  { singleton: !0 }
1739
- ), Jo = j(
1738
+ ), Yo = j(
1740
1739
  ([{ viewportHeight: t }, { totalListHeight: e }]) => {
1741
1740
  const n = T(!1), o = ht(
1742
1741
  x(
@@ -1750,17 +1749,17 @@ const Kt = j(
1750
1749
  );
1751
1750
  return { alignToBottom: n, paddingTopAddition: o };
1752
1751
  },
1753
- rt(It, eo),
1752
+ rt(It, Jn),
1754
1753
  { singleton: !0 }
1755
- ), no = j(() => ({
1754
+ ), Qn = j(() => ({
1756
1755
  context: T(null)
1757
- })), Qo = ({
1756
+ })), Zo = ({
1758
1757
  itemBottom: t,
1759
1758
  itemTop: e,
1760
1759
  locationParams: { align: n, behavior: o, ...r },
1761
1760
  viewportBottom: s,
1762
1761
  viewportTop: i
1763
- }) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null, oo = j(
1762
+ }) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null, to = j(
1764
1763
  ([
1765
1764
  { gap: t, sizes: e, totalCount: n },
1766
1765
  { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
@@ -1773,12 +1772,12 @@ const Kt = j(
1773
1772
  $(e, c, n, s, r, o, l),
1774
1773
  $(t),
1775
1774
  B(([[v, p, I, w, R, h, f, a], S]) => {
1776
- const { calculateViewLocation: H = Qo, done: y, ...L } = v, u = Zn(v, p, w - 1), g = ce(u, p.offsetTree, S) + R + h, C = g + Rt(p.sizeTree, u)[1], k = a + h, O = a + I - f, V = H({
1775
+ const { calculateViewLocation: H = Zo, done: y, ...k } = v, u = jn(v, p, w - 1), g = ce(u, p.offsetTree, S) + R + h, C = g + Rt(p.sizeTree, u)[1], L = a + h, O = a + I - f, V = H({
1777
1776
  itemBottom: C,
1778
1777
  itemTop: g,
1779
- locationParams: L,
1778
+ locationParams: k,
1780
1779
  viewportBottom: O,
1781
- viewportTop: k
1780
+ viewportTop: L
1782
1781
  });
1783
1782
  return V === null ? y?.() : y && yt(
1784
1783
  x(
@@ -1798,13 +1797,13 @@ const Kt = j(
1798
1797
  scrollIntoView: m
1799
1798
  };
1800
1799
  },
1801
- rt(kt, It, fe, Kt, Gt),
1800
+ rt(Lt, It, fe, Kt, Gt),
1802
1801
  { singleton: !0 }
1803
1802
  );
1804
- function Rn(t) {
1803
+ function yn(t) {
1805
1804
  return t === !1 ? !1 : t === "smooth" ? "smooth" : "auto";
1806
1805
  }
1807
- const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1806
+ const Xo = (t, e) => typeof t == "function" ? yn(t(e)) : e && yn(t), Jo = j(
1808
1807
  ([
1809
1808
  { listRefresh: t, totalCount: e, fixedItemSize: n, data: o },
1810
1809
  { atBottomState: r, isAtBottom: s },
@@ -1819,7 +1818,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1819
1818
  const w = T(!1), R = U();
1820
1819
  let h = null;
1821
1820
  function f(y) {
1822
- _(i, {
1821
+ M(i, {
1823
1822
  align: "end",
1824
1823
  behavior: y,
1825
1824
  index: "LAST"
@@ -1829,32 +1828,32 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1829
1828
  x(
1830
1829
  at(x(W(e), Ut(1)), c),
1831
1830
  $(W(w), s, l, v),
1832
- B(([[y, L], u, g, C, k]) => {
1833
- let O = L && C, V = "auto";
1834
- return O && (V = tr(u, g || k), O = O && V !== !1), { followOutputBehavior: V, shouldFollow: O, totalCount: y };
1831
+ B(([[y, k], u, g, C, L]) => {
1832
+ let O = k && C, V = "auto";
1833
+ return O && (V = Xo(u, g || L), O = O && V !== !1), { followOutputBehavior: V, shouldFollow: O, totalCount: y };
1835
1834
  }),
1836
1835
  P(({ shouldFollow: y }) => y)
1837
1836
  ),
1838
- ({ followOutputBehavior: y, totalCount: L }) => {
1837
+ ({ followOutputBehavior: y, totalCount: k }) => {
1839
1838
  h !== null && (h(), h = null), it(n) === void 0 ? h = yt(t, () => {
1840
- it(m)("following output to ", { totalCount: L }, ft.DEBUG), f(y), h = null;
1839
+ it(m)("following output to ", { totalCount: k }, ft.DEBUG), f(y), h = null;
1841
1840
  }) : requestAnimationFrame(() => {
1842
- it(m)("following output to ", { totalCount: L }, ft.DEBUG), f(y);
1841
+ it(m)("following output to ", { totalCount: k }, ft.DEBUG), f(y);
1843
1842
  });
1844
1843
  }
1845
1844
  );
1846
1845
  function a(y) {
1847
- const L = yt(r, (u) => {
1846
+ const k = yt(r, (u) => {
1848
1847
  y && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && h === null && (it(m)("scrolling to bottom due to increased size", {}, ft.DEBUG), f("auto"));
1849
1848
  });
1850
- setTimeout(L, 100);
1849
+ setTimeout(k, 100);
1851
1850
  }
1852
1851
  Y(
1853
1852
  x(
1854
1853
  at(W(w), e, d),
1855
- P(([y, , L]) => y !== !1 && L),
1854
+ P(([y, , k]) => y !== !1 && k),
1856
1855
  Ot(
1857
- ({ value: y }, [, L]) => ({ refreshed: y === L, value: L }),
1856
+ ({ value: y }, [, k]) => ({ refreshed: y === k, value: k }),
1858
1857
  { refreshed: !1, value: 0 }
1859
1858
  ),
1860
1859
  P(({ refreshed: y }) => y),
@@ -1865,8 +1864,8 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1865
1864
  }
1866
1865
  ), Y(R, () => {
1867
1866
  a(it(w) !== !1);
1868
- }), Y(at(W(w), r), ([y, L]) => {
1869
- y !== !1 && !L.atBottom && L.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
1867
+ }), Y(at(W(w), r), ([y, k]) => {
1868
+ y !== !1 && !k.atBottom && k.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
1870
1869
  });
1871
1870
  const S = T(null), H = U();
1872
1871
  return z(
@@ -1882,44 +1881,44 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1882
1881
  x(
1883
1882
  at(x(H, Ut(1)), c),
1884
1883
  $(W(S), l, v, p),
1885
- B(([[y, L], u, g, C, k]) => L && g && u?.({ context: k, totalCount: y, scrollingInProgress: C })),
1884
+ B(([[y, k], u, g, C, L]) => k && g && u?.({ context: L, totalCount: y, scrollingInProgress: C })),
1886
1885
  P((y) => !!y),
1887
1886
  zt(0)
1888
1887
  ),
1889
1888
  (y) => {
1890
1889
  h !== null && (h(), h = null), it(n) === void 0 ? h = yt(t, () => {
1891
- it(m)("scrolling into view", {}), _(I, y), h = null;
1890
+ it(m)("scrolling into view", {}), M(I, y), h = null;
1892
1891
  }) : requestAnimationFrame(() => {
1893
- it(m)("scrolling into view", {}), _(I, y);
1892
+ it(m)("scrolling into view", {}), M(I, y);
1894
1893
  });
1895
1894
  }
1896
1895
  ), { autoscrollToBottom: R, followOutput: w, scrollIntoViewOnChange: S };
1897
1896
  },
1898
1897
  rt(
1899
- kt,
1898
+ Lt,
1900
1899
  pe,
1901
1900
  fe,
1902
1901
  me,
1903
- Mt,
1902
+ At,
1904
1903
  Gt,
1905
1904
  It,
1906
- no,
1907
- oo
1905
+ Qn,
1906
+ to
1908
1907
  )
1909
- ), nr = j(
1908
+ ), Qo = j(
1910
1909
  ([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (z(
1911
1910
  x(
1912
1911
  l,
1913
1912
  $(s),
1914
1913
  P(([, c]) => c !== 0),
1915
1914
  $(r, o, e, n, t),
1916
- B(([[, c], d, m, v, p, I = []]) => to(c, d, m, v, p, I))
1915
+ B(([[, c], d, m, v, p, I = []]) => Xn(c, d, m, v, p, I))
1917
1916
  ),
1918
1917
  i
1919
1918
  ), {}),
1920
- rt(kt, me, Kt, Mt),
1919
+ rt(Lt, me, Kt, At),
1921
1920
  { singleton: !0 }
1922
- ), or = j(
1921
+ ), tr = j(
1923
1922
  ([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
1924
1923
  const o = T(0);
1925
1924
  return Y(
@@ -1938,7 +1937,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1938
1937
  ),
1939
1938
  () => {
1940
1939
  requestAnimationFrame(() => {
1941
- _(e, r);
1940
+ M(e, r);
1942
1941
  });
1943
1942
  }
1944
1943
  );
@@ -1947,9 +1946,9 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
1947
1946
  initialScrollTop: o
1948
1947
  };
1949
1948
  },
1950
- rt(Mt, It, Kt),
1949
+ rt(At, It, Kt),
1951
1950
  { singleton: !0 }
1952
- ), ro = j(
1951
+ ), eo = j(
1953
1952
  ([{ scrollVelocity: t }]) => {
1954
1953
  const e = T(!1), n = U(), o = T(!1);
1955
1954
  return z(
@@ -2010,7 +2009,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
2010
2009
  windowScrollTo: r,
2011
2010
  windowViewportRect: o
2012
2011
  };
2013
- }, rt(It)), rr = j(
2012
+ }, rt(It)), er = j(
2014
2013
  ([
2015
2014
  { sizeRanges: t, sizes: e },
2016
2015
  { headerHeight: n, scrollTop: o },
@@ -2025,10 +2024,10 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
2025
2024
  $(e, o, i, v, p, n)
2026
2025
  ),
2027
2026
  ([I, w, R, h, f, a, S]) => {
2028
- const H = _o(w.sizeTree);
2027
+ const H = Go(w.sizeTree);
2029
2028
  h && f !== null && a !== null && (R = f.scrollTop - a.offsetTop), R -= S, I({ ranges: H, scrollTop: R });
2030
2029
  }
2031
- ), z(x(m, P(_e), B(sr)), r), z(
2030
+ ), z(x(m, P(_e), B(nr)), r), z(
2032
2031
  x(
2033
2032
  s,
2034
2033
  $(m),
@@ -2042,12 +2041,12 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
2042
2041
  restoreStateFrom: m
2043
2042
  };
2044
2043
  },
2045
- rt(kt, It, me, Mt, Ze)
2044
+ rt(Lt, It, me, At, Ze)
2046
2045
  );
2047
- function sr(t) {
2046
+ function nr(t) {
2048
2047
  return { align: "start", index: 0, offset: t.scrollTop };
2049
2048
  }
2050
- const ir = j(([{ topItemsIndexes: t }]) => {
2049
+ const or = j(([{ topItemsIndexes: t }]) => {
2051
2050
  const e = T(0);
2052
2051
  return z(
2053
2052
  x(
@@ -2058,11 +2057,11 @@ const ir = j(([{ topItemsIndexes: t }]) => {
2058
2057
  t
2059
2058
  ), { topItemCount: e };
2060
2059
  }, rt(Kt));
2061
- function so(t) {
2060
+ function no(t) {
2062
2061
  let e = !1, n;
2063
2062
  return (() => (e || (e = !0, n = t()), n));
2064
2063
  }
2065
- const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), cr = j(
2064
+ const rr = no(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), sr = j(
2066
2065
  ([
2067
2066
  { deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
2068
2067
  { isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
@@ -2076,10 +2075,10 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2076
2075
  c,
2077
2076
  $(i),
2078
2077
  Ot(
2079
- ([, f, a, S], [{ bottom: H, items: y, offsetBottom: L, totalCount: u }, g]) => {
2080
- const C = H + L;
2081
- let k = 0;
2082
- return a === u && f.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && f[0].originalIndex === 0 || (k = C - S, k !== 0 && (k += g))), [k, y, u, C];
2078
+ ([, f, a, S], [{ bottom: H, items: y, offsetBottom: k, totalCount: u }, g]) => {
2079
+ const C = H + k;
2080
+ let L = 0;
2081
+ return a === u && f.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && f[0].originalIndex === 0 || (L = C - S, L !== 0 && (L += g))), [L, y, u, C];
2083
2082
  },
2084
2083
  [0, [], 0, 0]
2085
2084
  ),
@@ -2090,10 +2089,10 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2090
2089
  )
2091
2090
  );
2092
2091
  function h(f) {
2093
- f > 0 ? (_(e, { behavior: "auto", top: -f }), _(t, 0)) : (_(t, 0), _(e, { behavior: "auto", top: -f }));
2092
+ f > 0 ? (M(e, { behavior: "auto", top: -f }), M(t, 0)) : (M(t, 0), M(e, { behavior: "auto", top: -f }));
2094
2093
  }
2095
2094
  return Y(x(R, $(t, s)), ([f, a, S]) => {
2096
- S && lr() ? _(t, a - f) : h(-f);
2095
+ S && rr() ? M(t, a - f) : h(-f);
2097
2096
  }), Y(
2098
2097
  x(
2099
2098
  at(ht(s, !1), t, w),
@@ -2113,33 +2112,33 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2113
2112
  d,
2114
2113
  $(p, m),
2115
2114
  B(([f, { groupIndices: a, lastSize: S, sizeTree: H }, y]) => {
2116
- function L(O) {
2115
+ function k(O) {
2117
2116
  return O * (S + y);
2118
2117
  }
2119
2118
  if (a.length === 0)
2120
- return L(f);
2119
+ return k(f);
2121
2120
  let u = 0;
2122
2121
  const g = ie(H, 0);
2123
- let C = 0, k = 0;
2122
+ let C = 0, L = 0;
2124
2123
  for (; C < f; ) {
2125
2124
  C++, u += g;
2126
- let O = a.length === k + 1 ? 1 / 0 : a[k + 1] - a[k] - 1;
2127
- C + O > f && (u -= g, O = f - C + 1), C += O, u += L(O), k++;
2125
+ let O = a.length === L + 1 ? 1 / 0 : a[L + 1] - a[L] - 1;
2126
+ C + O > f && (u -= g, O = f - C + 1), C += O, u += k(O), L++;
2128
2127
  }
2129
2128
  return u;
2130
2129
  })
2131
2130
  ),
2132
2131
  (f) => {
2133
- _(t, f), requestAnimationFrame(() => {
2134
- _(e, { top: f }), requestAnimationFrame(() => {
2135
- _(t, 0), _(w, !1);
2132
+ M(t, f), requestAnimationFrame(() => {
2133
+ M(e, { top: f }), requestAnimationFrame(() => {
2134
+ M(t, 0), M(w, !1);
2136
2135
  });
2137
2136
  });
2138
2137
  }
2139
2138
  ), { deviation: t };
2140
2139
  },
2141
- rt(It, pe, Kt, kt, Gt, Ue)
2142
- ), ur = j(
2140
+ rt(It, pe, Kt, Lt, Gt, Ue)
2141
+ ), ir = j(
2143
2142
  ([
2144
2143
  t,
2145
2144
  e,
@@ -2167,18 +2166,18 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2167
2166
  }),
2168
2167
  rt(
2169
2168
  Ye,
2170
- nr,
2171
- Mt,
2172
- ro,
2169
+ Qo,
2170
+ At,
2173
2171
  eo,
2174
- or,
2175
- Jo,
2172
+ Jn,
2173
+ tr,
2174
+ Yo,
2176
2175
  Ze,
2177
- oo,
2176
+ to,
2178
2177
  Gt,
2179
- no
2178
+ Qn
2180
2179
  )
2181
- ), io = j(
2180
+ ), oo = j(
2182
2181
  ([
2183
2182
  {
2184
2183
  data: t,
@@ -2202,12 +2201,12 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2202
2201
  S,
2203
2202
  H,
2204
2203
  { scrollToIndex: y },
2205
- L,
2204
+ k,
2206
2205
  { topItemCount: u },
2207
2206
  { groupCounts: g },
2208
2207
  C
2209
2208
  ]) => {
2210
- const { listState: k, minOverscanItemCount: O, topItemsIndexes: V, rangeChanged: N, ...Z } = H;
2209
+ const { listState: L, minOverscanItemCount: O, topItemsIndexes: V, rangeChanged: N, ...Z } = H;
2211
2210
  return z(N, C.scrollSeekRangeChanged), z(
2212
2211
  x(
2213
2212
  C.windowViewportRect,
@@ -2234,7 +2233,7 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2234
2233
  ...S,
2235
2234
  groupIndices: i,
2236
2235
  itemSize: c,
2237
- listState: k,
2236
+ listState: L,
2238
2237
  minOverscanItemCount: O,
2239
2238
  scrollToIndex: y,
2240
2239
  // output
@@ -2251,20 +2250,20 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2251
2250
  };
2252
2251
  },
2253
2252
  rt(
2254
- kt,
2253
+ Lt,
2255
2254
  me,
2256
2255
  It,
2257
- rr,
2258
2256
  er,
2257
+ Jo,
2259
2258
  Kt,
2260
2259
  fe,
2261
- cr,
2262
- ir,
2263
- Xn,
2264
- ur
2260
+ sr,
2261
+ or,
2262
+ qn,
2263
+ ir
2265
2264
  )
2266
2265
  );
2267
- function ar(t, e) {
2266
+ function lr(t, e) {
2268
2267
  const n = {}, o = {};
2269
2268
  let r = 0;
2270
2269
  const s = t.length;
@@ -2278,47 +2277,47 @@ const Ie = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2278
2277
  function Xe(t, e, n) {
2279
2278
  const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
2280
2279
  function c(f, a) {
2281
- f.propsReady !== void 0 && _(f.propsReady, !1);
2280
+ f.propsReady !== void 0 && M(f.propsReady, !1);
2282
2281
  for (const S of o) {
2283
2282
  const H = f[e.required[S]];
2284
- _(H, a[S]);
2283
+ M(H, a[S]);
2285
2284
  }
2286
2285
  for (const S of r)
2287
2286
  if (S in a) {
2288
2287
  const H = f[e.optional[S]];
2289
- _(H, a[S]);
2288
+ M(H, a[S]);
2290
2289
  }
2291
- f.propsReady !== void 0 && _(f.propsReady, !0);
2290
+ f.propsReady !== void 0 && M(f.propsReady, !0);
2292
2291
  }
2293
2292
  function d(f) {
2294
2293
  return s.reduce((a, S) => (a[S] = (H) => {
2295
2294
  const y = f[e.methods[S]];
2296
- _(y, H);
2295
+ M(y, H);
2297
2296
  }, a), {});
2298
2297
  }
2299
2298
  function m(f) {
2300
- return i.reduce((a, S) => (a[S] = bo(f[e.events[S]]), a), {});
2299
+ return i.reduce((a, S) => (a[S] = Co(f[e.events[S]]), a), {});
2301
2300
  }
2302
2301
  const v = E.forwardRef(function(a, S) {
2303
- const { children: H, ...y } = a, [L] = E.useState(() => ye(Eo(t), (C) => {
2302
+ const { children: H, ...y } = a, [k] = E.useState(() => ye(bo(t), (C) => {
2304
2303
  c(C, y);
2305
- })), [u] = E.useState(mn(m, L));
2304
+ })), [u] = E.useState(mn(m, k));
2306
2305
  Ie(() => {
2307
2306
  for (const C of i)
2308
2307
  C in y && Y(u[C], y[C]);
2309
2308
  return () => {
2310
2309
  Object.values(u).map(Ne);
2311
2310
  };
2312
- }, [y, u, L]), Ie(() => {
2313
- c(L, y);
2314
- }), E.useImperativeHandle(S, fn(d(L)));
2311
+ }, [y, u, k]), Ie(() => {
2312
+ c(k, y);
2313
+ }), E.useImperativeHandle(S, fn(d(k)));
2315
2314
  const g = n;
2316
- return /* @__PURE__ */ G(l.Provider, { value: L, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...ar([...o, ...r, ...i], y), children: H }) });
2315
+ return /* @__PURE__ */ G(l.Provider, { value: k, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...lr([...o, ...r, ...i], y), children: H }) });
2317
2316
  }), p = (f) => {
2318
2317
  const a = E.useContext(l);
2319
2318
  return E.useCallback(
2320
2319
  (S) => {
2321
- _(a[f], S);
2320
+ M(a[f], S);
2322
2321
  },
2323
2322
  [a, f]
2324
2323
  );
@@ -2335,8 +2334,8 @@ function Xe(t, e, n) {
2335
2334
  }, w = (f) => {
2336
2335
  const S = E.useContext(l)[f], [H, y] = E.useState(mn(it, S));
2337
2336
  return Ie(
2338
- () => Y(S, (L) => {
2339
- L !== H && y(fn(L));
2337
+ () => Y(S, (k) => {
2338
+ k !== H && y(fn(k));
2340
2339
  }),
2341
2340
  [S, H]
2342
2341
  ), H;
@@ -2351,25 +2350,25 @@ function Xe(t, e, n) {
2351
2350
  usePublisher: p
2352
2351
  };
2353
2352
  }
2354
- const Re = E.createContext(void 0), lo = E.createContext(void 0), Le = "-webkit-sticky", Hn = "sticky", Je = so(() => {
2353
+ const Re = E.createContext(void 0), ro = E.createContext(void 0), ke = "-webkit-sticky", bn = "sticky", Je = no(() => {
2355
2354
  if (typeof document > "u")
2356
- return Hn;
2355
+ return bn;
2357
2356
  const t = document.createElement("div");
2358
- return t.style.position = Le, t.style.position === Le ? Le : Hn;
2359
- }), co = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2360
- function ke(t) {
2357
+ return t.style.position = ke, t.style.position === ke ? ke : bn;
2358
+ }), so = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
2359
+ function Le(t) {
2361
2360
  return "self" in t;
2362
2361
  }
2363
- function dr(t) {
2362
+ function cr(t) {
2364
2363
  return "body" in t;
2365
2364
  }
2366
- function uo(t, e, n, o = Jt, r, s) {
2365
+ function io(t, e, n, o = Jt, r, s) {
2367
2366
  const i = E.useRef(null), l = E.useRef(null), c = E.useRef(null), d = E.useCallback(
2368
2367
  (p) => {
2369
2368
  let I, w, R;
2370
2369
  const h = p.target;
2371
- if (dr(h) || ke(h)) {
2372
- const a = ke(h) ? h : h.defaultView;
2370
+ if (cr(h) || Le(h)) {
2371
+ const a = Le(h) ? h : h.defaultView;
2373
2372
  R = s === !0 ? _t(a, a.scrollX) : a.scrollY, I = s === !0 ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, w = s === !0 ? a.innerWidth : a.innerHeight;
2374
2373
  } else
2375
2374
  R = s === !0 ? _t(h, h.scrollLeft) : h.scrollTop, I = s === !0 ? h.scrollWidth : h.scrollHeight, w = s === !0 ? h.offsetWidth : h.offsetHeight;
@@ -2380,14 +2379,14 @@ function uo(t, e, n, o = Jt, r, s) {
2380
2379
  viewportHeight: w
2381
2380
  });
2382
2381
  };
2383
- p.suppressFlushSync === !0 ? f() : xo.flushSync(f), l.current !== null && (R === l.current || R <= 0 || R === I - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2382
+ p.suppressFlushSync === !0 ? f() : go.flushSync(f), l.current !== null && (R === l.current || R <= 0 || R === I - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2384
2383
  },
2385
2384
  [t, e, s]
2386
2385
  );
2387
2386
  E.useEffect(() => {
2388
2387
  const p = r ?? i.current;
2389
- return hn(p), o(r ?? i.current), d({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", d, { passive: !0 }), () => {
2390
- hn(p), o(null), p.removeEventListener("scroll", d);
2388
+ return o(r ?? i.current), d({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", d, { passive: !0 }), () => {
2389
+ o(null), p.removeEventListener("scroll", d);
2391
2390
  };
2392
2391
  }, [i, d, n, o, r]);
2393
2392
  function m(p) {
@@ -2396,7 +2395,7 @@ function uo(t, e, n, o = Jt, r, s) {
2396
2395
  return;
2397
2396
  const w = p.behavior === "smooth";
2398
2397
  let R, h, f;
2399
- ke(I) ? (h = Math.max(
2398
+ Le(I) ? (h = Math.max(
2400
2399
  Ht(I.document.documentElement, s === !0 ? "width" : "height"),
2401
2400
  s === !0 ? I.document.documentElement.scrollWidth : I.document.documentElement.scrollHeight
2402
2401
  ), R = s === !0 ? I.innerWidth : I.innerHeight, f = s === !0 ? _t(I, I.scrollX) : I.scrollY) : (h = I[s === !0 ? "scrollWidth" : "scrollHeight"], R = Ht(I, s === !0 ? "width" : "height"), f = s === !0 ? _t(I, I.scrollLeft) : I.scrollTop);
@@ -2406,7 +2405,7 @@ function uo(t, e, n, o = Jt, r, s) {
2406
2405
  return;
2407
2406
  }
2408
2407
  const S = Math.ceil(Math.max(Math.min(a, p.top), 0));
2409
- if (p.top = S, Qn(R, h) || S === f) {
2408
+ if (p.top = S, Zn(R, h) || S === f) {
2410
2409
  t({ scrollHeight: h, scrollTop: f, viewportHeight: R }), w && e(!0);
2411
2410
  return;
2412
2411
  }
@@ -2414,13 +2413,13 @@ function uo(t, e, n, o = Jt, r, s) {
2414
2413
  c.current = null, l.current = null, e(!0);
2415
2414
  }, 1e3)) : l.current = null, s === !0 && (p = {
2416
2415
  ...p.behavior === void 0 ? {} : { behavior: p.behavior },
2417
- left: gn(I, S)
2416
+ left: hn(I, S)
2418
2417
  }), I.scrollTo(p);
2419
2418
  }
2420
2419
  function v(p) {
2421
2420
  s === !0 && (p = {
2422
2421
  ...p.behavior === void 0 ? {} : { behavior: p.behavior },
2423
- ...p.top === void 0 ? {} : { left: gn(i.current, p.top) }
2422
+ ...p.top === void 0 ? {} : { left: hn(i.current, p.top) }
2424
2423
  }), i.current.scrollBy(p);
2425
2424
  }
2426
2425
  return { scrollByCallback: v, scrollerRef: i, scrollToCallback: m };
@@ -2428,7 +2427,7 @@ function uo(t, e, n, o = Jt, r, s) {
2428
2427
  function Qe(t) {
2429
2428
  return t;
2430
2429
  }
2431
- const fr = /* @__PURE__ */ j(() => {
2430
+ const ur = /* @__PURE__ */ j(() => {
2432
2431
  const t = T((l) => `Item ${l}`), e = T((l) => `Group ${l}`), n = T({}), o = T(Qe), r = T("div"), s = T(Jt), i = (l, c = null) => ht(
2433
2432
  x(
2434
2433
  n,
@@ -2454,11 +2453,11 @@ const fr = /* @__PURE__ */ j(() => {
2454
2453
  ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
2455
2454
  TopItemListComponent: i("TopItemList")
2456
2455
  };
2457
- }), mr = /* @__PURE__ */ j(
2456
+ }), ar = /* @__PURE__ */ j(
2458
2457
  ([t, e]) => ({ ...t, ...e }),
2459
- rt(io, fr)
2460
- ), pr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), hr = { overflowAnchor: "none", position: Je(), zIndex: 1 }, ao = { overflowAnchor: "none" }, gr = { ...ao, display: "inline-block", height: "100%" }, En = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2461
- const n = M("listState"), o = Ct("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, d = M("itemContent"), m = M("context"), v = M("groupContent"), p = M("trackItemSizes"), I = M("itemSize"), w = M("log"), R = Ct("gap"), h = M("horizontalDirection"), { callbackRef: f } = _n(
2458
+ rt(oo, ur)
2459
+ ), dr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), fr = { overflowAnchor: "none", position: Je(), zIndex: 1 }, lo = { overflowAnchor: "none" }, mr = { ...lo, display: "inline-block", height: "100%" }, Rn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2460
+ const n = A("listState"), o = Ct("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), m = A("context"), v = A("groupContent"), p = A("trackItemSizes"), I = A("itemSize"), w = A("log"), R = Ct("gap"), h = A("horizontalDirection"), { callbackRef: f } = Gn(
2462
2461
  o,
2463
2462
  I,
2464
2463
  p,
@@ -2467,12 +2466,12 @@ const fr = /* @__PURE__ */ j(() => {
2467
2466
  R,
2468
2467
  s,
2469
2468
  h,
2470
- M("skipAnimationFrameInResizeObserver")
2469
+ A("skipAnimationFrameInResizeObserver")
2471
2470
  ), [a, S] = E.useState(0);
2472
2471
  on("deviation", (F) => {
2473
2472
  a !== F && S(F);
2474
2473
  });
2475
- const H = M("EmptyPlaceholder"), y = M("ScrollSeekPlaceholder") ?? pr, L = M("ListComponent"), u = M("ItemComponent"), g = M("GroupComponent"), C = M("computeItemKey"), k = M("isSeeking"), O = M("groupIndices").length > 0, V = M("alignToBottom"), N = M("initialItemFinalLocationReached"), Z = e ? {} : {
2474
+ const H = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") ?? dr, k = A("ListComponent"), u = A("ItemComponent"), g = A("GroupComponent"), C = A("computeItemKey"), L = A("isSeeking"), O = A("groupIndices").length > 0, V = A("alignToBottom"), N = A("initialItemFinalLocationReached"), Z = e ? {} : {
2476
2475
  boxSizing: "border-box",
2477
2476
  ...h ? {
2478
2477
  display: "inline-block",
@@ -2489,15 +2488,15 @@ const fr = /* @__PURE__ */ j(() => {
2489
2488
  ...N ? {} : { visibility: "hidden" }
2490
2489
  };
2491
2490
  return !e && n.totalCount === 0 && H !== null && H !== void 0 ? /* @__PURE__ */ G(H, { ...ot(H, m) }) : /* @__PURE__ */ G(
2492
- L,
2491
+ k,
2493
2492
  {
2494
- ...ot(L, m),
2493
+ ...ot(k, m),
2495
2494
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2496
2495
  ref: f,
2497
2496
  style: Z,
2498
2497
  children: (e ? n.topItems : n.items).map((F) => {
2499
2498
  const mt = F.originalIndex, q = C(mt + n.firstItemIndex, F.data, m);
2500
- return k ? /* @__PURE__ */ Dt(
2499
+ return L ? /* @__PURE__ */ Dt(
2501
2500
  y,
2502
2501
  {
2503
2502
  ...ot(y, m),
@@ -2515,33 +2514,33 @@ const fr = /* @__PURE__ */ j(() => {
2515
2514
  "data-item-index": F.index,
2516
2515
  "data-known-size": F.size,
2517
2516
  key: q,
2518
- style: hr
2517
+ style: fr
2519
2518
  },
2520
2519
  v(F.index, m)
2521
2520
  ) : /* @__PURE__ */ Dt(
2522
2521
  u,
2523
2522
  {
2524
2523
  ...ot(u, m),
2525
- ...fo(u, F.data),
2524
+ ...co(u, F.data),
2526
2525
  "data-index": mt,
2527
2526
  "data-item-group-index": F.groupIndex,
2528
2527
  "data-item-index": F.index,
2529
2528
  "data-known-size": F.size,
2530
2529
  key: q,
2531
- style: h ? gr : ao
2530
+ style: h ? mr : lo
2532
2531
  },
2533
2532
  O ? d(F.index, F.groupIndex, F.data, m) : d(F.index, F.data, m)
2534
2533
  );
2535
2534
  })
2536
2535
  }
2537
2536
  );
2538
- }), Ir = {
2537
+ }), pr = {
2539
2538
  height: "100%",
2540
2539
  outline: "none",
2541
2540
  overflowY: "auto",
2542
2541
  position: "relative",
2543
2542
  WebkitOverflowScrolling: "touch"
2544
- }, Sr = {
2543
+ }, hr = {
2545
2544
  outline: "none",
2546
2545
  overflowX: "auto",
2547
2546
  position: "relative"
@@ -2555,7 +2554,7 @@ const fr = /* @__PURE__ */ j(() => {
2555
2554
  ...He(t),
2556
2555
  position: e ? "relative" : "absolute",
2557
2556
  top: e ? -n : 0
2558
- }), xr = {
2557
+ }), gr = {
2559
2558
  position: Je(),
2560
2559
  top: 0,
2561
2560
  width: "100%",
@@ -2565,11 +2564,11 @@ function ot(t, e) {
2565
2564
  if (typeof t != "string")
2566
2565
  return { context: e };
2567
2566
  }
2568
- function fo(t, e) {
2567
+ function co(t, e) {
2569
2568
  return { item: typeof t == "string" ? void 0 : e };
2570
2569
  }
2571
- const vr = /* @__PURE__ */ E.memo(function() {
2572
- const e = M("HeaderComponent"), n = Ct("headerHeight"), o = M("HeaderFooterTag"), r = Lt(
2570
+ const Ir = /* @__PURE__ */ E.memo(function() {
2571
+ const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r = kt(
2573
2572
  E.useMemo(
2574
2573
  () => (i) => {
2575
2574
  n(Ht(i, "height"));
@@ -2577,11 +2576,11 @@ const vr = /* @__PURE__ */ E.memo(function() {
2577
2576
  [n]
2578
2577
  ),
2579
2578
  !0,
2580
- M("skipAnimationFrameInResizeObserver")
2581
- ), s = M("context");
2579
+ A("skipAnimationFrameInResizeObserver")
2580
+ ), s = A("context");
2582
2581
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
2583
- }), Tr = /* @__PURE__ */ E.memo(function() {
2584
- const e = M("FooterComponent"), n = Ct("footerHeight"), o = M("HeaderFooterTag"), r = Lt(
2582
+ }), Sr = /* @__PURE__ */ E.memo(function() {
2583
+ const e = A("FooterComponent"), n = Ct("footerHeight"), o = A("HeaderFooterTag"), r = kt(
2585
2584
  E.useMemo(
2586
2585
  () => (i) => {
2587
2586
  n(Ht(i, "height"));
@@ -2589,13 +2588,13 @@ const vr = /* @__PURE__ */ E.memo(function() {
2589
2588
  [n]
2590
2589
  ),
2591
2590
  !0,
2592
- M("skipAnimationFrameInResizeObserver")
2593
- ), s = M("context");
2591
+ A("skipAnimationFrameInResizeObserver")
2592
+ ), s = A("context");
2594
2593
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
2595
2594
  });
2596
2595
  function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2597
2596
  return E.memo(function({ children: s, style: i, context: l, ...c }) {
2598
- const d = n("scrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("scrollerRef"), I = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: h } = uo(
2597
+ const d = n("scrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("scrollerRef"), I = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: h } = io(
2599
2598
  d,
2600
2599
  v,
2601
2600
  m,
@@ -2609,7 +2608,7 @@ function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2609
2608
  "data-testid": "virtuoso-scroller",
2610
2609
  "data-virtuoso-scroller": !0,
2611
2610
  ref: R,
2612
- style: { ...I ? Sr : Ir, ...i },
2611
+ style: { ...I ? hr : pr, ...i },
2613
2612
  tabIndex: 0,
2614
2613
  ...c,
2615
2614
  ...ot(m, l),
@@ -2620,14 +2619,14 @@ function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2620
2619
  }
2621
2620
  function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2622
2621
  return E.memo(function({ children: s, style: i, context: l, ...c }) {
2623
- const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("totalListHeight"), I = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), h = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: S } = uo(
2622
+ const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("totalListHeight"), I = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), h = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: S } = io(
2624
2623
  d,
2625
2624
  v,
2626
2625
  m,
2627
2626
  h,
2628
2627
  w
2629
2628
  );
2630
- return co(() => (a.current = w ?? R.current?.ownerDocument.defaultView, () => {
2629
+ return so(() => (a.current = w ?? R.current?.ownerDocument.defaultView, () => {
2631
2630
  a.current = null;
2632
2631
  }), [a, w]), t("windowScrollTo", S), t("scrollBy", f), /* @__PURE__ */ G(
2633
2632
  m,
@@ -2642,43 +2641,43 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2642
2641
  );
2643
2642
  });
2644
2643
  }
2645
- const Cr = ({ children: t }) => {
2646
- const e = E.useContext(Re), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = M("alignToBottom"), s = M("horizontalDirection"), i = E.useMemo(
2644
+ const xr = ({ children: t }) => {
2645
+ const e = E.useContext(Re), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
2647
2646
  () => re(n, (c) => Ht(c, s ? "width" : "height")),
2648
2647
  [n, s]
2649
- ), l = Lt(i, !0, M("skipAnimationFrameInResizeObserver"));
2648
+ ), l = kt(i, !0, A("skipAnimationFrameInResizeObserver"));
2650
2649
  return E.useEffect(() => {
2651
2650
  e && (n(e.viewportHeight), o(e.itemHeight));
2652
2651
  }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: l, style: He(r), children: t });
2653
- }, wr = ({ children: t }) => {
2654
- const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = M("customScrollParent"), s = M("useWindowScroll"), i = M("topListHeight"), l = $e(
2652
+ }, vr = ({ children: t }) => {
2653
+ const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = $e(
2655
2654
  n,
2656
2655
  r,
2657
- M("skipAnimationFrameInResizeObserver")
2658
- ), c = M("alignToBottom");
2656
+ A("skipAnimationFrameInResizeObserver")
2657
+ ), c = A("alignToBottom");
2659
2658
  return E.useEffect(() => {
2660
2659
  e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2661
2660
  }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: tn(c, s, i), children: t });
2662
- }, yr = ({ children: t }) => {
2663
- const e = M("TopItemListComponent") ?? "div", n = M("headerHeight"), o = { ...xr, marginTop: `${n}px` }, r = M("context");
2661
+ }, Tr = ({ children: t }) => {
2662
+ const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...gr, marginTop: `${n}px` }, r = A("context");
2664
2663
  return /* @__PURE__ */ G(e, { style: o, ...ot(e, r), children: t });
2665
- }, br = /* @__PURE__ */ E.memo(function(e) {
2666
- const n = M("useWindowScroll"), o = M("topItemsIndexes").length > 0, r = M("customScrollParent"), s = M("context");
2667
- return /* @__PURE__ */ $t(r || n ? Hr : Rr, { ...e, context: s, children: [
2668
- o && /* @__PURE__ */ G(yr, { children: /* @__PURE__ */ G(En, { showTopList: !0 }) }),
2669
- /* @__PURE__ */ $t(r || n ? wr : Cr, { children: [
2670
- /* @__PURE__ */ G(vr, {}),
2671
- /* @__PURE__ */ G(En, {}),
2672
- /* @__PURE__ */ G(Tr, {})
2664
+ }, Cr = /* @__PURE__ */ E.memo(function(e) {
2665
+ const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
2666
+ return /* @__PURE__ */ $t(r || n ? yr : wr, { ...e, context: s, children: [
2667
+ o && /* @__PURE__ */ G(Tr, { children: /* @__PURE__ */ G(Rn, { showTopList: !0 }) }),
2668
+ /* @__PURE__ */ $t(r || n ? vr : xr, { children: [
2669
+ /* @__PURE__ */ G(Ir, {}),
2670
+ /* @__PURE__ */ G(Rn, {}),
2671
+ /* @__PURE__ */ G(Sr, {})
2673
2672
  ] })
2674
2673
  ] });
2675
2674
  }), {
2676
- Component: mo,
2675
+ Component: uo,
2677
2676
  useEmitter: on,
2678
- useEmitterValue: M,
2677
+ useEmitterValue: A,
2679
2678
  usePublisher: Ct
2680
2679
  } = /* @__PURE__ */ Xe(
2681
- mr,
2680
+ ar,
2682
2681
  {
2683
2682
  optional: {
2684
2683
  restoreStateFrom: "restoreStateFrom",
@@ -2738,8 +2737,8 @@ const Cr = ({ children: t }) => {
2738
2737
  groupIndices: "groupIndices"
2739
2738
  }
2740
2739
  },
2741
- br
2742
- ), Rr = /* @__PURE__ */ en({ useEmitter: on, useEmitterValue: M, usePublisher: Ct }), Hr = /* @__PURE__ */ nn({ useEmitter: on, useEmitterValue: M, usePublisher: Ct }), rs = mo, ss = mo, Er = /* @__PURE__ */ j(() => {
2740
+ Cr
2741
+ ), wr = /* @__PURE__ */ en({ useEmitter: on, useEmitterValue: A, usePublisher: Ct }), yr = /* @__PURE__ */ nn({ useEmitter: on, useEmitterValue: A, usePublisher: Ct }), es = uo, ns = uo, br = /* @__PURE__ */ j(() => {
2743
2742
  const t = T((d) => /* @__PURE__ */ $t("td", { children: [
2744
2743
  "Item $",
2745
2744
  d
@@ -2774,11 +2773,11 @@ const Cr = ({ children: t }) => {
2774
2773
  TableRowComponent: c("TableRow", "tr"),
2775
2774
  GroupComponent: c("Group", "tr")
2776
2775
  };
2777
- }), Br = /* @__PURE__ */ j(
2776
+ }), Rr = /* @__PURE__ */ j(
2778
2777
  ([t, e]) => ({ ...t, ...e }),
2779
- rt(io, Er)
2780
- ), Or = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Lr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), kr = { overflowAnchor: "none" }, Bn = { position: Je(), zIndex: 2, overflowAnchor: "none" }, On = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2781
- const n = A("listState"), o = A("computeItemKey"), r = A("firstItemIndex"), s = A("context"), i = A("isSeeking"), l = A("fixedHeaderHeight"), c = A("groupIndices").length > 0, d = A("itemContent"), m = A("groupContent"), v = A("ScrollSeekPlaceholder") ?? Or, p = A("GroupComponent"), I = A("TableRowComponent"), w = (e ? n.topItems : []).reduce((h, f, a) => (a === 0 ? h.push(f.size) : h.push(h[a - 1] + f.size), h), []);
2778
+ rt(oo, br)
2779
+ ), Hr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Er = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), Br = { overflowAnchor: "none" }, Hn = { position: Je(), zIndex: 2, overflowAnchor: "none" }, En = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
2780
+ const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("context"), i = _("isSeeking"), l = _("fixedHeaderHeight"), c = _("groupIndices").length > 0, d = _("itemContent"), m = _("groupContent"), v = _("ScrollSeekPlaceholder") ?? Hr, p = _("GroupComponent"), I = _("TableRowComponent"), w = (e ? n.topItems : []).reduce((h, f, a) => (a === 0 ? h.push(f.size) : h.push(h[a - 1] + f.size), h), []);
2782
2781
  return (e ? n.topItems : n.items).map((h) => {
2783
2782
  const f = h.originalIndex, a = o(f + r, h.data, s), S = e ? f === 0 ? 0 : w[f - 1] : 0;
2784
2783
  return i ? /* @__PURE__ */ Dt(
@@ -2799,7 +2798,7 @@ const Cr = ({ children: t }) => {
2799
2798
  "data-known-size": h.size,
2800
2799
  key: a,
2801
2800
  style: {
2802
- ...Bn,
2801
+ ...Hn,
2803
2802
  top: l
2804
2803
  }
2805
2804
  },
@@ -2808,19 +2807,19 @@ const Cr = ({ children: t }) => {
2808
2807
  I,
2809
2808
  {
2810
2809
  ...ot(I, s),
2811
- ...fo(I, h.data),
2810
+ ...co(I, h.data),
2812
2811
  "data-index": f,
2813
2812
  "data-item-index": h.index,
2814
2813
  "data-known-size": h.size,
2815
2814
  "data-item-group-index": h.groupIndex,
2816
2815
  key: a,
2817
- style: e ? { ...Bn, top: l + S } : kr
2816
+ style: e ? { ...Hn, top: l + S } : Br
2818
2817
  },
2819
2818
  c ? d(h.index, h.groupIndex, h.data, s) : d(h.index, h.data, s)
2820
2819
  );
2821
2820
  });
2822
- }), zr = /* @__PURE__ */ E.memo(function() {
2823
- const e = A("listState"), n = A("topItemsIndexes").length > 0, o = bt("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = bt("windowScrollContainerState"), l = bt("scrollContainerState"), c = s || r ? i : l, d = A("trackItemSizes"), m = A("itemSize"), v = A("log"), { callbackRef: p, ref: I } = _n(
2821
+ }), Or = /* @__PURE__ */ E.memo(function() {
2822
+ const e = _("listState"), n = _("topItemsIndexes").length > 0, o = bt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = bt("windowScrollContainerState"), l = bt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), m = _("itemSize"), v = _("log"), { callbackRef: p, ref: I } = Gn(
2824
2823
  o,
2825
2824
  m,
2826
2825
  d,
@@ -2829,49 +2828,49 @@ const Cr = ({ children: t }) => {
2829
2828
  void 0,
2830
2829
  s,
2831
2830
  !1,
2832
- A("skipAnimationFrameInResizeObserver")
2831
+ _("skipAnimationFrameInResizeObserver")
2833
2832
  ), [w, R] = E.useState(0);
2834
2833
  rn("deviation", (O) => {
2835
2834
  w !== O && (I.current.style.marginTop = `${O}px`, R(O));
2836
2835
  });
2837
- const h = A("EmptyPlaceholder"), f = A("FillerRow") ?? Lr, a = A("TableBodyComponent"), S = A("paddingTopAddition"), H = A("statefulTotalCount"), y = A("context");
2836
+ const h = _("EmptyPlaceholder"), f = _("FillerRow") ?? Er, a = _("TableBodyComponent"), S = _("paddingTopAddition"), H = _("statefulTotalCount"), y = _("context");
2838
2837
  if (H === 0 && h !== null && h !== void 0)
2839
2838
  return /* @__PURE__ */ G(h, { ...ot(h, y) });
2840
- const L = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), u = e.offsetTop + S + w - L, g = e.offsetBottom, C = u > 0 ? /* @__PURE__ */ G(f, { context: y, height: u }, "padding-top") : null, k = g > 0 ? /* @__PURE__ */ G(f, { context: y, height: g }, "padding-bottom") : null;
2839
+ const k = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), u = e.offsetTop + S + w - k, g = e.offsetBottom, C = u > 0 ? /* @__PURE__ */ G(f, { context: y, height: u }, "padding-top") : null, L = g > 0 ? /* @__PURE__ */ G(f, { context: y, height: g }, "padding-bottom") : null;
2841
2840
  return /* @__PURE__ */ $t(a, { "data-testid": "virtuoso-item-list", ref: p, ...ot(a, y), children: [
2842
2841
  C,
2843
- n && /* @__PURE__ */ G(On, { showTopList: !0 }),
2844
- /* @__PURE__ */ G(On, {}),
2845
- k
2842
+ n && /* @__PURE__ */ G(En, { showTopList: !0 }),
2843
+ /* @__PURE__ */ G(En, {}),
2844
+ L
2846
2845
  ] });
2847
- }), Fr = ({ children: t }) => {
2848
- const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = Lt(
2846
+ }), kr = ({ children: t }) => {
2847
+ const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = kt(
2849
2848
  E.useMemo(() => re(n, (s) => Ht(s, "height")), [n]),
2850
2849
  !0,
2851
- A("skipAnimationFrameInResizeObserver")
2850
+ _("skipAnimationFrameInResizeObserver")
2852
2851
  );
2853
2852
  return E.useEffect(() => {
2854
2853
  e && (n(e.viewportHeight), o(e.itemHeight));
2855
2854
  }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: r, style: He(!1), children: t });
2856
- }, Vr = ({ children: t }) => {
2857
- const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = $e(
2855
+ }, Lr = ({ children: t }) => {
2856
+ const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r = _("customScrollParent"), s = _("useWindowScroll"), i = $e(
2858
2857
  n,
2859
2858
  r,
2860
- A("skipAnimationFrameInResizeObserver")
2859
+ _("skipAnimationFrameInResizeObserver")
2861
2860
  );
2862
2861
  return E.useEffect(() => {
2863
2862
  e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2864
2863
  }, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: tn(!1, s), children: t });
2865
- }, Wr = /* @__PURE__ */ E.memo(function(e) {
2866
- const n = A("useWindowScroll"), o = A("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = A("fixedHeaderContent"), l = A("fixedFooterContent"), c = A("context"), d = Lt(
2864
+ }, zr = /* @__PURE__ */ E.memo(function(e) {
2865
+ const n = _("useWindowScroll"), o = _("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), d = kt(
2867
2866
  E.useMemo(() => re(r, (a) => Ht(a, "height")), [r]),
2868
2867
  !0,
2869
- A("skipAnimationFrameInResizeObserver")
2870
- ), m = Lt(
2868
+ _("skipAnimationFrameInResizeObserver")
2869
+ ), m = kt(
2871
2870
  E.useMemo(() => re(s, (a) => Ht(a, "height")), [s]),
2872
2871
  !0,
2873
- A("skipAnimationFrameInResizeObserver")
2874
- ), v = o || n ? Gr : Pr, p = o || n ? Vr : Fr, I = A("TableComponent"), w = A("TableHeadComponent"), R = A("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
2872
+ _("skipAnimationFrameInResizeObserver")
2873
+ ), v = o || n ? Vr : Fr, p = o || n ? Lr : kr, I = _("TableComponent"), w = _("TableHeadComponent"), R = _("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
2875
2874
  w,
2876
2875
  {
2877
2876
  ref: d,
@@ -2892,16 +2891,16 @@ const Cr = ({ children: t }) => {
2892
2891
  ) : null;
2893
2892
  return /* @__PURE__ */ G(v, { ...e, ...ot(v, c), children: /* @__PURE__ */ G(p, { children: /* @__PURE__ */ $t(I, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...ot(I, c), children: [
2894
2893
  h,
2895
- /* @__PURE__ */ G(zr, {}, "TableBody"),
2894
+ /* @__PURE__ */ G(Or, {}, "TableBody"),
2896
2895
  f
2897
2896
  ] }) }) });
2898
2897
  }), {
2899
- Component: po,
2898
+ Component: ao,
2900
2899
  useEmitter: rn,
2901
- useEmitterValue: A,
2900
+ useEmitterValue: _,
2902
2901
  usePublisher: bt
2903
2902
  } = /* @__PURE__ */ Xe(
2904
- Br,
2903
+ Rr,
2905
2904
  {
2906
2905
  optional: {
2907
2906
  restoreStateFrom: "restoreStateFrom",
@@ -2957,8 +2956,8 @@ const Cr = ({ children: t }) => {
2957
2956
  groupIndices: "groupIndices"
2958
2957
  }
2959
2958
  },
2960
- Wr
2961
- ), Pr = /* @__PURE__ */ en({ useEmitter: rn, useEmitterValue: A, usePublisher: bt }), Gr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: A, usePublisher: bt }), is = po, ls = po, Ln = {
2959
+ zr
2960
+ ), Fr = /* @__PURE__ */ en({ useEmitter: rn, useEmitterValue: _, usePublisher: bt }), Vr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: _, usePublisher: bt }), os = ao, rs = ao, Bn = {
2962
2961
  bottom: 0,
2963
2962
  itemHeight: 0,
2964
2963
  items: [],
@@ -2966,7 +2965,7 @@ const Cr = ({ children: t }) => {
2966
2965
  offsetBottom: 0,
2967
2966
  offsetTop: 0,
2968
2967
  top: 0
2969
- }, Mr = {
2968
+ }, Wr = {
2970
2969
  bottom: 0,
2971
2970
  itemHeight: 0,
2972
2971
  items: [{ index: 0 }],
@@ -2974,23 +2973,23 @@ const Cr = ({ children: t }) => {
2974
2973
  offsetBottom: 0,
2975
2974
  offsetTop: 0,
2976
2975
  top: 0
2977
- }, { ceil: kn, floor: Ce, max: oe, min: ze, round: zn } = Math;
2978
- function Fn(t, e, n) {
2976
+ }, { ceil: On, floor: Ce, max: oe, min: ze, round: kn } = Math;
2977
+ function Ln(t, e, n) {
2979
2978
  return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
2980
2979
  }
2981
- function Ar(t) {
2980
+ function Pr(t) {
2982
2981
  return {
2983
- ...Mr,
2982
+ ...Wr,
2984
2983
  items: t
2985
2984
  };
2986
2985
  }
2987
2986
  function Se(t, e) {
2988
2987
  return t !== void 0 && t.width === e.width && t.height === e.height;
2989
2988
  }
2990
- function _r(t, e) {
2989
+ function Gr(t, e) {
2991
2990
  return t !== void 0 && t.column === e.column && t.row === e.row;
2992
2991
  }
2993
- const Nr = /* @__PURE__ */ j(
2992
+ const Ar = /* @__PURE__ */ j(
2994
2993
  ([
2995
2994
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
2996
2995
  { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: d, smoothScrollTargetReached: m, viewportHeight: v },
@@ -3000,26 +2999,30 @@ const Nr = /* @__PURE__ */ j(
3000
2999
  { customScrollParent: h, useWindowScroll: f, windowScrollContainerState: a, windowScrollTo: S, windowViewportRect: H },
3001
3000
  y
3002
3001
  ]) => {
3003
- const L = T(0), u = T(0), g = T(Ln), C = T({ height: 0, width: 0 }), k = T({ height: 0, width: 0 }), O = U(), V = U(), N = T(0), Z = T(null), F = T({ column: 0, row: 0 }), mt = U(), q = U(), Q = T(!1), gt = T(0), ut = T(!0), St = T(!1), Ft = T(!1);
3002
+ const k = T(0), u = T(0), g = T(Bn), C = T({ height: 0, width: 0 }), L = T({ height: 0, width: 0 }), O = U(), V = U(), N = T(0), Z = T(null), F = T({ column: 0, row: 0 }), mt = U(), q = U(), Q = T(!1), gt = T(0), lt = T(!0), St = T(!1), Ft = T(!1);
3004
3003
  Y(
3005
3004
  x(
3006
3005
  w,
3007
3006
  $(gt),
3008
- P(([b, D]) => D !== 0)
3007
+ P(([b, D]) => !Ae(D))
3009
3008
  ),
3010
3009
  () => {
3011
- _(ut, !1);
3010
+ M(lt, !1);
3012
3011
  }
3013
3012
  ), Y(
3014
3013
  x(
3015
- at(w, ut, k, C, gt, St),
3014
+ at(w, lt, L, C, gt, St),
3016
3015
  P(([b, D, K, st, , tt]) => b && !D && K.height !== 0 && st.height !== 0 && !tt)
3017
3016
  ),
3018
3017
  ([, , , , b]) => {
3019
- _(St, !0), je(1, () => {
3020
- _(O, b);
3018
+ if (b === void 0) {
3019
+ M(lt, !0);
3020
+ return;
3021
+ }
3022
+ M(St, !0), je(1, () => {
3023
+ M(O, b);
3021
3024
  }), yt(x(d), () => {
3022
- _(e, [0, 0]), _(ut, !0);
3025
+ M(e, [0, 0]), M(lt, !0);
3023
3026
  });
3024
3027
  }
3025
3028
  ), z(
@@ -3036,9 +3039,9 @@ const Nr = /* @__PURE__ */ j(
3036
3039
  P(([, b]) => b != null)
3037
3040
  ),
3038
3041
  ([, b]) => {
3039
- b && (_(C, b.viewport), _(k, b.item), _(F, b.gap), b.scrollTop > 0 && (_(Q, !0), yt(x(d, Ut(1)), (D) => {
3040
- _(Q, !1);
3041
- }), _(c, { top: b.scrollTop })));
3042
+ b && (M(C, b.viewport), M(L, b.item), M(F, b.gap), b.scrollTop > 0 && (M(Q, !0), yt(x(d, Ut(1)), (D) => {
3043
+ M(Q, !1);
3044
+ }), M(c, { top: b.scrollTop })));
3042
3045
  }
3043
3046
  ), z(
3044
3047
  x(
@@ -3050,7 +3053,7 @@ const Nr = /* @__PURE__ */ j(
3050
3053
  x(
3051
3054
  at(
3052
3055
  W(C, Se),
3053
- W(k, Se),
3056
+ W(L, Se),
3054
3057
  W(F, (b, D) => b !== void 0 && b.column === D.column && b.row === D.row),
3055
3058
  W(d)
3056
3059
  ),
@@ -3065,15 +3068,15 @@ const Nr = /* @__PURE__ */ j(
3065
3068
  ), z(
3066
3069
  x(
3067
3070
  at(
3068
- W(L),
3071
+ W(k),
3069
3072
  o,
3070
- W(F, _r),
3071
- W(k, Se),
3073
+ W(F, Gr),
3074
+ W(L, Se),
3072
3075
  W(C, Se),
3073
3076
  W(Z),
3074
3077
  W(u),
3075
3078
  W(Q),
3076
- W(ut),
3079
+ W(lt),
3077
3080
  W(gt)
3078
3081
  ),
3079
3082
  P(([, , , , , , , b]) => !b),
@@ -3084,24 +3087,24 @@ const Nr = /* @__PURE__ */ j(
3084
3087
  st,
3085
3088
  tt,
3086
3089
  X,
3087
- lt,
3090
+ ct,
3088
3091
  xt,
3089
3092
  ,
3090
- ct,
3093
+ ut,
3091
3094
  Vt
3092
3095
  ]) => {
3093
3096
  const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width: sn } = X;
3094
3097
  if (xt === 0 && (b === 0 || sn === 0))
3095
- return Ln;
3098
+ return Bn;
3096
3099
  if (Ee === 0) {
3097
- const dn = qe(Vt, b), So = dn + Math.max(xt - 1, 0);
3098
- return Ar(Fn(dn, So, lt));
3100
+ const dn = qe(Vt, b), ho = dn + Math.max(xt - 1, 0);
3101
+ return Pr(Ln(dn, ho, ct));
3099
3102
  }
3100
- const ge = ho(sn, Ee, Wt);
3101
- let qt, At;
3102
- ct ? D === 0 && K === 0 && xt > 0 ? (qt = 0, At = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), At = ge * kn((K + ee) / (he + ee)) - 1, At = ze(b - 1, oe(At, ge - 1)), qt = ze(At, oe(0, qt))) : (qt = 0, At = -1);
3103
- const ln = Fn(qt, At, lt), { bottom: cn, top: un } = Vn(X, st, tt, ln), an = kn(b / ge), Io = an * he + (an - 1) * ee - cn;
3104
- return { bottom: cn, itemHeight: he, items: ln, itemWidth: Ee, offsetBottom: Io, offsetTop: un, top: un };
3103
+ const ge = fo(sn, Ee, Wt);
3104
+ let qt, Mt;
3105
+ ut ? D === 0 && K === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), Mt = ge * On((K + ee) / (he + ee)) - 1, Mt = ze(b - 1, oe(Mt, ge - 1)), qt = ze(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
3106
+ const ln = Ln(qt, Mt, ct), { bottom: cn, top: un } = zn(X, st, tt, ln), an = On(b / ge), po = an * he + (an - 1) * ee - cn;
3107
+ return { bottom: cn, itemHeight: he, items: ln, itemWidth: Ee, offsetBottom: po, offsetTop: un, top: un };
3105
3108
  }
3106
3109
  )
3107
3110
  ),
@@ -3112,13 +3115,13 @@ const Nr = /* @__PURE__ */ j(
3112
3115
  P((b) => b !== null),
3113
3116
  B((b) => b.length)
3114
3117
  ),
3115
- L
3118
+ k
3116
3119
  ), z(
3117
3120
  x(
3118
- at(C, k, g, F),
3121
+ at(C, L, g, F),
3119
3122
  P(([b, D, { items: K }]) => K.length > 0 && D.height !== 0 && b.height !== 0),
3120
3123
  B(([b, D, { items: K }, st]) => {
3121
- const { bottom: tt, top: X } = Vn(b, st, D, K);
3124
+ const { bottom: tt, top: X } = zn(b, st, D, K);
3122
3125
  return [X, tt];
3123
3126
  }),
3124
3127
  nt(le)
@@ -3136,7 +3139,7 @@ const Nr = /* @__PURE__ */ j(
3136
3139
  );
3137
3140
  const jt = Tt(
3138
3141
  x(
3139
- at(g, L),
3142
+ at(g, k),
3140
3143
  P(([{ items: b }]) => b.length > 0),
3141
3144
  $(pt),
3142
3145
  P(([[b, D], K]) => {
@@ -3162,20 +3165,20 @@ const Nr = /* @__PURE__ */ j(
3162
3165
  endIndex: b[b.length - 1].index,
3163
3166
  startIndex: b[0].index
3164
3167
  })),
3165
- nt(jn),
3168
+ nt($n),
3166
3169
  zt(0)
3167
3170
  )
3168
3171
  );
3169
3172
  z(Et, I.scrollSeekRangeChanged), z(
3170
3173
  x(
3171
3174
  O,
3172
- $(C, k, L, F),
3175
+ $(C, L, k, F),
3173
3176
  B(([b, D, K, st, tt]) => {
3174
- const X = Jn(b), { align: lt, behavior: xt, offset: ct } = X;
3177
+ const X = Yn(b), { align: ct, behavior: xt, offset: ut } = X;
3175
3178
  let Vt = X.index;
3176
3179
  Vt === "LAST" && (Vt = st - 1), Vt = oe(0, Vt, ze(st - 1, Vt));
3177
- let Wt = Ae(D, tt, K, Vt);
3178
- return lt === "end" ? Wt = zn(Wt - D.height + K.height) : lt === "center" && (Wt = zn(Wt - D.height / 2 + K.height / 2)), ct !== void 0 && ct !== 0 && (Wt += ct), { behavior: xt, top: Wt };
3180
+ let Wt = Me(D, tt, K, Vt);
3181
+ return ct === "end" ? Wt = kn(Wt - D.height + K.height) : ct === "center" && (Wt = kn(Wt - D.height / 2 + K.height / 2)), ut !== void 0 && ut !== 0 && (Wt += ut), { behavior: xt, top: Wt };
3179
3182
  })
3180
3183
  ),
3181
3184
  c
@@ -3203,7 +3206,7 @@ const Nr = /* @__PURE__ */ j(
3203
3206
  headerHeight: s,
3204
3207
  increaseViewportBy: t,
3205
3208
  initialItemCount: u,
3206
- itemDimensions: k,
3209
+ itemDimensions: L,
3207
3210
  overscan: n,
3208
3211
  restoreStateFrom: q,
3209
3212
  scrollBy: i,
@@ -3213,7 +3216,7 @@ const Nr = /* @__PURE__ */ j(
3213
3216
  scrollToIndex: O,
3214
3217
  scrollTop: d,
3215
3218
  smoothScrollTargetReached: m,
3216
- totalCount: L,
3219
+ totalCount: k,
3217
3220
  useWindowScroll: f,
3218
3221
  viewportDimensions: C,
3219
3222
  windowScrollContainerState: a,
@@ -3235,23 +3238,23 @@ const Nr = /* @__PURE__ */ j(
3235
3238
  ...y
3236
3239
  };
3237
3240
  },
3238
- rt(Ye, It, pe, ro, Mt, Ze, Gt)
3241
+ rt(Ye, It, pe, eo, At, Ze, Gt)
3239
3242
  );
3240
- function ho(t, e, n) {
3243
+ function fo(t, e, n) {
3241
3244
  return oe(1, Ce((t + n) / (Ce(e) + n)));
3242
3245
  }
3243
- function Vn(t, e, n, o) {
3246
+ function zn(t, e, n, o) {
3244
3247
  const { height: r } = n;
3245
3248
  if (r === void 0 || o.length === 0)
3246
3249
  return { bottom: 0, top: 0 };
3247
- const s = Ae(t, e, n, o[0].index);
3248
- return { bottom: Ae(t, e, n, o[o.length - 1].index) + r, top: s };
3250
+ const s = Me(t, e, n, o[0].index);
3251
+ return { bottom: Me(t, e, n, o[o.length - 1].index) + r, top: s };
3249
3252
  }
3250
- function Ae(t, e, n, o) {
3251
- const r = ho(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
3253
+ function Me(t, e, n, o) {
3254
+ const r = fo(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
3252
3255
  return i > 0 ? i + e.row : i;
3253
3256
  }
3254
- const Dr = /* @__PURE__ */ j(() => {
3257
+ const Mr = /* @__PURE__ */ j(() => {
3255
3258
  const t = T((v) => `Item ${v}`), e = T({}), n = T(null), o = T("virtuoso-grid-item"), r = T("virtuoso-grid-list"), s = T(Qe), i = T("div"), l = T(Jt), c = (v, p = null) => ht(
3256
3259
  x(
3257
3260
  e,
@@ -3278,23 +3281,23 @@ const Dr = /* @__PURE__ */ j(() => {
3278
3281
  scrollerRef: l,
3279
3282
  ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
3280
3283
  };
3281
- }), $r = /* @__PURE__ */ j(
3284
+ }), _r = /* @__PURE__ */ j(
3282
3285
  ([t, e]) => ({ ...t, ...e }),
3283
- rt(Nr, Dr)
3284
- ), Ur = /* @__PURE__ */ E.memo(function() {
3285
- const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = wt("scrollHeight"), c = et("ItemComponent"), d = et("ListComponent"), m = et("ScrollSeekPlaceholder"), v = et("context"), p = wt("itemDimensions"), I = wt("gap"), w = et("log"), R = et("stateRestoreInProgress"), h = wt("reportReadyState"), f = Lt(
3286
+ rt(Ar, Mr)
3287
+ ), Nr = /* @__PURE__ */ E.memo(function() {
3288
+ const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = wt("scrollHeight"), c = et("ItemComponent"), d = et("ListComponent"), m = et("ScrollSeekPlaceholder"), v = et("context"), p = wt("itemDimensions"), I = wt("gap"), w = et("log"), R = et("stateRestoreInProgress"), h = wt("reportReadyState"), f = kt(
3286
3289
  E.useMemo(
3287
3290
  () => (a) => {
3288
3291
  const S = a.parentElement.parentElement.scrollHeight;
3289
3292
  l(S);
3290
3293
  const H = a.firstChild;
3291
3294
  if (H !== null) {
3292
- const { height: y, width: L } = H.getBoundingClientRect();
3293
- p({ height: y, width: L });
3295
+ const { height: y, width: k } = H.getBoundingClientRect();
3296
+ p({ height: y, width: k });
3294
3297
  }
3295
3298
  I({
3296
- column: Wn("column-gap", getComputedStyle(a).columnGap, w),
3297
- row: Wn("row-gap", getComputedStyle(a).rowGap, w)
3299
+ column: Fn("column-gap", getComputedStyle(a).columnGap, w),
3300
+ row: Fn("row-gap", getComputedStyle(a).rowGap, w)
3298
3301
  });
3299
3302
  },
3300
3303
  [l, p, I, w]
@@ -3302,7 +3305,7 @@ const Dr = /* @__PURE__ */ j(() => {
3302
3305
  !0,
3303
3306
  !1
3304
3307
  );
3305
- return co(() => {
3308
+ return so(() => {
3306
3309
  e.itemHeight > 0 && e.itemWidth > 0 && h(!0);
3307
3310
  }, [e]), R ? null : /* @__PURE__ */ G(
3308
3311
  d,
@@ -3336,8 +3339,8 @@ const Dr = /* @__PURE__ */ j(() => {
3336
3339
  })
3337
3340
  }
3338
3341
  );
3339
- }), Kr = E.memo(function() {
3340
- const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r = Lt(
3342
+ }), Dr = E.memo(function() {
3343
+ const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r = kt(
3341
3344
  E.useMemo(
3342
3345
  () => (i) => {
3343
3346
  n(Ht(i, "height"));
@@ -3348,8 +3351,8 @@ const Dr = /* @__PURE__ */ j(() => {
3348
3351
  !1
3349
3352
  ), s = et("context");
3350
3353
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
3351
- }), jr = E.memo(function() {
3352
- const e = et("FooterComponent"), n = wt("footerHeight"), o = et("headerFooterTag"), r = Lt(
3354
+ }), $r = E.memo(function() {
3355
+ const e = et("FooterComponent"), n = wt("footerHeight"), o = et("headerFooterTag"), r = kt(
3353
3356
  E.useMemo(
3354
3357
  () => (i) => {
3355
3358
  n(Ht(i, "height"));
@@ -3360,8 +3363,8 @@ const Dr = /* @__PURE__ */ j(() => {
3360
3363
  !1
3361
3364
  ), s = et("context");
3362
3365
  return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
3363
- }), qr = ({ children: t }) => {
3364
- const e = E.useContext(lo), n = wt("itemDimensions"), o = wt("viewportDimensions"), r = Lt(
3366
+ }), Ur = ({ children: t }) => {
3367
+ const e = E.useContext(ro), n = wt("itemDimensions"), o = wt("viewportDimensions"), r = kt(
3365
3368
  E.useMemo(
3366
3369
  () => (s) => {
3367
3370
  o(s.getBoundingClientRect());
@@ -3374,25 +3377,25 @@ const Dr = /* @__PURE__ */ j(() => {
3374
3377
  return E.useEffect(() => {
3375
3378
  e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
3376
3379
  }, [e, o, n]), /* @__PURE__ */ G("div", { ref: r, style: He(!1), children: t });
3377
- }, Yr = ({ children: t }) => {
3378
- const e = E.useContext(lo), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i = $e(n, r, !1);
3380
+ }, Kr = ({ children: t }) => {
3381
+ const e = E.useContext(ro), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i = $e(n, r, !1);
3379
3382
  return E.useEffect(() => {
3380
3383
  e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
3381
3384
  }, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: tn(!1, s), children: t });
3382
- }, Zr = /* @__PURE__ */ E.memo(function({ ...e }) {
3383
- const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Qr : Jr, s = o || n ? Yr : qr, i = et("context");
3385
+ }, jr = /* @__PURE__ */ E.memo(function({ ...e }) {
3386
+ const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Zr : Yr, s = o || n ? Kr : Ur, i = et("context");
3384
3387
  return /* @__PURE__ */ G(r, { ...e, ...ot(r, i), children: /* @__PURE__ */ $t(s, { children: [
3385
- /* @__PURE__ */ G(Kr, {}),
3386
- /* @__PURE__ */ G(Ur, {}),
3387
- /* @__PURE__ */ G(jr, {})
3388
+ /* @__PURE__ */ G(Dr, {}),
3389
+ /* @__PURE__ */ G(Nr, {}),
3390
+ /* @__PURE__ */ G($r, {})
3388
3391
  ] }) });
3389
3392
  }), {
3390
- Component: Xr,
3391
- useEmitter: go,
3393
+ Component: qr,
3394
+ useEmitter: mo,
3392
3395
  useEmitterValue: et,
3393
3396
  usePublisher: wt
3394
3397
  } = /* @__PURE__ */ Xe(
3395
- $r,
3398
+ _r,
3396
3399
  {
3397
3400
  optional: {
3398
3401
  context: "context",
@@ -3431,19 +3434,19 @@ const Dr = /* @__PURE__ */ j(() => {
3431
3434
  readyStateChanged: "readyStateChanged"
3432
3435
  }
3433
3436
  },
3434
- Zr
3435
- ), Jr = /* @__PURE__ */ en({ useEmitter: go, useEmitterValue: et, usePublisher: wt }), Qr = /* @__PURE__ */ nn({ useEmitter: go, useEmitterValue: et, usePublisher: wt });
3436
- function Wn(t, e, n) {
3437
+ jr
3438
+ ), Yr = /* @__PURE__ */ en({ useEmitter: mo, useEmitterValue: et, usePublisher: wt }), Zr = /* @__PURE__ */ nn({ useEmitter: mo, useEmitterValue: et, usePublisher: wt });
3439
+ function Fn(t, e, n) {
3437
3440
  return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
3438
3441
  }
3439
- const cs = Xr;
3442
+ const ss = qr;
3440
3443
  export {
3441
- ls as GroupedTableVirtuoso,
3442
- ss as GroupedVirtuoso,
3444
+ rs as GroupedTableVirtuoso,
3445
+ ns as GroupedVirtuoso,
3443
3446
  ft as LogLevel,
3444
- is as TableVirtuoso,
3445
- rs as Virtuoso,
3446
- cs as VirtuosoGrid,
3447
- lo as VirtuosoGridMockContext,
3447
+ os as TableVirtuoso,
3448
+ es as Virtuoso,
3449
+ ss as VirtuosoGrid,
3450
+ ro as VirtuosoGridMockContext,
3448
3451
  Re as VirtuosoMockContext
3449
3452
  };