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