markdown-flow-ui 0.1.125 → 0.1.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.js +3 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.d.ts +20 -0
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +168 -108
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.test.d.ts +1 -0
- package/dist/components/Slide/Player.cjs.js +1 -1
- package/dist/components/Slide/Player.cjs.js.map +1 -1
- package/dist/components/Slide/Player.d.ts +2 -0
- package/dist/components/Slide/Player.es.js +112 -107
- package/dist/components/Slide/Player.es.js.map +1 -1
- 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 +167 -165
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/useWakePlayerFromIframe.cjs.js +1 -1
- package/dist/components/Slide/useWakePlayerFromIframe.cjs.js.map +1 -1
- package/dist/components/Slide/useWakePlayerFromIframe.d.ts +3 -1
- package/dist/components/Slide/useWakePlayerFromIframe.es.js +42 -39
- package/dist/components/Slide/useWakePlayerFromIframe.es.js.map +1 -1
- package/dist/components/Slide/utils/playerNavigationContext.cjs.js +2 -0
- package/dist/components/Slide/utils/playerNavigationContext.cjs.js.map +1 -0
- package/dist/components/Slide/utils/playerNavigationContext.d.ts +7 -0
- package/dist/components/Slide/utils/playerNavigationContext.es.js +9 -0
- package/dist/components/Slide/utils/playerNavigationContext.es.js.map +1 -0
- package/dist/components/Slide/utils/playerNavigationContext.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { j as r } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { isSandboxInteractionMessage as
|
|
2
|
+
import { memo as _n, useId as Pn, useRef as p, useMemo as l, useCallback as n, useState as m, useEffect as s } from "react";
|
|
3
|
+
import { isSandboxInteractionMessage as En } from "../../lib/sandboxInteraction.es.js";
|
|
4
4
|
import { cn as Z } from "../../lib/utils.es.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import Cn from "../ui/loading-overlay-card.es.js";
|
|
6
|
+
import Tn from "../ContentRender/ContentRender.es.js";
|
|
7
7
|
import Rt from "../ContentRender/IframeSandbox.es.js";
|
|
8
8
|
import "../ui/inputGroup/input-group.es.js";
|
|
9
|
-
import { getInteractionDefaultValues as
|
|
10
|
-
import { isMobileDevice as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import { PlayerKeyboardShortcutContext as
|
|
16
|
-
import { activatePlayerKeyboardShortcutOwner as
|
|
17
|
-
import { DEFAULT_MOBILE_VIEW_MODE as Ce, resolveMobileViewModeState as
|
|
18
|
-
import { shouldPresentInteractionOverlay as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
9
|
+
import { getInteractionDefaultValues as Rn, getInteractionDefaultSelectedValues as kn } from "../../lib/interaction-defaults.es.js";
|
|
10
|
+
import { isMobileDevice as Fn, isLandscapeViewport as kt, subscribeMobileDeviceChange as Mn } from "../../lib/mobileDevice.es.js";
|
|
11
|
+
import Bn from "./Player.es.js";
|
|
12
|
+
import Nn from "./SubtitleOverlay.es.js";
|
|
13
|
+
import On from "./useSlide.es.js";
|
|
14
|
+
import jn from "./useWakePlayerFromIframe.es.js";
|
|
15
|
+
import { PlayerKeyboardShortcutContext as Ln } from "./utils/playerKeyboardShortcutContext.es.js";
|
|
16
|
+
import { activatePlayerKeyboardShortcutOwner as Vn } from "./utils/playerKeyboardShortcuts.es.js";
|
|
17
|
+
import { DEFAULT_MOBILE_VIEW_MODE as Ce, resolveMobileViewModeState as Kn } from "./utils/mobileScreenMode.es.js";
|
|
18
|
+
import { shouldPresentInteractionOverlay as qn } from "./utils/interactionPlayback.es.js";
|
|
19
|
+
import { shouldWakePlayerControlsAfterNavigation as Ft } from "./utils/playerNavigationContext.es.js";
|
|
20
|
+
import { shouldAutoAdvanceIntoAppendedMarker as Dn } from "./utils/appendedMarkerAdvance.es.js";
|
|
21
|
+
import { getPlaybackSequenceTransition as Un } from "./utils/playbackSequence.es.js";
|
|
22
|
+
import { resolvePlayerCustomActionElement as zn, getPlayerCustomActionCount as Gn } from "./utils/playerCustomActions.es.js";
|
|
23
|
+
import { createPlaybackTimeStore as Hn } from "./utils/playbackTimeStore.es.js";
|
|
24
|
+
import { shouldUseAutoAdvanceToggle as Wn } from "./utils/playerToggleMode.es.js";
|
|
24
25
|
/* empty css */
|
|
25
|
-
import
|
|
26
|
-
const
|
|
26
|
+
import $n from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
|
|
27
|
+
const Yn = 2e3, Xn = 300, Jn = 160, Qn = 16, Ge = "waitingForAudio", Mt = {
|
|
27
28
|
waitingForAudio: "Waiting for current slide audio...",
|
|
28
29
|
loadingAudio: "Loading current slide audio...",
|
|
29
30
|
waitingForMoreAudio: "Waiting for more current slide audio..."
|
|
30
|
-
},
|
|
31
|
+
}, Zn = (S, I) => typeof S == "string" ? S : S[I] ?? S[Ge] ?? Mt[I], er = (S, I) => I ? S !== "loadingAudio" : !1, Bt = _n(
|
|
31
32
|
({
|
|
32
33
|
content: S,
|
|
33
34
|
title: I,
|
|
@@ -42,7 +43,7 @@ const $n = 2e3, Yn = 300, Xn = 160, Jn = 16, Ge = "waitingForAudio", Ft = {
|
|
|
42
43
|
}) => /* @__PURE__ */ r.jsxs("div", { className: "slide-player__interaction-card", children: [
|
|
43
44
|
/* @__PURE__ */ r.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ r.jsx("p", { className: "slide-player__interaction-title", children: I }) }),
|
|
44
45
|
/* @__PURE__ */ r.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ r.jsx(
|
|
45
|
-
|
|
46
|
+
Tn,
|
|
46
47
|
{
|
|
47
48
|
content: S,
|
|
48
49
|
defaultButtonText: _,
|
|
@@ -58,11 +59,11 @@ const $n = 2e3, Yn = 300, Xn = 160, Jn = 16, Ge = "waitingForAudio", Ft = {
|
|
|
58
59
|
) })
|
|
59
60
|
] })
|
|
60
61
|
);
|
|
61
|
-
|
|
62
|
-
const
|
|
62
|
+
Bt.displayName = "InteractionOverlayCard";
|
|
63
|
+
const tr = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
63
64
|
const P = I[ee];
|
|
64
65
|
return _.sequence_number === P?.sequence_number && _.type === P?.type && _.content === P?.content;
|
|
65
|
-
}),
|
|
66
|
+
}), Rr = ({
|
|
66
67
|
elementList: S = [],
|
|
67
68
|
showPlayer: I = !0,
|
|
68
69
|
playerAlwaysVisible: _ = !1,
|
|
@@ -70,26 +71,26 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
70
71
|
fullscreenHeader: P,
|
|
71
72
|
playerCustomActions: q,
|
|
72
73
|
playerCustomActionPauseOnActive: te = !0,
|
|
73
|
-
bufferingText: Te =
|
|
74
|
+
bufferingText: Te = Mt,
|
|
74
75
|
interactionTitle: Re,
|
|
75
76
|
interactionTexts: D,
|
|
76
|
-
playerTexts:
|
|
77
|
+
playerTexts: Nt,
|
|
77
78
|
playerAutoHideDelay: ke = 3e3,
|
|
78
|
-
markerAutoAdvanceDelay: He =
|
|
79
|
+
markerAutoAdvanceDelay: He = Yn,
|
|
79
80
|
interactionDefaultValueOptions: pe,
|
|
80
81
|
onSend: We,
|
|
81
82
|
onPlayerVisibilityChange: Fe,
|
|
82
83
|
onMobileViewModeChange: $e,
|
|
83
84
|
onStepChange: Ye,
|
|
84
85
|
enableKeyboardShortcuts: U = !0,
|
|
85
|
-
enableIframeScaling:
|
|
86
|
+
enableIframeScaling: Ot = !0,
|
|
86
87
|
disableLoadingOverlay: C = !1,
|
|
87
|
-
className:
|
|
88
|
+
className: jt,
|
|
88
89
|
onPointerDown: Xe,
|
|
89
90
|
onFocusCapture: Je,
|
|
90
|
-
...
|
|
91
|
+
...Lt
|
|
91
92
|
}) => {
|
|
92
|
-
const he =
|
|
93
|
+
const he = Pn(), ve = p(null), Qe = p(null), Me = p(null), Ze = p(null), ne = p(null), re = p(null), oe = p(null), se = p(null), et = p(null), tt = p([]), ye = p(!1), z = p(null), nt = p(null), rt = p({
|
|
93
94
|
markerCount: 0,
|
|
94
95
|
currentIndex: -1,
|
|
95
96
|
canGoNext: !1
|
|
@@ -102,40 +103,40 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
102
103
|
currentAudioSequenceIndexes: ge,
|
|
103
104
|
currentStepHasSpeakableElement: b,
|
|
104
105
|
currentInteractionElement: u,
|
|
105
|
-
canGoPrev:
|
|
106
|
+
canGoPrev: Vt,
|
|
106
107
|
canGoNext: w,
|
|
107
108
|
handlePrev: st,
|
|
108
109
|
handleNext: T
|
|
109
|
-
} =
|
|
110
|
+
} = On(S), ie = l(() => {
|
|
110
111
|
if (!(d < 0))
|
|
111
112
|
return N[d];
|
|
112
|
-
}, [d, N]),
|
|
113
|
+
}, [d, N]), Kt = N.filter(
|
|
113
114
|
(e) => e.is_renderable !== !1
|
|
114
|
-
).length === 1,
|
|
115
|
+
).length === 1, A = I && (N.length > 0 || h.length > 0 || !!u), qt = l(
|
|
115
116
|
() => ({
|
|
116
117
|
enabled: U,
|
|
117
118
|
ownerId: he
|
|
118
119
|
}),
|
|
119
120
|
[U, he]
|
|
120
121
|
), L = n(() => {
|
|
121
|
-
!U || !
|
|
122
|
-
}, [U, he,
|
|
122
|
+
!U || !A || Vn(he);
|
|
123
|
+
}, [U, he, A]), R = l(
|
|
123
124
|
() => ge.map((e) => h[e]?.audioKey).filter((e) => !!e),
|
|
124
125
|
[h, ge]
|
|
125
|
-
), [it, Se] = m(!0), [be, le] = m(!1), [ce, lt] = m(!0), [ae, ct] = m(!0), [v, G] = m(null), [
|
|
126
|
-
|
|
126
|
+
), [it, Se] = m(!0), [be, le] = m(!1), [ce, lt] = m(!0), [ae, ct] = m(!0), [v, G] = m(null), [Dt, y] = m(!1), [Ut, Be] = m(Ge), [k, at] = m(!1), [zt, Ne] = m(!1), [ut, Gt] = m(!0), [Oe, je] = m(!1), [o, Le] = m(), [Ae, xe] = m(!1), [
|
|
127
|
+
Ht,
|
|
127
128
|
ue
|
|
128
|
-
] = m(0), [dt,
|
|
129
|
+
] = m(0), [dt, Wt] = m(!1), O = l(() => Fn(), []), [we, Ve] = m(
|
|
129
130
|
Ce
|
|
130
|
-
), [ft, Ke] = m(!1), [
|
|
131
|
+
), [ft, Ke] = m(!1), [$t, mt] = m(
|
|
131
132
|
() => O ? kt() : !1
|
|
132
|
-
), H = l(() =>
|
|
133
|
+
), H = l(() => Hn(), []), {
|
|
133
134
|
effectiveMobileViewMode: W,
|
|
134
135
|
isImmersiveMobileFullscreen: $,
|
|
135
136
|
isNativeMobileFullscreen: pt,
|
|
136
|
-
shouldRotateFullscreenViewport:
|
|
137
|
+
shouldRotateFullscreenViewport: Yt
|
|
137
138
|
} = l(
|
|
138
|
-
() =>
|
|
139
|
+
() => Kn({
|
|
139
140
|
hasManualMobileViewMode: ft,
|
|
140
141
|
isMobileDevice: O,
|
|
141
142
|
mobileViewMode: we
|
|
@@ -143,27 +144,27 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
143
144
|
[
|
|
144
145
|
ft,
|
|
145
146
|
O,
|
|
146
|
-
|
|
147
|
+
$t,
|
|
147
148
|
we
|
|
148
149
|
]
|
|
149
|
-
),
|
|
150
|
+
), Xt = p(W), F = A && (_ || it), Jt = $ && F, Qt = $ && F, Zt = $ || pt, ht = dt && !O, en = n(
|
|
150
151
|
(e) => {
|
|
151
152
|
Ke(!0), Ve(e);
|
|
152
153
|
},
|
|
153
154
|
[]
|
|
154
155
|
), vt = n(() => {
|
|
155
156
|
Ke(!1), Ve(Ce);
|
|
156
|
-
}, []),
|
|
157
|
+
}, []), tn = n(() => {
|
|
157
158
|
vt(), P?.onBack?.();
|
|
158
159
|
}, [P, vt]), yt = n((e) => {
|
|
159
160
|
je(e);
|
|
160
161
|
}, []), gt = n(() => {
|
|
161
162
|
je((e) => !e);
|
|
162
|
-
}, []), { mountedStepStates:
|
|
163
|
+
}, []), { mountedStepStates: nn, currentMountedStateIndex: rn } = l(() => {
|
|
163
164
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
164
165
|
return ot.forEach((c, f) => {
|
|
165
166
|
const i = e.findIndex(
|
|
166
|
-
(a) =>
|
|
167
|
+
(a) => tr(
|
|
167
168
|
a.elementList,
|
|
168
169
|
c
|
|
169
170
|
)
|
|
@@ -185,12 +186,12 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
185
186
|
) : -1, [h, v]), qe = l(
|
|
186
187
|
() => g >= 0 ? h[g] : void 0,
|
|
187
188
|
[h, g]
|
|
188
|
-
),
|
|
189
|
+
), on = qe?.element?.subtitle_cues ?? [], Ie = l(
|
|
189
190
|
() => R[0] ?? "none",
|
|
190
191
|
[R]
|
|
191
192
|
), De = l(
|
|
192
193
|
() => ({
|
|
193
|
-
currentElement:
|
|
194
|
+
currentElement: zn({
|
|
194
195
|
currentAudioIndex: g,
|
|
195
196
|
currentAudioSequenceIndexes: ge,
|
|
196
197
|
audioList: h,
|
|
@@ -215,12 +216,12 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
215
216
|
gt
|
|
216
217
|
]
|
|
217
218
|
), Ue = l(
|
|
218
|
-
() =>
|
|
219
|
+
() => Gn(
|
|
219
220
|
q,
|
|
220
221
|
De
|
|
221
222
|
),
|
|
222
223
|
[De, q]
|
|
223
|
-
),
|
|
224
|
+
), sn = l(
|
|
224
225
|
() => ({
|
|
225
226
|
"--slide-player-custom-action-count": String(Ue),
|
|
226
227
|
"--slide-player-mobile-control-count": String(
|
|
@@ -228,22 +229,22 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
228
229
|
)
|
|
229
230
|
}),
|
|
230
231
|
[Ue]
|
|
231
|
-
), bt = R.length > 0,
|
|
232
|
+
), bt = R.length > 0, At = l(() => u ? `${u.sequence_number ?? "none"}:${String(
|
|
232
233
|
u.content ?? ""
|
|
233
234
|
)}` : "none", [u]), de = l(
|
|
234
|
-
() => [St,
|
|
235
|
-
[
|
|
236
|
-
),
|
|
235
|
+
() => [St, At].join("|"),
|
|
236
|
+
[At, St]
|
|
237
|
+
), ln = l(
|
|
237
238
|
() => [
|
|
238
239
|
de,
|
|
239
240
|
qe?.audioKey ?? "none",
|
|
240
241
|
String(g)
|
|
241
242
|
].join("|"),
|
|
242
243
|
[g, qe?.audioKey, de]
|
|
243
|
-
),
|
|
244
|
+
), xt = !!l(() => !Ie || Ie === "none" ? "" : h.find(
|
|
244
245
|
(t) => t.audioKey === Ie
|
|
245
246
|
)?.audioUrl?.trim() ?? "", [h, Ie]), V = te && !!q && Oe, fe = l(
|
|
246
|
-
() =>
|
|
247
|
+
() => Wn({
|
|
247
248
|
canGoNext: w,
|
|
248
249
|
currentAudioIndex: g,
|
|
249
250
|
currentStepHasSpeakableElement: b,
|
|
@@ -264,7 +265,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
264
265
|
}, []), Y = n(() => {
|
|
265
266
|
re.current !== null && (window.clearTimeout(re.current), re.current = null);
|
|
266
267
|
}, []), X = n(() => {
|
|
267
|
-
Y(), j(), M(), G(null), H.reset(), y(!1), Be(Ge), at(!1), Ne(!1), Le(void 0),
|
|
268
|
+
Y(), j(), M(), G(null), H.reset(), y(!1), Be(Ge), at(!1), Ne(!1), Le(void 0), xe(!1), ue(0);
|
|
268
269
|
}, [
|
|
269
270
|
Y,
|
|
270
271
|
j,
|
|
@@ -274,7 +275,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
274
275
|
const e = R[0];
|
|
275
276
|
return e ? (G(e), !0) : !1;
|
|
276
277
|
}, [R]), _e = n(() => {
|
|
277
|
-
j(), M(),
|
|
278
|
+
j(), M(), xe(!1), ue(0), !J() && w && T();
|
|
278
279
|
}, [
|
|
279
280
|
w,
|
|
280
281
|
j,
|
|
@@ -287,18 +288,18 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
287
288
|
return;
|
|
288
289
|
const t = () => {
|
|
289
290
|
se.current = null, ue(
|
|
290
|
-
|
|
291
|
-
),
|
|
291
|
+
Jn
|
|
292
|
+
), xe(!0), z.current = null;
|
|
292
293
|
};
|
|
293
294
|
se.current = window.setTimeout(
|
|
294
295
|
t,
|
|
295
|
-
|
|
296
|
+
Xn
|
|
296
297
|
);
|
|
297
298
|
},
|
|
298
299
|
[M]
|
|
299
|
-
),
|
|
300
|
+
), x = n(
|
|
300
301
|
(e = be) => {
|
|
301
|
-
|
|
302
|
+
A && (Se(!0), K(), !(_ || !e || ke <= 0) && (ne.current = window.setTimeout(() => {
|
|
302
303
|
Se(!1), ne.current = null;
|
|
303
304
|
}, ke)));
|
|
304
305
|
},
|
|
@@ -307,9 +308,9 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
307
308
|
be,
|
|
308
309
|
_,
|
|
309
310
|
ke,
|
|
310
|
-
|
|
311
|
+
A
|
|
311
312
|
]
|
|
312
|
-
), me = !!(u?.readonly || u?.user_input?.trim()), Q = !!u && !me,
|
|
313
|
+
), me = !!(u?.readonly || u?.user_input?.trim()), Q = !!u && !me, cn = n((e) => {
|
|
313
314
|
lt(e);
|
|
314
315
|
}, []), Pe = n(
|
|
315
316
|
(e) => {
|
|
@@ -339,15 +340,15 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
339
340
|
const e = () => {
|
|
340
341
|
mt(kt());
|
|
341
342
|
};
|
|
342
|
-
return e(),
|
|
343
|
+
return e(), Mn(e);
|
|
343
344
|
}, [O]), s(() => {
|
|
344
345
|
$e?.(W);
|
|
345
346
|
}, [W, $e]), s(() => {
|
|
346
|
-
|
|
347
|
+
Xt.current = W;
|
|
347
348
|
}, [W]), s(() => {
|
|
348
349
|
Ye?.(ie, d);
|
|
349
350
|
}, [d, ie, Ye]), s(() => {
|
|
350
|
-
const e = rt.current, t =
|
|
351
|
+
const e = rt.current, t = Dn(
|
|
351
352
|
{
|
|
352
353
|
previousMarkerCount: e.markerCount,
|
|
353
354
|
nextMarkerCount: N.length,
|
|
@@ -381,7 +382,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
381
382
|
fe,
|
|
382
383
|
N.length
|
|
383
384
|
]), s(() => {
|
|
384
|
-
if (!
|
|
385
|
+
if (!A) {
|
|
385
386
|
K(), Se(!1);
|
|
386
387
|
return;
|
|
387
388
|
}
|
|
@@ -389,38 +390,39 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
389
390
|
K(), Se(!0);
|
|
390
391
|
return;
|
|
391
392
|
}
|
|
392
|
-
be ||
|
|
393
|
+
be || x(!0);
|
|
393
394
|
}, [
|
|
394
395
|
K,
|
|
395
396
|
be,
|
|
396
397
|
_,
|
|
397
|
-
|
|
398
|
-
|
|
398
|
+
A,
|
|
399
|
+
x
|
|
399
400
|
]), s(() => {
|
|
400
401
|
if (typeof window > "u")
|
|
401
402
|
return;
|
|
402
403
|
const e = (t) => {
|
|
403
|
-
t.origin === window.location.origin &&
|
|
404
|
+
t.origin === window.location.origin && En(t.data) && t.data.eventType === "click" && A && (L(), le(!0), x(!0));
|
|
404
405
|
};
|
|
405
406
|
return window.addEventListener("message", e), () => {
|
|
406
407
|
window.removeEventListener("message", e);
|
|
407
408
|
};
|
|
408
|
-
}, [L,
|
|
409
|
+
}, [L, A, x]), jn({
|
|
409
410
|
sectionRef: ve,
|
|
410
|
-
enabled:
|
|
411
|
+
enabled: A,
|
|
411
412
|
keyboardShortcutsEnabled: U,
|
|
413
|
+
onKeyboardShortcut: L,
|
|
412
414
|
onWake: () => {
|
|
413
|
-
L(), le(!0),
|
|
415
|
+
L(), le(!0), x(!0);
|
|
414
416
|
}
|
|
415
417
|
}), s(() => {
|
|
416
|
-
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } =
|
|
418
|
+
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Un({
|
|
417
419
|
previousResetKey: nt.current,
|
|
418
420
|
nextResetKey: de,
|
|
419
421
|
currentAudioKey: v,
|
|
420
422
|
hasCompletedCurrentStepAudio: k
|
|
421
423
|
});
|
|
422
424
|
nt.current = de;
|
|
423
|
-
const c = z.current === d && !!u, f =
|
|
425
|
+
const c = z.current === d && !!u, f = qn({
|
|
424
426
|
hasInteraction: !!u,
|
|
425
427
|
shouldBlockPlaybackForInteraction: Q,
|
|
426
428
|
shouldOpenInteractionOverlayAfterAudio: c,
|
|
@@ -508,26 +510,26 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
508
510
|
g >= 0 || H.reset();
|
|
509
511
|
}, [g, H]), s(() => {
|
|
510
512
|
Ne(!1);
|
|
511
|
-
}, [
|
|
513
|
+
}, [ln]);
|
|
512
514
|
const It = l(() => {
|
|
513
515
|
if (!o)
|
|
514
516
|
return {};
|
|
515
517
|
const e = !!o.user_input?.trim();
|
|
516
|
-
return
|
|
518
|
+
return Rn(
|
|
517
519
|
typeof o.content == "string" ? o.content : void 0,
|
|
518
520
|
o.user_input,
|
|
519
521
|
e ? void 0 : pe
|
|
520
522
|
);
|
|
521
|
-
}, [o, pe]),
|
|
523
|
+
}, [o, pe]), an = l(() => {
|
|
522
524
|
if (!o)
|
|
523
525
|
return;
|
|
524
526
|
const e = !!o.user_input?.trim();
|
|
525
|
-
return
|
|
527
|
+
return kn(
|
|
526
528
|
typeof o.content == "string" ? o.content : void 0,
|
|
527
529
|
o.user_input,
|
|
528
530
|
e ? void 0 : pe
|
|
529
531
|
);
|
|
530
|
-
}, [o, pe]), _t = !!o?.user_input?.trim(), Pt = !!o?.readonly || _t, Et = Pt || _t, ze = !!o &&
|
|
532
|
+
}, [o, pe]), _t = !!o?.user_input?.trim(), Pt = !!o?.readonly || _t, Et = Pt || _t, ze = !!o && Ae, un = n(
|
|
531
533
|
(e) => {
|
|
532
534
|
const c = [
|
|
533
535
|
...e.selectedValues ?? [],
|
|
@@ -543,7 +545,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
543
545
|
);
|
|
544
546
|
s(() => {
|
|
545
547
|
const e = () => {
|
|
546
|
-
|
|
548
|
+
Wt(document.fullscreenElement === ve.current);
|
|
547
549
|
};
|
|
548
550
|
return e(), document.addEventListener("fullscreenchange", e), () => {
|
|
549
551
|
document.removeEventListener("fullscreenchange", e);
|
|
@@ -561,7 +563,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
561
563
|
e.getBoundingClientRect().height
|
|
562
564
|
);
|
|
563
565
|
ue(
|
|
564
|
-
f +
|
|
566
|
+
f + Qn
|
|
565
567
|
);
|
|
566
568
|
};
|
|
567
569
|
if (t(), typeof ResizeObserver > "u")
|
|
@@ -573,7 +575,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
573
575
|
c.disconnect();
|
|
574
576
|
};
|
|
575
577
|
}, [ze]), s(() => {
|
|
576
|
-
if (j(), !(!
|
|
578
|
+
if (j(), !(!Ae || !Et))
|
|
577
579
|
return oe.current = window.setTimeout(() => {
|
|
578
580
|
oe.current = null, _e();
|
|
579
581
|
}, 2e3), () => {
|
|
@@ -582,10 +584,10 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
582
584
|
}, [
|
|
583
585
|
j,
|
|
584
586
|
_e,
|
|
585
|
-
|
|
587
|
+
Ae,
|
|
586
588
|
Et
|
|
587
589
|
]);
|
|
588
|
-
const
|
|
590
|
+
const dn = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ r.jsx(
|
|
589
591
|
Rt,
|
|
590
592
|
{
|
|
591
593
|
className: "content-render-iframe",
|
|
@@ -595,7 +597,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
595
597
|
replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
|
|
596
598
|
type: "sandbox",
|
|
597
599
|
content: e.content,
|
|
598
|
-
enableScaling:
|
|
600
|
+
enableScaling: Ot
|
|
599
601
|
}
|
|
600
602
|
) : /* @__PURE__ */ r.jsx(
|
|
601
603
|
Rt,
|
|
@@ -607,7 +609,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
607
609
|
type: "markdown",
|
|
608
610
|
content: e.content
|
|
609
611
|
}
|
|
610
|
-
) : null,
|
|
612
|
+
) : null, fn = (e = [], t = !1) => {
|
|
611
613
|
if (e.length === 0)
|
|
612
614
|
return null;
|
|
613
615
|
const c = e.filter(
|
|
@@ -628,14 +630,14 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
628
630
|
c === 1 && i.is_renderable !== !1 && "slide-element--single",
|
|
629
631
|
E ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : i.is_renderable === !1 && "hidden"
|
|
630
632
|
),
|
|
631
|
-
children:
|
|
633
|
+
children: dn(i, {
|
|
632
634
|
replaceRootScreenHeightWithFull: c === 1 && i.type === "html" && i.is_renderable !== !1
|
|
633
635
|
})
|
|
634
636
|
},
|
|
635
637
|
i.sequence_number ?? `${i.type}-${a}`
|
|
636
638
|
);
|
|
637
639
|
}) });
|
|
638
|
-
},
|
|
640
|
+
}, mn = n(() => {
|
|
639
641
|
const e = ve.current;
|
|
640
642
|
if (e) {
|
|
641
643
|
if (document.fullscreenElement === e) {
|
|
@@ -652,27 +654,27 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
652
654
|
top: e.scrollHeight,
|
|
653
655
|
behavior: "smooth"
|
|
654
656
|
});
|
|
655
|
-
}, []),
|
|
657
|
+
}, []), pn = n(
|
|
656
658
|
(e) => {
|
|
657
|
-
Pe(e), ye.current = !0, z.current = null,
|
|
659
|
+
Pe(e), ye.current = !0, z.current = null, y(!1), Ft(e) && (le(!0), x(!0)), X(), st();
|
|
658
660
|
},
|
|
659
661
|
[
|
|
660
662
|
st,
|
|
661
663
|
X,
|
|
662
|
-
|
|
664
|
+
x,
|
|
663
665
|
Pe
|
|
664
666
|
]
|
|
665
|
-
),
|
|
667
|
+
), hn = n(
|
|
666
668
|
(e) => {
|
|
667
|
-
Pe(e), ye.current = !0, z.current = null,
|
|
669
|
+
Pe(e), ye.current = !0, z.current = null, y(!1), Ft(e) && (le(!0), x(!0)), X(), T();
|
|
668
670
|
},
|
|
669
671
|
[
|
|
670
672
|
T,
|
|
671
673
|
X,
|
|
672
|
-
|
|
674
|
+
x,
|
|
673
675
|
Pe
|
|
674
676
|
]
|
|
675
|
-
),
|
|
677
|
+
), vn = n(
|
|
676
678
|
({
|
|
677
679
|
loading: e,
|
|
678
680
|
reason: t
|
|
@@ -685,7 +687,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
685
687
|
y(!1);
|
|
686
688
|
return;
|
|
687
689
|
}
|
|
688
|
-
e && t && Be(t), y(
|
|
690
|
+
e && t && Be(t), y(er(t, e));
|
|
689
691
|
},
|
|
690
692
|
[
|
|
691
693
|
b,
|
|
@@ -696,7 +698,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
696
698
|
s(() => {
|
|
697
699
|
C && y(!1);
|
|
698
700
|
}, [C]);
|
|
699
|
-
const
|
|
701
|
+
const yn = n(
|
|
700
702
|
(e) => {
|
|
701
703
|
const t = h[e]?.audioKey;
|
|
702
704
|
if (!t || !v || t !== v)
|
|
@@ -715,7 +717,7 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
715
717
|
}
|
|
716
718
|
if (G(null), at(!0), y(!1), w) {
|
|
717
719
|
const a = d + 1, E = N[a];
|
|
718
|
-
|
|
720
|
+
xt && E?.type === "interaction" && (z.current = a), T();
|
|
719
721
|
return;
|
|
720
722
|
}
|
|
721
723
|
},
|
|
@@ -726,29 +728,29 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
726
728
|
v,
|
|
727
729
|
R,
|
|
728
730
|
T,
|
|
729
|
-
|
|
731
|
+
xt,
|
|
730
732
|
N
|
|
731
733
|
]
|
|
732
|
-
),
|
|
733
|
-
o &&
|
|
734
|
+
), gn = n(() => {
|
|
735
|
+
o && xe((e) => !e);
|
|
734
736
|
}, [o]), Tt = n(
|
|
735
737
|
(e) => {
|
|
736
|
-
e.stopPropagation(), F &&
|
|
738
|
+
e.stopPropagation(), F && x(!0);
|
|
737
739
|
},
|
|
738
|
-
[it,
|
|
739
|
-
),
|
|
740
|
+
[it, x]
|
|
741
|
+
), Sn = n(
|
|
740
742
|
(e) => {
|
|
741
743
|
L(), Xe?.(e);
|
|
742
744
|
},
|
|
743
745
|
[L, Xe]
|
|
744
|
-
),
|
|
746
|
+
), bn = n(
|
|
745
747
|
(e) => {
|
|
746
748
|
L(), Je?.(e);
|
|
747
749
|
},
|
|
748
750
|
[L, Je]
|
|
749
|
-
),
|
|
750
|
-
le(!0),
|
|
751
|
-
}, [
|
|
751
|
+
), An = n(() => {
|
|
752
|
+
le(!0), x(!0);
|
|
753
|
+
}, [x]), Ee = l(
|
|
752
754
|
() => B.map(
|
|
753
755
|
(e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
|
|
754
756
|
),
|
|
@@ -764,9 +766,9 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
764
766
|
const a = Me.current, E = Ze.current;
|
|
765
767
|
if (!a || !E)
|
|
766
768
|
return;
|
|
767
|
-
const xn = a.getBoundingClientRect(),
|
|
769
|
+
const xn = a.getBoundingClientRect(), wn = E.getBoundingClientRect(), In = a.scrollTop + (wn.top - xn.top);
|
|
768
770
|
a.scrollTo({
|
|
769
|
-
top: Math.max(
|
|
771
|
+
top: Math.max(In, 0),
|
|
770
772
|
behavior: "smooth"
|
|
771
773
|
});
|
|
772
774
|
});
|
|
@@ -792,14 +794,14 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
792
794
|
ht && "slide--browser-fullscreen",
|
|
793
795
|
$ && "slide--mobile-landscape",
|
|
794
796
|
pt && "slide--mobile-landscape-native",
|
|
795
|
-
|
|
797
|
+
jt
|
|
796
798
|
),
|
|
797
|
-
onClick:
|
|
798
|
-
onFocusCapture:
|
|
799
|
-
onPointerDown:
|
|
800
|
-
...
|
|
799
|
+
onClick: An,
|
|
800
|
+
onFocusCapture: bn,
|
|
801
|
+
onPointerDown: Sn,
|
|
802
|
+
...Lt,
|
|
801
803
|
children: [
|
|
802
|
-
|
|
804
|
+
Zt ? /* @__PURE__ */ r.jsx(
|
|
803
805
|
"div",
|
|
804
806
|
{
|
|
805
807
|
"aria-hidden": "true",
|
|
@@ -813,19 +815,19 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
813
815
|
className: Z(
|
|
814
816
|
"slide__viewport relative h-full min-h-0 w-full",
|
|
815
817
|
$ && "slide__viewport--mobile-landscape",
|
|
816
|
-
$ &&
|
|
818
|
+
$ && !Yt && "slide__viewport--mobile-landscape-native"
|
|
817
819
|
),
|
|
818
820
|
children: [
|
|
819
|
-
|
|
821
|
+
Jt ? /* @__PURE__ */ r.jsxs("div", { className: "slide-landscape-header", children: [
|
|
820
822
|
/* @__PURE__ */ r.jsx(
|
|
821
823
|
"button",
|
|
822
824
|
{
|
|
823
825
|
"aria-label": P?.backAriaLabel ?? "Back",
|
|
824
826
|
className: "slide-landscape-header__back",
|
|
825
|
-
onClick:
|
|
827
|
+
onClick: tn,
|
|
826
828
|
type: "button",
|
|
827
829
|
children: /* @__PURE__ */ r.jsx(
|
|
828
|
-
|
|
830
|
+
$n,
|
|
829
831
|
{
|
|
830
832
|
className: "slide-landscape-header__icon h-6 w-6",
|
|
831
833
|
strokeWidth: 2.25
|
|
@@ -840,19 +842,19 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
840
842
|
{
|
|
841
843
|
className: Z(
|
|
842
844
|
"h-full min-h-0 w-full",
|
|
843
|
-
|
|
844
|
-
|
|
845
|
+
Qt && "slide__viewport-content--with-header",
|
|
846
|
+
Kt ? "slide-content--single" : "grid gap-4"
|
|
845
847
|
),
|
|
846
|
-
children: B.length > 0 ? /* @__PURE__ */ r.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ r.jsx("div", { ref: Me, className: "slide-stage__layer w-full", children:
|
|
848
|
+
children: B.length > 0 ? /* @__PURE__ */ r.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ r.jsx("div", { ref: Me, className: "slide-stage__layer w-full", children: nn.map(
|
|
847
849
|
(e, t) => {
|
|
848
|
-
const c = t ===
|
|
850
|
+
const c = t === rn;
|
|
849
851
|
return /* @__PURE__ */ r.jsx(
|
|
850
852
|
"div",
|
|
851
853
|
{
|
|
852
854
|
"aria-hidden": !c || void 0,
|
|
853
855
|
className: "w-full h-full",
|
|
854
856
|
style: { display: c ? void 0 : "none" },
|
|
855
|
-
children:
|
|
857
|
+
children: fn(
|
|
856
858
|
e.elementList,
|
|
857
859
|
c
|
|
858
860
|
)
|
|
@@ -863,25 +865,25 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
863
865
|
) }) }) : null
|
|
864
866
|
}
|
|
865
867
|
),
|
|
866
|
-
|
|
867
|
-
|
|
868
|
+
Dt ? /* @__PURE__ */ r.jsx(
|
|
869
|
+
Cn,
|
|
868
870
|
{
|
|
869
|
-
message:
|
|
871
|
+
message: Zn(
|
|
870
872
|
Te,
|
|
871
|
-
|
|
873
|
+
Ut
|
|
872
874
|
),
|
|
873
875
|
className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
|
|
874
876
|
}
|
|
875
877
|
) : null,
|
|
876
878
|
/* @__PURE__ */ r.jsx(
|
|
877
|
-
|
|
879
|
+
Nn,
|
|
878
880
|
{
|
|
879
|
-
extraBottomOffset:
|
|
881
|
+
extraBottomOffset: Ht,
|
|
880
882
|
hasPlayerGap: F,
|
|
881
|
-
isEnabled: ut &&
|
|
882
|
-
isPlayerHidden:
|
|
883
|
+
isEnabled: ut && zt,
|
|
884
|
+
isPlayerHidden: A && !F,
|
|
883
885
|
playbackTimeStore: H,
|
|
884
|
-
subtitleCues:
|
|
886
|
+
subtitleCues: on
|
|
885
887
|
}
|
|
886
888
|
),
|
|
887
889
|
ze ? /* @__PURE__ */ r.jsx(
|
|
@@ -891,34 +893,34 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
891
893
|
"data-player-keyboard-shortcuts-ignore": "true",
|
|
892
894
|
className: Z(
|
|
893
895
|
"slide-interaction-overlay",
|
|
894
|
-
F &&
|
|
896
|
+
F && A ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
|
|
895
897
|
),
|
|
896
898
|
onClick: Tt,
|
|
897
899
|
onPointerDown: Tt,
|
|
898
|
-
style:
|
|
900
|
+
style: sn,
|
|
899
901
|
children: /* @__PURE__ */ r.jsx(
|
|
900
|
-
|
|
902
|
+
Bt,
|
|
901
903
|
{
|
|
902
904
|
content: String(o?.content ?? ""),
|
|
903
905
|
defaultButtonText: It.buttonText ?? "",
|
|
904
906
|
defaultInputText: It.inputText ?? "",
|
|
905
|
-
defaultSelectedValues:
|
|
907
|
+
defaultSelectedValues: an,
|
|
906
908
|
confirmButtonText: D?.confirmButtonText,
|
|
907
909
|
copyButtonText: D?.copyButtonText,
|
|
908
910
|
copiedButtonText: D?.copiedButtonText,
|
|
909
|
-
onSend:
|
|
911
|
+
onSend: un,
|
|
910
912
|
readonly: Pt,
|
|
911
913
|
title: D?.title ?? Re ?? "Submit the content below to continue."
|
|
912
914
|
}
|
|
913
915
|
)
|
|
914
916
|
}
|
|
915
917
|
) : null,
|
|
916
|
-
|
|
917
|
-
|
|
918
|
+
A ? /* @__PURE__ */ r.jsx(
|
|
919
|
+
Ln.Provider,
|
|
918
920
|
{
|
|
919
|
-
value:
|
|
921
|
+
value: qt,
|
|
920
922
|
children: /* @__PURE__ */ r.jsx(
|
|
921
|
-
|
|
923
|
+
Bn,
|
|
922
924
|
{
|
|
923
925
|
audioList: h,
|
|
924
926
|
className: Z(
|
|
@@ -933,31 +935,31 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
933
935
|
isPlaybackPaused: V,
|
|
934
936
|
isAutoAdvanceEnabled: ae,
|
|
935
937
|
hasInteraction: !!o,
|
|
936
|
-
isInteractionOpen:
|
|
938
|
+
isInteractionOpen: Ae,
|
|
937
939
|
isSubtitleEnabled: ut,
|
|
938
940
|
onAutoAdvanceToggle: ct,
|
|
939
|
-
onLoadingChange:
|
|
941
|
+
onLoadingChange: vn,
|
|
940
942
|
onPlaybackStarted: () => {
|
|
941
943
|
Ne(!0);
|
|
942
944
|
},
|
|
943
|
-
onPlaybackPreferenceChange:
|
|
945
|
+
onPlaybackPreferenceChange: cn,
|
|
944
946
|
onPlaybackTimeChange: H.setTime,
|
|
945
947
|
onSubtitleToggle: () => {
|
|
946
|
-
|
|
948
|
+
Gt((e) => !e);
|
|
947
949
|
},
|
|
948
950
|
nextDisabled: !w,
|
|
949
|
-
onEnded:
|
|
950
|
-
onFullscreen:
|
|
951
|
+
onEnded: yn,
|
|
952
|
+
onFullscreen: mn,
|
|
951
953
|
isFullscreen: dt,
|
|
952
954
|
mobileViewMode: W,
|
|
953
955
|
settingsPortalContainer: Qe.current,
|
|
954
|
-
onMobileViewModeChange:
|
|
955
|
-
onInteractionToggle:
|
|
956
|
-
onNext:
|
|
957
|
-
onPrev:
|
|
958
|
-
prevDisabled: !
|
|
956
|
+
onMobileViewModeChange: en,
|
|
957
|
+
onInteractionToggle: gn,
|
|
958
|
+
onNext: hn,
|
|
959
|
+
onPrev: pn,
|
|
960
|
+
prevDisabled: !Vt,
|
|
959
961
|
showControls: F,
|
|
960
|
-
texts:
|
|
962
|
+
texts: Nt,
|
|
961
963
|
customActionContext: De,
|
|
962
964
|
customActions: q,
|
|
963
965
|
useAutoAdvanceToggle: fe
|
|
@@ -973,6 +975,6 @@ const er = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
|
973
975
|
);
|
|
974
976
|
};
|
|
975
977
|
export {
|
|
976
|
-
|
|
978
|
+
Rr as default
|
|
977
979
|
};
|
|
978
980
|
//# sourceMappingURL=Slide.es.js.map
|