react-virtuoso 4.18.1 → 4.18.3

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