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,36 +1,54 @@
1
1
  import { j as n } from "../../_virtual/jsx-runtime.es.js";
2
- import Ht, { memo as $t, useId as Zt, useContext as qt, useRef as c, useState as Re, useMemo as Y, useCallback as r, useEffect as y } from "react";
3
- import { cn as bt } from "../../lib/utils.es.js";
4
- import zt from "./MobilePlayerSettingsSheet.es.js";
5
- import { DEFAULT_SLIDE_PLAYER_TEXTS as It } from "./constants.es.js";
6
- import { DEFAULT_MOBILE_VIEW_MODE as Yt } from "./utils/mobileScreenMode.es.js";
7
- import { hasReachedAudioEnd as Dt } from "./utils/audioCompletion.es.js";
8
- import { PlayerKeyboardShortcutContext as Xt } from "./utils/playerKeyboardShortcutContext.es.js";
9
- import { activatePlayerKeyboardShortcutOwner as Gt, registerPlayerKeyboardShortcutOwner as Qt, isActivePlayerKeyboardShortcutOwner as er, getPlayerKeyboardShortcutAction as tr, shouldIgnorePlayerKeyboardShortcutEvent as rr } from "./utils/playerKeyboardShortcuts.es.js";
10
- import { resolveAudioPlaybackSourceType as nr } from "./utils/playbackSource.es.js";
11
- import { shouldKeepPlayingAfterNavigation as ur } from "./utils/playbackPreference.es.js";
12
- import { toPlayerCustomActionList as sr } from "./utils/playerCustomActions.es.js";
13
- import { suppressPlayerControlsWakeAfterNavigation as St } from "./utils/playerNavigationContext.es.js";
14
- import { isPlaybackTimeCoveredBySegments as gt, resolveSegmentSeekTarget as lr } from "./utils/segmentSeek.es.js";
15
- import { getSubtitleCueJumpTime as ar } from "./utils/subtitleCue.es.js";
2
+ import rr, { memo as nr, useId as ur, useContext as sr, useRef as o, useState as Fe, useMemo as te, useCallback as r, useEffect as S } from "react";
3
+ import { cn as Lt } from "../../lib/utils.es.js";
4
+ import lr from "./MobilePlayerSettingsSheet.es.js";
5
+ import { getSlidePlayerTexts as ar } from "./slideI18n.es.js";
6
+ import { DEFAULT_MOBILE_VIEW_MODE as cr } from "./utils/mobileScreenMode.es.js";
7
+ import { hasReachedAudioEnd as ir } from "./utils/audioCompletion.es.js";
8
+ import { PlayerKeyboardShortcutContext as or } from "./utils/playerKeyboardShortcutContext.es.js";
9
+ import { activatePlayerKeyboardShortcutOwner as fr, registerPlayerKeyboardShortcutOwner as dr, isActivePlayerKeyboardShortcutOwner as mr, getPlayerKeyboardShortcutAction as pr, shouldIgnorePlayerKeyboardShortcutEvent as hr } from "./utils/playerKeyboardShortcuts.es.js";
10
+ import { resolveAudioPlaybackSourceType as yr } from "./utils/playbackSource.es.js";
11
+ import { shouldKeepPlayingAfterNavigation as br } from "./utils/playbackPreference.es.js";
12
+ import { toPlayerCustomActionList as Sr } from "./utils/playerCustomActions.es.js";
13
+ import { suppressPlayerControlsWakeAfterNavigation as Pe } from "./utils/playerNavigationContext.es.js";
14
+ import { isPlaybackTimeCoveredBySegments as vt, resolveSegmentSeekTarget as gr } from "./utils/segmentSeek.es.js";
15
+ import { getSortedAudioSegments as At } from "./utils/audioSegments.es.js";
16
+ import { getSubtitleCueJumpTarget as _r, shouldClearSubtitleCueJumpTarget as xr } from "./utils/subtitleCue.es.js";
16
17
  /* empty css */
17
- import ir from "../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js";
18
- import cr from "../../node_modules/lucide-react/dist/esm/icons/volume-2.es.js";
19
- import or from "../../node_modules/lucide-react/dist/esm/icons/captions.es.js";
20
- import fr from "../../node_modules/lucide-react/dist/esm/icons/captions-off.es.js";
21
- import dr from "../../node_modules/lucide-react/dist/esm/icons/skip-back.es.js";
22
- import mr from "../../node_modules/lucide-react/dist/esm/icons/rotate-ccw.es.js";
23
- import pr from "../../node_modules/lucide-react/dist/esm/icons/rotate-cw.es.js";
24
- import hr from "../../node_modules/lucide-react/dist/esm/icons/skip-forward.es.js";
25
- import yr from "../../node_modules/lucide-react/dist/esm/icons/scan-line.es.js";
26
- import br from "../../node_modules/lucide-react/dist/esm/icons/maximize.es.js";
27
- import Sr from "../../node_modules/lucide-react/dist/esm/icons/file-pen-line.es.js";
28
- const _t = /* @__PURE__ */ new Map(), xt = (R) => {
29
- if (typeof window > "u" || !R || _t.has(R))
18
+ import kr from "../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js";
19
+ import wr from "../../node_modules/lucide-react/dist/esm/icons/volume-2.es.js";
20
+ import Mr from "../../node_modules/lucide-react/dist/esm/icons/skip-back.es.js";
21
+ import Cr from "../../node_modules/lucide-react/dist/esm/icons/skip-forward.es.js";
22
+ import Tr from "../../node_modules/lucide-react/dist/esm/icons/rewind.es.js";
23
+ import Lr from "../../node_modules/lucide-react/dist/esm/icons/fast-forward.es.js";
24
+ import vr from "../../node_modules/lucide-react/dist/esm/icons/captions.es.js";
25
+ import Ar from "../../node_modules/lucide-react/dist/esm/icons/captions-off.es.js";
26
+ import jr from "../../node_modules/lucide-react/dist/esm/icons/scan-line.es.js";
27
+ import Nr from "../../node_modules/lucide-react/dist/esm/icons/maximize.es.js";
28
+ import Rr from "../../node_modules/lucide-react/dist/esm/icons/file-pen-line.es.js";
29
+ const jt = /* @__PURE__ */ new Map(), Nt = (f) => {
30
+ if (typeof window > "u" || !f || jt.has(f))
30
31
  return;
31
- const N = window.document.createElement("audio");
32
- N.preload = "auto", N.setAttribute("playsinline", "true"), N.src = R, N.load(), _t.set(R, N);
33
- }, gr = () => /* @__PURE__ */ n.jsxs(
32
+ const d = window.document.createElement("audio");
33
+ d.preload = "auto", d.setAttribute("playsinline", "true"), d.src = f, d.load(), jt.set(f, d);
34
+ }, Er = (f, d) => d !== null && d.audioList === f && d.subtitleCueLists.length === f.length && f.every((a, _) => {
35
+ const x = a.element?.subtitle_cues;
36
+ return d.subtitleCueLists[_] === x && d.subtitleCueLengths[_] === (x?.length ?? 0);
37
+ }), Kr = (f) => {
38
+ const d = f.map(
39
+ (a) => a.element?.subtitle_cues
40
+ );
41
+ return {
42
+ audioList: f,
43
+ subtitleCueLists: d,
44
+ subtitleCueLengths: d.map(
45
+ (a) => a?.length ?? 0
46
+ ),
47
+ tracks: d.map((a) => ({
48
+ subtitleCues: a ?? []
49
+ }))
50
+ };
51
+ }, Ur = () => /* @__PURE__ */ n.jsxs(
34
52
  "svg",
35
53
  {
36
54
  xmlns: "http://www.w3.org/2000/svg",
@@ -49,7 +67,7 @@ const _t = /* @__PURE__ */ new Map(), xt = (R) => {
49
67
  /* @__PURE__ */ n.jsx("path", { d: "M12 10H16V24H12V10ZM18 10H22V24H18V10Z", fill: "white" })
50
68
  ]
51
69
  }
52
- ), _r = () => /* @__PURE__ */ n.jsxs(
70
+ ), Fr = () => /* @__PURE__ */ n.jsxs(
53
71
  "svg",
54
72
  {
55
73
  xmlns: "http://www.w3.org/2000/svg",
@@ -68,7 +86,7 @@ const _t = /* @__PURE__ */ new Map(), xt = (R) => {
68
86
  /* @__PURE__ */ n.jsx("path", { d: "M13.3333 10L23.3333 16.6667L13.3333 23.3333V10Z", fill: "white" })
69
87
  ]
70
88
  }
71
- ), H = {
89
+ ), J = {
72
90
  fullscreen: "F",
73
91
  next: "→",
74
92
  nextSubtitle: "Shift+→",
@@ -77,386 +95,425 @@ const _t = /* @__PURE__ */ new Map(), xt = (R) => {
77
95
  previous: "←",
78
96
  previousSubtitle: "Shift+←",
79
97
  subtitle: "C"
80
- }, xr = 250, kr = (R, N) => R ? `${R} (${N})` : N, wr = ({
81
- audioList: R = [],
82
- className: N,
83
- currentAudioIndex: k = -1,
84
- defaultPlaying: L = !0,
85
- isPlaybackPaused: T = !1,
86
- isAutoAdvanceEnabled: $ = !0,
98
+ }, Pr = 250, Wr = (f, d) => f ? `${f} (${d})` : d, Br = ({
99
+ audioList: f = [],
100
+ className: d,
101
+ currentAudioIndex: a = -1,
102
+ defaultPlaying: _ = !0,
103
+ isPlaybackPaused: x = !1,
104
+ isAutoAdvanceEnabled: Z = !0,
87
105
  useAutoAdvanceToggle: F = !1,
88
- onLoadingChange: je,
89
- onPlaybackPreferenceChange: Ce,
90
- onPlaybackStarted: Ne,
91
- onPlaybackTimeChange: ie,
92
- onSubtitleToggle: ee,
93
- onPrev: ce,
94
- onNext: oe,
95
- onFullscreen: te,
96
- isFullscreen: Ee = !1,
97
- mobileViewMode: kt = Yt,
98
- settingsPortalContainer: wt,
99
- onMobileViewModeChange: Ke,
100
- onEnded: Ue,
101
- onAutoAdvanceToggle: Fe,
102
- onInteractionToggle: fe,
103
- hasInteraction: _e = !1,
104
- isInteractionOpen: re = !1,
105
- isSubtitleEnabled: xe = !0,
106
- prevDisabled: ke = !1,
107
- nextDisabled: we = !1,
108
- showControls: Me = !0,
109
- enableKeyboardShortcuts: Mt = !0,
110
- customActions: We,
111
- customActionContext: Pe,
112
- texts: Be,
113
- onFocusCapture: Oe,
114
- onPointerDown: Ve,
115
- ...Lt
106
+ onLoadingChange: We,
107
+ onPlaybackPreferenceChange: Be,
108
+ onPlaybackStarted: Oe,
109
+ onPlaybackTimeChange: oe,
110
+ onSubtitleToggle: re,
111
+ onPrev: fe,
112
+ onNext: de,
113
+ onSubtitleJump: me,
114
+ canJumpToSubtitleTarget: Te,
115
+ onFullscreen: ne,
116
+ isFullscreen: Ve = !1,
117
+ mobileViewMode: Rt = cr,
118
+ settingsPortalContainer: Et,
119
+ onMobileViewModeChange: He,
120
+ onEnded: $e,
121
+ onAutoAdvanceToggle: Je,
122
+ onInteractionToggle: pe,
123
+ hasInteraction: Le = !1,
124
+ isInteractionOpen: ue = !1,
125
+ isSubtitleEnabled: ve = !0,
126
+ prevDisabled: Ae = !1,
127
+ nextDisabled: je = !1,
128
+ showControls: Ne = !0,
129
+ onControlsPointerEnter: Kt,
130
+ onControlsPointerLeave: Ut,
131
+ enableKeyboardShortcuts: Ft = !0,
132
+ subtitleSeekRequest: O = null,
133
+ customActions: Ze,
134
+ customActionContext: ze,
135
+ locale: Ye,
136
+ texts: De,
137
+ onFocusCapture: Ge,
138
+ onPointerDown: Qe,
139
+ ...Pt
116
140
  }) => {
117
- const Tt = Zt(), Je = qt(Xt), _ = c(null), He = c(re), E = c(null), $e = c(null), K = c(0), f = c(null), de = c(void 0), j = c([]), ne = c(
118
- F ? $ : L
119
- ), ue = c(!1), Ze = c(!1), b = c(!1), U = c(null), Z = c(null), A = c(!1), l = c(!1), S = c(null), C = c(!1), q = c(null), me = c(0), qe = c(() => {
120
- }), pe = c(null), W = c("unknown"), [he, d] = Re(L), [ze, D] = Re(!1), [X, At] = Re({
141
+ const Wt = ur(), Xe = sr(or), M = o(null), qe = o(ue), E = o(null), Ie = o(null), K = o(0), m = o(null), he = o(void 0), j = o([]), se = o(
142
+ F ? Z : _
143
+ ), le = o(!1), et = o(!1), k = o(!1), U = o(null), z = o(null), v = o(!1), c = o(!1), w = o(null), N = o(!1), Y = o(null), ye = o(0), tt = o(() => {
144
+ }), be = o(null), ae = o(null), rt = o(null), nt = o(null), P = o("unknown"), [Se, h] = Fe(_), [ut, X] = Fe(!1), [q, Bt] = Fe({
121
145
  next: !1,
122
146
  previous: !1
123
- }), z = Je?.ownerId ?? Tt, P = Mt && (Je?.enabled ?? !0), o = k >= 0 ? R[k] : void 0, g = o?.audioUrl, w = Y(
124
- () => [...o?.audioSegments ?? []].sort(
125
- (e, t) => e.segment_index - t.segment_index
126
- ),
127
- [o?.audioSegments]
128
- ), Ie = Y(
129
- () => o?.element?.subtitle_cues ?? [],
130
- [o?.element?.subtitle_cues]
131
- ), Ye = Y(
132
- () => sr(We, Pe),
133
- [Pe, We]
134
- ), De = Ye.length + 7, vt = Y(
147
+ }), D = Xe?.ownerId ?? Wt, W = Ft && (Xe?.enabled ?? !0), p = a >= 0 ? f[a] : void 0, T = p?.audioUrl, st = p?.audioSegments, Ot = st?.length ?? 0, R = te(
148
+ () => At(p),
149
+ [p, Ot, st]
150
+ );
151
+ let ge = nt.current;
152
+ Er(f, ge) || (ge = Kr(f), nt.current = ge);
153
+ const lt = ge.tracks, at = te(
154
+ () => Sr(Ze, ze),
155
+ [ze, Ze]
156
+ ), ct = at.length + 7, Vt = te(
135
157
  () => ({
136
- "--slide-player-mobile-control-count": String(De)
158
+ "--slide-player-mobile-control-count": String(ct)
137
159
  }),
138
- [De]
139
- ), a = Y(
160
+ [ct]
161
+ ), i = te(
140
162
  () => ({
141
- ...It,
142
- ...Be
163
+ ...ar(Ye),
164
+ ...De
143
165
  }),
144
- [Be]
145
- ), Le = Y(() => o ? o.audioKey ?? `${String(o.sequenceNumber ?? "none")}:${String(o.audioUrl ?? "")}` : "none", [o]), Rt = F ? $ : he, Xe = F ? $ ? a.pauseAutoplayLabel : a.playAutoplayLabel : he ? a.pauseLabel : a.playLabel, Ge = Ee ? a.exitFullscreenLabel : a.enterFullscreenLabel, O = r(
166
+ [Ye, De]
167
+ ), Re = te(() => p ? p.audioKey ?? `${String(p.sequenceNumber ?? "none")}:${String(p.audioUrl ?? "")}` : "none", [p]), Ht = F ? Z : Se, it = F ? Z ? i.pauseAutoplayLabel : i.playAutoplayLabel : Se ? i.pauseLabel : i.playLabel, ot = Ve ? i.exitFullscreenLabel : i.enterFullscreenLabel, V = r(
146
168
  (e, t, s) => ({
147
- ariaKeyShortcuts: P ? s : void 0,
148
- title: P ? kr(e, t) : e
169
+ ariaKeyShortcuts: W ? s : void 0,
170
+ title: W ? Wr(e, t) : e
149
171
  }),
150
- [P]
151
- ), Qe = O(
152
- a.subtitleToggleAriaLabel,
153
- H.subtitle,
172
+ [W]
173
+ ), ft = V(
174
+ i.subtitleToggleAriaLabel,
175
+ J.subtitle,
154
176
  "c"
155
- ), et = O(
156
- a.previousLabel,
157
- H.previous,
177
+ ), dt = V(
178
+ i.previousLabel,
179
+ J.previous,
158
180
  "ArrowLeft"
159
- ), tt = O(
160
- a.previousSubtitleLabel,
161
- H.previousSubtitle,
181
+ ), mt = V(
182
+ i.previousSubtitleLabel,
183
+ J.previousSubtitle,
162
184
  "Shift+ArrowLeft"
163
- ), rt = O(
164
- Xe,
165
- H.playback,
185
+ ), pt = V(
186
+ it,
187
+ J.playback,
166
188
  "Space"
167
- ), nt = O(
168
- a.nextLabel,
169
- H.next,
189
+ ), ht = V(
190
+ i.nextLabel,
191
+ J.next,
170
192
  "ArrowRight"
171
- ), ut = O(
172
- a.nextSubtitleLabel,
173
- H.nextSubtitle,
193
+ ), yt = V(
194
+ i.nextSubtitleLabel,
195
+ J.nextSubtitle,
174
196
  "Shift+ArrowRight"
175
- ), st = O(
176
- Ge,
177
- H.fullscreen,
197
+ ), bt = V(
198
+ ot,
199
+ J.fullscreen,
178
200
  "f"
179
- ), lt = O(
180
- a.notesLabel,
181
- H.notes,
201
+ ), St = V(
202
+ i.notesLabel,
203
+ J.notes,
182
204
  "n"
183
- ), ye = r(() => {
184
- P && Gt(z);
185
- }, [z, P]), jt = r(
205
+ ), _e = r(() => {
206
+ W && fr(D);
207
+ }, [D, W]), $t = r(
186
208
  (e) => {
187
- ye(), Ve?.(e);
209
+ _e(), Qe?.(e);
188
210
  },
189
- [ye, Ve]
190
- ), Ct = r(
211
+ [_e, Qe]
212
+ ), Jt = r(
191
213
  (e) => {
192
- ye(), Oe?.(e);
214
+ _e(), Ge?.(e);
193
215
  },
194
- [ye, Oe]
216
+ [_e, Ge]
195
217
  );
196
- y(() => {
197
- de.current = o;
198
- }, [o]), y(() => {
199
- ne.current = F ? $ : L;
200
- }, [L, $, F]), y(() => {
201
- Me || D(!1);
202
- }, [Me]), y(() => {
203
- !He.current && re && D(!1), He.current = re;
204
- }, [re]), y(() => {
205
- j.current = w;
206
- }, [w]), y(() => {
207
- const e = o?.audioUrl, t = k >= 0 ? R[k + 1]?.audioUrl : void 0;
208
- xt(e), xt(t);
209
- }, [R, o?.audioUrl, k]);
210
- const u = r(
218
+ S(() => {
219
+ he.current = p;
220
+ }, [p]), S(() => {
221
+ se.current = F ? Z : _;
222
+ }, [_, Z, F]), S(() => {
223
+ Ne || X(!1);
224
+ }, [Ne]), S(() => {
225
+ !qe.current && ue && X(!1), qe.current = ue;
226
+ }, [ue]), S(() => {
227
+ j.current = R;
228
+ }, [R]), S(() => {
229
+ const e = p?.audioUrl, t = a >= 0 ? f[a + 1]?.audioUrl : void 0;
230
+ Nt(e), Nt(t);
231
+ }, [f, p?.audioUrl, a]);
232
+ const l = r(
211
233
  (e, t = null) => {
212
- Ze.current === e && (!e || t === null) || (Ze.current = e, je?.({
234
+ et.current === e && (!e || t === null) || (et.current = e, We?.({
213
235
  loading: e,
214
236
  reason: e ? t : null
215
237
  }));
216
238
  },
217
- [je]
239
+ [We]
218
240
  ), B = r(
219
241
  (e) => {
220
- ne.current = e, Ce?.(e);
242
+ se.current = e, Be?.(e);
221
243
  },
222
- [Ce]
223
- ), se = r(() => F ? {
224
- shouldContinuePlayback: ne.current
244
+ [Be]
245
+ ), G = r(() => F ? {
246
+ shouldContinuePlayback: se.current
225
247
  } : {
226
- shouldContinuePlayback: ur({
227
- defaultPlaying: ne.current,
228
- isPausedByUser: b.current
248
+ shouldContinuePlayback: br({
249
+ defaultPlaying: se.current,
250
+ isPausedByUser: k.current
229
251
  })
230
- }, [F]), at = r((e) => e instanceof DOMException ? e.name === "NotAllowedError" || e.name === "SecurityError" : !1, []), V = r(() => L && !T && !b.current && W.current !== "blocked", [L, T]), it = r((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), ct = r(() => {
231
- const e = f.current;
252
+ }, [F]), gt = r((e) => e instanceof DOMException ? e.name === "NotAllowedError" || e.name === "SecurityError" : !1, []), H = r(() => _ && !x && !k.current && P.current !== "blocked", [_, x]), _t = r((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), xt = r(() => {
253
+ const e = m.current;
232
254
  return e == null || e <= 0 ? 0 : j.current.slice(0, e).reduce(
233
255
  (t, s) => t + Math.max(Number(s.duration_ms ?? 0), 0),
234
256
  0
235
257
  ) / 1e3;
236
- }, []), I = r((e) => e <= 0 ? 0 : j.current.slice(0, e).reduce(
258
+ }, []), Q = r((e) => e <= 0 ? 0 : j.current.slice(0, e).reduce(
237
259
  (t, s) => t + Math.max(Number(s.duration_ms ?? 0), 0),
238
260
  0
239
- ), []), ot = r(
240
- (e) => !o || T ? !1 : g ? !0 : gt(w, e),
241
- [o, w, g, T]
242
- ), le = r(
243
- (e, t) => {
244
- const s = ar({
261
+ ), []), xe = r(
262
+ (e, t) => !e || x ? !1 : e.audioUrl ? !0 : vt(
263
+ At(e),
264
+ t
265
+ ),
266
+ [x]
267
+ ), ce = r(
268
+ (e, t, s = {}) => {
269
+ const u = _r({
270
+ currentAudioIndex: a,
245
271
  currentTimeMs: t,
246
272
  direction: e,
247
- subtitleCues: Ie
273
+ excludeTarget: s.excludeTarget,
274
+ tracks: lt
248
275
  });
249
- return s === null || !ot(s) ? null : s;
276
+ return !u || !xe(
277
+ f[u.audioIndex],
278
+ u.timeMs
279
+ ) || u.audioIndex !== a && (!me || Te && !Te(u)) ? null : u;
250
280
  },
251
- [ot, Ie]
252
- ), Te = r(
281
+ [
282
+ f,
283
+ Te,
284
+ xe,
285
+ a,
286
+ me,
287
+ lt
288
+ ]
289
+ ), Ee = r(
253
290
  (e, t = !1) => {
254
291
  const s = Math.max(Number(e), 0);
255
- if (!t && pe.current !== null && Math.abs(
256
- s - pe.current
257
- ) < xr)
292
+ if (!t && be.current !== null && Math.abs(
293
+ s - be.current
294
+ ) < Pr)
258
295
  return;
259
- pe.current = s;
260
- const i = {
261
- previous: le("previous", s) !== null,
262
- next: le("next", s) !== null
296
+ be.current = s;
297
+ const u = {
298
+ previous: ce("previous", s) !== null,
299
+ next: ce("next", s) !== null
263
300
  };
264
- At((p) => p.previous === i.previous && p.next === i.next ? p : i);
301
+ Bt((b) => b.previous === u.previous && b.next === u.next ? b : u);
265
302
  },
266
- [le]
303
+ [ce]
267
304
  );
268
- y(() => {
269
- qe.current = Te, Te(me.current, !0);
270
- }, [Te]);
271
- const be = r(() => {
272
- const e = _.current;
273
- return e ? U.current === "segment" ? I(K.current) + Math.max(e.currentTime, 0) * 1e3 : S.current !== null && e.readyState === 0 ? S.current * 1e3 : Math.max(e.currentTime, 0) * 1e3 : f.current != null ? I(f.current) : 0;
274
- }, [I]), x = r(
305
+ S(() => {
306
+ tt.current = Ee, Ee(ye.current, !0);
307
+ }, [Ee]);
308
+ const ke = r(() => {
309
+ const e = M.current;
310
+ return e ? U.current === "segment" ? Q(K.current) + Math.max(e.currentTime, 0) * 1e3 : w.current !== null && e.readyState === 0 ? w.current * 1e3 : Math.max(e.currentTime, 0) * 1e3 : m.current != null ? Q(m.current) : 0;
311
+ }, [Q]), C = r(
275
312
  (e) => {
276
313
  const t = Math.max(e, 0);
277
- me.current !== t && (me.current = t, ie?.(t), qe.current(t));
314
+ ye.current !== t && (ye.current = t, xr({
315
+ currentAudioIndex: a,
316
+ currentTimeMs: t,
317
+ target: ae.current
318
+ }) && (ae.current = null), oe?.(t), tt.current(t));
278
319
  },
279
- [ie]
280
- ), m = r(() => {
281
- x(be());
282
- }, [be, x]), h = r(() => {
283
- typeof window > "u" || q.current === null || (window.cancelAnimationFrame(q.current), q.current = null);
284
- }, []), ft = r(() => {
285
- if (typeof window > "u" || q.current !== null)
320
+ [a, oe]
321
+ ), y = r(() => {
322
+ C(ke());
323
+ }, [ke, C]), g = r(() => {
324
+ typeof window > "u" || Y.current === null || (window.cancelAnimationFrame(Y.current), Y.current = null);
325
+ }, []), kt = r(() => {
326
+ if (typeof window > "u" || Y.current !== null)
286
327
  return;
287
328
  const e = () => {
288
- m();
289
- const t = _.current;
329
+ y();
330
+ const t = M.current;
290
331
  if (!t || t.paused || t.ended) {
291
- q.current = null;
332
+ Y.current = null;
292
333
  return;
293
334
  }
294
- q.current = window.requestAnimationFrame(e);
335
+ Y.current = window.requestAnimationFrame(e);
295
336
  };
296
- q.current = window.requestAnimationFrame(e);
297
- }, [m]), G = r(() => {
298
- const e = _.current;
299
- e && (h(), l.current = !1, b.current = !1, ue.current = !1, U.current = null, S.current = null, A.current = !1, C.current = !1, Z.current = null, e.pause(), e.removeAttribute("src"), e.load(), E.current = null, K.current = 0, f.current = null, x(0), d(!1), u(!1));
300
- }, [x, h, u]), M = r(
337
+ Y.current = window.requestAnimationFrame(e);
338
+ }, [y]), I = r(() => {
339
+ const e = M.current;
340
+ e && (g(), c.current = !1, k.current = !1, le.current = !1, U.current = null, w.current = null, v.current = !1, N.current = !1, z.current = null, e.pause(), e.removeAttribute("src"), e.load(), E.current = null, K.current = 0, m.current = null, C(0), h(!1), l(!1));
341
+ }, [C, g, l]), L = r(
301
342
  (e) => {
302
- const t = _.current;
343
+ const t = M.current;
303
344
  if (!t)
304
345
  return !1;
305
346
  const s = t.play();
306
347
  return s && typeof s.then == "function" && s.then(() => {
307
- W.current === "unknown" && (W.current = "auto"), l.current = !1, C.current = !1;
308
- }).catch((i) => {
309
- W.current === "unknown" && at(i) && (W.current = "blocked", l.current = !1, u(!1)), C.current = !1, d(!1);
348
+ P.current === "unknown" && (P.current = "auto"), c.current = !1, N.current = !1;
349
+ }).catch((u) => {
350
+ P.current === "unknown" && gt(u) && (P.current = "blocked", c.current = !1, l(!1)), N.current = !1, h(!1);
310
351
  }), !0;
311
352
  },
312
- [at, u]
313
- ), v = r(
353
+ [gt, l]
354
+ ), A = r(
314
355
  (e, t, s = {}) => {
315
- const i = _.current, p = j.current[e];
316
- if (!i || !p)
356
+ const u = M.current, b = j.current[e];
357
+ if (!u || !b)
317
358
  return !1;
318
- const J = it(p.audio_data), ge = Math.max(
359
+ const $ = _t(b.audio_data), Ce = Math.max(
319
360
  Number(s.seekTimeSeconds ?? 0),
320
361
  0
321
362
  );
322
- K.current = e, f.current = null, A.current = !1, C.current = !0, Z.current = "segment", x(
323
- I(e) + ge * 1e3
363
+ K.current = e, m.current = null, v.current = !1, N.current = !0, z.current = "segment", C(
364
+ Q(e) + Ce * 1e3
324
365
  );
325
- const yt = s.shouldResume ?? V();
326
- l.current = yt, u(!1);
327
- const Jt = E.current !== J;
328
- return U.current = "segment", Jt && (i.pause(), i.removeAttribute("src"), i.load(), E.current = J, i.src = J, i.load()), S.current = ge, i.readyState > 0 && (i.currentTime = ge, S.current = null), yt ? M(`start-segment:${t}`) : (l.current = !1, C.current = !1, i.pause(), d(!1), !0);
366
+ const Tt = s.shouldResume ?? H();
367
+ c.current = Tt, l(!1);
368
+ const tr = E.current !== $;
369
+ return U.current = "segment", tr && (u.pause(), u.removeAttribute("src"), u.load(), E.current = $, u.src = $, u.load()), w.current = Ce, u.readyState > 0 && (u.currentTime = Ce, w.current = null), Tt ? L(`start-segment:${t}`) : (c.current = !1, N.current = !1, u.pause(), h(!1), !0);
329
370
  },
330
371
  [
331
- V,
332
- it,
333
- I,
334
- x,
335
- M,
336
- u
372
+ H,
373
+ _t,
374
+ Q,
375
+ C,
376
+ L,
377
+ l
337
378
  ]
338
- ), dt = r(
379
+ ), we = r(
339
380
  (e) => {
340
- const t = _.current;
341
- if (!t || !o || T)
381
+ const t = M.current;
382
+ if (!t || !p || x)
342
383
  return !1;
343
- const s = Math.max(Number(e), 0), i = !t.paused && !t.ended || l.current || C.current || f.current !== null && ne.current && !b.current, p = gt(
384
+ const s = Math.max(Number(e), 0), u = !t.paused && !t.ended || c.current || N.current || m.current !== null && se.current && !k.current, b = vt(
344
385
  j.current,
345
386
  s
346
- ) ? lr(
387
+ ) ? gr(
347
388
  j.current,
348
389
  s
349
390
  ) : null;
350
- if (pe.current = null, h(), l.current = i, u(!1), i && (W.current = "manual", b.current = !1, B(!0)), p && (U.current === "segment" || !g))
351
- return v(
352
- p.segmentIndex,
391
+ if (be.current = null, g(), c.current = u, l(!1), u && (P.current = "manual", k.current = !1, B(!0)), b && (U.current === "segment" || !T))
392
+ return A(
393
+ b.segmentIndex,
353
394
  "subtitle-seek-segment",
354
395
  {
355
- seekTimeSeconds: p.segmentTimeSeconds,
356
- shouldResume: i
396
+ seekTimeSeconds: b.segmentTimeSeconds,
397
+ shouldResume: u
357
398
  }
358
399
  );
359
- if (g) {
360
- const J = s / 1e3;
361
- return E.current !== g && (t.pause(), t.removeAttribute("src"), t.load(), E.current = g, U.current = "url", Z.current = "url", t.src = g, t.load()), S.current = J, x(s), t.readyState > 0 && (t.currentTime = J, S.current = null), i ? M("subtitle-seek-url") : (l.current = !1, t.pause(), d(!1), !0);
400
+ if (T) {
401
+ const $ = s / 1e3;
402
+ return E.current !== T && (t.pause(), t.removeAttribute("src"), t.load(), E.current = T, U.current = "url", z.current = "url", t.src = T, t.load()), w.current = $, C(s), t.readyState > 0 && (t.currentTime = $, w.current = null), u ? L("subtitle-seek-url") : (c.current = !1, t.pause(), h(!1), !0);
362
403
  }
363
404
  return !1;
364
405
  },
365
406
  [
366
- o,
367
- g,
407
+ p,
368
408
  T,
369
409
  x,
370
- v,
371
- h,
372
- M,
373
- u,
410
+ C,
411
+ A,
412
+ g,
413
+ L,
414
+ l,
374
415
  B
375
416
  ]
376
- ), ae = r(
417
+ ), ie = r(
377
418
  (e) => {
378
- const t = le(
419
+ const t = ce(
379
420
  e,
380
- be()
421
+ ke(),
422
+ {
423
+ excludeTarget: e === "previous" ? ae.current : null
424
+ }
381
425
  );
382
- return t === null ? !1 : dt(t);
426
+ if (t === null)
427
+ return !1;
428
+ if (t.audioIndex === a) {
429
+ const u = we(t.timeMs);
430
+ return u && (ae.current = t), u;
431
+ }
432
+ const s = !!me?.(
433
+ t,
434
+ Pe(G())
435
+ );
436
+ return s && (ae.current = t), s;
383
437
  },
384
438
  [
385
- be,
386
- le,
387
- dt
439
+ a,
440
+ ke,
441
+ G,
442
+ ce,
443
+ me,
444
+ we
388
445
  ]
389
- ), Q = r(
446
+ ), ee = r(
390
447
  (e) => {
391
- h(), l.current = !1, A.current = !1, C.current = !1, m(), d(!1), u(!1), k >= 0 && Ue?.(k);
448
+ g(), c.current = !1, v.current = !1, N.current = !1, y(), h(!1), l(!1), a >= 0 && $e?.(a);
392
449
  },
393
450
  [
394
- k,
395
- Ue,
396
- h,
397
- m,
398
- u
451
+ a,
452
+ $e,
453
+ g,
454
+ y,
455
+ l
399
456
  ]
400
- ), Se = r(
457
+ ), Me = r(
401
458
  (e) => {
402
- const t = _.current;
403
- return !t || U.current !== "url" || !Dt({
459
+ const t = M.current;
460
+ return !t || U.current !== "url" || !ir({
404
461
  currentTimeSeconds: Math.max(t.currentTime, 0),
405
462
  durationSeconds: t.duration
406
- }) ? !1 : (l.current = !1, t.pause(), Q(e), !0);
463
+ }) ? !1 : (c.current = !1, t.pause(), ee(e), !0);
407
464
  },
408
- [Q]
409
- ), mt = r(() => {
410
- const e = K.current + 1, t = j.current, s = t[e], i = de.current, p = t.some((J) => J.is_final);
465
+ [ee]
466
+ ), wt = r(() => {
467
+ const e = K.current + 1, t = j.current, s = t[e], u = he.current, b = t.some(($) => $.is_final);
411
468
  if (s) {
412
- v(e, "ended");
469
+ A(e, "ended");
413
470
  return;
414
471
  }
415
- if (i?.isAudioStreaming || !p) {
416
- K.current = e, f.current = e, A.current = !0, l.current = L, x(I(e)), d(!1), u(!0, "waitingForMoreAudio");
472
+ if (u?.isAudioStreaming || !b) {
473
+ K.current = e, m.current = e, v.current = !0, c.current = _, C(Q(e)), h(!1), l(!0, "waitingForMoreAudio");
417
474
  return;
418
475
  }
419
- Q("segments-completed");
476
+ ee("segments-completed");
420
477
  }, [
421
- L,
478
+ _,
479
+ ee,
422
480
  Q,
423
- I,
424
- x,
425
- v,
426
- u
481
+ C,
482
+ A,
483
+ l
427
484
  ]);
428
- y(() => {
429
- if ($e.current === Le)
485
+ S(() => {
486
+ if (Ie.current === Re)
430
487
  return;
431
- $e.current = Le, K.current = 0, f.current = null, A.current = !1, b.current = !1, ue.current = !1, l.current = !1, C.current = !1, U.current = null, Z.current = null, E.current = null, h(), x(0), u(!1);
432
- const e = _.current;
433
- e && (e.pause(), e.removeAttribute("src"), e.load(), d(!1));
488
+ Ie.current = Re, K.current = 0, m.current = null, v.current = !1, k.current = !1, le.current = !1, c.current = !1, N.current = !1, U.current = null, z.current = null, E.current = null, g(), C(0), l(!1);
489
+ const e = M.current;
490
+ e && (e.pause(), e.removeAttribute("src"), e.load(), h(!1));
434
491
  }, [
435
- k,
436
- Le,
437
- w.length,
492
+ a,
493
+ Re,
494
+ R.length,
495
+ T,
496
+ C,
438
497
  g,
439
- x,
440
- h,
441
- u
442
- ]), y(() => {
443
- const e = _.current;
498
+ l
499
+ ]), S(() => {
500
+ const e = M.current;
444
501
  if (e) {
445
- if (T) {
446
- ue.current = !!(de.current && !b.current && (!e.paused || l.current || f.current !== null)), l.current = !1, u(!1), e.pause(), d(!1);
502
+ if (x) {
503
+ le.current = !!(he.current && !k.current && (!e.paused || c.current || m.current !== null)), c.current = !1, l(!1), e.pause(), h(!1);
447
504
  return;
448
505
  }
449
- if (!(!ue.current || !de.current || b.current)) {
450
- if (ue.current = !1, f.current !== null) {
451
- if (f.current < j.current.length) {
452
- v(f.current, "external-resume");
506
+ if (!(!le.current || !he.current || k.current)) {
507
+ if (le.current = !1, m.current !== null) {
508
+ if (m.current < j.current.length) {
509
+ A(m.current, "external-resume");
453
510
  return;
454
511
  }
455
- l.current = !0, u(!0, "waitingForMoreAudio");
512
+ c.current = !0, l(!0, "waitingForMoreAudio");
456
513
  return;
457
514
  }
458
515
  if (!E.current && j.current.length > 0) {
459
- v(
516
+ A(
460
517
  Math.min(
461
518
  K.current,
462
519
  j.current.length - 1
@@ -465,470 +522,496 @@ const _t = /* @__PURE__ */ new Map(), xt = (R) => {
465
522
  );
466
523
  return;
467
524
  }
468
- e.paused && (l.current = !0, M("external-resume"));
525
+ e.paused && (c.current = !0, L("external-resume"));
469
526
  }
470
527
  }
471
528
  }, [
472
- T,
473
- v,
474
- M,
475
- u
476
- ]), y(() => {
477
- const e = _.current;
529
+ x,
530
+ A,
531
+ L,
532
+ l
533
+ ]), S(() => {
534
+ const e = M.current;
478
535
  if (!e)
479
536
  return;
480
- if (!o) {
481
- G();
537
+ if (!p) {
538
+ I();
482
539
  return;
483
540
  }
484
- if (T) {
485
- l.current = !1, u(!1), e.pause(), d(!1);
541
+ if (x) {
542
+ c.current = !1, l(!1), e.pause(), h(!1);
486
543
  return;
487
544
  }
488
- const t = nr({
545
+ const t = yr({
489
546
  activeSourceType: U.current,
490
- hasAudioUrl: !!g,
491
- segmentCount: w.length,
492
- preferredSourceType: Z.current,
493
- waitingSegmentIndex: f.current
547
+ hasAudioUrl: !!T,
548
+ segmentCount: R.length,
549
+ preferredSourceType: z.current,
550
+ waitingSegmentIndex: m.current
494
551
  });
495
- if (t && Z.current !== t && (Z.current = t), t === "url" && g) {
496
- const s = E.current !== g, i = V();
552
+ if (t && z.current !== t && (z.current = t), t === "url" && T) {
553
+ const s = E.current !== T, u = H();
497
554
  if (s) {
498
- const p = f.current !== null ? ct() : 0;
499
- e.pause(), e.removeAttribute("src"), e.load(), E.current = g, U.current = "url", e.src = g, e.load(), S.current = p, x(p * 1e3), e.readyState > 0 && (e.currentTime = p, S.current = null);
555
+ const b = m.current !== null ? xt() : 0;
556
+ e.pause(), e.removeAttribute("src"), e.load(), E.current = T, U.current = "url", e.src = T, e.load(), w.current = b, C(b * 1e3), e.readyState > 0 && (e.currentTime = b, w.current = null);
500
557
  }
501
- if (l.current = i, A.current = !1, C.current = !1, u(!1), !i) {
502
- l.current = !1, e.pause(), d(!1);
558
+ if (c.current = u, v.current = !1, N.current = !1, l(!1), !u) {
559
+ c.current = !1, e.pause(), h(!1);
503
560
  return;
504
561
  }
505
- M(s ? "sync-url-init" : "sync-url");
562
+ L(s ? "sync-url-init" : "sync-url");
506
563
  return;
507
564
  }
508
- if (t === "segment" && f.current !== null) {
509
- if (f.current < w.length) {
510
- if (b.current) {
511
- d(!1), u(!1);
565
+ if (t === "segment" && m.current !== null) {
566
+ if (m.current < R.length) {
567
+ if (k.current) {
568
+ h(!1), l(!1);
512
569
  return;
513
570
  }
514
- v(f.current, "wait-resume");
571
+ A(m.current, "wait-resume");
515
572
  return;
516
573
  }
517
- A.current = !0, l.current = V(), d(!1), u(V());
574
+ v.current = !0, c.current = H(), h(!1), l(H());
518
575
  return;
519
576
  }
520
- if (t === "segment" && !w.length) {
521
- if (o.isAudioStreaming) {
522
- f.current = K.current, A.current = !0, l.current = V(), d(!1), u(V());
577
+ if (t === "segment" && !R.length) {
578
+ if (p.isAudioStreaming) {
579
+ m.current = K.current, v.current = !0, c.current = H(), h(!1), l(H());
523
580
  return;
524
581
  }
525
- G();
582
+ I();
526
583
  return;
527
584
  }
528
585
  if (t === "segment" && !E.current) {
529
- v(
586
+ A(
530
587
  Math.min(
531
588
  K.current,
532
- w.length - 1
589
+ R.length - 1
533
590
  ),
534
591
  "effect-init"
535
592
  );
536
593
  return;
537
594
  }
538
595
  if (t !== "segment") {
539
- G();
596
+ I();
540
597
  return;
541
598
  }
542
- if (!L || b.current) {
543
- l.current = !1, e.pause(), d(!1);
599
+ if (!_ || k.current) {
600
+ c.current = !1, e.pause(), h(!1);
544
601
  return;
545
602
  }
546
- e.paused && (l.current = !0, M("sync-paused-retry"));
603
+ e.paused && (c.current = !0, L("sync-paused-retry"));
547
604
  }, [
548
- o,
549
- k,
550
- w,
551
- g,
552
- L,
605
+ p,
606
+ a,
607
+ R,
553
608
  T,
554
- V,
609
+ _,
555
610
  x,
556
- G,
557
- v,
558
- M,
559
- ct,
560
- u
561
- ]), y(() => G, [G]), y(() => h, [h]);
562
- const Nt = r(() => {
563
- m(), ft(), d(!0), u(!1), Ne?.();
611
+ H,
612
+ C,
613
+ I,
614
+ A,
615
+ L,
616
+ xt,
617
+ l
618
+ ]), S(() => {
619
+ if (!O || O.id === rt.current || O.audioIndex !== a)
620
+ return;
621
+ const e = f[O.audioIndex];
622
+ xe(e, O.timeMs) && (rt.current = O.id, we(O.timeMs));
564
623
  }, [
565
- Ne,
566
- ft,
567
- m,
568
- u
569
- ]), Et = r(() => {
570
- A.current || C.current || (h(), m(), d(!1));
571
- }, [k, h, m]), Kt = r(() => {
572
- const e = _.current;
573
- e && S.current !== null && (e.currentTime = S.current, S.current = null), m(), !Se("canplay-seek-finished") && (!l.current || !L || M("canplay"));
624
+ f,
625
+ xe,
626
+ a,
627
+ we,
628
+ O
629
+ ]), S(() => I, [I]), S(() => g, [g]);
630
+ const Zt = r(() => {
631
+ y(), kt(), h(!0), l(!1), Oe?.();
574
632
  }, [
575
- k,
576
- L,
577
- Se,
578
- m,
579
- M
580
- ]), Ut = r(() => {
581
- const e = _.current;
582
- e && S.current !== null && (e.currentTime = S.current, S.current = null), m(), Se("metadata-seek-finished");
583
- }, [k, Se, m]), Ft = r(() => {
584
- m();
585
- }, [m]), Wt = r(() => {
586
- A.current || u(!0, "loadingAudio");
587
- }, [u]), Pt = r(() => {
588
- if (A.current) {
589
- u(!0, "waitingForMoreAudio");
633
+ Oe,
634
+ kt,
635
+ y,
636
+ l
637
+ ]), zt = r(() => {
638
+ v.current || N.current || (g(), y(), h(!1));
639
+ }, [a, g, y]), Yt = r(() => {
640
+ const e = M.current;
641
+ e && w.current !== null && (e.currentTime = w.current, w.current = null), y(), !Me("canplay-seek-finished") && (!c.current || !_ || L("canplay"));
642
+ }, [
643
+ a,
644
+ _,
645
+ Me,
646
+ y,
647
+ L
648
+ ]), Dt = r(() => {
649
+ const e = M.current;
650
+ e && w.current !== null && (e.currentTime = w.current, w.current = null), y(), Me("metadata-seek-finished");
651
+ }, [a, Me, y]), Gt = r(() => {
652
+ y();
653
+ }, [y]), Qt = r(() => {
654
+ v.current || l(!0, "loadingAudio");
655
+ }, [l]), Xt = r(() => {
656
+ if (v.current) {
657
+ l(!0, "waitingForMoreAudio");
590
658
  return;
591
659
  }
592
- u(!0, "loadingAudio");
593
- }, [u]), pt = r(() => {
594
- m();
595
- }, [m]), Bt = r(() => {
660
+ l(!0, "loadingAudio");
661
+ }, [l]), Mt = r(() => {
662
+ y();
663
+ }, [y]), qt = r(() => {
596
664
  const e = U.current === "url" || j.current.length === 0;
597
- if (h(), C.current = !1, e) {
598
- Q("url-ended");
665
+ if (g(), N.current = !1, e) {
666
+ ee("url-ended");
599
667
  return;
600
668
  }
601
- mt();
602
- }, [Q, mt, h]), Ot = r(() => {
603
- h(), m(), d(!1), u(!1);
604
- }, [h, m, u]), Vt = r(
669
+ wt();
670
+ }, [ee, wt, g]), It = r(() => {
671
+ g(), y(), h(!1), l(!1);
672
+ }, [g, y, l]), er = r(
605
673
  (e) => {
606
- Ke?.(e), D(!1);
674
+ He?.(e), X(!1);
607
675
  },
608
- [Ke]
609
- ), Ae = r(() => {
676
+ [He]
677
+ ), Ke = r(() => {
610
678
  if (F) {
611
- const t = !$;
612
- return B(t), Fe?.(t), !0;
679
+ const t = !Z;
680
+ return B(t), Je?.(t), !0;
613
681
  }
614
- const e = _.current;
615
- return T || !e || !o ? !1 : f.current !== null ? he ? (B(!1), l.current = !1, b.current = !0, f.current = null, A.current = !1, d(!1), u(!1), e.pause(), !0) : (B(!0), W.current = "manual", b.current = !1, l.current = !0, u(!0, "waitingForMoreAudio"), !0) : !e.src && w.length > 0 ? (B(!0), W.current = "manual", b.current = !1, v(
682
+ const e = M.current;
683
+ return x || !e || !p ? !1 : m.current !== null ? Se ? (B(!1), c.current = !1, k.current = !0, m.current = null, v.current = !1, h(!1), l(!1), e.pause(), !0) : (B(!0), P.current = "manual", k.current = !1, c.current = !0, l(!0, "waitingForMoreAudio"), !0) : !e.src && R.length > 0 ? (B(!0), P.current = "manual", k.current = !1, A(
616
684
  Math.min(
617
685
  K.current,
618
- w.length - 1
686
+ R.length - 1
619
687
  ),
620
688
  "toggle"
621
- ), !0) : e.paused ? (B(!0), W.current = "manual", b.current = !1, l.current = !0, M("toggle-resume"), !0) : (B(!1), l.current = !1, b.current = !0, e.pause(), !0);
689
+ ), !0) : e.paused ? (B(!0), P.current = "manual", k.current = !1, c.current = !0, L("toggle-resume"), !0) : (B(!1), c.current = !1, k.current = !0, e.pause(), !0);
622
690
  }, [
623
- o,
624
- w.length,
625
- $,
626
- T,
627
- he,
628
- Fe,
629
- v,
630
- M,
631
- u,
691
+ p,
692
+ R.length,
693
+ Z,
694
+ x,
695
+ Se,
696
+ Je,
697
+ A,
698
+ L,
699
+ l,
632
700
  B,
633
701
  F
634
702
  ]);
635
- y(() => {
636
- if (P)
637
- return Qt(z);
638
- }, [z, P]);
639
- const ve = Y(
703
+ S(() => {
704
+ if (W)
705
+ return dr(D);
706
+ }, [D, W]);
707
+ const Ue = te(
640
708
  () => ({
641
- fullscreen: () => te ? (te(), !0) : !1,
642
- interaction: () => fe ? (_e && fe(), !0) : !1,
643
- next: () => oe ? (we || oe(
644
- St(se())
709
+ fullscreen: () => ne ? (ne(), !0) : !1,
710
+ interaction: () => pe ? (Le && pe(), !0) : !1,
711
+ next: () => de ? (je || de(
712
+ Pe(G())
645
713
  ), !0) : !1,
646
- nextSubtitle: () => X.next ? ae("next") : !0,
647
- previous: () => ce ? (ke || ce(
648
- St(se())
714
+ nextSubtitle: () => q.next ? ie("next") : !0,
715
+ previous: () => fe ? (Ae || fe(
716
+ Pe(G())
649
717
  ), !0) : !1,
650
- previousSubtitle: () => X.previous ? ae("previous") : !0,
651
- subtitle: () => ee ? (ee(), !0) : !1,
652
- togglePlayback: () => (Ae(), !0)
718
+ previousSubtitle: () => q.previous ? ie("previous") : !0,
719
+ subtitle: () => re ? (re(), !0) : !1,
720
+ togglePlayback: () => (Ke(), !0)
653
721
  }),
654
722
  [
655
- se,
656
- _e,
657
- ae,
658
- we,
659
- te,
723
+ G,
724
+ Le,
725
+ ie,
726
+ je,
727
+ ne,
728
+ pe,
729
+ de,
660
730
  fe,
661
- oe,
662
- ce,
663
- ee,
664
- ke,
665
- X.next,
666
- X.previous,
667
- Ae
731
+ re,
732
+ Ae,
733
+ q.next,
734
+ q.previous,
735
+ Ke
668
736
  ]
669
- ), ht = c(ve);
670
- return y(() => {
671
- ht.current = ve;
672
- }, [ve]), y(() => {
673
- if (!P || typeof document > "u")
737
+ ), Ct = o(Ue);
738
+ return S(() => {
739
+ Ct.current = Ue;
740
+ }, [Ue]), S(() => {
741
+ if (!W || typeof document > "u")
674
742
  return;
675
743
  const e = (t) => {
676
- if (!er(z))
744
+ if (!mr(D))
677
745
  return;
678
- const s = tr(t);
679
- if (!s || rr(t, s))
746
+ const s = pr(t);
747
+ if (!s || hr(t, s))
680
748
  return;
681
- let i = !1;
682
- const p = ht.current[s];
683
- i = p(), i && t.preventDefault();
749
+ let u = !1;
750
+ const b = Ct.current[s];
751
+ u = b(), u && t.preventDefault();
684
752
  };
685
753
  return document.addEventListener("keydown", e), () => {
686
754
  document.removeEventListener("keydown", e);
687
755
  };
688
- }, [z, P]), y(() => {
689
- ie?.(me.current);
690
- }, [ie]), /* @__PURE__ */ n.jsxs(
756
+ }, [D, W]), S(() => {
757
+ oe?.(ye.current);
758
+ }, [oe]), /* @__PURE__ */ n.jsxs(
691
759
  "div",
692
760
  {
693
- ...Lt,
694
- "data-slide-player-shortcut-owner": z,
695
- className: bt("slide-player", N),
696
- onFocusCapture: Ct,
697
- onPointerDown: jt,
761
+ ...Pt,
762
+ "data-slide-player-shortcut-owner": D,
763
+ className: Lt("slide-player", d),
764
+ onFocusCapture: Jt,
765
+ onPointerDown: $t,
698
766
  children: [
699
767
  /* @__PURE__ */ n.jsx(
700
768
  "audio",
701
769
  {
702
- ref: _,
770
+ ref: M,
703
771
  preload: "auto",
704
772
  playsInline: !0,
705
- onLoadStart: Wt,
706
- onLoadedMetadata: Ut,
707
- onCanPlay: Kt,
708
- onPlay: Nt,
709
- onPause: Et,
710
- onWaiting: Pt,
711
- onSeeking: pt,
712
- onSeeked: pt,
713
- onTimeUpdate: Ft,
714
- onEnded: Bt,
715
- onError: Ot
773
+ onLoadStart: Qt,
774
+ onLoadedMetadata: Dt,
775
+ onCanPlay: Yt,
776
+ onPlay: Zt,
777
+ onPause: zt,
778
+ onWaiting: Xt,
779
+ onSeeking: Mt,
780
+ onSeeked: Mt,
781
+ onTimeUpdate: Gt,
782
+ onEnded: qt,
783
+ onError: It
716
784
  }
717
785
  ),
718
- Me ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
786
+ Ne ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
719
787
  /* @__PURE__ */ n.jsx(
720
- zt,
788
+ lr,
721
789
  {
722
- container: wt,
790
+ container: Et,
723
791
  labels: {
724
- closeSettings: a.closeSettingsLabel,
725
- fullscreen: a.fullscreenLabel,
726
- nonFullscreen: a.nonFullscreenLabel,
727
- screen: a.screenLabel,
728
- screenMode: a.screenModeLabel,
729
- subtitle: a.subtitleLabel,
730
- subtitleToggle: a.subtitleToggleAriaLabel,
731
- title: a.settingsTitle
792
+ closeSettings: i.closeSettingsLabel,
793
+ fullscreen: i.fullscreenLabel,
794
+ nonFullscreen: i.nonFullscreenLabel,
795
+ screen: i.screenLabel,
796
+ screenMode: i.screenModeLabel,
797
+ subtitle: i.subtitleLabel,
798
+ subtitleToggle: i.subtitleToggleAriaLabel,
799
+ title: i.settingsTitle
732
800
  },
733
- isSubtitleEnabled: xe,
734
- onClose: () => D(!1),
735
- onOpenChange: D,
736
- onSubtitleToggle: ee ?? (() => {
801
+ isSubtitleEnabled: ve,
802
+ onClose: () => X(!1),
803
+ onOpenChange: X,
804
+ onSubtitleToggle: re ?? (() => {
737
805
  }),
738
- onViewModeChange: Vt,
739
- open: ze,
740
- viewMode: kt
806
+ onViewModeChange: er,
807
+ open: ut,
808
+ viewMode: Rt
741
809
  }
742
810
  ),
743
- /* @__PURE__ */ n.jsxs("div", { className: "slide-player__controls", style: vt, children: [
744
- /* @__PURE__ */ n.jsxs("div", { className: "slide-player__group", children: [
745
- /* @__PURE__ */ n.jsx(
746
- "button",
747
- {
748
- "aria-expanded": ze,
749
- "aria-haspopup": "dialog",
750
- "aria-label": a.moreOptionsAriaLabel,
751
- className: "slide-player__action slide-player__action--mobile-more",
752
- onClick: () => {
753
- D((e) => !e);
754
- },
755
- type: "button",
756
- children: /* @__PURE__ */ n.jsx(
757
- ir,
811
+ /* @__PURE__ */ n.jsxs(
812
+ "div",
813
+ {
814
+ className: "slide-player__controls",
815
+ onPointerEnter: Kt,
816
+ onPointerLeave: Ut,
817
+ style: Vt,
818
+ children: [
819
+ /* @__PURE__ */ n.jsxs("div", { className: "slide-player__group", children: [
820
+ /* @__PURE__ */ n.jsx(
821
+ "button",
758
822
  {
759
- className: "slide-player__icon",
760
- strokeWidth: 2.25
823
+ "aria-expanded": ut,
824
+ "aria-haspopup": "dialog",
825
+ "aria-label": i.moreOptionsAriaLabel,
826
+ className: "slide-player__action slide-player__action--mobile-more",
827
+ onClick: () => {
828
+ X((e) => !e);
829
+ },
830
+ type: "button",
831
+ children: /* @__PURE__ */ n.jsx(
832
+ kr,
833
+ {
834
+ className: "slide-player__icon",
835
+ strokeWidth: 2.25
836
+ }
837
+ )
761
838
  }
762
- )
763
- }
764
- ),
765
- /* @__PURE__ */ n.jsx(
766
- "button",
767
- {
768
- "aria-label": a.volumeAriaLabel,
769
- className: "hidden",
770
- type: "button",
771
- children: /* @__PURE__ */ n.jsx(cr, { className: "slide-player__icon", strokeWidth: 2.25 })
772
- }
773
- ),
774
- /* @__PURE__ */ n.jsx(
775
- "button",
776
- {
777
- "aria-label": a.subtitleToggleAriaLabel,
778
- "aria-keyshortcuts": Qe.ariaKeyShortcuts,
779
- "aria-pressed": xe,
780
- className: "slide-player__action slide-player__action--subtitle",
781
- onClick: ee,
782
- title: Qe.title,
783
- type: "button",
784
- children: xe ? /* @__PURE__ */ n.jsx(or, { className: "slide-player__icon", strokeWidth: 2.25 }) : /* @__PURE__ */ n.jsx(
785
- fr,
839
+ ),
840
+ /* @__PURE__ */ n.jsx(
841
+ "button",
786
842
  {
787
- className: "slide-player__icon",
788
- strokeWidth: 2.25
843
+ "aria-label": i.volumeAriaLabel,
844
+ className: "hidden",
845
+ type: "button",
846
+ children: /* @__PURE__ */ n.jsx(wr, { className: "slide-player__icon", strokeWidth: 2.25 })
789
847
  }
790
- )
791
- }
792
- ),
793
- /* @__PURE__ */ n.jsx(
794
- "button",
795
- {
796
- "aria-keyshortcuts": tt.ariaKeyShortcuts,
797
- "aria-label": a.previousSubtitleLabel,
798
- className: "slide-player__action slide-player__action--prev-subtitle",
799
- disabled: !X.previous,
800
- onClick: () => {
801
- ae("previous");
802
- },
803
- title: tt.title,
804
- type: "button",
805
- children: /* @__PURE__ */ n.jsx(dr, { className: "slide-player__icon", strokeWidth: 2.25 })
806
- }
807
- ),
808
- /* @__PURE__ */ n.jsx(
809
- "button",
810
- {
811
- "aria-keyshortcuts": et.ariaKeyShortcuts,
812
- "aria-label": a.previousLabel,
813
- className: "slide-player__action slide-player__action--prev",
814
- disabled: ke,
815
- onClick: () => {
816
- ce?.(se());
817
- },
818
- title: et.title,
819
- type: "button",
820
- children: /* @__PURE__ */ n.jsx(mr, { className: "slide-player__icon", strokeWidth: 2.25 })
821
- }
822
- ),
823
- /* @__PURE__ */ n.jsx(
824
- "button",
825
- {
826
- "aria-label": Xe,
827
- "aria-keyshortcuts": rt.ariaKeyShortcuts,
828
- className: "slide-player__toggle slide-player__toggle--playback",
829
- onClick: () => {
830
- Ae();
831
- },
832
- title: rt.title,
833
- type: "button",
834
- children: Rt ? /* @__PURE__ */ n.jsx(gr, {}) : /* @__PURE__ */ n.jsx(_r, {})
835
- }
836
- ),
837
- /* @__PURE__ */ n.jsx(
838
- "button",
839
- {
840
- "aria-keyshortcuts": nt.ariaKeyShortcuts,
841
- "aria-label": a.nextLabel,
842
- className: "slide-player__action slide-player__action--next",
843
- disabled: we,
844
- onClick: () => {
845
- oe?.(se());
846
- },
847
- title: nt.title,
848
- type: "button",
849
- children: /* @__PURE__ */ n.jsx(pr, { className: "slide-player__icon", strokeWidth: 2.25 })
850
- }
851
- ),
852
- /* @__PURE__ */ n.jsx(
853
- "button",
854
- {
855
- "aria-keyshortcuts": ut.ariaKeyShortcuts,
856
- "aria-label": a.nextSubtitleLabel,
857
- className: "slide-player__action slide-player__action--next-subtitle",
858
- disabled: !X.next,
859
- onClick: () => {
860
- ae("next");
861
- },
862
- title: ut.title,
863
- type: "button",
864
- children: /* @__PURE__ */ n.jsx(
865
- hr,
848
+ ),
849
+ /* @__PURE__ */ n.jsx(
850
+ "button",
866
851
  {
867
- className: "slide-player__icon",
868
- strokeWidth: 2.25
852
+ "aria-label": it,
853
+ "aria-keyshortcuts": pt.ariaKeyShortcuts,
854
+ className: "slide-player__toggle slide-player__toggle--playback",
855
+ onClick: () => {
856
+ Ke();
857
+ },
858
+ title: pt.title,
859
+ type: "button",
860
+ children: Ht ? /* @__PURE__ */ n.jsx(Ur, {}) : /* @__PURE__ */ n.jsx(Fr, {})
869
861
  }
870
- )
871
- }
872
- ),
873
- te ? /* @__PURE__ */ n.jsx(
874
- "button",
875
- {
876
- "aria-label": Ge,
877
- "aria-keyshortcuts": st.ariaKeyShortcuts,
878
- className: "slide-player__action slide-player__action--fullscreen",
879
- onClick: te,
880
- title: st.title,
881
- type: "button",
882
- children: Ee ? /* @__PURE__ */ n.jsx(
883
- yr,
862
+ ),
863
+ /* @__PURE__ */ n.jsx(
864
+ "button",
884
865
  {
885
- className: "slide-player__icon",
886
- strokeWidth: 2.25
866
+ "aria-keyshortcuts": dt.ariaKeyShortcuts,
867
+ "aria-label": i.previousLabel,
868
+ className: "slide-player__action slide-player__action--prev",
869
+ disabled: Ae,
870
+ onClick: () => {
871
+ fe?.(G());
872
+ },
873
+ title: dt.title,
874
+ type: "button",
875
+ children: /* @__PURE__ */ n.jsx(Mr, { className: "slide-player__icon", strokeWidth: 2.25 })
887
876
  }
888
- ) : /* @__PURE__ */ n.jsx(
889
- br,
877
+ ),
878
+ /* @__PURE__ */ n.jsx(
879
+ "button",
890
880
  {
891
- className: "slide-player__icon",
892
- strokeWidth: 2.25
881
+ "aria-keyshortcuts": ht.ariaKeyShortcuts,
882
+ "aria-label": i.nextLabel,
883
+ className: "slide-player__action slide-player__action--next",
884
+ disabled: je,
885
+ onClick: () => {
886
+ de?.(G());
887
+ },
888
+ title: ht.title,
889
+ type: "button",
890
+ children: /* @__PURE__ */ n.jsx(
891
+ Cr,
892
+ {
893
+ className: "slide-player__icon",
894
+ strokeWidth: 2.25
895
+ }
896
+ )
897
+ }
898
+ ),
899
+ /* @__PURE__ */ n.jsx(
900
+ "button",
901
+ {
902
+ "aria-keyshortcuts": mt.ariaKeyShortcuts,
903
+ "aria-label": i.previousSubtitleLabel,
904
+ className: "slide-player__action slide-player__action--prev-subtitle",
905
+ disabled: !q.previous,
906
+ onClick: () => {
907
+ ie("previous");
908
+ },
909
+ title: mt.title,
910
+ type: "button",
911
+ children: /* @__PURE__ */ n.jsx(Tr, { className: "slide-player__icon", strokeWidth: 2.25 })
912
+ }
913
+ ),
914
+ /* @__PURE__ */ n.jsx(
915
+ "button",
916
+ {
917
+ "aria-keyshortcuts": yt.ariaKeyShortcuts,
918
+ "aria-label": i.nextSubtitleLabel,
919
+ className: "slide-player__action slide-player__action--next-subtitle",
920
+ disabled: !q.next,
921
+ onClick: () => {
922
+ ie("next");
923
+ },
924
+ title: yt.title,
925
+ type: "button",
926
+ children: /* @__PURE__ */ n.jsx(
927
+ Lr,
928
+ {
929
+ className: "slide-player__icon",
930
+ strokeWidth: 2.25
931
+ }
932
+ )
933
+ }
934
+ ),
935
+ /* @__PURE__ */ n.jsx(
936
+ "button",
937
+ {
938
+ "aria-label": i.subtitleToggleAriaLabel,
939
+ "aria-keyshortcuts": ft.ariaKeyShortcuts,
940
+ "aria-pressed": ve,
941
+ className: "slide-player__action slide-player__action--subtitle",
942
+ onClick: re,
943
+ title: ft.title,
944
+ type: "button",
945
+ children: ve ? /* @__PURE__ */ n.jsx(vr, { className: "slide-player__icon", strokeWidth: 2.25 }) : /* @__PURE__ */ n.jsx(
946
+ Ar,
947
+ {
948
+ className: "slide-player__icon",
949
+ strokeWidth: 2.25
950
+ }
951
+ )
893
952
  }
894
- )
895
- }
896
- ) : null
897
- ] }),
898
- /* @__PURE__ */ n.jsx("div", { className: "slide-player__separator" }),
899
- /* @__PURE__ */ n.jsxs("div", { className: "slide-player__group", children: [
900
- Ye.map((e, t) => /* @__PURE__ */ n.jsx(Ht.Fragment, { children: e }, `custom-action-${t}`)),
901
- /* @__PURE__ */ n.jsx(
902
- "button",
903
- {
904
- "aria-label": a.notesLabel,
905
- "aria-keyshortcuts": lt.ariaKeyShortcuts,
906
- className: bt(
907
- "slide-player__action slide-player__action--notes",
908
- re && "slide-player__action--active"
909
953
  ),
910
- disabled: !_e,
911
- onClick: fe,
912
- title: lt.title,
913
- type: "button",
914
- children: /* @__PURE__ */ n.jsx(
915
- Sr,
954
+ ne ? /* @__PURE__ */ n.jsx(
955
+ "button",
956
+ {
957
+ "aria-label": ot,
958
+ "aria-keyshortcuts": bt.ariaKeyShortcuts,
959
+ className: "slide-player__action slide-player__action--fullscreen",
960
+ onClick: ne,
961
+ title: bt.title,
962
+ type: "button",
963
+ children: Ve ? /* @__PURE__ */ n.jsx(
964
+ jr,
965
+ {
966
+ className: "slide-player__icon",
967
+ strokeWidth: 2.25
968
+ }
969
+ ) : /* @__PURE__ */ n.jsx(
970
+ Nr,
971
+ {
972
+ className: "slide-player__icon",
973
+ strokeWidth: 2.25
974
+ }
975
+ )
976
+ }
977
+ ) : null
978
+ ] }),
979
+ /* @__PURE__ */ n.jsx("div", { className: "slide-player__separator" }),
980
+ /* @__PURE__ */ n.jsxs("div", { className: "slide-player__group", children: [
981
+ at.map((e, t) => /* @__PURE__ */ n.jsx(rr.Fragment, { children: e }, `custom-action-${t}`)),
982
+ /* @__PURE__ */ n.jsx(
983
+ "button",
916
984
  {
917
- className: "slide-player__icon",
918
- strokeWidth: 2.25
985
+ "aria-label": i.notesLabel,
986
+ "aria-keyshortcuts": St.ariaKeyShortcuts,
987
+ className: Lt(
988
+ "slide-player__action slide-player__action--notes",
989
+ ue && "slide-player__action--active"
990
+ ),
991
+ disabled: !Le,
992
+ onClick: pe,
993
+ title: St.title,
994
+ type: "button",
995
+ children: /* @__PURE__ */ n.jsx(
996
+ Rr,
997
+ {
998
+ className: "slide-player__icon",
999
+ strokeWidth: 2.25
1000
+ }
1001
+ )
919
1002
  }
920
1003
  )
921
- }
922
- )
923
- ] })
924
- ] })
1004
+ ] })
1005
+ ]
1006
+ }
1007
+ )
925
1008
  ] }) : null
926
1009
  ]
927
1010
  }
928
1011
  );
929
- }, Mr = $t(wr);
930
- Mr.displayName = "Player";
1012
+ }, Or = nr(Br);
1013
+ Or.displayName = "Player";
931
1014
  export {
932
- Mr as default
1015
+ Or as default
933
1016
  };
934
1017
  //# sourceMappingURL=Player.es.js.map