markdown-flow-ui 0.1.114 → 0.1.115

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