react-virtuoso 4.18.6 → 4.18.8

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