markdown-flow-ui 0.2.4 → 0.2.5
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.cjs8.js +1 -1
- package/dist/_virtual/index.cjs9.js +1 -1
- package/dist/_virtual/index.es8.js +2 -2
- package/dist/_virtual/index.es9.js +2 -2
- package/dist/assets/markdown-flow-ui.css +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 +614 -636
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs.js +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/node_modules/classnames/index.cjs.js +1 -1
- package/dist/node_modules/classnames/index.es.js +1 -1
- package/package.json +1 -1
|
@@ -1,231 +1,231 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { isSandboxInteractionMessage as
|
|
4
|
-
import { cn as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { j as s } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
+
import { memo as br, useMemo as u, useId as xr, useRef as f, useCallback as r, useState as d, useEffect as c, useLayoutEffect as Ar } from "react";
|
|
3
|
+
import { isSandboxInteractionMessage as wr } from "../../lib/sandboxInteraction.es.js";
|
|
4
|
+
import { cn as ye } from "../../lib/utils.es.js";
|
|
5
|
+
import Tr from "../ui/loading-overlay-card.es.js";
|
|
6
|
+
import Er from "../ContentRender/ContentRender.es.js";
|
|
7
|
+
import yn from "../ContentRender/IframeSandbox.es.js";
|
|
8
8
|
import "../ui/inputGroup/input-group.es.js";
|
|
9
9
|
import "../ContentRender/contentRenderI18n.es.js";
|
|
10
|
-
import { isMobileDevice as Cr, isLandscapeViewport as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { PlayerKeyboardShortcutContext as
|
|
17
|
-
import { activatePlayerKeyboardShortcutOwner as
|
|
18
|
-
import { DEFAULT_MOBILE_VIEW_MODE as
|
|
19
|
-
import { shouldRenderInteractionOverlay as
|
|
20
|
-
import { resolveMarkdownScalingMode as
|
|
21
|
-
import { shouldWakePlayerControlsAfterNavigation as
|
|
22
|
-
import { shouldAutoAdvanceIntoAppendedMarker as
|
|
23
|
-
import { getPlaybackSequenceTransition as
|
|
24
|
-
import { hasResolvedInteractionElement as
|
|
25
|
-
import { resolvePlayerCustomActionElement as
|
|
26
|
-
import { createPlaybackTimeStore as
|
|
27
|
-
import { resolveSlideInteractionState as
|
|
28
|
-
import { shouldUseAutoAdvanceToggle as
|
|
29
|
-
import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as
|
|
30
|
-
import { resolveSilentStepAutoAdvanceBehavior as
|
|
31
|
-
import { resolveSlidePlayerVisibility as
|
|
32
|
-
import { getSlideLocaleTexts as
|
|
10
|
+
import { isMobileDevice as Cr, isLandscapeViewport as hn, subscribeMobileDeviceChange as Pr } from "../../lib/mobileDevice.es.js";
|
|
11
|
+
import Rr from "./Player.es.js";
|
|
12
|
+
import _r from "./MarkdownSlideScaling.es.js";
|
|
13
|
+
import Or from "./SubtitleOverlay.es.js";
|
|
14
|
+
import Mr from "./useSlide.es.js";
|
|
15
|
+
import kr from "./useWakePlayerFromIframe.es.js";
|
|
16
|
+
import { PlayerKeyboardShortcutContext as Fr } from "./utils/playerKeyboardShortcutContext.es.js";
|
|
17
|
+
import { activatePlayerKeyboardShortcutOwner as Br } from "./utils/playerKeyboardShortcuts.es.js";
|
|
18
|
+
import { DEFAULT_MOBILE_VIEW_MODE as tt, resolveMobileViewModeState as Nr } from "./utils/mobileScreenMode.es.js";
|
|
19
|
+
import { shouldRenderInteractionOverlay as Dr, clampInteractionOverlayDragOffset as gn, shouldPresentInteractionOverlay as Lr } from "./utils/interactionPlayback.es.js";
|
|
20
|
+
import { resolveMarkdownScalingMode as Vr } from "./utils/markdownScaling.es.js";
|
|
21
|
+
import { shouldWakePlayerControlsAfterNavigation as Et } from "./utils/playerNavigationContext.es.js";
|
|
22
|
+
import { shouldAutoAdvanceIntoAppendedMarker as jr } from "./utils/appendedMarkerAdvance.es.js";
|
|
23
|
+
import { getPlaybackSequenceTransition as qr, shouldStartDefaultAudioSequence as Kr } from "./utils/playbackSequence.es.js";
|
|
24
|
+
import { hasResolvedInteractionElement as Ur, canReachSubtitleJumpTarget as vn } from "./utils/subtitleJumpNavigation.es.js";
|
|
25
|
+
import { resolvePlayerCustomActionElement as Hr, getPlayerCustomActionCount as Yr } from "./utils/playerCustomActions.es.js";
|
|
26
|
+
import { createPlaybackTimeStore as Gr } from "./utils/playbackTimeStore.es.js";
|
|
27
|
+
import { resolveSlideInteractionState as $r } from "./utils/interactionResolution.es.js";
|
|
28
|
+
import { shouldUseAutoAdvanceToggle as zr } from "./utils/playerToggleMode.es.js";
|
|
29
|
+
import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as Jr, areImageOnlyStepIframeVisualsReady as Wr } from "./utils/imageOnlyStepVisualReady.es.js";
|
|
30
|
+
import { resolveSilentStepAutoAdvanceBehavior as Xr } from "./utils/silentStepAutoAdvance.es.js";
|
|
31
|
+
import { resolveSlidePlayerVisibility as Qr } from "./utils/playerVisibility.es.js";
|
|
32
|
+
import { getSlideLocaleTexts as Zr, DEFAULT_SLIDE_BUFFERING_TEXTS as eo } from "./slideI18n.es.js";
|
|
33
33
|
/* empty css */
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
const
|
|
34
|
+
import to from "../../node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js";
|
|
35
|
+
import no from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
|
|
36
|
+
const ro = 2e3, oo = 300, io = 160, lo = 16, Sn = 3e3, In = {
|
|
37
37
|
x: 0,
|
|
38
38
|
y: 0
|
|
39
|
-
},
|
|
39
|
+
}, so = typeof window > "u" ? c : Ar, ao = [
|
|
40
40
|
"button",
|
|
41
41
|
"input",
|
|
42
42
|
"textarea",
|
|
43
43
|
'[contenteditable=""]',
|
|
44
44
|
'[contenteditable="true"]',
|
|
45
45
|
'[contenteditable="plaintext-only"]'
|
|
46
|
-
].join(", "),
|
|
46
|
+
].join(", "), Pt = "waitingForAudio", co = (m, h) => typeof m == "string" ? m : m[h] ?? m[Pt] ?? eo[h], uo = (m, h) => typeof m == "string" ? m : {
|
|
47
47
|
...h,
|
|
48
48
|
...m
|
|
49
|
-
},
|
|
49
|
+
}, fo = (m, h) => h ? m !== "loadingAudio" : !1, bn = br(
|
|
50
50
|
({
|
|
51
51
|
content: m,
|
|
52
52
|
title: h,
|
|
53
53
|
locale: H,
|
|
54
|
-
defaultButtonText:
|
|
54
|
+
defaultButtonText: he,
|
|
55
55
|
defaultInputText: Y,
|
|
56
56
|
defaultSelectedValues: G,
|
|
57
57
|
confirmButtonText: Z,
|
|
58
58
|
copyButtonText: ee,
|
|
59
|
-
copiedButtonText:
|
|
60
|
-
onSend:
|
|
59
|
+
copiedButtonText: De,
|
|
60
|
+
onSend: nt,
|
|
61
61
|
onDragHandlePointerCancel: te,
|
|
62
|
-
onDragHandlePointerDown:
|
|
63
|
-
onDragHandlePointerMove:
|
|
64
|
-
onDragHandlePointerUp:
|
|
65
|
-
readonly:
|
|
66
|
-
}) => /* @__PURE__ */
|
|
67
|
-
/* @__PURE__ */
|
|
62
|
+
onDragHandlePointerDown: rt,
|
|
63
|
+
onDragHandlePointerMove: ge,
|
|
64
|
+
onDragHandlePointerUp: Le,
|
|
65
|
+
readonly: Ve = !1
|
|
66
|
+
}) => /* @__PURE__ */ s.jsxs("div", { className: "slide-player__interaction-card", children: [
|
|
67
|
+
/* @__PURE__ */ s.jsx(
|
|
68
68
|
"button",
|
|
69
69
|
{
|
|
70
70
|
type: "button",
|
|
71
71
|
className: "slide-player__interaction-drag-handle",
|
|
72
72
|
"aria-label": "Move interaction",
|
|
73
73
|
onPointerCancel: te,
|
|
74
|
-
onPointerDown:
|
|
75
|
-
onPointerMove:
|
|
76
|
-
onPointerUp:
|
|
77
|
-
children: /* @__PURE__ */
|
|
74
|
+
onPointerDown: rt,
|
|
75
|
+
onPointerMove: ge,
|
|
76
|
+
onPointerUp: Le,
|
|
77
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "slide-player__interaction-drag-handle-icon", children: /* @__PURE__ */ s.jsx(to, { "aria-hidden": "true" }) })
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
|
|
80
|
+
/* @__PURE__ */ s.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ s.jsx("p", { className: "slide-player__interaction-title", children: h }) }),
|
|
81
|
+
/* @__PURE__ */ s.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ s.jsx(
|
|
82
|
+
Er,
|
|
83
83
|
{
|
|
84
84
|
content: m,
|
|
85
85
|
locale: H,
|
|
86
|
-
defaultButtonText:
|
|
86
|
+
defaultButtonText: he,
|
|
87
87
|
defaultInputText: Y,
|
|
88
88
|
defaultSelectedValues: G,
|
|
89
89
|
confirmButtonText: Z,
|
|
90
90
|
copyButtonText: ee,
|
|
91
|
-
copiedButtonText:
|
|
92
|
-
onSend:
|
|
93
|
-
readonly:
|
|
91
|
+
copiedButtonText: De,
|
|
92
|
+
onSend: nt,
|
|
93
|
+
readonly: Ve,
|
|
94
94
|
sandboxMode: "content"
|
|
95
95
|
}
|
|
96
96
|
) })
|
|
97
97
|
] })
|
|
98
98
|
);
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
const Y = h[
|
|
99
|
+
bn.displayName = "InteractionOverlayCard";
|
|
100
|
+
const mo = (m, h) => m.length === h.length && m.every((H, he) => {
|
|
101
|
+
const Y = h[he];
|
|
102
102
|
return H.sequence_number === Y?.sequence_number && H.type === Y?.type && H.content === Y?.content;
|
|
103
|
-
}),
|
|
103
|
+
}), Ct = (m) => m instanceof HTMLElement && !!m.closest(ao), Xo = ({
|
|
104
104
|
elementList: m = [],
|
|
105
105
|
locale: h,
|
|
106
106
|
playerEnabled: H,
|
|
107
|
-
playerControlsVisibility:
|
|
107
|
+
playerControlsVisibility: he,
|
|
108
108
|
playerClassName: Y,
|
|
109
109
|
fullscreenHeader: G,
|
|
110
110
|
playerCustomActions: Z,
|
|
111
111
|
playerCustomActionPauseOnActive: ee = !0,
|
|
112
|
-
bufferingText:
|
|
113
|
-
interactionTitle:
|
|
112
|
+
bufferingText: De,
|
|
113
|
+
interactionTitle: nt,
|
|
114
114
|
interactionTexts: te,
|
|
115
|
-
playerTexts:
|
|
116
|
-
playerAutoHideDelay:
|
|
117
|
-
markerAutoAdvanceDelay:
|
|
118
|
-
interactionDefaultValueOptions:
|
|
119
|
-
onSend:
|
|
120
|
-
onPlayerVisibilityChange:
|
|
121
|
-
onMobileViewModeChange:
|
|
122
|
-
onStepChange:
|
|
115
|
+
playerTexts: rt,
|
|
116
|
+
playerAutoHideDelay: ge = 3e3,
|
|
117
|
+
markerAutoAdvanceDelay: Le = ro,
|
|
118
|
+
interactionDefaultValueOptions: Ve,
|
|
119
|
+
onSend: Rt,
|
|
120
|
+
onPlayerVisibilityChange: ot,
|
|
121
|
+
onMobileViewModeChange: _t,
|
|
122
|
+
onStepChange: Ot,
|
|
123
123
|
enableKeyboardShortcuts: ne = !0,
|
|
124
|
-
enableIframeScaling:
|
|
125
|
-
enableMarkdownScaling:
|
|
126
|
-
disableLoadingOverlay:
|
|
127
|
-
className:
|
|
128
|
-
onPointerDown:
|
|
129
|
-
onFocusCapture:
|
|
130
|
-
...
|
|
124
|
+
enableIframeScaling: xn = !0,
|
|
125
|
+
enableMarkdownScaling: An = !0,
|
|
126
|
+
disableLoadingOverlay: _ = !1,
|
|
127
|
+
className: wn,
|
|
128
|
+
onPointerDown: Mt,
|
|
129
|
+
onFocusCapture: kt,
|
|
130
|
+
...Tn
|
|
131
131
|
}) => {
|
|
132
|
-
const $ = u(() =>
|
|
133
|
-
() =>
|
|
134
|
-
|
|
132
|
+
const $ = u(() => Zr(h), [h]), En = u(
|
|
133
|
+
() => uo(
|
|
134
|
+
De,
|
|
135
135
|
$.bufferingText
|
|
136
136
|
),
|
|
137
|
-
[
|
|
137
|
+
[De, $.bufferingText]
|
|
138
138
|
), {
|
|
139
|
-
playerEnabled:
|
|
139
|
+
playerEnabled: Cn,
|
|
140
140
|
playerControlsVisibility: j
|
|
141
|
-
} =
|
|
141
|
+
} = Qr({
|
|
142
142
|
playerEnabled: H,
|
|
143
|
-
playerControlsVisibility:
|
|
144
|
-
}),
|
|
143
|
+
playerControlsVisibility: he
|
|
144
|
+
}), je = xr(), ve = f(null), it = f(null), qe = f(null), Ft = f(null), re = f(null), Ke = f(!1), Se = f(null), Ue = f(null), z = f(null), Ie = f(null), be = f(null), xe = f(null), Ae = f(null), Bt = f([]), we = f(!1), J = f(null), Te = f(null), Nt = f(0), Dt = f(null), Lt = f({
|
|
145
145
|
markerCount: 0,
|
|
146
146
|
currentIndex: -1,
|
|
147
147
|
canGoNext: !1
|
|
148
|
-
}),
|
|
149
|
-
currentElementList:
|
|
150
|
-
stepElementLists:
|
|
151
|
-
slideElementList:
|
|
152
|
-
currentIndex:
|
|
148
|
+
}), lt = f(!1), {
|
|
149
|
+
currentElementList: P,
|
|
150
|
+
stepElementLists: Vt,
|
|
151
|
+
slideElementList: C,
|
|
152
|
+
currentIndex: a,
|
|
153
153
|
audioList: S,
|
|
154
|
-
audioSlideIndexes:
|
|
155
|
-
currentAudioSequenceIndexes:
|
|
154
|
+
audioSlideIndexes: He,
|
|
155
|
+
currentAudioSequenceIndexes: Ye,
|
|
156
156
|
currentStepHasSpeakableElement: I,
|
|
157
157
|
currentInteractionElement: p,
|
|
158
|
-
canGoPrev:
|
|
158
|
+
canGoPrev: Pn,
|
|
159
159
|
canGoNext: R,
|
|
160
|
-
handlePrev:
|
|
161
|
-
handleNext:
|
|
162
|
-
handleGoTo:
|
|
163
|
-
} =
|
|
164
|
-
if (!(
|
|
165
|
-
return
|
|
166
|
-
}, [
|
|
167
|
-
() =>
|
|
160
|
+
handlePrev: jt,
|
|
161
|
+
handleNext: O,
|
|
162
|
+
handleGoTo: qt
|
|
163
|
+
} = Mr(m), Ee = u(() => {
|
|
164
|
+
if (!(a < 0))
|
|
165
|
+
return C[a];
|
|
166
|
+
}, [a, C]), oe = u(
|
|
167
|
+
() => P.map(
|
|
168
168
|
(e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
|
|
169
169
|
),
|
|
170
|
-
[
|
|
171
|
-
),
|
|
170
|
+
[P]
|
|
171
|
+
), Rn = C.filter(
|
|
172
172
|
(e) => e.is_renderable !== !1
|
|
173
|
-
).length === 1, g =
|
|
173
|
+
).length === 1, g = Cn && (C.length > 0 || S.length > 0 || !!p), _n = u(
|
|
174
174
|
() => ({
|
|
175
175
|
enabled: ne,
|
|
176
|
-
ownerId:
|
|
176
|
+
ownerId: je
|
|
177
177
|
}),
|
|
178
|
-
[ne,
|
|
179
|
-
), q =
|
|
180
|
-
!ne || !g ||
|
|
181
|
-
}, [ne,
|
|
182
|
-
() =>
|
|
183
|
-
[S,
|
|
184
|
-
), [
|
|
185
|
-
|
|
186
|
-
), [
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
] = d(0), [
|
|
190
|
-
|
|
191
|
-
), [
|
|
192
|
-
() =>
|
|
193
|
-
), se = u(() =>
|
|
178
|
+
[ne, je]
|
|
179
|
+
), q = r(() => {
|
|
180
|
+
!ne || !g || Br(je);
|
|
181
|
+
}, [ne, je, g]), M = u(
|
|
182
|
+
() => Ye.map((e) => S[e]?.audioKey).filter((e) => !!e),
|
|
183
|
+
[S, Ye]
|
|
184
|
+
), [On, Ce] = d(!0), [Ge, ie] = d(!1), [st, Kt] = d(!0), [Pe, Ut] = d(!0), [A, K] = d(null), [Mn, Ht] = d(null), [kn, b] = d(!1), [Fn, at] = d(Pt), [k, ct] = d(!1), [Bn, $e] = d(!1), [Yt, Nn] = d(!0), [ut, dt] = d(!1), [y, ft] = d(), [le, ze] = d(!1), [Gt, Je] = d(!1), [x, mt] = d(
|
|
185
|
+
In
|
|
186
|
+
), [pt, yt] = d(!1), [
|
|
187
|
+
Dn,
|
|
188
|
+
Re
|
|
189
|
+
] = d(0), [$t, Ln] = d(!1), L = u(() => Cr(), []), [We, ht] = d(
|
|
190
|
+
tt
|
|
191
|
+
), [zt, gt] = d(!1), [Vn, Jt] = d(
|
|
192
|
+
() => L ? hn() : !1
|
|
193
|
+
), se = u(() => Gr(), []), {
|
|
194
194
|
effectiveMobileViewMode: ae,
|
|
195
195
|
isImmersiveMobileFullscreen: ce,
|
|
196
|
-
isNativeMobileFullscreen:
|
|
197
|
-
shouldRotateFullscreenViewport:
|
|
196
|
+
isNativeMobileFullscreen: Wt,
|
|
197
|
+
shouldRotateFullscreenViewport: jn
|
|
198
198
|
} = u(
|
|
199
199
|
() => Nr({
|
|
200
|
-
hasManualMobileViewMode:
|
|
201
|
-
isMobileDevice:
|
|
202
|
-
mobileViewMode:
|
|
200
|
+
hasManualMobileViewMode: zt,
|
|
201
|
+
isMobileDevice: L,
|
|
202
|
+
mobileViewMode: We
|
|
203
203
|
}),
|
|
204
204
|
[
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
zt,
|
|
206
|
+
L,
|
|
207
|
+
Vn,
|
|
208
|
+
We
|
|
209
209
|
]
|
|
210
|
-
),
|
|
210
|
+
), qn = f(ae), w = g && j !== "hidden" && (j === "visible" || On), Kn = ce && w, Un = ce && w, Hn = ce || Wt, Xt = $t && !L, Yn = r(
|
|
211
211
|
(e) => {
|
|
212
|
-
|
|
212
|
+
gt(!0), ht(e);
|
|
213
213
|
},
|
|
214
214
|
[]
|
|
215
|
-
),
|
|
216
|
-
|
|
217
|
-
}, []),
|
|
218
|
-
|
|
219
|
-
}, [G,
|
|
220
|
-
|
|
221
|
-
}, []),
|
|
222
|
-
|
|
223
|
-
}, []), { mountedStepStates:
|
|
215
|
+
), Qt = r(() => {
|
|
216
|
+
gt(!1), ht(tt);
|
|
217
|
+
}, []), Gn = r(() => {
|
|
218
|
+
Qt(), G?.onBack?.();
|
|
219
|
+
}, [G, Qt]), Zt = r((e) => {
|
|
220
|
+
dt(e);
|
|
221
|
+
}, []), en = r(() => {
|
|
222
|
+
dt((e) => !e);
|
|
223
|
+
}, []), { mountedStepStates: $n, currentMountedStateIndex: zn } = u(() => {
|
|
224
224
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
225
|
-
return
|
|
225
|
+
return Vt.forEach((o, i) => {
|
|
226
226
|
const l = e.findIndex(
|
|
227
|
-
(
|
|
228
|
-
|
|
227
|
+
(n) => mo(
|
|
228
|
+
n.elementList,
|
|
229
229
|
o
|
|
230
230
|
)
|
|
231
231
|
);
|
|
@@ -239,53 +239,53 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
239
239
|
}), t.set(i, e.length - 1);
|
|
240
240
|
}), {
|
|
241
241
|
mountedStepStates: e,
|
|
242
|
-
currentMountedStateIndex:
|
|
242
|
+
currentMountedStateIndex: a >= 0 ? t.get(a) ?? -1 : -1
|
|
243
243
|
};
|
|
244
|
-
}, [
|
|
244
|
+
}, [a, Vt]), tn = u(() => String(a), [a]), T = u(() => A ? S.findIndex(
|
|
245
245
|
(e) => (e.audioKey ?? "") === A
|
|
246
|
-
) : -1, [S, A]),
|
|
246
|
+
) : -1, [S, A]), vt = u(
|
|
247
247
|
() => T >= 0 ? S[T] : void 0,
|
|
248
248
|
[S, T]
|
|
249
|
-
),
|
|
250
|
-
() =>
|
|
251
|
-
[
|
|
252
|
-
),
|
|
249
|
+
), Jn = vt?.element?.subtitle_cues ?? [], Xe = u(
|
|
250
|
+
() => M[0] ?? "none",
|
|
251
|
+
[M]
|
|
252
|
+
), St = u(
|
|
253
253
|
() => ({
|
|
254
|
-
currentElement:
|
|
254
|
+
currentElement: Hr({
|
|
255
255
|
currentAudioIndex: T,
|
|
256
|
-
currentAudioSequenceIndexes:
|
|
256
|
+
currentAudioSequenceIndexes: Ye,
|
|
257
257
|
audioList: S,
|
|
258
258
|
currentInteractionElement: y,
|
|
259
|
-
currentStepElement:
|
|
259
|
+
currentStepElement: Ee
|
|
260
260
|
}),
|
|
261
|
-
currentIndex:
|
|
262
|
-
currentStepElement:
|
|
263
|
-
isActive:
|
|
264
|
-
setActive:
|
|
265
|
-
toggleActive:
|
|
261
|
+
currentIndex: a,
|
|
262
|
+
currentStepElement: Ee,
|
|
263
|
+
isActive: ut,
|
|
264
|
+
setActive: Zt,
|
|
265
|
+
toggleActive: en
|
|
266
266
|
}),
|
|
267
267
|
[
|
|
268
268
|
y,
|
|
269
269
|
S,
|
|
270
270
|
T,
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
271
|
+
Ye,
|
|
272
|
+
a,
|
|
273
|
+
Ee,
|
|
274
|
+
ut,
|
|
275
|
+
Zt,
|
|
276
|
+
en
|
|
277
277
|
]
|
|
278
|
-
),
|
|
279
|
-
() =>
|
|
278
|
+
), It = u(
|
|
279
|
+
() => Yr(
|
|
280
280
|
Z,
|
|
281
|
-
|
|
281
|
+
St
|
|
282
282
|
),
|
|
283
|
-
[
|
|
284
|
-
),
|
|
283
|
+
[St, Z]
|
|
284
|
+
), Wn = u(
|
|
285
285
|
() => ({
|
|
286
|
-
"--slide-player-custom-action-count": String(
|
|
286
|
+
"--slide-player-custom-action-count": String(It),
|
|
287
287
|
"--slide-player-mobile-control-count": String(
|
|
288
|
-
|
|
288
|
+
It + 4
|
|
289
289
|
),
|
|
290
290
|
"--slide-interaction-drag-x": `${x.x}px`,
|
|
291
291
|
"--slide-interaction-drag-y": `${x.y}px`
|
|
@@ -293,24 +293,24 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
293
293
|
[
|
|
294
294
|
x.x,
|
|
295
295
|
x.y,
|
|
296
|
-
|
|
296
|
+
It
|
|
297
297
|
]
|
|
298
|
-
),
|
|
298
|
+
), nn = M.length > 0, rn = u(() => p ? `${p.sequence_number ?? "none"}:${String(
|
|
299
299
|
p.content ?? ""
|
|
300
|
-
)}` : "none", [p]),
|
|
301
|
-
() => [
|
|
302
|
-
[
|
|
303
|
-
),
|
|
300
|
+
)}` : "none", [p]), _e = u(
|
|
301
|
+
() => [tn, rn].join("|"),
|
|
302
|
+
[rn, tn]
|
|
303
|
+
), Xn = u(
|
|
304
304
|
() => [
|
|
305
|
-
|
|
306
|
-
|
|
305
|
+
_e,
|
|
306
|
+
vt?.audioKey ?? "none",
|
|
307
307
|
String(T)
|
|
308
308
|
].join("|"),
|
|
309
|
-
[T,
|
|
310
|
-
),
|
|
311
|
-
(t) => t.audioKey ===
|
|
312
|
-
)?.audioUrl?.trim() ?? "", [S,
|
|
313
|
-
() =>
|
|
309
|
+
[T, vt?.audioKey, _e]
|
|
310
|
+
), on = !!u(() => !Xe || Xe === "none" ? "" : S.find(
|
|
311
|
+
(t) => t.audioKey === Xe
|
|
312
|
+
)?.audioUrl?.trim() ?? "", [S, Xe]), W = ee && !!Z && ut, Oe = u(
|
|
313
|
+
() => zr({
|
|
314
314
|
canGoNext: R,
|
|
315
315
|
currentAudioIndex: T,
|
|
316
316
|
currentStepHasSpeakableElement: I,
|
|
@@ -322,120 +322,120 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
322
322
|
p,
|
|
323
323
|
I
|
|
324
324
|
]
|
|
325
|
-
),
|
|
326
|
-
() =>
|
|
327
|
-
currentElementList:
|
|
325
|
+
), ln = u(
|
|
326
|
+
() => Xr({
|
|
327
|
+
currentElementList: P,
|
|
328
328
|
currentStepHasSpeakableElement: I,
|
|
329
329
|
currentInteractionElement: p,
|
|
330
|
-
markerAutoAdvanceDelay:
|
|
330
|
+
markerAutoAdvanceDelay: Le
|
|
331
331
|
}),
|
|
332
332
|
[
|
|
333
|
-
|
|
333
|
+
P,
|
|
334
334
|
p,
|
|
335
335
|
I,
|
|
336
|
-
|
|
336
|
+
Le
|
|
337
337
|
]
|
|
338
|
-
),
|
|
339
|
-
() => `${
|
|
340
|
-
[
|
|
341
|
-
), [
|
|
338
|
+
), sn = ln.delayMs, Me = ln.usesImageOnlyDelay, bt = u(
|
|
339
|
+
() => `${a}:${oe.join("|")}`,
|
|
340
|
+
[a, oe]
|
|
341
|
+
), [Qn, Zn] = d(null), an = !Me || Qn === bt, V = r(() => {
|
|
342
342
|
re.current !== null && (window.clearTimeout(re.current), re.current = null);
|
|
343
|
-
}, []),
|
|
343
|
+
}, []), F = r(() => {
|
|
344
344
|
z.current !== null && (window.clearTimeout(z.current), z.current = null);
|
|
345
|
-
}, []),
|
|
346
|
-
be.current !== null && (window.clearTimeout(be.current), be.current = null);
|
|
347
|
-
}, []), ue = n(() => {
|
|
345
|
+
}, []), B = r(() => {
|
|
348
346
|
Ie.current !== null && (window.clearTimeout(Ie.current), Ie.current = null);
|
|
349
|
-
}, []),
|
|
350
|
-
|
|
351
|
-
}, []),
|
|
347
|
+
}, []), ue = r(() => {
|
|
348
|
+
Se.current !== null && (window.clearTimeout(Se.current), Se.current = null);
|
|
349
|
+
}, []), U = r(() => {
|
|
350
|
+
Ue.current !== null && (window.clearTimeout(Ue.current), Ue.current = null);
|
|
351
|
+
}, []), N = r(
|
|
352
352
|
(e = {}) => {
|
|
353
|
-
ue(),
|
|
353
|
+
ue(), F(), B(), U(), K(null), se.reset(), b(!1), at(Pt), ct(!1), $e(!1), Ht(null), e.preservePendingSubtitleJump || (Te.current = null), ft(void 0), ze(!1), Re(0);
|
|
354
354
|
},
|
|
355
355
|
[
|
|
356
356
|
ue,
|
|
357
357
|
U,
|
|
358
|
+
F,
|
|
358
359
|
B,
|
|
359
|
-
D,
|
|
360
360
|
se
|
|
361
361
|
]
|
|
362
|
-
),
|
|
362
|
+
), Qe = r(
|
|
363
363
|
(e) => {
|
|
364
|
-
|
|
364
|
+
Nt.current += 1, Ht({
|
|
365
365
|
...e,
|
|
366
|
-
id:
|
|
366
|
+
id: Nt.current
|
|
367
367
|
});
|
|
368
368
|
},
|
|
369
369
|
[]
|
|
370
|
-
), de =
|
|
371
|
-
const e =
|
|
370
|
+
), de = r(() => {
|
|
371
|
+
const e = M[0];
|
|
372
372
|
return e ? (K(e), !0) : !1;
|
|
373
|
-
}, [
|
|
374
|
-
|
|
373
|
+
}, [M]), ke = r(() => {
|
|
374
|
+
F(), B(), ze(!1), Re(0), !de() && R && O();
|
|
375
375
|
}, [
|
|
376
376
|
R,
|
|
377
|
+
F,
|
|
377
378
|
B,
|
|
378
|
-
|
|
379
|
-
M,
|
|
379
|
+
O,
|
|
380
380
|
de
|
|
381
|
-
]),
|
|
381
|
+
]), cn = r(
|
|
382
382
|
(e) => {
|
|
383
|
-
if (
|
|
383
|
+
if (B(), !e)
|
|
384
384
|
return;
|
|
385
385
|
const t = () => {
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
),
|
|
386
|
+
Ie.current = null, Re(
|
|
387
|
+
io
|
|
388
|
+
), ze(!0), J.current = null;
|
|
389
389
|
};
|
|
390
|
-
|
|
390
|
+
Ie.current = window.setTimeout(
|
|
391
391
|
t,
|
|
392
|
-
|
|
392
|
+
oo
|
|
393
393
|
);
|
|
394
394
|
},
|
|
395
|
-
[
|
|
396
|
-
),
|
|
397
|
-
() =>
|
|
395
|
+
[B]
|
|
396
|
+
), xt = r(
|
|
397
|
+
() => Ke.current || !!ve.current?.querySelector(".slide-player__controls:hover"),
|
|
398
398
|
[]
|
|
399
|
-
), v =
|
|
400
|
-
(e =
|
|
401
|
-
!g || j === "hidden" || (Ce(!0), V(), !(j === "visible" || !e ||
|
|
402
|
-
if (
|
|
399
|
+
), v = r(
|
|
400
|
+
(e = Ge) => {
|
|
401
|
+
!g || j === "hidden" || (Ce(!0), V(), !(j === "visible" || !e || ge <= 0 || xt()) && (re.current = window.setTimeout(() => {
|
|
402
|
+
if (xt()) {
|
|
403
403
|
re.current = null;
|
|
404
404
|
return;
|
|
405
405
|
}
|
|
406
406
|
Ce(!1), re.current = null;
|
|
407
|
-
},
|
|
407
|
+
}, ge)));
|
|
408
408
|
},
|
|
409
409
|
[
|
|
410
410
|
V,
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
411
|
+
Ge,
|
|
412
|
+
xt,
|
|
413
|
+
ge,
|
|
414
414
|
j,
|
|
415
415
|
g
|
|
416
416
|
]
|
|
417
|
-
),
|
|
418
|
-
|
|
419
|
-
}, []), me =
|
|
417
|
+
), Fe = !!Ur(p), fe = !!p && !Fe, er = r((e) => {
|
|
418
|
+
Kt(e);
|
|
419
|
+
}, []), me = r(
|
|
420
420
|
(e) => {
|
|
421
|
-
e &&
|
|
421
|
+
e && Kt(e.shouldContinuePlayback);
|
|
422
422
|
},
|
|
423
423
|
[]
|
|
424
424
|
);
|
|
425
425
|
c(() => {
|
|
426
|
-
|
|
427
|
-
}, [
|
|
428
|
-
ee &&
|
|
429
|
-
}, [
|
|
430
|
-
ue(), U(), V(),
|
|
426
|
+
Ut(st);
|
|
427
|
+
}, [a, st, ee]), c(() => {
|
|
428
|
+
ee && dt(!1);
|
|
429
|
+
}, [a, ee]), c(() => () => {
|
|
430
|
+
ue(), U(), V(), F(), B();
|
|
431
431
|
}, [
|
|
432
432
|
ue,
|
|
433
433
|
U,
|
|
434
|
+
F,
|
|
434
435
|
B,
|
|
435
|
-
D,
|
|
436
436
|
V
|
|
437
437
|
]), c(() => {
|
|
438
|
-
if (!
|
|
438
|
+
if (!Me) {
|
|
439
439
|
U();
|
|
440
440
|
return;
|
|
441
441
|
}
|
|
@@ -443,113 +443,113 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
443
443
|
const i = () => {
|
|
444
444
|
o?.(), o = null;
|
|
445
445
|
}, l = () => {
|
|
446
|
-
e || (i(), U(),
|
|
447
|
-
},
|
|
446
|
+
e || (i(), U(), Zn(bt));
|
|
447
|
+
}, n = () => {
|
|
448
448
|
if (e)
|
|
449
449
|
return;
|
|
450
450
|
i();
|
|
451
|
-
const E =
|
|
451
|
+
const E = qe.current?.querySelector(
|
|
452
452
|
'[data-active-step="true"]'
|
|
453
453
|
);
|
|
454
454
|
if (!E)
|
|
455
455
|
return;
|
|
456
|
-
const
|
|
456
|
+
const D = Array.from(
|
|
457
457
|
E.querySelectorAll("iframe")
|
|
458
458
|
);
|
|
459
|
-
if (
|
|
459
|
+
if (D.length === 0 || Wr(D)) {
|
|
460
460
|
l();
|
|
461
461
|
return;
|
|
462
462
|
}
|
|
463
|
-
const
|
|
463
|
+
const et = [], Ne = () => {
|
|
464
464
|
e || (t !== null && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
|
|
465
|
-
t = null,
|
|
465
|
+
t = null, n();
|
|
466
466
|
}));
|
|
467
|
-
},
|
|
468
|
-
X.addEventListener(
|
|
469
|
-
() => X.removeEventListener(
|
|
467
|
+
}, Tt = (X, pe, Q) => {
|
|
468
|
+
X.addEventListener(pe, Q, { once: !0 }), et.push(
|
|
469
|
+
() => X.removeEventListener(pe, Q)
|
|
470
470
|
);
|
|
471
471
|
};
|
|
472
|
-
|
|
473
|
-
const
|
|
474
|
-
if (!
|
|
475
|
-
|
|
472
|
+
D.forEach((X) => {
|
|
473
|
+
const pe = X.contentDocument;
|
|
474
|
+
if (!pe || pe.readyState !== "complete") {
|
|
475
|
+
Tt(X, "load", Ne);
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
|
-
Array.from(
|
|
479
|
-
|
|
478
|
+
Array.from(pe.images).filter((Q) => !Q.complete).forEach((Q) => {
|
|
479
|
+
Tt(Q, "load", Ne), Tt(Q, "error", Ne);
|
|
480
480
|
});
|
|
481
481
|
}), o = () => {
|
|
482
|
-
|
|
482
|
+
et.forEach((X) => X());
|
|
483
483
|
};
|
|
484
484
|
};
|
|
485
485
|
return t = window.requestAnimationFrame(() => {
|
|
486
|
-
t = null,
|
|
487
|
-
}),
|
|
486
|
+
t = null, n();
|
|
487
|
+
}), Ue.current = window.setTimeout(() => {
|
|
488
488
|
l();
|
|
489
|
-
},
|
|
489
|
+
}, Jr), () => {
|
|
490
490
|
e = !0, i(), U(), t !== null && window.cancelAnimationFrame(t);
|
|
491
491
|
};
|
|
492
492
|
}, [
|
|
493
493
|
U,
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
]), c(() => (
|
|
499
|
-
|
|
500
|
-
}), [
|
|
501
|
-
w || (
|
|
494
|
+
P,
|
|
495
|
+
a,
|
|
496
|
+
bt,
|
|
497
|
+
Me
|
|
498
|
+
]), c(() => (ot?.(w), () => {
|
|
499
|
+
ot?.(!1);
|
|
500
|
+
}), [ot, w]), c(() => {
|
|
501
|
+
w || (Ke.current = !1);
|
|
502
502
|
}, [w]), c(() => {
|
|
503
|
-
|
|
504
|
-
}, [
|
|
505
|
-
if (!
|
|
506
|
-
|
|
503
|
+
L || We === tt || (gt(!1), ht(tt));
|
|
504
|
+
}, [L, We]), c(() => {
|
|
505
|
+
if (!L) {
|
|
506
|
+
Jt(!1);
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
509
509
|
const e = () => {
|
|
510
|
-
|
|
510
|
+
Jt(hn());
|
|
511
511
|
};
|
|
512
|
-
return e(),
|
|
513
|
-
}, [
|
|
514
|
-
|
|
515
|
-
}, [ae,
|
|
516
|
-
|
|
512
|
+
return e(), Pr(e);
|
|
513
|
+
}, [L]), c(() => {
|
|
514
|
+
_t?.(ae);
|
|
515
|
+
}, [ae, _t]), c(() => {
|
|
516
|
+
qn.current = ae;
|
|
517
517
|
}, [ae]), c(() => {
|
|
518
|
-
|
|
519
|
-
}, [
|
|
520
|
-
const e =
|
|
518
|
+
Ot?.(Ee, a);
|
|
519
|
+
}, [a, Ee, Ot]), c(() => {
|
|
520
|
+
const e = Lt.current, t = jr(
|
|
521
521
|
{
|
|
522
522
|
previousMarkerCount: e.markerCount,
|
|
523
|
-
nextMarkerCount:
|
|
523
|
+
nextMarkerCount: C.length,
|
|
524
524
|
previousIndex: e.currentIndex,
|
|
525
525
|
previousCanGoNext: e.canGoNext,
|
|
526
526
|
nextCanGoNext: R,
|
|
527
527
|
currentAudioKey: A,
|
|
528
|
-
hasCompletedCurrentStepAudio:
|
|
529
|
-
hasResolvedCurrentInteraction:
|
|
528
|
+
hasCompletedCurrentStepAudio: k,
|
|
529
|
+
hasResolvedCurrentInteraction: Fe,
|
|
530
530
|
currentStepHasSpeakableElement: I,
|
|
531
531
|
currentInteractionElement: p,
|
|
532
|
-
isAutoAdvanceEnabled:
|
|
533
|
-
shouldUseSilentStepAutoAdvanceToggle:
|
|
532
|
+
isAutoAdvanceEnabled: Pe,
|
|
533
|
+
shouldUseSilentStepAutoAdvanceToggle: Oe
|
|
534
534
|
}
|
|
535
535
|
);
|
|
536
|
-
|
|
537
|
-
markerCount:
|
|
538
|
-
currentIndex:
|
|
536
|
+
Lt.current = {
|
|
537
|
+
markerCount: C.length,
|
|
538
|
+
currentIndex: a,
|
|
539
539
|
canGoNext: R
|
|
540
|
-
}, t &&
|
|
540
|
+
}, t && O();
|
|
541
541
|
}, [
|
|
542
542
|
R,
|
|
543
543
|
A,
|
|
544
|
-
|
|
544
|
+
a,
|
|
545
545
|
p,
|
|
546
546
|
I,
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
547
|
+
O,
|
|
548
|
+
k,
|
|
549
|
+
Fe,
|
|
550
|
+
Pe,
|
|
551
|
+
Oe,
|
|
552
|
+
C.length
|
|
553
553
|
]), c(() => {
|
|
554
554
|
if (!g || j === "hidden") {
|
|
555
555
|
V(), Ce(!1);
|
|
@@ -559,10 +559,10 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
559
559
|
V(), Ce(!0);
|
|
560
560
|
return;
|
|
561
561
|
}
|
|
562
|
-
|
|
562
|
+
Ge || v(!0);
|
|
563
563
|
}, [
|
|
564
564
|
V,
|
|
565
|
-
|
|
565
|
+
Ge,
|
|
566
566
|
j,
|
|
567
567
|
g,
|
|
568
568
|
v
|
|
@@ -570,13 +570,13 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
570
570
|
if (typeof window > "u")
|
|
571
571
|
return;
|
|
572
572
|
const e = (t) => {
|
|
573
|
-
t.origin === window.location.origin &&
|
|
573
|
+
t.origin === window.location.origin && wr(t.data) && t.data.eventType === "click" && g && (q(), ie(!0), v(!0));
|
|
574
574
|
};
|
|
575
575
|
return window.addEventListener("message", e), () => {
|
|
576
576
|
window.removeEventListener("message", e);
|
|
577
577
|
};
|
|
578
|
-
}, [q, g, v]),
|
|
579
|
-
sectionRef:
|
|
578
|
+
}, [q, g, v]), kr({
|
|
579
|
+
sectionRef: ve,
|
|
580
580
|
enabled: g,
|
|
581
581
|
keyboardShortcutsEnabled: ne,
|
|
582
582
|
onKeyboardShortcut: q,
|
|
@@ -588,53 +588,53 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
588
588
|
N();
|
|
589
589
|
return;
|
|
590
590
|
}
|
|
591
|
-
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } =
|
|
592
|
-
previousResetKey:
|
|
593
|
-
nextResetKey:
|
|
591
|
+
const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = qr({
|
|
592
|
+
previousResetKey: Dt.current,
|
|
593
|
+
nextResetKey: _e,
|
|
594
594
|
currentAudioKey: A,
|
|
595
|
-
hasCompletedCurrentStepAudio:
|
|
595
|
+
hasCompletedCurrentStepAudio: k
|
|
596
596
|
});
|
|
597
|
-
|
|
598
|
-
const o = J.current ===
|
|
597
|
+
Dt.current = _e;
|
|
598
|
+
const o = J.current === a && !!p, i = Lr({
|
|
599
599
|
hasInteraction: !!p,
|
|
600
600
|
shouldBlockPlaybackForInteraction: fe,
|
|
601
601
|
shouldOpenInteractionOverlayAfterAudio: o,
|
|
602
602
|
hasPlaybackContextChanged: e,
|
|
603
|
-
hasResolvedCurrentInteraction:
|
|
603
|
+
hasResolvedCurrentInteraction: Fe,
|
|
604
604
|
currentStepHasSpeakableElement: I
|
|
605
|
-
}), l =
|
|
605
|
+
}), l = Te.current, n = l?.slideIndex === a;
|
|
606
606
|
if (e && N({
|
|
607
|
-
preservePendingSubtitleJump:
|
|
608
|
-
}), !(
|
|
609
|
-
if (l?.slideIndex ===
|
|
610
|
-
currentIndex:
|
|
607
|
+
preservePendingSubtitleJump: n
|
|
608
|
+
}), !(P.length === 0 && !p) && !W) {
|
|
609
|
+
if (l?.slideIndex === a && vn({
|
|
610
|
+
currentIndex: a,
|
|
611
611
|
resolvedCurrentInteractionElement: y,
|
|
612
|
-
slideElementList:
|
|
612
|
+
slideElementList: C,
|
|
613
613
|
targetSlideIndex: l.slideIndex
|
|
614
614
|
})) {
|
|
615
|
-
|
|
615
|
+
Te.current = null, lt.current = !0, K(l.audioKey), Qe({
|
|
616
616
|
audioIndex: l.audioIndex,
|
|
617
617
|
timeMs: l.timeMs
|
|
618
618
|
});
|
|
619
619
|
return;
|
|
620
620
|
}
|
|
621
|
-
if (p &&
|
|
622
|
-
|
|
621
|
+
if (p && ft(p), i) {
|
|
622
|
+
cn(p);
|
|
623
623
|
return;
|
|
624
624
|
}
|
|
625
|
-
if (
|
|
625
|
+
if (B(), J.current = null, !!t && !de()) {
|
|
626
626
|
if (I) {
|
|
627
|
-
if (
|
|
627
|
+
if (_) {
|
|
628
628
|
b(!1);
|
|
629
629
|
return;
|
|
630
630
|
}
|
|
631
631
|
b(!0);
|
|
632
632
|
return;
|
|
633
633
|
}
|
|
634
|
-
if (R && !(
|
|
635
|
-
return
|
|
636
|
-
|
|
637
|
-
},
|
|
634
|
+
if (R && !(Oe && !Pe) && !(Me && !an))
|
|
635
|
+
return Se.current = window.setTimeout(() => {
|
|
636
|
+
Se.current = null, O();
|
|
637
|
+
}, sn), () => {
|
|
638
638
|
ue();
|
|
639
639
|
};
|
|
640
640
|
}
|
|
@@ -643,67 +643,67 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
643
643
|
y,
|
|
644
644
|
R,
|
|
645
645
|
ue,
|
|
646
|
-
|
|
647
|
-
|
|
646
|
+
P.length,
|
|
647
|
+
a,
|
|
648
648
|
p,
|
|
649
649
|
A,
|
|
650
|
-
|
|
650
|
+
_e,
|
|
651
651
|
I,
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
M,
|
|
656
|
-
F,
|
|
652
|
+
Me,
|
|
653
|
+
an,
|
|
654
|
+
sn,
|
|
657
655
|
O,
|
|
658
|
-
|
|
659
|
-
|
|
656
|
+
k,
|
|
657
|
+
_,
|
|
658
|
+
Pe,
|
|
659
|
+
Fe,
|
|
660
660
|
fe,
|
|
661
|
-
|
|
661
|
+
B,
|
|
662
662
|
N,
|
|
663
|
-
|
|
664
|
-
|
|
663
|
+
Qe,
|
|
664
|
+
cn,
|
|
665
665
|
g,
|
|
666
|
-
|
|
666
|
+
C,
|
|
667
667
|
de,
|
|
668
668
|
W,
|
|
669
|
-
|
|
669
|
+
Oe
|
|
670
670
|
]), c(() => {
|
|
671
|
-
if (
|
|
671
|
+
if (_ || W || !I || fe) {
|
|
672
672
|
b(!1);
|
|
673
673
|
return;
|
|
674
674
|
}
|
|
675
|
-
if (
|
|
675
|
+
if (k) {
|
|
676
676
|
b(!1);
|
|
677
677
|
return;
|
|
678
678
|
}
|
|
679
|
-
if (
|
|
679
|
+
if (nn) {
|
|
680
680
|
b(!1);
|
|
681
681
|
return;
|
|
682
682
|
}
|
|
683
|
-
|
|
683
|
+
at("waitingForAudio"), b(!0);
|
|
684
684
|
}, [
|
|
685
|
-
|
|
685
|
+
nn,
|
|
686
686
|
I,
|
|
687
|
-
|
|
688
|
-
|
|
687
|
+
k,
|
|
688
|
+
_,
|
|
689
689
|
W,
|
|
690
690
|
fe
|
|
691
691
|
]), c(() => {
|
|
692
|
-
const e =
|
|
693
|
-
|
|
692
|
+
const e = lt.current;
|
|
693
|
+
lt.current = !1, Kr({
|
|
694
694
|
currentAudioKey: A,
|
|
695
|
-
currentAudioSequenceLength:
|
|
695
|
+
currentAudioSequenceLength: M.length,
|
|
696
696
|
currentStepHasSpeakableElement: I,
|
|
697
|
-
hasCompletedCurrentStepAudio:
|
|
697
|
+
hasCompletedCurrentStepAudio: k,
|
|
698
698
|
shouldBlockPlaybackForInteraction: fe,
|
|
699
699
|
shouldPausePlaybackForCustomAction: W,
|
|
700
700
|
shouldSkipDefaultAudioStart: e
|
|
701
701
|
}) && de();
|
|
702
702
|
}, [
|
|
703
703
|
A,
|
|
704
|
-
|
|
704
|
+
M,
|
|
705
705
|
I,
|
|
706
|
-
|
|
706
|
+
k,
|
|
707
707
|
W,
|
|
708
708
|
fe,
|
|
709
709
|
de
|
|
@@ -712,61 +712,61 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
712
712
|
}, [T, A]), c(() => {
|
|
713
713
|
T >= 0 || se.reset();
|
|
714
714
|
}, [T, se]), c(() => {
|
|
715
|
-
|
|
716
|
-
}, [
|
|
715
|
+
$e(!1);
|
|
716
|
+
}, [Xn]);
|
|
717
717
|
const {
|
|
718
|
-
interactionDefaults:
|
|
719
|
-
interactionDefaultSelectedValues:
|
|
720
|
-
hasResolvedInteractionInput:
|
|
721
|
-
isInteractionReadonly:
|
|
722
|
-
shouldAutoContinueInteraction:
|
|
718
|
+
interactionDefaults: un,
|
|
719
|
+
interactionDefaultSelectedValues: tr,
|
|
720
|
+
hasResolvedInteractionInput: dn,
|
|
721
|
+
isInteractionReadonly: nr,
|
|
722
|
+
shouldAutoContinueInteraction: fn
|
|
723
723
|
} = u(
|
|
724
|
-
() =>
|
|
725
|
-
interactionDefaultValueOptions:
|
|
724
|
+
() => $r(y, {
|
|
725
|
+
interactionDefaultValueOptions: Ve
|
|
726
726
|
}),
|
|
727
|
-
[y,
|
|
728
|
-
),
|
|
727
|
+
[y, Ve]
|
|
728
|
+
), rr = !!y?.readonly || nr, Be = Dr({
|
|
729
729
|
hasActiveInteraction: !!y,
|
|
730
730
|
isInteractionOverlayOpen: le
|
|
731
|
-
}),
|
|
731
|
+
}), or = r(
|
|
732
732
|
(e) => {
|
|
733
733
|
const o = [
|
|
734
734
|
...e.selectedValues ?? [],
|
|
735
735
|
e.inputText?.trim() ?? "",
|
|
736
736
|
e.buttonText?.trim() ?? ""
|
|
737
737
|
].filter(Boolean).join(", ");
|
|
738
|
-
|
|
738
|
+
ft((i) => !i || !o ? i : {
|
|
739
739
|
...i,
|
|
740
740
|
user_input: o
|
|
741
|
-
}),
|
|
741
|
+
}), Rt?.(e, y), ke();
|
|
742
742
|
},
|
|
743
|
-
[y,
|
|
743
|
+
[y, ke, Rt]
|
|
744
744
|
);
|
|
745
745
|
c(() => {
|
|
746
746
|
const e = () => {
|
|
747
|
-
|
|
747
|
+
Ln(document.fullscreenElement === ve.current);
|
|
748
748
|
};
|
|
749
749
|
return e(), document.addEventListener("fullscreenchange", e), () => {
|
|
750
750
|
document.removeEventListener("fullscreenchange", e);
|
|
751
751
|
};
|
|
752
752
|
}, []), c(() => {
|
|
753
|
-
y && le ||
|
|
753
|
+
y && le || Je(!1);
|
|
754
754
|
}, [y, le]), c(() => {
|
|
755
|
-
|
|
755
|
+
mt(In), yt(!1), Ae.current = null, xe.current = null;
|
|
756
756
|
}, [y]), c(() => {
|
|
757
|
-
if (!
|
|
758
|
-
|
|
757
|
+
if (!Be) {
|
|
758
|
+
Re(0);
|
|
759
759
|
return;
|
|
760
760
|
}
|
|
761
|
-
const e =
|
|
761
|
+
const e = be.current;
|
|
762
762
|
if (!e)
|
|
763
763
|
return;
|
|
764
764
|
const t = () => {
|
|
765
765
|
const i = Math.ceil(
|
|
766
766
|
e.getBoundingClientRect().height
|
|
767
767
|
);
|
|
768
|
-
|
|
769
|
-
i +
|
|
768
|
+
Re(
|
|
769
|
+
i + lo
|
|
770
770
|
);
|
|
771
771
|
};
|
|
772
772
|
if (t(), typeof ResizeObserver > "u")
|
|
@@ -777,90 +777,90 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
777
777
|
return o.observe(e), () => {
|
|
778
778
|
o.disconnect();
|
|
779
779
|
};
|
|
780
|
-
}, [
|
|
781
|
-
if (
|
|
782
|
-
if (
|
|
780
|
+
}, [Be]), c(() => {
|
|
781
|
+
if (F(), !!le) {
|
|
782
|
+
if (fn)
|
|
783
783
|
return z.current = window.setTimeout(() => {
|
|
784
|
-
z.current = null,
|
|
785
|
-
},
|
|
786
|
-
|
|
784
|
+
z.current = null, ke();
|
|
785
|
+
}, Sn), () => {
|
|
786
|
+
F();
|
|
787
787
|
};
|
|
788
|
-
if (!(
|
|
788
|
+
if (!(Gt || !dn))
|
|
789
789
|
return z.current = window.setTimeout(() => {
|
|
790
|
-
z.current = null,
|
|
791
|
-
},
|
|
792
|
-
|
|
790
|
+
z.current = null, ke();
|
|
791
|
+
}, Sn), () => {
|
|
792
|
+
F();
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
795
|
}, [
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
796
|
+
F,
|
|
797
|
+
ke,
|
|
798
|
+
Gt,
|
|
799
|
+
dn,
|
|
800
800
|
le,
|
|
801
|
-
|
|
801
|
+
fn
|
|
802
802
|
]);
|
|
803
|
-
const
|
|
804
|
-
|
|
803
|
+
const ir = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ s.jsx(s.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ s.jsx(
|
|
804
|
+
yn,
|
|
805
805
|
{
|
|
806
806
|
className: "content-render-iframe",
|
|
807
|
-
disableLoadingOverlay:
|
|
807
|
+
disableLoadingOverlay: _,
|
|
808
808
|
hideFullScreen: !0,
|
|
809
809
|
locale: h,
|
|
810
810
|
mode: "blackboard",
|
|
811
811
|
replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
|
|
812
812
|
type: "sandbox",
|
|
813
813
|
content: e.content,
|
|
814
|
-
enableScaling:
|
|
814
|
+
enableScaling: xn
|
|
815
815
|
}
|
|
816
|
-
) : /* @__PURE__ */
|
|
817
|
-
|
|
816
|
+
) : /* @__PURE__ */ s.jsx(
|
|
817
|
+
yn,
|
|
818
818
|
{
|
|
819
819
|
className: "content-render-iframe",
|
|
820
|
-
disableLoadingOverlay:
|
|
820
|
+
disableLoadingOverlay: _,
|
|
821
821
|
hideFullScreen: !0,
|
|
822
822
|
locale: h,
|
|
823
823
|
mode: "blackboard",
|
|
824
824
|
type: "markdown",
|
|
825
825
|
content: e.content
|
|
826
826
|
}
|
|
827
|
-
) : null,
|
|
827
|
+
) : null, lr = (e = [], t = !1) => {
|
|
828
828
|
if (e.length === 0)
|
|
829
829
|
return null;
|
|
830
830
|
const o = e.filter(
|
|
831
|
-
(
|
|
832
|
-
).length, i = t &&
|
|
833
|
-
(
|
|
831
|
+
(n) => n.is_renderable !== !1
|
|
832
|
+
).length, i = t && An ? Vr(e) : "disabled", l = e.reduce(
|
|
833
|
+
(n, E, D) => E.is_renderable !== !1 ? D : n,
|
|
834
834
|
-1
|
|
835
835
|
);
|
|
836
|
-
return /* @__PURE__ */
|
|
837
|
-
|
|
836
|
+
return /* @__PURE__ */ s.jsx(
|
|
837
|
+
_r,
|
|
838
838
|
{
|
|
839
839
|
className: "slide-stage__content flex w-full flex-col gap-4",
|
|
840
840
|
mode: i,
|
|
841
|
-
children: e.map((
|
|
842
|
-
const
|
|
843
|
-
return /* @__PURE__ */
|
|
841
|
+
children: e.map((n, E) => {
|
|
842
|
+
const D = n.type === "html" && n.is_renderable === !1;
|
|
843
|
+
return /* @__PURE__ */ s.jsx(
|
|
844
844
|
"div",
|
|
845
845
|
{
|
|
846
|
-
ref: t && E === l ?
|
|
847
|
-
"aria-hidden":
|
|
848
|
-
className:
|
|
846
|
+
ref: t && E === l ? Ft : null,
|
|
847
|
+
"aria-hidden": D || void 0,
|
|
848
|
+
className: ye(
|
|
849
849
|
"w-full shrink-0",
|
|
850
|
-
o === 1 &&
|
|
851
|
-
|
|
850
|
+
o === 1 && n.is_renderable !== !1 && "slide-element--single",
|
|
851
|
+
D ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : n.is_renderable === !1 && "hidden"
|
|
852
852
|
),
|
|
853
|
-
children:
|
|
854
|
-
replaceRootScreenHeightWithFull: o === 1 &&
|
|
853
|
+
children: ir(n, {
|
|
854
|
+
replaceRootScreenHeightWithFull: o === 1 && n.type === "html" && n.is_renderable !== !1
|
|
855
855
|
})
|
|
856
856
|
},
|
|
857
|
-
|
|
857
|
+
n.sequence_number ?? `${n.type}-${E}`
|
|
858
858
|
);
|
|
859
859
|
})
|
|
860
860
|
}
|
|
861
861
|
);
|
|
862
|
-
},
|
|
863
|
-
const e =
|
|
862
|
+
}, sr = r(() => {
|
|
863
|
+
const e = ve.current;
|
|
864
864
|
if (e) {
|
|
865
865
|
if (document.fullscreenElement === e) {
|
|
866
866
|
document.exitFullscreen().catch(() => {
|
|
@@ -870,137 +870,137 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
870
870
|
e.requestFullscreen?.().catch(() => {
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
|
-
}, []),
|
|
874
|
-
const e =
|
|
873
|
+
}, []), mn = r(() => {
|
|
874
|
+
const e = qe.current;
|
|
875
875
|
e && e.scrollTo({
|
|
876
876
|
top: e.scrollHeight,
|
|
877
877
|
behavior: "smooth"
|
|
878
878
|
});
|
|
879
|
-
}, []),
|
|
880
|
-
(e) =>
|
|
881
|
-
currentIndex:
|
|
879
|
+
}, []), At = r(
|
|
880
|
+
(e) => vn({
|
|
881
|
+
currentIndex: a,
|
|
882
882
|
resolvedCurrentInteractionElement: y,
|
|
883
|
-
slideElementList:
|
|
884
|
-
targetSlideIndex:
|
|
883
|
+
slideElementList: C,
|
|
884
|
+
targetSlideIndex: He[e.audioIndex]
|
|
885
885
|
}),
|
|
886
886
|
[
|
|
887
887
|
y,
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
888
|
+
He,
|
|
889
|
+
a,
|
|
890
|
+
C
|
|
891
891
|
]
|
|
892
|
-
),
|
|
892
|
+
), ar = r(
|
|
893
893
|
(e, t) => {
|
|
894
|
-
const i = S[e.audioIndex]?.audioKey, l =
|
|
895
|
-
return !i || l == null || !
|
|
894
|
+
const i = S[e.audioIndex]?.audioKey, l = He[e.audioIndex];
|
|
895
|
+
return !i || l == null || !At(e) ? !1 : (me(t), J.current = null, b(!1), ct(!1), $e(!1), Et(t) && (ie(!0), v(!0)), l === a ? (Te.current = null, N(), K(i), Qe(e), !0) : (we.current = !0, N(), Te.current = {
|
|
896
896
|
audioIndex: e.audioIndex,
|
|
897
897
|
audioKey: i,
|
|
898
898
|
slideIndex: l,
|
|
899
899
|
timeMs: e.timeMs
|
|
900
|
-
},
|
|
900
|
+
}, qt(l), !0));
|
|
901
901
|
},
|
|
902
902
|
[
|
|
903
903
|
S,
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
904
|
+
He,
|
|
905
|
+
At,
|
|
906
|
+
a,
|
|
907
|
+
qt,
|
|
908
|
+
Qe,
|
|
909
909
|
N,
|
|
910
910
|
v,
|
|
911
911
|
me
|
|
912
912
|
]
|
|
913
|
-
),
|
|
913
|
+
), cr = r(
|
|
914
914
|
(e) => {
|
|
915
|
-
me(e),
|
|
915
|
+
me(e), we.current = !0, J.current = null, b(!1), Et(e) && (ie(!0), v(!0)), N(), jt();
|
|
916
916
|
},
|
|
917
917
|
[
|
|
918
|
-
|
|
918
|
+
jt,
|
|
919
919
|
N,
|
|
920
920
|
v,
|
|
921
921
|
me
|
|
922
922
|
]
|
|
923
|
-
),
|
|
923
|
+
), ur = r(
|
|
924
924
|
(e) => {
|
|
925
|
-
me(e),
|
|
925
|
+
me(e), we.current = !0, J.current = null, b(!1), Et(e) && (ie(!0), v(!0)), N(), O();
|
|
926
926
|
},
|
|
927
927
|
[
|
|
928
|
-
|
|
928
|
+
O,
|
|
929
929
|
N,
|
|
930
930
|
v,
|
|
931
931
|
me
|
|
932
932
|
]
|
|
933
|
-
),
|
|
933
|
+
), dr = r(
|
|
934
934
|
({
|
|
935
935
|
loading: e,
|
|
936
936
|
reason: t
|
|
937
937
|
}) => {
|
|
938
|
-
if (
|
|
938
|
+
if (_) {
|
|
939
939
|
b(!1);
|
|
940
940
|
return;
|
|
941
941
|
}
|
|
942
|
-
if (!I ||
|
|
942
|
+
if (!I || k) {
|
|
943
943
|
b(!1);
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
946
|
-
e && t &&
|
|
946
|
+
e && t && at(t), b(fo(t, e));
|
|
947
947
|
},
|
|
948
948
|
[
|
|
949
949
|
I,
|
|
950
|
-
|
|
951
|
-
|
|
950
|
+
k,
|
|
951
|
+
_
|
|
952
952
|
]
|
|
953
953
|
);
|
|
954
954
|
c(() => {
|
|
955
|
-
|
|
956
|
-
}, [
|
|
957
|
-
const
|
|
955
|
+
_ && b(!1);
|
|
956
|
+
}, [_]);
|
|
957
|
+
const fr = r(
|
|
958
958
|
(e) => {
|
|
959
959
|
const t = S[e]?.audioKey;
|
|
960
960
|
if (!t || !A || t !== A)
|
|
961
961
|
return;
|
|
962
|
-
const o =
|
|
963
|
-
(
|
|
962
|
+
const o = M.findIndex(
|
|
963
|
+
(n) => n === t
|
|
964
964
|
);
|
|
965
965
|
if (o < 0) {
|
|
966
966
|
K(null);
|
|
967
967
|
return;
|
|
968
968
|
}
|
|
969
|
-
const i = o + 1, l =
|
|
969
|
+
const i = o + 1, l = M[i];
|
|
970
970
|
if (l) {
|
|
971
971
|
K(l);
|
|
972
972
|
return;
|
|
973
973
|
}
|
|
974
|
-
if (K(null),
|
|
975
|
-
const
|
|
976
|
-
|
|
974
|
+
if (K(null), ct(!0), b(!1), R) {
|
|
975
|
+
const n = a + 1, E = C[n];
|
|
976
|
+
on && E?.type === "interaction" && (J.current = n), O();
|
|
977
977
|
return;
|
|
978
978
|
}
|
|
979
979
|
},
|
|
980
980
|
[
|
|
981
981
|
S,
|
|
982
982
|
R,
|
|
983
|
-
|
|
983
|
+
a,
|
|
984
984
|
A,
|
|
985
|
-
k,
|
|
986
985
|
M,
|
|
987
|
-
|
|
988
|
-
|
|
986
|
+
O,
|
|
987
|
+
on,
|
|
988
|
+
C
|
|
989
989
|
]
|
|
990
|
-
),
|
|
991
|
-
y &&
|
|
992
|
-
}, [y]),
|
|
993
|
-
|
|
994
|
-
}, [V, g]),
|
|
995
|
-
|
|
996
|
-
}, [v]),
|
|
990
|
+
), mr = r(() => {
|
|
991
|
+
y && ze((e) => !e);
|
|
992
|
+
}, [y]), pr = r(() => {
|
|
993
|
+
Ke.current = !0, V(), g && Ce(!0);
|
|
994
|
+
}, [V, g]), yr = r(() => {
|
|
995
|
+
Ke.current = !1, v(!0);
|
|
996
|
+
}, [v]), wt = r(
|
|
997
997
|
(e) => {
|
|
998
998
|
e.stopPropagation(), w && v(!0);
|
|
999
999
|
},
|
|
1000
1000
|
[w, v]
|
|
1001
|
-
),
|
|
1001
|
+
), Ze = r(
|
|
1002
1002
|
(e, t) => {
|
|
1003
|
-
const o =
|
|
1003
|
+
const o = it.current;
|
|
1004
1004
|
if (!o)
|
|
1005
1005
|
return null;
|
|
1006
1006
|
const i = e.getBoundingClientRect(), l = o.getBoundingClientRect();
|
|
@@ -1013,79 +1013,62 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
1013
1013
|
},
|
|
1014
1014
|
[]
|
|
1015
1015
|
);
|
|
1016
|
-
|
|
1017
|
-
const e =
|
|
1018
|
-
if (!
|
|
1019
|
-
|
|
1016
|
+
so(() => {
|
|
1017
|
+
const e = be.current;
|
|
1018
|
+
if (!Be || !e) {
|
|
1019
|
+
xe.current = null;
|
|
1020
1020
|
return;
|
|
1021
1021
|
}
|
|
1022
|
-
const t =
|
|
1023
|
-
if (!t ||
|
|
1024
|
-
|
|
1022
|
+
const t = xe.current, o = e.getBoundingClientRect();
|
|
1023
|
+
if (!t || pt) {
|
|
1024
|
+
xe.current = o;
|
|
1025
1025
|
return;
|
|
1026
1026
|
}
|
|
1027
1027
|
const i = {
|
|
1028
1028
|
x: x.x + t.left - o.left,
|
|
1029
1029
|
y: x.y + t.top - o.top
|
|
1030
|
-
}, l =
|
|
1030
|
+
}, l = Ze(
|
|
1031
1031
|
e,
|
|
1032
1032
|
x
|
|
1033
|
-
),
|
|
1034
|
-
|
|
1035
|
-
left: o.left +
|
|
1036
|
-
top: o.top +
|
|
1037
|
-
}, (
|
|
1033
|
+
), n = l ? gn(i, l) : i;
|
|
1034
|
+
xe.current = {
|
|
1035
|
+
left: o.left + n.x - x.x,
|
|
1036
|
+
top: o.top + n.y - x.y
|
|
1037
|
+
}, (n.x !== x.x || n.y !== x.y) && mt(n);
|
|
1038
1038
|
}, [
|
|
1039
|
-
|
|
1039
|
+
Ze,
|
|
1040
1040
|
x,
|
|
1041
|
-
|
|
1041
|
+
pt,
|
|
1042
1042
|
w,
|
|
1043
1043
|
g,
|
|
1044
|
-
|
|
1044
|
+
Be
|
|
1045
1045
|
]);
|
|
1046
|
-
const
|
|
1046
|
+
const hr = r(
|
|
1047
1047
|
(e) => {
|
|
1048
|
-
if (
|
|
1048
|
+
if (wt(e), e.button !== 0 || !e.currentTarget.isConnected || !be.current)
|
|
1049
1049
|
return;
|
|
1050
|
-
const t =
|
|
1051
|
-
|
|
1050
|
+
const t = Ze(
|
|
1051
|
+
be.current,
|
|
1052
1052
|
x
|
|
1053
1053
|
);
|
|
1054
|
-
t && (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId),
|
|
1054
|
+
t && (e.preventDefault(), e.currentTarget.setPointerCapture(e.pointerId), Ae.current = {
|
|
1055
1055
|
pointerId: e.pointerId,
|
|
1056
1056
|
startClientX: e.clientX,
|
|
1057
1057
|
startClientY: e.clientY,
|
|
1058
1058
|
startOffset: x,
|
|
1059
1059
|
bounds: t
|
|
1060
|
-
},
|
|
1060
|
+
}, yt(!0));
|
|
1061
1061
|
},
|
|
1062
1062
|
[
|
|
1063
|
-
|
|
1063
|
+
Ze,
|
|
1064
1064
|
x,
|
|
1065
|
-
|
|
1066
|
-
]
|
|
1067
|
-
), vr = n(
|
|
1068
|
-
(e) => {
|
|
1069
|
-
if (_) {
|
|
1070
|
-
pe(e);
|
|
1071
|
-
return;
|
|
1072
|
-
}
|
|
1073
|
-
if (ot(e.target)) {
|
|
1074
|
-
pe(e);
|
|
1075
|
-
return;
|
|
1076
|
-
}
|
|
1077
|
-
Pt(e);
|
|
1078
|
-
},
|
|
1079
|
-
[
|
|
1080
|
-
Pt,
|
|
1081
|
-
_,
|
|
1082
|
-
pe
|
|
1065
|
+
wt
|
|
1083
1066
|
]
|
|
1084
|
-
),
|
|
1067
|
+
), gr = r(
|
|
1085
1068
|
(e) => {
|
|
1086
|
-
const t =
|
|
1087
|
-
!t || t.pointerId !== e.pointerId || (e.preventDefault(), e.stopPropagation(),
|
|
1088
|
-
|
|
1069
|
+
const t = Ae.current;
|
|
1070
|
+
!t || t.pointerId !== e.pointerId || (e.preventDefault(), e.stopPropagation(), mt(
|
|
1071
|
+
gn(
|
|
1089
1072
|
{
|
|
1090
1073
|
x: t.startOffset.x + e.clientX - t.startClientX,
|
|
1091
1074
|
y: t.startOffset.y + e.clientY - t.startClientY
|
|
@@ -1095,37 +1078,37 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
1095
1078
|
));
|
|
1096
1079
|
},
|
|
1097
1080
|
[]
|
|
1098
|
-
),
|
|
1081
|
+
), pn = r(
|
|
1099
1082
|
(e) => {
|
|
1100
|
-
const t =
|
|
1101
|
-
!t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId),
|
|
1083
|
+
const t = Ae.current;
|
|
1084
|
+
!t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), Ae.current = null, yt(!1));
|
|
1102
1085
|
},
|
|
1103
1086
|
[]
|
|
1104
|
-
),
|
|
1087
|
+
), vr = r(
|
|
1105
1088
|
(e) => {
|
|
1106
|
-
q(),
|
|
1089
|
+
q(), Mt?.(e);
|
|
1107
1090
|
},
|
|
1108
|
-
[q,
|
|
1109
|
-
),
|
|
1091
|
+
[q, Mt]
|
|
1092
|
+
), Sr = r(
|
|
1110
1093
|
(e) => {
|
|
1111
|
-
q(),
|
|
1094
|
+
q(), kt?.(e);
|
|
1112
1095
|
},
|
|
1113
|
-
[q,
|
|
1114
|
-
),
|
|
1096
|
+
[q, kt]
|
|
1097
|
+
), Ir = r(() => {
|
|
1115
1098
|
ie(!0), v(!0);
|
|
1116
1099
|
}, [v]);
|
|
1117
1100
|
return c(() => {
|
|
1118
|
-
const e =
|
|
1119
|
-
(
|
|
1101
|
+
const e = Bt.current, i = (e.length > 0 && e.length < oe.length && e.every((n, E) => n === oe[E]) ? P.slice(e.length) : []).some(
|
|
1102
|
+
(n) => n.is_new === !1
|
|
1120
1103
|
);
|
|
1121
|
-
if (
|
|
1104
|
+
if (Bt.current = oe, !i)
|
|
1122
1105
|
return;
|
|
1123
1106
|
const l = window.requestAnimationFrame(() => {
|
|
1124
|
-
const
|
|
1125
|
-
if (!
|
|
1107
|
+
const n = qe.current, E = Ft.current;
|
|
1108
|
+
if (!n || !E)
|
|
1126
1109
|
return;
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1110
|
+
const D = n.getBoundingClientRect(), et = E.getBoundingClientRect(), Ne = n.scrollTop + (et.top - D.top);
|
|
1111
|
+
n.scrollTo({
|
|
1129
1112
|
top: Math.max(Ne, 0),
|
|
1130
1113
|
behavior: "smooth"
|
|
1131
1114
|
});
|
|
@@ -1133,59 +1116,59 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
1133
1116
|
return () => {
|
|
1134
1117
|
window.cancelAnimationFrame(l);
|
|
1135
1118
|
};
|
|
1136
|
-
}, [
|
|
1137
|
-
if (!
|
|
1119
|
+
}, [P, oe]), c(() => {
|
|
1120
|
+
if (!we.current || (we.current = !1, P.length === 0))
|
|
1138
1121
|
return;
|
|
1139
1122
|
const e = window.requestAnimationFrame(() => {
|
|
1140
|
-
|
|
1123
|
+
mn();
|
|
1141
1124
|
});
|
|
1142
1125
|
return () => {
|
|
1143
1126
|
window.cancelAnimationFrame(e);
|
|
1144
1127
|
};
|
|
1145
|
-
}, [
|
|
1128
|
+
}, [P, mn]), /* @__PURE__ */ s.jsxs(
|
|
1146
1129
|
"section",
|
|
1147
1130
|
{
|
|
1148
|
-
ref:
|
|
1149
|
-
className:
|
|
1131
|
+
ref: ve,
|
|
1132
|
+
className: ye(
|
|
1150
1133
|
"relative h-full w-full",
|
|
1151
|
-
|
|
1152
|
-
|
|
1134
|
+
L && "slide--mobile-device",
|
|
1135
|
+
Xt && "slide--browser-fullscreen",
|
|
1153
1136
|
ce && "slide--mobile-landscape",
|
|
1154
|
-
|
|
1155
|
-
|
|
1137
|
+
Wt && "slide--mobile-landscape-native",
|
|
1138
|
+
wn
|
|
1156
1139
|
),
|
|
1157
|
-
onClick:
|
|
1158
|
-
onFocusCapture:
|
|
1159
|
-
onPointerDown:
|
|
1160
|
-
...
|
|
1140
|
+
onClick: Ir,
|
|
1141
|
+
onFocusCapture: Sr,
|
|
1142
|
+
onPointerDown: vr,
|
|
1143
|
+
...Tn,
|
|
1161
1144
|
children: [
|
|
1162
|
-
|
|
1145
|
+
Hn ? /* @__PURE__ */ s.jsx(
|
|
1163
1146
|
"div",
|
|
1164
1147
|
{
|
|
1165
1148
|
"aria-hidden": "true",
|
|
1166
1149
|
className: "pointer-events-none fixed left-0 top-0 z-[9999] h-[100vh] max-h-[100vh] w-[100vw]"
|
|
1167
1150
|
}
|
|
1168
1151
|
) : null,
|
|
1169
|
-
/* @__PURE__ */
|
|
1152
|
+
/* @__PURE__ */ s.jsxs(
|
|
1170
1153
|
"div",
|
|
1171
1154
|
{
|
|
1172
|
-
ref:
|
|
1173
|
-
className:
|
|
1155
|
+
ref: it,
|
|
1156
|
+
className: ye(
|
|
1174
1157
|
"slide__viewport relative h-full min-h-0 w-full",
|
|
1175
1158
|
ce && "slide__viewport--mobile-landscape",
|
|
1176
|
-
ce && !
|
|
1159
|
+
ce && !jn && "slide__viewport--mobile-landscape-native"
|
|
1177
1160
|
),
|
|
1178
1161
|
children: [
|
|
1179
|
-
|
|
1180
|
-
/* @__PURE__ */
|
|
1162
|
+
Kn ? /* @__PURE__ */ s.jsxs("div", { className: "slide-landscape-header", children: [
|
|
1163
|
+
/* @__PURE__ */ s.jsx(
|
|
1181
1164
|
"button",
|
|
1182
1165
|
{
|
|
1183
1166
|
"aria-label": G?.backAriaLabel ?? $.fullscreenBackAriaLabel,
|
|
1184
1167
|
className: "slide-landscape-header__back",
|
|
1185
|
-
onClick:
|
|
1168
|
+
onClick: Gn,
|
|
1186
1169
|
type: "button",
|
|
1187
|
-
children: /* @__PURE__ */
|
|
1188
|
-
|
|
1170
|
+
children: /* @__PURE__ */ s.jsx(
|
|
1171
|
+
no,
|
|
1189
1172
|
{
|
|
1190
1173
|
className: "slide-landscape-header__icon h-6 w-6",
|
|
1191
1174
|
strokeWidth: 2.25
|
|
@@ -1193,27 +1176,27 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
1193
1176
|
)
|
|
1194
1177
|
}
|
|
1195
1178
|
),
|
|
1196
|
-
G?.content ? /* @__PURE__ */
|
|
1179
|
+
G?.content ? /* @__PURE__ */ s.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: G.content }) : null
|
|
1197
1180
|
] }) : null,
|
|
1198
|
-
/* @__PURE__ */
|
|
1181
|
+
/* @__PURE__ */ s.jsx(
|
|
1199
1182
|
"div",
|
|
1200
1183
|
{
|
|
1201
|
-
className:
|
|
1184
|
+
className: ye(
|
|
1202
1185
|
"h-full min-h-0 w-full",
|
|
1203
|
-
|
|
1204
|
-
|
|
1186
|
+
Un && "slide__viewport-content--with-header",
|
|
1187
|
+
Rn ? "slide-content--single" : "grid gap-4"
|
|
1205
1188
|
),
|
|
1206
|
-
children:
|
|
1189
|
+
children: P.length > 0 ? /* @__PURE__ */ s.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ s.jsx("div", { ref: qe, className: "slide-stage__layer w-full", children: $n.map(
|
|
1207
1190
|
(e, t) => {
|
|
1208
|
-
const o = t ===
|
|
1209
|
-
return /* @__PURE__ */
|
|
1191
|
+
const o = t === zn;
|
|
1192
|
+
return /* @__PURE__ */ s.jsx(
|
|
1210
1193
|
"div",
|
|
1211
1194
|
{
|
|
1212
1195
|
"data-active-step": o ? "true" : void 0,
|
|
1213
1196
|
"aria-hidden": !o || void 0,
|
|
1214
1197
|
className: "w-full h-full",
|
|
1215
1198
|
style: { display: o ? void 0 : "none" },
|
|
1216
|
-
children:
|
|
1199
|
+
children: lr(
|
|
1217
1200
|
e.elementList,
|
|
1218
1201
|
o
|
|
1219
1202
|
)
|
|
@@ -1224,129 +1207,124 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
1224
1207
|
) }) }) : null
|
|
1225
1208
|
}
|
|
1226
1209
|
),
|
|
1227
|
-
|
|
1228
|
-
|
|
1210
|
+
kn ? /* @__PURE__ */ s.jsx(
|
|
1211
|
+
Tr,
|
|
1229
1212
|
{
|
|
1230
|
-
message:
|
|
1231
|
-
|
|
1232
|
-
|
|
1213
|
+
message: co(
|
|
1214
|
+
En,
|
|
1215
|
+
Fn
|
|
1233
1216
|
),
|
|
1234
1217
|
className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
|
|
1235
1218
|
}
|
|
1236
1219
|
) : null,
|
|
1237
|
-
/* @__PURE__ */
|
|
1238
|
-
|
|
1220
|
+
/* @__PURE__ */ s.jsx(
|
|
1221
|
+
Or,
|
|
1239
1222
|
{
|
|
1240
|
-
extraBottomOffset:
|
|
1223
|
+
extraBottomOffset: Dn,
|
|
1241
1224
|
hasPlayerGap: w,
|
|
1242
|
-
isEnabled:
|
|
1225
|
+
isEnabled: Yt && Bn,
|
|
1243
1226
|
isPlayerHidden: g && !w,
|
|
1244
1227
|
playbackTimeStore: se,
|
|
1245
|
-
subtitleCues:
|
|
1228
|
+
subtitleCues: Jn
|
|
1246
1229
|
}
|
|
1247
1230
|
),
|
|
1248
|
-
|
|
1231
|
+
Be ? /* @__PURE__ */ s.jsx(
|
|
1249
1232
|
"div",
|
|
1250
1233
|
{
|
|
1251
|
-
ref:
|
|
1234
|
+
ref: be,
|
|
1252
1235
|
"data-player-keyboard-shortcuts-ignore": "true",
|
|
1253
|
-
className:
|
|
1236
|
+
className: ye(
|
|
1254
1237
|
"slide-interaction-overlay",
|
|
1255
1238
|
w && g ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone",
|
|
1256
|
-
|
|
1257
|
-
gt && "slide-interaction-overlay--dragging"
|
|
1239
|
+
pt && "slide-interaction-overlay--dragging"
|
|
1258
1240
|
),
|
|
1259
|
-
onClick:
|
|
1260
|
-
onPointerDown: vr,
|
|
1241
|
+
onClick: wt,
|
|
1261
1242
|
onPointerDownCapture: (e) => {
|
|
1262
|
-
|
|
1243
|
+
Ct(e.target) && Je(!0);
|
|
1263
1244
|
},
|
|
1264
|
-
onPointerMove: hn,
|
|
1265
|
-
onPointerUp: tt,
|
|
1266
|
-
onPointerCancel: tt,
|
|
1267
1245
|
onFocusCapture: (e) => {
|
|
1268
|
-
|
|
1246
|
+
Ct(e.target) && Je(!0);
|
|
1269
1247
|
},
|
|
1270
1248
|
onInputCapture: (e) => {
|
|
1271
|
-
|
|
1249
|
+
Ct(e.target) && Je(!0);
|
|
1272
1250
|
},
|
|
1273
|
-
style:
|
|
1274
|
-
children: /* @__PURE__ */
|
|
1275
|
-
|
|
1251
|
+
style: Wn,
|
|
1252
|
+
children: /* @__PURE__ */ s.jsx(
|
|
1253
|
+
bn,
|
|
1276
1254
|
{
|
|
1277
1255
|
content: String(y?.content ?? ""),
|
|
1278
1256
|
locale: h,
|
|
1279
|
-
defaultButtonText:
|
|
1280
|
-
defaultInputText:
|
|
1281
|
-
defaultSelectedValues:
|
|
1257
|
+
defaultButtonText: un.buttonText ?? "",
|
|
1258
|
+
defaultInputText: un.inputText ?? "",
|
|
1259
|
+
defaultSelectedValues: tr,
|
|
1282
1260
|
confirmButtonText: te?.confirmButtonText ?? $.interactionTexts.confirmButtonText,
|
|
1283
1261
|
copyButtonText: te?.copyButtonText ?? $.interactionTexts.copyButtonText,
|
|
1284
1262
|
copiedButtonText: te?.copiedButtonText ?? $.interactionTexts.copiedButtonText,
|
|
1285
|
-
onSend:
|
|
1286
|
-
onDragHandlePointerCancel:
|
|
1287
|
-
onDragHandlePointerDown:
|
|
1288
|
-
onDragHandlePointerMove:
|
|
1289
|
-
onDragHandlePointerUp:
|
|
1290
|
-
readonly:
|
|
1291
|
-
title: te?.title ??
|
|
1263
|
+
onSend: or,
|
|
1264
|
+
onDragHandlePointerCancel: pn,
|
|
1265
|
+
onDragHandlePointerDown: hr,
|
|
1266
|
+
onDragHandlePointerMove: gr,
|
|
1267
|
+
onDragHandlePointerUp: pn,
|
|
1268
|
+
readonly: rr,
|
|
1269
|
+
title: te?.title ?? nt ?? $.interactionTexts.title
|
|
1292
1270
|
}
|
|
1293
1271
|
)
|
|
1294
1272
|
}
|
|
1295
1273
|
) : null,
|
|
1296
|
-
g ? /* @__PURE__ */
|
|
1297
|
-
|
|
1274
|
+
g ? /* @__PURE__ */ s.jsx(
|
|
1275
|
+
Fr.Provider,
|
|
1298
1276
|
{
|
|
1299
|
-
value:
|
|
1300
|
-
children: /* @__PURE__ */
|
|
1301
|
-
|
|
1277
|
+
value: _n,
|
|
1278
|
+
children: /* @__PURE__ */ s.jsx(
|
|
1279
|
+
Rr,
|
|
1302
1280
|
{
|
|
1303
1281
|
audioList: S,
|
|
1304
|
-
className:
|
|
1282
|
+
className: ye(
|
|
1305
1283
|
"absolute left-1/2 z-[2] -translate-x-1/2",
|
|
1306
|
-
|
|
1284
|
+
Xt ? "bottom-3" : "-bottom-3",
|
|
1307
1285
|
Y,
|
|
1308
1286
|
!w && "pointer-events-none opacity-0"
|
|
1309
1287
|
),
|
|
1310
1288
|
currentAudioIndex: T,
|
|
1311
|
-
defaultPlaying:
|
|
1289
|
+
defaultPlaying: st,
|
|
1312
1290
|
enableKeyboardShortcuts: ne,
|
|
1313
1291
|
isPlaybackPaused: W,
|
|
1314
|
-
isAutoAdvanceEnabled:
|
|
1292
|
+
isAutoAdvanceEnabled: Pe,
|
|
1315
1293
|
locale: h,
|
|
1316
1294
|
hasInteraction: !!y,
|
|
1317
1295
|
isInteractionOpen: le,
|
|
1318
|
-
isSubtitleEnabled:
|
|
1319
|
-
onAutoAdvanceToggle:
|
|
1320
|
-
onLoadingChange:
|
|
1296
|
+
isSubtitleEnabled: Yt,
|
|
1297
|
+
onAutoAdvanceToggle: Ut,
|
|
1298
|
+
onLoadingChange: dr,
|
|
1321
1299
|
onPlaybackStarted: () => {
|
|
1322
|
-
|
|
1300
|
+
$e(!0);
|
|
1323
1301
|
},
|
|
1324
|
-
onPlaybackPreferenceChange:
|
|
1302
|
+
onPlaybackPreferenceChange: er,
|
|
1325
1303
|
onPlaybackTimeChange: se.setTime,
|
|
1326
1304
|
onSubtitleToggle: () => {
|
|
1327
|
-
|
|
1305
|
+
Nn((e) => !e);
|
|
1328
1306
|
},
|
|
1329
1307
|
nextDisabled: !R,
|
|
1330
|
-
onEnded:
|
|
1331
|
-
onFullscreen:
|
|
1332
|
-
isFullscreen:
|
|
1308
|
+
onEnded: fr,
|
|
1309
|
+
onFullscreen: sr,
|
|
1310
|
+
isFullscreen: $t,
|
|
1333
1311
|
mobileViewMode: ae,
|
|
1334
|
-
settingsPortalContainer:
|
|
1335
|
-
onMobileViewModeChange:
|
|
1336
|
-
onControlsPointerEnter:
|
|
1337
|
-
onControlsPointerLeave:
|
|
1338
|
-
onInteractionToggle:
|
|
1339
|
-
onNext:
|
|
1340
|
-
onPrev:
|
|
1341
|
-
onSubtitleJump:
|
|
1342
|
-
canJumpToSubtitleTarget:
|
|
1343
|
-
prevDisabled: !
|
|
1312
|
+
settingsPortalContainer: it.current,
|
|
1313
|
+
onMobileViewModeChange: Yn,
|
|
1314
|
+
onControlsPointerEnter: pr,
|
|
1315
|
+
onControlsPointerLeave: yr,
|
|
1316
|
+
onInteractionToggle: mr,
|
|
1317
|
+
onNext: ur,
|
|
1318
|
+
onPrev: cr,
|
|
1319
|
+
onSubtitleJump: ar,
|
|
1320
|
+
canJumpToSubtitleTarget: At,
|
|
1321
|
+
prevDisabled: !Pn,
|
|
1344
1322
|
showControls: w,
|
|
1345
|
-
subtitleSeekRequest:
|
|
1346
|
-
texts:
|
|
1347
|
-
customActionContext:
|
|
1323
|
+
subtitleSeekRequest: Mn,
|
|
1324
|
+
texts: rt,
|
|
1325
|
+
customActionContext: St,
|
|
1348
1326
|
customActions: Z,
|
|
1349
|
-
useAutoAdvanceToggle:
|
|
1327
|
+
useAutoAdvanceToggle: Oe
|
|
1350
1328
|
}
|
|
1351
1329
|
)
|
|
1352
1330
|
}
|
|
@@ -1359,6 +1337,6 @@ const po = (m, h) => m.length === h.length && m.every((H, ge) => {
|
|
|
1359
1337
|
);
|
|
1360
1338
|
};
|
|
1361
1339
|
export {
|
|
1362
|
-
|
|
1340
|
+
Xo as default
|
|
1363
1341
|
};
|
|
1364
1342
|
//# sourceMappingURL=Slide.es.js.map
|