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