markdown-flow-ui 0.1.112 → 0.1.113

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