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