@readerseye2/cr_viewer 1.0.17 → 1.0.21
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/CR_Viewer.d.ts.map +1 -1
- package/dist/components/PageSectionWrap.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +625 -630
- package/dist/overlay-bars/bottomBar/OverlayBottomBar.d.ts.map +1 -1
- package/package.json +70 -73
- package/dist/utils/calcPage.util_BACKV3_2399_sf.d.ts +0 -40
- package/dist/utils/calcPage.util_BACKV3_2399_sf.d.ts.map +0 -1
- package/dist/utils/calcPage.util_BACKclaude.d.ts +0 -40
- package/dist/utils/calcPage.util_BACKclaude.d.ts.map +0 -1
- package/dist/utils/calcPage.util_BACKclaude_gptagain.d.ts +0 -40
- package/dist/utils/calcPage.util_BACKclaude_gptagain.d.ts.map +0 -1
- package/dist/utils/calcPage.util_BACKrecent.d.ts +0 -40
- package/dist/utils/calcPage.util_BACKrecent.d.ts.map +0 -1
- package/dist/utils/calcPage.util_BACKv6_fast_Sf.d.ts +0 -40
- package/dist/utils/calcPage.util_BACKv6_fast_Sf.d.ts.map +0 -1
package/dist/index.js
CHANGED
|
@@ -3,12 +3,6 @@ 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
5
|
import { jsx as x, jsxs as X, Fragment as yt } from "react/jsx-runtime";
|
|
6
|
-
import "@fontsource/noto-sans-kr/400.css";
|
|
7
|
-
import "@fontsource/noto-sans-kr/700.css";
|
|
8
|
-
import "@fontsource/noto-serif-kr/400.css";
|
|
9
|
-
import "@fontsource/noto-serif-kr/700.css";
|
|
10
|
-
import "@fontsource/nanum-myeongjo/400.css";
|
|
11
|
-
import "@fontsource/nanum-myeongjo/700.css";
|
|
12
6
|
import * as dt from "react";
|
|
13
7
|
import N, { createContext as Ft, useContext as Ue, useMemo as ve, useLayoutEffect as Tt, useRef as ie, useEffect as Se, useCallback as Z, createElement as hn, memo as Wt, useState as et, useId as ji } from "react";
|
|
14
8
|
import Ui from "react-dom";
|
|
@@ -161,26 +155,26 @@ function Yi() {
|
|
|
161
155
|
} else y = m.current;
|
|
162
156
|
m = c(
|
|
163
157
|
function() {
|
|
164
|
-
function f(
|
|
158
|
+
function f(C) {
|
|
165
159
|
if (!u) {
|
|
166
|
-
if (u = !0, T =
|
|
160
|
+
if (u = !0, T = C, C = g(C), b !== void 0 && y.hasValue) {
|
|
167
161
|
var h = y.value;
|
|
168
|
-
if (b(h,
|
|
162
|
+
if (b(h, C))
|
|
169
163
|
return k = h;
|
|
170
164
|
}
|
|
171
|
-
return k =
|
|
165
|
+
return k = C;
|
|
172
166
|
}
|
|
173
|
-
if (h = k, r(T,
|
|
174
|
-
var S = g(
|
|
175
|
-
return b !== void 0 && b(h, S) ? (T =
|
|
167
|
+
if (h = k, r(T, C)) return h;
|
|
168
|
+
var S = g(C);
|
|
169
|
+
return b !== void 0 && b(h, S) ? (T = C, h) : (T = C, k = S);
|
|
176
170
|
}
|
|
177
|
-
var u = !1, T, k,
|
|
171
|
+
var u = !1, T, k, R = v === void 0 ? null : v;
|
|
178
172
|
return [
|
|
179
173
|
function() {
|
|
180
174
|
return f(d());
|
|
181
175
|
},
|
|
182
|
-
|
|
183
|
-
return f(
|
|
176
|
+
R === null ? void 0 : function() {
|
|
177
|
+
return f(R());
|
|
184
178
|
}
|
|
185
179
|
];
|
|
186
180
|
},
|
|
@@ -221,27 +215,27 @@ function Xi() {
|
|
|
221
215
|
} else y = m.current;
|
|
222
216
|
m = c(
|
|
223
217
|
function() {
|
|
224
|
-
function f(
|
|
218
|
+
function f(C) {
|
|
225
219
|
if (!u) {
|
|
226
|
-
if (u = !0, T =
|
|
220
|
+
if (u = !0, T = C, C = g(C), b !== void 0 && y.hasValue) {
|
|
227
221
|
var h = y.value;
|
|
228
|
-
if (b(h,
|
|
222
|
+
if (b(h, C))
|
|
229
223
|
return k = h;
|
|
230
224
|
}
|
|
231
|
-
return k =
|
|
225
|
+
return k = C;
|
|
232
226
|
}
|
|
233
|
-
if (h = k, r(T,
|
|
227
|
+
if (h = k, r(T, C))
|
|
234
228
|
return h;
|
|
235
|
-
var S = g(
|
|
236
|
-
return b !== void 0 && b(h, S) ? (T =
|
|
229
|
+
var S = g(C);
|
|
230
|
+
return b !== void 0 && b(h, S) ? (T = C, h) : (T = C, k = S);
|
|
237
231
|
}
|
|
238
|
-
var u = !1, T, k,
|
|
232
|
+
var u = !1, T, k, R = v === void 0 ? null : v;
|
|
239
233
|
return [
|
|
240
234
|
function() {
|
|
241
235
|
return f(d());
|
|
242
236
|
},
|
|
243
|
-
|
|
244
|
-
return f(
|
|
237
|
+
R === null ? void 0 : function() {
|
|
238
|
+
return f(R());
|
|
245
239
|
}
|
|
246
240
|
];
|
|
247
241
|
},
|
|
@@ -1361,12 +1355,12 @@ const Os = {
|
|
|
1361
1355
|
l,
|
|
1362
1356
|
ce((h) => h.length > 0),
|
|
1363
1357
|
be(f, y),
|
|
1364
|
-
U(([h, S,
|
|
1365
|
-
const
|
|
1358
|
+
U(([h, S, I]) => {
|
|
1359
|
+
const _ = h.reduce((O, P, w) => Xe(O, P, Zt(P, S.offsetTree, I) || w), Gt());
|
|
1366
1360
|
return {
|
|
1367
1361
|
...S,
|
|
1368
1362
|
groupIndices: h,
|
|
1369
|
-
groupOffsetTree:
|
|
1363
|
+
groupOffsetTree: _
|
|
1370
1364
|
};
|
|
1371
1365
|
})
|
|
1372
1366
|
),
|
|
@@ -1376,10 +1370,10 @@ const Os = {
|
|
|
1376
1370
|
r,
|
|
1377
1371
|
be(f),
|
|
1378
1372
|
ce(([h, { lastIndex: S }]) => h < S),
|
|
1379
|
-
U(([h, { lastIndex: S, lastSize:
|
|
1373
|
+
U(([h, { lastIndex: S, lastSize: I }]) => [
|
|
1380
1374
|
{
|
|
1381
1375
|
endIndex: S,
|
|
1382
|
-
size:
|
|
1376
|
+
size: I,
|
|
1383
1377
|
startIndex: h
|
|
1384
1378
|
}
|
|
1385
1379
|
])
|
|
@@ -1398,8 +1392,8 @@ const Os = {
|
|
|
1398
1392
|
d,
|
|
1399
1393
|
ce((h) => h !== void 0 && Ce(Be(f).sizeTree)),
|
|
1400
1394
|
U((h) => {
|
|
1401
|
-
const S = Be(v),
|
|
1402
|
-
return S ?
|
|
1395
|
+
const S = Be(v), I = Be(l).length > 0;
|
|
1396
|
+
return S ? I ? [
|
|
1403
1397
|
{ endIndex: 0, size: S, startIndex: 0 },
|
|
1404
1398
|
{ endIndex: 1, size: h, startIndex: 1 }
|
|
1405
1399
|
] : [] : [{ endIndex: 0, size: h, startIndex: 0 }];
|
|
@@ -1412,19 +1406,19 @@ const Os = {
|
|
|
1412
1406
|
ce((h) => h !== void 0 && h.length > 0 && Ce(Be(f).sizeTree)),
|
|
1413
1407
|
U((h) => {
|
|
1414
1408
|
const S = [];
|
|
1415
|
-
let
|
|
1409
|
+
let I = h[0], _ = 0;
|
|
1416
1410
|
for (let O = 1; O < h.length; O++) {
|
|
1417
1411
|
const P = h[O];
|
|
1418
|
-
P !==
|
|
1412
|
+
P !== I && (S.push({
|
|
1419
1413
|
endIndex: O - 1,
|
|
1420
|
-
size:
|
|
1421
|
-
startIndex:
|
|
1422
|
-
}),
|
|
1414
|
+
size: I,
|
|
1415
|
+
startIndex: _
|
|
1416
|
+
}), I = P, _ = O);
|
|
1423
1417
|
}
|
|
1424
1418
|
return S.push({
|
|
1425
1419
|
endIndex: h.length - 1,
|
|
1426
|
-
size:
|
|
1427
|
-
startIndex:
|
|
1420
|
+
size: I,
|
|
1421
|
+
startIndex: _
|
|
1428
1422
|
}), S;
|
|
1429
1423
|
})
|
|
1430
1424
|
),
|
|
@@ -1434,21 +1428,21 @@ const Os = {
|
|
|
1434
1428
|
l,
|
|
1435
1429
|
be(v, d),
|
|
1436
1430
|
ce(([, h, S]) => h !== void 0 && S !== void 0),
|
|
1437
|
-
U(([h, S,
|
|
1438
|
-
const
|
|
1431
|
+
U(([h, S, I]) => {
|
|
1432
|
+
const _ = [];
|
|
1439
1433
|
for (let O = 0; O < h.length; O++) {
|
|
1440
1434
|
const P = h[O], w = h[O + 1];
|
|
1441
|
-
|
|
1435
|
+
_.push({
|
|
1442
1436
|
startIndex: P,
|
|
1443
1437
|
endIndex: P,
|
|
1444
1438
|
size: S
|
|
1445
|
-
}), w !== void 0 &&
|
|
1439
|
+
}), w !== void 0 && _.push({
|
|
1446
1440
|
startIndex: P + 1,
|
|
1447
1441
|
endIndex: w - 1,
|
|
1448
|
-
size:
|
|
1442
|
+
size: I
|
|
1449
1443
|
});
|
|
1450
1444
|
}
|
|
1451
|
-
return
|
|
1445
|
+
return _;
|
|
1452
1446
|
})
|
|
1453
1447
|
),
|
|
1454
1448
|
n
|
|
@@ -1458,9 +1452,9 @@ const Os = {
|
|
|
1458
1452
|
n,
|
|
1459
1453
|
be(f),
|
|
1460
1454
|
ht(
|
|
1461
|
-
({ sizes: h }, [S,
|
|
1462
|
-
changed:
|
|
1463
|
-
sizes:
|
|
1455
|
+
({ sizes: h }, [S, I]) => ({
|
|
1456
|
+
changed: I !== h,
|
|
1457
|
+
sizes: I
|
|
1464
1458
|
}),
|
|
1465
1459
|
{ changed: !1, sizes: p }
|
|
1466
1460
|
),
|
|
@@ -1481,8 +1475,8 @@ const Os = {
|
|
|
1481
1475
|
if (h > 0)
|
|
1482
1476
|
ge(t, !0), ge(i, h + Kr(h, S));
|
|
1483
1477
|
else if (h < 0) {
|
|
1484
|
-
const
|
|
1485
|
-
|
|
1478
|
+
const I = Be(u);
|
|
1479
|
+
I.length > 0 && (h -= Kr(-h, I)), ge(s, h);
|
|
1486
1480
|
}
|
|
1487
1481
|
}
|
|
1488
1482
|
), Ie(L(c, be(e)), ([h, S]) => {
|
|
@@ -1492,23 +1486,23 @@ const Os = {
|
|
|
1492
1486
|
Ye.ERROR
|
|
1493
1487
|
);
|
|
1494
1488
|
});
|
|
1495
|
-
const
|
|
1489
|
+
const R = Ze(i);
|
|
1496
1490
|
te(
|
|
1497
1491
|
L(
|
|
1498
1492
|
i,
|
|
1499
1493
|
be(f),
|
|
1500
1494
|
U(([h, S]) => {
|
|
1501
|
-
const
|
|
1502
|
-
if (
|
|
1495
|
+
const I = S.groupIndices.length > 0, _ = [], O = S.lastSize;
|
|
1496
|
+
if (I) {
|
|
1503
1497
|
const P = Yt(S.sizeTree, 0);
|
|
1504
1498
|
let w = 0, E = 0;
|
|
1505
1499
|
for (; w < h; ) {
|
|
1506
1500
|
const W = S.groupIndices[E], M = S.groupIndices.length === E + 1 ? 1 / 0 : S.groupIndices[E + 1] - W - 1;
|
|
1507
|
-
|
|
1501
|
+
_.push({
|
|
1508
1502
|
endIndex: W,
|
|
1509
1503
|
size: P,
|
|
1510
1504
|
startIndex: W
|
|
1511
|
-
}),
|
|
1505
|
+
}), _.push({
|
|
1512
1506
|
endIndex: W + 1 + M - 1,
|
|
1513
1507
|
size: O,
|
|
1514
1508
|
startIndex: W + 1
|
|
@@ -1534,7 +1528,7 @@ const Os = {
|
|
|
1534
1528
|
{
|
|
1535
1529
|
prevIndex: h,
|
|
1536
1530
|
prevSize: 0,
|
|
1537
|
-
ranges:
|
|
1531
|
+
ranges: _
|
|
1538
1532
|
}
|
|
1539
1533
|
).ranges;
|
|
1540
1534
|
}
|
|
@@ -1554,13 +1548,13 @@ const Os = {
|
|
|
1554
1548
|
),
|
|
1555
1549
|
n
|
|
1556
1550
|
);
|
|
1557
|
-
const
|
|
1551
|
+
const C = Ze(
|
|
1558
1552
|
L(
|
|
1559
1553
|
s,
|
|
1560
1554
|
be(f, y),
|
|
1561
|
-
U(([h, { offsetTree: S },
|
|
1562
|
-
const
|
|
1563
|
-
return Zt(
|
|
1555
|
+
U(([h, { offsetTree: S }, I]) => {
|
|
1556
|
+
const _ = -h;
|
|
1557
|
+
return Zt(_, S, I);
|
|
1564
1558
|
})
|
|
1565
1559
|
)
|
|
1566
1560
|
);
|
|
@@ -1568,11 +1562,11 @@ const Os = {
|
|
|
1568
1562
|
L(
|
|
1569
1563
|
s,
|
|
1570
1564
|
be(f, y),
|
|
1571
|
-
U(([h, S,
|
|
1565
|
+
U(([h, S, I]) => {
|
|
1572
1566
|
if (S.groupIndices.length > 0) {
|
|
1573
1567
|
if (Ce(S.sizeTree))
|
|
1574
1568
|
return S;
|
|
1575
|
-
let
|
|
1569
|
+
let _ = Gt();
|
|
1576
1570
|
const O = Be(u);
|
|
1577
1571
|
let P = 0, w = 0, E = 0;
|
|
1578
1572
|
for (; P < -h; ) {
|
|
@@ -1580,30 +1574,30 @@ const Os = {
|
|
|
1580
1574
|
const A = O[w + 1] - E - 1;
|
|
1581
1575
|
w++, P += A + 1;
|
|
1582
1576
|
}
|
|
1583
|
-
if (
|
|
1577
|
+
if (_ = kt(S.sizeTree).reduce((A, { k: W, v: M }) => Xe(A, Math.max(0, W + h), M), _), P !== -h) {
|
|
1584
1578
|
const A = Yt(S.sizeTree, E);
|
|
1585
|
-
|
|
1579
|
+
_ = Xe(_, 0, A);
|
|
1586
1580
|
const W = ct(S.sizeTree, -h + 1)[1];
|
|
1587
|
-
|
|
1581
|
+
_ = Xe(_, 1, W);
|
|
1588
1582
|
}
|
|
1589
1583
|
return {
|
|
1590
1584
|
...S,
|
|
1591
|
-
sizeTree:
|
|
1592
|
-
...hr(S.offsetTree, 0,
|
|
1585
|
+
sizeTree: _,
|
|
1586
|
+
...hr(S.offsetTree, 0, _, I)
|
|
1593
1587
|
};
|
|
1594
1588
|
} else {
|
|
1595
|
-
const
|
|
1589
|
+
const _ = kt(S.sizeTree).reduce((O, { k: P, v: w }) => Xe(O, Math.max(0, P + h), w), Gt());
|
|
1596
1590
|
return {
|
|
1597
1591
|
...S,
|
|
1598
|
-
sizeTree:
|
|
1599
|
-
...hr(S.offsetTree, 0,
|
|
1592
|
+
sizeTree: _,
|
|
1593
|
+
...hr(S.offsetTree, 0, _, I)
|
|
1600
1594
|
};
|
|
1601
1595
|
}
|
|
1602
1596
|
})
|
|
1603
1597
|
),
|
|
1604
1598
|
f
|
|
1605
1599
|
), {
|
|
1606
|
-
beforeUnshiftWith:
|
|
1600
|
+
beforeUnshiftWith: R,
|
|
1607
1601
|
// input
|
|
1608
1602
|
data: m,
|
|
1609
1603
|
defaultItemSize: d,
|
|
@@ -1616,7 +1610,7 @@ const Os = {
|
|
|
1616
1610
|
itemSize: b,
|
|
1617
1611
|
listRefresh: k,
|
|
1618
1612
|
shiftWith: s,
|
|
1619
|
-
shiftWithOffset:
|
|
1613
|
+
shiftWithOffset: C,
|
|
1620
1614
|
sizeRanges: n,
|
|
1621
1615
|
// output
|
|
1622
1616
|
sizes: f,
|
|
@@ -1712,14 +1706,14 @@ const on = xe(
|
|
|
1712
1706
|
be(e, i, o),
|
|
1713
1707
|
U(
|
|
1714
1708
|
([
|
|
1715
|
-
[k,
|
|
1709
|
+
[k, R, C, h, S, I, _, O],
|
|
1716
1710
|
P,
|
|
1717
1711
|
w,
|
|
1718
1712
|
E
|
|
1719
1713
|
]) => {
|
|
1720
|
-
const A = ci(k), { align: W, behavior: M, offset: B } = A, F = h - 1,
|
|
1721
|
-
let q = Zt(
|
|
1722
|
-
W === "end" ? (q += w + ct(
|
|
1714
|
+
const A = ci(k), { align: W, behavior: M, offset: B } = A, F = h - 1, D = li(A, R, F);
|
|
1715
|
+
let q = Zt(D, R.offsetTree, P) + I;
|
|
1716
|
+
W === "end" ? (q += w + ct(R.sizeTree, D)[1] - C + E, D === F && (q += _)) : W === "center" ? q += (w + ct(R.sizeTree, D)[1] - C + E) / 2 : q -= S, B && (q += B);
|
|
1723
1717
|
const ue = (de) => {
|
|
1724
1718
|
T(), de ? (O("retrying to scroll to", { location: k }, Ye.DEBUG), ge(b, k)) : (ge(m, !0), O("list did not change, scroll successful", {}, Ye.DEBUG));
|
|
1725
1719
|
};
|
|
@@ -1734,7 +1728,7 @@ const on = xe(
|
|
|
1734
1728
|
p = at(L(t, zs(150)), ue);
|
|
1735
1729
|
return f = setTimeout(() => {
|
|
1736
1730
|
T();
|
|
1737
|
-
}, 1200), ge(l, !0), O("scrolling from index to", { behavior: M, index:
|
|
1731
|
+
}, 1200), ge(l, !0), O("scrolling from index to", { behavior: M, index: D, top: q }, Ye.DEBUG), { behavior: M, top: q };
|
|
1738
1732
|
}
|
|
1739
1733
|
)
|
|
1740
1734
|
),
|
|
@@ -1845,26 +1839,26 @@ const Jt = "up", Ut = "down", As = "none", Ls = {
|
|
|
1845
1839
|
const m = Ze(
|
|
1846
1840
|
L(
|
|
1847
1841
|
Fe(r, ae(i), ae(t), ae(e), ae(d)),
|
|
1848
|
-
ht((u, [{ scrollHeight: T, scrollTop: k },
|
|
1849
|
-
const
|
|
1842
|
+
ht((u, [{ scrollHeight: T, scrollTop: k }, R, C, h, S]) => {
|
|
1843
|
+
const I = k + R - T > -S, _ = {
|
|
1850
1844
|
scrollHeight: T,
|
|
1851
1845
|
scrollTop: k,
|
|
1852
|
-
viewportHeight:
|
|
1846
|
+
viewportHeight: R
|
|
1853
1847
|
};
|
|
1854
|
-
if (
|
|
1848
|
+
if (I) {
|
|
1855
1849
|
let P, w;
|
|
1856
1850
|
return k > u.state.scrollTop ? (P = "SCROLLED_DOWN", w = u.state.scrollTop - k) : (P = "SIZE_DECREASED", w = u.state.scrollTop - k || u.scrollTopDelta), {
|
|
1857
1851
|
atBottom: !0,
|
|
1858
1852
|
atBottomBecause: P,
|
|
1859
1853
|
scrollTopDelta: w,
|
|
1860
|
-
state:
|
|
1854
|
+
state: _
|
|
1861
1855
|
};
|
|
1862
1856
|
}
|
|
1863
1857
|
let O;
|
|
1864
|
-
return
|
|
1858
|
+
return _.scrollHeight > u.state.scrollHeight ? O = "SIZE_INCREASED" : R < u.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : k < u.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1865
1859
|
atBottom: !1,
|
|
1866
1860
|
notAtBottomBecause: O,
|
|
1867
|
-
state:
|
|
1861
|
+
state: _
|
|
1868
1862
|
};
|
|
1869
1863
|
}, Ls),
|
|
1870
1864
|
Me((u, T) => u && u.atBottom === T.atBottom)
|
|
@@ -1873,7 +1867,7 @@ const Jt = "up", Ut = "down", As = "none", Ls = {
|
|
|
1873
1867
|
L(
|
|
1874
1868
|
r,
|
|
1875
1869
|
ht(
|
|
1876
|
-
(u, { scrollHeight: T, scrollTop: k, viewportHeight:
|
|
1870
|
+
(u, { scrollHeight: T, scrollTop: k, viewportHeight: R }) => {
|
|
1877
1871
|
if (ui(u.scrollHeight, T))
|
|
1878
1872
|
return {
|
|
1879
1873
|
changed: !1,
|
|
@@ -1882,8 +1876,8 @@ const Jt = "up", Ut = "down", As = "none", Ls = {
|
|
|
1882
1876
|
scrollTop: k
|
|
1883
1877
|
};
|
|
1884
1878
|
{
|
|
1885
|
-
const
|
|
1886
|
-
return u.scrollTop !== k &&
|
|
1879
|
+
const C = T - (k + R) < 1;
|
|
1880
|
+
return u.scrollTop !== k && C ? {
|
|
1887
1881
|
changed: !0,
|
|
1888
1882
|
jump: u.scrollTop - k,
|
|
1889
1883
|
scrollHeight: T,
|
|
@@ -1990,12 +1984,12 @@ const kr = xe(
|
|
|
1990
1984
|
u,
|
|
1991
1985
|
T
|
|
1992
1986
|
]) => {
|
|
1993
|
-
const k = d - u,
|
|
1987
|
+
const k = d - u, R = p + f, C = Math.max(g - k, 0);
|
|
1994
1988
|
let h = Qr;
|
|
1995
|
-
const S = Xr(T, en),
|
|
1996
|
-
return b -= u, b += g + f, m += g + f, m -= u, b > d +
|
|
1989
|
+
const S = Xr(T, en), I = Xr(T, tn);
|
|
1990
|
+
return b -= u, b += g + f, m += g + f, m -= u, b > d + R - S && (h = Jt), m < d - C + v + I && (h = Ut), h !== Qr ? [
|
|
1997
1991
|
Math.max(k - g - Yr(y, en, h) - S, 0),
|
|
1998
|
-
k -
|
|
1992
|
+
k - C - f + v + Yr(y, tn, h) + I
|
|
1999
1993
|
] : null;
|
|
2000
1994
|
}
|
|
2001
1995
|
),
|
|
@@ -2134,8 +2128,8 @@ const Pt = xe(
|
|
|
2134
2128
|
ae(u),
|
|
2135
2129
|
e
|
|
2136
2130
|
),
|
|
2137
|
-
ce(([h, S, ,
|
|
2138
|
-
const O =
|
|
2131
|
+
ce(([h, S, , I, , , , , , , , _]) => {
|
|
2132
|
+
const O = _ && _.length !== I;
|
|
2139
2133
|
return h && !S && !O;
|
|
2140
2134
|
}),
|
|
2141
2135
|
U(
|
|
@@ -2143,8 +2137,8 @@ const Pt = xe(
|
|
|
2143
2137
|
,
|
|
2144
2138
|
,
|
|
2145
2139
|
[h, S],
|
|
2146
|
-
|
|
2147
|
-
|
|
2140
|
+
I,
|
|
2141
|
+
_,
|
|
2148
2142
|
O,
|
|
2149
2143
|
P,
|
|
2150
2144
|
w,
|
|
@@ -2153,37 +2147,37 @@ const Pt = xe(
|
|
|
2153
2147
|
W,
|
|
2154
2148
|
M
|
|
2155
2149
|
]) => {
|
|
2156
|
-
var B, F,
|
|
2157
|
-
const ue =
|
|
2158
|
-
if (
|
|
2159
|
-
return { ...Wn, totalCount:
|
|
2150
|
+
var B, F, D, q;
|
|
2151
|
+
const ue = _, { offsetTree: de, sizeTree: ke } = ue, Re = Be(p);
|
|
2152
|
+
if (I === 0)
|
|
2153
|
+
return { ...Wn, totalCount: I };
|
|
2160
2154
|
if (h === 0 && S === 0)
|
|
2161
|
-
return Re === 0 ? { ...Wn, totalCount:
|
|
2155
|
+
return Re === 0 ? { ...Wn, totalCount: I } : di(Re, O, _, E, A, M || []);
|
|
2162
2156
|
if (Ce(ke))
|
|
2163
2157
|
return Re > 0 ? null : mn(
|
|
2164
|
-
Hs(Tr(O,
|
|
2158
|
+
Hs(Tr(O, I), ue, M),
|
|
2165
2159
|
[],
|
|
2166
|
-
|
|
2160
|
+
I,
|
|
2167
2161
|
A,
|
|
2168
2162
|
ue,
|
|
2169
2163
|
E
|
|
2170
2164
|
);
|
|
2171
2165
|
const ee = [];
|
|
2172
2166
|
if (w.length > 0) {
|
|
2173
|
-
const
|
|
2167
|
+
const V = w[0], J = w[w.length - 1];
|
|
2174
2168
|
let se = 0;
|
|
2175
|
-
for (const re of Ht(ke,
|
|
2176
|
-
const pe = re.value, le = Math.max(re.start,
|
|
2169
|
+
for (const re of Ht(ke, V, J)) {
|
|
2170
|
+
const pe = re.value, le = Math.max(re.start, V), we = Math.min(re.end, J);
|
|
2177
2171
|
for (let me = le; me <= we; me++)
|
|
2178
2172
|
ee.push({ data: M == null ? void 0 : M[me], index: me, offset: se, size: pe }), se += pe;
|
|
2179
2173
|
}
|
|
2180
2174
|
}
|
|
2181
2175
|
if (!P)
|
|
2182
|
-
return mn([], ee,
|
|
2176
|
+
return mn([], ee, I, A, ue, E);
|
|
2183
2177
|
const Q = w.length > 0 ? w[w.length - 1] + 1 : 0, z = ks(de, h, S, Q);
|
|
2184
2178
|
if (z.length === 0)
|
|
2185
2179
|
return null;
|
|
2186
|
-
const K =
|
|
2180
|
+
const K = I - 1, ne = _n([], (V) => {
|
|
2187
2181
|
for (const J of z) {
|
|
2188
2182
|
const se = J.value;
|
|
2189
2183
|
let re = se.offset, pe = J.start;
|
|
@@ -2196,16 +2190,16 @@ const Pt = xe(
|
|
|
2196
2190
|
pe < Q && (re += (Q - pe) * le, pe = Q);
|
|
2197
2191
|
const we = Math.min(J.end, K);
|
|
2198
2192
|
for (let me = pe; me <= we && !(re >= S); me++)
|
|
2199
|
-
|
|
2193
|
+
V.push({ data: M == null ? void 0 : M[me], index: me, offset: re, size: le }), re += le + A;
|
|
2200
2194
|
}
|
|
2201
2195
|
}), H = Jr(W, en), oe = Jr(W, tn);
|
|
2202
2196
|
if (ne.length > 0 && (H > 0 || oe > 0)) {
|
|
2203
|
-
const
|
|
2204
|
-
if (H > 0 &&
|
|
2205
|
-
const se = Math.min(H,
|
|
2206
|
-
let pe =
|
|
2207
|
-
for (let le =
|
|
2208
|
-
const we = (F = (B = Ht(ke, le, le)[0]) == null ? void 0 : B.value) != null ? F :
|
|
2197
|
+
const V = ne[0], J = ne[ne.length - 1];
|
|
2198
|
+
if (H > 0 && V.index > Q) {
|
|
2199
|
+
const se = Math.min(H, V.index - Q), re = [];
|
|
2200
|
+
let pe = V.offset;
|
|
2201
|
+
for (let le = V.index - 1; le >= V.index - se; le--) {
|
|
2202
|
+
const we = (F = (B = Ht(ke, le, le)[0]) == null ? void 0 : B.value) != null ? F : V.size;
|
|
2209
2203
|
pe -= we + A, re.unshift({ data: M == null ? void 0 : M[le], index: le, offset: pe, size: we });
|
|
2210
2204
|
}
|
|
2211
2205
|
ne.unshift(...re);
|
|
@@ -2214,12 +2208,12 @@ const Pt = xe(
|
|
|
2214
2208
|
const se = Math.min(oe, K - J.index);
|
|
2215
2209
|
let re = J.offset + J.size + A;
|
|
2216
2210
|
for (let pe = J.index + 1; pe <= J.index + se; pe++) {
|
|
2217
|
-
const le = (q = (
|
|
2211
|
+
const le = (q = (D = Ht(ke, pe, pe)[0]) == null ? void 0 : D.value) != null ? q : J.size;
|
|
2218
2212
|
ne.push({ data: M == null ? void 0 : M[pe], index: pe, offset: re, size: le }), re += le + A;
|
|
2219
2213
|
}
|
|
2220
2214
|
}
|
|
2221
2215
|
}
|
|
2222
|
-
return mn(ne, ee,
|
|
2216
|
+
return mn(ne, ee, I, A, ue, E);
|
|
2223
2217
|
}
|
|
2224
2218
|
),
|
|
2225
2219
|
//@ts-expect-error filter needs to be fixed
|
|
@@ -2264,7 +2258,7 @@ const Pt = xe(
|
|
|
2264
2258
|
Me(Xt),
|
|
2265
2259
|
U(([h]) => h)
|
|
2266
2260
|
)
|
|
2267
|
-
),
|
|
2261
|
+
), R = Ze(
|
|
2268
2262
|
L(
|
|
2269
2263
|
T,
|
|
2270
2264
|
mt(200),
|
|
@@ -2272,18 +2266,18 @@ const Pt = xe(
|
|
|
2272
2266
|
U(({ items: h }) => h[0].index),
|
|
2273
2267
|
Me()
|
|
2274
2268
|
)
|
|
2275
|
-
),
|
|
2269
|
+
), C = Ze(
|
|
2276
2270
|
L(
|
|
2277
2271
|
T,
|
|
2278
2272
|
ce(({ items: h }) => h.length > 0),
|
|
2279
2273
|
U(({ items: h }) => {
|
|
2280
|
-
let S = 0,
|
|
2281
|
-
for (; h[S].type === "group" && S <
|
|
2274
|
+
let S = 0, I = h.length - 1;
|
|
2275
|
+
for (; h[S].type === "group" && S < I; )
|
|
2282
2276
|
S++;
|
|
2283
|
-
for (; h[
|
|
2284
|
-
|
|
2277
|
+
for (; h[I].type === "group" && I > S; )
|
|
2278
|
+
I--;
|
|
2285
2279
|
return {
|
|
2286
|
-
endIndex: h[
|
|
2280
|
+
endIndex: h[I].index,
|
|
2287
2281
|
startIndex: h[S].index
|
|
2288
2282
|
};
|
|
2289
2283
|
}),
|
|
@@ -2296,8 +2290,8 @@ const Pt = xe(
|
|
|
2296
2290
|
itemsRendered: f,
|
|
2297
2291
|
listState: T,
|
|
2298
2292
|
minOverscanItemCount: u,
|
|
2299
|
-
rangeChanged:
|
|
2300
|
-
startReached:
|
|
2293
|
+
rangeChanged: C,
|
|
2294
|
+
startReached: R,
|
|
2301
2295
|
topItemsIndexes: y,
|
|
2302
2296
|
...g
|
|
2303
2297
|
};
|
|
@@ -2363,10 +2357,10 @@ const Pt = xe(
|
|
|
2363
2357
|
be(t, l, n, i, o, r, c),
|
|
2364
2358
|
be(e),
|
|
2365
2359
|
U(([[v, g, b, m, y, p, f, u], T]) => {
|
|
2366
|
-
const { align: k, behavior:
|
|
2360
|
+
const { align: k, behavior: R, calculateViewLocation: C = Fs, done: h, ...S } = v, I = li(v, g, m - 1), _ = Zt(I, g.offsetTree, T) + y + p, O = _ + ct(g.sizeTree, I)[1], P = u + p, w = u + b - f, E = C({
|
|
2367
2361
|
itemBottom: O,
|
|
2368
|
-
itemTop:
|
|
2369
|
-
locationParams: { align: k, behavior:
|
|
2362
|
+
itemTop: _,
|
|
2363
|
+
locationParams: { align: k, behavior: R, ...S },
|
|
2370
2364
|
viewportBottom: w,
|
|
2371
2365
|
viewportTop: P
|
|
2372
2366
|
});
|
|
@@ -2408,10 +2402,10 @@ const Ws = (e, t) => typeof e == "function" ? eo(e(t)) : t && eo(e), Ds = xe(
|
|
|
2408
2402
|
]) => {
|
|
2409
2403
|
const m = G(!1), y = ye();
|
|
2410
2404
|
let p = null;
|
|
2411
|
-
function f(
|
|
2405
|
+
function f(R) {
|
|
2412
2406
|
ge(s, {
|
|
2413
2407
|
align: "end",
|
|
2414
|
-
behavior:
|
|
2408
|
+
behavior: R,
|
|
2415
2409
|
index: "LAST"
|
|
2416
2410
|
});
|
|
2417
2411
|
}
|
|
@@ -2419,53 +2413,53 @@ const Ws = (e, t) => typeof e == "function" ? eo(e(t)) : t && eo(e), Ds = xe(
|
|
|
2419
2413
|
L(
|
|
2420
2414
|
Fe(L(ae(t), _t(1)), l),
|
|
2421
2415
|
be(ae(m), i, c, v),
|
|
2422
|
-
U(([[
|
|
2423
|
-
let O =
|
|
2424
|
-
return O && (P = Ws(h, S ||
|
|
2416
|
+
U(([[R, C], h, S, I, _]) => {
|
|
2417
|
+
let O = C && I, P = "auto";
|
|
2418
|
+
return O && (P = Ws(h, S || _), O = O && !!P), { followOutputBehavior: P, shouldFollow: O, totalCount: R };
|
|
2425
2419
|
}),
|
|
2426
|
-
ce(({ shouldFollow:
|
|
2420
|
+
ce(({ shouldFollow: R }) => R)
|
|
2427
2421
|
),
|
|
2428
|
-
({ followOutputBehavior:
|
|
2422
|
+
({ followOutputBehavior: R, totalCount: C }) => {
|
|
2429
2423
|
p && (p(), p = null), Be(n) ? requestAnimationFrame(() => {
|
|
2430
|
-
Be(d)("following output to ", { totalCount:
|
|
2424
|
+
Be(d)("following output to ", { totalCount: C }, Ye.DEBUG), f(R);
|
|
2431
2425
|
}) : p = at(e, () => {
|
|
2432
|
-
Be(d)("following output to ", { totalCount:
|
|
2426
|
+
Be(d)("following output to ", { totalCount: C }, Ye.DEBUG), f(R), p = null;
|
|
2433
2427
|
});
|
|
2434
2428
|
}
|
|
2435
2429
|
);
|
|
2436
|
-
function u(
|
|
2437
|
-
const
|
|
2438
|
-
|
|
2430
|
+
function u(R) {
|
|
2431
|
+
const C = at(o, (h) => {
|
|
2432
|
+
R && !h.atBottom && h.notAtBottomBecause === "SIZE_INCREASED" && !p && (Be(d)("scrolling to bottom due to increased size", {}, Ye.DEBUG), f("auto"));
|
|
2439
2433
|
});
|
|
2440
|
-
setTimeout(
|
|
2434
|
+
setTimeout(C, 100);
|
|
2441
2435
|
}
|
|
2442
2436
|
Ie(
|
|
2443
2437
|
L(
|
|
2444
2438
|
Fe(ae(m), t, a),
|
|
2445
|
-
ce(([
|
|
2439
|
+
ce(([R, , C]) => R && C),
|
|
2446
2440
|
ht(
|
|
2447
|
-
({ value:
|
|
2441
|
+
({ value: R }, [, C]) => ({ refreshed: R === C, value: C }),
|
|
2448
2442
|
{ refreshed: !1, value: 0 }
|
|
2449
2443
|
),
|
|
2450
|
-
ce(({ refreshed:
|
|
2444
|
+
ce(({ refreshed: R }) => R),
|
|
2451
2445
|
be(m, t)
|
|
2452
2446
|
),
|
|
2453
|
-
([,
|
|
2454
|
-
Be(c) && u(
|
|
2447
|
+
([, R]) => {
|
|
2448
|
+
Be(c) && u(R !== !1);
|
|
2455
2449
|
}
|
|
2456
2450
|
), Ie(y, () => {
|
|
2457
2451
|
u(Be(m) !== !1);
|
|
2458
|
-
}), Ie(Fe(ae(m), o), ([
|
|
2459
|
-
|
|
2452
|
+
}), Ie(Fe(ae(m), o), ([R, C]) => {
|
|
2453
|
+
R && !C.atBottom && C.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
|
|
2460
2454
|
});
|
|
2461
2455
|
const T = G(null), k = ye();
|
|
2462
2456
|
return te(
|
|
2463
2457
|
ur(
|
|
2464
2458
|
L(
|
|
2465
2459
|
ae(r),
|
|
2466
|
-
U((
|
|
2467
|
-
var
|
|
2468
|
-
return (
|
|
2460
|
+
U((R) => {
|
|
2461
|
+
var C;
|
|
2462
|
+
return (C = R == null ? void 0 : R.length) != null ? C : 0;
|
|
2469
2463
|
})
|
|
2470
2464
|
),
|
|
2471
2465
|
L(ae(t))
|
|
@@ -2475,15 +2469,15 @@ const Ws = (e, t) => typeof e == "function" ? eo(e(t)) : t && eo(e), Ds = xe(
|
|
|
2475
2469
|
L(
|
|
2476
2470
|
Fe(L(k, _t(1)), l),
|
|
2477
2471
|
be(ae(T), c, v, g),
|
|
2478
|
-
U(([[
|
|
2479
|
-
ce((
|
|
2472
|
+
U(([[R, C], h, S, I, _]) => C && S && (h == null ? void 0 : h({ context: _, totalCount: R, scrollingInProgress: I }))),
|
|
2473
|
+
ce((R) => !!R),
|
|
2480
2474
|
mt(0)
|
|
2481
2475
|
),
|
|
2482
|
-
(
|
|
2476
|
+
(R) => {
|
|
2483
2477
|
p && (p(), p = null), Be(n) ? requestAnimationFrame(() => {
|
|
2484
|
-
Be(d)("scrolling into view", {}), ge(b,
|
|
2478
|
+
Be(d)("scrolling into view", {}), ge(b, R);
|
|
2485
2479
|
}) : p = at(e, () => {
|
|
2486
|
-
Be(d)("scrolling into view", {}), ge(b,
|
|
2480
|
+
Be(d)("scrolling into view", {}), ge(b, R), p = null;
|
|
2487
2481
|
});
|
|
2488
2482
|
}
|
|
2489
2483
|
), { autoscrollToBottom: y, followOutput: m, scrollIntoViewOnChange: T };
|
|
@@ -2669,10 +2663,10 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2669
2663
|
l,
|
|
2670
2664
|
be(s),
|
|
2671
2665
|
ht(
|
|
2672
|
-
([, f, u, T], [{ bottom: k, items:
|
|
2673
|
-
const
|
|
2674
|
-
let
|
|
2675
|
-
return u === h && f.length > 0 &&
|
|
2666
|
+
([, f, u, T], [{ bottom: k, items: R, offsetBottom: C, totalCount: h }, S]) => {
|
|
2667
|
+
const I = k + C;
|
|
2668
|
+
let _ = 0;
|
|
2669
|
+
return u === h && f.length > 0 && R.length > 0 && (R[0].originalIndex === 0 && f[0].originalIndex === 0 || (_ = I - T, _ !== 0 && (_ += S))), [_, R, h, I];
|
|
2676
2670
|
},
|
|
2677
2671
|
[0, [], 0, 0]
|
|
2678
2672
|
),
|
|
@@ -2705,20 +2699,20 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2705
2699
|
L(
|
|
2706
2700
|
a,
|
|
2707
2701
|
be(g, d),
|
|
2708
|
-
U(([f, { groupIndices: u, lastSize: T, sizeTree: k },
|
|
2709
|
-
function
|
|
2710
|
-
return h * (T +
|
|
2702
|
+
U(([f, { groupIndices: u, lastSize: T, sizeTree: k }, R]) => {
|
|
2703
|
+
function C(h) {
|
|
2704
|
+
return h * (T + R);
|
|
2711
2705
|
}
|
|
2712
2706
|
if (u.length === 0)
|
|
2713
|
-
return
|
|
2707
|
+
return C(f);
|
|
2714
2708
|
{
|
|
2715
2709
|
let h = 0;
|
|
2716
2710
|
const S = Yt(k, 0);
|
|
2717
|
-
let
|
|
2718
|
-
for (;
|
|
2719
|
-
|
|
2720
|
-
let O = u.length ===
|
|
2721
|
-
|
|
2711
|
+
let I = 0, _ = 0;
|
|
2712
|
+
for (; I < f; ) {
|
|
2713
|
+
I++, h += S;
|
|
2714
|
+
let O = u.length === _ + 1 ? 1 / 0 : u[_ + 1] - u[_] - 1;
|
|
2715
|
+
I + O > f && (h -= S, O = f - I + 1), I += O, h += C(O), _++;
|
|
2722
2716
|
}
|
|
2723
2717
|
return h;
|
|
2724
2718
|
}
|
|
@@ -2796,16 +2790,16 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2796
2790
|
u,
|
|
2797
2791
|
T,
|
|
2798
2792
|
k,
|
|
2799
|
-
{ scrollToIndex:
|
|
2800
|
-
|
|
2793
|
+
{ scrollToIndex: R },
|
|
2794
|
+
C,
|
|
2801
2795
|
{ topItemCount: h },
|
|
2802
2796
|
{ groupCounts: S },
|
|
2803
|
-
|
|
2797
|
+
I
|
|
2804
2798
|
]) => {
|
|
2805
|
-
const { listState:
|
|
2806
|
-
return te(w,
|
|
2799
|
+
const { listState: _, minOverscanItemCount: O, topItemsIndexes: P, rangeChanged: w, ...E } = k;
|
|
2800
|
+
return te(w, I.scrollSeekRangeChanged), te(
|
|
2807
2801
|
L(
|
|
2808
|
-
|
|
2802
|
+
I.windowViewportRect,
|
|
2809
2803
|
U((A) => A.visibleHeight)
|
|
2810
2804
|
),
|
|
2811
2805
|
f.viewportHeight
|
|
@@ -2829,9 +2823,9 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2829
2823
|
...T,
|
|
2830
2824
|
groupIndices: s,
|
|
2831
2825
|
itemSize: l,
|
|
2832
|
-
listState:
|
|
2826
|
+
listState: _,
|
|
2833
2827
|
minOverscanItemCount: O,
|
|
2834
|
-
scrollToIndex:
|
|
2828
|
+
scrollToIndex: R,
|
|
2835
2829
|
// output
|
|
2836
2830
|
statefulTotalCount: v,
|
|
2837
2831
|
trackItemSizes: b,
|
|
@@ -2839,7 +2833,7 @@ const Ks = mi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2839
2833
|
rangeChanged: w,
|
|
2840
2834
|
...E,
|
|
2841
2835
|
// the bag of IO from featureGroup1System
|
|
2842
|
-
...
|
|
2836
|
+
...I,
|
|
2843
2837
|
...f,
|
|
2844
2838
|
sizes: d,
|
|
2845
2839
|
...u
|
|
@@ -2897,18 +2891,18 @@ function vi(e, t, n) {
|
|
|
2897
2891
|
const v = N.forwardRef((p, f) => {
|
|
2898
2892
|
const { children: u, ...T } = p, [k] = N.useState(() => _n(gs(e), (h) => {
|
|
2899
2893
|
l(h, T);
|
|
2900
|
-
})), [
|
|
2894
|
+
})), [R] = N.useState(Vr(d, k));
|
|
2901
2895
|
dn(() => {
|
|
2902
2896
|
for (const h of s)
|
|
2903
|
-
h in T && Ie(
|
|
2897
|
+
h in T && Ie(R[h], T[h]);
|
|
2904
2898
|
return () => {
|
|
2905
|
-
Object.values(
|
|
2899
|
+
Object.values(R).map(yr);
|
|
2906
2900
|
};
|
|
2907
|
-
}, [T,
|
|
2901
|
+
}, [T, R, k]), dn(() => {
|
|
2908
2902
|
l(k, T);
|
|
2909
2903
|
}), N.useImperativeHandle(f, $r(a(k)));
|
|
2910
|
-
const
|
|
2911
|
-
return /* @__PURE__ */ x(c.Provider, { value: k, children: n ? /* @__PURE__ */ x(
|
|
2904
|
+
const C = n;
|
|
2905
|
+
return /* @__PURE__ */ x(c.Provider, { value: k, children: n ? /* @__PURE__ */ x(C, { ...Xs([...r, ...o, ...s], T), children: u }) : u });
|
|
2912
2906
|
}), g = (p) => {
|
|
2913
2907
|
const f = N.useContext(c);
|
|
2914
2908
|
return N.useCallback(
|
|
@@ -3057,7 +3051,7 @@ const Js = /* @__PURE__ */ xe(() => {
|
|
|
3057
3051
|
Er("deviation", (E) => {
|
|
3058
3052
|
f !== E && u(E);
|
|
3059
3053
|
});
|
|
3060
|
-
const T = fe("EmptyPlaceholder"), k = fe("ScrollSeekPlaceholder") || tl,
|
|
3054
|
+
const T = fe("EmptyPlaceholder"), k = fe("ScrollSeekPlaceholder") || tl, R = fe("ListComponent"), C = fe("ItemComponent"), h = fe("GroupComponent"), S = fe("computeItemKey"), I = fe("isSeeking"), _ = fe("groupIndices").length > 0, O = fe("alignToBottom"), P = fe("initialItemFinalLocationReached"), w = e ? {} : {
|
|
3061
3055
|
boxSizing: "border-box",
|
|
3062
3056
|
...y ? {
|
|
3063
3057
|
display: "inline-block",
|
|
@@ -3074,15 +3068,15 @@ const Js = /* @__PURE__ */ xe(() => {
|
|
|
3074
3068
|
...P ? {} : { visibility: "hidden" }
|
|
3075
3069
|
};
|
|
3076
3070
|
return !e && t.totalCount === 0 && T ? /* @__PURE__ */ x(T, { ...qe(T, a) }) : /* @__PURE__ */ x(
|
|
3077
|
-
|
|
3071
|
+
R,
|
|
3078
3072
|
{
|
|
3079
|
-
...qe(
|
|
3073
|
+
...qe(R, a),
|
|
3080
3074
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
3081
3075
|
ref: p,
|
|
3082
3076
|
style: w,
|
|
3083
3077
|
children: (e ? t.topItems : t.items).map((E) => {
|
|
3084
3078
|
const A = E.originalIndex, W = S(A + t.firstItemIndex, E.data, a);
|
|
3085
|
-
return
|
|
3079
|
+
return I ? /* @__PURE__ */ hn(
|
|
3086
3080
|
k,
|
|
3087
3081
|
{
|
|
3088
3082
|
...qe(k, a),
|
|
@@ -3104,10 +3098,10 @@ const Js = /* @__PURE__ */ xe(() => {
|
|
|
3104
3098
|
},
|
|
3105
3099
|
d(E.index, a)
|
|
3106
3100
|
) : /* @__PURE__ */ hn(
|
|
3107
|
-
|
|
3101
|
+
C,
|
|
3108
3102
|
{
|
|
3109
|
-
...qe(
|
|
3110
|
-
...ll(
|
|
3103
|
+
...qe(C, a),
|
|
3104
|
+
...ll(C, E.data),
|
|
3111
3105
|
"data-index": A,
|
|
3112
3106
|
"data-item-group-index": E.groupIndex,
|
|
3113
3107
|
"data-item-index": E.index,
|
|
@@ -3115,7 +3109,7 @@ const Js = /* @__PURE__ */ xe(() => {
|
|
|
3115
3109
|
key: W,
|
|
3116
3110
|
style: y ? rl : Ii
|
|
3117
3111
|
},
|
|
3118
|
-
|
|
3112
|
+
_ ? l(E.index, E.groupIndex, E.data, a) : l(E.index, E.data, a)
|
|
3119
3113
|
);
|
|
3120
3114
|
})
|
|
3121
3115
|
}
|
|
@@ -3402,9 +3396,9 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3402
3396
|
b,
|
|
3403
3397
|
{ didMount: m, propsReady: y },
|
|
3404
3398
|
{ customScrollParent: p, useWindowScroll: f, windowScrollContainerState: u, windowScrollTo: T, windowViewportRect: k },
|
|
3405
|
-
|
|
3399
|
+
R
|
|
3406
3400
|
]) => {
|
|
3407
|
-
const
|
|
3401
|
+
const C = G(0), h = G(0), S = G(ro), I = G({ height: 0, width: 0 }), _ = G({ height: 0, width: 0 }), O = ye(), P = ye(), w = G(0), E = G(null), A = G({ column: 0, row: 0 }), W = ye(), M = ye(), B = G(!1), F = G(0), D = G(!0), q = G(!1), ue = G(!1);
|
|
3408
3402
|
Ie(
|
|
3409
3403
|
L(
|
|
3410
3404
|
m,
|
|
@@ -3412,18 +3406,18 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3412
3406
|
ce(([z, K]) => !!K)
|
|
3413
3407
|
),
|
|
3414
3408
|
() => {
|
|
3415
|
-
ge(
|
|
3409
|
+
ge(D, !1);
|
|
3416
3410
|
}
|
|
3417
3411
|
), Ie(
|
|
3418
3412
|
L(
|
|
3419
|
-
Fe(m,
|
|
3413
|
+
Fe(m, D, _, I, F, q),
|
|
3420
3414
|
ce(([z, K, ne, H, , oe]) => z && !K && ne.height !== 0 && H.height !== 0 && !oe)
|
|
3421
3415
|
),
|
|
3422
3416
|
([, , , , z]) => {
|
|
3423
3417
|
ge(q, !0), Cr(1, () => {
|
|
3424
3418
|
ge(O, z);
|
|
3425
3419
|
}), at(L(a), () => {
|
|
3426
|
-
ge(t, [0, 0]), ge(
|
|
3420
|
+
ge(t, [0, 0]), ge(D, !0);
|
|
3427
3421
|
});
|
|
3428
3422
|
}
|
|
3429
3423
|
), te(
|
|
@@ -3440,21 +3434,21 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3440
3434
|
ce(([, z]) => z != null)
|
|
3441
3435
|
),
|
|
3442
3436
|
([, z]) => {
|
|
3443
|
-
z && (ge(
|
|
3437
|
+
z && (ge(I, z.viewport), ge(_, z.item), ge(A, z.gap), z.scrollTop > 0 && (ge(B, !0), at(L(a, _t(1)), (K) => {
|
|
3444
3438
|
ge(B, !1);
|
|
3445
3439
|
}), ge(l, { top: z.scrollTop })));
|
|
3446
3440
|
}
|
|
3447
3441
|
), te(
|
|
3448
3442
|
L(
|
|
3449
|
-
|
|
3443
|
+
I,
|
|
3450
3444
|
U(({ height: z }) => z)
|
|
3451
3445
|
),
|
|
3452
3446
|
v
|
|
3453
3447
|
), te(
|
|
3454
3448
|
L(
|
|
3455
3449
|
Fe(
|
|
3456
|
-
ae(
|
|
3457
|
-
ae(
|
|
3450
|
+
ae(I, fn),
|
|
3451
|
+
ae(_, fn),
|
|
3458
3452
|
ae(A, (z, K) => z && z.column === K.column && z.row === K.row),
|
|
3459
3453
|
ae(a)
|
|
3460
3454
|
),
|
|
@@ -3469,15 +3463,15 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3469
3463
|
), te(
|
|
3470
3464
|
L(
|
|
3471
3465
|
Fe(
|
|
3472
|
-
ae(
|
|
3466
|
+
ae(C),
|
|
3473
3467
|
r,
|
|
3474
3468
|
ae(A, xl),
|
|
3475
|
-
ae(
|
|
3476
|
-
ae(
|
|
3469
|
+
ae(_, fn),
|
|
3470
|
+
ae(I, fn),
|
|
3477
3471
|
ae(E),
|
|
3478
3472
|
ae(h),
|
|
3479
3473
|
ae(B),
|
|
3480
|
-
ae(
|
|
3474
|
+
ae(D),
|
|
3481
3475
|
ae(F)
|
|
3482
3476
|
),
|
|
3483
3477
|
ce(([, , , , , , , z]) => !z),
|
|
@@ -3487,14 +3481,14 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3487
3481
|
[K, ne],
|
|
3488
3482
|
H,
|
|
3489
3483
|
oe,
|
|
3490
|
-
|
|
3484
|
+
V,
|
|
3491
3485
|
J,
|
|
3492
3486
|
se,
|
|
3493
3487
|
,
|
|
3494
3488
|
re,
|
|
3495
3489
|
pe
|
|
3496
3490
|
]) => {
|
|
3497
|
-
const { column: le, row: we } = H, { height: me, width: Te } = oe, { width: Oe } =
|
|
3491
|
+
const { column: le, row: we } = H, { height: me, width: Te } = oe, { width: Oe } = V;
|
|
3498
3492
|
if (se === 0 && (z === 0 || Oe === 0))
|
|
3499
3493
|
return ro;
|
|
3500
3494
|
if (Te === 0) {
|
|
@@ -3504,7 +3498,7 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3504
3498
|
const Ne = ki(Oe, Te, le);
|
|
3505
3499
|
let Le, $e;
|
|
3506
3500
|
re ? K === 0 && ne === 0 && se > 0 ? (Le = 0, $e = se - 1) : (Le = Ne * Sn((K + we) / (me + we)), $e = Ne * oo((ne + we) / (me + we)) - 1, $e = Vn(z - 1, Kt($e, Ne - 1)), Le = Vn($e, Kt(0, Le))) : (Le = 0, $e = -1);
|
|
3507
|
-
const ut = so(Le, $e, J), { bottom: Qe, top: He } = lo(
|
|
3501
|
+
const ut = so(Le, $e, J), { bottom: Qe, top: He } = lo(V, H, oe, ut), ot = oo(z / Ne), Je = ot * me + (ot - 1) * we - Qe;
|
|
3508
3502
|
return { bottom: Qe, itemHeight: me, items: ut, itemWidth: Te, offsetBottom: Je, offsetTop: He, top: He };
|
|
3509
3503
|
}
|
|
3510
3504
|
)
|
|
@@ -3516,14 +3510,14 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3516
3510
|
ce((z) => z !== null),
|
|
3517
3511
|
U((z) => z.length)
|
|
3518
3512
|
),
|
|
3519
|
-
|
|
3513
|
+
C
|
|
3520
3514
|
), te(
|
|
3521
3515
|
L(
|
|
3522
|
-
Fe(
|
|
3516
|
+
Fe(I, _, S, A),
|
|
3523
3517
|
ce(([z, K, { items: ne }]) => ne.length > 0 && K.height !== 0 && z.height !== 0),
|
|
3524
3518
|
U(([z, K, { items: ne }, H]) => {
|
|
3525
|
-
const { bottom: oe, top:
|
|
3526
|
-
return [
|
|
3519
|
+
const { bottom: oe, top: V } = lo(z, H, K, ne);
|
|
3520
|
+
return [V, oe];
|
|
3527
3521
|
}),
|
|
3528
3522
|
Me(Xt)
|
|
3529
3523
|
),
|
|
@@ -3540,7 +3534,7 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3540
3534
|
);
|
|
3541
3535
|
const ke = Ze(
|
|
3542
3536
|
L(
|
|
3543
|
-
Fe(S,
|
|
3537
|
+
Fe(S, C),
|
|
3544
3538
|
ce(([{ items: z }]) => z.length > 0),
|
|
3545
3539
|
be(de),
|
|
3546
3540
|
ce(([[z, K], ne]) => {
|
|
@@ -3573,10 +3567,10 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3573
3567
|
te(ee, b.scrollSeekRangeChanged), te(
|
|
3574
3568
|
L(
|
|
3575
3569
|
O,
|
|
3576
|
-
be(
|
|
3570
|
+
be(I, _, C, A),
|
|
3577
3571
|
U(([z, K, ne, H, oe]) => {
|
|
3578
|
-
const
|
|
3579
|
-
let pe =
|
|
3572
|
+
const V = ci(z), { align: J, behavior: se, offset: re } = V;
|
|
3573
|
+
let pe = V.index;
|
|
3580
3574
|
pe === "LAST" && (pe = H - 1), pe = Kt(0, pe, Vn(H - 1, pe));
|
|
3581
3575
|
let le = gr(K, oe, ne, pe);
|
|
3582
3576
|
return J === "end" ? le = io(le - K.height + ne.height) : J === "center" && (le = io(le - K.height / 2 + ne.height / 2)), re && (le += re), { behavior: se, top: le };
|
|
@@ -3596,7 +3590,7 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3596
3590
|
k,
|
|
3597
3591
|
U((z) => ({ height: z.visibleHeight, width: z.visibleWidth }))
|
|
3598
3592
|
),
|
|
3599
|
-
|
|
3593
|
+
I
|
|
3600
3594
|
), {
|
|
3601
3595
|
customScrollParent: p,
|
|
3602
3596
|
// input
|
|
@@ -3607,7 +3601,7 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3607
3601
|
headerHeight: i,
|
|
3608
3602
|
increaseViewportBy: e,
|
|
3609
3603
|
initialItemCount: h,
|
|
3610
|
-
itemDimensions:
|
|
3604
|
+
itemDimensions: _,
|
|
3611
3605
|
overscan: n,
|
|
3612
3606
|
restoreStateFrom: M,
|
|
3613
3607
|
scrollBy: s,
|
|
@@ -3617,9 +3611,9 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3617
3611
|
scrollToIndex: O,
|
|
3618
3612
|
scrollTop: a,
|
|
3619
3613
|
smoothScrollTargetReached: d,
|
|
3620
|
-
totalCount:
|
|
3614
|
+
totalCount: C,
|
|
3621
3615
|
useWindowScroll: f,
|
|
3622
|
-
viewportDimensions:
|
|
3616
|
+
viewportDimensions: I,
|
|
3623
3617
|
windowScrollContainerState: u,
|
|
3624
3618
|
windowScrollTo: T,
|
|
3625
3619
|
windowViewportRect: k,
|
|
@@ -3636,7 +3630,7 @@ const wl = /* @__PURE__ */ xe(
|
|
|
3636
3630
|
startReached: Re,
|
|
3637
3631
|
stateChanged: W,
|
|
3638
3632
|
stateRestoreInProgress: B,
|
|
3639
|
-
...
|
|
3633
|
+
...R
|
|
3640
3634
|
};
|
|
3641
3635
|
},
|
|
3642
3636
|
Ee(kr, Ke, ln, gi, It, Rr, wt)
|
|
@@ -3693,8 +3687,8 @@ const Il = /* @__PURE__ */ xe(() => {
|
|
|
3693
3687
|
s(u);
|
|
3694
3688
|
const T = f.firstChild;
|
|
3695
3689
|
if (T) {
|
|
3696
|
-
const { height: k, width:
|
|
3697
|
-
v({ height: k, width:
|
|
3690
|
+
const { height: k, width: R } = T.getBoundingClientRect();
|
|
3691
|
+
v({ height: k, width: R });
|
|
3698
3692
|
}
|
|
3699
3693
|
g({
|
|
3700
3694
|
column: ao("column-gap", getComputedStyle(f).columnGap, b),
|
|
@@ -3910,12 +3904,12 @@ const Ul = Object.freeze({
|
|
|
3910
3904
|
pointerColor: void 0
|
|
3911
3905
|
}), _i = N.memo(
|
|
3912
3906
|
function({ runs: t, ns: n, baseIndex: r, preGroups: o }) {
|
|
3913
|
-
const i = _e((
|
|
3914
|
-
(
|
|
3907
|
+
const i = _e((I) => I.setClipIndex), s = _e((I) => I.seek), c = j((I) => I.setCurrentGlobalRunIndex), l = yn(), a = j((I) => I.rangeStartGI), d = j((I) => I.rangeEndGI), v = j((I) => I.setRange), g = a != null && d != null, b = Z(
|
|
3908
|
+
(I) => {
|
|
3915
3909
|
var M;
|
|
3916
|
-
const
|
|
3917
|
-
if (!
|
|
3918
|
-
const O = Number(
|
|
3910
|
+
const _ = (M = I.target) == null ? void 0 : M.closest("[data-g]");
|
|
3911
|
+
if (!_) return;
|
|
3912
|
+
const O = Number(_.dataset.g), P = O - r;
|
|
3919
3913
|
if (P < 0 || P >= t.length) return;
|
|
3920
3914
|
const w = t[P], E = w.text ?? "";
|
|
3921
3915
|
if (!E.trim() || !/[가-힣a-zA-Z0-9]/.test(E)) return;
|
|
@@ -3925,11 +3919,11 @@ const Ul = Object.freeze({
|
|
|
3925
3919
|
},
|
|
3926
3920
|
[t, r, s, i, c]
|
|
3927
3921
|
), m = ie(null), y = ie(!1), p = Z(
|
|
3928
|
-
(
|
|
3922
|
+
(I) => {
|
|
3929
3923
|
var w;
|
|
3930
|
-
const
|
|
3931
|
-
if (!
|
|
3932
|
-
const O = Number(
|
|
3924
|
+
const _ = (w = I.target) == null ? void 0 : w.closest("[data-g]");
|
|
3925
|
+
if (!_) return;
|
|
3926
|
+
const O = Number(_.dataset.g), P = O - r;
|
|
3933
3927
|
P < 0 || P >= t.length || (y.current = !1, m.current && (window.clearTimeout(m.current), m.current = null), m.current = window.setTimeout(() => {
|
|
3934
3928
|
l.getState().status !== "playing" && (v(O, O), y.current = !0, m.current = null);
|
|
3935
3929
|
}, 800));
|
|
@@ -3939,40 +3933,40 @@ const Ul = Object.freeze({
|
|
|
3939
3933
|
m.current && (window.clearTimeout(m.current), m.current = null);
|
|
3940
3934
|
}, []), u = Z(() => {
|
|
3941
3935
|
f();
|
|
3942
|
-
}, [f]), T = f, k = f,
|
|
3943
|
-
(
|
|
3936
|
+
}, [f]), T = f, k = f, R = j((I) => I.clearRange), C = Z(
|
|
3937
|
+
(I) => {
|
|
3944
3938
|
var P;
|
|
3945
3939
|
if (y.current) {
|
|
3946
3940
|
y.current = !1;
|
|
3947
3941
|
return;
|
|
3948
3942
|
}
|
|
3949
|
-
const
|
|
3950
|
-
if (!
|
|
3951
|
-
const O = Number(
|
|
3952
|
-
isNaN(O) || g && a != null && d != null && (
|
|
3943
|
+
const _ = (P = I.target) == null ? void 0 : P.closest("[data-g]");
|
|
3944
|
+
if (!_) return;
|
|
3945
|
+
const O = Number(_.dataset.g);
|
|
3946
|
+
isNaN(O) || g && a != null && d != null && (R(), I.stopPropagation());
|
|
3953
3947
|
},
|
|
3954
|
-
[g, a, d,
|
|
3948
|
+
[g, a, d, R]
|
|
3955
3949
|
), h = o, S = r + t.length - 1;
|
|
3956
3950
|
return /* @__PURE__ */ x(
|
|
3957
3951
|
"span",
|
|
3958
3952
|
{
|
|
3959
|
-
onClick:
|
|
3953
|
+
onClick: C,
|
|
3960
3954
|
onDoubleClick: b,
|
|
3961
3955
|
onPointerDown: p,
|
|
3962
3956
|
onPointerUp: u,
|
|
3963
3957
|
onPointerCancel: T,
|
|
3964
3958
|
onPointerLeave: k,
|
|
3965
|
-
children: h.map((
|
|
3959
|
+
children: h.map((I, _) => /* @__PURE__ */ x(
|
|
3966
3960
|
Ql,
|
|
3967
3961
|
{
|
|
3968
3962
|
ns: n,
|
|
3969
|
-
group:
|
|
3963
|
+
group: I,
|
|
3970
3964
|
runs: t,
|
|
3971
3965
|
paraLastG: S,
|
|
3972
3966
|
rangeStartGI: a,
|
|
3973
3967
|
rangeEndGI: d
|
|
3974
3968
|
},
|
|
3975
|
-
`${n}/grp:${
|
|
3969
|
+
`${n}/grp:${_}-${I.startG}`
|
|
3976
3970
|
))
|
|
3977
3971
|
}
|
|
3978
3972
|
);
|
|
@@ -4020,7 +4014,7 @@ const Ul = Object.freeze({
|
|
|
4020
4014
|
"--ul-offset": "0.35em"
|
|
4021
4015
|
} : void 0;
|
|
4022
4016
|
return /* @__PURE__ */ x(yt, { children: Array.from({ length: g }).map((p, f) => {
|
|
4023
|
-
const T = r[v + f], k = n.startG + f,
|
|
4017
|
+
const T = r[v + f], k = n.startG + f, R = `${t}/run:${k}`, C = !!T.split && k !== o;
|
|
4024
4018
|
let h = `${ft.runWrap}`;
|
|
4025
4019
|
return b && (g === 1 ? h += ` ${ft.highlight}` : f === 0 ? h += ` ${ft.highlightleft}` : f + 1 === g ? h += ` ${ft.highlightright}` : h += ` ${ft.highlightcenter}`), m && (g === 1 ? h += ` ${ft.underline}` : f === 0 ? h += ` ${ft.underlineleft}` : f + 1 === g ? h += ` ${ft.underlineright}` : h += ` ${ft.underlinecenter}`), /* @__PURE__ */ X(N.Fragment, { children: [
|
|
4026
4020
|
/* @__PURE__ */ x("span", { className: h, style: y, children: /* @__PURE__ */ x(
|
|
@@ -4034,8 +4028,8 @@ const Ul = Object.freeze({
|
|
|
4034
4028
|
isInRange: i != null && s != null && k >= i && k <= s
|
|
4035
4029
|
}
|
|
4036
4030
|
) }),
|
|
4037
|
-
|
|
4038
|
-
] },
|
|
4031
|
+
C && /* @__PURE__ */ x(Kl, {})
|
|
4032
|
+
] }, R);
|
|
4039
4033
|
}) });
|
|
4040
4034
|
},
|
|
4041
4035
|
(e, t) => e.group === t.group && // 그룹 메타 참조 동일
|
|
@@ -4330,7 +4324,7 @@ function st(e, t) {
|
|
|
4330
4324
|
return Tn(n, e, t);
|
|
4331
4325
|
}
|
|
4332
4326
|
const Oi = () => {
|
|
4333
|
-
const e = j((r) => r.section), t = Ei(), n = e.
|
|
4327
|
+
const e = j((r) => r.section), t = Ei(), n = e.quizzes;
|
|
4334
4328
|
return !n || !n.length ? null : /* @__PURE__ */ X(
|
|
4335
4329
|
"button",
|
|
4336
4330
|
{
|
|
@@ -4620,24 +4614,24 @@ function wa({
|
|
|
4620
4614
|
nsPrefix: n
|
|
4621
4615
|
}) {
|
|
4622
4616
|
const r = ve(() => {
|
|
4623
|
-
const
|
|
4617
|
+
const I = [], _ = Or();
|
|
4624
4618
|
return t.forEach((O, P) => {
|
|
4625
|
-
O.type === "paragraph" && (
|
|
4626
|
-
}),
|
|
4627
|
-
}, [t]), o = j((
|
|
4628
|
-
var
|
|
4629
|
-
return ((
|
|
4630
|
-
}), i = j((
|
|
4631
|
-
var
|
|
4632
|
-
return ((
|
|
4633
|
-
}), s = Y((
|
|
4619
|
+
O.type === "paragraph" && (I[P] = Pr(O, _));
|
|
4620
|
+
}), I;
|
|
4621
|
+
}, [t]), o = j((I) => {
|
|
4622
|
+
var _;
|
|
4623
|
+
return ((_ = I.layout) == null ? void 0 : _.prefix) ?? [];
|
|
4624
|
+
}), i = j((I) => {
|
|
4625
|
+
var _;
|
|
4626
|
+
return ((_ = I.derivedNav) == null ? void 0 : _.splitGroupsPerBlock) ?? [];
|
|
4627
|
+
}), s = Y((I) => I.marginX), c = Y((I) => I.viewportHeight), l = ie({
|
|
4634
4628
|
start: 0,
|
|
4635
4629
|
end: 0
|
|
4636
4630
|
}), a = Z(
|
|
4637
|
-
(
|
|
4638
|
-
const
|
|
4639
|
-
if (
|
|
4640
|
-
const { src: E, alt: A, width: W, height: M } =
|
|
4631
|
+
(I) => {
|
|
4632
|
+
const _ = t[I], O = `${n}blk-${_.id}`;
|
|
4633
|
+
if (_.type === "image") {
|
|
4634
|
+
const { src: E, alt: A, width: W, height: M } = _, B = W && M ? `${W} / ${M}` : "4 / 3", F = I >= l.current.start && I <= l.current.end, D = c > 80 ? Math.floor((c - 80) * 0.6) : void 0;
|
|
4641
4635
|
return /* @__PURE__ */ X("div", { style: { margin: "12px 0", textAlign: "center", width: "100%" }, children: [
|
|
4642
4636
|
/* @__PURE__ */ x(
|
|
4643
4637
|
"div",
|
|
@@ -4645,7 +4639,7 @@ function wa({
|
|
|
4645
4639
|
style: {
|
|
4646
4640
|
position: "relative",
|
|
4647
4641
|
width: "100%",
|
|
4648
|
-
maxHeight:
|
|
4642
|
+
maxHeight: D,
|
|
4649
4643
|
aspectRatio: B
|
|
4650
4644
|
},
|
|
4651
4645
|
children: /* @__PURE__ */ x(
|
|
@@ -4671,7 +4665,7 @@ function wa({
|
|
|
4671
4665
|
A && /* @__PURE__ */ x("div", { style: { fontSize: 12, color: "#6b7280", marginTop: 4 }, children: A })
|
|
4672
4666
|
] });
|
|
4673
4667
|
}
|
|
4674
|
-
const P = r[
|
|
4668
|
+
const P = r[I] ?? void 0, w = i[I];
|
|
4675
4669
|
return /* @__PURE__ */ x(
|
|
4676
4670
|
"div",
|
|
4677
4671
|
{
|
|
@@ -4682,10 +4676,10 @@ function wa({
|
|
|
4682
4676
|
children: /* @__PURE__ */ x(
|
|
4683
4677
|
Zl,
|
|
4684
4678
|
{
|
|
4685
|
-
block:
|
|
4679
|
+
block: _,
|
|
4686
4680
|
computedMarker: P,
|
|
4687
4681
|
ns: O,
|
|
4688
|
-
baseIndex: o[
|
|
4682
|
+
baseIndex: o[I],
|
|
4689
4683
|
sectionId: e.section_id,
|
|
4690
4684
|
preGroups: w
|
|
4691
4685
|
}
|
|
@@ -4694,12 +4688,12 @@ function wa({
|
|
|
4694
4688
|
);
|
|
4695
4689
|
},
|
|
4696
4690
|
[t, r, o, n, e, i, c]
|
|
4697
|
-
), d = ie(null), v = Z((
|
|
4698
|
-
d.current =
|
|
4691
|
+
), d = ie(null), v = Z((I) => {
|
|
4692
|
+
d.current = I;
|
|
4699
4693
|
}, []), g = ve(
|
|
4700
|
-
() => Wt((
|
|
4701
|
-
const { style:
|
|
4702
|
-
return /* @__PURE__ */ x("div", { ...P, style:
|
|
4694
|
+
() => Wt((I) => {
|
|
4695
|
+
const { style: _, children: O, ...P } = I;
|
|
4696
|
+
return /* @__PURE__ */ x("div", { ...P, style: _, children: /* @__PURE__ */ x(
|
|
4703
4697
|
"div",
|
|
4704
4698
|
{
|
|
4705
4699
|
style: {
|
|
@@ -4718,7 +4712,7 @@ function wa({
|
|
|
4718
4712
|
) });
|
|
4719
4713
|
}),
|
|
4720
4714
|
[s]
|
|
4721
|
-
), b = ie(null), m = ve(() => t.map((
|
|
4715
|
+
), b = ie(null), m = ve(() => t.map((I) => I.id), [t]), [y, p] = et(!1);
|
|
4722
4716
|
Se(() => {
|
|
4723
4717
|
p(!1);
|
|
4724
4718
|
}, [t]);
|
|
@@ -4727,11 +4721,11 @@ function wa({
|
|
|
4727
4721
|
}, []), u = Z(() => {
|
|
4728
4722
|
if (!y)
|
|
4729
4723
|
return /* @__PURE__ */ x("div", { style: { height: 40 } });
|
|
4730
|
-
const
|
|
4731
|
-
return
|
|
4724
|
+
const I = e.quizzes, _ = Math.max(80, Math.floor(c * 0.5));
|
|
4725
|
+
return I && I.length ? /* @__PURE__ */ X("div", { style: { display: "block" }, children: [
|
|
4732
4726
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Oi, {}) }),
|
|
4733
4727
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Cn, { isIcon: !1 }) }),
|
|
4734
|
-
/* @__PURE__ */ x("div", { style: { height:
|
|
4728
|
+
/* @__PURE__ */ x("div", { style: { height: _, width: "100%" } })
|
|
4735
4729
|
] }) : /* @__PURE__ */ X("div", { children: [
|
|
4736
4730
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Cn, { isIcon: !1 }) }),
|
|
4737
4731
|
/* @__PURE__ */ x("div", { style: { height: 40 } })
|
|
@@ -4750,28 +4744,28 @@ function wa({
|
|
|
4750
4744
|
// , ScrollPlaceholder
|
|
4751
4745
|
]
|
|
4752
4746
|
// CustomScroller는 고정이면 deps에 안 넣어도 OK
|
|
4753
|
-
), k = Z((
|
|
4747
|
+
), k = Z((I) => m[I], [m]), R = Rt(), [C] = et(() => R.getState().progress.currentGlobalRunIndex ?? 0), h = ve(() => {
|
|
4754
4748
|
if (!o.length) return 0;
|
|
4755
|
-
const
|
|
4756
|
-
return zi(o,
|
|
4757
|
-
}, [o,
|
|
4749
|
+
const I = o[o.length - 1], _ = Math.max(0, Math.min(C, I));
|
|
4750
|
+
return zi(o, _);
|
|
4751
|
+
}, [o, C]);
|
|
4758
4752
|
console.log("SectionRenderVirtuoso확인");
|
|
4759
4753
|
const S = Rt();
|
|
4760
4754
|
return Se(() => {
|
|
4761
|
-
let
|
|
4755
|
+
let I = !1;
|
|
4762
4756
|
return (async () => {
|
|
4763
|
-
let
|
|
4764
|
-
if (!
|
|
4757
|
+
let _ = d.current;
|
|
4758
|
+
if (!_) {
|
|
4765
4759
|
for (let E = 0; E < 20; E++) {
|
|
4766
|
-
if (await new Promise((A) => setTimeout(A, 50)),
|
|
4767
|
-
if (
|
|
4760
|
+
if (await new Promise((A) => setTimeout(A, 50)), I) return;
|
|
4761
|
+
if (_ = d.current, _) break;
|
|
4768
4762
|
}
|
|
4769
|
-
if (!
|
|
4763
|
+
if (!_) return;
|
|
4770
4764
|
}
|
|
4771
4765
|
const O = S.getState().progress.currentGlobalRunIndex, P = S.getState().progress.setSectionLoading, w = O != null && O >= 0 ? O : 0;
|
|
4772
|
-
await Mi(
|
|
4766
|
+
await Mi(_, w), !I && (await vt(), await vt(), await vt(), await vt(), !I && P(!1));
|
|
4773
4767
|
})(), () => {
|
|
4774
|
-
|
|
4768
|
+
I = !0;
|
|
4775
4769
|
};
|
|
4776
4770
|
}, [d, S]), /* @__PURE__ */ X(yt, { children: [
|
|
4777
4771
|
/* @__PURE__ */ x(
|
|
@@ -4833,8 +4827,8 @@ const Ia = ({
|
|
|
4833
4827
|
let B = 0;
|
|
4834
4828
|
const F = w.querySelector(`[data-g="${E}"]`);
|
|
4835
4829
|
if (F) {
|
|
4836
|
-
const
|
|
4837
|
-
B = (F.getBoundingClientRect().top -
|
|
4830
|
+
const D = w.getBoundingClientRect();
|
|
4831
|
+
B = (F.getBoundingClientRect().top - D.top) / D.height;
|
|
4838
4832
|
}
|
|
4839
4833
|
l.getState().emit({
|
|
4840
4834
|
type: "scroll",
|
|
@@ -4853,7 +4847,7 @@ const Ia = ({
|
|
|
4853
4847
|
s || a.current && (f.current || (y(w), p(w)));
|
|
4854
4848
|
},
|
|
4855
4849
|
[s, y, p]
|
|
4856
|
-
), T = ie(void 0), k = ie(void 0),
|
|
4850
|
+
), T = ie(void 0), k = ie(void 0), R = ie(void 0), C = ie(void 0);
|
|
4857
4851
|
Se(() => {
|
|
4858
4852
|
const w = e.current;
|
|
4859
4853
|
if (w)
|
|
@@ -4861,10 +4855,10 @@ const Ia = ({
|
|
|
4861
4855
|
a.current = !0;
|
|
4862
4856
|
}, k.current = () => {
|
|
4863
4857
|
a.current = !0;
|
|
4864
|
-
},
|
|
4858
|
+
}, R.current = () => {
|
|
4865
4859
|
a.current = !0;
|
|
4866
|
-
},
|
|
4867
|
-
w.removeEventListener("wheel", T.current), w.removeEventListener("touchmove", k.current), window.removeEventListener("keydown",
|
|
4860
|
+
}, C.current = () => u(w), w.addEventListener("wheel", T.current, { passive: !0 }), w.addEventListener("touchmove", k.current, { passive: !0 }), window.addEventListener("keydown", R.current, { passive: !0 }), w.addEventListener("scroll", C.current, { passive: !0 }), () => {
|
|
4861
|
+
w.removeEventListener("wheel", T.current), w.removeEventListener("touchmove", k.current), window.removeEventListener("keydown", R.current), w.removeEventListener("scroll", C.current), d.current != null && cancelAnimationFrame(d.current), g.current != null && (clearTimeout(g.current), g.current = null);
|
|
4868
4862
|
};
|
|
4869
4863
|
}, [u, e]), Se(() => {
|
|
4870
4864
|
const w = e.current;
|
|
@@ -4886,15 +4880,15 @@ const Ia = ({
|
|
|
4886
4880
|
const h = ie({
|
|
4887
4881
|
first: -1,
|
|
4888
4882
|
last: -1
|
|
4889
|
-
}), S = ie(!1),
|
|
4883
|
+
}), S = ie(!1), I = Z(() => {
|
|
4890
4884
|
const w = e.current;
|
|
4891
4885
|
if (!w) return;
|
|
4892
4886
|
const E = go(w), A = (E == null ? void 0 : E.first) ?? -1, W = (E == null ? void 0 : E.last) ?? -1;
|
|
4893
4887
|
h.current = { first: A, last: W };
|
|
4894
|
-
}, [e]),
|
|
4888
|
+
}, [e]), _ = ie(!1), O = Z(() => {
|
|
4895
4889
|
const w = e.current;
|
|
4896
|
-
if (!w ||
|
|
4897
|
-
|
|
4890
|
+
if (!w || _.current) return;
|
|
4891
|
+
_.current = !0;
|
|
4898
4892
|
const E = Math.min(
|
|
4899
4893
|
w.scrollTop + Math.floor(w.clientHeight * 0.6),
|
|
4900
4894
|
w.scrollHeight - w.clientHeight
|
|
@@ -4904,8 +4898,8 @@ const Ia = ({
|
|
|
4904
4898
|
});
|
|
4905
4899
|
}, [e]);
|
|
4906
4900
|
Se(() => {
|
|
4907
|
-
!S.current && s && (
|
|
4908
|
-
}, [s,
|
|
4901
|
+
!S.current && s && (_.current = !1, I()), S.current = s;
|
|
4902
|
+
}, [s, I]), Se(() => {
|
|
4909
4903
|
if (s !== !0) return;
|
|
4910
4904
|
const w = e.current;
|
|
4911
4905
|
if (!w) return;
|
|
@@ -4925,7 +4919,7 @@ const Ia = ({
|
|
|
4925
4919
|
} finally {
|
|
4926
4920
|
f.current = !1;
|
|
4927
4921
|
}
|
|
4928
|
-
|
|
4922
|
+
I();
|
|
4929
4923
|
})();
|
|
4930
4924
|
return;
|
|
4931
4925
|
}
|
|
@@ -4939,14 +4933,14 @@ const Ia = ({
|
|
|
4939
4933
|
});
|
|
4940
4934
|
}
|
|
4941
4935
|
M().then((B) => {
|
|
4942
|
-
B ?
|
|
4936
|
+
B ? I() : O();
|
|
4943
4937
|
});
|
|
4944
4938
|
}
|
|
4945
4939
|
}, [
|
|
4946
4940
|
s,
|
|
4947
4941
|
i,
|
|
4948
4942
|
O,
|
|
4949
|
-
|
|
4943
|
+
I,
|
|
4950
4944
|
e
|
|
4951
4945
|
]);
|
|
4952
4946
|
const P = Z(() => {
|
|
@@ -4957,8 +4951,8 @@ const Ia = ({
|
|
|
4957
4951
|
if (!ne) return !1;
|
|
4958
4952
|
const H = ee.getBoundingClientRect(), oe = ne.getBoundingClientRect();
|
|
4959
4953
|
if (oe.height <= 0 || H.height <= 0) return !1;
|
|
4960
|
-
const
|
|
4961
|
-
return
|
|
4954
|
+
const V = (oe.top + oe.height / 2 - H.top) / H.height;
|
|
4955
|
+
return V >= z && V <= K;
|
|
4962
4956
|
}
|
|
4963
4957
|
const A = (ee) => ee === "instant" ? "auto" : ee, W = (ee) => {
|
|
4964
4958
|
const Q = w.scrollTop, z = w.scrollHeight - w.clientHeight, K = z > 0 ? Q / z : 0;
|
|
@@ -5000,10 +4994,10 @@ const Ia = ({
|
|
|
5000
4994
|
behavior: "smooth",
|
|
5001
4995
|
topPaddingRatio: K
|
|
5002
4996
|
}), await B()) : ne || await M(ee, "auto"), f.current = !1, W(ee), E(w, ee, 0.1, 0.7);
|
|
5003
|
-
},
|
|
4997
|
+
}, D = async (ee) => F(ee);
|
|
5004
4998
|
return {
|
|
5005
4999
|
ensureVisibleGI: F,
|
|
5006
|
-
scrollToGI:
|
|
5000
|
+
scrollToGI: D,
|
|
5007
5001
|
getVisibleRange: () => go(w),
|
|
5008
5002
|
getScrollTop: () => w.scrollTop,
|
|
5009
5003
|
setScrollTop: (ee) => {
|
|
@@ -5016,10 +5010,10 @@ const Ia = ({
|
|
|
5016
5010
|
return (z.top - K.top) / K.height;
|
|
5017
5011
|
},
|
|
5018
5012
|
scrollToGIAtOffset: async (ee, Q) => {
|
|
5019
|
-
await
|
|
5013
|
+
await D(ee), await new Promise((se) => requestAnimationFrame(() => requestAnimationFrame(se)));
|
|
5020
5014
|
const z = w.querySelector(`[data-g="${ee}"]`);
|
|
5021
5015
|
if (!z) return;
|
|
5022
|
-
const K = z.getBoundingClientRect(), ne = w.getBoundingClientRect(), H = ne.height > 0 ? ne.height / w.clientHeight : 1, oe = (K.top - ne.top) / H,
|
|
5016
|
+
const K = z.getBoundingClientRect(), ne = w.getBoundingClientRect(), H = ne.height > 0 ? ne.height / w.clientHeight : 1, oe = (K.top - ne.top) / H, V = Q * w.clientHeight, J = oe - V;
|
|
5023
5017
|
w.scrollTop = w.scrollTop + J;
|
|
5024
5018
|
}
|
|
5025
5019
|
};
|
|
@@ -5099,11 +5093,11 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5099
5093
|
label: qa,
|
|
5100
5094
|
compactBtn: ja
|
|
5101
5095
|
}, Ua = Wt(function() {
|
|
5102
|
-
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), v = _e((S) => S._onTime), g = _e((S) => S._onEnded), b = _e((S) => S._onError), m = j((S) => S.setCurrentGlobalRunIndex), y = j((S) => S.getSectionScrollApi), p = j((S) => S.snapToReadable), f = j((S) => S.edgeReadable), u = ie(null), T = ie(null), k = ie(!1),
|
|
5096
|
+
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), v = _e((S) => S._onTime), g = _e((S) => S._onEnded), b = _e((S) => S._onError), m = j((S) => S.setCurrentGlobalRunIndex), y = j((S) => S.getSectionScrollApi), p = j((S) => S.snapToReadable), f = j((S) => S.edgeReadable), u = ie(null), T = ie(null), k = ie(!1), R = ie(null);
|
|
5103
5097
|
Se(() => {
|
|
5104
5098
|
c === "real" && (k.current = !0);
|
|
5105
5099
|
}, [c]);
|
|
5106
|
-
const
|
|
5100
|
+
const C = ve(() => {
|
|
5107
5101
|
const S = d(s);
|
|
5108
5102
|
if (!S) return null;
|
|
5109
5103
|
try {
|
|
@@ -5114,14 +5108,14 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5114
5108
|
}, [s, d]);
|
|
5115
5109
|
Se(() => {
|
|
5116
5110
|
k.current = !0;
|
|
5117
|
-
}, [
|
|
5111
|
+
}, [C]), Se(() => {
|
|
5118
5112
|
const S = t.current;
|
|
5119
5113
|
if (!S) return;
|
|
5120
|
-
const
|
|
5114
|
+
const I = () => {
|
|
5121
5115
|
if (S.paused || S.ended) return;
|
|
5122
5116
|
const P = S.currentTime * 1e3;
|
|
5123
5117
|
k.current && P === 0 || (P > 0 && (k.current = !1), v(P));
|
|
5124
|
-
},
|
|
5118
|
+
}, _ = () => {
|
|
5125
5119
|
var w, E;
|
|
5126
5120
|
g();
|
|
5127
5121
|
const P = f(1);
|
|
@@ -5133,14 +5127,14 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5133
5127
|
readyState: w.readyState
|
|
5134
5128
|
}), b();
|
|
5135
5129
|
};
|
|
5136
|
-
return S.addEventListener("timeupdate",
|
|
5137
|
-
S.removeEventListener("timeupdate",
|
|
5130
|
+
return S.addEventListener("timeupdate", I), S.addEventListener("ended", _), S.addEventListener("error", O), () => {
|
|
5131
|
+
S.removeEventListener("timeupdate", I), S.removeEventListener("ended", _), S.removeEventListener("error", O);
|
|
5138
5132
|
};
|
|
5139
5133
|
}, [v, g, b, f, m, y]), Se(() => {
|
|
5140
5134
|
if (r) return;
|
|
5141
5135
|
const S = t.current;
|
|
5142
5136
|
if (!S) return;
|
|
5143
|
-
if (!
|
|
5137
|
+
if (!C) {
|
|
5144
5138
|
try {
|
|
5145
5139
|
S.pause();
|
|
5146
5140
|
} catch (P) {
|
|
@@ -5149,24 +5143,24 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5149
5143
|
T.current = null;
|
|
5150
5144
|
return;
|
|
5151
5145
|
}
|
|
5152
|
-
const
|
|
5153
|
-
if (
|
|
5146
|
+
const I = S.currentSrc || S.src || null, _ = !I || I !== C;
|
|
5147
|
+
if (_) {
|
|
5154
5148
|
try {
|
|
5155
5149
|
S.pause();
|
|
5156
5150
|
} catch (P) {
|
|
5157
5151
|
console.log("pause error", P);
|
|
5158
5152
|
}
|
|
5159
|
-
S.src =
|
|
5153
|
+
S.src = C;
|
|
5160
5154
|
try {
|
|
5161
5155
|
S.load();
|
|
5162
5156
|
} catch (P) {
|
|
5163
5157
|
console.log("load error", P);
|
|
5164
5158
|
}
|
|
5165
|
-
T.current =
|
|
5159
|
+
T.current = C;
|
|
5166
5160
|
}
|
|
5167
5161
|
S.muted = !!l, S.volume = 1, S.playbackRate = typeof a == "number" ? a : 1;
|
|
5168
5162
|
const O = async () => {
|
|
5169
|
-
|
|
5163
|
+
_ && await new Promise((P) => {
|
|
5170
5164
|
let w = !1;
|
|
5171
5165
|
const E = () => {
|
|
5172
5166
|
w || (w = !0, S.removeEventListener("loadedmetadata", E), S.removeEventListener("canplay", E), P());
|
|
@@ -5187,15 +5181,15 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5187
5181
|
} catch (P) {
|
|
5188
5182
|
console.log("pause error", P);
|
|
5189
5183
|
}
|
|
5190
|
-
}, [
|
|
5184
|
+
}, [C, l, o, a, r]), Se(() => {
|
|
5191
5185
|
if (r) return;
|
|
5192
5186
|
const S = t.current;
|
|
5193
5187
|
if (!S || c !== "real") return;
|
|
5194
|
-
const
|
|
5195
|
-
if (Number.isFinite(
|
|
5188
|
+
const I = i / 1e3;
|
|
5189
|
+
if (Number.isFinite(I)) {
|
|
5196
5190
|
if (S.readyState < 1) {
|
|
5197
5191
|
u.current = i;
|
|
5198
|
-
const
|
|
5192
|
+
const _ = () => {
|
|
5199
5193
|
if (u.current != null) {
|
|
5200
5194
|
const O = u.current / 1e3;
|
|
5201
5195
|
try {
|
|
@@ -5205,27 +5199,27 @@ const Oa = "_wrap_1hfub_4", Pa = "_visible_1hfub_25", Ba = "_compact_1hfub_31",
|
|
|
5205
5199
|
}
|
|
5206
5200
|
u.current = null;
|
|
5207
5201
|
}
|
|
5208
|
-
S.removeEventListener("loadedmetadata",
|
|
5202
|
+
S.removeEventListener("loadedmetadata", _), S.removeEventListener("canplay", _);
|
|
5209
5203
|
};
|
|
5210
|
-
S.addEventListener("loadedmetadata",
|
|
5204
|
+
S.addEventListener("loadedmetadata", _), S.addEventListener("canplay", _);
|
|
5211
5205
|
return;
|
|
5212
5206
|
}
|
|
5213
|
-
if (Math.abs(S.currentTime -
|
|
5207
|
+
if (Math.abs(S.currentTime - I) > 0.2)
|
|
5214
5208
|
try {
|
|
5215
|
-
S.currentTime =
|
|
5216
|
-
} catch (
|
|
5217
|
-
console.log("currentTime보정오류",
|
|
5209
|
+
S.currentTime = I;
|
|
5210
|
+
} catch (_) {
|
|
5211
|
+
console.log("currentTime보정오류", _);
|
|
5218
5212
|
}
|
|
5219
5213
|
}
|
|
5220
5214
|
}, [i, c, r]);
|
|
5221
5215
|
const h = _e((S) => S.getGIFromCT);
|
|
5222
5216
|
return Se(() => {
|
|
5223
|
-
var
|
|
5217
|
+
var _, O;
|
|
5224
5218
|
if (r || c !== "real" || o !== "playing" && o !== "loading") return;
|
|
5225
5219
|
const S = h(s, i);
|
|
5226
5220
|
if (S < 0) return;
|
|
5227
|
-
const
|
|
5228
|
-
|
|
5221
|
+
const I = p(S);
|
|
5222
|
+
I !== R.current && (R.current = I, m(I, "audio"), I % 5 === 0 && ((O = (_ = y()) == null ? void 0 : _.ensureVisibleGI) == null || O.call(_, I)));
|
|
5229
5223
|
}, [
|
|
5230
5224
|
o,
|
|
5231
5225
|
s,
|
|
@@ -5250,19 +5244,19 @@ const Qa = "_scrubberWrap_uw0cd_2", Ya = "_labels_uw0cd_9", Xa = "_index_uw0cd_1
|
|
|
5250
5244
|
range: ec
|
|
5251
5245
|
};
|
|
5252
5246
|
function tc() {
|
|
5253
|
-
const e = Y((
|
|
5247
|
+
const e = Y((R) => R.isDev), t = j((R) => R.currentGlobalRunIndex), n = j((R) => R.totalRuns), r = j((R) => R.setCurrentGlobalRunIndex), o = j((R) => R.getSectionScrollApi), i = j((R) => R.giToPercentTotal), s = j((R) => R.percentToGITotal), c = j((R) => R.snapToReadable), l = _e((R) => R.scrollLock), a = _e((R) => R.pause), d = _e((R) => R.play), v = _e((R) => R.syncToGI), [g, b] = et(() => i(t || 0));
|
|
5254
5248
|
Se(() => {
|
|
5255
5249
|
b(i(t || 0));
|
|
5256
5250
|
}, [t, i]);
|
|
5257
5251
|
const m = ie(!1), y = ve(() => Math.max(0, Math.min(t ?? 0, Math.max(0, (n ?? 1) - 1))) + 1, [t, n]), p = Z(() => {
|
|
5258
5252
|
l && (a(), m.current = !0);
|
|
5259
|
-
}, [l, a]), f = Z((
|
|
5260
|
-
b(Number(
|
|
5253
|
+
}, [l, a]), f = Z((R) => {
|
|
5254
|
+
b(Number(R.currentTarget.value));
|
|
5261
5255
|
}, []), u = Z(async () => {
|
|
5262
|
-
const
|
|
5263
|
-
a(), r(
|
|
5256
|
+
const R = s(g), C = c(R);
|
|
5257
|
+
a(), r(C, "scrubber-commit"), v(C);
|
|
5264
5258
|
const h = o();
|
|
5265
|
-
h != null && h.ensureVisibleGI && await h.ensureVisibleGI(
|
|
5259
|
+
h != null && h.ensureVisibleGI && await h.ensureVisibleGI(C), m.current && (m.current = !1, d());
|
|
5266
5260
|
}, [g, s, c, a, r, v, o, d]), T = ve(
|
|
5267
5261
|
() => ({ "--pct": `${g}%` }),
|
|
5268
5262
|
[g]
|
|
@@ -5293,7 +5287,7 @@ function tc() {
|
|
|
5293
5287
|
onTouchEnd: () => {
|
|
5294
5288
|
u();
|
|
5295
5289
|
},
|
|
5296
|
-
onKeyUp: (
|
|
5290
|
+
onKeyUp: (R) => R.key === "Enter" || R.key === " " ? void u() : void 0,
|
|
5297
5291
|
"aria-label": "진행률"
|
|
5298
5292
|
}
|
|
5299
5293
|
),
|
|
@@ -5308,20 +5302,20 @@ const nc = N.memo(tc), rc = Wt(function() {
|
|
|
5308
5302
|
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), v = j((S) => S.getSectionScrollApi), g = j((S) => S.nextReadableFrom), b = j((S) => S.edgeReadable), m = ie(null), y = ie(null), p = ie(0), f = ie(-1), u = !n && r === "fake" && o === "playing", T = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1), k = ve(() => {
|
|
5309
5303
|
const S = 200 * s;
|
|
5310
5304
|
return T / S * 6e4;
|
|
5311
|
-
}, [T, s]),
|
|
5305
|
+
}, [T, s]), R = ve(() => !l || l <= 1 || k <= 0 ? 0 : (l - 1) / k, [l, k]);
|
|
5312
5306
|
Se(() => {
|
|
5313
5307
|
if (!u) return;
|
|
5314
5308
|
const S = Math.max(0, Math.min(a ?? 0, Math.max(0, (l ?? 1) - 1)));
|
|
5315
5309
|
p.current = S, f.current = S, y.current = null;
|
|
5316
5310
|
}, [u, a, l]);
|
|
5317
|
-
const
|
|
5311
|
+
const C = ie(-1);
|
|
5318
5312
|
Se(() => {
|
|
5319
5313
|
if (!l) {
|
|
5320
|
-
|
|
5314
|
+
C.current = -1;
|
|
5321
5315
|
return;
|
|
5322
5316
|
}
|
|
5323
5317
|
const S = b(1);
|
|
5324
|
-
|
|
5318
|
+
C.current = S ?? -1;
|
|
5325
5319
|
}, [b, l]);
|
|
5326
5320
|
const h = Z(
|
|
5327
5321
|
(S) => {
|
|
@@ -5331,17 +5325,17 @@ const nc = N.memo(tc), rc = Wt(function() {
|
|
|
5331
5325
|
m.current = null;
|
|
5332
5326
|
return;
|
|
5333
5327
|
}
|
|
5334
|
-
if (!l || l <= 1 ||
|
|
5328
|
+
if (!l || l <= 1 || R <= 0) {
|
|
5335
5329
|
m.current = null;
|
|
5336
5330
|
return;
|
|
5337
5331
|
}
|
|
5338
|
-
const
|
|
5332
|
+
const I = y.current;
|
|
5339
5333
|
y.current = S;
|
|
5340
|
-
const
|
|
5341
|
-
p.current = Math.min(O, p.current +
|
|
5334
|
+
const _ = I == null ? 0 : Math.max(0, S - I), O = l - 1;
|
|
5335
|
+
p.current = Math.min(O, p.current + R * _);
|
|
5342
5336
|
const P = Math.floor(p.current), w = v(), E = g(P, 1);
|
|
5343
5337
|
if (E == null) {
|
|
5344
|
-
const B =
|
|
5338
|
+
const B = C.current >= 0 ? C.current : P;
|
|
5345
5339
|
B !== f.current && (f.current = B, d(B, "audio"), await ((W = w == null ? void 0 : w.ensureVisibleGI) == null ? void 0 : W.call(w, B))), c(), m.current = null;
|
|
5346
5340
|
return;
|
|
5347
5341
|
}
|
|
@@ -5349,7 +5343,7 @@ const nc = N.memo(tc), rc = Wt(function() {
|
|
|
5349
5343
|
A !== f.current && (f.current = A, d(A, "audio"), A % 5 === 0 && await ((M = w == null ? void 0 : w.ensureVisibleGI) == null ? void 0 : M.call(w, A))), m.current = requestAnimationFrame(h);
|
|
5350
5344
|
})().catch(console.error);
|
|
5351
5345
|
},
|
|
5352
|
-
[u, l,
|
|
5346
|
+
[u, l, R, g, d, v, c]
|
|
5353
5347
|
);
|
|
5354
5348
|
return Se(() => (u ? m.current == null && (m.current = requestAnimationFrame(h)) : (m.current && (cancelAnimationFrame(m.current), m.current = null), y.current = null), () => {
|
|
5355
5349
|
m.current && (cancelAnimationFrame(m.current), m.current = null);
|
|
@@ -5505,39 +5499,40 @@ function wc(e) {
|
|
|
5505
5499
|
return rt({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z" }, child: [] }] })(e);
|
|
5506
5500
|
}
|
|
5507
5501
|
function Ic() {
|
|
5508
|
-
|
|
5502
|
+
var R;
|
|
5503
|
+
const e = Y((C) => C.showOverlays), t = j((C) => C.section), n = !!t.ast.isAddedSplit, r = !!((R = t.audios) != null && R.length), o = Y((C) => C.muteAudio), i = Y((C) => C.showPointer), s = Y((C) => C.showSplit), c = Y((C) => C.toggleMuteAudio), l = Y((C) => C.toggleShowPointer), a = Y((C) => C.toggleShowSplit), d = Y((C) => C.overlayCompactMode), v = Y((C) => C.toggleOverlayCompactMode), g = yn(), b = Rt();
|
|
5509
5504
|
Se(() => {
|
|
5510
|
-
const
|
|
5505
|
+
const C = g.getState(), { syncToGI: h, useFake: S, useReal: I } = C, _ = C.playbackKind, O = b.getState().progress.currentGlobalRunIndex ?? 0;
|
|
5511
5506
|
if (!r) {
|
|
5512
|
-
|
|
5507
|
+
_ !== "fake" && S();
|
|
5513
5508
|
return;
|
|
5514
5509
|
}
|
|
5515
|
-
o ?
|
|
5510
|
+
o ? _ !== "fake" && (console.log("이부분일까?"), S()) : _ !== "real" && (h(O), I());
|
|
5516
5511
|
}, [r, o, b, g]);
|
|
5517
|
-
const m = _e((
|
|
5518
|
-
(
|
|
5519
|
-
|
|
5512
|
+
const m = _e((C) => C.play), y = _e((C) => C.pause), p = _e((C) => C.status), f = Z(
|
|
5513
|
+
(C) => {
|
|
5514
|
+
C.stopPropagation(), p === "playing" || p === "loading" ? y() : m();
|
|
5520
5515
|
},
|
|
5521
5516
|
[p, m, y]
|
|
5522
5517
|
), u = yn(), T = Rt(), k = Z(
|
|
5523
|
-
async (
|
|
5524
|
-
var
|
|
5525
|
-
if (
|
|
5518
|
+
async (C) => {
|
|
5519
|
+
var F, D;
|
|
5520
|
+
if (C.stopPropagation(), p === "playing" || p === "loading") {
|
|
5526
5521
|
y();
|
|
5527
5522
|
return;
|
|
5528
5523
|
}
|
|
5529
|
-
const { progress:
|
|
5530
|
-
currentGlobalRunIndex:
|
|
5531
|
-
snapToReadable:
|
|
5532
|
-
edgeReadable:
|
|
5533
|
-
setCurrentGlobalRunIndex:
|
|
5534
|
-
getSectionScrollApi:
|
|
5535
|
-
} =
|
|
5536
|
-
if (
|
|
5537
|
-
|
|
5524
|
+
const { progress: h } = T.getState(), {
|
|
5525
|
+
currentGlobalRunIndex: S,
|
|
5526
|
+
snapToReadable: I,
|
|
5527
|
+
edgeReadable: _,
|
|
5528
|
+
setCurrentGlobalRunIndex: O,
|
|
5529
|
+
getSectionScrollApi: P
|
|
5530
|
+
} = h, w = u.getState(), E = w.currentClip, A = P == null ? void 0 : P(), W = typeof S == "number" ? S : 0, M = typeof I == "function" ? I(W) : W, B = typeof _ == "function" ? _(1) : null;
|
|
5531
|
+
if (B != null && M >= B) {
|
|
5532
|
+
O == null || O(B, "audio"), await ((F = A == null ? void 0 : A.ensureVisibleGI) == null ? void 0 : F.call(A, B)), w.syncToGI(B);
|
|
5538
5533
|
return;
|
|
5539
5534
|
}
|
|
5540
|
-
|
|
5535
|
+
O == null || O(M, "audio"), await ((D = A == null ? void 0 : A.ensureVisibleGI) == null ? void 0 : D.call(A, M)), w.syncToGI(M), m(E);
|
|
5541
5536
|
},
|
|
5542
5537
|
[p, y, m, u, T]
|
|
5543
5538
|
);
|
|
@@ -5545,11 +5540,11 @@ function Ic() {
|
|
|
5545
5540
|
"div",
|
|
5546
5541
|
{
|
|
5547
5542
|
className: `${Ge.wrap} ${e ? Ge.visible : ""} ${d ? Ge.compact : ""}`,
|
|
5548
|
-
onClick: (
|
|
5549
|
-
|
|
5543
|
+
onClick: (C) => {
|
|
5544
|
+
C.stopPropagation();
|
|
5550
5545
|
},
|
|
5551
|
-
onTouchStart: (
|
|
5552
|
-
|
|
5546
|
+
onTouchStart: (C) => {
|
|
5547
|
+
C.stopPropagation();
|
|
5553
5548
|
},
|
|
5554
5549
|
children: [
|
|
5555
5550
|
!d && /* @__PURE__ */ x(nc, {}),
|
|
@@ -5560,8 +5555,8 @@ function Ic() {
|
|
|
5560
5555
|
"button",
|
|
5561
5556
|
{
|
|
5562
5557
|
type: "button",
|
|
5563
|
-
onClick: (
|
|
5564
|
-
|
|
5558
|
+
onClick: (C) => {
|
|
5559
|
+
C.stopPropagation(), v();
|
|
5565
5560
|
},
|
|
5566
5561
|
className: Ge.compactBtn,
|
|
5567
5562
|
title: d ? "오버레이 확대" : "오버레이 축소",
|
|
@@ -5589,8 +5584,8 @@ function Ic() {
|
|
|
5589
5584
|
"button",
|
|
5590
5585
|
{
|
|
5591
5586
|
type: "button",
|
|
5592
|
-
onClick: (
|
|
5593
|
-
|
|
5587
|
+
onClick: (C) => {
|
|
5588
|
+
C.stopPropagation(), c();
|
|
5594
5589
|
},
|
|
5595
5590
|
className: `${Ge.btn} ${o ? "" : Ge.btnActive}`,
|
|
5596
5591
|
title: "오디오북 음소거 전환",
|
|
@@ -5604,8 +5599,8 @@ function Ic() {
|
|
|
5604
5599
|
"button",
|
|
5605
5600
|
{
|
|
5606
5601
|
type: "button",
|
|
5607
|
-
onClick: (
|
|
5608
|
-
|
|
5602
|
+
onClick: (C) => {
|
|
5603
|
+
C.stopPropagation(), l();
|
|
5609
5604
|
},
|
|
5610
5605
|
className: `${Ge.btn} ${i ? Ge.btnActive : ""}`,
|
|
5611
5606
|
title: "포인터 표시",
|
|
@@ -5619,8 +5614,8 @@ function Ic() {
|
|
|
5619
5614
|
"button",
|
|
5620
5615
|
{
|
|
5621
5616
|
type: "button",
|
|
5622
|
-
onClick: (
|
|
5623
|
-
|
|
5617
|
+
onClick: (C) => {
|
|
5618
|
+
C.stopPropagation(), a();
|
|
5624
5619
|
},
|
|
5625
5620
|
disabled: !n,
|
|
5626
5621
|
className: `${Ge.btn} ${s ? Ge.btnActive : ""} ${n ? "" : Ge.btnForbidden}`,
|
|
@@ -5694,22 +5689,22 @@ const Bc = N.memo(Pc), zc = "_wrap_62su0_7", Ac = "_wrapHidden_62su0_29", Lc = "
|
|
|
5694
5689
|
inlineFlex: Qc
|
|
5695
5690
|
};
|
|
5696
5691
|
function Yc({ visible: e }) {
|
|
5697
|
-
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()), v = Y((h) => h.setFontLevel), g = Y((h) => h.setLineLevel), b = Y((h) => h.setMarginLevel), m = Y((h) => h.pointerStyle), y = Y((h) => h.setPointerStyle), p = Y((h) => h.pointerColor), f = Y((h) => h.setPointerColor), u = Y((h) => h.breakMarks), T = Y((h) => h.toggleBreakMark), k = Y((h) => h.getBreakGapLevel()),
|
|
5698
|
-
return /* @__PURE__ */ X("div", { className:
|
|
5692
|
+
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()), v = Y((h) => h.setFontLevel), g = Y((h) => h.setLineLevel), b = Y((h) => h.setMarginLevel), m = Y((h) => h.pointerStyle), y = Y((h) => h.setPointerStyle), p = Y((h) => h.pointerColor), f = Y((h) => h.setPointerColor), u = Y((h) => h.breakMarks), T = Y((h) => h.toggleBreakMark), k = Y((h) => h.getBreakGapLevel()), R = Y((h) => h.setBreakGapLevel), C = `${Ae.wrap} ${e ? Ae.wrapVisible : Ae.wrapHidden}`;
|
|
5693
|
+
return /* @__PURE__ */ X("div", { className: C, role: "dialog", "aria-modal": "true", "aria-label": "뷰어 설정", children: [
|
|
5699
5694
|
/* @__PURE__ */ X("div", { className: Ae.scrollArea, children: [
|
|
5700
5695
|
/* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */ X("div", { className: Ae.inlineFlex, children: [
|
|
5701
5696
|
/* @__PURE__ */ x(Lt, { active: t === "page", onClick: () => n("page"), children: "페이지" }),
|
|
5702
5697
|
/* @__PURE__ */ x(Lt, { active: t === "scroll", onClick: () => n("scroll"), children: "스크롤" })
|
|
5703
5698
|
] }) }),
|
|
5704
5699
|
/* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: Object.keys(bn).map((h) => {
|
|
5705
|
-
const S = h,
|
|
5700
|
+
const S = h, I = bn[S];
|
|
5706
5701
|
return /* @__PURE__ */ x(
|
|
5707
5702
|
"button",
|
|
5708
5703
|
{
|
|
5709
5704
|
type: "button",
|
|
5710
5705
|
onClick: () => o(S),
|
|
5711
5706
|
className: `${Ae.themeCircle} ${r === h ? Ae.themeCircleActive : ""}`,
|
|
5712
|
-
style: { background:
|
|
5707
|
+
style: { background: I.bg, color: I.fg, fontFamily: i },
|
|
5713
5708
|
title: String(h),
|
|
5714
5709
|
"aria-label": `테마: ${String(h)}`,
|
|
5715
5710
|
children: "A"
|
|
@@ -5788,8 +5783,8 @@ function Yc({ visible: e }) {
|
|
|
5788
5783
|
level: k,
|
|
5789
5784
|
min: 1,
|
|
5790
5785
|
max: 5,
|
|
5791
|
-
onDec: () =>
|
|
5792
|
-
onInc: () =>
|
|
5786
|
+
onDec: () => R(Math.max(1, k - 1)),
|
|
5787
|
+
onInc: () => R(Math.min(5, k + 1))
|
|
5793
5788
|
}
|
|
5794
5789
|
)
|
|
5795
5790
|
] }),
|
|
@@ -6070,8 +6065,8 @@ function ru(e) {
|
|
|
6070
6065
|
if (!f || f.length === 0) return -1;
|
|
6071
6066
|
let u = 0, T = f.length - 1, k = 0;
|
|
6072
6067
|
for (; u <= T; ) {
|
|
6073
|
-
const
|
|
6074
|
-
f[
|
|
6068
|
+
const R = u + T >> 1;
|
|
6069
|
+
f[R].t <= p ? (k = R, u = R + 1) : T = R - 1;
|
|
6075
6070
|
}
|
|
6076
6071
|
return f[Math.max(0, Math.min(k, f.length - 1))].g;
|
|
6077
6072
|
},
|
|
@@ -6093,8 +6088,8 @@ function ru(e) {
|
|
|
6093
6088
|
}
|
|
6094
6089
|
if (!f) {
|
|
6095
6090
|
let k = y + 1;
|
|
6096
|
-
const
|
|
6097
|
-
for (; p[k] == null && k <=
|
|
6091
|
+
const R = y + 100;
|
|
6092
|
+
for (; p[k] == null && k <= R; ) k++;
|
|
6098
6093
|
p[k] && (f = p[k]);
|
|
6099
6094
|
}
|
|
6100
6095
|
}
|
|
@@ -6173,13 +6168,13 @@ function lu(e) {
|
|
|
6173
6168
|
mr(u) && (i[g + f] = 1);
|
|
6174
6169
|
}
|
|
6175
6170
|
const y = ra(b, g).map((f) => {
|
|
6176
|
-
var
|
|
6171
|
+
var R;
|
|
6177
6172
|
const u = f.startG - g, T = f.endG - f.startG + 1;
|
|
6178
6173
|
let k = -1;
|
|
6179
|
-
for (let
|
|
6180
|
-
const h = ((
|
|
6174
|
+
for (let C = 0; C < T; C++) {
|
|
6175
|
+
const h = ((R = b[u + C]) == null ? void 0 : R.text) ?? "";
|
|
6181
6176
|
if (mr(h)) {
|
|
6182
|
-
k = f.startG +
|
|
6177
|
+
k = f.startG + C;
|
|
6183
6178
|
break;
|
|
6184
6179
|
}
|
|
6185
6180
|
}
|
|
@@ -6267,19 +6262,19 @@ function cu(e) {
|
|
|
6267
6262
|
b((B) => {
|
|
6268
6263
|
const F = B.progress;
|
|
6269
6264
|
if (F.totalRuns === M) return B;
|
|
6270
|
-
const
|
|
6265
|
+
const D = F.currentGlobalRunIndex < 0 && M > 0;
|
|
6271
6266
|
return {
|
|
6272
6267
|
progress: {
|
|
6273
6268
|
...F,
|
|
6274
6269
|
totalRuns: M,
|
|
6275
|
-
currentGlobalRunIndex:
|
|
6276
|
-
lastUpdateBy:
|
|
6270
|
+
currentGlobalRunIndex: D ? 0 : F.currentGlobalRunIndex,
|
|
6271
|
+
lastUpdateBy: D ? "program" : F.lastUpdateBy
|
|
6277
6272
|
}
|
|
6278
6273
|
};
|
|
6279
6274
|
});
|
|
6280
6275
|
}, u = (M, B = "program") => {
|
|
6281
|
-
const F = m().progress.currentGlobalRunIndex,
|
|
6282
|
-
F === q &&
|
|
6276
|
+
const F = m().progress.currentGlobalRunIndex, D = m().progress, q = D.totalRuns > 0 ? Math.max(-1, Math.min(M, D.totalRuns - 1)) : M;
|
|
6277
|
+
F === q && D.lastUpdateBy === B || (b((ue) => ({
|
|
6283
6278
|
progress: {
|
|
6284
6279
|
...ue.progress,
|
|
6285
6280
|
currentGlobalRunIndex: q,
|
|
@@ -6292,17 +6287,17 @@ function cu(e) {
|
|
|
6292
6287
|
}, T = (M) => {
|
|
6293
6288
|
const { sectionLoading: B, _loadingStartTime: F } = m().progress;
|
|
6294
6289
|
if (B === M) return;
|
|
6295
|
-
const
|
|
6290
|
+
const D = Date.now();
|
|
6296
6291
|
if (M)
|
|
6297
6292
|
b((q) => ({
|
|
6298
6293
|
progress: {
|
|
6299
6294
|
...q.progress,
|
|
6300
6295
|
sectionLoading: !0,
|
|
6301
|
-
_loadingStartTime:
|
|
6296
|
+
_loadingStartTime: D
|
|
6302
6297
|
}
|
|
6303
6298
|
})), c && c.getState().emit({ type: "loading_start", payload: {} });
|
|
6304
6299
|
else {
|
|
6305
|
-
const ue = (F ?
|
|
6300
|
+
const ue = (F ? D - F : 0) / 1e3;
|
|
6306
6301
|
b((de) => ({
|
|
6307
6302
|
progress: {
|
|
6308
6303
|
...de.progress,
|
|
@@ -6315,8 +6310,8 @@ function cu(e) {
|
|
|
6315
6310
|
b((B) => ({
|
|
6316
6311
|
progress: { ...B.progress, pageIndex: M }
|
|
6317
6312
|
}));
|
|
6318
|
-
},
|
|
6319
|
-
const
|
|
6313
|
+
}, R = (M, B) => {
|
|
6314
|
+
const D = m().progress.rangeStartGI == null;
|
|
6320
6315
|
if (b((q) => ({
|
|
6321
6316
|
progress: {
|
|
6322
6317
|
...q.progress,
|
|
@@ -6326,11 +6321,11 @@ function cu(e) {
|
|
|
6326
6321
|
})), c) {
|
|
6327
6322
|
const q = S();
|
|
6328
6323
|
c.getState().emit({
|
|
6329
|
-
type:
|
|
6324
|
+
type: D ? "range_select" : "range_change",
|
|
6330
6325
|
payload: { startGI: Math.min(M, B), endGI: Math.max(M, B), text: q }
|
|
6331
6326
|
});
|
|
6332
6327
|
}
|
|
6333
|
-
},
|
|
6328
|
+
}, C = () => {
|
|
6334
6329
|
b((M) => ({
|
|
6335
6330
|
progress: {
|
|
6336
6331
|
...M.progress,
|
|
@@ -6340,16 +6335,16 @@ function cu(e) {
|
|
|
6340
6335
|
})), c && c.getState().emit({ type: "range_clear", payload: {} });
|
|
6341
6336
|
}, h = (M) => {
|
|
6342
6337
|
const { rangeStartGI: B, rangeEndGI: F } = m().progress;
|
|
6343
|
-
B == null || F == null || (M < B ? b((
|
|
6344
|
-
progress: { ...
|
|
6345
|
-
})) : M > F ? b((
|
|
6346
|
-
progress: { ...
|
|
6347
|
-
})) :
|
|
6338
|
+
B == null || F == null || (M < B ? b((D) => ({
|
|
6339
|
+
progress: { ...D.progress, rangeStartGI: M }
|
|
6340
|
+
})) : M > F ? b((D) => ({
|
|
6341
|
+
progress: { ...D.progress, rangeEndGI: M }
|
|
6342
|
+
})) : C());
|
|
6348
6343
|
}, S = () => {
|
|
6349
6344
|
var ke;
|
|
6350
|
-
const { rangeStartGI: M, rangeEndGI: B, section: F, layout:
|
|
6351
|
-
if (M == null || B == null || !
|
|
6352
|
-
const q = ((ke = F.ast) == null ? void 0 : ke.blocks) ?? [], ue =
|
|
6345
|
+
const { rangeStartGI: M, rangeEndGI: B, section: F, layout: D } = m().progress;
|
|
6346
|
+
if (M == null || B == null || !D) return "";
|
|
6347
|
+
const q = ((ke = F.ast) == null ? void 0 : ke.blocks) ?? [], ue = D.prefix, de = [];
|
|
6353
6348
|
for (let Re = 0; Re < q.length; Re++) {
|
|
6354
6349
|
const ee = q[Re];
|
|
6355
6350
|
if (ee.type !== "paragraph") continue;
|
|
@@ -6360,20 +6355,20 @@ function cu(e) {
|
|
|
6360
6355
|
}
|
|
6361
6356
|
}
|
|
6362
6357
|
return de.join("");
|
|
6363
|
-
},
|
|
6364
|
-
const { totalRuns: B, derivedNav: F } = m().progress,
|
|
6365
|
-
if (!
|
|
6358
|
+
}, I = (M) => {
|
|
6359
|
+
const { totalRuns: B, derivedNav: F } = m().progress, D = F == null ? void 0 : F.readableGi;
|
|
6360
|
+
if (!D || B <= 0) return M;
|
|
6366
6361
|
const q = B, ue = Math.max(0, Math.min(M, q - 1));
|
|
6367
|
-
if (
|
|
6362
|
+
if (D[ue]) return ue;
|
|
6368
6363
|
let de = ue - 1, ke = ue + 1;
|
|
6369
6364
|
for (; de >= 0 || ke < q; ) {
|
|
6370
|
-
if (ke < q &&
|
|
6371
|
-
if (de >= 0 &&
|
|
6365
|
+
if (ke < q && D[ke]) return ke;
|
|
6366
|
+
if (de >= 0 && D[de]) return de;
|
|
6372
6367
|
ke += 1, de -= 1;
|
|
6373
6368
|
}
|
|
6374
6369
|
return ue;
|
|
6375
|
-
},
|
|
6376
|
-
const { totalRuns: F, derivedNav:
|
|
6370
|
+
}, _ = (M, B) => {
|
|
6371
|
+
const { totalRuns: F, derivedNav: D } = m().progress, q = D == null ? void 0 : D.readableGi;
|
|
6377
6372
|
if (!q || F <= 0) return null;
|
|
6378
6373
|
if (B > 0) {
|
|
6379
6374
|
for (let ue = Math.min(Math.max(M, 0), F - 1); ue < F; ue += 1)
|
|
@@ -6383,12 +6378,12 @@ function cu(e) {
|
|
|
6383
6378
|
if (q[ue]) return ue;
|
|
6384
6379
|
return null;
|
|
6385
6380
|
}, O = (M) => {
|
|
6386
|
-
const { totalRuns: B, derivedNav: F } = m().progress,
|
|
6387
|
-
if (!
|
|
6381
|
+
const { totalRuns: B, derivedNav: F } = m().progress, D = F == null ? void 0 : F.readableGi;
|
|
6382
|
+
if (!D || B <= 0) return null;
|
|
6388
6383
|
if (M > 0) {
|
|
6389
|
-
for (let q = B - 1; q >= 0; q -= 1) if (
|
|
6384
|
+
for (let q = B - 1; q >= 0; q -= 1) if (D[q]) return q;
|
|
6390
6385
|
} else
|
|
6391
|
-
for (let q = 0; q < B; q += 1) if (
|
|
6386
|
+
for (let q = 0; q < B; q += 1) if (D[q]) return q;
|
|
6392
6387
|
return null;
|
|
6393
6388
|
};
|
|
6394
6389
|
return {
|
|
@@ -6401,22 +6396,22 @@ function cu(e) {
|
|
|
6401
6396
|
setSectionLoading: T,
|
|
6402
6397
|
setPageIndex: k,
|
|
6403
6398
|
// Range Selection API
|
|
6404
|
-
setRange:
|
|
6405
|
-
clearRange:
|
|
6399
|
+
setRange: R,
|
|
6400
|
+
clearRange: C,
|
|
6406
6401
|
extendRange: h,
|
|
6407
6402
|
getRangeText: S,
|
|
6408
6403
|
// 네비 API
|
|
6409
|
-
snapToReadable:
|
|
6410
|
-
nextReadableFrom:
|
|
6404
|
+
snapToReadable: I,
|
|
6405
|
+
nextReadableFrom: _,
|
|
6411
6406
|
edgeReadable: O,
|
|
6412
|
-
hasReadableInDir: (M, B) =>
|
|
6407
|
+
hasReadableInDir: (M, B) => _(M + (B > 0 ? 1 : -1), B) != null,
|
|
6413
6408
|
computeStepTarget: (M, B) => {
|
|
6414
|
-
const { totalRuns: F, derivedNav:
|
|
6409
|
+
const { totalRuns: F, derivedNav: D } = m().progress;
|
|
6415
6410
|
if (!F || F <= 0) return M;
|
|
6416
|
-
const q = (
|
|
6411
|
+
const q = (D == null ? void 0 : D.groups) ?? [], ue = D == null ? void 0 : D.giToGroupIdx;
|
|
6417
6412
|
if (!q.length || !ue) {
|
|
6418
6413
|
const z = F - 1;
|
|
6419
|
-
return
|
|
6414
|
+
return I(Math.max(0, Math.min(M + B, z)));
|
|
6420
6415
|
}
|
|
6421
6416
|
let de = ue[M] ?? -1;
|
|
6422
6417
|
if (de < 0 || de >= q.length)
|
|
@@ -6428,15 +6423,15 @@ function cu(e) {
|
|
|
6428
6423
|
}
|
|
6429
6424
|
}
|
|
6430
6425
|
if (de < 0 || de >= q.length)
|
|
6431
|
-
return O(B) ??
|
|
6426
|
+
return O(B) ?? I(M);
|
|
6432
6427
|
const ke = (Q) => Q >= 0 && Q < q.length && (q[Q].firstReadableGI ?? -1) >= 0;
|
|
6433
6428
|
let Re = de + B;
|
|
6434
6429
|
for (; Re >= 0 && Re < q.length && !ke(Re); )
|
|
6435
6430
|
Re += B;
|
|
6436
6431
|
if (Re < 0 || Re >= q.length)
|
|
6437
|
-
return O(B) ??
|
|
6432
|
+
return O(B) ?? I(M + B);
|
|
6438
6433
|
const ee = q[Re].firstReadableGI;
|
|
6439
|
-
return ee >= 0 ? ee :
|
|
6434
|
+
return ee >= 0 ? ee : I(M + B);
|
|
6440
6435
|
},
|
|
6441
6436
|
giToPercentTotal: (M) => {
|
|
6442
6437
|
const B = m().progress.totalRuns;
|
|
@@ -6445,8 +6440,8 @@ function cu(e) {
|
|
|
6445
6440
|
percentToGITotal: (M) => {
|
|
6446
6441
|
const B = m().progress.totalRuns;
|
|
6447
6442
|
if (!B || B <= 1) return 0;
|
|
6448
|
-
const F = Math.max(0, Math.min(M, 100)),
|
|
6449
|
-
return Math.max(0, Math.min(
|
|
6443
|
+
const F = Math.max(0, Math.min(M, 100)), D = Math.round(F / 100 * (B - 1));
|
|
6444
|
+
return Math.max(0, Math.min(D, B - 1));
|
|
6450
6445
|
}
|
|
6451
6446
|
}
|
|
6452
6447
|
};
|
|
@@ -6506,27 +6501,27 @@ const fu = ({
|
|
|
6506
6501
|
return u;
|
|
6507
6502
|
}, [m, o]), p = ve(() => {
|
|
6508
6503
|
const u = [], T = Or();
|
|
6509
|
-
return y.forEach((k,
|
|
6510
|
-
u[
|
|
6504
|
+
return y.forEach((k, R) => {
|
|
6505
|
+
u[R] = Pr(k.b, T);
|
|
6511
6506
|
}), u;
|
|
6512
6507
|
}, [y]), f = (u, T, k) => {
|
|
6513
6508
|
if (!u || u.length === 0) return [];
|
|
6514
|
-
const
|
|
6515
|
-
for (const
|
|
6516
|
-
const h =
|
|
6509
|
+
const R = [];
|
|
6510
|
+
for (const C of u) {
|
|
6511
|
+
const h = C.startG, S = C.endG;
|
|
6517
6512
|
if (S < T || h > k) continue;
|
|
6518
|
-
const
|
|
6513
|
+
const I = Math.max(h, T), _ = Math.min(S, k), O = I - h | 0, P = Math.max(0, _ - I + 1);
|
|
6519
6514
|
if (P <= 0) continue;
|
|
6520
|
-
const w = (
|
|
6521
|
-
|
|
6522
|
-
...
|
|
6523
|
-
startG:
|
|
6524
|
-
endG:
|
|
6515
|
+
const w = (C.r0 ?? 0) + O;
|
|
6516
|
+
R.push({
|
|
6517
|
+
...C,
|
|
6518
|
+
startG: I,
|
|
6519
|
+
endG: _,
|
|
6525
6520
|
r0: w,
|
|
6526
6521
|
len: P
|
|
6527
6522
|
});
|
|
6528
6523
|
}
|
|
6529
|
-
return
|
|
6524
|
+
return R;
|
|
6530
6525
|
};
|
|
6531
6526
|
return /* @__PURE__ */ x(
|
|
6532
6527
|
"div",
|
|
@@ -6563,7 +6558,7 @@ const fu = ({
|
|
|
6563
6558
|
/* @__PURE__ */ x("div", { style: { height: 40 } }),
|
|
6564
6559
|
/* @__PURE__ */ x("div", { style: { flex: 1, overflow: "hidden" }, children: m.map((u, T) => {
|
|
6565
6560
|
var Q;
|
|
6566
|
-
const k = o[u],
|
|
6561
|
+
const k = o[u], R = T === 0, C = T === m.length - 1, h = {
|
|
6567
6562
|
boxSizing: "border-box",
|
|
6568
6563
|
paddingRight: `${i}px`,
|
|
6569
6564
|
paddingLeft: `${i}px`,
|
|
@@ -6575,7 +6570,7 @@ const fu = ({
|
|
|
6575
6570
|
height: "auto"
|
|
6576
6571
|
}, S = `sec-${r.section_id}/blk-${k.id ?? u}`;
|
|
6577
6572
|
if (k.type === "image") {
|
|
6578
|
-
const { src: z, alt: K, width: ne, height: H } = k, oe = ne && H ? `${ne} / ${H}` : "4 / 3",
|
|
6573
|
+
const { src: z, alt: K, width: ne, height: H } = k, oe = ne && H ? `${ne} / ${H}` : "4 / 3", V = a > 80 ? Math.floor((a - 80) * 0.6) : void 0;
|
|
6579
6574
|
return /* @__PURE__ */ x("div", { style: h, children: /* @__PURE__ */ X(
|
|
6580
6575
|
"div",
|
|
6581
6576
|
{
|
|
@@ -6591,7 +6586,7 @@ const fu = ({
|
|
|
6591
6586
|
style: {
|
|
6592
6587
|
position: "relative",
|
|
6593
6588
|
width: "100%",
|
|
6594
|
-
maxHeight:
|
|
6589
|
+
maxHeight: V,
|
|
6595
6590
|
aspectRatio: oe
|
|
6596
6591
|
},
|
|
6597
6592
|
children: /* @__PURE__ */ x(
|
|
@@ -6618,26 +6613,26 @@ const fu = ({
|
|
|
6618
6613
|
}
|
|
6619
6614
|
) }, S);
|
|
6620
6615
|
}
|
|
6621
|
-
const
|
|
6616
|
+
const I = k, _ = y.findIndex(
|
|
6622
6617
|
(z) => z.originalBlockIndex === u
|
|
6623
|
-
), O =
|
|
6618
|
+
), O = _ >= 0 ? p[_] : void 0, P = I.runs ?? [], w = P.length;
|
|
6624
6619
|
let E = 0, A = Math.max(0, w - 1);
|
|
6625
|
-
|
|
6620
|
+
R && g.startOffsetInBlock != null && (E = Math.min(Math.max(0, g.startOffsetInBlock), A)), C && g.endOffsetInBlock != null && (A = Math.max(
|
|
6626
6621
|
E,
|
|
6627
6622
|
Math.min(g.endOffsetInBlock, A)
|
|
6628
6623
|
));
|
|
6629
|
-
const W = E > 0, M = d[u] ?? 0, B = v[u] ?? [], F = M + E,
|
|
6630
|
-
let q = f(B, F,
|
|
6624
|
+
const W = E > 0, M = d[u] ?? 0, B = v[u] ?? [], F = M + E, D = M + A;
|
|
6625
|
+
let q = f(B, F, D);
|
|
6631
6626
|
const ue = M + E;
|
|
6632
6627
|
q = q.map((z) => {
|
|
6633
|
-
const K = Math.max(0, (z.startG ?? F) - ue), ne = z.len ?? Math.max(1, (z.endG ??
|
|
6628
|
+
const K = Math.max(0, (z.startG ?? F) - ue), ne = z.len ?? Math.max(1, (z.endG ?? D) - (z.startG ?? F) + 1);
|
|
6634
6629
|
return {
|
|
6635
6630
|
...z,
|
|
6636
6631
|
r0: K,
|
|
6637
6632
|
len: ne
|
|
6638
6633
|
};
|
|
6639
6634
|
});
|
|
6640
|
-
const de = E <= A ? P.slice(E, A + 1) : [], ke =
|
|
6635
|
+
const de = E <= A ? P.slice(E, A + 1) : [], ke = I.list ? I.list.level * 24 : 0, Re = ((Q = I.list) == null ? void 0 : Q.kind) === "bullet" ? I.list.glyph ?? "•" : void 0, ee = W ? void 0 : O ?? Re;
|
|
6641
6636
|
return /* @__PURE__ */ x("div", { style: h, children: /* @__PURE__ */ X(
|
|
6642
6637
|
"p",
|
|
6643
6638
|
{
|
|
@@ -6645,12 +6640,12 @@ const fu = ({
|
|
|
6645
6640
|
width: "100%",
|
|
6646
6641
|
margin: "8px 0",
|
|
6647
6642
|
paddingLeft: ke,
|
|
6648
|
-
textAlign:
|
|
6643
|
+
textAlign: I.textAlign,
|
|
6649
6644
|
whiteSpace: "pre-wrap",
|
|
6650
6645
|
boxSizing: "border-box"
|
|
6651
6646
|
},
|
|
6652
6647
|
children: [
|
|
6653
|
-
|
|
6648
|
+
I.list && ee ? /* @__PURE__ */ x(
|
|
6654
6649
|
"span",
|
|
6655
6650
|
{
|
|
6656
6651
|
"aria-hidden": !0,
|
|
@@ -6746,13 +6741,13 @@ function hu(e) {
|
|
|
6746
6741
|
var E;
|
|
6747
6742
|
const w = ((E = document == null ? void 0 : document.body) == null ? void 0 : E.style) ?? null;
|
|
6748
6743
|
w && u.current.prevUserSelect != null && (w.userSelect = u.current.prevUserSelect, u.current.prevUserSelect = null), u.current.capturedEl && u.current.pid != null && typeof u.current.capturedEl.hasPointerCapture == "function" && u.current.capturedEl.hasPointerCapture(u.current.pid) && u.current.capturedEl.releasePointerCapture(u.current.pid), u.current.capturedEl = null;
|
|
6749
|
-
},
|
|
6744
|
+
}, R = dt.useCallback(
|
|
6750
6745
|
(w) => {
|
|
6751
6746
|
const E = s ?? i;
|
|
6752
6747
|
E != null && E(w.target) || (u.current.pid = w.pointerId, u.current.startX = w.clientX, u.current.startY = w.clientY, u.current.startT = w.timeStamp, u.current.swiping = !1, u.current.canceledClick = !1, u.current.capturedEl = w.currentTarget);
|
|
6753
6748
|
},
|
|
6754
6749
|
[s, i]
|
|
6755
|
-
),
|
|
6750
|
+
), C = dt.useCallback(
|
|
6756
6751
|
(w) => {
|
|
6757
6752
|
var B;
|
|
6758
6753
|
if (u.current.pid == null || w.pointerId !== u.current.pid) return;
|
|
@@ -6766,8 +6761,8 @@ function hu(e) {
|
|
|
6766
6761
|
F.setPointerCapture(w.pointerId);
|
|
6767
6762
|
} catch {
|
|
6768
6763
|
}
|
|
6769
|
-
const
|
|
6770
|
-
|
|
6764
|
+
const D = ((B = document == null ? void 0 : document.body) == null ? void 0 : B.style) ?? null;
|
|
6765
|
+
D && (u.current.prevUserSelect = D.userSelect ?? null, D.userSelect = "none"), w.preventDefault();
|
|
6771
6766
|
}
|
|
6772
6767
|
return;
|
|
6773
6768
|
}
|
|
@@ -6795,13 +6790,13 @@ function hu(e) {
|
|
|
6795
6790
|
]
|
|
6796
6791
|
), S = dt.useCallback(() => {
|
|
6797
6792
|
u.current.swiping && (m == null || m()), k(), u.current.pid = null, u.current.swiping = !1, u.current.canceledClick = !1;
|
|
6798
|
-
}, [m]),
|
|
6793
|
+
}, [m]), I = dt.useCallback(
|
|
6799
6794
|
(w) => {
|
|
6800
6795
|
var E, A;
|
|
6801
6796
|
(A = (E = u.current.capturedEl) == null ? void 0 : E.hasPointerCapture) != null && A.call(E, w.pointerId) || u.current.pid != null && u.current.swiping && (m == null || m(), k(), u.current.pid = null, u.current.swiping = !1, u.current.canceledClick = !1);
|
|
6802
6797
|
},
|
|
6803
6798
|
[m]
|
|
6804
|
-
),
|
|
6799
|
+
), _ = dt.useCallback(() => {
|
|
6805
6800
|
u.current.pid != null && u.current.swiping && (m == null || m()), k(), u.current.pid = null, u.current.swiping = !1, u.current.canceledClick = !1;
|
|
6806
6801
|
}, [m]), O = dt.useCallback(
|
|
6807
6802
|
(w) => {
|
|
@@ -6834,12 +6829,12 @@ function hu(e) {
|
|
|
6834
6829
|
},
|
|
6835
6830
|
[]
|
|
6836
6831
|
), {
|
|
6837
|
-
onPointerDown:
|
|
6838
|
-
onPointerMove:
|
|
6832
|
+
onPointerDown: R,
|
|
6833
|
+
onPointerMove: C,
|
|
6839
6834
|
onPointerUp: h,
|
|
6840
6835
|
onPointerCancel: S,
|
|
6841
|
-
onPointerLeave:
|
|
6842
|
-
onLostPointerCapture:
|
|
6836
|
+
onPointerLeave: I,
|
|
6837
|
+
onLostPointerCapture: _,
|
|
6843
6838
|
onClick: O,
|
|
6844
6839
|
onDoubleClick: P
|
|
6845
6840
|
};
|
|
@@ -6998,10 +6993,10 @@ function Tu() {
|
|
|
6998
6993
|
var E = d, A = v;
|
|
6999
6994
|
return d = v = void 0, p = w, b = c.apply(A, E), b;
|
|
7000
6995
|
}
|
|
7001
|
-
function
|
|
6996
|
+
function R(w) {
|
|
7002
6997
|
return p = w, m = setTimeout(S, l), f ? k(w) : b;
|
|
7003
6998
|
}
|
|
7004
|
-
function
|
|
6999
|
+
function C(w) {
|
|
7005
7000
|
var E = w - y, A = w - p, W = l - E;
|
|
7006
7001
|
return u ? i(W, g - A) : W;
|
|
7007
7002
|
}
|
|
@@ -7012,29 +7007,29 @@ function Tu() {
|
|
|
7012
7007
|
function S() {
|
|
7013
7008
|
var w = t();
|
|
7014
7009
|
if (h(w))
|
|
7015
|
-
return
|
|
7016
|
-
m = setTimeout(S,
|
|
7010
|
+
return I(w);
|
|
7011
|
+
m = setTimeout(S, C(w));
|
|
7017
7012
|
}
|
|
7018
|
-
function
|
|
7013
|
+
function I(w) {
|
|
7019
7014
|
return m = void 0, T && d ? k(w) : (d = v = void 0, b);
|
|
7020
7015
|
}
|
|
7021
|
-
function
|
|
7016
|
+
function _() {
|
|
7022
7017
|
m !== void 0 && clearTimeout(m), p = 0, d = y = v = m = void 0;
|
|
7023
7018
|
}
|
|
7024
7019
|
function O() {
|
|
7025
|
-
return m === void 0 ? b :
|
|
7020
|
+
return m === void 0 ? b : I(t());
|
|
7026
7021
|
}
|
|
7027
7022
|
function P() {
|
|
7028
7023
|
var w = t(), E = h(w);
|
|
7029
7024
|
if (d = arguments, v = this, y = w, E) {
|
|
7030
7025
|
if (m === void 0)
|
|
7031
|
-
return
|
|
7026
|
+
return R(y);
|
|
7032
7027
|
if (u)
|
|
7033
7028
|
return clearTimeout(m), m = setTimeout(S, l), k(y);
|
|
7034
7029
|
}
|
|
7035
7030
|
return m === void 0 && (m = setTimeout(S, l)), b;
|
|
7036
7031
|
}
|
|
7037
|
-
return P.cancel =
|
|
7032
|
+
return P.cancel = _, P.flush = O, P;
|
|
7038
7033
|
}
|
|
7039
7034
|
return ir = s, ir;
|
|
7040
7035
|
}
|
|
@@ -7116,17 +7111,17 @@ async function Ou({
|
|
|
7116
7111
|
const p = Mu(y);
|
|
7117
7112
|
lt(p, y);
|
|
7118
7113
|
try {
|
|
7119
|
-
const k = Math.abs(b - 1) > 1e-3,
|
|
7120
|
-
k && (t.style.transform = `scale(${
|
|
7121
|
-
const
|
|
7114
|
+
const k = Math.abs(b - 1) > 1e-3, R = 1 / b;
|
|
7115
|
+
k && (t.style.transform = `scale(${R})`, t.style.transformOrigin = "top left");
|
|
7116
|
+
const C = Math.max(0, e.offsetWidth || 0), h = Math.max(0, Math.min(C, o));
|
|
7122
7117
|
t.style.maxWidth = `${h}px`, lt(p, y);
|
|
7123
7118
|
let S = Math.round(n.offsetHeight || 0);
|
|
7124
7119
|
S || (S = Math.max(0, n.clientHeight | 0)), console.log(
|
|
7125
7120
|
"[calcPages] playbackScale:",
|
|
7126
7121
|
b.toFixed(4),
|
|
7127
7122
|
k ? "(scaled, applying inverse)" : "(no scale)"
|
|
7128
|
-
), console.log("[calcPages] viewWidth:",
|
|
7129
|
-
const
|
|
7123
|
+
), console.log("[calcPages] viewWidth:", C), console.log("[calcPages] pageBoxWidth:", h), console.log("[calcPages] maxPageHeight:", S), console.log("[calcPages] contentArea rect:", n.getBoundingClientRect()), console.log("[calcPages] measureRoot rect:", t.getBoundingClientRect());
|
|
7124
|
+
const I = 1.5, _ = (H, oe) => oe + H <= S - I, O = getComputedStyle(e), P = {
|
|
7130
7125
|
letterSpacing: O.letterSpacing,
|
|
7131
7126
|
wordSpacing: O.wordSpacing,
|
|
7132
7127
|
fontKerning: O.fontKerning || "normal",
|
|
@@ -7144,16 +7139,16 @@ async function Ou({
|
|
|
7144
7139
|
W.style.boxSizing = "border-box", W.style.width = `${E}px`, W.style.maxWidth = `${E}px`, W.style.margin = "0 auto", W.style.display = "flex", n.appendChild(W);
|
|
7145
7140
|
const M = document.createElement("div");
|
|
7146
7141
|
M.style.boxSizing = "border-box", M.style.paddingRight = `${i}px`, M.style.paddingLeft = `${i}px`, M.style.width = `${E}px`, M.style.maxWidth = `${E}px`, M.style.margin = "0 auto", M.style.display = "flex", M.style.justifyContent = "center", M.style.height = "auto", W.appendChild(M);
|
|
7147
|
-
const B = /* @__PURE__ */ new Map(), F = {},
|
|
7148
|
-
const
|
|
7149
|
-
return
|
|
7142
|
+
const B = /* @__PURE__ */ new Map(), F = {}, D = Eu(p, y, r.length), q = (H, oe) => {
|
|
7143
|
+
const V = document.createElement("p");
|
|
7144
|
+
return V.style.margin = "8px 0", V.style.paddingLeft = oe ? `${oe}px` : "0", V.style.textAlign = H.textAlign ?? "start", V.style.whiteSpace = "pre-wrap", V.style.lineHeight = String(l), V.style.fontSize = `${c}px`, V.style.boxSizing = "border-box", V.style.fontFamily = s ?? "", V.style.width = "100%", w(V), V;
|
|
7150
7145
|
}, ue = (H, oe) => {
|
|
7151
|
-
const
|
|
7152
|
-
for (let se = 0; se <
|
|
7153
|
-
const re =
|
|
7146
|
+
const V = oe ?? [], J = document.createDocumentFragment();
|
|
7147
|
+
for (let se = 0; se < V.length; se++) {
|
|
7148
|
+
const re = V[se], pe = document.createElement("span");
|
|
7154
7149
|
pe.dataset.runbox = String(se), pe.style.whiteSpace = "pre-wrap";
|
|
7155
7150
|
const le = document.createElement("span");
|
|
7156
|
-
if (le.dataset.run = String(se), le.textContent = (re == null ? void 0 : re.text) ?? "", le.style.whiteSpace = "pre-wrap", re != null && re.bold && (le.style.fontWeight = "700"), re != null && re.italic && (le.style.fontStyle = "italic"), re != null && re.underline && (le.style.textDecoration = "underline"), pe.appendChild(le), a && (re != null && re.split) && se !==
|
|
7151
|
+
if (le.dataset.run = String(se), le.textContent = (re == null ? void 0 : re.text) ?? "", le.style.whiteSpace = "pre-wrap", re != null && re.bold && (le.style.fontWeight = "700"), re != null && re.italic && (le.style.fontStyle = "italic"), re != null && re.underline && (le.style.textDecoration = "underline"), pe.appendChild(le), a && (re != null && re.split) && se !== V.length - 1) {
|
|
7157
7152
|
const we = Math.max(0, (d ?? 0) / 2), me = document.createElement("span");
|
|
7158
7153
|
me.style.display = "inline-block", me.style.width = `${we}px`;
|
|
7159
7154
|
const Te = document.createElement("span");
|
|
@@ -7167,16 +7162,16 @@ async function Ou({
|
|
|
7167
7162
|
}
|
|
7168
7163
|
H.appendChild(J);
|
|
7169
7164
|
}, de = m > 80 ? Math.floor((m - 80) * 0.6) : void 0, ke = (H) => {
|
|
7170
|
-
const oe = H != null && H.width && (H != null && H.height) ? `${H.width} / ${H.height}` : "4 / 3",
|
|
7171
|
-
|
|
7165
|
+
const oe = H != null && H.width && (H != null && H.height) ? `${H.width} / ${H.height}` : "4 / 3", V = document.createElement("div");
|
|
7166
|
+
V.style.margin = "12px 0", V.style.textAlign = "center", V.style.width = `${A}px`;
|
|
7172
7167
|
const J = document.createElement("div");
|
|
7173
7168
|
J.style.position = "relative", J.style.width = "100%", de && (J.style.maxHeight = `${de}px`), J.style.aspectRatio = oe;
|
|
7174
7169
|
const se = document.createElement("div");
|
|
7175
|
-
if (se.style.position = "absolute", se.style.inset = "0", se.style.width = "100%", se.style.height = "100%", J.appendChild(se),
|
|
7170
|
+
if (se.style.position = "absolute", se.style.inset = "0", se.style.width = "100%", se.style.height = "100%", J.appendChild(se), V.appendChild(J), H != null && H.alt) {
|
|
7176
7171
|
const re = document.createElement("div");
|
|
7177
|
-
re.style.fontSize = "12px", re.style.color = "#6B7280", re.style.marginTop = "4px", re.textContent = String(H.alt), w(re),
|
|
7172
|
+
re.style.fontSize = "12px", re.style.color = "#6B7280", re.style.marginTop = "4px", re.textContent = String(H.alt), w(re), V.appendChild(re);
|
|
7178
7173
|
}
|
|
7179
|
-
return
|
|
7174
|
+
return V;
|
|
7180
7175
|
};
|
|
7181
7176
|
for (let H = 0; H < r.length; H++) {
|
|
7182
7177
|
lt(p, y);
|
|
@@ -7185,26 +7180,26 @@ async function Ou({
|
|
|
7185
7180
|
const Te = oe.block, Oe = ke(Te);
|
|
7186
7181
|
M.appendChild(Oe);
|
|
7187
7182
|
const Ne = Oe.getBoundingClientRect(), { mt: Le, mb: $e } = sr(Oe);
|
|
7188
|
-
F[H] = { contentH: Math.ceil(Ne.height), mt: Le, mb: $e }, await
|
|
7183
|
+
F[H] = { contentH: Math.ceil(Ne.height), mt: Le, mb: $e }, await D(24);
|
|
7189
7184
|
continue;
|
|
7190
7185
|
}
|
|
7191
|
-
const
|
|
7192
|
-
if (!!(
|
|
7193
|
-
const Te = q(
|
|
7186
|
+
const V = oe.block, J = V.list ? (V.list.level ?? 0) * 24 : 0, se = oe.paraIndex ?? 0, re = g[se] ?? (((f = V.list) == null ? void 0 : f.kind) === "bullet" ? ((u = V.list) == null ? void 0 : u.glyph) ?? "•" : void 0);
|
|
7187
|
+
if (!!(V.list && re)) {
|
|
7188
|
+
const Te = q(V, J);
|
|
7194
7189
|
Te.dataset.variant = "with";
|
|
7195
|
-
const Oe = q(
|
|
7190
|
+
const Oe = q(V, J);
|
|
7196
7191
|
Oe.dataset.variant = "no";
|
|
7197
7192
|
const Ne = document.createElement("span");
|
|
7198
|
-
Ne.textContent = `${re} `, Ne.style.minWidth = "16px", Ne.style.display = "inline-block", Ne.style.whiteSpace = "nowrap", Ne.style.userSelect = "none", Te.appendChild(Ne), ue(Te,
|
|
7193
|
+
Ne.textContent = `${re} `, Ne.style.minWidth = "16px", Ne.style.display = "inline-block", Ne.style.whiteSpace = "nowrap", Ne.style.userSelect = "none", Te.appendChild(Ne), ue(Te, V.runs), ue(Oe, V.runs);
|
|
7199
7194
|
const Le = document.createDocumentFragment();
|
|
7200
7195
|
Le.appendChild(Te), Le.appendChild(Oe), M.appendChild(Le);
|
|
7201
7196
|
} else {
|
|
7202
|
-
const Te = q(
|
|
7203
|
-
Te.dataset.variant = "with", ue(Te,
|
|
7197
|
+
const Te = q(V, J);
|
|
7198
|
+
Te.dataset.variant = "with", ue(Te, V.runs), M.appendChild(Te);
|
|
7204
7199
|
}
|
|
7205
7200
|
const le = M.querySelector('p[data-variant="with"]'), we = M.querySelector('p[data-variant="no"]'), me = we ?? le;
|
|
7206
7201
|
if (le && me) {
|
|
7207
|
-
const Te = Ho(le), Oe = Ho(me), { mt: Ne, mb: Le } = sr(le), { mt: $e, mb: ut } = sr(me), Qe = ((T =
|
|
7202
|
+
const Te = Ho(le), Oe = Ho(me), { mt: Ne, mb: Le } = sr(le), { mt: $e, mb: ut } = sr(me), Qe = ((T = V.runs) == null ? void 0 : T.length) ?? 0, He = we ? Oe : Te, ot = we ? $e : Ne, Je = we ? ut : Le;
|
|
7208
7203
|
if (H < 3) {
|
|
7209
7204
|
const bt = le.getBoundingClientRect().height;
|
|
7210
7205
|
console.log(
|
|
@@ -7221,26 +7216,26 @@ async function Ou({
|
|
|
7221
7216
|
mbNo: Je
|
|
7222
7217
|
});
|
|
7223
7218
|
}
|
|
7224
|
-
await
|
|
7219
|
+
await D(24);
|
|
7225
7220
|
}
|
|
7226
7221
|
lt(p, y), M.innerHTML = "";
|
|
7227
|
-
const Re = (H, oe,
|
|
7228
|
-
if (oe >
|
|
7229
|
-
const se = J ? H.lastBottomNo : H.lastBottomWith, re = J ? H.mtNo : H.mtWith, pe = J ? H.mbNo : H.mbWith, le = J ? 0 : re, we = oe > 0 ? se[oe - 1] ?? 0 : 0, me = Math.max(0, (se[
|
|
7222
|
+
const Re = (H, oe, V, J) => {
|
|
7223
|
+
if (oe > V) return { top: 0, content: 0, mb: 0 };
|
|
7224
|
+
const se = J ? H.lastBottomNo : H.lastBottomWith, re = J ? H.mtNo : H.mtWith, pe = J ? H.mbNo : H.mbWith, le = J ? 0 : re, we = oe > 0 ? se[oe - 1] ?? 0 : 0, me = Math.max(0, (se[V] ?? 0) - we);
|
|
7230
7225
|
return { top: le, content: me, mb: pe };
|
|
7231
7226
|
}, ee = [];
|
|
7232
7227
|
let Q = 0, z, K = null, ne = null;
|
|
7233
7228
|
for (; Q < r.length; ) {
|
|
7234
7229
|
lt(p, y);
|
|
7235
7230
|
const H = Q;
|
|
7236
|
-
let oe = 0,
|
|
7231
|
+
let oe = 0, V = 0, J = z;
|
|
7237
7232
|
J != null && K === Q && ne != null && (J = Math.max(J, ne + 1));
|
|
7238
7233
|
let se = -1, re;
|
|
7239
7234
|
for (; Q < r.length; ) {
|
|
7240
7235
|
if (lt(p, y), r[Q].kind === "image") {
|
|
7241
|
-
const He = F[Q] ?? { contentH: 0, mt: 0, mb: 0 }, Je = (oe === 0 ? He.mt :
|
|
7242
|
-
if (
|
|
7243
|
-
oe += Je, se = Q, re = void 0,
|
|
7236
|
+
const He = F[Q] ?? { contentH: 0, mt: 0, mb: 0 }, Je = (oe === 0 ? He.mt : V + He.mt) + He.contentH;
|
|
7237
|
+
if (_(Je, oe)) {
|
|
7238
|
+
oe += Je, se = Q, re = void 0, V = He.mb, Q += 1, z = void 0, K = null, ne = null;
|
|
7244
7239
|
continue;
|
|
7245
7240
|
}
|
|
7246
7241
|
if (oe === 0) {
|
|
@@ -7249,7 +7244,7 @@ async function Ou({
|
|
|
7249
7244
|
endBlock: Q,
|
|
7250
7245
|
...J != null ? { startOffsetInBlock: J } : {}
|
|
7251
7246
|
// 이미지에는 run 오프셋 개념이 없어 endOffsetInBlock 생략
|
|
7252
|
-
}), Q += 1, z = void 0, K = null, ne = null,
|
|
7247
|
+
}), Q += 1, z = void 0, K = null, ne = null, V = 0;
|
|
7253
7248
|
break;
|
|
7254
7249
|
}
|
|
7255
7250
|
break;
|
|
@@ -7259,16 +7254,16 @@ async function Ou({
|
|
|
7259
7254
|
Q += 1, z = void 0, K = null, ne = null;
|
|
7260
7255
|
continue;
|
|
7261
7256
|
}
|
|
7262
|
-
const Te = me > 0, Oe = Re(le, me, we - 1, Te), Le = (oe === 0 ? Oe.top :
|
|
7263
|
-
if (
|
|
7264
|
-
oe += Le, se = Q, re = we - 1,
|
|
7257
|
+
const Te = me > 0, Oe = Re(le, me, we - 1, Te), Le = (oe === 0 ? Oe.top : V + Oe.top) + Oe.content;
|
|
7258
|
+
if (_(Le, oe)) {
|
|
7259
|
+
oe += Le, se = Q, re = we - 1, V = Oe.mb, Q += 1, z = void 0, K = null, ne = null;
|
|
7265
7260
|
continue;
|
|
7266
7261
|
}
|
|
7267
7262
|
let $e = me, ut = we - 1, Qe = me - 1;
|
|
7268
7263
|
for (; $e <= ut; ) {
|
|
7269
7264
|
lt(p, y);
|
|
7270
|
-
const He = $e + ut >> 1, ot = Re(le, me, He, Te), Je = (oe === 0 ? ot.top :
|
|
7271
|
-
|
|
7265
|
+
const He = $e + ut >> 1, ot = Re(le, me, He, Te), Je = (oe === 0 ? ot.top : V + ot.top) + ot.content;
|
|
7266
|
+
_(Je, oe) ? (Qe = He, $e = He + 1) : ut = He - 1;
|
|
7272
7267
|
}
|
|
7273
7268
|
if (Qe >= me) {
|
|
7274
7269
|
ee.push({
|
|
@@ -7276,7 +7271,7 @@ async function Ou({
|
|
|
7276
7271
|
endBlock: Q,
|
|
7277
7272
|
...J != null ? { startOffsetInBlock: J } : {},
|
|
7278
7273
|
endOffsetInBlock: Qe
|
|
7279
|
-
}), z = Qe + 1, K = Q, ne = Qe,
|
|
7274
|
+
}), z = Qe + 1, K = Q, ne = Qe, V = 0;
|
|
7280
7275
|
break;
|
|
7281
7276
|
}
|
|
7282
7277
|
if (oe > 0) {
|
|
@@ -7285,7 +7280,7 @@ async function Ou({
|
|
|
7285
7280
|
endBlock: se >= 0 ? se : Math.min(Q - 1, r.length - 1),
|
|
7286
7281
|
...J != null ? { startOffsetInBlock: J } : {},
|
|
7287
7282
|
...re != null ? { endOffsetInBlock: re } : {}
|
|
7288
|
-
}),
|
|
7283
|
+
}), V = 0;
|
|
7289
7284
|
break;
|
|
7290
7285
|
} else {
|
|
7291
7286
|
const He = me;
|
|
@@ -7294,7 +7289,7 @@ async function Ou({
|
|
|
7294
7289
|
endBlock: Q,
|
|
7295
7290
|
...J != null ? { startOffsetInBlock: J } : {},
|
|
7296
7291
|
endOffsetInBlock: He
|
|
7297
|
-
}), z = He + 1, K = Q, ne = He,
|
|
7292
|
+
}), z = He + 1, K = Q, ne = He, V = 0;
|
|
7298
7293
|
break;
|
|
7299
7294
|
}
|
|
7300
7295
|
}
|
|
@@ -7366,21 +7361,21 @@ function Au(e) {
|
|
|
7366
7361
|
}
|
|
7367
7362
|
function Lu() {
|
|
7368
7363
|
var zr;
|
|
7369
|
-
const e = ji(), t = j((
|
|
7370
|
-
var
|
|
7371
|
-
return Au(((
|
|
7364
|
+
const e = ji(), t = j(($) => $.section), n = j(($) => $.sectionLoading), r = j(($) => $.rangeStartGI), o = j(($) => $.rangeEndGI), i = r != null && o != null, s = Et(), c = Y(($) => $.theme), l = bn[c], a = Y(($) => $.fontFamily), d = Y(($) => $.fontSizePx), v = Y(($) => $.lineHeight), g = Y(($) => $.marginX), b = Y(($) => $.viewportHeight), m = 860, y = ie(null), { items: p } = ve(() => {
|
|
7365
|
+
var $;
|
|
7366
|
+
return Au((($ = t == null ? void 0 : t.ast) == null ? void 0 : $.blocks) ?? []);
|
|
7372
7367
|
}, [t]), f = ve(() => {
|
|
7373
|
-
const
|
|
7368
|
+
const $ = [], ze = Or();
|
|
7374
7369
|
return p.forEach((We) => {
|
|
7375
7370
|
if (We.kind === "paragraph") {
|
|
7376
7371
|
const Ct = We.paraIndex;
|
|
7377
|
-
|
|
7372
|
+
$[Ct] = Pr(We.block, ze);
|
|
7378
7373
|
}
|
|
7379
|
-
}),
|
|
7374
|
+
}), $;
|
|
7380
7375
|
}, [p]), [u, T] = et({
|
|
7381
7376
|
pages: [],
|
|
7382
7377
|
pageByRunIndex: null
|
|
7383
|
-
}), k = j((
|
|
7378
|
+
}), k = j(($) => $.pageIndex), R = j(($) => $.setPageIndex), C = ie(0), h = ie(null), [S, I] = et(!1), [_, O] = et(null), [P, w] = et(!1), E = ve(
|
|
7384
7379
|
() => ({
|
|
7385
7380
|
flex: 1,
|
|
7386
7381
|
fontFamily: a,
|
|
@@ -7401,33 +7396,33 @@ function Lu() {
|
|
|
7401
7396
|
breakGapPx: W,
|
|
7402
7397
|
slash: M
|
|
7403
7398
|
} = Y(
|
|
7404
|
-
nn((
|
|
7399
|
+
nn(($) => {
|
|
7405
7400
|
var ze;
|
|
7406
7401
|
return {
|
|
7407
|
-
showSplit:
|
|
7408
|
-
breakGapPx:
|
|
7409
|
-
slash: ((ze =
|
|
7402
|
+
showSplit: $.showSplit,
|
|
7403
|
+
breakGapPx: $.breakGapPx ?? 0,
|
|
7404
|
+
slash: ((ze = $.breakMarks) == null ? void 0 : ze.slash) ?? !1
|
|
7410
7405
|
};
|
|
7411
7406
|
})
|
|
7412
7407
|
), B = Rt();
|
|
7413
7408
|
Se(() => {
|
|
7414
7409
|
u && u.pages.length && (console.log("그래서 총 페이지", u.pages.length), (async () => {
|
|
7415
|
-
const
|
|
7416
|
-
await vt(), await vt(), await vt(), await vt(), console.log("recalc종료"),
|
|
7410
|
+
const $ = B.getState().progress.setSectionLoading;
|
|
7411
|
+
await vt(), await vt(), await vt(), await vt(), console.log("recalc종료"), $(!1);
|
|
7417
7412
|
})());
|
|
7418
7413
|
}, [u, B]);
|
|
7419
7414
|
const F = Z(() => {
|
|
7420
7415
|
console.log("@@@@@@recalc호출");
|
|
7421
|
-
const
|
|
7422
|
-
if (console.log("showSplit", A),
|
|
7423
|
-
T({ pages: [], pageByRunIndex: null }),
|
|
7416
|
+
const $ = y.current, ze = le.current, We = we.current;
|
|
7417
|
+
if (console.log("showSplit", A), !$ || !ze || !We || p.length === 0) {
|
|
7418
|
+
T({ pages: [], pageByRunIndex: null }), R(0);
|
|
7424
7419
|
return;
|
|
7425
7420
|
}
|
|
7426
7421
|
(async () => {
|
|
7427
7422
|
const Ct = performance.now();
|
|
7428
7423
|
try {
|
|
7429
7424
|
const it = s.getState().playbackScale, { pages: Bt, pageByRunIndex: Di } = await Ou({
|
|
7430
|
-
viewHost:
|
|
7425
|
+
viewHost: $,
|
|
7431
7426
|
measureRoot: ze,
|
|
7432
7427
|
contentArea: We,
|
|
7433
7428
|
items: p,
|
|
@@ -7446,7 +7441,7 @@ function Lu() {
|
|
|
7446
7441
|
}), $i = performance.now();
|
|
7447
7442
|
console.log(
|
|
7448
7443
|
`✅ calcPages 완료: ${($i - Ct).toFixed(1)} ms (${Bt.length} pages)`
|
|
7449
|
-
), T({ pages: Bt, pageByRunIndex: Di }),
|
|
7444
|
+
), T({ pages: Bt, pageByRunIndex: Di }), R(0);
|
|
7450
7445
|
} catch (it) {
|
|
7451
7446
|
if (it instanceof Fi) {
|
|
7452
7447
|
console.log("이젠실행 취소 들어옴!");
|
|
@@ -7456,7 +7451,7 @@ function Lu() {
|
|
|
7456
7451
|
}
|
|
7457
7452
|
})();
|
|
7458
7453
|
}, [
|
|
7459
|
-
|
|
7454
|
+
R,
|
|
7460
7455
|
p,
|
|
7461
7456
|
m,
|
|
7462
7457
|
g,
|
|
@@ -7470,56 +7465,56 @@ function Lu() {
|
|
|
7470
7465
|
s,
|
|
7471
7466
|
b,
|
|
7472
7467
|
e
|
|
7473
|
-
]),
|
|
7468
|
+
]), D = j(($) => $.setCurrentGlobalRunIndex), q = j(($) => {
|
|
7474
7469
|
var ze;
|
|
7475
|
-
return ((ze =
|
|
7476
|
-
}), ue = _e((
|
|
7477
|
-
(
|
|
7478
|
-
const ze = u.pages.length + 1, We = k +
|
|
7470
|
+
return ((ze = $.layout) == null ? void 0 : ze.prefix) ?? [];
|
|
7471
|
+
}), ue = _e(($) => $.syncToGI), de = Z(
|
|
7472
|
+
($) => {
|
|
7473
|
+
const ze = u.pages.length + 1, We = k + $;
|
|
7479
7474
|
if (We < 0 || We >= ze) return;
|
|
7480
7475
|
const Ct = k === u.pages.length;
|
|
7481
7476
|
if (We === u.pages.length) {
|
|
7482
|
-
|
|
7477
|
+
R(We);
|
|
7483
7478
|
return;
|
|
7484
7479
|
}
|
|
7485
|
-
if (Ct &&
|
|
7480
|
+
if (Ct && $ === -1) {
|
|
7486
7481
|
const Bt = No(u.pages[We], p, q);
|
|
7487
|
-
Bt != null && (
|
|
7482
|
+
Bt != null && (D(Bt, "scrubber-step"), ue(Bt)), R(We);
|
|
7488
7483
|
return;
|
|
7489
7484
|
}
|
|
7490
7485
|
const it = No(u.pages[We], p, q);
|
|
7491
|
-
it != null ? (
|
|
7486
|
+
it != null ? (D(it, "scrubber-step"), ue(it)) : R(We);
|
|
7492
7487
|
},
|
|
7493
|
-
[k, u.pages, p, q,
|
|
7488
|
+
[k, u.pages, p, q, D, R, ue]
|
|
7494
7489
|
), ke = Z(() => {
|
|
7495
|
-
S ||
|
|
7490
|
+
S || C.current !== 0 ? (O("prev"), I(!1)) : de(-1);
|
|
7496
7491
|
}, [S, de]), Re = Z(() => {
|
|
7497
|
-
S ||
|
|
7492
|
+
S || C.current !== 0 ? (O("next"), I(!1)) : de(1);
|
|
7498
7493
|
}, [S, de]), ee = kn(), Q = Z(() => {
|
|
7499
|
-
const { isSettingsOpen:
|
|
7500
|
-
|
|
7501
|
-
}, [ee]), z = u.pages.length + 1, K = ((zr = y.current) == null ? void 0 : zr.clientWidth) || 400, ne = Z((
|
|
7494
|
+
const { isSettingsOpen: $, setSettingsOpen: ze, toggleOverlays: We } = ee.getState();
|
|
7495
|
+
$ ? ze(!1) : We();
|
|
7496
|
+
}, [ee]), z = u.pages.length + 1, K = ((zr = y.current) == null ? void 0 : zr.clientWidth) || 400, ne = Z(($) => {
|
|
7502
7497
|
var it;
|
|
7503
7498
|
const ze = h.current;
|
|
7504
7499
|
if (!ze) return;
|
|
7505
|
-
const We = ((it = y.current) == null ? void 0 : it.clientWidth) || 1, Ct =
|
|
7500
|
+
const We = ((it = y.current) == null ? void 0 : it.clientWidth) || 1, Ct = $ / We * 33.333;
|
|
7506
7501
|
ze.style.transform = `translate3d(${-33.333 + Ct}%, 0, 0)`;
|
|
7507
7502
|
}, []), H = Z(
|
|
7508
|
-
(
|
|
7509
|
-
k === 0 &&
|
|
7503
|
+
($) => {
|
|
7504
|
+
k === 0 && $ > 0 || k >= z - 1 && $ < 0 || (C.current = $, ne($), S || I(!0));
|
|
7510
7505
|
},
|
|
7511
7506
|
[k, z, ne, S]
|
|
7512
7507
|
), oe = Z(() => {
|
|
7513
|
-
|
|
7514
|
-
const
|
|
7515
|
-
|
|
7516
|
-
}, []),
|
|
7517
|
-
(
|
|
7518
|
-
if (
|
|
7519
|
-
const ze =
|
|
7520
|
-
w(!0), O(null),
|
|
7508
|
+
C.current = 0, I(!1);
|
|
7509
|
+
const $ = h.current;
|
|
7510
|
+
$ && ($.style.transition = "transform 250ms ease-out", $.style.transform = "translate3d(-33.333%, 0, 0)");
|
|
7511
|
+
}, []), V = Z(
|
|
7512
|
+
($) => {
|
|
7513
|
+
if ($.target !== $.currentTarget || $.propertyName !== "transform") return;
|
|
7514
|
+
const ze = _;
|
|
7515
|
+
w(!0), O(null), C.current = 0, ze === "prev" ? de(-1) : ze === "next" && de(1);
|
|
7521
7516
|
},
|
|
7522
|
-
[
|
|
7517
|
+
[_, de]
|
|
7523
7518
|
);
|
|
7524
7519
|
Tt(() => {
|
|
7525
7520
|
P && requestAnimationFrame(() => {
|
|
@@ -7529,12 +7524,12 @@ function Lu() {
|
|
|
7529
7524
|
});
|
|
7530
7525
|
}, [P]);
|
|
7531
7526
|
const J = yn(), se = Z(
|
|
7532
|
-
(
|
|
7527
|
+
($) => i || zu($) ? !0 : Bu($),
|
|
7533
7528
|
[i]
|
|
7534
7529
|
), re = Z(
|
|
7535
|
-
(
|
|
7530
|
+
($) => {
|
|
7536
7531
|
const ze = J.getState().status;
|
|
7537
|
-
return ze === "playing" || ze === "loading" ? !0 : se(
|
|
7532
|
+
return ze === "playing" || ze === "loading" ? !0 : se($);
|
|
7538
7533
|
},
|
|
7539
7534
|
[J, se]
|
|
7540
7535
|
), pe = hu({
|
|
@@ -7556,8 +7551,8 @@ function Lu() {
|
|
|
7556
7551
|
pageTransitionThreshold: K * 0.5
|
|
7557
7552
|
// 50% 이상 드래그 시 전환
|
|
7558
7553
|
}), le = ie(null), we = ie(null), me = Z(() => {
|
|
7559
|
-
const
|
|
7560
|
-
|
|
7554
|
+
const $ = B.getState().progress.setSectionLoading;
|
|
7555
|
+
$(!0);
|
|
7561
7556
|
}, [B]), Te = ve(
|
|
7562
7557
|
() => ({
|
|
7563
7558
|
trailing: !0,
|
|
@@ -7568,8 +7563,8 @@ function Lu() {
|
|
|
7568
7563
|
), Oe = _u(F, 200, me, Te), Ne = ie("");
|
|
7569
7564
|
Se(() => {
|
|
7570
7565
|
if (b <= 0) return;
|
|
7571
|
-
const
|
|
7572
|
-
Ne.current !==
|
|
7566
|
+
const $ = `${a}|${d}|${v}|${g}|${A}|${W}|${M}|${b}|${t == null ? void 0 : t.section_id}`;
|
|
7567
|
+
Ne.current !== $ && (Ne.current = $, console.log("debounceRecalc 취소"), Oe.cancel(), me(), F());
|
|
7573
7568
|
}, [
|
|
7574
7569
|
Oe,
|
|
7575
7570
|
F,
|
|
@@ -7584,7 +7579,7 @@ function Lu() {
|
|
|
7584
7579
|
b,
|
|
7585
7580
|
t == null ? void 0 : t.section_id
|
|
7586
7581
|
]), pu([y], Oe);
|
|
7587
|
-
const Le = j((
|
|
7582
|
+
const Le = j(($) => $.registerSectionScrollApi);
|
|
7588
7583
|
Se(() => (Le({
|
|
7589
7584
|
// 페이지 모드에서는 GI 기반 스크롤 불필요 - 더미 구현
|
|
7590
7585
|
ensureVisibleGI: () => Promise.resolve(!0),
|
|
@@ -7598,7 +7593,7 @@ function Lu() {
|
|
|
7598
7593
|
// 페이지 이동 구현
|
|
7599
7594
|
stepPage: de
|
|
7600
7595
|
}), () => Le(void 0)), [Le, de]);
|
|
7601
|
-
const $e = t.
|
|
7596
|
+
const $e = t.quizzes && t.quizzes.length > 0, ut = u.pages.length > 0 && k === u.pages.length, Qe = k > 0 ? k - 1 : null, He = k < z - 1 ? k + 1 : null, ot = ve(() => _ === "prev" ? "translate3d(0%, 0, 0)" : _ === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [_]), Je = ($) => n ? null : $ === u.pages.length ? /* @__PURE__ */ X(
|
|
7602
7597
|
"div",
|
|
7603
7598
|
{
|
|
7604
7599
|
style: {
|
|
@@ -7615,7 +7610,7 @@ function Lu() {
|
|
|
7615
7610
|
/* @__PURE__ */ x(Cn, { isIcon: !1 })
|
|
7616
7611
|
]
|
|
7617
7612
|
}
|
|
7618
|
-
) : /* @__PURE__ */ x(fu, { pages: u.pages, pageIndex:
|
|
7613
|
+
) : /* @__PURE__ */ x(fu, { pages: u.pages, pageIndex: $, maxWidth: m }), bt = {
|
|
7619
7614
|
width: "33.333%",
|
|
7620
7615
|
height: "100%",
|
|
7621
7616
|
flexShrink: 0,
|
|
@@ -7626,7 +7621,7 @@ function Lu() {
|
|
|
7626
7621
|
boxSizing: "border-box",
|
|
7627
7622
|
backfaceVisibility: "hidden",
|
|
7628
7623
|
WebkitBackfaceVisibility: "hidden"
|
|
7629
|
-
}, Vt = !P && (!S ||
|
|
7624
|
+
}, Vt = !P && (!S || _ !== null);
|
|
7630
7625
|
return console.log("여기리랜더"), /* @__PURE__ */ X("div", { ref: y, style: { ...E, touchAction: "pan-y" }, ...pe, children: [
|
|
7631
7626
|
/* @__PURE__ */ X(
|
|
7632
7627
|
"div",
|
|
@@ -7644,7 +7639,7 @@ function Lu() {
|
|
|
7644
7639
|
backfaceVisibility: "hidden",
|
|
7645
7640
|
WebkitBackfaceVisibility: "hidden"
|
|
7646
7641
|
},
|
|
7647
|
-
onTransitionEnd:
|
|
7642
|
+
onTransitionEnd: _ ? V : void 0,
|
|
7648
7643
|
children: [
|
|
7649
7644
|
/* @__PURE__ */ x("div", { style: bt, children: Qe !== null && Je(Qe) }),
|
|
7650
7645
|
/* @__PURE__ */ x("div", { style: bt, children: Je(k) }),
|
|
@@ -7720,7 +7715,7 @@ function Lu() {
|
|
|
7720
7715
|
{
|
|
7721
7716
|
pages: u.pages,
|
|
7722
7717
|
items: p,
|
|
7723
|
-
onGotoPage:
|
|
7718
|
+
onGotoPage: R,
|
|
7724
7719
|
currentPageIndex: k,
|
|
7725
7720
|
isOnExtraPage: ut
|
|
7726
7721
|
}
|
|
@@ -7791,7 +7786,7 @@ const Du = "_Overlay_ybic8_3", $u = "_Dialog_ybic8_15", Vu = "_Body_ybic8_25", q
|
|
|
7791
7786
|
StatSub: gd
|
|
7792
7787
|
};
|
|
7793
7788
|
function md(e) {
|
|
7794
|
-
return e ? e.kind === "temp" ? e.
|
|
7789
|
+
return e ? e.kind === "temp" ? e.image_blob_url : e.image_cdn_url : null;
|
|
7795
7790
|
}
|
|
7796
7791
|
function Wi(e) {
|
|
7797
7792
|
var t;
|
|
@@ -7816,18 +7811,18 @@ const vd = Wt(function() {
|
|
|
7816
7811
|
const p = r.map((M) => n[M]), f = p.length, u = p.reduce((M, B) => M + (B.score ?? 0), 0), T = p.reduce((M, B) => {
|
|
7817
7812
|
const F = v[B.qid];
|
|
7818
7813
|
return M + (F != null && F.isCorrect ? B.score ?? 0 : 0);
|
|
7819
|
-
}, 0), k = p.map((M) => v[M.qid]).filter((M) => !!M),
|
|
7814
|
+
}, 0), k = p.map((M) => v[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), C = f > 0 ? Math.round(R / f) : 0, h = [...k].sort((M, B) => M.ms - B.ms), S = h[0], I = h[h.length - 1], _ = k.filter((M) => !M.multi), O = k.filter((M) => M.multi), P = _.filter((M) => M.isCorrect).length, w = O.filter((M) => M.isCorrect).length, E = k.filter((M) => M.timedOut).length, A = k.filter((M) => M.revealed).length, W = k.filter((M) => !M.isCorrect).sort((M, B) => B.ms - M.ms).slice(0, 3);
|
|
7820
7815
|
return {
|
|
7821
7816
|
total: f,
|
|
7822
7817
|
correct: s,
|
|
7823
7818
|
rate: f ? Math.round(s / f * 100) : 0,
|
|
7824
|
-
timeMsTotal:
|
|
7825
|
-
avgMs:
|
|
7819
|
+
timeMsTotal: R,
|
|
7820
|
+
avgMs: C,
|
|
7826
7821
|
totalScore: u,
|
|
7827
7822
|
gainedScore: T,
|
|
7828
7823
|
fastest: S,
|
|
7829
|
-
slowest:
|
|
7830
|
-
singles: { total:
|
|
7824
|
+
slowest: I,
|
|
7825
|
+
singles: { total: _.length, correct: P },
|
|
7831
7826
|
multis: { total: O.length, correct: w },
|
|
7832
7827
|
timedOut: E,
|
|
7833
7828
|
revealed: A,
|
|
@@ -7983,7 +7978,7 @@ function ar(e) {
|
|
|
7983
7978
|
}
|
|
7984
7979
|
function Do(e) {
|
|
7985
7980
|
if (!e) return {};
|
|
7986
|
-
const t = (e.
|
|
7981
|
+
const t = (e.quizzes ?? []).slice().sort((n, r) => n.index - r.index);
|
|
7987
7982
|
return {
|
|
7988
7983
|
sectionId: e.section_id,
|
|
7989
7984
|
quizzes: t,
|
|
@@ -8195,26 +8190,26 @@ function Cd({ children: e, initialState: t }) {
|
|
|
8195
8190
|
if (s.phase !== "finished" && i.phase === "finished") {
|
|
8196
8191
|
const c = r.current;
|
|
8197
8192
|
if (!c) return;
|
|
8198
|
-
const { sectionId: l, quizzes: a, order: d, perQ: v, startedAt: g, finishedAt: b } = i, m = d.map((
|
|
8193
|
+
const { sectionId: l, quizzes: a, order: d, perQ: v, startedAt: g, finishedAt: b } = i, m = d.map((C) => a[C]), y = m.length, p = m.filter((C) => {
|
|
8199
8194
|
var h;
|
|
8200
|
-
return (h = v[
|
|
8201
|
-
}).length, f = m.reduce((
|
|
8195
|
+
return (h = v[C.qid]) == null ? void 0 : h.isCorrect;
|
|
8196
|
+
}).length, f = m.reduce((C, h) => C + (h.score ?? 0), 0), u = m.reduce((C, h) => {
|
|
8202
8197
|
const S = v[h.qid];
|
|
8203
|
-
return
|
|
8204
|
-
}, 0), T = typeof g == "number" && typeof b == "number" ? Math.max(0, b - g) : 0, k = m.map((
|
|
8205
|
-
const h = v[
|
|
8198
|
+
return C + (S != null && S.isCorrect ? h.score ?? 0 : 0);
|
|
8199
|
+
}, 0), T = typeof g == "number" && typeof b == "number" ? Math.max(0, b - g) : 0, k = m.map((C) => {
|
|
8200
|
+
const h = v[C.qid];
|
|
8206
8201
|
return {
|
|
8207
|
-
qid:
|
|
8208
|
-
index:
|
|
8209
|
-
question:
|
|
8210
|
-
score:
|
|
8202
|
+
qid: C.qid,
|
|
8203
|
+
index: C.index,
|
|
8204
|
+
question: C.question,
|
|
8205
|
+
score: C.score ?? 0,
|
|
8211
8206
|
isCorrect: (h == null ? void 0 : h.isCorrect) ?? !1,
|
|
8212
8207
|
selected: (h == null ? void 0 : h.selected) ?? [],
|
|
8213
8208
|
correctIdxes: (h == null ? void 0 : h.correctIdxes) ?? [],
|
|
8214
8209
|
ms: (h == null ? void 0 : h.ms) ?? 0,
|
|
8215
8210
|
timedOut: (h == null ? void 0 : h.timedOut) ?? !1
|
|
8216
8211
|
};
|
|
8217
|
-
}),
|
|
8212
|
+
}), R = {
|
|
8218
8213
|
sectionId: l ?? "",
|
|
8219
8214
|
total: y,
|
|
8220
8215
|
correct: p,
|
|
@@ -8224,7 +8219,7 @@ function Cd({ children: e, initialState: t }) {
|
|
|
8224
8219
|
timeMsTotal: T,
|
|
8225
8220
|
perQuestion: k
|
|
8226
8221
|
};
|
|
8227
|
-
c(
|
|
8222
|
+
c(R);
|
|
8228
8223
|
}
|
|
8229
8224
|
});
|
|
8230
8225
|
return () => o();
|
|
@@ -8492,15 +8487,15 @@ const Rd = ({
|
|
|
8492
8487
|
a({ x: y.width * f / 2, y: 80 });
|
|
8493
8488
|
return;
|
|
8494
8489
|
}
|
|
8495
|
-
const T = u.getBoundingClientRect(), k = m.querySelector(`[data-g="${n}"]`),
|
|
8496
|
-
let
|
|
8497
|
-
|
|
8498
|
-
const h = 160, S = 50,
|
|
8499
|
-
|
|
8500
|
-
Math.min(
|
|
8501
|
-
), w = (((
|
|
8490
|
+
const T = u.getBoundingClientRect(), k = m.querySelector(`[data-g="${n}"]`), R = k == null ? void 0 : k.getBoundingClientRect();
|
|
8491
|
+
let C = (T.left + T.width / 2 - y.left) * f;
|
|
8492
|
+
R && (C = ((R.left + T.right) / 2 - y.left) * f);
|
|
8493
|
+
const h = 160, S = 50, I = 16, _ = 12, O = y.width * f, P = Math.max(
|
|
8494
|
+
I + h / 2,
|
|
8495
|
+
Math.min(C, O - I - h / 2)
|
|
8496
|
+
), w = (((R == null ? void 0 : R.top) ?? T.top) - y.top) * f - S - _;
|
|
8502
8497
|
let E = w;
|
|
8503
|
-
w <
|
|
8498
|
+
w < I && (E = (T.bottom - y.top) * f + _), a({ x: P, y: E });
|
|
8504
8499
|
};
|
|
8505
8500
|
g();
|
|
8506
8501
|
const b = e.current;
|
|
@@ -8585,20 +8580,20 @@ const Rd = ({
|
|
|
8585
8580
|
const f = () => {
|
|
8586
8581
|
const T = e.current;
|
|
8587
8582
|
if (!T) return;
|
|
8588
|
-
const k = T.getBoundingClientRect(),
|
|
8583
|
+
const k = T.getBoundingClientRect(), C = 1 / (o.getState().playbackScale || 1), h = T.querySelector(`[data-g="${t}"]`), S = T.querySelector(`[data-g="${n}"]`);
|
|
8589
8584
|
if (h) {
|
|
8590
|
-
const
|
|
8585
|
+
const I = h.getBoundingClientRect();
|
|
8591
8586
|
c({
|
|
8592
|
-
x: (
|
|
8593
|
-
y: (
|
|
8587
|
+
x: (I.left - k.left) * C,
|
|
8588
|
+
y: (I.bottom - k.top) * C
|
|
8594
8589
|
});
|
|
8595
8590
|
} else
|
|
8596
8591
|
c(null);
|
|
8597
8592
|
if (S) {
|
|
8598
|
-
const
|
|
8593
|
+
const I = S.getBoundingClientRect();
|
|
8599
8594
|
a({
|
|
8600
|
-
x: (
|
|
8601
|
-
y: (
|
|
8595
|
+
x: (I.right - k.left) * C,
|
|
8596
|
+
y: (I.bottom - k.top) * C
|
|
8602
8597
|
});
|
|
8603
8598
|
} else
|
|
8604
8599
|
a(null);
|
|
@@ -8612,10 +8607,10 @@ const Rd = ({
|
|
|
8612
8607
|
const g = Z((f, u) => {
|
|
8613
8608
|
var k;
|
|
8614
8609
|
const T = document.elementsFromPoint(f, u);
|
|
8615
|
-
for (const
|
|
8616
|
-
const
|
|
8617
|
-
if (
|
|
8618
|
-
return parseInt(
|
|
8610
|
+
for (const R of T) {
|
|
8611
|
+
const C = (k = R.getAttribute) == null ? void 0 : k.call(R, "data-g");
|
|
8612
|
+
if (C != null)
|
|
8613
|
+
return parseInt(C, 10);
|
|
8619
8614
|
}
|
|
8620
8615
|
return null;
|
|
8621
8616
|
}, []), b = Z(
|
|
@@ -8788,7 +8783,7 @@ const Pd = ({ isOpen: e, onClose: t, text: n }) => e ? /* @__PURE__ */ x(
|
|
|
8788
8783
|
)
|
|
8789
8784
|
}
|
|
8790
8785
|
) : null, Bd = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
8791
|
-
function
|
|
8786
|
+
function Nd({
|
|
8792
8787
|
section: e,
|
|
8793
8788
|
initialViewerState: t,
|
|
8794
8789
|
initialProgressRunIndex: n,
|
|
@@ -8804,11 +8799,11 @@ function qd({
|
|
|
8804
8799
|
isDev: g = !1
|
|
8805
8800
|
}) {
|
|
8806
8801
|
const b = String((e == null ? void 0 : e.section_id) ?? "0"), m = ve(() => {
|
|
8807
|
-
var k,
|
|
8802
|
+
var k, R;
|
|
8808
8803
|
const u = ((k = e == null ? void 0 : e.ast) == null ? void 0 : k.blocks) ?? [];
|
|
8809
8804
|
let T = 0;
|
|
8810
|
-
for (const
|
|
8811
|
-
(
|
|
8805
|
+
for (const C of u)
|
|
8806
|
+
(C == null ? void 0 : C.type) !== "image" && (T += ((R = C == null ? void 0 : C.runs) == null ? void 0 : R.length) ?? 0);
|
|
8812
8807
|
return T;
|
|
8813
8808
|
}, [e]), y = ve(() => typeof n == "number" ? Bd(n, m > 0 ? 0 : -1, Math.max(m - 1, -1)) : (m > 0, 0), [n, m]), p = ve(
|
|
8814
8809
|
() => ({
|
|
@@ -8905,5 +8900,5 @@ function zd() {
|
|
|
8905
8900
|
);
|
|
8906
8901
|
}
|
|
8907
8902
|
export {
|
|
8908
|
-
|
|
8903
|
+
Nd as CRViewer
|
|
8909
8904
|
};
|