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