markdown-flow-ui 0.1.124 → 0.1.126
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/Slide/MobilePlayerSettingsSheet.cjs.js +1 -1
- package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.js.map +1 -1
- package/dist/components/Slide/MobilePlayerSettingsSheet.d.ts +2 -0
- package/dist/components/Slide/MobilePlayerSettingsSheet.es.js +7 -6
- package/dist/components/Slide/MobilePlayerSettingsSheet.es.js.map +1 -1
- 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 +39 -1
- package/dist/components/Slide/Player.es.js +599 -469
- 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.d.ts +13 -0
- package/dist/components/Slide/Slide.es.js +535 -506
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/constants.cjs.js +1 -1
- package/dist/components/Slide/constants.cjs.js.map +1 -1
- package/dist/components/Slide/constants.d.ts +13 -0
- package/dist/components/Slide/constants.es.js +13 -0
- package/dist/components/Slide/constants.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 +14 -1
- package/dist/components/Slide/useWakePlayerFromIframe.es.js +73 -39
- package/dist/components/Slide/useWakePlayerFromIframe.es.js.map +1 -1
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.cjs.js +2 -0
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.cjs.js.map +1 -0
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.d.ts +5 -0
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.es.js +6 -0
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.es.js.map +1 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.js +2 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.js.map +1 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.d.ts +19 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js +58 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js.map +1 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.test.d.ts +1 -0
- 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 +2 -1
|
@@ -1,159 +1,172 @@
|
|
|
1
1
|
import { j as r } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { isSandboxInteractionMessage as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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
|
+
import { cn as Z } from "../../lib/utils.es.js";
|
|
5
|
+
import Cn from "../ui/loading-overlay-card.es.js";
|
|
6
|
+
import Tn from "../ContentRender/ContentRender.es.js";
|
|
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 {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
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";
|
|
22
25
|
/* empty css */
|
|
23
|
-
import
|
|
24
|
-
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 = {
|
|
25
28
|
waitingForAudio: "Waiting for current slide audio...",
|
|
26
29
|
loadingAudio: "Loading current slide audio...",
|
|
27
30
|
waitingForMoreAudio: "Waiting for more current slide audio..."
|
|
28
|
-
},
|
|
31
|
+
}, Zn = (S, I) => typeof S == "string" ? S : S[I] ?? S[Ge] ?? Mt[I], er = (S, I) => I ? S !== "loadingAudio" : !1, Bt = _n(
|
|
29
32
|
({
|
|
30
|
-
content:
|
|
33
|
+
content: S,
|
|
31
34
|
title: I,
|
|
32
|
-
defaultButtonText:
|
|
33
|
-
defaultInputText:
|
|
34
|
-
defaultSelectedValues:
|
|
35
|
-
confirmButtonText:
|
|
36
|
-
copyButtonText:
|
|
37
|
-
copiedButtonText:
|
|
38
|
-
onSend:
|
|
39
|
-
readonly:
|
|
35
|
+
defaultButtonText: _,
|
|
36
|
+
defaultInputText: ee,
|
|
37
|
+
defaultSelectedValues: P,
|
|
38
|
+
confirmButtonText: q,
|
|
39
|
+
copyButtonText: te,
|
|
40
|
+
copiedButtonText: Te,
|
|
41
|
+
onSend: Re,
|
|
42
|
+
readonly: D = !1
|
|
40
43
|
}) => /* @__PURE__ */ r.jsxs("div", { className: "slide-player__interaction-card", children: [
|
|
41
44
|
/* @__PURE__ */ r.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ r.jsx("p", { className: "slide-player__interaction-title", children: I }) }),
|
|
42
45
|
/* @__PURE__ */ r.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ r.jsx(
|
|
43
|
-
|
|
46
|
+
Tn,
|
|
44
47
|
{
|
|
45
|
-
content:
|
|
46
|
-
defaultButtonText:
|
|
47
|
-
defaultInputText:
|
|
48
|
-
defaultSelectedValues:
|
|
49
|
-
confirmButtonText:
|
|
50
|
-
copyButtonText:
|
|
51
|
-
copiedButtonText:
|
|
52
|
-
onSend:
|
|
53
|
-
readonly:
|
|
48
|
+
content: S,
|
|
49
|
+
defaultButtonText: _,
|
|
50
|
+
defaultInputText: ee,
|
|
51
|
+
defaultSelectedValues: P,
|
|
52
|
+
confirmButtonText: q,
|
|
53
|
+
copyButtonText: te,
|
|
54
|
+
copiedButtonText: Te,
|
|
55
|
+
onSend: Re,
|
|
56
|
+
readonly: D,
|
|
54
57
|
sandboxMode: "content"
|
|
55
58
|
}
|
|
56
59
|
) })
|
|
57
60
|
] })
|
|
58
61
|
);
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
}),
|
|
64
|
-
elementList:
|
|
62
|
+
Bt.displayName = "InteractionOverlayCard";
|
|
63
|
+
const tr = (S, I) => S.length === I.length && S.every((_, ee) => {
|
|
64
|
+
const P = I[ee];
|
|
65
|
+
return _.sequence_number === P?.sequence_number && _.type === P?.type && _.content === P?.content;
|
|
66
|
+
}), Rr = ({
|
|
67
|
+
elementList: S = [],
|
|
65
68
|
showPlayer: I = !0,
|
|
66
|
-
playerAlwaysVisible:
|
|
67
|
-
playerClassName:
|
|
68
|
-
fullscreenHeader:
|
|
69
|
-
playerCustomActions:
|
|
70
|
-
playerCustomActionPauseOnActive:
|
|
71
|
-
bufferingText:
|
|
72
|
-
interactionTitle:
|
|
73
|
-
interactionTexts:
|
|
74
|
-
playerTexts:
|
|
75
|
-
playerAutoHideDelay:
|
|
76
|
-
markerAutoAdvanceDelay:
|
|
77
|
-
interactionDefaultValueOptions:
|
|
78
|
-
onSend:
|
|
79
|
-
onPlayerVisibilityChange:
|
|
80
|
-
onMobileViewModeChange:
|
|
81
|
-
onStepChange:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
69
|
+
playerAlwaysVisible: _ = !1,
|
|
70
|
+
playerClassName: ee,
|
|
71
|
+
fullscreenHeader: P,
|
|
72
|
+
playerCustomActions: q,
|
|
73
|
+
playerCustomActionPauseOnActive: te = !0,
|
|
74
|
+
bufferingText: Te = Mt,
|
|
75
|
+
interactionTitle: Re,
|
|
76
|
+
interactionTexts: D,
|
|
77
|
+
playerTexts: Nt,
|
|
78
|
+
playerAutoHideDelay: ke = 3e3,
|
|
79
|
+
markerAutoAdvanceDelay: He = Yn,
|
|
80
|
+
interactionDefaultValueOptions: pe,
|
|
81
|
+
onSend: We,
|
|
82
|
+
onPlayerVisibilityChange: Fe,
|
|
83
|
+
onMobileViewModeChange: $e,
|
|
84
|
+
onStepChange: Ye,
|
|
85
|
+
enableKeyboardShortcuts: U = !0,
|
|
86
|
+
enableIframeScaling: Ot = !0,
|
|
87
|
+
disableLoadingOverlay: C = !1,
|
|
88
|
+
className: jt,
|
|
89
|
+
onPointerDown: Xe,
|
|
90
|
+
onFocusCapture: Je,
|
|
91
|
+
...Lt
|
|
87
92
|
}) => {
|
|
88
|
-
const
|
|
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({
|
|
89
94
|
markerCount: 0,
|
|
90
95
|
currentIndex: -1,
|
|
91
96
|
canGoNext: !1
|
|
92
97
|
}), {
|
|
93
98
|
currentElementList: B,
|
|
94
|
-
stepElementLists:
|
|
99
|
+
stepElementLists: ot,
|
|
95
100
|
slideElementList: N,
|
|
96
101
|
currentIndex: d,
|
|
97
102
|
audioList: h,
|
|
98
|
-
currentAudioSequenceIndexes:
|
|
99
|
-
currentStepHasSpeakableElement:
|
|
103
|
+
currentAudioSequenceIndexes: ge,
|
|
104
|
+
currentStepHasSpeakableElement: b,
|
|
100
105
|
currentInteractionElement: u,
|
|
101
|
-
canGoPrev:
|
|
102
|
-
canGoNext:
|
|
103
|
-
handlePrev:
|
|
104
|
-
handleNext:
|
|
105
|
-
} =
|
|
106
|
+
canGoPrev: Vt,
|
|
107
|
+
canGoNext: w,
|
|
108
|
+
handlePrev: st,
|
|
109
|
+
handleNext: T
|
|
110
|
+
} = On(S), ie = l(() => {
|
|
106
111
|
if (!(d < 0))
|
|
107
112
|
return N[d];
|
|
108
|
-
}, [d, N]),
|
|
113
|
+
}, [d, N]), Kt = N.filter(
|
|
109
114
|
(e) => e.is_renderable !== !1
|
|
110
|
-
).length === 1,
|
|
111
|
-
() =>
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
() =>
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
115
|
+
).length === 1, A = I && (N.length > 0 || h.length > 0 || !!u), qt = l(
|
|
116
|
+
() => ({
|
|
117
|
+
enabled: U,
|
|
118
|
+
ownerId: he
|
|
119
|
+
}),
|
|
120
|
+
[U, he]
|
|
121
|
+
), L = n(() => {
|
|
122
|
+
!U || !A || Vn(he);
|
|
123
|
+
}, [U, he, A]), R = l(
|
|
124
|
+
() => ge.map((e) => h[e]?.audioKey).filter((e) => !!e),
|
|
125
|
+
[h, ge]
|
|
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,
|
|
128
|
+
ue
|
|
129
|
+
] = m(0), [dt, Wt] = m(!1), O = l(() => Fn(), []), [we, Ve] = m(
|
|
130
|
+
Ce
|
|
131
|
+
), [ft, Ke] = m(!1), [$t, mt] = m(
|
|
132
|
+
() => O ? kt() : !1
|
|
133
|
+
), H = l(() => Hn(), []), {
|
|
134
|
+
effectiveMobileViewMode: W,
|
|
135
|
+
isImmersiveMobileFullscreen: $,
|
|
136
|
+
isNativeMobileFullscreen: pt,
|
|
137
|
+
shouldRotateFullscreenViewport: Yt
|
|
138
|
+
} = l(
|
|
139
|
+
() => Kn({
|
|
140
|
+
hasManualMobileViewMode: ft,
|
|
128
141
|
isMobileDevice: O,
|
|
129
|
-
mobileViewMode:
|
|
142
|
+
mobileViewMode: we
|
|
130
143
|
}),
|
|
131
144
|
[
|
|
132
|
-
|
|
145
|
+
ft,
|
|
133
146
|
O,
|
|
134
|
-
|
|
135
|
-
|
|
147
|
+
$t,
|
|
148
|
+
we
|
|
136
149
|
]
|
|
137
|
-
),
|
|
150
|
+
), Xt = p(W), F = A && (_ || it), Jt = $ && F, Qt = $ && F, Zt = $ || pt, ht = dt && !O, en = n(
|
|
138
151
|
(e) => {
|
|
139
|
-
|
|
152
|
+
Ke(!0), Ve(e);
|
|
140
153
|
},
|
|
141
154
|
[]
|
|
142
|
-
),
|
|
143
|
-
|
|
144
|
-
}, []),
|
|
145
|
-
|
|
146
|
-
}, [
|
|
147
|
-
|
|
148
|
-
}, []),
|
|
149
|
-
|
|
150
|
-
}, []), { mountedStepStates:
|
|
155
|
+
), vt = n(() => {
|
|
156
|
+
Ke(!1), Ve(Ce);
|
|
157
|
+
}, []), tn = n(() => {
|
|
158
|
+
vt(), P?.onBack?.();
|
|
159
|
+
}, [P, vt]), yt = n((e) => {
|
|
160
|
+
je(e);
|
|
161
|
+
}, []), gt = n(() => {
|
|
162
|
+
je((e) => !e);
|
|
163
|
+
}, []), { mountedStepStates: nn, currentMountedStateIndex: rn } = l(() => {
|
|
151
164
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
152
|
-
return
|
|
165
|
+
return ot.forEach((c, f) => {
|
|
153
166
|
const i = e.findIndex(
|
|
154
|
-
(a) =>
|
|
167
|
+
(a) => tr(
|
|
155
168
|
a.elementList,
|
|
156
|
-
|
|
169
|
+
c
|
|
157
170
|
)
|
|
158
171
|
);
|
|
159
172
|
if (i >= 0) {
|
|
@@ -161,469 +174,471 @@ const Gn = (b, I) => b.length === I.length && b.every((w, Q) => {
|
|
|
161
174
|
return;
|
|
162
175
|
}
|
|
163
176
|
e.push({
|
|
164
|
-
elementList:
|
|
177
|
+
elementList: c,
|
|
165
178
|
sourceStepIndexes: [f]
|
|
166
179
|
}), t.set(f, e.length - 1);
|
|
167
180
|
}), {
|
|
168
181
|
mountedStepStates: e,
|
|
169
182
|
currentMountedStateIndex: d >= 0 ? t.get(d) ?? -1 : -1
|
|
170
183
|
};
|
|
171
|
-
}, [d,
|
|
184
|
+
}, [d, ot]), St = l(() => String(d), [d]), g = l(() => v ? h.findIndex(
|
|
172
185
|
(e) => (e.audioKey ?? "") === v
|
|
173
|
-
) : -1, [h, v]),
|
|
186
|
+
) : -1, [h, v]), qe = l(
|
|
174
187
|
() => g >= 0 ? h[g] : void 0,
|
|
175
188
|
[h, g]
|
|
176
|
-
),
|
|
189
|
+
), on = qe?.element?.subtitle_cues ?? [], Ie = l(
|
|
177
190
|
() => R[0] ?? "none",
|
|
178
191
|
[R]
|
|
179
|
-
),
|
|
192
|
+
), De = l(
|
|
180
193
|
() => ({
|
|
181
|
-
currentElement:
|
|
194
|
+
currentElement: zn({
|
|
182
195
|
currentAudioIndex: g,
|
|
183
|
-
currentAudioSequenceIndexes:
|
|
196
|
+
currentAudioSequenceIndexes: ge,
|
|
184
197
|
audioList: h,
|
|
185
198
|
currentInteractionElement: o,
|
|
186
|
-
currentStepElement:
|
|
199
|
+
currentStepElement: ie
|
|
187
200
|
}),
|
|
188
201
|
currentIndex: d,
|
|
189
|
-
currentStepElement:
|
|
190
|
-
isActive:
|
|
191
|
-
setActive:
|
|
192
|
-
toggleActive:
|
|
202
|
+
currentStepElement: ie,
|
|
203
|
+
isActive: Oe,
|
|
204
|
+
setActive: yt,
|
|
205
|
+
toggleActive: gt
|
|
193
206
|
}),
|
|
194
207
|
[
|
|
195
208
|
o,
|
|
196
209
|
h,
|
|
197
210
|
g,
|
|
198
|
-
|
|
211
|
+
ge,
|
|
199
212
|
d,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
213
|
+
ie,
|
|
214
|
+
Oe,
|
|
215
|
+
yt,
|
|
216
|
+
gt
|
|
204
217
|
]
|
|
205
|
-
),
|
|
206
|
-
() =>
|
|
207
|
-
|
|
208
|
-
|
|
218
|
+
), Ue = l(
|
|
219
|
+
() => Gn(
|
|
220
|
+
q,
|
|
221
|
+
De
|
|
209
222
|
),
|
|
210
|
-
[
|
|
211
|
-
),
|
|
223
|
+
[De, q]
|
|
224
|
+
), sn = l(
|
|
212
225
|
() => ({
|
|
213
|
-
"--slide-player-custom-action-count": String(
|
|
226
|
+
"--slide-player-custom-action-count": String(Ue),
|
|
214
227
|
"--slide-player-mobile-control-count": String(
|
|
215
|
-
|
|
228
|
+
Ue + 4
|
|
216
229
|
)
|
|
217
230
|
}),
|
|
218
|
-
[
|
|
219
|
-
),
|
|
231
|
+
[Ue]
|
|
232
|
+
), bt = R.length > 0, At = l(() => u ? `${u.sequence_number ?? "none"}:${String(
|
|
220
233
|
u.content ?? ""
|
|
221
|
-
)}` : "none", [u]),
|
|
222
|
-
() => [
|
|
223
|
-
[
|
|
224
|
-
),
|
|
234
|
+
)}` : "none", [u]), de = l(
|
|
235
|
+
() => [St, At].join("|"),
|
|
236
|
+
[At, St]
|
|
237
|
+
), ln = l(
|
|
225
238
|
() => [
|
|
226
|
-
|
|
227
|
-
|
|
239
|
+
de,
|
|
240
|
+
qe?.audioKey ?? "none",
|
|
228
241
|
String(g)
|
|
229
242
|
].join("|"),
|
|
230
|
-
[g,
|
|
231
|
-
),
|
|
232
|
-
(t) => t.audioKey ===
|
|
233
|
-
)?.audioUrl?.trim() ?? "", [h,
|
|
234
|
-
() =>
|
|
235
|
-
canGoNext:
|
|
243
|
+
[g, qe?.audioKey, de]
|
|
244
|
+
), xt = !!l(() => !Ie || Ie === "none" ? "" : h.find(
|
|
245
|
+
(t) => t.audioKey === Ie
|
|
246
|
+
)?.audioUrl?.trim() ?? "", [h, Ie]), V = te && !!q && Oe, fe = l(
|
|
247
|
+
() => Wn({
|
|
248
|
+
canGoNext: w,
|
|
236
249
|
currentAudioIndex: g,
|
|
237
|
-
currentStepHasSpeakableElement:
|
|
250
|
+
currentStepHasSpeakableElement: b,
|
|
238
251
|
hasInteraction: !!u
|
|
239
252
|
}),
|
|
240
253
|
[
|
|
241
|
-
|
|
254
|
+
w,
|
|
242
255
|
g,
|
|
243
256
|
u,
|
|
244
|
-
|
|
257
|
+
b
|
|
245
258
|
]
|
|
246
259
|
), K = n(() => {
|
|
247
|
-
ee.current !== null && (window.clearTimeout(ee.current), ee.current = null);
|
|
248
|
-
}, []), j = n(() => {
|
|
249
260
|
ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
|
|
250
|
-
}, []),
|
|
261
|
+
}, []), j = n(() => {
|
|
262
|
+
oe.current !== null && (window.clearTimeout(oe.current), oe.current = null);
|
|
263
|
+
}, []), M = n(() => {
|
|
264
|
+
se.current !== null && (window.clearTimeout(se.current), se.current = null);
|
|
265
|
+
}, []), Y = n(() => {
|
|
251
266
|
re.current !== null && (window.clearTimeout(re.current), re.current = null);
|
|
252
|
-
}, []),
|
|
253
|
-
|
|
254
|
-
}, []), $ = n(() => {
|
|
255
|
-
W(), j(), F(), U(null), z.reset(), y(!1), Me(De), st(!1), ke(!1), Ne(void 0), be(!1), ce(0);
|
|
267
|
+
}, []), X = n(() => {
|
|
268
|
+
Y(), j(), M(), G(null), H.reset(), y(!1), Be(Ge), at(!1), Ne(!1), Le(void 0), xe(!1), ue(0);
|
|
256
269
|
}, [
|
|
257
|
-
|
|
270
|
+
Y,
|
|
258
271
|
j,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
]),
|
|
272
|
+
M,
|
|
273
|
+
H
|
|
274
|
+
]), J = n(() => {
|
|
262
275
|
const e = R[0];
|
|
263
|
-
return e ? (
|
|
264
|
-
}, [R]),
|
|
265
|
-
j(),
|
|
276
|
+
return e ? (G(e), !0) : !1;
|
|
277
|
+
}, [R]), _e = n(() => {
|
|
278
|
+
j(), M(), xe(!1), ue(0), !J() && w && T();
|
|
266
279
|
}, [
|
|
267
|
-
|
|
280
|
+
w,
|
|
268
281
|
j,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
]),
|
|
282
|
+
M,
|
|
283
|
+
T,
|
|
284
|
+
J
|
|
285
|
+
]), wt = n(
|
|
273
286
|
(e) => {
|
|
274
|
-
if (
|
|
287
|
+
if (M(), !e)
|
|
275
288
|
return;
|
|
276
289
|
const t = () => {
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
),
|
|
290
|
+
se.current = null, ue(
|
|
291
|
+
Jn
|
|
292
|
+
), xe(!0), z.current = null;
|
|
280
293
|
};
|
|
281
|
-
|
|
294
|
+
se.current = window.setTimeout(
|
|
282
295
|
t,
|
|
283
|
-
|
|
296
|
+
Xn
|
|
284
297
|
);
|
|
285
298
|
},
|
|
286
|
-
[
|
|
287
|
-
),
|
|
288
|
-
(e =
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
},
|
|
299
|
+
[M]
|
|
300
|
+
), x = n(
|
|
301
|
+
(e = be) => {
|
|
302
|
+
A && (Se(!0), K(), !(_ || !e || ke <= 0) && (ne.current = window.setTimeout(() => {
|
|
303
|
+
Se(!1), ne.current = null;
|
|
304
|
+
}, ke)));
|
|
292
305
|
},
|
|
293
306
|
[
|
|
294
307
|
K,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
308
|
+
be,
|
|
309
|
+
_,
|
|
310
|
+
ke,
|
|
311
|
+
A
|
|
299
312
|
]
|
|
300
|
-
),
|
|
301
|
-
|
|
302
|
-
}, []),
|
|
313
|
+
), me = !!(u?.readonly || u?.user_input?.trim()), Q = !!u && !me, cn = n((e) => {
|
|
314
|
+
lt(e);
|
|
315
|
+
}, []), Pe = n(
|
|
303
316
|
(e) => {
|
|
304
|
-
const t = e?.shouldContinuePlayback ??
|
|
305
|
-
|
|
317
|
+
const t = e?.shouldContinuePlayback ?? ce;
|
|
318
|
+
lt(t);
|
|
306
319
|
},
|
|
307
|
-
[
|
|
320
|
+
[ce]
|
|
308
321
|
);
|
|
309
322
|
s(() => {
|
|
310
|
-
|
|
311
|
-
}, [d,
|
|
312
|
-
|
|
323
|
+
ct(ce), te && je(!1);
|
|
324
|
+
}, [d, ce, te]), s(() => () => {
|
|
325
|
+
Y(), K(), j(), M();
|
|
313
326
|
}, [
|
|
314
|
-
|
|
327
|
+
Y,
|
|
315
328
|
j,
|
|
316
|
-
|
|
329
|
+
M,
|
|
317
330
|
K
|
|
318
|
-
]), s(() => (
|
|
319
|
-
|
|
320
|
-
}), [
|
|
321
|
-
O ||
|
|
322
|
-
}, [O,
|
|
331
|
+
]), s(() => (Fe?.(F), () => {
|
|
332
|
+
Fe?.(!1);
|
|
333
|
+
}), [Fe, F]), s(() => {
|
|
334
|
+
O || we === Ce || (Ke(!1), Ve(Ce));
|
|
335
|
+
}, [O, we]), s(() => {
|
|
323
336
|
if (!O) {
|
|
324
|
-
|
|
337
|
+
mt(!1);
|
|
325
338
|
return;
|
|
326
339
|
}
|
|
327
340
|
const e = () => {
|
|
328
|
-
|
|
341
|
+
mt(kt());
|
|
329
342
|
};
|
|
330
|
-
return e(),
|
|
343
|
+
return e(), Mn(e);
|
|
331
344
|
}, [O]), s(() => {
|
|
332
|
-
|
|
333
|
-
}, [
|
|
334
|
-
|
|
335
|
-
}, [
|
|
336
|
-
|
|
337
|
-
}, [d,
|
|
338
|
-
const e =
|
|
345
|
+
$e?.(W);
|
|
346
|
+
}, [W, $e]), s(() => {
|
|
347
|
+
Xt.current = W;
|
|
348
|
+
}, [W]), s(() => {
|
|
349
|
+
Ye?.(ie, d);
|
|
350
|
+
}, [d, ie, Ye]), s(() => {
|
|
351
|
+
const e = rt.current, t = Dn(
|
|
339
352
|
{
|
|
340
353
|
previousMarkerCount: e.markerCount,
|
|
341
354
|
nextMarkerCount: N.length,
|
|
342
355
|
previousIndex: e.currentIndex,
|
|
343
356
|
previousCanGoNext: e.canGoNext,
|
|
344
|
-
nextCanGoNext:
|
|
357
|
+
nextCanGoNext: w,
|
|
345
358
|
currentAudioKey: v,
|
|
346
|
-
hasCompletedCurrentStepAudio:
|
|
347
|
-
hasResolvedCurrentInteraction:
|
|
348
|
-
currentStepHasSpeakableElement:
|
|
359
|
+
hasCompletedCurrentStepAudio: k,
|
|
360
|
+
hasResolvedCurrentInteraction: me,
|
|
361
|
+
currentStepHasSpeakableElement: b,
|
|
349
362
|
currentInteractionElement: u,
|
|
350
|
-
isAutoAdvanceEnabled:
|
|
351
|
-
shouldUseSilentStepAutoAdvanceToggle:
|
|
363
|
+
isAutoAdvanceEnabled: ae,
|
|
364
|
+
shouldUseSilentStepAutoAdvanceToggle: fe
|
|
352
365
|
}
|
|
353
366
|
);
|
|
354
|
-
|
|
367
|
+
rt.current = {
|
|
355
368
|
markerCount: N.length,
|
|
356
369
|
currentIndex: d,
|
|
357
|
-
canGoNext:
|
|
358
|
-
}, t &&
|
|
370
|
+
canGoNext: w
|
|
371
|
+
}, t && T();
|
|
359
372
|
}, [
|
|
360
|
-
|
|
373
|
+
w,
|
|
361
374
|
v,
|
|
362
375
|
d,
|
|
363
376
|
u,
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
377
|
+
b,
|
|
378
|
+
T,
|
|
379
|
+
k,
|
|
380
|
+
me,
|
|
381
|
+
ae,
|
|
382
|
+
fe,
|
|
370
383
|
N.length
|
|
371
384
|
]), s(() => {
|
|
372
|
-
if (!
|
|
373
|
-
K(),
|
|
385
|
+
if (!A) {
|
|
386
|
+
K(), Se(!1);
|
|
374
387
|
return;
|
|
375
388
|
}
|
|
376
|
-
if (
|
|
377
|
-
K(),
|
|
389
|
+
if (_) {
|
|
390
|
+
K(), Se(!0);
|
|
378
391
|
return;
|
|
379
392
|
}
|
|
380
|
-
|
|
393
|
+
be || x(!0);
|
|
381
394
|
}, [
|
|
382
395
|
K,
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
396
|
+
be,
|
|
397
|
+
_,
|
|
398
|
+
A,
|
|
399
|
+
x
|
|
387
400
|
]), s(() => {
|
|
388
401
|
if (typeof window > "u")
|
|
389
402
|
return;
|
|
390
403
|
const e = (t) => {
|
|
391
|
-
t.origin === window.location.origin &&
|
|
404
|
+
t.origin === window.location.origin && En(t.data) && t.data.eventType === "click" && A && (L(), le(!0), x(!0));
|
|
392
405
|
};
|
|
393
406
|
return window.addEventListener("message", e), () => {
|
|
394
407
|
window.removeEventListener("message", e);
|
|
395
408
|
};
|
|
396
|
-
}, [
|
|
397
|
-
sectionRef:
|
|
398
|
-
enabled:
|
|
409
|
+
}, [L, A, x]), jn({
|
|
410
|
+
sectionRef: ve,
|
|
411
|
+
enabled: A,
|
|
412
|
+
keyboardShortcutsEnabled: U,
|
|
413
|
+
onKeyboardShortcut: L,
|
|
399
414
|
onWake: () => {
|
|
400
|
-
|
|
415
|
+
L(), le(!0), x(!0);
|
|
401
416
|
}
|
|
402
417
|
}), s(() => {
|
|
403
|
-
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } =
|
|
404
|
-
previousResetKey:
|
|
405
|
-
nextResetKey:
|
|
418
|
+
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Un({
|
|
419
|
+
previousResetKey: nt.current,
|
|
420
|
+
nextResetKey: de,
|
|
406
421
|
currentAudioKey: v,
|
|
407
|
-
hasCompletedCurrentStepAudio:
|
|
422
|
+
hasCompletedCurrentStepAudio: k
|
|
408
423
|
});
|
|
409
|
-
|
|
410
|
-
const
|
|
424
|
+
nt.current = de;
|
|
425
|
+
const c = z.current === d && !!u, f = qn({
|
|
411
426
|
hasInteraction: !!u,
|
|
412
|
-
shouldBlockPlaybackForInteraction:
|
|
413
|
-
shouldOpenInteractionOverlayAfterAudio:
|
|
427
|
+
shouldBlockPlaybackForInteraction: Q,
|
|
428
|
+
shouldOpenInteractionOverlayAfterAudio: c,
|
|
414
429
|
hasPlaybackContextChanged: e,
|
|
415
|
-
hasResolvedCurrentInteraction:
|
|
416
|
-
currentStepHasSpeakableElement:
|
|
430
|
+
hasResolvedCurrentInteraction: me,
|
|
431
|
+
currentStepHasSpeakableElement: b
|
|
417
432
|
});
|
|
418
|
-
if (e &&
|
|
419
|
-
if (u &&
|
|
420
|
-
|
|
433
|
+
if (e && X(), !(B.length === 0 && !u) && !V) {
|
|
434
|
+
if (u && Le(u), f) {
|
|
435
|
+
wt(u);
|
|
421
436
|
return;
|
|
422
437
|
}
|
|
423
|
-
if (
|
|
424
|
-
if (
|
|
425
|
-
if (
|
|
438
|
+
if (M(), z.current = null, !!t && !J()) {
|
|
439
|
+
if (b) {
|
|
440
|
+
if (C) {
|
|
426
441
|
y(!1);
|
|
427
442
|
return;
|
|
428
443
|
}
|
|
429
444
|
y(!0);
|
|
430
445
|
return;
|
|
431
446
|
}
|
|
432
|
-
if (
|
|
433
|
-
return
|
|
434
|
-
|
|
435
|
-
},
|
|
436
|
-
|
|
447
|
+
if (w && !(fe && !ae))
|
|
448
|
+
return re.current = window.setTimeout(() => {
|
|
449
|
+
re.current = null, T();
|
|
450
|
+
}, He), () => {
|
|
451
|
+
Y();
|
|
437
452
|
};
|
|
438
453
|
}
|
|
439
454
|
}
|
|
440
455
|
}, [
|
|
441
|
-
|
|
442
|
-
|
|
456
|
+
w,
|
|
457
|
+
Y,
|
|
443
458
|
B.length,
|
|
444
459
|
u,
|
|
445
460
|
v,
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
461
|
+
de,
|
|
462
|
+
b,
|
|
463
|
+
He,
|
|
464
|
+
T,
|
|
465
|
+
k,
|
|
449
466
|
C,
|
|
467
|
+
ae,
|
|
468
|
+
me,
|
|
469
|
+
Q,
|
|
450
470
|
M,
|
|
451
|
-
T,
|
|
452
|
-
le,
|
|
453
|
-
de,
|
|
454
471
|
X,
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
L,
|
|
460
|
-
ue
|
|
472
|
+
wt,
|
|
473
|
+
J,
|
|
474
|
+
V,
|
|
475
|
+
fe
|
|
461
476
|
]), s(() => {
|
|
462
|
-
if (
|
|
477
|
+
if (C || V || !b || Q) {
|
|
463
478
|
y(!1);
|
|
464
479
|
return;
|
|
465
480
|
}
|
|
466
|
-
if (
|
|
481
|
+
if (k) {
|
|
467
482
|
y(!1);
|
|
468
483
|
return;
|
|
469
484
|
}
|
|
470
|
-
if (
|
|
485
|
+
if (bt) {
|
|
471
486
|
y(!1);
|
|
472
487
|
return;
|
|
473
488
|
}
|
|
474
|
-
|
|
489
|
+
Be("waitingForAudio"), y(!0);
|
|
475
490
|
}, [
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
491
|
+
bt,
|
|
492
|
+
b,
|
|
493
|
+
k,
|
|
494
|
+
C,
|
|
495
|
+
V,
|
|
496
|
+
Q
|
|
482
497
|
]), s(() => {
|
|
483
|
-
v || R.length === 0 ||
|
|
498
|
+
v || R.length === 0 || V || !b || Q || k || J();
|
|
484
499
|
}, [
|
|
485
500
|
v,
|
|
486
501
|
R,
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
502
|
+
b,
|
|
503
|
+
k,
|
|
504
|
+
V,
|
|
505
|
+
Q,
|
|
506
|
+
J
|
|
492
507
|
]), s(() => {
|
|
493
|
-
!v || g >= 0 ||
|
|
508
|
+
!v || g >= 0 || G(null);
|
|
494
509
|
}, [g, v]), s(() => {
|
|
495
|
-
g >= 0 ||
|
|
496
|
-
}, [g,
|
|
497
|
-
|
|
498
|
-
}, [
|
|
499
|
-
const
|
|
510
|
+
g >= 0 || H.reset();
|
|
511
|
+
}, [g, H]), s(() => {
|
|
512
|
+
Ne(!1);
|
|
513
|
+
}, [ln]);
|
|
514
|
+
const It = l(() => {
|
|
500
515
|
if (!o)
|
|
501
516
|
return {};
|
|
502
517
|
const e = !!o.user_input?.trim();
|
|
503
|
-
return
|
|
518
|
+
return Rn(
|
|
504
519
|
typeof o.content == "string" ? o.content : void 0,
|
|
505
520
|
o.user_input,
|
|
506
|
-
e ? void 0 :
|
|
521
|
+
e ? void 0 : pe
|
|
507
522
|
);
|
|
508
|
-
}, [o,
|
|
523
|
+
}, [o, pe]), an = l(() => {
|
|
509
524
|
if (!o)
|
|
510
525
|
return;
|
|
511
526
|
const e = !!o.user_input?.trim();
|
|
512
|
-
return
|
|
527
|
+
return kn(
|
|
513
528
|
typeof o.content == "string" ? o.content : void 0,
|
|
514
529
|
o.user_input,
|
|
515
|
-
e ? void 0 :
|
|
530
|
+
e ? void 0 : pe
|
|
516
531
|
);
|
|
517
|
-
}, [o,
|
|
532
|
+
}, [o, pe]), _t = !!o?.user_input?.trim(), Pt = !!o?.readonly || _t, Et = Pt || _t, ze = !!o && Ae, un = n(
|
|
518
533
|
(e) => {
|
|
519
|
-
const
|
|
534
|
+
const c = [
|
|
520
535
|
...e.selectedValues ?? [],
|
|
521
536
|
e.inputText?.trim() ?? "",
|
|
522
537
|
e.buttonText?.trim() ?? ""
|
|
523
538
|
].filter(Boolean).join(", ");
|
|
524
|
-
|
|
539
|
+
Le((f) => !f || !c ? f : {
|
|
525
540
|
...f,
|
|
526
|
-
user_input:
|
|
527
|
-
}),
|
|
541
|
+
user_input: c
|
|
542
|
+
}), We?.(e, o), _e();
|
|
528
543
|
},
|
|
529
|
-
[o,
|
|
544
|
+
[o, _e, We]
|
|
530
545
|
);
|
|
531
546
|
s(() => {
|
|
532
547
|
const e = () => {
|
|
533
|
-
|
|
548
|
+
Wt(document.fullscreenElement === ve.current);
|
|
534
549
|
};
|
|
535
550
|
return e(), document.addEventListener("fullscreenchange", e), () => {
|
|
536
551
|
document.removeEventListener("fullscreenchange", e);
|
|
537
552
|
};
|
|
538
553
|
}, []), s(() => {
|
|
539
|
-
if (!
|
|
540
|
-
|
|
554
|
+
if (!ze) {
|
|
555
|
+
ue(0);
|
|
541
556
|
return;
|
|
542
557
|
}
|
|
543
|
-
const e =
|
|
558
|
+
const e = et.current;
|
|
544
559
|
if (!e)
|
|
545
560
|
return;
|
|
546
561
|
const t = () => {
|
|
547
562
|
const f = Math.ceil(
|
|
548
563
|
e.getBoundingClientRect().height
|
|
549
564
|
);
|
|
550
|
-
|
|
551
|
-
f +
|
|
565
|
+
ue(
|
|
566
|
+
f + Qn
|
|
552
567
|
);
|
|
553
568
|
};
|
|
554
569
|
if (t(), typeof ResizeObserver > "u")
|
|
555
570
|
return;
|
|
556
|
-
const
|
|
571
|
+
const c = new ResizeObserver(() => {
|
|
557
572
|
t();
|
|
558
573
|
});
|
|
559
|
-
return
|
|
560
|
-
|
|
574
|
+
return c.observe(e), () => {
|
|
575
|
+
c.disconnect();
|
|
561
576
|
};
|
|
562
|
-
}, [
|
|
563
|
-
if (j(), !(!
|
|
564
|
-
return
|
|
565
|
-
|
|
577
|
+
}, [ze]), s(() => {
|
|
578
|
+
if (j(), !(!Ae || !Et))
|
|
579
|
+
return oe.current = window.setTimeout(() => {
|
|
580
|
+
oe.current = null, _e();
|
|
566
581
|
}, 2e3), () => {
|
|
567
582
|
j();
|
|
568
583
|
};
|
|
569
584
|
}, [
|
|
570
585
|
j,
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
586
|
+
_e,
|
|
587
|
+
Ae,
|
|
588
|
+
Et
|
|
574
589
|
]);
|
|
575
|
-
const
|
|
576
|
-
|
|
590
|
+
const dn = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ r.jsx(r.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ r.jsx(
|
|
591
|
+
Rt,
|
|
577
592
|
{
|
|
578
593
|
className: "content-render-iframe",
|
|
579
|
-
disableLoadingOverlay:
|
|
594
|
+
disableLoadingOverlay: C,
|
|
580
595
|
hideFullScreen: !0,
|
|
581
596
|
mode: "blackboard",
|
|
582
597
|
replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
|
|
583
598
|
type: "sandbox",
|
|
584
599
|
content: e.content,
|
|
585
|
-
enableScaling:
|
|
600
|
+
enableScaling: Ot
|
|
586
601
|
}
|
|
587
602
|
) : /* @__PURE__ */ r.jsx(
|
|
588
|
-
|
|
603
|
+
Rt,
|
|
589
604
|
{
|
|
590
605
|
className: "content-render-iframe",
|
|
591
|
-
disableLoadingOverlay:
|
|
606
|
+
disableLoadingOverlay: C,
|
|
592
607
|
hideFullScreen: !0,
|
|
593
608
|
mode: "blackboard",
|
|
594
609
|
type: "markdown",
|
|
595
610
|
content: e.content
|
|
596
611
|
}
|
|
597
|
-
) : null,
|
|
612
|
+
) : null, fn = (e = [], t = !1) => {
|
|
598
613
|
if (e.length === 0)
|
|
599
614
|
return null;
|
|
600
|
-
const
|
|
615
|
+
const c = e.filter(
|
|
601
616
|
(i) => i.is_renderable !== !1
|
|
602
617
|
).length, f = e.reduce(
|
|
603
|
-
(i, a,
|
|
618
|
+
(i, a, E) => a.is_renderable !== !1 ? E : i,
|
|
604
619
|
-1
|
|
605
620
|
);
|
|
606
621
|
return /* @__PURE__ */ r.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((i, a) => {
|
|
607
|
-
const
|
|
622
|
+
const E = i.type === "html" && i.is_renderable === !1;
|
|
608
623
|
return /* @__PURE__ */ r.jsx(
|
|
609
624
|
"div",
|
|
610
625
|
{
|
|
611
|
-
ref: t && a === f ?
|
|
612
|
-
"aria-hidden":
|
|
613
|
-
className:
|
|
626
|
+
ref: t && a === f ? Ze : null,
|
|
627
|
+
"aria-hidden": E || void 0,
|
|
628
|
+
className: Z(
|
|
614
629
|
"w-full shrink-0",
|
|
615
|
-
|
|
616
|
-
|
|
630
|
+
c === 1 && i.is_renderable !== !1 && "slide-element--single",
|
|
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"
|
|
617
632
|
),
|
|
618
|
-
children:
|
|
619
|
-
replaceRootScreenHeightWithFull:
|
|
633
|
+
children: dn(i, {
|
|
634
|
+
replaceRootScreenHeightWithFull: c === 1 && i.type === "html" && i.is_renderable !== !1
|
|
620
635
|
})
|
|
621
636
|
},
|
|
622
637
|
i.sequence_number ?? `${i.type}-${a}`
|
|
623
638
|
);
|
|
624
639
|
}) });
|
|
625
|
-
},
|
|
626
|
-
const e =
|
|
640
|
+
}, mn = n(() => {
|
|
641
|
+
const e = ve.current;
|
|
627
642
|
if (e) {
|
|
628
643
|
if (document.fullscreenElement === e) {
|
|
629
644
|
document.exitFullscreen().catch(() => {
|
|
@@ -633,154 +648,160 @@ const Gn = (b, I) => b.length === I.length && b.every((w, Q) => {
|
|
|
633
648
|
e.requestFullscreen?.().catch(() => {
|
|
634
649
|
});
|
|
635
650
|
}
|
|
636
|
-
}, []),
|
|
637
|
-
const e =
|
|
651
|
+
}, []), Ct = n(() => {
|
|
652
|
+
const e = Me.current;
|
|
638
653
|
e && e.scrollTo({
|
|
639
654
|
top: e.scrollHeight,
|
|
640
655
|
behavior: "smooth"
|
|
641
656
|
});
|
|
642
|
-
}, []),
|
|
657
|
+
}, []), pn = n(
|
|
643
658
|
(e) => {
|
|
644
|
-
|
|
659
|
+
Pe(e), ye.current = !0, z.current = null, y(!1), Ft(e) && (le(!0), x(!0)), X(), st();
|
|
645
660
|
},
|
|
646
661
|
[
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
662
|
+
st,
|
|
663
|
+
X,
|
|
664
|
+
x,
|
|
665
|
+
Pe
|
|
651
666
|
]
|
|
652
|
-
),
|
|
667
|
+
), hn = n(
|
|
653
668
|
(e) => {
|
|
654
|
-
|
|
669
|
+
Pe(e), ye.current = !0, z.current = null, y(!1), Ft(e) && (le(!0), x(!0)), X(), T();
|
|
655
670
|
},
|
|
656
671
|
[
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
672
|
+
T,
|
|
673
|
+
X,
|
|
674
|
+
x,
|
|
675
|
+
Pe
|
|
661
676
|
]
|
|
662
|
-
),
|
|
677
|
+
), vn = n(
|
|
663
678
|
({
|
|
664
679
|
loading: e,
|
|
665
680
|
reason: t
|
|
666
681
|
}) => {
|
|
667
|
-
if (
|
|
682
|
+
if (C) {
|
|
668
683
|
y(!1);
|
|
669
684
|
return;
|
|
670
685
|
}
|
|
671
|
-
if (!
|
|
686
|
+
if (!b || k) {
|
|
672
687
|
y(!1);
|
|
673
688
|
return;
|
|
674
689
|
}
|
|
675
|
-
e && t &&
|
|
690
|
+
e && t && Be(t), y(er(t, e));
|
|
676
691
|
},
|
|
677
692
|
[
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
693
|
+
b,
|
|
694
|
+
k,
|
|
695
|
+
C
|
|
681
696
|
]
|
|
682
697
|
);
|
|
683
698
|
s(() => {
|
|
684
|
-
|
|
685
|
-
}, [
|
|
686
|
-
const
|
|
699
|
+
C && y(!1);
|
|
700
|
+
}, [C]);
|
|
701
|
+
const yn = n(
|
|
687
702
|
(e) => {
|
|
688
703
|
const t = h[e]?.audioKey;
|
|
689
704
|
if (!t || !v || t !== v)
|
|
690
705
|
return;
|
|
691
|
-
const
|
|
706
|
+
const c = R.findIndex(
|
|
692
707
|
(a) => a === t
|
|
693
708
|
);
|
|
694
|
-
if (
|
|
695
|
-
|
|
709
|
+
if (c < 0) {
|
|
710
|
+
G(null);
|
|
696
711
|
return;
|
|
697
712
|
}
|
|
698
|
-
const f =
|
|
713
|
+
const f = c + 1, i = R[f];
|
|
699
714
|
if (i) {
|
|
700
|
-
|
|
715
|
+
G(i);
|
|
701
716
|
return;
|
|
702
717
|
}
|
|
703
|
-
if (
|
|
704
|
-
const a = d + 1,
|
|
705
|
-
|
|
718
|
+
if (G(null), at(!0), y(!1), w) {
|
|
719
|
+
const a = d + 1, E = N[a];
|
|
720
|
+
xt && E?.type === "interaction" && (z.current = a), T();
|
|
706
721
|
return;
|
|
707
722
|
}
|
|
708
723
|
},
|
|
709
724
|
[
|
|
710
725
|
h,
|
|
711
|
-
|
|
726
|
+
w,
|
|
712
727
|
d,
|
|
713
728
|
v,
|
|
714
729
|
R,
|
|
715
|
-
|
|
716
|
-
|
|
730
|
+
T,
|
|
731
|
+
xt,
|
|
717
732
|
N
|
|
718
733
|
]
|
|
719
|
-
),
|
|
720
|
-
o &&
|
|
721
|
-
}, [o]),
|
|
734
|
+
), gn = n(() => {
|
|
735
|
+
o && xe((e) => !e);
|
|
736
|
+
}, [o]), Tt = n(
|
|
737
|
+
(e) => {
|
|
738
|
+
e.stopPropagation(), F && x(!0);
|
|
739
|
+
},
|
|
740
|
+
[it, x]
|
|
741
|
+
), Sn = n(
|
|
722
742
|
(e) => {
|
|
723
|
-
|
|
743
|
+
L(), Xe?.(e);
|
|
724
744
|
},
|
|
725
|
-
[
|
|
726
|
-
),
|
|
745
|
+
[L, Xe]
|
|
746
|
+
), bn = n(
|
|
727
747
|
(e) => {
|
|
728
|
-
|
|
748
|
+
L(), Je?.(e);
|
|
729
749
|
},
|
|
730
|
-
[
|
|
731
|
-
),
|
|
732
|
-
|
|
733
|
-
}, [
|
|
750
|
+
[L, Je]
|
|
751
|
+
), An = n(() => {
|
|
752
|
+
le(!0), x(!0);
|
|
753
|
+
}, [x]), Ee = l(
|
|
734
754
|
() => B.map(
|
|
735
755
|
(e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
|
|
736
756
|
),
|
|
737
757
|
[B]
|
|
738
758
|
);
|
|
739
759
|
return s(() => {
|
|
740
|
-
const e =
|
|
760
|
+
const e = tt.current, f = (e.length > 0 && e.length < Ee.length && e.every((a, E) => a === Ee[E]) ? B.slice(e.length) : []).some(
|
|
741
761
|
(a) => a.is_new === !1
|
|
742
762
|
);
|
|
743
|
-
if (
|
|
763
|
+
if (tt.current = Ee, !f)
|
|
744
764
|
return;
|
|
745
765
|
const i = window.requestAnimationFrame(() => {
|
|
746
|
-
const a =
|
|
747
|
-
if (!a || !
|
|
766
|
+
const a = Me.current, E = Ze.current;
|
|
767
|
+
if (!a || !E)
|
|
748
768
|
return;
|
|
749
|
-
const
|
|
769
|
+
const xn = a.getBoundingClientRect(), wn = E.getBoundingClientRect(), In = a.scrollTop + (wn.top - xn.top);
|
|
750
770
|
a.scrollTo({
|
|
751
|
-
top: Math.max(
|
|
771
|
+
top: Math.max(In, 0),
|
|
752
772
|
behavior: "smooth"
|
|
753
773
|
});
|
|
754
774
|
});
|
|
755
775
|
return () => {
|
|
756
776
|
window.cancelAnimationFrame(i);
|
|
757
777
|
};
|
|
758
|
-
}, [B,
|
|
759
|
-
if (!
|
|
778
|
+
}, [B, Ee]), s(() => {
|
|
779
|
+
if (!ye.current || (ye.current = !1, B.length === 0))
|
|
760
780
|
return;
|
|
761
781
|
const e = window.requestAnimationFrame(() => {
|
|
762
|
-
|
|
782
|
+
Ct();
|
|
763
783
|
});
|
|
764
784
|
return () => {
|
|
765
785
|
window.cancelAnimationFrame(e);
|
|
766
786
|
};
|
|
767
|
-
}, [B,
|
|
787
|
+
}, [B, Ct]), /* @__PURE__ */ r.jsxs(
|
|
768
788
|
"section",
|
|
769
789
|
{
|
|
770
|
-
ref:
|
|
771
|
-
className:
|
|
790
|
+
ref: ve,
|
|
791
|
+
className: Z(
|
|
772
792
|
"relative h-full w-full",
|
|
773
793
|
O && "slide--mobile-device",
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
794
|
+
ht && "slide--browser-fullscreen",
|
|
795
|
+
$ && "slide--mobile-landscape",
|
|
796
|
+
pt && "slide--mobile-landscape-native",
|
|
797
|
+
jt
|
|
778
798
|
),
|
|
779
|
-
onClick:
|
|
780
|
-
|
|
781
|
-
|
|
799
|
+
onClick: An,
|
|
800
|
+
onFocusCapture: bn,
|
|
801
|
+
onPointerDown: Sn,
|
|
802
|
+
...Lt,
|
|
782
803
|
children: [
|
|
783
|
-
|
|
804
|
+
Zt ? /* @__PURE__ */ r.jsx(
|
|
784
805
|
"div",
|
|
785
806
|
{
|
|
786
807
|
"aria-hidden": "true",
|
|
@@ -790,23 +811,23 @@ const Gn = (b, I) => b.length === I.length && b.every((w, Q) => {
|
|
|
790
811
|
/* @__PURE__ */ r.jsxs(
|
|
791
812
|
"div",
|
|
792
813
|
{
|
|
793
|
-
ref:
|
|
794
|
-
className:
|
|
814
|
+
ref: Qe,
|
|
815
|
+
className: Z(
|
|
795
816
|
"slide__viewport relative h-full min-h-0 w-full",
|
|
796
|
-
|
|
797
|
-
|
|
817
|
+
$ && "slide__viewport--mobile-landscape",
|
|
818
|
+
$ && !Yt && "slide__viewport--mobile-landscape-native"
|
|
798
819
|
),
|
|
799
820
|
children: [
|
|
800
|
-
|
|
821
|
+
Jt ? /* @__PURE__ */ r.jsxs("div", { className: "slide-landscape-header", children: [
|
|
801
822
|
/* @__PURE__ */ r.jsx(
|
|
802
823
|
"button",
|
|
803
824
|
{
|
|
804
|
-
"aria-label":
|
|
825
|
+
"aria-label": P?.backAriaLabel ?? "Back",
|
|
805
826
|
className: "slide-landscape-header__back",
|
|
806
|
-
onClick:
|
|
827
|
+
onClick: tn,
|
|
807
828
|
type: "button",
|
|
808
829
|
children: /* @__PURE__ */ r.jsx(
|
|
809
|
-
|
|
830
|
+
$n,
|
|
810
831
|
{
|
|
811
832
|
className: "slide-landscape-header__icon h-6 w-6",
|
|
812
833
|
strokeWidth: 2.25
|
|
@@ -814,28 +835,28 @@ const Gn = (b, I) => b.length === I.length && b.every((w, Q) => {
|
|
|
814
835
|
)
|
|
815
836
|
}
|
|
816
837
|
),
|
|
817
|
-
|
|
838
|
+
P?.content ? /* @__PURE__ */ r.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: P.content }) : null
|
|
818
839
|
] }) : null,
|
|
819
840
|
/* @__PURE__ */ r.jsx(
|
|
820
841
|
"div",
|
|
821
842
|
{
|
|
822
|
-
className:
|
|
843
|
+
className: Z(
|
|
823
844
|
"h-full min-h-0 w-full",
|
|
824
|
-
|
|
825
|
-
|
|
845
|
+
Qt && "slide__viewport-content--with-header",
|
|
846
|
+
Kt ? "slide-content--single" : "grid gap-4"
|
|
826
847
|
),
|
|
827
|
-
children: B.length > 0 ? /* @__PURE__ */ r.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ r.jsx("div", { ref:
|
|
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(
|
|
828
849
|
(e, t) => {
|
|
829
|
-
const
|
|
850
|
+
const c = t === rn;
|
|
830
851
|
return /* @__PURE__ */ r.jsx(
|
|
831
852
|
"div",
|
|
832
853
|
{
|
|
833
|
-
"aria-hidden": !
|
|
854
|
+
"aria-hidden": !c || void 0,
|
|
834
855
|
className: "w-full h-full",
|
|
835
|
-
style: { display:
|
|
836
|
-
children:
|
|
856
|
+
style: { display: c ? void 0 : "none" },
|
|
857
|
+
children: fn(
|
|
837
858
|
e.elementList,
|
|
838
|
-
|
|
859
|
+
c
|
|
839
860
|
)
|
|
840
861
|
},
|
|
841
862
|
e.sourceStepIndexes[0] ?? t
|
|
@@ -844,98 +865,106 @@ const Gn = (b, I) => b.length === I.length && b.every((w, Q) => {
|
|
|
844
865
|
) }) }) : null
|
|
845
866
|
}
|
|
846
867
|
),
|
|
847
|
-
|
|
848
|
-
|
|
868
|
+
Dt ? /* @__PURE__ */ r.jsx(
|
|
869
|
+
Cn,
|
|
849
870
|
{
|
|
850
|
-
message:
|
|
851
|
-
|
|
852
|
-
|
|
871
|
+
message: Zn(
|
|
872
|
+
Te,
|
|
873
|
+
Ut
|
|
853
874
|
),
|
|
854
875
|
className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
|
|
855
876
|
}
|
|
856
877
|
) : null,
|
|
857
878
|
/* @__PURE__ */ r.jsx(
|
|
858
|
-
|
|
879
|
+
Nn,
|
|
859
880
|
{
|
|
860
|
-
extraBottomOffset:
|
|
861
|
-
hasPlayerGap:
|
|
862
|
-
isEnabled:
|
|
863
|
-
isPlayerHidden:
|
|
864
|
-
playbackTimeStore:
|
|
865
|
-
subtitleCues:
|
|
881
|
+
extraBottomOffset: Ht,
|
|
882
|
+
hasPlayerGap: F,
|
|
883
|
+
isEnabled: ut && zt,
|
|
884
|
+
isPlayerHidden: A && !F,
|
|
885
|
+
playbackTimeStore: H,
|
|
886
|
+
subtitleCues: on
|
|
866
887
|
}
|
|
867
888
|
),
|
|
868
|
-
|
|
889
|
+
ze ? /* @__PURE__ */ r.jsx(
|
|
869
890
|
"div",
|
|
870
891
|
{
|
|
871
|
-
ref:
|
|
872
|
-
|
|
892
|
+
ref: et,
|
|
893
|
+
"data-player-keyboard-shortcuts-ignore": "true",
|
|
894
|
+
className: Z(
|
|
873
895
|
"slide-interaction-overlay",
|
|
874
|
-
|
|
896
|
+
F && A ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
|
|
875
897
|
),
|
|
876
|
-
onClick:
|
|
877
|
-
onPointerDown:
|
|
878
|
-
style:
|
|
898
|
+
onClick: Tt,
|
|
899
|
+
onPointerDown: Tt,
|
|
900
|
+
style: sn,
|
|
879
901
|
children: /* @__PURE__ */ r.jsx(
|
|
880
|
-
|
|
902
|
+
Bt,
|
|
881
903
|
{
|
|
882
904
|
content: String(o?.content ?? ""),
|
|
883
|
-
defaultButtonText:
|
|
884
|
-
defaultInputText:
|
|
885
|
-
defaultSelectedValues:
|
|
886
|
-
confirmButtonText:
|
|
887
|
-
copyButtonText:
|
|
888
|
-
copiedButtonText:
|
|
889
|
-
onSend:
|
|
890
|
-
readonly:
|
|
891
|
-
title:
|
|
905
|
+
defaultButtonText: It.buttonText ?? "",
|
|
906
|
+
defaultInputText: It.inputText ?? "",
|
|
907
|
+
defaultSelectedValues: an,
|
|
908
|
+
confirmButtonText: D?.confirmButtonText,
|
|
909
|
+
copyButtonText: D?.copyButtonText,
|
|
910
|
+
copiedButtonText: D?.copiedButtonText,
|
|
911
|
+
onSend: un,
|
|
912
|
+
readonly: Pt,
|
|
913
|
+
title: D?.title ?? Re ?? "Submit the content below to continue."
|
|
892
914
|
}
|
|
893
915
|
)
|
|
894
916
|
}
|
|
895
917
|
) : null,
|
|
896
|
-
|
|
897
|
-
|
|
918
|
+
A ? /* @__PURE__ */ r.jsx(
|
|
919
|
+
Ln.Provider,
|
|
898
920
|
{
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
921
|
+
value: qt,
|
|
922
|
+
children: /* @__PURE__ */ r.jsx(
|
|
923
|
+
Bn,
|
|
924
|
+
{
|
|
925
|
+
audioList: h,
|
|
926
|
+
className: Z(
|
|
927
|
+
"absolute left-1/2 z-[2] -translate-x-1/2",
|
|
928
|
+
ht ? "bottom-3" : "-bottom-3",
|
|
929
|
+
ee,
|
|
930
|
+
!F && "pointer-events-none opacity-0"
|
|
931
|
+
),
|
|
932
|
+
currentAudioIndex: g,
|
|
933
|
+
defaultPlaying: ce,
|
|
934
|
+
enableKeyboardShortcuts: U,
|
|
935
|
+
isPlaybackPaused: V,
|
|
936
|
+
isAutoAdvanceEnabled: ae,
|
|
937
|
+
hasInteraction: !!o,
|
|
938
|
+
isInteractionOpen: Ae,
|
|
939
|
+
isSubtitleEnabled: ut,
|
|
940
|
+
onAutoAdvanceToggle: ct,
|
|
941
|
+
onLoadingChange: vn,
|
|
942
|
+
onPlaybackStarted: () => {
|
|
943
|
+
Ne(!0);
|
|
944
|
+
},
|
|
945
|
+
onPlaybackPreferenceChange: cn,
|
|
946
|
+
onPlaybackTimeChange: H.setTime,
|
|
947
|
+
onSubtitleToggle: () => {
|
|
948
|
+
Gt((e) => !e);
|
|
949
|
+
},
|
|
950
|
+
nextDisabled: !w,
|
|
951
|
+
onEnded: yn,
|
|
952
|
+
onFullscreen: mn,
|
|
953
|
+
isFullscreen: dt,
|
|
954
|
+
mobileViewMode: W,
|
|
955
|
+
settingsPortalContainer: Qe.current,
|
|
956
|
+
onMobileViewModeChange: en,
|
|
957
|
+
onInteractionToggle: gn,
|
|
958
|
+
onNext: hn,
|
|
959
|
+
onPrev: pn,
|
|
960
|
+
prevDisabled: !Vt,
|
|
961
|
+
showControls: F,
|
|
962
|
+
texts: Nt,
|
|
963
|
+
customActionContext: De,
|
|
964
|
+
customActions: q,
|
|
965
|
+
useAutoAdvanceToggle: fe
|
|
966
|
+
}
|
|
967
|
+
)
|
|
939
968
|
}
|
|
940
969
|
) : null
|
|
941
970
|
]
|
|
@@ -946,6 +975,6 @@ const Gn = (b, I) => b.length === I.length && b.every((w, Q) => {
|
|
|
946
975
|
);
|
|
947
976
|
};
|
|
948
977
|
export {
|
|
949
|
-
|
|
978
|
+
Rr as default
|
|
950
979
|
};
|
|
951
980
|
//# sourceMappingURL=Slide.es.js.map
|