react-virtuoso 4.13.0 → 4.14.1

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,28 +1,28 @@
1
- import { jsx as z, jsxs as Nt, Fragment as lo } from "react/jsx-runtime";
1
+ import { jsx as P, jsxs as Nt, Fragment as uo } from "react/jsx-runtime";
2
2
  import H, { createElement as _t } from "react";
3
- import co from "react-dom";
3
+ import ao from "react-dom";
4
4
  const we = 0, zt = 1, qt = 2, kn = 4;
5
- function cn(t) {
5
+ function un(t) {
6
6
  return () => t;
7
7
  }
8
- function uo(t) {
8
+ function fo(t) {
9
9
  t();
10
10
  }
11
11
  function ne(t, e) {
12
12
  return (n) => t(e(n));
13
13
  }
14
- function un(t, e) {
14
+ function an(t, e) {
15
15
  return () => t(e);
16
16
  }
17
- function ao(t, e) {
17
+ function mo(t, e) {
18
18
  return (n) => t(e, n);
19
19
  }
20
- function Me(t) {
20
+ function We(t) {
21
21
  return t !== void 0;
22
22
  }
23
- function fo(...t) {
23
+ function po(...t) {
24
24
  return () => {
25
- t.map(uo);
25
+ t.map(fo);
26
26
  };
27
27
  }
28
28
  function Yt() {
@@ -30,7 +30,7 @@ function Yt() {
30
30
  function ve(t, e) {
31
31
  return e(t), t;
32
32
  }
33
- function mo(t, e) {
33
+ function ho(t, e) {
34
34
  return e(t);
35
35
  }
36
36
  function X(...t) {
@@ -42,22 +42,22 @@ function K(t, e) {
42
42
  function G(t, e) {
43
43
  t(we, e);
44
44
  }
45
- function We(t) {
45
+ function Ge(t) {
46
46
  t(qt);
47
47
  }
48
- function st(t) {
48
+ function ot(t) {
49
49
  return t(kn);
50
50
  }
51
51
  function O(t, e) {
52
- return K(t, ao(e, we));
52
+ return K(t, mo(e, we));
53
53
  }
54
- function bt(t, e) {
54
+ function Tt(t, e) {
55
55
  const n = t(zt, (o) => {
56
56
  n(), e(o);
57
57
  });
58
58
  return n;
59
59
  }
60
- function an(t) {
60
+ function dn(t) {
61
61
  let e, n;
62
62
  return (o) => (r) => {
63
63
  e = r, n && clearTimeout(n), n = setTimeout(() => {
@@ -68,13 +68,13 @@ function an(t) {
68
68
  function Fn(t, e) {
69
69
  return t === e;
70
70
  }
71
- function Z(t = Fn) {
71
+ function Y(t = Fn) {
72
72
  let e;
73
73
  return (n) => (o) => {
74
74
  t(e, o) || (e = o, n(o));
75
75
  };
76
76
  }
77
- function P(t) {
77
+ function A(t) {
78
78
  return (e) => (n) => {
79
79
  t(n) && e(n);
80
80
  };
@@ -82,34 +82,34 @@ function P(t) {
82
82
  function E(t) {
83
83
  return (e) => ne(e, t);
84
84
  }
85
- function yt(t) {
85
+ function Rt(t) {
86
86
  return (e) => () => {
87
87
  e(t);
88
88
  };
89
89
  }
90
- function x(t, ...e) {
91
- const n = po(...e);
90
+ function S(t, ...e) {
91
+ const n = go(...e);
92
92
  return (o, r) => {
93
93
  switch (o) {
94
94
  case qt:
95
- We(t);
95
+ Ge(t);
96
96
  return;
97
97
  case zt:
98
98
  return K(t, n(r));
99
99
  }
100
100
  };
101
101
  }
102
- function Rt(t, e) {
102
+ function bt(t, e) {
103
103
  return (n) => (o) => {
104
104
  n(e = t(e, o));
105
105
  };
106
106
  }
107
- function jt(t) {
107
+ function Dt(t) {
108
108
  return (e) => (n) => {
109
109
  t > 0 ? t-- : e(n);
110
110
  };
111
111
  }
112
- function Lt(t) {
112
+ function kt(t) {
113
113
  let e = null, n;
114
114
  return (o) => (r) => {
115
115
  e = r, !n && (n = setTimeout(() => {
@@ -117,7 +117,7 @@ function Lt(t) {
117
117
  }, t));
118
118
  };
119
119
  }
120
- function _(...t) {
120
+ function N(...t) {
121
121
  const e = new Array(t.length);
122
122
  let n = 0, o = null;
123
123
  const r = Math.pow(2, t.length) - 1;
@@ -134,10 +134,10 @@ function _(...t) {
134
134
  n === r ? l() : o = l;
135
135
  };
136
136
  }
137
- function po(...t) {
138
- return (e) => t.reduceRight(mo, e);
137
+ function go(...t) {
138
+ return (e) => t.reduceRight(ho, e);
139
139
  }
140
- function ho(t) {
140
+ function Io(t) {
141
141
  let e, n;
142
142
  const o = () => e == null ? void 0 : e();
143
143
  return function(r, s) {
@@ -150,7 +150,7 @@ function ho(t) {
150
150
  }
151
151
  };
152
152
  }
153
- function C(t) {
153
+ function w(t) {
154
154
  let e = t;
155
155
  const n = $();
156
156
  return (o, r) => {
@@ -169,7 +169,7 @@ function C(t) {
169
169
  };
170
170
  }
171
171
  function ct(t, e) {
172
- return ve(C(e), (n) => O(t, n));
172
+ return ve(w(e), (n) => O(t, n));
173
173
  }
174
174
  function $() {
175
175
  const t = [];
@@ -198,12 +198,12 @@ function U(t, e = [], { singleton: n } = { singleton: !0 }) {
198
198
  return {
199
199
  constructor: t,
200
200
  dependencies: e,
201
- id: go(),
201
+ id: So(),
202
202
  singleton: n
203
203
  };
204
204
  }
205
- const go = () => Symbol();
206
- function Io(t) {
205
+ const So = () => Symbol();
206
+ function xo(t) {
207
207
  const e = /* @__PURE__ */ new Map(), n = ({ constructor: o, dependencies: r, id: s, singleton: i }) => {
208
208
  if (i && e.has(s))
209
209
  return e.get(s);
@@ -224,7 +224,7 @@ function rt(...t) {
224
224
  }), function(s, i) {
225
225
  switch (s) {
226
226
  case qt: {
227
- We(e);
227
+ Ge(e);
228
228
  return;
229
229
  }
230
230
  case zt:
@@ -232,36 +232,36 @@ function rt(...t) {
232
232
  }
233
233
  };
234
234
  }
235
- function A(t, e = Fn) {
236
- return x(t, Z(e));
235
+ function V(t, e = Fn) {
236
+ return S(t, Y(e));
237
237
  }
238
- function dn(...t) {
238
+ function Le(...t) {
239
239
  return function(e, n) {
240
240
  switch (e) {
241
241
  case qt:
242
242
  return;
243
243
  case zt:
244
- return fo(...t.map((o) => K(o, n)));
244
+ return po(...t.map((o) => K(o, n)));
245
245
  }
246
246
  };
247
247
  }
248
248
  var mt = /* @__PURE__ */ ((t) => (t[t.DEBUG = 0] = "DEBUG", t[t.INFO = 1] = "INFO", t[t.WARN = 2] = "WARN", t[t.ERROR = 3] = "ERROR", t))(mt || {});
249
- const So = {
249
+ const To = {
250
250
  0: "debug",
251
251
  3: "error",
252
252
  1: "log",
253
253
  2: "warn"
254
- }, xo = () => typeof globalThis > "u" ? window : globalThis, Vt = U(
254
+ }, Co = () => typeof globalThis > "u" ? window : globalThis, Vt = U(
255
255
  () => {
256
- const t = C(
256
+ const t = w(
257
257
  3
258
258
  /* ERROR */
259
259
  );
260
260
  return {
261
- log: C((n, o, r = 1) => {
261
+ log: w((n, o, r = 1) => {
262
262
  var i;
263
- const s = (i = xo().VIRTUOSO_LOG_LEVEL) != null ? i : st(t);
264
- r >= s && console[So[r]](
263
+ const s = (i = Co().VIRTUOSO_LOG_LEVEL) != null ? i : ot(t);
264
+ r >= s && console[To[r]](
265
265
  "%creact-virtuoso: %c%s %o",
266
266
  "color: #0253b3; font-weight: bold",
267
267
  "color: initial",
@@ -276,9 +276,9 @@ const So = {
276
276
  { singleton: !0 }
277
277
  );
278
278
  function Ht(t, e, n) {
279
- return Ge(t, e, n).callbackRef;
279
+ return _e(t, e, n).callbackRef;
280
280
  }
281
- function Ge(t, e, n) {
281
+ function _e(t, e, n) {
282
282
  const o = H.useRef(null);
283
283
  let r = (i) => {
284
284
  };
@@ -295,28 +295,28 @@ function Ge(t, e, n) {
295
295
  }
296
296
  function On(t, e, n, o, r, s, i, l, c) {
297
297
  const a = H.useCallback(
298
- (p) => {
299
- const S = To(p.children, e, l ? "offsetWidth" : "offsetHeight", r);
300
- let g = p.parentElement;
301
- for (; !g.dataset.virtuosoScroller; )
302
- g = g.parentElement;
303
- const h = g.lastElementChild.dataset.viewportType === "window";
304
- let w;
305
- h && (w = g.ownerDocument.defaultView);
306
- const v = i ? l ? i.scrollLeft : i.scrollTop : h ? l ? w.scrollX || w.document.documentElement.scrollLeft : w.scrollY || w.document.documentElement.scrollTop : l ? g.scrollLeft : g.scrollTop, m = i ? l ? i.scrollWidth : i.scrollHeight : h ? l ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight : l ? g.scrollWidth : g.scrollHeight, d = i ? l ? i.offsetWidth : i.offsetHeight : h ? l ? w.innerWidth : w.innerHeight : l ? g.offsetWidth : g.offsetHeight;
298
+ (m) => {
299
+ const x = wo(m.children, e, l ? "offsetWidth" : "offsetHeight", r);
300
+ let h = m.parentElement;
301
+ for (; !h.dataset.virtuosoScroller; )
302
+ h = h.parentElement;
303
+ const I = h.lastElementChild.dataset.viewportType === "window";
304
+ let C;
305
+ I && (C = h.ownerDocument.defaultView);
306
+ const v = i ? l ? i.scrollLeft : i.scrollTop : I ? l ? C.scrollX || C.document.documentElement.scrollLeft : C.scrollY || C.document.documentElement.scrollTop : l ? h.scrollLeft : h.scrollTop, g = i ? l ? i.scrollWidth : i.scrollHeight : I ? l ? C.document.documentElement.scrollWidth : C.document.documentElement.scrollHeight : l ? h.scrollWidth : h.scrollHeight, p = i ? l ? i.offsetWidth : i.offsetHeight : I ? l ? C.innerWidth : C.innerHeight : l ? h.offsetWidth : h.offsetHeight;
307
307
  o({
308
- scrollHeight: m,
308
+ scrollHeight: g,
309
309
  scrollTop: Math.max(v, 0),
310
- viewportHeight: d
310
+ viewportHeight: p
311
311
  }), s == null || s(
312
- l ? fn("column-gap", getComputedStyle(p).columnGap, r) : fn("row-gap", getComputedStyle(p).rowGap, r)
313
- ), S !== null && t(S);
312
+ l ? fn("column-gap", getComputedStyle(m).columnGap, r) : fn("row-gap", getComputedStyle(m).rowGap, r)
313
+ ), x !== null && t(x);
314
314
  },
315
315
  [t, e, r, s, i, o, l]
316
316
  );
317
- return Ge(a, n, c);
317
+ return _e(a, n, c);
318
318
  }
319
- function To(t, e, n, o) {
319
+ function wo(t, e, n, o) {
320
320
  const r = t.length;
321
321
  if (r === 0)
322
322
  return null;
@@ -325,40 +325,40 @@ function To(t, e, n, o) {
325
325
  const l = t.item(i);
326
326
  if (l.dataset.index === void 0)
327
327
  continue;
328
- const c = parseInt(l.dataset.index), a = parseFloat(l.dataset.knownSize), p = e(l, n);
329
- if (p === 0 && o("Zero-sized element, this should not happen", { child: l }, mt.ERROR), p === a)
328
+ const c = parseInt(l.dataset.index), a = parseFloat(l.dataset.knownSize), m = e(l, n);
329
+ if (m === 0 && o("Zero-sized element, this should not happen", { child: l }, mt.ERROR), m === a)
330
330
  continue;
331
- const S = s[s.length - 1];
332
- s.length === 0 || S.size !== p || S.endIndex !== c - 1 ? s.push({ endIndex: c, size: p, startIndex: c }) : s[s.length - 1].endIndex++;
331
+ const x = s[s.length - 1];
332
+ s.length === 0 || x.size !== m || x.endIndex !== c - 1 ? s.push({ endIndex: c, size: m, startIndex: c }) : s[s.length - 1].endIndex++;
333
333
  }
334
334
  return s;
335
335
  }
336
336
  function fn(t, e, n) {
337
337
  return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, mt.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
338
338
  }
339
- function _e(t, e, n) {
339
+ function Ne(t, e, n) {
340
340
  const o = H.useRef(null), r = H.useCallback(
341
341
  (c) => {
342
342
  if (!(c != null && c.offsetParent))
343
343
  return;
344
- const a = c.getBoundingClientRect(), p = a.width;
345
- let S, g;
344
+ const a = c.getBoundingClientRect(), m = a.width;
345
+ let x, h;
346
346
  if (e) {
347
- const h = e.getBoundingClientRect(), w = a.top - h.top;
348
- g = h.height - Math.max(0, w), S = w + e.scrollTop;
347
+ const I = e.getBoundingClientRect(), C = a.top - I.top;
348
+ h = I.height - Math.max(0, C), x = C + e.scrollTop;
349
349
  } else {
350
- const h = i.current.ownerDocument.defaultView;
351
- g = h.innerHeight - Math.max(0, a.top), S = a.top + h.scrollY;
350
+ const I = i.current.ownerDocument.defaultView;
351
+ h = I.innerHeight - Math.max(0, a.top), x = a.top + I.scrollY;
352
352
  }
353
353
  o.current = {
354
- offsetTop: S,
355
- visibleHeight: g,
356
- visibleWidth: p
354
+ offsetTop: x,
355
+ visibleHeight: h,
356
+ visibleWidth: m
357
357
  }, t(o.current);
358
358
  },
359
359
  // eslint-disable-next-line react-hooks/exhaustive-deps
360
360
  [t, e]
361
- ), { callbackRef: s, ref: i } = Ge(r, !0, n), l = H.useCallback(() => {
361
+ ), { callbackRef: s, ref: i } = _e(r, !0, n), l = H.useCallback(() => {
362
362
  r(i.current);
363
363
  }, [r, i]);
364
364
  return H.useEffect(() => {
@@ -381,33 +381,33 @@ function _e(t, e, n) {
381
381
  }
382
382
  const at = U(
383
383
  () => {
384
- const t = $(), e = $(), n = C(0), o = $(), r = C(0), s = $(), i = $(), l = C(0), c = C(0), a = C(0), p = C(0), S = $(), g = $(), h = C(!1), w = C(!1), v = C(!1);
384
+ const t = $(), e = $(), n = w(0), o = $(), r = w(0), s = $(), i = $(), l = w(0), c = w(0), a = w(0), m = w(0), x = $(), h = $(), I = w(!1), C = w(!1), v = w(!1);
385
385
  return O(
386
- x(
386
+ S(
387
387
  t,
388
- E(({ scrollTop: m }) => m)
388
+ E(({ scrollTop: g }) => g)
389
389
  ),
390
390
  e
391
391
  ), O(
392
- x(
392
+ S(
393
393
  t,
394
- E(({ scrollHeight: m }) => m)
394
+ E(({ scrollHeight: g }) => g)
395
395
  ),
396
396
  i
397
397
  ), O(e, r), {
398
398
  deviation: n,
399
399
  fixedFooterHeight: a,
400
400
  fixedHeaderHeight: c,
401
- footerHeight: p,
401
+ footerHeight: m,
402
402
  headerHeight: l,
403
- horizontalDirection: w,
404
- scrollBy: g,
403
+ horizontalDirection: C,
404
+ scrollBy: h,
405
405
  // input
406
406
  scrollContainerState: t,
407
407
  scrollHeight: i,
408
- scrollingInProgress: h,
408
+ scrollingInProgress: I,
409
409
  // signals
410
- scrollTo: S,
410
+ scrollTo: x,
411
411
  scrollTop: e,
412
412
  skipAnimationFrameInResizeObserver: v,
413
413
  smoothScrollTargetReached: o,
@@ -438,30 +438,30 @@ function re(t, e) {
438
438
  if (!j(t))
439
439
  return e === t.k ? t.v : e < t.k ? re(t.l, e) : re(t.r, e);
440
440
  }
441
- function Ct(t, e, n = "k") {
441
+ function wt(t, e, n = "k") {
442
442
  if (j(t))
443
443
  return [-1 / 0, void 0];
444
444
  if (Number(t[n]) === e)
445
445
  return [t.k, t.v];
446
446
  if (Number(t[n]) < e) {
447
- const o = Ct(t.r, e, n);
447
+ const o = wt(t.r, e, n);
448
448
  return o[0] === -1 / 0 ? [t.k, t.v] : o;
449
449
  }
450
- return Ct(t.l, e, n);
450
+ return wt(t.l, e, n);
451
451
  }
452
452
  function pt(t, e, n) {
453
- return j(t) ? Pn(e, n, 1) : e === t.k ? ot(t, { k: e, v: n }) : e < t.k ? mn(ot(t, { l: pt(t.l, e, n) })) : mn(ot(t, { r: pt(t.r, e, n) }));
453
+ return j(t) ? Pn(e, n, 1) : e === t.k ? st(t, { k: e, v: n }) : e < t.k ? mn(st(t, { l: pt(t.l, e, n) })) : mn(st(t, { r: pt(t.r, e, n) }));
454
454
  }
455
- function Kt() {
455
+ function jt() {
456
456
  return oe;
457
457
  }
458
458
  function ye(t, e, n) {
459
459
  if (j(t))
460
460
  return [];
461
- const o = Ct(t, e)[0];
462
- return Co(ze(t, o, n));
461
+ const o = wt(t, e)[0];
462
+ return vo(Ve(t, o, n));
463
463
  }
464
- function Le(t, e) {
464
+ function ze(t, e) {
465
465
  if (j(t)) return oe;
466
466
  const { k: n, l: o, r } = t;
467
467
  if (e === n) {
@@ -471,19 +471,19 @@ function Le(t, e) {
471
471
  return o;
472
472
  {
473
473
  const [s, i] = Vn(o);
474
- return ge(ot(t, { k: s, l: zn(o), v: i }));
474
+ return ge(st(t, { k: s, l: zn(o), v: i }));
475
475
  }
476
- } else return e < n ? ge(ot(t, { l: Le(o, e) })) : ge(ot(t, { r: Le(r, e) }));
476
+ } else return e < n ? ge(st(t, { l: ze(o, e) })) : ge(st(t, { r: ze(r, e) }));
477
477
  }
478
478
  function Gt(t) {
479
479
  return j(t) ? [] : [...Gt(t.l), { k: t.k, v: t.v }, ...Gt(t.r)];
480
480
  }
481
- function ze(t, e, n) {
481
+ function Ve(t, e, n) {
482
482
  if (j(t))
483
483
  return [];
484
484
  const { k: o, l: r, r: s, v: i } = t;
485
485
  let l = [];
486
- return o > e && (l = l.concat(ze(r, e, n))), o >= e && o <= n && l.push({ k: o, v: i }), o <= n && (l = l.concat(ze(s, e, n))), l;
486
+ return o > e && (l = l.concat(Ve(r, e, n))), o >= e && o <= n && l.push({ k: o, v: i }), o <= n && (l = l.concat(Ve(s, e, n))), l;
487
487
  }
488
488
  function ge(t) {
489
489
  const { l: e, lvl: n, r: o } = t;
@@ -491,12 +491,12 @@ function ge(t) {
491
491
  return t;
492
492
  if (n > o.lvl + 1) {
493
493
  if (Ee(e))
494
- return An(ot(t, { lvl: n - 1 }));
494
+ return An(st(t, { lvl: n - 1 }));
495
495
  if (!j(e) && !j(e.r))
496
- return ot(e.r, {
497
- l: ot(e, { r: e.r.l }),
496
+ return st(e.r, {
497
+ l: st(e, { r: e.r.l }),
498
498
  lvl: n,
499
- r: ot(t, {
499
+ r: st(t, {
500
500
  l: e.r.r,
501
501
  lvl: n - 1
502
502
  })
@@ -504,22 +504,22 @@ function ge(t) {
504
504
  throw new Error("Unexpected empty nodes");
505
505
  } else {
506
506
  if (Ee(t))
507
- return Ve(ot(t, { lvl: n - 1 }));
507
+ return Pe(st(t, { lvl: n - 1 }));
508
508
  if (!j(o) && !j(o.l)) {
509
509
  const r = o.l, s = Ee(r) ? o.lvl - 1 : o.lvl;
510
- return ot(r, {
511
- l: ot(t, {
510
+ return st(r, {
511
+ l: st(t, {
512
512
  lvl: n - 1,
513
513
  r: r.l
514
514
  }),
515
515
  lvl: r.lvl + 1,
516
- r: Ve(ot(o, { l: r.r, lvl: s }))
516
+ r: Pe(st(o, { l: r.r, lvl: s }))
517
517
  });
518
518
  } else
519
519
  throw new Error("Unexpected empty nodes");
520
520
  }
521
521
  }
522
- function ot(t, e) {
522
+ function st(t, e) {
523
523
  return Pn(
524
524
  e.k !== void 0 ? e.k : t.k,
525
525
  e.v !== void 0 ? e.v : t.v,
@@ -529,7 +529,7 @@ function ot(t, e) {
529
529
  );
530
530
  }
531
531
  function zn(t) {
532
- return j(t.r) ? t.l : ge(ot(t, { r: zn(t.r) }));
532
+ return j(t.r) ? t.l : ge(st(t, { r: zn(t.r) }));
533
533
  }
534
534
  function Ee(t) {
535
535
  return j(t) || t.lvl > t.r.lvl;
@@ -541,17 +541,17 @@ function Pn(t, e, n, o = oe, r = oe) {
541
541
  return { k: t, l: o, lvl: n, r, v: e };
542
542
  }
543
543
  function mn(t) {
544
- return Ve(An(t));
544
+ return Pe(An(t));
545
545
  }
546
546
  function An(t) {
547
547
  const { l: e } = t;
548
- return !j(e) && e.lvl === t.lvl ? ot(e, { r: ot(t, { l: e.r }) }) : t;
548
+ return !j(e) && e.lvl === t.lvl ? st(e, { r: st(t, { l: e.r }) }) : t;
549
549
  }
550
- function Ve(t) {
550
+ function Pe(t) {
551
551
  const { lvl: e, r: n } = t;
552
- return !j(n) && !j(n.r) && n.lvl === e && n.r.lvl === e ? ot(n, { l: ot(t, { r: n.l }), lvl: e + 1 }) : t;
552
+ return !j(n) && !j(n.r) && n.lvl === e && n.r.lvl === e ? st(n, { l: st(t, { r: n.l }), lvl: e + 1 }) : t;
553
553
  }
554
- function Co(t) {
554
+ function vo(t) {
555
555
  return Ln(t, ({ k: e, v: n }) => ({ index: e, value: n }));
556
556
  }
557
557
  function Mn(t, e) {
@@ -560,8 +560,8 @@ function Mn(t, e) {
560
560
  function se(t, e) {
561
561
  return !!(t && t[0] === e[0] && t[1] === e[1]);
562
562
  }
563
- const Ne = U(
564
- () => ({ recalcInProgress: C(!1) }),
563
+ const De = U(
564
+ () => ({ recalcInProgress: w(!1) }),
565
565
  [],
566
566
  { singleton: !0 }
567
567
  );
@@ -586,31 +586,31 @@ function Se(t, e, n, o = 0) {
586
586
  }
587
587
  throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`);
588
588
  }
589
- function wo(t, e, n, o) {
589
+ function yo(t, e, n, o) {
590
590
  const r = Se(t, e, o), s = Se(t, n, o, r);
591
591
  return t.slice(r, s + 1);
592
592
  }
593
- function wt(t, e) {
593
+ function vt(t, e) {
594
594
  return Math.round(t.getBoundingClientRect()[e]);
595
595
  }
596
596
  function Re(t) {
597
597
  return !j(t.groupOffsetTree);
598
598
  }
599
- function De({ index: t }, e) {
599
+ function $e({ index: t }, e) {
600
600
  return e === t ? 0 : e < t ? -1 : 1;
601
601
  }
602
- function vo() {
602
+ function Ro() {
603
603
  return {
604
604
  groupIndices: [],
605
- groupOffsetTree: Kt(),
605
+ groupOffsetTree: jt(),
606
606
  lastIndex: 0,
607
607
  lastOffset: 0,
608
608
  lastSize: 0,
609
609
  offsetTree: [],
610
- sizeTree: Kt()
610
+ sizeTree: jt()
611
611
  };
612
612
  }
613
- function yo(t, e) {
613
+ function bo(t, e) {
614
614
  let n = j(t) ? 0 : 1 / 0;
615
615
  for (const o of e) {
616
616
  const { endIndex: r, size: s, startIndex: i } = o;
@@ -619,25 +619,25 @@ function yo(t, e) {
619
619
  continue;
620
620
  }
621
621
  const l = ye(t, i - 1, r + 1);
622
- if (l.some(Fo(o)))
622
+ if (l.some(Lo(o)))
623
623
  continue;
624
624
  let c = !1, a = !1;
625
- for (const { end: p, start: S, value: g } of l)
626
- c ? (r >= S || s === g) && (t = Le(t, S)) : (a = g !== s, c = !0), p > r && r >= S && g !== s && (t = pt(t, r + 1, g));
625
+ for (const { end: m, start: x, value: h } of l)
626
+ c ? (r >= x || s === h) && (t = ze(t, x)) : (a = h !== s, c = !0), m > r && r >= x && h !== s && (t = pt(t, r + 1, h));
627
627
  a && (t = pt(t, i, s));
628
628
  }
629
629
  return [t, n];
630
630
  }
631
- function Ro(t) {
631
+ function Ho(t) {
632
632
  return typeof t.groupIndex < "u";
633
633
  }
634
- function bo({ offset: t }, e) {
634
+ function Eo({ offset: t }, e) {
635
635
  return e === t ? 0 : e < t ? -1 : 1;
636
636
  }
637
637
  function ie(t, e, n) {
638
638
  if (e.length === 0)
639
639
  return 0;
640
- const { index: o, offset: r, size: s } = Wn(e, t, De), i = t - o, l = s * i + (i - 1) * n + r;
640
+ const { index: o, offset: r, size: s } = Wn(e, t, $e), i = t - o, l = s * i + (i - 1) * n + r;
641
641
  return l > 0 ? l + n : l;
642
642
  }
643
643
  function Gn(t, e) {
@@ -649,7 +649,7 @@ function Gn(t, e) {
649
649
  return t + n;
650
650
  }
651
651
  function _n(t, e, n) {
652
- if (Ro(t))
652
+ if (Ho(t))
653
653
  return e.groupIndices[t.groupIndex] + 1;
654
654
  {
655
655
  const o = t.index === "LAST" ? n : t.index;
@@ -657,32 +657,32 @@ function _n(t, e, n) {
657
657
  return r = Math.max(0, r, Math.min(n, r)), r;
658
658
  }
659
659
  }
660
- function Ho(t, e, n, o = 0) {
661
- return o > 0 && (e = Math.max(e, Wn(t, o, De).offset)), Ln(wo(t, e, n, bo), ko);
660
+ function Bo(t, e, n, o = 0) {
661
+ return o > 0 && (e = Math.max(e, Wn(t, o, $e).offset)), Ln(yo(t, e, n, Eo), Oo);
662
662
  }
663
- function Eo(t, [e, n, o, r]) {
663
+ function ko(t, [e, n, o, r]) {
664
664
  e.length > 0 && o("received item sizes", e, mt.DEBUG);
665
665
  const s = t.sizeTree;
666
666
  let i = s, l = 0;
667
667
  if (n.length > 0 && j(s) && e.length === 2) {
668
- const g = e[0].size, h = e[1].size;
669
- i = n.reduce((w, v) => pt(pt(w, v, g), v + 1, h), i);
668
+ const h = e[0].size, I = e[1].size;
669
+ i = n.reduce((C, v) => pt(pt(C, v, h), v + 1, I), i);
670
670
  } else
671
- [i, l] = yo(i, e);
671
+ [i, l] = bo(i, e);
672
672
  if (i === s)
673
673
  return t;
674
- const { lastIndex: c, lastOffset: a, lastSize: p, offsetTree: S } = Pe(t.offsetTree, l, i, r);
674
+ const { lastIndex: c, lastOffset: a, lastSize: m, offsetTree: x } = Ae(t.offsetTree, l, i, r);
675
675
  return {
676
676
  groupIndices: n,
677
- groupOffsetTree: n.reduce((g, h) => pt(g, h, ie(h, S, r)), Kt()),
677
+ groupOffsetTree: n.reduce((h, I) => pt(h, I, ie(I, x, r)), jt()),
678
678
  lastIndex: c,
679
679
  lastOffset: a,
680
- lastSize: p,
681
- offsetTree: S,
680
+ lastSize: m,
681
+ offsetTree: x,
682
682
  sizeTree: i
683
683
  };
684
684
  }
685
- function Bo(t) {
685
+ function Fo(t) {
686
686
  return Gt(t).map(({ k: e, v: n }, o, r) => {
687
687
  const s = r[o + 1];
688
688
  return { endIndex: s ? s.k - 1 : 1 / 0, size: n, startIndex: e };
@@ -694,21 +694,21 @@ function pn(t, e) {
694
694
  n += e[o + 1] - e[o] - 1, o++;
695
695
  return o - (n === t ? 0 : 1);
696
696
  }
697
- function Pe(t, e, n, o) {
697
+ function Ae(t, e, n, o) {
698
698
  let r = t, s = 0, i = 0, l = 0, c = 0;
699
699
  if (e !== 0) {
700
- c = Se(r, e - 1, De), l = r[c].offset;
701
- const p = Ct(n, e - 1);
702
- s = p[0], i = p[1], r.length && r[c].size === Ct(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
700
+ c = Se(r, e - 1, $e), l = r[c].offset;
701
+ const m = wt(n, e - 1);
702
+ s = m[0], i = m[1], r.length && r[c].size === wt(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
703
703
  } else
704
704
  r = [];
705
- for (const { start: a, value: p } of ye(n, e, 1 / 0)) {
706
- const S = a - s, g = S * i + l + S * o;
705
+ for (const { start: a, value: m } of ye(n, e, 1 / 0)) {
706
+ const x = a - s, h = x * i + l + x * o;
707
707
  r.push({
708
708
  index: a,
709
- offset: g,
710
- size: p
711
- }), s = a, l = g, i = p;
709
+ offset: h,
710
+ size: m
711
+ }), s = a, l = h, i = m;
712
712
  }
713
713
  return {
714
714
  lastIndex: s,
@@ -717,112 +717,112 @@ function Pe(t, e, n, o) {
717
717
  offsetTree: r
718
718
  };
719
719
  }
720
- function ko(t) {
720
+ function Oo(t) {
721
721
  return { index: t.index, value: t };
722
722
  }
723
- function Fo(t) {
723
+ function Lo(t) {
724
724
  const { endIndex: e, size: n, startIndex: o } = t;
725
725
  return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
726
726
  }
727
- const Oo = {
727
+ const zo = {
728
728
  offsetHeight: "height",
729
729
  offsetWidth: "width"
730
730
  }, Et = U(
731
731
  ([{ log: t }, { recalcInProgress: e }]) => {
732
- const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l = C(0), c = C([]), a = C(void 0), p = C(void 0), S = C((I, f) => wt(I, Oo[f])), g = C(void 0), h = C(0), w = vo(), v = ct(
733
- x(n, _(c, t, h), Rt(Eo, w), Z()),
734
- w
735
- ), m = ct(
736
- x(
732
+ const n = $(), o = $(), r = ct(o, 0), s = $(), i = $(), l = w(0), c = w([]), a = w(void 0), m = w(void 0), x = w((f, d) => vt(f, zo[d])), h = w(void 0), I = w(0), C = Ro(), v = ct(
733
+ S(n, N(c, t, I), bt(ko, C), Y()),
734
+ C
735
+ ), g = ct(
736
+ S(
737
737
  c,
738
- Z(),
739
- Rt((I, f) => ({ current: f, prev: I.current }), {
738
+ Y(),
739
+ bt((f, d) => ({ current: d, prev: f.current }), {
740
740
  current: [],
741
741
  prev: []
742
742
  }),
743
- E(({ prev: I }) => I)
743
+ E(({ prev: f }) => f)
744
744
  ),
745
745
  []
746
746
  );
747
747
  O(
748
- x(
748
+ S(
749
749
  c,
750
- P((I) => I.length > 0),
751
- _(v, h),
752
- E(([I, f, b]) => {
753
- const k = I.reduce((F, L, V) => pt(F, L, ie(L, f.offsetTree, b) || V), Kt());
750
+ A((f) => f.length > 0),
751
+ N(v, I),
752
+ E(([f, d, y]) => {
753
+ const B = f.reduce((k, L, z) => pt(k, L, ie(L, d.offsetTree, y) || z), jt());
754
754
  return {
755
- ...f,
756
- groupIndices: I,
757
- groupOffsetTree: k
755
+ ...d,
756
+ groupIndices: f,
757
+ groupOffsetTree: B
758
758
  };
759
759
  })
760
760
  ),
761
761
  v
762
762
  ), O(
763
- x(
763
+ S(
764
764
  o,
765
- _(v),
766
- P(([I, { lastIndex: f }]) => I < f),
767
- E(([I, { lastIndex: f, lastSize: b }]) => [
765
+ N(v),
766
+ A(([f, { lastIndex: d }]) => f < d),
767
+ E(([f, { lastIndex: d, lastSize: y }]) => [
768
768
  {
769
- endIndex: f,
770
- size: b,
771
- startIndex: I
769
+ endIndex: d,
770
+ size: y,
771
+ startIndex: f
772
772
  }
773
773
  ])
774
774
  ),
775
775
  n
776
- ), O(a, p);
777
- const d = ct(
778
- x(
776
+ ), O(a, m);
777
+ const p = ct(
778
+ S(
779
779
  a,
780
- E((I) => I === void 0)
780
+ E((f) => f === void 0)
781
781
  ),
782
782
  !0
783
783
  );
784
784
  O(
785
- x(
786
- p,
787
- P((I) => I !== void 0 && j(st(v).sizeTree)),
788
- E((I) => [{ endIndex: 0, size: I, startIndex: 0 }])
785
+ S(
786
+ m,
787
+ A((f) => f !== void 0 && j(ot(v).sizeTree)),
788
+ E((f) => [{ endIndex: 0, size: f, startIndex: 0 }])
789
789
  ),
790
790
  n
791
791
  );
792
792
  const u = ht(
793
- x(
793
+ S(
794
794
  n,
795
- _(v),
796
- Rt(
797
- ({ sizes: I }, [f, b]) => ({
798
- changed: b !== I,
799
- sizes: b
795
+ N(v),
796
+ bt(
797
+ ({ sizes: f }, [d, y]) => ({
798
+ changed: y !== f,
799
+ sizes: y
800
800
  }),
801
- { changed: !1, sizes: w }
801
+ { changed: !1, sizes: C }
802
802
  ),
803
- E((I) => I.changed)
803
+ E((f) => f.changed)
804
804
  )
805
805
  );
806
806
  K(
807
- x(
807
+ S(
808
808
  l,
809
- Rt(
810
- (I, f) => ({ diff: I.prev - f, prev: f }),
809
+ bt(
810
+ (f, d) => ({ diff: f.prev - d, prev: d }),
811
811
  { diff: 0, prev: 0 }
812
812
  ),
813
- E((I) => I.diff)
813
+ E((f) => f.diff)
814
814
  ),
815
- (I) => {
816
- const { groupIndices: f } = st(v);
817
- if (I > 0)
818
- G(e, !0), G(s, I + pn(I, f));
819
- else if (I < 0) {
820
- const b = st(m);
821
- b.length > 0 && (I -= pn(-I, b)), G(i, I);
815
+ (f) => {
816
+ const { groupIndices: d } = ot(v);
817
+ if (f > 0)
818
+ G(e, !0), G(s, f + pn(f, d));
819
+ else if (f < 0) {
820
+ const y = ot(g);
821
+ y.length > 0 && (f -= pn(-f, y)), G(i, f);
822
822
  }
823
823
  }
824
- ), K(x(l, _(t)), ([I, f]) => {
825
- I < 0 && f(
824
+ ), K(S(l, N(t)), ([f, d]) => {
825
+ f < 0 && d(
826
826
  "`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
827
827
  { firstItemIndex: l },
828
828
  mt.ERROR
@@ -830,59 +830,59 @@ const Oo = {
830
830
  });
831
831
  const T = ht(s);
832
832
  O(
833
- x(
833
+ S(
834
834
  s,
835
- _(v),
836
- E(([I, f]) => {
837
- const b = f.groupIndices.length > 0, k = [], F = f.lastSize;
838
- if (b) {
839
- const L = re(f.sizeTree, 0);
840
- let V = 0, D = 0;
841
- for (; V < I; ) {
842
- const B = f.groupIndices[D], Y = f.groupIndices.length === D + 1 ? 1 / 0 : f.groupIndices[D + 1] - B - 1;
843
- k.push({
844
- endIndex: B,
835
+ N(v),
836
+ E(([f, d]) => {
837
+ const y = d.groupIndices.length > 0, B = [], k = d.lastSize;
838
+ if (y) {
839
+ const L = re(d.sizeTree, 0);
840
+ let z = 0, _ = 0;
841
+ for (; z < f; ) {
842
+ const F = d.groupIndices[_], q = d.groupIndices.length === _ + 1 ? 1 / 0 : d.groupIndices[_ + 1] - F - 1;
843
+ B.push({
844
+ endIndex: F,
845
845
  size: L,
846
- startIndex: B
847
- }), k.push({
848
- endIndex: B + 1 + Y - 1,
849
- size: F,
850
- startIndex: B + 1
851
- }), D++, V += Y + 1;
846
+ startIndex: F
847
+ }), B.push({
848
+ endIndex: F + 1 + q - 1,
849
+ size: k,
850
+ startIndex: F + 1
851
+ }), _++, z += q + 1;
852
852
  }
853
- const J = Gt(f.sizeTree);
854
- return V !== I && J.shift(), J.reduce(
855
- (B, { k: Y, v: it }) => {
856
- let dt = B.ranges;
857
- return B.prevSize !== 0 && (dt = [
858
- ...B.ranges,
853
+ const J = Gt(d.sizeTree);
854
+ return z !== f && J.shift(), J.reduce(
855
+ (F, { k: q, v: it }) => {
856
+ let dt = F.ranges;
857
+ return F.prevSize !== 0 && (dt = [
858
+ ...F.ranges,
859
859
  {
860
- endIndex: Y + I - 1,
861
- size: B.prevSize,
862
- startIndex: B.prevIndex
860
+ endIndex: q + f - 1,
861
+ size: F.prevSize,
862
+ startIndex: F.prevIndex
863
863
  }
864
864
  ]), {
865
- prevIndex: Y + I,
865
+ prevIndex: q + f,
866
866
  prevSize: it,
867
867
  ranges: dt
868
868
  };
869
869
  },
870
870
  {
871
- prevIndex: I,
871
+ prevIndex: f,
872
872
  prevSize: 0,
873
- ranges: k
873
+ ranges: B
874
874
  }
875
875
  ).ranges;
876
876
  }
877
- return Gt(f.sizeTree).reduce(
878
- (L, { k: V, v: D }) => ({
879
- prevIndex: V + I,
880
- prevSize: D,
881
- ranges: [...L.ranges, { endIndex: V + I - 1, size: L.prevSize, startIndex: L.prevIndex }]
877
+ return Gt(d.sizeTree).reduce(
878
+ (L, { k: z, v: _ }) => ({
879
+ prevIndex: z + f,
880
+ prevSize: _,
881
+ ranges: [...L.ranges, { endIndex: z + f - 1, size: L.prevSize, startIndex: L.prevIndex }]
882
882
  }),
883
883
  {
884
884
  prevIndex: 0,
885
- prevSize: F,
885
+ prevSize: k,
886
886
  ranges: []
887
887
  }
888
888
  ).ranges;
@@ -890,49 +890,49 @@ const Oo = {
890
890
  ),
891
891
  n
892
892
  );
893
- const R = ht(
894
- x(
893
+ const b = ht(
894
+ S(
895
895
  i,
896
- _(v, h),
897
- E(([I, { offsetTree: f }, b]) => {
898
- const k = -I;
899
- return ie(k, f, b);
896
+ N(v, I),
897
+ E(([f, { offsetTree: d }, y]) => {
898
+ const B = -f;
899
+ return ie(B, d, y);
900
900
  })
901
901
  )
902
902
  );
903
903
  return O(
904
- x(
904
+ S(
905
905
  i,
906
- _(v, h),
907
- E(([I, f, b]) => {
908
- if (f.groupIndices.length > 0) {
909
- if (j(f.sizeTree))
910
- return f;
911
- let F = Kt();
912
- const L = st(m);
913
- let V = 0, D = 0, J = 0;
914
- for (; V < -I; ) {
915
- J = L[D];
916
- const B = L[D + 1] - J - 1;
917
- D++, V += B + 1;
906
+ N(v, I),
907
+ E(([f, d, y]) => {
908
+ if (d.groupIndices.length > 0) {
909
+ if (j(d.sizeTree))
910
+ return d;
911
+ let k = jt();
912
+ const L = ot(g);
913
+ let z = 0, _ = 0, J = 0;
914
+ for (; z < -f; ) {
915
+ J = L[_];
916
+ const F = L[_ + 1] - J - 1;
917
+ _++, z += F + 1;
918
918
  }
919
- if (F = Gt(f.sizeTree).reduce((B, { k: Y, v: it }) => pt(B, Math.max(0, Y + I), it), F), V !== -I) {
920
- const B = re(f.sizeTree, J);
921
- F = pt(F, 0, B);
922
- const Y = Ct(f.sizeTree, -I + 1)[1];
923
- F = pt(F, 1, Y);
919
+ if (k = Gt(d.sizeTree).reduce((F, { k: q, v: it }) => pt(F, Math.max(0, q + f), it), k), z !== -f) {
920
+ const F = re(d.sizeTree, J);
921
+ k = pt(k, 0, F);
922
+ const q = wt(d.sizeTree, -f + 1)[1];
923
+ k = pt(k, 1, q);
924
924
  }
925
925
  return {
926
- ...f,
927
- sizeTree: F,
928
- ...Pe(f.offsetTree, 0, F, b)
926
+ ...d,
927
+ sizeTree: k,
928
+ ...Ae(d.offsetTree, 0, k, y)
929
929
  };
930
930
  } else {
931
- const F = Gt(f.sizeTree).reduce((L, { k: V, v: D }) => pt(L, Math.max(0, V + I), D), Kt());
931
+ const k = Gt(d.sizeTree).reduce((L, { k: z, v: _ }) => pt(L, Math.max(0, z + f), _), jt());
932
932
  return {
933
- ...f,
934
- sizeTree: F,
935
- ...Pe(f.offsetTree, 0, F, b)
933
+ ...d,
934
+ sizeTree: k,
935
+ ...Ae(d.offsetTree, 0, k, y)
936
936
  };
937
937
  }
938
938
  })
@@ -941,29 +941,29 @@ const Oo = {
941
941
  ), {
942
942
  beforeUnshiftWith: T,
943
943
  // input
944
- data: g,
945
- defaultItemSize: p,
944
+ data: h,
945
+ defaultItemSize: m,
946
946
  firstItemIndex: l,
947
947
  fixedItemSize: a,
948
- gap: h,
948
+ gap: I,
949
949
  groupIndices: c,
950
- itemSize: S,
950
+ itemSize: x,
951
951
  listRefresh: u,
952
952
  shiftWith: i,
953
- shiftWithOffset: R,
953
+ shiftWithOffset: b,
954
954
  sizeRanges: n,
955
955
  // output
956
956
  sizes: v,
957
957
  statefulTotalCount: r,
958
958
  totalCount: o,
959
- trackItemSizes: d,
959
+ trackItemSizes: p,
960
960
  unshiftWith: s
961
961
  };
962
962
  },
963
- X(Vt, Ne),
963
+ X(Vt, De),
964
964
  { singleton: !0 }
965
965
  );
966
- function Lo(t) {
966
+ function Vo(t) {
967
967
  return t.reduce(
968
968
  (e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
969
969
  {
@@ -974,25 +974,25 @@ function Lo(t) {
974
974
  }
975
975
  const Nn = U(
976
976
  ([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
977
- const s = $(), i = $(), l = ht(x(s, E(Lo)));
977
+ const s = $(), i = $(), l = ht(S(s, E(Vo)));
978
978
  return O(
979
- x(
979
+ S(
980
980
  l,
981
981
  E((c) => c.totalCount)
982
982
  ),
983
983
  n
984
984
  ), O(
985
- x(
985
+ S(
986
986
  l,
987
987
  E((c) => c.groupIndices)
988
988
  ),
989
989
  t
990
990
  ), O(
991
- x(
991
+ S(
992
992
  rt(r, e, o),
993
- P(([c, a]) => Re(a)),
994
- E(([c, a, p]) => Ct(a.groupOffsetTree, Math.max(c - p, 0), "v")[0]),
995
- Z(),
993
+ A(([c, a]) => Re(a)),
994
+ E(([c, a, m]) => wt(a.groupOffsetTree, Math.max(c - m, 0), "v")[0]),
995
+ Y(),
996
996
  E((c) => [c])
997
997
  ),
998
998
  i
@@ -1001,23 +1001,23 @@ const Nn = U(
1001
1001
  X(Et, at)
1002
1002
  ), Pt = U(
1003
1003
  ([{ log: t }]) => {
1004
- const e = C(!1), n = ht(
1005
- x(
1004
+ const e = w(!1), n = ht(
1005
+ S(
1006
1006
  e,
1007
- P((o) => o),
1008
- Z()
1007
+ A((o) => o),
1008
+ Y()
1009
1009
  )
1010
1010
  );
1011
1011
  return K(e, (o) => {
1012
- o && st(t)("props updated", {}, mt.DEBUG);
1012
+ o && ot(t)("props updated", {}, mt.DEBUG);
1013
1013
  }), { didMount: n, propsReady: e };
1014
1014
  },
1015
1015
  X(Vt),
1016
1016
  { singleton: !0 }
1017
- ), zo = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1017
+ ), Po = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
1018
1018
  function Dn(t) {
1019
1019
  const e = typeof t == "number" ? { index: t } : t;
1020
- return e.align || (e.align = "start"), (!e.behavior || !zo) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
1020
+ return e.align || (e.align = "start"), (!e.behavior || !Po) && (e.behavior = "auto"), e.offset || (e.offset = 0), e;
1021
1021
  }
1022
1022
  const ce = U(
1023
1023
  ([
@@ -1029,60 +1029,60 @@ const ce = U(
1029
1029
  headerHeight: l,
1030
1030
  scrollingInProgress: c,
1031
1031
  scrollTo: a,
1032
- smoothScrollTargetReached: p,
1033
- viewportHeight: S
1032
+ smoothScrollTargetReached: m,
1033
+ viewportHeight: x
1034
1034
  },
1035
- { log: g }
1035
+ { log: h }
1036
1036
  ]) => {
1037
- const h = $(), w = $(), v = C(0);
1038
- let m = null, d = null, u = null;
1037
+ const I = $(), C = $(), v = w(0);
1038
+ let g = null, p = null, u = null;
1039
1039
  function T() {
1040
- m && (m(), m = null), u && (u(), u = null), d && (clearTimeout(d), d = null), G(c, !1);
1040
+ g && (g(), g = null), u && (u(), u = null), p && (clearTimeout(p), p = null), G(c, !1);
1041
1041
  }
1042
1042
  return O(
1043
- x(
1044
- h,
1045
- _(n, S, o, v, l, i, g),
1046
- _(t, s, r),
1043
+ S(
1044
+ I,
1045
+ N(n, x, o, v, l, i, h),
1046
+ N(t, s, r),
1047
1047
  E(
1048
1048
  ([
1049
- [R, I, f, b, k, F, L, V],
1050
- D,
1049
+ [b, f, d, y, B, k, L, z],
1050
+ _,
1051
1051
  J,
1052
1052
  nt
1053
1053
  ]) => {
1054
- const B = Dn(R), { align: Y, behavior: it, offset: dt } = B, St = b - 1, ft = _n(B, I, St);
1055
- let ut = ie(ft, I.offsetTree, D) + F;
1056
- Y === "end" ? (ut += J + Ct(I.sizeTree, ft)[1] - f + nt, ft === St && (ut += L)) : Y === "center" ? ut += (J + Ct(I.sizeTree, ft)[1] - f + nt) / 2 : ut -= k, dt && (ut += dt);
1054
+ const F = Dn(b), { align: q, behavior: it, offset: dt } = F, St = y - 1, ft = _n(F, f, St);
1055
+ let ut = ie(ft, f.offsetTree, _) + k;
1056
+ q === "end" ? (ut += J + wt(f.sizeTree, ft)[1] - d + nt, ft === St && (ut += L)) : q === "center" ? ut += (J + wt(f.sizeTree, ft)[1] - d + nt) / 2 : ut -= B, dt && (ut += dt);
1057
1057
  const At = (xt) => {
1058
- T(), xt ? (V("retrying to scroll to", { location: R }, mt.DEBUG), G(h, R)) : (G(w, !0), V("list did not change, scroll successful", {}, mt.DEBUG));
1058
+ T(), xt ? (z("retrying to scroll to", { location: b }, mt.DEBUG), G(I, b)) : (G(C, !0), z("list did not change, scroll successful", {}, mt.DEBUG));
1059
1059
  };
1060
1060
  if (T(), it === "smooth") {
1061
1061
  let xt = !1;
1062
1062
  u = K(e, (Xt) => {
1063
1063
  xt = xt || Xt;
1064
- }), m = bt(p, () => {
1064
+ }), g = Tt(m, () => {
1065
1065
  At(xt);
1066
1066
  });
1067
1067
  } else
1068
- m = bt(x(e, Vo(150)), At);
1069
- return d = setTimeout(() => {
1068
+ g = Tt(S(e, Ao(150)), At);
1069
+ return p = setTimeout(() => {
1070
1070
  T();
1071
- }, 1200), G(c, !0), V("scrolling from index to", { behavior: it, index: ft, top: ut }, mt.DEBUG), { behavior: it, top: ut };
1071
+ }, 1200), G(c, !0), z("scrolling from index to", { behavior: it, index: ft, top: ut }, mt.DEBUG), { behavior: it, top: ut };
1072
1072
  }
1073
1073
  )
1074
1074
  ),
1075
1075
  a
1076
1076
  ), {
1077
- scrollTargetReached: w,
1078
- scrollToIndex: h,
1077
+ scrollTargetReached: C,
1078
+ scrollToIndex: I,
1079
1079
  topListHeight: v
1080
1080
  };
1081
1081
  },
1082
1082
  X(Et, at, Vt),
1083
1083
  { singleton: !0 }
1084
1084
  );
1085
- function Vo(t) {
1085
+ function Ao(t) {
1086
1086
  return (e) => {
1087
1087
  const n = setTimeout(() => {
1088
1088
  e(!1);
@@ -1092,48 +1092,48 @@ function Vo(t) {
1092
1092
  };
1093
1093
  };
1094
1094
  }
1095
- function $e(t, e) {
1095
+ function Ue(t, e) {
1096
1096
  t == 0 ? e() : requestAnimationFrame(() => {
1097
- $e(t - 1, e);
1097
+ Ue(t - 1, e);
1098
1098
  });
1099
1099
  }
1100
- function Ue(t, e) {
1100
+ function Ke(t, e) {
1101
1101
  const n = e - 1;
1102
1102
  return typeof t == "number" ? t : t.index === "LAST" ? n : t.index;
1103
1103
  }
1104
1104
  const ue = U(
1105
1105
  ([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
1106
- const l = C(!0), c = C(0), a = C(!0);
1106
+ const l = w(!0), c = w(0), a = w(!0);
1107
1107
  return O(
1108
- x(
1108
+ S(
1109
1109
  i,
1110
- _(c),
1111
- P(([p, S]) => !!S),
1112
- yt(!1)
1110
+ N(c),
1111
+ A(([m, x]) => !!x),
1112
+ Rt(!1)
1113
1113
  ),
1114
1114
  l
1115
1115
  ), O(
1116
- x(
1116
+ S(
1117
1117
  i,
1118
- _(c),
1119
- P(([p, S]) => !!S),
1120
- yt(!1)
1118
+ N(c),
1119
+ A(([m, x]) => !!x),
1120
+ Rt(!1)
1121
1121
  ),
1122
1122
  a
1123
1123
  ), K(
1124
- x(
1124
+ S(
1125
1125
  rt(e, i),
1126
- _(l, n, t, a),
1127
- P(([[, p], S, { sizeTree: g }, h, w]) => p && (!j(g) || Me(h)) && !S && !w),
1128
- _(c)
1126
+ N(l, n, t, a),
1127
+ A(([[, m], x, { sizeTree: h }, I, C]) => m && (!j(h) || We(I)) && !x && !C),
1128
+ N(c)
1129
1129
  ),
1130
- ([, p]) => {
1131
- bt(r, () => {
1130
+ ([, m]) => {
1131
+ Tt(r, () => {
1132
1132
  G(a, !0);
1133
- }), $e(4, () => {
1134
- bt(o, () => {
1133
+ }), Ue(4, () => {
1134
+ Tt(o, () => {
1135
1135
  G(l, !0);
1136
- }), G(s, p);
1136
+ }), G(s, m);
1137
1137
  });
1138
1138
  }
1139
1139
  ), {
@@ -1148,7 +1148,7 @@ const ue = U(
1148
1148
  function $n(t, e) {
1149
1149
  return Math.abs(t - e) < 1.01;
1150
1150
  }
1151
- const le = "up", te = "down", Po = "none", Ao = {
1151
+ const le = "up", te = "down", Mo = "none", Wo = {
1152
1152
  atBottom: !1,
1153
1153
  notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
1154
1154
  state: {
@@ -1157,137 +1157,137 @@ const le = "up", te = "down", Po = "none", Ao = {
1157
1157
  scrollTop: 0,
1158
1158
  viewportHeight: 0
1159
1159
  }
1160
- }, Mo = 0, ae = U(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1161
- const i = C(!1), l = C(!0), c = $(), a = $(), p = C(4), S = C(Mo), g = ct(
1162
- x(
1163
- dn(x(A(r), jt(1), yt(!0)), x(A(r), jt(1), yt(!1), an(100))),
1164
- Z()
1160
+ }, Go = 0, ae = U(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
1161
+ const i = w(!1), l = w(!0), c = $(), a = $(), m = w(4), x = w(Go), h = ct(
1162
+ S(
1163
+ Le(S(V(r), Dt(1), Rt(!0)), S(V(r), Dt(1), Rt(!1), dn(100))),
1164
+ Y()
1165
1165
  ),
1166
1166
  !1
1167
- ), h = ct(
1168
- x(dn(x(n, yt(!0)), x(n, yt(!1), an(200))), Z()),
1167
+ ), I = ct(
1168
+ S(Le(S(n, Rt(!0)), S(n, Rt(!1), dn(200))), Y()),
1169
1169
  !1
1170
1170
  );
1171
1171
  O(
1172
- x(
1173
- rt(A(r), A(S)),
1172
+ S(
1173
+ rt(V(r), V(x)),
1174
1174
  E(([u, T]) => u <= T),
1175
- Z()
1175
+ Y()
1176
1176
  ),
1177
1177
  l
1178
- ), O(x(l, Lt(50)), a);
1179
- const w = ht(
1180
- x(
1181
- rt(o, A(s), A(e), A(t), A(p)),
1182
- Rt((u, [{ scrollHeight: T, scrollTop: R }, I, f, b, k]) => {
1183
- const F = R + I - T > -k, L = {
1178
+ ), O(S(l, kt(50)), a);
1179
+ const C = ht(
1180
+ S(
1181
+ rt(o, V(s), V(e), V(t), V(m)),
1182
+ bt((u, [{ scrollHeight: T, scrollTop: b }, f, d, y, B]) => {
1183
+ const k = b + f - T > -B, L = {
1184
1184
  scrollHeight: T,
1185
- scrollTop: R,
1186
- viewportHeight: I
1185
+ scrollTop: b,
1186
+ viewportHeight: f
1187
1187
  };
1188
- if (F) {
1189
- let D, J;
1190
- return R > u.state.scrollTop ? (D = "SCROLLED_DOWN", J = u.state.scrollTop - R) : (D = "SIZE_DECREASED", J = u.state.scrollTop - R || u.scrollTopDelta), {
1188
+ if (k) {
1189
+ let _, J;
1190
+ return b > u.state.scrollTop ? (_ = "SCROLLED_DOWN", J = u.state.scrollTop - b) : (_ = "SIZE_DECREASED", J = u.state.scrollTop - b || u.scrollTopDelta), {
1191
1191
  atBottom: !0,
1192
- atBottomBecause: D,
1192
+ atBottomBecause: _,
1193
1193
  scrollTopDelta: J,
1194
1194
  state: L
1195
1195
  };
1196
1196
  }
1197
- let V;
1198
- return L.scrollHeight > u.state.scrollHeight ? V = "SIZE_INCREASED" : I < u.state.viewportHeight ? V = "VIEWPORT_HEIGHT_DECREASING" : R < u.state.scrollTop ? V = "SCROLLING_UPWARDS" : V = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1197
+ let z;
1198
+ return L.scrollHeight > u.state.scrollHeight ? z = "SIZE_INCREASED" : f < u.state.viewportHeight ? z = "VIEWPORT_HEIGHT_DECREASING" : b < u.state.scrollTop ? z = "SCROLLING_UPWARDS" : z = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
1199
1199
  atBottom: !1,
1200
- notAtBottomBecause: V,
1200
+ notAtBottomBecause: z,
1201
1201
  state: L
1202
1202
  };
1203
- }, Ao),
1204
- Z((u, T) => u && u.atBottom === T.atBottom)
1203
+ }, Wo),
1204
+ Y((u, T) => u && u.atBottom === T.atBottom)
1205
1205
  )
1206
1206
  ), v = ct(
1207
- x(
1207
+ S(
1208
1208
  o,
1209
- Rt(
1210
- (u, { scrollHeight: T, scrollTop: R, viewportHeight: I }) => {
1209
+ bt(
1210
+ (u, { scrollHeight: T, scrollTop: b, viewportHeight: f }) => {
1211
1211
  if ($n(u.scrollHeight, T))
1212
1212
  return {
1213
1213
  changed: !1,
1214
1214
  jump: 0,
1215
1215
  scrollHeight: T,
1216
- scrollTop: R
1216
+ scrollTop: b
1217
1217
  };
1218
1218
  {
1219
- const f = T - (R + I) < 1;
1220
- return u.scrollTop !== R && f ? {
1219
+ const d = T - (b + f) < 1;
1220
+ return u.scrollTop !== b && d ? {
1221
1221
  changed: !0,
1222
- jump: u.scrollTop - R,
1222
+ jump: u.scrollTop - b,
1223
1223
  scrollHeight: T,
1224
- scrollTop: R
1224
+ scrollTop: b
1225
1225
  } : {
1226
1226
  changed: !0,
1227
1227
  jump: 0,
1228
1228
  scrollHeight: T,
1229
- scrollTop: R
1229
+ scrollTop: b
1230
1230
  };
1231
1231
  }
1232
1232
  },
1233
1233
  { changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
1234
1234
  ),
1235
- P((u) => u.changed),
1235
+ A((u) => u.changed),
1236
1236
  E((u) => u.jump)
1237
1237
  ),
1238
1238
  0
1239
1239
  );
1240
1240
  O(
1241
- x(
1242
- w,
1241
+ S(
1242
+ C,
1243
1243
  E((u) => u.atBottom)
1244
1244
  ),
1245
1245
  i
1246
- ), O(x(i, Lt(50)), c);
1247
- const m = C(te);
1246
+ ), O(S(i, kt(50)), c);
1247
+ const g = w(te);
1248
1248
  O(
1249
- x(
1249
+ S(
1250
1250
  o,
1251
1251
  E(({ scrollTop: u }) => u),
1252
- Z(),
1253
- Rt(
1254
- (u, T) => st(h) ? { direction: u.direction, prevScrollTop: T } : { direction: T < u.prevScrollTop ? le : te, prevScrollTop: T },
1252
+ Y(),
1253
+ bt(
1254
+ (u, T) => ot(I) ? { direction: u.direction, prevScrollTop: T } : { direction: T < u.prevScrollTop ? le : te, prevScrollTop: T },
1255
1255
  { direction: te, prevScrollTop: 0 }
1256
1256
  ),
1257
1257
  E((u) => u.direction)
1258
1258
  ),
1259
- m
1260
- ), O(x(o, Lt(50), yt(Po)), m);
1261
- const d = C(0);
1259
+ g
1260
+ ), O(S(o, kt(50), Rt(Mo)), g);
1261
+ const p = w(0);
1262
1262
  return O(
1263
- x(
1264
- g,
1265
- P((u) => !u),
1266
- yt(0)
1263
+ S(
1264
+ h,
1265
+ A((u) => !u),
1266
+ Rt(0)
1267
1267
  ),
1268
- d
1268
+ p
1269
1269
  ), O(
1270
- x(
1270
+ S(
1271
1271
  r,
1272
- Lt(100),
1273
- _(g),
1274
- P(([u, T]) => !!T),
1275
- Rt(([u, T], [R]) => [T, R], [0, 0]),
1272
+ kt(100),
1273
+ N(h),
1274
+ A(([u, T]) => !!T),
1275
+ bt(([u, T], [b]) => [T, b], [0, 0]),
1276
1276
  E(([u, T]) => T - u)
1277
1277
  ),
1278
- d
1278
+ p
1279
1279
  ), {
1280
- atBottomState: w,
1280
+ atBottomState: C,
1281
1281
  atBottomStateChange: c,
1282
- atBottomThreshold: p,
1282
+ atBottomThreshold: m,
1283
1283
  atTopStateChange: a,
1284
- atTopThreshold: S,
1284
+ atTopThreshold: x,
1285
1285
  isAtBottom: i,
1286
1286
  isAtTop: l,
1287
- isScrolling: g,
1287
+ isScrolling: h,
1288
1288
  lastJumpDueToItemResize: v,
1289
- scrollDirection: m,
1290
- scrollVelocity: d
1289
+ scrollDirection: g,
1290
+ scrollVelocity: p
1291
1291
  };
1292
1292
  }, X(at)), xe = "top", Te = "bottom", hn = "none";
1293
1293
  function gn(t, e, n) {
@@ -1297,44 +1297,44 @@ function In(t, e) {
1297
1297
  var n;
1298
1298
  return typeof t == "number" ? t : (n = t[e]) != null ? n : 0;
1299
1299
  }
1300
- const Ke = U(
1300
+ const je = U(
1301
1301
  ([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
1302
- const s = $(), i = C(0), l = C(0), c = C(0), a = ct(
1303
- x(
1302
+ const s = $(), i = w(0), l = w(0), c = w(0), a = ct(
1303
+ S(
1304
1304
  rt(
1305
- A(o),
1306
- A(r),
1307
- A(n),
1308
- A(s, se),
1309
- A(c),
1310
- A(i),
1311
- A(e),
1312
- A(t),
1313
- A(l)
1305
+ V(o),
1306
+ V(r),
1307
+ V(n),
1308
+ V(s, se),
1309
+ V(c),
1310
+ V(i),
1311
+ V(e),
1312
+ V(t),
1313
+ V(l)
1314
1314
  ),
1315
1315
  E(
1316
1316
  ([
1317
- p,
1318
- S,
1319
- g,
1320
- [h, w],
1321
- v,
1322
1317
  m,
1323
- d,
1318
+ x,
1319
+ h,
1320
+ [I, C],
1321
+ v,
1322
+ g,
1323
+ p,
1324
1324
  u,
1325
1325
  T
1326
1326
  ]) => {
1327
- const R = p - u, I = m + d, f = Math.max(g - R, 0);
1328
- let b = hn;
1329
- const k = In(T, xe), F = In(T, Te);
1330
- return h -= u, h += g + d, w += g + d, w -= u, h > p + I - k && (b = le), w < p - f + S + F && (b = te), b !== hn ? [
1331
- Math.max(R - g - gn(v, xe, b) - k, 0),
1332
- R - f - d + S + gn(v, Te, b) + F
1327
+ const b = m - u, f = g + p, d = Math.max(h - b, 0);
1328
+ let y = hn;
1329
+ const B = In(T, xe), k = In(T, Te);
1330
+ return I -= u, I += h + p, C += h + p, C -= u, I > m + f - B && (y = le), C < m - d + x + k && (y = te), y !== hn ? [
1331
+ Math.max(b - h - gn(v, xe, y) - B, 0),
1332
+ b - d - p + x + gn(v, Te, y) + k
1333
1333
  ] : null;
1334
1334
  }
1335
1335
  ),
1336
- P((p) => p != null),
1337
- Z(se)
1336
+ A((m) => m != null),
1337
+ Y(se)
1338
1338
  ),
1339
1339
  [0, 0]
1340
1340
  );
@@ -1351,11 +1351,11 @@ const Ke = U(
1351
1351
  X(at),
1352
1352
  { singleton: !0 }
1353
1353
  );
1354
- function Wo(t, e, n) {
1354
+ function _o(t, e, n) {
1355
1355
  if (Re(e)) {
1356
1356
  const o = Gn(t, e);
1357
1357
  return [
1358
- { index: Ct(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
1358
+ { index: wt(e.groupOffsetTree, o)[0], offset: 0, size: 0 },
1359
1359
  { data: n == null ? void 0 : n[0], index: o, offset: 0, size: 0 }
1360
1360
  ];
1361
1361
  }
@@ -1374,36 +1374,36 @@ const Be = {
1374
1374
  };
1375
1375
  function Ie(t, e, n, o, r, s) {
1376
1376
  const { lastIndex: i, lastOffset: l, lastSize: c } = r;
1377
- let a = 0, p = 0;
1377
+ let a = 0, m = 0;
1378
1378
  if (t.length > 0) {
1379
1379
  a = t[0].offset;
1380
1380
  const v = t[t.length - 1];
1381
- p = v.offset + v.size;
1381
+ m = v.offset + v.size;
1382
1382
  }
1383
- const S = n - i, g = l + S * c + (S - 1) * o, h = a, w = g - p;
1383
+ const x = n - i, h = l + x * c + (x - 1) * o, I = a, C = h - m;
1384
1384
  return {
1385
- bottom: p,
1385
+ bottom: m,
1386
1386
  firstItemIndex: s,
1387
1387
  items: Sn(t, r, s),
1388
- offsetBottom: w,
1388
+ offsetBottom: C,
1389
1389
  offsetTop: a,
1390
- top: h,
1390
+ top: I,
1391
1391
  topItems: Sn(e, r, s),
1392
- topListHeight: e.reduce((v, m) => m.size + v, 0),
1392
+ topListHeight: e.reduce((v, g) => g.size + v, 0),
1393
1393
  totalCount: n
1394
1394
  };
1395
1395
  }
1396
1396
  function Un(t, e, n, o, r, s) {
1397
1397
  let i = 0;
1398
1398
  if (n.groupIndices.length > 0)
1399
- for (const p of n.groupIndices) {
1400
- if (p - i >= t)
1399
+ for (const m of n.groupIndices) {
1400
+ if (m - i >= t)
1401
1401
  break;
1402
1402
  i++;
1403
1403
  }
1404
- const l = t + i, c = Ue(e, l), a = Array.from({ length: l }).map((p, S) => ({
1405
- data: s[S + c],
1406
- index: S + c,
1404
+ const l = t + i, c = Ke(e, l), a = Array.from({ length: l }).map((m, x) => ({
1405
+ data: s[x + c],
1406
+ index: x + c,
1407
1407
  offset: 0,
1408
1408
  size: 0
1409
1409
  }));
@@ -1418,15 +1418,15 @@ function Sn(t, e, n) {
1418
1418
  let l, c = 0;
1419
1419
  for (const a of t) {
1420
1420
  (!l || l.end < a.index) && (l = i.shift(), c = e.groupIndices.indexOf(l.start));
1421
- let p;
1422
- a.index === l.start ? p = {
1421
+ let m;
1422
+ a.index === l.start ? m = {
1423
1423
  index: c,
1424
1424
  type: "group"
1425
- } : p = {
1425
+ } : m = {
1426
1426
  groupIndex: c,
1427
1427
  index: a.index - (c + 1) + n
1428
1428
  }, s.push({
1429
- ...p,
1429
+ ...m,
1430
1430
  data: a.data,
1431
1431
  offset: a.offset,
1432
1432
  originalIndex: a.index,
@@ -1435,203 +1435,203 @@ function Sn(t, e, n) {
1435
1435
  }
1436
1436
  return s;
1437
1437
  }
1438
- const Dt = U(
1438
+ const $t = U(
1439
1439
  ([
1440
1440
  { data: t, firstItemIndex: e, gap: n, sizes: o, totalCount: r },
1441
1441
  s,
1442
1442
  { listBoundary: i, topListHeight: l, visibleRange: c },
1443
- { initialTopMostItemIndex: a, scrolledToInitialItem: p },
1444
- { topListHeight: S },
1445
- g,
1446
- { didMount: h },
1447
- { recalcInProgress: w }
1443
+ { initialTopMostItemIndex: a, scrolledToInitialItem: m },
1444
+ { topListHeight: x },
1445
+ h,
1446
+ { didMount: I },
1447
+ { recalcInProgress: C }
1448
1448
  ]) => {
1449
- const v = C([]), m = C(0), d = $();
1449
+ const v = w([]), g = w(0), p = $();
1450
1450
  O(s.topItemsIndexes, v);
1451
1451
  const u = ct(
1452
- x(
1452
+ S(
1453
1453
  rt(
1454
- h,
1455
- w,
1456
- A(c, se),
1457
- A(r),
1458
- A(o),
1459
- A(a),
1460
- p,
1461
- A(v),
1462
- A(e),
1463
- A(n),
1454
+ I,
1455
+ C,
1456
+ V(c, se),
1457
+ V(r),
1458
+ V(o),
1459
+ V(a),
1460
+ m,
1461
+ V(v),
1462
+ V(e),
1463
+ V(n),
1464
1464
  t
1465
1465
  ),
1466
- P(([f, b, , k, , , , , , , F]) => {
1467
- const L = F && F.length !== k;
1468
- return f && !b && !L;
1466
+ A(([d, y, , B, , , , , , , k]) => {
1467
+ const L = k && k.length !== B;
1468
+ return d && !y && !L;
1469
1469
  }),
1470
1470
  E(
1471
1471
  ([
1472
1472
  ,
1473
1473
  ,
1474
- [f, b],
1474
+ [d, y],
1475
+ B,
1475
1476
  k,
1476
- F,
1477
1477
  L,
1478
- V,
1479
- D,
1478
+ z,
1479
+ _,
1480
1480
  J,
1481
1481
  nt,
1482
- B
1482
+ F
1483
1483
  ]) => {
1484
- const Y = F, { offsetTree: it, sizeTree: dt } = Y, St = st(m);
1485
- if (k === 0)
1486
- return { ...Be, totalCount: k };
1487
- if (f === 0 && b === 0)
1488
- return St === 0 ? { ...Be, totalCount: k } : Un(St, L, F, J, nt, B || []);
1484
+ const q = k, { offsetTree: it, sizeTree: dt } = q, St = ot(g);
1485
+ if (B === 0)
1486
+ return { ...Be, totalCount: B };
1487
+ if (d === 0 && y === 0)
1488
+ return St === 0 ? { ...Be, totalCount: B } : Un(St, L, k, J, nt, F || []);
1489
1489
  if (j(dt))
1490
1490
  return St > 0 ? null : Ie(
1491
- Wo(Ue(L, k), Y, B),
1491
+ _o(Ke(L, B), q, F),
1492
1492
  [],
1493
- k,
1493
+ B,
1494
1494
  nt,
1495
- Y,
1495
+ q,
1496
1496
  J
1497
1497
  );
1498
1498
  const ft = [];
1499
- if (D.length > 0) {
1500
- const Mt = D[0], vt = D[D.length - 1];
1499
+ if (_.length > 0) {
1500
+ const Mt = _[0], yt = _[_.length - 1];
1501
1501
  let Bt = 0;
1502
- for (const y of ye(dt, Mt, vt)) {
1503
- const N = y.value, Q = Math.max(y.start, Mt), lt = Math.min(y.end, vt);
1502
+ for (const R of ye(dt, Mt, yt)) {
1503
+ const D = R.value, Q = Math.max(R.start, Mt), lt = Math.min(R.end, yt);
1504
1504
  for (let tt = Q; tt <= lt; tt++)
1505
- ft.push({ data: B == null ? void 0 : B[tt], index: tt, offset: Bt, size: N }), Bt += N;
1505
+ ft.push({ data: F == null ? void 0 : F[tt], index: tt, offset: Bt, size: D }), Bt += D;
1506
1506
  }
1507
1507
  }
1508
- if (!V)
1509
- return Ie([], ft, k, nt, Y, J);
1510
- const ut = D.length > 0 ? D[D.length - 1] + 1 : 0, At = Ho(it, f, b, ut);
1508
+ if (!z)
1509
+ return Ie([], ft, B, nt, q, J);
1510
+ const ut = _.length > 0 ? _[_.length - 1] + 1 : 0, At = Bo(it, d, y, ut);
1511
1511
  if (At.length === 0)
1512
1512
  return null;
1513
- const xt = k - 1, Xt = ve([], (Mt) => {
1514
- for (const vt of At) {
1515
- const Bt = vt.value;
1516
- let y = Bt.offset, N = vt.start;
1513
+ const xt = B - 1, Xt = ve([], (Mt) => {
1514
+ for (const yt of At) {
1515
+ const Bt = yt.value;
1516
+ let R = Bt.offset, D = yt.start;
1517
1517
  const Q = Bt.size;
1518
- if (Bt.offset < f) {
1519
- N += Math.floor((f - Bt.offset + nt) / (Q + nt));
1520
- const tt = N - vt.start;
1521
- y += tt * Q + tt * nt;
1518
+ if (Bt.offset < d) {
1519
+ D += Math.floor((d - Bt.offset + nt) / (Q + nt));
1520
+ const tt = D - yt.start;
1521
+ R += tt * Q + tt * nt;
1522
1522
  }
1523
- N < ut && (y += (ut - N) * Q, N = ut);
1524
- const lt = Math.min(vt.end, xt);
1525
- for (let tt = N; tt <= lt && !(y >= b); tt++)
1526
- Mt.push({ data: B == null ? void 0 : B[tt], index: tt, offset: y, size: Q }), y += Q + nt;
1523
+ D < ut && (R += (ut - D) * Q, D = ut);
1524
+ const lt = Math.min(yt.end, xt);
1525
+ for (let tt = D; tt <= lt && !(R >= y); tt++)
1526
+ Mt.push({ data: F == null ? void 0 : F[tt], index: tt, offset: R, size: Q }), R += Q + nt;
1527
1527
  }
1528
1528
  });
1529
- return Ie(Xt, ft, k, nt, Y, J);
1529
+ return Ie(Xt, ft, B, nt, q, J);
1530
1530
  }
1531
1531
  ),
1532
1532
  //@ts-expect-error filter needs to be fixed
1533
- P((f) => f !== null),
1534
- Z()
1533
+ A((d) => d !== null),
1534
+ Y()
1535
1535
  ),
1536
1536
  Be
1537
1537
  );
1538
1538
  O(
1539
- x(
1539
+ S(
1540
1540
  t,
1541
- P(Me),
1542
- E((f) => f == null ? void 0 : f.length)
1541
+ A(We),
1542
+ E((d) => d == null ? void 0 : d.length)
1543
1543
  ),
1544
1544
  r
1545
1545
  ), O(
1546
- x(
1546
+ S(
1547
1547
  u,
1548
- E((f) => f.topListHeight)
1548
+ E((d) => d.topListHeight)
1549
1549
  ),
1550
- S
1551
- ), O(S, l), O(
1552
- x(
1550
+ x
1551
+ ), O(x, l), O(
1552
+ S(
1553
1553
  u,
1554
- E((f) => [f.top, f.bottom])
1554
+ E((d) => [d.top, d.bottom])
1555
1555
  ),
1556
1556
  i
1557
1557
  ), O(
1558
- x(
1558
+ S(
1559
1559
  u,
1560
- E((f) => f.items)
1560
+ E((d) => d.items)
1561
1561
  ),
1562
- d
1562
+ p
1563
1563
  );
1564
1564
  const T = ht(
1565
- x(
1565
+ S(
1566
1566
  u,
1567
- P(({ items: f }) => f.length > 0),
1568
- _(r, t),
1569
- P(([{ items: f }, b]) => f[f.length - 1].originalIndex === b - 1),
1570
- E(([, f, b]) => [f - 1, b]),
1571
- Z(se),
1572
- E(([f]) => f)
1567
+ A(({ items: d }) => d.length > 0),
1568
+ N(r, t),
1569
+ A(([{ items: d }, y]) => d[d.length - 1].originalIndex === y - 1),
1570
+ E(([, d, y]) => [d - 1, y]),
1571
+ Y(se),
1572
+ E(([d]) => d)
1573
1573
  )
1574
- ), R = ht(
1575
- x(
1574
+ ), b = ht(
1575
+ S(
1576
1576
  u,
1577
- Lt(200),
1578
- P(({ items: f, topItems: b }) => f.length > 0 && f[0].originalIndex === b.length),
1579
- E(({ items: f }) => f[0].index),
1580
- Z()
1577
+ kt(200),
1578
+ A(({ items: d, topItems: y }) => d.length > 0 && d[0].originalIndex === y.length),
1579
+ E(({ items: d }) => d[0].index),
1580
+ Y()
1581
1581
  )
1582
- ), I = ht(
1583
- x(
1582
+ ), f = ht(
1583
+ S(
1584
1584
  u,
1585
- P(({ items: f }) => f.length > 0),
1586
- E(({ items: f }) => {
1587
- let b = 0, k = f.length - 1;
1588
- for (; f[b].type === "group" && b < k; )
1589
- b++;
1590
- for (; f[k].type === "group" && k > b; )
1591
- k--;
1585
+ A(({ items: d }) => d.length > 0),
1586
+ E(({ items: d }) => {
1587
+ let y = 0, B = d.length - 1;
1588
+ for (; d[y].type === "group" && y < B; )
1589
+ y++;
1590
+ for (; d[B].type === "group" && B > y; )
1591
+ B--;
1592
1592
  return {
1593
- endIndex: f[k].index,
1594
- startIndex: f[b].index
1593
+ endIndex: d[B].index,
1594
+ startIndex: d[y].index
1595
1595
  };
1596
1596
  }),
1597
- Z(Mn)
1597
+ Y(Mn)
1598
1598
  )
1599
1599
  );
1600
- return { endReached: T, initialItemCount: m, itemsRendered: d, listState: u, rangeChanged: I, startReached: R, topItemsIndexes: v, ...g };
1600
+ return { endReached: T, initialItemCount: g, itemsRendered: p, listState: u, rangeChanged: f, startReached: b, topItemsIndexes: v, ...h };
1601
1601
  },
1602
1602
  X(
1603
1603
  Et,
1604
1604
  Nn,
1605
- Ke,
1605
+ je,
1606
1606
  ue,
1607
1607
  ce,
1608
1608
  ae,
1609
1609
  Pt,
1610
- Ne
1610
+ De
1611
1611
  ),
1612
1612
  { singleton: !0 }
1613
1613
  ), Kn = U(
1614
1614
  ([{ fixedFooterHeight: t, fixedHeaderHeight: e, footerHeight: n, headerHeight: o }, { listState: r }]) => {
1615
1615
  const s = $(), i = ct(
1616
- x(
1616
+ S(
1617
1617
  rt(n, t, o, e, r),
1618
- E(([l, c, a, p, S]) => l + c + a + p + S.offsetBottom + S.bottom)
1618
+ E(([l, c, a, m, x]) => l + c + a + m + x.offsetBottom + x.bottom)
1619
1619
  ),
1620
1620
  0
1621
1621
  );
1622
- return O(A(i), s), { totalListHeight: i, totalListHeightChanged: s };
1622
+ return O(V(i), s), { totalListHeight: i, totalListHeightChanged: s };
1623
1623
  },
1624
- X(at, Dt),
1624
+ X(at, $t),
1625
1625
  { singleton: !0 }
1626
- ), Go = U(
1626
+ ), No = U(
1627
1627
  ([{ viewportHeight: t }, { totalListHeight: e }]) => {
1628
- const n = C(!1), o = ct(
1629
- x(
1628
+ const n = w(!1), o = ct(
1629
+ S(
1630
1630
  rt(n, t, e),
1631
- P(([r]) => r),
1631
+ A(([r]) => r),
1632
1632
  E(([, r, s]) => Math.max(0, r - s)),
1633
- Lt(0),
1634
- Z()
1633
+ kt(0),
1634
+ Y()
1635
1635
  ),
1636
1636
  0
1637
1637
  );
@@ -1639,103 +1639,192 @@ const Dt = U(
1639
1639
  },
1640
1640
  X(at, Kn),
1641
1641
  { singleton: !0 }
1642
+ ), jn = U(() => ({
1643
+ context: w(null)
1644
+ })), Do = ({
1645
+ itemBottom: t,
1646
+ itemTop: e,
1647
+ locationParams: { align: n, behavior: o, ...r },
1648
+ viewportBottom: s,
1649
+ viewportTop: i
1650
+ }) => e < i ? { ...r, align: n != null ? n : "start", behavior: o } : t > s ? { ...r, align: n != null ? n : "end", behavior: o } : null, qn = U(
1651
+ ([
1652
+ { gap: t, sizes: e, totalCount: n },
1653
+ { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
1654
+ { scrollToIndex: a }
1655
+ ]) => {
1656
+ const m = $();
1657
+ return O(
1658
+ S(
1659
+ m,
1660
+ N(e, c, n, s, r, o, l),
1661
+ N(t),
1662
+ E(([[x, h, I, C, v, g, p, u], T]) => {
1663
+ const { align: b, behavior: f, calculateViewLocation: d = Do, done: y, ...B } = x, k = _n(x, h, C - 1), L = ie(k, h.offsetTree, T) + v + g, z = L + wt(h.sizeTree, k)[1], _ = u + g, J = u + I - p, nt = d({
1664
+ itemBottom: z,
1665
+ itemTop: L,
1666
+ locationParams: { align: b, behavior: f, ...B },
1667
+ viewportBottom: J,
1668
+ viewportTop: _
1669
+ });
1670
+ return nt ? y && Tt(
1671
+ S(
1672
+ i,
1673
+ A((F) => !F),
1674
+ // skips the initial publish of false, and the cleanup call.
1675
+ // but if scrollingInProgress is true, we skip the initial publish.
1676
+ Dt(ot(i) ? 1 : 2)
1677
+ ),
1678
+ y
1679
+ ) : y && y(), nt;
1680
+ }),
1681
+ A((x) => x !== null)
1682
+ ),
1683
+ a
1684
+ ), {
1685
+ scrollIntoView: m
1686
+ };
1687
+ },
1688
+ X(Et, at, ce, $t, Vt),
1689
+ { singleton: !0 }
1642
1690
  );
1643
1691
  function xn(t) {
1644
1692
  return t ? t === "smooth" ? "smooth" : "auto" : !1;
1645
1693
  }
1646
- const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
1694
+ const $o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), Uo = U(
1647
1695
  ([
1648
- { listRefresh: t, totalCount: e, fixedItemSize: n },
1649
- { atBottomState: o, isAtBottom: r },
1650
- { scrollToIndex: s },
1651
- { scrolledToInitialItem: i },
1652
- { didMount: l, propsReady: c },
1653
- { log: a },
1654
- { scrollingInProgress: p }
1696
+ { listRefresh: t, totalCount: e, fixedItemSize: n, data: o },
1697
+ { atBottomState: r, isAtBottom: s },
1698
+ { scrollToIndex: i },
1699
+ { scrolledToInitialItem: l },
1700
+ { didMount: c, propsReady: a },
1701
+ { log: m },
1702
+ { scrollingInProgress: x },
1703
+ { context: h },
1704
+ { scrollIntoView: I }
1655
1705
  ]) => {
1656
- const S = C(!1), g = $();
1657
- let h = null;
1658
- function w(m) {
1659
- G(s, {
1706
+ const C = w(!1), v = $();
1707
+ let g = null;
1708
+ function p(f) {
1709
+ G(i, {
1660
1710
  align: "end",
1661
- behavior: m,
1711
+ behavior: f,
1662
1712
  index: "LAST"
1663
1713
  });
1664
1714
  }
1665
1715
  K(
1666
- x(
1667
- rt(x(A(e), jt(1)), l),
1668
- _(A(S), r, i, p),
1669
- E(([[m, d], u, T, R, I]) => {
1670
- let f = d && R, b = "auto";
1671
- return f && (b = _o(u, T || I), f = f && !!b), { followOutputBehavior: b, shouldFollow: f, totalCount: m };
1716
+ S(
1717
+ rt(S(V(e), Dt(1)), c),
1718
+ N(V(C), s, l, x),
1719
+ E(([[f, d], y, B, k, L]) => {
1720
+ let z = d && k, _ = "auto";
1721
+ return z && (_ = $o(y, B || L), z = z && !!_), { followOutputBehavior: _, shouldFollow: z, totalCount: f };
1672
1722
  }),
1673
- P(({ shouldFollow: m }) => m)
1723
+ A(({ shouldFollow: f }) => f)
1674
1724
  ),
1675
- ({ followOutputBehavior: m, totalCount: d }) => {
1676
- h && (h(), h = null), st(n) ? requestAnimationFrame(() => {
1677
- st(a)("following output to ", { totalCount: d }, mt.DEBUG), w(m);
1678
- }) : h = bt(t, () => {
1679
- st(a)("following output to ", { totalCount: d }, mt.DEBUG), w(m), h = null;
1725
+ ({ followOutputBehavior: f, totalCount: d }) => {
1726
+ g && (g(), g = null), ot(n) ? requestAnimationFrame(() => {
1727
+ ot(m)("following output to ", { totalCount: d }, mt.DEBUG), p(f);
1728
+ }) : g = Tt(t, () => {
1729
+ ot(m)("following output to ", { totalCount: d }, mt.DEBUG), p(f), g = null;
1680
1730
  });
1681
1731
  }
1682
1732
  );
1683
- function v(m) {
1684
- const d = bt(o, (u) => {
1685
- m && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && !h && (st(a)("scrolling to bottom due to increased size", {}, mt.DEBUG), w("auto"));
1733
+ function u(f) {
1734
+ const d = Tt(r, (y) => {
1735
+ f && !y.atBottom && y.notAtBottomBecause === "SIZE_INCREASED" && !g && (ot(m)("scrolling to bottom due to increased size", {}, mt.DEBUG), p("auto"));
1686
1736
  });
1687
1737
  setTimeout(d, 100);
1688
1738
  }
1689
- return K(
1690
- x(
1691
- rt(A(S), e, c),
1692
- P(([m, , d]) => m && d),
1693
- Rt(
1694
- ({ value: m }, [, d]) => ({ refreshed: m === d, value: d }),
1739
+ K(
1740
+ S(
1741
+ rt(V(C), e, a),
1742
+ A(([f, , d]) => f && d),
1743
+ bt(
1744
+ ({ value: f }, [, d]) => ({ refreshed: f === d, value: d }),
1695
1745
  { refreshed: !1, value: 0 }
1696
1746
  ),
1697
- P(({ refreshed: m }) => m),
1698
- _(S, e)
1747
+ A(({ refreshed: f }) => f),
1748
+ N(C, e)
1699
1749
  ),
1700
- ([, m]) => {
1701
- st(i) && v(m !== !1);
1750
+ ([, f]) => {
1751
+ ot(l) && u(f !== !1);
1752
+ }
1753
+ ), K(v, () => {
1754
+ u(ot(C) !== !1);
1755
+ }), K(rt(V(C), r), ([f, d]) => {
1756
+ f && !d.atBottom && d.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && p("auto");
1757
+ });
1758
+ const T = w(null), b = $();
1759
+ return O(
1760
+ Le(
1761
+ S(
1762
+ V(o),
1763
+ E((f) => {
1764
+ var d;
1765
+ return (d = f == null ? void 0 : f.length) != null ? d : 0;
1766
+ })
1767
+ ),
1768
+ S(V(e))
1769
+ ),
1770
+ b
1771
+ ), K(
1772
+ S(
1773
+ rt(S(b, Dt(1)), c),
1774
+ N(V(T), l, x, h),
1775
+ E(([[f, d], y, B, k, L]) => d && B && (y == null ? void 0 : y({ context: L, totalCount: f, scrollingInProgress: k }))),
1776
+ A((f) => !!f),
1777
+ kt(0)
1778
+ ),
1779
+ (f) => {
1780
+ g && (g(), g = null), ot(n) ? requestAnimationFrame(() => {
1781
+ ot(m)("scrolling into view", {}), G(I, f);
1782
+ }) : g = Tt(t, () => {
1783
+ ot(m)("scrolling into view", {}), G(I, f), g = null;
1784
+ });
1702
1785
  }
1703
- ), K(g, () => {
1704
- v(st(S) !== !1);
1705
- }), K(rt(A(S), o), ([m, d]) => {
1706
- m && !d.atBottom && d.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && w("auto");
1707
- }), { autoscrollToBottom: g, followOutput: S };
1786
+ ), { autoscrollToBottom: v, followOutput: C, scrollIntoViewOnChange: T };
1708
1787
  },
1709
- X(Et, ae, ce, ue, Pt, Vt, at)
1710
- ), Do = U(
1788
+ X(
1789
+ Et,
1790
+ ae,
1791
+ ce,
1792
+ ue,
1793
+ Pt,
1794
+ Vt,
1795
+ at,
1796
+ jn,
1797
+ qn
1798
+ )
1799
+ ), Ko = U(
1711
1800
  ([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (O(
1712
- x(
1801
+ S(
1713
1802
  l,
1714
- _(s),
1715
- P(([, c]) => c !== 0),
1716
- _(r, o, e, n, t),
1717
- E(([[, c], a, p, S, g, h = []]) => Un(c, a, p, S, g, h))
1803
+ N(s),
1804
+ A(([, c]) => c !== 0),
1805
+ N(r, o, e, n, t),
1806
+ E(([[, c], a, m, x, h, I = []]) => Un(c, a, m, x, h, I))
1718
1807
  ),
1719
1808
  i
1720
1809
  ), {}),
1721
- X(Et, ue, Dt, Pt),
1810
+ X(Et, ue, $t, Pt),
1722
1811
  { singleton: !0 }
1723
- ), $o = U(
1812
+ ), jo = U(
1724
1813
  ([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
1725
- const o = C(0);
1814
+ const o = w(0);
1726
1815
  return K(
1727
- x(
1816
+ S(
1728
1817
  t,
1729
- _(o),
1730
- P(([, r]) => r !== 0),
1818
+ N(o),
1819
+ A(([, r]) => r !== 0),
1731
1820
  E(([, r]) => ({ top: r }))
1732
1821
  ),
1733
1822
  (r) => {
1734
- bt(
1735
- x(
1823
+ Tt(
1824
+ S(
1736
1825
  n,
1737
- jt(1),
1738
- P((s) => s.items.length > 1)
1826
+ Dt(1),
1827
+ A((s) => s.items.length > 1)
1739
1828
  ),
1740
1829
  () => {
1741
1830
  requestAnimationFrame(() => {
@@ -1748,62 +1837,16 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
1748
1837
  initialScrollTop: o
1749
1838
  };
1750
1839
  },
1751
- X(Pt, at, Dt),
1752
- { singleton: !0 }
1753
- ), Uo = ({
1754
- itemBottom: t,
1755
- itemTop: e,
1756
- locationParams: { align: n, behavior: o, ...r },
1757
- viewportBottom: s,
1758
- viewportTop: i
1759
- }) => e < i ? { ...r, align: n != null ? n : "start", behavior: o } : t > s ? { ...r, align: n != null ? n : "end", behavior: o } : null, Ko = U(
1760
- ([
1761
- { gap: t, sizes: e, totalCount: n },
1762
- { fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
1763
- { scrollToIndex: a }
1764
- ]) => {
1765
- const p = $();
1766
- return O(
1767
- x(
1768
- p,
1769
- _(e, c, n, s, r, o, l),
1770
- _(t),
1771
- E(([[S, g, h, w, v, m, d, u], T]) => {
1772
- const { align: R, behavior: I, calculateViewLocation: f = Uo, done: b, ...k } = S, F = _n(S, g, w - 1), L = ie(F, g.offsetTree, T) + v + m, V = L + Ct(g.sizeTree, F)[1], D = u + m, J = u + h - d, nt = f({
1773
- itemBottom: V,
1774
- itemTop: L,
1775
- locationParams: { align: R, behavior: I, ...k },
1776
- viewportBottom: J,
1777
- viewportTop: D
1778
- });
1779
- return nt ? b && bt(
1780
- x(
1781
- i,
1782
- P((B) => !B),
1783
- // skips the initial publish of false, and the cleanup call.
1784
- // but if scrollingInProgress is true, we skip the initial publish.
1785
- jt(st(i) ? 1 : 2)
1786
- ),
1787
- b
1788
- ) : b && b(), nt;
1789
- }),
1790
- P((S) => S !== null)
1791
- ),
1792
- a
1793
- ), {
1794
- scrollIntoView: p
1795
- };
1796
- },
1797
- X(Et, at, ce, Dt, Vt),
1840
+ X(Pt, at, $t),
1798
1841
  { singleton: !0 }
1799
- ), jn = U(
1842
+ ), Yn = U(
1800
1843
  ([{ scrollVelocity: t }]) => {
1801
- const e = C(!1), n = $(), o = C(!1);
1844
+ const e = w(!1), n = $(), o = w(!1);
1802
1845
  return O(
1803
- x(
1846
+ S(
1804
1847
  t,
1805
- _(o, e, n),
1806
- P(([r, s]) => !!s),
1848
+ N(o, e, n),
1849
+ A(([r, s]) => !!s),
1807
1850
  E(([r, s, i, l]) => {
1808
1851
  const { enter: c, exit: a } = s;
1809
1852
  if (i) {
@@ -1813,11 +1856,11 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
1813
1856
  return !0;
1814
1857
  return i;
1815
1858
  }),
1816
- Z()
1859
+ Y()
1817
1860
  ),
1818
1861
  e
1819
1862
  ), K(
1820
- x(rt(e, t, n), _(o)),
1863
+ S(rt(e, t, n), N(o)),
1821
1864
  ([[r, s, i], l]) => {
1822
1865
  r && l && l.change && l.change(s, i);
1823
1866
  }
@@ -1825,22 +1868,22 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
1825
1868
  },
1826
1869
  X(ae),
1827
1870
  { singleton: !0 }
1828
- ), je = U(([{ scrollContainerState: t, scrollTo: e }]) => {
1829
- const n = $(), o = $(), r = $(), s = C(!1), i = C(void 0);
1871
+ ), qe = U(([{ scrollContainerState: t, scrollTo: e }]) => {
1872
+ const n = $(), o = $(), r = $(), s = w(!1), i = w(void 0);
1830
1873
  return O(
1831
- x(
1874
+ S(
1832
1875
  rt(n, o),
1833
- E(([{ scrollHeight: l, scrollTop: c, viewportHeight: a }, { offsetTop: p }]) => ({
1876
+ E(([{ scrollHeight: l, scrollTop: c, viewportHeight: a }, { offsetTop: m }]) => ({
1834
1877
  scrollHeight: l,
1835
- scrollTop: Math.max(0, c - p),
1878
+ scrollTop: Math.max(0, c - m),
1836
1879
  viewportHeight: a
1837
1880
  }))
1838
1881
  ),
1839
1882
  t
1840
1883
  ), O(
1841
- x(
1884
+ S(
1842
1885
  e,
1843
- _(o),
1886
+ N(o),
1844
1887
  E(([l, { offsetTop: c }]) => ({
1845
1888
  ...l,
1846
1889
  top: l.top + c
@@ -1857,7 +1900,7 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
1857
1900
  windowScrollTo: r,
1858
1901
  windowViewportRect: o
1859
1902
  };
1860
- }, X(at)), jo = U(
1903
+ }, X(at)), qo = U(
1861
1904
  ([
1862
1905
  { sizeRanges: t, sizes: e },
1863
1906
  { headerHeight: n, scrollTop: o },
@@ -1865,130 +1908,130 @@ const _o = (t, e) => typeof t == "function" ? xn(t(e)) : e && xn(t), No = U(
1865
1908
  { didMount: s },
1866
1909
  { useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
1867
1910
  ]) => {
1868
- const a = $(), p = C(void 0), S = C(null), g = C(null);
1869
- return O(l, S), O(c, g), K(
1870
- x(
1911
+ const a = $(), m = w(void 0), x = w(null), h = w(null);
1912
+ return O(l, x), O(c, h), K(
1913
+ S(
1871
1914
  a,
1872
- _(e, o, i, S, g, n)
1915
+ N(e, o, i, x, h, n)
1873
1916
  ),
1874
- ([h, w, v, m, d, u, T]) => {
1875
- const R = Bo(w.sizeTree);
1876
- m && d !== null && u !== null && (v = d.scrollTop - u.offsetTop), v -= T, h({ ranges: R, scrollTop: v });
1917
+ ([I, C, v, g, p, u, T]) => {
1918
+ const b = Fo(C.sizeTree);
1919
+ g && p !== null && u !== null && (v = p.scrollTop - u.offsetTop), v -= T, I({ ranges: b, scrollTop: v });
1877
1920
  }
1878
- ), O(x(p, P(Me), E(qo)), r), O(
1879
- x(
1921
+ ), O(S(m, A(We), E(Yo)), r), O(
1922
+ S(
1880
1923
  s,
1881
- _(p),
1882
- P(([, h]) => h !== void 0),
1883
- Z(),
1884
- E(([, h]) => h.ranges)
1924
+ N(m),
1925
+ A(([, I]) => I !== void 0),
1926
+ Y(),
1927
+ E(([, I]) => I.ranges)
1885
1928
  ),
1886
1929
  t
1887
1930
  ), {
1888
1931
  getState: a,
1889
- restoreStateFrom: p
1932
+ restoreStateFrom: m
1890
1933
  };
1891
1934
  },
1892
- X(Et, at, ue, Pt, je)
1935
+ X(Et, at, ue, Pt, qe)
1893
1936
  );
1894
- function qo(t) {
1937
+ function Yo(t) {
1895
1938
  return { align: "start", index: 0, offset: t.scrollTop };
1896
1939
  }
1897
- const Yo = U(([{ topItemsIndexes: t }]) => {
1898
- const e = C(0);
1940
+ const Zo = U(([{ topItemsIndexes: t }]) => {
1941
+ const e = w(0);
1899
1942
  return O(
1900
- x(
1943
+ S(
1901
1944
  e,
1902
- P((n) => n >= 0),
1945
+ A((n) => n >= 0),
1903
1946
  E((n) => Array.from({ length: n }).map((o, r) => r))
1904
1947
  ),
1905
1948
  t
1906
1949
  ), { topItemCount: e };
1907
- }, X(Dt));
1908
- function qn(t) {
1950
+ }, X($t));
1951
+ function Zn(t) {
1909
1952
  let e = !1, n;
1910
1953
  return () => (e || (e = !0, n = t()), n);
1911
1954
  }
1912
- const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Xo = U(
1955
+ const Xo = Zn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Jo = U(
1913
1956
  ([
1914
1957
  { deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
1915
1958
  { isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
1916
1959
  { listState: c },
1917
- { beforeUnshiftWith: a, gap: p, shiftWithOffset: S, sizes: g },
1918
- { log: h },
1919
- { recalcInProgress: w }
1960
+ { beforeUnshiftWith: a, gap: m, shiftWithOffset: x, sizes: h },
1961
+ { log: I },
1962
+ { recalcInProgress: C }
1920
1963
  ]) => {
1921
1964
  const v = ht(
1922
- x(
1965
+ S(
1923
1966
  c,
1924
- _(i),
1925
- Rt(
1926
- ([, d, u, T], [{ bottom: R, items: I, offsetBottom: f, totalCount: b }, k]) => {
1927
- const F = R + f;
1967
+ N(i),
1968
+ bt(
1969
+ ([, p, u, T], [{ bottom: b, items: f, offsetBottom: d, totalCount: y }, B]) => {
1970
+ const k = b + d;
1928
1971
  let L = 0;
1929
- return u === b && d.length > 0 && I.length > 0 && (I[0].originalIndex === 0 && d[0].originalIndex === 0 || (L = F - T, L !== 0 && (L += k))), [L, I, b, F];
1972
+ return u === y && p.length > 0 && f.length > 0 && (f[0].originalIndex === 0 && p[0].originalIndex === 0 || (L = k - T, L !== 0 && (L += B))), [L, f, y, k];
1930
1973
  },
1931
1974
  [0, [], 0, 0]
1932
1975
  ),
1933
- P(([d]) => d !== 0),
1934
- _(o, l, n, r, h, w),
1935
- P(([, d, u, T, , , R]) => !R && !T && d !== 0 && u === le),
1936
- E(([[d], , , , , u]) => (u("Upward scrolling compensation", { amount: d }, mt.DEBUG), d))
1976
+ A(([p]) => p !== 0),
1977
+ N(o, l, n, r, I, C),
1978
+ A(([, p, u, T, , , b]) => !b && !T && p !== 0 && u === le),
1979
+ E(([[p], , , , , u]) => (u("Upward scrolling compensation", { amount: p }, mt.DEBUG), p))
1937
1980
  )
1938
1981
  );
1939
- function m(d) {
1940
- d > 0 ? (G(e, { behavior: "auto", top: -d }), G(t, 0)) : (G(t, 0), G(e, { behavior: "auto", top: -d }));
1982
+ function g(p) {
1983
+ p > 0 ? (G(e, { behavior: "auto", top: -p }), G(t, 0)) : (G(t, 0), G(e, { behavior: "auto", top: -p }));
1941
1984
  }
1942
- return K(x(v, _(t, s)), ([d, u, T]) => {
1943
- T && Zo() ? G(t, u - d) : m(-d);
1985
+ return K(S(v, N(t, s)), ([p, u, T]) => {
1986
+ T && Xo() ? G(t, u - p) : g(-p);
1944
1987
  }), K(
1945
- x(
1946
- rt(ct(s, !1), t, w),
1947
- P(([d, u, T]) => !d && !T && u !== 0),
1948
- E(([d, u]) => u),
1949
- Lt(1)
1988
+ S(
1989
+ rt(ct(s, !1), t, C),
1990
+ A(([p, u, T]) => !p && !T && u !== 0),
1991
+ E(([p, u]) => u),
1992
+ kt(1)
1950
1993
  ),
1951
- m
1994
+ g
1952
1995
  ), O(
1953
- x(
1954
- S,
1955
- E((d) => ({ top: -d }))
1996
+ S(
1997
+ x,
1998
+ E((p) => ({ top: -p }))
1956
1999
  ),
1957
2000
  e
1958
2001
  ), K(
1959
- x(
2002
+ S(
1960
2003
  a,
1961
- _(g, p),
1962
- E(([d, { groupIndices: u, lastSize: T, sizeTree: R }, I]) => {
1963
- function f(b) {
1964
- return b * (T + I);
2004
+ N(h, m),
2005
+ E(([p, { groupIndices: u, lastSize: T, sizeTree: b }, f]) => {
2006
+ function d(y) {
2007
+ return y * (T + f);
1965
2008
  }
1966
2009
  if (u.length === 0)
1967
- return f(d);
2010
+ return d(p);
1968
2011
  {
1969
- let b = 0;
1970
- const k = re(R, 0);
1971
- let F = 0, L = 0;
1972
- for (; F < d; ) {
1973
- F++, b += k;
1974
- let V = u.length === L + 1 ? 1 / 0 : u[L + 1] - u[L] - 1;
1975
- F + V > d && (b -= k, V = d - F + 1), F += V, b += f(V), L++;
2012
+ let y = 0;
2013
+ const B = re(b, 0);
2014
+ let k = 0, L = 0;
2015
+ for (; k < p; ) {
2016
+ k++, y += B;
2017
+ let z = u.length === L + 1 ? 1 / 0 : u[L + 1] - u[L] - 1;
2018
+ k + z > p && (y -= B, z = p - k + 1), k += z, y += d(z), L++;
1976
2019
  }
1977
- return b;
2020
+ return y;
1978
2021
  }
1979
2022
  })
1980
2023
  ),
1981
- (d) => {
1982
- G(t, d), requestAnimationFrame(() => {
1983
- G(e, { top: d }), requestAnimationFrame(() => {
1984
- G(t, 0), G(w, !1);
2024
+ (p) => {
2025
+ G(t, p), requestAnimationFrame(() => {
2026
+ G(e, { top: p }), requestAnimationFrame(() => {
2027
+ G(t, 0), G(C, !1);
1985
2028
  });
1986
2029
  });
1987
2030
  }
1988
2031
  ), { deviation: t };
1989
2032
  },
1990
- X(at, ae, Dt, Et, Vt, Ne)
1991
- ), Jo = U(
2033
+ X(at, ae, $t, Et, Vt, De)
2034
+ ), Qo = U(
1992
2035
  ([
1993
2036
  t,
1994
2037
  e,
@@ -1999,7 +2042,8 @@ const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
1999
2042
  i,
2000
2043
  l,
2001
2044
  c,
2002
- a
2045
+ a,
2046
+ m
2003
2047
  ]) => ({
2004
2048
  ...t,
2005
2049
  ...e,
@@ -2010,21 +2054,23 @@ const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2010
2054
  ...i,
2011
2055
  ...l,
2012
2056
  ...c,
2013
- ...a
2057
+ ...a,
2058
+ ...m
2014
2059
  }),
2015
2060
  X(
2016
- Ke,
2017
- Do,
2018
- Pt,
2019
- jn,
2020
- Kn,
2021
- $o,
2022
- Go,
2023
2061
  je,
2024
2062
  Ko,
2025
- Vt
2063
+ Pt,
2064
+ Yn,
2065
+ Kn,
2066
+ jo,
2067
+ No,
2068
+ qe,
2069
+ qn,
2070
+ Vt,
2071
+ jn
2026
2072
  )
2027
- ), Yn = U(
2073
+ ), Xn = U(
2028
2074
  ([
2029
2075
  {
2030
2076
  data: t,
@@ -2037,22 +2083,22 @@ const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2037
2083
  sizeRanges: l,
2038
2084
  sizes: c,
2039
2085
  statefulTotalCount: a,
2040
- totalCount: p,
2041
- trackItemSizes: S
2086
+ totalCount: m,
2087
+ trackItemSizes: x
2042
2088
  },
2043
- { initialItemFinalLocationReached: g, initialTopMostItemIndex: h, scrolledToInitialItem: w },
2089
+ { initialItemFinalLocationReached: h, initialTopMostItemIndex: I, scrolledToInitialItem: C },
2044
2090
  v,
2045
- m,
2091
+ g,
2092
+ p,
2093
+ { listState: u, topItemsIndexes: T, ...b },
2094
+ { scrollToIndex: f },
2046
2095
  d,
2047
- { listState: u, topItemsIndexes: T, ...R },
2048
- { scrollToIndex: I },
2049
- f,
2050
- { topItemCount: b },
2051
- { groupCounts: k },
2052
- F
2053
- ]) => (O(R.rangeChanged, F.scrollSeekRangeChanged), O(
2054
- x(
2055
- F.windowViewportRect,
2096
+ { topItemCount: y },
2097
+ { groupCounts: B },
2098
+ k
2099
+ ]) => (O(b.rangeChanged, k.scrollSeekRangeChanged), O(
2100
+ S(
2101
+ k.windowViewportRect,
2056
2102
  E((L) => L.visibleHeight)
2057
2103
  ),
2058
2104
  v.viewportHeight
@@ -2062,46 +2108,46 @@ const Zo = qn(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2062
2108
  firstItemIndex: n,
2063
2109
  fixedItemHeight: o,
2064
2110
  gap: r,
2065
- groupCounts: k,
2066
- initialItemFinalLocationReached: g,
2067
- initialTopMostItemIndex: h,
2068
- scrolledToInitialItem: w,
2111
+ groupCounts: B,
2112
+ initialItemFinalLocationReached: h,
2113
+ initialTopMostItemIndex: I,
2114
+ scrolledToInitialItem: C,
2069
2115
  sizeRanges: l,
2070
- topItemCount: b,
2116
+ topItemCount: y,
2071
2117
  topItemsIndexes: T,
2072
2118
  // input
2073
- totalCount: p,
2074
- ...d,
2119
+ totalCount: m,
2120
+ ...p,
2075
2121
  groupIndices: s,
2076
2122
  itemSize: i,
2077
2123
  listState: u,
2078
- scrollToIndex: I,
2124
+ scrollToIndex: f,
2079
2125
  // output
2080
2126
  statefulTotalCount: a,
2081
- trackItemSizes: S,
2127
+ trackItemSizes: x,
2082
2128
  // exported from stateFlagsSystem
2083
- ...R,
2129
+ ...b,
2084
2130
  // the bag of IO from featureGroup1System
2085
- ...F,
2131
+ ...k,
2086
2132
  ...v,
2087
2133
  sizes: c,
2088
- ...m
2134
+ ...g
2089
2135
  }),
2090
2136
  X(
2091
2137
  Et,
2092
2138
  ue,
2093
2139
  at,
2094
- jo,
2095
- No,
2096
- Dt,
2140
+ qo,
2141
+ Uo,
2142
+ $t,
2097
2143
  ce,
2098
- Xo,
2099
- Yo,
2144
+ Jo,
2145
+ Zo,
2100
2146
  Nn,
2101
- Jo
2147
+ Qo
2102
2148
  )
2103
2149
  );
2104
- function Qo(t, e) {
2150
+ function tr(t, e) {
2105
2151
  const n = {}, o = {};
2106
2152
  let r = 0;
2107
2153
  const s = t.length;
@@ -2112,264 +2158,263 @@ function Qo(t, e) {
2112
2158
  return n;
2113
2159
  }
2114
2160
  const pe = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
2115
- function qe(t, e, n) {
2161
+ function Ye(t, e, n) {
2116
2162
  const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = H.createContext({});
2117
- function c(d, u) {
2118
- d.propsReady && G(d.propsReady, !1);
2163
+ function c(p, u) {
2164
+ p.propsReady && G(p.propsReady, !1);
2119
2165
  for (const T of o) {
2120
- const R = d[e.required[T]];
2121
- G(R, u[T]);
2166
+ const b = p[e.required[T]];
2167
+ G(b, u[T]);
2122
2168
  }
2123
2169
  for (const T of r)
2124
2170
  if (T in u) {
2125
- const R = d[e.optional[T]];
2126
- G(R, u[T]);
2171
+ const b = p[e.optional[T]];
2172
+ G(b, u[T]);
2127
2173
  }
2128
- d.propsReady && G(d.propsReady, !0);
2174
+ p.propsReady && G(p.propsReady, !0);
2129
2175
  }
2130
- function a(d) {
2131
- return s.reduce((u, T) => (u[T] = (R) => {
2132
- const I = d[e.methods[T]];
2133
- G(I, R);
2176
+ function a(p) {
2177
+ return s.reduce((u, T) => (u[T] = (b) => {
2178
+ const f = p[e.methods[T]];
2179
+ G(f, b);
2134
2180
  }, u), {});
2135
2181
  }
2136
- function p(d) {
2137
- return i.reduce((u, T) => (u[T] = ho(d[e.events[T]]), u), {});
2182
+ function m(p) {
2183
+ return i.reduce((u, T) => (u[T] = Io(p[e.events[T]]), u), {});
2138
2184
  }
2139
- const S = H.forwardRef((d, u) => {
2140
- const { children: T, ...R } = d, [I] = H.useState(() => ve(Io(t), (k) => {
2141
- c(k, R);
2142
- })), [f] = H.useState(un(p, I));
2185
+ const x = H.forwardRef((p, u) => {
2186
+ const { children: T, ...b } = p, [f] = H.useState(() => ve(xo(t), (B) => {
2187
+ c(B, b);
2188
+ })), [d] = H.useState(an(m, f));
2143
2189
  pe(() => {
2144
- for (const k of i)
2145
- k in R && K(f[k], R[k]);
2190
+ for (const B of i)
2191
+ B in b && K(d[B], b[B]);
2146
2192
  return () => {
2147
- Object.values(f).map(We);
2193
+ Object.values(d).map(Ge);
2148
2194
  };
2149
- }, [R, f, I]), pe(() => {
2150
- c(I, R);
2151
- }), H.useImperativeHandle(u, cn(a(I)));
2152
- const b = n;
2153
- return /* @__PURE__ */ z(l.Provider, { value: I, children: n ? /* @__PURE__ */ z(b, { ...Qo([...o, ...r, ...i], R), children: T }) : T });
2154
- }), g = (d) => {
2195
+ }, [b, d, f]), pe(() => {
2196
+ c(f, b);
2197
+ }), H.useImperativeHandle(u, un(a(f)));
2198
+ const y = n;
2199
+ return /* @__PURE__ */ P(l.Provider, { value: f, children: n ? /* @__PURE__ */ P(y, { ...tr([...o, ...r, ...i], b), children: T }) : T });
2200
+ }), h = (p) => {
2155
2201
  const u = H.useContext(l);
2156
2202
  return H.useCallback(
2157
2203
  (T) => {
2158
- G(u[d], T);
2204
+ G(u[p], T);
2159
2205
  },
2160
- [u, d]
2206
+ [u, p]
2161
2207
  );
2162
- }, h = (d) => {
2163
- const T = H.useContext(l)[d], R = H.useCallback(
2164
- (I) => K(T, I),
2208
+ }, I = (p) => {
2209
+ const T = H.useContext(l)[p], b = H.useCallback(
2210
+ (f) => K(T, f),
2165
2211
  [T]
2166
2212
  );
2167
2213
  return H.useSyncExternalStore(
2168
- R,
2169
- () => st(T),
2170
- () => st(T)
2214
+ b,
2215
+ () => ot(T),
2216
+ () => ot(T)
2171
2217
  );
2172
- }, w = (d) => {
2173
- const T = H.useContext(l)[d], [R, I] = H.useState(un(st, T));
2218
+ }, C = (p) => {
2219
+ const T = H.useContext(l)[p], [b, f] = H.useState(an(ot, T));
2174
2220
  return pe(
2175
- () => K(T, (f) => {
2176
- f !== R && I(cn(f));
2221
+ () => K(T, (d) => {
2222
+ d !== b && f(un(d));
2177
2223
  }),
2178
- [T, R]
2179
- ), R;
2180
- }, v = H.version.startsWith("18") ? h : w;
2224
+ [T, b]
2225
+ ), b;
2226
+ }, v = H.version.startsWith("18") ? I : C;
2181
2227
  return {
2182
- Component: S,
2183
- useEmitter: (d, u) => {
2184
- const R = H.useContext(l)[d];
2185
- pe(() => K(R, u), [u, R]);
2228
+ Component: x,
2229
+ useEmitter: (p, u) => {
2230
+ const b = H.useContext(l)[p];
2231
+ pe(() => K(b, u), [u, b]);
2186
2232
  },
2187
2233
  useEmitterValue: v,
2188
- usePublisher: g
2234
+ usePublisher: h
2189
2235
  };
2190
2236
  }
2191
- const be = H.createContext(void 0), Zn = H.createContext(void 0), Xn = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
2237
+ const be = H.createContext(void 0), Jn = H.createContext(void 0), Qn = typeof document < "u" ? H.useLayoutEffect : H.useEffect;
2192
2238
  function ke(t) {
2193
2239
  return "self" in t;
2194
2240
  }
2195
- function tr(t) {
2241
+ function er(t) {
2196
2242
  return "body" in t;
2197
2243
  }
2198
- function Jn(t, e, n, o = Yt, r, s) {
2244
+ function to(t, e, n, o = Yt, r, s) {
2199
2245
  const i = H.useRef(null), l = H.useRef(null), c = H.useRef(null), a = H.useCallback(
2200
- (g) => {
2201
- let h, w, v;
2202
- const m = g.target;
2203
- if (tr(m) || ke(m)) {
2204
- const u = ke(m) ? m : m.defaultView;
2205
- v = s ? u.scrollX : u.scrollY, h = s ? u.document.documentElement.scrollWidth : u.document.documentElement.scrollHeight, w = s ? u.innerWidth : u.innerHeight;
2246
+ (h) => {
2247
+ let I, C, v;
2248
+ const g = h.target;
2249
+ if (er(g) || ke(g)) {
2250
+ const u = ke(g) ? g : g.defaultView;
2251
+ v = s ? u.scrollX : u.scrollY, I = s ? u.document.documentElement.scrollWidth : u.document.documentElement.scrollHeight, C = s ? u.innerWidth : u.innerHeight;
2206
2252
  } else
2207
- v = s ? m.scrollLeft : m.scrollTop, h = s ? m.scrollWidth : m.scrollHeight, w = s ? m.offsetWidth : m.offsetHeight;
2208
- const d = () => {
2253
+ v = s ? g.scrollLeft : g.scrollTop, I = s ? g.scrollWidth : g.scrollHeight, C = s ? g.offsetWidth : g.offsetHeight;
2254
+ const p = () => {
2209
2255
  t({
2210
- scrollHeight: h,
2256
+ scrollHeight: I,
2211
2257
  scrollTop: Math.max(v, 0),
2212
- viewportHeight: w
2258
+ viewportHeight: C
2213
2259
  });
2214
2260
  };
2215
- g.suppressFlushSync ? d() : co.flushSync(d), l.current !== null && (v === l.current || v <= 0 || v === h - w) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2261
+ h.suppressFlushSync ? p() : ao.flushSync(p), l.current !== null && (v === l.current || v <= 0 || v === I - C) && (l.current = null, e(!0), c.current && (clearTimeout(c.current), c.current = null));
2216
2262
  },
2217
2263
  [t, e, s]
2218
2264
  );
2219
2265
  H.useEffect(() => {
2220
- const g = r || i.current;
2221
- return o(r || i.current), a({ suppressFlushSync: !0, target: g }), g.addEventListener("scroll", a, { passive: !0 }), () => {
2222
- o(null), g.removeEventListener("scroll", a);
2266
+ const h = r || i.current;
2267
+ return o(r || i.current), a({ suppressFlushSync: !0, target: h }), h.addEventListener("scroll", a, { passive: !0 }), () => {
2268
+ o(null), h.removeEventListener("scroll", a);
2223
2269
  };
2224
2270
  }, [i, a, n, o, r]);
2225
- function p(g) {
2226
- const h = i.current;
2227
- if (!h || (s ? "offsetWidth" in h && h.offsetWidth === 0 : "offsetHeight" in h && h.offsetHeight === 0))
2271
+ function m(h) {
2272
+ const I = i.current;
2273
+ if (!I || (s ? "offsetWidth" in I && I.offsetWidth === 0 : "offsetHeight" in I && I.offsetHeight === 0))
2228
2274
  return;
2229
- const w = g.behavior === "smooth";
2230
- let v, m, d;
2231
- ke(h) ? (m = Math.max(
2232
- wt(h.document.documentElement, s ? "width" : "height"),
2233
- s ? h.document.documentElement.scrollWidth : h.document.documentElement.scrollHeight
2234
- ), v = s ? h.innerWidth : h.innerHeight, d = s ? window.scrollX : window.scrollY) : (m = h[s ? "scrollWidth" : "scrollHeight"], v = wt(h, s ? "width" : "height"), d = h[s ? "scrollLeft" : "scrollTop"]);
2235
- const u = m - v;
2236
- if (g.top = Math.ceil(Math.max(Math.min(u, g.top), 0)), $n(v, m) || g.top === d) {
2237
- t({ scrollHeight: m, scrollTop: d, viewportHeight: v }), w && e(!0);
2275
+ const C = h.behavior === "smooth";
2276
+ let v, g, p;
2277
+ ke(I) ? (g = Math.max(
2278
+ vt(I.document.documentElement, s ? "width" : "height"),
2279
+ s ? I.document.documentElement.scrollWidth : I.document.documentElement.scrollHeight
2280
+ ), v = s ? I.innerWidth : I.innerHeight, p = s ? window.scrollX : window.scrollY) : (g = I[s ? "scrollWidth" : "scrollHeight"], v = vt(I, s ? "width" : "height"), p = I[s ? "scrollLeft" : "scrollTop"]);
2281
+ const u = g - v;
2282
+ if (h.top = Math.ceil(Math.max(Math.min(u, h.top), 0)), $n(v, g) || h.top === p) {
2283
+ t({ scrollHeight: g, scrollTop: p, viewportHeight: v }), C && e(!0);
2238
2284
  return;
2239
2285
  }
2240
- w ? (l.current = g.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
2286
+ C ? (l.current = h.top, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
2241
2287
  c.current = null, l.current = null, e(!0);
2242
- }, 1e3)) : l.current = null, s && (g = { behavior: g.behavior, left: g.top }), h.scrollTo(g);
2288
+ }, 1e3)) : l.current = null, s && (h = { behavior: h.behavior, left: h.top }), I.scrollTo(h);
2243
2289
  }
2244
- function S(g) {
2245
- s && (g = { behavior: g.behavior, left: g.top }), i.current.scrollBy(g);
2290
+ function x(h) {
2291
+ s && (h = { behavior: h.behavior, left: h.top }), i.current.scrollBy(h);
2246
2292
  }
2247
- return { scrollByCallback: S, scrollerRef: i, scrollToCallback: p };
2293
+ return { scrollByCallback: x, scrollerRef: i, scrollToCallback: m };
2248
2294
  }
2249
- const Fe = "-webkit-sticky", Tn = "sticky", Ye = qn(() => {
2295
+ const Fe = "-webkit-sticky", Tn = "sticky", Ze = Zn(() => {
2250
2296
  if (typeof document > "u")
2251
2297
  return Tn;
2252
2298
  const t = document.createElement("div");
2253
2299
  return t.style.position = Fe, t.style.position === Fe ? Fe : Tn;
2254
2300
  });
2255
- function Ze(t) {
2301
+ function Xe(t) {
2256
2302
  return t;
2257
2303
  }
2258
- const er = /* @__PURE__ */ U(() => {
2259
- const t = C((c) => `Item ${c}`), e = C(null), n = C((c) => `Group ${c}`), o = C({}), r = C(Ze), s = C("div"), i = C(Yt), l = (c, a = null) => ct(
2260
- x(
2261
- o,
2262
- E((p) => p[c]),
2263
- Z()
2304
+ const nr = /* @__PURE__ */ U(() => {
2305
+ const t = w((l) => `Item ${l}`), e = w((l) => `Group ${l}`), n = w({}), o = w(Xe), r = w("div"), s = w(Yt), i = (l, c = null) => ct(
2306
+ S(
2307
+ n,
2308
+ E((a) => a[l]),
2309
+ Y()
2264
2310
  ),
2265
- a
2311
+ c
2266
2312
  );
2267
2313
  return {
2268
- components: o,
2269
- computeItemKey: r,
2270
- context: e,
2271
- EmptyPlaceholder: l("EmptyPlaceholder"),
2272
- FooterComponent: l("Footer"),
2273
- GroupComponent: l("Group", "div"),
2274
- groupContent: n,
2275
- HeaderComponent: l("Header"),
2276
- HeaderFooterTag: s,
2277
- ItemComponent: l("Item", "div"),
2314
+ components: n,
2315
+ computeItemKey: o,
2316
+ EmptyPlaceholder: i("EmptyPlaceholder"),
2317
+ FooterComponent: i("Footer"),
2318
+ GroupComponent: i("Group", "div"),
2319
+ groupContent: e,
2320
+ HeaderComponent: i("Header"),
2321
+ HeaderFooterTag: r,
2322
+ ItemComponent: i("Item", "div"),
2278
2323
  itemContent: t,
2279
- ListComponent: l("List", "div"),
2280
- ScrollerComponent: l("Scroller", "div"),
2281
- scrollerRef: i,
2282
- ScrollSeekPlaceholder: l("ScrollSeekPlaceholder"),
2283
- TopItemListComponent: l("TopItemList")
2324
+ ListComponent: i("List", "div"),
2325
+ ScrollerComponent: i("Scroller", "div"),
2326
+ scrollerRef: s,
2327
+ ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
2328
+ TopItemListComponent: i("TopItemList")
2284
2329
  };
2285
- }), nr = /* @__PURE__ */ U(
2330
+ }), or = /* @__PURE__ */ U(
2286
2331
  ([t, e]) => ({ ...t, ...e }),
2287
- X(Yn, er)
2288
- ), or = ({ height: t }) => /* @__PURE__ */ z("div", { style: { height: t } }), rr = { overflowAnchor: "none", position: Ye(), zIndex: 1 }, Qn = { overflowAnchor: "none" }, sr = { ...Qn, display: "inline-block", height: "100%" }, Cn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
2289
- const n = M("listState"), o = gt("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = gt("windowScrollContainerState"), l = gt("scrollContainerState"), c = s || r ? i : l, a = M("itemContent"), p = M("context"), S = M("groupContent"), g = M("trackItemSizes"), h = M("itemSize"), w = M("log"), v = gt("gap"), m = M("horizontalDirection"), { callbackRef: d } = On(
2332
+ X(Xn, nr)
2333
+ ), rr = ({ height: t }) => /* @__PURE__ */ P("div", { style: { height: t } }), sr = { overflowAnchor: "none", position: Ze(), zIndex: 1 }, eo = { overflowAnchor: "none" }, ir = { ...eo, display: "inline-block", height: "100%" }, Cn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
2334
+ const n = M("listState"), o = gt("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = gt("windowScrollContainerState"), l = gt("scrollContainerState"), c = s || r ? i : l, a = M("itemContent"), m = M("context"), x = M("groupContent"), h = M("trackItemSizes"), I = M("itemSize"), C = M("log"), v = gt("gap"), g = M("horizontalDirection"), { callbackRef: p } = On(
2290
2335
  o,
2336
+ I,
2291
2337
  h,
2292
- g,
2293
2338
  e ? Yt : c,
2294
- w,
2339
+ C,
2295
2340
  v,
2296
2341
  s,
2297
- m,
2342
+ g,
2298
2343
  M("skipAnimationFrameInResizeObserver")
2299
2344
  ), [u, T] = H.useState(0);
2300
- Qe("deviation", (B) => {
2301
- u !== B && T(B);
2345
+ tn("deviation", (F) => {
2346
+ u !== F && T(F);
2302
2347
  });
2303
- const R = M("EmptyPlaceholder"), I = M("ScrollSeekPlaceholder") || or, f = M("ListComponent"), b = M("ItemComponent"), k = M("GroupComponent"), F = M("computeItemKey"), L = M("isSeeking"), V = M("groupIndices").length > 0, D = M("alignToBottom"), J = M("initialItemFinalLocationReached"), nt = e ? {} : {
2348
+ const b = M("EmptyPlaceholder"), f = M("ScrollSeekPlaceholder") || rr, d = M("ListComponent"), y = M("ItemComponent"), B = M("GroupComponent"), k = M("computeItemKey"), L = M("isSeeking"), z = M("groupIndices").length > 0, _ = M("alignToBottom"), J = M("initialItemFinalLocationReached"), nt = e ? {} : {
2304
2349
  boxSizing: "border-box",
2305
- ...m ? {
2350
+ ...g ? {
2306
2351
  display: "inline-block",
2307
2352
  height: "100%",
2308
- marginLeft: u !== 0 ? u : D ? "auto" : 0,
2353
+ marginLeft: u !== 0 ? u : _ ? "auto" : 0,
2309
2354
  paddingLeft: n.offsetTop,
2310
2355
  paddingRight: n.offsetBottom,
2311
2356
  whiteSpace: "nowrap"
2312
2357
  } : {
2313
- marginTop: u !== 0 ? u : D ? "auto" : 0,
2358
+ marginTop: u !== 0 ? u : _ ? "auto" : 0,
2314
2359
  paddingBottom: n.offsetBottom,
2315
2360
  paddingTop: n.offsetTop
2316
2361
  },
2317
2362
  ...J ? {} : { visibility: "hidden" }
2318
2363
  };
2319
- return !e && n.totalCount === 0 && R ? /* @__PURE__ */ z(R, { ...q(R, p) }) : /* @__PURE__ */ z(
2320
- f,
2364
+ return !e && n.totalCount === 0 && b ? /* @__PURE__ */ P(b, { ...Z(b, m) }) : /* @__PURE__ */ P(
2365
+ d,
2321
2366
  {
2322
- ...q(f, p),
2367
+ ...Z(d, m),
2323
2368
  "data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
2324
- ref: d,
2369
+ ref: p,
2325
2370
  style: nt,
2326
- children: (e ? n.topItems : n.items).map((B) => {
2327
- const Y = B.originalIndex, it = F(Y + n.firstItemIndex, B.data, p);
2371
+ children: (e ? n.topItems : n.items).map((F) => {
2372
+ const q = F.originalIndex, it = k(q + n.firstItemIndex, F.data, m);
2328
2373
  return L ? /* @__PURE__ */ _t(
2329
- I,
2374
+ f,
2330
2375
  {
2331
- ...q(I, p),
2332
- height: B.size,
2333
- index: B.index,
2376
+ ...Z(f, m),
2377
+ height: F.size,
2378
+ index: F.index,
2334
2379
  key: it,
2335
- type: B.type || "item",
2336
- ...B.type === "group" ? {} : { groupIndex: B.groupIndex }
2380
+ type: F.type || "item",
2381
+ ...F.type === "group" ? {} : { groupIndex: F.groupIndex }
2337
2382
  }
2338
- ) : B.type === "group" ? /* @__PURE__ */ _t(
2339
- k,
2383
+ ) : F.type === "group" ? /* @__PURE__ */ _t(
2384
+ B,
2340
2385
  {
2341
- ...q(k, p),
2342
- "data-index": Y,
2343
- "data-item-index": B.index,
2344
- "data-known-size": B.size,
2386
+ ...Z(B, m),
2387
+ "data-index": q,
2388
+ "data-item-index": F.index,
2389
+ "data-known-size": F.size,
2345
2390
  key: it,
2346
- style: rr
2391
+ style: sr
2347
2392
  },
2348
- S(B.index, p)
2393
+ x(F.index, m)
2349
2394
  ) : /* @__PURE__ */ _t(
2350
- b,
2395
+ y,
2351
2396
  {
2352
- ...q(b, p),
2353
- ...to(b, B.data),
2354
- "data-index": Y,
2355
- "data-item-group-index": B.groupIndex,
2356
- "data-item-index": B.index,
2357
- "data-known-size": B.size,
2397
+ ...Z(y, m),
2398
+ ...no(y, F.data),
2399
+ "data-index": q,
2400
+ "data-item-group-index": F.groupIndex,
2401
+ "data-item-index": F.index,
2402
+ "data-known-size": F.size,
2358
2403
  key: it,
2359
- style: m ? sr : Qn
2404
+ style: g ? ir : eo
2360
2405
  },
2361
- V ? a(B.index, B.groupIndex, B.data, p) : a(B.index, B.data, p)
2406
+ z ? a(F.index, F.groupIndex, F.data, m) : a(F.index, F.data, m)
2362
2407
  );
2363
2408
  })
2364
2409
  }
2365
2410
  );
2366
- }), ir = {
2411
+ }), lr = {
2367
2412
  height: "100%",
2368
2413
  outline: "none",
2369
2414
  overflowY: "auto",
2370
2415
  position: "relative",
2371
2416
  WebkitOverflowScrolling: "touch"
2372
- }, lr = {
2417
+ }, cr = {
2373
2418
  outline: "none",
2374
2419
  overflowX: "auto",
2375
2420
  position: "relative"
@@ -2379,139 +2424,140 @@ const er = /* @__PURE__ */ U(() => {
2379
2424
  top: 0,
2380
2425
  width: "100%",
2381
2426
  ...t ? { display: "flex", flexDirection: "column" } : {}
2382
- }), cr = {
2383
- position: Ye(),
2427
+ }), ur = {
2428
+ position: Ze(),
2384
2429
  top: 0,
2385
2430
  width: "100%",
2386
2431
  zIndex: 1
2387
2432
  };
2388
- function q(t, e) {
2433
+ function Z(t, e) {
2389
2434
  if (typeof t != "string")
2390
2435
  return { context: e };
2391
2436
  }
2392
- function to(t, e) {
2437
+ function no(t, e) {
2393
2438
  return { item: typeof t == "string" ? void 0 : e };
2394
2439
  }
2395
- const ur = /* @__PURE__ */ H.memo(function() {
2440
+ const ar = /* @__PURE__ */ H.memo(function() {
2396
2441
  const e = M("HeaderComponent"), n = gt("headerHeight"), o = M("HeaderFooterTag"), r = Ht(
2397
2442
  H.useMemo(
2398
2443
  () => (i) => {
2399
- n(wt(i, "height"));
2444
+ n(vt(i, "height"));
2400
2445
  },
2401
2446
  [n]
2402
2447
  ),
2403
2448
  !0,
2404
2449
  M("skipAnimationFrameInResizeObserver")
2405
2450
  ), s = M("context");
2406
- return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...q(e, s) }) }) : null;
2407
- }), ar = /* @__PURE__ */ H.memo(function() {
2451
+ return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...Z(e, s) }) }) : null;
2452
+ }), dr = /* @__PURE__ */ H.memo(function() {
2408
2453
  const e = M("FooterComponent"), n = gt("footerHeight"), o = M("HeaderFooterTag"), r = Ht(
2409
2454
  H.useMemo(
2410
2455
  () => (i) => {
2411
- n(wt(i, "height"));
2456
+ n(vt(i, "height"));
2412
2457
  },
2413
2458
  [n]
2414
2459
  ),
2415
2460
  !0,
2416
2461
  M("skipAnimationFrameInResizeObserver")
2417
2462
  ), s = M("context");
2418
- return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...q(e, s) }) }) : null;
2463
+ return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...Z(e, s) }) }) : null;
2419
2464
  });
2420
- function Xe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2421
- return H.memo(function({ children: s, style: i, ...l }) {
2422
- const c = n("scrollContainerState"), a = e("ScrollerComponent"), p = n("smoothScrollTargetReached"), S = e("scrollerRef"), g = e("context"), h = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: v, scrollToCallback: m } = Jn(
2423
- c,
2424
- p,
2465
+ function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2466
+ return H.memo(function({ children: s, style: i, context: l, ...c }) {
2467
+ const a = n("scrollContainerState"), m = e("ScrollerComponent"), x = n("smoothScrollTargetReached"), h = e("scrollerRef"), I = e("horizontalDirection") || !1, { scrollByCallback: C, scrollerRef: v, scrollToCallback: g } = to(
2425
2468
  a,
2426
- S,
2469
+ x,
2470
+ m,
2471
+ h,
2427
2472
  void 0,
2428
- h
2473
+ I
2429
2474
  );
2430
- return t("scrollTo", m), t("scrollBy", w), /* @__PURE__ */ z(
2431
- a,
2475
+ return t("scrollTo", g), t("scrollBy", C), /* @__PURE__ */ P(
2476
+ m,
2432
2477
  {
2433
2478
  "data-testid": "virtuoso-scroller",
2434
2479
  "data-virtuoso-scroller": !0,
2435
2480
  ref: v,
2436
- style: { ...h ? lr : ir, ...i },
2481
+ style: { ...I ? cr : lr, ...i },
2437
2482
  tabIndex: 0,
2438
- ...l,
2439
- ...q(a, g),
2483
+ ...c,
2484
+ ...Z(m, l),
2440
2485
  children: s
2441
2486
  }
2442
2487
  );
2443
2488
  });
2444
2489
  }
2445
- function Je({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2446
- return H.memo(function({ children: s, style: i, ...l }) {
2447
- const c = n("windowScrollContainerState"), a = e("ScrollerComponent"), p = n("smoothScrollTargetReached"), S = e("totalListHeight"), g = e("deviation"), h = e("customScrollParent"), w = e("context"), v = H.useRef(null), m = e("scrollerRef"), { scrollByCallback: d, scrollerRef: u, scrollToCallback: T } = Jn(
2448
- c,
2449
- p,
2490
+ function Qe({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
2491
+ return H.memo(function({ children: s, style: i, context: l, ...c }) {
2492
+ const a = n("windowScrollContainerState"), m = e("ScrollerComponent"), x = n("smoothScrollTargetReached"), h = e("totalListHeight"), I = e("deviation"), C = e("customScrollParent"), v = H.useRef(null), g = e("scrollerRef"), { scrollByCallback: p, scrollerRef: u, scrollToCallback: T } = to(
2450
2493
  a,
2494
+ x,
2451
2495
  m,
2452
- h
2496
+ g,
2497
+ C
2453
2498
  );
2454
- return Xn(() => {
2455
- var R;
2456
- return u.current = h || ((R = v.current) == null ? void 0 : R.ownerDocument.defaultView), () => {
2499
+ return Qn(() => {
2500
+ var b;
2501
+ return u.current = C || ((b = v.current) == null ? void 0 : b.ownerDocument.defaultView), () => {
2457
2502
  u.current = null;
2458
2503
  };
2459
- }, [u, h]), t("windowScrollTo", T), t("scrollBy", d), /* @__PURE__ */ z(
2460
- a,
2504
+ }, [u, C]), t("windowScrollTo", T), t("scrollBy", p), /* @__PURE__ */ P(
2505
+ m,
2461
2506
  {
2462
2507
  ref: v,
2463
2508
  "data-virtuoso-scroller": !0,
2464
- style: { position: "relative", ...i, ...S !== 0 ? { height: S + g } : {} },
2465
- ...l,
2466
- ...q(a, w),
2509
+ style: { position: "relative", ...i, ...h !== 0 ? { height: h + I } : {} },
2510
+ ...c,
2511
+ ...Z(m, l),
2467
2512
  children: s
2468
2513
  }
2469
2514
  );
2470
2515
  });
2471
2516
  }
2472
- const dr = ({ children: t }) => {
2517
+ const fr = ({ children: t }) => {
2473
2518
  const e = H.useContext(be), n = gt("viewportHeight"), o = gt("fixedItemHeight"), r = M("alignToBottom"), s = M("horizontalDirection"), i = H.useMemo(
2474
- () => ne(n, (c) => wt(c, s ? "width" : "height")),
2519
+ () => ne(n, (c) => vt(c, s ? "width" : "height")),
2475
2520
  [n, s]
2476
2521
  ), l = Ht(i, !0, M("skipAnimationFrameInResizeObserver"));
2477
2522
  return H.useEffect(() => {
2478
2523
  e && (n(e.viewportHeight), o(e.itemHeight));
2479
- }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "element", ref: l, style: Zt(r), children: t });
2480
- }, fr = ({ children: t }) => {
2481
- const e = H.useContext(be), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s = _e(
2524
+ }, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "element", ref: l, style: Zt(r), children: t });
2525
+ }, mr = ({ children: t }) => {
2526
+ const e = H.useContext(be), n = gt("windowViewportRect"), o = gt("fixedItemHeight"), r = M("customScrollParent"), s = Ne(
2482
2527
  n,
2483
2528
  r,
2484
2529
  M("skipAnimationFrameInResizeObserver")
2485
2530
  ), i = M("alignToBottom");
2486
2531
  return H.useEffect(() => {
2487
2532
  e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2488
- }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "window", ref: s, style: Zt(i), children: t });
2489
- }, mr = ({ children: t }) => {
2490
- const e = M("TopItemListComponent") || "div", n = M("headerHeight"), o = { ...cr, marginTop: `${n}px` }, r = M("context");
2491
- return /* @__PURE__ */ z(e, { style: o, ...q(e, r), children: t });
2492
- }, pr = /* @__PURE__ */ H.memo(function(e) {
2493
- const n = M("useWindowScroll"), o = M("topItemsIndexes").length > 0, r = M("customScrollParent"), s = M("context"), i = r || n ? gr : hr, l = r || n ? fr : dr;
2494
- return /* @__PURE__ */ Nt(i, { ...e, ...q(i, s), children: [
2495
- o && /* @__PURE__ */ z(mr, { children: /* @__PURE__ */ z(Cn, { showTopList: !0 }) }),
2496
- /* @__PURE__ */ Nt(l, { children: [
2497
- /* @__PURE__ */ z(ur, {}),
2498
- /* @__PURE__ */ z(Cn, {}),
2499
- /* @__PURE__ */ z(ar, {})
2533
+ }, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "window", ref: s, style: Zt(i), children: t });
2534
+ }, pr = ({ children: t }) => {
2535
+ const e = M("TopItemListComponent") || "div", n = M("headerHeight"), o = { ...ur, marginTop: `${n}px` }, r = M("context");
2536
+ return /* @__PURE__ */ P(e, { style: o, ...Z(e, r), children: t });
2537
+ }, hr = /* @__PURE__ */ H.memo(function(e) {
2538
+ const n = M("useWindowScroll"), o = M("topItemsIndexes").length > 0, r = M("customScrollParent"), s = M("context");
2539
+ return /* @__PURE__ */ Nt(r || n ? Ir : gr, { ...e, context: s, children: [
2540
+ o && /* @__PURE__ */ P(pr, { children: /* @__PURE__ */ P(Cn, { showTopList: !0 }) }),
2541
+ /* @__PURE__ */ Nt(r || n ? mr : fr, { children: [
2542
+ /* @__PURE__ */ P(ar, {}),
2543
+ /* @__PURE__ */ P(Cn, {}),
2544
+ /* @__PURE__ */ P(dr, {})
2500
2545
  ] })
2501
2546
  ] });
2502
2547
  }), {
2503
- Component: eo,
2504
- useEmitter: Qe,
2548
+ Component: oo,
2549
+ useEmitter: tn,
2505
2550
  useEmitterValue: M,
2506
2551
  usePublisher: gt
2507
- } = /* @__PURE__ */ qe(
2508
- nr,
2552
+ } = /* @__PURE__ */ Ye(
2553
+ or,
2509
2554
  {
2510
2555
  required: {},
2511
2556
  optional: {
2512
2557
  restoreStateFrom: "restoreStateFrom",
2513
2558
  context: "context",
2514
2559
  followOutput: "followOutput",
2560
+ scrollIntoViewOnChange: "scrollIntoViewOnChange",
2515
2561
  itemContent: "itemContent",
2516
2562
  groupContent: "groupContent",
2517
2563
  overscan: "overscan",
@@ -2561,21 +2607,21 @@ const dr = ({ children: t }) => {
2561
2607
  groupIndices: "groupIndices"
2562
2608
  }
2563
2609
  },
2564
- pr
2565
- ), hr = /* @__PURE__ */ Xe({ useEmitter: Qe, useEmitterValue: M, usePublisher: gt }), gr = /* @__PURE__ */ Je({ useEmitter: Qe, useEmitterValue: M, usePublisher: gt }), jr = eo, qr = eo, Ir = /* @__PURE__ */ U(() => {
2566
- const t = C((a) => /* @__PURE__ */ Nt("td", { children: [
2610
+ hr
2611
+ ), gr = /* @__PURE__ */ Je({ useEmitter: tn, useEmitterValue: M, usePublisher: gt }), Ir = /* @__PURE__ */ Qe({ useEmitter: tn, useEmitterValue: M, usePublisher: gt }), qr = oo, Yr = oo, Sr = /* @__PURE__ */ U(() => {
2612
+ const t = w((a) => /* @__PURE__ */ Nt("td", { children: [
2567
2613
  "Item $",
2568
2614
  a
2569
- ] })), e = C(null), n = C((a) => /* @__PURE__ */ Nt("td", { colSpan: 1e3, children: [
2615
+ ] })), e = w(null), n = w((a) => /* @__PURE__ */ Nt("td", { colSpan: 1e3, children: [
2570
2616
  "Group ",
2571
2617
  a
2572
- ] })), o = C(null), r = C(null), s = C({}), i = C(Ze), l = C(Yt), c = (a, p = null) => ct(
2573
- x(
2618
+ ] })), o = w(null), r = w(null), s = w({}), i = w(Xe), l = w(Yt), c = (a, m = null) => ct(
2619
+ S(
2574
2620
  s,
2575
- E((S) => S[a]),
2576
- Z()
2621
+ E((x) => x[a]),
2622
+ Y()
2577
2623
  ),
2578
- p
2624
+ m
2579
2625
  );
2580
2626
  return {
2581
2627
  components: s,
@@ -2597,134 +2643,134 @@ const dr = ({ children: t }) => {
2597
2643
  TableRowComponent: c("TableRow", "tr"),
2598
2644
  GroupComponent: c("Group", "tr")
2599
2645
  };
2600
- }), Sr = /* @__PURE__ */ U(
2646
+ }), xr = /* @__PURE__ */ U(
2601
2647
  ([t, e]) => ({ ...t, ...e }),
2602
- X(Yn, Ir)
2603
- ), xr = ({ height: t }) => /* @__PURE__ */ z("tr", { children: /* @__PURE__ */ z("td", { style: { height: t } }) }), Tr = ({ height: t }) => /* @__PURE__ */ z("tr", { children: /* @__PURE__ */ z("td", { style: { border: 0, height: t, padding: 0 } }) }), Cr = { overflowAnchor: "none" }, wn = { position: Ye(), zIndex: 2, overflowAnchor: "none" }, vn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
2604
- const n = W("listState"), o = W("computeItemKey"), r = W("firstItemIndex"), s = W("context"), i = W("isSeeking"), l = W("fixedHeaderHeight"), c = W("groupIndices").length > 0, a = W("itemContent"), p = W("groupContent"), S = W("ScrollSeekPlaceholder") || xr, g = W("GroupComponent"), h = W("TableRowComponent"), w = (e ? n.topItems : []).reduce((m, d, u) => (u === 0 ? m.push(d.size) : m.push(m[u - 1] + d.size), m), []), v = (e ? n.topItems : n.items).map((m) => {
2605
- const d = m.originalIndex, u = o(d + r, m.data, s), T = e ? d === 0 ? 0 : w[d - 1] : 0;
2648
+ X(Xn, Sr)
2649
+ ), Tr = ({ height: t }) => /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", { style: { height: t } }) }), Cr = ({ height: t }) => /* @__PURE__ */ P("tr", { children: /* @__PURE__ */ P("td", { style: { border: 0, height: t, padding: 0 } }) }), wr = { overflowAnchor: "none" }, wn = { position: Ze(), zIndex: 2, overflowAnchor: "none" }, vn = /* @__PURE__ */ H.memo(function({ showTopList: e = !1 }) {
2650
+ const n = W("listState"), o = W("computeItemKey"), r = W("firstItemIndex"), s = W("context"), i = W("isSeeking"), l = W("fixedHeaderHeight"), c = W("groupIndices").length > 0, a = W("itemContent"), m = W("groupContent"), x = W("ScrollSeekPlaceholder") || Tr, h = W("GroupComponent"), I = W("TableRowComponent"), C = (e ? n.topItems : []).reduce((g, p, u) => (u === 0 ? g.push(p.size) : g.push(g[u - 1] + p.size), g), []), v = (e ? n.topItems : n.items).map((g) => {
2651
+ const p = g.originalIndex, u = o(p + r, g.data, s), T = e ? p === 0 ? 0 : C[p - 1] : 0;
2606
2652
  return i ? /* @__PURE__ */ _t(
2607
- S,
2653
+ x,
2608
2654
  {
2609
- ...q(S, s),
2610
- height: m.size,
2611
- index: m.index,
2655
+ ...Z(x, s),
2656
+ height: g.size,
2657
+ index: g.index,
2612
2658
  key: u,
2613
- type: m.type || "item"
2659
+ type: g.type || "item"
2614
2660
  }
2615
- ) : m.type === "group" ? /* @__PURE__ */ _t(
2616
- g,
2661
+ ) : g.type === "group" ? /* @__PURE__ */ _t(
2662
+ h,
2617
2663
  {
2618
- ...q(g, s),
2619
- "data-index": d,
2620
- "data-item-index": m.index,
2621
- "data-known-size": m.size,
2664
+ ...Z(h, s),
2665
+ "data-index": p,
2666
+ "data-item-index": g.index,
2667
+ "data-known-size": g.size,
2622
2668
  key: u,
2623
2669
  style: {
2624
2670
  ...wn,
2625
2671
  top: l
2626
2672
  }
2627
2673
  },
2628
- p(m.index, s)
2674
+ m(g.index, s)
2629
2675
  ) : /* @__PURE__ */ _t(
2630
- h,
2676
+ I,
2631
2677
  {
2632
- ...q(h, s),
2633
- ...to(h, m.data),
2634
- "data-index": d,
2635
- "data-item-index": m.index,
2636
- "data-known-size": m.size,
2637
- "data-item-group-index": m.groupIndex,
2678
+ ...Z(I, s),
2679
+ ...no(I, g.data),
2680
+ "data-index": p,
2681
+ "data-item-index": g.index,
2682
+ "data-known-size": g.size,
2683
+ "data-item-group-index": g.groupIndex,
2638
2684
  key: u,
2639
- style: e ? { ...wn, top: l + T } : Cr
2685
+ style: e ? { ...wn, top: l + T } : wr
2640
2686
  },
2641
- c ? a(m.index, m.groupIndex, m.data, s) : a(m.index, m.data, s)
2687
+ c ? a(g.index, g.groupIndex, g.data, s) : a(g.index, g.data, s)
2642
2688
  );
2643
2689
  });
2644
- return /* @__PURE__ */ z(lo, { children: v });
2645
- }), wr = /* @__PURE__ */ H.memo(function() {
2646
- const e = W("listState"), n = W("topItemsIndexes").length > 0, o = Tt("sizeRanges"), r = W("useWindowScroll"), s = W("customScrollParent"), i = Tt("windowScrollContainerState"), l = Tt("scrollContainerState"), c = s || r ? i : l, a = W("trackItemSizes"), p = W("itemSize"), S = W("log"), { callbackRef: g, ref: h } = On(
2690
+ return /* @__PURE__ */ P(uo, { children: v });
2691
+ }), vr = /* @__PURE__ */ H.memo(function() {
2692
+ const e = W("listState"), n = W("topItemsIndexes").length > 0, o = Ct("sizeRanges"), r = W("useWindowScroll"), s = W("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, a = W("trackItemSizes"), m = W("itemSize"), x = W("log"), { callbackRef: h, ref: I } = On(
2647
2693
  o,
2648
- p,
2694
+ m,
2649
2695
  a,
2650
2696
  c,
2651
- S,
2697
+ x,
2652
2698
  void 0,
2653
2699
  s,
2654
2700
  !1,
2655
2701
  W("skipAnimationFrameInResizeObserver")
2656
- ), [w, v] = H.useState(0);
2657
- tn("deviation", (V) => {
2658
- w !== V && (h.current.style.marginTop = `${V}px`, v(V));
2702
+ ), [C, v] = H.useState(0);
2703
+ en("deviation", (z) => {
2704
+ C !== z && (I.current.style.marginTop = `${z}px`, v(z));
2659
2705
  });
2660
- const m = W("EmptyPlaceholder"), d = W("FillerRow") || Tr, u = W("TableBodyComponent"), T = W("paddingTopAddition"), R = W("statefulTotalCount"), I = W("context");
2661
- if (R === 0 && m)
2662
- return /* @__PURE__ */ z(m, { ...q(m, I) });
2663
- const f = (n ? e.topItems : []).reduce((V, D) => V + D.size, 0), b = e.offsetTop + T + w - f, k = e.offsetBottom, F = b > 0 ? /* @__PURE__ */ z(d, { context: I, height: b }, "padding-top") : null, L = k > 0 ? /* @__PURE__ */ z(d, { context: I, height: k }, "padding-bottom") : null;
2664
- return /* @__PURE__ */ Nt(u, { "data-testid": "virtuoso-item-list", ref: g, ...q(u, I), children: [
2665
- F,
2666
- n && /* @__PURE__ */ z(vn, { showTopList: !0 }),
2667
- /* @__PURE__ */ z(vn, {}),
2706
+ const g = W("EmptyPlaceholder"), p = W("FillerRow") || Cr, u = W("TableBodyComponent"), T = W("paddingTopAddition"), b = W("statefulTotalCount"), f = W("context");
2707
+ if (b === 0 && g)
2708
+ return /* @__PURE__ */ P(g, { ...Z(g, f) });
2709
+ const d = (n ? e.topItems : []).reduce((z, _) => z + _.size, 0), y = e.offsetTop + T + C - d, B = e.offsetBottom, k = y > 0 ? /* @__PURE__ */ P(p, { context: f, height: y }, "padding-top") : null, L = B > 0 ? /* @__PURE__ */ P(p, { context: f, height: B }, "padding-bottom") : null;
2710
+ return /* @__PURE__ */ Nt(u, { "data-testid": "virtuoso-item-list", ref: h, ...Z(u, f), children: [
2711
+ k,
2712
+ n && /* @__PURE__ */ P(vn, { showTopList: !0 }),
2713
+ /* @__PURE__ */ P(vn, {}),
2668
2714
  L
2669
2715
  ] });
2670
- }), vr = ({ children: t }) => {
2671
- const e = H.useContext(be), n = Tt("viewportHeight"), o = Tt("fixedItemHeight"), r = Ht(
2672
- H.useMemo(() => ne(n, (s) => wt(s, "height")), [n]),
2716
+ }), yr = ({ children: t }) => {
2717
+ const e = H.useContext(be), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = Ht(
2718
+ H.useMemo(() => ne(n, (s) => vt(s, "height")), [n]),
2673
2719
  !0,
2674
2720
  W("skipAnimationFrameInResizeObserver")
2675
2721
  );
2676
2722
  return H.useEffect(() => {
2677
2723
  e && (n(e.viewportHeight), o(e.itemHeight));
2678
- }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "element", ref: r, style: Zt(!1), children: t });
2679
- }, yr = ({ children: t }) => {
2680
- const e = H.useContext(be), n = Tt("windowViewportRect"), o = Tt("fixedItemHeight"), r = W("customScrollParent"), s = _e(
2724
+ }, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "element", ref: r, style: Zt(!1), children: t });
2725
+ }, Rr = ({ children: t }) => {
2726
+ const e = H.useContext(be), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = W("customScrollParent"), s = Ne(
2681
2727
  n,
2682
2728
  r,
2683
2729
  W("skipAnimationFrameInResizeObserver")
2684
2730
  );
2685
2731
  return H.useEffect(() => {
2686
2732
  e && (o(e.itemHeight), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
2687
- }, [e, n, o]), /* @__PURE__ */ z("div", { "data-viewport-type": "window", ref: s, style: Zt(!1), children: t });
2688
- }, Rr = /* @__PURE__ */ H.memo(function(e) {
2689
- const n = W("useWindowScroll"), o = W("customScrollParent"), r = Tt("fixedHeaderHeight"), s = Tt("fixedFooterHeight"), i = W("fixedHeaderContent"), l = W("fixedFooterContent"), c = W("context"), a = Ht(
2690
- H.useMemo(() => ne(r, (u) => wt(u, "height")), [r]),
2733
+ }, [e, n, o]), /* @__PURE__ */ P("div", { "data-viewport-type": "window", ref: s, style: Zt(!1), children: t });
2734
+ }, br = /* @__PURE__ */ H.memo(function(e) {
2735
+ const n = W("useWindowScroll"), o = W("customScrollParent"), r = Ct("fixedHeaderHeight"), s = Ct("fixedFooterHeight"), i = W("fixedHeaderContent"), l = W("fixedFooterContent"), c = W("context"), a = Ht(
2736
+ H.useMemo(() => ne(r, (u) => vt(u, "height")), [r]),
2691
2737
  !0,
2692
2738
  W("skipAnimationFrameInResizeObserver")
2693
- ), p = Ht(
2694
- H.useMemo(() => ne(s, (u) => wt(u, "height")), [s]),
2739
+ ), m = Ht(
2740
+ H.useMemo(() => ne(s, (u) => vt(u, "height")), [s]),
2695
2741
  !0,
2696
2742
  W("skipAnimationFrameInResizeObserver")
2697
- ), S = o || n ? Hr : br, g = o || n ? yr : vr, h = W("TableComponent"), w = W("TableHeadComponent"), v = W("TableFooterComponent"), m = i ? /* @__PURE__ */ z(
2698
- w,
2743
+ ), x = o || n ? Er : Hr, h = o || n ? Rr : yr, I = W("TableComponent"), C = W("TableHeadComponent"), v = W("TableFooterComponent"), g = i ? /* @__PURE__ */ P(
2744
+ C,
2699
2745
  {
2700
2746
  ref: a,
2701
2747
  style: { position: "sticky", top: 0, zIndex: 2 },
2702
- ...q(w, c),
2748
+ ...Z(C, c),
2703
2749
  children: i()
2704
2750
  },
2705
2751
  "TableHead"
2706
- ) : null, d = l ? /* @__PURE__ */ z(
2752
+ ) : null, p = l ? /* @__PURE__ */ P(
2707
2753
  v,
2708
2754
  {
2709
- ref: p,
2755
+ ref: m,
2710
2756
  style: { bottom: 0, position: "sticky", zIndex: 1 },
2711
- ...q(v, c),
2757
+ ...Z(v, c),
2712
2758
  children: l()
2713
2759
  },
2714
2760
  "TableFoot"
2715
2761
  ) : null;
2716
- return /* @__PURE__ */ z(S, { ...e, ...q(S, c), children: /* @__PURE__ */ z(g, { children: /* @__PURE__ */ Nt(h, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...q(h, c), children: [
2717
- m,
2718
- /* @__PURE__ */ z(wr, {}, "TableBody"),
2719
- d
2762
+ return /* @__PURE__ */ P(x, { ...e, ...Z(x, c), children: /* @__PURE__ */ P(h, { children: /* @__PURE__ */ Nt(I, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...Z(I, c), children: [
2763
+ g,
2764
+ /* @__PURE__ */ P(vr, {}, "TableBody"),
2765
+ p
2720
2766
  ] }) }) });
2721
2767
  }), {
2722
- Component: no,
2723
- useEmitter: tn,
2768
+ Component: ro,
2769
+ useEmitter: en,
2724
2770
  useEmitterValue: W,
2725
- usePublisher: Tt
2726
- } = /* @__PURE__ */ qe(
2727
- Sr,
2771
+ usePublisher: Ct
2772
+ } = /* @__PURE__ */ Ye(
2773
+ xr,
2728
2774
  {
2729
2775
  required: {},
2730
2776
  optional: {
@@ -2778,8 +2824,8 @@ const dr = ({ children: t }) => {
2778
2824
  groupIndices: "groupIndices"
2779
2825
  }
2780
2826
  },
2781
- Rr
2782
- ), br = /* @__PURE__ */ Xe({ useEmitter: tn, useEmitterValue: W, usePublisher: Tt }), Hr = /* @__PURE__ */ Je({ useEmitter: tn, useEmitterValue: W, usePublisher: Tt }), Yr = no, Zr = no, yn = {
2827
+ br
2828
+ ), Hr = /* @__PURE__ */ Je({ useEmitter: en, useEmitterValue: W, usePublisher: Ct }), Er = /* @__PURE__ */ Qe({ useEmitter: en, useEmitterValue: W, usePublisher: Ct }), Zr = ro, Xr = ro, yn = {
2783
2829
  bottom: 0,
2784
2830
  itemHeight: 0,
2785
2831
  items: [],
@@ -2787,7 +2833,7 @@ const dr = ({ children: t }) => {
2787
2833
  offsetBottom: 0,
2788
2834
  offsetTop: 0,
2789
2835
  top: 0
2790
- }, Er = {
2836
+ }, Br = {
2791
2837
  bottom: 0,
2792
2838
  itemHeight: 0,
2793
2839
  items: [{ index: 0 }],
@@ -2799,289 +2845,289 @@ const dr = ({ children: t }) => {
2799
2845
  function Hn(t, e, n) {
2800
2846
  return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
2801
2847
  }
2802
- function Br(t) {
2848
+ function kr(t) {
2803
2849
  return {
2804
- ...Er,
2850
+ ...Br,
2805
2851
  items: t
2806
2852
  };
2807
2853
  }
2808
2854
  function he(t, e) {
2809
2855
  return t && t.width === e.width && t.height === e.height;
2810
2856
  }
2811
- function kr(t, e) {
2857
+ function Fr(t, e) {
2812
2858
  return t && t.column === e.column && t.row === e.row;
2813
2859
  }
2814
- const Fr = /* @__PURE__ */ U(
2860
+ const Or = /* @__PURE__ */ U(
2815
2861
  ([
2816
2862
  { increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
2817
- { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached: p, viewportHeight: S },
2818
- g,
2863
+ { footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: a, smoothScrollTargetReached: m, viewportHeight: x },
2819
2864
  h,
2820
- { didMount: w, propsReady: v },
2821
- { customScrollParent: m, useWindowScroll: d, windowScrollContainerState: u, windowScrollTo: T, windowViewportRect: R },
2822
- I
2865
+ I,
2866
+ { didMount: C, propsReady: v },
2867
+ { customScrollParent: g, useWindowScroll: p, windowScrollContainerState: u, windowScrollTo: T, windowViewportRect: b },
2868
+ f
2823
2869
  ]) => {
2824
- const f = C(0), b = C(0), k = C(yn), F = C({ height: 0, width: 0 }), L = C({ height: 0, width: 0 }), V = $(), D = $(), J = C(0), nt = C(null), B = C({ column: 0, row: 0 }), Y = $(), it = $(), dt = C(!1), St = C(0), ft = C(!0), ut = C(!1), At = C(!1);
2870
+ const d = w(0), y = w(0), B = w(yn), k = w({ height: 0, width: 0 }), L = w({ height: 0, width: 0 }), z = $(), _ = $(), J = w(0), nt = w(null), F = w({ column: 0, row: 0 }), q = $(), it = $(), dt = w(!1), St = w(0), ft = w(!0), ut = w(!1), At = w(!1);
2825
2871
  K(
2826
- x(
2827
- w,
2828
- _(St),
2829
- P(([y, N]) => !!N)
2872
+ S(
2873
+ C,
2874
+ N(St),
2875
+ A(([R, D]) => !!D)
2830
2876
  ),
2831
2877
  () => {
2832
2878
  G(ft, !1);
2833
2879
  }
2834
2880
  ), K(
2835
- x(
2836
- rt(w, ft, L, F, St, ut),
2837
- P(([y, N, Q, lt, , tt]) => y && !N && Q.height !== 0 && lt.height !== 0 && !tt)
2881
+ S(
2882
+ rt(C, ft, L, k, St, ut),
2883
+ A(([R, D, Q, lt, , tt]) => R && !D && Q.height !== 0 && lt.height !== 0 && !tt)
2838
2884
  ),
2839
- ([, , , , y]) => {
2840
- G(ut, !0), $e(1, () => {
2841
- G(V, y);
2842
- }), bt(x(a), () => {
2885
+ ([, , , , R]) => {
2886
+ G(ut, !0), Ue(1, () => {
2887
+ G(z, R);
2888
+ }), Tt(S(a), () => {
2843
2889
  G(e, [0, 0]), G(ft, !0);
2844
2890
  });
2845
2891
  }
2846
2892
  ), O(
2847
- x(
2893
+ S(
2848
2894
  it,
2849
- P((y) => y != null && y.scrollTop > 0),
2850
- yt(0)
2895
+ A((R) => R != null && R.scrollTop > 0),
2896
+ Rt(0)
2851
2897
  ),
2852
- b
2898
+ y
2853
2899
  ), K(
2854
- x(
2855
- w,
2856
- _(it),
2857
- P(([, y]) => y != null)
2900
+ S(
2901
+ C,
2902
+ N(it),
2903
+ A(([, R]) => R != null)
2858
2904
  ),
2859
- ([, y]) => {
2860
- y && (G(F, y.viewport), G(L, y.item), G(B, y.gap), y.scrollTop > 0 && (G(dt, !0), bt(x(a, jt(1)), (N) => {
2905
+ ([, R]) => {
2906
+ R && (G(k, R.viewport), G(L, R.item), G(F, R.gap), R.scrollTop > 0 && (G(dt, !0), Tt(S(a, Dt(1)), (D) => {
2861
2907
  G(dt, !1);
2862
- }), G(c, { top: y.scrollTop })));
2908
+ }), G(c, { top: R.scrollTop })));
2863
2909
  }
2864
2910
  ), O(
2865
- x(
2866
- F,
2867
- E(({ height: y }) => y)
2911
+ S(
2912
+ k,
2913
+ E(({ height: R }) => R)
2868
2914
  ),
2869
- S
2915
+ x
2870
2916
  ), O(
2871
- x(
2917
+ S(
2872
2918
  rt(
2873
- A(F, he),
2874
- A(L, he),
2875
- A(B, (y, N) => y && y.column === N.column && y.row === N.row),
2876
- A(a)
2919
+ V(k, he),
2920
+ V(L, he),
2921
+ V(F, (R, D) => R && R.column === D.column && R.row === D.row),
2922
+ V(a)
2877
2923
  ),
2878
- E(([y, N, Q, lt]) => ({
2924
+ E(([R, D, Q, lt]) => ({
2879
2925
  gap: Q,
2880
- item: N,
2926
+ item: D,
2881
2927
  scrollTop: lt,
2882
- viewport: y
2928
+ viewport: R
2883
2929
  }))
2884
2930
  ),
2885
- Y
2931
+ q
2886
2932
  ), O(
2887
- x(
2933
+ S(
2888
2934
  rt(
2889
- A(f),
2935
+ V(d),
2890
2936
  o,
2891
- A(B, kr),
2892
- A(L, he),
2893
- A(F, he),
2894
- A(nt),
2895
- A(b),
2896
- A(dt),
2897
- A(ft),
2898
- A(St)
2937
+ V(F, Fr),
2938
+ V(L, he),
2939
+ V(k, he),
2940
+ V(nt),
2941
+ V(y),
2942
+ V(dt),
2943
+ V(ft),
2944
+ V(St)
2899
2945
  ),
2900
- P(([, , , , , , , y]) => !y),
2946
+ A(([, , , , , , , R]) => !R),
2901
2947
  E(
2902
2948
  ([
2903
- y,
2904
- [N, Q],
2949
+ R,
2950
+ [D, Q],
2905
2951
  lt,
2906
2952
  tt,
2907
- kt,
2953
+ Ft,
2908
2954
  Jt,
2909
- $t,
2955
+ Ut,
2910
2956
  ,
2911
2957
  de,
2912
- Ft
2958
+ Ot
2913
2959
  ]) => {
2914
- const { column: Ot, row: Qt } = lt, { height: fe, width: He } = tt, { width: en } = kt;
2915
- if ($t === 0 && (y === 0 || en === 0))
2960
+ const { column: Lt, row: Qt } = lt, { height: fe, width: He } = tt, { width: nn } = Ft;
2961
+ if (Ut === 0 && (R === 0 || nn === 0))
2916
2962
  return yn;
2917
2963
  if (He === 0) {
2918
- const ln = Ue(Ft, y), io = ln + Math.max($t - 1, 0);
2919
- return Br(Hn(ln, io, Jt));
2964
+ const cn = Ke(Ot, R), co = cn + Math.max(Ut - 1, 0);
2965
+ return kr(Hn(cn, co, Jt));
2920
2966
  }
2921
- const me = oo(en, He, Ot);
2922
- let Ut, Wt;
2923
- de ? N === 0 && Q === 0 && $t > 0 ? (Ut = 0, Wt = $t - 1) : (Ut = me * Ce((N + Qt) / (fe + Qt)), Wt = me * Rn((Q + Qt) / (fe + Qt)) - 1, Wt = Oe(y - 1, ee(Wt, me - 1)), Ut = Oe(Wt, ee(0, Ut))) : (Ut = 0, Wt = -1);
2924
- const nn = Hn(Ut, Wt, Jt), { bottom: on, top: rn } = En(kt, lt, tt, nn), sn = Rn(y / me), so = sn * fe + (sn - 1) * Qt - on;
2925
- return { bottom: on, itemHeight: fe, items: nn, itemWidth: He, offsetBottom: so, offsetTop: rn, top: rn };
2967
+ const me = so(nn, He, Lt);
2968
+ let Kt, Wt;
2969
+ de ? D === 0 && Q === 0 && Ut > 0 ? (Kt = 0, Wt = Ut - 1) : (Kt = me * Ce((D + Qt) / (fe + Qt)), Wt = me * Rn((Q + Qt) / (fe + Qt)) - 1, Wt = Oe(R - 1, ee(Wt, me - 1)), Kt = Oe(Wt, ee(0, Kt))) : (Kt = 0, Wt = -1);
2970
+ const on = Hn(Kt, Wt, Jt), { bottom: rn, top: sn } = En(Ft, lt, tt, on), ln = Rn(R / me), lo = ln * fe + (ln - 1) * Qt - rn;
2971
+ return { bottom: rn, itemHeight: fe, items: on, itemWidth: He, offsetBottom: lo, offsetTop: sn, top: sn };
2926
2972
  }
2927
2973
  )
2928
2974
  ),
2929
- k
2975
+ B
2930
2976
  ), O(
2931
- x(
2977
+ S(
2932
2978
  nt,
2933
- P((y) => y !== null),
2934
- E((y) => y.length)
2979
+ A((R) => R !== null),
2980
+ E((R) => R.length)
2935
2981
  ),
2936
- f
2982
+ d
2937
2983
  ), O(
2938
- x(
2939
- rt(F, L, k, B),
2940
- P(([y, N, { items: Q }]) => Q.length > 0 && N.height !== 0 && y.height !== 0),
2941
- E(([y, N, { items: Q }, lt]) => {
2942
- const { bottom: tt, top: kt } = En(y, lt, N, Q);
2943
- return [kt, tt];
2984
+ S(
2985
+ rt(k, L, B, F),
2986
+ A(([R, D, { items: Q }]) => Q.length > 0 && D.height !== 0 && R.height !== 0),
2987
+ E(([R, D, { items: Q }, lt]) => {
2988
+ const { bottom: tt, top: Ft } = En(R, lt, D, Q);
2989
+ return [Ft, tt];
2944
2990
  }),
2945
- Z(se)
2991
+ Y(se)
2946
2992
  ),
2947
2993
  e
2948
2994
  );
2949
- const xt = C(!1);
2995
+ const xt = w(!1);
2950
2996
  O(
2951
- x(
2997
+ S(
2952
2998
  a,
2953
- _(xt),
2954
- E(([y, N]) => N || y !== 0)
2999
+ N(xt),
3000
+ E(([R, D]) => D || R !== 0)
2955
3001
  ),
2956
3002
  xt
2957
3003
  );
2958
3004
  const Xt = ht(
2959
- x(
2960
- rt(k, f),
2961
- P(([{ items: y }]) => y.length > 0),
2962
- _(xt),
2963
- P(([[y, N], Q]) => {
2964
- const tt = y.items[y.items.length - 1].index === N - 1;
2965
- return (Q || y.bottom > 0 && y.itemHeight > 0 && y.offsetBottom === 0 && y.items.length === N) && tt;
3005
+ S(
3006
+ rt(B, d),
3007
+ A(([{ items: R }]) => R.length > 0),
3008
+ N(xt),
3009
+ A(([[R, D], Q]) => {
3010
+ const tt = R.items[R.items.length - 1].index === D - 1;
3011
+ return (Q || R.bottom > 0 && R.itemHeight > 0 && R.offsetBottom === 0 && R.items.length === D) && tt;
2966
3012
  }),
2967
- E(([[, y]]) => y - 1),
2968
- Z()
3013
+ E(([[, R]]) => R - 1),
3014
+ Y()
2969
3015
  )
2970
3016
  ), Mt = ht(
2971
- x(
2972
- A(k),
2973
- P(({ items: y }) => y.length > 0 && y[0].index === 0),
2974
- yt(0),
2975
- Z()
3017
+ S(
3018
+ V(B),
3019
+ A(({ items: R }) => R.length > 0 && R[0].index === 0),
3020
+ Rt(0),
3021
+ Y()
2976
3022
  )
2977
- ), vt = ht(
2978
- x(
2979
- A(k),
2980
- _(dt),
2981
- P(([{ items: y }, N]) => y.length > 0 && !N),
2982
- E(([{ items: y }]) => ({
2983
- endIndex: y[y.length - 1].index,
2984
- startIndex: y[0].index
3023
+ ), yt = ht(
3024
+ S(
3025
+ V(B),
3026
+ N(dt),
3027
+ A(([{ items: R }, D]) => R.length > 0 && !D),
3028
+ E(([{ items: R }]) => ({
3029
+ endIndex: R[R.length - 1].index,
3030
+ startIndex: R[0].index
2985
3031
  })),
2986
- Z(Mn),
2987
- Lt(0)
3032
+ Y(Mn),
3033
+ kt(0)
2988
3034
  )
2989
3035
  );
2990
- O(vt, h.scrollSeekRangeChanged), O(
2991
- x(
2992
- V,
2993
- _(F, L, f, B),
2994
- E(([y, N, Q, lt, tt]) => {
2995
- const kt = Dn(y), { align: Jt, behavior: $t, offset: de } = kt;
2996
- let Ft = kt.index;
2997
- Ft === "LAST" && (Ft = lt - 1), Ft = ee(0, Ft, Oe(lt - 1, Ft));
2998
- let Ot = Ae(N, tt, Q, Ft);
2999
- return Jt === "end" ? Ot = bn(Ot - N.height + Q.height) : Jt === "center" && (Ot = bn(Ot - N.height / 2 + Q.height / 2)), de && (Ot += de), { behavior: $t, top: Ot };
3036
+ O(yt, I.scrollSeekRangeChanged), O(
3037
+ S(
3038
+ z,
3039
+ N(k, L, d, F),
3040
+ E(([R, D, Q, lt, tt]) => {
3041
+ const Ft = Dn(R), { align: Jt, behavior: Ut, offset: de } = Ft;
3042
+ let Ot = Ft.index;
3043
+ Ot === "LAST" && (Ot = lt - 1), Ot = ee(0, Ot, Oe(lt - 1, Ot));
3044
+ let Lt = Me(D, tt, Q, Ot);
3045
+ return Jt === "end" ? Lt = bn(Lt - D.height + Q.height) : Jt === "center" && (Lt = bn(Lt - D.height / 2 + Q.height / 2)), de && (Lt += de), { behavior: Ut, top: Lt };
3000
3046
  })
3001
3047
  ),
3002
3048
  c
3003
3049
  );
3004
3050
  const Bt = ct(
3005
- x(
3006
- k,
3007
- E((y) => y.offsetBottom + y.bottom)
3051
+ S(
3052
+ B,
3053
+ E((R) => R.offsetBottom + R.bottom)
3008
3054
  ),
3009
3055
  0
3010
3056
  );
3011
3057
  return O(
3012
- x(
3013
- R,
3014
- E((y) => ({ height: y.visibleHeight, width: y.visibleWidth }))
3058
+ S(
3059
+ b,
3060
+ E((R) => ({ height: R.visibleHeight, width: R.visibleWidth }))
3015
3061
  ),
3016
- F
3062
+ k
3017
3063
  ), {
3018
- customScrollParent: m,
3064
+ customScrollParent: g,
3019
3065
  // input
3020
3066
  data: nt,
3021
3067
  deviation: J,
3022
3068
  footerHeight: r,
3023
- gap: B,
3069
+ gap: F,
3024
3070
  headerHeight: s,
3025
3071
  increaseViewportBy: t,
3026
- initialItemCount: b,
3072
+ initialItemCount: y,
3027
3073
  itemDimensions: L,
3028
3074
  overscan: n,
3029
3075
  restoreStateFrom: it,
3030
3076
  scrollBy: i,
3031
3077
  scrollContainerState: l,
3032
- scrollHeight: D,
3078
+ scrollHeight: _,
3033
3079
  scrollTo: c,
3034
- scrollToIndex: V,
3080
+ scrollToIndex: z,
3035
3081
  scrollTop: a,
3036
- smoothScrollTargetReached: p,
3037
- totalCount: f,
3038
- useWindowScroll: d,
3039
- viewportDimensions: F,
3082
+ smoothScrollTargetReached: m,
3083
+ totalCount: d,
3084
+ useWindowScroll: p,
3085
+ viewportDimensions: k,
3040
3086
  windowScrollContainerState: u,
3041
3087
  windowScrollTo: T,
3042
- windowViewportRect: R,
3043
- ...h,
3088
+ windowViewportRect: b,
3089
+ ...I,
3044
3090
  // output
3045
- gridState: k,
3091
+ gridState: B,
3046
3092
  horizontalDirection: At,
3047
3093
  initialTopMostItemIndex: St,
3048
3094
  totalListHeight: Bt,
3049
- ...g,
3095
+ ...h,
3050
3096
  endReached: Xt,
3051
3097
  propsReady: v,
3052
- rangeChanged: vt,
3098
+ rangeChanged: yt,
3053
3099
  startReached: Mt,
3054
- stateChanged: Y,
3100
+ stateChanged: q,
3055
3101
  stateRestoreInProgress: dt,
3056
- ...I
3102
+ ...f
3057
3103
  };
3058
3104
  },
3059
- X(Ke, at, ae, jn, Pt, je, Vt)
3105
+ X(je, at, ae, Yn, Pt, qe, Vt)
3060
3106
  );
3061
- function oo(t, e, n) {
3107
+ function so(t, e, n) {
3062
3108
  return ee(1, Ce((t + n) / (Ce(e) + n)));
3063
3109
  }
3064
3110
  function En(t, e, n, o) {
3065
3111
  const { height: r } = n;
3066
3112
  if (r === void 0 || o.length === 0)
3067
3113
  return { bottom: 0, top: 0 };
3068
- const s = Ae(t, e, n, o[0].index);
3069
- return { bottom: Ae(t, e, n, o[o.length - 1].index) + r, top: s };
3114
+ const s = Me(t, e, n, o[0].index);
3115
+ return { bottom: Me(t, e, n, o[o.length - 1].index) + r, top: s };
3070
3116
  }
3071
- function Ae(t, e, n, o) {
3072
- const r = oo(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + ee(0, s - 1) * e.row;
3117
+ function Me(t, e, n, o) {
3118
+ const r = so(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + ee(0, s - 1) * e.row;
3073
3119
  return i > 0 ? i + e.row : i;
3074
3120
  }
3075
- const Or = /* @__PURE__ */ U(() => {
3076
- const t = C((S) => `Item ${S}`), e = C({}), n = C(null), o = C("virtuoso-grid-item"), r = C("virtuoso-grid-list"), s = C(Ze), i = C("div"), l = C(Yt), c = (S, g = null) => ct(
3077
- x(
3121
+ const Lr = /* @__PURE__ */ U(() => {
3122
+ const t = w((x) => `Item ${x}`), e = w({}), n = w(null), o = w("virtuoso-grid-item"), r = w("virtuoso-grid-list"), s = w(Xe), i = w("div"), l = w(Yt), c = (x, h = null) => ct(
3123
+ S(
3078
3124
  e,
3079
- E((h) => h[S]),
3080
- Z()
3125
+ E((I) => I[x]),
3126
+ Y()
3081
3127
  ),
3082
- g
3083
- ), a = C(!1), p = C(!1);
3084
- return O(A(p), a), {
3128
+ h
3129
+ ), a = w(!1), m = w(!1);
3130
+ return O(V(m), a), {
3085
3131
  components: e,
3086
3132
  computeItemKey: s,
3087
3133
  context: n,
@@ -3094,51 +3140,51 @@ const Or = /* @__PURE__ */ U(() => {
3094
3140
  listClassName: r,
3095
3141
  ListComponent: c("List", "div"),
3096
3142
  readyStateChanged: a,
3097
- reportReadyState: p,
3143
+ reportReadyState: m,
3098
3144
  ScrollerComponent: c("Scroller", "div"),
3099
3145
  scrollerRef: l,
3100
3146
  ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
3101
3147
  };
3102
- }), Lr = /* @__PURE__ */ U(
3148
+ }), zr = /* @__PURE__ */ U(
3103
3149
  ([t, e]) => ({ ...t, ...e }),
3104
- X(Fr, Or)
3105
- ), zr = /* @__PURE__ */ H.memo(function() {
3106
- const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = It("scrollHeight"), c = et("ItemComponent"), a = et("ListComponent"), p = et("ScrollSeekPlaceholder"), S = et("context"), g = It("itemDimensions"), h = It("gap"), w = et("log"), v = et("stateRestoreInProgress"), m = It("reportReadyState"), d = Ht(
3150
+ X(Or, Lr)
3151
+ ), Vr = /* @__PURE__ */ H.memo(function() {
3152
+ const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = It("scrollHeight"), c = et("ItemComponent"), a = et("ListComponent"), m = et("ScrollSeekPlaceholder"), x = et("context"), h = It("itemDimensions"), I = It("gap"), C = et("log"), v = et("stateRestoreInProgress"), g = It("reportReadyState"), p = Ht(
3107
3153
  H.useMemo(
3108
3154
  () => (u) => {
3109
3155
  const T = u.parentElement.parentElement.scrollHeight;
3110
3156
  l(T);
3111
- const R = u.firstChild;
3112
- if (R) {
3113
- const { height: I, width: f } = R.getBoundingClientRect();
3114
- g({ height: I, width: f });
3157
+ const b = u.firstChild;
3158
+ if (b) {
3159
+ const { height: f, width: d } = b.getBoundingClientRect();
3160
+ h({ height: f, width: d });
3115
3161
  }
3116
- h({
3117
- column: Bn("column-gap", getComputedStyle(u).columnGap, w),
3118
- row: Bn("row-gap", getComputedStyle(u).rowGap, w)
3162
+ I({
3163
+ column: Bn("column-gap", getComputedStyle(u).columnGap, C),
3164
+ row: Bn("row-gap", getComputedStyle(u).rowGap, C)
3119
3165
  });
3120
3166
  },
3121
- [l, g, h, w]
3167
+ [l, h, I, C]
3122
3168
  ),
3123
3169
  !0,
3124
3170
  !1
3125
3171
  );
3126
- return Xn(() => {
3127
- e.itemHeight > 0 && e.itemWidth > 0 && m(!0);
3128
- }, [e]), v ? null : /* @__PURE__ */ z(
3172
+ return Qn(() => {
3173
+ e.itemHeight > 0 && e.itemWidth > 0 && g(!0);
3174
+ }, [e]), v ? null : /* @__PURE__ */ P(
3129
3175
  a,
3130
3176
  {
3131
3177
  className: n,
3132
- ref: d,
3133
- ...q(a, S),
3178
+ ref: p,
3179
+ ...Z(a, x),
3134
3180
  "data-testid": "virtuoso-item-list",
3135
3181
  style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
3136
3182
  children: e.items.map((u) => {
3137
- const T = s(u.index, u.data, S);
3138
- return i ? /* @__PURE__ */ z(
3139
- p,
3183
+ const T = s(u.index, u.data, x);
3184
+ return i ? /* @__PURE__ */ P(
3185
+ m,
3140
3186
  {
3141
- ...q(p, S),
3187
+ ...Z(m, x),
3142
3188
  height: e.itemHeight,
3143
3189
  index: u.index,
3144
3190
  width: e.itemWidth
@@ -3147,42 +3193,42 @@ const Or = /* @__PURE__ */ U(() => {
3147
3193
  ) : /* @__PURE__ */ _t(
3148
3194
  c,
3149
3195
  {
3150
- ...q(c, S),
3196
+ ...Z(c, x),
3151
3197
  className: o,
3152
3198
  "data-index": u.index,
3153
3199
  key: T
3154
3200
  },
3155
- r(u.index, u.data, S)
3201
+ r(u.index, u.data, x)
3156
3202
  );
3157
3203
  })
3158
3204
  }
3159
3205
  );
3160
- }), Vr = H.memo(function() {
3206
+ }), Pr = H.memo(function() {
3161
3207
  const e = et("HeaderComponent"), n = It("headerHeight"), o = et("headerFooterTag"), r = Ht(
3162
3208
  H.useMemo(
3163
3209
  () => (i) => {
3164
- n(wt(i, "height"));
3210
+ n(vt(i, "height"));
3165
3211
  },
3166
3212
  [n]
3167
3213
  ),
3168
3214
  !0,
3169
3215
  !1
3170
3216
  ), s = et("context");
3171
- return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...q(e, s) }) }) : null;
3172
- }), Pr = H.memo(function() {
3217
+ return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...Z(e, s) }) }) : null;
3218
+ }), Ar = H.memo(function() {
3173
3219
  const e = et("FooterComponent"), n = It("footerHeight"), o = et("headerFooterTag"), r = Ht(
3174
3220
  H.useMemo(
3175
3221
  () => (i) => {
3176
- n(wt(i, "height"));
3222
+ n(vt(i, "height"));
3177
3223
  },
3178
3224
  [n]
3179
3225
  ),
3180
3226
  !0,
3181
3227
  !1
3182
3228
  ), s = et("context");
3183
- return e ? /* @__PURE__ */ z(o, { ref: r, children: /* @__PURE__ */ z(e, { ...q(e, s) }) }) : null;
3184
- }), Ar = ({ children: t }) => {
3185
- const e = H.useContext(Zn), n = It("itemDimensions"), o = It("viewportDimensions"), r = Ht(
3229
+ return e ? /* @__PURE__ */ P(o, { ref: r, children: /* @__PURE__ */ P(e, { ...Z(e, s) }) }) : null;
3230
+ }), Mr = ({ children: t }) => {
3231
+ const e = H.useContext(Jn), n = It("itemDimensions"), o = It("viewportDimensions"), r = Ht(
3186
3232
  H.useMemo(
3187
3233
  () => (s) => {
3188
3234
  o(s.getBoundingClientRect());
@@ -3194,26 +3240,26 @@ const Or = /* @__PURE__ */ U(() => {
3194
3240
  );
3195
3241
  return H.useEffect(() => {
3196
3242
  e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
3197
- }, [e, o, n]), /* @__PURE__ */ z("div", { ref: r, style: Zt(!1), children: t });
3198
- }, Mr = ({ children: t }) => {
3199
- const e = H.useContext(Zn), n = It("windowViewportRect"), o = It("itemDimensions"), r = et("customScrollParent"), s = _e(n, r, !1);
3243
+ }, [e, o, n]), /* @__PURE__ */ P("div", { ref: r, style: Zt(!1), children: t });
3244
+ }, Wr = ({ children: t }) => {
3245
+ const e = H.useContext(Jn), n = It("windowViewportRect"), o = It("itemDimensions"), r = et("customScrollParent"), s = Ne(n, r, !1);
3200
3246
  return H.useEffect(() => {
3201
3247
  e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
3202
- }, [e, n, o]), /* @__PURE__ */ z("div", { ref: s, style: Zt(!1), children: t });
3203
- }, Wr = /* @__PURE__ */ H.memo(function({ ...e }) {
3204
- const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Nr : _r, s = o || n ? Mr : Ar, i = et("context");
3205
- return /* @__PURE__ */ z(r, { ...e, ...q(r, i), children: /* @__PURE__ */ Nt(s, { children: [
3206
- /* @__PURE__ */ z(Vr, {}),
3207
- /* @__PURE__ */ z(zr, {}),
3208
- /* @__PURE__ */ z(Pr, {})
3248
+ }, [e, n, o]), /* @__PURE__ */ P("div", { ref: s, style: Zt(!1), children: t });
3249
+ }, Gr = /* @__PURE__ */ H.memo(function({ ...e }) {
3250
+ const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Dr : Nr, s = o || n ? Wr : Mr, i = et("context");
3251
+ return /* @__PURE__ */ P(r, { ...e, ...Z(r, i), children: /* @__PURE__ */ Nt(s, { children: [
3252
+ /* @__PURE__ */ P(Pr, {}),
3253
+ /* @__PURE__ */ P(Vr, {}),
3254
+ /* @__PURE__ */ P(Ar, {})
3209
3255
  ] }) });
3210
3256
  }), {
3211
- Component: Gr,
3212
- useEmitter: ro,
3257
+ Component: _r,
3258
+ useEmitter: io,
3213
3259
  useEmitterValue: et,
3214
3260
  usePublisher: It
3215
- } = /* @__PURE__ */ qe(
3216
- Lr,
3261
+ } = /* @__PURE__ */ Ye(
3262
+ zr,
3217
3263
  {
3218
3264
  optional: {
3219
3265
  context: "context",
@@ -3252,19 +3298,19 @@ const Or = /* @__PURE__ */ U(() => {
3252
3298
  readyStateChanged: "readyStateChanged"
3253
3299
  }
3254
3300
  },
3255
- Wr
3256
- ), _r = /* @__PURE__ */ Xe({ useEmitter: ro, useEmitterValue: et, usePublisher: It }), Nr = /* @__PURE__ */ Je({ useEmitter: ro, useEmitterValue: et, usePublisher: It });
3301
+ Gr
3302
+ ), Nr = /* @__PURE__ */ Je({ useEmitter: io, useEmitterValue: et, usePublisher: It }), Dr = /* @__PURE__ */ Qe({ useEmitter: io, useEmitterValue: et, usePublisher: It });
3257
3303
  function Bn(t, e, n) {
3258
3304
  return e !== "normal" && !(e != null && e.endsWith("px")) && n(`${t} was not resolved to pixel value correctly`, e, mt.WARN), e === "normal" ? 0 : parseInt(e != null ? e : "0", 10);
3259
3305
  }
3260
- const Xr = Gr;
3306
+ const Jr = _r;
3261
3307
  export {
3262
- Zr as GroupedTableVirtuoso,
3263
- qr as GroupedVirtuoso,
3308
+ Xr as GroupedTableVirtuoso,
3309
+ Yr as GroupedVirtuoso,
3264
3310
  mt as LogLevel,
3265
- Yr as TableVirtuoso,
3266
- jr as Virtuoso,
3267
- Xr as VirtuosoGrid,
3268
- Zn as VirtuosoGridMockContext,
3311
+ Zr as TableVirtuoso,
3312
+ qr as Virtuoso,
3313
+ Jr as VirtuosoGrid,
3314
+ Jn as VirtuosoGridMockContext,
3269
3315
  be as VirtuosoMockContext
3270
3316
  };