markdown-flow-ui 0.2.22 → 0.2.23

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 (33) hide show
  1. package/dist/assets/markdown-flow-ui.css +1 -1
  2. package/dist/components/Slide/Player.cjs +1 -1
  3. package/dist/components/Slide/Player.cjs.map +1 -1
  4. package/dist/components/Slide/Player.d.ts +3 -1
  5. package/dist/components/Slide/Player.es.js +457 -488
  6. package/dist/components/Slide/Player.es.js.map +1 -1
  7. package/dist/components/Slide/Slide.cjs +1 -1
  8. package/dist/components/Slide/Slide.cjs.map +1 -1
  9. package/dist/components/Slide/Slide.es.js +589 -580
  10. package/dist/components/Slide/Slide.es.js.map +1 -1
  11. package/dist/components/Slide/slideI18n.cjs.map +1 -1
  12. package/dist/components/Slide/slideI18n.d.ts +1 -0
  13. package/dist/components/Slide/slideI18n.es.js.map +1 -1
  14. package/dist/components/Slide/utils/interactionPlayback.cjs +1 -1
  15. package/dist/components/Slide/utils/interactionPlayback.cjs.map +1 -1
  16. package/dist/components/Slide/utils/interactionPlayback.d.ts +2 -1
  17. package/dist/components/Slide/utils/interactionPlayback.es.js +8 -7
  18. package/dist/components/Slide/utils/interactionPlayback.es.js.map +1 -1
  19. package/dist/components/Slide/utils/playerCustomActions.cjs +1 -1
  20. package/dist/components/Slide/utils/playerCustomActions.cjs.map +1 -1
  21. package/dist/components/Slide/utils/playerCustomActions.d.ts +1 -1
  22. package/dist/components/Slide/utils/playerCustomActions.es.js +18 -14
  23. package/dist/components/Slide/utils/playerCustomActions.es.js.map +1 -1
  24. package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs +1 -1
  25. package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.map +1 -1
  26. package/dist/components/Slide/utils/playerKeyboardShortcuts.d.ts +1 -1
  27. package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js +0 -2
  28. package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js.map +1 -1
  29. package/package.json +1 -1
  30. package/dist/node_modules/lucide-react/dist/esm/icons/file-pen-line.cjs +0 -7
  31. package/dist/node_modules/lucide-react/dist/esm/icons/file-pen-line.cjs.map +0 -1
  32. package/dist/node_modules/lucide-react/dist/esm/icons/file-pen-line.es.js +0 -29
  33. package/dist/node_modules/lucide-react/dist/esm/icons/file-pen-line.es.js.map +0 -1
@@ -1,60 +1,60 @@
1
- import { jsxs as Ue, jsx as u, Fragment as Fr } from "react/jsx-runtime";
2
- import { memo as Lr, useMemo as f, useId as Dr, useRef as m, useCallback as r, useState as p, useEffect as s, useLayoutEffect as Nr } from "react";
3
- import { isSandboxInteractionMessage as Br } from "../../lib/sandboxInteraction.es.js";
1
+ import { jsxs as Ue, jsx as u, Fragment as Dr } from "react/jsx-runtime";
2
+ import { memo as Nr, useMemo as f, useId as Br, useRef as m, useCallback as r, useState as p, useEffect as a, useLayoutEffect as Vr } from "react";
3
+ import { isSandboxInteractionMessage as qr } from "../../lib/sandboxInteraction.es.js";
4
4
  import { cn as Ie } from "../../lib/utils.es.js";
5
- import { useResolvedDirection as Vr } from "../../lib/useResolvedDirection.es.js";
6
- import { getMarkdownFlowDirection as qr, getMarkdownFlowLanguage as Kr } from "../../lib/locale.es.js";
7
- import Ur from "../ui/loading-overlay-card.es.js";
8
- import Hr from "../ContentRender/ContentRender.es.js";
9
- import En from "../ContentRender/IframeSandbox.es.js";
5
+ import { useResolvedDirection as Kr } from "../../lib/useResolvedDirection.es.js";
6
+ import { getMarkdownFlowDirection as Ur, getMarkdownFlowLanguage as Hr } from "../../lib/locale.es.js";
7
+ import Yr from "../ui/loading-overlay-card.es.js";
8
+ import Gr from "../ContentRender/ContentRender.es.js";
9
+ import Pn from "../ContentRender/IframeSandbox.es.js";
10
10
  import "../ui/inputGroup/input-group.es.js";
11
- import { isMobileDevice as Yr, isLandscapeViewport as Tn, subscribeMobileDeviceChange as Gr } from "../../lib/mobileDevice.es.js";
12
- import $r from "./Player.es.js";
13
- import zr from "./MarkdownSlideScaling.es.js";
14
- import Xr from "./SubtitleOverlay.es.js";
15
- import Jr from "./useSlide.es.js";
16
- import Wr from "./useWakePlayerFromIframe.es.js";
17
- import { PlayerKeyboardShortcutContext as jr } from "./utils/playerKeyboardShortcutContext.es.js";
18
- import { activatePlayerKeyboardShortcutOwner as Qr } from "./utils/playerKeyboardShortcuts.es.js";
19
- import { DEFAULT_MOBILE_VIEW_MODE as dt, resolveMobileViewModeState as Zr } from "./utils/mobileScreenMode.es.js";
20
- import { shouldRenderInteractionOverlay as eo, clampInteractionOverlayDragOffset as Cn, shouldPresentInteractionOverlay as to } from "./utils/interactionPlayback.es.js";
21
- import { resolveMarkdownScalingMode as no } from "./utils/markdownScaling.es.js";
22
- import { shouldWakePlayerControlsAfterNavigation as Lt } from "./utils/playerNavigationContext.es.js";
23
- import { shouldAutoAdvanceIntoAppendedMarker as ro } from "./utils/appendedMarkerAdvance.es.js";
24
- import { resolvePendingStepAudioKey as oo, hasUnplayedStepAudio as io } from "./utils/stepAudioProgress.es.js";
25
- import { getPlaybackSequenceTransition as lo, shouldStartDefaultAudioSequence as ao } from "./utils/playbackSequence.es.js";
26
- import { hasResolvedInteractionElement as so, canReachSubtitleJumpTarget as Pn } from "./utils/subtitleJumpNavigation.es.js";
27
- import { resolvePlayerCustomActionElement as co, getPlayerCustomActionCount as uo } from "./utils/playerCustomActions.es.js";
28
- import { createPlaybackTimeStore as fo } from "./utils/playbackTimeStore.es.js";
29
- import { resolveSlideInteractionState as mo } from "./utils/interactionResolution.es.js";
30
- import { shouldUseAutoAdvanceToggle as po } from "./utils/playerToggleMode.es.js";
31
- import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as yo, areImageOnlyStepIframeVisualsReady as ho } from "./utils/imageOnlyStepVisualReady.es.js";
32
- import { resolveSilentStepAutoAdvanceBehavior as go } from "./utils/silentStepAutoAdvance.es.js";
33
- import { resolveSlidePlayerVisibility as vo, resolveSlidePlayerLayoutState as So } from "./utils/playerVisibility.es.js";
34
- import { getSlideLocaleTexts as Io, DEFAULT_SLIDE_BUFFERING_TEXTS as bo } from "./slideI18n.es.js";
11
+ import { isMobileDevice as $r, isLandscapeViewport as Rn, subscribeMobileDeviceChange as zr } from "../../lib/mobileDevice.es.js";
12
+ import Xr from "./Player.es.js";
13
+ import Jr from "./MarkdownSlideScaling.es.js";
14
+ import Wr from "./SubtitleOverlay.es.js";
15
+ import jr from "./useSlide.es.js";
16
+ import Qr from "./useWakePlayerFromIframe.es.js";
17
+ import { PlayerKeyboardShortcutContext as Zr } from "./utils/playerKeyboardShortcutContext.es.js";
18
+ import { activatePlayerKeyboardShortcutOwner as eo } from "./utils/playerKeyboardShortcuts.es.js";
19
+ import { DEFAULT_MOBILE_VIEW_MODE as pt, resolveMobileViewModeState as to } from "./utils/mobileScreenMode.es.js";
20
+ import { shouldRenderInteractionOverlay as no, clampInteractionOverlayDragOffset as _n, shouldPresentInteractionOverlay as ro } from "./utils/interactionPlayback.es.js";
21
+ import { resolveMarkdownScalingMode as oo } from "./utils/markdownScaling.es.js";
22
+ import { shouldWakePlayerControlsAfterNavigation as Vt } from "./utils/playerNavigationContext.es.js";
23
+ import { shouldAutoAdvanceIntoAppendedMarker as io } from "./utils/appendedMarkerAdvance.es.js";
24
+ import { resolvePendingStepAudioKey as lo, hasUnplayedStepAudio as ao } from "./utils/stepAudioProgress.es.js";
25
+ import { getPlaybackSequenceTransition as so, shouldStartDefaultAudioSequence as co } from "./utils/playbackSequence.es.js";
26
+ import { hasResolvedInteractionElement as uo, canReachSubtitleJumpTarget as On } from "./utils/subtitleJumpNavigation.es.js";
27
+ import { resolvePlayerCustomActionElement as fo, getPlayerCustomActionCount as mo } from "./utils/playerCustomActions.es.js";
28
+ import { createPlaybackTimeStore as po } from "./utils/playbackTimeStore.es.js";
29
+ import { resolveSlideInteractionState as yo } from "./utils/interactionResolution.es.js";
30
+ import { shouldUseAutoAdvanceToggle as ho } from "./utils/playerToggleMode.es.js";
31
+ import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as go, areImageOnlyStepIframeVisualsReady as vo } from "./utils/imageOnlyStepVisualReady.es.js";
32
+ import { resolveSilentStepAutoAdvanceBehavior as So } from "./utils/silentStepAutoAdvance.es.js";
33
+ import { resolveSlidePlayerVisibility as Io, resolveSlidePlayerLayoutState as bo } from "./utils/playerVisibility.es.js";
34
+ import { getSlideLocaleTexts as Ao, DEFAULT_SLIDE_BUFFERING_TEXTS as wo } from "./slideI18n.es.js";
35
35
  /* empty css */
36
- import Dt from "../../node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js";
37
- import Ao from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
38
- const wo = 2e3, xo = 300, Eo = 160, To = 16, Rn = 3e3, ft = {
36
+ import qt from "../../node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js";
37
+ import xo from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
38
+ const Eo = 2e3, Co = 300, To = 160, Po = 16, Mn = 3e3, yt = {
39
39
  x: 0,
40
40
  y: 0
41
- }, Bt = 0.5, Co = typeof window > "u" ? s : Nr, Po = [
41
+ }, Ut = 0.5, Ro = typeof window > "u" ? a : Vr, _o = [
42
42
  "button",
43
43
  "input",
44
44
  "textarea",
45
45
  '[contenteditable=""]',
46
46
  '[contenteditable="true"]',
47
47
  '[contenteditable="plaintext-only"]'
48
- ].join(", "), Vt = "waitingForAudio", Ro = ({
48
+ ].join(", "), Ht = "waitingForAudio", Oo = ({
49
49
  x: c,
50
50
  y: d
51
51
  }) => ({
52
52
  x: Number(c.toFixed(2)),
53
53
  y: Number(d.toFixed(2))
54
- }), _n = (c) => Math.abs(c) >= Bt, On = (c, d) => Math.abs(c.x - d.x) < Bt && Math.abs(c.y - d.y) < Bt, _o = (c, d) => typeof c == "string" ? c : c[d] ?? c[Vt] ?? bo[d], Oo = (c, d) => typeof c == "string" ? c : {
54
+ }), kn = (c) => Math.abs(c) >= Ut, Fn = (c, d) => Math.abs(c.x - d.x) < Ut && Math.abs(c.y - d.y) < Ut, Mo = (c, d) => typeof c == "string" ? c : c[d] ?? c[Ht] ?? wo[d], ko = (c, d) => typeof c == "string" ? c : {
55
55
  ...d,
56
56
  ...c
57
- }, Mo = (c, d) => d ? c !== "loadingAudio" : !1, Mn = Lr(
57
+ }, Fo = (c, d) => d ? c !== "loadingAudio" : !1, Ln = Nr(
58
58
  ({
59
59
  content: c,
60
60
  title: d,
@@ -62,17 +62,17 @@ const wo = 2e3, xo = 300, Eo = 160, To = 16, Rn = 3e3, ft = {
62
62
  locale: be,
63
63
  dir: G,
64
64
  lang: $,
65
- defaultButtonText: oe,
65
+ defaultButtonText: Ae,
66
66
  defaultInputText: ie,
67
67
  defaultSelectedValues: He,
68
- confirmButtonText: mt,
68
+ confirmButtonText: ht,
69
69
  copyButtonText: z,
70
- copiedButtonText: pt,
71
- onSend: Ae,
70
+ copiedButtonText: gt,
71
+ onSend: we,
72
72
  onDragHandlePointerCancel: Ye,
73
73
  onDragHandlePointerDown: Ge,
74
74
  onDragHandlePointerMove: $e,
75
- onDragHandlePointerUp: we,
75
+ onDragHandlePointerUp: xe,
76
76
  readonly: ze = !1
77
77
  }) => /* @__PURE__ */ Ue("div", { className: "slide-player__interaction-card", children: [
78
78
  /* @__PURE__ */ u(
@@ -84,177 +84,186 @@ const wo = 2e3, xo = 300, Eo = 160, To = 16, Rn = 3e3, ft = {
84
84
  onPointerCancel: Ye,
85
85
  onPointerDown: Ge,
86
86
  onPointerMove: $e,
87
- onPointerUp: we,
87
+ onPointerUp: xe,
88
88
  children: /* @__PURE__ */ Ue("span", { className: "slide-player__interaction-drag-handle-icon", children: [
89
- /* @__PURE__ */ u(Dt, { "aria-hidden": "true" }),
90
- /* @__PURE__ */ u(Dt, { "aria-hidden": "true" }),
91
- /* @__PURE__ */ u(Dt, { "aria-hidden": "true" })
89
+ /* @__PURE__ */ u(qt, { "aria-hidden": "true" }),
90
+ /* @__PURE__ */ u(qt, { "aria-hidden": "true" }),
91
+ /* @__PURE__ */ u(qt, { "aria-hidden": "true" })
92
92
  ] })
93
93
  }
94
94
  ),
95
95
  /* @__PURE__ */ u("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ u("p", { className: "slide-player__interaction-title", children: d }) }),
96
96
  /* @__PURE__ */ u("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ u(
97
- Hr,
97
+ Gr,
98
98
  {
99
99
  content: c,
100
100
  locale: be,
101
101
  dir: G,
102
102
  lang: $,
103
- defaultButtonText: oe,
103
+ defaultButtonText: Ae,
104
104
  defaultInputText: ie,
105
105
  defaultSelectedValues: He,
106
- confirmButtonText: mt,
106
+ confirmButtonText: ht,
107
107
  copyButtonText: z,
108
- copiedButtonText: pt,
109
- onSend: Ae,
108
+ copiedButtonText: gt,
109
+ onSend: we,
110
110
  readonly: ze,
111
111
  sandboxMode: "content"
112
112
  }
113
113
  ) })
114
114
  ] })
115
115
  );
116
- Mn.displayName = "InteractionOverlayCard";
117
- const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
116
+ Ln.displayName = "InteractionOverlayCard";
117
+ const Lo = (c, d) => c.length === d.length && c.every((Y, be) => {
118
118
  const G = d[be];
119
119
  return Y.sequence_number === G?.sequence_number && Y.type === G?.type && Y.content === G?.content;
120
- }), Nt = (c) => c instanceof HTMLElement && !!c.closest(Po), Si = ({
120
+ }), Kt = (c) => c instanceof HTMLElement && !!c.closest(_o), bi = ({
121
121
  elementList: c = [],
122
122
  locale: d,
123
123
  playerEnabled: Y,
124
124
  playerControlsVisibility: be,
125
125
  playerClassName: G,
126
126
  fullscreenHeader: $,
127
- playerCustomActions: oe,
127
+ playerCustomActions: Ae,
128
128
  playerCustomActionPauseOnActive: ie = !0,
129
129
  bufferingText: He,
130
- interactionTitle: mt,
130
+ interactionTitle: ht,
131
131
  interactionTexts: z,
132
- playerTexts: pt,
133
- playerAutoHideDelay: Ae = 3e3,
134
- markerAutoAdvanceDelay: Ye = wo,
132
+ playerTexts: gt,
133
+ playerAutoHideDelay: we = 3e3,
134
+ markerAutoAdvanceDelay: Ye = Eo,
135
135
  interactionDefaultValueOptions: Ge,
136
136
  onSend: $e,
137
- onPlayerVisibilityChange: we,
137
+ onPlayerVisibilityChange: xe,
138
138
  onMobileViewModeChange: ze,
139
- onStepChange: qt,
139
+ onStepChange: Yt,
140
140
  enableKeyboardShortcuts: le = !0,
141
- enableIframeScaling: kn = !0,
142
- enableMarkdownScaling: Fn = !0,
143
- disableLoadingOverlay: M = !1,
144
- className: Ln,
145
- dir: Dn,
146
- lang: Nn,
147
- onPointerDown: Kt,
148
- onFocusCapture: Ut,
149
- ...Bn
141
+ enableIframeScaling: Dn = !0,
142
+ enableMarkdownScaling: Nn = !0,
143
+ disableLoadingOverlay: F = !1,
144
+ className: Bn,
145
+ dir: Vn,
146
+ lang: qn,
147
+ onPointerDown: Gt,
148
+ onFocusCapture: $t,
149
+ ...Kn
150
150
  }) => {
151
- const X = Dn ?? qr(d), xe = Nn ?? Kr(d), q = f(() => Io(d), [d]), Vn = f(
152
- () => Oo(
151
+ const X = Vn ?? Ur(d), Ee = qn ?? Hr(d), q = f(() => Ao(d), [d]), Un = f(
152
+ () => ko(
153
153
  He,
154
154
  q.bufferingText
155
155
  ),
156
156
  [He, q.bufferingText]
157
157
  ), {
158
- playerEnabled: qn,
158
+ playerEnabled: Hn,
159
159
  playerControlsVisibility: J
160
- } = vo({
160
+ } = Io({
161
161
  playerEnabled: Y,
162
162
  playerControlsVisibility: be
163
- }), Xe = Dr(), ae = m(null), { resolvedDirection: Kn } = Vr(ae, X), yt = m(null), Je = m(null), Ht = m(null), se = m(null), We = m(!1), Ee = m(null), je = m(null), W = m(null), Te = m(null), Ce = m(null), ce = m(null), Pe = m(null), Yt = m([]), Re = m(!1), j = m(null), _e = m(null), Gt = m(0), $t = m(null), zt = m({
163
+ }), Xe = Br(), ae = m(null), { resolvedDirection: Yn } = Kr(ae, X), vt = m(null), Je = m(null), zt = m(null), se = m(null), We = m(!1), Ce = m(null), je = m(null), W = m(null), Te = m(null), Pe = m(null), ce = m(null), Re = m(null), Xt = m([]), _e = m(!1), j = m(null), Oe = m(null), Jt = m(0), Wt = m(null), jt = m({
164
164
  markerCount: 0,
165
165
  currentIndex: -1,
166
166
  canGoNext: !1
167
- }), ht = m(!1), {
167
+ }), St = m(!1), {
168
168
  currentElementList: P,
169
- stepElementLists: Xt,
170
- slideElementList: C,
171
- currentIndex: a,
172
- audioList: S,
169
+ stepElementLists: Qt,
170
+ slideElementList: T,
171
+ currentIndex: s,
172
+ audioList: v,
173
173
  audioSlideIndexes: Qe,
174
174
  currentAudioSequenceIndexes: Ze,
175
175
  currentStepHasSpeakableElement: b,
176
176
  currentInteractionElement: y,
177
- canGoPrev: Un,
177
+ canGoPrev: Gn,
178
178
  canGoNext: R,
179
- handlePrev: Jt,
180
- handleNext: k,
181
- handleGoTo: Wt
182
- } = Jr(c), Oe = f(() => {
183
- if (!(a < 0))
184
- return C[a];
185
- }, [a, C]), ue = f(
179
+ handlePrev: Zt,
180
+ handleNext: L,
181
+ handleGoTo: en
182
+ } = jr(c), Me = f(() => {
183
+ if (!(s < 0))
184
+ return T[s];
185
+ }, [s, T]), ue = f(
186
186
  () => P.map(
187
187
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
188
188
  ),
189
189
  [P]
190
- ), Hn = C.filter(
190
+ ), $n = T.filter(
191
191
  (e) => e.is_renderable !== !1
192
- ).length === 1, A = qn && (C.length > 0 || S.length > 0 || !!y), Yn = f(
192
+ ).length === 1, A = Hn && (T.length > 0 || v.length > 0 || !!y), zn = f(
193
193
  () => ({
194
194
  enabled: le,
195
195
  ownerId: Xe
196
196
  }),
197
197
  [le, Xe]
198
198
  ), K = r(() => {
199
- !le || !A || Qr(Xe);
199
+ !le || !A || eo(Xe);
200
200
  }, [le, Xe, A]), _ = f(
201
- () => Ze.map((e) => S[e]?.audioKey).filter((e) => !!e),
202
- [S, Ze]
203
- ), [Gn, Me] = p(!0), [et, de] = p(!1), [gt, jt] = p(!0), [ke, Qt] = p(!0), [x, U] = p(null), [$n, Zt] = p(null), [zn, w] = p(!1), [Xn, vt] = p(Vt), [O, tt] = p(!1), nt = m(/* @__PURE__ */ new Set()), [Jn, rt] = p(!1), [en, Wn] = p(!0), [St, It] = p(!1), [h, bt] = p(), [fe, ot] = p(!1), [tn, it] = p(!1), [E, At] = p(
204
- ft
205
- ), [wt, xt] = p(!1), [
206
- jn,
207
- Fe
208
- ] = p(0), [nn, Qn] = p(!1), N = f(() => Yr(), []), [lt, Et] = p(
209
- dt
210
- ), [rn, Tt] = p(!1), [Zn, on] = p(
211
- () => N ? Tn() : !1
212
- ), me = f(() => fo(), []), {
201
+ () => Ze.map((e) => v[e]?.audioKey).filter((e) => !!e),
202
+ [v, Ze]
203
+ ), [Xn, ke] = p(!0), [et, de] = p(!1), [It, tn] = p(!0), [Fe, nn] = p(!0), [x, U] = p(null), [Jn, rn] = p(null), [Wn, w] = p(!1), [jn, bt] = p(Ht), [O, tt] = p(!1), nt = m(/* @__PURE__ */ new Set()), [Qn, rt] = p(!1), [on, Zn] = p(!0), [At, wt] = p(!1), [S, xt] = p(), [fe, ot] = p(!1), [ln, it] = p(!1), [E, Et] = p(
204
+ yt
205
+ ), [Ct, Tt] = p(!1), [
206
+ er,
207
+ me
208
+ ] = p(0), [an, tr] = p(!1), N = f(() => $r(), []), [lt, Pt] = p(
209
+ pt
210
+ ), [sn, Rt] = p(!1), [nr, cn] = p(
211
+ () => N ? Rn() : !1
212
+ ), pe = f(() => po(), []), {
213
213
  effectiveMobileViewMode: Q,
214
- isImmersiveMobileFullscreen: pe,
215
- isNativeMobileFullscreen: ln,
216
- shouldRotateFullscreenViewport: er
214
+ isImmersiveMobileFullscreen: ye,
215
+ isNativeMobileFullscreen: un,
216
+ shouldRotateFullscreenViewport: rr
217
217
  } = f(
218
- () => Zr({
219
- hasManualMobileViewMode: rn,
218
+ () => to({
219
+ hasManualMobileViewMode: sn,
220
220
  isMobileDevice: N,
221
221
  mobileViewMode: lt
222
222
  }),
223
223
  [
224
- rn,
224
+ sn,
225
225
  N,
226
- Zn,
226
+ nr,
227
227
  lt
228
228
  ]
229
- ), an = m(Q), {
229
+ ), dn = m(Q), {
230
230
  controlsVisible: B,
231
231
  layoutReserved: at
232
- } = So({
233
- isAutoVisible: Gn,
232
+ } = bo({
233
+ isAutoVisible: Xn,
234
234
  playerControlsVisibility: J,
235
235
  shouldMountPlayer: A
236
- }), tr = pe && B, nr = pe && at, rr = pe || ln, sn = nn && !N, or = r(
236
+ }), or = ye && B, ir = ye && at, lr = ye || un, fn = an && !N, ar = r(
237
237
  (e) => {
238
- Tt(!0), Et(e);
238
+ Rt(!0), Pt(e);
239
239
  },
240
240
  []
241
- ), cn = r(() => {
242
- Tt(!1), Et(dt);
243
- }, []), ir = r(() => {
244
- cn(), $?.onBack?.();
245
- }, [$, cn]), un = r((e) => {
246
- It(e);
247
- }, []), dn = r(() => {
248
- It((e) => !e);
249
- }, []), Z = r(() => {
250
- At(
251
- (e) => e.x === ft.x && e.y === ft.y ? e : ft
252
- ), xt(!1), Pe.current = null, ce.current = null;
253
- }, []), { mountedStepStates: lr, currentMountedStateIndex: ar } = f(() => {
241
+ ), mn = r(() => {
242
+ Rt(!1), Pt(pt);
243
+ }, []), sr = r(() => {
244
+ mn(), $?.onBack?.();
245
+ }, [$, mn]), M = r(() => {
246
+ W.current !== null && (window.clearTimeout(W.current), W.current = null);
247
+ }, []), k = r(() => {
248
+ Te.current !== null && (window.clearTimeout(Te.current), Te.current = null);
249
+ }, []), st = r(() => {
250
+ M(), k(), ot(!1), me(0);
251
+ }, [M, k]), ct = r(
252
+ (e) => {
253
+ e && st(), wt(e);
254
+ },
255
+ [st]
256
+ ), pn = r(() => {
257
+ st(), wt((e) => !e);
258
+ }, [st]), Z = r(() => {
259
+ Et(
260
+ (e) => e.x === yt.x && e.y === yt.y ? e : yt
261
+ ), Tt(!1), Re.current = null, ce.current = null;
262
+ }, []), { mountedStepStates: cr, currentMountedStateIndex: ur } = f(() => {
254
263
  const e = [], t = /* @__PURE__ */ new Map();
255
- return Xt.forEach((n, i) => {
264
+ return Qt.forEach((n, i) => {
256
265
  const l = e.findIndex(
257
- (o) => ko(
266
+ (o) => Lo(
258
267
  o.elementList,
259
268
  n
260
269
  )
@@ -269,53 +278,53 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
269
278
  }), t.set(i, e.length - 1);
270
279
  }), {
271
280
  mountedStepStates: e,
272
- currentMountedStateIndex: a >= 0 ? t.get(a) ?? -1 : -1
281
+ currentMountedStateIndex: s >= 0 ? t.get(s) ?? -1 : -1
273
282
  };
274
- }, [a, Xt]), fn = f(() => String(a), [a]), T = f(() => x ? S.findIndex(
283
+ }, [s, Qt]), yn = f(() => String(s), [s]), C = f(() => x ? v.findIndex(
275
284
  (e) => (e.audioKey ?? "") === x
276
- ) : -1, [S, x]), Ct = f(
277
- () => T >= 0 ? S[T] : void 0,
278
- [S, T]
279
- ), sr = Ct?.element?.subtitle_cues ?? [], st = f(
285
+ ) : -1, [v, x]), _t = f(
286
+ () => C >= 0 ? v[C] : void 0,
287
+ [v, C]
288
+ ), dr = _t?.element?.subtitle_cues ?? [], ut = f(
280
289
  () => _[0] ?? "none",
281
290
  [_]
282
- ), Pt = f(
291
+ ), Ot = f(
283
292
  () => ({
284
- currentElement: co({
285
- currentAudioIndex: T,
293
+ currentElement: fo({
294
+ currentAudioIndex: C,
286
295
  currentAudioSequenceIndexes: Ze,
287
- audioList: S,
288
- currentInteractionElement: h,
289
- currentStepElement: Oe
296
+ audioList: v,
297
+ currentInteractionElement: S,
298
+ currentStepElement: Me
290
299
  }),
291
- currentIndex: a,
292
- currentStepElement: Oe,
293
- isActive: St,
294
- setActive: un,
295
- toggleActive: dn
300
+ currentIndex: s,
301
+ currentStepElement: Me,
302
+ isActive: At,
303
+ setActive: ct,
304
+ toggleActive: pn
296
305
  }),
297
306
  [
298
- h,
299
307
  S,
300
- T,
308
+ v,
309
+ C,
301
310
  Ze,
302
- a,
303
- Oe,
304
- St,
305
- un,
306
- dn
311
+ s,
312
+ Me,
313
+ At,
314
+ ct,
315
+ pn
307
316
  ]
308
- ), Rt = f(
309
- () => uo(
310
- oe,
311
- Pt
317
+ ), dt = f(
318
+ () => mo(
319
+ Ae,
320
+ Ot
312
321
  ),
313
- [Pt, oe]
314
- ), cr = f(
322
+ [Ot, Ae]
323
+ ), Mt = dt > 0, kt = Mt && At, fr = f(
315
324
  () => ({
316
- "--slide-player-custom-action-count": String(Rt),
325
+ "--slide-player-custom-action-count": String(dt),
317
326
  "--slide-player-mobile-control-count": String(
318
- Rt + 4
327
+ dt + 4
319
328
  ),
320
329
  "--slide-interaction-drag-x": `${E.x}px`,
321
330
  "--slide-interaction-drag-y": `${E.y}px`
@@ -323,37 +332,37 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
323
332
  [
324
333
  E.x,
325
334
  E.y,
326
- Rt
335
+ dt
327
336
  ]
328
- ), mn = _.length > 0, pn = f(() => y ? `${y.sequence_number ?? "none"}:${String(
337
+ ), hn = _.length > 0, gn = f(() => y ? `${y.sequence_number ?? "none"}:${String(
329
338
  y.content ?? ""
330
339
  )}` : "none", [y]), Le = f(
331
- () => [fn, pn].join("|"),
332
- [pn, fn]
333
- ), ur = f(
340
+ () => [yn, gn].join("|"),
341
+ [gn, yn]
342
+ ), mr = f(
334
343
  () => [
335
344
  Le,
336
- Ct?.audioKey ?? "none",
337
- String(T)
345
+ _t?.audioKey ?? "none",
346
+ String(C)
338
347
  ].join("|"),
339
- [T, Ct?.audioKey, Le]
340
- ), yn = !!f(() => !st || st === "none" ? "" : S.find(
341
- (t) => t.audioKey === st
342
- )?.audioUrl?.trim() ?? "", [S, st]), ee = ie && !!oe && St, De = f(
343
- () => po({
348
+ [C, _t?.audioKey, Le]
349
+ ), vn = !!f(() => !ut || ut === "none" ? "" : v.find(
350
+ (t) => t.audioKey === ut
351
+ )?.audioUrl?.trim() ?? "", [v, ut]), ee = ie && kt, De = f(
352
+ () => ho({
344
353
  canGoNext: R,
345
- currentAudioIndex: T,
354
+ currentAudioIndex: C,
346
355
  currentStepHasSpeakableElement: b,
347
356
  hasInteraction: !!y
348
357
  }),
349
358
  [
350
359
  R,
351
- T,
360
+ C,
352
361
  y,
353
362
  b
354
363
  ]
355
- ), hn = f(
356
- () => go({
364
+ ), Sn = f(
365
+ () => So({
357
366
  currentElementList: P,
358
367
  currentStepHasSpeakableElement: b,
359
368
  currentInteractionElement: y,
@@ -365,109 +374,111 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
365
374
  b,
366
375
  Ye
367
376
  ]
368
- ), gn = hn.delayMs, Ne = hn.usesImageOnlyDelay, _t = f(
369
- () => `${a}:${ue.join("|")}`,
370
- [a, ue]
371
- ), [dr, fr] = p(null), vn = !Ne || dr === _t, V = r(() => {
377
+ ), In = Sn.delayMs, Ne = Sn.usesImageOnlyDelay, Ft = f(
378
+ () => `${s}:${ue.join("|")}`,
379
+ [s, ue]
380
+ ), [pr, yr] = p(null), bn = !Ne || pr === Ft, V = r(() => {
372
381
  se.current !== null && (window.clearTimeout(se.current), se.current = null);
373
- }, []), F = r(() => {
374
- W.current !== null && (window.clearTimeout(W.current), W.current = null);
375
- }, []), L = r(() => {
376
- Te.current !== null && (window.clearTimeout(Te.current), Te.current = null);
377
- }, []), ye = r(() => {
378
- Ee.current !== null && (window.clearTimeout(Ee.current), Ee.current = null);
382
+ }, []), he = r(() => {
383
+ Ce.current !== null && (window.clearTimeout(Ce.current), Ce.current = null);
379
384
  }, []), H = r(() => {
380
385
  je.current !== null && (window.clearTimeout(je.current), je.current = null);
381
386
  }, []), D = r(
382
387
  (e = {}) => {
383
- ye(), F(), L(), H(), U(null), me.reset(), w(!1), vt(Vt), tt(!1), nt.current = /* @__PURE__ */ new Set(), rt(!1), Zt(null), e.preservePendingSubtitleJump || (_e.current = null), bt(void 0), ot(!1), Fe(0);
388
+ he(), M(), k(), H(), U(null), pe.reset(), w(!1), bt(Ht), tt(!1), nt.current = /* @__PURE__ */ new Set(), rt(!1), rn(null), e.preservePendingSubtitleJump || (Oe.current = null), xt(void 0), ot(!1), me(0);
384
389
  },
385
390
  [
386
- ye,
391
+ he,
387
392
  H,
388
- F,
389
- L,
390
- me
393
+ M,
394
+ k,
395
+ pe
391
396
  ]
392
- ), ct = r(
397
+ ), ft = r(
393
398
  (e) => {
394
- Gt.current += 1, Zt({
399
+ Jt.current += 1, rn({
395
400
  ...e,
396
- id: Gt.current
401
+ id: Jt.current
397
402
  });
398
403
  },
399
404
  []
400
- ), he = r(() => {
401
- const e = oo(
405
+ ), ge = r(() => {
406
+ const e = lo(
402
407
  _,
403
408
  nt.current
404
409
  );
405
410
  return e ? (U(e), !0) : !1;
406
411
  }, [_]), Be = r(() => {
407
- F(), L(), ot(!1), Fe(0), !he() && R && k();
412
+ M(), k(), ot(!1), me(0), !ge() && R && L();
408
413
  }, [
409
414
  R,
410
- F,
411
- L,
415
+ M,
412
416
  k,
413
- he
414
- ]), Sn = r(
417
+ L,
418
+ ge
419
+ ]), An = r(
415
420
  (e) => {
416
- if (L(), !e)
421
+ if (k(), !e)
417
422
  return;
418
423
  const t = () => {
419
- Te.current = null, Fe(
420
- Eo
424
+ Te.current = null, me(
425
+ To
421
426
  ), ot(!0), j.current = null;
422
427
  };
423
428
  Te.current = window.setTimeout(
424
429
  t,
425
- xo
430
+ Co
426
431
  );
427
432
  },
428
- [L]
429
- ), Ot = r(
433
+ [k]
434
+ ), Lt = r(
430
435
  () => We.current || !!ae.current?.querySelector(".slide-player__controls:hover"),
431
436
  []
432
- ), g = r(
437
+ ), h = r(
433
438
  (e = et) => {
434
- !A || J === "hidden" || (Me(!0), V(), !(J === "visible" || !e || Ae <= 0 || Ot()) && (se.current = window.setTimeout(() => {
435
- if (Ot()) {
439
+ !A || J === "hidden" || (ke(!0), V(), !(J === "visible" || !e || we <= 0 || Lt()) && (se.current = window.setTimeout(() => {
440
+ if (Lt()) {
436
441
  se.current = null;
437
442
  return;
438
443
  }
439
- Me(!1), se.current = null;
440
- }, Ae)));
444
+ ke(!1), se.current = null;
445
+ }, we)));
441
446
  },
442
447
  [
443
448
  V,
444
449
  et,
445
- Ot,
446
- Ae,
450
+ Lt,
451
+ we,
447
452
  J,
448
453
  A
449
454
  ]
450
- ), Ve = !!so(y), ge = !!y && !Ve, mr = r((e) => {
451
- jt(e);
455
+ ), Ve = !!uo(y), te = !!y && !Ve, hr = r((e) => {
456
+ tn(e);
452
457
  }, []), ve = r(
453
458
  (e) => {
454
- e && jt(e.shouldContinuePlayback);
459
+ e && tn(e.shouldContinuePlayback);
455
460
  },
456
461
  []
457
462
  );
458
- s(() => {
459
- Qt(gt);
460
- }, [a, gt, ie]), s(() => {
461
- ie && It(!1);
462
- }, [a, ie]), s(() => () => {
463
- ye(), H(), V(), F(), L();
463
+ a(() => {
464
+ nn(It);
465
+ }, [s, It, ie]), a(() => {
466
+ ie && ct(!1);
467
+ }, [
468
+ s,
469
+ ie,
470
+ ct
471
+ ]), a(() => {
472
+ Mt || wt(!1);
473
+ }, [Mt]), a(() => () => {
474
+ he(), H(), V(), M(), k();
464
475
  }, [
465
- ye,
476
+ he,
466
477
  H,
467
- F,
468
- L,
478
+ M,
479
+ k,
469
480
  V
470
- ]), s(() => {
481
+ ]), a(() => {
471
482
  if (!Ne) {
472
483
  H();
473
484
  return;
@@ -476,71 +487,71 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
476
487
  const i = () => {
477
488
  n?.(), n = null;
478
489
  }, l = () => {
479
- e || (i(), H(), fr(_t));
490
+ e || (i(), H(), yr(Ft));
480
491
  }, o = () => {
481
492
  if (e)
482
493
  return;
483
494
  i();
484
- const v = Je.current?.querySelector(
495
+ const g = Je.current?.querySelector(
485
496
  '[data-active-step="true"]'
486
497
  );
487
- if (!v)
498
+ if (!g)
488
499
  return;
489
500
  const I = Array.from(
490
- v.querySelectorAll("iframe")
501
+ g.querySelectorAll("iframe")
491
502
  );
492
- if (I.length === 0 || ho(I)) {
503
+ if (I.length === 0 || vo(I)) {
493
504
  l();
494
505
  return;
495
506
  }
496
- const te = [], Ke = () => {
507
+ const ne = [], Ke = () => {
497
508
  e || (t !== null && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
498
509
  t = null, o();
499
510
  }));
500
- }, Ft = (ne, Se, re) => {
501
- ne.addEventListener(Se, re, { once: !0 }), te.push(
502
- () => ne.removeEventListener(Se, re)
511
+ }, Bt = (re, Se, oe) => {
512
+ re.addEventListener(Se, oe, { once: !0 }), ne.push(
513
+ () => re.removeEventListener(Se, oe)
503
514
  );
504
515
  };
505
- I.forEach((ne) => {
506
- const Se = ne.contentDocument;
516
+ I.forEach((re) => {
517
+ const Se = re.contentDocument;
507
518
  if (!Se || Se.readyState !== "complete") {
508
- Ft(ne, "load", Ke);
519
+ Bt(re, "load", Ke);
509
520
  return;
510
521
  }
511
- Array.from(Se.images).filter((re) => !re.complete).forEach((re) => {
512
- Ft(re, "load", Ke), Ft(re, "error", Ke);
522
+ Array.from(Se.images).filter((oe) => !oe.complete).forEach((oe) => {
523
+ Bt(oe, "load", Ke), Bt(oe, "error", Ke);
513
524
  });
514
525
  }), n = () => {
515
- te.forEach((ne) => ne());
526
+ ne.forEach((re) => re());
516
527
  };
517
528
  };
518
529
  return t = window.requestAnimationFrame(() => {
519
530
  t = null, o();
520
531
  }), je.current = window.setTimeout(() => {
521
532
  l();
522
- }, yo), () => {
533
+ }, go), () => {
523
534
  e = !0, i(), H(), t !== null && window.cancelAnimationFrame(t);
524
535
  };
525
536
  }, [
526
537
  H,
527
538
  P,
528
- a,
529
- _t,
539
+ s,
540
+ Ft,
530
541
  Ne
531
- ]), s(() => (we?.(B), () => {
532
- we?.(!1);
533
- }), [we, B]), s(() => {
542
+ ]), a(() => (xe?.(B), () => {
543
+ xe?.(!1);
544
+ }), [xe, B]), a(() => {
534
545
  B || (We.current = !1);
535
- }, [B]), s(() => {
536
- N || lt === dt || (Tt(!1), Et(dt));
537
- }, [N, lt]), s(() => {
546
+ }, [B]), a(() => {
547
+ N || lt === pt || (Rt(!1), Pt(pt));
548
+ }, [N, lt]), a(() => {
538
549
  if (!N) {
539
- on(!1);
550
+ cn(!1);
540
551
  return;
541
552
  }
542
553
  const e = () => {
543
- on(Tn()), Z();
554
+ cn(Rn()), Z();
544
555
  }, t = () => {
545
556
  Z();
546
557
  };
@@ -548,7 +559,7 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
548
559
  "change",
549
560
  t
550
561
  );
551
- const n = Gr(
562
+ const n = zr(
552
563
  e
553
564
  );
554
565
  return () => {
@@ -557,17 +568,17 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
557
568
  t
558
569
  );
559
570
  };
560
- }, [N, Z]), s(() => {
571
+ }, [N, Z]), a(() => {
561
572
  ze?.(Q);
562
- }, [Q, ze]), s(() => {
563
- an.current !== Q && Z(), an.current = Q;
564
- }, [Q, Z]), s(() => {
565
- qt?.(Oe, a);
566
- }, [a, Oe, qt]), s(() => {
567
- const e = zt.current, t = ro(
573
+ }, [Q, ze]), a(() => {
574
+ dn.current !== Q && Z(), dn.current = Q;
575
+ }, [Q, Z]), a(() => {
576
+ Yt?.(Me, s);
577
+ }, [s, Me, Yt]), a(() => {
578
+ const e = jt.current, t = io(
568
579
  {
569
580
  previousMarkerCount: e.markerCount,
570
- nextMarkerCount: C.length,
581
+ nextMarkerCount: T.length,
571
582
  previousIndex: e.currentIndex,
572
583
  previousCanGoNext: e.canGoNext,
573
584
  nextCanGoNext: R,
@@ -576,146 +587,148 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
576
587
  hasResolvedCurrentInteraction: Ve,
577
588
  currentStepHasSpeakableElement: b,
578
589
  currentInteractionElement: y,
579
- isAutoAdvanceEnabled: ke,
590
+ isAutoAdvanceEnabled: Fe,
580
591
  shouldUseSilentStepAutoAdvanceToggle: De
581
592
  }
582
593
  );
583
- zt.current = {
584
- markerCount: C.length,
585
- currentIndex: a,
594
+ jt.current = {
595
+ markerCount: T.length,
596
+ currentIndex: s,
586
597
  canGoNext: R
587
- }, t && k();
598
+ }, t && L();
588
599
  }, [
589
600
  R,
590
601
  x,
591
- a,
602
+ s,
592
603
  y,
593
604
  b,
594
- k,
605
+ L,
595
606
  O,
596
607
  Ve,
597
- ke,
608
+ Fe,
598
609
  De,
599
- C.length
600
- ]), s(() => {
610
+ T.length
611
+ ]), a(() => {
601
612
  if (!A || J === "hidden") {
602
- V(), Me(!1);
613
+ V(), ke(!1);
603
614
  return;
604
615
  }
605
616
  if (J === "visible") {
606
- V(), Me(!0);
617
+ V(), ke(!0);
607
618
  return;
608
619
  }
609
- et || g(!0);
620
+ et || h(!0);
610
621
  }, [
611
622
  V,
612
623
  et,
613
624
  J,
614
625
  A,
615
- g
616
- ]), s(() => {
626
+ h
627
+ ]), a(() => {
617
628
  if (typeof window > "u")
618
629
  return;
619
630
  const e = (t) => {
620
- t.origin === window.location.origin && Br(t.data) && t.data.eventType === "click" && A && (K(), de(!0), g(!0));
631
+ t.origin === window.location.origin && qr(t.data) && t.data.eventType === "click" && A && (K(), de(!0), h(!0));
621
632
  };
622
633
  return window.addEventListener("message", e), () => {
623
634
  window.removeEventListener("message", e);
624
635
  };
625
- }, [K, A, g]), Wr({
636
+ }, [K, A, h]), Qr({
626
637
  sectionRef: ae,
627
638
  enabled: A,
628
639
  keyboardShortcutsEnabled: le,
629
640
  onKeyboardShortcut: K,
630
641
  onWake: () => {
631
- K(), de(!0), g(!0);
642
+ K(), de(!0), h(!0);
632
643
  }
633
- }), s(() => {
644
+ }), a(() => {
634
645
  if (!A) {
635
646
  D();
636
647
  return;
637
648
  }
638
- const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = lo({
639
- previousResetKey: $t.current,
649
+ const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = so({
650
+ previousResetKey: Wt.current,
640
651
  nextResetKey: Le,
641
652
  currentAudioKey: x,
642
653
  hasCompletedCurrentStepAudio: O
643
654
  });
644
- $t.current = Le;
645
- const n = j.current === a && !!y, i = to({
655
+ Wt.current = Le;
656
+ const n = j.current === s && !!y, i = ro({
646
657
  hasInteraction: !!y,
647
- shouldBlockPlaybackForInteraction: ge,
658
+ shouldBlockPlaybackForInteraction: te,
648
659
  shouldOpenInteractionOverlayAfterAudio: n,
649
660
  hasPlaybackContextChanged: e,
650
661
  hasResolvedCurrentInteraction: Ve,
651
- currentStepHasSpeakableElement: b
652
- }), l = _e.current, o = l?.slideIndex === a;
662
+ currentStepHasSpeakableElement: b,
663
+ isPlayerCustomActionActive: kt
664
+ }), l = Oe.current, o = l?.slideIndex === s;
653
665
  if (e && D({
654
666
  preservePendingSubtitleJump: o
655
667
  }), !(P.length === 0 && !y) && !ee) {
656
- if (l?.slideIndex === a && Pn({
657
- currentIndex: a,
658
- resolvedCurrentInteractionElement: h,
659
- slideElementList: C,
668
+ if (l?.slideIndex === s && On({
669
+ currentIndex: s,
670
+ resolvedCurrentInteractionElement: S,
671
+ slideElementList: T,
660
672
  targetSlideIndex: l.slideIndex
661
673
  })) {
662
- _e.current = null, ht.current = !0, U(l.audioKey), ct({
674
+ Oe.current = null, St.current = !0, U(l.audioKey), ft({
663
675
  audioIndex: l.audioIndex,
664
676
  timeMs: l.timeMs
665
677
  });
666
678
  return;
667
679
  }
668
- if (y && bt(y), i) {
669
- Sn(y);
680
+ if (y && xt(y), i) {
681
+ An(y);
670
682
  return;
671
683
  }
672
- if (L(), j.current = null, !!t && !he()) {
684
+ if (k(), j.current = null, !te && t && !ge()) {
673
685
  if (b) {
674
- if (M) {
686
+ if (F) {
675
687
  w(!1);
676
688
  return;
677
689
  }
678
690
  w(!0);
679
691
  return;
680
692
  }
681
- if (R && !(De && !ke) && !(Ne && !vn))
682
- return Ee.current = window.setTimeout(() => {
683
- Ee.current = null, k();
684
- }, gn), () => {
685
- ye();
693
+ if (R && !(De && !Fe) && !(Ne && !bn))
694
+ return Ce.current = window.setTimeout(() => {
695
+ Ce.current = null, L();
696
+ }, In), () => {
697
+ he();
686
698
  };
687
699
  }
688
700
  }
689
701
  }, [
690
- h,
702
+ S,
691
703
  R,
692
- ye,
704
+ he,
693
705
  P.length,
694
- a,
706
+ s,
695
707
  y,
696
708
  x,
697
709
  Le,
698
710
  b,
699
711
  Ne,
700
- vn,
701
- gn,
702
- k,
712
+ bn,
713
+ In,
714
+ L,
703
715
  O,
704
- M,
705
- ke,
716
+ F,
717
+ Fe,
706
718
  Ve,
707
- ge,
708
- L,
719
+ kt,
720
+ te,
721
+ k,
709
722
  D,
710
- ct,
711
- Sn,
723
+ ft,
724
+ An,
712
725
  A,
713
- C,
714
- he,
726
+ T,
727
+ ge,
715
728
  ee,
716
729
  De
717
- ]), s(() => {
718
- if (M || ee || !b || ge) {
730
+ ]), a(() => {
731
+ if (F || ee || !b || te) {
719
732
  w(!1);
720
733
  return;
721
734
  }
@@ -723,102 +736,102 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
723
736
  w(!1);
724
737
  return;
725
738
  }
726
- if (mn) {
739
+ if (hn) {
727
740
  w(!1);
728
741
  return;
729
742
  }
730
- vt("waitingForAudio"), w(!0);
743
+ bt("waitingForAudio"), w(!0);
731
744
  }, [
732
- mn,
745
+ hn,
733
746
  b,
734
747
  O,
735
- M,
748
+ F,
736
749
  ee,
737
- ge
738
- ]), s(() => {
739
- O && io(
750
+ te
751
+ ]), a(() => {
752
+ O && ao(
740
753
  _,
741
754
  nt.current
742
755
  ) && tt(!1);
743
- }, [_, O]), s(() => {
744
- const e = ht.current;
745
- ht.current = !1, ao({
756
+ }, [_, O]), a(() => {
757
+ const e = St.current;
758
+ St.current = !1, co({
746
759
  currentAudioKey: x,
747
760
  currentAudioSequenceLength: _.length,
748
761
  currentStepHasSpeakableElement: b,
749
762
  hasCompletedCurrentStepAudio: O,
750
- shouldBlockPlaybackForInteraction: ge,
763
+ shouldBlockPlaybackForInteraction: te,
751
764
  shouldPausePlaybackForCustomAction: ee,
752
765
  shouldSkipDefaultAudioStart: e
753
- }) && he();
766
+ }) && ge();
754
767
  }, [
755
768
  x,
756
769
  _,
757
770
  b,
758
771
  O,
759
772
  ee,
760
- ge,
761
- he
762
- ]), s(() => {
763
- !x || T >= 0 || U(null);
764
- }, [T, x]), s(() => {
765
- T >= 0 || me.reset();
766
- }, [T, me]), s(() => {
773
+ te,
774
+ ge
775
+ ]), a(() => {
776
+ !x || C >= 0 || U(null);
777
+ }, [C, x]), a(() => {
778
+ C >= 0 || pe.reset();
779
+ }, [C, pe]), a(() => {
767
780
  rt(!1);
768
- }, [ur]);
781
+ }, [mr]);
769
782
  const {
770
- interactionDefaults: In,
771
- interactionDefaultSelectedValues: pr,
772
- hasResolvedInteractionInput: bn,
773
- isInteractionReadonly: yr,
774
- shouldAutoContinueInteraction: An
783
+ interactionDefaults: wn,
784
+ interactionDefaultSelectedValues: gr,
785
+ hasResolvedInteractionInput: xn,
786
+ isInteractionReadonly: vr,
787
+ shouldAutoContinueInteraction: En
775
788
  } = f(
776
- () => mo(h, {
789
+ () => yo(S, {
777
790
  interactionDefaultValueOptions: Ge
778
791
  }),
779
- [h, Ge]
780
- ), hr = !!h?.readonly || yr, qe = eo({
781
- hasActiveInteraction: !!h,
792
+ [S, Ge]
793
+ ), Sr = !!S?.readonly || vr, qe = no({
794
+ hasActiveInteraction: !!S,
782
795
  isInteractionOverlayOpen: fe
783
- }), gr = r(
796
+ }), Ir = r(
784
797
  (e) => {
785
798
  const n = [
786
799
  ...e.selectedValues ?? [],
787
800
  e.inputText?.trim() ?? "",
788
801
  e.buttonText?.trim() ?? ""
789
802
  ].filter(Boolean).join(", ");
790
- bt((i) => !i || !n ? i : {
803
+ xt((i) => !i || !n ? i : {
791
804
  ...i,
792
805
  user_input: n
793
- }), $e?.(e, h), Be();
806
+ }), $e?.(e, S), Be();
794
807
  },
795
- [h, Be, $e]
808
+ [S, Be, $e]
796
809
  );
797
- s(() => {
810
+ a(() => {
798
811
  const e = () => {
799
- Qn(document.fullscreenElement === ae.current);
812
+ tr(document.fullscreenElement === ae.current);
800
813
  };
801
814
  return e(), document.addEventListener("fullscreenchange", e), () => {
802
815
  document.removeEventListener("fullscreenchange", e);
803
816
  };
804
- }, []), s(() => {
805
- h && fe || it(!1);
806
- }, [h, fe]), s(() => {
817
+ }, []), a(() => {
818
+ S && fe || it(!1);
819
+ }, [S, fe]), a(() => {
807
820
  Z();
808
- }, [h, Z]), s(() => {
821
+ }, [S, Z]), a(() => {
809
822
  if (!qe) {
810
- Fe(0);
823
+ me(0);
811
824
  return;
812
825
  }
813
- const e = Ce.current;
826
+ const e = Pe.current;
814
827
  if (!e)
815
828
  return;
816
829
  const t = () => {
817
830
  const i = Math.ceil(
818
831
  e.getBoundingClientRect().height
819
832
  );
820
- Fe(
821
- i + To
833
+ me(
834
+ i + Po
822
835
  );
823
836
  };
824
837
  if (t(), typeof ResizeObserver > "u")
@@ -829,93 +842,93 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
829
842
  return n.observe(e), () => {
830
843
  n.disconnect();
831
844
  };
832
- }, [qe]), s(() => {
833
- if (F(), !!fe) {
834
- if (An)
845
+ }, [qe]), a(() => {
846
+ if (M(), !!fe) {
847
+ if (En)
835
848
  return W.current = window.setTimeout(() => {
836
849
  W.current = null, Be();
837
- }, Rn), () => {
838
- F();
850
+ }, Mn), () => {
851
+ M();
839
852
  };
840
- if (!(tn || !bn))
853
+ if (!(ln || !xn))
841
854
  return W.current = window.setTimeout(() => {
842
855
  W.current = null, Be();
843
- }, Rn), () => {
844
- F();
856
+ }, Mn), () => {
857
+ M();
845
858
  };
846
859
  }
847
860
  }, [
848
- F,
861
+ M,
849
862
  Be,
850
- tn,
851
- bn,
863
+ ln,
864
+ xn,
852
865
  fe,
853
- An
866
+ En
854
867
  ]);
855
- const vr = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ u(Fr, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ u(
856
- En,
868
+ const br = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ u(Dr, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ u(
869
+ Pn,
857
870
  {
858
871
  className: "content-render-iframe",
859
- disableLoadingOverlay: M,
872
+ disableLoadingOverlay: F,
860
873
  hideFullScreen: !0,
861
874
  locale: d,
862
875
  dir: X,
863
- lang: xe,
876
+ lang: Ee,
864
877
  mode: "blackboard",
865
878
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
866
879
  type: "sandbox",
867
880
  content: e.content,
868
- enableScaling: kn
881
+ enableScaling: Dn
869
882
  }
870
883
  ) : /* @__PURE__ */ u(
871
- En,
884
+ Pn,
872
885
  {
873
886
  className: "content-render-iframe",
874
- disableLoadingOverlay: M,
887
+ disableLoadingOverlay: F,
875
888
  hideFullScreen: !0,
876
889
  locale: d,
877
890
  dir: X,
878
- lang: xe,
891
+ lang: Ee,
879
892
  mode: "blackboard",
880
893
  type: "markdown",
881
894
  content: e.content
882
895
  }
883
- ) : null, Sr = (e = [], t = !1) => {
896
+ ) : null, Ar = (e = [], t = !1) => {
884
897
  if (e.length === 0)
885
898
  return null;
886
899
  const n = e.filter(
887
900
  (o) => o.is_renderable !== !1
888
- ).length, i = t && Fn ? no(e) : "disabled", l = e.reduce(
889
- (o, v, I) => v.is_renderable !== !1 ? I : o,
901
+ ).length, i = t && Nn ? oo(e) : "disabled", l = e.reduce(
902
+ (o, g, I) => g.is_renderable !== !1 ? I : o,
890
903
  -1
891
904
  );
892
905
  return /* @__PURE__ */ u(
893
- zr,
906
+ Jr,
894
907
  {
895
908
  className: "slide-stage__content flex w-full flex-col gap-4",
896
909
  mode: i,
897
- children: e.map((o, v) => {
910
+ children: e.map((o, g) => {
898
911
  const I = o.type === "html" && o.is_renderable === !1;
899
912
  return /* @__PURE__ */ u(
900
913
  "div",
901
914
  {
902
- ref: t && v === l ? Ht : null,
915
+ ref: t && g === l ? zt : null,
903
916
  "aria-hidden": I || void 0,
904
917
  className: Ie(
905
918
  "w-full shrink-0",
906
919
  n === 1 && o.is_renderable !== !1 && "slide-element--single",
907
920
  I ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : o.is_renderable === !1 && "hidden"
908
921
  ),
909
- children: vr(o, {
922
+ children: br(o, {
910
923
  replaceRootScreenHeightWithFull: n === 1 && o.type === "html" && o.is_renderable !== !1
911
924
  })
912
925
  },
913
- o.sequence_number ?? `${o.type}-${v}`
926
+ o.sequence_number ?? `${o.type}-${g}`
914
927
  );
915
928
  })
916
929
  }
917
930
  );
918
- }, Ir = r(() => {
931
+ }, wr = r(() => {
919
932
  const e = ae.current;
920
933
  if (e) {
921
934
  if (document.fullscreenElement === e) {
@@ -926,72 +939,72 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
926
939
  e.requestFullscreen?.().catch(() => {
927
940
  });
928
941
  }
929
- }, []), wn = r(() => {
942
+ }, []), Cn = r(() => {
930
943
  const e = Je.current;
931
944
  e && e.scrollTo({
932
945
  top: e.scrollHeight,
933
946
  behavior: "smooth"
934
947
  });
935
- }, []), Mt = r(
936
- (e) => Pn({
937
- currentIndex: a,
938
- resolvedCurrentInteractionElement: h,
939
- slideElementList: C,
948
+ }, []), Dt = r(
949
+ (e) => On({
950
+ currentIndex: s,
951
+ resolvedCurrentInteractionElement: S,
952
+ slideElementList: T,
940
953
  targetSlideIndex: Qe[e.audioIndex]
941
954
  }),
942
955
  [
943
- h,
956
+ S,
944
957
  Qe,
945
- a,
946
- C
958
+ s,
959
+ T
947
960
  ]
948
- ), br = r(
961
+ ), xr = r(
949
962
  (e, t) => {
950
- const i = S[e.audioIndex]?.audioKey, l = Qe[e.audioIndex];
951
- return !i || l == null || !Mt(e) ? !1 : (ve(t), j.current = null, w(!1), tt(!1), rt(!1), Lt(t) && (de(!0), g(!0)), l === a ? (_e.current = null, D(), U(i), ct(e), !0) : (Re.current = !0, D(), _e.current = {
963
+ const i = v[e.audioIndex]?.audioKey, l = Qe[e.audioIndex];
964
+ return !i || l == null || !Dt(e) ? !1 : (ve(t), j.current = null, w(!1), tt(!1), rt(!1), Vt(t) && (de(!0), h(!0)), l === s ? (Oe.current = null, D(), U(i), ft(e), !0) : (_e.current = !0, D(), Oe.current = {
952
965
  audioIndex: e.audioIndex,
953
966
  audioKey: i,
954
967
  slideIndex: l,
955
968
  timeMs: e.timeMs
956
- }, Wt(l), !0));
969
+ }, en(l), !0));
957
970
  },
958
971
  [
959
- S,
972
+ v,
960
973
  Qe,
961
- Mt,
962
- a,
963
- Wt,
964
- ct,
974
+ Dt,
975
+ s,
976
+ en,
977
+ ft,
965
978
  D,
966
- g,
979
+ h,
967
980
  ve
968
981
  ]
969
- ), Ar = r(
982
+ ), Er = r(
970
983
  (e) => {
971
- ve(e), Re.current = !0, j.current = null, w(!1), Lt(e) && (de(!0), g(!0)), D(), Jt();
984
+ ve(e), _e.current = !0, j.current = null, w(!1), Vt(e) && (de(!0), h(!0)), D(), Zt();
972
985
  },
973
986
  [
974
- Jt,
987
+ Zt,
975
988
  D,
976
- g,
989
+ h,
977
990
  ve
978
991
  ]
979
- ), wr = r(
992
+ ), Cr = r(
980
993
  (e) => {
981
- ve(e), Re.current = !0, j.current = null, w(!1), Lt(e) && (de(!0), g(!0)), D(), k();
994
+ ve(e), _e.current = !0, j.current = null, w(!1), Vt(e) && (de(!0), h(!0)), D(), L();
982
995
  },
983
996
  [
984
- k,
997
+ L,
985
998
  D,
986
- g,
999
+ h,
987
1000
  ve
988
1001
  ]
989
- ), xr = r(
1002
+ ), Tr = r(
990
1003
  ({
991
1004
  loading: e,
992
1005
  reason: t
993
1006
  }) => {
994
- if (M) {
1007
+ if (F) {
995
1008
  w(!1);
996
1009
  return;
997
1010
  }
@@ -999,20 +1012,20 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
999
1012
  w(!1);
1000
1013
  return;
1001
1014
  }
1002
- e && t && vt(t), w(Mo(t, e));
1015
+ e && t && bt(t), w(Fo(t, e));
1003
1016
  },
1004
1017
  [
1005
1018
  b,
1006
1019
  O,
1007
- M
1020
+ F
1008
1021
  ]
1009
1022
  );
1010
- s(() => {
1011
- M && w(!1);
1012
- }, [M]);
1013
- const Er = r(
1023
+ a(() => {
1024
+ F && w(!1);
1025
+ }, [F]);
1026
+ const Pr = r(
1014
1027
  (e) => {
1015
- const t = S[e]?.audioKey;
1028
+ const t = v[e]?.audioKey;
1016
1029
  if (!t || !x || t !== x)
1017
1030
  return;
1018
1031
  nt.current.add(t);
@@ -1029,35 +1042,33 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1029
1042
  return;
1030
1043
  }
1031
1044
  if (U(null), tt(!0), w(!1), R) {
1032
- const o = a + 1, v = C[o];
1033
- yn && v?.type === "interaction" && (j.current = o), k();
1045
+ const o = s + 1, g = T[o];
1046
+ vn && g?.type === "interaction" && (j.current = o), L();
1034
1047
  return;
1035
1048
  }
1036
1049
  },
1037
1050
  [
1038
- S,
1051
+ v,
1039
1052
  R,
1040
- a,
1053
+ s,
1041
1054
  x,
1042
1055
  _,
1043
- k,
1044
- yn,
1045
- C
1056
+ L,
1057
+ vn,
1058
+ T
1046
1059
  ]
1047
- ), Tr = r(() => {
1048
- h && ot((e) => !e);
1049
- }, [h]), Cr = r(() => {
1050
- We.current = !0, V(), A && Me(!0);
1051
- }, [V, A]), Pr = r(() => {
1052
- We.current = !1, g(!0);
1053
- }, [g]), kt = r(
1060
+ ), Rr = r(() => {
1061
+ We.current = !0, V(), A && ke(!0);
1062
+ }, [V, A]), _r = r(() => {
1063
+ We.current = !1, h(!0);
1064
+ }, [h]), Nt = r(
1054
1065
  (e) => {
1055
- e.stopPropagation(), B && g(!0);
1066
+ e.stopPropagation(), B && h(!0);
1056
1067
  },
1057
- [B, g]
1058
- ), ut = r(
1068
+ [B, h]
1069
+ ), mt = r(
1059
1070
  (e, t) => {
1060
- const n = yt.current;
1071
+ const n = vt.current;
1061
1072
  if (!n)
1062
1073
  return null;
1063
1074
  const i = e.getBoundingClientRect(), l = n.getBoundingClientRect();
@@ -1070,14 +1081,14 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1070
1081
  },
1071
1082
  []
1072
1083
  );
1073
- Co(() => {
1074
- const e = Ce.current;
1084
+ Ro(() => {
1085
+ const e = Pe.current;
1075
1086
  if (!qe || !e) {
1076
1087
  ce.current = null;
1077
1088
  return;
1078
1089
  }
1079
1090
  const t = ce.current, n = e.getBoundingClientRect();
1080
- if (!t || wt) {
1091
+ if (!t || Ct) {
1081
1092
  ce.current = {
1082
1093
  left: n.left,
1083
1094
  top: n.top
@@ -1085,7 +1096,7 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1085
1096
  return;
1086
1097
  }
1087
1098
  const i = t.left - n.left, l = t.top - n.top;
1088
- if (!_n(i) && !_n(l)) {
1099
+ if (!kn(i) && !kn(l)) {
1089
1100
  ce.current = {
1090
1101
  left: n.left,
1091
1102
  top: n.top
@@ -1095,54 +1106,54 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1095
1106
  const o = {
1096
1107
  x: E.x + i,
1097
1108
  y: E.y + l
1098
- }, v = ut(
1109
+ }, g = mt(
1099
1110
  e,
1100
1111
  E
1101
- ), I = Ro(
1102
- v ? Cn(o, v) : o
1112
+ ), I = Oo(
1113
+ g ? _n(o, g) : o
1103
1114
  );
1104
1115
  ce.current = {
1105
1116
  left: n.left + I.x - E.x,
1106
1117
  top: n.top + I.y - E.y
1107
- }, On(
1118
+ }, Fn(
1108
1119
  I,
1109
1120
  E
1110
- ) || At(
1111
- (te) => On(te, I) ? te : I
1121
+ ) || Et(
1122
+ (ne) => Fn(ne, I) ? ne : I
1112
1123
  );
1113
1124
  }, [
1114
- ut,
1125
+ mt,
1115
1126
  E,
1116
- wt,
1127
+ Ct,
1117
1128
  at,
1118
1129
  qe
1119
1130
  ]);
1120
- const Rr = r(
1131
+ const Or = r(
1121
1132
  (e) => {
1122
- if (kt(e), e.button !== 0 || !e.currentTarget.isConnected || !Ce.current)
1133
+ if (Nt(e), e.button !== 0 || !e.currentTarget.isConnected || !Pe.current)
1123
1134
  return;
1124
- const t = ut(
1125
- Ce.current,
1135
+ const t = mt(
1136
+ Pe.current,
1126
1137
  E
1127
1138
  );
1128
- t && (e.preventDefault(), e.currentTarget.hasPointerCapture?.(e.pointerId) !== !0 && e.currentTarget.setPointerCapture(e.pointerId), Pe.current = {
1139
+ t && (e.preventDefault(), e.currentTarget.hasPointerCapture?.(e.pointerId) !== !0 && e.currentTarget.setPointerCapture(e.pointerId), Re.current = {
1129
1140
  pointerId: e.pointerId,
1130
1141
  startClientX: e.clientX,
1131
1142
  startClientY: e.clientY,
1132
1143
  startOffset: E,
1133
1144
  bounds: t
1134
- }, xt(!0));
1145
+ }, Tt(!0));
1135
1146
  },
1136
1147
  [
1137
- ut,
1148
+ mt,
1138
1149
  E,
1139
- kt
1150
+ Nt
1140
1151
  ]
1141
- ), _r = r(
1152
+ ), Mr = r(
1142
1153
  (e) => {
1143
- const t = Pe.current;
1144
- !t || t.pointerId !== e.pointerId || (e.preventDefault(), e.stopPropagation(), At(
1145
- Cn(
1154
+ const t = Re.current;
1155
+ !t || t.pointerId !== e.pointerId || (e.preventDefault(), e.stopPropagation(), Et(
1156
+ _n(
1146
1157
  {
1147
1158
  x: t.startOffset.x + e.clientX - t.startClientX,
1148
1159
  y: t.startOffset.y + e.clientY - t.startClientY
@@ -1152,36 +1163,36 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1152
1163
  ));
1153
1164
  },
1154
1165
  []
1155
- ), xn = r(
1166
+ ), Tn = r(
1156
1167
  (e) => {
1157
- const t = Pe.current;
1158
- !t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), Pe.current = null, xt(!1));
1168
+ const t = Re.current;
1169
+ !t || t.pointerId !== e.pointerId || (e.stopPropagation(), e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), Re.current = null, Tt(!1));
1159
1170
  },
1160
1171
  []
1161
- ), Or = r(
1172
+ ), kr = r(
1162
1173
  (e) => {
1163
- K(), Kt?.(e);
1174
+ K(), Gt?.(e);
1164
1175
  },
1165
- [K, Kt]
1166
- ), Mr = r(
1176
+ [K, Gt]
1177
+ ), Fr = r(
1167
1178
  (e) => {
1168
- K(), Ut?.(e);
1179
+ K(), $t?.(e);
1169
1180
  },
1170
- [K, Ut]
1171
- ), kr = r(() => {
1172
- de(!0), g(!0);
1173
- }, [g]);
1174
- return s(() => {
1175
- const e = Yt.current, i = (e.length > 0 && e.length < ue.length && e.every((o, v) => o === ue[v]) ? P.slice(e.length) : []).some(
1181
+ [K, $t]
1182
+ ), Lr = r(() => {
1183
+ de(!0), h(!0);
1184
+ }, [h]);
1185
+ return a(() => {
1186
+ const e = Xt.current, i = (e.length > 0 && e.length < ue.length && e.every((o, g) => o === ue[g]) ? P.slice(e.length) : []).some(
1176
1187
  (o) => o.is_new === !1
1177
1188
  );
1178
- if (Yt.current = ue, !i)
1189
+ if (Xt.current = ue, !i)
1179
1190
  return;
1180
1191
  const l = window.requestAnimationFrame(() => {
1181
- const o = Je.current, v = Ht.current;
1182
- if (!o || !v)
1192
+ const o = Je.current, g = zt.current;
1193
+ if (!o || !g)
1183
1194
  return;
1184
- const I = o.getBoundingClientRect(), te = v.getBoundingClientRect(), Ke = o.scrollTop + (te.top - I.top);
1195
+ const I = o.getBoundingClientRect(), ne = g.getBoundingClientRect(), Ke = o.scrollTop + (ne.top - I.top);
1185
1196
  o.scrollTo({
1186
1197
  top: Math.max(Ke, 0),
1187
1198
  behavior: "smooth"
@@ -1190,35 +1201,35 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1190
1201
  return () => {
1191
1202
  window.cancelAnimationFrame(l);
1192
1203
  };
1193
- }, [P, ue]), s(() => {
1194
- if (!Re.current || (Re.current = !1, P.length === 0))
1204
+ }, [P, ue]), a(() => {
1205
+ if (!_e.current || (_e.current = !1, P.length === 0))
1195
1206
  return;
1196
1207
  const e = window.requestAnimationFrame(() => {
1197
- wn();
1208
+ Cn();
1198
1209
  });
1199
1210
  return () => {
1200
1211
  window.cancelAnimationFrame(e);
1201
1212
  };
1202
- }, [P, wn]), /* @__PURE__ */ Ue(
1213
+ }, [P, Cn]), /* @__PURE__ */ Ue(
1203
1214
  "section",
1204
1215
  {
1205
1216
  ref: ae,
1206
1217
  className: Ie(
1207
1218
  "relative h-full w-full",
1208
1219
  N && "slide--mobile-device",
1209
- sn && "slide--browser-fullscreen",
1210
- pe && "slide--mobile-landscape",
1211
- ln && "slide--mobile-landscape-native",
1212
- Ln
1220
+ fn && "slide--browser-fullscreen",
1221
+ ye && "slide--mobile-landscape",
1222
+ un && "slide--mobile-landscape-native",
1223
+ Bn
1213
1224
  ),
1214
1225
  dir: X,
1215
- lang: xe,
1216
- onClick: kr,
1217
- onFocusCapture: Mr,
1218
- onPointerDown: Or,
1219
- ...Bn,
1226
+ lang: Ee,
1227
+ onClick: Lr,
1228
+ onFocusCapture: Fr,
1229
+ onPointerDown: kr,
1230
+ ...Kn,
1220
1231
  children: [
1221
- rr ? /* @__PURE__ */ u(
1232
+ lr ? /* @__PURE__ */ u(
1222
1233
  "div",
1223
1234
  {
1224
1235
  "aria-hidden": "true",
@@ -1228,23 +1239,23 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1228
1239
  /* @__PURE__ */ Ue(
1229
1240
  "div",
1230
1241
  {
1231
- ref: yt,
1242
+ ref: vt,
1232
1243
  className: Ie(
1233
1244
  "slide__viewport relative h-full min-h-0 w-full",
1234
- pe && "slide__viewport--mobile-landscape",
1235
- pe && !er && "slide__viewport--mobile-landscape-native"
1245
+ ye && "slide__viewport--mobile-landscape",
1246
+ ye && !rr && "slide__viewport--mobile-landscape-native"
1236
1247
  ),
1237
1248
  children: [
1238
- tr ? /* @__PURE__ */ Ue("div", { className: "slide-landscape-header", children: [
1249
+ or ? /* @__PURE__ */ Ue("div", { className: "slide-landscape-header", children: [
1239
1250
  /* @__PURE__ */ u(
1240
1251
  "button",
1241
1252
  {
1242
1253
  "aria-label": $?.backAriaLabel ?? q.fullscreenBackAriaLabel,
1243
1254
  className: "slide-landscape-header__back",
1244
- onClick: ir,
1255
+ onClick: sr,
1245
1256
  type: "button",
1246
1257
  children: /* @__PURE__ */ u(
1247
- Ao,
1258
+ xo,
1248
1259
  {
1249
1260
  className: "slide-landscape-header__icon h-6 w-6",
1250
1261
  strokeWidth: 2.25
@@ -1259,12 +1270,12 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1259
1270
  {
1260
1271
  className: Ie(
1261
1272
  "h-full min-h-0 w-full",
1262
- nr && "slide__viewport-content--with-header",
1263
- Hn ? "slide-content--single" : "grid gap-4"
1273
+ ir && "slide__viewport-content--with-header",
1274
+ $n ? "slide-content--single" : "grid gap-4"
1264
1275
  ),
1265
- children: P.length > 0 ? /* @__PURE__ */ u("div", { className: "slide-stage", children: /* @__PURE__ */ u("div", { ref: Je, className: "slide-stage__layer w-full", children: lr.map(
1276
+ children: P.length > 0 ? /* @__PURE__ */ u("div", { className: "slide-stage", children: /* @__PURE__ */ u("div", { ref: Je, className: "slide-stage__layer w-full", children: cr.map(
1266
1277
  (e, t) => {
1267
- const n = t === ar;
1278
+ const n = t === ur;
1268
1279
  return /* @__PURE__ */ u(
1269
1280
  "div",
1270
1281
  {
@@ -1272,7 +1283,7 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1272
1283
  "aria-hidden": !n || void 0,
1273
1284
  className: "w-full h-full",
1274
1285
  style: { display: n ? void 0 : "none" },
1275
- children: Sr(
1286
+ children: Ar(
1276
1287
  e.elementList,
1277
1288
  n
1278
1289
  )
@@ -1283,127 +1294,125 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1283
1294
  ) }) }) : null
1284
1295
  }
1285
1296
  ),
1286
- zn ? /* @__PURE__ */ u(
1287
- Ur,
1297
+ Wn ? /* @__PURE__ */ u(
1298
+ Yr,
1288
1299
  {
1289
- message: _o(
1290
- Vn,
1291
- Xn
1300
+ message: Mo(
1301
+ Un,
1302
+ jn
1292
1303
  ),
1293
1304
  className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
1294
1305
  }
1295
1306
  ) : null,
1296
1307
  /* @__PURE__ */ u(
1297
- Xr,
1308
+ Wr,
1298
1309
  {
1299
- extraBottomOffset: jn,
1310
+ extraBottomOffset: er,
1300
1311
  hasPlayerGap: at,
1301
- isEnabled: en && Jn,
1302
- playbackTimeStore: me,
1303
- subtitleCues: sr
1312
+ isEnabled: on && Qn,
1313
+ playbackTimeStore: pe,
1314
+ subtitleCues: dr
1304
1315
  }
1305
1316
  ),
1306
1317
  qe ? /* @__PURE__ */ u(
1307
1318
  "div",
1308
1319
  {
1309
- ref: Ce,
1320
+ ref: Pe,
1310
1321
  "data-player-keyboard-shortcuts-ignore": "true",
1311
1322
  className: Ie(
1312
1323
  "slide-interaction-overlay",
1313
1324
  at ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone",
1314
- wt && "slide-interaction-overlay--dragging"
1325
+ Ct && "slide-interaction-overlay--dragging"
1315
1326
  ),
1316
- onClick: kt,
1327
+ onClick: Nt,
1317
1328
  onPointerDownCapture: (e) => {
1318
- Nt(e.target) && it(!0);
1329
+ Kt(e.target) && it(!0);
1319
1330
  },
1320
1331
  onFocusCapture: (e) => {
1321
- Nt(e.target) && it(!0);
1332
+ Kt(e.target) && it(!0);
1322
1333
  },
1323
1334
  onInputCapture: (e) => {
1324
- Nt(e.target) && it(!0);
1335
+ Kt(e.target) && it(!0);
1325
1336
  },
1326
- style: cr,
1337
+ style: fr,
1327
1338
  children: /* @__PURE__ */ u(
1328
- Mn,
1339
+ Ln,
1329
1340
  {
1330
1341
  dir: X,
1331
- lang: xe,
1332
- content: String(h?.content ?? ""),
1342
+ lang: Ee,
1343
+ content: String(S?.content ?? ""),
1333
1344
  dragHandleAriaLabel: z?.dragHandleAriaLabel ?? q.interactionTexts.dragHandleAriaLabel,
1334
1345
  locale: d,
1335
- defaultButtonText: In.buttonText ?? "",
1336
- defaultInputText: In.inputText ?? "",
1337
- defaultSelectedValues: pr,
1346
+ defaultButtonText: wn.buttonText ?? "",
1347
+ defaultInputText: wn.inputText ?? "",
1348
+ defaultSelectedValues: gr,
1338
1349
  confirmButtonText: z?.confirmButtonText ?? q.interactionTexts.confirmButtonText,
1339
1350
  copyButtonText: z?.copyButtonText ?? q.interactionTexts.copyButtonText,
1340
1351
  copiedButtonText: z?.copiedButtonText ?? q.interactionTexts.copiedButtonText,
1341
- onSend: gr,
1342
- onDragHandlePointerCancel: xn,
1343
- onDragHandlePointerDown: Rr,
1344
- onDragHandlePointerMove: _r,
1345
- onDragHandlePointerUp: xn,
1346
- readonly: hr,
1347
- title: z?.title ?? mt ?? q.interactionTexts.title
1352
+ onSend: Ir,
1353
+ onDragHandlePointerCancel: Tn,
1354
+ onDragHandlePointerDown: Or,
1355
+ onDragHandlePointerMove: Mr,
1356
+ onDragHandlePointerUp: Tn,
1357
+ readonly: Sr,
1358
+ title: z?.title ?? ht ?? q.interactionTexts.title
1348
1359
  }
1349
1360
  )
1350
1361
  }
1351
1362
  ) : null,
1352
1363
  A ? /* @__PURE__ */ u(
1353
- jr.Provider,
1364
+ Zr.Provider,
1354
1365
  {
1355
- value: Yn,
1366
+ value: zn,
1356
1367
  children: /* @__PURE__ */ u(
1357
- $r,
1368
+ Xr,
1358
1369
  {
1359
- dir: X === "auto" ? Kn : X,
1360
- lang: xe,
1361
- audioList: S,
1370
+ dir: X === "auto" ? Yn : X,
1371
+ lang: Ee,
1372
+ audioList: v,
1362
1373
  className: Ie(
1363
1374
  "absolute left-1/2 z-[2] -translate-x-1/2",
1364
- sn ? "bottom-3" : "-bottom-3",
1375
+ fn ? "bottom-3" : "-bottom-3",
1365
1376
  G,
1366
1377
  !B && "pointer-events-none opacity-0"
1367
1378
  ),
1368
- currentAudioIndex: T,
1369
- defaultPlaying: gt,
1379
+ currentAudioIndex: C,
1380
+ defaultPlaying: It,
1370
1381
  enableKeyboardShortcuts: le,
1371
1382
  isPlaybackPaused: ee,
1372
- isAutoAdvanceEnabled: ke,
1383
+ isAutoAdvanceEnabled: Fe,
1373
1384
  locale: d,
1374
- hasInteraction: !!h,
1375
1385
  isInteractionOpen: fe,
1376
- isSubtitleEnabled: en,
1377
- onAutoAdvanceToggle: Qt,
1378
- onLoadingChange: xr,
1386
+ isSubtitleEnabled: on,
1387
+ onAutoAdvanceToggle: nn,
1388
+ onLoadingChange: Tr,
1379
1389
  onPlaybackStarted: () => {
1380
1390
  rt(!0);
1381
1391
  },
1382
- onPlaybackPreferenceChange: mr,
1383
- onPlaybackTimeChange: me.setTime,
1392
+ onPlaybackPreferenceChange: hr,
1393
+ onPlaybackTimeChange: pe.setTime,
1384
1394
  onSubtitleToggle: () => {
1385
- Wn((e) => !e);
1395
+ Zn((e) => !e);
1386
1396
  },
1387
1397
  nextDisabled: !R,
1388
- onEnded: Er,
1389
- onFullscreen: Ir,
1390
- isFullscreen: nn,
1398
+ onEnded: Pr,
1399
+ onFullscreen: wr,
1400
+ isFullscreen: an,
1391
1401
  mobileViewMode: Q,
1392
- settingsPortalContainer: yt.current,
1393
- onMobileViewModeChange: or,
1394
- onControlsPointerEnter: Cr,
1395
- onControlsPointerLeave: Pr,
1396
- onInteractionToggle: Tr,
1397
- onNext: wr,
1398
- onPrev: Ar,
1399
- onSubtitleJump: br,
1400
- canJumpToSubtitleTarget: Mt,
1401
- prevDisabled: !Un,
1402
+ settingsPortalContainer: vt.current,
1403
+ onMobileViewModeChange: ar,
1404
+ onControlsPointerEnter: Rr,
1405
+ onControlsPointerLeave: _r,
1406
+ onNext: Cr,
1407
+ onPrev: Er,
1408
+ onSubtitleJump: xr,
1409
+ canJumpToSubtitleTarget: Dt,
1410
+ prevDisabled: !Gn,
1402
1411
  showControls: B,
1403
- subtitleSeekRequest: $n,
1404
- texts: pt,
1405
- customActionContext: Pt,
1406
- customActions: oe,
1412
+ subtitleSeekRequest: Jn,
1413
+ texts: gt,
1414
+ customActionContext: Ot,
1415
+ customActions: Ae,
1407
1416
  useAutoAdvanceToggle: De
1408
1417
  }
1409
1418
  )
@@ -1417,6 +1426,6 @@ const ko = (c, d) => c.length === d.length && c.every((Y, be) => {
1417
1426
  );
1418
1427
  };
1419
1428
  export {
1420
- Si as default
1429
+ bi as default
1421
1430
  };
1422
1431
  //# sourceMappingURL=Slide.es.js.map