react-virtuoso 4.18.9 → 4.18.10
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.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +224 -214
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as G, jsxs as $t } from "react/jsx-runtime";
|
|
|
2
2
|
import E, { createElement as Dt } from "react";
|
|
3
3
|
import xo from "react-dom";
|
|
4
4
|
const we = 0, Pt = 1, Xt = 2, Pn = 4;
|
|
5
|
-
function
|
|
5
|
+
function mn(t) {
|
|
6
6
|
return () => t;
|
|
7
7
|
}
|
|
8
8
|
function vo(t) {
|
|
@@ -11,13 +11,13 @@ function vo(t) {
|
|
|
11
11
|
function re(t, e) {
|
|
12
12
|
return (n) => t(e(n));
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function pn(t, e) {
|
|
15
15
|
return () => t(e);
|
|
16
16
|
}
|
|
17
17
|
function To(t, e) {
|
|
18
18
|
return (n) => t(e, n);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function Ne(t) {
|
|
21
21
|
return t !== void 0;
|
|
22
22
|
}
|
|
23
23
|
function Co(...t) {
|
|
@@ -39,10 +39,10 @@ function rt(...t) {
|
|
|
39
39
|
function Y(t, e) {
|
|
40
40
|
return t(Pt, e);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function M(t, e) {
|
|
43
43
|
t(we, e);
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function De(t) {
|
|
46
46
|
t(Xt);
|
|
47
47
|
}
|
|
48
48
|
function it(t) {
|
|
@@ -57,7 +57,7 @@ function yt(t, e) {
|
|
|
57
57
|
});
|
|
58
58
|
return n;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function hn(t) {
|
|
61
61
|
let e, n;
|
|
62
62
|
return (o) => (r) => {
|
|
63
63
|
e = r, n && clearTimeout(n), n = setTimeout(() => {
|
|
@@ -92,7 +92,7 @@ function x(t, ...e) {
|
|
|
92
92
|
return ((o, r) => {
|
|
93
93
|
switch (o) {
|
|
94
94
|
case Xt:
|
|
95
|
-
|
|
95
|
+
De(t);
|
|
96
96
|
return;
|
|
97
97
|
case Pt:
|
|
98
98
|
return Y(t, n(r));
|
|
@@ -221,12 +221,12 @@ function at(...t) {
|
|
|
221
221
|
return t.forEach((s, i) => {
|
|
222
222
|
const l = 2 ** i;
|
|
223
223
|
Y(s, (c) => {
|
|
224
|
-
n[i] = c, o |= l, o === r &&
|
|
224
|
+
n[i] = c, o |= l, o === r && M(e, n);
|
|
225
225
|
});
|
|
226
226
|
}), function(s, i) {
|
|
227
227
|
switch (s) {
|
|
228
228
|
case Xt: {
|
|
229
|
-
|
|
229
|
+
De(e);
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
232
|
case Pt:
|
|
@@ -281,30 +281,30 @@ const ft = {
|
|
|
281
281
|
[],
|
|
282
282
|
{ singleton: !0 }
|
|
283
283
|
), Ve = /* @__PURE__ */ new WeakMap();
|
|
284
|
-
function
|
|
284
|
+
function An(t) {
|
|
285
285
|
return "self" in t ? t.document.documentElement : t;
|
|
286
286
|
}
|
|
287
287
|
function Lo(t) {
|
|
288
|
-
const e =
|
|
288
|
+
const e = An(t), n = Ve.get(e);
|
|
289
289
|
if (n !== void 0)
|
|
290
290
|
return n;
|
|
291
291
|
const o = e.ownerDocument.defaultView.getComputedStyle(e).direction === "rtl";
|
|
292
292
|
return Ve.set(e, o), o;
|
|
293
293
|
}
|
|
294
|
-
function
|
|
295
|
-
Ve.delete(
|
|
294
|
+
function gn(t) {
|
|
295
|
+
Ve.delete(An(t));
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Mn(t, e) {
|
|
298
298
|
return Lo(t) ? -e : e;
|
|
299
299
|
}
|
|
300
|
-
const _t =
|
|
301
|
-
function
|
|
302
|
-
return
|
|
300
|
+
const _t = Mn;
|
|
301
|
+
function In(t, e) {
|
|
302
|
+
return Mn(t, e);
|
|
303
303
|
}
|
|
304
304
|
function Lt(t, e, n) {
|
|
305
|
-
return
|
|
305
|
+
return $e(t, e, n).callbackRef;
|
|
306
306
|
}
|
|
307
|
-
function
|
|
307
|
+
function $e(t, e, n) {
|
|
308
308
|
const o = E.useRef(null);
|
|
309
309
|
let r = (i) => {
|
|
310
310
|
};
|
|
@@ -335,12 +335,12 @@ function _n(t, e, n, o, r, s, i, l, c) {
|
|
|
335
335
|
scrollTop: Math.max(f, 0),
|
|
336
336
|
viewportHeight: h
|
|
337
337
|
}), s?.(
|
|
338
|
-
l ?
|
|
338
|
+
l ? Sn("column-gap", getComputedStyle(m).columnGap, r) : Sn("row-gap", getComputedStyle(m).rowGap, r)
|
|
339
339
|
), v !== null && t(v);
|
|
340
340
|
},
|
|
341
341
|
[t, e, r, s, i, o, l]
|
|
342
342
|
);
|
|
343
|
-
return
|
|
343
|
+
return $e(d, n, c);
|
|
344
344
|
}
|
|
345
345
|
function ko(t, e, n, o) {
|
|
346
346
|
const r = t.length;
|
|
@@ -359,10 +359,10 @@ function ko(t, e, n, o) {
|
|
|
359
359
|
}
|
|
360
360
|
return s;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
362
|
+
function Sn(t, e, n) {
|
|
363
363
|
return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function Ue(t, e, n) {
|
|
366
366
|
const o = E.useRef(null), r = E.useCallback(
|
|
367
367
|
(c) => {
|
|
368
368
|
if (!c?.offsetParent)
|
|
@@ -385,7 +385,7 @@ function $e(t, e, n) {
|
|
|
385
385
|
},
|
|
386
386
|
// oxlint-disable-next-line exhaustive-deps
|
|
387
387
|
[t, e]
|
|
388
|
-
), { callbackRef: s, ref: i } =
|
|
388
|
+
), { callbackRef: s, ref: i } = $e(r, !0, n), l = E.useCallback(() => {
|
|
389
389
|
r(i.current);
|
|
390
390
|
}, [r, i]);
|
|
391
391
|
return E.useEffect(() => {
|
|
@@ -475,7 +475,7 @@ function Rt(t, e, n = "k") {
|
|
|
475
475
|
return Rt(t.l, e, n);
|
|
476
476
|
}
|
|
477
477
|
function vt(t, e, n) {
|
|
478
|
-
return J(t) ? Un(e, n, 1) : e === t.k ? dt(t, { k: e, v: n }) : e < t.k ?
|
|
478
|
+
return J(t) ? Un(e, n, 1) : e === t.k ? dt(t, { k: e, v: n }) : e < t.k ? xn(dt(t, { l: vt(t.l, e, n) })) : xn(dt(t, { r: vt(t.r, e, n) }));
|
|
479
479
|
}
|
|
480
480
|
function Yt() {
|
|
481
481
|
return se;
|
|
@@ -564,7 +564,7 @@ function $n(t) {
|
|
|
564
564
|
function Un(t, e, n, o = se, r = se) {
|
|
565
565
|
return { k: t, l: o, lvl: n, r, v: e };
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function xn(t) {
|
|
568
568
|
return Ge(Kn(t));
|
|
569
569
|
}
|
|
570
570
|
function Kn(t) {
|
|
@@ -584,7 +584,7 @@ function jn(t, e) {
|
|
|
584
584
|
function le(t, e) {
|
|
585
585
|
return !!(t && t[0] === e[0] && t[1] === e[1]);
|
|
586
586
|
}
|
|
587
|
-
const
|
|
587
|
+
const Ke = j(
|
|
588
588
|
() => ({ recalcInProgress: T(!1) }),
|
|
589
589
|
[],
|
|
590
590
|
{ singleton: !0 }
|
|
@@ -620,7 +620,7 @@ function Ht(t, e) {
|
|
|
620
620
|
function be(t) {
|
|
621
621
|
return !J(t.groupOffsetTree);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function je({ index: t }, e) {
|
|
624
624
|
return e === t ? 0 : e < t ? -1 : 1;
|
|
625
625
|
}
|
|
626
626
|
function Vo() {
|
|
@@ -661,7 +661,7 @@ function Go({ offset: t }, e) {
|
|
|
661
661
|
function ce(t, e, n) {
|
|
662
662
|
if (e.length === 0)
|
|
663
663
|
return 0;
|
|
664
|
-
const { index: o, offset: r, size: s } = qn(e, t,
|
|
664
|
+
const { index: o, offset: r, size: s } = qn(e, t, je), i = t - o, l = s * i + (i - 1) * n + r;
|
|
665
665
|
return l > 0 ? l + n : l;
|
|
666
666
|
}
|
|
667
667
|
function Yn(t, e) {
|
|
@@ -679,10 +679,10 @@ function Zn(t, e, n) {
|
|
|
679
679
|
let r = Yn(o, e);
|
|
680
680
|
return r = Math.max(0, Math.min(n, r)), r;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
return o > 0 && (e = Math.max(e, qn(t, o,
|
|
682
|
+
function Ao(t, e, n, o = 0) {
|
|
683
|
+
return o > 0 && (e = Math.max(e, qn(t, o, je).offset)), Nn(Fo(t, e, n, Go), No);
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function Mo(t, [e, n, o, r]) {
|
|
686
686
|
e.length > 0 && o("received item sizes", e, ft.DEBUG);
|
|
687
687
|
const s = t.sizeTree;
|
|
688
688
|
let i = s, l = 0;
|
|
@@ -693,7 +693,7 @@ function Ao(t, [e, n, o, r]) {
|
|
|
693
693
|
[i, l] = Wo(i, e);
|
|
694
694
|
if (i === s)
|
|
695
695
|
return t;
|
|
696
|
-
const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: v } =
|
|
696
|
+
const { lastIndex: c, lastOffset: d, lastSize: m, offsetTree: v } = Ae(t.offsetTree, l, i, r);
|
|
697
697
|
return {
|
|
698
698
|
groupIndices: n,
|
|
699
699
|
groupOffsetTree: n.reduce((p, I) => vt(p, I, ce(I, v, r)), Yt()),
|
|
@@ -710,18 +710,18 @@ function _o(t) {
|
|
|
710
710
|
return { endIndex: s === void 0 ? 1 / 0 : s.k - 1, size: n, startIndex: e };
|
|
711
711
|
});
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function vn(t, e) {
|
|
714
714
|
let n = 0, o = 0;
|
|
715
715
|
for (; n < t; )
|
|
716
716
|
n += e[o + 1] - e[o] - 1, o++;
|
|
717
717
|
return o - (n === t ? 0 : 1);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function Ae(t, e, n, o) {
|
|
720
720
|
let r = t, s = 0, i = 0, l = 0, c = 0;
|
|
721
721
|
if (e === 0)
|
|
722
722
|
r = [];
|
|
723
723
|
else {
|
|
724
|
-
c = Te(r, e - 1,
|
|
724
|
+
c = Te(r, e - 1, je), l = r[c].offset;
|
|
725
725
|
const m = Rt(n, e - 1);
|
|
726
726
|
s = m[0], i = m[1], r.length && r[c].size === Rt(n, e)[1] && (c -= 1), r = r.slice(0, c + 1);
|
|
727
727
|
}
|
|
@@ -753,7 +753,7 @@ const $o = {
|
|
|
753
753
|
}, kt = j(
|
|
754
754
|
([{ log: t }, { recalcInProgress: e }]) => {
|
|
755
755
|
const n = U(), o = U(), r = ht(o, 0), s = U(), i = U(), l = T(0), c = T([]), d = T(void 0), m = T(void 0), v = T(void 0), p = T(void 0), I = T((u, g) => Ht(u, $o[g])), w = T(void 0), R = T(0), h = Vo(), f = ht(
|
|
756
|
-
x(n, $(c, t, R), Ot(
|
|
756
|
+
x(n, $(c, t, R), Ot(Mo, h), nt()),
|
|
757
757
|
h
|
|
758
758
|
), a = ht(
|
|
759
759
|
x(
|
|
@@ -890,10 +890,10 @@ const $o = {
|
|
|
890
890
|
(u) => {
|
|
891
891
|
const { groupIndices: g } = it(f);
|
|
892
892
|
if (u > 0)
|
|
893
|
-
|
|
893
|
+
M(e, !0), M(s, u + vn(u, g));
|
|
894
894
|
else if (u < 0) {
|
|
895
895
|
const C = it(a);
|
|
896
|
-
C.length > 0 && (u -=
|
|
896
|
+
C.length > 0 && (u -= vn(-u, C)), M(i, u);
|
|
897
897
|
}
|
|
898
898
|
}
|
|
899
899
|
), Y(x(l, $(t)), ([u, g]) => {
|
|
@@ -928,8 +928,8 @@ const $o = {
|
|
|
928
928
|
const F = Nt(g.sizeTree);
|
|
929
929
|
return N !== u && F.shift(), F.reduce(
|
|
930
930
|
(q, { k: Q, v: gt }) => {
|
|
931
|
-
let
|
|
932
|
-
return q.prevSize !== 0 && (
|
|
931
|
+
let lt = q.ranges;
|
|
932
|
+
return q.prevSize !== 0 && (lt = [
|
|
933
933
|
...q.ranges,
|
|
934
934
|
{
|
|
935
935
|
endIndex: Q + u - 1,
|
|
@@ -939,7 +939,7 @@ const $o = {
|
|
|
939
939
|
]), {
|
|
940
940
|
prevIndex: Q + u,
|
|
941
941
|
prevSize: gt,
|
|
942
|
-
ranges:
|
|
942
|
+
ranges: lt
|
|
943
943
|
};
|
|
944
944
|
},
|
|
945
945
|
{
|
|
@@ -991,7 +991,7 @@ const $o = {
|
|
|
991
991
|
const Q = N[F + 1] - mt - 1;
|
|
992
992
|
F++, Z += Q + 1;
|
|
993
993
|
}
|
|
994
|
-
if (V = Nt(g.sizeTree).reduce((Q, { k: gt, v:
|
|
994
|
+
if (V = Nt(g.sizeTree).reduce((Q, { k: gt, v: lt }) => vt(Q, Math.max(0, gt + u), lt), V), Z !== -u) {
|
|
995
995
|
const Q = ie(g.sizeTree, mt);
|
|
996
996
|
V = vt(V, 0, Q);
|
|
997
997
|
const gt = Rt(g.sizeTree, -u + 1)[1];
|
|
@@ -1000,14 +1000,14 @@ const $o = {
|
|
|
1000
1000
|
return {
|
|
1001
1001
|
...g,
|
|
1002
1002
|
sizeTree: V,
|
|
1003
|
-
...
|
|
1003
|
+
...Ae(g.offsetTree, 0, V, C)
|
|
1004
1004
|
};
|
|
1005
1005
|
}
|
|
1006
1006
|
const O = Nt(g.sizeTree).reduce((V, { k: N, v: Z }) => vt(V, Math.max(0, N + u), Z), Yt());
|
|
1007
1007
|
return {
|
|
1008
1008
|
...g,
|
|
1009
1009
|
sizeTree: O,
|
|
1010
|
-
...
|
|
1010
|
+
...Ae(g.offsetTree, 0, O, C)
|
|
1011
1011
|
};
|
|
1012
1012
|
})
|
|
1013
1013
|
),
|
|
@@ -1036,7 +1036,7 @@ const $o = {
|
|
|
1036
1036
|
unshiftWith: s
|
|
1037
1037
|
};
|
|
1038
1038
|
},
|
|
1039
|
-
rt(Gt,
|
|
1039
|
+
rt(Gt, Ke),
|
|
1040
1040
|
{ singleton: !0 }
|
|
1041
1041
|
);
|
|
1042
1042
|
function Uo(t) {
|
|
@@ -1075,7 +1075,7 @@ const Xn = j(
|
|
|
1075
1075
|
), { groupCounts: s, topItemsIndexes: i };
|
|
1076
1076
|
},
|
|
1077
1077
|
rt(kt, It)
|
|
1078
|
-
),
|
|
1078
|
+
), At = j(
|
|
1079
1079
|
([{ log: t }]) => {
|
|
1080
1080
|
const e = T(!1), n = Tt(
|
|
1081
1081
|
x(
|
|
@@ -1113,7 +1113,7 @@ const fe = j(
|
|
|
1113
1113
|
const I = U(), w = U(), R = T(0);
|
|
1114
1114
|
let h = null, f = null, a = null;
|
|
1115
1115
|
function S() {
|
|
1116
|
-
h !== null && (h(), h = null), a !== null && (a(), a = null), f && (clearTimeout(f), f = null),
|
|
1116
|
+
h !== null && (h(), h = null), a !== null && (a(), a = null), f && (clearTimeout(f), f = null), M(c, !1);
|
|
1117
1117
|
}
|
|
1118
1118
|
return z(
|
|
1119
1119
|
x(
|
|
@@ -1127,11 +1127,11 @@ const fe = j(
|
|
|
1127
1127
|
N,
|
|
1128
1128
|
Z
|
|
1129
1129
|
]) => {
|
|
1130
|
-
const F = Jn(H), { align: mt, behavior: q, offset: Q } = F, gt = u - 1,
|
|
1131
|
-
let St = ce(
|
|
1132
|
-
mt === "end" ? (St += N + Rt(y.sizeTree,
|
|
1130
|
+
const F = Jn(H), { align: mt, behavior: q, offset: Q } = F, gt = u - 1, lt = Zn(F, y, gt);
|
|
1131
|
+
let St = ce(lt, y.offsetTree, V) + C;
|
|
1132
|
+
mt === "end" ? (St += N + Rt(y.sizeTree, lt)[1] - L + Z, lt === gt && (St += k)) : mt === "center" ? St += (N + Rt(y.sizeTree, lt)[1] - L + Z) / 2 : St -= g, Q !== void 0 && Q !== 0 && (St += Q);
|
|
1133
1133
|
const Ft = (pt) => {
|
|
1134
|
-
S(), pt ? (O("retrying to scroll to", { location: H }, ft.DEBUG),
|
|
1134
|
+
S(), pt ? (O("retrying to scroll to", { location: H }, ft.DEBUG), M(I, H)) : (M(w, !0), O("list did not change, scroll successful", {}, ft.DEBUG));
|
|
1135
1135
|
};
|
|
1136
1136
|
if (S(), q === "smooth") {
|
|
1137
1137
|
let pt = !1;
|
|
@@ -1144,7 +1144,7 @@ const fe = j(
|
|
|
1144
1144
|
h = yt(x(e, jo(150)), Ft);
|
|
1145
1145
|
return f = setTimeout(() => {
|
|
1146
1146
|
S();
|
|
1147
|
-
}, 1200),
|
|
1147
|
+
}, 1200), M(c, !0), O("scrolling from index to", { behavior: q, index: lt, top: St }, ft.DEBUG), { behavior: q, top: St };
|
|
1148
1148
|
}
|
|
1149
1149
|
)
|
|
1150
1150
|
),
|
|
@@ -1168,17 +1168,19 @@ function jo(t) {
|
|
|
1168
1168
|
};
|
|
1169
1169
|
};
|
|
1170
1170
|
}
|
|
1171
|
-
function
|
|
1171
|
+
function qe(t, e) {
|
|
1172
1172
|
t === 0 ? e() : requestAnimationFrame(() => {
|
|
1173
|
-
|
|
1173
|
+
qe(t - 1, e);
|
|
1174
1174
|
});
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function Ye(t, e) {
|
|
1177
|
+
if (t === void 0)
|
|
1178
|
+
return 0;
|
|
1177
1179
|
const n = e - 1, o = typeof t == "number" ? t : t.index === "LAST" ? n : t.index;
|
|
1178
1180
|
return Math.max(0, Math.min(o, n));
|
|
1179
1181
|
}
|
|
1180
|
-
function
|
|
1181
|
-
return typeof t == "number" ? t === 0 : t.index === 0 && (t.align === void 0 || t.align === "start") && (t.offset === void 0 || t.offset === 0);
|
|
1182
|
+
function Me(t) {
|
|
1183
|
+
return t === void 0 ? !0 : typeof t == "number" ? t === 0 : t.index === 0 && (t.align === void 0 || t.align === "start") && (t.offset === void 0 || t.offset === 0);
|
|
1182
1184
|
}
|
|
1183
1185
|
const me = j(
|
|
1184
1186
|
([{ defaultItemSize: t, listRefresh: e, sizes: n }, { scrollTop: o }, { scrollTargetReached: r, scrollToIndex: s }, { didMount: i }]) => {
|
|
@@ -1187,7 +1189,7 @@ const me = j(
|
|
|
1187
1189
|
x(
|
|
1188
1190
|
i,
|
|
1189
1191
|
$(c),
|
|
1190
|
-
P(([m, v]) => !
|
|
1192
|
+
P(([m, v]) => !Me(v)),
|
|
1191
1193
|
Bt(!1)
|
|
1192
1194
|
),
|
|
1193
1195
|
l
|
|
@@ -1195,7 +1197,7 @@ const me = j(
|
|
|
1195
1197
|
x(
|
|
1196
1198
|
i,
|
|
1197
1199
|
$(c),
|
|
1198
|
-
P(([m, v]) => !
|
|
1200
|
+
P(([m, v]) => !Me(v)),
|
|
1199
1201
|
Bt(!1)
|
|
1200
1202
|
),
|
|
1201
1203
|
d
|
|
@@ -1203,16 +1205,20 @@ const me = j(
|
|
|
1203
1205
|
x(
|
|
1204
1206
|
at(e, i),
|
|
1205
1207
|
$(l, n, t, d),
|
|
1206
|
-
P(([[, m], v, { sizeTree: p }, I, w]) => m && (!J(p) ||
|
|
1208
|
+
P(([[, m], v, { sizeTree: p }, I, w]) => m && (!J(p) || Ne(I)) && !v && !w),
|
|
1207
1209
|
$(c)
|
|
1208
1210
|
),
|
|
1209
1211
|
([, m]) => {
|
|
1212
|
+
if (m === void 0) {
|
|
1213
|
+
M(l, !0), M(d, !0);
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1210
1216
|
yt(r, () => {
|
|
1211
|
-
|
|
1212
|
-
}),
|
|
1217
|
+
M(d, !0);
|
|
1218
|
+
}), qe(4, () => {
|
|
1213
1219
|
yt(o, () => {
|
|
1214
|
-
|
|
1215
|
-
}),
|
|
1220
|
+
M(l, !0);
|
|
1221
|
+
}), M(s, m);
|
|
1216
1222
|
});
|
|
1217
1223
|
}
|
|
1218
1224
|
), {
|
|
@@ -1221,7 +1227,7 @@ const me = j(
|
|
|
1221
1227
|
scrolledToInitialItem: l
|
|
1222
1228
|
};
|
|
1223
1229
|
},
|
|
1224
|
-
rt(kt, It, fe,
|
|
1230
|
+
rt(kt, It, fe, At),
|
|
1225
1231
|
{ singleton: !0 }
|
|
1226
1232
|
);
|
|
1227
1233
|
function Qn(t, e) {
|
|
@@ -1239,12 +1245,12 @@ const ue = "up", ne = "down", qo = "none", Yo = {
|
|
|
1239
1245
|
}, Zo = 0, pe = j(([{ footerHeight: t, headerHeight: e, scrollBy: n, scrollContainerState: o, scrollTop: r, viewportHeight: s }]) => {
|
|
1240
1246
|
const i = T(!1), l = T(!0), c = U(), d = U(), m = T(4), v = T(Zo), p = ht(
|
|
1241
1247
|
x(
|
|
1242
|
-
Fe(x(W(r), Ut(1), Bt(!0)), x(W(r), Ut(1), Bt(!1),
|
|
1248
|
+
Fe(x(W(r), Ut(1), Bt(!0)), x(W(r), Ut(1), Bt(!1), hn(100))),
|
|
1243
1249
|
nt()
|
|
1244
1250
|
),
|
|
1245
1251
|
!1
|
|
1246
1252
|
), I = ht(
|
|
1247
|
-
x(Fe(x(n, Bt(!0)), x(n, Bt(!1),
|
|
1253
|
+
x(Fe(x(n, Bt(!0)), x(n, Bt(!1), hn(200))), nt()),
|
|
1248
1254
|
!1
|
|
1249
1255
|
);
|
|
1250
1256
|
z(
|
|
@@ -1374,7 +1380,7 @@ function Cn(t, e, n) {
|
|
|
1374
1380
|
function wn(t, e) {
|
|
1375
1381
|
return typeof t == "number" ? t : t[e] ?? 0;
|
|
1376
1382
|
}
|
|
1377
|
-
const
|
|
1383
|
+
const Ze = j(
|
|
1378
1384
|
([{ deviation: t, fixedHeaderHeight: e, headerHeight: n, scrollTop: o, viewportHeight: r }]) => {
|
|
1379
1385
|
const s = U(), i = T(0), l = T(0), c = T(0), d = ht(
|
|
1380
1386
|
x(
|
|
@@ -1478,7 +1484,7 @@ function to(t, e, n, o, r, s) {
|
|
|
1478
1484
|
break;
|
|
1479
1485
|
i++;
|
|
1480
1486
|
}
|
|
1481
|
-
const l = t + i, c =
|
|
1487
|
+
const l = t + i, c = Ye(e, l), d = Array.from({ length: l }).map((m, v) => ({
|
|
1482
1488
|
data: s[v + c],
|
|
1483
1489
|
index: v + c,
|
|
1484
1490
|
offset: 0,
|
|
@@ -1563,14 +1569,14 @@ const Kt = j(
|
|
|
1563
1569
|
mt,
|
|
1564
1570
|
q
|
|
1565
1571
|
]) => {
|
|
1566
|
-
const Q = k, { offsetTree: gt, sizeTree:
|
|
1572
|
+
const Q = k, { offsetTree: gt, sizeTree: lt } = Q, St = it(h);
|
|
1567
1573
|
if (C === 0)
|
|
1568
1574
|
return { ...Oe, totalCount: C };
|
|
1569
1575
|
if (u === 0 && g === 0)
|
|
1570
1576
|
return St === 0 ? { ...Oe, totalCount: C } : to(St, O, k, Z, F, q || []);
|
|
1571
|
-
if (J(
|
|
1577
|
+
if (J(lt))
|
|
1572
1578
|
return St > 0 ? null : ve(
|
|
1573
|
-
Xo(
|
|
1579
|
+
Xo(Ye(O, C), Q, q),
|
|
1574
1580
|
[],
|
|
1575
1581
|
C,
|
|
1576
1582
|
F,
|
|
@@ -1581,31 +1587,31 @@ const Kt = j(
|
|
|
1581
1587
|
if (N.length > 0) {
|
|
1582
1588
|
const D = N[0], K = N[N.length - 1];
|
|
1583
1589
|
let st = 0;
|
|
1584
|
-
for (const tt of Zt(
|
|
1585
|
-
const X = tt.value,
|
|
1586
|
-
for (let
|
|
1587
|
-
Ft.push({ data: q?.[
|
|
1590
|
+
for (const tt of Zt(lt, D, K)) {
|
|
1591
|
+
const X = tt.value, ct = Math.max(tt.start, D), xt = Math.min(tt.end, K);
|
|
1592
|
+
for (let ut = ct; ut <= xt; ut++)
|
|
1593
|
+
Ft.push({ data: q?.[ut], index: ut, offset: st, size: X }), st += X;
|
|
1588
1594
|
}
|
|
1589
1595
|
}
|
|
1590
1596
|
if (!V)
|
|
1591
1597
|
return ve([], Ft, C, F, Q, Z);
|
|
1592
|
-
const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt =
|
|
1598
|
+
const pt = N.length > 0 ? N[N.length - 1] + 1 : 0, jt = Ao(gt, u, g, pt);
|
|
1593
1599
|
if (jt.length === 0)
|
|
1594
1600
|
return null;
|
|
1595
1601
|
const Qt = C - 1, Et = ye([], (D) => {
|
|
1596
1602
|
for (const K of jt) {
|
|
1597
1603
|
const st = K.value;
|
|
1598
1604
|
let tt = st.offset, X = K.start;
|
|
1599
|
-
const
|
|
1605
|
+
const ct = st.size;
|
|
1600
1606
|
if (st.offset < u) {
|
|
1601
|
-
X += Math.floor((u - st.offset + F) / (
|
|
1602
|
-
const
|
|
1603
|
-
tt +=
|
|
1607
|
+
X += Math.floor((u - st.offset + F) / (ct + F));
|
|
1608
|
+
const ut = X - K.start;
|
|
1609
|
+
tt += ut * ct + ut * F;
|
|
1604
1610
|
}
|
|
1605
|
-
X < pt && (tt += (pt - X) *
|
|
1611
|
+
X < pt && (tt += (pt - X) * ct, X = pt);
|
|
1606
1612
|
const xt = Math.min(K.end, Qt);
|
|
1607
|
-
for (let
|
|
1608
|
-
D.push({ data: q?.[
|
|
1613
|
+
for (let ut = X; ut <= xt && !(tt >= g); ut++)
|
|
1614
|
+
D.push({ data: q?.[ut], index: ut, offset: tt, size: ct }), tt += ct + F;
|
|
1609
1615
|
}
|
|
1610
1616
|
}), te = bn(mt, ae), b = bn(mt, de);
|
|
1611
1617
|
if (Et.length > 0 && (te > 0 || b > 0)) {
|
|
@@ -1613,9 +1619,9 @@ const Kt = j(
|
|
|
1613
1619
|
if (te > 0 && D.index > pt) {
|
|
1614
1620
|
const st = Math.min(te, D.index - pt), tt = [];
|
|
1615
1621
|
let X = D.offset;
|
|
1616
|
-
for (let
|
|
1617
|
-
const
|
|
1618
|
-
X -=
|
|
1622
|
+
for (let ct = D.index - 1; ct >= D.index - st; ct--) {
|
|
1623
|
+
const ut = Zt(lt, ct, ct)[0]?.value ?? D.size;
|
|
1624
|
+
X -= ut + F, tt.unshift({ data: q?.[ct], index: ct, offset: X, size: ut });
|
|
1619
1625
|
}
|
|
1620
1626
|
Et.unshift(...tt);
|
|
1621
1627
|
}
|
|
@@ -1623,7 +1629,7 @@ const Kt = j(
|
|
|
1623
1629
|
const st = Math.min(b, Qt - K.index);
|
|
1624
1630
|
let tt = K.offset + K.size + F;
|
|
1625
1631
|
for (let X = K.index + 1; X <= K.index + st; X++) {
|
|
1626
|
-
const xt = Zt(
|
|
1632
|
+
const xt = Zt(lt, X, X)[0]?.value ?? K.size;
|
|
1627
1633
|
Et.push({ data: q?.[X], index: X, offset: tt, size: xt }), tt += xt + F;
|
|
1628
1634
|
}
|
|
1629
1635
|
}
|
|
@@ -1640,7 +1646,7 @@ const Kt = j(
|
|
|
1640
1646
|
z(
|
|
1641
1647
|
x(
|
|
1642
1648
|
t,
|
|
1643
|
-
P(
|
|
1649
|
+
P(Ne),
|
|
1644
1650
|
B((u) => u?.length)
|
|
1645
1651
|
),
|
|
1646
1652
|
r
|
|
@@ -1715,12 +1721,12 @@ const Kt = j(
|
|
|
1715
1721
|
rt(
|
|
1716
1722
|
kt,
|
|
1717
1723
|
Xn,
|
|
1718
|
-
|
|
1724
|
+
Ze,
|
|
1719
1725
|
me,
|
|
1720
1726
|
fe,
|
|
1721
1727
|
pe,
|
|
1722
|
-
|
|
1723
|
-
|
|
1728
|
+
At,
|
|
1729
|
+
Ke
|
|
1724
1730
|
),
|
|
1725
1731
|
{ singleton: !0 }
|
|
1726
1732
|
), eo = j(
|
|
@@ -1819,7 +1825,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
1819
1825
|
const w = T(!1), R = U();
|
|
1820
1826
|
let h = null;
|
|
1821
1827
|
function f(y) {
|
|
1822
|
-
|
|
1828
|
+
M(i, {
|
|
1823
1829
|
align: "end",
|
|
1824
1830
|
behavior: y,
|
|
1825
1831
|
index: "LAST"
|
|
@@ -1888,9 +1894,9 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
1888
1894
|
),
|
|
1889
1895
|
(y) => {
|
|
1890
1896
|
h !== null && (h(), h = null), it(n) === void 0 ? h = yt(t, () => {
|
|
1891
|
-
it(m)("scrolling into view", {}),
|
|
1897
|
+
it(m)("scrolling into view", {}), M(I, y), h = null;
|
|
1892
1898
|
}) : requestAnimationFrame(() => {
|
|
1893
|
-
it(m)("scrolling into view", {}),
|
|
1899
|
+
it(m)("scrolling into view", {}), M(I, y);
|
|
1894
1900
|
});
|
|
1895
1901
|
}
|
|
1896
1902
|
), { autoscrollToBottom: R, followOutput: w, scrollIntoViewOnChange: S };
|
|
@@ -1900,7 +1906,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
1900
1906
|
pe,
|
|
1901
1907
|
fe,
|
|
1902
1908
|
me,
|
|
1903
|
-
|
|
1909
|
+
At,
|
|
1904
1910
|
Gt,
|
|
1905
1911
|
It,
|
|
1906
1912
|
no,
|
|
@@ -1917,7 +1923,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
1917
1923
|
),
|
|
1918
1924
|
i
|
|
1919
1925
|
), {}),
|
|
1920
|
-
rt(kt, me, Kt,
|
|
1926
|
+
rt(kt, me, Kt, At),
|
|
1921
1927
|
{ singleton: !0 }
|
|
1922
1928
|
), or = j(
|
|
1923
1929
|
([{ didMount: t }, { scrollTo: e }, { listState: n }]) => {
|
|
@@ -1938,7 +1944,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
1938
1944
|
),
|
|
1939
1945
|
() => {
|
|
1940
1946
|
requestAnimationFrame(() => {
|
|
1941
|
-
|
|
1947
|
+
M(e, r);
|
|
1942
1948
|
});
|
|
1943
1949
|
}
|
|
1944
1950
|
);
|
|
@@ -1947,7 +1953,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
1947
1953
|
initialScrollTop: o
|
|
1948
1954
|
};
|
|
1949
1955
|
},
|
|
1950
|
-
rt(
|
|
1956
|
+
rt(At, It, Kt),
|
|
1951
1957
|
{ singleton: !0 }
|
|
1952
1958
|
), ro = j(
|
|
1953
1959
|
([{ scrollVelocity: t }]) => {
|
|
@@ -1978,7 +1984,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
1978
1984
|
},
|
|
1979
1985
|
rt(pe),
|
|
1980
1986
|
{ singleton: !0 }
|
|
1981
|
-
),
|
|
1987
|
+
), Xe = j(([{ scrollContainerState: t, scrollTo: e }]) => {
|
|
1982
1988
|
const n = U(), o = U(), r = U(), s = T(!1), i = T(void 0);
|
|
1983
1989
|
return z(
|
|
1984
1990
|
x(
|
|
@@ -2028,7 +2034,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
2028
2034
|
const H = _o(w.sizeTree);
|
|
2029
2035
|
h && f !== null && a !== null && (R = f.scrollTop - a.offsetTop), R -= S, I({ ranges: H, scrollTop: R });
|
|
2030
2036
|
}
|
|
2031
|
-
), z(x(m, P(
|
|
2037
|
+
), z(x(m, P(Ne), B(sr)), r), z(
|
|
2032
2038
|
x(
|
|
2033
2039
|
s,
|
|
2034
2040
|
$(m),
|
|
@@ -2042,7 +2048,7 @@ const tr = (t, e) => typeof t == "function" ? Rn(t(e)) : e && Rn(t), er = j(
|
|
|
2042
2048
|
restoreStateFrom: m
|
|
2043
2049
|
};
|
|
2044
2050
|
},
|
|
2045
|
-
rt(kt, It, me,
|
|
2051
|
+
rt(kt, It, me, At, Xe)
|
|
2046
2052
|
);
|
|
2047
2053
|
function sr(t) {
|
|
2048
2054
|
return { align: "start", index: 0, offset: t.scrollTop };
|
|
@@ -2090,10 +2096,10 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2090
2096
|
)
|
|
2091
2097
|
);
|
|
2092
2098
|
function h(f) {
|
|
2093
|
-
f > 0 ? (
|
|
2099
|
+
f > 0 ? (M(e, { behavior: "auto", top: -f }), M(t, 0)) : (M(t, 0), M(e, { behavior: "auto", top: -f }));
|
|
2094
2100
|
}
|
|
2095
2101
|
return Y(x(R, $(t, s)), ([f, a, S]) => {
|
|
2096
|
-
S && lr() ?
|
|
2102
|
+
S && lr() ? M(t, a - f) : h(-f);
|
|
2097
2103
|
}), Y(
|
|
2098
2104
|
x(
|
|
2099
2105
|
at(ht(s, !1), t, w),
|
|
@@ -2130,15 +2136,15 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2130
2136
|
})
|
|
2131
2137
|
),
|
|
2132
2138
|
(f) => {
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2139
|
+
M(t, f), requestAnimationFrame(() => {
|
|
2140
|
+
M(e, { top: f }), requestAnimationFrame(() => {
|
|
2141
|
+
M(t, 0), M(w, !1);
|
|
2136
2142
|
});
|
|
2137
2143
|
});
|
|
2138
2144
|
}
|
|
2139
2145
|
), { deviation: t };
|
|
2140
2146
|
},
|
|
2141
|
-
rt(It, pe, Kt, kt, Gt,
|
|
2147
|
+
rt(It, pe, Kt, kt, Gt, Ke)
|
|
2142
2148
|
), ur = j(
|
|
2143
2149
|
([
|
|
2144
2150
|
t,
|
|
@@ -2166,14 +2172,14 @@ const lr = so(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2166
2172
|
...m
|
|
2167
2173
|
}),
|
|
2168
2174
|
rt(
|
|
2169
|
-
|
|
2175
|
+
Ze,
|
|
2170
2176
|
nr,
|
|
2171
|
-
|
|
2177
|
+
At,
|
|
2172
2178
|
ro,
|
|
2173
2179
|
eo,
|
|
2174
2180
|
or,
|
|
2175
2181
|
Jo,
|
|
2176
|
-
|
|
2182
|
+
Xe,
|
|
2177
2183
|
oo,
|
|
2178
2184
|
Gt,
|
|
2179
2185
|
no
|
|
@@ -2275,25 +2281,25 @@ function ar(t, e) {
|
|
|
2275
2281
|
return n;
|
|
2276
2282
|
}
|
|
2277
2283
|
const Ie = typeof document > "u" ? E.useEffect : E.useLayoutEffect;
|
|
2278
|
-
function
|
|
2284
|
+
function Je(t, e, n) {
|
|
2279
2285
|
const o = Object.keys(e.required || {}), r = Object.keys(e.optional || {}), s = Object.keys(e.methods || {}), i = Object.keys(e.events || {}), l = E.createContext({});
|
|
2280
2286
|
function c(f, a) {
|
|
2281
|
-
f.propsReady !== void 0 &&
|
|
2287
|
+
f.propsReady !== void 0 && M(f.propsReady, !1);
|
|
2282
2288
|
for (const S of o) {
|
|
2283
2289
|
const H = f[e.required[S]];
|
|
2284
|
-
|
|
2290
|
+
M(H, a[S]);
|
|
2285
2291
|
}
|
|
2286
2292
|
for (const S of r)
|
|
2287
2293
|
if (S in a) {
|
|
2288
2294
|
const H = f[e.optional[S]];
|
|
2289
|
-
|
|
2295
|
+
M(H, a[S]);
|
|
2290
2296
|
}
|
|
2291
|
-
f.propsReady !== void 0 &&
|
|
2297
|
+
f.propsReady !== void 0 && M(f.propsReady, !0);
|
|
2292
2298
|
}
|
|
2293
2299
|
function d(f) {
|
|
2294
2300
|
return s.reduce((a, S) => (a[S] = (H) => {
|
|
2295
2301
|
const y = f[e.methods[S]];
|
|
2296
|
-
|
|
2302
|
+
M(y, H);
|
|
2297
2303
|
}, a), {});
|
|
2298
2304
|
}
|
|
2299
2305
|
function m(f) {
|
|
@@ -2302,23 +2308,23 @@ function Xe(t, e, n) {
|
|
|
2302
2308
|
const v = E.forwardRef(function(a, S) {
|
|
2303
2309
|
const { children: H, ...y } = a, [L] = E.useState(() => ye(Eo(t), (C) => {
|
|
2304
2310
|
c(C, y);
|
|
2305
|
-
})), [u] = E.useState(
|
|
2311
|
+
})), [u] = E.useState(pn(m, L));
|
|
2306
2312
|
Ie(() => {
|
|
2307
2313
|
for (const C of i)
|
|
2308
2314
|
C in y && Y(u[C], y[C]);
|
|
2309
2315
|
return () => {
|
|
2310
|
-
Object.values(u).map(
|
|
2316
|
+
Object.values(u).map(De);
|
|
2311
2317
|
};
|
|
2312
2318
|
}, [y, u, L]), Ie(() => {
|
|
2313
2319
|
c(L, y);
|
|
2314
|
-
}), E.useImperativeHandle(S,
|
|
2320
|
+
}), E.useImperativeHandle(S, mn(d(L)));
|
|
2315
2321
|
const g = n;
|
|
2316
2322
|
return /* @__PURE__ */ G(l.Provider, { value: L, children: n === void 0 ? H : /* @__PURE__ */ G(g, { ...ar([...o, ...r, ...i], y), children: H }) });
|
|
2317
2323
|
}), p = (f) => {
|
|
2318
2324
|
const a = E.useContext(l);
|
|
2319
2325
|
return E.useCallback(
|
|
2320
2326
|
(S) => {
|
|
2321
|
-
|
|
2327
|
+
M(a[f], S);
|
|
2322
2328
|
},
|
|
2323
2329
|
[a, f]
|
|
2324
2330
|
);
|
|
@@ -2333,10 +2339,10 @@ function Xe(t, e, n) {
|
|
|
2333
2339
|
() => it(S)
|
|
2334
2340
|
);
|
|
2335
2341
|
}, w = (f) => {
|
|
2336
|
-
const S = E.useContext(l)[f], [H, y] = E.useState(
|
|
2342
|
+
const S = E.useContext(l)[f], [H, y] = E.useState(pn(it, S));
|
|
2337
2343
|
return Ie(
|
|
2338
2344
|
() => Y(S, (L) => {
|
|
2339
|
-
L !== H && y(
|
|
2345
|
+
L !== H && y(mn(L));
|
|
2340
2346
|
}),
|
|
2341
2347
|
[S, H]
|
|
2342
2348
|
), H;
|
|
@@ -2351,7 +2357,7 @@ function Xe(t, e, n) {
|
|
|
2351
2357
|
usePublisher: p
|
|
2352
2358
|
};
|
|
2353
2359
|
}
|
|
2354
|
-
const Re = E.createContext(void 0), lo = E.createContext(void 0), Le = "-webkit-sticky", Hn = "sticky",
|
|
2360
|
+
const Re = E.createContext(void 0), lo = E.createContext(void 0), Le = "-webkit-sticky", Hn = "sticky", Qe = so(() => {
|
|
2355
2361
|
if (typeof document > "u")
|
|
2356
2362
|
return Hn;
|
|
2357
2363
|
const t = document.createElement("div");
|
|
@@ -2386,8 +2392,8 @@ function uo(t, e, n, o = Jt, r, s) {
|
|
|
2386
2392
|
);
|
|
2387
2393
|
E.useEffect(() => {
|
|
2388
2394
|
const p = r ?? i.current;
|
|
2389
|
-
return
|
|
2390
|
-
|
|
2395
|
+
return gn(p), o(r ?? i.current), d({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", d, { passive: !0 }), () => {
|
|
2396
|
+
gn(p), o(null), p.removeEventListener("scroll", d);
|
|
2391
2397
|
};
|
|
2392
2398
|
}, [i, d, n, o, r]);
|
|
2393
2399
|
function m(p) {
|
|
@@ -2414,22 +2420,22 @@ function uo(t, e, n, o = Jt, r, s) {
|
|
|
2414
2420
|
c.current = null, l.current = null, e(!0);
|
|
2415
2421
|
}, 1e3)) : l.current = null, s === !0 && (p = {
|
|
2416
2422
|
...p.behavior === void 0 ? {} : { behavior: p.behavior },
|
|
2417
|
-
left:
|
|
2423
|
+
left: In(I, S)
|
|
2418
2424
|
}), I.scrollTo(p);
|
|
2419
2425
|
}
|
|
2420
2426
|
function v(p) {
|
|
2421
2427
|
s === !0 && (p = {
|
|
2422
2428
|
...p.behavior === void 0 ? {} : { behavior: p.behavior },
|
|
2423
|
-
...p.top === void 0 ? {} : { left:
|
|
2429
|
+
...p.top === void 0 ? {} : { left: In(i.current, p.top) }
|
|
2424
2430
|
}), i.current.scrollBy(p);
|
|
2425
2431
|
}
|
|
2426
2432
|
return { scrollByCallback: v, scrollerRef: i, scrollToCallback: m };
|
|
2427
2433
|
}
|
|
2428
|
-
function
|
|
2434
|
+
function tn(t) {
|
|
2429
2435
|
return t;
|
|
2430
2436
|
}
|
|
2431
2437
|
const fr = /* @__PURE__ */ j(() => {
|
|
2432
|
-
const t = T((l) => `Item ${l}`), e = T((l) => `Group ${l}`), n = T({}), o = T(
|
|
2438
|
+
const t = T((l) => `Item ${l}`), e = T((l) => `Group ${l}`), n = T({}), o = T(tn), r = T("div"), s = T(Jt), i = (l, c = null) => ht(
|
|
2433
2439
|
x(
|
|
2434
2440
|
n,
|
|
2435
2441
|
B((d) => d[l]),
|
|
@@ -2457,8 +2463,8 @@ const fr = /* @__PURE__ */ j(() => {
|
|
|
2457
2463
|
}), mr = /* @__PURE__ */ j(
|
|
2458
2464
|
([t, e]) => ({ ...t, ...e }),
|
|
2459
2465
|
rt(io, fr)
|
|
2460
|
-
), pr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), hr = { overflowAnchor: "none", position:
|
|
2461
|
-
const n =
|
|
2466
|
+
), pr = ({ height: t }) => /* @__PURE__ */ G("div", { style: { height: t } }), hr = { overflowAnchor: "none", position: Qe(), zIndex: 1 }, ao = { overflowAnchor: "none" }, gr = { ...ao, display: "inline-block", height: "100%" }, En = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2467
|
+
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 } = _n(
|
|
2462
2468
|
o,
|
|
2463
2469
|
I,
|
|
2464
2470
|
p,
|
|
@@ -2467,12 +2473,12 @@ const fr = /* @__PURE__ */ j(() => {
|
|
|
2467
2473
|
R,
|
|
2468
2474
|
s,
|
|
2469
2475
|
h,
|
|
2470
|
-
|
|
2476
|
+
A("skipAnimationFrameInResizeObserver")
|
|
2471
2477
|
), [a, S] = E.useState(0);
|
|
2472
|
-
|
|
2478
|
+
rn("deviation", (F) => {
|
|
2473
2479
|
a !== F && S(F);
|
|
2474
2480
|
});
|
|
2475
|
-
const H =
|
|
2481
|
+
const H = A("EmptyPlaceholder"), y = A("ScrollSeekPlaceholder") ?? pr, 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 ? {} : {
|
|
2476
2482
|
boxSizing: "border-box",
|
|
2477
2483
|
...h ? {
|
|
2478
2484
|
display: "inline-block",
|
|
@@ -2551,12 +2557,12 @@ const fr = /* @__PURE__ */ j(() => {
|
|
|
2551
2557
|
top: 0,
|
|
2552
2558
|
width: "100%",
|
|
2553
2559
|
...t ? { display: "flex", flexDirection: "column" } : void 0
|
|
2554
|
-
}),
|
|
2560
|
+
}), en = (t, e, n = 0) => ({
|
|
2555
2561
|
...He(t),
|
|
2556
2562
|
position: e ? "relative" : "absolute",
|
|
2557
2563
|
top: e ? -n : 0
|
|
2558
2564
|
}), xr = {
|
|
2559
|
-
position:
|
|
2565
|
+
position: Qe(),
|
|
2560
2566
|
top: 0,
|
|
2561
2567
|
width: "100%",
|
|
2562
2568
|
zIndex: 1
|
|
@@ -2569,7 +2575,7 @@ function fo(t, e) {
|
|
|
2569
2575
|
return { item: typeof t == "string" ? void 0 : e };
|
|
2570
2576
|
}
|
|
2571
2577
|
const vr = /* @__PURE__ */ E.memo(function() {
|
|
2572
|
-
const e =
|
|
2578
|
+
const e = A("HeaderComponent"), n = Ct("headerHeight"), o = A("HeaderFooterTag"), r = Lt(
|
|
2573
2579
|
E.useMemo(
|
|
2574
2580
|
() => (i) => {
|
|
2575
2581
|
n(Ht(i, "height"));
|
|
@@ -2577,11 +2583,11 @@ const vr = /* @__PURE__ */ E.memo(function() {
|
|
|
2577
2583
|
[n]
|
|
2578
2584
|
),
|
|
2579
2585
|
!0,
|
|
2580
|
-
|
|
2581
|
-
), s =
|
|
2586
|
+
A("skipAnimationFrameInResizeObserver")
|
|
2587
|
+
), s = A("context");
|
|
2582
2588
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
2583
2589
|
}), Tr = /* @__PURE__ */ E.memo(function() {
|
|
2584
|
-
const e =
|
|
2590
|
+
const e = A("FooterComponent"), n = Ct("footerHeight"), o = A("HeaderFooterTag"), r = Lt(
|
|
2585
2591
|
E.useMemo(
|
|
2586
2592
|
() => (i) => {
|
|
2587
2593
|
n(Ht(i, "height"));
|
|
@@ -2589,11 +2595,11 @@ const vr = /* @__PURE__ */ E.memo(function() {
|
|
|
2589
2595
|
[n]
|
|
2590
2596
|
),
|
|
2591
2597
|
!0,
|
|
2592
|
-
|
|
2593
|
-
), s =
|
|
2598
|
+
A("skipAnimationFrameInResizeObserver")
|
|
2599
|
+
), s = A("context");
|
|
2594
2600
|
return e != null ? /* @__PURE__ */ G(o, { ref: r, children: /* @__PURE__ */ G(e, { ...ot(e, s) }) }) : null;
|
|
2595
2601
|
});
|
|
2596
|
-
function
|
|
2602
|
+
function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2597
2603
|
return E.memo(function({ children: s, style: i, context: l, ...c }) {
|
|
2598
2604
|
const d = n("scrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("scrollerRef"), I = e("horizontalDirection") || !1, { scrollByCallback: w, scrollerRef: R, scrollToCallback: h } = uo(
|
|
2599
2605
|
d,
|
|
@@ -2618,7 +2624,7 @@ function en({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2618
2624
|
);
|
|
2619
2625
|
});
|
|
2620
2626
|
}
|
|
2621
|
-
function
|
|
2627
|
+
function on({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
2622
2628
|
return E.memo(function({ children: s, style: i, context: l, ...c }) {
|
|
2623
2629
|
const d = n("windowScrollContainerState"), m = e("ScrollerComponent"), v = n("smoothScrollTargetReached"), p = e("totalListHeight"), I = e("deviation"), w = e("customScrollParent"), R = E.useRef(null), h = e("scrollerRef"), { scrollByCallback: f, scrollerRef: a, scrollToCallback: S } = uo(
|
|
2624
2630
|
d,
|
|
@@ -2643,27 +2649,27 @@ function nn({ useEmitter: t, useEmitterValue: e, usePublisher: n }) {
|
|
|
2643
2649
|
});
|
|
2644
2650
|
}
|
|
2645
2651
|
const Cr = ({ children: t }) => {
|
|
2646
|
-
const e = E.useContext(Re), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r =
|
|
2652
|
+
const e = E.useContext(Re), n = Ct("viewportHeight"), o = Ct("fixedItemHeight"), r = A("alignToBottom"), s = A("horizontalDirection"), i = E.useMemo(
|
|
2647
2653
|
() => re(n, (c) => Ht(c, s ? "width" : "height")),
|
|
2648
2654
|
[n, s]
|
|
2649
|
-
), l = Lt(i, !0,
|
|
2655
|
+
), l = Lt(i, !0, A("skipAnimationFrameInResizeObserver"));
|
|
2650
2656
|
return E.useEffect(() => {
|
|
2651
2657
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2652
2658
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: l, style: He(r), children: t });
|
|
2653
2659
|
}, wr = ({ children: t }) => {
|
|
2654
|
-
const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r =
|
|
2660
|
+
const e = E.useContext(Re), n = Ct("windowViewportRect"), o = Ct("fixedItemHeight"), r = A("customScrollParent"), s = A("useWindowScroll"), i = A("topListHeight"), l = Ue(
|
|
2655
2661
|
n,
|
|
2656
2662
|
r,
|
|
2657
|
-
|
|
2658
|
-
), c =
|
|
2663
|
+
A("skipAnimationFrameInResizeObserver")
|
|
2664
|
+
), c = A("alignToBottom");
|
|
2659
2665
|
return E.useEffect(() => {
|
|
2660
2666
|
e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2661
|
-
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style:
|
|
2667
|
+
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: l, style: en(c, s, i), children: t });
|
|
2662
2668
|
}, yr = ({ children: t }) => {
|
|
2663
|
-
const e =
|
|
2669
|
+
const e = A("TopItemListComponent") ?? "div", n = A("headerHeight"), o = { ...xr, marginTop: `${n}px` }, r = A("context");
|
|
2664
2670
|
return /* @__PURE__ */ G(e, { style: o, ...ot(e, r), children: t });
|
|
2665
2671
|
}, br = /* @__PURE__ */ E.memo(function(e) {
|
|
2666
|
-
const n =
|
|
2672
|
+
const n = A("useWindowScroll"), o = A("topItemsIndexes").length > 0, r = A("customScrollParent"), s = A("context");
|
|
2667
2673
|
return /* @__PURE__ */ $t(r || n ? Hr : Rr, { ...e, context: s, children: [
|
|
2668
2674
|
o && /* @__PURE__ */ G(yr, { children: /* @__PURE__ */ G(En, { showTopList: !0 }) }),
|
|
2669
2675
|
/* @__PURE__ */ $t(r || n ? wr : Cr, { children: [
|
|
@@ -2674,10 +2680,10 @@ const Cr = ({ children: t }) => {
|
|
|
2674
2680
|
] });
|
|
2675
2681
|
}), {
|
|
2676
2682
|
Component: mo,
|
|
2677
|
-
useEmitter:
|
|
2678
|
-
useEmitterValue:
|
|
2683
|
+
useEmitter: rn,
|
|
2684
|
+
useEmitterValue: A,
|
|
2679
2685
|
usePublisher: Ct
|
|
2680
|
-
} = /* @__PURE__ */
|
|
2686
|
+
} = /* @__PURE__ */ Je(
|
|
2681
2687
|
mr,
|
|
2682
2688
|
{
|
|
2683
2689
|
optional: {
|
|
@@ -2739,14 +2745,14 @@ const Cr = ({ children: t }) => {
|
|
|
2739
2745
|
}
|
|
2740
2746
|
},
|
|
2741
2747
|
br
|
|
2742
|
-
), Rr = /* @__PURE__ */
|
|
2748
|
+
), Rr = /* @__PURE__ */ nn({ useEmitter: rn, useEmitterValue: A, usePublisher: Ct }), Hr = /* @__PURE__ */ on({ useEmitter: rn, useEmitterValue: A, usePublisher: Ct }), rs = mo, ss = mo, Er = /* @__PURE__ */ j(() => {
|
|
2743
2749
|
const t = T((d) => /* @__PURE__ */ $t("td", { children: [
|
|
2744
2750
|
"Item $",
|
|
2745
2751
|
d
|
|
2746
2752
|
] })), e = T(null), n = T((d) => /* @__PURE__ */ $t("td", { colSpan: 1e3, children: [
|
|
2747
2753
|
"Group ",
|
|
2748
2754
|
d
|
|
2749
|
-
] })), o = T(null), r = T(null), s = T({}), i = T(
|
|
2755
|
+
] })), o = T(null), r = T(null), s = T({}), i = T(tn), l = T(Jt), c = (d, m = null) => ht(
|
|
2750
2756
|
x(
|
|
2751
2757
|
s,
|
|
2752
2758
|
B((v) => v[d]),
|
|
@@ -2777,8 +2783,8 @@ const Cr = ({ children: t }) => {
|
|
|
2777
2783
|
}), Br = /* @__PURE__ */ j(
|
|
2778
2784
|
([t, e]) => ({ ...t, ...e }),
|
|
2779
2785
|
rt(io, Er)
|
|
2780
|
-
), Or = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Lr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), kr = { overflowAnchor: "none" }, Bn = { position:
|
|
2781
|
-
const n =
|
|
2786
|
+
), Or = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { height: t } }) }), Lr = ({ height: t }) => /* @__PURE__ */ G("tr", { children: /* @__PURE__ */ G("td", { style: { border: 0, height: t, padding: 0 } }) }), kr = { overflowAnchor: "none" }, Bn = { position: Qe(), zIndex: 2, overflowAnchor: "none" }, On = /* @__PURE__ */ E.memo(function({ showTopList: e = !1 }) {
|
|
2787
|
+
const n = _("listState"), o = _("computeItemKey"), r = _("firstItemIndex"), s = _("context"), i = _("isSeeking"), l = _("fixedHeaderHeight"), c = _("groupIndices").length > 0, d = _("itemContent"), m = _("groupContent"), v = _("ScrollSeekPlaceholder") ?? Or, p = _("GroupComponent"), I = _("TableRowComponent"), w = (e ? n.topItems : []).reduce((h, f, a) => (a === 0 ? h.push(f.size) : h.push(h[a - 1] + f.size), h), []);
|
|
2782
2788
|
return (e ? n.topItems : n.items).map((h) => {
|
|
2783
2789
|
const f = h.originalIndex, a = o(f + r, h.data, s), S = e ? f === 0 ? 0 : w[f - 1] : 0;
|
|
2784
2790
|
return i ? /* @__PURE__ */ Dt(
|
|
@@ -2820,7 +2826,7 @@ const Cr = ({ children: t }) => {
|
|
|
2820
2826
|
);
|
|
2821
2827
|
});
|
|
2822
2828
|
}), zr = /* @__PURE__ */ E.memo(function() {
|
|
2823
|
-
const e =
|
|
2829
|
+
const e = _("listState"), n = _("topItemsIndexes").length > 0, o = bt("sizeRanges"), r = _("useWindowScroll"), s = _("customScrollParent"), i = bt("windowScrollContainerState"), l = bt("scrollContainerState"), c = s || r ? i : l, d = _("trackItemSizes"), m = _("itemSize"), v = _("log"), { callbackRef: p, ref: I } = _n(
|
|
2824
2830
|
o,
|
|
2825
2831
|
m,
|
|
2826
2832
|
d,
|
|
@@ -2829,12 +2835,12 @@ const Cr = ({ children: t }) => {
|
|
|
2829
2835
|
void 0,
|
|
2830
2836
|
s,
|
|
2831
2837
|
!1,
|
|
2832
|
-
|
|
2838
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2833
2839
|
), [w, R] = E.useState(0);
|
|
2834
|
-
|
|
2840
|
+
sn("deviation", (O) => {
|
|
2835
2841
|
w !== O && (I.current.style.marginTop = `${O}px`, R(O));
|
|
2836
2842
|
});
|
|
2837
|
-
const h =
|
|
2843
|
+
const h = _("EmptyPlaceholder"), f = _("FillerRow") ?? Lr, a = _("TableBodyComponent"), S = _("paddingTopAddition"), H = _("statefulTotalCount"), y = _("context");
|
|
2838
2844
|
if (H === 0 && h !== null && h !== void 0)
|
|
2839
2845
|
return /* @__PURE__ */ G(h, { ...ot(h, y) });
|
|
2840
2846
|
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;
|
|
@@ -2848,30 +2854,30 @@ const Cr = ({ children: t }) => {
|
|
|
2848
2854
|
const e = E.useContext(Re), n = bt("viewportHeight"), o = bt("fixedItemHeight"), r = Lt(
|
|
2849
2855
|
E.useMemo(() => re(n, (s) => Ht(s, "height")), [n]),
|
|
2850
2856
|
!0,
|
|
2851
|
-
|
|
2857
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2852
2858
|
);
|
|
2853
2859
|
return E.useEffect(() => {
|
|
2854
2860
|
e && (n(e.viewportHeight), o(e.itemHeight));
|
|
2855
2861
|
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "element", ref: r, style: He(!1), children: t });
|
|
2856
2862
|
}, Vr = ({ children: t }) => {
|
|
2857
|
-
const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r =
|
|
2863
|
+
const e = E.useContext(Re), n = bt("windowViewportRect"), o = bt("fixedItemHeight"), r = _("customScrollParent"), s = _("useWindowScroll"), i = Ue(
|
|
2858
2864
|
n,
|
|
2859
2865
|
r,
|
|
2860
|
-
|
|
2866
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2861
2867
|
);
|
|
2862
2868
|
return E.useEffect(() => {
|
|
2863
2869
|
e && (o(e.itemHeight), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: 100 }));
|
|
2864
|
-
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style:
|
|
2870
|
+
}, [e, n, o]), /* @__PURE__ */ G("div", { "data-viewport-type": "window", ref: i, style: en(!1, s), children: t });
|
|
2865
2871
|
}, Wr = /* @__PURE__ */ E.memo(function(e) {
|
|
2866
|
-
const n =
|
|
2872
|
+
const n = _("useWindowScroll"), o = _("customScrollParent"), r = bt("fixedHeaderHeight"), s = bt("fixedFooterHeight"), i = _("fixedHeaderContent"), l = _("fixedFooterContent"), c = _("context"), d = Lt(
|
|
2867
2873
|
E.useMemo(() => re(r, (a) => Ht(a, "height")), [r]),
|
|
2868
2874
|
!0,
|
|
2869
|
-
|
|
2875
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2870
2876
|
), m = Lt(
|
|
2871
2877
|
E.useMemo(() => re(s, (a) => Ht(a, "height")), [s]),
|
|
2872
2878
|
!0,
|
|
2873
|
-
|
|
2874
|
-
), v = o || n ? Gr : Pr, p = o || n ? Vr : Fr, I =
|
|
2879
|
+
_("skipAnimationFrameInResizeObserver")
|
|
2880
|
+
), v = o || n ? Gr : Pr, p = o || n ? Vr : Fr, I = _("TableComponent"), w = _("TableHeadComponent"), R = _("TableFooterComponent"), h = i ? /* @__PURE__ */ G(
|
|
2875
2881
|
w,
|
|
2876
2882
|
{
|
|
2877
2883
|
ref: d,
|
|
@@ -2897,10 +2903,10 @@ const Cr = ({ children: t }) => {
|
|
|
2897
2903
|
] }) }) });
|
|
2898
2904
|
}), {
|
|
2899
2905
|
Component: po,
|
|
2900
|
-
useEmitter:
|
|
2901
|
-
useEmitterValue:
|
|
2906
|
+
useEmitter: sn,
|
|
2907
|
+
useEmitterValue: _,
|
|
2902
2908
|
usePublisher: bt
|
|
2903
|
-
} = /* @__PURE__ */
|
|
2909
|
+
} = /* @__PURE__ */ Je(
|
|
2904
2910
|
Br,
|
|
2905
2911
|
{
|
|
2906
2912
|
optional: {
|
|
@@ -2958,7 +2964,7 @@ const Cr = ({ children: t }) => {
|
|
|
2958
2964
|
}
|
|
2959
2965
|
},
|
|
2960
2966
|
Wr
|
|
2961
|
-
), Pr = /* @__PURE__ */
|
|
2967
|
+
), Pr = /* @__PURE__ */ nn({ useEmitter: sn, useEmitterValue: _, usePublisher: bt }), Gr = /* @__PURE__ */ on({ useEmitter: sn, useEmitterValue: _, usePublisher: bt }), is = po, ls = po, Ln = {
|
|
2962
2968
|
bottom: 0,
|
|
2963
2969
|
itemHeight: 0,
|
|
2964
2970
|
items: [],
|
|
@@ -2966,7 +2972,7 @@ const Cr = ({ children: t }) => {
|
|
|
2966
2972
|
offsetBottom: 0,
|
|
2967
2973
|
offsetTop: 0,
|
|
2968
2974
|
top: 0
|
|
2969
|
-
},
|
|
2975
|
+
}, Ar = {
|
|
2970
2976
|
bottom: 0,
|
|
2971
2977
|
itemHeight: 0,
|
|
2972
2978
|
items: [{ index: 0 }],
|
|
@@ -2978,9 +2984,9 @@ const Cr = ({ children: t }) => {
|
|
|
2978
2984
|
function Fn(t, e, n) {
|
|
2979
2985
|
return Array.from({ length: e - t + 1 }).map((o, r) => ({ data: n === null ? null : n[r + t], index: r + t }));
|
|
2980
2986
|
}
|
|
2981
|
-
function
|
|
2987
|
+
function Mr(t) {
|
|
2982
2988
|
return {
|
|
2983
|
-
...
|
|
2989
|
+
...Ar,
|
|
2984
2990
|
items: t
|
|
2985
2991
|
};
|
|
2986
2992
|
}
|
|
@@ -3000,26 +3006,30 @@ const Nr = /* @__PURE__ */ j(
|
|
|
3000
3006
|
{ customScrollParent: h, useWindowScroll: f, windowScrollContainerState: a, windowScrollTo: S, windowViewportRect: H },
|
|
3001
3007
|
y
|
|
3002
3008
|
]) => {
|
|
3003
|
-
const L = T(0), u = T(0), g = T(Ln), C = T({ height: 0, width: 0 }), k = T({ height: 0, width: 0 }), O = U(), V = U(), N = T(0), Z = T(null), F = T({ column: 0, row: 0 }), mt = U(), q = U(), Q = T(!1), gt = T(0),
|
|
3009
|
+
const L = T(0), u = T(0), g = T(Ln), C = T({ height: 0, width: 0 }), k = T({ height: 0, width: 0 }), O = U(), V = U(), N = T(0), Z = T(null), F = T({ column: 0, row: 0 }), mt = U(), q = U(), Q = T(!1), gt = T(0), lt = T(!0), St = T(!1), Ft = T(!1);
|
|
3004
3010
|
Y(
|
|
3005
3011
|
x(
|
|
3006
3012
|
w,
|
|
3007
3013
|
$(gt),
|
|
3008
|
-
P(([b, D]) => D
|
|
3014
|
+
P(([b, D]) => !Me(D))
|
|
3009
3015
|
),
|
|
3010
3016
|
() => {
|
|
3011
|
-
|
|
3017
|
+
M(lt, !1);
|
|
3012
3018
|
}
|
|
3013
3019
|
), Y(
|
|
3014
3020
|
x(
|
|
3015
|
-
at(w,
|
|
3021
|
+
at(w, lt, k, C, gt, St),
|
|
3016
3022
|
P(([b, D, K, st, , tt]) => b && !D && K.height !== 0 && st.height !== 0 && !tt)
|
|
3017
3023
|
),
|
|
3018
3024
|
([, , , , b]) => {
|
|
3019
|
-
|
|
3020
|
-
|
|
3025
|
+
if (b === void 0) {
|
|
3026
|
+
M(lt, !0);
|
|
3027
|
+
return;
|
|
3028
|
+
}
|
|
3029
|
+
M(St, !0), qe(1, () => {
|
|
3030
|
+
M(O, b);
|
|
3021
3031
|
}), yt(x(d), () => {
|
|
3022
|
-
|
|
3032
|
+
M(e, [0, 0]), M(lt, !0);
|
|
3023
3033
|
});
|
|
3024
3034
|
}
|
|
3025
3035
|
), z(
|
|
@@ -3036,9 +3046,9 @@ const Nr = /* @__PURE__ */ j(
|
|
|
3036
3046
|
P(([, b]) => b != null)
|
|
3037
3047
|
),
|
|
3038
3048
|
([, b]) => {
|
|
3039
|
-
b && (
|
|
3040
|
-
|
|
3041
|
-
}),
|
|
3049
|
+
b && (M(C, b.viewport), M(k, b.item), M(F, b.gap), b.scrollTop > 0 && (M(Q, !0), yt(x(d, Ut(1)), (D) => {
|
|
3050
|
+
M(Q, !1);
|
|
3051
|
+
}), M(c, { top: b.scrollTop })));
|
|
3042
3052
|
}
|
|
3043
3053
|
), z(
|
|
3044
3054
|
x(
|
|
@@ -3073,7 +3083,7 @@ const Nr = /* @__PURE__ */ j(
|
|
|
3073
3083
|
W(Z),
|
|
3074
3084
|
W(u),
|
|
3075
3085
|
W(Q),
|
|
3076
|
-
W(
|
|
3086
|
+
W(lt),
|
|
3077
3087
|
W(gt)
|
|
3078
3088
|
),
|
|
3079
3089
|
P(([, , , , , , , b]) => !b),
|
|
@@ -3084,24 +3094,24 @@ const Nr = /* @__PURE__ */ j(
|
|
|
3084
3094
|
st,
|
|
3085
3095
|
tt,
|
|
3086
3096
|
X,
|
|
3087
|
-
|
|
3097
|
+
ct,
|
|
3088
3098
|
xt,
|
|
3089
3099
|
,
|
|
3090
|
-
|
|
3100
|
+
ut,
|
|
3091
3101
|
Vt
|
|
3092
3102
|
]) => {
|
|
3093
|
-
const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width:
|
|
3094
|
-
if (xt === 0 && (b === 0 ||
|
|
3103
|
+
const { column: Wt, row: ee } = st, { height: he, width: Ee } = tt, { width: ln } = X;
|
|
3104
|
+
if (xt === 0 && (b === 0 || ln === 0))
|
|
3095
3105
|
return Ln;
|
|
3096
3106
|
if (Ee === 0) {
|
|
3097
|
-
const
|
|
3098
|
-
return
|
|
3107
|
+
const fn = Ye(Vt, b), So = fn + Math.max(xt - 1, 0);
|
|
3108
|
+
return Mr(Fn(fn, So, ct));
|
|
3099
3109
|
}
|
|
3100
|
-
const ge = ho(
|
|
3101
|
-
let qt,
|
|
3102
|
-
|
|
3103
|
-
const
|
|
3104
|
-
return { bottom:
|
|
3110
|
+
const ge = ho(ln, Ee, Wt);
|
|
3111
|
+
let qt, Mt;
|
|
3112
|
+
ut ? D === 0 && K === 0 && xt > 0 ? (qt = 0, Mt = xt - 1) : (qt = ge * Ce((D + ee) / (he + ee)), Mt = ge * kn((K + ee) / (he + ee)) - 1, Mt = ze(b - 1, oe(Mt, ge - 1)), qt = ze(Mt, oe(0, qt))) : (qt = 0, Mt = -1);
|
|
3113
|
+
const cn = Fn(qt, Mt, ct), { bottom: un, top: an } = Vn(X, st, tt, cn), dn = kn(b / ge), Io = dn * he + (dn - 1) * ee - un;
|
|
3114
|
+
return { bottom: un, itemHeight: he, items: cn, itemWidth: Ee, offsetBottom: Io, offsetTop: an, top: an };
|
|
3105
3115
|
}
|
|
3106
3116
|
)
|
|
3107
3117
|
),
|
|
@@ -3171,11 +3181,11 @@ const Nr = /* @__PURE__ */ j(
|
|
|
3171
3181
|
O,
|
|
3172
3182
|
$(C, k, L, F),
|
|
3173
3183
|
B(([b, D, K, st, tt]) => {
|
|
3174
|
-
const X = Jn(b), { align:
|
|
3184
|
+
const X = Jn(b), { align: ct, behavior: xt, offset: ut } = X;
|
|
3175
3185
|
let Vt = X.index;
|
|
3176
3186
|
Vt === "LAST" && (Vt = st - 1), Vt = oe(0, Vt, ze(st - 1, Vt));
|
|
3177
|
-
let Wt =
|
|
3178
|
-
return
|
|
3187
|
+
let Wt = _e(D, tt, K, Vt);
|
|
3188
|
+
return ct === "end" ? Wt = zn(Wt - D.height + K.height) : ct === "center" && (Wt = zn(Wt - D.height / 2 + K.height / 2)), ut !== void 0 && ut !== 0 && (Wt += ut), { behavior: xt, top: Wt };
|
|
3179
3189
|
})
|
|
3180
3190
|
),
|
|
3181
3191
|
c
|
|
@@ -3235,7 +3245,7 @@ const Nr = /* @__PURE__ */ j(
|
|
|
3235
3245
|
...y
|
|
3236
3246
|
};
|
|
3237
3247
|
},
|
|
3238
|
-
rt(
|
|
3248
|
+
rt(Ze, It, pe, ro, At, Xe, Gt)
|
|
3239
3249
|
);
|
|
3240
3250
|
function ho(t, e, n) {
|
|
3241
3251
|
return oe(1, Ce((t + n) / (Ce(e) + n)));
|
|
@@ -3244,15 +3254,15 @@ function Vn(t, e, n, o) {
|
|
|
3244
3254
|
const { height: r } = n;
|
|
3245
3255
|
if (r === void 0 || o.length === 0)
|
|
3246
3256
|
return { bottom: 0, top: 0 };
|
|
3247
|
-
const s =
|
|
3248
|
-
return { bottom:
|
|
3257
|
+
const s = _e(t, e, n, o[0].index);
|
|
3258
|
+
return { bottom: _e(t, e, n, o[o.length - 1].index) + r, top: s };
|
|
3249
3259
|
}
|
|
3250
|
-
function
|
|
3260
|
+
function _e(t, e, n, o) {
|
|
3251
3261
|
const r = ho(t.width, n.width, e.column), s = Ce(o / r), i = s * n.height + oe(0, s - 1) * e.row;
|
|
3252
3262
|
return i > 0 ? i + e.row : i;
|
|
3253
3263
|
}
|
|
3254
3264
|
const Dr = /* @__PURE__ */ j(() => {
|
|
3255
|
-
const t = T((v) => `Item ${v}`), e = T({}), n = T(null), o = T("virtuoso-grid-item"), r = T("virtuoso-grid-list"), s = T(
|
|
3265
|
+
const t = T((v) => `Item ${v}`), e = T({}), n = T(null), o = T("virtuoso-grid-item"), r = T("virtuoso-grid-list"), s = T(tn), i = T("div"), l = T(Jt), c = (v, p = null) => ht(
|
|
3256
3266
|
x(
|
|
3257
3267
|
e,
|
|
3258
3268
|
B((I) => I[v]),
|
|
@@ -3375,10 +3385,10 @@ const Dr = /* @__PURE__ */ j(() => {
|
|
|
3375
3385
|
e && (o({ height: e.viewportHeight, width: e.viewportWidth }), n({ height: e.itemHeight, width: e.itemWidth }));
|
|
3376
3386
|
}, [e, o, n]), /* @__PURE__ */ G("div", { ref: r, style: He(!1), children: t });
|
|
3377
3387
|
}, Yr = ({ children: t }) => {
|
|
3378
|
-
const e = E.useContext(lo), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i =
|
|
3388
|
+
const e = E.useContext(lo), n = wt("windowViewportRect"), o = wt("itemDimensions"), r = et("customScrollParent"), s = et("useWindowScroll"), i = Ue(n, r, !1);
|
|
3379
3389
|
return E.useEffect(() => {
|
|
3380
3390
|
e && (o({ height: e.itemHeight, width: e.itemWidth }), n({ listHeight: 0, offsetTop: 0, visibleHeight: e.viewportHeight, visibleWidth: e.viewportWidth }));
|
|
3381
|
-
}, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style:
|
|
3391
|
+
}, [e, n, o]), /* @__PURE__ */ G("div", { ref: i, style: en(!1, s), children: t });
|
|
3382
3392
|
}, Zr = /* @__PURE__ */ E.memo(function({ ...e }) {
|
|
3383
3393
|
const n = et("useWindowScroll"), o = et("customScrollParent"), r = o || n ? Qr : Jr, s = o || n ? Yr : qr, i = et("context");
|
|
3384
3394
|
return /* @__PURE__ */ G(r, { ...e, ...ot(r, i), children: /* @__PURE__ */ $t(s, { children: [
|
|
@@ -3391,7 +3401,7 @@ const Dr = /* @__PURE__ */ j(() => {
|
|
|
3391
3401
|
useEmitter: go,
|
|
3392
3402
|
useEmitterValue: et,
|
|
3393
3403
|
usePublisher: wt
|
|
3394
|
-
} = /* @__PURE__ */
|
|
3404
|
+
} = /* @__PURE__ */ Je(
|
|
3395
3405
|
$r,
|
|
3396
3406
|
{
|
|
3397
3407
|
optional: {
|
|
@@ -3432,7 +3442,7 @@ const Dr = /* @__PURE__ */ j(() => {
|
|
|
3432
3442
|
}
|
|
3433
3443
|
},
|
|
3434
3444
|
Zr
|
|
3435
|
-
), Jr = /* @__PURE__ */
|
|
3445
|
+
), Jr = /* @__PURE__ */ nn({ useEmitter: go, useEmitterValue: et, usePublisher: wt }), Qr = /* @__PURE__ */ on({ useEmitter: go, useEmitterValue: et, usePublisher: wt });
|
|
3436
3446
|
function Wn(t, e, n) {
|
|
3437
3447
|
return e !== "normal" && e?.endsWith("px") !== !0 && n(`${t} was not resolved to pixel value correctly`, e, ft.WARN), e === "normal" ? 0 : parseInt(e ?? "0", 10);
|
|
3438
3448
|
}
|