markdown-flow-ui 0.1.115-beta.1 → 0.1.115-beta.2
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/_virtual/index.cjs10.js +1 -1
- package/dist/_virtual/index.cjs9.js +1 -1
- package/dist/_virtual/index.es10.js +2 -2
- package/dist/_virtual/index.es9.js +2 -2
- package/dist/components/Slide/Slide.cjs.js +1 -1
- package/dist/components/Slide/Slide.cjs.js.map +1 -1
- package/dist/components/Slide/Slide.es.js +171 -171
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.cjs.js.map +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/@braintree_sanitize-url@7.1.1/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.cjs.js +1 -1
- package/dist/markdown-flow-ui/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -3,10 +3,10 @@ import { memo as pn, useRef as p, useMemo as c, useState as m, useCallback as r,
|
|
|
3
3
|
import { isSandboxInteractionMessage as hn } from "../../lib/sandboxInteraction.es.js";
|
|
4
4
|
import { cn as J } from "../../lib/utils.es.js";
|
|
5
5
|
import vn from "../ui/loading-overlay-card.es.js";
|
|
6
|
-
import
|
|
6
|
+
import gn from "../ContentRender/ContentRender.es.js";
|
|
7
7
|
import wt from "../ContentRender/IframeSandbox.es.js";
|
|
8
8
|
import "../ui/inputGroup/input-group.es.js";
|
|
9
|
-
import { getInteractionDefaultValues as
|
|
9
|
+
import { getInteractionDefaultValues as yn, getInteractionDefaultSelectedValues as Sn } from "../../lib/interaction-defaults.es.js";
|
|
10
10
|
import { isMobileDevice as bn, isLandscapeViewport as It, subscribeMobileDeviceChange as An } from "../../lib/mobileDevice.es.js";
|
|
11
11
|
import xn from "./Player.es.js";
|
|
12
12
|
import wn from "./SubtitleOverlay.es.js";
|
|
@@ -25,27 +25,27 @@ const Nn = 2e3, On = 300, jn = 160, Ln = 16, Ve = "waitingForAudio", _t = {
|
|
|
25
25
|
waitingForAudio: "Waiting for current slide audio...",
|
|
26
26
|
loadingAudio: "Loading current slide audio...",
|
|
27
27
|
waitingForMoreAudio: "Waiting for more current slide audio..."
|
|
28
|
-
}, Kn = (
|
|
28
|
+
}, Kn = (S, w) => typeof S == "string" ? S : S[w] ?? S[Ve] ?? _t[w], Vn = (S, w) => w ? S !== "loadingAudio" : !1, Et = pn(
|
|
29
29
|
({
|
|
30
|
-
content:
|
|
31
|
-
title:
|
|
32
|
-
defaultButtonText:
|
|
30
|
+
content: S,
|
|
31
|
+
title: w,
|
|
32
|
+
defaultButtonText: I,
|
|
33
33
|
defaultInputText: Q,
|
|
34
|
-
defaultSelectedValues:
|
|
34
|
+
defaultSelectedValues: _,
|
|
35
35
|
confirmButtonText: V,
|
|
36
36
|
copyButtonText: Z,
|
|
37
37
|
copiedButtonText: Ie,
|
|
38
38
|
onSend: _e,
|
|
39
39
|
readonly: D = !1
|
|
40
40
|
}) => /* @__PURE__ */ n.jsxs("div", { className: "slide-player__interaction-card", children: [
|
|
41
|
-
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children:
|
|
41
|
+
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: w }) }),
|
|
42
42
|
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ n.jsx(
|
|
43
|
-
|
|
43
|
+
gn,
|
|
44
44
|
{
|
|
45
|
-
content:
|
|
46
|
-
defaultButtonText:
|
|
45
|
+
content: S,
|
|
46
|
+
defaultButtonText: I,
|
|
47
47
|
defaultInputText: Q,
|
|
48
|
-
defaultSelectedValues:
|
|
48
|
+
defaultSelectedValues: _,
|
|
49
49
|
confirmButtonText: V,
|
|
50
50
|
copyButtonText: Z,
|
|
51
51
|
copiedButtonText: Ie,
|
|
@@ -58,15 +58,15 @@ const Nn = 2e3, On = 300, jn = 160, Ln = 16, Ve = "waitingForAudio", _t = {
|
|
|
58
58
|
] })
|
|
59
59
|
);
|
|
60
60
|
Et.displayName = "InteractionOverlayCard";
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
return
|
|
64
|
-
}),
|
|
65
|
-
elementList:
|
|
66
|
-
showPlayer:
|
|
67
|
-
playerAlwaysVisible:
|
|
61
|
+
const Dn = (S, w) => S.length === w.length && S.every((I, Q) => {
|
|
62
|
+
const _ = w[Q];
|
|
63
|
+
return I.sequence_number === _?.sequence_number && I.type === _?.type && I.content === _?.content;
|
|
64
|
+
}), mr = ({
|
|
65
|
+
elementList: S = [],
|
|
66
|
+
showPlayer: w = !0,
|
|
67
|
+
playerAlwaysVisible: I = !1,
|
|
68
68
|
playerClassName: Q,
|
|
69
|
-
fullscreenHeader:
|
|
69
|
+
fullscreenHeader: _,
|
|
70
70
|
playerCustomActions: V,
|
|
71
71
|
playerCustomActionPauseOnActive: Z = !0,
|
|
72
72
|
bufferingText: Ie = _t,
|
|
@@ -81,7 +81,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
81
81
|
onMobileViewModeChange: Ue,
|
|
82
82
|
onStepChange: ze,
|
|
83
83
|
enableIframeScaling: Rt = !0,
|
|
84
|
-
disableLoadingOverlay:
|
|
84
|
+
disableLoadingOverlay: R = !1,
|
|
85
85
|
className: Ct,
|
|
86
86
|
onPointerDown: Ge,
|
|
87
87
|
...Pt
|
|
@@ -97,21 +97,21 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
97
97
|
currentIndex: d,
|
|
98
98
|
audioList: h,
|
|
99
99
|
currentAudioSequenceIndexes: pe,
|
|
100
|
-
currentStepHasSpeakableElement:
|
|
100
|
+
currentStepHasSpeakableElement: b,
|
|
101
101
|
currentInteractionElement: u,
|
|
102
102
|
canGoPrev: Mt,
|
|
103
|
-
canGoNext:
|
|
103
|
+
canGoNext: x,
|
|
104
104
|
handlePrev: Ze,
|
|
105
|
-
handleNext:
|
|
106
|
-
} = In(
|
|
105
|
+
handleNext: C
|
|
106
|
+
} = In(S), oe = c(() => {
|
|
107
107
|
if (!(d < 0))
|
|
108
108
|
return N[d];
|
|
109
109
|
}, [d, N]), Ft = N.filter(
|
|
110
110
|
(e) => e.is_renderable !== !1
|
|
111
|
-
).length === 1,
|
|
111
|
+
).length === 1, E = w && (N.length > 0 || h.length > 0 || !!u), P = c(
|
|
112
112
|
() => pe.map((e) => h[e]?.audioKey).filter((e) => !!e),
|
|
113
113
|
[h, pe]
|
|
114
|
-
), [et, he] = m(!0), [ve, se] = m(!1), [ie, tt] = m(!0), [v, U] = m(null), [kt,
|
|
114
|
+
), [et, he] = m(!0), [ve, se] = m(!1), [ie, tt] = m(!0), [v, U] = m(null), [kt, g] = m(!1), [Bt, Ce] = m(Ve), [M, nt] = m(!1), [Nt, Pe] = m(!1), [rt, Ot] = m(!0), [Me, Fe] = m(!1), [o, ke] = m(), [ge, ye] = m(!1), [
|
|
115
115
|
jt,
|
|
116
116
|
le
|
|
117
117
|
] = m(0), [ot, Lt] = m(!1), O = c(() => bn(), []), [Se, Be] = m(
|
|
@@ -135,7 +135,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
135
135
|
Kt,
|
|
136
136
|
Se
|
|
137
137
|
]
|
|
138
|
-
), Dt = p(G),
|
|
138
|
+
), Dt = p(G), F = E && (I || et), qt = H && F, Ut = H && F, zt = H || lt, ct = ot && !O, Gt = r(
|
|
139
139
|
(e) => {
|
|
140
140
|
Ne(!0), Be(e);
|
|
141
141
|
},
|
|
@@ -143,8 +143,8 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
143
143
|
), at = r(() => {
|
|
144
144
|
Ne(!1), Be(we);
|
|
145
145
|
}, []), Ht = r(() => {
|
|
146
|
-
at(),
|
|
147
|
-
}, [
|
|
146
|
+
at(), _?.onBack?.();
|
|
147
|
+
}, [_, at]), ut = r((e) => {
|
|
148
148
|
Fe(e);
|
|
149
149
|
}, []), dt = r(() => {
|
|
150
150
|
Fe((e) => !e);
|
|
@@ -152,7 +152,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
152
152
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
153
153
|
return Qe.forEach((l, f) => {
|
|
154
154
|
const i = e.findIndex(
|
|
155
|
-
(a) =>
|
|
155
|
+
(a) => Dn(
|
|
156
156
|
a.elementList,
|
|
157
157
|
l
|
|
158
158
|
)
|
|
@@ -169,18 +169,18 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
169
169
|
mountedStepStates: e,
|
|
170
170
|
currentMountedStateIndex: d >= 0 ? t.get(d) ?? -1 : -1
|
|
171
171
|
};
|
|
172
|
-
}, [d, Qe]), ft = c(() => String(d), [d]),
|
|
172
|
+
}, [d, Qe]), ft = c(() => String(d), [d]), y = c(() => v ? h.findIndex(
|
|
173
173
|
(e) => (e.audioKey ?? "") === v
|
|
174
174
|
) : -1, [h, v]), Oe = c(
|
|
175
|
-
() =>
|
|
176
|
-
[h,
|
|
175
|
+
() => y >= 0 ? h[y] : void 0,
|
|
176
|
+
[h, y]
|
|
177
177
|
), Yt = Oe?.element?.subtitle_cues ?? [], be = c(
|
|
178
|
-
() =>
|
|
179
|
-
[
|
|
178
|
+
() => P[0] ?? "none",
|
|
179
|
+
[P]
|
|
180
180
|
), je = c(
|
|
181
181
|
() => ({
|
|
182
182
|
currentElement: Pn({
|
|
183
|
-
currentAudioIndex:
|
|
183
|
+
currentAudioIndex: y,
|
|
184
184
|
currentAudioSequenceIndexes: pe,
|
|
185
185
|
audioList: h,
|
|
186
186
|
currentInteractionElement: o,
|
|
@@ -195,7 +195,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
195
195
|
[
|
|
196
196
|
o,
|
|
197
197
|
h,
|
|
198
|
-
|
|
198
|
+
y,
|
|
199
199
|
pe,
|
|
200
200
|
d,
|
|
201
201
|
oe,
|
|
@@ -217,7 +217,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
217
217
|
)
|
|
218
218
|
}),
|
|
219
219
|
[Le]
|
|
220
|
-
), mt =
|
|
220
|
+
), mt = P.length > 0, pt = c(() => u ? `${u.sequence_number ?? "none"}:${String(
|
|
221
221
|
u.content ?? ""
|
|
222
222
|
)}` : "none", [u]), ce = c(
|
|
223
223
|
() => [ft, pt].join("|"),
|
|
@@ -226,91 +226,91 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
226
226
|
() => [
|
|
227
227
|
ce,
|
|
228
228
|
Oe?.audioKey ?? "none",
|
|
229
|
-
String(
|
|
229
|
+
String(y)
|
|
230
230
|
].join("|"),
|
|
231
|
-
[
|
|
231
|
+
[y, Oe?.audioKey, ce]
|
|
232
232
|
), ht = !!c(() => !be || be === "none" ? "" : h.find(
|
|
233
233
|
(t) => t.audioKey === be
|
|
234
234
|
)?.audioUrl?.trim() ?? "", [h, be]), L = Z && !!V && Me, ae = c(
|
|
235
235
|
() => kn({
|
|
236
|
-
canGoNext:
|
|
237
|
-
currentAudioIndex:
|
|
238
|
-
currentStepHasSpeakableElement:
|
|
236
|
+
canGoNext: x,
|
|
237
|
+
currentAudioIndex: y,
|
|
238
|
+
currentStepHasSpeakableElement: b,
|
|
239
239
|
hasInteraction: !!u
|
|
240
240
|
}),
|
|
241
241
|
[
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
x,
|
|
243
|
+
y,
|
|
244
244
|
u,
|
|
245
|
-
|
|
245
|
+
b
|
|
246
246
|
]
|
|
247
247
|
), K = r(() => {
|
|
248
248
|
ee.current !== null && (window.clearTimeout(ee.current), ee.current = null);
|
|
249
249
|
}, []), j = r(() => {
|
|
250
250
|
ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
|
|
251
|
-
}, []),
|
|
251
|
+
}, []), k = r(() => {
|
|
252
252
|
re.current !== null && (window.clearTimeout(re.current), re.current = null);
|
|
253
253
|
}, []), W = r(() => {
|
|
254
254
|
te.current !== null && (window.clearTimeout(te.current), te.current = null);
|
|
255
255
|
}, []), $ = r(() => {
|
|
256
|
-
W(), j(),
|
|
256
|
+
W(), j(), k(), U(null), z.reset(), g(!1), Ce(Ve), nt(!1), Pe(!1), ke(void 0), ye(!1), le(0);
|
|
257
257
|
}, [
|
|
258
258
|
W,
|
|
259
259
|
j,
|
|
260
|
-
|
|
260
|
+
k,
|
|
261
261
|
z
|
|
262
262
|
]), Y = r(() => {
|
|
263
|
-
const e =
|
|
263
|
+
const e = P[0];
|
|
264
264
|
return e ? (U(e), !0) : !1;
|
|
265
|
-
}, [
|
|
266
|
-
j(),
|
|
265
|
+
}, [P]), Ae = r(() => {
|
|
266
|
+
j(), k(), ye(!1), le(0), !Y() && x && C();
|
|
267
267
|
}, [
|
|
268
|
-
|
|
268
|
+
x,
|
|
269
269
|
j,
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
k,
|
|
271
|
+
C,
|
|
272
272
|
Y
|
|
273
273
|
]), vt = r(
|
|
274
274
|
(e) => {
|
|
275
|
-
if (
|
|
275
|
+
if (k(), !e)
|
|
276
276
|
return;
|
|
277
277
|
const t = () => {
|
|
278
278
|
re.current = null, le(
|
|
279
279
|
jn
|
|
280
|
-
),
|
|
280
|
+
), ye(!0), q.current = null;
|
|
281
281
|
};
|
|
282
282
|
re.current = window.setTimeout(
|
|
283
283
|
t,
|
|
284
284
|
On
|
|
285
285
|
);
|
|
286
286
|
},
|
|
287
|
-
[
|
|
288
|
-
),
|
|
287
|
+
[k]
|
|
288
|
+
), A = r(
|
|
289
289
|
(e = ve) => {
|
|
290
|
-
|
|
290
|
+
E && (he(!0), K(), !(I || !e || Ee <= 0) && (ee.current = window.setTimeout(() => {
|
|
291
291
|
he(!1), ee.current = null;
|
|
292
292
|
}, Ee)));
|
|
293
293
|
},
|
|
294
294
|
[
|
|
295
295
|
K,
|
|
296
296
|
ve,
|
|
297
|
-
|
|
297
|
+
I,
|
|
298
298
|
Ee,
|
|
299
|
-
|
|
299
|
+
E
|
|
300
300
|
]
|
|
301
301
|
), ue = !!(u?.readonly || u?.user_input?.trim()), X = !!u && !ue;
|
|
302
302
|
s(() => {
|
|
303
303
|
tt(!0), Z && Fe(!1);
|
|
304
304
|
}, [d, Z]), s(() => () => {
|
|
305
|
-
W(), K(), j(),
|
|
305
|
+
W(), K(), j(), k();
|
|
306
306
|
}, [
|
|
307
307
|
W,
|
|
308
308
|
j,
|
|
309
|
-
|
|
309
|
+
k,
|
|
310
310
|
K
|
|
311
|
-
]), s(() => (Te?.(
|
|
311
|
+
]), s(() => (Te?.(F), () => {
|
|
312
312
|
Te?.(!1);
|
|
313
|
-
}), [Te,
|
|
313
|
+
}), [Te, F]), s(() => {
|
|
314
314
|
O || Se === we || (Ne(!1), Be(we));
|
|
315
315
|
}, [O, Se]), s(() => {
|
|
316
316
|
if (!O) {
|
|
@@ -334,11 +334,11 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
334
334
|
nextMarkerCount: N.length,
|
|
335
335
|
previousIndex: e.currentIndex,
|
|
336
336
|
previousCanGoNext: e.canGoNext,
|
|
337
|
-
nextCanGoNext:
|
|
337
|
+
nextCanGoNext: x,
|
|
338
338
|
currentAudioKey: v,
|
|
339
|
-
hasCompletedCurrentStepAudio:
|
|
339
|
+
hasCompletedCurrentStepAudio: M,
|
|
340
340
|
hasResolvedCurrentInteraction: ue,
|
|
341
|
-
currentStepHasSpeakableElement:
|
|
341
|
+
currentStepHasSpeakableElement: b,
|
|
342
342
|
currentInteractionElement: u,
|
|
343
343
|
isAutoAdvanceEnabled: ie,
|
|
344
344
|
shouldUseSilentStepAutoAdvanceToggle: ae
|
|
@@ -347,57 +347,57 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
347
347
|
Je.current = {
|
|
348
348
|
markerCount: N.length,
|
|
349
349
|
currentIndex: d,
|
|
350
|
-
canGoNext:
|
|
351
|
-
}, t &&
|
|
350
|
+
canGoNext: x
|
|
351
|
+
}, t && C();
|
|
352
352
|
}, [
|
|
353
|
-
|
|
353
|
+
x,
|
|
354
354
|
v,
|
|
355
355
|
d,
|
|
356
356
|
u,
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
357
|
+
b,
|
|
358
|
+
C,
|
|
359
|
+
M,
|
|
360
360
|
ue,
|
|
361
361
|
ie,
|
|
362
362
|
ae,
|
|
363
363
|
N.length
|
|
364
364
|
]), s(() => {
|
|
365
|
-
if (!
|
|
365
|
+
if (!E) {
|
|
366
366
|
K(), he(!1);
|
|
367
367
|
return;
|
|
368
368
|
}
|
|
369
|
-
if (
|
|
369
|
+
if (I) {
|
|
370
370
|
K(), he(!0);
|
|
371
371
|
return;
|
|
372
372
|
}
|
|
373
|
-
ve ||
|
|
373
|
+
ve || A(!0);
|
|
374
374
|
}, [
|
|
375
375
|
K,
|
|
376
376
|
ve,
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
377
|
+
I,
|
|
378
|
+
E,
|
|
379
|
+
A
|
|
380
380
|
]), s(() => {
|
|
381
381
|
if (typeof window > "u")
|
|
382
382
|
return;
|
|
383
383
|
const e = (t) => {
|
|
384
|
-
t.origin === window.location.origin && hn(t.data) && t.data.eventType === "click" &&
|
|
384
|
+
t.origin === window.location.origin && hn(t.data) && t.data.eventType === "click" && E && (se(!0), A(!0));
|
|
385
385
|
};
|
|
386
386
|
return window.addEventListener("message", e), () => {
|
|
387
387
|
window.removeEventListener("message", e);
|
|
388
388
|
};
|
|
389
|
-
}, [
|
|
389
|
+
}, [E, A]), _n({
|
|
390
390
|
sectionRef: fe,
|
|
391
|
-
enabled:
|
|
391
|
+
enabled: E,
|
|
392
392
|
onWake: () => {
|
|
393
|
-
se(!0),
|
|
393
|
+
se(!0), A(!0);
|
|
394
394
|
}
|
|
395
395
|
}), s(() => {
|
|
396
396
|
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Cn({
|
|
397
397
|
previousResetKey: Xe.current,
|
|
398
398
|
nextResetKey: ce,
|
|
399
399
|
currentAudioKey: v,
|
|
400
|
-
hasCompletedCurrentStepAudio:
|
|
400
|
+
hasCompletedCurrentStepAudio: M
|
|
401
401
|
});
|
|
402
402
|
Xe.current = ce;
|
|
403
403
|
const l = q.current === d && !!u, f = Tn({
|
|
@@ -406,94 +406,94 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
406
406
|
shouldOpenInteractionOverlayAfterAudio: l,
|
|
407
407
|
hasPlaybackContextChanged: e,
|
|
408
408
|
hasResolvedCurrentInteraction: ue,
|
|
409
|
-
currentStepHasSpeakableElement:
|
|
409
|
+
currentStepHasSpeakableElement: b
|
|
410
410
|
});
|
|
411
411
|
if (e && $(), !(B.length === 0 && !u) && !L) {
|
|
412
412
|
if (u && ke(u), f) {
|
|
413
413
|
vt(u);
|
|
414
414
|
return;
|
|
415
415
|
}
|
|
416
|
-
if (
|
|
417
|
-
if (
|
|
418
|
-
if (
|
|
419
|
-
|
|
416
|
+
if (k(), q.current = null, !!t && !Y()) {
|
|
417
|
+
if (b) {
|
|
418
|
+
if (R) {
|
|
419
|
+
g(!1);
|
|
420
420
|
return;
|
|
421
421
|
}
|
|
422
|
-
|
|
422
|
+
g(!0);
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
|
-
if (
|
|
425
|
+
if (x && !(ae && !ie))
|
|
426
426
|
return te.current = window.setTimeout(() => {
|
|
427
|
-
te.current = null,
|
|
427
|
+
te.current = null, C();
|
|
428
428
|
}, De), () => {
|
|
429
429
|
W();
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
433
|
}, [
|
|
434
|
-
|
|
434
|
+
x,
|
|
435
435
|
W,
|
|
436
436
|
B.length,
|
|
437
437
|
u,
|
|
438
438
|
v,
|
|
439
439
|
ce,
|
|
440
|
-
|
|
440
|
+
b,
|
|
441
441
|
De,
|
|
442
|
+
C,
|
|
443
|
+
M,
|
|
442
444
|
R,
|
|
443
|
-
P,
|
|
444
|
-
T,
|
|
445
445
|
ie,
|
|
446
446
|
ue,
|
|
447
447
|
X,
|
|
448
|
-
|
|
448
|
+
k,
|
|
449
449
|
$,
|
|
450
450
|
vt,
|
|
451
451
|
Y,
|
|
452
452
|
L,
|
|
453
453
|
ae
|
|
454
454
|
]), s(() => {
|
|
455
|
-
if (
|
|
456
|
-
|
|
455
|
+
if (R || L || !b || X) {
|
|
456
|
+
g(!1);
|
|
457
457
|
return;
|
|
458
458
|
}
|
|
459
|
-
if (
|
|
460
|
-
|
|
459
|
+
if (M) {
|
|
460
|
+
g(!1);
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
463
|
if (mt) {
|
|
464
|
-
|
|
464
|
+
g(!1);
|
|
465
465
|
return;
|
|
466
466
|
}
|
|
467
|
-
Ce("waitingForAudio"),
|
|
467
|
+
Ce("waitingForAudio"), g(!0);
|
|
468
468
|
}, [
|
|
469
469
|
mt,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
470
|
+
b,
|
|
471
|
+
M,
|
|
472
|
+
R,
|
|
473
473
|
L,
|
|
474
474
|
X
|
|
475
475
|
]), s(() => {
|
|
476
|
-
v ||
|
|
476
|
+
v || P.length === 0 || L || !b || X || M || Y();
|
|
477
477
|
}, [
|
|
478
478
|
v,
|
|
479
|
-
C,
|
|
480
|
-
S,
|
|
481
479
|
P,
|
|
480
|
+
b,
|
|
481
|
+
M,
|
|
482
482
|
L,
|
|
483
483
|
X,
|
|
484
484
|
Y
|
|
485
485
|
]), s(() => {
|
|
486
|
-
!v ||
|
|
487
|
-
}, [
|
|
488
|
-
|
|
489
|
-
}, [
|
|
486
|
+
!v || y >= 0 || U(null);
|
|
487
|
+
}, [y, v]), s(() => {
|
|
488
|
+
y >= 0 || z.reset();
|
|
489
|
+
}, [y, z]), s(() => {
|
|
490
490
|
Pe(!1);
|
|
491
491
|
}, [Jt]);
|
|
492
|
-
const
|
|
492
|
+
const gt = c(() => {
|
|
493
493
|
if (!o)
|
|
494
494
|
return {};
|
|
495
495
|
const e = !!o.user_input?.trim();
|
|
496
|
-
return
|
|
496
|
+
return yn(
|
|
497
497
|
typeof o.content == "string" ? o.content : void 0,
|
|
498
498
|
o.user_input,
|
|
499
499
|
e ? void 0 : de
|
|
@@ -507,7 +507,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
507
507
|
o.user_input,
|
|
508
508
|
e ? void 0 : de
|
|
509
509
|
);
|
|
510
|
-
}, [o, de]),
|
|
510
|
+
}, [o, de]), yt = !!o?.user_input?.trim(), St = !!o?.readonly || yt, bt = St || yt, Ke = !!o && ge, Zt = r(
|
|
511
511
|
(e) => {
|
|
512
512
|
const l = [
|
|
513
513
|
...e.selectedValues ?? [],
|
|
@@ -553,7 +553,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
553
553
|
l.disconnect();
|
|
554
554
|
};
|
|
555
555
|
}, [Ke]), s(() => {
|
|
556
|
-
if (j(), !(!
|
|
556
|
+
if (j(), !(!ge || !bt))
|
|
557
557
|
return ne.current = window.setTimeout(() => {
|
|
558
558
|
ne.current = null, Ae();
|
|
559
559
|
}, 2e3), () => {
|
|
@@ -562,14 +562,14 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
562
562
|
}, [
|
|
563
563
|
j,
|
|
564
564
|
Ae,
|
|
565
|
-
|
|
565
|
+
ge,
|
|
566
566
|
bt
|
|
567
567
|
]);
|
|
568
568
|
const en = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
|
|
569
569
|
wt,
|
|
570
570
|
{
|
|
571
571
|
className: "content-render-iframe",
|
|
572
|
-
disableLoadingOverlay:
|
|
572
|
+
disableLoadingOverlay: R,
|
|
573
573
|
hideFullScreen: !0,
|
|
574
574
|
mode: "blackboard",
|
|
575
575
|
replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
|
|
@@ -581,7 +581,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
581
581
|
wt,
|
|
582
582
|
{
|
|
583
583
|
className: "content-render-iframe",
|
|
584
|
-
disableLoadingOverlay:
|
|
584
|
+
disableLoadingOverlay: R,
|
|
585
585
|
hideFullScreen: !0,
|
|
586
586
|
mode: "blackboard",
|
|
587
587
|
type: "markdown",
|
|
@@ -593,20 +593,20 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
593
593
|
const l = e.filter(
|
|
594
594
|
(i) => i.is_renderable !== !1
|
|
595
595
|
).length, f = e.reduce(
|
|
596
|
-
(i, a,
|
|
596
|
+
(i, a, T) => a.is_renderable !== !1 ? T : i,
|
|
597
597
|
-1
|
|
598
598
|
);
|
|
599
599
|
return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((i, a) => {
|
|
600
|
-
const
|
|
600
|
+
const T = i.type === "html" && i.is_renderable === !1;
|
|
601
601
|
return /* @__PURE__ */ n.jsx(
|
|
602
602
|
"div",
|
|
603
603
|
{
|
|
604
604
|
ref: t && a === f ? We : null,
|
|
605
|
-
"aria-hidden":
|
|
605
|
+
"aria-hidden": T || void 0,
|
|
606
606
|
className: J(
|
|
607
607
|
"w-full shrink-0",
|
|
608
608
|
l === 1 && i.is_renderable !== !1 && "slide-element--single",
|
|
609
|
-
|
|
609
|
+
T ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : i.is_renderable === !1 && "hidden"
|
|
610
610
|
),
|
|
611
611
|
children: en(i, {
|
|
612
612
|
replaceRootScreenHeightWithFull: l === 1 && i.type === "html" && i.is_renderable !== !1
|
|
@@ -633,96 +633,96 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
633
633
|
behavior: "smooth"
|
|
634
634
|
});
|
|
635
635
|
}, []), rn = r(() => {
|
|
636
|
-
me.current = !0, q.current = null, se(!0),
|
|
637
|
-
}, [Ze, $,
|
|
638
|
-
me.current = !0, q.current = null, se(!0),
|
|
639
|
-
}, [
|
|
636
|
+
me.current = !0, q.current = null, se(!0), g(!1), A(!0), $(), Ze();
|
|
637
|
+
}, [Ze, $, A]), on = r(() => {
|
|
638
|
+
me.current = !0, q.current = null, se(!0), g(!1), A(!0), $(), C();
|
|
639
|
+
}, [C, $, A]), sn = r(
|
|
640
640
|
({
|
|
641
641
|
loading: e,
|
|
642
642
|
reason: t
|
|
643
643
|
}) => {
|
|
644
|
-
if (
|
|
645
|
-
|
|
644
|
+
if (R) {
|
|
645
|
+
g(!1);
|
|
646
646
|
return;
|
|
647
647
|
}
|
|
648
|
-
if (!
|
|
649
|
-
|
|
648
|
+
if (!b || M) {
|
|
649
|
+
g(!1);
|
|
650
650
|
return;
|
|
651
651
|
}
|
|
652
|
-
e && t && Ce(t),
|
|
652
|
+
e && t && Ce(t), g(Vn(t, e));
|
|
653
653
|
},
|
|
654
654
|
[
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
655
|
+
b,
|
|
656
|
+
M,
|
|
657
|
+
R
|
|
658
658
|
]
|
|
659
659
|
);
|
|
660
660
|
s(() => {
|
|
661
|
-
|
|
662
|
-
}, [
|
|
661
|
+
R && g(!1);
|
|
662
|
+
}, [R]);
|
|
663
663
|
const ln = r(
|
|
664
664
|
(e) => {
|
|
665
665
|
const t = h[e]?.audioKey;
|
|
666
666
|
if (!t || !v || t !== v)
|
|
667
667
|
return;
|
|
668
|
-
const l =
|
|
668
|
+
const l = P.findIndex(
|
|
669
669
|
(a) => a === t
|
|
670
670
|
);
|
|
671
671
|
if (l < 0) {
|
|
672
672
|
U(null);
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
|
-
const f = l + 1, i =
|
|
675
|
+
const f = l + 1, i = P[f];
|
|
676
676
|
if (i) {
|
|
677
677
|
U(i);
|
|
678
678
|
return;
|
|
679
679
|
}
|
|
680
|
-
if (U(null), nt(!0),
|
|
681
|
-
const a = d + 1,
|
|
682
|
-
ht &&
|
|
680
|
+
if (U(null), nt(!0), g(!1), x) {
|
|
681
|
+
const a = d + 1, T = N[a];
|
|
682
|
+
ht && T?.type === "interaction" && (q.current = a), C();
|
|
683
683
|
}
|
|
684
684
|
},
|
|
685
685
|
[
|
|
686
686
|
h,
|
|
687
|
-
|
|
687
|
+
x,
|
|
688
688
|
d,
|
|
689
689
|
v,
|
|
690
|
+
P,
|
|
690
691
|
C,
|
|
691
|
-
R,
|
|
692
692
|
ht,
|
|
693
693
|
N
|
|
694
694
|
]
|
|
695
695
|
), cn = r(() => {
|
|
696
|
-
o &&
|
|
696
|
+
o && ye((e) => !e);
|
|
697
697
|
}, [o]), xt = r(
|
|
698
698
|
(e) => {
|
|
699
|
-
e.stopPropagation(),
|
|
699
|
+
e.stopPropagation(), F && A(!0);
|
|
700
700
|
},
|
|
701
|
-
[et,
|
|
701
|
+
[et, A]
|
|
702
702
|
), an = r(
|
|
703
703
|
(e) => {
|
|
704
704
|
Ge?.(e);
|
|
705
705
|
},
|
|
706
706
|
[Ge]
|
|
707
707
|
), un = r(() => {
|
|
708
|
-
se(!0),
|
|
709
|
-
}, [
|
|
708
|
+
se(!0), A(!0);
|
|
709
|
+
}, [A]), xe = c(
|
|
710
710
|
() => B.map(
|
|
711
711
|
(e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
|
|
712
712
|
),
|
|
713
713
|
[B]
|
|
714
714
|
);
|
|
715
715
|
return s(() => {
|
|
716
|
-
const e = Ye.current, f = (e.length > 0 && e.length < xe.length && e.every((a,
|
|
716
|
+
const e = Ye.current, f = (e.length > 0 && e.length < xe.length && e.every((a, T) => a === xe[T]) ? B.slice(e.length) : []).some(
|
|
717
717
|
(a) => a.is_new === !1
|
|
718
718
|
);
|
|
719
719
|
if (Ye.current = xe, !f)
|
|
720
720
|
return;
|
|
721
721
|
const i = window.requestAnimationFrame(() => {
|
|
722
|
-
const a = Re.current,
|
|
723
|
-
if (!a || !
|
|
722
|
+
const a = Re.current, T = We.current;
|
|
723
|
+
if (!a || !T)
|
|
724
724
|
return;
|
|
725
|
-
const dn = a.getBoundingClientRect(), fn =
|
|
725
|
+
const dn = a.getBoundingClientRect(), fn = T.getBoundingClientRect(), mn = a.scrollTop + (fn.top - dn.top);
|
|
726
726
|
a.scrollTo({
|
|
727
727
|
top: Math.max(mn, 0),
|
|
728
728
|
behavior: "smooth"
|
|
@@ -777,7 +777,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
777
777
|
/* @__PURE__ */ n.jsx(
|
|
778
778
|
"button",
|
|
779
779
|
{
|
|
780
|
-
"aria-label":
|
|
780
|
+
"aria-label": _?.backAriaLabel ?? "Back",
|
|
781
781
|
className: "slide-landscape-header__back",
|
|
782
782
|
onClick: Ht,
|
|
783
783
|
type: "button",
|
|
@@ -790,7 +790,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
790
790
|
)
|
|
791
791
|
}
|
|
792
792
|
),
|
|
793
|
-
|
|
793
|
+
_?.content ? /* @__PURE__ */ n.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: _.content }) : null
|
|
794
794
|
] }) : null,
|
|
795
795
|
/* @__PURE__ */ n.jsx(
|
|
796
796
|
"div",
|
|
@@ -834,9 +834,9 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
834
834
|
wn,
|
|
835
835
|
{
|
|
836
836
|
extraBottomOffset: jt,
|
|
837
|
-
hasPlayerGap:
|
|
837
|
+
hasPlayerGap: F,
|
|
838
838
|
isEnabled: rt && Nt,
|
|
839
|
-
isPlayerHidden:
|
|
839
|
+
isPlayerHidden: E && !F,
|
|
840
840
|
playbackTimeStore: z,
|
|
841
841
|
subtitleCues: Yt
|
|
842
842
|
}
|
|
@@ -847,7 +847,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
847
847
|
ref: $e,
|
|
848
848
|
className: J(
|
|
849
849
|
"slide-interaction-overlay",
|
|
850
|
-
|
|
850
|
+
F && E ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
|
|
851
851
|
),
|
|
852
852
|
onClick: xt,
|
|
853
853
|
onPointerDown: xt,
|
|
@@ -856,8 +856,8 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
856
856
|
Et,
|
|
857
857
|
{
|
|
858
858
|
content: String(o?.content ?? ""),
|
|
859
|
-
defaultButtonText:
|
|
860
|
-
defaultInputText:
|
|
859
|
+
defaultButtonText: gt.buttonText ?? "",
|
|
860
|
+
defaultInputText: gt.inputText ?? "",
|
|
861
861
|
defaultSelectedValues: Qt,
|
|
862
862
|
confirmButtonText: D?.confirmButtonText,
|
|
863
863
|
copyButtonText: D?.copyButtonText,
|
|
@@ -869,7 +869,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
869
869
|
)
|
|
870
870
|
}
|
|
871
871
|
) : null,
|
|
872
|
-
|
|
872
|
+
E ? /* @__PURE__ */ n.jsx(
|
|
873
873
|
xn,
|
|
874
874
|
{
|
|
875
875
|
audioList: h,
|
|
@@ -877,14 +877,14 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
877
877
|
"absolute left-1/2 z-[2] -translate-x-1/2",
|
|
878
878
|
ct ? "bottom-3" : "-bottom-3",
|
|
879
879
|
Q,
|
|
880
|
-
!
|
|
880
|
+
!F && "pointer-events-none opacity-0"
|
|
881
881
|
),
|
|
882
|
-
currentAudioIndex:
|
|
882
|
+
currentAudioIndex: y,
|
|
883
883
|
defaultPlaying: !0,
|
|
884
884
|
isPlaybackPaused: L,
|
|
885
885
|
isAutoAdvanceEnabled: ie,
|
|
886
886
|
hasInteraction: !!o,
|
|
887
|
-
isInteractionOpen:
|
|
887
|
+
isInteractionOpen: ge,
|
|
888
888
|
isSubtitleEnabled: rt,
|
|
889
889
|
onAutoAdvanceToggle: tt,
|
|
890
890
|
onLoadingChange: sn,
|
|
@@ -895,7 +895,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
895
895
|
onSubtitleToggle: () => {
|
|
896
896
|
Ot((e) => !e);
|
|
897
897
|
},
|
|
898
|
-
nextDisabled: !
|
|
898
|
+
nextDisabled: !x,
|
|
899
899
|
onEnded: ln,
|
|
900
900
|
onFullscreen: nn,
|
|
901
901
|
isFullscreen: ot,
|
|
@@ -906,7 +906,7 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
906
906
|
onNext: on,
|
|
907
907
|
onPrev: rn,
|
|
908
908
|
prevDisabled: !Mt,
|
|
909
|
-
showControls:
|
|
909
|
+
showControls: F,
|
|
910
910
|
texts: Tt,
|
|
911
911
|
customActionContext: je,
|
|
912
912
|
customActions: V,
|
|
@@ -921,6 +921,6 @@ const Vn = (x, k) => x.length === k.length && x.every((w, Q) => {
|
|
|
921
921
|
);
|
|
922
922
|
};
|
|
923
923
|
export {
|
|
924
|
-
|
|
924
|
+
mr as default
|
|
925
925
|
};
|
|
926
926
|
//# sourceMappingURL=Slide.es.js.map
|