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