@readerseye2/cr_viewer 1.0.46 → 1.0.47
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -5
- package/dist/index.js +999 -999
- package/dist/overlay-bars/topBar/OverlayTopBar.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -26,38 +26,38 @@ function Yi() {
|
|
|
26
26
|
if (Nr) return An;
|
|
27
27
|
Nr = 1;
|
|
28
28
|
var e = D;
|
|
29
|
-
function t(
|
|
30
|
-
return
|
|
29
|
+
function t(m, p) {
|
|
30
|
+
return m === p && (m !== 0 || 1 / m === 1 / p) || m !== m && p !== p;
|
|
31
31
|
}
|
|
32
32
|
var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, i = e.useLayoutEffect, s = e.useDebugValue;
|
|
33
|
-
function u(
|
|
34
|
-
var
|
|
33
|
+
function u(m, p) {
|
|
34
|
+
var f = p(), v = r({ inst: { value: f, getSnapshot: p } }), y = v[0].inst, c = v[1];
|
|
35
35
|
return i(
|
|
36
36
|
function() {
|
|
37
|
-
y.value =
|
|
37
|
+
y.value = f, y.getSnapshot = p, a(y) && c({ inst: y });
|
|
38
38
|
},
|
|
39
|
-
[
|
|
39
|
+
[m, f, p]
|
|
40
40
|
), o(
|
|
41
41
|
function() {
|
|
42
|
-
return a(y) && c({ inst: y }),
|
|
42
|
+
return a(y) && c({ inst: y }), m(function() {
|
|
43
43
|
a(y) && c({ inst: y });
|
|
44
44
|
});
|
|
45
45
|
},
|
|
46
|
-
[
|
|
47
|
-
), s(
|
|
46
|
+
[m]
|
|
47
|
+
), s(f), f;
|
|
48
48
|
}
|
|
49
|
-
function a(
|
|
50
|
-
var
|
|
51
|
-
|
|
49
|
+
function a(m) {
|
|
50
|
+
var p = m.getSnapshot;
|
|
51
|
+
m = m.value;
|
|
52
52
|
try {
|
|
53
|
-
var
|
|
54
|
-
return !n(
|
|
53
|
+
var f = p();
|
|
54
|
+
return !n(m, f);
|
|
55
55
|
} catch {
|
|
56
56
|
return !0;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function l(
|
|
60
|
-
return
|
|
59
|
+
function l(m, p) {
|
|
60
|
+
return p();
|
|
61
61
|
}
|
|
62
62
|
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? l : u;
|
|
63
63
|
return An.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, An;
|
|
@@ -75,54 +75,54 @@ var Bn = {};
|
|
|
75
75
|
var Fr;
|
|
76
76
|
function Zi() {
|
|
77
77
|
return Fr || (Fr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
78
|
-
function e(
|
|
79
|
-
return
|
|
78
|
+
function e(f, v) {
|
|
79
|
+
return f === v && (f !== 0 || 1 / f === 1 / v) || f !== f && v !== v;
|
|
80
80
|
}
|
|
81
|
-
function t(
|
|
81
|
+
function t(f, v) {
|
|
82
82
|
d || o.startTransition === void 0 || (d = !0, console.error(
|
|
83
83
|
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
|
|
84
84
|
));
|
|
85
85
|
var y = v();
|
|
86
|
-
if (!
|
|
86
|
+
if (!m) {
|
|
87
87
|
var c = v();
|
|
88
88
|
i(y, c) || (console.error(
|
|
89
89
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
90
|
-
),
|
|
90
|
+
), m = !0);
|
|
91
91
|
}
|
|
92
92
|
c = s({
|
|
93
93
|
inst: { value: y, getSnapshot: v }
|
|
94
94
|
});
|
|
95
|
-
var
|
|
95
|
+
var g = c[0].inst, h = c[1];
|
|
96
96
|
return a(
|
|
97
97
|
function() {
|
|
98
|
-
|
|
98
|
+
g.value = y, g.getSnapshot = v, n(g) && h({ inst: g });
|
|
99
99
|
},
|
|
100
|
-
[
|
|
100
|
+
[f, y, v]
|
|
101
101
|
), u(
|
|
102
102
|
function() {
|
|
103
|
-
return n(
|
|
104
|
-
n(
|
|
103
|
+
return n(g) && h({ inst: g }), f(function() {
|
|
104
|
+
n(g) && h({ inst: g });
|
|
105
105
|
});
|
|
106
106
|
},
|
|
107
|
-
[
|
|
107
|
+
[f]
|
|
108
108
|
), l(y), y;
|
|
109
109
|
}
|
|
110
|
-
function n(
|
|
111
|
-
var v =
|
|
112
|
-
|
|
110
|
+
function n(f) {
|
|
111
|
+
var v = f.getSnapshot;
|
|
112
|
+
f = f.value;
|
|
113
113
|
try {
|
|
114
114
|
var y = v();
|
|
115
|
-
return !i(
|
|
115
|
+
return !i(f, y);
|
|
116
116
|
} catch {
|
|
117
117
|
return !0;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
function r(
|
|
120
|
+
function r(f, v) {
|
|
121
121
|
return v();
|
|
122
122
|
}
|
|
123
123
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
124
|
-
var o = D, i = typeof Object.is == "function" ? Object.is : e, s = o.useState, u = o.useEffect, a = o.useLayoutEffect, l = o.useDebugValue, d = !1,
|
|
125
|
-
Bn.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore :
|
|
124
|
+
var o = D, i = typeof Object.is == "function" ? Object.is : e, s = o.useState, u = o.useEffect, a = o.useLayoutEffect, l = o.useDebugValue, d = !1, m = !1, p = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
|
|
125
|
+
Bn.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : p, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
126
126
|
})()), Bn;
|
|
127
127
|
}
|
|
128
128
|
var Wr;
|
|
@@ -147,7 +147,7 @@ function Ji() {
|
|
|
147
147
|
return l === d && (l !== 0 || 1 / l === 1 / d) || l !== l && d !== d;
|
|
148
148
|
}
|
|
149
149
|
var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, i = e.useRef, s = e.useEffect, u = e.useMemo, a = e.useDebugValue;
|
|
150
|
-
return Pn.useSyncExternalStoreWithSelector = function(l, d,
|
|
150
|
+
return Pn.useSyncExternalStoreWithSelector = function(l, d, m, p, f) {
|
|
151
151
|
var v = i(null);
|
|
152
152
|
if (v.current === null) {
|
|
153
153
|
var y = { hasValue: !1, value: null };
|
|
@@ -155,30 +155,30 @@ function Ji() {
|
|
|
155
155
|
} else y = v.current;
|
|
156
156
|
v = u(
|
|
157
157
|
function() {
|
|
158
|
-
function
|
|
159
|
-
if (!
|
|
160
|
-
if (
|
|
158
|
+
function g(O) {
|
|
159
|
+
if (!h) {
|
|
160
|
+
if (h = !0, w = O, O = p(O), f !== void 0 && y.hasValue) {
|
|
161
161
|
var b = y.value;
|
|
162
|
-
if (
|
|
162
|
+
if (f(b, O))
|
|
163
163
|
return C = b;
|
|
164
164
|
}
|
|
165
165
|
return C = O;
|
|
166
166
|
}
|
|
167
167
|
if (b = C, r(w, O)) return b;
|
|
168
|
-
var S =
|
|
169
|
-
return
|
|
168
|
+
var S = p(O);
|
|
169
|
+
return f !== void 0 && f(b, S) ? (w = O, b) : (w = O, C = S);
|
|
170
170
|
}
|
|
171
|
-
var
|
|
171
|
+
var h = !1, w, C, R = m === void 0 ? null : m;
|
|
172
172
|
return [
|
|
173
173
|
function() {
|
|
174
|
-
return
|
|
174
|
+
return g(d());
|
|
175
175
|
},
|
|
176
176
|
R === null ? void 0 : function() {
|
|
177
|
-
return
|
|
177
|
+
return g(R());
|
|
178
178
|
}
|
|
179
179
|
];
|
|
180
180
|
},
|
|
181
|
-
[d,
|
|
181
|
+
[d, m, p, f]
|
|
182
182
|
);
|
|
183
183
|
var c = o(l, v[0], v[1]);
|
|
184
184
|
return s(
|
|
@@ -207,7 +207,7 @@ function es() {
|
|
|
207
207
|
}
|
|
208
208
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
209
209
|
var t = D, n = Ko(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, i = t.useRef, s = t.useEffect, u = t.useMemo, a = t.useDebugValue;
|
|
210
|
-
Gn.useSyncExternalStoreWithSelector = function(l, d,
|
|
210
|
+
Gn.useSyncExternalStoreWithSelector = function(l, d, m, p, f) {
|
|
211
211
|
var v = i(null);
|
|
212
212
|
if (v.current === null) {
|
|
213
213
|
var y = { hasValue: !1, value: null };
|
|
@@ -215,31 +215,31 @@ function es() {
|
|
|
215
215
|
} else y = v.current;
|
|
216
216
|
v = u(
|
|
217
217
|
function() {
|
|
218
|
-
function
|
|
219
|
-
if (!
|
|
220
|
-
if (
|
|
218
|
+
function g(O) {
|
|
219
|
+
if (!h) {
|
|
220
|
+
if (h = !0, w = O, O = p(O), f !== void 0 && y.hasValue) {
|
|
221
221
|
var b = y.value;
|
|
222
|
-
if (
|
|
222
|
+
if (f(b, O))
|
|
223
223
|
return C = b;
|
|
224
224
|
}
|
|
225
225
|
return C = O;
|
|
226
226
|
}
|
|
227
227
|
if (b = C, r(w, O))
|
|
228
228
|
return b;
|
|
229
|
-
var S =
|
|
230
|
-
return
|
|
229
|
+
var S = p(O);
|
|
230
|
+
return f !== void 0 && f(b, S) ? (w = O, b) : (w = O, C = S);
|
|
231
231
|
}
|
|
232
|
-
var
|
|
232
|
+
var h = !1, w, C, R = m === void 0 ? null : m;
|
|
233
233
|
return [
|
|
234
234
|
function() {
|
|
235
|
-
return
|
|
235
|
+
return g(d());
|
|
236
236
|
},
|
|
237
237
|
R === null ? void 0 : function() {
|
|
238
|
-
return
|
|
238
|
+
return g(R());
|
|
239
239
|
}
|
|
240
240
|
];
|
|
241
241
|
},
|
|
242
|
-
[d,
|
|
242
|
+
[d, m, p, f]
|
|
243
243
|
);
|
|
244
244
|
var c = o(l, v[0], v[1]);
|
|
245
245
|
return s(
|
|
@@ -259,10 +259,10 @@ var ns = ts();
|
|
|
259
259
|
const rs = /* @__PURE__ */ Uo(ns), qr = (e) => {
|
|
260
260
|
let t;
|
|
261
261
|
const n = /* @__PURE__ */ new Set(), r = (l, d) => {
|
|
262
|
-
const
|
|
263
|
-
if (!Object.is(
|
|
264
|
-
const
|
|
265
|
-
t = d ?? (typeof
|
|
262
|
+
const m = typeof l == "function" ? l(t) : l;
|
|
263
|
+
if (!Object.is(m, t)) {
|
|
264
|
+
const p = t;
|
|
265
|
+
t = d ?? (typeof m != "object" || m === null) ? m : Object.assign({}, t, m), n.forEach((f) => f(t, p));
|
|
266
266
|
}
|
|
267
267
|
}, o = () => t, u = { setState: r, getState: o, getInitialState: () => a, subscribe: (l) => (n.add(l), () => n.delete(l)) }, a = t = e(r, o, u);
|
|
268
268
|
return u;
|
|
@@ -903,21 +903,21 @@ function Cr(e, t, n) {
|
|
|
903
903
|
function xs(e, t, n, r, o, i, s, u, a) {
|
|
904
904
|
const l = D.useCallback(
|
|
905
905
|
(d) => {
|
|
906
|
-
const
|
|
907
|
-
let
|
|
908
|
-
for (; !
|
|
909
|
-
|
|
910
|
-
const
|
|
906
|
+
const m = ws(d.children, t, u ? "offsetWidth" : "offsetHeight", o);
|
|
907
|
+
let p = d.parentElement;
|
|
908
|
+
for (; !p.dataset.virtuosoScroller; )
|
|
909
|
+
p = p.parentElement;
|
|
910
|
+
const f = p.lastElementChild.dataset.viewportType === "window";
|
|
911
911
|
let v;
|
|
912
|
-
|
|
913
|
-
const y = s ? u ? s.scrollLeft : s.scrollTop :
|
|
912
|
+
f && (v = p.ownerDocument.defaultView);
|
|
913
|
+
const y = s ? u ? s.scrollLeft : s.scrollTop : f ? u ? v.scrollX || v.document.documentElement.scrollLeft : v.scrollY || v.document.documentElement.scrollTop : u ? p.scrollLeft : p.scrollTop, c = s ? u ? s.scrollWidth : s.scrollHeight : f ? u ? v.document.documentElement.scrollWidth : v.document.documentElement.scrollHeight : u ? p.scrollWidth : p.scrollHeight, g = s ? u ? s.offsetWidth : s.offsetHeight : f ? u ? v.innerWidth : v.innerHeight : u ? p.offsetWidth : p.offsetHeight;
|
|
914
914
|
r({
|
|
915
915
|
scrollHeight: c,
|
|
916
916
|
scrollTop: Math.max(y, 0),
|
|
917
|
-
viewportHeight:
|
|
917
|
+
viewportHeight: g
|
|
918
918
|
}), i == null || i(
|
|
919
919
|
u ? Xr("column-gap", getComputedStyle(d).columnGap, o) : Xr("row-gap", getComputedStyle(d).rowGap, o)
|
|
920
|
-
),
|
|
920
|
+
), m !== null && e(m);
|
|
921
921
|
},
|
|
922
922
|
[e, t, o, i, s, r, u]
|
|
923
923
|
);
|
|
@@ -935,8 +935,8 @@ function ws(e, t, n, r) {
|
|
|
935
935
|
const a = parseInt(u.dataset.index), l = parseFloat(u.dataset.knownSize), d = t(u, n);
|
|
936
936
|
if (d === 0 && r("Zero-sized element, this should not happen", { child: u }, Ye.ERROR), d === l)
|
|
937
937
|
continue;
|
|
938
|
-
const
|
|
939
|
-
i.length === 0 ||
|
|
938
|
+
const m = i[i.length - 1];
|
|
939
|
+
i.length === 0 || m.size !== d || m.endIndex !== a - 1 ? i.push({ endIndex: a, size: d, startIndex: a }) : i[i.length - 1].endIndex++;
|
|
940
940
|
}
|
|
941
941
|
return i;
|
|
942
942
|
}
|
|
@@ -949,17 +949,17 @@ function ei(e, t, n) {
|
|
|
949
949
|
if (!(a != null && a.offsetParent))
|
|
950
950
|
return;
|
|
951
951
|
const l = a.getBoundingClientRect(), d = l.width;
|
|
952
|
-
let
|
|
952
|
+
let m, p;
|
|
953
953
|
if (t) {
|
|
954
|
-
const
|
|
955
|
-
|
|
954
|
+
const f = t.getBoundingClientRect(), v = l.top - f.top;
|
|
955
|
+
p = f.height - Math.max(0, v), m = v + t.scrollTop;
|
|
956
956
|
} else {
|
|
957
|
-
const
|
|
958
|
-
|
|
957
|
+
const f = s.current.ownerDocument.defaultView;
|
|
958
|
+
p = f.innerHeight - Math.max(0, l.top), m = l.top + f.scrollY;
|
|
959
959
|
}
|
|
960
960
|
r.current = {
|
|
961
|
-
offsetTop:
|
|
962
|
-
visibleHeight:
|
|
961
|
+
offsetTop: m,
|
|
962
|
+
visibleHeight: p,
|
|
963
963
|
visibleWidth: d
|
|
964
964
|
}, e(r.current);
|
|
965
965
|
},
|
|
@@ -988,7 +988,7 @@ function ei(e, t, n) {
|
|
|
988
988
|
}
|
|
989
989
|
const Ke = ye(
|
|
990
990
|
() => {
|
|
991
|
-
const e = ve(), t = ve(), n = W(0), r = ve(), o = W(0), i = ve(), s = ve(), u = W(0), a = W(0), l = W(0), d = W(0),
|
|
991
|
+
const e = ve(), t = ve(), n = W(0), r = ve(), o = W(0), i = ve(), s = ve(), u = W(0), a = W(0), l = W(0), d = W(0), m = ve(), p = ve(), f = W(!1), v = W(!1), y = W(!1);
|
|
992
992
|
return oe(
|
|
993
993
|
H(
|
|
994
994
|
e,
|
|
@@ -1008,13 +1008,13 @@ const Ke = ye(
|
|
|
1008
1008
|
footerHeight: d,
|
|
1009
1009
|
headerHeight: u,
|
|
1010
1010
|
horizontalDirection: v,
|
|
1011
|
-
scrollBy:
|
|
1011
|
+
scrollBy: p,
|
|
1012
1012
|
// input
|
|
1013
1013
|
scrollContainerState: e,
|
|
1014
1014
|
scrollHeight: s,
|
|
1015
|
-
scrollingInProgress:
|
|
1015
|
+
scrollingInProgress: f,
|
|
1016
1016
|
// signals
|
|
1017
|
-
scrollTo:
|
|
1017
|
+
scrollTo: m,
|
|
1018
1018
|
scrollTop: t,
|
|
1019
1019
|
skipAnimationFrameInResizeObserver: y,
|
|
1020
1020
|
smoothScrollTargetReached: r,
|
|
@@ -1229,8 +1229,8 @@ function ks(e, t) {
|
|
|
1229
1229
|
if (u.some(Ps(r)))
|
|
1230
1230
|
continue;
|
|
1231
1231
|
let a = !1, l = !1;
|
|
1232
|
-
for (const { end: d, start:
|
|
1233
|
-
a ? (o >=
|
|
1232
|
+
for (const { end: d, start: m, value: p } of u)
|
|
1233
|
+
a ? (o >= m || i === p) && (e = pr(e, m)) : (l = p !== i, a = !0), d > o && o >= m && p !== i && (e = et(e, o + 1, p));
|
|
1234
1234
|
l && (e = et(e, s, i));
|
|
1235
1235
|
}
|
|
1236
1236
|
return [e, n];
|
|
@@ -1272,20 +1272,20 @@ function Es(e, [t, n, r, o]) {
|
|
|
1272
1272
|
const i = e.sizeTree;
|
|
1273
1273
|
let s = i, u = 0;
|
|
1274
1274
|
if (n.length > 0 && Te(i) && t.length === 2) {
|
|
1275
|
-
const
|
|
1276
|
-
s = n.reduce((v, y) => et(et(v, y,
|
|
1275
|
+
const p = t[0].size, f = t[1].size;
|
|
1276
|
+
s = n.reduce((v, y) => et(et(v, y, p), y + 1, f), s);
|
|
1277
1277
|
} else
|
|
1278
1278
|
[s, u] = ks(s, t);
|
|
1279
1279
|
if (s === i)
|
|
1280
1280
|
return e;
|
|
1281
|
-
const { lastIndex: a, lastOffset: l, lastSize: d, offsetTree:
|
|
1281
|
+
const { lastIndex: a, lastOffset: l, lastSize: d, offsetTree: m } = mr(e.offsetTree, u, s, o);
|
|
1282
1282
|
return {
|
|
1283
1283
|
groupIndices: n,
|
|
1284
|
-
groupOffsetTree: n.reduce((
|
|
1284
|
+
groupOffsetTree: n.reduce((p, f) => et(p, f, Zt(f, m, o)), Lt()),
|
|
1285
1285
|
lastIndex: a,
|
|
1286
1286
|
lastOffset: l,
|
|
1287
1287
|
lastSize: d,
|
|
1288
|
-
offsetTree:
|
|
1288
|
+
offsetTree: m,
|
|
1289
1289
|
sizeTree: s
|
|
1290
1290
|
};
|
|
1291
1291
|
}
|
|
@@ -1310,12 +1310,12 @@ function mr(e, t, n, r) {
|
|
|
1310
1310
|
} else
|
|
1311
1311
|
o = [];
|
|
1312
1312
|
for (const { start: l, value: d } of Ht(n, t, 1 / 0)) {
|
|
1313
|
-
const
|
|
1313
|
+
const m = l - i, p = m * s + u + m * r;
|
|
1314
1314
|
o.push({
|
|
1315
1315
|
index: l,
|
|
1316
|
-
offset:
|
|
1316
|
+
offset: p,
|
|
1317
1317
|
size: d
|
|
1318
|
-
}), i = l, u =
|
|
1318
|
+
}), i = l, u = p, s = d;
|
|
1319
1319
|
}
|
|
1320
1320
|
return {
|
|
1321
1321
|
lastIndex: i,
|
|
@@ -1336,10 +1336,10 @@ const As = {
|
|
|
1336
1336
|
offsetWidth: "width"
|
|
1337
1337
|
}, ht = ye(
|
|
1338
1338
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
1339
|
-
const n = ve(), r = ve(), o = je(r, 0), i = ve(), s = ve(), u = W(0), a = W([]), l = W(void 0), d = W(void 0),
|
|
1339
|
+
const n = ve(), r = ve(), o = je(r, 0), i = ve(), s = ve(), u = W(0), a = W([]), l = W(void 0), d = W(void 0), m = W(void 0), p = W(void 0), f = W((b, S) => xt(b, As[S])), v = W(void 0), y = W(0), c = Ts(), g = je(
|
|
1340
1340
|
H(n, he(a, e, y), gt(Es, c), Me()),
|
|
1341
1341
|
c
|
|
1342
|
-
),
|
|
1342
|
+
), h = je(
|
|
1343
1343
|
H(
|
|
1344
1344
|
a,
|
|
1345
1345
|
Me(),
|
|
@@ -1355,7 +1355,7 @@ const As = {
|
|
|
1355
1355
|
H(
|
|
1356
1356
|
a,
|
|
1357
1357
|
ae((b) => b.length > 0),
|
|
1358
|
-
he(
|
|
1358
|
+
he(g, y),
|
|
1359
1359
|
Y(([b, S, k]) => {
|
|
1360
1360
|
const T = b.reduce((M, P, I) => et(M, P, Zt(P, S.offsetTree, k) || I), Lt());
|
|
1361
1361
|
return {
|
|
@@ -1365,11 +1365,11 @@ const As = {
|
|
|
1365
1365
|
};
|
|
1366
1366
|
})
|
|
1367
1367
|
),
|
|
1368
|
-
|
|
1368
|
+
g
|
|
1369
1369
|
), oe(
|
|
1370
1370
|
H(
|
|
1371
1371
|
r,
|
|
1372
|
-
he(
|
|
1372
|
+
he(g),
|
|
1373
1373
|
ae(([b, { lastIndex: S }]) => b < S),
|
|
1374
1374
|
Y(([b, { lastIndex: S, lastSize: k }]) => [
|
|
1375
1375
|
{
|
|
@@ -1391,9 +1391,9 @@ const As = {
|
|
|
1391
1391
|
oe(
|
|
1392
1392
|
H(
|
|
1393
1393
|
d,
|
|
1394
|
-
ae((b) => b !== void 0 && Te(Pe(
|
|
1394
|
+
ae((b) => b !== void 0 && Te(Pe(g).sizeTree)),
|
|
1395
1395
|
Y((b) => {
|
|
1396
|
-
const S = Pe(
|
|
1396
|
+
const S = Pe(m), k = Pe(a).length > 0;
|
|
1397
1397
|
return S ? k ? [
|
|
1398
1398
|
{ endIndex: 0, size: S, startIndex: 0 },
|
|
1399
1399
|
{ endIndex: 1, size: b, startIndex: 1 }
|
|
@@ -1403,8 +1403,8 @@ const As = {
|
|
|
1403
1403
|
n
|
|
1404
1404
|
), oe(
|
|
1405
1405
|
H(
|
|
1406
|
-
|
|
1407
|
-
ae((b) => b !== void 0 && b.length > 0 && Te(Pe(
|
|
1406
|
+
p,
|
|
1407
|
+
ae((b) => b !== void 0 && b.length > 0 && Te(Pe(g).sizeTree)),
|
|
1408
1408
|
Y((b) => {
|
|
1409
1409
|
const S = [];
|
|
1410
1410
|
let k = b[0], T = 0;
|
|
@@ -1427,7 +1427,7 @@ const As = {
|
|
|
1427
1427
|
), oe(
|
|
1428
1428
|
H(
|
|
1429
1429
|
a,
|
|
1430
|
-
he(
|
|
1430
|
+
he(m, d),
|
|
1431
1431
|
ae(([, b, S]) => b !== void 0 && S !== void 0),
|
|
1432
1432
|
Y(([b, S, k]) => {
|
|
1433
1433
|
const T = [];
|
|
@@ -1451,7 +1451,7 @@ const As = {
|
|
|
1451
1451
|
const C = tt(
|
|
1452
1452
|
H(
|
|
1453
1453
|
n,
|
|
1454
|
-
he(
|
|
1454
|
+
he(g),
|
|
1455
1455
|
gt(
|
|
1456
1456
|
({ sizes: b }, [S, k]) => ({
|
|
1457
1457
|
changed: k !== b,
|
|
@@ -1472,11 +1472,11 @@ const As = {
|
|
|
1472
1472
|
Y((b) => b.diff)
|
|
1473
1473
|
),
|
|
1474
1474
|
(b) => {
|
|
1475
|
-
const { groupIndices: S } = Pe(
|
|
1475
|
+
const { groupIndices: S } = Pe(g);
|
|
1476
1476
|
if (b > 0)
|
|
1477
1477
|
pe(t, !0), pe(i, b + Yr(b, S));
|
|
1478
1478
|
else if (b < 0) {
|
|
1479
|
-
const k = Pe(
|
|
1479
|
+
const k = Pe(h);
|
|
1480
1480
|
k.length > 0 && (b -= Yr(-b, k)), pe(s, b);
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
@@ -1491,7 +1491,7 @@ const As = {
|
|
|
1491
1491
|
oe(
|
|
1492
1492
|
H(
|
|
1493
1493
|
i,
|
|
1494
|
-
he(
|
|
1494
|
+
he(g),
|
|
1495
1495
|
Y(([b, S]) => {
|
|
1496
1496
|
const k = S.groupIndices.length > 0, T = [], M = S.lastSize;
|
|
1497
1497
|
if (k) {
|
|
@@ -1552,7 +1552,7 @@ const As = {
|
|
|
1552
1552
|
const O = tt(
|
|
1553
1553
|
H(
|
|
1554
1554
|
s,
|
|
1555
|
-
he(
|
|
1555
|
+
he(g, y),
|
|
1556
1556
|
Y(([b, { offsetTree: S }, k]) => {
|
|
1557
1557
|
const T = -b;
|
|
1558
1558
|
return Zt(T, S, k);
|
|
@@ -1562,13 +1562,13 @@ const As = {
|
|
|
1562
1562
|
return oe(
|
|
1563
1563
|
H(
|
|
1564
1564
|
s,
|
|
1565
|
-
he(
|
|
1565
|
+
he(g, y),
|
|
1566
1566
|
Y(([b, S, k]) => {
|
|
1567
1567
|
if (S.groupIndices.length > 0) {
|
|
1568
1568
|
if (Te(S.sizeTree))
|
|
1569
1569
|
return S;
|
|
1570
1570
|
let T = Lt();
|
|
1571
|
-
const M = Pe(
|
|
1571
|
+
const M = Pe(h);
|
|
1572
1572
|
let P = 0, I = 0, _ = 0;
|
|
1573
1573
|
for (; P < -b; ) {
|
|
1574
1574
|
_ = M[I];
|
|
@@ -1596,7 +1596,7 @@ const As = {
|
|
|
1596
1596
|
}
|
|
1597
1597
|
})
|
|
1598
1598
|
),
|
|
1599
|
-
|
|
1599
|
+
g
|
|
1600
1600
|
), {
|
|
1601
1601
|
beforeUnshiftWith: R,
|
|
1602
1602
|
// input
|
|
@@ -1604,17 +1604,17 @@ const As = {
|
|
|
1604
1604
|
defaultItemSize: d,
|
|
1605
1605
|
firstItemIndex: u,
|
|
1606
1606
|
fixedItemSize: l,
|
|
1607
|
-
fixedGroupSize:
|
|
1607
|
+
fixedGroupSize: m,
|
|
1608
1608
|
gap: y,
|
|
1609
1609
|
groupIndices: a,
|
|
1610
|
-
heightEstimates:
|
|
1611
|
-
itemSize:
|
|
1610
|
+
heightEstimates: p,
|
|
1611
|
+
itemSize: f,
|
|
1612
1612
|
listRefresh: C,
|
|
1613
1613
|
shiftWith: s,
|
|
1614
1614
|
shiftWithOffset: O,
|
|
1615
1615
|
sizeRanges: n,
|
|
1616
1616
|
// output
|
|
1617
|
-
sizes:
|
|
1617
|
+
sizes: g,
|
|
1618
1618
|
statefulTotalCount: o,
|
|
1619
1619
|
totalCount: r,
|
|
1620
1620
|
trackItemSizes: w,
|
|
@@ -1691,19 +1691,19 @@ const on = ye(
|
|
|
1691
1691
|
scrollingInProgress: a,
|
|
1692
1692
|
scrollTo: l,
|
|
1693
1693
|
smoothScrollTargetReached: d,
|
|
1694
|
-
viewportHeight:
|
|
1694
|
+
viewportHeight: m
|
|
1695
1695
|
},
|
|
1696
|
-
{ log:
|
|
1696
|
+
{ log: p }
|
|
1697
1697
|
]) => {
|
|
1698
|
-
const
|
|
1699
|
-
let c = null,
|
|
1698
|
+
const f = ve(), v = ve(), y = W(0);
|
|
1699
|
+
let c = null, g = null, h = null;
|
|
1700
1700
|
function w() {
|
|
1701
|
-
c && (c(), c = null),
|
|
1701
|
+
c && (c(), c = null), h && (h(), h = null), g && (clearTimeout(g), g = null), pe(a, !1);
|
|
1702
1702
|
}
|
|
1703
1703
|
return oe(
|
|
1704
1704
|
H(
|
|
1705
|
-
|
|
1706
|
-
he(n,
|
|
1705
|
+
f,
|
|
1706
|
+
he(n, m, r, y, u, s, p),
|
|
1707
1707
|
he(e, i, o),
|
|
1708
1708
|
Y(
|
|
1709
1709
|
([
|
|
@@ -1716,18 +1716,18 @@ const on = ye(
|
|
|
1716
1716
|
let Se = Zt(be, R.offsetTree, P) + k;
|
|
1717
1717
|
N === "end" ? (Se += I + ct(R.sizeTree, be)[1] - O + _, be === re && (Se += T)) : N === "center" ? Se += (I + ct(R.sizeTree, be)[1] - O + _) / 2 : Se -= S, V && (Se += V);
|
|
1718
1718
|
const Ce = (xe) => {
|
|
1719
|
-
w(), xe ? (M("retrying to scroll to", { location: C }, Ye.DEBUG), pe(
|
|
1719
|
+
w(), xe ? (M("retrying to scroll to", { location: C }, Ye.DEBUG), pe(f, C)) : (pe(v, !0), M("list did not change, scroll successful", {}, Ye.DEBUG));
|
|
1720
1720
|
};
|
|
1721
1721
|
if (w(), A === "smooth") {
|
|
1722
1722
|
let xe = !1;
|
|
1723
|
-
|
|
1723
|
+
h = Ie(t, (Fe) => {
|
|
1724
1724
|
xe = xe || Fe;
|
|
1725
1725
|
}), c = at(d, () => {
|
|
1726
1726
|
Ce(xe);
|
|
1727
1727
|
});
|
|
1728
1728
|
} else
|
|
1729
1729
|
c = at(H(t, Ls(150)), Ce);
|
|
1730
|
-
return
|
|
1730
|
+
return g = setTimeout(() => {
|
|
1731
1731
|
w();
|
|
1732
1732
|
}, 1200), pe(a, !0), M("scrolling from index to", { behavior: A, index: be, top: Se }, Ye.DEBUG), { behavior: A, top: Se };
|
|
1733
1733
|
}
|
|
@@ -1736,7 +1736,7 @@ const on = ye(
|
|
|
1736
1736
|
l
|
|
1737
1737
|
), {
|
|
1738
1738
|
scrollTargetReached: v,
|
|
1739
|
-
scrollToIndex:
|
|
1739
|
+
scrollToIndex: f,
|
|
1740
1740
|
topListHeight: y
|
|
1741
1741
|
};
|
|
1742
1742
|
},
|
|
@@ -1769,7 +1769,7 @@ const sn = ye(
|
|
|
1769
1769
|
H(
|
|
1770
1770
|
s,
|
|
1771
1771
|
he(a),
|
|
1772
|
-
ae(([d,
|
|
1772
|
+
ae(([d, m]) => !!m),
|
|
1773
1773
|
ft(!1)
|
|
1774
1774
|
),
|
|
1775
1775
|
u
|
|
@@ -1777,7 +1777,7 @@ const sn = ye(
|
|
|
1777
1777
|
H(
|
|
1778
1778
|
s,
|
|
1779
1779
|
he(a),
|
|
1780
|
-
ae(([d,
|
|
1780
|
+
ae(([d, m]) => !!m),
|
|
1781
1781
|
ft(!1)
|
|
1782
1782
|
),
|
|
1783
1783
|
l
|
|
@@ -1785,7 +1785,7 @@ const sn = ye(
|
|
|
1785
1785
|
H(
|
|
1786
1786
|
Ne(t, s),
|
|
1787
1787
|
he(u, n, e, l),
|
|
1788
|
-
ae(([[, d],
|
|
1788
|
+
ae(([[, d], m, { sizeTree: p }, f, v]) => d && (!Te(p) || wr(f)) && !m && !v),
|
|
1789
1789
|
he(a)
|
|
1790
1790
|
),
|
|
1791
1791
|
([, d]) => {
|
|
@@ -1819,20 +1819,20 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1819
1819
|
viewportHeight: 0
|
|
1820
1820
|
}
|
|
1821
1821
|
}, Fs = 0, ln = ye(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: i }]) => {
|
|
1822
|
-
const s = W(!1), u = W(!0), a = ve(), l = ve(), d = W(4),
|
|
1822
|
+
const s = W(!1), u = W(!0), a = ve(), l = ve(), d = W(4), m = W(Fs), p = je(
|
|
1823
1823
|
H(
|
|
1824
1824
|
fr(H(le(o), Et(1), ft(!0)), H(le(o), Et(1), ft(!1), Kr(100))),
|
|
1825
1825
|
Me()
|
|
1826
1826
|
),
|
|
1827
1827
|
!1
|
|
1828
|
-
),
|
|
1828
|
+
), f = je(
|
|
1829
1829
|
H(fr(H(n, ft(!0)), H(n, ft(!1), Kr(200))), Me()),
|
|
1830
1830
|
!1
|
|
1831
1831
|
);
|
|
1832
1832
|
oe(
|
|
1833
1833
|
H(
|
|
1834
|
-
Ne(le(o), le(
|
|
1835
|
-
Y(([
|
|
1834
|
+
Ne(le(o), le(m)),
|
|
1835
|
+
Y(([h, w]) => h <= w),
|
|
1836
1836
|
Me()
|
|
1837
1837
|
),
|
|
1838
1838
|
u
|
|
@@ -1840,7 +1840,7 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1840
1840
|
const v = tt(
|
|
1841
1841
|
H(
|
|
1842
1842
|
Ne(r, le(i), le(t), le(e), le(d)),
|
|
1843
|
-
gt((
|
|
1843
|
+
gt((h, [{ scrollHeight: w, scrollTop: C }, R, O, b, S]) => {
|
|
1844
1844
|
const k = C + R - w > -S, T = {
|
|
1845
1845
|
scrollHeight: w,
|
|
1846
1846
|
scrollTop: C,
|
|
@@ -1848,7 +1848,7 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1848
1848
|
};
|
|
1849
1849
|
if (k) {
|
|
1850
1850
|
let P, I;
|
|
1851
|
-
return C >
|
|
1851
|
+
return C > h.state.scrollTop ? (P = "SCROLLED_DOWN", I = h.state.scrollTop - C) : (P = "SIZE_DECREASED", I = h.state.scrollTop - C || h.scrollTopDelta), {
|
|
1852
1852
|
atBottom: !0,
|
|
1853
1853
|
atBottomBecause: P,
|
|
1854
1854
|
scrollTopDelta: I,
|
|
@@ -1856,20 +1856,20 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1856
1856
|
};
|
|
1857
1857
|
}
|
|
1858
1858
|
let M;
|
|
1859
|
-
return T.scrollHeight >
|
|
1859
|
+
return T.scrollHeight > h.state.scrollHeight ? M = "SIZE_INCREASED" : R < h.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" : C < h.state.scrollTop ? M = "SCROLLING_UPWARDS" : M = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1860
1860
|
atBottom: !1,
|
|
1861
1861
|
notAtBottomBecause: M,
|
|
1862
1862
|
state: T
|
|
1863
1863
|
};
|
|
1864
1864
|
}, Ns),
|
|
1865
|
-
Me((
|
|
1865
|
+
Me((h, w) => h && h.atBottom === w.atBottom)
|
|
1866
1866
|
)
|
|
1867
1867
|
), y = je(
|
|
1868
1868
|
H(
|
|
1869
1869
|
r,
|
|
1870
1870
|
gt(
|
|
1871
|
-
(
|
|
1872
|
-
if (fi(
|
|
1871
|
+
(h, { scrollHeight: w, scrollTop: C, viewportHeight: R }) => {
|
|
1872
|
+
if (fi(h.scrollHeight, w))
|
|
1873
1873
|
return {
|
|
1874
1874
|
changed: !1,
|
|
1875
1875
|
jump: 0,
|
|
@@ -1878,9 +1878,9 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1878
1878
|
};
|
|
1879
1879
|
{
|
|
1880
1880
|
const O = w - (C + R) < 1;
|
|
1881
|
-
return
|
|
1881
|
+
return h.scrollTop !== C && O ? {
|
|
1882
1882
|
changed: !0,
|
|
1883
|
-
jump:
|
|
1883
|
+
jump: h.scrollTop - C,
|
|
1884
1884
|
scrollHeight: w,
|
|
1885
1885
|
scrollTop: C
|
|
1886
1886
|
} : {
|
|
@@ -1893,15 +1893,15 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1893
1893
|
},
|
|
1894
1894
|
{ changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
|
|
1895
1895
|
),
|
|
1896
|
-
ae((
|
|
1897
|
-
Y((
|
|
1896
|
+
ae((h) => h.changed),
|
|
1897
|
+
Y((h) => h.jump)
|
|
1898
1898
|
),
|
|
1899
1899
|
0
|
|
1900
1900
|
);
|
|
1901
1901
|
oe(
|
|
1902
1902
|
H(
|
|
1903
1903
|
v,
|
|
1904
|
-
Y((
|
|
1904
|
+
Y((h) => h.atBottom)
|
|
1905
1905
|
),
|
|
1906
1906
|
s
|
|
1907
1907
|
), oe(H(s, mt(50)), a);
|
|
@@ -1909,46 +1909,46 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1909
1909
|
oe(
|
|
1910
1910
|
H(
|
|
1911
1911
|
r,
|
|
1912
|
-
Y(({ scrollTop:
|
|
1912
|
+
Y(({ scrollTop: h }) => h),
|
|
1913
1913
|
Me(),
|
|
1914
1914
|
gt(
|
|
1915
|
-
(
|
|
1915
|
+
(h, w) => Pe(f) ? { direction: h.direction, prevScrollTop: w } : { direction: w < h.prevScrollTop ? Jt : Ut, prevScrollTop: w },
|
|
1916
1916
|
{ direction: Ut, prevScrollTop: 0 }
|
|
1917
1917
|
),
|
|
1918
|
-
Y((
|
|
1918
|
+
Y((h) => h.direction)
|
|
1919
1919
|
),
|
|
1920
1920
|
c
|
|
1921
1921
|
), oe(H(r, mt(50), ft(Hs)), c);
|
|
1922
|
-
const
|
|
1922
|
+
const g = W(0);
|
|
1923
1923
|
return oe(
|
|
1924
1924
|
H(
|
|
1925
|
-
|
|
1926
|
-
ae((
|
|
1925
|
+
p,
|
|
1926
|
+
ae((h) => !h),
|
|
1927
1927
|
ft(0)
|
|
1928
1928
|
),
|
|
1929
|
-
|
|
1929
|
+
g
|
|
1930
1930
|
), oe(
|
|
1931
1931
|
H(
|
|
1932
1932
|
o,
|
|
1933
1933
|
mt(100),
|
|
1934
|
-
he(
|
|
1935
|
-
ae(([
|
|
1936
|
-
gt(([
|
|
1937
|
-
Y(([
|
|
1934
|
+
he(p),
|
|
1935
|
+
ae(([h, w]) => w),
|
|
1936
|
+
gt(([h, w], [C]) => [w, C], [0, 0]),
|
|
1937
|
+
Y(([h, w]) => w - h)
|
|
1938
1938
|
),
|
|
1939
|
-
|
|
1939
|
+
g
|
|
1940
1940
|
), {
|
|
1941
1941
|
atBottomState: v,
|
|
1942
1942
|
atBottomStateChange: a,
|
|
1943
1943
|
atBottomThreshold: d,
|
|
1944
1944
|
atTopStateChange: l,
|
|
1945
|
-
atTopThreshold:
|
|
1945
|
+
atTopThreshold: m,
|
|
1946
1946
|
isAtBottom: s,
|
|
1947
1947
|
isAtTop: u,
|
|
1948
|
-
isScrolling:
|
|
1948
|
+
isScrolling: p,
|
|
1949
1949
|
lastJumpDueToItemResize: y,
|
|
1950
1950
|
scrollDirection: c,
|
|
1951
|
-
scrollVelocity:
|
|
1951
|
+
scrollVelocity: g
|
|
1952
1952
|
};
|
|
1953
1953
|
}, Ee(Ke)), en = "top", tn = "bottom", Zr = "none";
|
|
1954
1954
|
function Jr(e, t, n) {
|
|
@@ -1976,21 +1976,21 @@ const Mr = ye(
|
|
|
1976
1976
|
Y(
|
|
1977
1977
|
([
|
|
1978
1978
|
d,
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
[
|
|
1979
|
+
m,
|
|
1980
|
+
p,
|
|
1981
|
+
[f, v],
|
|
1982
1982
|
y,
|
|
1983
1983
|
c,
|
|
1984
|
-
p,
|
|
1985
1984
|
g,
|
|
1985
|
+
h,
|
|
1986
1986
|
w
|
|
1987
1987
|
]) => {
|
|
1988
|
-
const C = d -
|
|
1988
|
+
const C = d - h, R = c + g, O = Math.max(p - C, 0);
|
|
1989
1989
|
let b = Zr;
|
|
1990
1990
|
const S = eo(w, en), k = eo(w, tn);
|
|
1991
|
-
return
|
|
1992
|
-
Math.max(C -
|
|
1993
|
-
C - O -
|
|
1991
|
+
return f -= h, f += p + g, v += p + g, v -= h, f > d + R - S && (b = Jt), v < d - O + m + k && (b = Ut), b !== Zr ? [
|
|
1992
|
+
Math.max(C - p - Jr(y, en, b) - S, 0),
|
|
1993
|
+
C - O - g + m + Jr(y, tn, b) + k
|
|
1994
1994
|
] : null;
|
|
1995
1995
|
}
|
|
1996
1996
|
),
|
|
@@ -2041,14 +2041,14 @@ function bn(e, t, n, r, o, i) {
|
|
|
2041
2041
|
const y = e[e.length - 1];
|
|
2042
2042
|
d = y.offset + y.size;
|
|
2043
2043
|
}
|
|
2044
|
-
const
|
|
2044
|
+
const m = n - s, p = u + m * a + (m - 1) * r, f = l, v = p - d;
|
|
2045
2045
|
return {
|
|
2046
2046
|
bottom: d,
|
|
2047
2047
|
firstItemIndex: i,
|
|
2048
2048
|
items: to(e, o, i),
|
|
2049
2049
|
offsetBottom: v,
|
|
2050
2050
|
offsetTop: l,
|
|
2051
|
-
top:
|
|
2051
|
+
top: f,
|
|
2052
2052
|
topItems: to(t, o, i),
|
|
2053
2053
|
topListHeight: t.reduce((y, c) => c.size + y, 0),
|
|
2054
2054
|
totalCount: n
|
|
@@ -2062,9 +2062,9 @@ function pi(e, t, n, r, o, i) {
|
|
|
2062
2062
|
break;
|
|
2063
2063
|
s++;
|
|
2064
2064
|
}
|
|
2065
|
-
const u = e + s, a = _r(t, u), l = Array.from({ length: u }).map((d,
|
|
2066
|
-
data: i[
|
|
2067
|
-
index:
|
|
2065
|
+
const u = e + s, a = _r(t, u), l = Array.from({ length: u }).map((d, m) => ({
|
|
2066
|
+
data: i[m + a],
|
|
2067
|
+
index: m + a,
|
|
2068
2068
|
offset: 0,
|
|
2069
2069
|
size: 0
|
|
2070
2070
|
}));
|
|
@@ -2106,17 +2106,17 @@ const Pt = ye(
|
|
|
2106
2106
|
i,
|
|
2107
2107
|
{ listBoundary: s, topListHeight: u, visibleRange: a },
|
|
2108
2108
|
{ initialTopMostItemIndex: l, scrolledToInitialItem: d },
|
|
2109
|
-
{ topListHeight:
|
|
2110
|
-
|
|
2111
|
-
{ didMount:
|
|
2109
|
+
{ topListHeight: m },
|
|
2110
|
+
p,
|
|
2111
|
+
{ didMount: f },
|
|
2112
2112
|
{ recalcInProgress: v }
|
|
2113
2113
|
]) => {
|
|
2114
|
-
const y = W([]), c = W(0),
|
|
2114
|
+
const y = W([]), c = W(0), g = ve(), h = W(0);
|
|
2115
2115
|
oe(i.topItemsIndexes, y);
|
|
2116
2116
|
const w = je(
|
|
2117
2117
|
H(
|
|
2118
2118
|
Ne(
|
|
2119
|
-
|
|
2119
|
+
f,
|
|
2120
2120
|
v,
|
|
2121
2121
|
le(a, Yt),
|
|
2122
2122
|
le(o),
|
|
@@ -2126,7 +2126,7 @@ const Pt = ye(
|
|
|
2126
2126
|
le(y),
|
|
2127
2127
|
le(t),
|
|
2128
2128
|
le(n),
|
|
2129
|
-
le(
|
|
2129
|
+
le(h),
|
|
2130
2130
|
e
|
|
2131
2131
|
),
|
|
2132
2132
|
ae(([b, S, , k, , , , , , , , T]) => {
|
|
@@ -2235,8 +2235,8 @@ const Pt = ye(
|
|
|
2235
2235
|
w,
|
|
2236
2236
|
Y((b) => b.topListHeight)
|
|
2237
2237
|
),
|
|
2238
|
-
|
|
2239
|
-
), oe(
|
|
2238
|
+
m
|
|
2239
|
+
), oe(m, u), oe(
|
|
2240
2240
|
H(
|
|
2241
2241
|
w,
|
|
2242
2242
|
Y((b) => [b.top, b.bottom])
|
|
@@ -2247,7 +2247,7 @@ const Pt = ye(
|
|
|
2247
2247
|
w,
|
|
2248
2248
|
Y((b) => b.items)
|
|
2249
2249
|
),
|
|
2250
|
-
|
|
2250
|
+
g
|
|
2251
2251
|
);
|
|
2252
2252
|
const C = tt(
|
|
2253
2253
|
H(
|
|
@@ -2288,13 +2288,13 @@ const Pt = ye(
|
|
|
2288
2288
|
return {
|
|
2289
2289
|
endReached: C,
|
|
2290
2290
|
initialItemCount: c,
|
|
2291
|
-
itemsRendered:
|
|
2291
|
+
itemsRendered: g,
|
|
2292
2292
|
listState: w,
|
|
2293
|
-
minOverscanItemCount:
|
|
2293
|
+
minOverscanItemCount: h,
|
|
2294
2294
|
rangeChanged: O,
|
|
2295
2295
|
startReached: R,
|
|
2296
2296
|
topItemsIndexes: y,
|
|
2297
|
-
...
|
|
2297
|
+
...p
|
|
2298
2298
|
};
|
|
2299
2299
|
},
|
|
2300
2300
|
Ee(
|
|
@@ -2313,7 +2313,7 @@ const Pt = ye(
|
|
|
2313
2313
|
const i = ve(), s = je(
|
|
2314
2314
|
H(
|
|
2315
2315
|
Ne(n, e, r, t, o),
|
|
2316
|
-
Y(([u, a, l, d,
|
|
2316
|
+
Y(([u, a, l, d, m]) => u + a + l + d + m.offsetBottom + m.bottom)
|
|
2317
2317
|
),
|
|
2318
2318
|
0
|
|
2319
2319
|
);
|
|
@@ -2357,8 +2357,8 @@ const Pt = ye(
|
|
|
2357
2357
|
d,
|
|
2358
2358
|
he(t, a, n, i, o, r, u),
|
|
2359
2359
|
he(e),
|
|
2360
|
-
Y(([[
|
|
2361
|
-
const { align: C, behavior: R, calculateViewLocation: O = $s, done: b, ...S } =
|
|
2360
|
+
Y(([[m, p, f, v, y, c, g, h], w]) => {
|
|
2361
|
+
const { align: C, behavior: R, calculateViewLocation: O = $s, done: b, ...S } = m, k = ci(m, p, v - 1), T = Zt(k, p.offsetTree, w) + y + c, M = T + ct(p.sizeTree, k)[1], P = h + c, I = h + f - g, _ = O({
|
|
2362
2362
|
itemBottom: M,
|
|
2363
2363
|
itemTop: T,
|
|
2364
2364
|
locationParams: { align: C, behavior: R, ...S },
|
|
@@ -2376,7 +2376,7 @@ const Pt = ye(
|
|
|
2376
2376
|
b
|
|
2377
2377
|
) : b == null || b(), _;
|
|
2378
2378
|
}),
|
|
2379
|
-
ae((
|
|
2379
|
+
ae((m) => m !== null)
|
|
2380
2380
|
),
|
|
2381
2381
|
l
|
|
2382
2382
|
), {
|
|
@@ -2397,13 +2397,13 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2397
2397
|
{ scrolledToInitialItem: u },
|
|
2398
2398
|
{ didMount: a, propsReady: l },
|
|
2399
2399
|
{ log: d },
|
|
2400
|
-
{ scrollingInProgress:
|
|
2401
|
-
{ context:
|
|
2402
|
-
{ scrollIntoView:
|
|
2400
|
+
{ scrollingInProgress: m },
|
|
2401
|
+
{ context: p },
|
|
2402
|
+
{ scrollIntoView: f }
|
|
2403
2403
|
]) => {
|
|
2404
2404
|
const v = W(!1), y = ve();
|
|
2405
2405
|
let c = null;
|
|
2406
|
-
function
|
|
2406
|
+
function g(R) {
|
|
2407
2407
|
pe(s, {
|
|
2408
2408
|
align: "end",
|
|
2409
2409
|
behavior: R,
|
|
@@ -2413,7 +2413,7 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2413
2413
|
Ie(
|
|
2414
2414
|
H(
|
|
2415
2415
|
Ne(H(le(t), Et(1)), a),
|
|
2416
|
-
he(le(v), i, u,
|
|
2416
|
+
he(le(v), i, u, m),
|
|
2417
2417
|
Y(([[R, O], b, S, k, T]) => {
|
|
2418
2418
|
let M = O && k, P = "auto";
|
|
2419
2419
|
return M && (P = Vs(b, S || T), M = M && !!P), { followOutputBehavior: P, shouldFollow: M, totalCount: R };
|
|
@@ -2422,15 +2422,15 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2422
2422
|
),
|
|
2423
2423
|
({ followOutputBehavior: R, totalCount: O }) => {
|
|
2424
2424
|
c && (c(), c = null), Pe(n) ? requestAnimationFrame(() => {
|
|
2425
|
-
Pe(d)("following output to ", { totalCount: O }, Ye.DEBUG),
|
|
2425
|
+
Pe(d)("following output to ", { totalCount: O }, Ye.DEBUG), g(R);
|
|
2426
2426
|
}) : c = at(e, () => {
|
|
2427
|
-
Pe(d)("following output to ", { totalCount: O }, Ye.DEBUG),
|
|
2427
|
+
Pe(d)("following output to ", { totalCount: O }, Ye.DEBUG), g(R), c = null;
|
|
2428
2428
|
});
|
|
2429
2429
|
}
|
|
2430
2430
|
);
|
|
2431
|
-
function
|
|
2431
|
+
function h(R) {
|
|
2432
2432
|
const O = at(o, (b) => {
|
|
2433
|
-
R && !b.atBottom && b.notAtBottomBecause === "SIZE_INCREASED" && !c && (Pe(d)("scrolling to bottom due to increased size", {}, Ye.DEBUG),
|
|
2433
|
+
R && !b.atBottom && b.notAtBottomBecause === "SIZE_INCREASED" && !c && (Pe(d)("scrolling to bottom due to increased size", {}, Ye.DEBUG), g("auto"));
|
|
2434
2434
|
});
|
|
2435
2435
|
setTimeout(O, 100);
|
|
2436
2436
|
}
|
|
@@ -2446,12 +2446,12 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2446
2446
|
he(v, t)
|
|
2447
2447
|
),
|
|
2448
2448
|
([, R]) => {
|
|
2449
|
-
Pe(u) &&
|
|
2449
|
+
Pe(u) && h(R !== !1);
|
|
2450
2450
|
}
|
|
2451
2451
|
), Ie(y, () => {
|
|
2452
|
-
|
|
2452
|
+
h(Pe(v) !== !1);
|
|
2453
2453
|
}), Ie(Ne(le(v), o), ([R, O]) => {
|
|
2454
|
-
R && !O.atBottom && O.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" &&
|
|
2454
|
+
R && !O.atBottom && O.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && g("auto");
|
|
2455
2455
|
});
|
|
2456
2456
|
const w = W(null), C = ve();
|
|
2457
2457
|
return oe(
|
|
@@ -2469,16 +2469,16 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2469
2469
|
), Ie(
|
|
2470
2470
|
H(
|
|
2471
2471
|
Ne(H(C, Et(1)), a),
|
|
2472
|
-
he(le(w), u,
|
|
2472
|
+
he(le(w), u, m, p),
|
|
2473
2473
|
Y(([[R, O], b, S, k, T]) => O && S && (b == null ? void 0 : b({ context: T, totalCount: R, scrollingInProgress: k }))),
|
|
2474
2474
|
ae((R) => !!R),
|
|
2475
2475
|
mt(0)
|
|
2476
2476
|
),
|
|
2477
2477
|
(R) => {
|
|
2478
2478
|
c && (c(), c = null), Pe(n) ? requestAnimationFrame(() => {
|
|
2479
|
-
Pe(d)("scrolling into view", {}), pe(
|
|
2479
|
+
Pe(d)("scrolling into view", {}), pe(f, R);
|
|
2480
2480
|
}) : c = at(e, () => {
|
|
2481
|
-
Pe(d)("scrolling into view", {}), pe(
|
|
2481
|
+
Pe(d)("scrolling into view", {}), pe(f, R), c = null;
|
|
2482
2482
|
});
|
|
2483
2483
|
}
|
|
2484
2484
|
), { autoscrollToBottom: y, followOutput: v, scrollIntoViewOnChange: w };
|
|
@@ -2501,7 +2501,7 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2501
2501
|
he(i),
|
|
2502
2502
|
ae(([, a]) => a !== 0),
|
|
2503
2503
|
he(o, r, t, n, e),
|
|
2504
|
-
Y(([[, a], l, d,
|
|
2504
|
+
Y(([[, a], l, d, m, p, f = []]) => pi(a, l, d, m, p, f))
|
|
2505
2505
|
),
|
|
2506
2506
|
s
|
|
2507
2507
|
), {}),
|
|
@@ -2606,23 +2606,23 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2606
2606
|
{ didMount: i },
|
|
2607
2607
|
{ useWindowScroll: s, windowScrollContainerState: u, windowViewportRect: a }
|
|
2608
2608
|
]) => {
|
|
2609
|
-
const l = ve(), d = W(void 0),
|
|
2610
|
-
return oe(u,
|
|
2609
|
+
const l = ve(), d = W(void 0), m = W(null), p = W(null);
|
|
2610
|
+
return oe(u, m), oe(a, p), Ie(
|
|
2611
2611
|
H(
|
|
2612
2612
|
l,
|
|
2613
|
-
he(t, r, s,
|
|
2613
|
+
he(t, r, s, m, p, n)
|
|
2614
2614
|
),
|
|
2615
|
-
([
|
|
2615
|
+
([f, v, y, c, g, h, w]) => {
|
|
2616
2616
|
const C = Os(v.sizeTree);
|
|
2617
|
-
c &&
|
|
2617
|
+
c && g !== null && h !== null && (y = g.scrollTop - h.offsetTop), y -= w, f({ ranges: C, scrollTop: y });
|
|
2618
2618
|
}
|
|
2619
2619
|
), oe(H(d, ae(wr), Y(Xs)), o), oe(
|
|
2620
2620
|
H(
|
|
2621
2621
|
i,
|
|
2622
2622
|
he(d),
|
|
2623
|
-
ae(([,
|
|
2623
|
+
ae(([, f]) => f !== void 0),
|
|
2624
2624
|
Me(),
|
|
2625
|
-
Y(([,
|
|
2625
|
+
Y(([, f]) => f.ranges)
|
|
2626
2626
|
),
|
|
2627
2627
|
e
|
|
2628
2628
|
), {
|
|
@@ -2655,8 +2655,8 @@ const Ys = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2655
2655
|
{ deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
|
|
2656
2656
|
{ isAtBottom: o, isScrolling: i, lastJumpDueToItemResize: s, scrollDirection: u },
|
|
2657
2657
|
{ listState: a },
|
|
2658
|
-
{ beforeUnshiftWith: l, gap: d, shiftWithOffset:
|
|
2659
|
-
{ log:
|
|
2658
|
+
{ beforeUnshiftWith: l, gap: d, shiftWithOffset: m, sizes: p },
|
|
2659
|
+
{ log: f },
|
|
2660
2660
|
{ recalcInProgress: v }
|
|
2661
2661
|
]) => {
|
|
2662
2662
|
const y = tt(
|
|
@@ -2664,64 +2664,64 @@ const Ys = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2664
2664
|
a,
|
|
2665
2665
|
he(s),
|
|
2666
2666
|
gt(
|
|
2667
|
-
([,
|
|
2667
|
+
([, g, h, w], [{ bottom: C, items: R, offsetBottom: O, totalCount: b }, S]) => {
|
|
2668
2668
|
const k = C + O;
|
|
2669
2669
|
let T = 0;
|
|
2670
|
-
return
|
|
2670
|
+
return h === b && g.length > 0 && R.length > 0 && (R[0].originalIndex === 0 && g[0].originalIndex === 0 || (T = k - w, T !== 0 && (T += S))), [T, R, b, k];
|
|
2671
2671
|
},
|
|
2672
2672
|
[0, [], 0, 0]
|
|
2673
2673
|
),
|
|
2674
|
-
ae(([
|
|
2675
|
-
he(r, u, n, o,
|
|
2676
|
-
ae(([,
|
|
2677
|
-
Y(([[
|
|
2674
|
+
ae(([g]) => g !== 0),
|
|
2675
|
+
he(r, u, n, o, f, v),
|
|
2676
|
+
ae(([, g, h, w, , , C]) => !C && !w && g !== 0 && h === Jt),
|
|
2677
|
+
Y(([[g], , , , , h]) => (h("Upward scrolling compensation", { amount: g }, Ye.DEBUG), g))
|
|
2678
2678
|
)
|
|
2679
2679
|
);
|
|
2680
|
-
function c(
|
|
2681
|
-
|
|
2680
|
+
function c(g) {
|
|
2681
|
+
g > 0 ? (pe(t, { behavior: "auto", top: -g }), pe(e, 0)) : (pe(e, 0), pe(t, { behavior: "auto", top: -g }));
|
|
2682
2682
|
}
|
|
2683
|
-
return Ie(H(y, he(e, i)), ([
|
|
2684
|
-
w && Ys() ? pe(e,
|
|
2683
|
+
return Ie(H(y, he(e, i)), ([g, h, w]) => {
|
|
2684
|
+
w && Ys() ? pe(e, h - g) : c(-g);
|
|
2685
2685
|
}), Ie(
|
|
2686
2686
|
H(
|
|
2687
2687
|
Ne(je(i, !1), e, v),
|
|
2688
|
-
ae(([
|
|
2689
|
-
Y(([
|
|
2688
|
+
ae(([g, h, w]) => !g && !w && h !== 0),
|
|
2689
|
+
Y(([g, h]) => h),
|
|
2690
2690
|
mt(1)
|
|
2691
2691
|
),
|
|
2692
2692
|
c
|
|
2693
2693
|
), oe(
|
|
2694
2694
|
H(
|
|
2695
|
-
|
|
2696
|
-
Y((
|
|
2695
|
+
m,
|
|
2696
|
+
Y((g) => ({ top: -g }))
|
|
2697
2697
|
),
|
|
2698
2698
|
t
|
|
2699
2699
|
), Ie(
|
|
2700
2700
|
H(
|
|
2701
2701
|
l,
|
|
2702
|
-
he(
|
|
2703
|
-
Y(([
|
|
2702
|
+
he(p, d),
|
|
2703
|
+
Y(([g, { groupIndices: h, lastSize: w, sizeTree: C }, R]) => {
|
|
2704
2704
|
function O(b) {
|
|
2705
2705
|
return b * (w + R);
|
|
2706
2706
|
}
|
|
2707
|
-
if (
|
|
2708
|
-
return O(
|
|
2707
|
+
if (h.length === 0)
|
|
2708
|
+
return O(g);
|
|
2709
2709
|
{
|
|
2710
2710
|
let b = 0;
|
|
2711
2711
|
const S = Qt(C, 0);
|
|
2712
2712
|
let k = 0, T = 0;
|
|
2713
|
-
for (; k <
|
|
2713
|
+
for (; k < g; ) {
|
|
2714
2714
|
k++, b += S;
|
|
2715
|
-
let M =
|
|
2716
|
-
k + M >
|
|
2715
|
+
let M = h.length === T + 1 ? 1 / 0 : h[T + 1] - h[T] - 1;
|
|
2716
|
+
k + M > g && (b -= S, M = g - k + 1), k += M, b += O(M), T++;
|
|
2717
2717
|
}
|
|
2718
2718
|
return b;
|
|
2719
2719
|
}
|
|
2720
2720
|
})
|
|
2721
2721
|
),
|
|
2722
|
-
(
|
|
2723
|
-
pe(e,
|
|
2724
|
-
pe(t, { top:
|
|
2722
|
+
(g) => {
|
|
2723
|
+
pe(e, g), requestAnimationFrame(() => {
|
|
2724
|
+
pe(t, { top: g }), requestAnimationFrame(() => {
|
|
2725
2725
|
pe(e, 0), pe(v, !1);
|
|
2726
2726
|
});
|
|
2727
2727
|
});
|
|
@@ -2782,13 +2782,13 @@ const Ys = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2782
2782
|
itemSize: a,
|
|
2783
2783
|
sizeRanges: l,
|
|
2784
2784
|
sizes: d,
|
|
2785
|
-
statefulTotalCount:
|
|
2786
|
-
totalCount:
|
|
2787
|
-
trackItemSizes:
|
|
2785
|
+
statefulTotalCount: m,
|
|
2786
|
+
totalCount: p,
|
|
2787
|
+
trackItemSizes: f
|
|
2788
2788
|
},
|
|
2789
2789
|
{ initialItemFinalLocationReached: v, initialTopMostItemIndex: y, scrolledToInitialItem: c },
|
|
2790
|
-
p,
|
|
2791
2790
|
g,
|
|
2791
|
+
h,
|
|
2792
2792
|
w,
|
|
2793
2793
|
C,
|
|
2794
2794
|
{ scrollToIndex: R },
|
|
@@ -2803,7 +2803,7 @@ const Ys = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2803
2803
|
k.windowViewportRect,
|
|
2804
2804
|
Y((z) => z.visibleHeight)
|
|
2805
2805
|
),
|
|
2806
|
-
|
|
2806
|
+
g.viewportHeight
|
|
2807
2807
|
), {
|
|
2808
2808
|
data: e,
|
|
2809
2809
|
defaultItemHeight: t,
|
|
@@ -2820,7 +2820,7 @@ const Ys = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2820
2820
|
topItemCount: b,
|
|
2821
2821
|
topItemsIndexes: P,
|
|
2822
2822
|
// input
|
|
2823
|
-
totalCount:
|
|
2823
|
+
totalCount: p,
|
|
2824
2824
|
...w,
|
|
2825
2825
|
groupIndices: s,
|
|
2826
2826
|
itemSize: a,
|
|
@@ -2828,16 +2828,16 @@ const Ys = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2828
2828
|
minOverscanItemCount: M,
|
|
2829
2829
|
scrollToIndex: R,
|
|
2830
2830
|
// output
|
|
2831
|
-
statefulTotalCount:
|
|
2832
|
-
trackItemSizes:
|
|
2831
|
+
statefulTotalCount: m,
|
|
2832
|
+
trackItemSizes: f,
|
|
2833
2833
|
// exported from stateFlagsSystem
|
|
2834
2834
|
rangeChanged: I,
|
|
2835
2835
|
..._,
|
|
2836
2836
|
// the bag of IO from featureGroup1System
|
|
2837
2837
|
...k,
|
|
2838
|
-
...
|
|
2838
|
+
...g,
|
|
2839
2839
|
sizes: d,
|
|
2840
|
-
...
|
|
2840
|
+
...h
|
|
2841
2841
|
};
|
|
2842
2842
|
},
|
|
2843
2843
|
Ee(
|
|
@@ -2867,30 +2867,30 @@ function el(e, t) {
|
|
|
2867
2867
|
const dn = typeof document < "u" ? D.useLayoutEffect : D.useEffect;
|
|
2868
2868
|
function yi(e, t, n) {
|
|
2869
2869
|
const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), i = Object.keys(t.methods || {}), s = Object.keys(t.events || {}), u = D.createContext({});
|
|
2870
|
-
function a(c,
|
|
2870
|
+
function a(c, g) {
|
|
2871
2871
|
c.propsReady && pe(c.propsReady, !1);
|
|
2872
|
-
for (const
|
|
2873
|
-
const w = c[t.required[
|
|
2874
|
-
pe(w,
|
|
2872
|
+
for (const h of r) {
|
|
2873
|
+
const w = c[t.required[h]];
|
|
2874
|
+
pe(w, g[h]);
|
|
2875
2875
|
}
|
|
2876
|
-
for (const
|
|
2877
|
-
if (
|
|
2878
|
-
const w = c[t.optional[
|
|
2879
|
-
pe(w,
|
|
2876
|
+
for (const h of o)
|
|
2877
|
+
if (h in g) {
|
|
2878
|
+
const w = c[t.optional[h]];
|
|
2879
|
+
pe(w, g[h]);
|
|
2880
2880
|
}
|
|
2881
2881
|
c.propsReady && pe(c.propsReady, !0);
|
|
2882
2882
|
}
|
|
2883
2883
|
function l(c) {
|
|
2884
|
-
return i.reduce((
|
|
2885
|
-
const C = c[t.methods[
|
|
2884
|
+
return i.reduce((g, h) => (g[h] = (w) => {
|
|
2885
|
+
const C = c[t.methods[h]];
|
|
2886
2886
|
pe(C, w);
|
|
2887
|
-
},
|
|
2887
|
+
}, g), {});
|
|
2888
2888
|
}
|
|
2889
2889
|
function d(c) {
|
|
2890
|
-
return s.reduce((
|
|
2890
|
+
return s.reduce((g, h) => (g[h] = ms(c[t.events[h]]), g), {});
|
|
2891
2891
|
}
|
|
2892
|
-
const
|
|
2893
|
-
const { children:
|
|
2892
|
+
const m = D.forwardRef((c, g) => {
|
|
2893
|
+
const { children: h, ...w } = c, [C] = D.useState(() => Mn(vs(e), (b) => {
|
|
2894
2894
|
a(b, w);
|
|
2895
2895
|
})), [R] = D.useState(Ur(d, C));
|
|
2896
2896
|
dn(() => {
|
|
@@ -2901,44 +2901,44 @@ function yi(e, t, n) {
|
|
|
2901
2901
|
};
|
|
2902
2902
|
}, [w, R, C]), dn(() => {
|
|
2903
2903
|
a(C, w);
|
|
2904
|
-
}), D.useImperativeHandle(
|
|
2904
|
+
}), D.useImperativeHandle(g, jr(l(C)));
|
|
2905
2905
|
const O = n;
|
|
2906
|
-
return /* @__PURE__ */ x(u.Provider, { value: C, children: n ? /* @__PURE__ */ x(O, { ...el([...r, ...o, ...s], w), children:
|
|
2907
|
-
}),
|
|
2908
|
-
const
|
|
2906
|
+
return /* @__PURE__ */ x(u.Provider, { value: C, children: n ? /* @__PURE__ */ x(O, { ...el([...r, ...o, ...s], w), children: h }) : h });
|
|
2907
|
+
}), p = (c) => {
|
|
2908
|
+
const g = D.useContext(u);
|
|
2909
2909
|
return D.useCallback(
|
|
2910
|
-
(
|
|
2911
|
-
pe(
|
|
2910
|
+
(h) => {
|
|
2911
|
+
pe(g[c], h);
|
|
2912
2912
|
},
|
|
2913
|
-
[
|
|
2913
|
+
[g, c]
|
|
2914
2914
|
);
|
|
2915
|
-
},
|
|
2916
|
-
const
|
|
2917
|
-
(w) => Ie(
|
|
2918
|
-
[
|
|
2915
|
+
}, f = (c) => {
|
|
2916
|
+
const g = D.useContext(u)[c], h = D.useCallback(
|
|
2917
|
+
(w) => Ie(g, w),
|
|
2918
|
+
[g]
|
|
2919
2919
|
);
|
|
2920
2920
|
return D.useSyncExternalStore(
|
|
2921
|
-
|
|
2922
|
-
() => Pe(
|
|
2923
|
-
() => Pe(
|
|
2921
|
+
h,
|
|
2922
|
+
() => Pe(g),
|
|
2923
|
+
() => Pe(g)
|
|
2924
2924
|
);
|
|
2925
2925
|
}, v = (c) => {
|
|
2926
|
-
const
|
|
2926
|
+
const g = D.useContext(u)[c], [h, w] = D.useState(Ur(Pe, g));
|
|
2927
2927
|
return dn(
|
|
2928
|
-
() => Ie(
|
|
2929
|
-
C !==
|
|
2928
|
+
() => Ie(g, (C) => {
|
|
2929
|
+
C !== h && w(jr(C));
|
|
2930
2930
|
}),
|
|
2931
|
-
[
|
|
2932
|
-
),
|
|
2933
|
-
}, y = D.version.startsWith("18") ?
|
|
2931
|
+
[g, h]
|
|
2932
|
+
), h;
|
|
2933
|
+
}, y = D.version.startsWith("18") ? f : v;
|
|
2934
2934
|
return {
|
|
2935
|
-
Component:
|
|
2936
|
-
useEmitter: (c,
|
|
2937
|
-
const
|
|
2938
|
-
dn(() => Ie(
|
|
2935
|
+
Component: m,
|
|
2936
|
+
useEmitter: (c, g) => {
|
|
2937
|
+
const h = D.useContext(u)[c];
|
|
2938
|
+
dn(() => Ie(h, g), [g, h]);
|
|
2939
2939
|
},
|
|
2940
2940
|
useEmitterValue: y,
|
|
2941
|
-
usePublisher:
|
|
2941
|
+
usePublisher: p
|
|
2942
2942
|
};
|
|
2943
2943
|
}
|
|
2944
2944
|
const xi = D.createContext(void 0), wi = D.createContext(void 0), Ii = typeof document < "u" ? D.useLayoutEffect : D.useEffect;
|
|
@@ -2950,54 +2950,54 @@ function tl(e) {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
function Ci(e, t, n, r = $t, o, i) {
|
|
2952
2952
|
const s = D.useRef(null), u = D.useRef(null), a = D.useRef(null), l = D.useCallback(
|
|
2953
|
-
(
|
|
2954
|
-
let
|
|
2955
|
-
const c =
|
|
2953
|
+
(p) => {
|
|
2954
|
+
let f, v, y;
|
|
2955
|
+
const c = p.target;
|
|
2956
2956
|
if (tl(c) || $n(c)) {
|
|
2957
|
-
const
|
|
2958
|
-
y = i ?
|
|
2957
|
+
const h = $n(c) ? c : c.defaultView;
|
|
2958
|
+
y = i ? h.scrollX : h.scrollY, f = i ? h.document.documentElement.scrollWidth : h.document.documentElement.scrollHeight, v = i ? h.innerWidth : h.innerHeight;
|
|
2959
2959
|
} else
|
|
2960
|
-
y = i ? c.scrollLeft : c.scrollTop,
|
|
2961
|
-
const
|
|
2960
|
+
y = i ? c.scrollLeft : c.scrollTop, f = i ? c.scrollWidth : c.scrollHeight, v = i ? c.offsetWidth : c.offsetHeight;
|
|
2961
|
+
const g = () => {
|
|
2962
2962
|
e({
|
|
2963
|
-
scrollHeight:
|
|
2963
|
+
scrollHeight: f,
|
|
2964
2964
|
scrollTop: Math.max(y, 0),
|
|
2965
2965
|
viewportHeight: v
|
|
2966
2966
|
});
|
|
2967
2967
|
};
|
|
2968
|
-
|
|
2968
|
+
p.suppressFlushSync ? g() : Qi.flushSync(g), u.current !== null && (y === u.current || y <= 0 || y === f - v) && (u.current = null, t(!0), a.current && (clearTimeout(a.current), a.current = null));
|
|
2969
2969
|
},
|
|
2970
2970
|
[e, t, i]
|
|
2971
2971
|
);
|
|
2972
2972
|
D.useEffect(() => {
|
|
2973
|
-
const
|
|
2974
|
-
return r(o || s.current), l({ suppressFlushSync: !0, target:
|
|
2975
|
-
r(null),
|
|
2973
|
+
const p = o || s.current;
|
|
2974
|
+
return r(o || s.current), l({ suppressFlushSync: !0, target: p }), p.addEventListener("scroll", l, { passive: !0 }), () => {
|
|
2975
|
+
r(null), p.removeEventListener("scroll", l);
|
|
2976
2976
|
};
|
|
2977
2977
|
}, [s, l, n, r, o]);
|
|
2978
|
-
function d(
|
|
2979
|
-
const
|
|
2980
|
-
if (!
|
|
2978
|
+
function d(p) {
|
|
2979
|
+
const f = s.current;
|
|
2980
|
+
if (!f || (i ? "offsetWidth" in f && f.offsetWidth === 0 : "offsetHeight" in f && f.offsetHeight === 0))
|
|
2981
2981
|
return;
|
|
2982
|
-
const v =
|
|
2983
|
-
let y, c,
|
|
2984
|
-
$n(
|
|
2985
|
-
xt(
|
|
2986
|
-
i ?
|
|
2987
|
-
), y = i ?
|
|
2988
|
-
const
|
|
2989
|
-
if (
|
|
2990
|
-
e({ scrollHeight: c, scrollTop:
|
|
2982
|
+
const v = p.behavior === "smooth";
|
|
2983
|
+
let y, c, g;
|
|
2984
|
+
$n(f) ? (c = Math.max(
|
|
2985
|
+
xt(f.document.documentElement, i ? "width" : "height"),
|
|
2986
|
+
i ? f.document.documentElement.scrollWidth : f.document.documentElement.scrollHeight
|
|
2987
|
+
), y = i ? f.innerWidth : f.innerHeight, g = i ? window.scrollX : window.scrollY) : (c = f[i ? "scrollWidth" : "scrollHeight"], y = xt(f, i ? "width" : "height"), g = f[i ? "scrollLeft" : "scrollTop"]);
|
|
2988
|
+
const h = c - y;
|
|
2989
|
+
if (p.top = Math.ceil(Math.max(Math.min(h, p.top), 0)), fi(y, c) || p.top === g) {
|
|
2990
|
+
e({ scrollHeight: c, scrollTop: g, viewportHeight: y }), v && t(!0);
|
|
2991
2991
|
return;
|
|
2992
2992
|
}
|
|
2993
|
-
v ? (u.current =
|
|
2993
|
+
v ? (u.current = p.top, a.current && clearTimeout(a.current), a.current = setTimeout(() => {
|
|
2994
2994
|
a.current = null, u.current = null, t(!0);
|
|
2995
|
-
}, 1e3)) : u.current = null, i && (
|
|
2995
|
+
}, 1e3)) : u.current = null, i && (p = { behavior: p.behavior, left: p.top }), f.scrollTo(p);
|
|
2996
2996
|
}
|
|
2997
|
-
function
|
|
2998
|
-
i && (
|
|
2997
|
+
function m(p) {
|
|
2998
|
+
i && (p = { behavior: p.behavior, left: p.top }), s.current.scrollBy(p);
|
|
2999
2999
|
}
|
|
3000
|
-
return { scrollByCallback:
|
|
3000
|
+
return { scrollByCallback: m, scrollerRef: s, scrollToCallback: d };
|
|
3001
3001
|
}
|
|
3002
3002
|
const Vn = "-webkit-sticky", oo = "sticky", Or = vi(() => {
|
|
3003
3003
|
if (typeof document > "u")
|
|
@@ -3038,31 +3038,31 @@ const nl = /* @__PURE__ */ ye(() => {
|
|
|
3038
3038
|
([e, t]) => ({ ...e, ...t }),
|
|
3039
3039
|
Ee(Si, nl)
|
|
3040
3040
|
), ol = ({ height: e }) => /* @__PURE__ */ x("div", { style: { height: e } }), il = { overflowAnchor: "none", position: Or(), zIndex: 1 }, Ti = { overflowAnchor: "none" }, sl = { ...Ti, display: "inline-block", height: "100%" }, io = /* @__PURE__ */ D.memo(function({ showTopList: e = !1 }) {
|
|
3041
|
-
const t = ue("listState"), n = ot("sizeRanges"), r = ue("useWindowScroll"), o = ue("customScrollParent"), i = ot("windowScrollContainerState"), s = ot("scrollContainerState"), u = o || r ? i : s, a = ue("itemContent"), l = ue("context"), d = ue("groupContent"),
|
|
3041
|
+
const t = ue("listState"), n = ot("sizeRanges"), r = ue("useWindowScroll"), o = ue("customScrollParent"), i = ot("windowScrollContainerState"), s = ot("scrollContainerState"), u = o || r ? i : s, a = ue("itemContent"), l = ue("context"), d = ue("groupContent"), m = ue("trackItemSizes"), p = ue("itemSize"), f = ue("log"), v = ot("gap"), y = ue("horizontalDirection"), { callbackRef: c } = xs(
|
|
3042
3042
|
n,
|
|
3043
|
-
|
|
3044
|
-
h,
|
|
3045
|
-
e ? $t : u,
|
|
3043
|
+
p,
|
|
3046
3044
|
m,
|
|
3045
|
+
e ? $t : u,
|
|
3046
|
+
f,
|
|
3047
3047
|
v,
|
|
3048
3048
|
o,
|
|
3049
3049
|
y,
|
|
3050
3050
|
ue("skipAnimationFrameInResizeObserver")
|
|
3051
|
-
), [
|
|
3051
|
+
), [g, h] = D.useState(0);
|
|
3052
3052
|
Pr("deviation", (_) => {
|
|
3053
|
-
|
|
3053
|
+
g !== _ && h(_);
|
|
3054
3054
|
});
|
|
3055
3055
|
const w = ue("EmptyPlaceholder"), C = ue("ScrollSeekPlaceholder") || ol, R = ue("ListComponent"), O = ue("ItemComponent"), b = ue("GroupComponent"), S = ue("computeItemKey"), k = ue("isSeeking"), T = ue("groupIndices").length > 0, M = ue("alignToBottom"), P = ue("initialItemFinalLocationReached"), I = e ? {} : {
|
|
3056
3056
|
boxSizing: "border-box",
|
|
3057
3057
|
...y ? {
|
|
3058
3058
|
display: "inline-block",
|
|
3059
3059
|
height: "100%",
|
|
3060
|
-
marginLeft:
|
|
3060
|
+
marginLeft: g !== 0 ? g : M ? "auto" : 0,
|
|
3061
3061
|
paddingLeft: t.offsetTop,
|
|
3062
3062
|
paddingRight: t.offsetBottom,
|
|
3063
3063
|
whiteSpace: "nowrap"
|
|
3064
3064
|
} : {
|
|
3065
|
-
marginTop:
|
|
3065
|
+
marginTop: g !== 0 ? g : M ? "auto" : 0,
|
|
3066
3066
|
paddingBottom: t.offsetBottom,
|
|
3067
3067
|
paddingTop: t.offsetTop
|
|
3068
3068
|
},
|
|
@@ -3171,21 +3171,21 @@ const dl = /* @__PURE__ */ D.memo(function() {
|
|
|
3171
3171
|
});
|
|
3172
3172
|
function ki({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
3173
3173
|
return D.memo(function({ children: r, style: o, context: i, ...s }) {
|
|
3174
|
-
const u = n("scrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("scrollerRef"),
|
|
3174
|
+
const u = n("scrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("scrollerRef"), m = t("horizontalDirection") || !1, { scrollByCallback: p, scrollerRef: f, scrollToCallback: v } = Ci(
|
|
3175
3175
|
u,
|
|
3176
3176
|
l,
|
|
3177
3177
|
a,
|
|
3178
3178
|
d,
|
|
3179
3179
|
void 0,
|
|
3180
|
-
|
|
3180
|
+
m
|
|
3181
3181
|
);
|
|
3182
|
-
return e("scrollTo", v), e("scrollBy",
|
|
3182
|
+
return e("scrollTo", v), e("scrollBy", p), /* @__PURE__ */ x(
|
|
3183
3183
|
a,
|
|
3184
3184
|
{
|
|
3185
3185
|
"data-testid": "virtuoso-scroller",
|
|
3186
3186
|
"data-virtuoso-scroller": !0,
|
|
3187
|
-
ref:
|
|
3188
|
-
style: { ...
|
|
3187
|
+
ref: f,
|
|
3188
|
+
style: { ...m ? al : ll, ...o },
|
|
3189
3189
|
tabIndex: 0,
|
|
3190
3190
|
...s,
|
|
3191
3191
|
...qe(a, i),
|
|
@@ -3196,24 +3196,24 @@ function ki({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
3196
3196
|
}
|
|
3197
3197
|
function Ri({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
3198
3198
|
return D.memo(function({ children: r, style: o, context: i, ...s }) {
|
|
3199
|
-
const u = n("windowScrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("totalListHeight"),
|
|
3199
|
+
const u = n("windowScrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("totalListHeight"), m = t("deviation"), p = t("customScrollParent"), f = D.useRef(null), v = t("scrollerRef"), { scrollByCallback: y, scrollerRef: c, scrollToCallback: g } = Ci(
|
|
3200
3200
|
u,
|
|
3201
3201
|
l,
|
|
3202
3202
|
a,
|
|
3203
3203
|
v,
|
|
3204
|
-
|
|
3204
|
+
p
|
|
3205
3205
|
);
|
|
3206
3206
|
return Ii(() => {
|
|
3207
|
-
var
|
|
3208
|
-
return c.current =
|
|
3207
|
+
var h;
|
|
3208
|
+
return c.current = p || ((h = f.current) == null ? void 0 : h.ownerDocument.defaultView), () => {
|
|
3209
3209
|
c.current = null;
|
|
3210
3210
|
};
|
|
3211
|
-
}, [c,
|
|
3211
|
+
}, [c, p]), e("windowScrollTo", g), e("scrollBy", y), /* @__PURE__ */ x(
|
|
3212
3212
|
a,
|
|
3213
3213
|
{
|
|
3214
|
-
ref:
|
|
3214
|
+
ref: f,
|
|
3215
3215
|
"data-virtuoso-scroller": !0,
|
|
3216
|
-
style: { position: "relative", ...o, ...d !== 0 ? { height: d +
|
|
3216
|
+
style: { position: "relative", ...o, ...d !== 0 ? { height: d + m } : {} },
|
|
3217
3217
|
...s,
|
|
3218
3218
|
...qe(a, i),
|
|
3219
3219
|
children: r
|
|
@@ -3329,7 +3329,7 @@ const pl = ({ children: e }) => {
|
|
|
3329
3329
|
] })), r = W(null), o = W(null), i = W({}), s = W(zr), u = W($t), a = (l, d = null) => je(
|
|
3330
3330
|
H(
|
|
3331
3331
|
i,
|
|
3332
|
-
Y((
|
|
3332
|
+
Y((m) => m[l]),
|
|
3333
3333
|
Me()
|
|
3334
3334
|
),
|
|
3335
3335
|
d
|
|
@@ -3392,11 +3392,11 @@ function Cl(e, t) {
|
|
|
3392
3392
|
const Tl = /* @__PURE__ */ ye(
|
|
3393
3393
|
([
|
|
3394
3394
|
{ increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
|
|
3395
|
-
{ footerHeight: o, headerHeight: i, scrollBy: s, scrollContainerState: u, scrollTo: a, scrollTop: l, smoothScrollTargetReached: d, viewportHeight:
|
|
3395
|
+
{ footerHeight: o, headerHeight: i, scrollBy: s, scrollContainerState: u, scrollTo: a, scrollTop: l, smoothScrollTargetReached: d, viewportHeight: m },
|
|
3396
|
+
p,
|
|
3396
3397
|
f,
|
|
3397
|
-
m,
|
|
3398
3398
|
{ didMount: v, propsReady: y },
|
|
3399
|
-
{ customScrollParent: c, useWindowScroll:
|
|
3399
|
+
{ customScrollParent: c, useWindowScroll: g, windowScrollContainerState: h, windowScrollTo: w, windowViewportRect: C },
|
|
3400
3400
|
R
|
|
3401
3401
|
]) => {
|
|
3402
3402
|
const O = W(0), b = W(0), S = W(so), k = W({ height: 0, width: 0 }), T = W({ height: 0, width: 0 }), M = ve(), P = ve(), I = W(0), _ = W(null), z = W({ column: 0, row: 0 }), N = ve(), A = ve(), V = W(!1), re = W(0), be = W(!0), Se = W(!1), Ce = W(!1);
|
|
@@ -3444,7 +3444,7 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3444
3444
|
k,
|
|
3445
3445
|
Y(({ height: E }) => E)
|
|
3446
3446
|
),
|
|
3447
|
-
|
|
3447
|
+
m
|
|
3448
3448
|
), oe(
|
|
3449
3449
|
H(
|
|
3450
3450
|
Ne(
|
|
@@ -3565,7 +3565,7 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3565
3565
|
mt(0)
|
|
3566
3566
|
)
|
|
3567
3567
|
);
|
|
3568
|
-
oe($,
|
|
3568
|
+
oe($, f.scrollSeekRangeChanged), oe(
|
|
3569
3569
|
H(
|
|
3570
3570
|
M,
|
|
3571
3571
|
he(k, T, O, z),
|
|
@@ -3613,18 +3613,18 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3613
3613
|
scrollTop: l,
|
|
3614
3614
|
smoothScrollTargetReached: d,
|
|
3615
3615
|
totalCount: O,
|
|
3616
|
-
useWindowScroll:
|
|
3616
|
+
useWindowScroll: g,
|
|
3617
3617
|
viewportDimensions: k,
|
|
3618
|
-
windowScrollContainerState:
|
|
3618
|
+
windowScrollContainerState: h,
|
|
3619
3619
|
windowScrollTo: w,
|
|
3620
3620
|
windowViewportRect: C,
|
|
3621
|
-
...
|
|
3621
|
+
...f,
|
|
3622
3622
|
// output
|
|
3623
3623
|
gridState: S,
|
|
3624
3624
|
horizontalDirection: Ce,
|
|
3625
3625
|
initialTopMostItemIndex: re,
|
|
3626
3626
|
totalListHeight: G,
|
|
3627
|
-
...
|
|
3627
|
+
...p,
|
|
3628
3628
|
endReached: Fe,
|
|
3629
3629
|
propsReady: y,
|
|
3630
3630
|
rangeChanged: $,
|
|
@@ -3651,13 +3651,13 @@ function br(e, t, n, r) {
|
|
|
3651
3651
|
return s > 0 ? s + t.row : s;
|
|
3652
3652
|
}
|
|
3653
3653
|
const kl = /* @__PURE__ */ ye(() => {
|
|
3654
|
-
const e = W((
|
|
3654
|
+
const e = W((m) => `Item ${m}`), t = W({}), n = W(null), r = W("virtuoso-grid-item"), o = W("virtuoso-grid-list"), i = W(zr), s = W("div"), u = W($t), a = (m, p = null) => je(
|
|
3655
3655
|
H(
|
|
3656
3656
|
t,
|
|
3657
|
-
Y((
|
|
3657
|
+
Y((f) => f[m]),
|
|
3658
3658
|
Me()
|
|
3659
3659
|
),
|
|
3660
|
-
|
|
3660
|
+
p
|
|
3661
3661
|
), l = W(!1), d = W(!1);
|
|
3662
3662
|
return oe(le(d), l), {
|
|
3663
3663
|
components: t,
|
|
@@ -3681,22 +3681,22 @@ const kl = /* @__PURE__ */ ye(() => {
|
|
|
3681
3681
|
([e, t]) => ({ ...e, ...t }),
|
|
3682
3682
|
Ee(Tl, kl)
|
|
3683
3683
|
), _l = /* @__PURE__ */ D.memo(function() {
|
|
3684
|
-
const e = ze("gridState"), t = ze("listClassName"), n = ze("itemClassName"), r = ze("itemContent"), o = ze("computeItemKey"), i = ze("isSeeking"), s = it("scrollHeight"), u = ze("ItemComponent"), a = ze("ListComponent"), l = ze("ScrollSeekPlaceholder"), d = ze("context"),
|
|
3684
|
+
const e = ze("gridState"), t = ze("listClassName"), n = ze("itemClassName"), r = ze("itemContent"), o = ze("computeItemKey"), i = ze("isSeeking"), s = it("scrollHeight"), u = ze("ItemComponent"), a = ze("ListComponent"), l = ze("ScrollSeekPlaceholder"), d = ze("context"), m = it("itemDimensions"), p = it("gap"), f = ze("log"), v = ze("stateRestoreInProgress"), y = it("reportReadyState"), c = zt(
|
|
3685
3685
|
D.useMemo(
|
|
3686
|
-
() => (
|
|
3687
|
-
const
|
|
3688
|
-
s(
|
|
3689
|
-
const w =
|
|
3686
|
+
() => (g) => {
|
|
3687
|
+
const h = g.parentElement.parentElement.scrollHeight;
|
|
3688
|
+
s(h);
|
|
3689
|
+
const w = g.firstChild;
|
|
3690
3690
|
if (w) {
|
|
3691
3691
|
const { height: C, width: R } = w.getBoundingClientRect();
|
|
3692
|
-
|
|
3692
|
+
m({ height: C, width: R });
|
|
3693
3693
|
}
|
|
3694
|
-
|
|
3695
|
-
column: fo("column-gap", getComputedStyle(
|
|
3696
|
-
row: fo("row-gap", getComputedStyle(
|
|
3694
|
+
p({
|
|
3695
|
+
column: fo("column-gap", getComputedStyle(g).columnGap, f),
|
|
3696
|
+
row: fo("row-gap", getComputedStyle(g).rowGap, f)
|
|
3697
3697
|
});
|
|
3698
3698
|
},
|
|
3699
|
-
[s,
|
|
3699
|
+
[s, m, p, f]
|
|
3700
3700
|
),
|
|
3701
3701
|
!0,
|
|
3702
3702
|
!1
|
|
@@ -3711,26 +3711,26 @@ const kl = /* @__PURE__ */ ye(() => {
|
|
|
3711
3711
|
...qe(a, d),
|
|
3712
3712
|
"data-testid": "virtuoso-item-list",
|
|
3713
3713
|
style: { paddingBottom: e.offsetBottom, paddingTop: e.offsetTop },
|
|
3714
|
-
children: e.items.map((
|
|
3715
|
-
const
|
|
3714
|
+
children: e.items.map((g) => {
|
|
3715
|
+
const h = o(g.index, g.data, d);
|
|
3716
3716
|
return i ? /* @__PURE__ */ x(
|
|
3717
3717
|
l,
|
|
3718
3718
|
{
|
|
3719
3719
|
...qe(l, d),
|
|
3720
3720
|
height: e.itemHeight,
|
|
3721
|
-
index:
|
|
3721
|
+
index: g.index,
|
|
3722
3722
|
width: e.itemWidth
|
|
3723
3723
|
},
|
|
3724
|
-
|
|
3724
|
+
h
|
|
3725
3725
|
) : /* @__PURE__ */ hn(
|
|
3726
3726
|
u,
|
|
3727
3727
|
{
|
|
3728
3728
|
...qe(u, d),
|
|
3729
3729
|
className: n,
|
|
3730
|
-
"data-index":
|
|
3731
|
-
key:
|
|
3730
|
+
"data-index": g.index,
|
|
3731
|
+
key: h
|
|
3732
3732
|
},
|
|
3733
|
-
r(
|
|
3733
|
+
r(g.index, g.data, d)
|
|
3734
3734
|
);
|
|
3735
3735
|
})
|
|
3736
3736
|
}
|
|
@@ -3835,7 +3835,7 @@ function fo(e, t, n) {
|
|
|
3835
3835
|
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Ye.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
3836
3836
|
}
|
|
3837
3837
|
const zn = Ft(void 0);
|
|
3838
|
-
function
|
|
3838
|
+
function Re(e, t) {
|
|
3839
3839
|
const n = Ue(zn);
|
|
3840
3840
|
if (!n) throw new Error("useAudioStore must be used within CRAudioProvider");
|
|
3841
3841
|
return kn(n, e, t);
|
|
@@ -3855,18 +3855,18 @@ function Ei() {
|
|
|
3855
3855
|
return vr;
|
|
3856
3856
|
}
|
|
3857
3857
|
const Hl = ({ containerRef: e }) => {
|
|
3858
|
-
const t = j((c) => c.rangeStartGI), n = j((c) => c.rangeEndGI), r = j((c) => c.setRange), o = It(), i = t != null && n != null, [s, u] = pt(null), [a, l] = pt(null), d = ie(null),
|
|
3859
|
-
|
|
3860
|
-
const
|
|
3861
|
-
|
|
3858
|
+
const t = j((c) => c.rangeStartGI), n = j((c) => c.rangeEndGI), r = j((c) => c.setRange), o = It(), i = t != null && n != null, [s, u] = pt(null), [a, l] = pt(null), d = ie(null), m = ie({ startGI: t, endGI: n });
|
|
3859
|
+
m.current = { startGI: t, endGI: n };
|
|
3860
|
+
const p = ie(r);
|
|
3861
|
+
p.current = r, fe(() => {
|
|
3862
3862
|
if (!i || t == null || n == null) {
|
|
3863
3863
|
u(null), l(null);
|
|
3864
3864
|
return;
|
|
3865
3865
|
}
|
|
3866
3866
|
const c = () => {
|
|
3867
|
-
const
|
|
3868
|
-
if (!
|
|
3869
|
-
const w =
|
|
3867
|
+
const h = e.current;
|
|
3868
|
+
if (!h) return;
|
|
3869
|
+
const w = h.getBoundingClientRect(), R = 1 / (o.getState().playbackScale || 1), O = h.querySelector(`[data-g="${t}"]`), b = h.querySelector(`[data-g="${n}"]`);
|
|
3870
3870
|
if (O) {
|
|
3871
3871
|
const S = O.getBoundingClientRect();
|
|
3872
3872
|
u({
|
|
@@ -3885,15 +3885,15 @@ const Hl = ({ containerRef: e }) => {
|
|
|
3885
3885
|
l(null);
|
|
3886
3886
|
};
|
|
3887
3887
|
c();
|
|
3888
|
-
const
|
|
3889
|
-
return
|
|
3890
|
-
|
|
3888
|
+
const g = e.current;
|
|
3889
|
+
return g && g.addEventListener("scroll", c, !0), window.addEventListener("resize", c), () => {
|
|
3890
|
+
g && g.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
|
|
3891
3891
|
};
|
|
3892
3892
|
}, [i, t, n, e, o]);
|
|
3893
|
-
const
|
|
3893
|
+
const f = ne((c, g) => {
|
|
3894
3894
|
var w;
|
|
3895
|
-
const
|
|
3896
|
-
for (const C of
|
|
3895
|
+
const h = document.elementsFromPoint(c, g);
|
|
3896
|
+
for (const C of h) {
|
|
3897
3897
|
const R = (w = C.getAttribute) == null ? void 0 : w.call(C, "data-g");
|
|
3898
3898
|
if (R != null)
|
|
3899
3899
|
return parseInt(R, 10);
|
|
@@ -3901,24 +3901,24 @@ const Hl = ({ containerRef: e }) => {
|
|
|
3901
3901
|
return null;
|
|
3902
3902
|
}, []);
|
|
3903
3903
|
fe(() => {
|
|
3904
|
-
const c = (
|
|
3904
|
+
const c = (h) => {
|
|
3905
3905
|
if (!d.current) return;
|
|
3906
|
-
const { startGI: w, endGI: C } =
|
|
3906
|
+
const { startGI: w, endGI: C } = m.current;
|
|
3907
3907
|
if (w == null || C == null) return;
|
|
3908
|
-
const R =
|
|
3909
|
-
R != null && (d.current === "start" ? R <= C ?
|
|
3910
|
-
},
|
|
3908
|
+
const R = f(h.clientX, h.clientY);
|
|
3909
|
+
R != null && (d.current === "start" ? R <= C ? p.current(R, C) : (p.current(C, R), d.current = "end") : R >= w ? p.current(w, R) : (p.current(R, w), d.current = "start"));
|
|
3910
|
+
}, g = () => {
|
|
3911
3911
|
d.current = null, setTimeout(() => {
|
|
3912
3912
|
vr = !1;
|
|
3913
3913
|
}, 50);
|
|
3914
3914
|
};
|
|
3915
|
-
return document.addEventListener("pointermove", c), document.addEventListener("pointerup",
|
|
3916
|
-
document.removeEventListener("pointermove", c), document.removeEventListener("pointerup",
|
|
3915
|
+
return document.addEventListener("pointermove", c), document.addEventListener("pointerup", g), document.addEventListener("pointercancel", g), () => {
|
|
3916
|
+
document.removeEventListener("pointermove", c), document.removeEventListener("pointerup", g), document.removeEventListener("pointercancel", g);
|
|
3917
3917
|
};
|
|
3918
|
-
}, [
|
|
3918
|
+
}, [f]);
|
|
3919
3919
|
const v = ne(
|
|
3920
|
-
(c) => (
|
|
3921
|
-
|
|
3920
|
+
(c) => (g) => {
|
|
3921
|
+
g.preventDefault(), g.stopPropagation(), d.current = c, vr = !0;
|
|
3922
3922
|
},
|
|
3923
3923
|
[]
|
|
3924
3924
|
);
|
|
@@ -4007,7 +4007,7 @@ const Jl = Object.freeze({
|
|
|
4007
4007
|
pointerColor: void 0
|
|
4008
4008
|
}), Oi = D.memo(
|
|
4009
4009
|
function({ runs: t, ns: n, baseIndex: r, preGroups: o }) {
|
|
4010
|
-
const i =
|
|
4010
|
+
const i = Re((M) => M.setClipIndex), s = Re((M) => M.seek), u = j((M) => M.setCurrentGlobalRunIndex), a = xn(), l = j((M) => M.rangeStartGI), d = j((M) => M.rangeEndGI), m = j((M) => M.setRange), p = l != null && d != null, f = ne(
|
|
4011
4011
|
(M) => {
|
|
4012
4012
|
var re;
|
|
4013
4013
|
const P = (re = M.target) == null ? void 0 : re.closest("[data-g]");
|
|
@@ -4021,29 +4021,29 @@ const Jl = Object.freeze({
|
|
|
4021
4021
|
A != null && V != null && (i(A), s(V));
|
|
4022
4022
|
},
|
|
4023
4023
|
[t, r, s, i, u]
|
|
4024
|
-
), v = ie(null), y = ie(!1), c = ie({ x: 0, y: 0 }),
|
|
4024
|
+
), v = ie(null), y = ie(!1), c = ie({ x: 0, y: 0 }), g = ne(
|
|
4025
4025
|
(M) => {
|
|
4026
4026
|
var z;
|
|
4027
4027
|
const P = (z = M.target) == null ? void 0 : z.closest("[data-g]");
|
|
4028
4028
|
if (!P) return;
|
|
4029
4029
|
const I = Number(P.dataset.g), _ = I - r;
|
|
4030
4030
|
_ < 0 || _ >= t.length || (y.current = !1, c.current = { x: M.clientX, y: M.clientY }, v.current && (window.clearTimeout(v.current), v.current = null), v.current = window.setTimeout(() => {
|
|
4031
|
-
a.getState().status !== "playing" && (
|
|
4031
|
+
a.getState().status !== "playing" && (m(I, I), y.current = !0, v.current = null);
|
|
4032
4032
|
}, 800));
|
|
4033
4033
|
},
|
|
4034
|
-
[t, r,
|
|
4035
|
-
),
|
|
4034
|
+
[t, r, m, a]
|
|
4035
|
+
), h = ne(() => {
|
|
4036
4036
|
v.current && (window.clearTimeout(v.current), v.current = null);
|
|
4037
4037
|
}, []), w = ne(
|
|
4038
4038
|
(M) => {
|
|
4039
4039
|
if (!v.current) return;
|
|
4040
4040
|
const P = M.clientX - c.current.x, I = M.clientY - c.current.y;
|
|
4041
|
-
(Math.abs(P) > 5 || Math.abs(I) > 5) &&
|
|
4041
|
+
(Math.abs(P) > 5 || Math.abs(I) > 5) && h();
|
|
4042
4042
|
},
|
|
4043
|
-
[
|
|
4043
|
+
[h]
|
|
4044
4044
|
), C = ne(() => {
|
|
4045
|
-
|
|
4046
|
-
}, [
|
|
4045
|
+
h();
|
|
4046
|
+
}, [h]), R = h, O = h, b = j((M) => M.clearRange), S = ne(
|
|
4047
4047
|
(M) => {
|
|
4048
4048
|
var _;
|
|
4049
4049
|
if (y.current) {
|
|
@@ -4054,16 +4054,16 @@ const Jl = Object.freeze({
|
|
|
4054
4054
|
const P = (_ = M.target) == null ? void 0 : _.closest("[data-g]");
|
|
4055
4055
|
if (!P) return;
|
|
4056
4056
|
const I = Number(P.dataset.g);
|
|
4057
|
-
isNaN(I) ||
|
|
4057
|
+
isNaN(I) || p && l != null && d != null && (b(), M.stopPropagation());
|
|
4058
4058
|
},
|
|
4059
|
-
[
|
|
4059
|
+
[p, l, d, b]
|
|
4060
4060
|
), k = o, T = r + t.length - 1;
|
|
4061
4061
|
return /* @__PURE__ */ x(
|
|
4062
4062
|
"span",
|
|
4063
4063
|
{
|
|
4064
4064
|
onClick: S,
|
|
4065
|
-
onDoubleClick:
|
|
4066
|
-
onPointerDown:
|
|
4065
|
+
onDoubleClick: f,
|
|
4066
|
+
onPointerDown: g,
|
|
4067
4067
|
onPointerMove: w,
|
|
4068
4068
|
onPointerUp: C,
|
|
4069
4069
|
onPointerCancel: R,
|
|
@@ -4106,8 +4106,8 @@ const Jl = Object.freeze({
|
|
|
4106
4106
|
}) {
|
|
4107
4107
|
const u = ne(
|
|
4108
4108
|
(c) => {
|
|
4109
|
-
const
|
|
4110
|
-
return
|
|
4109
|
+
const g = c.currentGlobalRunIndex;
|
|
4110
|
+
return g != null && g >= n.startG && g <= n.endG;
|
|
4111
4111
|
},
|
|
4112
4112
|
[n]
|
|
4113
4113
|
), a = j(nn(u)), l = ne(
|
|
@@ -4117,7 +4117,7 @@ const Jl = Object.freeze({
|
|
|
4117
4117
|
pointerColor: c.pointerColor
|
|
4118
4118
|
} : Jl,
|
|
4119
4119
|
[a]
|
|
4120
|
-
), d = X(nn(l)),
|
|
4120
|
+
), d = X(nn(l)), m = n.r0 ?? 0, p = n.len ?? Math.max(0, n.endG - n.startG + 1), f = a && d.showPointer && d.pointerStyle !== "underline", v = a && d.showPointer && d.pointerStyle === "underline", y = f || v ? {
|
|
4121
4121
|
// 배경색(하이라이트)
|
|
4122
4122
|
"--hl-color": d.pointerColor,
|
|
4123
4123
|
// 밑줄 색/두께/오프셋
|
|
@@ -4125,10 +4125,10 @@ const Jl = Object.freeze({
|
|
|
4125
4125
|
"--ul-thickness": "0.3em",
|
|
4126
4126
|
"--ul-offset": "0.35em"
|
|
4127
4127
|
} : void 0;
|
|
4128
|
-
return /* @__PURE__ */ x(wt, { children: Array.from({ length:
|
|
4129
|
-
const w = r[
|
|
4128
|
+
return /* @__PURE__ */ x(wt, { children: Array.from({ length: p }).map((c, g) => {
|
|
4129
|
+
const w = r[m + g], C = n.startG + g, R = `${t}/run:${C}`, O = !!w.split && C !== o;
|
|
4130
4130
|
let b = `${dt.runWrap}`;
|
|
4131
|
-
return
|
|
4131
|
+
return f && (p === 1 ? b += ` ${dt.highlight}` : g === 0 ? b += ` ${dt.highlightleft}` : g + 1 === p ? b += ` ${dt.highlightright}` : b += ` ${dt.highlightcenter}`), v && (p === 1 ? b += ` ${dt.underline}` : g === 0 ? b += ` ${dt.underlineleft}` : g + 1 === p ? b += ` ${dt.underlineright}` : b += ` ${dt.underlinecenter}`), /* @__PURE__ */ ee(D.Fragment, { children: [
|
|
4132
4132
|
/* @__PURE__ */ x("span", { className: b, style: y, children: /* @__PURE__ */ x(
|
|
4133
4133
|
na,
|
|
4134
4134
|
{
|
|
@@ -4354,10 +4354,10 @@ const ua = "_scroller_kqkmq_3", da = {
|
|
|
4354
4354
|
function ga(e, t = 12, n = 1.5, r = 0.5) {
|
|
4355
4355
|
if (!e) return -1;
|
|
4356
4356
|
const o = e.getBoundingClientRect(), i = o.top + t;
|
|
4357
|
-
let s = -1, u = 1 / 0, a = 1 / 0, l = -1, d = 1 / 0,
|
|
4358
|
-
const
|
|
4359
|
-
for (let
|
|
4360
|
-
const v = f
|
|
4357
|
+
let s = -1, u = 1 / 0, a = 1 / 0, l = -1, d = 1 / 0, m = 1 / 0;
|
|
4358
|
+
const p = e.querySelectorAll("[data-g]");
|
|
4359
|
+
for (let f = 0; f < p.length; f++) {
|
|
4360
|
+
const v = p[f];
|
|
4361
4361
|
if (!v || !v.isConnected) continue;
|
|
4362
4362
|
const y = pa(v);
|
|
4363
4363
|
if (!y || !Sr(y)) continue;
|
|
@@ -4365,14 +4365,14 @@ function ga(e, t = 12, n = 1.5, r = 0.5) {
|
|
|
4365
4365
|
if (c.height <= r || c.width <= r || c.bottom <= o.top || c.top >= o.bottom) continue;
|
|
4366
4366
|
if (c.top < i) {
|
|
4367
4367
|
const w = Math.abs(c.top - i);
|
|
4368
|
-
(w < d || w === d && (c.top <
|
|
4368
|
+
(w < d || w === d && (c.top < m || l !== -1 && Number(v.dataset.g) < l)) && (d = w, l = Number(v.dataset.g), m = c.top);
|
|
4369
4369
|
continue;
|
|
4370
4370
|
}
|
|
4371
|
-
const
|
|
4372
|
-
if (Number.isNaN(
|
|
4373
|
-
c.top < a - n ? (a = c.top, u = c.top, s =
|
|
4374
|
-
const
|
|
4375
|
-
(
|
|
4371
|
+
const g = Number(v.dataset.g);
|
|
4372
|
+
if (Number.isNaN(g)) continue;
|
|
4373
|
+
c.top < a - n ? (a = c.top, u = c.top, s = g) : c.top <= a + n && (c.top < u || c.top === u && (s === -1 || g < s)) && (u = c.top, s = g);
|
|
4374
|
+
const h = Math.abs(c.top - i);
|
|
4375
|
+
(h < d || h === d && (c.top < m || l !== -1 && g < l)) && (d = h, l = g, m = c.top);
|
|
4376
4376
|
}
|
|
4377
4377
|
return s !== -1 ? s : l;
|
|
4378
4378
|
}
|
|
@@ -4416,8 +4416,8 @@ const jn = async (e, t, { topPaddingRatio: n = 0.15, behavior: r = "smooth", qui
|
|
|
4416
4416
|
await ma(e, o);
|
|
4417
4417
|
const s = wn(e, t);
|
|
4418
4418
|
if (!s) return !1;
|
|
4419
|
-
const u = e.getBoundingClientRect(), a = s.getBoundingClientRect(), l = u.height * n, d = u.top + l,
|
|
4420
|
-
return Math.abs(
|
|
4419
|
+
const u = e.getBoundingClientRect(), a = s.getBoundingClientRect(), l = u.height * n, d = u.top + l, m = a.top - d;
|
|
4420
|
+
return Math.abs(m) <= 1;
|
|
4421
4421
|
}, St = () => new Promise((e) => {
|
|
4422
4422
|
requestAnimationFrame(() => {
|
|
4423
4423
|
requestAnimationFrame(() => e());
|
|
@@ -4805,9 +4805,9 @@ function _a({
|
|
|
4805
4805
|
);
|
|
4806
4806
|
},
|
|
4807
4807
|
[t, r, o, n, e, i, u]
|
|
4808
|
-
), d = ie(null),
|
|
4808
|
+
), d = ie(null), m = ne((k) => {
|
|
4809
4809
|
d.current = k;
|
|
4810
|
-
}, []),
|
|
4810
|
+
}, []), p = me(
|
|
4811
4811
|
() => Wt((k) => {
|
|
4812
4812
|
const { style: T, children: M, ...P } = k;
|
|
4813
4813
|
return /* @__PURE__ */ x("div", { ...P, style: T, children: /* @__PURE__ */ x(
|
|
@@ -4829,13 +4829,13 @@ function _a({
|
|
|
4829
4829
|
) });
|
|
4830
4830
|
}),
|
|
4831
4831
|
[s]
|
|
4832
|
-
),
|
|
4832
|
+
), f = ie(null), v = me(() => t.map((k) => k.id), [t]), [y, c] = pt(!1);
|
|
4833
4833
|
fe(() => {
|
|
4834
4834
|
c(!1);
|
|
4835
4835
|
}, [t]);
|
|
4836
|
-
const
|
|
4836
|
+
const g = ne(() => {
|
|
4837
4837
|
c(!0);
|
|
4838
|
-
}, []),
|
|
4838
|
+
}, []), h = ne(() => {
|
|
4839
4839
|
if (!y)
|
|
4840
4840
|
return /* @__PURE__ */ x("div", { style: { height: 40 } });
|
|
4841
4841
|
const k = e.quizzes, T = Math.max(80, Math.floor(u * 0.5));
|
|
@@ -4849,15 +4849,15 @@ function _a({
|
|
|
4849
4849
|
] });
|
|
4850
4850
|
}, [y, e, u]), w = me(
|
|
4851
4851
|
() => ({
|
|
4852
|
-
Item:
|
|
4852
|
+
Item: p,
|
|
4853
4853
|
Header: () => /* @__PURE__ */ x("div", { style: { height: 40 } }),
|
|
4854
|
-
Footer:
|
|
4854
|
+
Footer: h,
|
|
4855
4855
|
Scroller: fa
|
|
4856
4856
|
// ScrollSeekPlaceholder: ScrollPlaceholder, // ✅ 정확한 키
|
|
4857
4857
|
}),
|
|
4858
4858
|
[
|
|
4859
|
-
|
|
4860
|
-
|
|
4859
|
+
h,
|
|
4860
|
+
p
|
|
4861
4861
|
// , ScrollPlaceholder
|
|
4862
4862
|
]
|
|
4863
4863
|
// CustomScroller는 고정이면 deps에 안 넣어도 OK
|
|
@@ -4888,7 +4888,7 @@ function _a({
|
|
|
4888
4888
|
/* @__PURE__ */ x(
|
|
4889
4889
|
yl,
|
|
4890
4890
|
{
|
|
4891
|
-
ref:
|
|
4891
|
+
ref: f,
|
|
4892
4892
|
style: {
|
|
4893
4893
|
height: "100%",
|
|
4894
4894
|
width: "100%",
|
|
@@ -4902,16 +4902,16 @@ function _a({
|
|
|
4902
4902
|
itemContent: l,
|
|
4903
4903
|
initialTopMostItemIndex: b,
|
|
4904
4904
|
increaseViewportBy: { top: 200, bottom: 200 },
|
|
4905
|
-
endReached:
|
|
4905
|
+
endReached: g,
|
|
4906
4906
|
components: w,
|
|
4907
|
-
scrollerRef:
|
|
4907
|
+
scrollerRef: m
|
|
4908
4908
|
}
|
|
4909
4909
|
),
|
|
4910
4910
|
/* @__PURE__ */ x(
|
|
4911
4911
|
Ma,
|
|
4912
4912
|
{
|
|
4913
4913
|
scrollContainerRef: d,
|
|
4914
|
-
virtRef:
|
|
4914
|
+
virtRef: f,
|
|
4915
4915
|
prefix: o
|
|
4916
4916
|
}
|
|
4917
4917
|
)
|
|
@@ -4922,23 +4922,23 @@ const Ma = ({
|
|
|
4922
4922
|
virtRef: t,
|
|
4923
4923
|
prefix: n
|
|
4924
4924
|
}) => {
|
|
4925
|
-
const r = j((I) => I.setCurrentGlobalRunIndex), o = j((I) => I.registerSectionScrollApi), i = j((I) => I.currentGlobalRunIndex), s =
|
|
4925
|
+
const r = j((I) => I.setCurrentGlobalRunIndex), o = j((I) => I.registerSectionScrollApi), i = j((I) => I.currentGlobalRunIndex), s = Re((I) => I.scrollLock), u = Re((I) => I.syncToGI), a = It(), l = ie(!1), d = ie(null), m = ie(null), p = ie(null), f = ie(-1), v = ne(() => {
|
|
4926
4926
|
if (s) return;
|
|
4927
4927
|
d.current = null;
|
|
4928
|
-
const I =
|
|
4928
|
+
const I = m.current;
|
|
4929
4929
|
if (!I) return;
|
|
4930
4930
|
const _ = ga(I, 5);
|
|
4931
|
-
_ !== -1 && _ !==
|
|
4931
|
+
_ !== -1 && _ !== f.current && (f.current = _, u(_), r(_, "scroll"));
|
|
4932
4932
|
}, [s, u, r]), y = ne(
|
|
4933
4933
|
(I) => {
|
|
4934
|
-
|
|
4934
|
+
m.current = I, d.current == null && (d.current = requestAnimationFrame(v));
|
|
4935
4935
|
},
|
|
4936
4936
|
[v]
|
|
4937
4937
|
), c = ne(
|
|
4938
4938
|
(I) => {
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
const _ =
|
|
4939
|
+
m.current = I, p.current != null && (window.clearTimeout(p.current), p.current = null), p.current = window.setTimeout(() => {
|
|
4940
|
+
p.current = null, v();
|
|
4941
|
+
const _ = f.current;
|
|
4942
4942
|
if (_ === -1) return;
|
|
4943
4943
|
const z = I.scrollTop, N = I.scrollHeight - I.clientHeight, A = N > 0 ? z / N : 0;
|
|
4944
4944
|
let V = 0;
|
|
@@ -4959,9 +4959,9 @@ const Ma = ({
|
|
|
4959
4959
|
}, 100);
|
|
4960
4960
|
},
|
|
4961
4961
|
[v, a]
|
|
4962
|
-
),
|
|
4962
|
+
), g = ie(!1), h = ne(
|
|
4963
4963
|
(I) => {
|
|
4964
|
-
s || l.current && (
|
|
4964
|
+
s || l.current && (g.current || (y(I), c(I)));
|
|
4965
4965
|
},
|
|
4966
4966
|
[s, y, c]
|
|
4967
4967
|
), w = ie(void 0), C = ie(void 0), R = ie(void 0), O = ie(void 0);
|
|
@@ -4974,10 +4974,10 @@ const Ma = ({
|
|
|
4974
4974
|
l.current = !0;
|
|
4975
4975
|
}, R.current = () => {
|
|
4976
4976
|
l.current = !0;
|
|
4977
|
-
}, O.current = () =>
|
|
4978
|
-
I.removeEventListener("wheel", w.current), I.removeEventListener("touchmove", C.current), window.removeEventListener("keydown", R.current), I.removeEventListener("scroll", O.current), d.current != null && cancelAnimationFrame(d.current),
|
|
4977
|
+
}, O.current = () => h(I), I.addEventListener("wheel", w.current, { passive: !0 }), I.addEventListener("touchmove", C.current, { passive: !0 }), window.addEventListener("keydown", R.current, { passive: !0 }), I.addEventListener("scroll", O.current, { passive: !0 }), () => {
|
|
4978
|
+
I.removeEventListener("wheel", w.current), I.removeEventListener("touchmove", C.current), window.removeEventListener("keydown", R.current), I.removeEventListener("scroll", O.current), d.current != null && cancelAnimationFrame(d.current), p.current != null && (clearTimeout(p.current), p.current = null);
|
|
4979
4979
|
};
|
|
4980
|
-
}, [
|
|
4980
|
+
}, [h, e]), fe(() => {
|
|
4981
4981
|
const I = e.current;
|
|
4982
4982
|
if (!I || !s) return;
|
|
4983
4983
|
const _ = (V) => {
|
|
@@ -5028,13 +5028,13 @@ const Ma = ({
|
|
|
5028
5028
|
if (I.scrollTop <= 1) {
|
|
5029
5029
|
(async () => {
|
|
5030
5030
|
try {
|
|
5031
|
-
|
|
5031
|
+
g.current = !0, await jn(I, i, {
|
|
5032
5032
|
behavior: "smooth",
|
|
5033
5033
|
topPaddingRatio: 0.2
|
|
5034
5034
|
// ⬅️ 탑일 때는 0으로 고정
|
|
5035
5035
|
});
|
|
5036
5036
|
} finally {
|
|
5037
|
-
|
|
5037
|
+
g.current = !1;
|
|
5038
5038
|
}
|
|
5039
5039
|
k();
|
|
5040
5040
|
})();
|
|
@@ -5099,7 +5099,7 @@ const Ma = ({
|
|
|
5099
5099
|
}, V = () => new Promise((G) => requestAnimationFrame(() => G())), re = async (G) => {
|
|
5100
5100
|
if (_(I, G, 0.1, 0.7))
|
|
5101
5101
|
return N(G), !0;
|
|
5102
|
-
|
|
5102
|
+
g.current = !0;
|
|
5103
5103
|
const E = I.querySelector(`[data-g="${G}"]`), L = I.getBoundingClientRect();
|
|
5104
5104
|
let q = I.scrollTop <= 1 ? 0 : 0.1;
|
|
5105
5105
|
if (E) {
|
|
@@ -5110,7 +5110,7 @@ const Ma = ({
|
|
|
5110
5110
|
return B ? (await jn(I, G, {
|
|
5111
5111
|
behavior: "smooth",
|
|
5112
5112
|
topPaddingRatio: q
|
|
5113
|
-
}), await V()) : B || await A(G, "auto"),
|
|
5113
|
+
}), await V()) : B || await A(G, "auto"), g.current = !1, N(G), _(I, G, 0.1, 0.7);
|
|
5114
5114
|
}, be = async (G) => re(G);
|
|
5115
5115
|
return {
|
|
5116
5116
|
ensureVisibleGI: re,
|
|
@@ -5156,13 +5156,13 @@ function Oa() {
|
|
|
5156
5156
|
}), [e]), a = Rn(), l = ne(() => {
|
|
5157
5157
|
const { isSettingsOpen: v, setSettingsOpen: y, toggleOverlays: c } = a.getState();
|
|
5158
5158
|
v ? y(!1) : c();
|
|
5159
|
-
}, [a]), { onClick: d, onDoubleClick:
|
|
5159
|
+
}, [a]), { onClick: d, onDoubleClick: m } = as({
|
|
5160
5160
|
onSingle: l,
|
|
5161
5161
|
onDouble: () => {
|
|
5162
5162
|
},
|
|
5163
5163
|
delay: 250,
|
|
5164
5164
|
shouldIgnoreTarget: Ea
|
|
5165
|
-
}),
|
|
5165
|
+
}), p = me(
|
|
5166
5166
|
() => ({
|
|
5167
5167
|
flex: 1,
|
|
5168
5168
|
fontFamily: n,
|
|
@@ -5176,11 +5176,11 @@ function Oa() {
|
|
|
5176
5176
|
textSizeAdjust: "none"
|
|
5177
5177
|
}),
|
|
5178
5178
|
[n, i.bg, i.fg, r, o]
|
|
5179
|
-
),
|
|
5179
|
+
), f = me(
|
|
5180
5180
|
() => ({ margin: "0 auto", width: "100%", height: "100%" }),
|
|
5181
5181
|
[]
|
|
5182
5182
|
);
|
|
5183
|
-
return console.log("ScrollSectionWrap render"), /* @__PURE__ */ x("div", { onClick: d, onDoubleClick:
|
|
5183
|
+
return console.log("ScrollSectionWrap render"), /* @__PURE__ */ x("div", { onClick: d, onDoubleClick: m, style: p, children: /* @__PURE__ */ x("div", { style: f, children: /* @__PURE__ */ x(_a, { section: e, blocks: s, nsPrefix: u }) }) });
|
|
5184
5184
|
}
|
|
5185
5185
|
function za(e) {
|
|
5186
5186
|
return Ze({ attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM12.293 7.293a1 1 0 011.414 0L15 8.586l1.293-1.293a1 1 0 111.414 1.414L16.414 10l1.293 1.293a1 1 0 01-1.414 1.414L15 11.414l-1.293 1.293a1 1 0 01-1.414-1.414L13.586 10l-1.293-1.293a1 1 0 010-1.414z", clipRule: "evenodd" }, child: [] }] })(e);
|
|
@@ -5203,7 +5203,7 @@ function La(e) {
|
|
|
5203
5203
|
function Ha(e) {
|
|
5204
5204
|
return Ze({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, child: [] }, { tag: "path", attr: { d: "M4 8v-2a2 2 0 0 1 2 -2h2" }, child: [] }, { tag: "path", attr: { d: "M4 16v2a2 2 0 0 0 2 2h2" }, child: [] }, { tag: "path", attr: { d: "M16 4h2a2 2 0 0 1 2 2v2" }, child: [] }, { tag: "path", attr: { d: "M16 20h2a2 2 0 0 0 2 -2v-2" }, child: [] }] })(e);
|
|
5205
5205
|
}
|
|
5206
|
-
const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31", Da = "_row2_1hfub_34", $a = "_controls_1hfub_44", Va = "_row1_1hfub_52", qa = "_groupExpand_1hfub_80", ja = "_groupPlayback_1hfub_81", Ua = "_groupSpeed_1hfub_82", Ka = "_groupFeatures_1hfub_83", Xa = "_groupNav_1hfub_84", Qa = "_btn_1hfub_116", Ya = "_btnForbidden_1hfub_141", Za = "_btnActive_1hfub_147", Ja = "_label_1hfub_158", ec = "_compactBtn_1hfub_168",
|
|
5206
|
+
const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31", Da = "_row2_1hfub_34", $a = "_controls_1hfub_44", Va = "_row1_1hfub_52", qa = "_groupExpand_1hfub_80", ja = "_groupPlayback_1hfub_81", Ua = "_groupSpeed_1hfub_82", Ka = "_groupFeatures_1hfub_83", Xa = "_groupNav_1hfub_84", Qa = "_btn_1hfub_116", Ya = "_btnForbidden_1hfub_141", Za = "_btnActive_1hfub_147", Ja = "_label_1hfub_158", ec = "_compactBtn_1hfub_168", _e = {
|
|
5207
5207
|
wrap: Na,
|
|
5208
5208
|
visible: Fa,
|
|
5209
5209
|
compact: Wa,
|
|
@@ -5221,7 +5221,7 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31",
|
|
|
5221
5221
|
label: Ja,
|
|
5222
5222
|
compactBtn: ec
|
|
5223
5223
|
}, tc = Wt(function() {
|
|
5224
|
-
const t = ie(null), n = Ue(Ot), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o =
|
|
5224
|
+
const t = ie(null), n = Ue(Ot), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = Re((S) => S.status), i = Re((S) => S.currentTimeMs), s = Re((S) => S.currentClip), u = Re((S) => S.playbackKind), a = X((S) => S.muteAudio), l = X((S) => S.audioSpeed), d = Re((S) => S.getClipSrc), m = Re((S) => S._onTime), p = Re((S) => S._onEnded), f = Re((S) => S._onError), v = j((S) => S.setCurrentGlobalRunIndex), y = j((S) => S.getSectionScrollApi), c = j((S) => S.snapToReadable), g = j((S) => S.edgeReadable), h = ie(null), w = ie(null), C = ie(!1), R = ie(null);
|
|
5225
5225
|
fe(() => {
|
|
5226
5226
|
u === "real" && (C.current = !0);
|
|
5227
5227
|
}, [u]);
|
|
@@ -5242,23 +5242,23 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31",
|
|
|
5242
5242
|
const k = () => {
|
|
5243
5243
|
if (S.paused || S.ended) return;
|
|
5244
5244
|
const P = S.currentTime * 1e3;
|
|
5245
|
-
C.current && P === 0 || (P > 0 && (C.current = !1),
|
|
5245
|
+
C.current && P === 0 || (P > 0 && (C.current = !1), m(P));
|
|
5246
5246
|
}, T = () => {
|
|
5247
5247
|
var I, _;
|
|
5248
|
-
|
|
5249
|
-
const P =
|
|
5248
|
+
p();
|
|
5249
|
+
const P = g(1);
|
|
5250
5250
|
typeof P == "number" && P >= 0 && (v(P, "audio"), (_ = (I = y()) == null ? void 0 : I.ensureVisibleGI) == null || _.call(I, P));
|
|
5251
5251
|
}, M = (P) => {
|
|
5252
5252
|
const I = P.currentTarget;
|
|
5253
5253
|
console.warn("Audio error", {
|
|
5254
5254
|
networkState: I.networkState,
|
|
5255
5255
|
readyState: I.readyState
|
|
5256
|
-
}),
|
|
5256
|
+
}), f();
|
|
5257
5257
|
};
|
|
5258
5258
|
return S.addEventListener("timeupdate", k), S.addEventListener("ended", T), S.addEventListener("error", M), () => {
|
|
5259
5259
|
S.removeEventListener("timeupdate", k), S.removeEventListener("ended", T), S.removeEventListener("error", M);
|
|
5260
5260
|
};
|
|
5261
|
-
}, [
|
|
5261
|
+
}, [m, p, f, g, v, y]), fe(() => {
|
|
5262
5262
|
if (r) return;
|
|
5263
5263
|
const S = t.current;
|
|
5264
5264
|
if (!S) return;
|
|
@@ -5316,16 +5316,16 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31",
|
|
|
5316
5316
|
const k = i / 1e3;
|
|
5317
5317
|
if (Number.isFinite(k)) {
|
|
5318
5318
|
if (S.readyState < 1) {
|
|
5319
|
-
|
|
5319
|
+
h.current = i;
|
|
5320
5320
|
const T = () => {
|
|
5321
|
-
if (
|
|
5322
|
-
const M =
|
|
5321
|
+
if (h.current != null) {
|
|
5322
|
+
const M = h.current / 1e3;
|
|
5323
5323
|
try {
|
|
5324
5324
|
S.currentTime = M;
|
|
5325
5325
|
} catch (P) {
|
|
5326
5326
|
console.log("currentTime보정 오류", P);
|
|
5327
5327
|
}
|
|
5328
|
-
|
|
5328
|
+
h.current = null;
|
|
5329
5329
|
}
|
|
5330
5330
|
S.removeEventListener("loadedmetadata", T), S.removeEventListener("canplay", T);
|
|
5331
5331
|
};
|
|
@@ -5340,7 +5340,7 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31",
|
|
|
5340
5340
|
}
|
|
5341
5341
|
}
|
|
5342
5342
|
}, [i, u, r]);
|
|
5343
|
-
const b =
|
|
5343
|
+
const b = Re((S) => S.getGIFromCT);
|
|
5344
5344
|
return fe(() => {
|
|
5345
5345
|
var T, M;
|
|
5346
5346
|
if (r || u !== "real" || o !== "playing" && o !== "loading") return;
|
|
@@ -5372,23 +5372,23 @@ const rc = "_scrubberWrap_uw0cd_2", oc = "_labels_uw0cd_9", ic = "_index_uw0cd_1
|
|
|
5372
5372
|
range: ac
|
|
5373
5373
|
};
|
|
5374
5374
|
function cc() {
|
|
5375
|
-
const e = X((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), u = j((R) => R.snapToReadable), a =
|
|
5375
|
+
const e = X((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), u = j((R) => R.snapToReadable), a = Re((R) => R.scrollLock), l = Re((R) => R.pause), d = Re((R) => R.play), m = Re((R) => R.syncToGI), [p, f] = pt(() => i(t || 0));
|
|
5376
5376
|
fe(() => {
|
|
5377
|
-
|
|
5377
|
+
f(i(t || 0));
|
|
5378
5378
|
}, [t, i]);
|
|
5379
5379
|
const v = ie(!1), y = me(() => Math.max(0, Math.min(t ?? 0, Math.max(0, (n ?? 1) - 1))) + 1, [t, n]), c = ne(() => {
|
|
5380
5380
|
a && (l(), v.current = !0);
|
|
5381
|
-
}, [a, l]),
|
|
5382
|
-
|
|
5383
|
-
}, []),
|
|
5384
|
-
const R = s(
|
|
5385
|
-
l(), r(O, "scrubber-commit"),
|
|
5381
|
+
}, [a, l]), g = ne((R) => {
|
|
5382
|
+
f(Number(R.currentTarget.value));
|
|
5383
|
+
}, []), h = ne(async () => {
|
|
5384
|
+
const R = s(p), O = u(R);
|
|
5385
|
+
l(), r(O, "scrubber-commit"), m(O);
|
|
5386
5386
|
const b = o();
|
|
5387
5387
|
b != null && b.ensureVisibleGI && await b.ensureVisibleGI(O), v.current && (v.current = !1, d());
|
|
5388
|
-
}, [
|
|
5389
|
-
() => ({ "--pct": `${
|
|
5390
|
-
[
|
|
5391
|
-
), C = me(() => Math.round(
|
|
5388
|
+
}, [p, s, u, l, r, m, o, d]), w = me(
|
|
5389
|
+
() => ({ "--pct": `${p}%` }),
|
|
5390
|
+
[p]
|
|
5391
|
+
), C = me(() => Math.round(p), [p]);
|
|
5392
5392
|
return /* @__PURE__ */ ee("div", { className: Bt.scrubberWrap, children: [
|
|
5393
5393
|
e && /* @__PURE__ */ x("div", { className: Bt.labels, children: /* @__PURE__ */ ee("span", { className: Bt.index, children: [
|
|
5394
5394
|
y,
|
|
@@ -5404,18 +5404,18 @@ function cc() {
|
|
|
5404
5404
|
min: 0,
|
|
5405
5405
|
max: 100,
|
|
5406
5406
|
step: 0.5,
|
|
5407
|
-
value:
|
|
5407
|
+
value: p,
|
|
5408
5408
|
style: w,
|
|
5409
5409
|
onMouseDown: c,
|
|
5410
5410
|
onTouchStart: c,
|
|
5411
|
-
onChange:
|
|
5411
|
+
onChange: g,
|
|
5412
5412
|
onMouseUp: () => {
|
|
5413
|
-
|
|
5413
|
+
h();
|
|
5414
5414
|
},
|
|
5415
5415
|
onTouchEnd: () => {
|
|
5416
|
-
|
|
5416
|
+
h();
|
|
5417
5417
|
},
|
|
5418
|
-
onKeyUp: (R) => R.key === "Enter" || R.key === " " ? void
|
|
5418
|
+
onKeyUp: (R) => R.key === "Enter" || R.key === " " ? void h() : void 0,
|
|
5419
5419
|
"aria-label": "진행률"
|
|
5420
5420
|
}
|
|
5421
5421
|
),
|
|
@@ -5427,29 +5427,29 @@ function cc() {
|
|
|
5427
5427
|
] });
|
|
5428
5428
|
}
|
|
5429
5429
|
const uc = D.memo(cc), dc = Wt(function() {
|
|
5430
|
-
const t = Ue(Ot), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r =
|
|
5430
|
+
const t = Ue(Ot), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r = Re((S) => S.playbackKind), o = Re((S) => S.status), i = Re((S) => S.fake), s = X((S) => S.audioSpeed), u = Re((S) => S.pause), a = j((S) => S.totalRuns), l = j((S) => S.currentGlobalRunIndex), d = j((S) => S.setCurrentGlobalRunIndex), m = j((S) => S.getSectionScrollApi), p = j((S) => S.nextReadableFrom), f = j((S) => S.edgeReadable), v = ie(null), y = ie(null), c = ie(0), g = ie(-1), h = !n && r === "fake" && o === "playing", w = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1), C = me(() => {
|
|
5431
5431
|
const S = 200 * s;
|
|
5432
5432
|
return w / S * 6e4;
|
|
5433
5433
|
}, [w, s]), R = me(() => !a || a <= 1 || C <= 0 ? 0 : (a - 1) / C, [a, C]);
|
|
5434
5434
|
fe(() => {
|
|
5435
|
-
if (!
|
|
5435
|
+
if (!h) return;
|
|
5436
5436
|
const S = Math.max(0, Math.min(l ?? 0, Math.max(0, (a ?? 1) - 1)));
|
|
5437
|
-
c.current = S,
|
|
5438
|
-
}, [
|
|
5437
|
+
c.current = S, g.current = S, y.current = null;
|
|
5438
|
+
}, [h, l, a]);
|
|
5439
5439
|
const O = ie(-1);
|
|
5440
5440
|
fe(() => {
|
|
5441
5441
|
if (!a) {
|
|
5442
5442
|
O.current = -1;
|
|
5443
5443
|
return;
|
|
5444
5444
|
}
|
|
5445
|
-
const S =
|
|
5445
|
+
const S = f(1);
|
|
5446
5446
|
O.current = S ?? -1;
|
|
5447
|
-
}, [
|
|
5447
|
+
}, [f, a]);
|
|
5448
5448
|
const b = ne(
|
|
5449
5449
|
(S) => {
|
|
5450
5450
|
(async () => {
|
|
5451
5451
|
var N, A;
|
|
5452
|
-
if (!
|
|
5452
|
+
if (!h) {
|
|
5453
5453
|
v.current = null;
|
|
5454
5454
|
return;
|
|
5455
5455
|
}
|
|
@@ -5461,21 +5461,21 @@ const uc = D.memo(cc), dc = Wt(function() {
|
|
|
5461
5461
|
y.current = S;
|
|
5462
5462
|
const T = k == null ? 0 : Math.max(0, S - k), M = a - 1;
|
|
5463
5463
|
c.current = Math.min(M, c.current + R * T);
|
|
5464
|
-
const P = Math.floor(c.current), I =
|
|
5464
|
+
const P = Math.floor(c.current), I = m(), _ = p(P, 1);
|
|
5465
5465
|
if (_ == null) {
|
|
5466
5466
|
const V = O.current >= 0 ? O.current : P;
|
|
5467
|
-
V !==
|
|
5467
|
+
V !== g.current && (g.current = V, d(V, "audio"), await ((N = I == null ? void 0 : I.ensureVisibleGI) == null ? void 0 : N.call(I, V))), u(), v.current = null;
|
|
5468
5468
|
return;
|
|
5469
5469
|
}
|
|
5470
5470
|
const z = _;
|
|
5471
|
-
z !==
|
|
5471
|
+
z !== g.current && (g.current = z, d(z, "audio"), z % 5 === 0 && await ((A = I == null ? void 0 : I.ensureVisibleGI) == null ? void 0 : A.call(I, z))), v.current = requestAnimationFrame(b);
|
|
5472
5472
|
})().catch(console.error);
|
|
5473
5473
|
},
|
|
5474
|
-
[
|
|
5474
|
+
[h, a, R, p, d, m, u]
|
|
5475
5475
|
);
|
|
5476
|
-
return fe(() => (
|
|
5476
|
+
return fe(() => (h ? v.current == null && (v.current = requestAnimationFrame(b)) : (v.current && (cancelAnimationFrame(v.current), v.current = null), y.current = null), () => {
|
|
5477
5477
|
v.current && (cancelAnimationFrame(v.current), v.current = null);
|
|
5478
|
-
}), [
|
|
5478
|
+
}), [h, b]), null;
|
|
5479
5479
|
}), fc = Wt(function() {
|
|
5480
5480
|
return /* @__PURE__ */ x(dc, {});
|
|
5481
5481
|
}), pc = "data:image/svg+xml,%3csvg%20width='111'%20height='111'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20overflow='hidden'%3e%3cg%20transform='translate(-435%2011)'%3e%3cpath%20d='M532.723%2046.8125C530.242%2046.8292%20527.8%2047.4292%20525.593%2048.5642%20523.298%2049.7713%20520.952%2050.8767%20518.608%2051.8815%20517.451%2031.9953%20500.391%2016.8128%20480.505%2017.9704%20462.359%2019.0268%20447.834%2033.4215%20446.615%2051.5578L438.476%2048.1353%20438.476%2049.9344C438.473%2054.7251%20441.432%2059.0185%20445.91%2060.721%20446.509%2060.9604%20447.138%2061.1708%20447.767%2061.3801%20448.053%2061.4761%20448.339%2061.5709%20448.622%2061.6692L447.745%2066.7254C447.463%2068.2415%20447.818%2069.8071%20448.728%2071.0521%20449.635%2072.2874%20450.984%2073.1242%20452.493%2073.3877L452.768%2073.4282C453.011%2073.488%20453.259%2073.5198%20453.509%2073.523%20456.31%2073.5182%20458.699%2071.4953%20459.166%2068.7338L459.781%2064.8673C468.886%2066.8727%20478.184%2067.875%20487.508%2067.8562%20493.267%2067.8674%20499.021%2067.5125%20504.736%2066.7937%20504.893%2066.7613%20505.041%2066.7405%20505.184%2066.7231L505.562%2068.8379C505.986%2071.6231%20508.396%2073.6706%20511.213%2073.6375%20511.583%2073.648%20511.953%2073.5977%20512.307%2073.4883%20515.422%2072.958%20517.518%2070.0024%20516.988%2066.8869%20516.984%2066.8688%20516.981%2066.8509%20516.978%2066.833L516.758%2065.6767C522.066%2065.3125%20527.42%2065.3125%20532.607%2065.3125L532.723%2065.3125C537.831%2065.6255%20542.226%2061.7378%20542.539%2056.6292%20542.852%2051.5205%20538.965%2047.1255%20533.856%2046.8125%20533.479%2046.7894%20533.1%2046.7894%20532.723%2046.8125ZM516.326%2052.7256C511.914%2054.5082%20507.352%2055.8913%20502.693%2056.858L492.697%2041.007%20501.916%2026.3469C510.579%2032.4029%20515.911%2042.1631%20516.326%2052.7256ZM500.254%2057.3217C497.133%2057.8531%20493.977%2058.1542%20490.811%2058.2224L487.449%2058.2224C480.061%2058.2766%20472.682%2057.6921%20465.394%2056.4753L474.504%2042.1644%20490.692%2042.1644ZM482.602%2020.2188C488.73%2020.2155%20494.742%2021.8953%20499.981%2025.075L490.693%2039.8507%20474.491%2039.8195%20465.194%2025.0415C470.449%2021.8782%20476.468%2020.2107%20482.602%2020.2188ZM463.254%2026.2995%20472.504%2041.0023%20462.938%2056.0267C458.169%2055.1133%20453.47%2053.8672%20448.875%2052.2977%20449.378%2041.8709%20454.689%2032.2672%20463.254%2026.2995ZM456.876%2068.3719C456.595%2070.0115%20455.173%2071.2097%20453.509%2071.2094%20453.431%2071.2042%20453.354%2071.191%20453.278%2071.1701%20453.133%2071.1343%20452.984%2071.1101%20452.835%2071.0972%20451.94%2070.9264%20451.142%2070.4243%20450.601%2069.6912%20450.063%2068.9533%20449.853%2068.0254%20450.023%2067.1278L450.844%2062.3872%20457.525%2064.2962ZM514.123%2069.8103C513.566%2070.5637%20512.74%2071.0728%20511.817%2071.2313L511.657%2071.2718C511.514%2071.32%20511.363%2071.3392%20511.213%2071.3285%20509.525%2071.3698%20508.075%2070.1378%20507.844%2068.4656L507.486%2066.4688%20514.501%2065.8548%20514.701%2067.2527C514.87%2068.1485%20514.661%2069.0742%20514.123%2069.8103ZM532.723%2063%20532.607%2063C526.955%2063%20521.113%2063%20515.284%2063.4625L515.276%2063.4625%20515.276%2063.4625%20505.9%2064.2904%20504.36%2064.5078C498.77%2065.2064%20493.141%2065.5509%20487.508%2065.5391%20477.952%2065.5601%20468.425%2064.4858%20459.114%2062.3375L450.263%2059.8168%20446.738%2058.5658C443.792%2057.4525%20441.62%2054.9086%20440.982%2051.8237%20454.33%2057.5309%20470.023%2060.5383%20486.577%2060.5383%20486.868%2060.5383%20487.161%2060.5383%20487.452%2060.5383L490.828%2060.5383C500.421%2060.2575%20509.874%2058.1665%20518.689%2054.3755L518.797%2054.3304C521.437%2053.2216%20524.086%2051.9728%20526.649%2050.6235%20528.526%2049.6491%20530.608%2049.1354%20532.723%2049.125%20536.554%2048.8199%20539.908%2051.6785%20540.213%2055.5099%20540.518%2059.3414%20537.659%2062.6949%20533.828%2063%20533.46%2063.0293%20533.091%2063.0293%20532.723%2063Z'/%3e%3cpath%20d='M534.442%2053.75C534.442%2055.0272%20533.407%2056.0625%20532.13%2056.0625%20530.852%2056.0625%20529.817%2055.0272%20529.817%2053.75%20529.817%2052.4728%20530.852%2051.4375%20532.13%2051.4375%20533.407%2051.4375%20534.442%2052.4728%20534.442%2053.75Z'/%3e%3c/g%3e%3c/svg%3e", gc = "data:image/svg+xml,%3csvg%20width='159'%20height='159'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20overflow='hidden'%3e%3cg%20transform='translate(-392%20-84)'%3e%3cpath%20d='M496.776%20189.601C496.122%20189.934%20495.77%20190.663%20495.916%20191.383L499.911%20210.219C500.074%20210.985%20500.75%20211.532%20501.533%20211.531L501.929%20211.531C503.729%20211.515%20505.222%20212.919%20505.319%20214.716%20505.389%20216.544%20503.964%20218.083%20502.136%20218.154%20502.093%20218.155%20502.05%20218.156%20502.006%20218.156L497.503%20218.156C495.941%20218.15%20494.594%20217.058%20494.263%20215.531L490.363%20197.147C490.174%20196.252%20489.294%20195.68%20488.4%20195.87%20488.399%20195.87%20488.399%20195.87%20488.399%20195.87%20488.174%20195.918%20487.962%20196.014%20487.776%20196.15L481.184%20200.898C479.925%20201.758%20478.809%20202.45%20477.776%20203.015%20476.998%20203.429%20476.669%20204.372%20477.022%20205.18%20477.402%20206.011%20478.385%20206.378%20479.217%20205.998%20479.253%20205.981%20479.288%20205.964%20479.322%20205.945%20480.618%20205.229%20481.877%20204.447%20483.094%20203.604L487.657%20200.313%20491.031%20216.213C491.677%20219.273%20494.376%20221.464%20497.503%20221.469L501.882%20221.469C505.577%20221.473%20508.587%20218.502%20508.631%20214.807%20508.608%20211.503%20506.158%20208.719%20502.883%20208.277L499.416%20191.93C502.051%20190.581%20506.719%20188.344%20509.619%20188.344%20515.225%20188.346%20520.812%20187.662%20526.252%20186.307%20530.081%20185.36%20533.152%20182.51%20534.381%20178.762L534.535%20178.295C535.676%20175.09%20535.323%20171.542%20533.573%20168.624L525.126%20154.2C522.254%20149.369%20517.625%20145.835%20512.207%20144.337%20512.364%20138.624%20511.516%20132.927%20509.7%20127.508%20504.714%20113.244%20488.452%20105.977%20487.761%20105.669%20487.336%20105.48%20486.851%20105.48%20486.426%20105.669%20485.959%20105.876%20484.987%20106.308%20483.1%20111.962%20482.811%20112.832%20483.281%20113.77%20484.15%20114.059%20485.019%20114.348%20485.958%20113.878%20486.247%20113.009%20486.649%20111.744%20487.129%20110.505%20487.685%20109.299%20491.474%20111.245%20502.818%20117.831%20506.566%20128.543%20508.418%20133.972%20509.183%20139.713%20508.815%20145.437%20508.734%20146.277%20509.297%20147.043%20510.122%20147.217%20515.212%20148.269%20519.626%20151.41%20522.287%20155.875L530.744%20170.299C532.007%20172.379%20532.256%20174.921%20531.42%20177.207L531.254%20177.727C530.378%20180.388%20528.194%20182.41%20525.474%20183.079%20520.288%20184.375%20514.964%20185.031%20509.619%20185.031%20505.93%20185.031%20501.061%20187.35%20496.776%20189.601Z'/%3e%3cpath%20d='M422.439%20192.966C421.946%20190.791%20421.681%20188.571%20421.649%20186.341%20421.7%20185.427%20421.001%20184.643%20420.086%20184.592%20419.171%20184.54%20418.388%20185.239%20418.336%20186.154%20418.324%20187.879%20418.47%20189.602%20418.772%20191.3%20412.577%20189.633%20408.907%20183.26%20410.574%20177.065%20411.942%20171.981%20416.559%20168.453%20421.824%20168.469%20422.661%20168.473%20423.491%20168.611%20424.284%20168.88%20425.056%20169.133%20425.898%20168.787%20426.271%20168.065%20435.26%20150.783%20455.639%20142.806%20473.971%20149.392%20474.837%20150.636%20475.5%20151.557%20475.559%20151.638%20476.094%20152.38%20477.129%20152.549%20477.872%20152.014%20478.614%20151.479%20478.782%20150.444%20478.248%20149.702%20478.216%20149.657%20475.101%20145.338%20473.444%20142.62%20467.845%20132.798%20470.283%20120.115%20471.358%20115.817%20475.617%20117.014%20487.816%20121.194%20493.442%20131.039%20496.082%20135.531%20497.921%20140.449%20498.876%20145.571%20499.017%20146.361%20499.705%20146.936%20500.508%20146.936L503.929%20146.936C504.816%20146.948%20505.561%20146.274%20505.639%20145.391%20505.7%20144.478%20505.01%20143.688%20504.097%20143.627%20504.059%20143.624%20504.021%20143.623%20503.982%20143.623L501.871%20143.623C500.778%20138.613%20498.902%20133.806%20496.312%20129.38%20488.742%20116.13%20471.271%20112.337%20470.533%20112.183%20469.704%20112.01%20468.879%20112.489%20468.618%20113.294%20468.385%20114.011%20463.013%20131.036%20470.568%20144.256%20470.579%20144.276%20470.745%20144.576%20470.978%20144.973%20470.99%20144.991%20470.978%20145.003%20470.96%20144.998%20452.498%20140.481%20433.287%20148.811%20423.966%20165.375%20423.261%20165.231%20422.543%20165.158%20421.824%20165.156%20413.582%20165.183%20406.923%20171.886%20406.95%20180.128%20406.974%20187.414%20412.256%20193.618%20419.446%20194.803L419.446%20194.803C419.532%20195.194%20419.611%20195.585%20419.706%20195.972L419.8%20196.329C422.428%20206.56%20428.796%20215.436%20437.646%20221.204%20437.917%20221.379%20438.232%20221.473%20438.554%20221.474L473.068%20221.474C476.748%20221.495%20479.756%20218.542%20479.801%20214.862%20479.847%20211.242%20476.95%20208.27%20473.329%20208.224%20473.278%20208.223%20473.227%20208.223%20473.176%20208.224L465.158%20208.224C474.765%20201.216%20476.873%20187.747%20469.866%20178.14%20465.812%20172.583%20459.348%20169.297%20452.47%20169.297%20450.573%20169.261%20448.682%20169.507%20446.858%20170.029%20445.981%20170.293%20445.484%20171.219%20445.749%20172.096%20446.013%20172.973%20446.938%20173.47%20447.816%20173.206%20449.328%20172.775%20450.897%20172.574%20452.47%20172.609%20462.532%20172.632%20470.67%20180.807%20470.648%20190.869%20470.63%20198.914%20465.337%20205.995%20457.626%20208.29%20456.784%20208.543%20456.286%20209.408%20456.491%20210.263%20456.686%20211.016%20457.369%20211.54%20458.147%20211.533L473.107%20211.533C474.951%20211.521%20476.458%20213.001%20476.48%20214.845%20476.52%20216.635%20475.102%20218.118%20473.312%20218.158%20473.264%20218.159%20473.216%20218.159%20473.168%20218.158L439.054%20218.158C431.004%20212.776%20425.251%20204.584%20422.922%20195.184%20422.853%20194.889%20422.795%20194.619%20422.733%20194.339Z'/%3e%3cpath%20d='M519.521%20163.831C519.708%20162.011%20518.383%20160.385%20516.563%20160.199%20514.743%20160.012%20513.117%20161.337%20512.931%20163.157%20512.744%20164.977%20514.069%20166.603%20515.889%20166.789%20516.113%20166.812%20516.339%20166.812%20516.563%20166.789%20518.126%20166.629%20519.361%20165.394%20519.521%20163.831Z'/%3e%3c/g%3e%3c/svg%3e", hc = "_WPMSpeedButtonsWrap_r3byt_1", mc = "_btnWrap_r3byt_7", bc = "_label_r3byt_14", vc = "_iconBtn_r3byt_22", qt = {
|
|
@@ -5484,14 +5484,14 @@ const uc = D.memo(cc), dc = Wt(function() {
|
|
|
5484
5484
|
label: bc,
|
|
5485
5485
|
iconBtn: vc
|
|
5486
5486
|
}, Co = 350, Sc = 40, yc = 0.85, xc = Wt(function() {
|
|
5487
|
-
const t = X((
|
|
5488
|
-
(
|
|
5489
|
-
const
|
|
5490
|
-
if (
|
|
5491
|
-
if (
|
|
5487
|
+
const t = X((p) => p.audioSpeed), n = X((p) => p.incAudioSpeed), r = X((p) => p.decAudioSpeed), o = ie(null), i = ie(Co), s = ie(null), u = ne(
|
|
5488
|
+
(p) => {
|
|
5489
|
+
const f = t;
|
|
5490
|
+
if (p === "inc") {
|
|
5491
|
+
if (f >= 2) return !1;
|
|
5492
5492
|
n();
|
|
5493
5493
|
} else {
|
|
5494
|
-
if (
|
|
5494
|
+
if (f <= 0.3) return !1;
|
|
5495
5495
|
r();
|
|
5496
5496
|
}
|
|
5497
5497
|
return !0;
|
|
@@ -5504,16 +5504,16 @@ const uc = D.memo(cc), dc = Wt(function() {
|
|
|
5504
5504
|
u(s.current) ? l() : a();
|
|
5505
5505
|
}, i.current));
|
|
5506
5506
|
}, [u, a]), d = ne(
|
|
5507
|
-
(
|
|
5507
|
+
(p) => {
|
|
5508
5508
|
if (s.current) return;
|
|
5509
|
-
s.current =
|
|
5509
|
+
s.current = p, i.current = Co, u(p) && l();
|
|
5510
5510
|
const v = () => a();
|
|
5511
5511
|
window.addEventListener("mouseup", v, { once: !0 }), window.addEventListener("touchend", v, { once: !0 });
|
|
5512
5512
|
},
|
|
5513
5513
|
[l, u, a]
|
|
5514
5514
|
);
|
|
5515
5515
|
fe(() => a, [a]);
|
|
5516
|
-
const
|
|
5516
|
+
const m = `${(t * 100).toFixed(0)}%`;
|
|
5517
5517
|
return /* @__PURE__ */ x(
|
|
5518
5518
|
"div",
|
|
5519
5519
|
{
|
|
@@ -5527,14 +5527,14 @@ const uc = D.memo(cc), dc = Wt(function() {
|
|
|
5527
5527
|
type: "button",
|
|
5528
5528
|
title: "속도 느리게",
|
|
5529
5529
|
onMouseDown: () => d("dec"),
|
|
5530
|
-
onTouchStart: (
|
|
5531
|
-
|
|
5530
|
+
onTouchStart: (p) => {
|
|
5531
|
+
p.preventDefault(), d("dec");
|
|
5532
5532
|
},
|
|
5533
5533
|
onMouseUp: a,
|
|
5534
5534
|
children: /* @__PURE__ */ x("img", { src: pc, alt: "느리게" })
|
|
5535
5535
|
}
|
|
5536
5536
|
),
|
|
5537
|
-
/* @__PURE__ */ x("div", { className: qt.label, style: { minWidth: "44px", textAlign: "center" }, children: /* @__PURE__ */ x("div", { children:
|
|
5537
|
+
/* @__PURE__ */ x("div", { className: qt.label, style: { minWidth: "44px", textAlign: "center" }, children: /* @__PURE__ */ x("div", { children: m }) }),
|
|
5538
5538
|
/* @__PURE__ */ x(
|
|
5539
5539
|
"button",
|
|
5540
5540
|
{
|
|
@@ -5542,8 +5542,8 @@ const uc = D.memo(cc), dc = Wt(function() {
|
|
|
5542
5542
|
type: "button",
|
|
5543
5543
|
title: "속도 빠르게",
|
|
5544
5544
|
onMouseDown: () => d("inc"),
|
|
5545
|
-
onTouchStart: (
|
|
5546
|
-
|
|
5545
|
+
onTouchStart: (p) => {
|
|
5546
|
+
p.preventDefault(), d("inc");
|
|
5547
5547
|
},
|
|
5548
5548
|
onMouseUp: a,
|
|
5549
5549
|
children: /* @__PURE__ */ x("img", { src: gc, alt: "빠르게" })
|
|
@@ -5562,11 +5562,11 @@ function Tc(e) {
|
|
|
5562
5562
|
return Ze({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M221.66,133.66l-80,80A8,8,0,0,1,128,208V147.31L61.66,213.66A8,8,0,0,1,48,208V48a8,8,0,0,1,13.66-5.66L128,108.69V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,221.66,133.66Z" }, child: [] }] })(e);
|
|
5563
5563
|
}
|
|
5564
5564
|
function To({ direction: e }) {
|
|
5565
|
-
const t = j((
|
|
5566
|
-
async (
|
|
5565
|
+
const t = j((m) => m.currentGlobalRunIndex), n = j((m) => m.totalRuns), r = j((m) => m.hasReadableInDir), o = j((m) => m.computeStepTarget), i = j((m) => m.setCurrentGlobalRunIndex), s = Re((m) => m.syncToGI), u = j((m) => m.getSectionScrollApi), a = ne(
|
|
5566
|
+
async (m) => {
|
|
5567
5567
|
var v, y;
|
|
5568
|
-
const
|
|
5569
|
-
i(
|
|
5568
|
+
const p = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1))), f = o(p, m);
|
|
5569
|
+
i(f, "scrubber-step"), s(f), await ((y = (v = u()) == null ? void 0 : v.ensureVisibleGI) == null ? void 0 : y.call(v, f));
|
|
5570
5570
|
},
|
|
5571
5571
|
[
|
|
5572
5572
|
t,
|
|
@@ -5578,8 +5578,8 @@ function To({ direction: e }) {
|
|
|
5578
5578
|
u
|
|
5579
5579
|
]
|
|
5580
5580
|
), l = me(() => {
|
|
5581
|
-
const
|
|
5582
|
-
return e === "left" ?
|
|
5581
|
+
const m = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1))), p = !n || !r(m, 1), f = !n || !r(m, -1);
|
|
5582
|
+
return e === "left" ? f : p;
|
|
5583
5583
|
}, [e, n, t, r]), d = ne(() => {
|
|
5584
5584
|
a(e === "left" ? -1 : 1);
|
|
5585
5585
|
}, [e, a]);
|
|
@@ -5628,20 +5628,20 @@ function Ec(e) {
|
|
|
5628
5628
|
}
|
|
5629
5629
|
function Oc() {
|
|
5630
5630
|
var k;
|
|
5631
|
-
const e = X((T) => T.showOverlays), t = j((T) => T.section), n = !!t.ast.isAddedSplit, r = !!((k = t.audios) != null && k.length), o = j((T) => T.canTracking), i = j((T) => T.canToggleShowGaze), s = j((T) => T.showGaze), u = j((T) => T.onToggleShowGaze), a = X((T) => T.muteAudio), l = X((T) => T.showPointer), d = X((T) => T.showSplit),
|
|
5631
|
+
const e = X((T) => T.showOverlays), t = j((T) => T.section), n = !!t.ast.isAddedSplit, r = !!((k = t.audios) != null && k.length), o = j((T) => T.canTracking), i = j((T) => T.canToggleShowGaze), s = j((T) => T.showGaze), u = j((T) => T.onToggleShowGaze), a = X((T) => T.muteAudio), l = X((T) => T.showPointer), d = X((T) => T.showSplit), m = X((T) => T.toggleMuteAudio), p = X((T) => T.toggleShowPointer), f = X((T) => T.toggleShowSplit), v = X((T) => T.overlayCompactMode), y = X((T) => T.toggleOverlayCompactMode), c = xn(), g = yt();
|
|
5632
5632
|
fe(() => {
|
|
5633
|
-
const T = c.getState(), { syncToGI: M, useFake: P, useReal: I } = T, _ = T.playbackKind, z =
|
|
5633
|
+
const T = c.getState(), { syncToGI: M, useFake: P, useReal: I } = T, _ = T.playbackKind, z = g.getState().progress.currentGlobalRunIndex ?? 0;
|
|
5634
5634
|
if (!r) {
|
|
5635
5635
|
_ !== "fake" && P();
|
|
5636
5636
|
return;
|
|
5637
5637
|
}
|
|
5638
5638
|
a ? _ !== "fake" && (console.log("이부분일까?"), P()) : _ !== "real" && (M(z), I());
|
|
5639
|
-
}, [r, a,
|
|
5640
|
-
const
|
|
5639
|
+
}, [r, a, g, c]);
|
|
5640
|
+
const h = Re((T) => T.play), w = Re((T) => T.pause), C = Re((T) => T.status), R = ne(
|
|
5641
5641
|
(T) => {
|
|
5642
|
-
T.stopPropagation(), C === "playing" || C === "loading" ? w() :
|
|
5642
|
+
T.stopPropagation(), C === "playing" || C === "loading" ? w() : h();
|
|
5643
5643
|
},
|
|
5644
|
-
[C,
|
|
5644
|
+
[C, h, w]
|
|
5645
5645
|
), O = xn(), b = yt(), S = ne(
|
|
5646
5646
|
async (T) => {
|
|
5647
5647
|
var xe, Fe;
|
|
@@ -5660,14 +5660,14 @@ function Oc() {
|
|
|
5660
5660
|
z == null || z(Ce, "audio"), await ((xe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : xe.call(re, Ce)), A.syncToGI(Ce);
|
|
5661
5661
|
return;
|
|
5662
5662
|
}
|
|
5663
|
-
z == null || z(Se, "audio"), await ((Fe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : Fe.call(re, Se)), A.syncToGI(Se),
|
|
5663
|
+
z == null || z(Se, "audio"), await ((Fe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : Fe.call(re, Se)), A.syncToGI(Se), h(V);
|
|
5664
5664
|
},
|
|
5665
|
-
[C, w,
|
|
5665
|
+
[C, w, h, O, b]
|
|
5666
5666
|
);
|
|
5667
5667
|
return /* @__PURE__ */ ee(
|
|
5668
5668
|
"div",
|
|
5669
5669
|
{
|
|
5670
|
-
className: `${
|
|
5670
|
+
className: `${_e.wrap} ${e ? _e.visible : ""} ${v ? _e.compact : ""}`,
|
|
5671
5671
|
onClick: (T) => {
|
|
5672
5672
|
T.stopPropagation();
|
|
5673
5673
|
},
|
|
@@ -5677,21 +5677,21 @@ function Oc() {
|
|
|
5677
5677
|
children: [
|
|
5678
5678
|
!v && /* @__PURE__ */ x(uc, {}),
|
|
5679
5679
|
/* @__PURE__ */ x("div", { style: v ? { display: "none" } : void 0, children: r && !a ? /* @__PURE__ */ x(nc, {}) : /* @__PURE__ */ x(fc, {}) }),
|
|
5680
|
-
/* @__PURE__ */ ee("div", { className:
|
|
5681
|
-
/* @__PURE__ */ ee("div", { className:
|
|
5682
|
-
/* @__PURE__ */ x("div", { className:
|
|
5680
|
+
/* @__PURE__ */ ee("div", { className: _e.controls, children: [
|
|
5681
|
+
/* @__PURE__ */ ee("div", { className: _e.row1, children: [
|
|
5682
|
+
/* @__PURE__ */ x("div", { className: _e.groupExpand, children: /* @__PURE__ */ x(
|
|
5683
5683
|
"button",
|
|
5684
5684
|
{
|
|
5685
5685
|
type: "button",
|
|
5686
5686
|
onClick: (T) => {
|
|
5687
5687
|
T.stopPropagation(), y();
|
|
5688
5688
|
},
|
|
5689
|
-
className:
|
|
5689
|
+
className: _e.compactBtn,
|
|
5690
5690
|
title: v ? "오버레이 확대" : "오버레이 축소",
|
|
5691
5691
|
children: v ? /* @__PURE__ */ x(Ec, { size: 24 }) : /* @__PURE__ */ x(Mc, { size: 24 })
|
|
5692
5692
|
}
|
|
5693
5693
|
) }),
|
|
5694
|
-
/* @__PURE__ */ ee("div", { className:
|
|
5694
|
+
/* @__PURE__ */ ee("div", { className: _e.groupPlayback, children: [
|
|
5695
5695
|
/* @__PURE__ */ x(To, { direction: "left" }),
|
|
5696
5696
|
/* @__PURE__ */ x(
|
|
5697
5697
|
_c,
|
|
@@ -5704,22 +5704,22 @@ function Oc() {
|
|
|
5704
5704
|
),
|
|
5705
5705
|
/* @__PURE__ */ x(To, { direction: "right" })
|
|
5706
5706
|
] }),
|
|
5707
|
-
/* @__PURE__ */ x("div", { className:
|
|
5707
|
+
/* @__PURE__ */ x("div", { className: _e.groupSpeed, children: /* @__PURE__ */ x(xc, {}) })
|
|
5708
5708
|
] }),
|
|
5709
|
-
/* @__PURE__ */ ee("div", { className:
|
|
5710
|
-
/* @__PURE__ */ ee("div", { className:
|
|
5709
|
+
/* @__PURE__ */ ee("div", { className: _e.row2, children: [
|
|
5710
|
+
/* @__PURE__ */ ee("div", { className: _e.groupFeatures, children: [
|
|
5711
5711
|
r && /* @__PURE__ */ ee(
|
|
5712
5712
|
"button",
|
|
5713
5713
|
{
|
|
5714
5714
|
type: "button",
|
|
5715
5715
|
onClick: (T) => {
|
|
5716
|
-
T.stopPropagation(),
|
|
5716
|
+
T.stopPropagation(), m();
|
|
5717
5717
|
},
|
|
5718
|
-
className: `${
|
|
5718
|
+
className: `${_e.btn} ${a ? "" : _e.btnActive}`,
|
|
5719
5719
|
title: "오디오북 음소거 전환",
|
|
5720
5720
|
children: [
|
|
5721
5721
|
a ? /* @__PURE__ */ x(za, { size: 18 }) : /* @__PURE__ */ x(Pa, { size: 18 }),
|
|
5722
|
-
/* @__PURE__ */ x("span", { className:
|
|
5722
|
+
/* @__PURE__ */ x("span", { className: _e.label, children: "오디오북" })
|
|
5723
5723
|
]
|
|
5724
5724
|
}
|
|
5725
5725
|
),
|
|
@@ -5728,13 +5728,13 @@ function Oc() {
|
|
|
5728
5728
|
{
|
|
5729
5729
|
type: "button",
|
|
5730
5730
|
onClick: (T) => {
|
|
5731
|
-
T.stopPropagation(),
|
|
5731
|
+
T.stopPropagation(), p();
|
|
5732
5732
|
},
|
|
5733
|
-
className: `${
|
|
5733
|
+
className: `${_e.btn} ${l ? _e.btnActive : ""}`,
|
|
5734
5734
|
title: "포인터 표시",
|
|
5735
5735
|
children: [
|
|
5736
5736
|
/* @__PURE__ */ x(Aa, { size: 18 }),
|
|
5737
|
-
/* @__PURE__ */ x("span", { className:
|
|
5737
|
+
/* @__PURE__ */ x("span", { className: _e.label, children: "포인터" })
|
|
5738
5738
|
]
|
|
5739
5739
|
}
|
|
5740
5740
|
),
|
|
@@ -5743,14 +5743,14 @@ function Oc() {
|
|
|
5743
5743
|
{
|
|
5744
5744
|
type: "button",
|
|
5745
5745
|
onClick: (T) => {
|
|
5746
|
-
T.stopPropagation(),
|
|
5746
|
+
T.stopPropagation(), f();
|
|
5747
5747
|
},
|
|
5748
5748
|
disabled: !n,
|
|
5749
|
-
className: `${
|
|
5749
|
+
className: `${_e.btn} ${d ? _e.btnActive : ""} ${n ? "" : _e.btnForbidden}`,
|
|
5750
5750
|
title: "끊어읽기 표시",
|
|
5751
5751
|
children: [
|
|
5752
5752
|
/* @__PURE__ */ x(Ba, { size: 18 }),
|
|
5753
|
-
/* @__PURE__ */ x("span", { className:
|
|
5753
|
+
/* @__PURE__ */ x("span", { className: _e.label, children: "끊어읽기" })
|
|
5754
5754
|
]
|
|
5755
5755
|
}
|
|
5756
5756
|
),
|
|
@@ -5762,16 +5762,16 @@ function Oc() {
|
|
|
5762
5762
|
T.stopPropagation(), u == null || u();
|
|
5763
5763
|
},
|
|
5764
5764
|
disabled: !o || !i,
|
|
5765
|
-
className: `${
|
|
5765
|
+
className: `${_e.btn} ${o && s ? _e.btnActive : ""} ${o ? "" : _e.btnForbidden}`,
|
|
5766
5766
|
title: "시선 표시",
|
|
5767
5767
|
children: [
|
|
5768
5768
|
/* @__PURE__ */ x(La, { size: 18 }),
|
|
5769
|
-
/* @__PURE__ */ x("span", { className:
|
|
5769
|
+
/* @__PURE__ */ x("span", { className: _e.label, children: "시선" })
|
|
5770
5770
|
]
|
|
5771
5771
|
}
|
|
5772
5772
|
)
|
|
5773
5773
|
] }),
|
|
5774
|
-
/* @__PURE__ */ ee("div", { className:
|
|
5774
|
+
/* @__PURE__ */ ee("div", { className: _e.groupNav, children: [
|
|
5775
5775
|
/* @__PURE__ */ x(Ra, {}),
|
|
5776
5776
|
/* @__PURE__ */ x(Tn, {})
|
|
5777
5777
|
] })
|
|
@@ -5796,21 +5796,21 @@ const Ac = "_host_gafql_3", Bc = "_topbar_gafql_11", Gc = "_visible_gafql_32", L
|
|
|
5796
5796
|
settingsBtn: Wc
|
|
5797
5797
|
};
|
|
5798
5798
|
function Dc() {
|
|
5799
|
-
const e = X((
|
|
5799
|
+
const e = X((f) => f.showOverlays), t = X((f) => f.overlayCompactMode), n = j((f) => f.onViewerClose), o = j((f) => f.section).ast.title, i = j((f) => f.canTracking), s = j((f) => f.handleAskCalibration), u = Re((f) => f.status === "playing"), a = i && !u, l = X((f) => f.setSettingsOpen), d = X((f) => f.setShowOverlays), m = ne(() => {
|
|
5800
5800
|
n == null || n();
|
|
5801
|
-
}, [n]),
|
|
5802
|
-
|
|
5803
|
-
}, [
|
|
5801
|
+
}, [n]), p = ne(() => {
|
|
5802
|
+
l(!0), d(!1);
|
|
5803
|
+
}, [l, d]);
|
|
5804
5804
|
return /* @__PURE__ */ x("div", { className: vt.host, children: /* @__PURE__ */ ee("div", { className: `${vt.topbar} ${e && !t ? vt.visible : ""}`, children: [
|
|
5805
|
-
/* @__PURE__ */ x("button", { type: "button", className: vt.backBtn, onClick:
|
|
5805
|
+
/* @__PURE__ */ x("button", { type: "button", className: vt.backBtn, onClick: m, "aria-label": "뒤로가기", children: /* @__PURE__ */ x(Ga, { size: 28 }) }),
|
|
5806
5806
|
/* @__PURE__ */ x("div", { className: vt.title, children: /* @__PURE__ */ x("span", { className: "truncate", children: o || "섹션 없음" }) }),
|
|
5807
5807
|
/* @__PURE__ */ x(
|
|
5808
5808
|
"button",
|
|
5809
5809
|
{
|
|
5810
5810
|
type: "button",
|
|
5811
|
-
className: `${vt.calibrationBtn} ${
|
|
5811
|
+
className: `${vt.calibrationBtn} ${a ? "" : vt.disabled}`,
|
|
5812
5812
|
onClick: s,
|
|
5813
|
-
disabled: !
|
|
5813
|
+
disabled: !a,
|
|
5814
5814
|
"aria-label": "시선보정",
|
|
5815
5815
|
title: "시선보정",
|
|
5816
5816
|
children: /* @__PURE__ */ x(Ha, { size: 24 })
|
|
@@ -5821,7 +5821,7 @@ function Dc() {
|
|
|
5821
5821
|
{
|
|
5822
5822
|
type: "button",
|
|
5823
5823
|
className: vt.settingsBtn,
|
|
5824
|
-
onClick:
|
|
5824
|
+
onClick: p,
|
|
5825
5825
|
"aria-label": "뷰어 설정",
|
|
5826
5826
|
children: /* @__PURE__ */ x(Pc, { size: 28 })
|
|
5827
5827
|
}
|
|
@@ -5847,7 +5847,7 @@ const $c = D.memo(Dc), Vc = "_wrap_62su0_7", qc = "_wrapHidden_62su0_29", jc = "
|
|
|
5847
5847
|
inlineFlex: iu
|
|
5848
5848
|
};
|
|
5849
5849
|
function su({ visible: e }) {
|
|
5850
|
-
const t = X((b) => b.mode), n = X((b) => b.setMode), r = X((b) => b.theme), o = X((b) => b.setTheme), i = X((b) => b.fontFamily), s = X((b) => b.setFontFamily), u = X((b) => b.resetToDefaults), a = X((b) => b.getFontLevel()), l = X((b) => b.getLineLevel()), d = X((b) => b.getMarginLevel()),
|
|
5850
|
+
const t = X((b) => b.mode), n = X((b) => b.setMode), r = X((b) => b.theme), o = X((b) => b.setTheme), i = X((b) => b.fontFamily), s = X((b) => b.setFontFamily), u = X((b) => b.resetToDefaults), a = X((b) => b.getFontLevel()), l = X((b) => b.getLineLevel()), d = X((b) => b.getMarginLevel()), m = X((b) => b.setFontLevel), p = X((b) => b.setLineLevel), f = X((b) => b.setMarginLevel), v = X((b) => b.pointerStyle), y = X((b) => b.setPointerStyle), c = X((b) => b.pointerColor), g = X((b) => b.setPointerColor), h = X((b) => b.breakMarks), w = X((b) => b.toggleBreakMark), C = X((b) => b.getBreakGapLevel()), R = X((b) => b.setBreakGapLevel), O = `${Ae.wrap} ${e ? Ae.wrapVisible : Ae.wrapHidden}`;
|
|
5851
5851
|
return /* @__PURE__ */ ee("div", { className: O, role: "dialog", "aria-modal": "true", "aria-label": "뷰어 설정", children: [
|
|
5852
5852
|
/* @__PURE__ */ ee("div", { className: Ae.scrollArea, children: [
|
|
5853
5853
|
/* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */ ee("div", { className: Ae.inlineFlex, children: [
|
|
@@ -5887,8 +5887,8 @@ function su({ visible: e }) {
|
|
|
5887
5887
|
level: a,
|
|
5888
5888
|
min: 1,
|
|
5889
5889
|
max: 12,
|
|
5890
|
-
onDec: () =>
|
|
5891
|
-
onInc: () =>
|
|
5890
|
+
onDec: () => m(Math.max(1, a - 1)),
|
|
5891
|
+
onInc: () => m(Math.min(12, a + 1))
|
|
5892
5892
|
}
|
|
5893
5893
|
),
|
|
5894
5894
|
/* @__PURE__ */ x(
|
|
@@ -5898,8 +5898,8 @@ function su({ visible: e }) {
|
|
|
5898
5898
|
level: l,
|
|
5899
5899
|
min: 1,
|
|
5900
5900
|
max: 7,
|
|
5901
|
-
onDec: () =>
|
|
5902
|
-
onInc: () =>
|
|
5901
|
+
onDec: () => p(Math.max(1, l - 1)),
|
|
5902
|
+
onInc: () => p(Math.min(7, l + 1))
|
|
5903
5903
|
}
|
|
5904
5904
|
),
|
|
5905
5905
|
/* @__PURE__ */ x(
|
|
@@ -5909,8 +5909,8 @@ function su({ visible: e }) {
|
|
|
5909
5909
|
level: d,
|
|
5910
5910
|
min: 1,
|
|
5911
5911
|
max: 5,
|
|
5912
|
-
onDec: () =>
|
|
5913
|
-
onInc: () =>
|
|
5912
|
+
onDec: () => f(Math.max(1, d - 1)),
|
|
5913
|
+
onInc: () => f(Math.min(5, d + 1))
|
|
5914
5914
|
}
|
|
5915
5915
|
),
|
|
5916
5916
|
/* @__PURE__ */ x(jt, { label: "포인터", children: /* @__PURE__ */ ee("div", { className: Ae.inlineFlex, children: [
|
|
@@ -5921,7 +5921,7 @@ function su({ visible: e }) {
|
|
|
5921
5921
|
{
|
|
5922
5922
|
type: "color",
|
|
5923
5923
|
value: c,
|
|
5924
|
-
onChange: (b) =>
|
|
5924
|
+
onChange: (b) => g(b.target.value),
|
|
5925
5925
|
"aria-label": "포인터 색상",
|
|
5926
5926
|
style: {
|
|
5927
5927
|
width: 36,
|
|
@@ -5933,7 +5933,7 @@ function su({ visible: e }) {
|
|
|
5933
5933
|
}
|
|
5934
5934
|
)
|
|
5935
5935
|
] }) }),
|
|
5936
|
-
/* @__PURE__ */ x(jt, { label: "끊기표시", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: /* @__PURE__ */ x(Gt, { active:
|
|
5936
|
+
/* @__PURE__ */ x(jt, { label: "끊기표시", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: /* @__PURE__ */ x(Gt, { active: h.slash, onClick: () => w("slash"), children: "슬래쉬" }) }) }),
|
|
5937
5937
|
/* @__PURE__ */ x(
|
|
5938
5938
|
pn,
|
|
5939
5939
|
{
|
|
@@ -6036,14 +6036,14 @@ const lu = D.memo(function() {
|
|
|
6036
6036
|
let l = s;
|
|
6037
6037
|
if (u) {
|
|
6038
6038
|
const d = (a == null ? void 0 : a.equalityFn) || Object.is;
|
|
6039
|
-
let
|
|
6040
|
-
l = (
|
|
6041
|
-
const
|
|
6042
|
-
if (!d(
|
|
6043
|
-
const v =
|
|
6044
|
-
u(
|
|
6039
|
+
let m = s(r.getState());
|
|
6040
|
+
l = (p) => {
|
|
6041
|
+
const f = s(p);
|
|
6042
|
+
if (!d(m, f)) {
|
|
6043
|
+
const v = m;
|
|
6044
|
+
u(m = f, v);
|
|
6045
6045
|
}
|
|
6046
|
-
}, a != null && a.fireImmediately && u(
|
|
6046
|
+
}, a != null && a.fireImmediately && u(m, m);
|
|
6047
6047
|
}
|
|
6048
6048
|
return o(l);
|
|
6049
6049
|
}), e(t, n, r);
|
|
@@ -6069,31 +6069,31 @@ function fu(e) {
|
|
|
6069
6069
|
function pu(e) {
|
|
6070
6070
|
const t = e == null ? void 0 : e.recorderStore;
|
|
6071
6071
|
let n = e == null ? void 0 : e.map, r = e == null ? void 0 : e.initialIndex;
|
|
6072
|
-
const o = (
|
|
6072
|
+
const o = (f) => {
|
|
6073
6073
|
if (!n) return null;
|
|
6074
6074
|
const { g2ct: v } = n;
|
|
6075
6075
|
if (!v) return null;
|
|
6076
|
-
const y = v[
|
|
6076
|
+
const y = v[f];
|
|
6077
6077
|
if (y) return { clip: y.clip, t: y.t };
|
|
6078
|
-
for (let c = 1; c <= 100 &&
|
|
6079
|
-
const
|
|
6080
|
-
if (
|
|
6078
|
+
for (let c = 1; c <= 100 && f - c >= 0; c++) {
|
|
6079
|
+
const g = v[f - c];
|
|
6080
|
+
if (g) return { clip: g.clip, t: g.t };
|
|
6081
6081
|
}
|
|
6082
6082
|
for (let c = 1; c <= 100; c++) {
|
|
6083
|
-
const
|
|
6084
|
-
if (
|
|
6083
|
+
const g = v[f + c];
|
|
6084
|
+
if (g) return { clip: g.clip, t: g.t };
|
|
6085
6085
|
}
|
|
6086
6086
|
return null;
|
|
6087
6087
|
}, i = (e == null ? void 0 : e.clips) ?? [];
|
|
6088
6088
|
let s = 0, u = 0;
|
|
6089
6089
|
const a = Math.max(1, fu(e.section) || 150);
|
|
6090
6090
|
if (typeof (e == null ? void 0 : e.initialIndex) == "number" && n) {
|
|
6091
|
-
const
|
|
6092
|
-
|
|
6091
|
+
const f = o(e.initialIndex);
|
|
6092
|
+
f && (s = f.clip, u = f.t, r = void 0);
|
|
6093
6093
|
}
|
|
6094
|
-
const l = i.length > 0, d = l ? "paused" : "idle",
|
|
6094
|
+
const l = i.length > 0, d = l ? "paused" : "idle", m = l ? "real" : "fake", p = l ? null : { totalWords: a };
|
|
6095
6095
|
return rn(
|
|
6096
|
-
cu((
|
|
6096
|
+
cu((f, v) => ({
|
|
6097
6097
|
// 원본/포인터
|
|
6098
6098
|
clips: i,
|
|
6099
6099
|
currentClip: Math.max(0, Math.min(s, Math.max(0, i.length - 1))),
|
|
@@ -6102,10 +6102,10 @@ function pu(e) {
|
|
|
6102
6102
|
status: d,
|
|
6103
6103
|
scrollLock: !1,
|
|
6104
6104
|
// 엔진/설정
|
|
6105
|
-
playbackKind:
|
|
6106
|
-
fake:
|
|
6105
|
+
playbackKind: m,
|
|
6106
|
+
fake: p,
|
|
6107
6107
|
// 엔진 모드 전환
|
|
6108
|
-
useFake: () =>
|
|
6108
|
+
useFake: () => f((y) => ({
|
|
6109
6109
|
playbackKind: "fake",
|
|
6110
6110
|
// 이전에 fake.totalWords가 있으면 유지, 없으면 선계산값 사용
|
|
6111
6111
|
// fake: s.fake ?? { totalWords: precomputedWords },
|
|
@@ -6113,7 +6113,7 @@ function pu(e) {
|
|
|
6113
6113
|
// 잠금은 재생 상태에 맞춤(재생 중이면 유지, 아니면 해제)
|
|
6114
6114
|
scrollLock: y.status === "playing"
|
|
6115
6115
|
})),
|
|
6116
|
-
useReal: () =>
|
|
6116
|
+
useReal: () => f((y) => ({
|
|
6117
6117
|
playbackKind: "real",
|
|
6118
6118
|
fake: { totalWords: a },
|
|
6119
6119
|
scrollLock: y.status === "playing"
|
|
@@ -6122,37 +6122,37 @@ function pu(e) {
|
|
|
6122
6122
|
injectMap: (y) => {
|
|
6123
6123
|
if (n = y, typeof r == "number") {
|
|
6124
6124
|
const c = o(r);
|
|
6125
|
-
c &&
|
|
6126
|
-
currentClip: Math.max(0, Math.min(c.clip, Math.max(0,
|
|
6125
|
+
c && f((g) => ({
|
|
6126
|
+
currentClip: Math.max(0, Math.min(c.clip, Math.max(0, g.clips.length - 1))),
|
|
6127
6127
|
currentTimeMs: Math.max(0, c.t)
|
|
6128
6128
|
})), r = void 0;
|
|
6129
6129
|
}
|
|
6130
6130
|
},
|
|
6131
|
-
setClipAndMs: (y, c) =>
|
|
6132
|
-
const
|
|
6131
|
+
setClipAndMs: (y, c) => f((g) => {
|
|
6132
|
+
const h = Math.max(0, g.clips.length - 1);
|
|
6133
6133
|
return {
|
|
6134
|
-
currentClip: Math.max(0, Math.min(y,
|
|
6134
|
+
currentClip: Math.max(0, Math.min(y, h)),
|
|
6135
6135
|
currentTimeMs: Math.max(0, c),
|
|
6136
|
-
status:
|
|
6136
|
+
status: g.status,
|
|
6137
6137
|
// 상태는 건드리지 않음
|
|
6138
|
-
scrollLock:
|
|
6138
|
+
scrollLock: g.scrollLock
|
|
6139
6139
|
// 그대로 유지
|
|
6140
6140
|
};
|
|
6141
6141
|
}),
|
|
6142
6142
|
// 섹션 교체
|
|
6143
|
-
setClips: (y) =>
|
|
6144
|
-
const
|
|
6143
|
+
setClips: (y) => f((c) => {
|
|
6144
|
+
const g = Array.isArray(y) ? y : [], h = g.length > 0;
|
|
6145
6145
|
return {
|
|
6146
|
-
clips:
|
|
6146
|
+
clips: g,
|
|
6147
6147
|
currentClip: 0,
|
|
6148
6148
|
currentTimeMs: 0,
|
|
6149
|
-
status:
|
|
6150
|
-
playbackKind:
|
|
6151
|
-
fake:
|
|
6149
|
+
status: h ? "paused" : "idle",
|
|
6150
|
+
playbackKind: h ? "real" : "fake",
|
|
6151
|
+
fake: h ? null : c.fake ?? { totalWords: a },
|
|
6152
6152
|
scrollLock: !1
|
|
6153
6153
|
};
|
|
6154
6154
|
}),
|
|
6155
|
-
clear: () =>
|
|
6155
|
+
clear: () => f((y) => ({
|
|
6156
6156
|
clips: [],
|
|
6157
6157
|
currentClip: 0,
|
|
6158
6158
|
currentTimeMs: 0,
|
|
@@ -6166,16 +6166,16 @@ function pu(e) {
|
|
|
6166
6166
|
t == null || t.getState().emit({
|
|
6167
6167
|
type: "audio_control",
|
|
6168
6168
|
payload: { action: "play" }
|
|
6169
|
-
}),
|
|
6170
|
-
if (
|
|
6169
|
+
}), f((g) => {
|
|
6170
|
+
if (g.playbackKind === "fake")
|
|
6171
6171
|
return {
|
|
6172
6172
|
status: "playing",
|
|
6173
6173
|
scrollLock: !0
|
|
6174
6174
|
};
|
|
6175
|
-
const
|
|
6175
|
+
const h = typeof y == "number" ? y : g.currentClip, w = typeof c == "number" ? c : g.currentTimeMs;
|
|
6176
6176
|
return {
|
|
6177
6177
|
status: "loading",
|
|
6178
|
-
currentClip: Math.max(0, Math.min(
|
|
6178
|
+
currentClip: Math.max(0, Math.min(h, Math.max(0, g.clips.length - 1))),
|
|
6179
6179
|
currentTimeMs: w,
|
|
6180
6180
|
scrollLock: !0
|
|
6181
6181
|
};
|
|
@@ -6185,14 +6185,14 @@ function pu(e) {
|
|
|
6185
6185
|
t == null || t.getState().emit({
|
|
6186
6186
|
type: "audio_control",
|
|
6187
6187
|
payload: { action: "pause" }
|
|
6188
|
-
}),
|
|
6188
|
+
}), f({ status: "paused", scrollLock: !1 });
|
|
6189
6189
|
},
|
|
6190
|
-
seek: (y) =>
|
|
6190
|
+
seek: (y) => f((c) => ({
|
|
6191
6191
|
currentTimeMs: Math.max(0, y),
|
|
6192
6192
|
status: c.status
|
|
6193
6193
|
})),
|
|
6194
|
-
stop: () =>
|
|
6195
|
-
nextClip: () =>
|
|
6194
|
+
stop: () => f({ status: "idle", currentTimeMs: 0, scrollLock: !1 }),
|
|
6195
|
+
nextClip: () => f((y) => {
|
|
6196
6196
|
if (y.playbackKind === "fake") return y;
|
|
6197
6197
|
const c = Math.max(0, y.clips.length - 1);
|
|
6198
6198
|
return {
|
|
@@ -6202,56 +6202,56 @@ function pu(e) {
|
|
|
6202
6202
|
scrollLock: !0
|
|
6203
6203
|
};
|
|
6204
6204
|
}),
|
|
6205
|
-
prevClip: () =>
|
|
6205
|
+
prevClip: () => f((y) => y.playbackKind === "fake" ? y : {
|
|
6206
6206
|
currentClip: Math.max(0, y.currentClip - 1),
|
|
6207
6207
|
currentTimeMs: 0,
|
|
6208
6208
|
status: "loading",
|
|
6209
6209
|
scrollLock: !0
|
|
6210
6210
|
}),
|
|
6211
|
-
setClipIndex: (y) =>
|
|
6211
|
+
setClipIndex: (y) => f((c) => c.playbackKind === "fake" || y < 0 || y >= c.clips.length ? c : { currentClip: y, currentTimeMs: 0 }),
|
|
6212
6212
|
// 조회
|
|
6213
6213
|
getClipSrc: (y) => {
|
|
6214
6214
|
const c = v();
|
|
6215
6215
|
if (!c.clips.length) return null;
|
|
6216
|
-
const
|
|
6217
|
-
return uu(c.clips[
|
|
6216
|
+
const g = typeof y == "number" ? y : c.currentClip;
|
|
6217
|
+
return uu(c.clips[g]);
|
|
6218
6218
|
},
|
|
6219
6219
|
// (clip,time) -> GI
|
|
6220
6220
|
getGIFromCT: (y, c) => {
|
|
6221
6221
|
if (!n) return -1;
|
|
6222
|
-
const
|
|
6223
|
-
if (!
|
|
6224
|
-
let
|
|
6225
|
-
for (;
|
|
6226
|
-
const R =
|
|
6227
|
-
|
|
6222
|
+
const g = n.byClip[y];
|
|
6223
|
+
if (!g || g.length === 0) return -1;
|
|
6224
|
+
let h = 0, w = g.length - 1, C = 0;
|
|
6225
|
+
for (; h <= w; ) {
|
|
6226
|
+
const R = h + w >> 1;
|
|
6227
|
+
g[R].t <= c ? (C = R, h = R + 1) : w = R - 1;
|
|
6228
6228
|
}
|
|
6229
|
-
return
|
|
6229
|
+
return g[Math.max(0, Math.min(C, g.length - 1))].g;
|
|
6230
6230
|
},
|
|
6231
6231
|
// GI -> (clip,time)
|
|
6232
6232
|
getCTFromGI: (y) => {
|
|
6233
6233
|
if (!n) return null;
|
|
6234
6234
|
const { g2ct: c } = n;
|
|
6235
6235
|
if (!c) return null;
|
|
6236
|
-
let
|
|
6237
|
-
if (!
|
|
6238
|
-
let
|
|
6236
|
+
let g = c[y];
|
|
6237
|
+
if (!g) {
|
|
6238
|
+
let h = y - 1;
|
|
6239
6239
|
const w = Math.max(0, y - 100);
|
|
6240
|
-
for (;
|
|
6241
|
-
if (c[
|
|
6242
|
-
|
|
6240
|
+
for (; h >= w; ) {
|
|
6241
|
+
if (c[h]) {
|
|
6242
|
+
g = c[h];
|
|
6243
6243
|
break;
|
|
6244
6244
|
}
|
|
6245
|
-
|
|
6245
|
+
h--;
|
|
6246
6246
|
}
|
|
6247
|
-
if (!
|
|
6247
|
+
if (!g) {
|
|
6248
6248
|
let C = y + 1;
|
|
6249
6249
|
const R = y + 100;
|
|
6250
6250
|
for (; c[C] == null && C <= R; ) C++;
|
|
6251
|
-
c[C] && (
|
|
6251
|
+
c[C] && (g = c[C]);
|
|
6252
6252
|
}
|
|
6253
6253
|
}
|
|
6254
|
-
return
|
|
6254
|
+
return g ? { clip: g.clip, timeMs: g.t } : null;
|
|
6255
6255
|
},
|
|
6256
6256
|
// 편의
|
|
6257
6257
|
getMetaByGI: (y) => {
|
|
@@ -6263,8 +6263,8 @@ function pu(e) {
|
|
|
6263
6263
|
c && v().setClipAndMs(c.clipIndex, c.timeMs);
|
|
6264
6264
|
},
|
|
6265
6265
|
// <audio> 이벤트 (real 전용)
|
|
6266
|
-
_onTime: (y) =>
|
|
6267
|
-
_onEnded: () =>
|
|
6266
|
+
_onTime: (y) => f({ currentTimeMs: y, status: "playing", scrollLock: !0 }),
|
|
6267
|
+
_onEnded: () => f((y) => {
|
|
6268
6268
|
if (y.playbackKind === "fake")
|
|
6269
6269
|
return { status: "ended", scrollLock: !1 };
|
|
6270
6270
|
const c = Math.max(0, y.clips.length - 1);
|
|
@@ -6275,9 +6275,9 @@ function pu(e) {
|
|
|
6275
6275
|
scrollLock: !0
|
|
6276
6276
|
};
|
|
6277
6277
|
}),
|
|
6278
|
-
_onError: () =>
|
|
6278
|
+
_onError: () => f({ status: "error", scrollLock: !1 }),
|
|
6279
6279
|
// 재생 모드용: 상태만 변경 (실제 재생 안함, emit도 안함)
|
|
6280
|
-
_setStatusOnly: (y) =>
|
|
6280
|
+
_setStatusOnly: (y) => f({ status: y })
|
|
6281
6281
|
}))
|
|
6282
6282
|
);
|
|
6283
6283
|
}
|
|
@@ -6296,8 +6296,8 @@ function hu(e) {
|
|
|
6296
6296
|
if ((u == null ? void 0 : u.type) === "image") continue;
|
|
6297
6297
|
const a = (u == null ? void 0 : u.runs) ?? [];
|
|
6298
6298
|
for (let l = 0; l < a.length; l++) {
|
|
6299
|
-
const d = a[l],
|
|
6300
|
-
d.audioChunkIndex != null && d.audioTimeMs != null && ((t[s = d.audioChunkIndex] || (t[s] = [])).push({ t: d.audioTimeMs, g:
|
|
6299
|
+
const d = a[l], m = o + l;
|
|
6300
|
+
d.audioChunkIndex != null && d.audioTimeMs != null && ((t[s = d.audioChunkIndex] || (t[s] = [])).push({ t: d.audioTimeMs, g: m }), n[m] = { clip: d.audioChunkIndex, t: d.audioTimeMs });
|
|
6301
6301
|
}
|
|
6302
6302
|
o += a.length;
|
|
6303
6303
|
}
|
|
@@ -6316,41 +6316,41 @@ function mu(e, t, n) {
|
|
|
6316
6316
|
return -1;
|
|
6317
6317
|
}
|
|
6318
6318
|
function bu(e) {
|
|
6319
|
-
const t = la(e), n = aa(t), r = t.reduce((d,
|
|
6320
|
-
return e.forEach((d,
|
|
6319
|
+
const t = la(e), n = aa(t), r = t.reduce((d, m) => d + (m || 0), 0), o = new Int32Array(Math.max(1, r)).fill(-1), i = new Uint8Array(Math.max(1, r)).fill(0), s = [], u = [];
|
|
6320
|
+
return e.forEach((d, m) => {
|
|
6321
6321
|
var c;
|
|
6322
6322
|
if (d.type !== "paragraph") return;
|
|
6323
|
-
const
|
|
6324
|
-
for (let
|
|
6325
|
-
const
|
|
6326
|
-
Sr(
|
|
6323
|
+
const p = n[m] ?? 0, f = d.runs ?? [];
|
|
6324
|
+
for (let g = 0; g < f.length; g++) {
|
|
6325
|
+
const h = ((c = f[g]) == null ? void 0 : c.text) || "";
|
|
6326
|
+
Sr(h) && (i[p + g] = 1);
|
|
6327
6327
|
}
|
|
6328
|
-
const y = ca(
|
|
6328
|
+
const y = ca(f, p).map((g) => {
|
|
6329
6329
|
var R;
|
|
6330
|
-
const
|
|
6330
|
+
const h = g.startG - p, w = g.endG - g.startG + 1;
|
|
6331
6331
|
let C = -1;
|
|
6332
6332
|
for (let O = 0; O < w; O++) {
|
|
6333
|
-
const b = ((R =
|
|
6333
|
+
const b = ((R = f[h + O]) == null ? void 0 : R.text) ?? "";
|
|
6334
6334
|
if (Sr(b)) {
|
|
6335
|
-
C =
|
|
6335
|
+
C = g.startG + O;
|
|
6336
6336
|
break;
|
|
6337
6337
|
}
|
|
6338
6338
|
}
|
|
6339
6339
|
return {
|
|
6340
|
-
startG:
|
|
6341
|
-
endG:
|
|
6342
|
-
r0:
|
|
6340
|
+
startG: g.startG,
|
|
6341
|
+
endG: g.endG,
|
|
6342
|
+
r0: h,
|
|
6343
6343
|
len: w,
|
|
6344
6344
|
firstReadableGI: C,
|
|
6345
|
-
splitIndex:
|
|
6345
|
+
splitIndex: g.splitIndex
|
|
6346
6346
|
};
|
|
6347
6347
|
});
|
|
6348
|
-
u[
|
|
6349
|
-
for (const
|
|
6350
|
-
const
|
|
6351
|
-
for (let w =
|
|
6352
|
-
o[w] =
|
|
6353
|
-
s.push(
|
|
6348
|
+
u[m] = y;
|
|
6349
|
+
for (const g of y) {
|
|
6350
|
+
const h = s.length;
|
|
6351
|
+
for (let w = g.startG; w <= g.endG; w++)
|
|
6352
|
+
o[w] = h;
|
|
6353
|
+
s.push(g);
|
|
6354
6354
|
}
|
|
6355
6355
|
}), { nav: {
|
|
6356
6356
|
groups: s,
|
|
@@ -6371,11 +6371,11 @@ function vu(e) {
|
|
|
6371
6371
|
showGaze: a,
|
|
6372
6372
|
onToggleShowGaze: l,
|
|
6373
6373
|
handleAskCalibration: d,
|
|
6374
|
-
nav:
|
|
6375
|
-
layout:
|
|
6376
|
-
initialIndex:
|
|
6374
|
+
nav: m,
|
|
6375
|
+
layout: p,
|
|
6376
|
+
initialIndex: f,
|
|
6377
6377
|
mountTime: v
|
|
6378
|
-
} = e, y =
|
|
6378
|
+
} = e, y = p.totalRuns ?? 0, c = typeof f == "number" ? f : y > 0 ? 0 : -1, g = c >= 0 ? mu(m.readableGi, c, y) : -1;
|
|
6379
6379
|
return {
|
|
6380
6380
|
section: t,
|
|
6381
6381
|
sectionId: t.section_id,
|
|
@@ -6388,7 +6388,7 @@ function vu(e) {
|
|
|
6388
6388
|
showGaze: a ?? !1,
|
|
6389
6389
|
onToggleShowGaze: l,
|
|
6390
6390
|
handleAskCalibration: d,
|
|
6391
|
-
currentGlobalRunIndex:
|
|
6391
|
+
currentGlobalRunIndex: g,
|
|
6392
6392
|
lastUpdateBy: "program",
|
|
6393
6393
|
totalRuns: y,
|
|
6394
6394
|
pageIndex: 0,
|
|
@@ -6396,8 +6396,8 @@ function vu(e) {
|
|
|
6396
6396
|
sectionLoading: !0,
|
|
6397
6397
|
_loadingStartTime: v,
|
|
6398
6398
|
_scrollApi: void 0,
|
|
6399
|
-
derivedNav:
|
|
6400
|
-
layout:
|
|
6399
|
+
derivedNav: m,
|
|
6400
|
+
layout: p,
|
|
6401
6401
|
rangeStartGI: null,
|
|
6402
6402
|
rangeEndGI: null,
|
|
6403
6403
|
translateOpen: !1,
|
|
@@ -6420,9 +6420,9 @@ function Su(e) {
|
|
|
6420
6420
|
canToggleShowGaze: a,
|
|
6421
6421
|
showGaze: l,
|
|
6422
6422
|
onToggleShowGaze: d,
|
|
6423
|
-
handleAskCalibration:
|
|
6424
|
-
eventBridgeStore:
|
|
6425
|
-
} = e,
|
|
6423
|
+
handleAskCalibration: m,
|
|
6424
|
+
eventBridgeStore: p
|
|
6425
|
+
} = e, f = t.ast.blocks, { nav: v, layout: y } = bu(f), c = Date.now(), g = vu({
|
|
6426
6426
|
section: t,
|
|
6427
6427
|
onViewerClose: r,
|
|
6428
6428
|
onSectionNav: o,
|
|
@@ -6432,19 +6432,19 @@ function Su(e) {
|
|
|
6432
6432
|
canToggleShowGaze: a,
|
|
6433
6433
|
showGaze: l,
|
|
6434
6434
|
onToggleShowGaze: d,
|
|
6435
|
-
handleAskCalibration:
|
|
6435
|
+
handleAskCalibration: m,
|
|
6436
6436
|
nav: v,
|
|
6437
6437
|
layout: y,
|
|
6438
6438
|
initialIndex: n,
|
|
6439
6439
|
mountTime: c
|
|
6440
6440
|
});
|
|
6441
|
-
return
|
|
6442
|
-
|
|
6443
|
-
}), rn((
|
|
6441
|
+
return p && queueMicrotask(() => {
|
|
6442
|
+
p.getState().emit({ type: "render_start", payload: { sectionId: t.section_id } }, c), p.getState().emit({ type: "loading_start", payload: {} }, c);
|
|
6443
|
+
}), rn((h, w) => {
|
|
6444
6444
|
const C = (K) => {
|
|
6445
|
-
|
|
6445
|
+
h(($) => $.progress._scrollApi === K ? $ : { progress: { ...$.progress, _scrollApi: K } });
|
|
6446
6446
|
}, R = () => w().progress._scrollApi, O = (K) => {
|
|
6447
|
-
|
|
6447
|
+
h(($) => {
|
|
6448
6448
|
const G = $.progress;
|
|
6449
6449
|
if (G.totalRuns === K) return $;
|
|
6450
6450
|
const E = G.currentGlobalRunIndex < 0 && K > 0;
|
|
@@ -6459,13 +6459,13 @@ function Su(e) {
|
|
|
6459
6459
|
});
|
|
6460
6460
|
}, b = (K, $ = "program") => {
|
|
6461
6461
|
const G = w().progress.currentGlobalRunIndex, E = w().progress, L = E.totalRuns > 0 ? Math.max(-1, Math.min(K, E.totalRuns - 1)) : K;
|
|
6462
|
-
G === L && E.lastUpdateBy === $ || (
|
|
6462
|
+
G === L && E.lastUpdateBy === $ || (h((q) => ({
|
|
6463
6463
|
progress: {
|
|
6464
6464
|
...q.progress,
|
|
6465
6465
|
currentGlobalRunIndex: L,
|
|
6466
6466
|
lastUpdateBy: $
|
|
6467
6467
|
}
|
|
6468
|
-
})), G !== L &&
|
|
6468
|
+
})), G !== L && p && p.getState().emit({
|
|
6469
6469
|
type: "global_index_change",
|
|
6470
6470
|
payload: { globalIndex: L }
|
|
6471
6471
|
}));
|
|
@@ -6474,59 +6474,59 @@ function Su(e) {
|
|
|
6474
6474
|
if ($ === K) return;
|
|
6475
6475
|
const E = Date.now();
|
|
6476
6476
|
if (K)
|
|
6477
|
-
|
|
6477
|
+
h((L) => ({
|
|
6478
6478
|
progress: {
|
|
6479
6479
|
...L.progress,
|
|
6480
6480
|
sectionLoading: !0,
|
|
6481
6481
|
_loadingStartTime: E
|
|
6482
6482
|
}
|
|
6483
|
-
})),
|
|
6483
|
+
})), p && p.getState().emit({ type: "loading_start", payload: {} });
|
|
6484
6484
|
else {
|
|
6485
6485
|
const q = (G ? E - G : 0) / 1e3;
|
|
6486
|
-
|
|
6486
|
+
h((B) => ({
|
|
6487
6487
|
progress: {
|
|
6488
6488
|
...B.progress,
|
|
6489
6489
|
sectionLoading: !1,
|
|
6490
6490
|
_loadingStartTime: null
|
|
6491
6491
|
}
|
|
6492
|
-
})),
|
|
6492
|
+
})), p && p.getState().emit({ type: "loading_end", payload: { duration: q } });
|
|
6493
6493
|
}
|
|
6494
6494
|
}, k = (K) => {
|
|
6495
|
-
|
|
6495
|
+
h(($) => ({
|
|
6496
6496
|
progress: { ...$.progress, pageIndex: K }
|
|
6497
6497
|
}));
|
|
6498
6498
|
}, T = (K) => {
|
|
6499
|
-
|
|
6499
|
+
h(($) => ({
|
|
6500
6500
|
progress: { ...$.progress, totalPages: K }
|
|
6501
6501
|
}));
|
|
6502
6502
|
}, M = (K, $) => {
|
|
6503
6503
|
const E = w().progress.rangeStartGI == null;
|
|
6504
|
-
if (
|
|
6504
|
+
if (h((L) => ({
|
|
6505
6505
|
progress: {
|
|
6506
6506
|
...L.progress,
|
|
6507
6507
|
rangeStartGI: Math.min(K, $),
|
|
6508
6508
|
rangeEndGI: Math.max(K, $)
|
|
6509
6509
|
}
|
|
6510
|
-
})),
|
|
6510
|
+
})), p) {
|
|
6511
6511
|
const L = _();
|
|
6512
|
-
|
|
6512
|
+
p.getState().emit({
|
|
6513
6513
|
type: E ? "range_select" : "range_change",
|
|
6514
6514
|
payload: { startGI: Math.min(K, $), endGI: Math.max(K, $), text: L }
|
|
6515
6515
|
});
|
|
6516
6516
|
}
|
|
6517
6517
|
}, P = () => {
|
|
6518
|
-
|
|
6518
|
+
h((K) => ({
|
|
6519
6519
|
progress: {
|
|
6520
6520
|
...K.progress,
|
|
6521
6521
|
rangeStartGI: null,
|
|
6522
6522
|
rangeEndGI: null
|
|
6523
6523
|
}
|
|
6524
|
-
})),
|
|
6524
|
+
})), p && p.getState().emit({ type: "range_clear", payload: {} });
|
|
6525
6525
|
}, I = (K) => {
|
|
6526
6526
|
const { rangeStartGI: $, rangeEndGI: G } = w().progress;
|
|
6527
|
-
$ == null || G == null || (K < $ ?
|
|
6527
|
+
$ == null || G == null || (K < $ ? h((E) => ({
|
|
6528
6528
|
progress: { ...E.progress, rangeStartGI: K }
|
|
6529
|
-
})) : K > G ?
|
|
6529
|
+
})) : K > G ? h((E) => ({
|
|
6530
6530
|
progress: { ...E.progress, rangeEndGI: K }
|
|
6531
6531
|
})) : P());
|
|
6532
6532
|
}, _ = () => {
|
|
@@ -6545,7 +6545,7 @@ function Su(e) {
|
|
|
6545
6545
|
}
|
|
6546
6546
|
return B.join("");
|
|
6547
6547
|
}, z = (K) => {
|
|
6548
|
-
|
|
6548
|
+
h(($) => ({
|
|
6549
6549
|
progress: {
|
|
6550
6550
|
...$.progress,
|
|
6551
6551
|
translateOpen: K.isOpen,
|
|
@@ -6557,7 +6557,7 @@ function Su(e) {
|
|
|
6557
6557
|
}
|
|
6558
6558
|
}));
|
|
6559
6559
|
}, N = () => {
|
|
6560
|
-
|
|
6560
|
+
h((K) => ({
|
|
6561
6561
|
progress: {
|
|
6562
6562
|
...K.progress,
|
|
6563
6563
|
translateOpen: !1,
|
|
@@ -6601,7 +6601,7 @@ function Su(e) {
|
|
|
6601
6601
|
};
|
|
6602
6602
|
return {
|
|
6603
6603
|
progress: {
|
|
6604
|
-
...
|
|
6604
|
+
...g,
|
|
6605
6605
|
registerSectionScrollApi: C,
|
|
6606
6606
|
getSectionScrollApi: R,
|
|
6607
6607
|
setTotalRuns: O,
|
|
@@ -6709,44 +6709,44 @@ const wu = ({
|
|
|
6709
6709
|
pageIndex: t,
|
|
6710
6710
|
maxWidth: n
|
|
6711
6711
|
}) => {
|
|
6712
|
-
const r = j((
|
|
6713
|
-
var
|
|
6714
|
-
return ((
|
|
6715
|
-
}, [r]), i = X((
|
|
6712
|
+
const r = j((h) => h.section), o = me(() => {
|
|
6713
|
+
var h;
|
|
6714
|
+
return ((h = r.ast) == null ? void 0 : h.blocks) ?? [];
|
|
6715
|
+
}, [r]), i = X((h) => h.marginX), s = X((h) => h.lineHeight), u = X((h) => h.fontSizePx), a = X((h) => h.fontFamily), l = X((h) => h.viewportHeight), d = j((h) => {
|
|
6716
6716
|
var w;
|
|
6717
|
-
return ((w =
|
|
6718
|
-
}),
|
|
6717
|
+
return ((w = h.layout) == null ? void 0 : w.prefix) ?? [];
|
|
6718
|
+
}), m = j((h) => {
|
|
6719
6719
|
var w;
|
|
6720
|
-
return ((w =
|
|
6721
|
-
}),
|
|
6722
|
-
const
|
|
6720
|
+
return ((w = h.derivedNav) == null ? void 0 : w.splitGroupsPerBlock) ?? [];
|
|
6721
|
+
}), p = e[t], f = me(() => {
|
|
6722
|
+
const h = [];
|
|
6723
6723
|
return o.forEach((w, C) => {
|
|
6724
|
-
(w.type === "paragraph" || w.type === "image") &&
|
|
6725
|
-
}),
|
|
6724
|
+
(w.type === "paragraph" || w.type === "image") && h.push(C);
|
|
6725
|
+
}), h;
|
|
6726
6726
|
}, [o]), v = me(() => {
|
|
6727
|
-
if (!
|
|
6728
|
-
const
|
|
6729
|
-
for (let w =
|
|
6730
|
-
const C =
|
|
6731
|
-
C != null &&
|
|
6727
|
+
if (!p) return [];
|
|
6728
|
+
const h = [];
|
|
6729
|
+
for (let w = p.startBlock; w <= p.endBlock; w++) {
|
|
6730
|
+
const C = f[w];
|
|
6731
|
+
C != null && h.push(C);
|
|
6732
6732
|
}
|
|
6733
|
-
return
|
|
6734
|
-
}, [
|
|
6735
|
-
const
|
|
6733
|
+
return h;
|
|
6734
|
+
}, [p, f]), y = me(() => {
|
|
6735
|
+
const h = [];
|
|
6736
6736
|
for (const w of v) {
|
|
6737
6737
|
const C = o[w];
|
|
6738
|
-
(C == null ? void 0 : C.type) === "paragraph" &&
|
|
6738
|
+
(C == null ? void 0 : C.type) === "paragraph" && h.push({ b: C, originalBlockIndex: w });
|
|
6739
6739
|
}
|
|
6740
|
-
return
|
|
6740
|
+
return h;
|
|
6741
6741
|
}, [v, o]), c = me(() => {
|
|
6742
|
-
const
|
|
6742
|
+
const h = [], w = Ar();
|
|
6743
6743
|
return y.forEach((C, R) => {
|
|
6744
|
-
|
|
6745
|
-
}),
|
|
6746
|
-
}, [y]),
|
|
6747
|
-
if (!
|
|
6744
|
+
h[R] = Br(C.b, w);
|
|
6745
|
+
}), h;
|
|
6746
|
+
}, [y]), g = (h, w, C) => {
|
|
6747
|
+
if (!h || h.length === 0) return [];
|
|
6748
6748
|
const R = [];
|
|
6749
|
-
for (const O of
|
|
6749
|
+
for (const O of h) {
|
|
6750
6750
|
const b = O.startG, S = O.endG;
|
|
6751
6751
|
if (S < w || b > C) continue;
|
|
6752
6752
|
const k = Math.max(b, w), T = Math.min(S, C), M = k - b | 0, P = Math.max(0, T - k + 1);
|
|
@@ -6795,9 +6795,9 @@ const wu = ({
|
|
|
6795
6795
|
},
|
|
6796
6796
|
children: [
|
|
6797
6797
|
/* @__PURE__ */ x("div", { style: { height: 40 } }),
|
|
6798
|
-
/* @__PURE__ */ x("div", { style: { flex: 1, overflow: "hidden" }, children: v.map((
|
|
6798
|
+
/* @__PURE__ */ x("div", { style: { flex: 1, overflow: "hidden" }, children: v.map((h, w) => {
|
|
6799
6799
|
var G;
|
|
6800
|
-
const C = o[
|
|
6800
|
+
const C = o[h], R = w === 0, O = w === v.length - 1, b = {
|
|
6801
6801
|
boxSizing: "border-box",
|
|
6802
6802
|
paddingRight: `${i}px`,
|
|
6803
6803
|
paddingLeft: `${i}px`,
|
|
@@ -6807,7 +6807,7 @@ const wu = ({
|
|
|
6807
6807
|
// justifyContent: 'center',
|
|
6808
6808
|
width: "100%",
|
|
6809
6809
|
height: "auto"
|
|
6810
|
-
}, S = `sec-${r.section_id}/blk-${C.id ??
|
|
6810
|
+
}, S = `sec-${r.section_id}/blk-${C.id ?? h}`;
|
|
6811
6811
|
if (C.type === "image") {
|
|
6812
6812
|
const { src: E, alt: L, width: q, height: B } = C, Z = q && B ? `${q} / ${B}` : "4 / 3", F = l > 80 ? Math.floor((l - 80) * 0.6) : void 0;
|
|
6813
6813
|
return /* @__PURE__ */ x("div", { style: b, children: /* @__PURE__ */ ee(
|
|
@@ -6853,15 +6853,15 @@ const wu = ({
|
|
|
6853
6853
|
) }, S);
|
|
6854
6854
|
}
|
|
6855
6855
|
const k = C, T = y.findIndex(
|
|
6856
|
-
(E) => E.originalBlockIndex ===
|
|
6856
|
+
(E) => E.originalBlockIndex === h
|
|
6857
6857
|
), M = T >= 0 ? c[T] : void 0, P = k.runs ?? [], I = P.length;
|
|
6858
6858
|
let _ = 0, z = Math.max(0, I - 1);
|
|
6859
|
-
R &&
|
|
6859
|
+
R && p.startOffsetInBlock != null && (_ = Math.min(Math.max(0, p.startOffsetInBlock), z)), O && p.endOffsetInBlock != null && (z = Math.max(
|
|
6860
6860
|
_,
|
|
6861
|
-
Math.min(
|
|
6861
|
+
Math.min(p.endOffsetInBlock, z)
|
|
6862
6862
|
));
|
|
6863
|
-
const N = _ > 0, A = d[
|
|
6864
|
-
let Se =
|
|
6863
|
+
const N = _ > 0, A = d[h] ?? 0, V = m[h] ?? [], re = A + _, be = A + z;
|
|
6864
|
+
let Se = g(V, re, be);
|
|
6865
6865
|
const Ce = A + _;
|
|
6866
6866
|
Se = Se.map((E) => {
|
|
6867
6867
|
const L = Math.max(0, (E.startG ?? re) - Ce), q = E.len ?? Math.max(1, (E.endG ?? be) - (E.startG ?? re) + 1);
|
|
@@ -6928,12 +6928,12 @@ function Iu(e, t) {
|
|
|
6928
6928
|
}));
|
|
6929
6929
|
}, s = new ResizeObserver((a) => {
|
|
6930
6930
|
if (o.current) return;
|
|
6931
|
-
const l = a[0], { width: d, height:
|
|
6932
|
-
if (!
|
|
6933
|
-
r.current = { w: d, h };
|
|
6931
|
+
const l = a[0], { width: d, height: m } = l.contentRect, p = r.current;
|
|
6932
|
+
if (!p) {
|
|
6933
|
+
r.current = { w: d, h: m };
|
|
6934
6934
|
return;
|
|
6935
6935
|
}
|
|
6936
|
-
Math.abs(
|
|
6936
|
+
Math.abs(p.w - d) < gn && Math.abs(p.h - m) < gn || (r.current = { w: d, h: m }, i());
|
|
6937
6937
|
});
|
|
6938
6938
|
e.forEach((a) => {
|
|
6939
6939
|
a.current && s.observe(a.current);
|
|
@@ -6942,10 +6942,10 @@ function Iu(e, t) {
|
|
|
6942
6942
|
var l;
|
|
6943
6943
|
const a = (l = e[0]) == null ? void 0 : l.current;
|
|
6944
6944
|
if (a && r.current) {
|
|
6945
|
-
const d = a.offsetWidth,
|
|
6946
|
-
if (Math.abs(r.current.w - d) < gn && Math.abs(r.current.h -
|
|
6945
|
+
const d = a.offsetWidth, m = a.offsetHeight;
|
|
6946
|
+
if (Math.abs(r.current.w - d) < gn && Math.abs(r.current.h - m) < gn)
|
|
6947
6947
|
return;
|
|
6948
|
-
r.current = { w: d, h };
|
|
6948
|
+
r.current = { w: d, h: m };
|
|
6949
6949
|
}
|
|
6950
6950
|
i();
|
|
6951
6951
|
};
|
|
@@ -6966,10 +6966,10 @@ function Cu(e) {
|
|
|
6966
6966
|
velocityThreshold: a = 0.6,
|
|
6967
6967
|
singleDelayMs: l = 250,
|
|
6968
6968
|
doubleClickWindowMs: d = 300,
|
|
6969
|
-
onDragMove:
|
|
6970
|
-
onDragEnd:
|
|
6971
|
-
pageTransitionThreshold:
|
|
6972
|
-
} = e, v =
|
|
6969
|
+
onDragMove: m,
|
|
6970
|
+
onDragEnd: p,
|
|
6971
|
+
pageTransitionThreshold: f
|
|
6972
|
+
} = e, v = f ?? u, y = 10, c = Qe.useRef({
|
|
6973
6973
|
// ── touch ──
|
|
6974
6974
|
touchId: null,
|
|
6975
6975
|
startX: 0,
|
|
@@ -6988,13 +6988,13 @@ function Cu(e) {
|
|
|
6988
6988
|
lastTapT: 0,
|
|
6989
6989
|
singleTimer: null,
|
|
6990
6990
|
suppressClick: !1
|
|
6991
|
-
}),
|
|
6991
|
+
}), g = () => {
|
|
6992
6992
|
c.current.singleTimer != null && (clearTimeout(c.current.singleTimer), c.current.singleTimer = null);
|
|
6993
|
-
},
|
|
6993
|
+
}, h = Qe.useCallback(
|
|
6994
6994
|
(_) => {
|
|
6995
6995
|
if (i != null && i(_)) return;
|
|
6996
6996
|
const z = performance.now();
|
|
6997
|
-
z - c.current.lastTapT <= d && c.current.lastTapT > 0 ? (
|
|
6997
|
+
z - c.current.lastTapT <= d && c.current.lastTapT > 0 ? (g(), c.current.lastTapT = 0, o == null || o()) : (g(), r && (c.current.singleTimer = window.setTimeout(() => {
|
|
6998
6998
|
c.current.singleTimer = null, r();
|
|
6999
6999
|
}, l)), c.current.lastTapT = z);
|
|
7000
7000
|
},
|
|
@@ -7002,9 +7002,9 @@ function Cu(e) {
|
|
|
7002
7002
|
), w = Qe.useCallback(
|
|
7003
7003
|
(_, z) => {
|
|
7004
7004
|
const N = Math.abs(_) / Math.max(1, z);
|
|
7005
|
-
Math.abs(_) >= v || N >= a ? _ < 0 ? n() : t() :
|
|
7005
|
+
Math.abs(_) >= v || N >= a ? _ < 0 ? n() : t() : p == null || p();
|
|
7006
7006
|
},
|
|
7007
|
-
[v, a, n, t,
|
|
7007
|
+
[v, a, n, t, p]
|
|
7008
7008
|
), C = Qe.useCallback(
|
|
7009
7009
|
(_) => {
|
|
7010
7010
|
if (_.touches.length !== 1) return;
|
|
@@ -7025,21 +7025,21 @@ function Cu(e) {
|
|
|
7025
7025
|
c.current.swiping = !0;
|
|
7026
7026
|
else
|
|
7027
7027
|
return;
|
|
7028
|
-
|
|
7028
|
+
m == null || m(N);
|
|
7029
7029
|
},
|
|
7030
|
-
[
|
|
7030
|
+
[m]
|
|
7031
7031
|
), O = Qe.useCallback(
|
|
7032
7032
|
(_) => {
|
|
7033
7033
|
if (c.current.touchId == null) return;
|
|
7034
7034
|
const z = Array.from(_.changedTouches).find((re) => re.identifier === c.current.touchId);
|
|
7035
7035
|
if (!z) return;
|
|
7036
7036
|
const N = z.clientX - c.current.startX, A = z.clientY - c.current.startY, V = _.timeStamp - c.current.startT;
|
|
7037
|
-
c.current.swiping ? w(N, V) : Math.abs(N) < 10 && Math.abs(A) < 10 &&
|
|
7037
|
+
c.current.swiping ? w(N, V) : Math.abs(N) < 10 && Math.abs(A) < 10 && h(_.target), c.current.suppressClick = !0, c.current.touchId = null, c.current.swiping = !1;
|
|
7038
7038
|
},
|
|
7039
|
-
[w,
|
|
7039
|
+
[w, h]
|
|
7040
7040
|
), b = Qe.useCallback(() => {
|
|
7041
|
-
c.current.swiping && (
|
|
7042
|
-
}, [
|
|
7041
|
+
c.current.swiping && (p == null || p()), c.current.touchId = null, c.current.swiping = !1;
|
|
7042
|
+
}, [p]), S = Qe.useCallback(
|
|
7043
7043
|
(_) => {
|
|
7044
7044
|
if (_.pointerType === "touch" || c.current.mouseDown) return;
|
|
7045
7045
|
const z = s ?? i;
|
|
@@ -7062,9 +7062,9 @@ function Cu(e) {
|
|
|
7062
7062
|
c.current.prevUserSelect = document.body.style.userSelect, document.body.style.userSelect = "none", _.preventDefault();
|
|
7063
7063
|
} else
|
|
7064
7064
|
return;
|
|
7065
|
-
|
|
7065
|
+
m == null || m(z), _.preventDefault();
|
|
7066
7066
|
},
|
|
7067
|
-
[
|
|
7067
|
+
[m]
|
|
7068
7068
|
), T = Qe.useCallback(
|
|
7069
7069
|
(_) => {
|
|
7070
7070
|
var N;
|
|
@@ -7084,24 +7084,24 @@ function Cu(e) {
|
|
|
7084
7084
|
[w]
|
|
7085
7085
|
), M = Qe.useCallback(
|
|
7086
7086
|
(_) => {
|
|
7087
|
-
_.pointerType !== "touch" && (c.current.mouseSwiping && (
|
|
7087
|
+
_.pointerType !== "touch" && (c.current.mouseSwiping && (p == null || p(), document.body.style.userSelect = c.current.prevUserSelect), c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null);
|
|
7088
7088
|
},
|
|
7089
|
-
[
|
|
7089
|
+
[p]
|
|
7090
7090
|
), P = Qe.useCallback(() => {
|
|
7091
|
-
c.current.mouseSwiping && (
|
|
7092
|
-
}, [
|
|
7091
|
+
c.current.mouseSwiping && (p == null || p(), document.body.style.userSelect = c.current.prevUserSelect), c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null;
|
|
7092
|
+
}, [p]), I = Qe.useCallback(
|
|
7093
7093
|
(_) => {
|
|
7094
7094
|
if (c.current.suppressClick) {
|
|
7095
7095
|
c.current.suppressClick = !1;
|
|
7096
7096
|
return;
|
|
7097
7097
|
}
|
|
7098
|
-
|
|
7098
|
+
h(_.target);
|
|
7099
7099
|
},
|
|
7100
|
-
[
|
|
7100
|
+
[h]
|
|
7101
7101
|
);
|
|
7102
7102
|
return Qe.useEffect(
|
|
7103
7103
|
() => () => {
|
|
7104
|
-
|
|
7104
|
+
g(), document.body.style.userSelect = "";
|
|
7105
7105
|
},
|
|
7106
7106
|
[]
|
|
7107
7107
|
), {
|
|
@@ -7255,8 +7255,8 @@ function Au() {
|
|
|
7255
7255
|
if (typeof l != "string")
|
|
7256
7256
|
return l === 0 ? l : +l;
|
|
7257
7257
|
l = e(l);
|
|
7258
|
-
var
|
|
7259
|
-
return
|
|
7258
|
+
var m = i.test(l);
|
|
7259
|
+
return m || s.test(l) ? u(l.slice(2), m ? 2 : 8) : o.test(l) ? r : +l;
|
|
7260
7260
|
}
|
|
7261
7261
|
return ir = a, ir;
|
|
7262
7262
|
}
|
|
@@ -7266,24 +7266,24 @@ function Bu() {
|
|
|
7266
7266
|
Fo = 1;
|
|
7267
7267
|
var e = Hi(), t = ku(), n = Au(), r = "Expected a function", o = Math.max, i = Math.min;
|
|
7268
7268
|
function s(u, a, l) {
|
|
7269
|
-
var d,
|
|
7269
|
+
var d, m, p, f, v, y, c = 0, g = !1, h = !1, w = !0;
|
|
7270
7270
|
if (typeof u != "function")
|
|
7271
7271
|
throw new TypeError(r);
|
|
7272
|
-
a = n(a) || 0, e(l) && (
|
|
7272
|
+
a = n(a) || 0, e(l) && (g = !!l.leading, h = "maxWait" in l, p = h ? o(n(l.maxWait) || 0, a) : p, w = "trailing" in l ? !!l.trailing : w);
|
|
7273
7273
|
function C(I) {
|
|
7274
|
-
var _ = d, z =
|
|
7275
|
-
return d =
|
|
7274
|
+
var _ = d, z = m;
|
|
7275
|
+
return d = m = void 0, c = I, f = u.apply(z, _), f;
|
|
7276
7276
|
}
|
|
7277
7277
|
function R(I) {
|
|
7278
|
-
return c = I, v = setTimeout(S, a),
|
|
7278
|
+
return c = I, v = setTimeout(S, a), g ? C(I) : f;
|
|
7279
7279
|
}
|
|
7280
7280
|
function O(I) {
|
|
7281
7281
|
var _ = I - y, z = I - c, N = a - _;
|
|
7282
|
-
return
|
|
7282
|
+
return h ? i(N, p - z) : N;
|
|
7283
7283
|
}
|
|
7284
7284
|
function b(I) {
|
|
7285
7285
|
var _ = I - y, z = I - c;
|
|
7286
|
-
return y === void 0 || _ >= a || _ < 0 ||
|
|
7286
|
+
return y === void 0 || _ >= a || _ < 0 || h && z >= p;
|
|
7287
7287
|
}
|
|
7288
7288
|
function S() {
|
|
7289
7289
|
var I = t();
|
|
@@ -7292,23 +7292,23 @@ function Bu() {
|
|
|
7292
7292
|
v = setTimeout(S, O(I));
|
|
7293
7293
|
}
|
|
7294
7294
|
function k(I) {
|
|
7295
|
-
return v = void 0, w && d ? C(I) : (d =
|
|
7295
|
+
return v = void 0, w && d ? C(I) : (d = m = void 0, f);
|
|
7296
7296
|
}
|
|
7297
7297
|
function T() {
|
|
7298
|
-
v !== void 0 && clearTimeout(v), c = 0, d = y =
|
|
7298
|
+
v !== void 0 && clearTimeout(v), c = 0, d = y = m = v = void 0;
|
|
7299
7299
|
}
|
|
7300
7300
|
function M() {
|
|
7301
|
-
return v === void 0 ?
|
|
7301
|
+
return v === void 0 ? f : k(t());
|
|
7302
7302
|
}
|
|
7303
7303
|
function P() {
|
|
7304
7304
|
var I = t(), _ = b(I);
|
|
7305
|
-
if (d = arguments,
|
|
7305
|
+
if (d = arguments, m = this, y = I, _) {
|
|
7306
7306
|
if (v === void 0)
|
|
7307
7307
|
return R(y);
|
|
7308
|
-
if (
|
|
7308
|
+
if (h)
|
|
7309
7309
|
return clearTimeout(v), v = setTimeout(S, a), C(y);
|
|
7310
7310
|
}
|
|
7311
|
-
return v === void 0 && (v = setTimeout(S, a)),
|
|
7311
|
+
return v === void 0 && (v = setTimeout(S, a)), f;
|
|
7312
7312
|
}
|
|
7313
7313
|
return P.cancel = T, P.flush = M, P;
|
|
7314
7314
|
}
|
|
@@ -7395,13 +7395,13 @@ async function $u({
|
|
|
7395
7395
|
lineHeight: a,
|
|
7396
7396
|
showSplit: l,
|
|
7397
7397
|
breakGapPx: d = 0,
|
|
7398
|
-
showSlash:
|
|
7399
|
-
paragraphMarkers:
|
|
7400
|
-
playbackScale:
|
|
7398
|
+
showSlash: m,
|
|
7399
|
+
paragraphMarkers: p,
|
|
7400
|
+
playbackScale: f = 1,
|
|
7401
7401
|
viewportHeight: v = 0,
|
|
7402
7402
|
instanceId: y = "default"
|
|
7403
7403
|
}) {
|
|
7404
|
-
var
|
|
7404
|
+
var g, h, w;
|
|
7405
7405
|
const c = Wu(y);
|
|
7406
7406
|
if (rt(c, y), s && typeof document < "u" && document.fonts) {
|
|
7407
7407
|
Fu();
|
|
@@ -7413,14 +7413,14 @@ async function $u({
|
|
|
7413
7413
|
}
|
|
7414
7414
|
rt(c, y);
|
|
7415
7415
|
try {
|
|
7416
|
-
const C = Math.abs(
|
|
7416
|
+
const C = Math.abs(f - 1) > 1e-3, R = 1 / f;
|
|
7417
7417
|
C && (t.style.transform = `scale(${R})`, t.style.transformOrigin = "top left");
|
|
7418
7418
|
const O = Math.max(0, e.offsetWidth || 0), b = Math.max(0, Math.min(O, o));
|
|
7419
7419
|
t.style.maxWidth = `${b}px`, rt(c, y);
|
|
7420
7420
|
let S = Math.round(n.offsetHeight || 0);
|
|
7421
7421
|
S || (S = Math.max(0, n.clientHeight | 0)), console.log(
|
|
7422
7422
|
"[calcPages] playbackScale:",
|
|
7423
|
-
|
|
7423
|
+
f.toFixed(4),
|
|
7424
7424
|
C ? "(scaled, applying inverse)" : "(no scale)"
|
|
7425
7425
|
), console.log("[calcPages] viewWidth:", O), console.log("[calcPages] pageBoxWidth:", b), console.log("[calcPages] maxPageHeight:", S), console.log("[calcPages] contentArea rect:", n.getBoundingClientRect()), console.log("[calcPages] measureRoot rect:", t.getBoundingClientRect());
|
|
7426
7426
|
const k = 1.5, T = (B, Z) => Z + B <= S - k, M = getComputedStyle(e), P = {
|
|
@@ -7454,7 +7454,7 @@ async function $u({
|
|
|
7454
7454
|
const we = Math.max(0, (d ?? 0) / 2), ge = document.createElement("span");
|
|
7455
7455
|
ge.style.display = "inline-block", ge.style.width = `${we}px`;
|
|
7456
7456
|
const ke = document.createElement("span");
|
|
7457
|
-
if (ke.style.display = "inline-block", ke.style.width = `${we}px`, ce.appendChild(ge),
|
|
7457
|
+
if (ke.style.display = "inline-block", ke.style.width = `${we}px`, ce.appendChild(ge), m) {
|
|
7458
7458
|
const Oe = document.createElement("span");
|
|
7459
7459
|
Oe.textContent = " / ", ce.appendChild(Oe);
|
|
7460
7460
|
}
|
|
@@ -7485,7 +7485,7 @@ async function $u({
|
|
|
7485
7485
|
re[B] = { contentH: Math.ceil(He.height), mt: Be, mb: $e }, await be(24);
|
|
7486
7486
|
continue;
|
|
7487
7487
|
}
|
|
7488
|
-
const F = Z.block, Q = F.list ? (F.list.level ?? 0) * 24 : 0, te = Z.paraIndex ?? 0, J =
|
|
7488
|
+
const F = Z.block, Q = F.list ? (F.list.level ?? 0) * 24 : 0, te = Z.paraIndex ?? 0, J = p[te] ?? (((g = F.list) == null ? void 0 : g.kind) === "bullet" ? ((h = F.list) == null ? void 0 : h.glyph) ?? "•" : void 0);
|
|
7489
7489
|
if (!!(F.list && J)) {
|
|
7490
7490
|
const ke = Se(F, Q);
|
|
7491
7491
|
ke.dataset.variant = "with";
|
|
@@ -7629,10 +7629,10 @@ function Vu(e, t, n, r) {
|
|
|
7629
7629
|
if (!a || a.kind !== "paragraph") continue;
|
|
7630
7630
|
const l = ((o = a.block.runs) == null ? void 0 : o.length) ?? 0;
|
|
7631
7631
|
if (!l) continue;
|
|
7632
|
-
let d = 0,
|
|
7633
|
-
u === s.startBlock && s.startOffsetInBlock != null && (d = Math.max(0, Math.min(s.startOffsetInBlock,
|
|
7634
|
-
const
|
|
7635
|
-
if (e >=
|
|
7632
|
+
let d = 0, m = l - 1;
|
|
7633
|
+
u === s.startBlock && s.startOffsetInBlock != null && (d = Math.max(0, Math.min(s.startOffsetInBlock, m))), u === s.endBlock && s.endOffsetInBlock != null && (m = Math.max(d, Math.min(s.endOffsetInBlock, m)));
|
|
7634
|
+
const p = r[a.originalIndex] ?? 0, f = p + d, v = p + m;
|
|
7635
|
+
if (e >= f && e <= v) return i;
|
|
7636
7636
|
}
|
|
7637
7637
|
}
|
|
7638
7638
|
return -1;
|
|
@@ -7667,10 +7667,10 @@ function Ku() {
|
|
|
7667
7667
|
fe(() => r.subscribe((U) => {
|
|
7668
7668
|
o.current = U.progress.rangeStartGI != null && U.progress.rangeEndGI != null;
|
|
7669
7669
|
}), [r]);
|
|
7670
|
-
const i = o.current, s = It(), u = X((U) => U.theme), a = vn[u], l = X((U) => U.fontFamily), d = X((U) => U.fontSizePx),
|
|
7670
|
+
const i = o.current, s = It(), u = X((U) => U.theme), a = vn[u], l = X((U) => U.fontFamily), d = X((U) => U.fontSizePx), m = X((U) => U.lineHeight), p = X((U) => U.marginX), f = X((U) => U.viewportHeight), v = 860, y = ie(null), { items: c } = me(() => {
|
|
7671
7671
|
var U;
|
|
7672
7672
|
return Uu(((U = t == null ? void 0 : t.ast) == null ? void 0 : U.blocks) ?? []);
|
|
7673
|
-
}, [t]),
|
|
7673
|
+
}, [t]), g = me(() => {
|
|
7674
7674
|
const U = [], Le = Ar();
|
|
7675
7675
|
return c.forEach((We) => {
|
|
7676
7676
|
if (We.kind === "paragraph") {
|
|
@@ -7678,7 +7678,7 @@ function Ku() {
|
|
|
7678
7678
|
U[Rt] = Br(We.block, Le);
|
|
7679
7679
|
}
|
|
7680
7680
|
}), U;
|
|
7681
|
-
}, [c]), [
|
|
7681
|
+
}, [c]), [h, w] = pt({
|
|
7682
7682
|
pages: [],
|
|
7683
7683
|
pageByRunIndex: null
|
|
7684
7684
|
}), C = j((U) => U.pageIndex), R = j((U) => U.setPageIndex), O = ie(0), b = ie(null), [S, k] = pt(!1), [T, M] = pt(null), [P, I] = pt(!1), _ = me(
|
|
@@ -7688,7 +7688,7 @@ function Ku() {
|
|
|
7688
7688
|
background: a.bg,
|
|
7689
7689
|
color: a.fg,
|
|
7690
7690
|
fontSize: d,
|
|
7691
|
-
lineHeight:
|
|
7691
|
+
lineHeight: m,
|
|
7692
7692
|
overflow: "hidden",
|
|
7693
7693
|
width: "100%",
|
|
7694
7694
|
height: "100%",
|
|
@@ -7698,7 +7698,7 @@ function Ku() {
|
|
|
7698
7698
|
MozTextSizeAdjust: "none",
|
|
7699
7699
|
textSizeAdjust: "none"
|
|
7700
7700
|
}),
|
|
7701
|
-
[l, a.bg, a.fg, d,
|
|
7701
|
+
[l, a.bg, a.fg, d, m]
|
|
7702
7702
|
), {
|
|
7703
7703
|
showSplit: z,
|
|
7704
7704
|
breakGapPx: N,
|
|
@@ -7714,11 +7714,11 @@ function Ku() {
|
|
|
7714
7714
|
})
|
|
7715
7715
|
), V = yt();
|
|
7716
7716
|
fe(() => {
|
|
7717
|
-
|
|
7717
|
+
h && h.pages.length && (console.log("그래서 총 페이지", h.pages.length), V.getState().progress.setTotalPages(h.pages.length + 1), (async () => {
|
|
7718
7718
|
const U = V.getState().progress.setSectionLoading;
|
|
7719
7719
|
await St(), await St(), await St(), await St(), console.log("recalc종료"), U(!1);
|
|
7720
7720
|
})());
|
|
7721
|
-
}, [
|
|
7721
|
+
}, [h, V]);
|
|
7722
7722
|
const re = ne(() => {
|
|
7723
7723
|
console.log("@@@@@@recalc호출");
|
|
7724
7724
|
const U = y.current, Le = se.current, We = we.current;
|
|
@@ -7735,16 +7735,16 @@ function Ku() {
|
|
|
7735
7735
|
contentArea: We,
|
|
7736
7736
|
items: c,
|
|
7737
7737
|
cfgMaxWidth: v,
|
|
7738
|
-
marginX:
|
|
7738
|
+
marginX: p,
|
|
7739
7739
|
fontFamily: l,
|
|
7740
7740
|
fontSizePx: d,
|
|
7741
|
-
lineHeight:
|
|
7741
|
+
lineHeight: m,
|
|
7742
7742
|
showSplit: z,
|
|
7743
7743
|
breakGapPx: N,
|
|
7744
7744
|
showSlash: A,
|
|
7745
|
-
paragraphMarkers:
|
|
7745
|
+
paragraphMarkers: g,
|
|
7746
7746
|
playbackScale: lt,
|
|
7747
|
-
viewportHeight:
|
|
7747
|
+
viewportHeight: f,
|
|
7748
7748
|
instanceId: e
|
|
7749
7749
|
}), ji = performance.now();
|
|
7750
7750
|
console.log(
|
|
@@ -7762,38 +7762,38 @@ function Ku() {
|
|
|
7762
7762
|
R,
|
|
7763
7763
|
c,
|
|
7764
7764
|
v,
|
|
7765
|
-
|
|
7765
|
+
p,
|
|
7766
7766
|
l,
|
|
7767
7767
|
d,
|
|
7768
|
-
|
|
7768
|
+
m,
|
|
7769
7769
|
z,
|
|
7770
7770
|
N,
|
|
7771
7771
|
A,
|
|
7772
|
-
|
|
7772
|
+
g,
|
|
7773
7773
|
s,
|
|
7774
|
-
|
|
7774
|
+
f,
|
|
7775
7775
|
e
|
|
7776
7776
|
]), be = j((U) => U.setCurrentGlobalRunIndex), Se = j((U) => {
|
|
7777
7777
|
var Le;
|
|
7778
7778
|
return ((Le = U.layout) == null ? void 0 : Le.prefix) ?? [];
|
|
7779
|
-
}), Ce =
|
|
7779
|
+
}), Ce = Re((U) => U.syncToGI), xe = ne(
|
|
7780
7780
|
(U) => {
|
|
7781
|
-
const Le =
|
|
7781
|
+
const Le = h.pages.length + 1, We = C + U;
|
|
7782
7782
|
if (We < 0 || We >= Le) return;
|
|
7783
|
-
const Rt = C ===
|
|
7784
|
-
if (We ===
|
|
7783
|
+
const Rt = C === h.pages.length;
|
|
7784
|
+
if (We === h.pages.length) {
|
|
7785
7785
|
R(We);
|
|
7786
7786
|
return;
|
|
7787
7787
|
}
|
|
7788
7788
|
if (Rt && U === -1) {
|
|
7789
|
-
const At = Do(
|
|
7789
|
+
const At = Do(h.pages[We], c, Se);
|
|
7790
7790
|
At != null && (be(At, "scrubber-step"), Ce(At)), R(We);
|
|
7791
7791
|
return;
|
|
7792
7792
|
}
|
|
7793
|
-
const lt = Do(
|
|
7793
|
+
const lt = Do(h.pages[We], c, Se);
|
|
7794
7794
|
lt != null ? (be(lt, "scrubber-step"), Ce(lt)) : R(We);
|
|
7795
7795
|
},
|
|
7796
|
-
[C,
|
|
7796
|
+
[C, h.pages, c, Se, be, R, Ce]
|
|
7797
7797
|
), Fe = ne(() => {
|
|
7798
7798
|
S || O.current !== 0 ? (M("prev"), k(!1)) : xe(-1);
|
|
7799
7799
|
}, [S, xe]), K = ne(() => {
|
|
@@ -7801,7 +7801,7 @@ function Ku() {
|
|
|
7801
7801
|
}, [S, xe]), $ = Rn(), G = ne(() => {
|
|
7802
7802
|
const { isSettingsOpen: U, setSettingsOpen: Le, toggleOverlays: We } = $.getState();
|
|
7803
7803
|
U ? Le(!1) : We();
|
|
7804
|
-
}, [$]), E =
|
|
7804
|
+
}, [$]), E = h.pages.length + 1, L = ((Lr = y.current) == null ? void 0 : Lr.clientWidth) || 400, q = ne((U) => {
|
|
7805
7805
|
var lt;
|
|
7806
7806
|
const Le = b.current;
|
|
7807
7807
|
if (!Le) return;
|
|
@@ -7864,8 +7864,8 @@ function Ku() {
|
|
|
7864
7864
|
[]
|
|
7865
7865
|
), Oe = Hu(re, 200, ge, ke), He = ie("");
|
|
7866
7866
|
fe(() => {
|
|
7867
|
-
if (
|
|
7868
|
-
const U = `${l}|${d}|${
|
|
7867
|
+
if (f <= 0) return;
|
|
7868
|
+
const U = `${l}|${d}|${m}|${p}|${z}|${N}|${A}|${f}|${t == null ? void 0 : t.section_id}`;
|
|
7869
7869
|
He.current !== U && (He.current = U, console.log("debounceRecalc 취소"), Oe.cancel(), ge(), re());
|
|
7870
7870
|
}, [
|
|
7871
7871
|
Oe,
|
|
@@ -7873,12 +7873,12 @@ function Ku() {
|
|
|
7873
7873
|
ge,
|
|
7874
7874
|
l,
|
|
7875
7875
|
d,
|
|
7876
|
-
|
|
7877
|
-
|
|
7876
|
+
m,
|
|
7877
|
+
p,
|
|
7878
7878
|
z,
|
|
7879
7879
|
N,
|
|
7880
7880
|
A,
|
|
7881
|
-
|
|
7881
|
+
f,
|
|
7882
7882
|
t == null ? void 0 : t.section_id
|
|
7883
7883
|
]), Iu([y], Oe);
|
|
7884
7884
|
const Be = j((U) => U.registerSectionScrollApi);
|
|
@@ -7895,7 +7895,7 @@ function Ku() {
|
|
|
7895
7895
|
// 페이지 이동 구현
|
|
7896
7896
|
stepPage: xe
|
|
7897
7897
|
}), () => Be(void 0)), [Be, xe]);
|
|
7898
|
-
const $e = t.quizzes && t.quizzes.length > 0, ut =
|
|
7898
|
+
const $e = t.quizzes && t.quizzes.length > 0, ut = h.pages.length > 0 && C === h.pages.length, Xe = C > 0 ? C - 1 : null, Ge = C < E - 1 ? C + 1 : null, st = me(() => T === "prev" ? "translate3d(0%, 0, 0)" : T === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [T]), nt = (U) => n ? null : U === h.pages.length ? /* @__PURE__ */ ee(
|
|
7899
7899
|
"div",
|
|
7900
7900
|
{
|
|
7901
7901
|
style: {
|
|
@@ -7912,7 +7912,7 @@ function Ku() {
|
|
|
7912
7912
|
/* @__PURE__ */ x(Tn, { isIcon: !1 })
|
|
7913
7913
|
]
|
|
7914
7914
|
}
|
|
7915
|
-
) : /* @__PURE__ */ x(wu, { pages:
|
|
7915
|
+
) : /* @__PURE__ */ x(wu, { pages: h.pages, pageIndex: U, maxWidth: v }), bt = {
|
|
7916
7916
|
width: "33.333%",
|
|
7917
7917
|
height: "100%",
|
|
7918
7918
|
flexShrink: 0,
|
|
@@ -7973,7 +7973,7 @@ function Ku() {
|
|
|
7973
7973
|
overflow: "hidden",
|
|
7974
7974
|
fontFamily: l,
|
|
7975
7975
|
fontSize: d,
|
|
7976
|
-
lineHeight:
|
|
7976
|
+
lineHeight: m,
|
|
7977
7977
|
pointerEvents: "none",
|
|
7978
7978
|
background: "pink"
|
|
7979
7979
|
},
|
|
@@ -8015,7 +8015,7 @@ function Ku() {
|
|
|
8015
8015
|
/* @__PURE__ */ x(
|
|
8016
8016
|
Xu,
|
|
8017
8017
|
{
|
|
8018
|
-
pages:
|
|
8018
|
+
pages: h.pages,
|
|
8019
8019
|
items: c,
|
|
8020
8020
|
onGotoPage: R,
|
|
8021
8021
|
currentPageIndex: C,
|
|
@@ -8102,25 +8102,25 @@ function Md(e) {
|
|
|
8102
8102
|
}), n.sort((r, o) => r - o);
|
|
8103
8103
|
}
|
|
8104
8104
|
const Ed = Wt(function() {
|
|
8105
|
-
const t = Je((c) => c.phase), n = Je((c) => c.quizzes), r = Je((c) => c.order), o = Je((c) => c.currentIndex), i = Je((c) => c.answers), s = Je((c) => c.correctCount), u = Je((c) => c.remainingSec), a = Je((c) => c.uiReveal), l = Je((c) => c.startedAt), d = Je((c) => c.finishedAt),
|
|
8105
|
+
const t = Je((c) => c.phase), n = Je((c) => c.quizzes), r = Je((c) => c.order), o = Je((c) => c.currentIndex), i = Je((c) => c.answers), s = Je((c) => c.correctCount), u = Je((c) => c.remainingSec), a = Je((c) => c.uiReveal), l = Je((c) => c.startedAt), d = Je((c) => c.finishedAt), m = Je((c) => c.perQ), p = Pi();
|
|
8106
8106
|
fe(() => {
|
|
8107
8107
|
if (t === "idle" || t !== "doing" || u == null) return;
|
|
8108
|
-
const c = window.setInterval(() =>
|
|
8108
|
+
const c = window.setInterval(() => p.getState().tick(), 1e3);
|
|
8109
8109
|
return () => window.clearInterval(c);
|
|
8110
|
-
}, [t, u,
|
|
8111
|
-
const
|
|
8110
|
+
}, [t, u, p]);
|
|
8111
|
+
const f = t === "doing" ? n[r[o]] : void 0, v = t === "doing" && f ? i[f.qid] ?? [] : [], y = me(() => {
|
|
8112
8112
|
if (t === "idle" || t !== "finished") return;
|
|
8113
|
-
const c = r.map((A) => n[A]),
|
|
8114
|
-
const re =
|
|
8113
|
+
const c = r.map((A) => n[A]), g = c.length, h = c.reduce((A, V) => A + (V.score ?? 0), 0), w = c.reduce((A, V) => {
|
|
8114
|
+
const re = m[V.qid];
|
|
8115
8115
|
return A + (re != null && re.isCorrect ? V.score ?? 0 : 0);
|
|
8116
|
-
}, 0), C = c.map((A) =>
|
|
8116
|
+
}, 0), C = c.map((A) => m[A.qid]).filter((A) => !!A), R = typeof l == "number" && typeof d == "number" ? Math.max(0, d - l) : C.reduce((A, V) => A + (V.ms ?? 0), 0), O = g > 0 ? Math.round(R / g) : 0, b = [...C].sort((A, V) => A.ms - V.ms), S = b[0], k = b[b.length - 1], T = C.filter((A) => !A.multi), M = C.filter((A) => A.multi), P = T.filter((A) => A.isCorrect).length, I = M.filter((A) => A.isCorrect).length, _ = C.filter((A) => A.timedOut).length, z = C.filter((A) => A.revealed).length, N = C.filter((A) => !A.isCorrect).sort((A, V) => V.ms - A.ms).slice(0, 3);
|
|
8117
8117
|
return {
|
|
8118
|
-
total:
|
|
8118
|
+
total: g,
|
|
8119
8119
|
correct: s,
|
|
8120
|
-
rate:
|
|
8120
|
+
rate: g ? Math.round(s / g * 100) : 0,
|
|
8121
8121
|
timeMsTotal: R,
|
|
8122
8122
|
avgMs: O,
|
|
8123
|
-
totalScore:
|
|
8123
|
+
totalScore: h,
|
|
8124
8124
|
gainedScore: w,
|
|
8125
8125
|
fastest: S,
|
|
8126
8126
|
slowest: k,
|
|
@@ -8130,24 +8130,24 @@ const Ed = Wt(function() {
|
|
|
8130
8130
|
revealed: z,
|
|
8131
8131
|
wrongTop3: N
|
|
8132
8132
|
};
|
|
8133
|
-
}, [t, r, n,
|
|
8134
|
-
return t === "idle" ? null : /* @__PURE__ */ x("div", { className: de.Overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ x("div", { className: de.Dialog, children: t === "doing" &&
|
|
8133
|
+
}, [t, r, n, m, l, d, s]);
|
|
8134
|
+
return t === "idle" ? null : /* @__PURE__ */ x("div", { className: de.Overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ x("div", { className: de.Dialog, children: t === "doing" && f ? /* @__PURE__ */ x(
|
|
8135
8135
|
Od,
|
|
8136
8136
|
{
|
|
8137
|
-
q:
|
|
8137
|
+
q: f,
|
|
8138
8138
|
index: o,
|
|
8139
8139
|
total: r.length,
|
|
8140
8140
|
selected: v,
|
|
8141
8141
|
uiReveal: a,
|
|
8142
8142
|
onSelect: (c) => {
|
|
8143
8143
|
if (a) return;
|
|
8144
|
-
const
|
|
8145
|
-
Vi(
|
|
8144
|
+
const g = p.getState();
|
|
8145
|
+
Vi(f) ? g.selectToggle(c) : g.selectSingle(c);
|
|
8146
8146
|
},
|
|
8147
|
-
onBeforeNext: () =>
|
|
8148
|
-
onNext: () =>
|
|
8147
|
+
onBeforeNext: () => p.getState().setReveal(!0),
|
|
8148
|
+
onNext: () => p.getState().afterRevealNext(),
|
|
8149
8149
|
remainingSec: u,
|
|
8150
|
-
onClose: () =>
|
|
8150
|
+
onClose: () => p.getState().close()
|
|
8151
8151
|
}
|
|
8152
8152
|
) : /* @__PURE__ */ x(
|
|
8153
8153
|
zd,
|
|
@@ -8155,13 +8155,13 @@ const Ed = Wt(function() {
|
|
|
8155
8155
|
total: r.length,
|
|
8156
8156
|
correct: s,
|
|
8157
8157
|
summary: y,
|
|
8158
|
-
retryAllowed:
|
|
8159
|
-
onClose: () =>
|
|
8158
|
+
retryAllowed: p.getState().retryAllowed,
|
|
8159
|
+
onClose: () => p.getState().close(),
|
|
8160
8160
|
onRetry: () => {
|
|
8161
|
-
const
|
|
8162
|
-
if (!
|
|
8163
|
-
const
|
|
8164
|
-
|
|
8161
|
+
const g = p.getState().quizzes;
|
|
8162
|
+
if (!g.length) return;
|
|
8163
|
+
const h = g[0];
|
|
8164
|
+
p.setState({
|
|
8165
8165
|
phase: "doing",
|
|
8166
8166
|
currentIndex: 0,
|
|
8167
8167
|
answers: {},
|
|
@@ -8169,7 +8169,7 @@ const Ed = Wt(function() {
|
|
|
8169
8169
|
startedAt: Date.now(),
|
|
8170
8170
|
finishedAt: void 0,
|
|
8171
8171
|
questionStartedAt: Date.now(),
|
|
8172
|
-
remainingSec:
|
|
8172
|
+
remainingSec: h.limit_sec || void 0,
|
|
8173
8173
|
uiReveal: !1,
|
|
8174
8174
|
perQ: {}
|
|
8175
8175
|
});
|
|
@@ -8189,17 +8189,17 @@ function Od(e) {
|
|
|
8189
8189
|
onNext: a,
|
|
8190
8190
|
remainingSec: l,
|
|
8191
8191
|
onClose: d
|
|
8192
|
-
} = e,
|
|
8193
|
-
const c = t.options.map((
|
|
8194
|
-
for (let
|
|
8195
|
-
const
|
|
8196
|
-
[c[
|
|
8192
|
+
} = e, m = Vi(t), p = me(() => {
|
|
8193
|
+
const c = t.options.map((g, h) => ({ opt: g, i: h }));
|
|
8194
|
+
for (let g = c.length - 1; g > 0; g--) {
|
|
8195
|
+
const h = Math.floor(Math.random() * (g + 1));
|
|
8196
|
+
[c[g], c[h]] = [c[h], c[g]];
|
|
8197
8197
|
}
|
|
8198
8198
|
return c;
|
|
8199
|
-
}, [t.options]),
|
|
8200
|
-
const c = [...o].sort((
|
|
8199
|
+
}, [t.options]), f = me(() => _d(t), [t]), v = me(() => Md(t), [t]), y = me(() => {
|
|
8200
|
+
const c = [...o].sort((g, h) => g - h);
|
|
8201
8201
|
if (c.length !== v.length) return !1;
|
|
8202
|
-
for (let
|
|
8202
|
+
for (let g = 0; g < c.length; g++) if (c[g] !== v[g]) return !1;
|
|
8203
8203
|
return !0;
|
|
8204
8204
|
}, [o, v]);
|
|
8205
8205
|
return /* @__PURE__ */ ee("div", { className: de.Body, children: [
|
|
@@ -8208,7 +8208,7 @@ function Od(e) {
|
|
|
8208
8208
|
/* @__PURE__ */ x("button", { type: "button", onClick: d, className: de.CloseBtn, children: "X" })
|
|
8209
8209
|
] }),
|
|
8210
8210
|
/* @__PURE__ */ x("div", { className: de.Question, children: t.question }),
|
|
8211
|
-
/* @__PURE__ */ x("div", { className: de.Score, children: ` (${t.score}점${
|
|
8211
|
+
/* @__PURE__ */ x("div", { className: de.Score, children: ` (${t.score}점${m ? " ,모두선택" : ""})` }),
|
|
8212
8212
|
/* @__PURE__ */ x(
|
|
8213
8213
|
"div",
|
|
8214
8214
|
{
|
|
@@ -8217,23 +8217,23 @@ function Od(e) {
|
|
|
8217
8217
|
children: i ? y ? `Correct : +${t.score} point` : "Incorrect : 0 point" : "a"
|
|
8218
8218
|
}
|
|
8219
8219
|
),
|
|
8220
|
-
/* @__PURE__ */ x("div", { className: de.Image, children:
|
|
8221
|
-
/* @__PURE__ */ x("div", { className: de.Options, children:
|
|
8222
|
-
const
|
|
8220
|
+
/* @__PURE__ */ x("div", { className: de.Image, children: f && /* @__PURE__ */ x("img", { src: f, alt: "" }) }),
|
|
8221
|
+
/* @__PURE__ */ x("div", { className: de.Options, children: p.map(({ opt: c, i: g }) => {
|
|
8222
|
+
const h = o.includes(g), w = v.includes(g), C = [
|
|
8223
8223
|
de.OptionBtn,
|
|
8224
|
-
|
|
8224
|
+
h ? de.OptionBtnActive : "",
|
|
8225
8225
|
i && w ? de.OptionBtnCorrect : ""
|
|
8226
8226
|
].filter(Boolean).join(" ");
|
|
8227
8227
|
return /* @__PURE__ */ x(
|
|
8228
8228
|
"button",
|
|
8229
8229
|
{
|
|
8230
8230
|
type: "button",
|
|
8231
|
-
onClick: () => s(
|
|
8231
|
+
onClick: () => s(g),
|
|
8232
8232
|
className: C,
|
|
8233
8233
|
disabled: i,
|
|
8234
8234
|
children: c
|
|
8235
8235
|
},
|
|
8236
|
-
|
|
8236
|
+
g
|
|
8237
8237
|
);
|
|
8238
8238
|
}) }),
|
|
8239
8239
|
/* @__PURE__ */ x("div", { className: de.Footer, children: i ? /* @__PURE__ */ x("button", { type: "button", onClick: a, className: de.NextBtn, children: n + 1 >= r ? "Complete" : "Next Quiz" }) : /* @__PURE__ */ ee("button", { type: "button", onClick: u, className: `${de.NextBtn}`, children: [
|
|
@@ -8350,37 +8350,37 @@ function Bd(e, t) {
|
|
|
8350
8350
|
const d = a();
|
|
8351
8351
|
if (!d.quizzes.length) return;
|
|
8352
8352
|
if (!d.retryAllowed && d.previousResult) {
|
|
8353
|
-
const
|
|
8354
|
-
for (const
|
|
8355
|
-
f
|
|
8356
|
-
qid:
|
|
8357
|
-
index:
|
|
8358
|
-
question:
|
|
8359
|
-
score:
|
|
8360
|
-
multi:
|
|
8361
|
-
selected:
|
|
8362
|
-
correctIdxes:
|
|
8363
|
-
isCorrect:
|
|
8364
|
-
ms:
|
|
8353
|
+
const p = {};
|
|
8354
|
+
for (const f of d.previousResult.perQuestion)
|
|
8355
|
+
p[f.qid] = {
|
|
8356
|
+
qid: f.qid,
|
|
8357
|
+
index: f.index,
|
|
8358
|
+
question: f.question,
|
|
8359
|
+
score: f.score,
|
|
8360
|
+
multi: f.correctIdxes.length > 1,
|
|
8361
|
+
selected: f.selected,
|
|
8362
|
+
correctIdxes: f.correctIdxes,
|
|
8363
|
+
isCorrect: f.isCorrect,
|
|
8364
|
+
ms: f.ms,
|
|
8365
8365
|
revealed: !0,
|
|
8366
|
-
timedOut:
|
|
8366
|
+
timedOut: f.timedOut
|
|
8367
8367
|
};
|
|
8368
8368
|
u({
|
|
8369
8369
|
phase: "finished",
|
|
8370
8370
|
correctCount: d.previousResult.correct,
|
|
8371
|
-
perQ:
|
|
8371
|
+
perQ: p,
|
|
8372
8372
|
startedAt: void 0,
|
|
8373
8373
|
finishedAt: void 0
|
|
8374
8374
|
});
|
|
8375
8375
|
return;
|
|
8376
8376
|
}
|
|
8377
|
-
const
|
|
8377
|
+
const m = d.quizzes[0];
|
|
8378
8378
|
u({
|
|
8379
8379
|
phase: "doing",
|
|
8380
8380
|
startedAt: Date.now(),
|
|
8381
8381
|
finishedAt: void 0,
|
|
8382
8382
|
questionStartedAt: Date.now(),
|
|
8383
|
-
remainingSec:
|
|
8383
|
+
remainingSec: m.limit_sec || void 0,
|
|
8384
8384
|
currentIndex: 0,
|
|
8385
8385
|
uiReveal: !1
|
|
8386
8386
|
});
|
|
@@ -8405,34 +8405,34 @@ function Bd(e, t) {
|
|
|
8405
8405
|
selectToggle: (l) => {
|
|
8406
8406
|
const d = a();
|
|
8407
8407
|
if (d.phase !== "doing" || d.uiReveal) return;
|
|
8408
|
-
const
|
|
8409
|
-
u({ answers: { ...d.answers, [
|
|
8408
|
+
const p = d.quizzes[d.order[d.currentIndex]].qid, f = d.answers[p] ?? [], v = f.includes(l) ? f.filter((y) => y !== l) : [...f, l].sort((y, c) => y - c);
|
|
8409
|
+
u({ answers: { ...d.answers, [p]: v } });
|
|
8410
8410
|
},
|
|
8411
8411
|
selectSingle: (l) => {
|
|
8412
8412
|
const d = a();
|
|
8413
8413
|
if (d.phase !== "doing" || d.uiReveal) return;
|
|
8414
|
-
const
|
|
8415
|
-
u({ answers: { ...d.answers, [
|
|
8414
|
+
const p = d.quizzes[d.order[d.currentIndex]].qid;
|
|
8415
|
+
u({ answers: { ...d.answers, [p]: [l] } });
|
|
8416
8416
|
},
|
|
8417
8417
|
submitCurrent: () => {
|
|
8418
8418
|
const l = a();
|
|
8419
8419
|
if (l.phase !== "doing") return;
|
|
8420
|
-
const d = l.order[l.currentIndex],
|
|
8421
|
-
qid:
|
|
8422
|
-
index:
|
|
8423
|
-
question:
|
|
8424
|
-
score:
|
|
8425
|
-
multi: cr(
|
|
8426
|
-
selected:
|
|
8420
|
+
const d = l.order[l.currentIndex], m = l.quizzes[d], p = m.qid, f = (l.answers[p] ?? []).slice().sort((w, C) => w - C), v = ur(m), y = Ad(f, v), c = l.questionStartedAt ? Date.now() - l.questionStartedAt : 0, g = l.perQ[p], h = {
|
|
8421
|
+
qid: p,
|
|
8422
|
+
index: m.index,
|
|
8423
|
+
question: m.question,
|
|
8424
|
+
score: m.score ?? 0,
|
|
8425
|
+
multi: cr(m),
|
|
8426
|
+
selected: f,
|
|
8427
8427
|
correctIdxes: v,
|
|
8428
8428
|
isCorrect: y,
|
|
8429
8429
|
ms: c,
|
|
8430
|
-
revealed: (
|
|
8431
|
-
timedOut: (
|
|
8430
|
+
revealed: (g == null ? void 0 : g.revealed) ?? !1,
|
|
8431
|
+
timedOut: (g == null ? void 0 : g.timedOut) ?? !1
|
|
8432
8432
|
};
|
|
8433
8433
|
if (u({
|
|
8434
8434
|
correctCount: l.correctCount + (y ? 1 : 0),
|
|
8435
|
-
perQ: { ...l.perQ, [
|
|
8435
|
+
perQ: { ...l.perQ, [p]: h }
|
|
8436
8436
|
}), l.currentIndex + 1 >= l.order.length)
|
|
8437
8437
|
u({ uiReveal: !1, remainingSec: void 0 }), a().finish();
|
|
8438
8438
|
else {
|
|
@@ -8449,20 +8449,20 @@ function Bd(e, t) {
|
|
|
8449
8449
|
const d = a();
|
|
8450
8450
|
if (d.phase === "doing") {
|
|
8451
8451
|
if (l) {
|
|
8452
|
-
const
|
|
8453
|
-
qid:
|
|
8454
|
-
index:
|
|
8455
|
-
question:
|
|
8456
|
-
score:
|
|
8457
|
-
multi: cr(
|
|
8458
|
-
selected: (
|
|
8459
|
-
correctIdxes: (
|
|
8460
|
-
isCorrect: (
|
|
8461
|
-
ms: (
|
|
8452
|
+
const m = d.quizzes[d.order[d.currentIndex]], p = m.qid, f = d.perQ[p], v = {
|
|
8453
|
+
qid: p,
|
|
8454
|
+
index: m.index,
|
|
8455
|
+
question: m.question,
|
|
8456
|
+
score: m.score ?? 0,
|
|
8457
|
+
multi: cr(m),
|
|
8458
|
+
selected: (f == null ? void 0 : f.selected) ?? [],
|
|
8459
|
+
correctIdxes: (f == null ? void 0 : f.correctIdxes) ?? ur(m),
|
|
8460
|
+
isCorrect: (f == null ? void 0 : f.isCorrect) ?? !1,
|
|
8461
|
+
ms: (f == null ? void 0 : f.ms) ?? 0,
|
|
8462
8462
|
revealed: !0,
|
|
8463
|
-
timedOut: (
|
|
8463
|
+
timedOut: (f == null ? void 0 : f.timedOut) ?? !1
|
|
8464
8464
|
};
|
|
8465
|
-
u({ perQ: { ...d.perQ, [
|
|
8465
|
+
u({ perQ: { ...d.perQ, [p]: v } });
|
|
8466
8466
|
}
|
|
8467
8467
|
u({ uiReveal: l });
|
|
8468
8468
|
}
|
|
@@ -8505,23 +8505,23 @@ function Bd(e, t) {
|
|
|
8505
8505
|
if (l.phase !== "doing" || l.remainingSec == null) return;
|
|
8506
8506
|
const d = l.remainingSec - 1;
|
|
8507
8507
|
if (d <= 0) {
|
|
8508
|
-
const
|
|
8509
|
-
qid:
|
|
8510
|
-
index:
|
|
8511
|
-
question:
|
|
8512
|
-
score:
|
|
8513
|
-
multi: cr(
|
|
8514
|
-
selected: (
|
|
8515
|
-
correctIdxes: (
|
|
8516
|
-
isCorrect: (
|
|
8517
|
-
ms: (
|
|
8508
|
+
const m = l.quizzes[l.order[l.currentIndex]], p = m.qid, f = l.perQ[p], v = {
|
|
8509
|
+
qid: p,
|
|
8510
|
+
index: m.index,
|
|
8511
|
+
question: m.question,
|
|
8512
|
+
score: m.score ?? 0,
|
|
8513
|
+
multi: cr(m),
|
|
8514
|
+
selected: (f == null ? void 0 : f.selected) ?? [],
|
|
8515
|
+
correctIdxes: (f == null ? void 0 : f.correctIdxes) ?? ur(m),
|
|
8516
|
+
isCorrect: (f == null ? void 0 : f.isCorrect) ?? !1,
|
|
8517
|
+
ms: (f == null ? void 0 : f.ms) ?? 0,
|
|
8518
8518
|
revealed: !0,
|
|
8519
8519
|
timedOut: !0
|
|
8520
8520
|
};
|
|
8521
8521
|
u({
|
|
8522
8522
|
remainingSec: 0,
|
|
8523
8523
|
uiReveal: !0,
|
|
8524
|
-
perQ: { ...l.perQ, [
|
|
8524
|
+
perQ: { ...l.perQ, [p]: v }
|
|
8525
8525
|
});
|
|
8526
8526
|
} else
|
|
8527
8527
|
u({ remainingSec: d });
|
|
@@ -8546,14 +8546,14 @@ function Gd({ children: e, initialState: t }) {
|
|
|
8546
8546
|
if (u.phase !== "doing" && s.phase === "doing" && ((a = r.current) == null || a.call(r)), u.phase !== "finished" && s.phase === "finished") {
|
|
8547
8547
|
const l = o.current;
|
|
8548
8548
|
if (!l || !s.retryAllowed && s.previousResult && !s.startedAt) return;
|
|
8549
|
-
const { sectionId: d, quizzes:
|
|
8549
|
+
const { sectionId: d, quizzes: m, order: p, perQ: f, startedAt: v, finishedAt: y } = s, c = p.map((S) => m[S]), g = c.length, h = c.filter((S) => {
|
|
8550
8550
|
var k;
|
|
8551
|
-
return (k =
|
|
8551
|
+
return (k = f[S.qid]) == null ? void 0 : k.isCorrect;
|
|
8552
8552
|
}).length, w = c.reduce((S, k) => S + (k.score ?? 0), 0), C = c.reduce((S, k) => {
|
|
8553
|
-
const T =
|
|
8553
|
+
const T = f[k.qid];
|
|
8554
8554
|
return S + (T != null && T.isCorrect ? k.score ?? 0 : 0);
|
|
8555
8555
|
}, 0), R = typeof v == "number" && typeof y == "number" ? Math.max(0, y - v) : 0, O = c.map((S) => {
|
|
8556
|
-
const k =
|
|
8556
|
+
const k = f[S.qid];
|
|
8557
8557
|
return {
|
|
8558
8558
|
qid: S.qid,
|
|
8559
8559
|
index: S.index,
|
|
@@ -8567,9 +8567,9 @@ function Gd({ children: e, initialState: t }) {
|
|
|
8567
8567
|
};
|
|
8568
8568
|
}), b = {
|
|
8569
8569
|
sectionId: d ?? "",
|
|
8570
|
-
total:
|
|
8571
|
-
correct:
|
|
8572
|
-
rate:
|
|
8570
|
+
total: g,
|
|
8571
|
+
correct: h,
|
|
8572
|
+
rate: g > 0 ? Math.round(h / g * 100) : 0,
|
|
8573
8573
|
totalScore: w,
|
|
8574
8574
|
gainedScore: C,
|
|
8575
8575
|
timeMsTotal: R,
|
|
@@ -8646,50 +8646,50 @@ function Hd() {
|
|
|
8646
8646
|
const { viewerState: l } = a;
|
|
8647
8647
|
if (l) {
|
|
8648
8648
|
l.mode && t.getState().setMode(l.mode);
|
|
8649
|
-
const { ...
|
|
8650
|
-
t.setState(
|
|
8649
|
+
const { ...p } = l;
|
|
8650
|
+
t.setState(p);
|
|
8651
8651
|
}
|
|
8652
8652
|
if (typeof a.globalIndex == "number" && n.getState().progress.setCurrentGlobalRunIndex(a.globalIndex, "playback"), (l == null ? void 0 : l.mode) === "scroll" || !(l != null && l.mode)) {
|
|
8653
|
-
const
|
|
8654
|
-
const
|
|
8655
|
-
if (!
|
|
8653
|
+
const p = () => {
|
|
8654
|
+
const f = n.getState().progress.getSectionScrollApi();
|
|
8655
|
+
if (!f) return !1;
|
|
8656
8656
|
if (a.scrollY === 0)
|
|
8657
|
-
|
|
8658
|
-
else if (
|
|
8657
|
+
f.setScrollTop(0);
|
|
8658
|
+
else if (f.scrollToGIAtOffset) {
|
|
8659
8659
|
const v = a.anchorGI ?? a.globalIndex;
|
|
8660
8660
|
if (typeof v == "number") {
|
|
8661
8661
|
const y = a.anchorOffsetRatio ?? 0;
|
|
8662
|
-
|
|
8662
|
+
f.scrollToGIAtOffset(v, y);
|
|
8663
8663
|
}
|
|
8664
8664
|
}
|
|
8665
8665
|
return !0;
|
|
8666
8666
|
};
|
|
8667
|
-
if (!
|
|
8668
|
-
let
|
|
8667
|
+
if (!p()) {
|
|
8668
|
+
let f = 0;
|
|
8669
8669
|
const v = setInterval(() => {
|
|
8670
|
-
(
|
|
8670
|
+
(p() || ++f >= 10) && clearInterval(v);
|
|
8671
8671
|
}, 50);
|
|
8672
8672
|
}
|
|
8673
8673
|
}
|
|
8674
8674
|
a.audio && o && o.getState()._setStatusOnly(a.audio.status);
|
|
8675
|
-
const
|
|
8676
|
-
a.range ?
|
|
8675
|
+
const m = n.getState().progress;
|
|
8676
|
+
a.range ? m.setRange(a.range.startGI, a.range.endGI) : m.clearRange(), a.translate && a.translate.isOpen ? m.setTranslateState({
|
|
8677
8677
|
isOpen: !0,
|
|
8678
8678
|
isLoading: a.translate.isLoading,
|
|
8679
8679
|
text: a.translate.text,
|
|
8680
8680
|
translatedText: a.translate.translatedText,
|
|
8681
8681
|
startGI: a.translate.startGI,
|
|
8682
8682
|
endGI: a.translate.endGI
|
|
8683
|
-
}) :
|
|
8683
|
+
}) : m.clearTranslate();
|
|
8684
8684
|
},
|
|
8685
8685
|
[t, n, o]
|
|
8686
8686
|
), s = ne(() => {
|
|
8687
8687
|
var R, O, b, S;
|
|
8688
|
-
const a = t.getState(), l = n.getState().progress, d = (R = l.getSectionScrollApi) == null ? void 0 : R.call(l),
|
|
8688
|
+
const a = t.getState(), l = n.getState().progress, d = (R = l.getSectionScrollApi) == null ? void 0 : R.call(l), m = l.currentGlobalRunIndex ?? 0, p = ((O = d == null ? void 0 : d.getScrollTop) == null ? void 0 : O.call(d)) ?? 0, f = ((b = d == null ? void 0 : d.getAnchorOffsetRatio) == null ? void 0 : b.call(d, m)) ?? 0, v = o == null ? void 0 : o.getState(), y = v ? {
|
|
8689
8689
|
status: v.status,
|
|
8690
8690
|
currentClip: v.currentClip,
|
|
8691
8691
|
currentTimeMs: v.currentTimeMs
|
|
8692
|
-
} : void 0, { rangeStartGI: c, rangeEndGI:
|
|
8692
|
+
} : void 0, { rangeStartGI: c, rangeEndGI: g } = l, h = c != null && g != null ? { startGI: c, endGI: g, text: l.getRangeText() } : null, w = ((S = d == null ? void 0 : d.getScrollRatio) == null ? void 0 : S.call(d)) ?? 0, C = l.translateOpen ? {
|
|
8693
8693
|
isOpen: !0,
|
|
8694
8694
|
isLoading: l.translateLoading,
|
|
8695
8695
|
text: l.translateText,
|
|
@@ -8720,18 +8720,18 @@ function Hd() {
|
|
|
8720
8720
|
viewportWidth: a.viewportWidth,
|
|
8721
8721
|
viewportHeight: a.viewportHeight
|
|
8722
8722
|
},
|
|
8723
|
-
globalIndex:
|
|
8724
|
-
scrollY:
|
|
8723
|
+
globalIndex: m,
|
|
8724
|
+
scrollY: p,
|
|
8725
8725
|
scrollRatio: w,
|
|
8726
|
-
anchorGI:
|
|
8727
|
-
anchorOffsetRatio:
|
|
8726
|
+
anchorGI: m,
|
|
8727
|
+
anchorOffsetRatio: f,
|
|
8728
8728
|
currentPage: l.pageIndex ?? 0,
|
|
8729
8729
|
totalPages: l.totalPages,
|
|
8730
8730
|
sectionId: l.sectionId ?? "",
|
|
8731
8731
|
viewportWidth: a.viewportWidth,
|
|
8732
8732
|
viewportHeight: a.viewportHeight,
|
|
8733
8733
|
audio: y,
|
|
8734
|
-
range:
|
|
8734
|
+
range: h,
|
|
8735
8735
|
translate: C
|
|
8736
8736
|
};
|
|
8737
8737
|
}, [t, n, o]), u = ne(
|
|
@@ -8744,13 +8744,13 @@ function Hd() {
|
|
|
8744
8744
|
}
|
|
8745
8745
|
case "scroll": {
|
|
8746
8746
|
if (t.getState().mode === "page") break;
|
|
8747
|
-
const { scrollTop: d, anchorGI:
|
|
8748
|
-
|
|
8747
|
+
const { scrollTop: d, anchorGI: m, anchorOffsetRatio: p } = a.payload, f = n.getState().progress.getSectionScrollApi();
|
|
8748
|
+
f && (d === 0 ? f.setScrollTop(0) : f.scrollToGIAtOffset && typeof m == "number" && f.scrollToGIAtOffset(m, p));
|
|
8749
8749
|
break;
|
|
8750
8750
|
}
|
|
8751
8751
|
case "settings_change": {
|
|
8752
|
-
const { key: l, value: d } = a.payload,
|
|
8753
|
-
l in
|
|
8752
|
+
const { key: l, value: d } = a.payload, m = t.getState();
|
|
8753
|
+
l in m && typeof m[l] != "function" && t.setState({ [l]: d });
|
|
8754
8754
|
break;
|
|
8755
8755
|
}
|
|
8756
8756
|
case "mode_change": {
|
|
@@ -8783,9 +8783,9 @@ function Hd() {
|
|
|
8783
8783
|
case "range_change": {
|
|
8784
8784
|
const { startGI: l, endGI: d } = a.payload;
|
|
8785
8785
|
console.log(`[DirectPlayback] ${a.type}: GI ${l}~${d}`), n.getState().progress.setRange(l, d);
|
|
8786
|
-
const
|
|
8786
|
+
const m = n.getState().progress;
|
|
8787
8787
|
console.log(
|
|
8788
|
-
`[DirectPlayback] after setRange: rangeStartGI=${
|
|
8788
|
+
`[DirectPlayback] after setRange: rangeStartGI=${m.rangeStartGI}, rangeEndGI=${m.rangeEndGI}`
|
|
8789
8789
|
);
|
|
8790
8790
|
break;
|
|
8791
8791
|
}
|
|
@@ -8795,8 +8795,8 @@ function Hd() {
|
|
|
8795
8795
|
}
|
|
8796
8796
|
// 번역 이벤트: 재생 시 store에 상태 반영
|
|
8797
8797
|
case "translate_request": {
|
|
8798
|
-
const { text: l, startGI: d, endGI:
|
|
8799
|
-
n.getState().progress.setTranslateState({ isOpen: !0, isLoading: !0, text: l, startGI: d, endGI:
|
|
8798
|
+
const { text: l, startGI: d, endGI: m } = a.payload;
|
|
8799
|
+
n.getState().progress.setTranslateState({ isOpen: !0, isLoading: !0, text: l, startGI: d, endGI: m });
|
|
8800
8800
|
break;
|
|
8801
8801
|
}
|
|
8802
8802
|
case "translate_loading_start": {
|
|
@@ -8834,8 +8834,8 @@ function Hd() {
|
|
|
8834
8834
|
l();
|
|
8835
8835
|
return;
|
|
8836
8836
|
}
|
|
8837
|
-
const d = n.subscribe((
|
|
8838
|
-
|
|
8837
|
+
const d = n.subscribe((m) => {
|
|
8838
|
+
m.progress.sectionLoading || (d(), l());
|
|
8839
8839
|
});
|
|
8840
8840
|
})
|
|
8841
8841
|
}, e.getState().isPlaybackMode && (e.getState().setDispatchHandler(u), e.getState().setApplySnapshotHandler(i)), () => {
|
|
@@ -8873,14 +8873,14 @@ function Fd({
|
|
|
8873
8873
|
return fe(() => {
|
|
8874
8874
|
const d = e.current;
|
|
8875
8875
|
if (!d) return;
|
|
8876
|
-
let
|
|
8877
|
-
return
|
|
8878
|
-
|
|
8879
|
-
const
|
|
8880
|
-
l.setState({ wordAvgDistancePx:
|
|
8876
|
+
let m, p;
|
|
8877
|
+
return m = requestAnimationFrame(() => {
|
|
8878
|
+
p = requestAnimationFrame(() => {
|
|
8879
|
+
const f = Nd(d);
|
|
8880
|
+
l.setState({ wordAvgDistancePx: f });
|
|
8881
8881
|
});
|
|
8882
8882
|
}), () => {
|
|
8883
|
-
cancelAnimationFrame(
|
|
8883
|
+
cancelAnimationFrame(m), cancelAnimationFrame(p);
|
|
8884
8884
|
};
|
|
8885
8885
|
}, [
|
|
8886
8886
|
e,
|
|
@@ -8899,57 +8899,57 @@ const Wd = ({
|
|
|
8899
8899
|
containerRef: e,
|
|
8900
8900
|
onTranslate: t
|
|
8901
8901
|
}) => {
|
|
8902
|
-
const n = j((
|
|
8902
|
+
const n = j((p) => p.rangeStartGI), r = j((p) => p.rangeEndGI), o = j((p) => p.getRangeText), i = j((p) => p.clearRange), s = It(), u = n != null && r != null, [a, l] = pt(null);
|
|
8903
8903
|
fe(() => {
|
|
8904
8904
|
if (!u) return;
|
|
8905
|
-
const
|
|
8906
|
-
if (!
|
|
8907
|
-
let
|
|
8905
|
+
const p = e.current;
|
|
8906
|
+
if (!p) return;
|
|
8907
|
+
let f = !0;
|
|
8908
8908
|
const v = new ResizeObserver(() => {
|
|
8909
|
-
if (
|
|
8910
|
-
|
|
8909
|
+
if (f) {
|
|
8910
|
+
f = !1;
|
|
8911
8911
|
return;
|
|
8912
8912
|
}
|
|
8913
8913
|
i();
|
|
8914
8914
|
});
|
|
8915
|
-
return v.observe(
|
|
8915
|
+
return v.observe(p), () => v.disconnect();
|
|
8916
8916
|
}, [u, i, e]), fe(() => {
|
|
8917
8917
|
if (!u || n == null || r == null) {
|
|
8918
8918
|
l(null);
|
|
8919
8919
|
return;
|
|
8920
8920
|
}
|
|
8921
|
-
const
|
|
8921
|
+
const p = () => {
|
|
8922
8922
|
const v = e.current;
|
|
8923
8923
|
if (!v) return;
|
|
8924
|
-
const y = v.getBoundingClientRect(),
|
|
8925
|
-
if (!
|
|
8926
|
-
l({ x: y.width *
|
|
8924
|
+
const y = v.getBoundingClientRect(), g = 1 / (s.getState().playbackScale || 1), h = v.querySelector(`[data-g="${r}"]`);
|
|
8925
|
+
if (!h) {
|
|
8926
|
+
l({ x: y.width * g / 2, y: 80 });
|
|
8927
8927
|
return;
|
|
8928
8928
|
}
|
|
8929
|
-
const w =
|
|
8930
|
-
let O = (w.left + w.width / 2 - y.left) *
|
|
8931
|
-
R && (O = ((R.left + w.right) / 2 - y.left) *
|
|
8932
|
-
const b = 160, S = 50, k = 16, T = 12, M = y.width *
|
|
8929
|
+
const w = h.getBoundingClientRect(), C = v.querySelector(`[data-g="${n}"]`), R = C == null ? void 0 : C.getBoundingClientRect();
|
|
8930
|
+
let O = (w.left + w.width / 2 - y.left) * g;
|
|
8931
|
+
R && (O = ((R.left + w.right) / 2 - y.left) * g);
|
|
8932
|
+
const b = 160, S = 50, k = 16, T = 12, M = y.width * g, P = Math.max(
|
|
8933
8933
|
k + b / 2,
|
|
8934
8934
|
Math.min(O, M - k - b / 2)
|
|
8935
|
-
), I = (((R == null ? void 0 : R.top) ?? w.top) - y.top) *
|
|
8935
|
+
), I = (((R == null ? void 0 : R.top) ?? w.top) - y.top) * g - S - T;
|
|
8936
8936
|
let _ = I;
|
|
8937
|
-
I < k && (_ = (w.bottom - y.top) *
|
|
8937
|
+
I < k && (_ = (w.bottom - y.top) * g + T), l({ x: P, y: _ });
|
|
8938
8938
|
};
|
|
8939
|
-
|
|
8940
|
-
const
|
|
8941
|
-
return
|
|
8942
|
-
|
|
8939
|
+
p();
|
|
8940
|
+
const f = e.current;
|
|
8941
|
+
return f && f.addEventListener("scroll", p, !0), () => {
|
|
8942
|
+
f && f.removeEventListener("scroll", p, !0);
|
|
8943
8943
|
};
|
|
8944
8944
|
}, [u, n, r, e, s]);
|
|
8945
8945
|
const d = ne(() => {
|
|
8946
|
-
const
|
|
8947
|
-
|
|
8948
|
-
console.error("복사 실패:",
|
|
8946
|
+
const p = o();
|
|
8947
|
+
p && navigator.clipboard.writeText(p).catch((f) => {
|
|
8948
|
+
console.error("복사 실패:", f);
|
|
8949
8949
|
}), i();
|
|
8950
|
-
}, [o, i]),
|
|
8951
|
-
const
|
|
8952
|
-
|
|
8950
|
+
}, [o, i]), m = ne(() => {
|
|
8951
|
+
const p = o();
|
|
8952
|
+
p && t && t(p);
|
|
8953
8953
|
}, [o, t]);
|
|
8954
8954
|
return !u || !a ? null : /* @__PURE__ */ ee(
|
|
8955
8955
|
"div",
|
|
@@ -8990,7 +8990,7 @@ const Wd = ({
|
|
|
8990
8990
|
/* @__PURE__ */ x(
|
|
8991
8991
|
"button",
|
|
8992
8992
|
{
|
|
8993
|
-
onClick:
|
|
8993
|
+
onClick: m,
|
|
8994
8994
|
style: {
|
|
8995
8995
|
padding: "8px 16px",
|
|
8996
8996
|
backgroundColor: "#10b981",
|
|
@@ -9021,8 +9021,8 @@ function Dd() {
|
|
|
9021
9021
|
if (s.closest("[data-g]")) {
|
|
9022
9022
|
const a = (u = s.closest("[data-g]")) == null ? void 0 : u.getAttribute("data-g");
|
|
9023
9023
|
if (a) {
|
|
9024
|
-
const l = parseInt(a, 10), d = Math.min(e, t),
|
|
9025
|
-
if (l >= d && l <=
|
|
9024
|
+
const l = parseInt(a, 10), d = Math.min(e, t), m = Math.max(e, t);
|
|
9025
|
+
if (l >= d && l <= m)
|
|
9026
9026
|
return;
|
|
9027
9027
|
}
|
|
9028
9028
|
}
|
|
@@ -9193,15 +9193,15 @@ function Qd({
|
|
|
9193
9193
|
onQuizComplete: a,
|
|
9194
9194
|
quizRetryAllowed: l,
|
|
9195
9195
|
previousQuizResult: d,
|
|
9196
|
-
onViewerEvent:
|
|
9197
|
-
viewerRef:
|
|
9198
|
-
gazeSync:
|
|
9196
|
+
onViewerEvent: m,
|
|
9197
|
+
viewerRef: p,
|
|
9198
|
+
gazeSync: f,
|
|
9199
9199
|
onRequestTranslate: v,
|
|
9200
9200
|
isPlaybackMode: y = !1,
|
|
9201
9201
|
playbackScale: c,
|
|
9202
|
-
isDev:
|
|
9202
|
+
isDev: g = !1
|
|
9203
9203
|
}) {
|
|
9204
|
-
const
|
|
9204
|
+
const h = String((e == null ? void 0 : e.section_id) ?? "0"), w = me(() => {
|
|
9205
9205
|
var k, T;
|
|
9206
9206
|
const b = ((k = e == null ? void 0 : e.ast) == null ? void 0 : k.blocks) ?? [];
|
|
9207
9207
|
let S = 0;
|
|
@@ -9230,18 +9230,18 @@ function Qd({
|
|
|
9230
9230
|
return /* @__PURE__ */ x(
|
|
9231
9231
|
ls,
|
|
9232
9232
|
{
|
|
9233
|
-
onViewerEvent:
|
|
9233
|
+
onViewerEvent: m,
|
|
9234
9234
|
isPlaybackMode: y,
|
|
9235
9235
|
playbackScale: c,
|
|
9236
|
-
viewerRef:
|
|
9237
|
-
children: /* @__PURE__ */ x(xu, { initialState: { ...t, isDev:
|
|
9236
|
+
viewerRef: p,
|
|
9237
|
+
children: /* @__PURE__ */ x(xu, { initialState: { ...t, isDev: g }, children: /* @__PURE__ */ x(
|
|
9238
9238
|
yu,
|
|
9239
9239
|
{
|
|
9240
9240
|
initialState: R,
|
|
9241
|
-
gazeSync:
|
|
9242
|
-
children: /* @__PURE__ */ x(gu, { initialState: O, children: /* @__PURE__ */ x(Gd, { initialState: { section: e, onQuizStart: u, onQuizComplete: a, quizRetryAllowed: l, previousQuizResult: d }, children: /* @__PURE__ */ x(qd, { onRequestTranslate: v }) },
|
|
9241
|
+
gazeSync: f,
|
|
9242
|
+
children: /* @__PURE__ */ x(gu, { initialState: O, children: /* @__PURE__ */ x(Gd, { initialState: { section: e, onQuizStart: u, onQuizComplete: a, quizRetryAllowed: l, previousQuizResult: d }, children: /* @__PURE__ */ x(qd, { onRequestTranslate: v }) }, h) }, h)
|
|
9243
9243
|
},
|
|
9244
|
-
|
|
9244
|
+
h
|
|
9245
9245
|
) })
|
|
9246
9246
|
}
|
|
9247
9247
|
);
|
|
@@ -9252,17 +9252,17 @@ function qd({
|
|
|
9252
9252
|
const t = X((v) => v.mode), n = ie(null), r = It(), o = yt(), i = j((v) => v.translateOpen), s = j((v) => v.translateLoading), u = j((v) => v.translateText), a = j((v) => v.translatedText), l = ie(null), d = ne(
|
|
9253
9253
|
(v) => {
|
|
9254
9254
|
var C;
|
|
9255
|
-
const { rangeStartGI: y, rangeEndGI: c } = o.getState().progress,
|
|
9255
|
+
const { rangeStartGI: y, rangeEndGI: c } = o.getState().progress, g = y ?? 0, h = c ?? 0;
|
|
9256
9256
|
if (r.getState().emit({
|
|
9257
9257
|
type: "translate_request",
|
|
9258
|
-
payload: { text: v, startGI:
|
|
9258
|
+
payload: { text: v, startGI: g, endGI: h }
|
|
9259
9259
|
}), !e) {
|
|
9260
9260
|
o.getState().progress.setTranslateState({
|
|
9261
9261
|
isOpen: !0,
|
|
9262
9262
|
isLoading: !1,
|
|
9263
9263
|
text: v,
|
|
9264
|
-
startGI:
|
|
9265
|
-
endGI:
|
|
9264
|
+
startGI: g,
|
|
9265
|
+
endGI: h
|
|
9266
9266
|
});
|
|
9267
9267
|
return;
|
|
9268
9268
|
}
|
|
@@ -9270,8 +9270,8 @@ function qd({
|
|
|
9270
9270
|
isOpen: !0,
|
|
9271
9271
|
isLoading: !0,
|
|
9272
9272
|
text: v,
|
|
9273
|
-
startGI:
|
|
9274
|
-
endGI:
|
|
9273
|
+
startGI: g,
|
|
9274
|
+
endGI: h
|
|
9275
9275
|
}), (C = l.current) == null || C.abort();
|
|
9276
9276
|
const w = new AbortController();
|
|
9277
9277
|
l.current = w, e(v, w.signal).then((R) => {
|
|
@@ -9285,8 +9285,8 @@ function qd({
|
|
|
9285
9285
|
isLoading: !1,
|
|
9286
9286
|
text: v,
|
|
9287
9287
|
translatedText: R,
|
|
9288
|
-
startGI:
|
|
9289
|
-
endGI:
|
|
9288
|
+
startGI: g,
|
|
9289
|
+
endGI: h
|
|
9290
9290
|
}), r.getState().emit({
|
|
9291
9291
|
type: "translate_loading_end",
|
|
9292
9292
|
payload: { originalText: v, translatedText: R }
|
|
@@ -9300,13 +9300,13 @@ function qd({
|
|
|
9300
9300
|
isLoading: !1,
|
|
9301
9301
|
text: v,
|
|
9302
9302
|
translatedText: `[오류] ${O}`,
|
|
9303
|
-
startGI:
|
|
9304
|
-
endGI:
|
|
9303
|
+
startGI: g,
|
|
9304
|
+
endGI: h
|
|
9305
9305
|
});
|
|
9306
9306
|
});
|
|
9307
9307
|
},
|
|
9308
9308
|
[r, o, e]
|
|
9309
|
-
),
|
|
9309
|
+
), m = ne(() => {
|
|
9310
9310
|
var v;
|
|
9311
9311
|
(v = l.current) == null || v.abort(), l.current = null, o.getState().progress.clearTranslate(), r.getState().emit({
|
|
9312
9312
|
type: "translate_modal_close",
|
|
@@ -9349,7 +9349,7 @@ function qd({
|
|
|
9349
9349
|
{
|
|
9350
9350
|
isOpen: i,
|
|
9351
9351
|
isLoading: s,
|
|
9352
|
-
onClose:
|
|
9352
|
+
onClose: m,
|
|
9353
9353
|
text: u,
|
|
9354
9354
|
translatedText: a
|
|
9355
9355
|
}
|