@readerseye2/cr_viewer 1.0.25 → 1.0.26
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/components/RenderRuns.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +733 -725
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
var Vi = Object.defineProperty;
|
|
3
3
|
var qi = (e, t, n) => t in e ? Vi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var Ar = (e, t, n) => qi(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
|
-
import { jsx as x, jsxs as
|
|
5
|
+
import { jsx as x, jsxs as Z, Fragment as yt } from "react/jsx-runtime";
|
|
6
6
|
import * as Ye from "react";
|
|
7
|
-
import
|
|
7
|
+
import D, { createContext as Ft, useContext as Ue, useMemo as ve, useLayoutEffect as Tt, useRef as ie, useEffect as Se, useCallback as Q, createElement as hn, memo as Dt, useState as tt, useId as ji } from "react";
|
|
8
8
|
import Ui from "react-dom";
|
|
9
9
|
const br = Ft(void 0);
|
|
10
10
|
var an = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -25,7 +25,7 @@ var Lr;
|
|
|
25
25
|
function Ki() {
|
|
26
26
|
if (Lr) return Bn;
|
|
27
27
|
Lr = 1;
|
|
28
|
-
var e =
|
|
28
|
+
var e = D;
|
|
29
29
|
function t(m, p) {
|
|
30
30
|
return m === p && (m !== 0 || 1 / m === 1 / p) || m !== m && p !== p;
|
|
31
31
|
}
|
|
@@ -121,7 +121,7 @@ function Xi() {
|
|
|
121
121
|
return v();
|
|
122
122
|
}
|
|
123
123
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
124
|
-
var o =
|
|
124
|
+
var o = D, i = typeof Object.is == "function" ? Object.is : e, s = o.useState, c = o.useEffect, l = o.useLayoutEffect, a = o.useDebugValue, d = !1, m = !1, p = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
|
|
125
125
|
zn.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : p, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
126
126
|
})()), zn;
|
|
127
127
|
}
|
|
@@ -142,7 +142,7 @@ var Nr;
|
|
|
142
142
|
function Yi() {
|
|
143
143
|
if (Nr) return Pn;
|
|
144
144
|
Nr = 1;
|
|
145
|
-
var e =
|
|
145
|
+
var e = D, t = jo();
|
|
146
146
|
function n(a, d) {
|
|
147
147
|
return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d;
|
|
148
148
|
}
|
|
@@ -157,18 +157,18 @@ function Yi() {
|
|
|
157
157
|
function() {
|
|
158
158
|
function f(I) {
|
|
159
159
|
if (!g) {
|
|
160
|
-
if (g = !0,
|
|
160
|
+
if (g = !0, C = I, I = p(I), b !== void 0 && y.hasValue) {
|
|
161
161
|
var h = y.value;
|
|
162
162
|
if (b(h, I))
|
|
163
163
|
return k = h;
|
|
164
164
|
}
|
|
165
165
|
return k = I;
|
|
166
166
|
}
|
|
167
|
-
if (h = k, r(
|
|
167
|
+
if (h = k, r(C, I)) return h;
|
|
168
168
|
var S = p(I);
|
|
169
|
-
return b !== void 0 && b(h, S) ? (
|
|
169
|
+
return b !== void 0 && b(h, S) ? (C = I, h) : (C = I, k = S);
|
|
170
170
|
}
|
|
171
|
-
var g = !1,
|
|
171
|
+
var g = !1, C, k, R = m === void 0 ? null : m;
|
|
172
172
|
return [
|
|
173
173
|
function() {
|
|
174
174
|
return f(d());
|
|
@@ -206,7 +206,7 @@ function Qi() {
|
|
|
206
206
|
return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d;
|
|
207
207
|
}
|
|
208
208
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
209
|
-
var t =
|
|
209
|
+
var t = D, n = jo(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, i = t.useRef, s = t.useEffect, c = t.useMemo, l = t.useDebugValue;
|
|
210
210
|
An.useSyncExternalStoreWithSelector = function(a, d, m, p, b) {
|
|
211
211
|
var v = i(null);
|
|
212
212
|
if (v.current === null) {
|
|
@@ -217,19 +217,19 @@ function Qi() {
|
|
|
217
217
|
function() {
|
|
218
218
|
function f(I) {
|
|
219
219
|
if (!g) {
|
|
220
|
-
if (g = !0,
|
|
220
|
+
if (g = !0, C = I, I = p(I), b !== void 0 && y.hasValue) {
|
|
221
221
|
var h = y.value;
|
|
222
222
|
if (b(h, I))
|
|
223
223
|
return k = h;
|
|
224
224
|
}
|
|
225
225
|
return k = I;
|
|
226
226
|
}
|
|
227
|
-
if (h = k, r(
|
|
227
|
+
if (h = k, r(C, I))
|
|
228
228
|
return h;
|
|
229
229
|
var S = p(I);
|
|
230
|
-
return b !== void 0 && b(h, S) ? (
|
|
230
|
+
return b !== void 0 && b(h, S) ? (C = I, h) : (C = I, k = S);
|
|
231
231
|
}
|
|
232
|
-
var g = !1,
|
|
232
|
+
var g = !1, C, k, R = m === void 0 ? null : m;
|
|
233
233
|
return [
|
|
234
234
|
function() {
|
|
235
235
|
return f(d());
|
|
@@ -275,7 +275,7 @@ function Tn(e, t = ns, n) {
|
|
|
275
275
|
t,
|
|
276
276
|
n
|
|
277
277
|
);
|
|
278
|
-
return
|
|
278
|
+
return D.useDebugValue(r), r;
|
|
279
279
|
}
|
|
280
280
|
function Y(e, t) {
|
|
281
281
|
const n = Ue(br);
|
|
@@ -376,7 +376,7 @@ function is({
|
|
|
376
376
|
Se(() => () => {
|
|
377
377
|
o.current != null && (clearTimeout(o.current), o.current = null);
|
|
378
378
|
}, []);
|
|
379
|
-
const i =
|
|
379
|
+
const i = Q(
|
|
380
380
|
(c) => {
|
|
381
381
|
if (!(r != null && r(c.target)) && c.detail === 1) {
|
|
382
382
|
if (o.current != null) return;
|
|
@@ -386,7 +386,7 @@ function is({
|
|
|
386
386
|
}
|
|
387
387
|
},
|
|
388
388
|
[n, e, r]
|
|
389
|
-
), s =
|
|
389
|
+
), s = Q(
|
|
390
390
|
(c) => {
|
|
391
391
|
r != null && r(c.target) || o.current != null && (clearTimeout(o.current), o.current = null);
|
|
392
392
|
},
|
|
@@ -885,10 +885,10 @@ function Ot(e, t, n) {
|
|
|
885
885
|
return xr(e, t, n).callbackRef;
|
|
886
886
|
}
|
|
887
887
|
function xr(e, t, n) {
|
|
888
|
-
const r =
|
|
888
|
+
const r = D.useRef(null);
|
|
889
889
|
let o = (s) => {
|
|
890
890
|
};
|
|
891
|
-
const i =
|
|
891
|
+
const i = D.useMemo(() => typeof ResizeObserver < "u" ? new ResizeObserver((s) => {
|
|
892
892
|
const c = () => {
|
|
893
893
|
const l = s[0].target;
|
|
894
894
|
l.offsetParent !== null && e(l);
|
|
@@ -900,7 +900,7 @@ function xr(e, t, n) {
|
|
|
900
900
|
}, { callbackRef: o, ref: r };
|
|
901
901
|
}
|
|
902
902
|
function vs(e, t, n, r, o, i, s, c, l) {
|
|
903
|
-
const a =
|
|
903
|
+
const a = D.useCallback(
|
|
904
904
|
(d) => {
|
|
905
905
|
const m = Ss(d.children, t, c ? "offsetWidth" : "offsetHeight", o);
|
|
906
906
|
let p = d.parentElement;
|
|
@@ -943,7 +943,7 @@ function jr(e, t, n) {
|
|
|
943
943
|
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Qe.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
944
944
|
}
|
|
945
945
|
function Zo(e, t, n) {
|
|
946
|
-
const r =
|
|
946
|
+
const r = D.useRef(null), o = D.useCallback(
|
|
947
947
|
(l) => {
|
|
948
948
|
if (!(l != null && l.offsetParent))
|
|
949
949
|
return;
|
|
@@ -964,10 +964,10 @@ function Zo(e, t, n) {
|
|
|
964
964
|
},
|
|
965
965
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
966
966
|
[e, t]
|
|
967
|
-
), { callbackRef: i, ref: s } = xr(o, !0, n), c =
|
|
967
|
+
), { callbackRef: i, ref: s } = xr(o, !0, n), c = D.useCallback(() => {
|
|
968
968
|
o(s.current);
|
|
969
969
|
}, [o, s]);
|
|
970
|
-
return
|
|
970
|
+
return D.useEffect(() => {
|
|
971
971
|
var l;
|
|
972
972
|
if (t) {
|
|
973
973
|
t.addEventListener("scroll", c);
|
|
@@ -1355,8 +1355,8 @@ const Os = {
|
|
|
1355
1355
|
l,
|
|
1356
1356
|
ce((h) => h.length > 0),
|
|
1357
1357
|
be(f, y),
|
|
1358
|
-
U(([h, S,
|
|
1359
|
-
const E = h.reduce((O, z,
|
|
1358
|
+
U(([h, S, T]) => {
|
|
1359
|
+
const E = h.reduce((O, z, w) => Ze(O, z, Zt(z, S.offsetTree, T) || w), Gt());
|
|
1360
1360
|
return {
|
|
1361
1361
|
...S,
|
|
1362
1362
|
groupIndices: h,
|
|
@@ -1370,17 +1370,17 @@ const Os = {
|
|
|
1370
1370
|
r,
|
|
1371
1371
|
be(f),
|
|
1372
1372
|
ce(([h, { lastIndex: S }]) => h < S),
|
|
1373
|
-
U(([h, { lastIndex: S, lastSize:
|
|
1373
|
+
U(([h, { lastIndex: S, lastSize: T }]) => [
|
|
1374
1374
|
{
|
|
1375
1375
|
endIndex: S,
|
|
1376
|
-
size:
|
|
1376
|
+
size: T,
|
|
1377
1377
|
startIndex: h
|
|
1378
1378
|
}
|
|
1379
1379
|
])
|
|
1380
1380
|
),
|
|
1381
1381
|
n
|
|
1382
1382
|
), te(a, d);
|
|
1383
|
-
const
|
|
1383
|
+
const C = je(
|
|
1384
1384
|
L(
|
|
1385
1385
|
a,
|
|
1386
1386
|
U((h) => h === void 0)
|
|
@@ -1392,8 +1392,8 @@ const Os = {
|
|
|
1392
1392
|
d,
|
|
1393
1393
|
ce((h) => h !== void 0 && Ce(Be(f).sizeTree)),
|
|
1394
1394
|
U((h) => {
|
|
1395
|
-
const S = Be(m),
|
|
1396
|
-
return S ?
|
|
1395
|
+
const S = Be(m), T = Be(l).length > 0;
|
|
1396
|
+
return S ? T ? [
|
|
1397
1397
|
{ endIndex: 0, size: S, startIndex: 0 },
|
|
1398
1398
|
{ endIndex: 1, size: h, startIndex: 1 }
|
|
1399
1399
|
] : [] : [{ endIndex: 0, size: h, startIndex: 0 }];
|
|
@@ -1406,18 +1406,18 @@ const Os = {
|
|
|
1406
1406
|
ce((h) => h !== void 0 && h.length > 0 && Ce(Be(f).sizeTree)),
|
|
1407
1407
|
U((h) => {
|
|
1408
1408
|
const S = [];
|
|
1409
|
-
let
|
|
1409
|
+
let T = h[0], E = 0;
|
|
1410
1410
|
for (let O = 1; O < h.length; O++) {
|
|
1411
1411
|
const z = h[O];
|
|
1412
|
-
z !==
|
|
1412
|
+
z !== T && (S.push({
|
|
1413
1413
|
endIndex: O - 1,
|
|
1414
|
-
size:
|
|
1414
|
+
size: T,
|
|
1415
1415
|
startIndex: E
|
|
1416
|
-
}),
|
|
1416
|
+
}), T = z, E = O);
|
|
1417
1417
|
}
|
|
1418
1418
|
return S.push({
|
|
1419
1419
|
endIndex: h.length - 1,
|
|
1420
|
-
size:
|
|
1420
|
+
size: T,
|
|
1421
1421
|
startIndex: E
|
|
1422
1422
|
}), S;
|
|
1423
1423
|
})
|
|
@@ -1428,18 +1428,18 @@ const Os = {
|
|
|
1428
1428
|
l,
|
|
1429
1429
|
be(m, d),
|
|
1430
1430
|
ce(([, h, S]) => h !== void 0 && S !== void 0),
|
|
1431
|
-
U(([h, S,
|
|
1431
|
+
U(([h, S, T]) => {
|
|
1432
1432
|
const E = [];
|
|
1433
1433
|
for (let O = 0; O < h.length; O++) {
|
|
1434
|
-
const z = h[O],
|
|
1434
|
+
const z = h[O], w = h[O + 1];
|
|
1435
1435
|
E.push({
|
|
1436
1436
|
startIndex: z,
|
|
1437
1437
|
endIndex: z,
|
|
1438
1438
|
size: S
|
|
1439
|
-
}),
|
|
1439
|
+
}), w !== void 0 && E.push({
|
|
1440
1440
|
startIndex: z + 1,
|
|
1441
|
-
endIndex:
|
|
1442
|
-
size:
|
|
1441
|
+
endIndex: w - 1,
|
|
1442
|
+
size: T
|
|
1443
1443
|
});
|
|
1444
1444
|
}
|
|
1445
1445
|
return E;
|
|
@@ -1452,9 +1452,9 @@ const Os = {
|
|
|
1452
1452
|
n,
|
|
1453
1453
|
be(f),
|
|
1454
1454
|
ht(
|
|
1455
|
-
({ sizes: h }, [S,
|
|
1456
|
-
changed:
|
|
1457
|
-
sizes:
|
|
1455
|
+
({ sizes: h }, [S, T]) => ({
|
|
1456
|
+
changed: T !== h,
|
|
1457
|
+
sizes: T
|
|
1458
1458
|
}),
|
|
1459
1459
|
{ changed: !1, sizes: u }
|
|
1460
1460
|
),
|
|
@@ -1475,8 +1475,8 @@ const Os = {
|
|
|
1475
1475
|
if (h > 0)
|
|
1476
1476
|
ge(t, !0), ge(i, h + Kr(h, S));
|
|
1477
1477
|
else if (h < 0) {
|
|
1478
|
-
const
|
|
1479
|
-
|
|
1478
|
+
const T = Be(g);
|
|
1479
|
+
T.length > 0 && (h -= Kr(-h, T)), ge(s, h);
|
|
1480
1480
|
}
|
|
1481
1481
|
}
|
|
1482
1482
|
), Ie(L(c, be(e)), ([h, S]) => {
|
|
@@ -1492,11 +1492,11 @@ const Os = {
|
|
|
1492
1492
|
i,
|
|
1493
1493
|
be(f),
|
|
1494
1494
|
U(([h, S]) => {
|
|
1495
|
-
const
|
|
1496
|
-
if (
|
|
1495
|
+
const T = S.groupIndices.length > 0, E = [], O = S.lastSize;
|
|
1496
|
+
if (T) {
|
|
1497
1497
|
const z = Yt(S.sizeTree, 0);
|
|
1498
|
-
let
|
|
1499
|
-
for (;
|
|
1498
|
+
let w = 0, _ = 0;
|
|
1499
|
+
for (; w < h; ) {
|
|
1500
1500
|
const G = S.groupIndices[_], M = S.groupIndices.length === _ + 1 ? 1 / 0 : S.groupIndices[_ + 1] - G - 1;
|
|
1501
1501
|
E.push({
|
|
1502
1502
|
endIndex: G,
|
|
@@ -1506,13 +1506,13 @@ const Os = {
|
|
|
1506
1506
|
endIndex: G + 1 + M - 1,
|
|
1507
1507
|
size: O,
|
|
1508
1508
|
startIndex: G + 1
|
|
1509
|
-
}), _++,
|
|
1509
|
+
}), _++, w += M + 1;
|
|
1510
1510
|
}
|
|
1511
1511
|
const P = kt(S.sizeTree);
|
|
1512
|
-
return
|
|
1512
|
+
return w !== h && P.shift(), P.reduce(
|
|
1513
1513
|
(G, { k: M, v: B }) => {
|
|
1514
|
-
let
|
|
1515
|
-
return G.prevSize !== 0 && (
|
|
1514
|
+
let F = G.ranges;
|
|
1515
|
+
return G.prevSize !== 0 && (F = [
|
|
1516
1516
|
...G.ranges,
|
|
1517
1517
|
{
|
|
1518
1518
|
endIndex: M + h - 1,
|
|
@@ -1522,7 +1522,7 @@ const Os = {
|
|
|
1522
1522
|
]), {
|
|
1523
1523
|
prevIndex: M + h,
|
|
1524
1524
|
prevSize: B,
|
|
1525
|
-
ranges:
|
|
1525
|
+
ranges: F
|
|
1526
1526
|
};
|
|
1527
1527
|
},
|
|
1528
1528
|
{
|
|
@@ -1533,10 +1533,10 @@ const Os = {
|
|
|
1533
1533
|
).ranges;
|
|
1534
1534
|
}
|
|
1535
1535
|
return kt(S.sizeTree).reduce(
|
|
1536
|
-
(z, { k:
|
|
1537
|
-
prevIndex:
|
|
1536
|
+
(z, { k: w, v: _ }) => ({
|
|
1537
|
+
prevIndex: w + h,
|
|
1538
1538
|
prevSize: _,
|
|
1539
|
-
ranges: [...z.ranges, { endIndex:
|
|
1539
|
+
ranges: [...z.ranges, { endIndex: w + h - 1, size: z.prevSize, startIndex: z.prevIndex }]
|
|
1540
1540
|
}),
|
|
1541
1541
|
{
|
|
1542
1542
|
prevIndex: 0,
|
|
@@ -1552,9 +1552,9 @@ const Os = {
|
|
|
1552
1552
|
L(
|
|
1553
1553
|
s,
|
|
1554
1554
|
be(f, y),
|
|
1555
|
-
U(([h, { offsetTree: S },
|
|
1555
|
+
U(([h, { offsetTree: S }, T]) => {
|
|
1556
1556
|
const E = -h;
|
|
1557
|
-
return Zt(E, S,
|
|
1557
|
+
return Zt(E, S, T);
|
|
1558
1558
|
})
|
|
1559
1559
|
)
|
|
1560
1560
|
);
|
|
@@ -1562,17 +1562,17 @@ const Os = {
|
|
|
1562
1562
|
L(
|
|
1563
1563
|
s,
|
|
1564
1564
|
be(f, y),
|
|
1565
|
-
U(([h, S,
|
|
1565
|
+
U(([h, S, T]) => {
|
|
1566
1566
|
if (S.groupIndices.length > 0) {
|
|
1567
1567
|
if (Ce(S.sizeTree))
|
|
1568
1568
|
return S;
|
|
1569
1569
|
let E = Gt();
|
|
1570
1570
|
const O = Be(g);
|
|
1571
|
-
let z = 0,
|
|
1571
|
+
let z = 0, w = 0, _ = 0;
|
|
1572
1572
|
for (; z < -h; ) {
|
|
1573
|
-
_ = O[
|
|
1574
|
-
const P = O[
|
|
1575
|
-
|
|
1573
|
+
_ = O[w];
|
|
1574
|
+
const P = O[w + 1] - _ - 1;
|
|
1575
|
+
w++, z += P + 1;
|
|
1576
1576
|
}
|
|
1577
1577
|
if (E = kt(S.sizeTree).reduce((P, { k: G, v: M }) => Ze(P, Math.max(0, G + h), M), E), z !== -h) {
|
|
1578
1578
|
const P = Yt(S.sizeTree, _);
|
|
@@ -1583,14 +1583,14 @@ const Os = {
|
|
|
1583
1583
|
return {
|
|
1584
1584
|
...S,
|
|
1585
1585
|
sizeTree: E,
|
|
1586
|
-
...hr(S.offsetTree, 0, E,
|
|
1586
|
+
...hr(S.offsetTree, 0, E, T)
|
|
1587
1587
|
};
|
|
1588
1588
|
} else {
|
|
1589
|
-
const E = kt(S.sizeTree).reduce((O, { k: z, v:
|
|
1589
|
+
const E = kt(S.sizeTree).reduce((O, { k: z, v: w }) => Ze(O, Math.max(0, z + h), w), Gt());
|
|
1590
1590
|
return {
|
|
1591
1591
|
...S,
|
|
1592
1592
|
sizeTree: E,
|
|
1593
|
-
...hr(S.offsetTree, 0, E,
|
|
1593
|
+
...hr(S.offsetTree, 0, E, T)
|
|
1594
1594
|
};
|
|
1595
1595
|
}
|
|
1596
1596
|
})
|
|
@@ -1616,7 +1616,7 @@ const Os = {
|
|
|
1616
1616
|
sizes: f,
|
|
1617
1617
|
statefulTotalCount: o,
|
|
1618
1618
|
totalCount: r,
|
|
1619
|
-
trackItemSizes:
|
|
1619
|
+
trackItemSizes: C,
|
|
1620
1620
|
unshiftWith: i
|
|
1621
1621
|
};
|
|
1622
1622
|
},
|
|
@@ -1696,7 +1696,7 @@ const on = xe(
|
|
|
1696
1696
|
]) => {
|
|
1697
1697
|
const b = ye(), v = ye(), y = H(0);
|
|
1698
1698
|
let u = null, f = null, g = null;
|
|
1699
|
-
function
|
|
1699
|
+
function C() {
|
|
1700
1700
|
u && (u(), u = null), g && (g(), g = null), f && (clearTimeout(f), f = null), ge(l, !1);
|
|
1701
1701
|
}
|
|
1702
1702
|
return te(
|
|
@@ -1706,18 +1706,18 @@ const on = xe(
|
|
|
1706
1706
|
be(e, i, o),
|
|
1707
1707
|
U(
|
|
1708
1708
|
([
|
|
1709
|
-
[k, R, I, h, S,
|
|
1709
|
+
[k, R, I, h, S, T, E, O],
|
|
1710
1710
|
z,
|
|
1711
|
-
|
|
1711
|
+
w,
|
|
1712
1712
|
_
|
|
1713
1713
|
]) => {
|
|
1714
|
-
const P = ci(k), { align: G, behavior: M, offset: B } = P,
|
|
1715
|
-
let q = Zt(V, R.offsetTree, z) +
|
|
1716
|
-
G === "end" ? (q +=
|
|
1714
|
+
const P = ci(k), { align: G, behavior: M, offset: B } = P, F = h - 1, V = li(P, R, F);
|
|
1715
|
+
let q = Zt(V, R.offsetTree, z) + T;
|
|
1716
|
+
G === "end" ? (q += w + ut(R.sizeTree, V)[1] - I + _, V === F && (q += E)) : G === "center" ? q += (w + ut(R.sizeTree, V)[1] - I + _) / 2 : q -= S, B && (q += B);
|
|
1717
1717
|
const ue = (de) => {
|
|
1718
|
-
|
|
1718
|
+
C(), de ? (O("retrying to scroll to", { location: k }, Qe.DEBUG), ge(b, k)) : (ge(v, !0), O("list did not change, scroll successful", {}, Qe.DEBUG));
|
|
1719
1719
|
};
|
|
1720
|
-
if (
|
|
1720
|
+
if (C(), M === "smooth") {
|
|
1721
1721
|
let de = !1;
|
|
1722
1722
|
g = Ie(t, (ke) => {
|
|
1723
1723
|
de = de || ke;
|
|
@@ -1727,7 +1727,7 @@ const on = xe(
|
|
|
1727
1727
|
} else
|
|
1728
1728
|
u = ct(L(t, zs(150)), ue);
|
|
1729
1729
|
return f = setTimeout(() => {
|
|
1730
|
-
|
|
1730
|
+
C();
|
|
1731
1731
|
}, 1200), ge(l, !0), O("scrolling from index to", { behavior: M, index: V, top: q }, Qe.DEBUG), { behavior: M, top: q };
|
|
1732
1732
|
}
|
|
1733
1733
|
)
|
|
@@ -1831,7 +1831,7 @@ const Jt = "up", Ut = "down", As = "none", Ls = {
|
|
|
1831
1831
|
te(
|
|
1832
1832
|
L(
|
|
1833
1833
|
Fe(ae(o), ae(m)),
|
|
1834
|
-
U(([g,
|
|
1834
|
+
U(([g, C]) => g <= C),
|
|
1835
1835
|
Me()
|
|
1836
1836
|
),
|
|
1837
1837
|
c
|
|
@@ -1839,18 +1839,18 @@ const Jt = "up", Ut = "down", As = "none", Ls = {
|
|
|
1839
1839
|
const v = Je(
|
|
1840
1840
|
L(
|
|
1841
1841
|
Fe(r, ae(i), ae(t), ae(e), ae(d)),
|
|
1842
|
-
ht((g, [{ scrollHeight:
|
|
1843
|
-
const
|
|
1844
|
-
scrollHeight:
|
|
1842
|
+
ht((g, [{ scrollHeight: C, scrollTop: k }, R, I, h, S]) => {
|
|
1843
|
+
const T = k + R - C > -S, E = {
|
|
1844
|
+
scrollHeight: C,
|
|
1845
1845
|
scrollTop: k,
|
|
1846
1846
|
viewportHeight: R
|
|
1847
1847
|
};
|
|
1848
|
-
if (
|
|
1849
|
-
let z,
|
|
1850
|
-
return k > g.state.scrollTop ? (z = "SCROLLED_DOWN",
|
|
1848
|
+
if (T) {
|
|
1849
|
+
let z, w;
|
|
1850
|
+
return k > g.state.scrollTop ? (z = "SCROLLED_DOWN", w = g.state.scrollTop - k) : (z = "SIZE_DECREASED", w = g.state.scrollTop - k || g.scrollTopDelta), {
|
|
1851
1851
|
atBottom: !0,
|
|
1852
1852
|
atBottomBecause: z,
|
|
1853
|
-
scrollTopDelta:
|
|
1853
|
+
scrollTopDelta: w,
|
|
1854
1854
|
state: E
|
|
1855
1855
|
};
|
|
1856
1856
|
}
|
|
@@ -1861,31 +1861,31 @@ const Jt = "up", Ut = "down", As = "none", Ls = {
|
|
|
1861
1861
|
state: E
|
|
1862
1862
|
};
|
|
1863
1863
|
}, Ls),
|
|
1864
|
-
Me((g,
|
|
1864
|
+
Me((g, C) => g && g.atBottom === C.atBottom)
|
|
1865
1865
|
)
|
|
1866
1866
|
), y = je(
|
|
1867
1867
|
L(
|
|
1868
1868
|
r,
|
|
1869
1869
|
ht(
|
|
1870
|
-
(g, { scrollHeight:
|
|
1871
|
-
if (ui(g.scrollHeight,
|
|
1870
|
+
(g, { scrollHeight: C, scrollTop: k, viewportHeight: R }) => {
|
|
1871
|
+
if (ui(g.scrollHeight, C))
|
|
1872
1872
|
return {
|
|
1873
1873
|
changed: !1,
|
|
1874
1874
|
jump: 0,
|
|
1875
|
-
scrollHeight:
|
|
1875
|
+
scrollHeight: C,
|
|
1876
1876
|
scrollTop: k
|
|
1877
1877
|
};
|
|
1878
1878
|
{
|
|
1879
|
-
const I =
|
|
1879
|
+
const I = C - (k + R) < 1;
|
|
1880
1880
|
return g.scrollTop !== k && I ? {
|
|
1881
1881
|
changed: !0,
|
|
1882
1882
|
jump: g.scrollTop - k,
|
|
1883
|
-
scrollHeight:
|
|
1883
|
+
scrollHeight: C,
|
|
1884
1884
|
scrollTop: k
|
|
1885
1885
|
} : {
|
|
1886
1886
|
changed: !0,
|
|
1887
1887
|
jump: 0,
|
|
1888
|
-
scrollHeight:
|
|
1888
|
+
scrollHeight: C,
|
|
1889
1889
|
scrollTop: k
|
|
1890
1890
|
};
|
|
1891
1891
|
}
|
|
@@ -1911,7 +1911,7 @@ const Jt = "up", Ut = "down", As = "none", Ls = {
|
|
|
1911
1911
|
U(({ scrollTop: g }) => g),
|
|
1912
1912
|
Me(),
|
|
1913
1913
|
ht(
|
|
1914
|
-
(g,
|
|
1914
|
+
(g, C) => Be(b) ? { direction: g.direction, prevScrollTop: C } : { direction: C < g.prevScrollTop ? Jt : Ut, prevScrollTop: C },
|
|
1915
1915
|
{ direction: Ut, prevScrollTop: 0 }
|
|
1916
1916
|
),
|
|
1917
1917
|
U((g) => g.direction)
|
|
@@ -1931,9 +1931,9 @@ const Jt = "up", Ut = "down", As = "none", Ls = {
|
|
|
1931
1931
|
o,
|
|
1932
1932
|
mt(100),
|
|
1933
1933
|
be(p),
|
|
1934
|
-
ce(([g,
|
|
1935
|
-
ht(([g,
|
|
1936
|
-
U(([g,
|
|
1934
|
+
ce(([g, C]) => C),
|
|
1935
|
+
ht(([g, C], [k]) => [C, k], [0, 0]),
|
|
1936
|
+
U(([g, C]) => C - g)
|
|
1937
1937
|
),
|
|
1938
1938
|
f
|
|
1939
1939
|
), {
|
|
@@ -1982,14 +1982,14 @@ const kr = xe(
|
|
|
1982
1982
|
u,
|
|
1983
1983
|
f,
|
|
1984
1984
|
g,
|
|
1985
|
-
|
|
1985
|
+
C
|
|
1986
1986
|
]) => {
|
|
1987
1987
|
const k = d - g, R = u + f, I = Math.max(p - k, 0);
|
|
1988
1988
|
let h = Xr;
|
|
1989
|
-
const S = Qr(
|
|
1990
|
-
return b -= g, b += p + f, v += p + f, v -= g, b > d + R - S && (h = Jt), v < d - I + m +
|
|
1989
|
+
const S = Qr(C, en), T = Qr(C, tn);
|
|
1990
|
+
return b -= g, b += p + f, v += p + f, v -= g, b > d + R - S && (h = Jt), v < d - I + m + T && (h = Ut), h !== Xr ? [
|
|
1991
1991
|
Math.max(k - p - Yr(y, en, h) - S, 0),
|
|
1992
|
-
k - I - f + m + Yr(y, tn, h) +
|
|
1992
|
+
k - I - f + m + Yr(y, tn, h) + T
|
|
1993
1993
|
] : null;
|
|
1994
1994
|
}
|
|
1995
1995
|
),
|
|
@@ -2112,7 +2112,7 @@ const Pt = xe(
|
|
|
2112
2112
|
]) => {
|
|
2113
2113
|
const y = H([]), u = H(0), f = ye(), g = H(0);
|
|
2114
2114
|
te(i.topItemsIndexes, y);
|
|
2115
|
-
const
|
|
2115
|
+
const C = je(
|
|
2116
2116
|
L(
|
|
2117
2117
|
Fe(
|
|
2118
2118
|
b,
|
|
@@ -2128,8 +2128,8 @@ const Pt = xe(
|
|
|
2128
2128
|
ae(g),
|
|
2129
2129
|
e
|
|
2130
2130
|
),
|
|
2131
|
-
ce(([h, S, ,
|
|
2132
|
-
const O = E && E.length !==
|
|
2131
|
+
ce(([h, S, , T, , , , , , , , E]) => {
|
|
2132
|
+
const O = E && E.length !== T;
|
|
2133
2133
|
return h && !S && !O;
|
|
2134
2134
|
}),
|
|
2135
2135
|
U(
|
|
@@ -2137,34 +2137,34 @@ const Pt = xe(
|
|
|
2137
2137
|
,
|
|
2138
2138
|
,
|
|
2139
2139
|
[h, S],
|
|
2140
|
-
|
|
2140
|
+
T,
|
|
2141
2141
|
E,
|
|
2142
2142
|
O,
|
|
2143
2143
|
z,
|
|
2144
|
-
|
|
2144
|
+
w,
|
|
2145
2145
|
_,
|
|
2146
2146
|
P,
|
|
2147
2147
|
G,
|
|
2148
2148
|
M
|
|
2149
2149
|
]) => {
|
|
2150
|
-
var B,
|
|
2150
|
+
var B, F, V, q;
|
|
2151
2151
|
const ue = E, { offsetTree: de, sizeTree: ke } = ue, Re = Be(u);
|
|
2152
|
-
if (
|
|
2153
|
-
return { ...Dn, totalCount:
|
|
2152
|
+
if (T === 0)
|
|
2153
|
+
return { ...Dn, totalCount: T };
|
|
2154
2154
|
if (h === 0 && S === 0)
|
|
2155
|
-
return Re === 0 ? { ...Dn, totalCount:
|
|
2155
|
+
return Re === 0 ? { ...Dn, totalCount: T } : di(Re, O, E, _, P, M || []);
|
|
2156
2156
|
if (Ce(ke))
|
|
2157
2157
|
return Re > 0 ? null : mn(
|
|
2158
|
-
Hs(Tr(O,
|
|
2158
|
+
Hs(Tr(O, T), ue, M),
|
|
2159
2159
|
[],
|
|
2160
|
-
|
|
2160
|
+
T,
|
|
2161
2161
|
P,
|
|
2162
2162
|
ue,
|
|
2163
2163
|
_
|
|
2164
2164
|
);
|
|
2165
2165
|
const ee = [];
|
|
2166
|
-
if (
|
|
2167
|
-
const $ =
|
|
2166
|
+
if (w.length > 0) {
|
|
2167
|
+
const $ = w[0], J = w[w.length - 1];
|
|
2168
2168
|
let se = 0;
|
|
2169
2169
|
for (const re of Ht(ke, $, J)) {
|
|
2170
2170
|
const pe = re.value, le = Math.max(re.start, $), we = Math.min(re.end, J);
|
|
@@ -2173,11 +2173,11 @@ const Pt = xe(
|
|
|
2173
2173
|
}
|
|
2174
2174
|
}
|
|
2175
2175
|
if (!z)
|
|
2176
|
-
return mn([], ee,
|
|
2177
|
-
const X =
|
|
2176
|
+
return mn([], ee, T, P, ue, _);
|
|
2177
|
+
const X = w.length > 0 ? w[w.length - 1] + 1 : 0, A = ks(de, h, S, X);
|
|
2178
2178
|
if (A.length === 0)
|
|
2179
2179
|
return null;
|
|
2180
|
-
const K =
|
|
2180
|
+
const K = T - 1, ne = _n([], ($) => {
|
|
2181
2181
|
for (const J of A) {
|
|
2182
2182
|
const se = J.value;
|
|
2183
2183
|
let re = se.offset, pe = J.start;
|
|
@@ -2199,7 +2199,7 @@ const Pt = xe(
|
|
|
2199
2199
|
const se = Math.min(N, $.index - X), re = [];
|
|
2200
2200
|
let pe = $.offset;
|
|
2201
2201
|
for (let le = $.index - 1; le >= $.index - se; le--) {
|
|
2202
|
-
const we = (
|
|
2202
|
+
const we = (F = (B = Ht(ke, le, le)[0]) == null ? void 0 : B.value) != null ? F : $.size;
|
|
2203
2203
|
pe -= we + P, re.unshift({ data: M == null ? void 0 : M[le], index: le, offset: pe, size: we });
|
|
2204
2204
|
}
|
|
2205
2205
|
ne.unshift(...re);
|
|
@@ -2213,7 +2213,7 @@ const Pt = xe(
|
|
|
2213
2213
|
}
|
|
2214
2214
|
}
|
|
2215
2215
|
}
|
|
2216
|
-
return mn(ne, ee,
|
|
2216
|
+
return mn(ne, ee, T, P, ue, _);
|
|
2217
2217
|
}
|
|
2218
2218
|
),
|
|
2219
2219
|
//@ts-expect-error filter needs to be fixed
|
|
@@ -2231,26 +2231,26 @@ const Pt = xe(
|
|
|
2231
2231
|
o
|
|
2232
2232
|
), te(
|
|
2233
2233
|
L(
|
|
2234
|
-
|
|
2234
|
+
C,
|
|
2235
2235
|
U((h) => h.topListHeight)
|
|
2236
2236
|
),
|
|
2237
2237
|
m
|
|
2238
2238
|
), te(m, c), te(
|
|
2239
2239
|
L(
|
|
2240
|
-
|
|
2240
|
+
C,
|
|
2241
2241
|
U((h) => [h.top, h.bottom])
|
|
2242
2242
|
),
|
|
2243
2243
|
s
|
|
2244
2244
|
), te(
|
|
2245
2245
|
L(
|
|
2246
|
-
|
|
2246
|
+
C,
|
|
2247
2247
|
U((h) => h.items)
|
|
2248
2248
|
),
|
|
2249
2249
|
f
|
|
2250
2250
|
);
|
|
2251
2251
|
const k = Je(
|
|
2252
2252
|
L(
|
|
2253
|
-
|
|
2253
|
+
C,
|
|
2254
2254
|
ce(({ items: h }) => h.length > 0),
|
|
2255
2255
|
be(o, e),
|
|
2256
2256
|
ce(([{ items: h }, S]) => h[h.length - 1].originalIndex === S - 1),
|
|
@@ -2260,7 +2260,7 @@ const Pt = xe(
|
|
|
2260
2260
|
)
|
|
2261
2261
|
), R = Je(
|
|
2262
2262
|
L(
|
|
2263
|
-
|
|
2263
|
+
C,
|
|
2264
2264
|
mt(200),
|
|
2265
2265
|
ce(({ items: h, topItems: S }) => h.length > 0 && h[0].originalIndex === S.length),
|
|
2266
2266
|
U(({ items: h }) => h[0].index),
|
|
@@ -2268,16 +2268,16 @@ const Pt = xe(
|
|
|
2268
2268
|
)
|
|
2269
2269
|
), I = Je(
|
|
2270
2270
|
L(
|
|
2271
|
-
|
|
2271
|
+
C,
|
|
2272
2272
|
ce(({ items: h }) => h.length > 0),
|
|
2273
2273
|
U(({ items: h }) => {
|
|
2274
|
-
let S = 0,
|
|
2275
|
-
for (; h[S].type === "group" && S <
|
|
2274
|
+
let S = 0, T = h.length - 1;
|
|
2275
|
+
for (; h[S].type === "group" && S < T; )
|
|
2276
2276
|
S++;
|
|
2277
|
-
for (; h[
|
|
2278
|
-
|
|
2277
|
+
for (; h[T].type === "group" && T > S; )
|
|
2278
|
+
T--;
|
|
2279
2279
|
return {
|
|
2280
|
-
endIndex: h[
|
|
2280
|
+
endIndex: h[T].index,
|
|
2281
2281
|
startIndex: h[S].index
|
|
2282
2282
|
};
|
|
2283
2283
|
}),
|
|
@@ -2288,7 +2288,7 @@ const Pt = xe(
|
|
|
2288
2288
|
endReached: k,
|
|
2289
2289
|
initialItemCount: u,
|
|
2290
2290
|
itemsRendered: f,
|
|
2291
|
-
listState:
|
|
2291
|
+
listState: C,
|
|
2292
2292
|
minOverscanItemCount: g,
|
|
2293
2293
|
rangeChanged: I,
|
|
2294
2294
|
startReached: R,
|
|
@@ -2356,12 +2356,12 @@ const Pt = xe(
|
|
|
2356
2356
|
d,
|
|
2357
2357
|
be(t, l, n, i, o, r, c),
|
|
2358
2358
|
be(e),
|
|
2359
|
-
U(([[m, p, b, v, y, u, f, g],
|
|
2360
|
-
const { align: k, behavior: R, calculateViewLocation: I = Fs, done: h, ...S } = m,
|
|
2359
|
+
U(([[m, p, b, v, y, u, f, g], C]) => {
|
|
2360
|
+
const { align: k, behavior: R, calculateViewLocation: I = Fs, done: h, ...S } = m, T = li(m, p, v - 1), E = Zt(T, p.offsetTree, C) + y + u, O = E + ut(p.sizeTree, T)[1], z = g + u, w = g + b - f, _ = I({
|
|
2361
2361
|
itemBottom: O,
|
|
2362
2362
|
itemTop: E,
|
|
2363
2363
|
locationParams: { align: k, behavior: R, ...S },
|
|
2364
|
-
viewportBottom:
|
|
2364
|
+
viewportBottom: w,
|
|
2365
2365
|
viewportTop: z
|
|
2366
2366
|
});
|
|
2367
2367
|
return _ ? h && ct(
|
|
@@ -2413,8 +2413,8 @@ const Ds = (e, t) => typeof e == "function" ? eo(e(t)) : t && eo(e), Ws = xe(
|
|
|
2413
2413
|
L(
|
|
2414
2414
|
Fe(L(ae(t), _t(1)), l),
|
|
2415
2415
|
be(ae(v), i, c, m),
|
|
2416
|
-
U(([[R, I], h, S,
|
|
2417
|
-
let O = I &&
|
|
2416
|
+
U(([[R, I], h, S, T, E]) => {
|
|
2417
|
+
let O = I && T, z = "auto";
|
|
2418
2418
|
return O && (z = Ds(h, S || E), O = O && !!z), { followOutputBehavior: z, shouldFollow: O, totalCount: R };
|
|
2419
2419
|
}),
|
|
2420
2420
|
ce(({ shouldFollow: R }) => R)
|
|
@@ -2452,7 +2452,7 @@ const Ds = (e, t) => typeof e == "function" ? eo(e(t)) : t && eo(e), Ws = xe(
|
|
|
2452
2452
|
}), Ie(Fe(ae(v), o), ([R, I]) => {
|
|
2453
2453
|
R && !I.atBottom && I.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
|
|
2454
2454
|
});
|
|
2455
|
-
const
|
|
2455
|
+
const C = H(null), k = ye();
|
|
2456
2456
|
return te(
|
|
2457
2457
|
ur(
|
|
2458
2458
|
L(
|
|
@@ -2468,8 +2468,8 @@ const Ds = (e, t) => typeof e == "function" ? eo(e(t)) : t && eo(e), Ws = xe(
|
|
|
2468
2468
|
), Ie(
|
|
2469
2469
|
L(
|
|
2470
2470
|
Fe(L(k, _t(1)), l),
|
|
2471
|
-
be(ae(
|
|
2472
|
-
U(([[R, I], h, S,
|
|
2471
|
+
be(ae(C), c, m, p),
|
|
2472
|
+
U(([[R, I], h, S, T, E]) => I && S && (h == null ? void 0 : h({ context: E, totalCount: R, scrollingInProgress: T }))),
|
|
2473
2473
|
ce((R) => !!R),
|
|
2474
2474
|
mt(0)
|
|
2475
2475
|
),
|
|
@@ -2480,7 +2480,7 @@ const Ds = (e, t) => typeof e == "function" ? eo(e(t)) : t && eo(e), Ws = xe(
|
|
|
2480
2480
|
Be(d)("scrolling into view", {}), ge(b, R), u = null;
|
|
2481
2481
|
});
|
|
2482
2482
|
}
|
|
2483
|
-
), { autoscrollToBottom: y, followOutput: v, scrollIntoViewOnChange:
|
|
2483
|
+
), { autoscrollToBottom: y, followOutput: v, scrollIntoViewOnChange: C };
|
|
2484
2484
|
},
|
|
2485
2485
|
Ee(
|
|
2486
2486
|
gt,
|
|
@@ -2611,9 +2611,9 @@ const Ds = (e, t) => typeof e == "function" ? eo(e(t)) : t && eo(e), Ws = xe(
|
|
|
2611
2611
|
a,
|
|
2612
2612
|
be(t, r, s, m, p, n)
|
|
2613
2613
|
),
|
|
2614
|
-
([b, v, y, u, f, g,
|
|
2614
|
+
([b, v, y, u, f, g, C]) => {
|
|
2615
2615
|
const k = _s(v.sizeTree);
|
|
2616
|
-
u && f !== null && g !== null && (y = f.scrollTop - g.offsetTop), y -=
|
|
2616
|
+
u && f !== null && g !== null && (y = f.scrollTop - g.offsetTop), y -= C, b({ ranges: k, scrollTop: y });
|
|
2617
2617
|
}
|
|
2618
2618
|
), te(L(d, ce(Sr), U(js)), o), te(
|
|
2619
2619
|
L(
|
|
@@ -2663,28 +2663,28 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2663
2663
|
l,
|
|
2664
2664
|
be(s),
|
|
2665
2665
|
ht(
|
|
2666
|
-
([, f, g,
|
|
2667
|
-
const
|
|
2666
|
+
([, f, g, C], [{ bottom: k, items: R, offsetBottom: I, totalCount: h }, S]) => {
|
|
2667
|
+
const T = k + I;
|
|
2668
2668
|
let E = 0;
|
|
2669
|
-
return g === h && f.length > 0 && R.length > 0 && (R[0].originalIndex === 0 && f[0].originalIndex === 0 || (E =
|
|
2669
|
+
return g === h && f.length > 0 && R.length > 0 && (R[0].originalIndex === 0 && f[0].originalIndex === 0 || (E = T - C, E !== 0 && (E += S))), [E, R, h, T];
|
|
2670
2670
|
},
|
|
2671
2671
|
[0, [], 0, 0]
|
|
2672
2672
|
),
|
|
2673
2673
|
ce(([f]) => f !== 0),
|
|
2674
2674
|
be(r, c, n, o, b, v),
|
|
2675
|
-
ce(([, f, g,
|
|
2675
|
+
ce(([, f, g, C, , , k]) => !k && !C && f !== 0 && g === Jt),
|
|
2676
2676
|
U(([[f], , , , , g]) => (g("Upward scrolling compensation", { amount: f }, Qe.DEBUG), f))
|
|
2677
2677
|
)
|
|
2678
2678
|
);
|
|
2679
2679
|
function u(f) {
|
|
2680
2680
|
f > 0 ? (ge(t, { behavior: "auto", top: -f }), ge(e, 0)) : (ge(e, 0), ge(t, { behavior: "auto", top: -f }));
|
|
2681
2681
|
}
|
|
2682
|
-
return Ie(L(y, be(e, i)), ([f, g,
|
|
2683
|
-
|
|
2682
|
+
return Ie(L(y, be(e, i)), ([f, g, C]) => {
|
|
2683
|
+
C && Ks() ? ge(e, g - f) : u(-f);
|
|
2684
2684
|
}), Ie(
|
|
2685
2685
|
L(
|
|
2686
2686
|
Fe(je(i, !1), e, v),
|
|
2687
|
-
ce(([f, g,
|
|
2687
|
+
ce(([f, g, C]) => !f && !C && g !== 0),
|
|
2688
2688
|
U(([f, g]) => g),
|
|
2689
2689
|
mt(1)
|
|
2690
2690
|
),
|
|
@@ -2699,20 +2699,20 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2699
2699
|
L(
|
|
2700
2700
|
a,
|
|
2701
2701
|
be(p, d),
|
|
2702
|
-
U(([f, { groupIndices: g, lastSize:
|
|
2702
|
+
U(([f, { groupIndices: g, lastSize: C, sizeTree: k }, R]) => {
|
|
2703
2703
|
function I(h) {
|
|
2704
|
-
return h * (
|
|
2704
|
+
return h * (C + R);
|
|
2705
2705
|
}
|
|
2706
2706
|
if (g.length === 0)
|
|
2707
2707
|
return I(f);
|
|
2708
2708
|
{
|
|
2709
2709
|
let h = 0;
|
|
2710
2710
|
const S = Yt(k, 0);
|
|
2711
|
-
let
|
|
2712
|
-
for (;
|
|
2713
|
-
|
|
2711
|
+
let T = 0, E = 0;
|
|
2712
|
+
for (; T < f; ) {
|
|
2713
|
+
T++, h += S;
|
|
2714
2714
|
let O = g.length === E + 1 ? 1 / 0 : g[E + 1] - g[E] - 1;
|
|
2715
|
-
|
|
2715
|
+
T + O > f && (h -= S, O = f - T + 1), T += O, h += I(O), E++;
|
|
2716
2716
|
}
|
|
2717
2717
|
return h;
|
|
2718
2718
|
}
|
|
@@ -2788,18 +2788,18 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2788
2788
|
{ initialItemFinalLocationReached: v, initialTopMostItemIndex: y, scrolledToInitialItem: u },
|
|
2789
2789
|
f,
|
|
2790
2790
|
g,
|
|
2791
|
-
|
|
2791
|
+
C,
|
|
2792
2792
|
k,
|
|
2793
2793
|
{ scrollToIndex: R },
|
|
2794
2794
|
I,
|
|
2795
2795
|
{ topItemCount: h },
|
|
2796
2796
|
{ groupCounts: S },
|
|
2797
|
-
|
|
2797
|
+
T
|
|
2798
2798
|
]) => {
|
|
2799
|
-
const { listState: E, minOverscanItemCount: O, topItemsIndexes: z, rangeChanged:
|
|
2800
|
-
return te(
|
|
2799
|
+
const { listState: E, minOverscanItemCount: O, topItemsIndexes: z, rangeChanged: w, ..._ } = k;
|
|
2800
|
+
return te(w, T.scrollSeekRangeChanged), te(
|
|
2801
2801
|
L(
|
|
2802
|
-
|
|
2802
|
+
T.windowViewportRect,
|
|
2803
2803
|
U((P) => P.visibleHeight)
|
|
2804
2804
|
),
|
|
2805
2805
|
f.viewportHeight
|
|
@@ -2820,7 +2820,7 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2820
2820
|
topItemsIndexes: z,
|
|
2821
2821
|
// input
|
|
2822
2822
|
totalCount: p,
|
|
2823
|
-
...
|
|
2823
|
+
...C,
|
|
2824
2824
|
groupIndices: s,
|
|
2825
2825
|
itemSize: l,
|
|
2826
2826
|
listState: E,
|
|
@@ -2830,10 +2830,10 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2830
2830
|
statefulTotalCount: m,
|
|
2831
2831
|
trackItemSizes: b,
|
|
2832
2832
|
// exported from stateFlagsSystem
|
|
2833
|
-
rangeChanged:
|
|
2833
|
+
rangeChanged: w,
|
|
2834
2834
|
..._,
|
|
2835
2835
|
// the bag of IO from featureGroup1System
|
|
2836
|
-
...
|
|
2836
|
+
...T,
|
|
2837
2837
|
...f,
|
|
2838
2838
|
sizes: d,
|
|
2839
2839
|
...g
|
|
@@ -2863,84 +2863,84 @@ function Qs(e, t) {
|
|
|
2863
2863
|
Object.hasOwn(r, s) || (n[s] = t[s]);
|
|
2864
2864
|
return n;
|
|
2865
2865
|
}
|
|
2866
|
-
const dn = typeof document < "u" ?
|
|
2866
|
+
const dn = typeof document < "u" ? D.useLayoutEffect : D.useEffect;
|
|
2867
2867
|
function vi(e, t, n) {
|
|
2868
|
-
const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), i = Object.keys(t.methods || {}), s = Object.keys(t.events || {}), c =
|
|
2868
|
+
const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), i = Object.keys(t.methods || {}), s = Object.keys(t.events || {}), c = D.createContext({});
|
|
2869
2869
|
function l(u, f) {
|
|
2870
2870
|
u.propsReady && ge(u.propsReady, !1);
|
|
2871
2871
|
for (const g of r) {
|
|
2872
|
-
const
|
|
2873
|
-
ge(
|
|
2872
|
+
const C = u[t.required[g]];
|
|
2873
|
+
ge(C, f[g]);
|
|
2874
2874
|
}
|
|
2875
2875
|
for (const g of o)
|
|
2876
2876
|
if (g in f) {
|
|
2877
|
-
const
|
|
2878
|
-
ge(
|
|
2877
|
+
const C = u[t.optional[g]];
|
|
2878
|
+
ge(C, f[g]);
|
|
2879
2879
|
}
|
|
2880
2880
|
u.propsReady && ge(u.propsReady, !0);
|
|
2881
2881
|
}
|
|
2882
2882
|
function a(u) {
|
|
2883
|
-
return i.reduce((f, g) => (f[g] = (
|
|
2883
|
+
return i.reduce((f, g) => (f[g] = (C) => {
|
|
2884
2884
|
const k = u[t.methods[g]];
|
|
2885
|
-
ge(k,
|
|
2885
|
+
ge(k, C);
|
|
2886
2886
|
}, f), {});
|
|
2887
2887
|
}
|
|
2888
2888
|
function d(u) {
|
|
2889
2889
|
return s.reduce((f, g) => (f[g] = ps(u[t.events[g]]), f), {});
|
|
2890
2890
|
}
|
|
2891
|
-
const m =
|
|
2892
|
-
const { children: g, ...
|
|
2893
|
-
l(h,
|
|
2894
|
-
})), [R] =
|
|
2891
|
+
const m = D.forwardRef((u, f) => {
|
|
2892
|
+
const { children: g, ...C } = u, [k] = D.useState(() => _n(gs(e), (h) => {
|
|
2893
|
+
l(h, C);
|
|
2894
|
+
})), [R] = D.useState(Vr(d, k));
|
|
2895
2895
|
dn(() => {
|
|
2896
2896
|
for (const h of s)
|
|
2897
|
-
h in
|
|
2897
|
+
h in C && Ie(R[h], C[h]);
|
|
2898
2898
|
return () => {
|
|
2899
2899
|
Object.values(R).map(yr);
|
|
2900
2900
|
};
|
|
2901
|
-
}, [
|
|
2902
|
-
l(k,
|
|
2903
|
-
}),
|
|
2901
|
+
}, [C, R, k]), dn(() => {
|
|
2902
|
+
l(k, C);
|
|
2903
|
+
}), D.useImperativeHandle(f, $r(a(k)));
|
|
2904
2904
|
const I = n;
|
|
2905
|
-
return /* @__PURE__ */ x(c.Provider, { value: k, children: n ? /* @__PURE__ */ x(I, { ...Qs([...r, ...o, ...s],
|
|
2905
|
+
return /* @__PURE__ */ x(c.Provider, { value: k, children: n ? /* @__PURE__ */ x(I, { ...Qs([...r, ...o, ...s], C), children: g }) : g });
|
|
2906
2906
|
}), p = (u) => {
|
|
2907
|
-
const f =
|
|
2908
|
-
return
|
|
2907
|
+
const f = D.useContext(c);
|
|
2908
|
+
return D.useCallback(
|
|
2909
2909
|
(g) => {
|
|
2910
2910
|
ge(f[u], g);
|
|
2911
2911
|
},
|
|
2912
2912
|
[f, u]
|
|
2913
2913
|
);
|
|
2914
2914
|
}, b = (u) => {
|
|
2915
|
-
const f =
|
|
2916
|
-
(
|
|
2915
|
+
const f = D.useContext(c)[u], g = D.useCallback(
|
|
2916
|
+
(C) => Ie(f, C),
|
|
2917
2917
|
[f]
|
|
2918
2918
|
);
|
|
2919
|
-
return
|
|
2919
|
+
return D.useSyncExternalStore(
|
|
2920
2920
|
g,
|
|
2921
2921
|
() => Be(f),
|
|
2922
2922
|
() => Be(f)
|
|
2923
2923
|
);
|
|
2924
2924
|
}, v = (u) => {
|
|
2925
|
-
const f =
|
|
2925
|
+
const f = D.useContext(c)[u], [g, C] = D.useState(Vr(Be, f));
|
|
2926
2926
|
return dn(
|
|
2927
2927
|
() => Ie(f, (k) => {
|
|
2928
|
-
k !== g &&
|
|
2928
|
+
k !== g && C($r(k));
|
|
2929
2929
|
}),
|
|
2930
2930
|
[f, g]
|
|
2931
2931
|
), g;
|
|
2932
|
-
}, y =
|
|
2932
|
+
}, y = D.version.startsWith("18") ? b : v;
|
|
2933
2933
|
return {
|
|
2934
2934
|
Component: m,
|
|
2935
2935
|
useEmitter: (u, f) => {
|
|
2936
|
-
const g =
|
|
2936
|
+
const g = D.useContext(c)[u];
|
|
2937
2937
|
dn(() => Ie(g, f), [f, g]);
|
|
2938
2938
|
},
|
|
2939
2939
|
useEmitterValue: y,
|
|
2940
2940
|
usePublisher: p
|
|
2941
2941
|
};
|
|
2942
2942
|
}
|
|
2943
|
-
const Si =
|
|
2943
|
+
const Si = D.createContext(void 0), yi = D.createContext(void 0), xi = typeof document < "u" ? D.useLayoutEffect : D.useEffect;
|
|
2944
2944
|
function Wn(e) {
|
|
2945
2945
|
return "self" in e;
|
|
2946
2946
|
}
|
|
@@ -2948,7 +2948,7 @@ function Zs(e) {
|
|
|
2948
2948
|
return "body" in e;
|
|
2949
2949
|
}
|
|
2950
2950
|
function wi(e, t, n, r = $t, o, i) {
|
|
2951
|
-
const s =
|
|
2951
|
+
const s = D.useRef(null), c = D.useRef(null), l = D.useRef(null), a = D.useCallback(
|
|
2952
2952
|
(p) => {
|
|
2953
2953
|
let b, v, y;
|
|
2954
2954
|
const u = p.target;
|
|
@@ -2968,7 +2968,7 @@ function wi(e, t, n, r = $t, o, i) {
|
|
|
2968
2968
|
},
|
|
2969
2969
|
[e, t, i]
|
|
2970
2970
|
);
|
|
2971
|
-
|
|
2971
|
+
D.useEffect(() => {
|
|
2972
2972
|
const p = o || s.current;
|
|
2973
2973
|
return r(o || s.current), a({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", a, { passive: !0 }), () => {
|
|
2974
2974
|
r(null), p.removeEventListener("scroll", a);
|
|
@@ -3036,7 +3036,7 @@ const Js = /* @__PURE__ */ xe(() => {
|
|
|
3036
3036
|
}), el = /* @__PURE__ */ xe(
|
|
3037
3037
|
([e, t]) => ({ ...e, ...t }),
|
|
3038
3038
|
Ee(bi, Js)
|
|
3039
|
-
), tl = ({ height: e }) => /* @__PURE__ */ x("div", { style: { height: e } }), nl = { overflowAnchor: "none", position: _r(), zIndex: 1 }, Ii = { overflowAnchor: "none" }, rl = { ...Ii, display: "inline-block", height: "100%" }, no = /* @__PURE__ */
|
|
3039
|
+
), tl = ({ height: e }) => /* @__PURE__ */ x("div", { style: { height: e } }), nl = { overflowAnchor: "none", position: _r(), zIndex: 1 }, Ii = { overflowAnchor: "none" }, rl = { ...Ii, display: "inline-block", height: "100%" }, no = /* @__PURE__ */ D.memo(function({ showTopList: e = !1 }) {
|
|
3040
3040
|
const t = fe("listState"), n = nt("sizeRanges"), r = fe("useWindowScroll"), o = fe("customScrollParent"), i = nt("windowScrollContainerState"), s = nt("scrollContainerState"), c = o || r ? i : s, l = fe("itemContent"), a = fe("context"), d = fe("groupContent"), m = fe("trackItemSizes"), p = fe("itemSize"), b = fe("log"), v = nt("gap"), y = fe("horizontalDirection"), { callbackRef: u } = vs(
|
|
3041
3041
|
n,
|
|
3042
3042
|
p,
|
|
@@ -3047,11 +3047,11 @@ const Js = /* @__PURE__ */ xe(() => {
|
|
|
3047
3047
|
o,
|
|
3048
3048
|
y,
|
|
3049
3049
|
fe("skipAnimationFrameInResizeObserver")
|
|
3050
|
-
), [f, g] =
|
|
3050
|
+
), [f, g] = D.useState(0);
|
|
3051
3051
|
Er("deviation", (_) => {
|
|
3052
3052
|
f !== _ && g(_);
|
|
3053
3053
|
});
|
|
3054
|
-
const
|
|
3054
|
+
const C = fe("EmptyPlaceholder"), k = fe("ScrollSeekPlaceholder") || tl, R = fe("ListComponent"), I = fe("ItemComponent"), h = fe("GroupComponent"), S = fe("computeItemKey"), T = fe("isSeeking"), E = fe("groupIndices").length > 0, O = fe("alignToBottom"), z = fe("initialItemFinalLocationReached"), w = e ? {} : {
|
|
3055
3055
|
boxSizing: "border-box",
|
|
3056
3056
|
...y ? {
|
|
3057
3057
|
display: "inline-block",
|
|
@@ -3067,16 +3067,16 @@ const Js = /* @__PURE__ */ xe(() => {
|
|
|
3067
3067
|
},
|
|
3068
3068
|
...z ? {} : { visibility: "hidden" }
|
|
3069
3069
|
};
|
|
3070
|
-
return !e && t.totalCount === 0 &&
|
|
3070
|
+
return !e && t.totalCount === 0 && C ? /* @__PURE__ */ x(C, { ...qe(C, a) }) : /* @__PURE__ */ x(
|
|
3071
3071
|
R,
|
|
3072
3072
|
{
|
|
3073
3073
|
...qe(R, a),
|
|
3074
3074
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
3075
3075
|
ref: u,
|
|
3076
|
-
style:
|
|
3076
|
+
style: w,
|
|
3077
3077
|
children: (e ? t.topItems : t.items).map((_) => {
|
|
3078
3078
|
const P = _.originalIndex, G = S(P + t.firstItemIndex, _.data, a);
|
|
3079
|
-
return
|
|
3079
|
+
return T ? /* @__PURE__ */ hn(
|
|
3080
3080
|
k,
|
|
3081
3081
|
{
|
|
3082
3082
|
...qe(k, a),
|
|
@@ -3143,9 +3143,9 @@ function qe(e, t) {
|
|
|
3143
3143
|
function ll(e, t) {
|
|
3144
3144
|
return { item: typeof e == "string" ? void 0 : t };
|
|
3145
3145
|
}
|
|
3146
|
-
const al = /* @__PURE__ */
|
|
3146
|
+
const al = /* @__PURE__ */ D.memo(function() {
|
|
3147
3147
|
const e = fe("HeaderComponent"), t = nt("headerHeight"), n = fe("HeaderFooterTag"), r = Ot(
|
|
3148
|
-
|
|
3148
|
+
D.useMemo(
|
|
3149
3149
|
() => (i) => {
|
|
3150
3150
|
t(St(i, "height"));
|
|
3151
3151
|
},
|
|
@@ -3155,9 +3155,9 @@ const al = /* @__PURE__ */ F.memo(function() {
|
|
|
3155
3155
|
fe("skipAnimationFrameInResizeObserver")
|
|
3156
3156
|
), o = fe("context");
|
|
3157
3157
|
return e ? /* @__PURE__ */ x(n, { ref: r, children: /* @__PURE__ */ x(e, { ...qe(e, o) }) }) : null;
|
|
3158
|
-
}), cl = /* @__PURE__ */
|
|
3158
|
+
}), cl = /* @__PURE__ */ D.memo(function() {
|
|
3159
3159
|
const e = fe("FooterComponent"), t = nt("footerHeight"), n = fe("HeaderFooterTag"), r = Ot(
|
|
3160
|
-
|
|
3160
|
+
D.useMemo(
|
|
3161
3161
|
() => (i) => {
|
|
3162
3162
|
t(St(i, "height"));
|
|
3163
3163
|
},
|
|
@@ -3169,7 +3169,7 @@ const al = /* @__PURE__ */ F.memo(function() {
|
|
|
3169
3169
|
return e ? /* @__PURE__ */ x(n, { ref: r, children: /* @__PURE__ */ x(e, { ...qe(e, o) }) }) : null;
|
|
3170
3170
|
});
|
|
3171
3171
|
function Ci({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
3172
|
-
return
|
|
3172
|
+
return D.memo(function({ children: r, style: o, context: i, ...s }) {
|
|
3173
3173
|
const c = n("scrollContainerState"), l = t("ScrollerComponent"), a = n("smoothScrollTargetReached"), d = t("scrollerRef"), m = t("horizontalDirection") || !1, { scrollByCallback: p, scrollerRef: b, scrollToCallback: v } = wi(
|
|
3174
3174
|
c,
|
|
3175
3175
|
a,
|
|
@@ -3194,8 +3194,8 @@ function Ci({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
3194
3194
|
});
|
|
3195
3195
|
}
|
|
3196
3196
|
function Ti({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
3197
|
-
return
|
|
3198
|
-
const c = n("windowScrollContainerState"), l = t("ScrollerComponent"), a = n("smoothScrollTargetReached"), d = t("totalListHeight"), m = t("deviation"), p = t("customScrollParent"), b =
|
|
3197
|
+
return D.memo(function({ children: r, style: o, context: i, ...s }) {
|
|
3198
|
+
const c = n("windowScrollContainerState"), l = t("ScrollerComponent"), a = n("smoothScrollTargetReached"), d = t("totalListHeight"), m = t("deviation"), p = t("customScrollParent"), b = D.useRef(null), v = t("scrollerRef"), { scrollByCallback: y, scrollerRef: u, scrollToCallback: f } = wi(
|
|
3199
3199
|
c,
|
|
3200
3200
|
a,
|
|
3201
3201
|
l,
|
|
@@ -3221,30 +3221,30 @@ function Ti({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
3221
3221
|
});
|
|
3222
3222
|
}
|
|
3223
3223
|
const ul = ({ children: e }) => {
|
|
3224
|
-
const t =
|
|
3224
|
+
const t = D.useContext(Si), n = nt("viewportHeight"), r = nt("fixedItemHeight"), o = fe("alignToBottom"), i = fe("horizontalDirection"), s = D.useMemo(
|
|
3225
3225
|
() => Yo(n, (l) => St(l, i ? "width" : "height")),
|
|
3226
3226
|
[n, i]
|
|
3227
3227
|
), c = Ot(s, !0, fe("skipAnimationFrameInResizeObserver"));
|
|
3228
|
-
return
|
|
3228
|
+
return D.useEffect(() => {
|
|
3229
3229
|
t && (n(t.viewportHeight), r(t.itemHeight));
|
|
3230
3230
|
}, [t, n, r]), /* @__PURE__ */ x("div", { "data-viewport-type": "element", ref: c, style: En(o), children: e });
|
|
3231
3231
|
}, dl = ({ children: e }) => {
|
|
3232
|
-
const t =
|
|
3232
|
+
const t = D.useContext(Si), n = nt("windowViewportRect"), r = nt("fixedItemHeight"), o = fe("customScrollParent"), i = Zo(
|
|
3233
3233
|
n,
|
|
3234
3234
|
o,
|
|
3235
3235
|
fe("skipAnimationFrameInResizeObserver")
|
|
3236
3236
|
), s = fe("alignToBottom");
|
|
3237
|
-
return
|
|
3237
|
+
return D.useEffect(() => {
|
|
3238
3238
|
t && (r(t.itemHeight), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: 100 }));
|
|
3239
3239
|
}, [t, n, r]), /* @__PURE__ */ x("div", { "data-viewport-type": "window", ref: i, style: En(s), children: e });
|
|
3240
3240
|
}, fl = ({ children: e }) => {
|
|
3241
3241
|
const t = fe("TopItemListComponent") || "div", n = fe("headerHeight"), r = { ...sl, marginTop: `${n}px` }, o = fe("context");
|
|
3242
3242
|
return /* @__PURE__ */ x(t, { style: r, ...qe(t, o), children: e });
|
|
3243
|
-
}, pl = /* @__PURE__ */
|
|
3243
|
+
}, pl = /* @__PURE__ */ D.memo(function(e) {
|
|
3244
3244
|
const t = fe("useWindowScroll"), n = fe("topItemsIndexes").length > 0, r = fe("customScrollParent"), o = fe("context");
|
|
3245
|
-
return /* @__PURE__ */
|
|
3245
|
+
return /* @__PURE__ */ Z(r || t ? ml : gl, { ...e, context: o, children: [
|
|
3246
3246
|
n && /* @__PURE__ */ x(fl, { children: /* @__PURE__ */ x(no, { showTopList: !0 }) }),
|
|
3247
|
-
/* @__PURE__ */
|
|
3247
|
+
/* @__PURE__ */ Z(r || t ? dl : ul, { children: [
|
|
3248
3248
|
/* @__PURE__ */ x(al, {}),
|
|
3249
3249
|
/* @__PURE__ */ x(no, {}),
|
|
3250
3250
|
/* @__PURE__ */ x(cl, {})
|
|
@@ -3319,10 +3319,10 @@ const ul = ({ children: e }) => {
|
|
|
3319
3319
|
},
|
|
3320
3320
|
pl
|
|
3321
3321
|
), gl = /* @__PURE__ */ Ci({ useEmitter: Er, useEmitterValue: fe, usePublisher: nt }), ml = /* @__PURE__ */ Ti({ useEmitter: Er, useEmitterValue: fe, usePublisher: nt }), bl = hl, vl = /* @__PURE__ */ xe(() => {
|
|
3322
|
-
const e = H((a) => /* @__PURE__ */
|
|
3322
|
+
const e = H((a) => /* @__PURE__ */ Z("td", { children: [
|
|
3323
3323
|
"Item $",
|
|
3324
3324
|
a
|
|
3325
|
-
] })), t = H(null), n = H((a) => /* @__PURE__ */
|
|
3325
|
+
] })), t = H(null), n = H((a) => /* @__PURE__ */ Z("td", { colSpan: 1e3, children: [
|
|
3326
3326
|
"Group ",
|
|
3327
3327
|
a
|
|
3328
3328
|
] })), r = H(null), o = H(null), i = H({}), s = H(Mr), c = H($t), l = (a, d = null) => je(
|
|
@@ -3395,14 +3395,14 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3395
3395
|
p,
|
|
3396
3396
|
b,
|
|
3397
3397
|
{ didMount: v, propsReady: y },
|
|
3398
|
-
{ customScrollParent: u, useWindowScroll: f, windowScrollContainerState: g, windowScrollTo:
|
|
3398
|
+
{ customScrollParent: u, useWindowScroll: f, windowScrollContainerState: g, windowScrollTo: C, windowViewportRect: k },
|
|
3399
3399
|
R
|
|
3400
3400
|
]) => {
|
|
3401
|
-
const I = H(0), h = H(0), S = H(ro),
|
|
3401
|
+
const I = H(0), h = H(0), S = H(ro), T = H({ height: 0, width: 0 }), E = H({ height: 0, width: 0 }), O = ye(), z = ye(), w = H(0), _ = H(null), P = H({ column: 0, row: 0 }), G = ye(), M = ye(), B = H(!1), F = H(0), V = H(!0), q = H(!1), ue = H(!1);
|
|
3402
3402
|
Ie(
|
|
3403
3403
|
L(
|
|
3404
3404
|
v,
|
|
3405
|
-
be(
|
|
3405
|
+
be(F),
|
|
3406
3406
|
ce(([A, K]) => !!K)
|
|
3407
3407
|
),
|
|
3408
3408
|
() => {
|
|
@@ -3410,7 +3410,7 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3410
3410
|
}
|
|
3411
3411
|
), Ie(
|
|
3412
3412
|
L(
|
|
3413
|
-
Fe(v, V, E,
|
|
3413
|
+
Fe(v, V, E, T, F, q),
|
|
3414
3414
|
ce(([A, K, ne, N, , oe]) => A && !K && ne.height !== 0 && N.height !== 0 && !oe)
|
|
3415
3415
|
),
|
|
3416
3416
|
([, , , , A]) => {
|
|
@@ -3434,20 +3434,20 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3434
3434
|
ce(([, A]) => A != null)
|
|
3435
3435
|
),
|
|
3436
3436
|
([, A]) => {
|
|
3437
|
-
A && (ge(
|
|
3437
|
+
A && (ge(T, A.viewport), ge(E, A.item), ge(P, A.gap), A.scrollTop > 0 && (ge(B, !0), ct(L(a, _t(1)), (K) => {
|
|
3438
3438
|
ge(B, !1);
|
|
3439
3439
|
}), ge(l, { top: A.scrollTop })));
|
|
3440
3440
|
}
|
|
3441
3441
|
), te(
|
|
3442
3442
|
L(
|
|
3443
|
-
|
|
3443
|
+
T,
|
|
3444
3444
|
U(({ height: A }) => A)
|
|
3445
3445
|
),
|
|
3446
3446
|
m
|
|
3447
3447
|
), te(
|
|
3448
3448
|
L(
|
|
3449
3449
|
Fe(
|
|
3450
|
-
ae(
|
|
3450
|
+
ae(T, fn),
|
|
3451
3451
|
ae(E, fn),
|
|
3452
3452
|
ae(P, (A, K) => A && A.column === K.column && A.row === K.row),
|
|
3453
3453
|
ae(a)
|
|
@@ -3467,12 +3467,12 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3467
3467
|
r,
|
|
3468
3468
|
ae(P, xl),
|
|
3469
3469
|
ae(E, fn),
|
|
3470
|
-
ae(
|
|
3470
|
+
ae(T, fn),
|
|
3471
3471
|
ae(_),
|
|
3472
3472
|
ae(h),
|
|
3473
3473
|
ae(B),
|
|
3474
3474
|
ae(V),
|
|
3475
|
-
ae(
|
|
3475
|
+
ae(F)
|
|
3476
3476
|
),
|
|
3477
3477
|
ce(([, , , , , , , A]) => !A),
|
|
3478
3478
|
U(
|
|
@@ -3513,7 +3513,7 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3513
3513
|
I
|
|
3514
3514
|
), te(
|
|
3515
3515
|
L(
|
|
3516
|
-
Fe(
|
|
3516
|
+
Fe(T, E, S, P),
|
|
3517
3517
|
ce(([A, K, { items: ne }]) => ne.length > 0 && K.height !== 0 && A.height !== 0),
|
|
3518
3518
|
U(([A, K, { items: ne }, N]) => {
|
|
3519
3519
|
const { bottom: oe, top: $ } = lo(A, N, K, ne);
|
|
@@ -3567,7 +3567,7 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3567
3567
|
te(ee, b.scrollSeekRangeChanged), te(
|
|
3568
3568
|
L(
|
|
3569
3569
|
O,
|
|
3570
|
-
be(
|
|
3570
|
+
be(T, E, I, P),
|
|
3571
3571
|
U(([A, K, ne, N, oe]) => {
|
|
3572
3572
|
const $ = ci(A), { align: J, behavior: se, offset: re } = $;
|
|
3573
3573
|
let pe = $.index;
|
|
@@ -3590,12 +3590,12 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3590
3590
|
k,
|
|
3591
3591
|
U((A) => ({ height: A.visibleHeight, width: A.visibleWidth }))
|
|
3592
3592
|
),
|
|
3593
|
-
|
|
3593
|
+
T
|
|
3594
3594
|
), {
|
|
3595
3595
|
customScrollParent: u,
|
|
3596
3596
|
// input
|
|
3597
3597
|
data: _,
|
|
3598
|
-
deviation:
|
|
3598
|
+
deviation: w,
|
|
3599
3599
|
footerHeight: o,
|
|
3600
3600
|
gap: P,
|
|
3601
3601
|
headerHeight: i,
|
|
@@ -3613,15 +3613,15 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3613
3613
|
smoothScrollTargetReached: d,
|
|
3614
3614
|
totalCount: I,
|
|
3615
3615
|
useWindowScroll: f,
|
|
3616
|
-
viewportDimensions:
|
|
3616
|
+
viewportDimensions: T,
|
|
3617
3617
|
windowScrollContainerState: g,
|
|
3618
|
-
windowScrollTo:
|
|
3618
|
+
windowScrollTo: C,
|
|
3619
3619
|
windowViewportRect: k,
|
|
3620
3620
|
...b,
|
|
3621
3621
|
// output
|
|
3622
3622
|
gridState: S,
|
|
3623
3623
|
horizontalDirection: ue,
|
|
3624
|
-
initialTopMostItemIndex:
|
|
3624
|
+
initialTopMostItemIndex: F,
|
|
3625
3625
|
totalListHeight: X,
|
|
3626
3626
|
...p,
|
|
3627
3627
|
endReached: ke,
|
|
@@ -3679,15 +3679,15 @@ const Il = /* @__PURE__ */ xe(() => {
|
|
|
3679
3679
|
}), Cl = /* @__PURE__ */ xe(
|
|
3680
3680
|
([e, t]) => ({ ...e, ...t }),
|
|
3681
3681
|
Ee(wl, Il)
|
|
3682
|
-
), Tl = /* @__PURE__ */
|
|
3682
|
+
), Tl = /* @__PURE__ */ D.memo(function() {
|
|
3683
3683
|
const e = Pe("gridState"), t = Pe("listClassName"), n = Pe("itemClassName"), r = Pe("itemContent"), o = Pe("computeItemKey"), i = Pe("isSeeking"), s = rt("scrollHeight"), c = Pe("ItemComponent"), l = Pe("ListComponent"), a = Pe("ScrollSeekPlaceholder"), d = Pe("context"), m = rt("itemDimensions"), p = rt("gap"), b = Pe("log"), v = Pe("stateRestoreInProgress"), y = rt("reportReadyState"), u = Ot(
|
|
3684
|
-
|
|
3684
|
+
D.useMemo(
|
|
3685
3685
|
() => (f) => {
|
|
3686
3686
|
const g = f.parentElement.parentElement.scrollHeight;
|
|
3687
3687
|
s(g);
|
|
3688
|
-
const
|
|
3689
|
-
if (
|
|
3690
|
-
const { height: k, width: R } =
|
|
3688
|
+
const C = f.firstChild;
|
|
3689
|
+
if (C) {
|
|
3690
|
+
const { height: k, width: R } = C.getBoundingClientRect();
|
|
3691
3691
|
m({ height: k, width: R });
|
|
3692
3692
|
}
|
|
3693
3693
|
p({
|
|
@@ -3734,9 +3734,9 @@ const Il = /* @__PURE__ */ xe(() => {
|
|
|
3734
3734
|
})
|
|
3735
3735
|
}
|
|
3736
3736
|
);
|
|
3737
|
-
}), kl =
|
|
3737
|
+
}), kl = D.memo(function() {
|
|
3738
3738
|
const e = Pe("HeaderComponent"), t = rt("headerHeight"), n = Pe("headerFooterTag"), r = Ot(
|
|
3739
|
-
|
|
3739
|
+
D.useMemo(
|
|
3740
3740
|
() => (i) => {
|
|
3741
3741
|
t(St(i, "height"));
|
|
3742
3742
|
},
|
|
@@ -3746,9 +3746,9 @@ const Il = /* @__PURE__ */ xe(() => {
|
|
|
3746
3746
|
!1
|
|
3747
3747
|
), o = Pe("context");
|
|
3748
3748
|
return e ? /* @__PURE__ */ x(n, { ref: r, children: /* @__PURE__ */ x(e, { ...qe(e, o) }) }) : null;
|
|
3749
|
-
}), Rl =
|
|
3749
|
+
}), Rl = D.memo(function() {
|
|
3750
3750
|
const e = Pe("FooterComponent"), t = rt("footerHeight"), n = Pe("headerFooterTag"), r = Ot(
|
|
3751
|
-
|
|
3751
|
+
D.useMemo(
|
|
3752
3752
|
() => (i) => {
|
|
3753
3753
|
t(St(i, "height"));
|
|
3754
3754
|
},
|
|
@@ -3759,8 +3759,8 @@ const Il = /* @__PURE__ */ xe(() => {
|
|
|
3759
3759
|
), o = Pe("context");
|
|
3760
3760
|
return e ? /* @__PURE__ */ x(n, { ref: r, children: /* @__PURE__ */ x(e, { ...qe(e, o) }) }) : null;
|
|
3761
3761
|
}), _l = ({ children: e }) => {
|
|
3762
|
-
const t =
|
|
3763
|
-
|
|
3762
|
+
const t = D.useContext(yi), n = rt("itemDimensions"), r = rt("viewportDimensions"), o = Ot(
|
|
3763
|
+
D.useMemo(
|
|
3764
3764
|
() => (i) => {
|
|
3765
3765
|
r(i.getBoundingClientRect());
|
|
3766
3766
|
},
|
|
@@ -3769,17 +3769,17 @@ const Il = /* @__PURE__ */ xe(() => {
|
|
|
3769
3769
|
!0,
|
|
3770
3770
|
!1
|
|
3771
3771
|
);
|
|
3772
|
-
return
|
|
3772
|
+
return D.useEffect(() => {
|
|
3773
3773
|
t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
|
|
3774
3774
|
}, [t, r, n]), /* @__PURE__ */ x("div", { ref: o, style: En(!1), children: e });
|
|
3775
3775
|
}, Ml = ({ children: e }) => {
|
|
3776
|
-
const t =
|
|
3777
|
-
return
|
|
3776
|
+
const t = D.useContext(yi), n = rt("windowViewportRect"), r = rt("itemDimensions"), o = Pe("customScrollParent"), i = Zo(n, o, !1);
|
|
3777
|
+
return D.useEffect(() => {
|
|
3778
3778
|
t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
|
|
3779
3779
|
}, [t, n, r]), /* @__PURE__ */ x("div", { ref: i, style: En(!1), children: e });
|
|
3780
|
-
}, El = /* @__PURE__ */
|
|
3780
|
+
}, El = /* @__PURE__ */ D.memo(function({ ...e }) {
|
|
3781
3781
|
const t = Pe("useWindowScroll"), n = Pe("customScrollParent"), r = n || t ? Pl : Ol, o = n || t ? Ml : _l, i = Pe("context");
|
|
3782
|
-
return /* @__PURE__ */ x(r, { ...e, ...qe(r, i), children: /* @__PURE__ */
|
|
3782
|
+
return /* @__PURE__ */ x(r, { ...e, ...qe(r, i), children: /* @__PURE__ */ Z(o, { children: [
|
|
3783
3783
|
/* @__PURE__ */ x(kl, {}),
|
|
3784
3784
|
/* @__PURE__ */ x(Tl, {}),
|
|
3785
3785
|
/* @__PURE__ */ x(Rl, {})
|
|
@@ -3884,7 +3884,7 @@ function Vl(e, t) {
|
|
|
3884
3884
|
);
|
|
3885
3885
|
}
|
|
3886
3886
|
function nn(e) {
|
|
3887
|
-
const t =
|
|
3887
|
+
const t = D.useRef(void 0);
|
|
3888
3888
|
return (n) => {
|
|
3889
3889
|
const r = e(n);
|
|
3890
3890
|
return Vl(t.current, r) ? t.current : t.current = r;
|
|
@@ -3902,88 +3902,96 @@ const Ul = Object.freeze({
|
|
|
3902
3902
|
showPointer: void 0,
|
|
3903
3903
|
pointerStyle: void 0,
|
|
3904
3904
|
pointerColor: void 0
|
|
3905
|
-
}), _i =
|
|
3905
|
+
}), _i = D.memo(
|
|
3906
3906
|
function({ runs: t, ns: n, baseIndex: r, preGroups: o }) {
|
|
3907
|
-
const i = _e((
|
|
3908
|
-
(
|
|
3909
|
-
var
|
|
3910
|
-
const
|
|
3911
|
-
if (!
|
|
3912
|
-
const
|
|
3913
|
-
if (
|
|
3914
|
-
const
|
|
3915
|
-
if (!
|
|
3916
|
-
c(
|
|
3917
|
-
const
|
|
3918
|
-
|
|
3907
|
+
const i = _e((O) => O.setClipIndex), s = _e((O) => O.seek), c = j((O) => O.setCurrentGlobalRunIndex), l = yn(), a = j((O) => O.rangeStartGI), d = j((O) => O.rangeEndGI), m = j((O) => O.setRange), p = a != null && d != null, b = Q(
|
|
3908
|
+
(O) => {
|
|
3909
|
+
var F;
|
|
3910
|
+
const z = (F = O.target) == null ? void 0 : F.closest("[data-g]");
|
|
3911
|
+
if (!z) return;
|
|
3912
|
+
const w = Number(z.dataset.g), _ = w - r;
|
|
3913
|
+
if (_ < 0 || _ >= t.length) return;
|
|
3914
|
+
const P = t[_], G = P.text ?? "";
|
|
3915
|
+
if (!G.trim() || !/[가-힣a-zA-Z0-9]/.test(G)) return;
|
|
3916
|
+
c(w, "program");
|
|
3917
|
+
const M = P.audioChunkIndex, B = P.audioTimeMs;
|
|
3918
|
+
M != null && B != null && (i(M), s(B));
|
|
3919
3919
|
},
|
|
3920
3920
|
[t, r, s, i, c]
|
|
3921
|
-
), v = ie(null), y = ie(!1), u =
|
|
3922
|
-
(
|
|
3923
|
-
var
|
|
3924
|
-
const
|
|
3925
|
-
if (!
|
|
3926
|
-
const
|
|
3927
|
-
|
|
3928
|
-
l.getState().status !== "playing" && (m(
|
|
3921
|
+
), v = ie(null), y = ie(!1), u = ie({ x: 0, y: 0 }), f = Q(
|
|
3922
|
+
(O) => {
|
|
3923
|
+
var P;
|
|
3924
|
+
const z = (P = O.target) == null ? void 0 : P.closest("[data-g]");
|
|
3925
|
+
if (!z) return;
|
|
3926
|
+
const w = Number(z.dataset.g), _ = w - r;
|
|
3927
|
+
_ < 0 || _ >= t.length || (y.current = !1, u.current = { x: O.clientX, y: O.clientY }, v.current && (window.clearTimeout(v.current), v.current = null), v.current = window.setTimeout(() => {
|
|
3928
|
+
l.getState().status !== "playing" && (m(w, w), y.current = !0, v.current = null);
|
|
3929
3929
|
}, 800));
|
|
3930
3930
|
},
|
|
3931
3931
|
[t, r, m, l]
|
|
3932
|
-
),
|
|
3932
|
+
), g = Q(() => {
|
|
3933
3933
|
v.current && (window.clearTimeout(v.current), v.current = null);
|
|
3934
|
-
}, []),
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3934
|
+
}, []), C = Q(
|
|
3935
|
+
(O) => {
|
|
3936
|
+
if (!v.current) return;
|
|
3937
|
+
const z = O.clientX - u.current.x, w = O.clientY - u.current.y;
|
|
3938
|
+
(Math.abs(z) > 5 || Math.abs(w) > 5) && g();
|
|
3939
|
+
},
|
|
3940
|
+
[g]
|
|
3941
|
+
), k = Q(() => {
|
|
3942
|
+
g();
|
|
3943
|
+
}, [g]), R = g, I = g, h = j((O) => O.clearRange), S = Q(
|
|
3944
|
+
(O) => {
|
|
3945
|
+
var _;
|
|
3939
3946
|
if (y.current) {
|
|
3940
3947
|
y.current = !1;
|
|
3941
3948
|
return;
|
|
3942
3949
|
}
|
|
3943
|
-
const
|
|
3944
|
-
if (!
|
|
3945
|
-
const
|
|
3946
|
-
isNaN(
|
|
3950
|
+
const z = (_ = O.target) == null ? void 0 : _.closest("[data-g]");
|
|
3951
|
+
if (!z) return;
|
|
3952
|
+
const w = Number(z.dataset.g);
|
|
3953
|
+
isNaN(w) || p && a != null && d != null && (h(), O.stopPropagation());
|
|
3947
3954
|
},
|
|
3948
|
-
[p, a, d,
|
|
3949
|
-
),
|
|
3955
|
+
[p, a, d, h]
|
|
3956
|
+
), T = o, E = r + t.length - 1;
|
|
3950
3957
|
return /* @__PURE__ */ x(
|
|
3951
3958
|
"span",
|
|
3952
3959
|
{
|
|
3953
|
-
onClick:
|
|
3960
|
+
onClick: S,
|
|
3954
3961
|
onDoubleClick: b,
|
|
3955
|
-
onPointerDown:
|
|
3956
|
-
|
|
3957
|
-
|
|
3958
|
-
|
|
3959
|
-
|
|
3962
|
+
onPointerDown: f,
|
|
3963
|
+
onPointerMove: C,
|
|
3964
|
+
onPointerUp: k,
|
|
3965
|
+
onPointerCancel: R,
|
|
3966
|
+
onPointerLeave: I,
|
|
3967
|
+
children: T.map((O, z) => /* @__PURE__ */ x(
|
|
3960
3968
|
Xl,
|
|
3961
3969
|
{
|
|
3962
3970
|
ns: n,
|
|
3963
|
-
group:
|
|
3971
|
+
group: O,
|
|
3964
3972
|
runs: t,
|
|
3965
|
-
paraLastG:
|
|
3973
|
+
paraLastG: E,
|
|
3966
3974
|
rangeStartGI: a,
|
|
3967
3975
|
rangeEndGI: d
|
|
3968
3976
|
},
|
|
3969
|
-
`${n}/grp:${
|
|
3977
|
+
`${n}/grp:${z}-${O.startG}`
|
|
3970
3978
|
))
|
|
3971
3979
|
}
|
|
3972
3980
|
);
|
|
3973
3981
|
},
|
|
3974
3982
|
(e, t) => e.ns === t.ns && e.baseIndex === t.baseIndex && e.runs === t.runs && e.sectionId === t.sectionId
|
|
3975
|
-
), Kl =
|
|
3976
|
-
const t =
|
|
3983
|
+
), Kl = D.memo(function() {
|
|
3984
|
+
const t = Q((r) => ({
|
|
3977
3985
|
showSplit: r.showSplit,
|
|
3978
3986
|
slash: r.breakMarks.slash,
|
|
3979
3987
|
breakGapPx: r.breakGapPx
|
|
3980
3988
|
}), []), n = Y(nn(t));
|
|
3981
|
-
return n.showSplit ? /* @__PURE__ */
|
|
3989
|
+
return n.showSplit ? /* @__PURE__ */ Z(yt, { children: [
|
|
3982
3990
|
/* @__PURE__ */ x("span", { style: { display: "inline-block", width: n.breakGapPx / 2 } }),
|
|
3983
3991
|
n.slash && /* @__PURE__ */ x("span", { children: " / " }),
|
|
3984
3992
|
/* @__PURE__ */ x("span", { style: { display: "inline-block", width: n.breakGapPx / 2 } })
|
|
3985
3993
|
] }) : null;
|
|
3986
|
-
}), Xl =
|
|
3994
|
+
}), Xl = D.memo(
|
|
3987
3995
|
function({
|
|
3988
3996
|
ns: t,
|
|
3989
3997
|
group: n,
|
|
@@ -3992,13 +4000,13 @@ const Ul = Object.freeze({
|
|
|
3992
4000
|
rangeStartGI: i,
|
|
3993
4001
|
rangeEndGI: s
|
|
3994
4002
|
}) {
|
|
3995
|
-
const c =
|
|
4003
|
+
const c = Q(
|
|
3996
4004
|
(u) => {
|
|
3997
4005
|
const f = u.currentGlobalRunIndex;
|
|
3998
4006
|
return f != null && f >= n.startG && f <= n.endG;
|
|
3999
4007
|
},
|
|
4000
4008
|
[n]
|
|
4001
|
-
), l = j(nn(c)), a =
|
|
4009
|
+
), l = j(nn(c)), a = Q(
|
|
4002
4010
|
(u) => l ? {
|
|
4003
4011
|
showPointer: u.showPointer,
|
|
4004
4012
|
pointerStyle: u.pointerStyle,
|
|
@@ -4014,15 +4022,15 @@ const Ul = Object.freeze({
|
|
|
4014
4022
|
"--ul-offset": "0.35em"
|
|
4015
4023
|
} : void 0;
|
|
4016
4024
|
return /* @__PURE__ */ x(yt, { children: Array.from({ length: p }).map((u, f) => {
|
|
4017
|
-
const
|
|
4025
|
+
const C = r[m + f], k = n.startG + f, R = `${t}/run:${k}`, I = !!C.split && k !== o;
|
|
4018
4026
|
let h = `${ft.runWrap}`;
|
|
4019
|
-
return b && (p === 1 ? h += ` ${ft.highlight}` : f === 0 ? h += ` ${ft.highlightleft}` : f + 1 === p ? h += ` ${ft.highlightright}` : h += ` ${ft.highlightcenter}`), v && (p === 1 ? h += ` ${ft.underline}` : f === 0 ? h += ` ${ft.underlineleft}` : f + 1 === p ? h += ` ${ft.underlineright}` : h += ` ${ft.underlinecenter}`), /* @__PURE__ */
|
|
4027
|
+
return b && (p === 1 ? h += ` ${ft.highlight}` : f === 0 ? h += ` ${ft.highlightleft}` : f + 1 === p ? h += ` ${ft.highlightright}` : h += ` ${ft.highlightcenter}`), v && (p === 1 ? h += ` ${ft.underline}` : f === 0 ? h += ` ${ft.underlineleft}` : f + 1 === p ? h += ` ${ft.underlineright}` : h += ` ${ft.underlinecenter}`), /* @__PURE__ */ Z(D.Fragment, { children: [
|
|
4020
4028
|
/* @__PURE__ */ x("span", { className: h, style: y, children: /* @__PURE__ */ x(
|
|
4021
4029
|
Yl,
|
|
4022
4030
|
{
|
|
4023
4031
|
gi: n.startG,
|
|
4024
4032
|
g: k,
|
|
4025
|
-
run:
|
|
4033
|
+
run: C,
|
|
4026
4034
|
active: l,
|
|
4027
4035
|
pointerCfg: d,
|
|
4028
4036
|
isInRange: i != null && s != null && k >= i && k <= s
|
|
@@ -4035,7 +4043,7 @@ const Ul = Object.freeze({
|
|
|
4035
4043
|
(e, t) => e.group === t.group && // 그룹 메타 참조 동일
|
|
4036
4044
|
e.runs === t.runs && // 원본 runs 참조 동일
|
|
4037
4045
|
e.ns === t.ns && e.rangeStartGI === t.rangeStartGI && e.rangeEndGI === t.rangeEndGI
|
|
4038
|
-
), Yl =
|
|
4046
|
+
), Yl = D.memo(
|
|
4039
4047
|
function({
|
|
4040
4048
|
gi: t,
|
|
4041
4049
|
g: n,
|
|
@@ -4082,7 +4090,7 @@ function Ql({
|
|
|
4082
4090
|
}) {
|
|
4083
4091
|
var a;
|
|
4084
4092
|
const s = e.list ? e.list.level * 24 : 0, c = ((a = e.list) == null ? void 0 : a.kind) === "bullet" ? e.list.glyph ?? "•" : void 0, l = t ?? c;
|
|
4085
|
-
return /* @__PURE__ */
|
|
4093
|
+
return /* @__PURE__ */ Z(
|
|
4086
4094
|
"p",
|
|
4087
4095
|
{
|
|
4088
4096
|
style: {
|
|
@@ -4121,7 +4129,7 @@ function Ql({
|
|
|
4121
4129
|
}
|
|
4122
4130
|
);
|
|
4123
4131
|
}
|
|
4124
|
-
const Zl =
|
|
4132
|
+
const Zl = D.memo(Ql, (e, t) => e.block === t.block && // block 참조 안정화 중요
|
|
4125
4133
|
e.computedMarker === t.computedMarker && e.baseIndex === t.baseIndex && e.ns === t.ns);
|
|
4126
4134
|
function Jl(e, t) {
|
|
4127
4135
|
switch ((t || "decimal").toLowerCase().replace(/[\s_-]+/g, "")) {
|
|
@@ -4228,7 +4236,7 @@ function ra(e, t) {
|
|
|
4228
4236
|
}
|
|
4229
4237
|
const oa = "_scroller_kqkmq_3", ia = {
|
|
4230
4238
|
scroller: oa
|
|
4231
|
-
}, sa =
|
|
4239
|
+
}, sa = D.forwardRef(function({ className: t, style: n, ...r }, o) {
|
|
4232
4240
|
return /* @__PURE__ */ x(
|
|
4233
4241
|
"div",
|
|
4234
4242
|
{
|
|
@@ -4252,8 +4260,8 @@ function aa(e, t = 12, n = 1.5, r = 0.5) {
|
|
|
4252
4260
|
const u = v.getBoundingClientRect();
|
|
4253
4261
|
if (u.height <= r || u.width <= r || u.bottom <= o.top || u.top >= o.bottom) continue;
|
|
4254
4262
|
if (u.top < i) {
|
|
4255
|
-
const
|
|
4256
|
-
(
|
|
4263
|
+
const C = Math.abs(u.top - i);
|
|
4264
|
+
(C < d || C === d && (u.top < m || a !== -1 && Number(v.dataset.g) < a)) && (d = C, a = Number(v.dataset.g), m = u.top);
|
|
4257
4265
|
continue;
|
|
4258
4266
|
}
|
|
4259
4267
|
const f = Number(v.dataset.g);
|
|
@@ -4325,7 +4333,7 @@ function lt(e, t) {
|
|
|
4325
4333
|
}
|
|
4326
4334
|
const Oi = () => {
|
|
4327
4335
|
const e = j((r) => r.section), t = Ei(), n = e.quizzes;
|
|
4328
|
-
return !n || !n.length ? null : /* @__PURE__ */
|
|
4336
|
+
return !n || !n.length ? null : /* @__PURE__ */ Z(
|
|
4329
4337
|
"button",
|
|
4330
4338
|
{
|
|
4331
4339
|
onClick: () => {
|
|
@@ -4363,7 +4371,7 @@ var Pi = {
|
|
|
4363
4371
|
className: void 0,
|
|
4364
4372
|
style: void 0,
|
|
4365
4373
|
attr: void 0
|
|
4366
|
-
}, mo =
|
|
4374
|
+
}, mo = D.createContext && /* @__PURE__ */ D.createContext(Pi), ha = ["attr", "size", "title"];
|
|
4367
4375
|
function ga(e, t) {
|
|
4368
4376
|
if (e == null) return {};
|
|
4369
4377
|
var n = ma(e, t), r, o;
|
|
@@ -4433,12 +4441,12 @@ function Sa(e, t) {
|
|
|
4433
4441
|
return (t === "string" ? String : Number)(e);
|
|
4434
4442
|
}
|
|
4435
4443
|
function Bi(e) {
|
|
4436
|
-
return e && e.map((t, n) => /* @__PURE__ */
|
|
4444
|
+
return e && e.map((t, n) => /* @__PURE__ */ D.createElement(t.tag, In({
|
|
4437
4445
|
key: n
|
|
4438
4446
|
}, t.attr), Bi(t.child)));
|
|
4439
4447
|
}
|
|
4440
4448
|
function ot(e) {
|
|
4441
|
-
return (t) => /* @__PURE__ */
|
|
4449
|
+
return (t) => /* @__PURE__ */ D.createElement(ya, wn({
|
|
4442
4450
|
attr: In({}, e.attr)
|
|
4443
4451
|
}, t), Bi(e.child));
|
|
4444
4452
|
}
|
|
@@ -4449,7 +4457,7 @@ function ya(e) {
|
|
|
4449
4457
|
size: o,
|
|
4450
4458
|
title: i
|
|
4451
4459
|
} = e, s = ga(e, ha), c = o || n.size || "1em", l;
|
|
4452
|
-
return n.className && (l = n.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */
|
|
4460
|
+
return n.className && (l = n.className), e.className && (l = (l ? l + " " : "") + e.className), /* @__PURE__ */ D.createElement("svg", wn({
|
|
4453
4461
|
stroke: "currentColor",
|
|
4454
4462
|
fill: "currentColor",
|
|
4455
4463
|
strokeWidth: "0"
|
|
@@ -4461,9 +4469,9 @@ function ya(e) {
|
|
|
4461
4469
|
height: c,
|
|
4462
4470
|
width: c,
|
|
4463
4471
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4464
|
-
}), i && /* @__PURE__ */
|
|
4472
|
+
}), i && /* @__PURE__ */ D.createElement("title", null, i), e.children);
|
|
4465
4473
|
};
|
|
4466
|
-
return mo !== void 0 ? /* @__PURE__ */
|
|
4474
|
+
return mo !== void 0 ? /* @__PURE__ */ D.createElement(mo.Consumer, null, (n) => t(n)) : t(Pi);
|
|
4467
4475
|
}
|
|
4468
4476
|
function vo(e) {
|
|
4469
4477
|
return ot({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M18.464 2.114a.998.998 0 0 0-1.033.063l-13 9a1.003 1.003 0 0 0 0 1.645l13 9A1 1 0 0 0 19 21V3a1 1 0 0 0-.536-.886zM17 19.091 6.757 12 17 4.909v14.182z" }, child: [] }] })(e);
|
|
@@ -4472,13 +4480,13 @@ function So(e) {
|
|
|
4472
4480
|
return ot({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M5.536 21.886a1.004 1.004 0 0 0 1.033-.064l13-9a1 1 0 0 0 0-1.644l-13-9A.998.998 0 0 0 5 3v18a1 1 0 0 0 .536.886zM7 4.909 17.243 12 7 19.091V4.909z" }, child: [] }] })(e);
|
|
4473
4481
|
}
|
|
4474
4482
|
const xa = ({ isIcon: e = !0 }) => {
|
|
4475
|
-
const t = j((s) => s.isCanPrev), n = j((s) => s.onSectionNav), r = !t, o =
|
|
4483
|
+
const t = j((s) => s.isCanPrev), n = j((s) => s.onSectionNav), r = !t, o = Q(
|
|
4476
4484
|
(s) => {
|
|
4477
4485
|
s.stopPropagation(), s.preventDefault(), t && (n == null || n("prev"));
|
|
4478
4486
|
},
|
|
4479
4487
|
[t, n]
|
|
4480
4488
|
), i = t ? "이전 섹션으로" : "이전 섹션 없음";
|
|
4481
|
-
return e ? /* @__PURE__ */
|
|
4489
|
+
return e ? /* @__PURE__ */ Z(
|
|
4482
4490
|
"button",
|
|
4483
4491
|
{
|
|
4484
4492
|
type: "button",
|
|
@@ -4519,7 +4527,7 @@ const xa = ({ isIcon: e = !0 }) => {
|
|
|
4519
4527
|
transition: "all 0.15s ease",
|
|
4520
4528
|
opacity: r ? 0.5 : 1
|
|
4521
4529
|
},
|
|
4522
|
-
children: r ? "첫섹션입니다" : /* @__PURE__ */
|
|
4530
|
+
children: r ? "첫섹션입니다" : /* @__PURE__ */ Z(yt, { children: [
|
|
4523
4531
|
/* @__PURE__ */ x(
|
|
4524
4532
|
vo,
|
|
4525
4533
|
{
|
|
@@ -4536,13 +4544,13 @@ const xa = ({ isIcon: e = !0 }) => {
|
|
|
4536
4544
|
}
|
|
4537
4545
|
);
|
|
4538
4546
|
}, Cn = ({ isIcon: e = !0 }) => {
|
|
4539
|
-
const t = j((s) => s.isCanNext), n = j((s) => s.onSectionNav), r = !t, o =
|
|
4547
|
+
const t = j((s) => s.isCanNext), n = j((s) => s.onSectionNav), r = !t, o = Q(
|
|
4540
4548
|
(s) => {
|
|
4541
4549
|
s.stopPropagation(), s.preventDefault(), t && (n == null || n("next"));
|
|
4542
4550
|
},
|
|
4543
4551
|
[t, n]
|
|
4544
4552
|
), i = t ? "다음 섹션으로" : "다음 섹션 없음";
|
|
4545
|
-
return e ? /* @__PURE__ */
|
|
4553
|
+
return e ? /* @__PURE__ */ Z(
|
|
4546
4554
|
"button",
|
|
4547
4555
|
{
|
|
4548
4556
|
type: "button",
|
|
@@ -4583,7 +4591,7 @@ const xa = ({ isIcon: e = !0 }) => {
|
|
|
4583
4591
|
transition: "all 0.15s ease",
|
|
4584
4592
|
opacity: r ? 0.5 : 1
|
|
4585
4593
|
},
|
|
4586
|
-
children: r ? "마지막섹션입니다" : /* @__PURE__ */
|
|
4594
|
+
children: r ? "마지막섹션입니다" : /* @__PURE__ */ Z(yt, { children: [
|
|
4587
4595
|
"NextSection",
|
|
4588
4596
|
/* @__PURE__ */ x(
|
|
4589
4597
|
So,
|
|
@@ -4614,25 +4622,25 @@ function wa({
|
|
|
4614
4622
|
nsPrefix: n
|
|
4615
4623
|
}) {
|
|
4616
4624
|
const r = ve(() => {
|
|
4617
|
-
const
|
|
4625
|
+
const T = [], E = Or();
|
|
4618
4626
|
return t.forEach((O, z) => {
|
|
4619
|
-
O.type === "paragraph" && (
|
|
4620
|
-
}),
|
|
4621
|
-
}, [t]), o = j((
|
|
4627
|
+
O.type === "paragraph" && (T[z] = Pr(O, E));
|
|
4628
|
+
}), T;
|
|
4629
|
+
}, [t]), o = j((T) => {
|
|
4622
4630
|
var E;
|
|
4623
|
-
return ((E =
|
|
4624
|
-
}), i = j((
|
|
4631
|
+
return ((E = T.layout) == null ? void 0 : E.prefix) ?? [];
|
|
4632
|
+
}), i = j((T) => {
|
|
4625
4633
|
var E;
|
|
4626
|
-
return ((E =
|
|
4627
|
-
}), s = Y((
|
|
4634
|
+
return ((E = T.derivedNav) == null ? void 0 : E.splitGroupsPerBlock) ?? [];
|
|
4635
|
+
}), s = Y((T) => T.marginX), c = Y((T) => T.viewportHeight), l = ie({
|
|
4628
4636
|
start: 0,
|
|
4629
4637
|
end: 0
|
|
4630
|
-
}), a =
|
|
4631
|
-
(
|
|
4632
|
-
const E = t[
|
|
4638
|
+
}), a = Q(
|
|
4639
|
+
(T) => {
|
|
4640
|
+
const E = t[T], O = `${n}blk-${E.id}`;
|
|
4633
4641
|
if (E.type === "image") {
|
|
4634
|
-
const { src: _, alt: P, width: G, height: M } = E, B = G && M ? `${G} / ${M}` : "4 / 3",
|
|
4635
|
-
return /* @__PURE__ */
|
|
4642
|
+
const { src: _, alt: P, width: G, height: M } = E, B = G && M ? `${G} / ${M}` : "4 / 3", F = T >= l.current.start && T <= l.current.end, V = c > 80 ? Math.floor((c - 80) * 0.6) : void 0;
|
|
4643
|
+
return /* @__PURE__ */ Z("div", { style: { margin: "12px 0", textAlign: "center", width: "100%" }, children: [
|
|
4636
4644
|
/* @__PURE__ */ x(
|
|
4637
4645
|
"div",
|
|
4638
4646
|
{
|
|
@@ -4647,7 +4655,7 @@ function wa({
|
|
|
4647
4655
|
{
|
|
4648
4656
|
src: _,
|
|
4649
4657
|
alt: P || "",
|
|
4650
|
-
loading:
|
|
4658
|
+
loading: F ? "eager" : "lazy",
|
|
4651
4659
|
style: {
|
|
4652
4660
|
pointerEvents: "none",
|
|
4653
4661
|
position: "absolute",
|
|
@@ -4665,7 +4673,7 @@ function wa({
|
|
|
4665
4673
|
P && /* @__PURE__ */ x("div", { style: { fontSize: 12, color: "#6b7280", marginTop: 4 }, children: P })
|
|
4666
4674
|
] });
|
|
4667
4675
|
}
|
|
4668
|
-
const z = r[
|
|
4676
|
+
const z = r[T] ?? void 0, w = i[T];
|
|
4669
4677
|
return /* @__PURE__ */ x(
|
|
4670
4678
|
"div",
|
|
4671
4679
|
{
|
|
@@ -4679,20 +4687,20 @@ function wa({
|
|
|
4679
4687
|
block: E,
|
|
4680
4688
|
computedMarker: z,
|
|
4681
4689
|
ns: O,
|
|
4682
|
-
baseIndex: o[
|
|
4690
|
+
baseIndex: o[T],
|
|
4683
4691
|
sectionId: e.section_id,
|
|
4684
|
-
preGroups:
|
|
4692
|
+
preGroups: w
|
|
4685
4693
|
}
|
|
4686
4694
|
)
|
|
4687
4695
|
}
|
|
4688
4696
|
);
|
|
4689
4697
|
},
|
|
4690
4698
|
[t, r, o, n, e, i, c]
|
|
4691
|
-
), d = ie(null), m =
|
|
4692
|
-
d.current =
|
|
4699
|
+
), d = ie(null), m = Q((T) => {
|
|
4700
|
+
d.current = T;
|
|
4693
4701
|
}, []), p = ve(
|
|
4694
|
-
() => Dt((
|
|
4695
|
-
const { style: E, children: O, ...z } =
|
|
4702
|
+
() => Dt((T) => {
|
|
4703
|
+
const { style: E, children: O, ...z } = T;
|
|
4696
4704
|
return /* @__PURE__ */ x("div", { ...z, style: E, children: /* @__PURE__ */ x(
|
|
4697
4705
|
"div",
|
|
4698
4706
|
{
|
|
@@ -4712,25 +4720,25 @@ function wa({
|
|
|
4712
4720
|
) });
|
|
4713
4721
|
}),
|
|
4714
4722
|
[s]
|
|
4715
|
-
), b = ie(null), v = ve(() => t.map((
|
|
4723
|
+
), b = ie(null), v = ve(() => t.map((T) => T.id), [t]), [y, u] = tt(!1);
|
|
4716
4724
|
Se(() => {
|
|
4717
4725
|
u(!1);
|
|
4718
4726
|
}, [t]);
|
|
4719
|
-
const f =
|
|
4727
|
+
const f = Q(() => {
|
|
4720
4728
|
u(!0);
|
|
4721
|
-
}, []), g =
|
|
4729
|
+
}, []), g = Q(() => {
|
|
4722
4730
|
if (!y)
|
|
4723
4731
|
return /* @__PURE__ */ x("div", { style: { height: 40 } });
|
|
4724
|
-
const
|
|
4725
|
-
return
|
|
4732
|
+
const T = e.quizzes, E = Math.max(80, Math.floor(c * 0.5));
|
|
4733
|
+
return T && T.length ? /* @__PURE__ */ Z("div", { style: { display: "block" }, children: [
|
|
4726
4734
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Oi, {}) }),
|
|
4727
4735
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Cn, { isIcon: !1 }) }),
|
|
4728
4736
|
/* @__PURE__ */ x("div", { style: { height: E, width: "100%" } })
|
|
4729
|
-
] }) : /* @__PURE__ */
|
|
4737
|
+
] }) : /* @__PURE__ */ Z("div", { children: [
|
|
4730
4738
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Cn, { isIcon: !1 }) }),
|
|
4731
4739
|
/* @__PURE__ */ x("div", { style: { height: 40 } })
|
|
4732
4740
|
] });
|
|
4733
|
-
}, [y, e, c]),
|
|
4741
|
+
}, [y, e, c]), C = ve(
|
|
4734
4742
|
() => ({
|
|
4735
4743
|
Item: p,
|
|
4736
4744
|
Header: () => /* @__PURE__ */ x("div", { style: { height: 40 } }),
|
|
@@ -4744,30 +4752,30 @@ function wa({
|
|
|
4744
4752
|
// , ScrollPlaceholder
|
|
4745
4753
|
]
|
|
4746
4754
|
// CustomScroller는 고정이면 deps에 안 넣어도 OK
|
|
4747
|
-
), k =
|
|
4755
|
+
), k = Q((T) => v[T], [v]), R = Rt(), [I] = tt(() => R.getState().progress.currentGlobalRunIndex ?? 0), h = ve(() => {
|
|
4748
4756
|
if (!o.length) return 0;
|
|
4749
|
-
const
|
|
4757
|
+
const T = o[o.length - 1], E = Math.max(0, Math.min(I, T));
|
|
4750
4758
|
return zi(o, E);
|
|
4751
4759
|
}, [o, I]);
|
|
4752
4760
|
console.log("SectionRenderVirtuoso확인");
|
|
4753
4761
|
const S = Rt();
|
|
4754
4762
|
return Se(() => {
|
|
4755
|
-
let
|
|
4763
|
+
let T = !1;
|
|
4756
4764
|
return (async () => {
|
|
4757
4765
|
let E = d.current;
|
|
4758
4766
|
if (!E) {
|
|
4759
4767
|
for (let _ = 0; _ < 20; _++) {
|
|
4760
|
-
if (await new Promise((P) => setTimeout(P, 50)),
|
|
4768
|
+
if (await new Promise((P) => setTimeout(P, 50)), T) return;
|
|
4761
4769
|
if (E = d.current, E) break;
|
|
4762
4770
|
}
|
|
4763
4771
|
if (!E) return;
|
|
4764
4772
|
}
|
|
4765
|
-
const O = S.getState().progress.currentGlobalRunIndex, z = S.getState().progress.setSectionLoading,
|
|
4766
|
-
await Mi(E,
|
|
4773
|
+
const O = S.getState().progress.currentGlobalRunIndex, z = S.getState().progress.setSectionLoading, w = O != null && O >= 0 ? O : 0;
|
|
4774
|
+
await Mi(E, w), !T && (await vt(), await vt(), await vt(), await vt(), !T && z(!1));
|
|
4767
4775
|
})(), () => {
|
|
4768
|
-
|
|
4776
|
+
T = !0;
|
|
4769
4777
|
};
|
|
4770
|
-
}, [d, S]), /* @__PURE__ */
|
|
4778
|
+
}, [d, S]), /* @__PURE__ */ Z(yt, { children: [
|
|
4771
4779
|
/* @__PURE__ */ x(
|
|
4772
4780
|
bl,
|
|
4773
4781
|
{
|
|
@@ -4786,7 +4794,7 @@ function wa({
|
|
|
4786
4794
|
initialTopMostItemIndex: h,
|
|
4787
4795
|
increaseViewportBy: { top: 200, bottom: 200 },
|
|
4788
4796
|
endReached: f,
|
|
4789
|
-
components:
|
|
4797
|
+
components: C,
|
|
4790
4798
|
scrollerRef: m
|
|
4791
4799
|
}
|
|
4792
4800
|
),
|
|
@@ -4805,30 +4813,30 @@ const Ia = ({
|
|
|
4805
4813
|
virtRef: t,
|
|
4806
4814
|
prefix: n
|
|
4807
4815
|
}) => {
|
|
4808
|
-
const r = j((
|
|
4816
|
+
const r = j((w) => w.setCurrentGlobalRunIndex), o = j((w) => w.registerSectionScrollApi), i = j((w) => w.currentGlobalRunIndex), s = _e((w) => w.scrollLock), c = _e((w) => w.syncToGI), l = Et(), a = ie(!1), d = ie(null), m = ie(null), p = ie(null), b = ie(-1), v = Q(() => {
|
|
4809
4817
|
if (s) return;
|
|
4810
4818
|
d.current = null;
|
|
4811
|
-
const
|
|
4812
|
-
if (!
|
|
4813
|
-
const _ = aa(
|
|
4819
|
+
const w = m.current;
|
|
4820
|
+
if (!w) return;
|
|
4821
|
+
const _ = aa(w, 5);
|
|
4814
4822
|
_ !== -1 && _ !== b.current && (b.current = _, c(_), r(_, "scroll"));
|
|
4815
|
-
}, [s, c, r]), y =
|
|
4816
|
-
(
|
|
4817
|
-
m.current =
|
|
4823
|
+
}, [s, c, r]), y = Q(
|
|
4824
|
+
(w) => {
|
|
4825
|
+
m.current = w, d.current == null && (d.current = requestAnimationFrame(v));
|
|
4818
4826
|
},
|
|
4819
4827
|
[v]
|
|
4820
|
-
), u =
|
|
4821
|
-
(
|
|
4822
|
-
m.current =
|
|
4828
|
+
), u = Q(
|
|
4829
|
+
(w) => {
|
|
4830
|
+
m.current = w, p.current != null && (window.clearTimeout(p.current), p.current = null), p.current = window.setTimeout(() => {
|
|
4823
4831
|
p.current = null, v();
|
|
4824
4832
|
const _ = b.current;
|
|
4825
4833
|
if (_ === -1) return;
|
|
4826
|
-
const P =
|
|
4834
|
+
const P = w.scrollTop, G = w.scrollHeight - w.clientHeight, M = G > 0 ? P / G : 0;
|
|
4827
4835
|
let B = 0;
|
|
4828
|
-
const
|
|
4829
|
-
if (
|
|
4830
|
-
const V =
|
|
4831
|
-
B = (
|
|
4836
|
+
const F = w.querySelector(`[data-g="${_}"]`);
|
|
4837
|
+
if (F) {
|
|
4838
|
+
const V = w.getBoundingClientRect();
|
|
4839
|
+
B = (F.getBoundingClientRect().top - V.top) / V.height;
|
|
4832
4840
|
}
|
|
4833
4841
|
l.getState().emit({
|
|
4834
4842
|
type: "scroll",
|
|
@@ -4842,27 +4850,27 @@ const Ia = ({
|
|
|
4842
4850
|
}, 100);
|
|
4843
4851
|
},
|
|
4844
4852
|
[v, l]
|
|
4845
|
-
), f = ie(!1), g =
|
|
4846
|
-
(
|
|
4847
|
-
s || a.current && (f.current || (y(
|
|
4853
|
+
), f = ie(!1), g = Q(
|
|
4854
|
+
(w) => {
|
|
4855
|
+
s || a.current && (f.current || (y(w), u(w)));
|
|
4848
4856
|
},
|
|
4849
4857
|
[s, y, u]
|
|
4850
|
-
),
|
|
4858
|
+
), C = ie(void 0), k = ie(void 0), R = ie(void 0), I = ie(void 0);
|
|
4851
4859
|
Se(() => {
|
|
4852
|
-
const
|
|
4853
|
-
if (
|
|
4854
|
-
return
|
|
4860
|
+
const w = e.current;
|
|
4861
|
+
if (w)
|
|
4862
|
+
return C.current = () => {
|
|
4855
4863
|
a.current = !0;
|
|
4856
4864
|
}, k.current = () => {
|
|
4857
4865
|
a.current = !0;
|
|
4858
4866
|
}, R.current = () => {
|
|
4859
4867
|
a.current = !0;
|
|
4860
|
-
}, I.current = () => g(
|
|
4861
|
-
|
|
4868
|
+
}, I.current = () => g(w), w.addEventListener("wheel", C.current, { passive: !0 }), w.addEventListener("touchmove", k.current, { passive: !0 }), window.addEventListener("keydown", R.current, { passive: !0 }), w.addEventListener("scroll", I.current, { passive: !0 }), () => {
|
|
4869
|
+
w.removeEventListener("wheel", C.current), w.removeEventListener("touchmove", k.current), window.removeEventListener("keydown", R.current), w.removeEventListener("scroll", I.current), d.current != null && cancelAnimationFrame(d.current), p.current != null && (clearTimeout(p.current), p.current = null);
|
|
4862
4870
|
};
|
|
4863
4871
|
}, [g, e]), Se(() => {
|
|
4864
|
-
const
|
|
4865
|
-
if (!
|
|
4872
|
+
const w = e.current;
|
|
4873
|
+
if (!w || !s) return;
|
|
4866
4874
|
const _ = (B) => {
|
|
4867
4875
|
B.preventDefault(), B.stopPropagation(), a.current = !1;
|
|
4868
4876
|
}, P = (B) => {
|
|
@@ -4870,48 +4878,48 @@ const Ia = ({
|
|
|
4870
4878
|
}, G = (B) => {
|
|
4871
4879
|
["ArrowUp", "ArrowDown", "PageUp", "PageDown", "Home", "End", " "].includes(B.key) && (B.preventDefault(), B.stopPropagation(), a.current = !1);
|
|
4872
4880
|
}, M = {
|
|
4873
|
-
overscrollBehavior:
|
|
4874
|
-
touchAction:
|
|
4881
|
+
overscrollBehavior: w.style.overscrollBehavior,
|
|
4882
|
+
touchAction: w.style.touchAction
|
|
4875
4883
|
};
|
|
4876
|
-
return
|
|
4877
|
-
|
|
4884
|
+
return w.style.overscrollBehavior = "contain", w.style.touchAction = "none", w.addEventListener("wheel", _, { passive: !1 }), w.addEventListener("touchmove", P, { passive: !1 }), window.addEventListener("keydown", G, { passive: !1 }), () => {
|
|
4885
|
+
w.removeEventListener("wheel", _), w.removeEventListener("touchmove", P), window.removeEventListener("keydown", G), w.style.overscrollBehavior = M.overscrollBehavior, w.style.touchAction = M.touchAction;
|
|
4878
4886
|
};
|
|
4879
4887
|
}, [s, e]);
|
|
4880
4888
|
const h = ie({
|
|
4881
4889
|
first: -1,
|
|
4882
4890
|
last: -1
|
|
4883
|
-
}), S = ie(!1),
|
|
4884
|
-
const
|
|
4885
|
-
if (!
|
|
4886
|
-
const _ = go(
|
|
4891
|
+
}), S = ie(!1), T = Q(() => {
|
|
4892
|
+
const w = e.current;
|
|
4893
|
+
if (!w) return;
|
|
4894
|
+
const _ = go(w), P = (_ == null ? void 0 : _.first) ?? -1, G = (_ == null ? void 0 : _.last) ?? -1;
|
|
4887
4895
|
h.current = { first: P, last: G };
|
|
4888
|
-
}, [e]), E = ie(!1), O =
|
|
4889
|
-
const
|
|
4890
|
-
if (!
|
|
4896
|
+
}, [e]), E = ie(!1), O = Q(() => {
|
|
4897
|
+
const w = e.current;
|
|
4898
|
+
if (!w || E.current) return;
|
|
4891
4899
|
E.current = !0;
|
|
4892
4900
|
const _ = Math.min(
|
|
4893
|
-
|
|
4894
|
-
|
|
4901
|
+
w.scrollTop + Math.floor(w.clientHeight * 0.6),
|
|
4902
|
+
w.scrollHeight - w.clientHeight
|
|
4895
4903
|
);
|
|
4896
4904
|
requestAnimationFrame(() => {
|
|
4897
|
-
|
|
4905
|
+
w.scrollTo({ top: _, behavior: "instant" });
|
|
4898
4906
|
});
|
|
4899
4907
|
}, [e]);
|
|
4900
4908
|
Se(() => {
|
|
4901
|
-
!S.current && s && (E.current = !1,
|
|
4902
|
-
}, [s,
|
|
4909
|
+
!S.current && s && (E.current = !1, T()), S.current = s;
|
|
4910
|
+
}, [s, T]), Se(() => {
|
|
4903
4911
|
if (s !== !0) return;
|
|
4904
|
-
const
|
|
4905
|
-
if (!
|
|
4912
|
+
const w = e.current;
|
|
4913
|
+
if (!w) return;
|
|
4906
4914
|
const { first: _, last: P } = h.current;
|
|
4907
4915
|
if (_ === -1 || P === -1) {
|
|
4908
4916
|
O();
|
|
4909
4917
|
return;
|
|
4910
4918
|
}
|
|
4911
|
-
if (
|
|
4919
|
+
if (w.scrollTop <= 1) {
|
|
4912
4920
|
(async () => {
|
|
4913
4921
|
try {
|
|
4914
|
-
f.current = !0, await qn(
|
|
4922
|
+
f.current = !0, await qn(w, i, {
|
|
4915
4923
|
behavior: "smooth",
|
|
4916
4924
|
topPaddingRatio: 0.2
|
|
4917
4925
|
// ⬅️ 탑일 때는 0으로 고정
|
|
@@ -4919,33 +4927,33 @@ const Ia = ({
|
|
|
4919
4927
|
} finally {
|
|
4920
4928
|
f.current = !1;
|
|
4921
4929
|
}
|
|
4922
|
-
|
|
4930
|
+
T();
|
|
4923
4931
|
})();
|
|
4924
4932
|
return;
|
|
4925
4933
|
}
|
|
4926
4934
|
if (i < _ || i > P) {
|
|
4927
4935
|
async function M() {
|
|
4928
|
-
if (!
|
|
4929
|
-
const B =
|
|
4930
|
-
return await qn(
|
|
4936
|
+
if (!w) return;
|
|
4937
|
+
const B = w.scrollTop <= 1 ? 0 : 0.2;
|
|
4938
|
+
return await qn(w, i, {
|
|
4931
4939
|
behavior: "smooth",
|
|
4932
4940
|
topPaddingRatio: B
|
|
4933
4941
|
});
|
|
4934
4942
|
}
|
|
4935
4943
|
M().then((B) => {
|
|
4936
|
-
B ?
|
|
4944
|
+
B ? T() : O();
|
|
4937
4945
|
});
|
|
4938
4946
|
}
|
|
4939
4947
|
}, [
|
|
4940
4948
|
s,
|
|
4941
4949
|
i,
|
|
4942
4950
|
O,
|
|
4943
|
-
|
|
4951
|
+
T,
|
|
4944
4952
|
e
|
|
4945
4953
|
]);
|
|
4946
|
-
const z =
|
|
4947
|
-
const
|
|
4948
|
-
if (!
|
|
4954
|
+
const z = Q(() => {
|
|
4955
|
+
const w = e.current;
|
|
4956
|
+
if (!w) return;
|
|
4949
4957
|
function _(ee, X, A = 0.2, K = 0.8) {
|
|
4950
4958
|
const ne = ee.querySelector(`[data-g="${X}"]`);
|
|
4951
4959
|
if (!ne) return !1;
|
|
@@ -4955,11 +4963,11 @@ const Ia = ({
|
|
|
4955
4963
|
return $ >= A && $ <= K;
|
|
4956
4964
|
}
|
|
4957
4965
|
const P = (ee) => ee === "instant" ? "auto" : ee, G = (ee) => {
|
|
4958
|
-
const X =
|
|
4966
|
+
const X = w.scrollTop, A = w.scrollHeight - w.clientHeight, K = A > 0 ? X / A : 0;
|
|
4959
4967
|
let ne = 0;
|
|
4960
|
-
const N =
|
|
4968
|
+
const N = w.querySelector(`[data-g="${ee}"]`);
|
|
4961
4969
|
if (N) {
|
|
4962
|
-
const oe =
|
|
4970
|
+
const oe = w.getBoundingClientRect();
|
|
4963
4971
|
ne = (N.getBoundingClientRect().top - oe.top) / oe.height;
|
|
4964
4972
|
}
|
|
4965
4973
|
l.getState().emit({
|
|
@@ -4978,43 +4986,43 @@ const Ia = ({
|
|
|
4978
4986
|
index: A,
|
|
4979
4987
|
align: "start",
|
|
4980
4988
|
behavior: P(X)
|
|
4981
|
-
}), await Mi(
|
|
4982
|
-
}, B = () => new Promise((ee) => requestAnimationFrame(() => ee())),
|
|
4983
|
-
if (_(
|
|
4989
|
+
}), await Mi(w, ee);
|
|
4990
|
+
}, B = () => new Promise((ee) => requestAnimationFrame(() => ee())), F = async (ee) => {
|
|
4991
|
+
if (_(w, ee, 0.1, 0.7))
|
|
4984
4992
|
return G(ee), !0;
|
|
4985
4993
|
f.current = !0;
|
|
4986
|
-
const X =
|
|
4987
|
-
let K =
|
|
4994
|
+
const X = w.querySelector(`[data-g="${ee}"]`), A = w.getBoundingClientRect();
|
|
4995
|
+
let K = w.scrollTop <= 1 ? 0 : 0.1;
|
|
4988
4996
|
if (X) {
|
|
4989
4997
|
const N = X.getBoundingClientRect();
|
|
4990
4998
|
K = ((N.top + N.height / 2 - A.top) / A.height > 0.5, 0.15);
|
|
4991
4999
|
}
|
|
4992
5000
|
const ne = !!X;
|
|
4993
|
-
return ne ? (await qn(
|
|
5001
|
+
return ne ? (await qn(w, ee, {
|
|
4994
5002
|
behavior: "smooth",
|
|
4995
5003
|
topPaddingRatio: K
|
|
4996
|
-
}), await B()) : ne || await M(ee, "auto"), f.current = !1, G(ee), _(
|
|
4997
|
-
}, V = async (ee) =>
|
|
5004
|
+
}), await B()) : ne || await M(ee, "auto"), f.current = !1, G(ee), _(w, ee, 0.1, 0.7);
|
|
5005
|
+
}, V = async (ee) => F(ee);
|
|
4998
5006
|
return {
|
|
4999
|
-
ensureVisibleGI:
|
|
5007
|
+
ensureVisibleGI: F,
|
|
5000
5008
|
scrollToGI: V,
|
|
5001
|
-
getVisibleRange: () => go(
|
|
5002
|
-
getScrollTop: () =>
|
|
5009
|
+
getVisibleRange: () => go(w),
|
|
5010
|
+
getScrollTop: () => w.scrollTop,
|
|
5003
5011
|
setScrollTop: (ee) => {
|
|
5004
|
-
|
|
5012
|
+
w.scrollTop = ee;
|
|
5005
5013
|
},
|
|
5006
5014
|
getAnchorOffsetRatio: (ee) => {
|
|
5007
|
-
const X =
|
|
5015
|
+
const X = w.querySelector(`[data-g="${ee}"]`);
|
|
5008
5016
|
if (!X) return 0;
|
|
5009
|
-
const A = X.getBoundingClientRect(), K =
|
|
5017
|
+
const A = X.getBoundingClientRect(), K = w.getBoundingClientRect();
|
|
5010
5018
|
return (A.top - K.top) / K.height;
|
|
5011
5019
|
},
|
|
5012
5020
|
scrollToGIAtOffset: async (ee, X) => {
|
|
5013
5021
|
await V(ee), await new Promise((se) => requestAnimationFrame(() => requestAnimationFrame(se)));
|
|
5014
|
-
const A =
|
|
5022
|
+
const A = w.querySelector(`[data-g="${ee}"]`);
|
|
5015
5023
|
if (!A) return;
|
|
5016
|
-
const K = A.getBoundingClientRect(), ne =
|
|
5017
|
-
|
|
5024
|
+
const K = A.getBoundingClientRect(), ne = w.getBoundingClientRect(), N = ne.height > 0 ? ne.height / w.clientHeight : 1, oe = (K.top - ne.top) / N, $ = X * w.clientHeight, J = oe - $;
|
|
5025
|
+
w.scrollTop = w.scrollTop + J;
|
|
5018
5026
|
}
|
|
5019
5027
|
};
|
|
5020
5028
|
}, [e, t, n, l]);
|
|
@@ -5032,7 +5040,7 @@ function Ta() {
|
|
|
5032
5040
|
sectionId: e.section_id,
|
|
5033
5041
|
blocks: e.ast.blocks,
|
|
5034
5042
|
nsPrefix: `sec-${e.section_id ?? "0"}/`
|
|
5035
|
-
}), [e]), l = kn(), a =
|
|
5043
|
+
}), [e]), l = kn(), a = Q(() => {
|
|
5036
5044
|
const { isSettingsOpen: v, setSettingsOpen: y, toggleOverlays: u } = l.getState();
|
|
5037
5045
|
v ? y(!1) : u();
|
|
5038
5046
|
}, [l]), { onClick: d, onDoubleClick: m } = is({
|
|
@@ -5094,7 +5102,7 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5094
5102
|
label: qa,
|
|
5095
5103
|
compactBtn: ja
|
|
5096
5104
|
}, Ua = Dt(function() {
|
|
5097
|
-
const t = ie(null), n = Ue(Mt), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = _e((S) => S.status), i = _e((S) => S.currentTimeMs), s = _e((S) => S.currentClip), c = _e((S) => S.playbackKind), l = Y((S) => S.muteAudio), a = Y((S) => S.audioSpeed), d = _e((S) => S.getClipSrc), m = _e((S) => S._onTime), p = _e((S) => S._onEnded), b = _e((S) => S._onError), v = j((S) => S.setCurrentGlobalRunIndex), y = j((S) => S.getSectionScrollApi), u = j((S) => S.snapToReadable), f = j((S) => S.edgeReadable), g = ie(null),
|
|
5105
|
+
const t = ie(null), n = Ue(Mt), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = _e((S) => S.status), i = _e((S) => S.currentTimeMs), s = _e((S) => S.currentClip), c = _e((S) => S.playbackKind), l = Y((S) => S.muteAudio), a = Y((S) => S.audioSpeed), d = _e((S) => S.getClipSrc), m = _e((S) => S._onTime), p = _e((S) => S._onEnded), b = _e((S) => S._onError), v = j((S) => S.setCurrentGlobalRunIndex), y = j((S) => S.getSectionScrollApi), u = j((S) => S.snapToReadable), f = j((S) => S.edgeReadable), g = ie(null), C = ie(null), k = ie(!1), R = ie(null);
|
|
5098
5106
|
Se(() => {
|
|
5099
5107
|
c === "real" && (k.current = !0);
|
|
5100
5108
|
}, [c]);
|
|
@@ -5112,24 +5120,24 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5112
5120
|
}, [I]), Se(() => {
|
|
5113
5121
|
const S = t.current;
|
|
5114
5122
|
if (!S) return;
|
|
5115
|
-
const
|
|
5123
|
+
const T = () => {
|
|
5116
5124
|
if (S.paused || S.ended) return;
|
|
5117
5125
|
const z = S.currentTime * 1e3;
|
|
5118
5126
|
k.current && z === 0 || (z > 0 && (k.current = !1), m(z));
|
|
5119
5127
|
}, E = () => {
|
|
5120
|
-
var
|
|
5128
|
+
var w, _;
|
|
5121
5129
|
p();
|
|
5122
5130
|
const z = f(1);
|
|
5123
|
-
typeof z == "number" && z >= 0 && (v(z, "audio"), (_ = (
|
|
5131
|
+
typeof z == "number" && z >= 0 && (v(z, "audio"), (_ = (w = y()) == null ? void 0 : w.ensureVisibleGI) == null || _.call(w, z));
|
|
5124
5132
|
}, O = (z) => {
|
|
5125
|
-
const
|
|
5133
|
+
const w = z.currentTarget;
|
|
5126
5134
|
console.warn("Audio error", {
|
|
5127
|
-
networkState:
|
|
5128
|
-
readyState:
|
|
5135
|
+
networkState: w.networkState,
|
|
5136
|
+
readyState: w.readyState
|
|
5129
5137
|
}), b();
|
|
5130
5138
|
};
|
|
5131
|
-
return S.addEventListener("timeupdate",
|
|
5132
|
-
S.removeEventListener("timeupdate",
|
|
5139
|
+
return S.addEventListener("timeupdate", T), S.addEventListener("ended", E), S.addEventListener("error", O), () => {
|
|
5140
|
+
S.removeEventListener("timeupdate", T), S.removeEventListener("ended", E), S.removeEventListener("error", O);
|
|
5133
5141
|
};
|
|
5134
5142
|
}, [m, p, b, f, v, y]), Se(() => {
|
|
5135
5143
|
if (r) return;
|
|
@@ -5141,10 +5149,10 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5141
5149
|
} catch (z) {
|
|
5142
5150
|
console.log("pause error", z);
|
|
5143
5151
|
}
|
|
5144
|
-
|
|
5152
|
+
C.current = null;
|
|
5145
5153
|
return;
|
|
5146
5154
|
}
|
|
5147
|
-
const
|
|
5155
|
+
const T = S.currentSrc || S.src || null, E = !T || T !== I;
|
|
5148
5156
|
if (E) {
|
|
5149
5157
|
try {
|
|
5150
5158
|
S.pause();
|
|
@@ -5157,14 +5165,14 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5157
5165
|
} catch (z) {
|
|
5158
5166
|
console.log("load error", z);
|
|
5159
5167
|
}
|
|
5160
|
-
|
|
5168
|
+
C.current = I;
|
|
5161
5169
|
}
|
|
5162
5170
|
S.muted = !!l, S.volume = 1, S.playbackRate = typeof a == "number" ? a : 1;
|
|
5163
5171
|
const O = async () => {
|
|
5164
5172
|
E && await new Promise((z) => {
|
|
5165
|
-
let
|
|
5173
|
+
let w = !1;
|
|
5166
5174
|
const _ = () => {
|
|
5167
|
-
|
|
5175
|
+
w || (w = !0, S.removeEventListener("loadedmetadata", _), S.removeEventListener("canplay", _), z());
|
|
5168
5176
|
};
|
|
5169
5177
|
S.addEventListener("loadedmetadata", _), S.addEventListener("canplay", _), S.readyState >= 1 && _();
|
|
5170
5178
|
});
|
|
@@ -5186,8 +5194,8 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5186
5194
|
if (r) return;
|
|
5187
5195
|
const S = t.current;
|
|
5188
5196
|
if (!S || c !== "real") return;
|
|
5189
|
-
const
|
|
5190
|
-
if (Number.isFinite(
|
|
5197
|
+
const T = i / 1e3;
|
|
5198
|
+
if (Number.isFinite(T)) {
|
|
5191
5199
|
if (S.readyState < 1) {
|
|
5192
5200
|
g.current = i;
|
|
5193
5201
|
const E = () => {
|
|
@@ -5205,9 +5213,9 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5205
5213
|
S.addEventListener("loadedmetadata", E), S.addEventListener("canplay", E);
|
|
5206
5214
|
return;
|
|
5207
5215
|
}
|
|
5208
|
-
if (Math.abs(S.currentTime -
|
|
5216
|
+
if (Math.abs(S.currentTime - T) > 0.2)
|
|
5209
5217
|
try {
|
|
5210
|
-
S.currentTime =
|
|
5218
|
+
S.currentTime = T;
|
|
5211
5219
|
} catch (E) {
|
|
5212
5220
|
console.log("currentTime보정오류", E);
|
|
5213
5221
|
}
|
|
@@ -5219,8 +5227,8 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5219
5227
|
if (r || c !== "real" || o !== "playing" && o !== "loading") return;
|
|
5220
5228
|
const S = h(s, i);
|
|
5221
5229
|
if (S < 0) return;
|
|
5222
|
-
const
|
|
5223
|
-
|
|
5230
|
+
const T = u(S);
|
|
5231
|
+
T !== R.current && (R.current = T, v(T, "audio"), T % 5 === 0 && ((O = (E = y()) == null ? void 0 : E.ensureVisibleGI) == null || O.call(E, T)));
|
|
5224
5232
|
}, [
|
|
5225
5233
|
o,
|
|
5226
5234
|
s,
|
|
@@ -5249,26 +5257,26 @@ function tc() {
|
|
|
5249
5257
|
Se(() => {
|
|
5250
5258
|
b(i(t || 0));
|
|
5251
5259
|
}, [t, i]);
|
|
5252
|
-
const v = ie(!1), y = ve(() => Math.max(0, Math.min(t ?? 0, Math.max(0, (n ?? 1) - 1))) + 1, [t, n]), u =
|
|
5260
|
+
const v = ie(!1), y = ve(() => Math.max(0, Math.min(t ?? 0, Math.max(0, (n ?? 1) - 1))) + 1, [t, n]), u = Q(() => {
|
|
5253
5261
|
l && (a(), v.current = !0);
|
|
5254
|
-
}, [l, a]), f =
|
|
5262
|
+
}, [l, a]), f = Q((R) => {
|
|
5255
5263
|
b(Number(R.currentTarget.value));
|
|
5256
|
-
}, []), g =
|
|
5264
|
+
}, []), g = Q(async () => {
|
|
5257
5265
|
const R = s(p), I = c(R);
|
|
5258
5266
|
a(), r(I, "scrubber-commit"), m(I);
|
|
5259
5267
|
const h = o();
|
|
5260
5268
|
h != null && h.ensureVisibleGI && await h.ensureVisibleGI(I), v.current && (v.current = !1, d());
|
|
5261
|
-
}, [p, s, c, a, r, m, o, d]),
|
|
5269
|
+
}, [p, s, c, a, r, m, o, d]), C = ve(
|
|
5262
5270
|
() => ({ "--pct": `${p}%` }),
|
|
5263
5271
|
[p]
|
|
5264
5272
|
), k = ve(() => Math.round(p), [p]);
|
|
5265
|
-
return /* @__PURE__ */
|
|
5266
|
-
e && /* @__PURE__ */ x("div", { className: zt.labels, children: /* @__PURE__ */
|
|
5273
|
+
return /* @__PURE__ */ Z("div", { className: zt.scrubberWrap, children: [
|
|
5274
|
+
e && /* @__PURE__ */ x("div", { className: zt.labels, children: /* @__PURE__ */ Z("span", { className: zt.index, children: [
|
|
5267
5275
|
y,
|
|
5268
5276
|
" / ",
|
|
5269
5277
|
n || 0
|
|
5270
5278
|
] }) }),
|
|
5271
|
-
/* @__PURE__ */
|
|
5279
|
+
/* @__PURE__ */ Z("div", { className: zt.controls, children: [
|
|
5272
5280
|
/* @__PURE__ */ x(
|
|
5273
5281
|
"input",
|
|
5274
5282
|
{
|
|
@@ -5278,7 +5286,7 @@ function tc() {
|
|
|
5278
5286
|
max: 100,
|
|
5279
5287
|
step: 0.5,
|
|
5280
5288
|
value: p,
|
|
5281
|
-
style:
|
|
5289
|
+
style: C,
|
|
5282
5290
|
onMouseDown: u,
|
|
5283
5291
|
onTouchStart: u,
|
|
5284
5292
|
onChange: f,
|
|
@@ -5292,18 +5300,18 @@ function tc() {
|
|
|
5292
5300
|
"aria-label": "진행률"
|
|
5293
5301
|
}
|
|
5294
5302
|
),
|
|
5295
|
-
/* @__PURE__ */
|
|
5303
|
+
/* @__PURE__ */ Z("span", { className: zt.percent, children: [
|
|
5296
5304
|
k,
|
|
5297
5305
|
"%"
|
|
5298
5306
|
] })
|
|
5299
5307
|
] })
|
|
5300
5308
|
] });
|
|
5301
5309
|
}
|
|
5302
|
-
const nc =
|
|
5303
|
-
const t = Ue(Mt), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r = _e((S) => S.playbackKind), o = _e((S) => S.status), i = _e((S) => S.fake), s = Y((S) => S.audioSpeed), c = _e((S) => S.pause), l = j((S) => S.totalRuns), a = j((S) => S.currentGlobalRunIndex), d = j((S) => S.setCurrentGlobalRunIndex), m = j((S) => S.getSectionScrollApi), p = j((S) => S.nextReadableFrom), b = j((S) => S.edgeReadable), v = ie(null), y = ie(null), u = ie(0), f = ie(-1), g = !n && r === "fake" && o === "playing",
|
|
5310
|
+
const nc = D.memo(tc), rc = Dt(function() {
|
|
5311
|
+
const t = Ue(Mt), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r = _e((S) => S.playbackKind), o = _e((S) => S.status), i = _e((S) => S.fake), s = Y((S) => S.audioSpeed), c = _e((S) => S.pause), l = j((S) => S.totalRuns), a = j((S) => S.currentGlobalRunIndex), d = j((S) => S.setCurrentGlobalRunIndex), m = j((S) => S.getSectionScrollApi), p = j((S) => S.nextReadableFrom), b = j((S) => S.edgeReadable), v = ie(null), y = ie(null), u = ie(0), f = ie(-1), g = !n && r === "fake" && o === "playing", C = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1), k = ve(() => {
|
|
5304
5312
|
const S = 200 * s;
|
|
5305
|
-
return
|
|
5306
|
-
}, [
|
|
5313
|
+
return C / S * 6e4;
|
|
5314
|
+
}, [C, s]), R = ve(() => !l || l <= 1 || k <= 0 ? 0 : (l - 1) / k, [l, k]);
|
|
5307
5315
|
Se(() => {
|
|
5308
5316
|
if (!g) return;
|
|
5309
5317
|
const S = Math.max(0, Math.min(a ?? 0, Math.max(0, (l ?? 1) - 1)));
|
|
@@ -5318,7 +5326,7 @@ const nc = F.memo(tc), rc = Dt(function() {
|
|
|
5318
5326
|
const S = b(1);
|
|
5319
5327
|
I.current = S ?? -1;
|
|
5320
5328
|
}, [b, l]);
|
|
5321
|
-
const h =
|
|
5329
|
+
const h = Q(
|
|
5322
5330
|
(S) => {
|
|
5323
5331
|
(async () => {
|
|
5324
5332
|
var G, M;
|
|
@@ -5330,18 +5338,18 @@ const nc = F.memo(tc), rc = Dt(function() {
|
|
|
5330
5338
|
v.current = null;
|
|
5331
5339
|
return;
|
|
5332
5340
|
}
|
|
5333
|
-
const
|
|
5341
|
+
const T = y.current;
|
|
5334
5342
|
y.current = S;
|
|
5335
|
-
const E =
|
|
5343
|
+
const E = T == null ? 0 : Math.max(0, S - T), O = l - 1;
|
|
5336
5344
|
u.current = Math.min(O, u.current + R * E);
|
|
5337
|
-
const z = Math.floor(u.current),
|
|
5345
|
+
const z = Math.floor(u.current), w = m(), _ = p(z, 1);
|
|
5338
5346
|
if (_ == null) {
|
|
5339
5347
|
const B = I.current >= 0 ? I.current : z;
|
|
5340
|
-
B !== f.current && (f.current = B, d(B, "audio"), await ((G =
|
|
5348
|
+
B !== f.current && (f.current = B, d(B, "audio"), await ((G = w == null ? void 0 : w.ensureVisibleGI) == null ? void 0 : G.call(w, B))), c(), v.current = null;
|
|
5341
5349
|
return;
|
|
5342
5350
|
}
|
|
5343
5351
|
const P = _;
|
|
5344
|
-
P !== f.current && (f.current = P, d(P, "audio"), P % 5 === 0 && await ((M =
|
|
5352
|
+
P !== f.current && (f.current = P, d(P, "audio"), P % 5 === 0 && await ((M = w == null ? void 0 : w.ensureVisibleGI) == null ? void 0 : M.call(w, P))), v.current = requestAnimationFrame(h);
|
|
5345
5353
|
})().catch(console.error);
|
|
5346
5354
|
},
|
|
5347
5355
|
[g, l, R, p, d, m, c]
|
|
@@ -5357,7 +5365,7 @@ const nc = F.memo(tc), rc = Dt(function() {
|
|
|
5357
5365
|
label: cc,
|
|
5358
5366
|
iconBtn: uc
|
|
5359
5367
|
}, yo = 350, dc = 40, fc = 0.85, pc = Dt(function() {
|
|
5360
|
-
const t = Y((p) => p.audioSpeed), n = Y((p) => p.incAudioSpeed), r = Y((p) => p.decAudioSpeed), o = ie(null), i = ie(yo), s = ie(null), c =
|
|
5368
|
+
const t = Y((p) => p.audioSpeed), n = Y((p) => p.incAudioSpeed), r = Y((p) => p.decAudioSpeed), o = ie(null), i = ie(yo), s = ie(null), c = Q(
|
|
5361
5369
|
(p) => {
|
|
5362
5370
|
const b = t;
|
|
5363
5371
|
if (p === "inc") {
|
|
@@ -5370,13 +5378,13 @@ const nc = F.memo(tc), rc = Dt(function() {
|
|
|
5370
5378
|
return !0;
|
|
5371
5379
|
},
|
|
5372
5380
|
[t, n, r]
|
|
5373
|
-
), l =
|
|
5381
|
+
), l = Q(() => {
|
|
5374
5382
|
s.current = null, o.current && (clearTimeout(o.current), o.current = null);
|
|
5375
|
-
}, []), a =
|
|
5383
|
+
}, []), a = Q(() => {
|
|
5376
5384
|
s.current && (i.current = Math.max(dc, Math.floor(i.current * fc)), o.current = window.setTimeout(() => {
|
|
5377
5385
|
c(s.current) ? a() : l();
|
|
5378
5386
|
}, i.current));
|
|
5379
|
-
}, [c, l]), d =
|
|
5387
|
+
}, [c, l]), d = Q(
|
|
5380
5388
|
(p) => {
|
|
5381
5389
|
if (s.current) return;
|
|
5382
5390
|
s.current = p, i.current = yo, c(p) && a();
|
|
@@ -5392,7 +5400,7 @@ const nc = F.memo(tc), rc = Dt(function() {
|
|
|
5392
5400
|
{
|
|
5393
5401
|
onMouseLeave: l,
|
|
5394
5402
|
className: qt.WPMSpeedButtonsWrap,
|
|
5395
|
-
children: /* @__PURE__ */
|
|
5403
|
+
children: /* @__PURE__ */ Z("div", { className: qt.btnWrap, children: [
|
|
5396
5404
|
/* @__PURE__ */ x(
|
|
5397
5405
|
"button",
|
|
5398
5406
|
{
|
|
@@ -5435,7 +5443,7 @@ function bc(e) {
|
|
|
5435
5443
|
return ot({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M221.66,133.66l-80,80A8,8,0,0,1,128,208V147.31L61.66,213.66A8,8,0,0,1,48,208V48a8,8,0,0,1,13.66-5.66L128,108.69V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,221.66,133.66Z" }, child: [] }] })(e);
|
|
5436
5444
|
}
|
|
5437
5445
|
function xo({ direction: e }) {
|
|
5438
|
-
const t = j((m) => m.currentGlobalRunIndex), n = j((m) => m.totalRuns), r = j((m) => m.hasReadableInDir), o = j((m) => m.computeStepTarget), i = j((m) => m.setCurrentGlobalRunIndex), s = _e((m) => m.syncToGI), c = j((m) => m.getSectionScrollApi), l =
|
|
5446
|
+
const t = j((m) => m.currentGlobalRunIndex), n = j((m) => m.totalRuns), r = j((m) => m.hasReadableInDir), o = j((m) => m.computeStepTarget), i = j((m) => m.setCurrentGlobalRunIndex), s = _e((m) => m.syncToGI), c = j((m) => m.getSectionScrollApi), l = Q(
|
|
5439
5447
|
async (m) => {
|
|
5440
5448
|
var v, y;
|
|
5441
5449
|
const p = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1))), b = o(p, m);
|
|
@@ -5453,7 +5461,7 @@ function xo({ direction: e }) {
|
|
|
5453
5461
|
), a = ve(() => {
|
|
5454
5462
|
const m = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1))), p = !n || !r(m, 1), b = !n || !r(m, -1);
|
|
5455
5463
|
return e === "left" ? b : p;
|
|
5456
|
-
}, [e, n, t, r]), d =
|
|
5464
|
+
}, [e, n, t, r]), d = Q(() => {
|
|
5457
5465
|
l(e === "left" ? -1 : 1);
|
|
5458
5466
|
}, [e, l]);
|
|
5459
5467
|
return /* @__PURE__ */ x(
|
|
@@ -5503,41 +5511,41 @@ function Ic() {
|
|
|
5503
5511
|
var R;
|
|
5504
5512
|
const e = Y((I) => I.showOverlays), t = j((I) => I.section), n = !!t.ast.isAddedSplit, r = !!((R = t.audios) != null && R.length), o = Y((I) => I.muteAudio), i = Y((I) => I.showPointer), s = Y((I) => I.showSplit), c = Y((I) => I.toggleMuteAudio), l = Y((I) => I.toggleShowPointer), a = Y((I) => I.toggleShowSplit), d = Y((I) => I.overlayCompactMode), m = Y((I) => I.toggleOverlayCompactMode), p = yn(), b = Rt();
|
|
5505
5513
|
Se(() => {
|
|
5506
|
-
const I = p.getState(), { syncToGI: h, useFake: S, useReal:
|
|
5514
|
+
const I = p.getState(), { syncToGI: h, useFake: S, useReal: T } = I, E = I.playbackKind, O = b.getState().progress.currentGlobalRunIndex ?? 0;
|
|
5507
5515
|
if (!r) {
|
|
5508
5516
|
E !== "fake" && S();
|
|
5509
5517
|
return;
|
|
5510
5518
|
}
|
|
5511
|
-
o ? E !== "fake" && (console.log("이부분일까?"), S()) : E !== "real" && (h(O),
|
|
5519
|
+
o ? E !== "fake" && (console.log("이부분일까?"), S()) : E !== "real" && (h(O), T());
|
|
5512
5520
|
}, [r, o, b, p]);
|
|
5513
|
-
const v = _e((I) => I.play), y = _e((I) => I.pause), u = _e((I) => I.status), f =
|
|
5521
|
+
const v = _e((I) => I.play), y = _e((I) => I.pause), u = _e((I) => I.status), f = Q(
|
|
5514
5522
|
(I) => {
|
|
5515
5523
|
I.stopPropagation(), u === "playing" || u === "loading" ? y() : v();
|
|
5516
5524
|
},
|
|
5517
5525
|
[u, v, y]
|
|
5518
|
-
), g = yn(),
|
|
5526
|
+
), g = yn(), C = Rt(), k = Q(
|
|
5519
5527
|
async (I) => {
|
|
5520
|
-
var
|
|
5528
|
+
var F, V;
|
|
5521
5529
|
if (I.stopPropagation(), u === "playing" || u === "loading") {
|
|
5522
5530
|
y();
|
|
5523
5531
|
return;
|
|
5524
5532
|
}
|
|
5525
|
-
const { progress: h } =
|
|
5533
|
+
const { progress: h } = C.getState(), {
|
|
5526
5534
|
currentGlobalRunIndex: S,
|
|
5527
|
-
snapToReadable:
|
|
5535
|
+
snapToReadable: T,
|
|
5528
5536
|
edgeReadable: E,
|
|
5529
5537
|
setCurrentGlobalRunIndex: O,
|
|
5530
5538
|
getSectionScrollApi: z
|
|
5531
|
-
} = h,
|
|
5539
|
+
} = h, w = g.getState(), _ = w.currentClip, P = z == null ? void 0 : z(), G = typeof S == "number" ? S : 0, M = typeof T == "function" ? T(G) : G, B = typeof E == "function" ? E(1) : null;
|
|
5532
5540
|
if (B != null && M >= B) {
|
|
5533
|
-
O == null || O(B, "audio"), await ((
|
|
5541
|
+
O == null || O(B, "audio"), await ((F = P == null ? void 0 : P.ensureVisibleGI) == null ? void 0 : F.call(P, B)), w.syncToGI(B);
|
|
5534
5542
|
return;
|
|
5535
5543
|
}
|
|
5536
|
-
O == null || O(M, "audio"), await ((V = P == null ? void 0 : P.ensureVisibleGI) == null ? void 0 : V.call(P, M)),
|
|
5544
|
+
O == null || O(M, "audio"), await ((V = P == null ? void 0 : P.ensureVisibleGI) == null ? void 0 : V.call(P, M)), w.syncToGI(M), v(_);
|
|
5537
5545
|
},
|
|
5538
|
-
[u, y, v, g,
|
|
5546
|
+
[u, y, v, g, C]
|
|
5539
5547
|
);
|
|
5540
|
-
return /* @__PURE__ */
|
|
5548
|
+
return /* @__PURE__ */ Z(
|
|
5541
5549
|
"div",
|
|
5542
5550
|
{
|
|
5543
5551
|
className: `${Le.wrap} ${e ? Le.visible : ""} ${d ? Le.compact : ""}`,
|
|
@@ -5550,8 +5558,8 @@ function Ic() {
|
|
|
5550
5558
|
children: [
|
|
5551
5559
|
!d && /* @__PURE__ */ x(nc, {}),
|
|
5552
5560
|
/* @__PURE__ */ x("div", { style: d ? { display: "none" } : void 0, children: r && !o ? /* @__PURE__ */ x(Ka, {}) : /* @__PURE__ */ x(oc, {}) }),
|
|
5553
|
-
/* @__PURE__ */
|
|
5554
|
-
/* @__PURE__ */
|
|
5561
|
+
/* @__PURE__ */ Z("div", { className: Le.controls, children: [
|
|
5562
|
+
/* @__PURE__ */ Z("div", { className: Le.row1, children: [
|
|
5555
5563
|
/* @__PURE__ */ x("div", { className: Le.groupExpand, children: /* @__PURE__ */ x(
|
|
5556
5564
|
"button",
|
|
5557
5565
|
{
|
|
@@ -5564,7 +5572,7 @@ function Ic() {
|
|
|
5564
5572
|
children: d ? /* @__PURE__ */ x(wc, { size: 24 }) : /* @__PURE__ */ x(xc, { size: 24 })
|
|
5565
5573
|
}
|
|
5566
5574
|
) }),
|
|
5567
|
-
/* @__PURE__ */
|
|
5575
|
+
/* @__PURE__ */ Z("div", { className: Le.groupPlayback, children: [
|
|
5568
5576
|
/* @__PURE__ */ x(xo, { direction: "left" }),
|
|
5569
5577
|
/* @__PURE__ */ x(
|
|
5570
5578
|
yc,
|
|
@@ -5579,9 +5587,9 @@ function Ic() {
|
|
|
5579
5587
|
] }),
|
|
5580
5588
|
/* @__PURE__ */ x("div", { className: Le.groupSpeed, children: /* @__PURE__ */ x(pc, {}) })
|
|
5581
5589
|
] }),
|
|
5582
|
-
/* @__PURE__ */
|
|
5583
|
-
/* @__PURE__ */
|
|
5584
|
-
r && /* @__PURE__ */
|
|
5590
|
+
/* @__PURE__ */ Z("div", { className: Le.row2, children: [
|
|
5591
|
+
/* @__PURE__ */ Z("div", { className: Le.groupFeatures, children: [
|
|
5592
|
+
r && /* @__PURE__ */ Z(
|
|
5585
5593
|
"button",
|
|
5586
5594
|
{
|
|
5587
5595
|
type: "button",
|
|
@@ -5596,7 +5604,7 @@ function Ic() {
|
|
|
5596
5604
|
]
|
|
5597
5605
|
}
|
|
5598
5606
|
),
|
|
5599
|
-
/* @__PURE__ */
|
|
5607
|
+
/* @__PURE__ */ Z(
|
|
5600
5608
|
"button",
|
|
5601
5609
|
{
|
|
5602
5610
|
type: "button",
|
|
@@ -5611,7 +5619,7 @@ function Ic() {
|
|
|
5611
5619
|
]
|
|
5612
5620
|
}
|
|
5613
5621
|
),
|
|
5614
|
-
n && /* @__PURE__ */
|
|
5622
|
+
n && /* @__PURE__ */ Z(
|
|
5615
5623
|
"button",
|
|
5616
5624
|
{
|
|
5617
5625
|
type: "button",
|
|
@@ -5628,7 +5636,7 @@ function Ic() {
|
|
|
5628
5636
|
}
|
|
5629
5637
|
)
|
|
5630
5638
|
] }),
|
|
5631
|
-
/* @__PURE__ */
|
|
5639
|
+
/* @__PURE__ */ Z("div", { className: Le.groupNav, children: [
|
|
5632
5640
|
/* @__PURE__ */ x(xa, {}),
|
|
5633
5641
|
/* @__PURE__ */ x(Cn, {})
|
|
5634
5642
|
] })
|
|
@@ -5638,7 +5646,7 @@ function Ic() {
|
|
|
5638
5646
|
}
|
|
5639
5647
|
);
|
|
5640
5648
|
}
|
|
5641
|
-
const Cc =
|
|
5649
|
+
const Cc = D.memo(Ic);
|
|
5642
5650
|
function Tc(e) {
|
|
5643
5651
|
return ot({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M262.29 192.31a64 64 0 1 0 57.4 57.4 64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22 155.3 155.3 0 0 1-21.46-12.57 16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22 155.3 155.3 0 0 1 21.46 12.57 16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z" }, child: [] }] })(e);
|
|
5644
5652
|
}
|
|
@@ -5651,12 +5659,12 @@ const kc = "_host_v5qx1_3", Rc = "_topbar_v5qx1_11", _c = "_visible_v5qx1_32", M
|
|
|
5651
5659
|
settingsBtn: Oc
|
|
5652
5660
|
};
|
|
5653
5661
|
function Pc() {
|
|
5654
|
-
const e = Y((a) => a.showOverlays), t = Y((a) => a.overlayCompactMode), n = j((a) => a.onViewerClose), o = j((a) => a.section).ast.title, i = Y((a) => a.setSettingsOpen), s = Y((a) => a.setShowOverlays), c =
|
|
5662
|
+
const e = Y((a) => a.showOverlays), t = Y((a) => a.overlayCompactMode), n = j((a) => a.onViewerClose), o = j((a) => a.section).ast.title, i = Y((a) => a.setSettingsOpen), s = Y((a) => a.setShowOverlays), c = Q(() => {
|
|
5655
5663
|
n == null || n();
|
|
5656
|
-
}, [n]), l =
|
|
5664
|
+
}, [n]), l = Q(() => {
|
|
5657
5665
|
i(!0), s(!1);
|
|
5658
5666
|
}, [i, s]);
|
|
5659
|
-
return /* @__PURE__ */ x("div", { className: At.host, children: /* @__PURE__ */
|
|
5667
|
+
return /* @__PURE__ */ x("div", { className: At.host, children: /* @__PURE__ */ Z("div", { className: `${At.topbar} ${e && !t ? At.visible : ""}`, children: [
|
|
5660
5668
|
/* @__PURE__ */ x("button", { type: "button", className: At.backBtn, onClick: c, "aria-label": "뒤로가기", children: /* @__PURE__ */ x(Ea, { size: 28 }) }),
|
|
5661
5669
|
/* @__PURE__ */ x("div", { className: At.title, children: /* @__PURE__ */ x("span", { className: "truncate", children: o || "섹션 없음" }) }),
|
|
5662
5670
|
/* @__PURE__ */ x(
|
|
@@ -5671,7 +5679,7 @@ function Pc() {
|
|
|
5671
5679
|
)
|
|
5672
5680
|
] }) });
|
|
5673
5681
|
}
|
|
5674
|
-
const Bc =
|
|
5682
|
+
const Bc = D.memo(Pc), zc = "_wrap_62su0_7", Ac = "_wrapHidden_62su0_29", Lc = "_wrapVisible_62su0_35", Gc = "_scrollArea_62su0_71", Hc = "_row_62su0_81", Nc = "_label_62su0_89", Fc = "_btn_62su0_95", Dc = "_btnActive_62su0_106", Wc = "_btnSmall_62su0_110", $c = "_pill_62su0_122", Vc = "_themeCircle_62su0_133", qc = "_themeCircleActive_62su0_146", jc = "_stepRow_62su0_151", Uc = "_stepLabel_62su0_159", Kc = "_levelBox_62su0_172", Xc = "_inlineFlex_62su0_177", ze = {
|
|
5675
5683
|
wrap: zc,
|
|
5676
5684
|
wrapHidden: Ac,
|
|
5677
5685
|
wrapVisible: Lc,
|
|
@@ -5690,22 +5698,22 @@ const Bc = F.memo(Pc), zc = "_wrap_62su0_7", Ac = "_wrapHidden_62su0_29", Lc = "
|
|
|
5690
5698
|
inlineFlex: Xc
|
|
5691
5699
|
};
|
|
5692
5700
|
function Yc({ visible: e }) {
|
|
5693
|
-
const t = Y((h) => h.mode), n = Y((h) => h.setMode), r = Y((h) => h.theme), o = Y((h) => h.setTheme), i = Y((h) => h.fontFamily), s = Y((h) => h.setFontFamily), c = Y((h) => h.resetToDefaults), l = Y((h) => h.getFontLevel()), a = Y((h) => h.getLineLevel()), d = Y((h) => h.getMarginLevel()), m = Y((h) => h.setFontLevel), p = Y((h) => h.setLineLevel), b = Y((h) => h.setMarginLevel), v = Y((h) => h.pointerStyle), y = Y((h) => h.setPointerStyle), u = Y((h) => h.pointerColor), f = Y((h) => h.setPointerColor), g = Y((h) => h.breakMarks),
|
|
5694
|
-
return /* @__PURE__ */
|
|
5695
|
-
/* @__PURE__ */
|
|
5696
|
-
/* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */
|
|
5701
|
+
const t = Y((h) => h.mode), n = Y((h) => h.setMode), r = Y((h) => h.theme), o = Y((h) => h.setTheme), i = Y((h) => h.fontFamily), s = Y((h) => h.setFontFamily), c = Y((h) => h.resetToDefaults), l = Y((h) => h.getFontLevel()), a = Y((h) => h.getLineLevel()), d = Y((h) => h.getMarginLevel()), m = Y((h) => h.setFontLevel), p = Y((h) => h.setLineLevel), b = Y((h) => h.setMarginLevel), v = Y((h) => h.pointerStyle), y = Y((h) => h.setPointerStyle), u = Y((h) => h.pointerColor), f = Y((h) => h.setPointerColor), g = Y((h) => h.breakMarks), C = Y((h) => h.toggleBreakMark), k = Y((h) => h.getBreakGapLevel()), R = Y((h) => h.setBreakGapLevel), I = `${ze.wrap} ${e ? ze.wrapVisible : ze.wrapHidden}`;
|
|
5702
|
+
return /* @__PURE__ */ Z("div", { className: I, role: "dialog", "aria-modal": "true", "aria-label": "뷰어 설정", children: [
|
|
5703
|
+
/* @__PURE__ */ Z("div", { className: ze.scrollArea, children: [
|
|
5704
|
+
/* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */ Z("div", { className: ze.inlineFlex, children: [
|
|
5697
5705
|
/* @__PURE__ */ x(Lt, { active: t === "page", onClick: () => n("page"), children: "페이지" }),
|
|
5698
5706
|
/* @__PURE__ */ x(Lt, { active: t === "scroll", onClick: () => n("scroll"), children: "스크롤" })
|
|
5699
5707
|
] }) }),
|
|
5700
5708
|
/* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: Object.keys(bn).map((h) => {
|
|
5701
|
-
const S = h,
|
|
5709
|
+
const S = h, T = bn[S];
|
|
5702
5710
|
return /* @__PURE__ */ x(
|
|
5703
5711
|
"button",
|
|
5704
5712
|
{
|
|
5705
5713
|
type: "button",
|
|
5706
5714
|
onClick: () => o(S),
|
|
5707
5715
|
className: `${ze.themeCircle} ${r === h ? ze.themeCircleActive : ""}`,
|
|
5708
|
-
style: { background:
|
|
5716
|
+
style: { background: T.bg, color: T.fg, fontFamily: i },
|
|
5709
5717
|
title: String(h),
|
|
5710
5718
|
"aria-label": `테마: ${String(h)}`,
|
|
5711
5719
|
children: "A"
|
|
@@ -5756,7 +5764,7 @@ function Yc({ visible: e }) {
|
|
|
5756
5764
|
onInc: () => b(Math.min(5, d + 1))
|
|
5757
5765
|
}
|
|
5758
5766
|
),
|
|
5759
|
-
/* @__PURE__ */ x(jt, { label: "포인터", children: /* @__PURE__ */
|
|
5767
|
+
/* @__PURE__ */ x(jt, { label: "포인터", children: /* @__PURE__ */ Z("div", { className: ze.inlineFlex, children: [
|
|
5760
5768
|
/* @__PURE__ */ x(Lt, { active: v === "highlight", onClick: () => y("highlight"), children: "형광펜" }),
|
|
5761
5769
|
/* @__PURE__ */ x(Lt, { active: v === "underline", onClick: () => y("underline"), children: "밑줄" }),
|
|
5762
5770
|
/* @__PURE__ */ x(
|
|
@@ -5776,7 +5784,7 @@ function Yc({ visible: e }) {
|
|
|
5776
5784
|
}
|
|
5777
5785
|
)
|
|
5778
5786
|
] }) }),
|
|
5779
|
-
/* @__PURE__ */ x(jt, { label: "끊기표시", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: /* @__PURE__ */ x(Lt, { active: g.slash, onClick: () =>
|
|
5787
|
+
/* @__PURE__ */ x(jt, { label: "끊기표시", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: /* @__PURE__ */ x(Lt, { active: g.slash, onClick: () => C("slash"), children: "슬래쉬" }) }) }),
|
|
5780
5788
|
/* @__PURE__ */ x(
|
|
5781
5789
|
pn,
|
|
5782
5790
|
{
|
|
@@ -5793,7 +5801,7 @@ function Yc({ visible: e }) {
|
|
|
5793
5801
|
] });
|
|
5794
5802
|
}
|
|
5795
5803
|
function jt({ label: e, children: t }) {
|
|
5796
|
-
return /* @__PURE__ */
|
|
5804
|
+
return /* @__PURE__ */ Z("div", { className: ze.row, children: [
|
|
5797
5805
|
/* @__PURE__ */ x("label", { className: ze.label, children: e }),
|
|
5798
5806
|
t
|
|
5799
5807
|
] });
|
|
@@ -5824,9 +5832,9 @@ function pn({
|
|
|
5824
5832
|
onInc: i
|
|
5825
5833
|
}) {
|
|
5826
5834
|
const s = t <= n, c = t >= r;
|
|
5827
|
-
return /* @__PURE__ */
|
|
5835
|
+
return /* @__PURE__ */ Z("div", { className: ze.stepRow, children: [
|
|
5828
5836
|
/* @__PURE__ */ x("label", { className: ze.stepLabel, children: e }),
|
|
5829
|
-
/* @__PURE__ */
|
|
5837
|
+
/* @__PURE__ */ Z("div", { className: ze.inlineFlex, children: [
|
|
5830
5838
|
/* @__PURE__ */ x(
|
|
5831
5839
|
"button",
|
|
5832
5840
|
{
|
|
@@ -5853,9 +5861,9 @@ function pn({
|
|
|
5853
5861
|
] })
|
|
5854
5862
|
] });
|
|
5855
5863
|
}
|
|
5856
|
-
const Qc =
|
|
5864
|
+
const Qc = D.memo(function() {
|
|
5857
5865
|
const t = Y((s) => s.showOverlays), n = Y((s) => s.isSettingsOpen), r = j((s) => s.rangeStartGI), o = j((s) => s.rangeEndGI);
|
|
5858
|
-
return r != null && o != null ? null : /* @__PURE__ */
|
|
5866
|
+
return r != null && o != null ? null : /* @__PURE__ */ Z(
|
|
5859
5867
|
"div",
|
|
5860
5868
|
{
|
|
5861
5869
|
"aria-hidden": !0,
|
|
@@ -6015,11 +6023,11 @@ function ru(e) {
|
|
|
6015
6023
|
status: "playing",
|
|
6016
6024
|
scrollLock: !0
|
|
6017
6025
|
};
|
|
6018
|
-
const g = typeof y == "number" ? y : f.currentClip,
|
|
6026
|
+
const g = typeof y == "number" ? y : f.currentClip, C = typeof u == "number" ? u : f.currentTimeMs;
|
|
6019
6027
|
return {
|
|
6020
6028
|
status: "loading",
|
|
6021
6029
|
currentClip: Math.max(0, Math.min(g, Math.max(0, f.clips.length - 1))),
|
|
6022
|
-
currentTimeMs:
|
|
6030
|
+
currentTimeMs: C,
|
|
6023
6031
|
scrollLock: !0
|
|
6024
6032
|
};
|
|
6025
6033
|
});
|
|
@@ -6064,10 +6072,10 @@ function ru(e) {
|
|
|
6064
6072
|
if (!n) return -1;
|
|
6065
6073
|
const f = n.byClip[y];
|
|
6066
6074
|
if (!f || f.length === 0) return -1;
|
|
6067
|
-
let g = 0,
|
|
6068
|
-
for (; g <=
|
|
6069
|
-
const R = g +
|
|
6070
|
-
f[R].t <= u ? (k = R, g = R + 1) :
|
|
6075
|
+
let g = 0, C = f.length - 1, k = 0;
|
|
6076
|
+
for (; g <= C; ) {
|
|
6077
|
+
const R = g + C >> 1;
|
|
6078
|
+
f[R].t <= u ? (k = R, g = R + 1) : C = R - 1;
|
|
6071
6079
|
}
|
|
6072
6080
|
return f[Math.max(0, Math.min(k, f.length - 1))].g;
|
|
6073
6081
|
},
|
|
@@ -6079,8 +6087,8 @@ function ru(e) {
|
|
|
6079
6087
|
let f = u[y];
|
|
6080
6088
|
if (!f) {
|
|
6081
6089
|
let g = y - 1;
|
|
6082
|
-
const
|
|
6083
|
-
for (; g >=
|
|
6090
|
+
const C = Math.max(0, y - 100);
|
|
6091
|
+
for (; g >= C; ) {
|
|
6084
6092
|
if (u[g]) {
|
|
6085
6093
|
f = u[g];
|
|
6086
6094
|
break;
|
|
@@ -6170,9 +6178,9 @@ function lu(e) {
|
|
|
6170
6178
|
}
|
|
6171
6179
|
const y = ra(b, p).map((f) => {
|
|
6172
6180
|
var R;
|
|
6173
|
-
const g = f.startG - p,
|
|
6181
|
+
const g = f.startG - p, C = f.endG - f.startG + 1;
|
|
6174
6182
|
let k = -1;
|
|
6175
|
-
for (let I = 0; I <
|
|
6183
|
+
for (let I = 0; I < C; I++) {
|
|
6176
6184
|
const h = ((R = b[g + I]) == null ? void 0 : R.text) ?? "";
|
|
6177
6185
|
if (mr(h)) {
|
|
6178
6186
|
k = f.startG + I;
|
|
@@ -6183,7 +6191,7 @@ function lu(e) {
|
|
|
6183
6191
|
startG: f.startG,
|
|
6184
6192
|
endG: f.endG,
|
|
6185
6193
|
r0: g,
|
|
6186
|
-
len:
|
|
6194
|
+
len: C,
|
|
6187
6195
|
firstReadableGI: k,
|
|
6188
6196
|
splitIndex: f.splitIndex
|
|
6189
6197
|
};
|
|
@@ -6191,8 +6199,8 @@ function lu(e) {
|
|
|
6191
6199
|
c[m] = y;
|
|
6192
6200
|
for (const f of y) {
|
|
6193
6201
|
const g = s.length;
|
|
6194
|
-
for (let
|
|
6195
|
-
o[
|
|
6202
|
+
for (let C = f.startG; C <= f.endG; C++)
|
|
6203
|
+
o[C] = g;
|
|
6196
6204
|
s.push(f);
|
|
6197
6205
|
}
|
|
6198
6206
|
}), { nav: {
|
|
@@ -6261,32 +6269,32 @@ function cu(e) {
|
|
|
6261
6269
|
b((B) => B.progress._scrollApi === M ? B : { progress: { ...B.progress, _scrollApi: M } });
|
|
6262
6270
|
}, u = () => v().progress._scrollApi, f = (M) => {
|
|
6263
6271
|
b((B) => {
|
|
6264
|
-
const
|
|
6265
|
-
if (
|
|
6266
|
-
const V =
|
|
6272
|
+
const F = B.progress;
|
|
6273
|
+
if (F.totalRuns === M) return B;
|
|
6274
|
+
const V = F.currentGlobalRunIndex < 0 && M > 0;
|
|
6267
6275
|
return {
|
|
6268
6276
|
progress: {
|
|
6269
|
-
...
|
|
6277
|
+
...F,
|
|
6270
6278
|
totalRuns: M,
|
|
6271
|
-
currentGlobalRunIndex: V ? 0 :
|
|
6272
|
-
lastUpdateBy: V ? "program" :
|
|
6279
|
+
currentGlobalRunIndex: V ? 0 : F.currentGlobalRunIndex,
|
|
6280
|
+
lastUpdateBy: V ? "program" : F.lastUpdateBy
|
|
6273
6281
|
}
|
|
6274
6282
|
};
|
|
6275
6283
|
});
|
|
6276
6284
|
}, g = (M, B = "program") => {
|
|
6277
|
-
const
|
|
6278
|
-
|
|
6285
|
+
const F = v().progress.currentGlobalRunIndex, V = v().progress, q = V.totalRuns > 0 ? Math.max(-1, Math.min(M, V.totalRuns - 1)) : M;
|
|
6286
|
+
F === q && V.lastUpdateBy === B || (b((ue) => ({
|
|
6279
6287
|
progress: {
|
|
6280
6288
|
...ue.progress,
|
|
6281
6289
|
currentGlobalRunIndex: q,
|
|
6282
6290
|
lastUpdateBy: B
|
|
6283
6291
|
}
|
|
6284
|
-
})),
|
|
6292
|
+
})), F !== q && c && c.getState().emit({
|
|
6285
6293
|
type: "global_index_change",
|
|
6286
6294
|
payload: { globalIndex: q }
|
|
6287
6295
|
}));
|
|
6288
|
-
},
|
|
6289
|
-
const { sectionLoading: B, _loadingStartTime:
|
|
6296
|
+
}, C = (M) => {
|
|
6297
|
+
const { sectionLoading: B, _loadingStartTime: F } = v().progress;
|
|
6290
6298
|
if (B === M) return;
|
|
6291
6299
|
const V = Date.now();
|
|
6292
6300
|
if (M)
|
|
@@ -6298,7 +6306,7 @@ function cu(e) {
|
|
|
6298
6306
|
}
|
|
6299
6307
|
})), c && c.getState().emit({ type: "loading_start", payload: {} });
|
|
6300
6308
|
else {
|
|
6301
|
-
const ue = (
|
|
6309
|
+
const ue = (F ? V - F : 0) / 1e3;
|
|
6302
6310
|
b((de) => ({
|
|
6303
6311
|
progress: {
|
|
6304
6312
|
...de.progress,
|
|
@@ -6335,17 +6343,17 @@ function cu(e) {
|
|
|
6335
6343
|
}
|
|
6336
6344
|
})), c && c.getState().emit({ type: "range_clear", payload: {} });
|
|
6337
6345
|
}, h = (M) => {
|
|
6338
|
-
const { rangeStartGI: B, rangeEndGI:
|
|
6339
|
-
B == null ||
|
|
6346
|
+
const { rangeStartGI: B, rangeEndGI: F } = v().progress;
|
|
6347
|
+
B == null || F == null || (M < B ? b((V) => ({
|
|
6340
6348
|
progress: { ...V.progress, rangeStartGI: M }
|
|
6341
|
-
})) : M >
|
|
6349
|
+
})) : M > F ? b((V) => ({
|
|
6342
6350
|
progress: { ...V.progress, rangeEndGI: M }
|
|
6343
6351
|
})) : I());
|
|
6344
6352
|
}, S = () => {
|
|
6345
6353
|
var ke;
|
|
6346
|
-
const { rangeStartGI: M, rangeEndGI: B, section:
|
|
6354
|
+
const { rangeStartGI: M, rangeEndGI: B, section: F, layout: V } = v().progress;
|
|
6347
6355
|
if (M == null || B == null || !V) return "";
|
|
6348
|
-
const q = ((ke =
|
|
6356
|
+
const q = ((ke = F.ast) == null ? void 0 : ke.blocks) ?? [], ue = V.prefix, de = [];
|
|
6349
6357
|
for (let Re = 0; Re < q.length; Re++) {
|
|
6350
6358
|
const ee = q[Re];
|
|
6351
6359
|
if (ee.type !== "paragraph") continue;
|
|
@@ -6356,8 +6364,8 @@ function cu(e) {
|
|
|
6356
6364
|
}
|
|
6357
6365
|
}
|
|
6358
6366
|
return de.join("");
|
|
6359
|
-
},
|
|
6360
|
-
const { totalRuns: B, derivedNav:
|
|
6367
|
+
}, T = (M) => {
|
|
6368
|
+
const { totalRuns: B, derivedNav: F } = v().progress, V = F == null ? void 0 : F.readableGi;
|
|
6361
6369
|
if (!V || B <= 0) return M;
|
|
6362
6370
|
const q = B, ue = Math.max(0, Math.min(M, q - 1));
|
|
6363
6371
|
if (V[ue]) return ue;
|
|
@@ -6369,17 +6377,17 @@ function cu(e) {
|
|
|
6369
6377
|
}
|
|
6370
6378
|
return ue;
|
|
6371
6379
|
}, E = (M, B) => {
|
|
6372
|
-
const { totalRuns:
|
|
6373
|
-
if (!q ||
|
|
6380
|
+
const { totalRuns: F, derivedNav: V } = v().progress, q = V == null ? void 0 : V.readableGi;
|
|
6381
|
+
if (!q || F <= 0) return null;
|
|
6374
6382
|
if (B > 0) {
|
|
6375
|
-
for (let ue = Math.min(Math.max(M, 0),
|
|
6383
|
+
for (let ue = Math.min(Math.max(M, 0), F - 1); ue < F; ue += 1)
|
|
6376
6384
|
if (q[ue]) return ue;
|
|
6377
6385
|
} else
|
|
6378
|
-
for (let ue = Math.min(Math.max(M, 0),
|
|
6386
|
+
for (let ue = Math.min(Math.max(M, 0), F - 1); ue >= 0; ue -= 1)
|
|
6379
6387
|
if (q[ue]) return ue;
|
|
6380
6388
|
return null;
|
|
6381
6389
|
}, O = (M) => {
|
|
6382
|
-
const { totalRuns: B, derivedNav:
|
|
6390
|
+
const { totalRuns: B, derivedNav: F } = v().progress, V = F == null ? void 0 : F.readableGi;
|
|
6383
6391
|
if (!V || B <= 0) return null;
|
|
6384
6392
|
if (M > 0) {
|
|
6385
6393
|
for (let q = B - 1; q >= 0; q -= 1) if (V[q]) return q;
|
|
@@ -6394,7 +6402,7 @@ function cu(e) {
|
|
|
6394
6402
|
getSectionScrollApi: u,
|
|
6395
6403
|
setTotalRuns: f,
|
|
6396
6404
|
setCurrentGlobalRunIndex: g,
|
|
6397
|
-
setSectionLoading:
|
|
6405
|
+
setSectionLoading: C,
|
|
6398
6406
|
setPageIndex: k,
|
|
6399
6407
|
// Range Selection API
|
|
6400
6408
|
setRange: R,
|
|
@@ -6402,17 +6410,17 @@ function cu(e) {
|
|
|
6402
6410
|
extendRange: h,
|
|
6403
6411
|
getRangeText: S,
|
|
6404
6412
|
// 네비 API
|
|
6405
|
-
snapToReadable:
|
|
6413
|
+
snapToReadable: T,
|
|
6406
6414
|
nextReadableFrom: E,
|
|
6407
6415
|
edgeReadable: O,
|
|
6408
6416
|
hasReadableInDir: (M, B) => E(M + (B > 0 ? 1 : -1), B) != null,
|
|
6409
6417
|
computeStepTarget: (M, B) => {
|
|
6410
|
-
const { totalRuns:
|
|
6411
|
-
if (!
|
|
6418
|
+
const { totalRuns: F, derivedNav: V } = v().progress;
|
|
6419
|
+
if (!F || F <= 0) return M;
|
|
6412
6420
|
const q = (V == null ? void 0 : V.groups) ?? [], ue = V == null ? void 0 : V.giToGroupIdx;
|
|
6413
6421
|
if (!q.length || !ue) {
|
|
6414
|
-
const A =
|
|
6415
|
-
return
|
|
6422
|
+
const A = F - 1;
|
|
6423
|
+
return T(Math.max(0, Math.min(M + B, A)));
|
|
6416
6424
|
}
|
|
6417
6425
|
let de = ue[M] ?? -1;
|
|
6418
6426
|
if (de < 0 || de >= q.length)
|
|
@@ -6424,15 +6432,15 @@ function cu(e) {
|
|
|
6424
6432
|
}
|
|
6425
6433
|
}
|
|
6426
6434
|
if (de < 0 || de >= q.length)
|
|
6427
|
-
return O(B) ??
|
|
6435
|
+
return O(B) ?? T(M);
|
|
6428
6436
|
const ke = (X) => X >= 0 && X < q.length && (q[X].firstReadableGI ?? -1) >= 0;
|
|
6429
6437
|
let Re = de + B;
|
|
6430
6438
|
for (; Re >= 0 && Re < q.length && !ke(Re); )
|
|
6431
6439
|
Re += B;
|
|
6432
6440
|
if (Re < 0 || Re >= q.length)
|
|
6433
|
-
return O(B) ??
|
|
6441
|
+
return O(B) ?? T(M + B);
|
|
6434
6442
|
const ee = q[Re].firstReadableGI;
|
|
6435
|
-
return ee >= 0 ? ee :
|
|
6443
|
+
return ee >= 0 ? ee : T(M + B);
|
|
6436
6444
|
},
|
|
6437
6445
|
giToPercentTotal: (M) => {
|
|
6438
6446
|
const B = v().progress.totalRuns;
|
|
@@ -6441,7 +6449,7 @@ function cu(e) {
|
|
|
6441
6449
|
percentToGITotal: (M) => {
|
|
6442
6450
|
const B = v().progress.totalRuns;
|
|
6443
6451
|
if (!B || B <= 1) return 0;
|
|
6444
|
-
const
|
|
6452
|
+
const F = Math.max(0, Math.min(M, 100)), V = Math.round(F / 100 * (B - 1));
|
|
6445
6453
|
return Math.max(0, Math.min(V, B - 1));
|
|
6446
6454
|
}
|
|
6447
6455
|
}
|
|
@@ -6475,50 +6483,50 @@ const fu = ({
|
|
|
6475
6483
|
var g;
|
|
6476
6484
|
return ((g = r.ast) == null ? void 0 : g.blocks) ?? [];
|
|
6477
6485
|
}, [r]), i = Y((g) => g.marginX), s = Y((g) => g.lineHeight), c = Y((g) => g.fontSizePx), l = Y((g) => g.fontFamily), a = Y((g) => g.viewportHeight), d = j((g) => {
|
|
6478
|
-
var
|
|
6479
|
-
return ((
|
|
6486
|
+
var C;
|
|
6487
|
+
return ((C = g.layout) == null ? void 0 : C.prefix) ?? [];
|
|
6480
6488
|
}), m = j((g) => {
|
|
6481
|
-
var
|
|
6482
|
-
return ((
|
|
6489
|
+
var C;
|
|
6490
|
+
return ((C = g.derivedNav) == null ? void 0 : C.splitGroupsPerBlock) ?? [];
|
|
6483
6491
|
}), p = e[t], b = ve(() => {
|
|
6484
6492
|
const g = [];
|
|
6485
|
-
return o.forEach((
|
|
6486
|
-
(
|
|
6493
|
+
return o.forEach((C, k) => {
|
|
6494
|
+
(C.type === "paragraph" || C.type === "image") && g.push(k);
|
|
6487
6495
|
}), g;
|
|
6488
6496
|
}, [o]), v = ve(() => {
|
|
6489
6497
|
if (!p) return [];
|
|
6490
6498
|
const g = [];
|
|
6491
|
-
for (let
|
|
6492
|
-
const k = b[
|
|
6499
|
+
for (let C = p.startBlock; C <= p.endBlock; C++) {
|
|
6500
|
+
const k = b[C];
|
|
6493
6501
|
k != null && g.push(k);
|
|
6494
6502
|
}
|
|
6495
6503
|
return g;
|
|
6496
6504
|
}, [p, b]), y = ve(() => {
|
|
6497
6505
|
const g = [];
|
|
6498
|
-
for (const
|
|
6499
|
-
const k = o[
|
|
6500
|
-
(k == null ? void 0 : k.type) === "paragraph" && g.push({ b: k, originalBlockIndex:
|
|
6506
|
+
for (const C of v) {
|
|
6507
|
+
const k = o[C];
|
|
6508
|
+
(k == null ? void 0 : k.type) === "paragraph" && g.push({ b: k, originalBlockIndex: C });
|
|
6501
6509
|
}
|
|
6502
6510
|
return g;
|
|
6503
6511
|
}, [v, o]), u = ve(() => {
|
|
6504
|
-
const g = [],
|
|
6512
|
+
const g = [], C = Or();
|
|
6505
6513
|
return y.forEach((k, R) => {
|
|
6506
|
-
g[R] = Pr(k.b,
|
|
6514
|
+
g[R] = Pr(k.b, C);
|
|
6507
6515
|
}), g;
|
|
6508
|
-
}, [y]), f = (g,
|
|
6516
|
+
}, [y]), f = (g, C, k) => {
|
|
6509
6517
|
if (!g || g.length === 0) return [];
|
|
6510
6518
|
const R = [];
|
|
6511
6519
|
for (const I of g) {
|
|
6512
6520
|
const h = I.startG, S = I.endG;
|
|
6513
|
-
if (S <
|
|
6514
|
-
const
|
|
6521
|
+
if (S < C || h > k) continue;
|
|
6522
|
+
const T = Math.max(h, C), E = Math.min(S, k), O = T - h | 0, z = Math.max(0, E - T + 1);
|
|
6515
6523
|
if (z <= 0) continue;
|
|
6516
|
-
const
|
|
6524
|
+
const w = (I.r0 ?? 0) + O;
|
|
6517
6525
|
R.push({
|
|
6518
6526
|
...I,
|
|
6519
|
-
startG:
|
|
6527
|
+
startG: T,
|
|
6520
6528
|
endG: E,
|
|
6521
|
-
r0:
|
|
6529
|
+
r0: w,
|
|
6522
6530
|
len: z
|
|
6523
6531
|
});
|
|
6524
6532
|
}
|
|
@@ -6540,7 +6548,7 @@ const fu = ({
|
|
|
6540
6548
|
lineHeight: s,
|
|
6541
6549
|
boxSizing: "border-box"
|
|
6542
6550
|
},
|
|
6543
|
-
children: /* @__PURE__ */
|
|
6551
|
+
children: /* @__PURE__ */ Z(
|
|
6544
6552
|
"div",
|
|
6545
6553
|
{
|
|
6546
6554
|
style: {
|
|
@@ -6557,9 +6565,9 @@ const fu = ({
|
|
|
6557
6565
|
},
|
|
6558
6566
|
children: [
|
|
6559
6567
|
/* @__PURE__ */ x("div", { style: { height: 40 } }),
|
|
6560
|
-
/* @__PURE__ */ x("div", { style: { flex: 1, overflow: "hidden" }, children: v.map((g,
|
|
6568
|
+
/* @__PURE__ */ x("div", { style: { flex: 1, overflow: "hidden" }, children: v.map((g, C) => {
|
|
6561
6569
|
var X;
|
|
6562
|
-
const k = o[g], R =
|
|
6570
|
+
const k = o[g], R = C === 0, I = C === v.length - 1, h = {
|
|
6563
6571
|
boxSizing: "border-box",
|
|
6564
6572
|
paddingRight: `${i}px`,
|
|
6565
6573
|
paddingLeft: `${i}px`,
|
|
@@ -6572,7 +6580,7 @@ const fu = ({
|
|
|
6572
6580
|
}, S = `sec-${r.section_id}/blk-${k.id ?? g}`;
|
|
6573
6581
|
if (k.type === "image") {
|
|
6574
6582
|
const { src: A, alt: K, width: ne, height: N } = k, oe = ne && N ? `${ne} / ${N}` : "4 / 3", $ = a > 80 ? Math.floor((a - 80) * 0.6) : void 0;
|
|
6575
|
-
return /* @__PURE__ */ x("div", { style: h, children: /* @__PURE__ */
|
|
6583
|
+
return /* @__PURE__ */ x("div", { style: h, children: /* @__PURE__ */ Z(
|
|
6576
6584
|
"div",
|
|
6577
6585
|
{
|
|
6578
6586
|
style: {
|
|
@@ -6614,39 +6622,39 @@ const fu = ({
|
|
|
6614
6622
|
}
|
|
6615
6623
|
) }, S);
|
|
6616
6624
|
}
|
|
6617
|
-
const
|
|
6625
|
+
const T = k, E = y.findIndex(
|
|
6618
6626
|
(A) => A.originalBlockIndex === g
|
|
6619
|
-
), O = E >= 0 ? u[E] : void 0, z =
|
|
6620
|
-
let _ = 0, P = Math.max(0,
|
|
6627
|
+
), O = E >= 0 ? u[E] : void 0, z = T.runs ?? [], w = z.length;
|
|
6628
|
+
let _ = 0, P = Math.max(0, w - 1);
|
|
6621
6629
|
R && p.startOffsetInBlock != null && (_ = Math.min(Math.max(0, p.startOffsetInBlock), P)), I && p.endOffsetInBlock != null && (P = Math.max(
|
|
6622
6630
|
_,
|
|
6623
6631
|
Math.min(p.endOffsetInBlock, P)
|
|
6624
6632
|
));
|
|
6625
|
-
const G = _ > 0, M = d[g] ?? 0, B = m[g] ?? [],
|
|
6626
|
-
let q = f(B,
|
|
6633
|
+
const G = _ > 0, M = d[g] ?? 0, B = m[g] ?? [], F = M + _, V = M + P;
|
|
6634
|
+
let q = f(B, F, V);
|
|
6627
6635
|
const ue = M + _;
|
|
6628
6636
|
q = q.map((A) => {
|
|
6629
|
-
const K = Math.max(0, (A.startG ??
|
|
6637
|
+
const K = Math.max(0, (A.startG ?? F) - ue), ne = A.len ?? Math.max(1, (A.endG ?? V) - (A.startG ?? F) + 1);
|
|
6630
6638
|
return {
|
|
6631
6639
|
...A,
|
|
6632
6640
|
r0: K,
|
|
6633
6641
|
len: ne
|
|
6634
6642
|
};
|
|
6635
6643
|
});
|
|
6636
|
-
const de = _ <= P ? z.slice(_, P + 1) : [], ke =
|
|
6637
|
-
return /* @__PURE__ */ x("div", { style: h, children: /* @__PURE__ */
|
|
6644
|
+
const de = _ <= P ? z.slice(_, P + 1) : [], ke = T.list ? T.list.level * 24 : 0, Re = ((X = T.list) == null ? void 0 : X.kind) === "bullet" ? T.list.glyph ?? "•" : void 0, ee = G ? void 0 : O ?? Re;
|
|
6645
|
+
return /* @__PURE__ */ x("div", { style: h, children: /* @__PURE__ */ Z(
|
|
6638
6646
|
"p",
|
|
6639
6647
|
{
|
|
6640
6648
|
style: {
|
|
6641
6649
|
width: "100%",
|
|
6642
6650
|
margin: "8px 0",
|
|
6643
6651
|
paddingLeft: ke,
|
|
6644
|
-
textAlign:
|
|
6652
|
+
textAlign: T.textAlign,
|
|
6645
6653
|
whiteSpace: "pre-wrap",
|
|
6646
6654
|
boxSizing: "border-box"
|
|
6647
6655
|
},
|
|
6648
6656
|
children: [
|
|
6649
|
-
|
|
6657
|
+
T.list && ee ? /* @__PURE__ */ x(
|
|
6650
6658
|
"span",
|
|
6651
6659
|
{
|
|
6652
6660
|
"aria-hidden": !0,
|
|
@@ -6751,7 +6759,7 @@ function hu(e) {
|
|
|
6751
6759
|
}, a)), u.current.lastTapT = P);
|
|
6752
6760
|
},
|
|
6753
6761
|
[i, d, o, r, a]
|
|
6754
|
-
),
|
|
6762
|
+
), C = Ye.useCallback(
|
|
6755
6763
|
(_, P) => {
|
|
6756
6764
|
const G = Math.abs(_) / Math.max(1, P);
|
|
6757
6765
|
Math.abs(_) >= v || G >= l ? _ < 0 ? n() : t() : p == null || p();
|
|
@@ -6769,7 +6777,7 @@ function hu(e) {
|
|
|
6769
6777
|
), R = Ye.useCallback(
|
|
6770
6778
|
(_) => {
|
|
6771
6779
|
if (u.current.touchId == null) return;
|
|
6772
|
-
const P = Array.from(_.touches).find((
|
|
6780
|
+
const P = Array.from(_.touches).find((F) => F.identifier === u.current.touchId);
|
|
6773
6781
|
if (!P) return;
|
|
6774
6782
|
const G = P.clientX - u.current.startX, M = Math.abs(G), B = Math.abs(P.clientY - u.current.startY);
|
|
6775
6783
|
if (!u.current.swiping)
|
|
@@ -6783,12 +6791,12 @@ function hu(e) {
|
|
|
6783
6791
|
), I = Ye.useCallback(
|
|
6784
6792
|
(_) => {
|
|
6785
6793
|
if (u.current.touchId == null) return;
|
|
6786
|
-
const P = Array.from(_.changedTouches).find((
|
|
6794
|
+
const P = Array.from(_.changedTouches).find((F) => F.identifier === u.current.touchId);
|
|
6787
6795
|
if (!P) return;
|
|
6788
6796
|
const G = P.clientX - u.current.startX, M = P.clientY - u.current.startY, B = _.timeStamp - u.current.startT;
|
|
6789
|
-
u.current.swiping ?
|
|
6797
|
+
u.current.swiping ? C(G, B) : Math.abs(G) < 10 && Math.abs(M) < 10 && g(_.target), u.current.suppressClick = !0, u.current.touchId = null, u.current.swiping = !1;
|
|
6790
6798
|
},
|
|
6791
|
-
[
|
|
6799
|
+
[C, g]
|
|
6792
6800
|
), h = Ye.useCallback(() => {
|
|
6793
6801
|
u.current.swiping && (p == null || p()), u.current.touchId = null, u.current.swiping = !1;
|
|
6794
6802
|
}, [p]), S = Ye.useCallback(
|
|
@@ -6798,7 +6806,7 @@ function hu(e) {
|
|
|
6798
6806
|
P != null && P(_.target) || (u.current.mouseDown = !0, u.current.mouseSwiping = !1, u.current.mStartX = _.clientX, u.current.mStartY = _.clientY, u.current.mStartT = _.timeStamp, u.current.suppressClick = !1, u.current.capturedEl = _.currentTarget);
|
|
6799
6807
|
},
|
|
6800
6808
|
[s, i]
|
|
6801
|
-
),
|
|
6809
|
+
), T = Ye.useCallback(
|
|
6802
6810
|
(_) => {
|
|
6803
6811
|
if (_.pointerType === "touch" || !u.current.mouseDown) return;
|
|
6804
6812
|
const P = _.clientX - u.current.mStartX, G = Math.abs(P), M = Math.abs(_.clientY - u.current.mStartY);
|
|
@@ -6823,7 +6831,7 @@ function hu(e) {
|
|
|
6823
6831
|
if (_.pointerType === "touch" || !u.current.mouseDown) return;
|
|
6824
6832
|
if (u.current.mouseSwiping) {
|
|
6825
6833
|
const M = _.clientX - u.current.mStartX, B = _.timeStamp - u.current.mStartT;
|
|
6826
|
-
|
|
6834
|
+
C(M, B), document.body.style.userSelect = u.current.prevUserSelect;
|
|
6827
6835
|
}
|
|
6828
6836
|
const P = u.current.capturedEl;
|
|
6829
6837
|
if ((G = P == null ? void 0 : P.hasPointerCapture) != null && G.call(P, _.pointerId))
|
|
@@ -6833,7 +6841,7 @@ function hu(e) {
|
|
|
6833
6841
|
}
|
|
6834
6842
|
u.current.mouseDown = !1, u.current.mouseSwiping = !1, u.current.capturedEl = null;
|
|
6835
6843
|
},
|
|
6836
|
-
[
|
|
6844
|
+
[C]
|
|
6837
6845
|
), O = Ye.useCallback(
|
|
6838
6846
|
(_) => {
|
|
6839
6847
|
_.pointerType !== "touch" && (u.current.mouseSwiping && (p == null || p(), document.body.style.userSelect = u.current.prevUserSelect), u.current.mouseDown = !1, u.current.mouseSwiping = !1, u.current.capturedEl = null);
|
|
@@ -6841,7 +6849,7 @@ function hu(e) {
|
|
|
6841
6849
|
[p]
|
|
6842
6850
|
), z = Ye.useCallback(() => {
|
|
6843
6851
|
u.current.mouseSwiping && (p == null || p(), document.body.style.userSelect = u.current.prevUserSelect), u.current.mouseDown = !1, u.current.mouseSwiping = !1, u.current.capturedEl = null;
|
|
6844
|
-
}, [p]),
|
|
6852
|
+
}, [p]), w = Ye.useCallback(
|
|
6845
6853
|
(_) => {
|
|
6846
6854
|
if (u.current.suppressClick) {
|
|
6847
6855
|
u.current.suppressClick = !1;
|
|
@@ -6864,12 +6872,12 @@ function hu(e) {
|
|
|
6864
6872
|
onTouchCancel: h,
|
|
6865
6873
|
// mouse
|
|
6866
6874
|
onPointerDown: S,
|
|
6867
|
-
onPointerMove:
|
|
6875
|
+
onPointerMove: T,
|
|
6868
6876
|
onPointerUp: E,
|
|
6869
6877
|
onPointerCancel: O,
|
|
6870
6878
|
onLostPointerCapture: z,
|
|
6871
6879
|
// click (mouse only)
|
|
6872
|
-
onClick:
|
|
6880
|
+
onClick: w
|
|
6873
6881
|
};
|
|
6874
6882
|
}
|
|
6875
6883
|
var jn, Co;
|
|
@@ -7018,43 +7026,43 @@ function Tu() {
|
|
|
7018
7026
|
Go = 1;
|
|
7019
7027
|
var e = Ai(), t = mu(), n = Cu(), r = "Expected a function", o = Math.max, i = Math.min;
|
|
7020
7028
|
function s(c, l, a) {
|
|
7021
|
-
var d, m, p, b, v, y, u = 0, f = !1, g = !1,
|
|
7029
|
+
var d, m, p, b, v, y, u = 0, f = !1, g = !1, C = !0;
|
|
7022
7030
|
if (typeof c != "function")
|
|
7023
7031
|
throw new TypeError(r);
|
|
7024
|
-
l = n(l) || 0, e(a) && (f = !!a.leading, g = "maxWait" in a, p = g ? o(n(a.maxWait) || 0, l) : p,
|
|
7025
|
-
function k(
|
|
7032
|
+
l = n(l) || 0, e(a) && (f = !!a.leading, g = "maxWait" in a, p = g ? o(n(a.maxWait) || 0, l) : p, C = "trailing" in a ? !!a.trailing : C);
|
|
7033
|
+
function k(w) {
|
|
7026
7034
|
var _ = d, P = m;
|
|
7027
|
-
return d = m = void 0, u =
|
|
7035
|
+
return d = m = void 0, u = w, b = c.apply(P, _), b;
|
|
7028
7036
|
}
|
|
7029
|
-
function R(
|
|
7030
|
-
return u =
|
|
7037
|
+
function R(w) {
|
|
7038
|
+
return u = w, v = setTimeout(S, l), f ? k(w) : b;
|
|
7031
7039
|
}
|
|
7032
|
-
function I(
|
|
7033
|
-
var _ =
|
|
7040
|
+
function I(w) {
|
|
7041
|
+
var _ = w - y, P = w - u, G = l - _;
|
|
7034
7042
|
return g ? i(G, p - P) : G;
|
|
7035
7043
|
}
|
|
7036
|
-
function h(
|
|
7037
|
-
var _ =
|
|
7044
|
+
function h(w) {
|
|
7045
|
+
var _ = w - y, P = w - u;
|
|
7038
7046
|
return y === void 0 || _ >= l || _ < 0 || g && P >= p;
|
|
7039
7047
|
}
|
|
7040
7048
|
function S() {
|
|
7041
|
-
var
|
|
7042
|
-
if (h(
|
|
7043
|
-
return w
|
|
7044
|
-
v = setTimeout(S, I(
|
|
7049
|
+
var w = t();
|
|
7050
|
+
if (h(w))
|
|
7051
|
+
return T(w);
|
|
7052
|
+
v = setTimeout(S, I(w));
|
|
7045
7053
|
}
|
|
7046
|
-
function w
|
|
7047
|
-
return v = void 0,
|
|
7054
|
+
function T(w) {
|
|
7055
|
+
return v = void 0, C && d ? k(w) : (d = m = void 0, b);
|
|
7048
7056
|
}
|
|
7049
7057
|
function E() {
|
|
7050
7058
|
v !== void 0 && clearTimeout(v), u = 0, d = y = m = v = void 0;
|
|
7051
7059
|
}
|
|
7052
7060
|
function O() {
|
|
7053
|
-
return v === void 0 ? b :
|
|
7061
|
+
return v === void 0 ? b : T(t());
|
|
7054
7062
|
}
|
|
7055
7063
|
function z() {
|
|
7056
|
-
var
|
|
7057
|
-
if (d = arguments, m = this, y =
|
|
7064
|
+
var w = t(), _ = h(w);
|
|
7065
|
+
if (d = arguments, m = this, y = w, _) {
|
|
7058
7066
|
if (v === void 0)
|
|
7059
7067
|
return R(y);
|
|
7060
7068
|
if (g)
|
|
@@ -7140,7 +7148,7 @@ async function Ou({
|
|
|
7140
7148
|
viewportHeight: v = 0,
|
|
7141
7149
|
instanceId: y = "default"
|
|
7142
7150
|
}) {
|
|
7143
|
-
var f, g,
|
|
7151
|
+
var f, g, C;
|
|
7144
7152
|
const u = Mu(y);
|
|
7145
7153
|
at(u, y);
|
|
7146
7154
|
try {
|
|
@@ -7154,7 +7162,7 @@ async function Ou({
|
|
|
7154
7162
|
b.toFixed(4),
|
|
7155
7163
|
k ? "(scaled, applying inverse)" : "(no scale)"
|
|
7156
7164
|
), console.log("[calcPages] viewWidth:", I), console.log("[calcPages] pageBoxWidth:", h), console.log("[calcPages] maxPageHeight:", S), console.log("[calcPages] contentArea rect:", n.getBoundingClientRect()), console.log("[calcPages] measureRoot rect:", t.getBoundingClientRect());
|
|
7157
|
-
const
|
|
7165
|
+
const T = 1.5, E = (N, oe) => oe + N <= S - T, O = getComputedStyle(e), z = {
|
|
7158
7166
|
letterSpacing: O.letterSpacing,
|
|
7159
7167
|
wordSpacing: O.wordSpacing,
|
|
7160
7168
|
fontKerning: O.fontKerning || "normal",
|
|
@@ -7164,7 +7172,7 @@ async function Ou({
|
|
|
7164
7172
|
wordBreak: O.wordBreak || "keep-all",
|
|
7165
7173
|
overflowWrap: O.overflowWrap || O.wordWrap || "break-word",
|
|
7166
7174
|
hyphens: O.hyphens || "manual"
|
|
7167
|
-
},
|
|
7175
|
+
}, w = (N) => {
|
|
7168
7176
|
N.style.letterSpacing = z.letterSpacing || "", N.style.wordSpacing = z.wordSpacing || "", N.style.fontKerning = z.fontKerning || "", N.style.fontVariantLigatures = z.fontVariantLigatures || "", N.style.textTransform = z.textTransform || "", N.style.direction = z.direction || "", N.style.wordBreak = z.wordBreak || "", N.style.wordWrap = z.overflowWrap || "", N.style.overflowWrap = z.overflowWrap || "", N.style.hyphens = z.hyphens || "";
|
|
7169
7177
|
}, _ = h, P = Math.max(0, _ - 2 * (i || 0));
|
|
7170
7178
|
n.innerHTML = "";
|
|
@@ -7172,9 +7180,9 @@ async function Ou({
|
|
|
7172
7180
|
G.style.boxSizing = "border-box", G.style.width = `${_}px`, G.style.maxWidth = `${_}px`, G.style.margin = "0 auto", G.style.display = "flex", n.appendChild(G);
|
|
7173
7181
|
const M = document.createElement("div");
|
|
7174
7182
|
M.style.boxSizing = "border-box", M.style.paddingRight = `${i}px`, M.style.paddingLeft = `${i}px`, M.style.width = `${_}px`, M.style.maxWidth = `${_}px`, M.style.margin = "0 auto", M.style.display = "flex", M.style.justifyContent = "center", M.style.height = "auto", G.appendChild(M);
|
|
7175
|
-
const B = /* @__PURE__ */ new Map(),
|
|
7183
|
+
const B = /* @__PURE__ */ new Map(), F = {}, V = Eu(u, y, r.length), q = (N, oe) => {
|
|
7176
7184
|
const $ = document.createElement("p");
|
|
7177
|
-
return $.style.margin = "8px 0", $.style.paddingLeft = oe ? `${oe}px` : "0", $.style.textAlign = N.textAlign ?? "start", $.style.whiteSpace = "pre-wrap", $.style.lineHeight = String(l), $.style.fontSize = `${c}px`, $.style.boxSizing = "border-box", $.style.fontFamily = s ?? "", $.style.width = "100%",
|
|
7185
|
+
return $.style.margin = "8px 0", $.style.paddingLeft = oe ? `${oe}px` : "0", $.style.textAlign = N.textAlign ?? "start", $.style.whiteSpace = "pre-wrap", $.style.lineHeight = String(l), $.style.fontSize = `${c}px`, $.style.boxSizing = "border-box", $.style.fontFamily = s ?? "", $.style.width = "100%", w($), $;
|
|
7178
7186
|
}, ue = (N, oe) => {
|
|
7179
7187
|
const $ = oe ?? [], J = document.createDocumentFragment();
|
|
7180
7188
|
for (let se = 0; se < $.length; se++) {
|
|
@@ -7202,7 +7210,7 @@ async function Ou({
|
|
|
7202
7210
|
const se = document.createElement("div");
|
|
7203
7211
|
if (se.style.position = "absolute", se.style.inset = "0", se.style.width = "100%", se.style.height = "100%", J.appendChild(se), $.appendChild(J), N != null && N.alt) {
|
|
7204
7212
|
const re = document.createElement("div");
|
|
7205
|
-
re.style.fontSize = "12px", re.style.color = "#6B7280", re.style.marginTop = "4px", re.textContent = String(N.alt),
|
|
7213
|
+
re.style.fontSize = "12px", re.style.color = "#6B7280", re.style.marginTop = "4px", re.textContent = String(N.alt), w(re), $.appendChild(re);
|
|
7206
7214
|
}
|
|
7207
7215
|
return $;
|
|
7208
7216
|
};
|
|
@@ -7213,7 +7221,7 @@ async function Ou({
|
|
|
7213
7221
|
const Te = oe.block, Oe = ke(Te);
|
|
7214
7222
|
M.appendChild(Oe);
|
|
7215
7223
|
const Ne = Oe.getBoundingClientRect(), { mt: Ae, mb: $e } = sr(Oe);
|
|
7216
|
-
|
|
7224
|
+
F[N] = { contentH: Math.ceil(Ne.height), mt: Ae, mb: $e }, await V(24);
|
|
7217
7225
|
continue;
|
|
7218
7226
|
}
|
|
7219
7227
|
const $ = oe.block, J = $.list ? ($.list.level ?? 0) * 24 : 0, se = oe.paraIndex ?? 0, re = p[se] ?? (((f = $.list) == null ? void 0 : f.kind) === "bullet" ? ((g = $.list) == null ? void 0 : g.glyph) ?? "•" : void 0);
|
|
@@ -7232,7 +7240,7 @@ async function Ou({
|
|
|
7232
7240
|
}
|
|
7233
7241
|
const le = M.querySelector('p[data-variant="with"]'), we = M.querySelector('p[data-variant="no"]'), me = we ?? le;
|
|
7234
7242
|
if (le && me) {
|
|
7235
|
-
const Te = Ho(le), Oe = Ho(me), { mt: Ne, mb: Ae } = sr(le), { mt: $e, mb: dt } = sr(me), Xe = ((
|
|
7243
|
+
const Te = Ho(le), Oe = Ho(me), { mt: Ne, mb: Ae } = sr(le), { mt: $e, mb: dt } = sr(me), Xe = ((C = $.runs) == null ? void 0 : C.length) ?? 0, Ge = we ? Oe : Te, it = we ? $e : Ne, et = we ? dt : Ae;
|
|
7236
7244
|
if (N < 3) {
|
|
7237
7245
|
const bt = le.getBoundingClientRect().height;
|
|
7238
7246
|
console.log(
|
|
@@ -7266,7 +7274,7 @@ async function Ou({
|
|
|
7266
7274
|
let se = -1, re;
|
|
7267
7275
|
for (; X < r.length; ) {
|
|
7268
7276
|
if (at(u, y), r[X].kind === "image") {
|
|
7269
|
-
const Ge =
|
|
7277
|
+
const Ge = F[X] ?? { contentH: 0, mt: 0, mb: 0 }, et = (oe === 0 ? Ge.mt : $ + Ge.mt) + Ge.contentH;
|
|
7270
7278
|
if (E(et, oe)) {
|
|
7271
7279
|
oe += et, se = X, re = void 0, $ = Ge.mb, X += 1, A = void 0, K = null, ne = null;
|
|
7272
7280
|
continue;
|
|
@@ -7405,10 +7413,10 @@ function Lu() {
|
|
|
7405
7413
|
W[Ct] = Pr(De.block, He);
|
|
7406
7414
|
}
|
|
7407
7415
|
}), W;
|
|
7408
|
-
}, [u]), [g,
|
|
7416
|
+
}, [u]), [g, C] = tt({
|
|
7409
7417
|
pages: [],
|
|
7410
7418
|
pageByRunIndex: null
|
|
7411
|
-
}), k = j((W) => W.pageIndex), R = j((W) => W.setPageIndex), I = ie(0), h = ie(null), [S,
|
|
7419
|
+
}), k = j((W) => W.pageIndex), R = j((W) => W.setPageIndex), I = ie(0), h = ie(null), [S, T] = tt(!1), [E, O] = tt(null), [z, w] = tt(!1), _ = ve(
|
|
7412
7420
|
() => ({
|
|
7413
7421
|
flex: 1,
|
|
7414
7422
|
fontFamily: a,
|
|
@@ -7446,11 +7454,11 @@ function Lu() {
|
|
|
7446
7454
|
await vt(), await vt(), await vt(), await vt(), console.log("recalc종료"), W(!1);
|
|
7447
7455
|
})());
|
|
7448
7456
|
}, [g, B]);
|
|
7449
|
-
const
|
|
7457
|
+
const F = Q(() => {
|
|
7450
7458
|
console.log("@@@@@@recalc호출");
|
|
7451
7459
|
const W = y.current, He = le.current, De = we.current;
|
|
7452
7460
|
if (console.log("showSplit", P), !W || !He || !De || u.length === 0) {
|
|
7453
|
-
|
|
7461
|
+
C({ pages: [], pageByRunIndex: null }), R(0);
|
|
7454
7462
|
return;
|
|
7455
7463
|
}
|
|
7456
7464
|
(async () => {
|
|
@@ -7476,7 +7484,7 @@ function Lu() {
|
|
|
7476
7484
|
}), $i = performance.now();
|
|
7477
7485
|
console.log(
|
|
7478
7486
|
`✅ calcPages 완료: ${($i - Ct).toFixed(1)} ms (${Bt.length} pages)`
|
|
7479
|
-
),
|
|
7487
|
+
), C({ pages: Bt, pageByRunIndex: Wi }), R(0);
|
|
7480
7488
|
} catch (st) {
|
|
7481
7489
|
if (st instanceof Fi) {
|
|
7482
7490
|
console.log("이젠실행 취소 들어옴!");
|
|
@@ -7503,7 +7511,7 @@ function Lu() {
|
|
|
7503
7511
|
]), V = j((W) => W.setCurrentGlobalRunIndex), q = j((W) => {
|
|
7504
7512
|
var He;
|
|
7505
7513
|
return ((He = W.layout) == null ? void 0 : He.prefix) ?? [];
|
|
7506
|
-
}), ue = _e((W) => W.syncToGI), de =
|
|
7514
|
+
}), ue = _e((W) => W.syncToGI), de = Q(
|
|
7507
7515
|
(W) => {
|
|
7508
7516
|
const He = g.pages.length + 1, De = k + W;
|
|
7509
7517
|
if (De < 0 || De >= He) return;
|
|
@@ -7521,47 +7529,47 @@ function Lu() {
|
|
|
7521
7529
|
st != null ? (V(st, "scrubber-step"), ue(st)) : R(De);
|
|
7522
7530
|
},
|
|
7523
7531
|
[k, g.pages, u, q, V, R, ue]
|
|
7524
|
-
), ke =
|
|
7525
|
-
S || I.current !== 0 ? (O("prev"),
|
|
7526
|
-
}, [S, de]), Re =
|
|
7527
|
-
S || I.current !== 0 ? (O("next"),
|
|
7528
|
-
}, [S, de]), ee = kn(), X =
|
|
7532
|
+
), ke = Q(() => {
|
|
7533
|
+
S || I.current !== 0 ? (O("prev"), T(!1)) : de(-1);
|
|
7534
|
+
}, [S, de]), Re = Q(() => {
|
|
7535
|
+
S || I.current !== 0 ? (O("next"), T(!1)) : de(1);
|
|
7536
|
+
}, [S, de]), ee = kn(), X = Q(() => {
|
|
7529
7537
|
const { isSettingsOpen: W, setSettingsOpen: He, toggleOverlays: De } = ee.getState();
|
|
7530
7538
|
W ? He(!1) : De();
|
|
7531
|
-
}, [ee]), A = g.pages.length + 1, K = ((zr = y.current) == null ? void 0 : zr.clientWidth) || 400, ne =
|
|
7539
|
+
}, [ee]), A = g.pages.length + 1, K = ((zr = y.current) == null ? void 0 : zr.clientWidth) || 400, ne = Q((W) => {
|
|
7532
7540
|
var st;
|
|
7533
7541
|
const He = h.current;
|
|
7534
7542
|
if (!He) return;
|
|
7535
7543
|
const De = ((st = y.current) == null ? void 0 : st.clientWidth) || 1, Ct = W / De * 33.333;
|
|
7536
7544
|
He.style.transform = `translate3d(${-33.333 + Ct}%, 0, 0)`;
|
|
7537
|
-
}, []), N =
|
|
7545
|
+
}, []), N = Q(
|
|
7538
7546
|
(W) => {
|
|
7539
|
-
k === 0 && W > 0 || k >= A - 1 && W < 0 || (I.current = W, ne(W), S ||
|
|
7547
|
+
k === 0 && W > 0 || k >= A - 1 && W < 0 || (I.current = W, ne(W), S || T(!0));
|
|
7540
7548
|
},
|
|
7541
7549
|
[k, A, ne, S]
|
|
7542
|
-
), oe =
|
|
7543
|
-
I.current = 0,
|
|
7550
|
+
), oe = Q(() => {
|
|
7551
|
+
I.current = 0, T(!1);
|
|
7544
7552
|
const W = h.current;
|
|
7545
7553
|
W && (W.style.transition = "transform 250ms ease-out", W.style.transform = "translate3d(-33.333%, 0, 0)");
|
|
7546
|
-
}, []), $ =
|
|
7554
|
+
}, []), $ = Q(
|
|
7547
7555
|
(W) => {
|
|
7548
7556
|
if (W.target !== W.currentTarget || W.propertyName !== "transform") return;
|
|
7549
7557
|
const He = E;
|
|
7550
|
-
|
|
7558
|
+
w(!0), O(null), I.current = 0, He === "prev" ? de(-1) : He === "next" && de(1);
|
|
7551
7559
|
},
|
|
7552
7560
|
[E, de]
|
|
7553
7561
|
);
|
|
7554
7562
|
Tt(() => {
|
|
7555
7563
|
z && requestAnimationFrame(() => {
|
|
7556
7564
|
requestAnimationFrame(() => {
|
|
7557
|
-
|
|
7565
|
+
w(!1);
|
|
7558
7566
|
});
|
|
7559
7567
|
});
|
|
7560
7568
|
}, [z]);
|
|
7561
|
-
const J = yn(), se =
|
|
7569
|
+
const J = yn(), se = Q(
|
|
7562
7570
|
(W) => i || zu(W) ? !0 : Bu(W),
|
|
7563
7571
|
[i]
|
|
7564
|
-
), re =
|
|
7572
|
+
), re = Q(
|
|
7565
7573
|
(W) => J.getState().status === "playing" ? !0 : se(W),
|
|
7566
7574
|
[J, se]
|
|
7567
7575
|
), pe = hu({
|
|
@@ -7579,7 +7587,7 @@ function Lu() {
|
|
|
7579
7587
|
onDragMove: N,
|
|
7580
7588
|
onDragEnd: oe,
|
|
7581
7589
|
pageTransitionThreshold: K * 0.5
|
|
7582
|
-
}), le = ie(null), we = ie(null), me =
|
|
7590
|
+
}), le = ie(null), we = ie(null), me = Q(() => {
|
|
7583
7591
|
const W = B.getState().progress.setSectionLoading;
|
|
7584
7592
|
W(!0);
|
|
7585
7593
|
}, [B]), Te = ve(
|
|
@@ -7589,14 +7597,14 @@ function Lu() {
|
|
|
7589
7597
|
maxWait: 1e3
|
|
7590
7598
|
}),
|
|
7591
7599
|
[]
|
|
7592
|
-
), Oe = _u(
|
|
7600
|
+
), Oe = _u(F, 200, me, Te), Ne = ie("");
|
|
7593
7601
|
Se(() => {
|
|
7594
7602
|
if (b <= 0) return;
|
|
7595
7603
|
const W = `${a}|${d}|${m}|${p}|${P}|${G}|${M}|${b}|${t == null ? void 0 : t.section_id}`;
|
|
7596
|
-
Ne.current !== W && (Ne.current = W, console.log("debounceRecalc 취소"), Oe.cancel(), me(),
|
|
7604
|
+
Ne.current !== W && (Ne.current = W, console.log("debounceRecalc 취소"), Oe.cancel(), me(), F());
|
|
7597
7605
|
}, [
|
|
7598
7606
|
Oe,
|
|
7599
|
-
|
|
7607
|
+
F,
|
|
7600
7608
|
me,
|
|
7601
7609
|
a,
|
|
7602
7610
|
d,
|
|
@@ -7622,7 +7630,7 @@ function Lu() {
|
|
|
7622
7630
|
// 페이지 이동 구현
|
|
7623
7631
|
stepPage: de
|
|
7624
7632
|
}), () => Ae(void 0)), [Ae, de]);
|
|
7625
|
-
const $e = t.quizzes && t.quizzes.length > 0, dt = g.pages.length > 0 && k === g.pages.length, Xe = k > 0 ? k - 1 : null, Ge = k < A - 1 ? k + 1 : null, it = ve(() => E === "prev" ? "translate3d(0%, 0, 0)" : E === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [E]), et = (W) => n ? null : W === g.pages.length ? /* @__PURE__ */
|
|
7633
|
+
const $e = t.quizzes && t.quizzes.length > 0, dt = g.pages.length > 0 && k === g.pages.length, Xe = k > 0 ? k - 1 : null, Ge = k < A - 1 ? k + 1 : null, it = ve(() => E === "prev" ? "translate3d(0%, 0, 0)" : E === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [E]), et = (W) => n ? null : W === g.pages.length ? /* @__PURE__ */ Z(
|
|
7626
7634
|
"div",
|
|
7627
7635
|
{
|
|
7628
7636
|
style: {
|
|
@@ -7651,8 +7659,8 @@ function Lu() {
|
|
|
7651
7659
|
backfaceVisibility: "hidden",
|
|
7652
7660
|
WebkitBackfaceVisibility: "hidden"
|
|
7653
7661
|
}, Vt = !z && (!S || E !== null);
|
|
7654
|
-
return console.log("여기리랜더"), /* @__PURE__ */
|
|
7655
|
-
/* @__PURE__ */
|
|
7662
|
+
return console.log("여기리랜더"), /* @__PURE__ */ Z("div", { ref: y, style: { ..._, touchAction: "none" }, ...pe, children: [
|
|
7663
|
+
/* @__PURE__ */ Z(
|
|
7656
7664
|
"div",
|
|
7657
7665
|
{
|
|
7658
7666
|
ref: h,
|
|
@@ -7704,7 +7712,7 @@ function Lu() {
|
|
|
7704
7712
|
pointerEvents: "none",
|
|
7705
7713
|
background: "pink"
|
|
7706
7714
|
},
|
|
7707
|
-
children: /* @__PURE__ */
|
|
7715
|
+
children: /* @__PURE__ */ Z(
|
|
7708
7716
|
"div",
|
|
7709
7717
|
{
|
|
7710
7718
|
style: {
|
|
@@ -7755,7 +7763,7 @@ const Gu = ({ pages: e, items: t, onGotoPage: n, currentPageIndex: r, isOnExtraP
|
|
|
7755
7763
|
const i = j((a) => a.currentGlobalRunIndex), s = j((a) => a.lastUpdateBy), c = j((a) => {
|
|
7756
7764
|
var d;
|
|
7757
7765
|
return ((d = a.layout) == null ? void 0 : d.prefix) ?? [];
|
|
7758
|
-
}), l =
|
|
7766
|
+
}), l = D.useRef(null);
|
|
7759
7767
|
return Se(() => {
|
|
7760
7768
|
if (i == null || e.length === 0 || o && !(s === "scrubber-live" || s === "scrubber-commit") || l.current === i) return;
|
|
7761
7769
|
l.current = i;
|
|
@@ -7837,10 +7845,10 @@ const vd = Dt(function() {
|
|
|
7837
7845
|
}, [t, c, p]);
|
|
7838
7846
|
const b = t === "doing" ? n[r[o]] : void 0, v = t === "doing" && b ? i[b.qid] ?? [] : [], y = ve(() => {
|
|
7839
7847
|
if (t === "idle" || t !== "finished") return;
|
|
7840
|
-
const u = r.map((M) => n[M]), f = u.length, g = u.reduce((M, B) => M + (B.score ?? 0), 0),
|
|
7841
|
-
const
|
|
7842
|
-
return M + (
|
|
7843
|
-
}, 0), k = u.map((M) => m[M.qid]).filter((M) => !!M), R = typeof a == "number" && typeof d == "number" ? Math.max(0, d - a) : k.reduce((M, B) => M + (B.ms ?? 0), 0), I = f > 0 ? Math.round(R / f) : 0, h = [...k].sort((M, B) => M.ms - B.ms), S = h[0],
|
|
7848
|
+
const u = r.map((M) => n[M]), f = u.length, g = u.reduce((M, B) => M + (B.score ?? 0), 0), C = u.reduce((M, B) => {
|
|
7849
|
+
const F = m[B.qid];
|
|
7850
|
+
return M + (F != null && F.isCorrect ? B.score ?? 0 : 0);
|
|
7851
|
+
}, 0), k = u.map((M) => m[M.qid]).filter((M) => !!M), R = typeof a == "number" && typeof d == "number" ? Math.max(0, d - a) : k.reduce((M, B) => M + (B.ms ?? 0), 0), I = f > 0 ? Math.round(R / f) : 0, h = [...k].sort((M, B) => M.ms - B.ms), S = h[0], T = h[h.length - 1], E = k.filter((M) => !M.multi), O = k.filter((M) => M.multi), z = E.filter((M) => M.isCorrect).length, w = O.filter((M) => M.isCorrect).length, _ = k.filter((M) => M.timedOut).length, P = k.filter((M) => M.revealed).length, G = k.filter((M) => !M.isCorrect).sort((M, B) => B.ms - M.ms).slice(0, 3);
|
|
7844
7852
|
return {
|
|
7845
7853
|
total: f,
|
|
7846
7854
|
correct: s,
|
|
@@ -7848,11 +7856,11 @@ const vd = Dt(function() {
|
|
|
7848
7856
|
timeMsTotal: R,
|
|
7849
7857
|
avgMs: I,
|
|
7850
7858
|
totalScore: g,
|
|
7851
|
-
gainedScore:
|
|
7859
|
+
gainedScore: C,
|
|
7852
7860
|
fastest: S,
|
|
7853
|
-
slowest:
|
|
7861
|
+
slowest: T,
|
|
7854
7862
|
singles: { total: E.length, correct: z },
|
|
7855
|
-
multis: { total: O.length, correct:
|
|
7863
|
+
multis: { total: O.length, correct: w },
|
|
7856
7864
|
timedOut: _,
|
|
7857
7865
|
revealed: P,
|
|
7858
7866
|
wrongTop3: G
|
|
@@ -7911,8 +7919,8 @@ function Sd(e) {
|
|
|
7911
7919
|
for (let f = 0; f < u.length; f++) if (u[f] !== v[f]) return !1;
|
|
7912
7920
|
return !0;
|
|
7913
7921
|
}, [o, v]);
|
|
7914
|
-
return /* @__PURE__ */
|
|
7915
|
-
/* @__PURE__ */
|
|
7922
|
+
return /* @__PURE__ */ Z("div", { className: he.Body, children: [
|
|
7923
|
+
/* @__PURE__ */ Z("div", { className: he.Header, children: [
|
|
7916
7924
|
/* @__PURE__ */ x("div", { className: he.Paging, children: `Quiz (${n + 1}/${r})` }),
|
|
7917
7925
|
/* @__PURE__ */ x("button", { type: "button", onClick: d, className: he.CloseBtn, children: "X" })
|
|
7918
7926
|
] }),
|
|
@@ -7928,10 +7936,10 @@ function Sd(e) {
|
|
|
7928
7936
|
),
|
|
7929
7937
|
/* @__PURE__ */ x("div", { className: he.Image, children: b && /* @__PURE__ */ x("img", { src: b, alt: "" }) }),
|
|
7930
7938
|
/* @__PURE__ */ x("div", { className: he.Options, children: p.map(({ opt: u, i: f }) => {
|
|
7931
|
-
const g = o.includes(f),
|
|
7939
|
+
const g = o.includes(f), C = v.includes(f), k = [
|
|
7932
7940
|
he.OptionBtn,
|
|
7933
7941
|
g ? he.OptionBtnActive : "",
|
|
7934
|
-
i &&
|
|
7942
|
+
i && C ? he.OptionBtnCorrect : ""
|
|
7935
7943
|
].filter(Boolean).join(" ");
|
|
7936
7944
|
return /* @__PURE__ */ x(
|
|
7937
7945
|
"button",
|
|
@@ -7945,7 +7953,7 @@ function Sd(e) {
|
|
|
7945
7953
|
f
|
|
7946
7954
|
);
|
|
7947
7955
|
}) }),
|
|
7948
|
-
/* @__PURE__ */ x("div", { className: he.Footer, children: i ? /* @__PURE__ */ x("button", { type: "button", onClick: l, className: he.NextBtn, children: n + 1 >= r ? "Complete" : "Next Quiz" }) : /* @__PURE__ */
|
|
7956
|
+
/* @__PURE__ */ x("div", { className: he.Footer, children: i ? /* @__PURE__ */ x("button", { type: "button", onClick: l, className: he.NextBtn, children: n + 1 >= r ? "Complete" : "Next Quiz" }) : /* @__PURE__ */ Z("button", { type: "button", onClick: c, className: `${he.NextBtn}`, children: [
|
|
7949
7957
|
"Submit",
|
|
7950
7958
|
typeof a == "number" && /* @__PURE__ */ x("span", { className: `${he.Remaining} ${a <= 5 ? he.RemainingDanger : ""}`, children: ` (${a} s )` })
|
|
7951
7959
|
] }) })
|
|
@@ -7956,28 +7964,28 @@ function Do(e) {
|
|
|
7956
7964
|
}
|
|
7957
7965
|
function yd(e) {
|
|
7958
7966
|
const { total: t, correct: n, summary: r, onClose: o } = e, i = (r == null ? void 0 : r.rate) ?? (t > 0 ? Math.round(n / t * 100) : 0);
|
|
7959
|
-
return /* @__PURE__ */
|
|
7967
|
+
return /* @__PURE__ */ Z("div", { className: he.Body, children: [
|
|
7960
7968
|
/* @__PURE__ */ x("div", { className: he.ResultHeader, children: "결과 요약" }),
|
|
7961
|
-
/* @__PURE__ */
|
|
7962
|
-
/* @__PURE__ */
|
|
7969
|
+
/* @__PURE__ */ Z("div", { className: he.SummaryGrid, role: "list", children: [
|
|
7970
|
+
/* @__PURE__ */ Z("div", { className: he.StatCard, role: "listitem", children: [
|
|
7963
7971
|
/* @__PURE__ */ x("div", { className: he.StatLabel, children: "정답률" }),
|
|
7964
|
-
/* @__PURE__ */
|
|
7972
|
+
/* @__PURE__ */ Z("div", { className: he.StatValue, children: [
|
|
7965
7973
|
i,
|
|
7966
7974
|
"%"
|
|
7967
7975
|
] }),
|
|
7968
7976
|
/* @__PURE__ */ x("div", { className: he.StatSub, children: `정답수 ${n}/문제수${t}` })
|
|
7969
7977
|
] }),
|
|
7970
|
-
/* @__PURE__ */
|
|
7978
|
+
/* @__PURE__ */ Z("div", { className: he.StatCard, role: "listitem", children: [
|
|
7971
7979
|
/* @__PURE__ */ x("div", { className: he.StatLabel, children: "총 점수" }),
|
|
7972
7980
|
/* @__PURE__ */ x("div", { className: he.StatValue, children: r ? `${r.gainedScore}/${r.totalScore}` : "-" }),
|
|
7973
7981
|
/* @__PURE__ */ x("div", { className: he.StatSub, children: "획득점수/최대점수" })
|
|
7974
7982
|
] }),
|
|
7975
|
-
/* @__PURE__ */
|
|
7983
|
+
/* @__PURE__ */ Z("div", { className: he.StatCard, role: "listitem", children: [
|
|
7976
7984
|
/* @__PURE__ */ x("div", { className: he.StatLabel, children: "총 소요 시간" }),
|
|
7977
7985
|
/* @__PURE__ */ x("div", { className: he.StatValue, children: Do(r == null ? void 0 : r.timeMsTotal) }),
|
|
7978
7986
|
/* @__PURE__ */ x("div", { className: he.StatSub, children: `평균 ${Do(r == null ? void 0 : r.avgMs)}` })
|
|
7979
7987
|
] }),
|
|
7980
|
-
/* @__PURE__ */
|
|
7988
|
+
/* @__PURE__ */ Z("div", { className: he.StatCard, role: "listitem", children: [
|
|
7981
7989
|
/* @__PURE__ */ x("div", { className: he.StatLabel, children: "타입오버 퀴즈수" }),
|
|
7982
7990
|
/* @__PURE__ */ x("div", { className: he.StatValue, children: r ? `${r.timedOut}` : "-" }),
|
|
7983
7991
|
/* @__PURE__ */ x("div", { className: he.StatSub, children: "timeout" })
|
|
@@ -8225,7 +8233,7 @@ function Cd({ children: e, initialState: t }) {
|
|
|
8225
8233
|
}).length, f = v.reduce((I, h) => I + (h.score ?? 0), 0), g = v.reduce((I, h) => {
|
|
8226
8234
|
const S = m[h.qid];
|
|
8227
8235
|
return I + (S != null && S.isCorrect ? h.score ?? 0 : 0);
|
|
8228
|
-
}, 0),
|
|
8236
|
+
}, 0), C = typeof p == "number" && typeof b == "number" ? Math.max(0, b - p) : 0, k = v.map((I) => {
|
|
8229
8237
|
const h = m[I.qid];
|
|
8230
8238
|
return {
|
|
8231
8239
|
qid: I.qid,
|
|
@@ -8245,7 +8253,7 @@ function Cd({ children: e, initialState: t }) {
|
|
|
8245
8253
|
rate: y > 0 ? Math.round(u / y * 100) : 0,
|
|
8246
8254
|
totalScore: f,
|
|
8247
8255
|
gainedScore: g,
|
|
8248
|
-
timeMsTotal:
|
|
8256
|
+
timeMsTotal: C,
|
|
8249
8257
|
perQuestion: k
|
|
8250
8258
|
};
|
|
8251
8259
|
c(R);
|
|
@@ -8314,7 +8322,7 @@ function Td({ containerRef: e }) {
|
|
|
8314
8322
|
}, [t, n]), null;
|
|
8315
8323
|
}
|
|
8316
8324
|
function kd() {
|
|
8317
|
-
const e = Et(), t = kn(), n = Rt(), r = Ue(Uo), o = Ue(On), i =
|
|
8325
|
+
const e = Et(), t = kn(), n = Rt(), r = Ue(Uo), o = Ue(On), i = Q(
|
|
8318
8326
|
(l) => {
|
|
8319
8327
|
const { viewerState: a } = l;
|
|
8320
8328
|
if (a) {
|
|
@@ -8346,7 +8354,7 @@ function kd() {
|
|
|
8346
8354
|
}
|
|
8347
8355
|
},
|
|
8348
8356
|
[t, n]
|
|
8349
|
-
), s =
|
|
8357
|
+
), s = Q(() => {
|
|
8350
8358
|
var v, y, u;
|
|
8351
8359
|
const l = t.getState(), a = n.getState().progress, d = (v = a.getSectionScrollApi) == null ? void 0 : v.call(a), m = a.currentGlobalRunIndex ?? 0, p = ((y = d == null ? void 0 : d.getScrollTop) == null ? void 0 : y.call(d)) ?? 0, b = ((u = d == null ? void 0 : d.getAnchorOffsetRatio) == null ? void 0 : u.call(d, m)) ?? 0;
|
|
8352
8360
|
return {
|
|
@@ -8381,7 +8389,7 @@ function kd() {
|
|
|
8381
8389
|
viewportWidth: l.viewportWidth,
|
|
8382
8390
|
viewportHeight: l.viewportHeight
|
|
8383
8391
|
};
|
|
8384
|
-
}, [t, n]), c =
|
|
8392
|
+
}, [t, n]), c = Q(
|
|
8385
8393
|
(l) => {
|
|
8386
8394
|
switch (l.type) {
|
|
8387
8395
|
case "global_index_change": {
|
|
@@ -8516,15 +8524,15 @@ const Rd = ({
|
|
|
8516
8524
|
a({ x: y.width * f / 2, y: 80 });
|
|
8517
8525
|
return;
|
|
8518
8526
|
}
|
|
8519
|
-
const
|
|
8520
|
-
let I = (
|
|
8521
|
-
R && (I = ((R.left +
|
|
8522
|
-
const h = 160, S = 50,
|
|
8523
|
-
|
|
8524
|
-
Math.min(I, O -
|
|
8525
|
-
),
|
|
8526
|
-
let _ =
|
|
8527
|
-
|
|
8527
|
+
const C = g.getBoundingClientRect(), k = v.querySelector(`[data-g="${n}"]`), R = k == null ? void 0 : k.getBoundingClientRect();
|
|
8528
|
+
let I = (C.left + C.width / 2 - y.left) * f;
|
|
8529
|
+
R && (I = ((R.left + C.right) / 2 - y.left) * f);
|
|
8530
|
+
const h = 160, S = 50, T = 16, E = 12, O = y.width * f, z = Math.max(
|
|
8531
|
+
T + h / 2,
|
|
8532
|
+
Math.min(I, O - T - h / 2)
|
|
8533
|
+
), w = (((R == null ? void 0 : R.top) ?? C.top) - y.top) * f - S - E;
|
|
8534
|
+
let _ = w;
|
|
8535
|
+
w < T && (_ = (C.bottom - y.top) * f + E), a({ x: z, y: _ });
|
|
8528
8536
|
};
|
|
8529
8537
|
p();
|
|
8530
8538
|
const b = e.current;
|
|
@@ -8532,16 +8540,16 @@ const Rd = ({
|
|
|
8532
8540
|
b && b.removeEventListener("scroll", p, !0);
|
|
8533
8541
|
};
|
|
8534
8542
|
}, [c, n, r, e, s]);
|
|
8535
|
-
const d =
|
|
8543
|
+
const d = Q(() => {
|
|
8536
8544
|
const p = o();
|
|
8537
8545
|
p && navigator.clipboard.writeText(p).catch((b) => {
|
|
8538
8546
|
console.error("복사 실패:", b);
|
|
8539
8547
|
}), i();
|
|
8540
|
-
}, [o, i]), m =
|
|
8548
|
+
}, [o, i]), m = Q(() => {
|
|
8541
8549
|
const p = o();
|
|
8542
8550
|
p && t && t(p);
|
|
8543
8551
|
}, [o, t]);
|
|
8544
|
-
return !c || !l ? null : /* @__PURE__ */
|
|
8552
|
+
return !c || !l ? null : /* @__PURE__ */ Z(
|
|
8545
8553
|
"div",
|
|
8546
8554
|
{
|
|
8547
8555
|
"data-range-menu": !0,
|
|
@@ -8607,22 +8615,22 @@ const Rd = ({
|
|
|
8607
8615
|
return;
|
|
8608
8616
|
}
|
|
8609
8617
|
const f = () => {
|
|
8610
|
-
const
|
|
8611
|
-
if (!
|
|
8612
|
-
const k =
|
|
8618
|
+
const C = e.current;
|
|
8619
|
+
if (!C) return;
|
|
8620
|
+
const k = C.getBoundingClientRect(), I = 1 / (o.getState().playbackScale || 1), h = C.querySelector(`[data-g="${t}"]`), S = C.querySelector(`[data-g="${n}"]`);
|
|
8613
8621
|
if (h) {
|
|
8614
|
-
const
|
|
8622
|
+
const T = h.getBoundingClientRect();
|
|
8615
8623
|
c({
|
|
8616
|
-
x: (
|
|
8617
|
-
y: (
|
|
8624
|
+
x: (T.left - k.left) * I,
|
|
8625
|
+
y: (T.bottom - k.top) * I
|
|
8618
8626
|
});
|
|
8619
8627
|
} else
|
|
8620
8628
|
c(null);
|
|
8621
8629
|
if (S) {
|
|
8622
|
-
const
|
|
8630
|
+
const T = S.getBoundingClientRect();
|
|
8623
8631
|
a({
|
|
8624
|
-
x: (
|
|
8625
|
-
y: (
|
|
8632
|
+
x: (T.right - k.left) * I,
|
|
8633
|
+
y: (T.bottom - k.top) * I
|
|
8626
8634
|
});
|
|
8627
8635
|
} else
|
|
8628
8636
|
a(null);
|
|
@@ -8633,31 +8641,31 @@ const Rd = ({
|
|
|
8633
8641
|
g && g.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
8634
8642
|
};
|
|
8635
8643
|
}, [i, t, n, e, o]);
|
|
8636
|
-
const p =
|
|
8644
|
+
const p = Q((f, g) => {
|
|
8637
8645
|
var k;
|
|
8638
|
-
const
|
|
8639
|
-
for (const R of
|
|
8646
|
+
const C = document.elementsFromPoint(f, g);
|
|
8647
|
+
for (const R of C) {
|
|
8640
8648
|
const I = (k = R.getAttribute) == null ? void 0 : k.call(R, "data-g");
|
|
8641
8649
|
if (I != null)
|
|
8642
8650
|
return parseInt(I, 10);
|
|
8643
8651
|
}
|
|
8644
8652
|
return null;
|
|
8645
|
-
}, []), b =
|
|
8653
|
+
}, []), b = Q(
|
|
8646
8654
|
(f) => (g) => {
|
|
8647
8655
|
g.preventDefault(), g.stopPropagation(), d.current = f, m.current = f === "start" ? t : n, g.target.setPointerCapture(g.pointerId);
|
|
8648
8656
|
},
|
|
8649
8657
|
[t, n]
|
|
8650
|
-
), v =
|
|
8658
|
+
), v = Q(
|
|
8651
8659
|
(f) => {
|
|
8652
8660
|
if (!d.current || t == null || n == null) return;
|
|
8653
8661
|
const g = p(f.clientX, f.clientY);
|
|
8654
8662
|
g != null && (d.current === "start" ? g <= n ? r(g, n) : (r(n, g), d.current = "end") : g >= t ? r(t, g) : (r(g, t), d.current = "start"));
|
|
8655
8663
|
},
|
|
8656
8664
|
[t, n, r, p]
|
|
8657
|
-
), y =
|
|
8665
|
+
), y = Q((f) => {
|
|
8658
8666
|
d.current = null, m.current = null, f.target.releasePointerCapture(f.pointerId);
|
|
8659
8667
|
}, []);
|
|
8660
|
-
return i ? /* @__PURE__ */
|
|
8668
|
+
return i ? /* @__PURE__ */ Z(yt, { children: [
|
|
8661
8669
|
s && /* @__PURE__ */ x(
|
|
8662
8670
|
"div",
|
|
8663
8671
|
{
|
|
@@ -8725,7 +8733,7 @@ const Pd = ({ isOpen: e, onClose: t, text: n }) => e ? /* @__PURE__ */ x(
|
|
|
8725
8733
|
zIndex: 10001
|
|
8726
8734
|
},
|
|
8727
8735
|
onClick: t,
|
|
8728
|
-
children: /* @__PURE__ */
|
|
8736
|
+
children: /* @__PURE__ */ Z(
|
|
8729
8737
|
"div",
|
|
8730
8738
|
{
|
|
8731
8739
|
style: {
|
|
@@ -8788,7 +8796,7 @@ const Pd = ({ isOpen: e, onClose: t, text: n }) => e ? /* @__PURE__ */ x(
|
|
|
8788
8796
|
children: "준비중입니다"
|
|
8789
8797
|
}
|
|
8790
8798
|
),
|
|
8791
|
-
n && /* @__PURE__ */
|
|
8799
|
+
n && /* @__PURE__ */ Z(
|
|
8792
8800
|
"div",
|
|
8793
8801
|
{
|
|
8794
8802
|
style: {
|
|
@@ -8830,10 +8838,10 @@ function Nd({
|
|
|
8830
8838
|
const b = String((e == null ? void 0 : e.section_id) ?? "0"), v = ve(() => {
|
|
8831
8839
|
var k, R;
|
|
8832
8840
|
const g = ((k = e == null ? void 0 : e.ast) == null ? void 0 : k.blocks) ?? [];
|
|
8833
|
-
let
|
|
8841
|
+
let C = 0;
|
|
8834
8842
|
for (const I of g)
|
|
8835
|
-
(I == null ? void 0 : I.type) !== "image" && (
|
|
8836
|
-
return
|
|
8843
|
+
(I == null ? void 0 : I.type) !== "image" && (C += ((R = I == null ? void 0 : I.runs) == null ? void 0 : R.length) ?? 0);
|
|
8844
|
+
return C;
|
|
8837
8845
|
}, [e]), y = ve(() => typeof n == "number" ? Bd(n, v > 0 ? 0 : -1, Math.max(v - 1, -1)) : (v > 0, 0), [n, v]), u = ve(
|
|
8838
8846
|
() => ({
|
|
8839
8847
|
section: e,
|
|
@@ -8845,10 +8853,10 @@ function Nd({
|
|
|
8845
8853
|
}),
|
|
8846
8854
|
[e, y, r, o, i, s]
|
|
8847
8855
|
), f = ve(() => {
|
|
8848
|
-
const g = (e == null ? void 0 : e.audios) ?? [],
|
|
8856
|
+
const g = (e == null ? void 0 : e.audios) ?? [], C = g.length > 0 ? iu(e) : void 0;
|
|
8849
8857
|
return {
|
|
8850
8858
|
clips: g,
|
|
8851
|
-
map:
|
|
8859
|
+
map: C,
|
|
8852
8860
|
initialIndex: y,
|
|
8853
8861
|
section: e
|
|
8854
8862
|
};
|
|
@@ -8865,7 +8873,7 @@ function Nd({
|
|
|
8865
8873
|
);
|
|
8866
8874
|
}
|
|
8867
8875
|
function zd() {
|
|
8868
|
-
const e = Y((p) => p.mode), t = ie(null), n = Et(), r = Rt(), [o, i] = tt(!1), [s, c] = tt(), l =
|
|
8876
|
+
const e = Y((p) => p.mode), t = ie(null), n = Et(), r = Rt(), [o, i] = tt(!1), [s, c] = tt(), l = Q(
|
|
8869
8877
|
(p) => {
|
|
8870
8878
|
c(p), i(!0);
|
|
8871
8879
|
const { rangeStartGI: b, rangeEndGI: v } = r.getState().progress;
|
|
@@ -8879,13 +8887,13 @@ function zd() {
|
|
|
8879
8887
|
});
|
|
8880
8888
|
},
|
|
8881
8889
|
[n, r]
|
|
8882
|
-
), a =
|
|
8890
|
+
), a = Q(() => {
|
|
8883
8891
|
i(!1), c(void 0), n.getState().emit({
|
|
8884
8892
|
type: "translate_modal_close",
|
|
8885
8893
|
payload: {}
|
|
8886
8894
|
});
|
|
8887
8895
|
}, [n]);
|
|
8888
|
-
return /* @__PURE__ */
|
|
8896
|
+
return /* @__PURE__ */ Z(
|
|
8889
8897
|
"div",
|
|
8890
8898
|
{
|
|
8891
8899
|
ref: t,
|