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