markdown-flow-ui 0.1.115-beta.0 → 0.1.115-beta.2

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