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