markdown-flow-ui 0.1.128 → 0.2.0

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