react-virtuoso 4.18.7 → 4.18.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +376 -372
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -48,7 +48,7 @@ function Ne(t) {
|
|
|
48
48
|
function it(t) {
|
|
49
49
|
return t(Wn);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function z(t, e) {
|
|
52
52
|
return Y(t, vo(e, we));
|
|
53
53
|
}
|
|
54
54
|
function yt(t, e) {
|
|
@@ -99,7 +99,7 @@ function x(t, ...e) {
|
|
|
99
99
|
}
|
|
100
100
|
});
|
|
101
101
|
}
|
|
102
|
-
function
|
|
102
|
+
function Ot(t, e) {
|
|
103
103
|
return (n) => (o) => {
|
|
104
104
|
n(e = t(e, o));
|
|
105
105
|
};
|
|
@@ -118,7 +118,7 @@ function zt(t) {
|
|
|
118
118
|
};
|
|
119
119
|
}
|
|
120
120
|
function $(...t) {
|
|
121
|
-
const e =
|
|
121
|
+
const e = Array.from({ length: t.length });
|
|
122
122
|
let n = 0, o = null;
|
|
123
123
|
const r = 2 ** t.length - 1;
|
|
124
124
|
return t.forEach((s, i) => {
|
|
@@ -169,7 +169,7 @@ function T(t) {
|
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
function ht(t, e) {
|
|
172
|
-
return ye(T(e), (n) =>
|
|
172
|
+
return ye(T(e), (n) => z(t, n));
|
|
173
173
|
}
|
|
174
174
|
function U() {
|
|
175
175
|
const t = [];
|
|
@@ -181,7 +181,7 @@ function U() {
|
|
|
181
181
|
});
|
|
182
182
|
return;
|
|
183
183
|
case Xt:
|
|
184
|
-
t.splice(0
|
|
184
|
+
t.splice(0);
|
|
185
185
|
return;
|
|
186
186
|
case Pt:
|
|
187
187
|
return t.push(n), () => {
|
|
@@ -192,18 +192,20 @@ function U() {
|
|
|
192
192
|
});
|
|
193
193
|
}
|
|
194
194
|
function Tt(t) {
|
|
195
|
-
return ye(U(), (e) =>
|
|
195
|
+
return ye(U(), (e) => z(t, e));
|
|
196
196
|
}
|
|
197
|
-
|
|
197
|
+
const bo = { singleton: !0 };
|
|
198
|
+
function j(t, e = [], n = bo) {
|
|
199
|
+
const { singleton: o } = n;
|
|
198
200
|
return {
|
|
199
201
|
constructor: t,
|
|
200
202
|
dependencies: e,
|
|
201
|
-
id:
|
|
202
|
-
singleton:
|
|
203
|
+
id: Ro(),
|
|
204
|
+
singleton: o
|
|
203
205
|
};
|
|
204
206
|
}
|
|
205
|
-
const
|
|
206
|
-
function
|
|
207
|
+
const Ro = () => /* @__PURE__ */ Symbol("id");
|
|
208
|
+
function Ho(t) {
|
|
207
209
|
const e = /* @__PURE__ */ new Map(), n = ({ constructor: o, dependencies: r, id: s, singleton: i }) => {
|
|
208
210
|
if (i && e.has(s))
|
|
209
211
|
return e.get(s);
|
|
@@ -213,7 +215,7 @@ function Ro(t) {
|
|
|
213
215
|
return n(t);
|
|
214
216
|
}
|
|
215
217
|
function at(...t) {
|
|
216
|
-
const e = U(), n =
|
|
218
|
+
const e = U(), n = Array.from({ length: t.length });
|
|
217
219
|
let o = 0;
|
|
218
220
|
const r = 2 ** t.length - 1;
|
|
219
221
|
return t.forEach((s, i) => {
|
|
@@ -254,18 +256,18 @@ const ft = {
|
|
|
254
256
|
WARN: 2,
|
|
255
257
|
/** Error messages for failures (default level) */
|
|
256
258
|
ERROR: 3
|
|
257
|
-
},
|
|
259
|
+
}, Eo = {
|
|
258
260
|
[ft.DEBUG]: "debug",
|
|
259
261
|
[ft.ERROR]: "error",
|
|
260
262
|
[ft.INFO]: "log",
|
|
261
263
|
[ft.WARN]: "warn"
|
|
262
|
-
},
|
|
264
|
+
}, Bo = () => typeof globalThis > "u" ? window : globalThis, Gt = j(
|
|
263
265
|
() => {
|
|
264
266
|
const t = T(ft.ERROR);
|
|
265
267
|
return {
|
|
266
268
|
log: T((n, o, r = ft.INFO) => {
|
|
267
|
-
const s =
|
|
268
|
-
r >= s && console[
|
|
269
|
+
const s = Bo().VIRTUOSO_LOG_LEVEL ?? it(t);
|
|
270
|
+
r >= s && console[Eo[r]](
|
|
269
271
|
"%creact-virtuoso: %c%s %o",
|
|
270
272
|
"color: #0253b3; font-weight: bold",
|
|
271
273
|
"color: initial",
|
|
@@ -282,7 +284,7 @@ const ft = {
|
|
|
282
284
|
function Gn(t) {
|
|
283
285
|
return "self" in t ? t.document.documentElement : t;
|
|
284
286
|
}
|
|
285
|
-
function
|
|
287
|
+
function Oo(t) {
|
|
286
288
|
const e = Gn(t), n = Ve.get(e);
|
|
287
289
|
if (n !== void 0)
|
|
288
290
|
return n;
|
|
@@ -293,13 +295,13 @@ function hn(t) {
|
|
|
293
295
|
Ve.delete(Gn(t));
|
|
294
296
|
}
|
|
295
297
|
function An(t, e) {
|
|
296
|
-
return
|
|
298
|
+
return Oo(t) ? -e : e;
|
|
297
299
|
}
|
|
298
300
|
const _t = An;
|
|
299
301
|
function gn(t, e) {
|
|
300
302
|
return An(t, e);
|
|
301
303
|
}
|
|
302
|
-
function
|
|
304
|
+
function Lt(t, e, n) {
|
|
303
305
|
return De(t, e, n).callbackRef;
|
|
304
306
|
}
|
|
305
307
|
function De(t, e, n) {
|
|
@@ -324,7 +326,7 @@ function Mn(t, e, n, o, r, s, i, l, c) {
|
|
|
324
326
|
let p = m.parentElement;
|
|
325
327
|
for (; p.dataset.virtuosoScroller === void 0; )
|
|
326
328
|
p = p.parentElement;
|
|
327
|
-
const I = p.lastElementChild
|
|
329
|
+
const I = p.lastElementChild?.dataset.viewportType === "window";
|
|
328
330
|
let w;
|
|
329
331
|
I && (w = p.ownerDocument.defaultView);
|
|
330
332
|
const R = i ? l ? i.scrollWidth : i.scrollHeight : I ? l ? w.document.documentElement.scrollWidth : w.document.documentElement.scrollHeight : l ? p.scrollWidth : p.scrollHeight, h = i ? l ? i.offsetWidth : i.offsetHeight : I ? l ? w.innerWidth : w.innerHeight : l ? p.offsetWidth : p.offsetHeight, f = i ? l ? _t(i, i.scrollLeft) : i.scrollTop : I ? l ? _t(w, w.scrollX || w.document.documentElement.scrollLeft) : w.scrollY || w.document.documentElement.scrollTop : l ? _t(p, p.scrollLeft) : p.scrollTop;
|
|
@@ -349,7 +351,7 @@ function Lo(t, e, n, o) {
|
|
|
349
351
|
const l = t.item(i);
|
|
350
352
|
if (l.dataset.index === void 0)
|
|
351
353
|
continue;
|
|
352
|
-
const c = parseInt(l.dataset.index), d = parseFloat(l.dataset.knownSize), m = e(l, n);
|
|
354
|
+
const c = parseInt(l.dataset.index, 10), d = parseFloat(l.dataset.knownSize), m = e(l, n);
|
|
353
355
|
if (m === 0 && o("Zero-sized element, this should not happen", { child: l }, ft.ERROR), m === d)
|
|
354
356
|
continue;
|
|
355
357
|
const v = s[s.length - 1];
|
|
@@ -405,19 +407,19 @@ function $e(t, e, n) {
|
|
|
405
407
|
const It = j(
|
|
406
408
|
() => {
|
|
407
409
|
const t = U(), e = U(), n = T(0), o = U(), r = T(0), s = U(), i = U(), l = T(0), c = T(0), d = T(0), m = T(0), v = U(), p = U(), I = T(!1), w = T(!1), R = T(!1);
|
|
408
|
-
return
|
|
410
|
+
return z(
|
|
409
411
|
x(
|
|
410
412
|
t,
|
|
411
413
|
B(({ scrollTop: h }) => h)
|
|
412
414
|
),
|
|
413
415
|
e
|
|
414
|
-
),
|
|
416
|
+
), z(
|
|
415
417
|
x(
|
|
416
418
|
t,
|
|
417
419
|
B(({ scrollHeight: h }) => h)
|
|
418
420
|
),
|
|
419
421
|
i
|
|
420
|
-
),
|
|
422
|
+
), z(e, r), {
|
|
421
423
|
deviation: n,
|
|
422
424
|
fixedFooterHeight: d,
|
|
423
425
|
fixedHeaderHeight: c,
|
|
@@ -482,7 +484,7 @@ function Zt(t, e, n) {
|
|
|
482
484
|
if (J(t))
|
|
483
485
|
return [];
|
|
484
486
|
const o = Rt(t, e)[0];
|
|
485
|
-
return
|
|
487
|
+
return ko(Pe(t, o, n));
|
|
486
488
|
}
|
|
487
489
|
function We(t, e) {
|
|
488
490
|
if (J(t))
|
|
@@ -543,11 +545,11 @@ function xe(t) {
|
|
|
543
545
|
}
|
|
544
546
|
function dt(t, e) {
|
|
545
547
|
return $n(
|
|
546
|
-
e.k
|
|
547
|
-
e.v
|
|
548
|
-
e.lvl
|
|
549
|
-
e.l
|
|
550
|
-
e.r
|
|
548
|
+
e.k === void 0 ? t.k : e.k,
|
|
549
|
+
e.v === void 0 ? t.v : e.v,
|
|
550
|
+
e.lvl === void 0 ? t.lvl : e.lvl,
|
|
551
|
+
e.l === void 0 ? t.l : e.l,
|
|
552
|
+
e.r === void 0 ? t.r : e.r
|
|
551
553
|
);
|
|
552
554
|
}
|
|
553
555
|
function Nn(t) {
|
|
@@ -573,7 +575,7 @@ function Ge(t) {
|
|
|
573
575
|
const { lvl: e, r: n } = t;
|
|
574
576
|
return !J(n) && !J(n.r) && n.lvl === e && n.r.lvl === e ? dt(n, { l: dt(t, { r: n.l }), lvl: e + 1 }) : t;
|
|
575
577
|
}
|
|
576
|
-
function
|
|
578
|
+
function ko(t) {
|
|
577
579
|
return _n(t, ({ k: e, v: n }) => ({ index: e, value: n }));
|
|
578
580
|
}
|
|
579
581
|
function Kn(t, e) {
|
|
@@ -608,7 +610,7 @@ function Te(t, e, n, o = 0) {
|
|
|
608
610
|
}
|
|
609
611
|
throw new Error(`Failed binary finding record in array - ${t.join(",")}, searched for ${e}`);
|
|
610
612
|
}
|
|
611
|
-
function
|
|
613
|
+
function zo(t, e, n, o) {
|
|
612
614
|
const r = Te(t, e, o), s = Te(t, n, o, r);
|
|
613
615
|
return t.slice(r, s + 1);
|
|
614
616
|
}
|
|
@@ -621,7 +623,7 @@ function be(t) {
|
|
|
621
623
|
function Ke({ index: t }, e) {
|
|
622
624
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
623
625
|
}
|
|
624
|
-
function
|
|
626
|
+
function Fo() {
|
|
625
627
|
return {
|
|
626
628
|
groupIndices: [],
|
|
627
629
|
groupOffsetTree: Yt(),
|
|
@@ -632,7 +634,7 @@ function zo() {
|
|
|
632
634
|
sizeTree: Yt()
|
|
633
635
|
};
|
|
634
636
|
}
|
|
635
|
-
function
|
|
637
|
+
function Vo(t, e) {
|
|
636
638
|
let n = J(t) ? 0 : 1 / 0;
|
|
637
639
|
for (const o of e) {
|
|
638
640
|
const { endIndex: r, size: s, startIndex: i } = o;
|
|
@@ -641,7 +643,7 @@ function Fo(t, e) {
|
|
|
641
643
|
continue;
|
|
642
644
|
}
|
|
643
645
|
const l = Zt(t, i - 1, r + 1);
|
|
644
|
-
if (l.some(
|
|
646
|
+
if (l.some(No(o)))
|
|
645
647
|
continue;
|
|
646
648
|
let c = !1, d = !1;
|
|
647
649
|
for (const { end: m, start: v, value: p } of l)
|
|
@@ -650,10 +652,10 @@ function Fo(t, e) {
|
|
|
650
652
|
}
|
|
651
653
|
return [t, n];
|
|
652
654
|
}
|
|
653
|
-
function
|
|
654
|
-
return
|
|
655
|
+
function Wo(t) {
|
|
656
|
+
return t.groupIndex !== void 0;
|
|
655
657
|
}
|
|
656
|
-
function
|
|
658
|
+
function Po({ offset: t }, e) {
|
|
657
659
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
658
660
|
}
|
|
659
661
|
function ce(t, e, n) {
|
|
@@ -671,16 +673,16 @@ function qn(t, e) {
|
|
|
671
673
|
return t + n;
|
|
672
674
|
}
|
|
673
675
|
function Yn(t, e, n) {
|
|
674
|
-
if (
|
|
676
|
+
if (Wo(t))
|
|
675
677
|
return e.groupIndices[t.groupIndex] + 1;
|
|
676
678
|
const o = t.index === "LAST" ? n : t.index;
|
|
677
679
|
let r = qn(o, e);
|
|
678
|
-
return r = Math.max(0,
|
|
680
|
+
return r = Math.max(0, Math.min(n, r)), r;
|
|
679
681
|
}
|
|
680
|
-
function
|
|
681
|
-
return o > 0 && (e = Math.max(e, jn(t, o, Ke).offset)), _n(
|
|
682
|
+
function Go(t, e, n, o = 0) {
|
|
683
|
+
return o > 0 && (e = Math.max(e, jn(t, o, Ke).offset)), _n(zo(t, e, n, Po), _o);
|
|
682
684
|
}
|
|
683
|
-
function
|
|
685
|
+
function Ao(t, [e, n, o, r]) {
|
|
684
686
|
e.length > 0 && o("received item sizes", e, ft.DEBUG);
|
|
685
687
|
const s = t.sizeTree;
|
|
686
688
|
let i = s, l = 0;
|
|
@@ -688,7 +690,7 @@ function Go(t, [e, n, o, r]) {
|
|
|
688
690
|
const p = e[0].size, I = e[1].size;
|
|
689
691
|
i = n.reduce((w, R) => vt(vt(w, R, p), R + 1, I), i);
|
|
690
692
|
} else
|
|
691
|
-
[i, l] =
|
|
693
|
+
[i, l] = Vo(i, e);
|
|
692
694
|
if (i === s)
|
|
693
695
|
return t;
|
|
694
696
|
const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: v } = Ae(t.offsetTree, l, i, r);
|
|
@@ -702,10 +704,10 @@ function Go(t, [e, n, o, r]) {
|
|
|
702
704
|
sizeTree: i
|
|
703
705
|
};
|
|
704
706
|
}
|
|
705
|
-
function
|
|
707
|
+
function Mo(t) {
|
|
706
708
|
return Nt(t).map(({ k: e, v: n }, o, r) => {
|
|
707
709
|
const s = r[o + 1];
|
|
708
|
-
return { endIndex: s
|
|
710
|
+
return { endIndex: s === void 0 ? 1 / 0 : s.k - 1, size: n, startIndex: e };
|
|
709
711
|
});
|
|
710
712
|
}
|
|
711
713
|
function xn(t, e) {
|
|
@@ -716,12 +718,13 @@ function xn(t, e) {
|
|
|
716
718
|
}
|
|
717
719
|
function Ae(t, e, n, o) {
|
|
718
720
|
let r = t, s = 0, i = 0, l = 0, c = 0;
|
|
719
|
-
if (e
|
|
721
|
+
if (e === 0)
|
|
722
|
+
r = [];
|
|
723
|
+
else {
|
|
720
724
|
c = Te(r, e - 1, Ke), l = r[c].offset;
|
|
721
725
|
const m = Rt(n, e - 1);
|
|
722
726
|
s = m[0], i = m[1], r.length && r[c].size === Rt(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
|
|
723
|
-
}
|
|
724
|
-
r = [];
|
|
727
|
+
}
|
|
725
728
|
for (const { start: d, value: m } of Zt(n, e, 1 / 0)) {
|
|
726
729
|
const v = d - s, p = v * i + l + v * o;
|
|
727
730
|
r.push({
|
|
@@ -737,26 +740,26 @@ function Ae(t, e, n, o) {
|
|
|
737
740
|
offsetTree: r
|
|
738
741
|
};
|
|
739
742
|
}
|
|
740
|
-
function
|
|
743
|
+
function _o(t) {
|
|
741
744
|
return { index: t.index, value: t };
|
|
742
745
|
}
|
|
743
|
-
function
|
|
746
|
+
function No(t) {
|
|
744
747
|
const { endIndex: e, size: n, startIndex: o } = t;
|
|
745
748
|
return (r) => r.start === o && (r.end === e || r.end === 1 / 0) && r.value === n;
|
|
746
749
|
}
|
|
747
|
-
const
|
|
750
|
+
const Do = {
|
|
748
751
|
offsetHeight: "height",
|
|
749
752
|
offsetWidth: "width"
|
|
750
753
|
}, kt = j(
|
|
751
754
|
([{ log: t }, { recalcInProgress: e }]) => {
|
|
752
|
-
const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u,
|
|
753
|
-
x(n, $(c, t, R),
|
|
755
|
+
const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u, Do[g])), w = T(void 0), R = T(0), h = Fo(), f = ht(
|
|
756
|
+
x(n, $(c, t, R), Ot(Ao, h), nt()),
|
|
754
757
|
h
|
|
755
758
|
), a = ht(
|
|
756
759
|
x(
|
|
757
760
|
c,
|
|
758
761
|
nt(),
|
|
759
|
-
|
|
762
|
+
Ot((u, g) => ({ current: g, prev: u.current }), {
|
|
760
763
|
current: [],
|
|
761
764
|
prev: []
|
|
762
765
|
}),
|
|
@@ -764,22 +767,22 @@ const No = {
|
|
|
764
767
|
),
|
|
765
768
|
[]
|
|
766
769
|
);
|
|
767
|
-
|
|
770
|
+
z(
|
|
768
771
|
x(
|
|
769
772
|
c,
|
|
770
773
|
P((u) => u.length > 0),
|
|
771
774
|
$(f, R),
|
|
772
775
|
B(([u, g, C]) => {
|
|
773
|
-
const
|
|
776
|
+
const k = u.reduce((O, V, N) => vt(O, V, ce(V, g.offsetTree, C) || N), Yt());
|
|
774
777
|
return {
|
|
775
778
|
...g,
|
|
776
779
|
groupIndices: u,
|
|
777
|
-
groupOffsetTree:
|
|
780
|
+
groupOffsetTree: k
|
|
778
781
|
};
|
|
779
782
|
})
|
|
780
783
|
),
|
|
781
784
|
f
|
|
782
|
-
),
|
|
785
|
+
), z(
|
|
783
786
|
x(
|
|
784
787
|
o,
|
|
785
788
|
$(f),
|
|
@@ -793,7 +796,7 @@ const No = {
|
|
|
793
796
|
])
|
|
794
797
|
),
|
|
795
798
|
n
|
|
796
|
-
),
|
|
799
|
+
), z(d, m);
|
|
797
800
|
const S = ht(
|
|
798
801
|
x(
|
|
799
802
|
d,
|
|
@@ -801,7 +804,7 @@ const No = {
|
|
|
801
804
|
),
|
|
802
805
|
!0
|
|
803
806
|
);
|
|
804
|
-
|
|
807
|
+
z(
|
|
805
808
|
x(
|
|
806
809
|
m,
|
|
807
810
|
P((u) => u !== void 0 && J(it(f).sizeTree)),
|
|
@@ -814,49 +817,49 @@ const No = {
|
|
|
814
817
|
})
|
|
815
818
|
),
|
|
816
819
|
n
|
|
817
|
-
),
|
|
820
|
+
), z(
|
|
818
821
|
x(
|
|
819
822
|
p,
|
|
820
823
|
P((u) => u !== void 0 && u.length > 0 && J(it(f).sizeTree)),
|
|
821
824
|
B((u) => {
|
|
822
825
|
const g = [];
|
|
823
|
-
let C = u[0],
|
|
824
|
-
for (let
|
|
825
|
-
const V = u[
|
|
826
|
+
let C = u[0], k = 0;
|
|
827
|
+
for (let O = 1; O < u.length; O++) {
|
|
828
|
+
const V = u[O];
|
|
826
829
|
V !== C && (g.push({
|
|
827
|
-
endIndex:
|
|
830
|
+
endIndex: O - 1,
|
|
828
831
|
size: C,
|
|
829
|
-
startIndex:
|
|
830
|
-
}), C = V,
|
|
832
|
+
startIndex: k
|
|
833
|
+
}), C = V, k = O);
|
|
831
834
|
}
|
|
832
835
|
return g.push({
|
|
833
836
|
endIndex: u.length - 1,
|
|
834
837
|
size: C,
|
|
835
|
-
startIndex:
|
|
838
|
+
startIndex: k
|
|
836
839
|
}), g;
|
|
837
840
|
})
|
|
838
841
|
),
|
|
839
842
|
n
|
|
840
|
-
),
|
|
843
|
+
), z(
|
|
841
844
|
x(
|
|
842
845
|
c,
|
|
843
846
|
$(v, m),
|
|
844
847
|
P(([, u, g]) => u !== void 0 && g !== void 0),
|
|
845
848
|
B(([u, g, C]) => {
|
|
846
|
-
const
|
|
847
|
-
for (let
|
|
848
|
-
const V = u[
|
|
849
|
-
|
|
849
|
+
const k = [];
|
|
850
|
+
for (let O = 0; O < u.length; O++) {
|
|
851
|
+
const V = u[O], N = u[O + 1];
|
|
852
|
+
k.push({
|
|
850
853
|
startIndex: V,
|
|
851
854
|
endIndex: V,
|
|
852
855
|
size: g
|
|
853
|
-
}), N !== void 0 &&
|
|
856
|
+
}), N !== void 0 && k.push({
|
|
854
857
|
startIndex: V + 1,
|
|
855
858
|
endIndex: N - 1,
|
|
856
859
|
size: C
|
|
857
860
|
});
|
|
858
861
|
}
|
|
859
|
-
return
|
|
862
|
+
return k;
|
|
860
863
|
})
|
|
861
864
|
),
|
|
862
865
|
n
|
|
@@ -865,7 +868,7 @@ const No = {
|
|
|
865
868
|
x(
|
|
866
869
|
n,
|
|
867
870
|
$(f),
|
|
868
|
-
|
|
871
|
+
Ot(
|
|
869
872
|
({ sizes: u }, [g, C]) => ({
|
|
870
873
|
changed: C !== u,
|
|
871
874
|
sizes: C
|
|
@@ -878,7 +881,7 @@ const No = {
|
|
|
878
881
|
Y(
|
|
879
882
|
x(
|
|
880
883
|
l,
|
|
881
|
-
|
|
884
|
+
Ot(
|
|
882
885
|
(u, g) => ({ diff: u.prev - g, prev: g }),
|
|
883
886
|
{ diff: 0, prev: 0 }
|
|
884
887
|
),
|
|
@@ -901,24 +904,24 @@ const No = {
|
|
|
901
904
|
);
|
|
902
905
|
});
|
|
903
906
|
const y = Tt(s);
|
|
904
|
-
|
|
907
|
+
z(
|
|
905
908
|
x(
|
|
906
909
|
s,
|
|
907
910
|
$(f),
|
|
908
911
|
B(([u, g]) => {
|
|
909
|
-
const C = g.groupIndices.length > 0,
|
|
912
|
+
const C = g.groupIndices.length > 0, k = [], O = g.lastSize;
|
|
910
913
|
if (C) {
|
|
911
914
|
const V = ie(g.sizeTree, 0);
|
|
912
915
|
let N = 0, Z = 0;
|
|
913
916
|
for (; N < u; ) {
|
|
914
917
|
const q = g.groupIndices[Z], Q = g.groupIndices.length === Z + 1 ? 1 / 0 : g.groupIndices[Z + 1] - q - 1;
|
|
915
|
-
|
|
918
|
+
k.push({
|
|
916
919
|
endIndex: q,
|
|
917
920
|
size: V,
|
|
918
921
|
startIndex: q
|
|
919
|
-
}),
|
|
922
|
+
}), k.push({
|
|
920
923
|
endIndex: q + 1 + Q - 1,
|
|
921
|
-
size:
|
|
924
|
+
size: O,
|
|
922
925
|
startIndex: q + 1
|
|
923
926
|
}), Z++, N += Q + 1;
|
|
924
927
|
}
|
|
@@ -942,7 +945,7 @@ const No = {
|
|
|
942
945
|
{
|
|
943
946
|
prevIndex: u,
|
|
944
947
|
prevSize: 0,
|
|
945
|
-
ranges:
|
|
948
|
+
ranges: k
|
|
946
949
|
}
|
|
947
950
|
).ranges;
|
|
948
951
|
}
|
|
@@ -954,7 +957,7 @@ const No = {
|
|
|
954
957
|
}),
|
|
955
958
|
{
|
|
956
959
|
prevIndex: 0,
|
|
957
|
-
prevSize:
|
|
960
|
+
prevSize: O,
|
|
958
961
|
ranges: []
|
|
959
962
|
}
|
|
960
963
|
).ranges;
|
|
@@ -962,17 +965,17 @@ const No = {
|
|
|
962
965
|
),
|
|
963
966
|
n
|
|
964
967
|
);
|
|
965
|
-
const
|
|
968
|
+
const L = Tt(
|
|
966
969
|
x(
|
|
967
970
|
i,
|
|
968
971
|
$(f, R),
|
|
969
972
|
B(([u, { offsetTree: g }, C]) => {
|
|
970
|
-
const
|
|
971
|
-
return ce(
|
|
973
|
+
const k = -u;
|
|
974
|
+
return ce(k, g, C);
|
|
972
975
|
})
|
|
973
976
|
)
|
|
974
977
|
);
|
|
975
|
-
return
|
|
978
|
+
return z(
|
|
976
979
|
x(
|
|
977
980
|
i,
|
|
978
981
|
$(f, R),
|
|
@@ -1000,11 +1003,11 @@ const No = {
|
|
|
1000
1003
|
...Ae(g.offsetTree, 0, V, C)
|
|
1001
1004
|
};
|
|
1002
1005
|
}
|
|
1003
|
-
const
|
|
1006
|
+
const O = Nt(g.sizeTree).reduce((V, { k: N, v: Z }) => vt(V, Math.max(0, N + u), Z), Yt());
|
|
1004
1007
|
return {
|
|
1005
1008
|
...g,
|
|
1006
|
-
sizeTree:
|
|
1007
|
-
...Ae(g.offsetTree, 0,
|
|
1009
|
+
sizeTree: O,
|
|
1010
|
+
...Ae(g.offsetTree, 0, O, C)
|
|
1008
1011
|
};
|
|
1009
1012
|
})
|
|
1010
1013
|
),
|
|
@@ -1023,7 +1026,7 @@ const No = {
|
|
|
1023
1026
|
itemSize: I,
|
|
1024
1027
|
listRefresh: H,
|
|
1025
1028
|
shiftWith: i,
|
|
1026
|
-
shiftWithOffset:
|
|
1029
|
+
shiftWithOffset: L,
|
|
1027
1030
|
sizeRanges: n,
|
|
1028
1031
|
// output
|
|
1029
1032
|
sizes: f,
|
|
@@ -1036,7 +1039,7 @@ const No = {
|
|
|
1036
1039
|
rt(Gt, Ue),
|
|
1037
1040
|
{ singleton: !0 }
|
|
1038
1041
|
);
|
|
1039
|
-
function
|
|
1042
|
+
function $o(t) {
|
|
1040
1043
|
return t.reduce(
|
|
1041
1044
|
(e, n) => (e.groupIndices.push(e.totalCount), e.totalCount += n + 1, e),
|
|
1042
1045
|
{
|
|
@@ -1047,20 +1050,20 @@ function Do(t) {
|
|
|
1047
1050
|
}
|
|
1048
1051
|
const Zn = j(
|
|
1049
1052
|
([{ groupIndices: t, sizes: e, totalCount: n }, { headerHeight: o, scrollTop: r }]) => {
|
|
1050
|
-
const s = U(), i = U(), l = Tt(x(s, B(
|
|
1051
|
-
return
|
|
1053
|
+
const s = U(), i = U(), l = Tt(x(s, B($o)));
|
|
1054
|
+
return z(
|
|
1052
1055
|
x(
|
|
1053
1056
|
l,
|
|
1054
1057
|
B((c) => c.totalCount)
|
|
1055
1058
|
),
|
|
1056
1059
|
n
|
|
1057
|
-
),
|
|
1060
|
+
), z(
|
|
1058
1061
|
x(
|
|
1059
1062
|
l,
|
|
1060
1063
|
B((c) => c.groupIndices)
|
|
1061
1064
|
),
|
|
1062
1065
|
t
|
|
1063
|
-
),
|
|
1066
|
+
), z(
|
|
1064
1067
|
x(
|
|
1065
1068
|
at(r, e, o),
|
|
1066
1069
|
P(([c, d]) => be(d)),
|
|
@@ -1087,10 +1090,10 @@ const Zn = j(
|
|
|
1087
1090
|
},
|
|
1088
1091
|
rt(Gt),
|
|
1089
1092
|
{ singleton: !0 }
|
|
1090
|
-
),
|
|
1093
|
+
), Uo = typeof document < "u" && "scrollBehavior" in document.documentElement.style;
|
|
1091
1094
|
function Xn(t) {
|
|
1092
1095
|
const e = typeof t == "number" ? { index: t } : t;
|
|
1093
|
-
return e.align || (e.align = "start"), (!e.behavior ||
|
|
1096
|
+
return e.align || (e.align = "start"), (!e.behavior || !Uo) && (e.behavior = "auto"), e.offset === void 0 && (e.offset = 0), e;
|
|
1094
1097
|
}
|
|
1095
1098
|
const fe = j(
|
|
1096
1099
|
([
|
|
@@ -1112,23 +1115,23 @@ const fe = j(
|
|
|
1112
1115
|
function S() {
|
|
1113
1116
|
h !== null && (h(), h = null), a !== null && (a(), a = null), f && (clearTimeout(f), f = null), _(c, !1);
|
|
1114
1117
|
}
|
|
1115
|
-
return
|
|
1118
|
+
return z(
|
|
1116
1119
|
x(
|
|
1117
1120
|
I,
|
|
1118
1121
|
$(n, v, o, R, l, i, p),
|
|
1119
1122
|
$(t, s, r),
|
|
1120
1123
|
B(
|
|
1121
1124
|
([
|
|
1122
|
-
[H, y,
|
|
1125
|
+
[H, y, L, u, g, C, k, O],
|
|
1123
1126
|
V,
|
|
1124
1127
|
N,
|
|
1125
1128
|
Z
|
|
1126
1129
|
]) => {
|
|
1127
1130
|
const F = Xn(H), { align: mt, behavior: q, offset: Q } = F, gt = u - 1, ut = Yn(F, y, gt);
|
|
1128
1131
|
let St = ce(ut, y.offsetTree, V) + C;
|
|
1129
|
-
mt === "end" ? (St += N + Rt(y.sizeTree, ut)[1] -
|
|
1132
|
+
mt === "end" ? (St += N + Rt(y.sizeTree, ut)[1] - L + Z, ut === gt && (St += k)) : mt === "center" ? St += (N + Rt(y.sizeTree, ut)[1] - L + Z) / 2 : St -= g, Q !== void 0 && Q !== 0 && (St += Q);
|
|
1130
1133
|
const Ft = (pt) => {
|
|
1131
|
-
S(), pt ? (
|
|
1134
|
+
S(), pt ? (O("retrying to scroll to", { location: H }, ft.DEBUG), _(I, H)) : (_(w, !0), O("list did not change, scroll successful", {}, ft.DEBUG));
|
|
1132
1135
|
};
|
|
1133
1136
|
if (S(), q === "smooth") {
|
|
1134
1137
|
let pt = !1;
|
|
@@ -1138,10 +1141,10 @@ const fe = j(
|
|
|
1138
1141
|
Ft(pt);
|
|
1139
1142
|
});
|
|
1140
1143
|
} else
|
|
1141
|
-
h = yt(x(e,
|
|
1144
|
+
h = yt(x(e, Ko(150)), Ft);
|
|
1142
1145
|
return f = setTimeout(() => {
|
|
1143
1146
|
S();
|
|
1144
|
-
}, 1200), _(c, !0),
|
|
1147
|
+
}, 1200), _(c, !0), O("scrolling from index to", { behavior: q, index: ut, top: St }, ft.DEBUG), { behavior: q, top: St };
|
|
1145
1148
|
}
|
|
1146
1149
|
)
|
|
1147
1150
|
),
|
|
@@ -1155,7 +1158,7 @@ const fe = j(
|
|
|
1155
1158
|
rt(kt, It, Gt),
|
|
1156
1159
|
{ singleton: !0 }
|
|
1157
1160
|
);
|
|
1158
|
-
function
|
|
1161
|
+
function Ko(t) {
|
|
1159
1162
|
return (e) => {
|
|
1160
1163
|
const n = setTimeout(() => {
|
|
1161
1164
|
e(!1);
|
|
@@ -1177,7 +1180,7 @@ function qe(t, e) {
|
|
|
1177
1180
|
const me = j(
|
|
1178
1181
|
([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
|
|
1179
1182
|
const l = T(!0), c = T(0), d = T(!0);
|
|
1180
|
-
return
|
|
1183
|
+
return z(
|
|
1181
1184
|
x(
|
|
1182
1185
|
i,
|
|
1183
1186
|
$(c),
|
|
@@ -1185,7 +1188,7 @@ const me = j(
|
|
|
1185
1188
|
Bt(!1)
|
|
1186
1189
|
),
|
|
1187
1190
|
l
|
|
1188
|
-
),
|
|
1191
|
+
), z(
|
|
1189
1192
|
x(
|
|
1190
1193
|
i,
|
|
1191
1194
|
$(c),
|
|
@@ -1221,7 +1224,7 @@ const me = j(
|
|
|
1221
1224
|
function Jn(t, e) {
|
|
1222
1225
|
return Math.abs(t - e) < 1.01;
|
|
1223
1226
|
}
|
|
1224
|
-
const ue = "up", ne = "down",
|
|
1227
|
+
const ue = "up", ne = "down", jo = "none", qo = {
|
|
1225
1228
|
atBottom: !1,
|
|
1226
1229
|
notAtBottomBecause: "NOT_SHOWING_LAST_ITEM",
|
|
1227
1230
|
state: {
|
|
@@ -1230,8 +1233,8 @@ const ue = "up", ne = "down", Ko = "none", jo = {
|
|
|
1230
1233
|
scrollTop: 0,
|
|
1231
1234
|
viewportHeight: 0
|
|
1232
1235
|
}
|
|
1233
|
-
},
|
|
1234
|
-
const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(
|
|
1236
|
+
}, Yo = 0, pe = j(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
|
|
1237
|
+
const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(Yo), p = ht(
|
|
1235
1238
|
x(
|
|
1236
1239
|
Fe(x(W(r), Ut(1), Bt(!0)), x(W(r), Ut(1), Bt(!1), pn(100))),
|
|
1237
1240
|
nt()
|
|
@@ -1241,19 +1244,19 @@ const ue = "up", ne = "down", Ko = "none", jo = {
|
|
|
1241
1244
|
x(Fe(x(n, Bt(!0)), x(n, Bt(!1), pn(200))), nt()),
|
|
1242
1245
|
!1
|
|
1243
1246
|
);
|
|
1244
|
-
|
|
1247
|
+
z(
|
|
1245
1248
|
x(
|
|
1246
1249
|
at(W(r), W(v)),
|
|
1247
1250
|
B(([a, S]) => a <= S),
|
|
1248
1251
|
nt()
|
|
1249
1252
|
),
|
|
1250
1253
|
l
|
|
1251
|
-
),
|
|
1254
|
+
), z(x(l, zt(50)), d);
|
|
1252
1255
|
const w = Tt(
|
|
1253
1256
|
x(
|
|
1254
1257
|
at(o, W(s), W(e), W(t), W(m)),
|
|
1255
|
-
|
|
1256
|
-
const C = H + y - S > -g,
|
|
1258
|
+
Ot((a, [{ scrollHeight: S, scrollTop: H }, y, L, u, g]) => {
|
|
1259
|
+
const C = H + y - S > -g, k = {
|
|
1257
1260
|
scrollHeight: S,
|
|
1258
1261
|
scrollTop: H,
|
|
1259
1262
|
viewportHeight: y
|
|
@@ -1264,26 +1267,26 @@ const ue = "up", ne = "down", Ko = "none", jo = {
|
|
|
1264
1267
|
atBottom: !0,
|
|
1265
1268
|
atBottomBecause: V,
|
|
1266
1269
|
scrollTopDelta: N,
|
|
1267
|
-
state:
|
|
1270
|
+
state: k
|
|
1268
1271
|
};
|
|
1269
1272
|
}
|
|
1270
|
-
let
|
|
1271
|
-
return
|
|
1273
|
+
let O;
|
|
1274
|
+
return k.scrollHeight > a.state.scrollHeight ? O = "SIZE_INCREASED" : y < a.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : H < a.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1272
1275
|
atBottom: !1,
|
|
1273
|
-
notAtBottomBecause:
|
|
1274
|
-
state:
|
|
1276
|
+
notAtBottomBecause: O,
|
|
1277
|
+
state: k
|
|
1275
1278
|
};
|
|
1276
|
-
},
|
|
1279
|
+
}, qo),
|
|
1277
1280
|
nt((a, S) => a !== void 0 && a.atBottom === S.atBottom)
|
|
1278
1281
|
)
|
|
1279
1282
|
), R = ht(
|
|
1280
1283
|
x(
|
|
1281
1284
|
o,
|
|
1282
|
-
|
|
1285
|
+
Ot(
|
|
1283
1286
|
(a, { scrollHeight: S, scrollTop: H, viewportHeight: y }) => {
|
|
1284
1287
|
if (!Jn(a.scrollHeight, S)) {
|
|
1285
|
-
const
|
|
1286
|
-
return a.scrollTop !== H &&
|
|
1288
|
+
const L = S - (H + y) < 1;
|
|
1289
|
+
return a.scrollTop !== H && L ? {
|
|
1287
1290
|
changed: !0,
|
|
1288
1291
|
jump: a.scrollTop - H,
|
|
1289
1292
|
scrollHeight: S,
|
|
@@ -1309,42 +1312,42 @@ const ue = "up", ne = "down", Ko = "none", jo = {
|
|
|
1309
1312
|
),
|
|
1310
1313
|
0
|
|
1311
1314
|
);
|
|
1312
|
-
|
|
1315
|
+
z(
|
|
1313
1316
|
x(
|
|
1314
1317
|
w,
|
|
1315
1318
|
B((a) => a.atBottom)
|
|
1316
1319
|
),
|
|
1317
1320
|
i
|
|
1318
|
-
),
|
|
1321
|
+
), z(x(i, zt(50)), c);
|
|
1319
1322
|
const h = T(ne);
|
|
1320
|
-
|
|
1323
|
+
z(
|
|
1321
1324
|
x(
|
|
1322
1325
|
o,
|
|
1323
1326
|
B(({ scrollTop: a }) => a),
|
|
1324
1327
|
nt(),
|
|
1325
|
-
|
|
1328
|
+
Ot(
|
|
1326
1329
|
(a, S) => it(I) ? { direction: a.direction, prevScrollTop: S } : { direction: S < a.prevScrollTop ? ue : ne, prevScrollTop: S },
|
|
1327
1330
|
{ direction: ne, prevScrollTop: 0 }
|
|
1328
1331
|
),
|
|
1329
1332
|
B((a) => a.direction)
|
|
1330
1333
|
),
|
|
1331
1334
|
h
|
|
1332
|
-
),
|
|
1335
|
+
), z(x(o, zt(50), Bt(jo)), h);
|
|
1333
1336
|
const f = T(0);
|
|
1334
|
-
return
|
|
1337
|
+
return z(
|
|
1335
1338
|
x(
|
|
1336
1339
|
p,
|
|
1337
1340
|
P((a) => !a),
|
|
1338
1341
|
Bt(0)
|
|
1339
1342
|
),
|
|
1340
1343
|
f
|
|
1341
|
-
),
|
|
1344
|
+
), z(
|
|
1342
1345
|
x(
|
|
1343
1346
|
r,
|
|
1344
1347
|
zt(100),
|
|
1345
1348
|
$(p),
|
|
1346
1349
|
P(([a, S]) => S),
|
|
1347
|
-
|
|
1350
|
+
Ot(([a, S], [H]) => [S, H], [0, 0]),
|
|
1348
1351
|
B(([a, S]) => S - a)
|
|
1349
1352
|
),
|
|
1350
1353
|
f
|
|
@@ -1395,12 +1398,12 @@ const Ye = j(
|
|
|
1395
1398
|
a,
|
|
1396
1399
|
S
|
|
1397
1400
|
]) => {
|
|
1398
|
-
const H = m - a, y = h + f,
|
|
1401
|
+
const H = m - a, y = h + f, L = Math.max(p - H, 0);
|
|
1399
1402
|
let u = vn;
|
|
1400
1403
|
const g = Cn(S, ae), C = Cn(S, de);
|
|
1401
|
-
return I -= a, I += p + f, w += p + f, w -= a, I > m + y - g && (u = ue), w < m -
|
|
1404
|
+
return I -= a, I += p + f, w += p + f, w -= a, I > m + y - g && (u = ue), w < m - L + v + C && (u = ne), u !== vn ? [
|
|
1402
1405
|
Math.max(H - p - Tn(R, ae, u) - g, 0),
|
|
1403
|
-
H -
|
|
1406
|
+
H - L - f + v + Tn(R, de, u) + C
|
|
1404
1407
|
] : null;
|
|
1405
1408
|
}
|
|
1406
1409
|
),
|
|
@@ -1422,7 +1425,7 @@ const Ye = j(
|
|
|
1422
1425
|
rt(It),
|
|
1423
1426
|
{ singleton: !0 }
|
|
1424
1427
|
);
|
|
1425
|
-
function
|
|
1428
|
+
function Zo(t, e, n) {
|
|
1426
1429
|
if (be(e)) {
|
|
1427
1430
|
const o = qn(t, e);
|
|
1428
1431
|
return [
|
|
@@ -1432,7 +1435,7 @@ function Yo(t, e, n) {
|
|
|
1432
1435
|
}
|
|
1433
1436
|
return [{ data: n?.[0], index: t, offset: 0, size: 0 }];
|
|
1434
1437
|
}
|
|
1435
|
-
const
|
|
1438
|
+
const Oe = {
|
|
1436
1439
|
bottom: 0,
|
|
1437
1440
|
firstItemIndex: 0,
|
|
1438
1441
|
items: [],
|
|
@@ -1521,7 +1524,7 @@ const Kt = j(
|
|
|
1521
1524
|
{ recalcInProgress: w }
|
|
1522
1525
|
]) => {
|
|
1523
1526
|
const R = T([]), h = T(0), f = U(), a = T(0);
|
|
1524
|
-
|
|
1527
|
+
z(s.topItemsIndexes, R);
|
|
1525
1528
|
const S = ht(
|
|
1526
1529
|
x(
|
|
1527
1530
|
at(
|
|
@@ -1538,9 +1541,9 @@ const Kt = j(
|
|
|
1538
1541
|
W(a),
|
|
1539
1542
|
t
|
|
1540
1543
|
),
|
|
1541
|
-
P(([u, g, , C, , , , , , , ,
|
|
1542
|
-
const
|
|
1543
|
-
return u && !g && !
|
|
1544
|
+
P(([u, g, , C, , , , , , , , k]) => {
|
|
1545
|
+
const O = k !== void 0 && k.length !== C;
|
|
1546
|
+
return u && !g && !O;
|
|
1544
1547
|
}),
|
|
1545
1548
|
B(
|
|
1546
1549
|
([
|
|
@@ -1548,8 +1551,8 @@ const Kt = j(
|
|
|
1548
1551
|
,
|
|
1549
1552
|
[u, g],
|
|
1550
1553
|
C,
|
|
1551
|
-
|
|
1552
|
-
|
|
1554
|
+
k,
|
|
1555
|
+
O,
|
|
1553
1556
|
V,
|
|
1554
1557
|
N,
|
|
1555
1558
|
Z,
|
|
@@ -1557,14 +1560,14 @@ const Kt = j(
|
|
|
1557
1560
|
mt,
|
|
1558
1561
|
q
|
|
1559
1562
|
]) => {
|
|
1560
|
-
const Q =
|
|
1563
|
+
const Q = k, { offsetTree: gt, sizeTree: ut } = Q, St = it(h);
|
|
1561
1564
|
if (C === 0)
|
|
1562
|
-
return { ...
|
|
1565
|
+
return { ...Oe, totalCount: C };
|
|
1563
1566
|
if (u === 0 && g === 0)
|
|
1564
|
-
return St === 0 ? { ...
|
|
1567
|
+
return St === 0 ? { ...Oe, totalCount: C } : Qn(St, O, k, Z, F, q || []);
|
|
1565
1568
|
if (J(ut))
|
|
1566
1569
|
return St > 0 ? null : ve(
|
|
1567
|
-
|
|
1570
|
+
Zo(qe(O, C), Q, q),
|
|
1568
1571
|
[],
|
|
1569
1572
|
C,
|
|
1570
1573
|
F,
|
|
@@ -1583,7 +1586,7 @@ const Kt = j(
|
|
|
1583
1586
|
}
|
|
1584
1587
|
if (!V)
|
|
1585
1588
|
return ve([], Ft, C, F, Q, Z);
|
|
1586
|
-
const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt =
|
|
1589
|
+
const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt = Go(gt, u, g, pt);
|
|
1587
1590
|
if (jt.length === 0)
|
|
1588
1591
|
return null;
|
|
1589
1592
|
const Qt = C - 1, Et = ye([], (D) => {
|
|
@@ -1629,28 +1632,28 @@ const Kt = j(
|
|
|
1629
1632
|
P((u) => u !== null),
|
|
1630
1633
|
nt()
|
|
1631
1634
|
),
|
|
1632
|
-
|
|
1635
|
+
Oe
|
|
1633
1636
|
);
|
|
1634
|
-
|
|
1637
|
+
z(
|
|
1635
1638
|
x(
|
|
1636
1639
|
t,
|
|
1637
1640
|
P(_e),
|
|
1638
1641
|
B((u) => u?.length)
|
|
1639
1642
|
),
|
|
1640
1643
|
r
|
|
1641
|
-
),
|
|
1644
|
+
), z(
|
|
1642
1645
|
x(
|
|
1643
1646
|
S,
|
|
1644
1647
|
B((u) => u.topListHeight)
|
|
1645
1648
|
),
|
|
1646
1649
|
v
|
|
1647
|
-
),
|
|
1650
|
+
), z(v, l), z(
|
|
1648
1651
|
x(
|
|
1649
1652
|
S,
|
|
1650
1653
|
B((u) => [u.top, u.bottom])
|
|
1651
1654
|
),
|
|
1652
1655
|
i
|
|
1653
|
-
),
|
|
1656
|
+
), z(
|
|
1654
1657
|
x(
|
|
1655
1658
|
S,
|
|
1656
1659
|
B((u) => u.items)
|
|
@@ -1675,10 +1678,11 @@ const Kt = j(
|
|
|
1675
1678
|
B(({ items: u }) => u[0].index),
|
|
1676
1679
|
nt()
|
|
1677
1680
|
)
|
|
1678
|
-
),
|
|
1681
|
+
), L = Tt(
|
|
1679
1682
|
x(
|
|
1680
1683
|
S,
|
|
1681
1684
|
P(({ items: u }) => u.length > 0),
|
|
1685
|
+
// oxlint-disable-next-line array-callback-return -- callback always returns after trimming group sentinels
|
|
1682
1686
|
B(({ items: u }) => {
|
|
1683
1687
|
let g = 0, C = u.length - 1;
|
|
1684
1688
|
for (; u[g].type === "group" && g < C; )
|
|
@@ -1699,7 +1703,7 @@ const Kt = j(
|
|
|
1699
1703
|
itemsRendered: f,
|
|
1700
1704
|
listState: S,
|
|
1701
1705
|
minOverscanItemCount: a,
|
|
1702
|
-
rangeChanged:
|
|
1706
|
+
rangeChanged: L,
|
|
1703
1707
|
startReached: y,
|
|
1704
1708
|
topItemsIndexes: R,
|
|
1705
1709
|
...p
|
|
@@ -1725,11 +1729,11 @@ const Kt = j(
|
|
|
1725
1729
|
),
|
|
1726
1730
|
0
|
|
1727
1731
|
);
|
|
1728
|
-
return
|
|
1732
|
+
return z(W(i), s), { totalListHeight: i, totalListHeightChanged: s };
|
|
1729
1733
|
},
|
|
1730
1734
|
rt(It, Kt),
|
|
1731
1735
|
{ singleton: !0 }
|
|
1732
|
-
),
|
|
1736
|
+
), Xo = j(
|
|
1733
1737
|
([{ viewportHeight: t }, { totalListHeight: e }]) => {
|
|
1734
1738
|
const n = T(!1), o = ht(
|
|
1735
1739
|
x(
|
|
@@ -1747,33 +1751,33 @@ const Kt = j(
|
|
|
1747
1751
|
{ singleton: !0 }
|
|
1748
1752
|
), eo = j(() => ({
|
|
1749
1753
|
context: T(null)
|
|
1750
|
-
})),
|
|
1754
|
+
})), Jo = ({
|
|
1751
1755
|
itemBottom: t,
|
|
1752
1756
|
itemTop: e,
|
|
1753
1757
|
locationParams: { align: n, behavior: o, ...r },
|
|
1754
1758
|
viewportBottom: s,
|
|
1755
1759
|
viewportTop: i
|
|
1756
|
-
}) => e < i ? { ...r, align: n ?? "start", ...o
|
|
1760
|
+
}) => e < i ? { ...r, align: n ?? "start", ...o === void 0 ? {} : { behavior: o } } : t > s ? { ...r, align: n ?? "end", ...o === void 0 ? {} : { behavior: o } } : null, no = j(
|
|
1757
1761
|
([
|
|
1758
1762
|
{ gap: t, sizes: e, totalCount: n },
|
|
1759
1763
|
{ fixedFooterHeight: o, fixedHeaderHeight: r, headerHeight: s, scrollingInProgress: i, scrollTop: l, viewportHeight: c },
|
|
1760
1764
|
{ scrollToIndex: d }
|
|
1761
1765
|
]) => {
|
|
1762
1766
|
const m = U();
|
|
1763
|
-
return
|
|
1767
|
+
return z(
|
|
1764
1768
|
x(
|
|
1765
1769
|
m,
|
|
1766
1770
|
$(e, c, n, s, r, o, l),
|
|
1767
1771
|
$(t),
|
|
1768
1772
|
B(([[v, p, I, w, R, h, f, a], S]) => {
|
|
1769
|
-
const { calculateViewLocation: H =
|
|
1773
|
+
const { calculateViewLocation: H = Jo, done: y, ...L } = v, u = Yn(v, p, w - 1), g = ce(u, p.offsetTree, S) + R + h, C = g + Rt(p.sizeTree, u)[1], k = a + h, O = a + I - f, V = H({
|
|
1770
1774
|
itemBottom: C,
|
|
1771
1775
|
itemTop: g,
|
|
1772
|
-
locationParams:
|
|
1773
|
-
viewportBottom:
|
|
1774
|
-
viewportTop:
|
|
1776
|
+
locationParams: L,
|
|
1777
|
+
viewportBottom: O,
|
|
1778
|
+
viewportTop: k
|
|
1775
1779
|
});
|
|
1776
|
-
return V
|
|
1780
|
+
return V === null ? y?.() : y && yt(
|
|
1777
1781
|
x(
|
|
1778
1782
|
i,
|
|
1779
1783
|
P((N) => !N),
|
|
@@ -1782,7 +1786,7 @@ const Kt = j(
|
|
|
1782
1786
|
Ut(it(i) ? 1 : 2)
|
|
1783
1787
|
),
|
|
1784
1788
|
y
|
|
1785
|
-
)
|
|
1789
|
+
), V;
|
|
1786
1790
|
}),
|
|
1787
1791
|
P((v) => v !== null)
|
|
1788
1792
|
),
|
|
@@ -1797,7 +1801,7 @@ const Kt = j(
|
|
|
1797
1801
|
function bn(t) {
|
|
1798
1802
|
return t === !1 ? !1 : t === "smooth" ? "smooth" : "auto";
|
|
1799
1803
|
}
|
|
1800
|
-
const
|
|
1804
|
+
const Qo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), tr = j(
|
|
1801
1805
|
([
|
|
1802
1806
|
{ listRefresh: t, totalCount: e, fixedItemSize: n, data: o },
|
|
1803
1807
|
{ atBottomState: r, isAtBottom: s },
|
|
@@ -1822,32 +1826,32 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
1822
1826
|
x(
|
|
1823
1827
|
at(x(W(e), Ut(1)), c),
|
|
1824
1828
|
$(W(w), s, l, v),
|
|
1825
|
-
B(([[y,
|
|
1826
|
-
let
|
|
1827
|
-
return
|
|
1829
|
+
B(([[y, L], u, g, C, k]) => {
|
|
1830
|
+
let O = L && C, V = "auto";
|
|
1831
|
+
return O && (V = Qo(u, g || k), O = O && V !== !1), { followOutputBehavior: V, shouldFollow: O, totalCount: y };
|
|
1828
1832
|
}),
|
|
1829
1833
|
P(({ shouldFollow: y }) => y)
|
|
1830
1834
|
),
|
|
1831
|
-
({ followOutputBehavior: y, totalCount:
|
|
1832
|
-
h !== null && (h(), h = null), it(n)
|
|
1833
|
-
it(m)("following output to ", { totalCount:
|
|
1834
|
-
}) :
|
|
1835
|
-
it(m)("following output to ", { totalCount:
|
|
1835
|
+
({ followOutputBehavior: y, totalCount: L }) => {
|
|
1836
|
+
h !== null && (h(), h = null), it(n) === void 0 ? h = yt(t, () => {
|
|
1837
|
+
it(m)("following output to ", { totalCount: L }, ft.DEBUG), f(y), h = null;
|
|
1838
|
+
}) : requestAnimationFrame(() => {
|
|
1839
|
+
it(m)("following output to ", { totalCount: L }, ft.DEBUG), f(y);
|
|
1836
1840
|
});
|
|
1837
1841
|
}
|
|
1838
1842
|
);
|
|
1839
1843
|
function a(y) {
|
|
1840
|
-
const
|
|
1844
|
+
const L = yt(r, (u) => {
|
|
1841
1845
|
y && !u.atBottom && u.notAtBottomBecause === "SIZE_INCREASED" && h === null && (it(m)("scrolling to bottom due to increased size", {}, ft.DEBUG), f("auto"));
|
|
1842
1846
|
});
|
|
1843
|
-
setTimeout(
|
|
1847
|
+
setTimeout(L, 100);
|
|
1844
1848
|
}
|
|
1845
1849
|
Y(
|
|
1846
1850
|
x(
|
|
1847
1851
|
at(W(w), e, d),
|
|
1848
|
-
P(([y, ,
|
|
1849
|
-
|
|
1850
|
-
({ value: y }, [,
|
|
1852
|
+
P(([y, , L]) => y !== !1 && L),
|
|
1853
|
+
Ot(
|
|
1854
|
+
({ value: y }, [, L]) => ({ refreshed: y === L, value: L }),
|
|
1851
1855
|
{ refreshed: !1, value: 0 }
|
|
1852
1856
|
),
|
|
1853
1857
|
P(({ refreshed: y }) => y),
|
|
@@ -1858,11 +1862,11 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
1858
1862
|
}
|
|
1859
1863
|
), Y(R, () => {
|
|
1860
1864
|
a(it(w) !== !1);
|
|
1861
|
-
}), Y(at(W(w), r), ([y,
|
|
1862
|
-
y !== !1 && !
|
|
1865
|
+
}), Y(at(W(w), r), ([y, L]) => {
|
|
1866
|
+
y !== !1 && !L.atBottom && L.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
|
|
1863
1867
|
});
|
|
1864
1868
|
const S = T(null), H = U();
|
|
1865
|
-
return
|
|
1869
|
+
return z(
|
|
1866
1870
|
Fe(
|
|
1867
1871
|
x(
|
|
1868
1872
|
W(o),
|
|
@@ -1875,15 +1879,15 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
1875
1879
|
x(
|
|
1876
1880
|
at(x(H, Ut(1)), c),
|
|
1877
1881
|
$(W(S), l, v, p),
|
|
1878
|
-
B(([[y,
|
|
1882
|
+
B(([[y, L], u, g, C, k]) => L && g && u?.({ context: k, totalCount: y, scrollingInProgress: C })),
|
|
1879
1883
|
P((y) => !!y),
|
|
1880
1884
|
zt(0)
|
|
1881
1885
|
),
|
|
1882
1886
|
(y) => {
|
|
1883
|
-
h !== null && (h(), h = null), it(n)
|
|
1884
|
-
it(m)("scrolling into view", {}), _(I, y);
|
|
1885
|
-
}) : h = yt(t, () => {
|
|
1887
|
+
h !== null && (h(), h = null), it(n) === void 0 ? h = yt(t, () => {
|
|
1886
1888
|
it(m)("scrolling into view", {}), _(I, y), h = null;
|
|
1889
|
+
}) : requestAnimationFrame(() => {
|
|
1890
|
+
it(m)("scrolling into view", {}), _(I, y);
|
|
1887
1891
|
});
|
|
1888
1892
|
}
|
|
1889
1893
|
), { autoscrollToBottom: R, followOutput: w, scrollIntoViewOnChange: S };
|
|
@@ -1899,8 +1903,8 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
1899
1903
|
eo,
|
|
1900
1904
|
no
|
|
1901
1905
|
)
|
|
1902
|
-
),
|
|
1903
|
-
([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (
|
|
1906
|
+
), er = j(
|
|
1907
|
+
([{ data: t, firstItemIndex: e, gap: n, sizes: o }, { initialTopMostItemIndex: r }, { initialItemCount: s, listState: i }, { didMount: l }]) => (z(
|
|
1904
1908
|
x(
|
|
1905
1909
|
l,
|
|
1906
1910
|
$(s),
|
|
@@ -1912,7 +1916,7 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
1912
1916
|
), {}),
|
|
1913
1917
|
rt(kt, me, Kt, At),
|
|
1914
1918
|
{ singleton: !0 }
|
|
1915
|
-
),
|
|
1919
|
+
), nr = j(
|
|
1916
1920
|
([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
|
|
1917
1921
|
const o = T(0);
|
|
1918
1922
|
return Y(
|
|
@@ -1945,7 +1949,7 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
1945
1949
|
), oo = j(
|
|
1946
1950
|
([{ scrollVelocity: t }]) => {
|
|
1947
1951
|
const e = T(!1), n = U(), o = T(!1);
|
|
1948
|
-
return
|
|
1952
|
+
return z(
|
|
1949
1953
|
x(
|
|
1950
1954
|
t,
|
|
1951
1955
|
$(o, e, n),
|
|
@@ -1973,7 +1977,7 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
1973
1977
|
{ singleton: !0 }
|
|
1974
1978
|
), Ze = j(([{ scrollContainerState: t, scrollTo: e }]) => {
|
|
1975
1979
|
const n = U(), o = U(), r = U(), s = T(!1), i = T(void 0);
|
|
1976
|
-
return
|
|
1980
|
+
return z(
|
|
1977
1981
|
x(
|
|
1978
1982
|
at(n, o),
|
|
1979
1983
|
B(([{ scrollTop: l, viewportHeight: c }, { offsetTop: d, listHeight: m }]) => ({
|
|
@@ -1983,7 +1987,7 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
1983
1987
|
}))
|
|
1984
1988
|
),
|
|
1985
1989
|
t
|
|
1986
|
-
),
|
|
1990
|
+
), z(
|
|
1987
1991
|
x(
|
|
1988
1992
|
e,
|
|
1989
1993
|
$(o),
|
|
@@ -2003,7 +2007,7 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
2003
2007
|
windowScrollTo: r,
|
|
2004
2008
|
windowViewportRect: o
|
|
2005
2009
|
};
|
|
2006
|
-
}, rt(It)),
|
|
2010
|
+
}, rt(It)), or = j(
|
|
2007
2011
|
([
|
|
2008
2012
|
{ sizeRanges: t, sizes: e },
|
|
2009
2013
|
{ headerHeight: n, scrollTop: o },
|
|
@@ -2012,16 +2016,16 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
2012
2016
|
{ useWindowScroll: i, windowScrollContainerState: l, windowViewportRect: c }
|
|
2013
2017
|
]) => {
|
|
2014
2018
|
const d = U(), m = T(void 0), v = T(null), p = T(null);
|
|
2015
|
-
return
|
|
2019
|
+
return z(l, v), z(c, p), Y(
|
|
2016
2020
|
x(
|
|
2017
2021
|
d,
|
|
2018
2022
|
$(e, o, i, v, p, n)
|
|
2019
2023
|
),
|
|
2020
2024
|
([I, w, R, h, f, a, S]) => {
|
|
2021
|
-
const H =
|
|
2025
|
+
const H = Mo(w.sizeTree);
|
|
2022
2026
|
h && f !== null && a !== null && (R = f.scrollTop - a.offsetTop), R -= S, I({ ranges: H, scrollTop: R });
|
|
2023
2027
|
}
|
|
2024
|
-
),
|
|
2028
|
+
), z(x(m, P(_e), B(rr)), r), z(
|
|
2025
2029
|
x(
|
|
2026
2030
|
s,
|
|
2027
2031
|
$(m),
|
|
@@ -2037,12 +2041,12 @@ const Jo = (t, e) => typeof t == "function" ? bn(t(e)) : e && bn(t), Qo = j(
|
|
|
2037
2041
|
},
|
|
2038
2042
|
rt(kt, It, me, At, Ze)
|
|
2039
2043
|
);
|
|
2040
|
-
function
|
|
2044
|
+
function rr(t) {
|
|
2041
2045
|
return { align: "start", index: 0, offset: t.scrollTop };
|
|
2042
2046
|
}
|
|
2043
|
-
const
|
|
2047
|
+
const sr = j(([{ topItemsIndexes: t }]) => {
|
|
2044
2048
|
const e = T(0);
|
|
2045
|
-
return
|
|
2049
|
+
return z(
|
|
2046
2050
|
x(
|
|
2047
2051
|
e,
|
|
2048
2052
|
P((n) => n >= 0),
|
|
@@ -2055,7 +2059,7 @@ function ro(t) {
|
|
|
2055
2059
|
let e = !1, n;
|
|
2056
2060
|
return (() => (e || (e = !0, n = t()), n));
|
|
2057
2061
|
}
|
|
2058
|
-
const
|
|
2062
|
+
const ir = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), lr = j(
|
|
2059
2063
|
([
|
|
2060
2064
|
{ deviation: t, scrollBy: e, scrollingInProgress: n, scrollTop: o },
|
|
2061
2065
|
{ isAtBottom: r, isScrolling: s, lastJumpDueToItemResize: i, scrollDirection: l },
|
|
@@ -2068,11 +2072,11 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2068
2072
|
x(
|
|
2069
2073
|
c,
|
|
2070
2074
|
$(i),
|
|
2071
|
-
|
|
2072
|
-
([, f, a, S], [{ bottom: H, items: y, offsetBottom:
|
|
2073
|
-
const C = H +
|
|
2074
|
-
let
|
|
2075
|
-
return a === u && f.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && f[0].originalIndex === 0 || (
|
|
2075
|
+
Ot(
|
|
2076
|
+
([, f, a, S], [{ bottom: H, items: y, offsetBottom: L, totalCount: u }, g]) => {
|
|
2077
|
+
const C = H + L;
|
|
2078
|
+
let k = 0;
|
|
2079
|
+
return a === u && f.length > 0 && y.length > 0 && (y[0].originalIndex === 0 && f[0].originalIndex === 0 || (k = C - S, k !== 0 && (k += g))), [k, y, u, C];
|
|
2076
2080
|
},
|
|
2077
2081
|
[0, [], 0, 0]
|
|
2078
2082
|
),
|
|
@@ -2086,7 +2090,7 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2086
2090
|
f > 0 ? (_(e, { behavior: "auto", top: -f }), _(t, 0)) : (_(t, 0), _(e, { behavior: "auto", top: -f }));
|
|
2087
2091
|
}
|
|
2088
2092
|
return Y(x(R, $(t, s)), ([f, a, S]) => {
|
|
2089
|
-
S &&
|
|
2093
|
+
S && ir() ? _(t, a - f) : h(-f);
|
|
2090
2094
|
}), Y(
|
|
2091
2095
|
x(
|
|
2092
2096
|
at(ht(s, !1), t, w),
|
|
@@ -2095,7 +2099,7 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2095
2099
|
zt(1)
|
|
2096
2100
|
),
|
|
2097
2101
|
h
|
|
2098
|
-
),
|
|
2102
|
+
), z(
|
|
2099
2103
|
x(
|
|
2100
2104
|
v,
|
|
2101
2105
|
B((f) => ({ top: -f }))
|
|
@@ -2106,18 +2110,18 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2106
2110
|
d,
|
|
2107
2111
|
$(p, m),
|
|
2108
2112
|
B(([f, { groupIndices: a, lastSize: S, sizeTree: H }, y]) => {
|
|
2109
|
-
function O
|
|
2110
|
-
return
|
|
2113
|
+
function L(O) {
|
|
2114
|
+
return O * (S + y);
|
|
2111
2115
|
}
|
|
2112
2116
|
if (a.length === 0)
|
|
2113
|
-
return
|
|
2117
|
+
return L(f);
|
|
2114
2118
|
let u = 0;
|
|
2115
2119
|
const g = ie(H, 0);
|
|
2116
|
-
let C = 0,
|
|
2120
|
+
let C = 0, k = 0;
|
|
2117
2121
|
for (; C < f; ) {
|
|
2118
2122
|
C++, u += g;
|
|
2119
|
-
let
|
|
2120
|
-
C +
|
|
2123
|
+
let O = a.length === k + 1 ? 1 / 0 : a[k + 1] - a[k] - 1;
|
|
2124
|
+
C + O > f && (u -= g, O = f - C + 1), C += O, u += L(O), k++;
|
|
2121
2125
|
}
|
|
2122
2126
|
return u;
|
|
2123
2127
|
})
|
|
@@ -2132,7 +2136,7 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2132
2136
|
), { deviation: t };
|
|
2133
2137
|
},
|
|
2134
2138
|
rt(It, pe, Kt, kt, Gt, Ue)
|
|
2135
|
-
),
|
|
2139
|
+
), cr = j(
|
|
2136
2140
|
([
|
|
2137
2141
|
t,
|
|
2138
2142
|
e,
|
|
@@ -2160,12 +2164,12 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2160
2164
|
}),
|
|
2161
2165
|
rt(
|
|
2162
2166
|
Ye,
|
|
2163
|
-
|
|
2167
|
+
er,
|
|
2164
2168
|
At,
|
|
2165
2169
|
oo,
|
|
2166
2170
|
to,
|
|
2167
|
-
|
|
2168
|
-
|
|
2171
|
+
nr,
|
|
2172
|
+
Xo,
|
|
2169
2173
|
Ze,
|
|
2170
2174
|
no,
|
|
2171
2175
|
Gt,
|
|
@@ -2195,13 +2199,13 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2195
2199
|
S,
|
|
2196
2200
|
H,
|
|
2197
2201
|
{ scrollToIndex: y },
|
|
2198
|
-
|
|
2202
|
+
L,
|
|
2199
2203
|
{ topItemCount: u },
|
|
2200
2204
|
{ groupCounts: g },
|
|
2201
2205
|
C
|
|
2202
2206
|
]) => {
|
|
2203
|
-
const { listState:
|
|
2204
|
-
return
|
|
2207
|
+
const { listState: k, minOverscanItemCount: O, topItemsIndexes: V, rangeChanged: N, ...Z } = H;
|
|
2208
|
+
return z(N, C.scrollSeekRangeChanged), z(
|
|
2205
2209
|
x(
|
|
2206
2210
|
C.windowViewportRect,
|
|
2207
2211
|
B((F) => F.visibleHeight)
|
|
@@ -2227,8 +2231,8 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2227
2231
|
...S,
|
|
2228
2232
|
groupIndices: i,
|
|
2229
2233
|
itemSize: c,
|
|
2230
|
-
listState:
|
|
2231
|
-
minOverscanItemCount:
|
|
2234
|
+
listState: k,
|
|
2235
|
+
minOverscanItemCount: O,
|
|
2232
2236
|
scrollToIndex: y,
|
|
2233
2237
|
// output
|
|
2234
2238
|
statefulTotalCount: v,
|
|
@@ -2247,17 +2251,17 @@ const sr = ro(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2247
2251
|
kt,
|
|
2248
2252
|
me,
|
|
2249
2253
|
It,
|
|
2250
|
-
|
|
2251
|
-
|
|
2254
|
+
or,
|
|
2255
|
+
tr,
|
|
2252
2256
|
Kt,
|
|
2253
2257
|
fe,
|
|
2254
|
-
|
|
2255
|
-
|
|
2258
|
+
lr,
|
|
2259
|
+
sr,
|
|
2256
2260
|
Zn,
|
|
2257
|
-
|
|
2261
|
+
cr
|
|
2258
2262
|
)
|
|
2259
2263
|
);
|
|
2260
|
-
function
|
|
2264
|
+
function ur(t, e) {
|
|
2261
2265
|
const n = {}, o = {};
|
|
2262
2266
|
let r = 0;
|
|
2263
2267
|
const s = t.length;
|
|
@@ -2267,7 +2271,7 @@ function cr(t, e) {
|
|
|
2267
2271
|
Object.hasOwn(o, i) || (n[i] = e[i]);
|
|
2268
2272
|
return n;
|
|
2269
2273
|
}
|
|
2270
|
-
const Ie = typeof document
|
|
2274
|
+
const Ie = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
|
|
2271
2275
|
function Xe(t, e, n) {
|
|
2272
2276
|
const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
|
|
2273
2277
|
function c(f, a) {
|
|
@@ -2293,20 +2297,20 @@ function Xe(t, e, n) {
|
|
|
2293
2297
|
return i.reduce((a, S) => (a[S] = yo(f[e.events[S]]), a), {});
|
|
2294
2298
|
}
|
|
2295
2299
|
const v = E.forwardRef(function(a, S) {
|
|
2296
|
-
const { children: H, ...y } = a, [
|
|
2300
|
+
const { children: H, ...y } = a, [L] = E.useState(() => ye(Ho(t), (C) => {
|
|
2297
2301
|
c(C, y);
|
|
2298
|
-
})), [u] = E.useState(mn(m,
|
|
2302
|
+
})), [u] = E.useState(mn(m, L));
|
|
2299
2303
|
Ie(() => {
|
|
2300
2304
|
for (const C of i)
|
|
2301
2305
|
C in y && Y(u[C], y[C]);
|
|
2302
2306
|
return () => {
|
|
2303
2307
|
Object.values(u).map(Ne);
|
|
2304
2308
|
};
|
|
2305
|
-
}, [y, u,
|
|
2306
|
-
c(
|
|
2307
|
-
}), E.useImperativeHandle(S, fn(d(
|
|
2309
|
+
}, [y, u, L]), Ie(() => {
|
|
2310
|
+
c(L, y);
|
|
2311
|
+
}), E.useImperativeHandle(S, fn(d(L)));
|
|
2308
2312
|
const g = n;
|
|
2309
|
-
return /* @__PURE__ */ G(l.Provider, { value:
|
|
2313
|
+
return /* @__PURE__ */ G(l.Provider, { value: L, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...ur([...o, ...r, ...i], y), children: H }) });
|
|
2310
2314
|
}), p = (f) => {
|
|
2311
2315
|
const a = E.useContext(l);
|
|
2312
2316
|
return E.useCallback(
|
|
@@ -2328,12 +2332,12 @@ function Xe(t, e, n) {
|
|
|
2328
2332
|
}, w = (f) => {
|
|
2329
2333
|
const S = E.useContext(l)[f], [H, y] = E.useState(mn(it, S));
|
|
2330
2334
|
return Ie(
|
|
2331
|
-
() => Y(S, (
|
|
2332
|
-
|
|
2335
|
+
() => Y(S, (L) => {
|
|
2336
|
+
L !== H && y(fn(L));
|
|
2333
2337
|
}),
|
|
2334
2338
|
[S, H]
|
|
2335
2339
|
), H;
|
|
2336
|
-
}, R = parseInt(E.version) >= 18 ? I : w;
|
|
2340
|
+
}, R = parseInt(E.version, 10) >= 18 ? I : w;
|
|
2337
2341
|
return {
|
|
2338
2342
|
Component: v,
|
|
2339
2343
|
useEmitter: (f, a) => {
|
|
@@ -2344,16 +2348,16 @@ function Xe(t, e, n) {
|
|
|
2344
2348
|
usePublisher: p
|
|
2345
2349
|
};
|
|
2346
2350
|
}
|
|
2347
|
-
const Re = E.createContext(void 0), io = E.createContext(void 0),
|
|
2351
|
+
const Re = E.createContext(void 0), io = E.createContext(void 0), Le = "-webkit-sticky", Rn = "sticky", Je = ro(() => {
|
|
2348
2352
|
if (typeof document > "u")
|
|
2349
2353
|
return Rn;
|
|
2350
2354
|
const t = document.createElement("div");
|
|
2351
|
-
return t.style.position =
|
|
2352
|
-
}), lo = typeof document
|
|
2355
|
+
return t.style.position = Le, t.style.position === Le ? Le : Rn;
|
|
2356
|
+
}), lo = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
|
|
2353
2357
|
function ke(t) {
|
|
2354
2358
|
return "self" in t;
|
|
2355
2359
|
}
|
|
2356
|
-
function
|
|
2360
|
+
function ar(t) {
|
|
2357
2361
|
return "body" in t;
|
|
2358
2362
|
}
|
|
2359
2363
|
function co(t, e, n, o = Jt, r, s) {
|
|
@@ -2361,7 +2365,7 @@ function co(t, e, n, o = Jt, r, s) {
|
|
|
2361
2365
|
(p) => {
|
|
2362
2366
|
let I, w, R;
|
|
2363
2367
|
const h = p.target;
|
|
2364
|
-
if (
|
|
2368
|
+
if (ar(h) || ke(h)) {
|
|
2365
2369
|
const a = ke(h) ? h : h.defaultView;
|
|
2366
2370
|
R = s === !0 ? _t(a, a.scrollX) : a.scrollY, I = s === !0 ? a.document.documentElement.scrollWidth : a.document.documentElement.scrollHeight, w = s === !0 ? a.innerWidth : a.innerHeight;
|
|
2367
2371
|
} else
|
|
@@ -2378,8 +2382,8 @@ function co(t, e, n, o = Jt, r, s) {
|
|
|
2378
2382
|
[t, e, s]
|
|
2379
2383
|
);
|
|
2380
2384
|
E.useEffect(() => {
|
|
2381
|
-
const p = r
|
|
2382
|
-
return hn(p), o(r
|
|
2385
|
+
const p = r ?? i.current;
|
|
2386
|
+
return hn(p), o(r ?? i.current), d({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", d, { passive: !0 }), () => {
|
|
2383
2387
|
hn(p), o(null), p.removeEventListener("scroll", d);
|
|
2384
2388
|
};
|
|
2385
2389
|
}, [i, d, n, o, r]);
|
|
@@ -2406,14 +2410,14 @@ function co(t, e, n, o = Jt, r, s) {
|
|
|
2406
2410
|
w ? (l.current = S, c.current && clearTimeout(c.current), c.current = setTimeout(() => {
|
|
2407
2411
|
c.current = null, l.current = null, e(!0);
|
|
2408
2412
|
}, 1e3)) : l.current = null, s === !0 && (p = {
|
|
2409
|
-
...p.behavior
|
|
2413
|
+
...p.behavior === void 0 ? {} : { behavior: p.behavior },
|
|
2410
2414
|
left: gn(I, S)
|
|
2411
2415
|
}), I.scrollTo(p);
|
|
2412
2416
|
}
|
|
2413
2417
|
function v(p) {
|
|
2414
2418
|
s === !0 && (p = {
|
|
2415
|
-
...p.behavior
|
|
2416
|
-
...p.top
|
|
2419
|
+
...p.behavior === void 0 ? {} : { behavior: p.behavior },
|
|
2420
|
+
...p.top === void 0 ? {} : { left: gn(i.current, p.top) }
|
|
2417
2421
|
}), i.current.scrollBy(p);
|
|
2418
2422
|
}
|
|
2419
2423
|
return { scrollByCallback: v, scrollerRef: i, scrollToCallback: m };
|
|
@@ -2421,7 +2425,7 @@ function co(t, e, n, o = Jt, r, s) {
|
|
|
2421
2425
|
function Qe(t) {
|
|
2422
2426
|
return t;
|
|
2423
2427
|
}
|
|
2424
|
-
const
|
|
2428
|
+
const dr = /* @__PURE__ */ j(() => {
|
|
2425
2429
|
const t = T((l) => `Item ${l}`), e = T((l) => `Group ${l}`), n = T({}), o = T(Qe), r = T("div"), s = T(Jt), i = (l, c = null) => ht(
|
|
2426
2430
|
x(
|
|
2427
2431
|
n,
|
|
@@ -2447,10 +2451,10 @@ const ar = /* @__PURE__ */ j(() => {
|
|
|
2447
2451
|
ScrollSeekPlaceholder: i("ScrollSeekPlaceholder"),
|
|
2448
2452
|
TopItemListComponent: i("TopItemList")
|
|
2449
2453
|
};
|
|
2450
|
-
}),
|
|
2454
|
+
}), fr = /* @__PURE__ */ j(
|
|
2451
2455
|
([t, e]) => ({ ...t, ...e }),
|
|
2452
|
-
rt(so,
|
|
2453
|
-
),
|
|
2456
|
+
rt(so, dr)
|
|
2457
|
+
), mr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), pr = { overflowAnchor: "none", position: Je(), zIndex: 1 }, uo = { overflowAnchor: "none" }, hr = { ...uo, display: "inline-block", height: "100%" }, Hn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2454
2458
|
const n = A("listState"), o = Ct("sizeRanges"), r = A("useWindowScroll"), s = A("customScrollParent"), i = Ct("windowScrollContainerState"), l = Ct("scrollContainerState"), c = s || r ? i : l, d = A("itemContent"), m = A("context"), v = A("groupContent"), p = A("trackItemSizes"), I = A("itemSize"), w = A("log"), R = Ct("gap"), h = A("horizontalDirection"), { callbackRef: f } = Mn(
|
|
2455
2459
|
o,
|
|
2456
2460
|
I,
|
|
@@ -2465,32 +2469,32 @@ const ar = /* @__PURE__ */ j(() => {
|
|
|
2465
2469
|
on("deviation", (F) => {
|
|
2466
2470
|
a !== F && S(F);
|
|
2467
2471
|
});
|
|
2468
|
-
const H = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") ??
|
|
2472
|
+
const H = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") ?? mr, L = A("ListComponent"), u = A("ItemComponent"), g = A("GroupComponent"), C = A("computeItemKey"), k = A("isSeeking"), O = A("groupIndices").length > 0, V = A("alignToBottom"), N = A("initialItemFinalLocationReached"), Z = e ? {} : {
|
|
2469
2473
|
boxSizing: "border-box",
|
|
2470
2474
|
...h ? {
|
|
2471
2475
|
display: "inline-block",
|
|
2472
2476
|
height: "100%",
|
|
2473
|
-
marginInlineStart: a
|
|
2477
|
+
marginInlineStart: a === 0 ? V ? "auto" : 0 : a,
|
|
2474
2478
|
paddingInlineEnd: n.offsetBottom,
|
|
2475
2479
|
paddingInlineStart: n.offsetTop,
|
|
2476
2480
|
whiteSpace: "nowrap"
|
|
2477
2481
|
} : {
|
|
2478
|
-
marginTop: a
|
|
2482
|
+
marginTop: a === 0 ? V ? "auto" : 0 : a,
|
|
2479
2483
|
paddingBottom: n.offsetBottom,
|
|
2480
2484
|
paddingTop: n.offsetTop
|
|
2481
2485
|
},
|
|
2482
2486
|
...N ? {} : { visibility: "hidden" }
|
|
2483
2487
|
};
|
|
2484
2488
|
return !e && n.totalCount === 0 && H !== null && H !== void 0 ? /* @__PURE__ */ G(H, { ...ot(H, m) }) : /* @__PURE__ */ G(
|
|
2485
|
-
|
|
2489
|
+
L,
|
|
2486
2490
|
{
|
|
2487
|
-
...ot(
|
|
2491
|
+
...ot(L, m),
|
|
2488
2492
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
2489
2493
|
ref: f,
|
|
2490
2494
|
style: Z,
|
|
2491
2495
|
children: (e ? n.topItems : n.items).map((F) => {
|
|
2492
2496
|
const mt = F.originalIndex, q = C(mt + n.firstItemIndex, F.data, m);
|
|
2493
|
-
return
|
|
2497
|
+
return k ? /* @__PURE__ */ Dt(
|
|
2494
2498
|
y,
|
|
2495
2499
|
{
|
|
2496
2500
|
...ot(y, m),
|
|
@@ -2508,7 +2512,7 @@ const ar = /* @__PURE__ */ j(() => {
|
|
|
2508
2512
|
"data-item-index": F.index,
|
|
2509
2513
|
"data-known-size": F.size,
|
|
2510
2514
|
key: q,
|
|
2511
|
-
style:
|
|
2515
|
+
style: pr
|
|
2512
2516
|
},
|
|
2513
2517
|
v(F.index, m)
|
|
2514
2518
|
) : /* @__PURE__ */ Dt(
|
|
@@ -2521,20 +2525,20 @@ const ar = /* @__PURE__ */ j(() => {
|
|
|
2521
2525
|
"data-item-index": F.index,
|
|
2522
2526
|
"data-known-size": F.size,
|
|
2523
2527
|
key: q,
|
|
2524
|
-
style: h ?
|
|
2528
|
+
style: h ? hr : uo
|
|
2525
2529
|
},
|
|
2526
|
-
|
|
2530
|
+
O ? d(F.index, F.groupIndex, F.data, m) : d(F.index, F.data, m)
|
|
2527
2531
|
);
|
|
2528
2532
|
})
|
|
2529
2533
|
}
|
|
2530
2534
|
);
|
|
2531
|
-
}),
|
|
2535
|
+
}), gr = {
|
|
2532
2536
|
height: "100%",
|
|
2533
2537
|
outline: "none",
|
|
2534
2538
|
overflowY: "auto",
|
|
2535
2539
|
position: "relative",
|
|
2536
2540
|
WebkitOverflowScrolling: "touch"
|
|
2537
|
-
},
|
|
2541
|
+
}, Ir = {
|
|
2538
2542
|
outline: "none",
|
|
2539
2543
|
overflowX: "auto",
|
|
2540
2544
|
position: "relative"
|
|
@@ -2548,7 +2552,7 @@ const ar = /* @__PURE__ */ j(() => {
|
|
|
2548
2552
|
...He(t),
|
|
2549
2553
|
position: e ? "relative" : "absolute",
|
|
2550
2554
|
top: e ? -n : 0
|
|
2551
|
-
}),
|
|
2555
|
+
}), Sr = {
|
|
2552
2556
|
position: Je(),
|
|
2553
2557
|
top: 0,
|
|
2554
2558
|
width: "100%",
|
|
@@ -2561,8 +2565,8 @@ function ot(t, e) {
|
|
|
2561
2565
|
function ao(t, e) {
|
|
2562
2566
|
return { item: typeof t == "string" ? void 0 : e };
|
|
2563
2567
|
}
|
|
2564
|
-
const
|
|
2565
|
-
const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r =
|
|
2568
|
+
const xr = /* @__PURE__ */ E.memo(function() {
|
|
2569
|
+
const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r = Lt(
|
|
2566
2570
|
E.useMemo(
|
|
2567
2571
|
() => (i) => {
|
|
2568
2572
|
n(Ht(i, "height"));
|
|
@@ -2573,8 +2577,8 @@ const Sr = /* @__PURE__ */ E.memo(function() {
|
|
|
2573
2577
|
A("skipAnimationFrameInResizeObserver")
|
|
2574
2578
|
), s = A("context");
|
|
2575
2579
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
2576
|
-
}),
|
|
2577
|
-
const e = A("FooterComponent"), n = Ct("footerHeight"), o = A("HeaderFooterTag"), r =
|
|
2580
|
+
}), vr = /* @__PURE__ */ E.memo(function() {
|
|
2581
|
+
const e = A("FooterComponent"), n = Ct("footerHeight"), o = A("HeaderFooterTag"), r = Lt(
|
|
2578
2582
|
E.useMemo(
|
|
2579
2583
|
() => (i) => {
|
|
2580
2584
|
n(Ht(i, "height"));
|
|
@@ -2602,7 +2606,7 @@ function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2602
2606
|
"data-testid": "virtuoso-scroller",
|
|
2603
2607
|
"data-virtuoso-scroller": !0,
|
|
2604
2608
|
ref: R,
|
|
2605
|
-
style: { ...I ?
|
|
2609
|
+
style: { ...I ? Ir : gr, ...i },
|
|
2606
2610
|
tabIndex: 0,
|
|
2607
2611
|
...c,
|
|
2608
2612
|
...ot(m, l),
|
|
@@ -2620,14 +2624,14 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2620
2624
|
h,
|
|
2621
2625
|
w
|
|
2622
2626
|
);
|
|
2623
|
-
return lo(() => (a.current = w
|
|
2627
|
+
return lo(() => (a.current = w ?? R.current?.ownerDocument.defaultView, () => {
|
|
2624
2628
|
a.current = null;
|
|
2625
2629
|
}), [a, w]), t("windowScrollTo", S), t("scrollBy", f), /* @__PURE__ */ G(
|
|
2626
2630
|
m,
|
|
2627
2631
|
{
|
|
2628
2632
|
ref: R,
|
|
2629
2633
|
"data-virtuoso-scroller": !0,
|
|
2630
|
-
style: { position: "relative", ...i, ...p
|
|
2634
|
+
style: { position: "relative", ...i, ...p === 0 ? void 0 : { height: p + I } },
|
|
2631
2635
|
...c,
|
|
2632
2636
|
...ot(m, l),
|
|
2633
2637
|
children: s
|
|
@@ -2635,15 +2639,15 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2635
2639
|
);
|
|
2636
2640
|
});
|
|
2637
2641
|
}
|
|
2638
|
-
const
|
|
2642
|
+
const Tr = ({ children: t }) => {
|
|
2639
2643
|
const e = E.useContext(Re), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
|
|
2640
2644
|
() => re(n, (c) => Ht(c, s ? "width" : "height")),
|
|
2641
2645
|
[n, s]
|
|
2642
|
-
), l =
|
|
2646
|
+
), l = Lt(i, !0, A("skipAnimationFrameInResizeObserver"));
|
|
2643
2647
|
return E.useEffect(() => {
|
|
2644
2648
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2645
2649
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: l, style: He(r), children: t });
|
|
2646
|
-
},
|
|
2650
|
+
}, Cr = ({ children: t }) => {
|
|
2647
2651
|
const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = $e(
|
|
2648
2652
|
n,
|
|
2649
2653
|
r,
|
|
@@ -2652,17 +2656,17 @@ const vr = ({ children: t }) => {
|
|
|
2652
2656
|
return E.useEffect(() => {
|
|
2653
2657
|
e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2654
2658
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: tn(c, s, i), children: t });
|
|
2655
|
-
},
|
|
2656
|
-
const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...
|
|
2659
|
+
}, wr = ({ children: t }) => {
|
|
2660
|
+
const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...Sr, marginTop: `${n}px` }, r = A("context");
|
|
2657
2661
|
return /* @__PURE__ */ G(e, { style: o, ...ot(e, r), children: t });
|
|
2658
|
-
},
|
|
2662
|
+
}, yr = /* @__PURE__ */ E.memo(function(e) {
|
|
2659
2663
|
const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
|
|
2660
|
-
return /* @__PURE__ */ $t(r || n ?
|
|
2661
|
-
o && /* @__PURE__ */ G(
|
|
2662
|
-
/* @__PURE__ */ $t(r || n ?
|
|
2663
|
-
/* @__PURE__ */ G(
|
|
2664
|
+
return /* @__PURE__ */ $t(r || n ? Rr : br, { ...e, context: s, children: [
|
|
2665
|
+
o && /* @__PURE__ */ G(wr, { children: /* @__PURE__ */ G(Hn, { showTopList: !0 }) }),
|
|
2666
|
+
/* @__PURE__ */ $t(r || n ? Cr : Tr, { children: [
|
|
2667
|
+
/* @__PURE__ */ G(xr, {}),
|
|
2664
2668
|
/* @__PURE__ */ G(Hn, {}),
|
|
2665
|
-
/* @__PURE__ */ G(
|
|
2669
|
+
/* @__PURE__ */ G(vr, {})
|
|
2666
2670
|
] })
|
|
2667
2671
|
] });
|
|
2668
2672
|
}), {
|
|
@@ -2671,7 +2675,7 @@ const vr = ({ children: t }) => {
|
|
|
2671
2675
|
useEmitterValue: A,
|
|
2672
2676
|
usePublisher: Ct
|
|
2673
2677
|
} = /* @__PURE__ */ Xe(
|
|
2674
|
-
|
|
2678
|
+
fr,
|
|
2675
2679
|
{
|
|
2676
2680
|
optional: {
|
|
2677
2681
|
restoreStateFrom: "restoreStateFrom",
|
|
@@ -2731,8 +2735,8 @@ const vr = ({ children: t }) => {
|
|
|
2731
2735
|
groupIndices: "groupIndices"
|
|
2732
2736
|
}
|
|
2733
2737
|
},
|
|
2734
|
-
|
|
2735
|
-
),
|
|
2738
|
+
yr
|
|
2739
|
+
), br = /* @__PURE__ */ en({ useEmitter: on, useEmitterValue: A, usePublisher: Ct }), Rr = /* @__PURE__ */ nn({ useEmitter: on, useEmitterValue: A, usePublisher: Ct }), os = fo, rs = fo, Hr = /* @__PURE__ */ j(() => {
|
|
2736
2740
|
const t = T((d) => /* @__PURE__ */ $t("td", { children: [
|
|
2737
2741
|
"Item $",
|
|
2738
2742
|
d
|
|
@@ -2767,11 +2771,11 @@ const vr = ({ children: t }) => {
|
|
|
2767
2771
|
TableRowComponent: c("TableRow", "tr"),
|
|
2768
2772
|
GroupComponent: c("Group", "tr")
|
|
2769
2773
|
};
|
|
2770
|
-
}),
|
|
2774
|
+
}), Er = /* @__PURE__ */ j(
|
|
2771
2775
|
([t, e]) => ({ ...t, ...e }),
|
|
2772
|
-
rt(so,
|
|
2773
|
-
),
|
|
2774
|
-
const n = M("listState"), o = M("computeItemKey"), r = M("firstItemIndex"), s = M("context"), i = M("isSeeking"), l = M("fixedHeaderHeight"), c = M("groupIndices").length > 0, d = M("itemContent"), m = M("groupContent"), v = M("ScrollSeekPlaceholder") ??
|
|
2776
|
+
rt(so, Hr)
|
|
2777
|
+
), Br = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Or = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), Lr = { overflowAnchor: "none" }, En = { position: Je(), zIndex: 2, overflowAnchor: "none" }, Bn = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2778
|
+
const n = M("listState"), o = M("computeItemKey"), r = M("firstItemIndex"), s = M("context"), i = M("isSeeking"), l = M("fixedHeaderHeight"), c = M("groupIndices").length > 0, d = M("itemContent"), m = M("groupContent"), v = M("ScrollSeekPlaceholder") ?? Br, p = M("GroupComponent"), I = M("TableRowComponent"), w = (e ? n.topItems : []).reduce((h, f, a) => (a === 0 ? h.push(f.size) : h.push(h[a - 1] + f.size), h), []);
|
|
2775
2779
|
return (e ? n.topItems : n.items).map((h) => {
|
|
2776
2780
|
const f = h.originalIndex, a = o(f + r, h.data, s), S = e ? f === 0 ? 0 : w[f - 1] : 0;
|
|
2777
2781
|
return i ? /* @__PURE__ */ Dt(
|
|
@@ -2812,7 +2816,7 @@ const vr = ({ children: t }) => {
|
|
|
2812
2816
|
c ? d(h.index, h.groupIndex, h.data, s) : d(h.index, h.data, s)
|
|
2813
2817
|
);
|
|
2814
2818
|
});
|
|
2815
|
-
}),
|
|
2819
|
+
}), kr = /* @__PURE__ */ E.memo(function() {
|
|
2816
2820
|
const e = M("listState"), n = M("topItemsIndexes").length > 0, o = bt("sizeRanges"), r = M("useWindowScroll"), s = M("customScrollParent"), i = bt("windowScrollContainerState"), l = bt("scrollContainerState"), c = s || r ? i : l, d = M("trackItemSizes"), m = M("itemSize"), v = M("log"), { callbackRef: p, ref: I } = Mn(
|
|
2817
2821
|
o,
|
|
2818
2822
|
m,
|
|
@@ -2824,21 +2828,21 @@ const vr = ({ children: t }) => {
|
|
|
2824
2828
|
!1,
|
|
2825
2829
|
M("skipAnimationFrameInResizeObserver")
|
|
2826
2830
|
), [w, R] = E.useState(0);
|
|
2827
|
-
rn("deviation", (
|
|
2828
|
-
w !==
|
|
2831
|
+
rn("deviation", (O) => {
|
|
2832
|
+
w !== O && (I.current.style.marginTop = `${O}px`, R(O));
|
|
2829
2833
|
});
|
|
2830
|
-
const h = M("EmptyPlaceholder"), f = M("FillerRow") ??
|
|
2834
|
+
const h = M("EmptyPlaceholder"), f = M("FillerRow") ?? Or, a = M("TableBodyComponent"), S = M("paddingTopAddition"), H = M("statefulTotalCount"), y = M("context");
|
|
2831
2835
|
if (H === 0 && h !== null && h !== void 0)
|
|
2832
2836
|
return /* @__PURE__ */ G(h, { ...ot(h, y) });
|
|
2833
|
-
const
|
|
2837
|
+
const L = (n ? e.topItems : []).reduce((O, V) => O + V.size, 0), u = e.offsetTop + S + w - L, g = e.offsetBottom, C = u > 0 ? /* @__PURE__ */ G(f, { context: y, height: u }, "padding-top") : null, k = g > 0 ? /* @__PURE__ */ G(f, { context: y, height: g }, "padding-bottom") : null;
|
|
2834
2838
|
return /* @__PURE__ */ $t(a, { "data-testid": "virtuoso-item-list", ref: p, ...ot(a, y), children: [
|
|
2835
2839
|
C,
|
|
2836
2840
|
n && /* @__PURE__ */ G(Bn, { showTopList: !0 }),
|
|
2837
2841
|
/* @__PURE__ */ G(Bn, {}),
|
|
2838
|
-
|
|
2842
|
+
k
|
|
2839
2843
|
] });
|
|
2840
|
-
}),
|
|
2841
|
-
const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r =
|
|
2844
|
+
}), zr = ({ children: t }) => {
|
|
2845
|
+
const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = Lt(
|
|
2842
2846
|
E.useMemo(() => re(n, (s) => Ht(s, "height")), [n]),
|
|
2843
2847
|
!0,
|
|
2844
2848
|
M("skipAnimationFrameInResizeObserver")
|
|
@@ -2846,7 +2850,7 @@ const vr = ({ children: t }) => {
|
|
|
2846
2850
|
return E.useEffect(() => {
|
|
2847
2851
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2848
2852
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: r, style: He(!1), children: t });
|
|
2849
|
-
},
|
|
2853
|
+
}, Fr = ({ children: t }) => {
|
|
2850
2854
|
const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r = M("customScrollParent"), s = M("useWindowScroll"), i = $e(
|
|
2851
2855
|
n,
|
|
2852
2856
|
r,
|
|
@@ -2855,16 +2859,16 @@ const vr = ({ children: t }) => {
|
|
|
2855
2859
|
return E.useEffect(() => {
|
|
2856
2860
|
e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2857
2861
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: tn(!1, s), children: t });
|
|
2858
|
-
},
|
|
2859
|
-
const n = M("useWindowScroll"), o = M("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = M("fixedHeaderContent"), l = M("fixedFooterContent"), c = M("context"), d =
|
|
2862
|
+
}, Vr = /* @__PURE__ */ E.memo(function(e) {
|
|
2863
|
+
const n = M("useWindowScroll"), o = M("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = M("fixedHeaderContent"), l = M("fixedFooterContent"), c = M("context"), d = Lt(
|
|
2860
2864
|
E.useMemo(() => re(r, (a) => Ht(a, "height")), [r]),
|
|
2861
2865
|
!0,
|
|
2862
2866
|
M("skipAnimationFrameInResizeObserver")
|
|
2863
|
-
), m =
|
|
2867
|
+
), m = Lt(
|
|
2864
2868
|
E.useMemo(() => re(s, (a) => Ht(a, "height")), [s]),
|
|
2865
2869
|
!0,
|
|
2866
2870
|
M("skipAnimationFrameInResizeObserver")
|
|
2867
|
-
), v = o || n ?
|
|
2871
|
+
), v = o || n ? Pr : Wr, p = o || n ? Fr : zr, I = M("TableComponent"), w = M("TableHeadComponent"), R = M("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
|
|
2868
2872
|
w,
|
|
2869
2873
|
{
|
|
2870
2874
|
ref: d,
|
|
@@ -2885,7 +2889,7 @@ const vr = ({ children: t }) => {
|
|
|
2885
2889
|
) : null;
|
|
2886
2890
|
return /* @__PURE__ */ G(v, { ...e, ...ot(v, c), children: /* @__PURE__ */ G(p, { children: /* @__PURE__ */ $t(I, { style: { borderSpacing: 0, overflowAnchor: "none" }, ...ot(I, c), children: [
|
|
2887
2891
|
h,
|
|
2888
|
-
/* @__PURE__ */ G(
|
|
2892
|
+
/* @__PURE__ */ G(kr, {}, "TableBody"),
|
|
2889
2893
|
f
|
|
2890
2894
|
] }) }) });
|
|
2891
2895
|
}), {
|
|
@@ -2894,7 +2898,7 @@ const vr = ({ children: t }) => {
|
|
|
2894
2898
|
useEmitterValue: M,
|
|
2895
2899
|
usePublisher: bt
|
|
2896
2900
|
} = /* @__PURE__ */ Xe(
|
|
2897
|
-
|
|
2901
|
+
Er,
|
|
2898
2902
|
{
|
|
2899
2903
|
optional: {
|
|
2900
2904
|
restoreStateFrom: "restoreStateFrom",
|
|
@@ -2950,8 +2954,8 @@ const vr = ({ children: t }) => {
|
|
|
2950
2954
|
groupIndices: "groupIndices"
|
|
2951
2955
|
}
|
|
2952
2956
|
},
|
|
2953
|
-
|
|
2954
|
-
),
|
|
2957
|
+
Vr
|
|
2958
|
+
), Wr = /* @__PURE__ */ en({ useEmitter: rn, useEmitterValue: M, usePublisher: bt }), Pr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: M, usePublisher: bt }), ss = mo, is = mo, On = {
|
|
2955
2959
|
bottom: 0,
|
|
2956
2960
|
itemHeight: 0,
|
|
2957
2961
|
items: [],
|
|
@@ -2959,7 +2963,7 @@ const vr = ({ children: t }) => {
|
|
|
2959
2963
|
offsetBottom: 0,
|
|
2960
2964
|
offsetTop: 0,
|
|
2961
2965
|
top: 0
|
|
2962
|
-
},
|
|
2966
|
+
}, Gr = {
|
|
2963
2967
|
bottom: 0,
|
|
2964
2968
|
itemHeight: 0,
|
|
2965
2969
|
items: [{ index: 0 }],
|
|
@@ -2967,23 +2971,23 @@ const vr = ({ children: t }) => {
|
|
|
2967
2971
|
offsetBottom: 0,
|
|
2968
2972
|
offsetTop: 0,
|
|
2969
2973
|
top: 0
|
|
2970
|
-
}, { ceil:
|
|
2974
|
+
}, { ceil: Ln, floor: Ce, max: oe, min: ze, round: kn } = Math;
|
|
2971
2975
|
function zn(t, e, n) {
|
|
2972
2976
|
return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
|
|
2973
2977
|
}
|
|
2974
|
-
function
|
|
2978
|
+
function Ar(t) {
|
|
2975
2979
|
return {
|
|
2976
|
-
...
|
|
2980
|
+
...Gr,
|
|
2977
2981
|
items: t
|
|
2978
2982
|
};
|
|
2979
2983
|
}
|
|
2980
2984
|
function Se(t, e) {
|
|
2981
2985
|
return t !== void 0 && t.width === e.width && t.height === e.height;
|
|
2982
2986
|
}
|
|
2983
|
-
function
|
|
2987
|
+
function Mr(t, e) {
|
|
2984
2988
|
return t !== void 0 && t.column === e.column && t.row === e.row;
|
|
2985
2989
|
}
|
|
2986
|
-
const
|
|
2990
|
+
const _r = /* @__PURE__ */ j(
|
|
2987
2991
|
([
|
|
2988
2992
|
{ increaseViewportBy: t, listBoundary: e, overscan: n, visibleRange: o },
|
|
2989
2993
|
{ footerHeight: r, headerHeight: s, scrollBy: i, scrollContainerState: l, scrollTo: c, scrollTop: d, smoothScrollTargetReached: m, viewportHeight: v },
|
|
@@ -2993,7 +2997,7 @@ const Mr = /* @__PURE__ */ j(
|
|
|
2993
2997
|
{ customScrollParent: h, useWindowScroll: f, windowScrollContainerState: a, windowScrollTo: S, windowViewportRect: H },
|
|
2994
2998
|
y
|
|
2995
2999
|
]) => {
|
|
2996
|
-
const
|
|
3000
|
+
const L = T(0), u = T(0), g = T(On), C = T({ height: 0, width: 0 }), k = T({ height: 0, width: 0 }), O = U(), V = U(), N = T(0), Z = T(null), F = T({ column: 0, row: 0 }), mt = U(), q = U(), Q = T(!1), gt = T(0), ut = T(!0), St = T(!1), Ft = T(!1);
|
|
2997
3001
|
Y(
|
|
2998
3002
|
x(
|
|
2999
3003
|
w,
|
|
@@ -3005,17 +3009,17 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3005
3009
|
}
|
|
3006
3010
|
), Y(
|
|
3007
3011
|
x(
|
|
3008
|
-
at(w, ut,
|
|
3012
|
+
at(w, ut, k, C, gt, St),
|
|
3009
3013
|
P(([b, D, K, st, , tt]) => b && !D && K.height !== 0 && st.height !== 0 && !tt)
|
|
3010
3014
|
),
|
|
3011
3015
|
([, , , , b]) => {
|
|
3012
3016
|
_(St, !0), je(1, () => {
|
|
3013
|
-
_(
|
|
3017
|
+
_(O, b);
|
|
3014
3018
|
}), yt(x(d), () => {
|
|
3015
3019
|
_(e, [0, 0]), _(ut, !0);
|
|
3016
3020
|
});
|
|
3017
3021
|
}
|
|
3018
|
-
),
|
|
3022
|
+
), z(
|
|
3019
3023
|
x(
|
|
3020
3024
|
q,
|
|
3021
3025
|
P((b) => b != null && b.scrollTop > 0),
|
|
@@ -3029,21 +3033,21 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3029
3033
|
P(([, b]) => b != null)
|
|
3030
3034
|
),
|
|
3031
3035
|
([, b]) => {
|
|
3032
|
-
b && (_(C, b.viewport), _(
|
|
3036
|
+
b && (_(C, b.viewport), _(k, b.item), _(F, b.gap), b.scrollTop > 0 && (_(Q, !0), yt(x(d, Ut(1)), (D) => {
|
|
3033
3037
|
_(Q, !1);
|
|
3034
3038
|
}), _(c, { top: b.scrollTop })));
|
|
3035
3039
|
}
|
|
3036
|
-
),
|
|
3040
|
+
), z(
|
|
3037
3041
|
x(
|
|
3038
3042
|
C,
|
|
3039
3043
|
B(({ height: b }) => b)
|
|
3040
3044
|
),
|
|
3041
3045
|
v
|
|
3042
|
-
),
|
|
3046
|
+
), z(
|
|
3043
3047
|
x(
|
|
3044
3048
|
at(
|
|
3045
3049
|
W(C, Se),
|
|
3046
|
-
W(
|
|
3050
|
+
W(k, Se),
|
|
3047
3051
|
W(F, (b, D) => b !== void 0 && b.column === D.column && b.row === D.row),
|
|
3048
3052
|
W(d)
|
|
3049
3053
|
),
|
|
@@ -3055,13 +3059,13 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3055
3059
|
}))
|
|
3056
3060
|
),
|
|
3057
3061
|
mt
|
|
3058
|
-
),
|
|
3062
|
+
), z(
|
|
3059
3063
|
x(
|
|
3060
3064
|
at(
|
|
3061
|
-
W(
|
|
3065
|
+
W(L),
|
|
3062
3066
|
o,
|
|
3063
|
-
W(F,
|
|
3064
|
-
W(
|
|
3067
|
+
W(F, Mr),
|
|
3068
|
+
W(k, Se),
|
|
3065
3069
|
W(C, Se),
|
|
3066
3070
|
W(Z),
|
|
3067
3071
|
W(u),
|
|
@@ -3085,30 +3089,30 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3085
3089
|
]) => {
|
|
3086
3090
|
const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width: sn } = X;
|
|
3087
3091
|
if (xt === 0 && (b === 0 || sn === 0))
|
|
3088
|
-
return
|
|
3092
|
+
return On;
|
|
3089
3093
|
if (Ee === 0) {
|
|
3090
3094
|
const dn = qe(Vt, b), Io = dn + Math.max(xt - 1, 0);
|
|
3091
|
-
return
|
|
3095
|
+
return Ar(zn(dn, Io, lt));
|
|
3092
3096
|
}
|
|
3093
3097
|
const ge = po(sn, Ee, Wt);
|
|
3094
3098
|
let qt, Mt;
|
|
3095
|
-
ct ? D === 0 && K === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), Mt = ge *
|
|
3096
|
-
const ln = zn(qt, Mt, lt), { bottom: cn, top: un } = Fn(X, st, tt, ln), an =
|
|
3099
|
+
ct ? D === 0 && K === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), Mt = ge * Ln((K + ee) / (he + ee)) - 1, Mt = ze(b - 1, oe(Mt, ge - 1)), qt = ze(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
|
|
3100
|
+
const ln = zn(qt, Mt, lt), { bottom: cn, top: un } = Fn(X, st, tt, ln), an = Ln(b / ge), go = an * he + (an - 1) * ee - cn;
|
|
3097
3101
|
return { bottom: cn, itemHeight: he, items: ln, itemWidth: Ee, offsetBottom: go, offsetTop: un, top: un };
|
|
3098
3102
|
}
|
|
3099
3103
|
)
|
|
3100
3104
|
),
|
|
3101
3105
|
g
|
|
3102
|
-
),
|
|
3106
|
+
), z(
|
|
3103
3107
|
x(
|
|
3104
3108
|
Z,
|
|
3105
3109
|
P((b) => b !== null),
|
|
3106
3110
|
B((b) => b.length)
|
|
3107
3111
|
),
|
|
3108
|
-
|
|
3109
|
-
),
|
|
3112
|
+
L
|
|
3113
|
+
), z(
|
|
3110
3114
|
x(
|
|
3111
|
-
at(C,
|
|
3115
|
+
at(C, k, g, F),
|
|
3112
3116
|
P(([b, D, { items: K }]) => K.length > 0 && D.height !== 0 && b.height !== 0),
|
|
3113
3117
|
B(([b, D, { items: K }, st]) => {
|
|
3114
3118
|
const { bottom: tt, top: X } = Fn(b, st, D, K);
|
|
@@ -3119,7 +3123,7 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3119
3123
|
e
|
|
3120
3124
|
);
|
|
3121
3125
|
const pt = T(!1);
|
|
3122
|
-
|
|
3126
|
+
z(
|
|
3123
3127
|
x(
|
|
3124
3128
|
d,
|
|
3125
3129
|
$(pt),
|
|
@@ -3129,7 +3133,7 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3129
3133
|
);
|
|
3130
3134
|
const jt = Tt(
|
|
3131
3135
|
x(
|
|
3132
|
-
at(g,
|
|
3136
|
+
at(g, L),
|
|
3133
3137
|
P(([{ items: b }]) => b.length > 0),
|
|
3134
3138
|
$(pt),
|
|
3135
3139
|
P(([[b, D], K]) => {
|
|
@@ -3159,10 +3163,10 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3159
3163
|
zt(0)
|
|
3160
3164
|
)
|
|
3161
3165
|
);
|
|
3162
|
-
|
|
3166
|
+
z(Et, I.scrollSeekRangeChanged), z(
|
|
3163
3167
|
x(
|
|
3164
|
-
|
|
3165
|
-
$(C,
|
|
3168
|
+
O,
|
|
3169
|
+
$(C, k, L, F),
|
|
3166
3170
|
B(([b, D, K, st, tt]) => {
|
|
3167
3171
|
const X = Xn(b), { align: lt, behavior: xt, offset: ct } = X;
|
|
3168
3172
|
let Vt = X.index;
|
|
@@ -3180,7 +3184,7 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3180
3184
|
),
|
|
3181
3185
|
0
|
|
3182
3186
|
);
|
|
3183
|
-
return
|
|
3187
|
+
return z(
|
|
3184
3188
|
x(
|
|
3185
3189
|
H,
|
|
3186
3190
|
B((b) => ({ height: b.visibleHeight, width: b.visibleWidth }))
|
|
@@ -3196,17 +3200,17 @@ const Mr = /* @__PURE__ */ j(
|
|
|
3196
3200
|
headerHeight: s,
|
|
3197
3201
|
increaseViewportBy: t,
|
|
3198
3202
|
initialItemCount: u,
|
|
3199
|
-
itemDimensions:
|
|
3203
|
+
itemDimensions: k,
|
|
3200
3204
|
overscan: n,
|
|
3201
3205
|
restoreStateFrom: q,
|
|
3202
3206
|
scrollBy: i,
|
|
3203
3207
|
scrollContainerState: l,
|
|
3204
3208
|
scrollHeight: V,
|
|
3205
3209
|
scrollTo: c,
|
|
3206
|
-
scrollToIndex:
|
|
3210
|
+
scrollToIndex: O,
|
|
3207
3211
|
scrollTop: d,
|
|
3208
3212
|
smoothScrollTargetReached: m,
|
|
3209
|
-
totalCount:
|
|
3213
|
+
totalCount: L,
|
|
3210
3214
|
useWindowScroll: f,
|
|
3211
3215
|
viewportDimensions: C,
|
|
3212
3216
|
windowScrollContainerState: a,
|
|
@@ -3244,7 +3248,7 @@ function Me(t, e, n, o) {
|
|
|
3244
3248
|
const r = po(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
|
|
3245
3249
|
return i > 0 ? i + e.row : i;
|
|
3246
3250
|
}
|
|
3247
|
-
const
|
|
3251
|
+
const Nr = /* @__PURE__ */ j(() => {
|
|
3248
3252
|
const t = T((v) => `Item ${v}`), e = T({}), n = T(null), o = T("virtuoso-grid-item"), r = T("virtuoso-grid-list"), s = T(Qe), i = T("div"), l = T(Jt), c = (v, p = null) => ht(
|
|
3249
3253
|
x(
|
|
3250
3254
|
e,
|
|
@@ -3253,7 +3257,7 @@ const _r = /* @__PURE__ */ j(() => {
|
|
|
3253
3257
|
),
|
|
3254
3258
|
p
|
|
3255
3259
|
), d = T(!1), m = T(!1);
|
|
3256
|
-
return
|
|
3260
|
+
return z(W(m), d), {
|
|
3257
3261
|
components: e,
|
|
3258
3262
|
computeItemKey: s,
|
|
3259
3263
|
context: n,
|
|
@@ -3271,19 +3275,19 @@ const _r = /* @__PURE__ */ j(() => {
|
|
|
3271
3275
|
scrollerRef: l,
|
|
3272
3276
|
ScrollSeekPlaceholder: c("ScrollSeekPlaceholder", "div")
|
|
3273
3277
|
};
|
|
3274
|
-
}),
|
|
3278
|
+
}), Dr = /* @__PURE__ */ j(
|
|
3275
3279
|
([t, e]) => ({ ...t, ...e }),
|
|
3276
|
-
rt(
|
|
3277
|
-
),
|
|
3278
|
-
const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = wt("scrollHeight"), c = et("ItemComponent"), d = et("ListComponent"), m = et("ScrollSeekPlaceholder"), v = et("context"), p = wt("itemDimensions"), I = wt("gap"), w = et("log"), R = et("stateRestoreInProgress"), h = wt("reportReadyState"), f =
|
|
3280
|
+
rt(_r, Nr)
|
|
3281
|
+
), $r = /* @__PURE__ */ E.memo(function() {
|
|
3282
|
+
const e = et("gridState"), n = et("listClassName"), o = et("itemClassName"), r = et("itemContent"), s = et("computeItemKey"), i = et("isSeeking"), l = wt("scrollHeight"), c = et("ItemComponent"), d = et("ListComponent"), m = et("ScrollSeekPlaceholder"), v = et("context"), p = wt("itemDimensions"), I = wt("gap"), w = et("log"), R = et("stateRestoreInProgress"), h = wt("reportReadyState"), f = Lt(
|
|
3279
3283
|
E.useMemo(
|
|
3280
3284
|
() => (a) => {
|
|
3281
3285
|
const S = a.parentElement.parentElement.scrollHeight;
|
|
3282
3286
|
l(S);
|
|
3283
3287
|
const H = a.firstChild;
|
|
3284
3288
|
if (H !== null) {
|
|
3285
|
-
const { height: y, width:
|
|
3286
|
-
p({ height: y, width:
|
|
3289
|
+
const { height: y, width: L } = H.getBoundingClientRect();
|
|
3290
|
+
p({ height: y, width: L });
|
|
3287
3291
|
}
|
|
3288
3292
|
I({
|
|
3289
3293
|
column: Vn("column-gap", getComputedStyle(a).columnGap, w),
|
|
@@ -3329,8 +3333,8 @@ const _r = /* @__PURE__ */ j(() => {
|
|
|
3329
3333
|
})
|
|
3330
3334
|
}
|
|
3331
3335
|
);
|
|
3332
|
-
}),
|
|
3333
|
-
const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r =
|
|
3336
|
+
}), Ur = E.memo(function() {
|
|
3337
|
+
const e = et("HeaderComponent"), n = wt("headerHeight"), o = et("headerFooterTag"), r = Lt(
|
|
3334
3338
|
E.useMemo(
|
|
3335
3339
|
() => (i) => {
|
|
3336
3340
|
n(Ht(i, "height"));
|
|
@@ -3341,8 +3345,8 @@ const _r = /* @__PURE__ */ j(() => {
|
|
|
3341
3345
|
!1
|
|
3342
3346
|
), s = et("context");
|
|
3343
3347
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
3344
|
-
}),
|
|
3345
|
-
const e = et("FooterComponent"), n = wt("footerHeight"), o = et("headerFooterTag"), r =
|
|
3348
|
+
}), Kr = E.memo(function() {
|
|
3349
|
+
const e = et("FooterComponent"), n = wt("footerHeight"), o = et("headerFooterTag"), r = Lt(
|
|
3346
3350
|
E.useMemo(
|
|
3347
3351
|
() => (i) => {
|
|
3348
3352
|
n(Ht(i, "height"));
|
|
@@ -3353,8 +3357,8 @@ const _r = /* @__PURE__ */ j(() => {
|
|
|
3353
3357
|
!1
|
|
3354
3358
|
), s = et("context");
|
|
3355
3359
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
3356
|
-
}),
|
|
3357
|
-
const e = E.useContext(io), n = wt("itemDimensions"), o = wt("viewportDimensions"), r =
|
|
3360
|
+
}), jr = ({ children: t }) => {
|
|
3361
|
+
const e = E.useContext(io), n = wt("itemDimensions"), o = wt("viewportDimensions"), r = Lt(
|
|
3358
3362
|
E.useMemo(
|
|
3359
3363
|
() => (s) => {
|
|
3360
3364
|
o(s.getBoundingClientRect());
|
|
@@ -3367,25 +3371,25 @@ const _r = /* @__PURE__ */ j(() => {
|
|
|
3367
3371
|
return E.useEffect(() => {
|
|
3368
3372
|
e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
|
|
3369
3373
|
}, [e, o, n]), /* @__PURE__ */ G("div", { ref: r, style: He(!1), children: t });
|
|
3370
|
-
},
|
|
3374
|
+
}, qr = ({ children: t }) => {
|
|
3371
3375
|
const e = E.useContext(io), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i = $e(n, r, !1);
|
|
3372
3376
|
return E.useEffect(() => {
|
|
3373
3377
|
e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
|
|
3374
3378
|
}, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: tn(!1, s), children: t });
|
|
3375
|
-
},
|
|
3376
|
-
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ?
|
|
3379
|
+
}, Yr = /* @__PURE__ */ E.memo(function({ ...e }) {
|
|
3380
|
+
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Jr : Xr, s = o || n ? qr : jr, i = et("context");
|
|
3377
3381
|
return /* @__PURE__ */ G(r, { ...e, ...ot(r, i), children: /* @__PURE__ */ $t(s, { children: [
|
|
3382
|
+
/* @__PURE__ */ G(Ur, {}),
|
|
3378
3383
|
/* @__PURE__ */ G($r, {}),
|
|
3379
|
-
/* @__PURE__ */ G(
|
|
3380
|
-
/* @__PURE__ */ G(Ur, {})
|
|
3384
|
+
/* @__PURE__ */ G(Kr, {})
|
|
3381
3385
|
] }) });
|
|
3382
3386
|
}), {
|
|
3383
|
-
Component:
|
|
3387
|
+
Component: Zr,
|
|
3384
3388
|
useEmitter: ho,
|
|
3385
3389
|
useEmitterValue: et,
|
|
3386
3390
|
usePublisher: wt
|
|
3387
3391
|
} = /* @__PURE__ */ Xe(
|
|
3388
|
-
|
|
3392
|
+
Dr,
|
|
3389
3393
|
{
|
|
3390
3394
|
optional: {
|
|
3391
3395
|
context: "context",
|
|
@@ -3424,19 +3428,19 @@ const _r = /* @__PURE__ */ j(() => {
|
|
|
3424
3428
|
readyStateChanged: "readyStateChanged"
|
|
3425
3429
|
}
|
|
3426
3430
|
},
|
|
3427
|
-
|
|
3428
|
-
),
|
|
3431
|
+
Yr
|
|
3432
|
+
), Xr = /* @__PURE__ */ en({ useEmitter: ho, useEmitterValue: et, usePublisher: wt }), Jr = /* @__PURE__ */ nn({ useEmitter: ho, useEmitterValue: et, usePublisher: wt });
|
|
3429
3433
|
function Vn(t, e, n) {
|
|
3430
3434
|
return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
|
|
3431
3435
|
}
|
|
3432
|
-
const
|
|
3436
|
+
const ls = Zr;
|
|
3433
3437
|
export {
|
|
3434
|
-
|
|
3435
|
-
|
|
3438
|
+
is as GroupedTableVirtuoso,
|
|
3439
|
+
rs as GroupedVirtuoso,
|
|
3436
3440
|
ft as LogLevel,
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3441
|
+
ss as TableVirtuoso,
|
|
3442
|
+
os as Virtuoso,
|
|
3443
|
+
ls as VirtuosoGrid,
|
|
3440
3444
|
io as VirtuosoGridMockContext,
|
|
3441
3445
|
Re as VirtuosoMockContext
|
|
3442
3446
|
};
|