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