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