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