markdown-flow-ui 0.1.124 → 0.1.126
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.
- package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.js +1 -1
- package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.js.map +1 -1
- package/dist/components/Slide/MobilePlayerSettingsSheet.d.ts +2 -0
- package/dist/components/Slide/MobilePlayerSettingsSheet.es.js +7 -6
- package/dist/components/Slide/MobilePlayerSettingsSheet.es.js.map +1 -1
- package/dist/components/Slide/Player.cjs.js +1 -1
- package/dist/components/Slide/Player.cjs.js.map +1 -1
- package/dist/components/Slide/Player.d.ts +39 -1
- package/dist/components/Slide/Player.es.js +599 -469
- package/dist/components/Slide/Player.es.js.map +1 -1
- package/dist/components/Slide/Slide.cjs.js +1 -1
- package/dist/components/Slide/Slide.cjs.js.map +1 -1
- package/dist/components/Slide/Slide.d.ts +13 -0
- package/dist/components/Slide/Slide.es.js +535 -506
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/constants.cjs.js +1 -1
- package/dist/components/Slide/constants.cjs.js.map +1 -1
- package/dist/components/Slide/constants.d.ts +13 -0
- package/dist/components/Slide/constants.es.js +13 -0
- package/dist/components/Slide/constants.es.js.map +1 -1
- package/dist/components/Slide/useWakePlayerFromIframe.cjs.js +1 -1
- package/dist/components/Slide/useWakePlayerFromIframe.cjs.js.map +1 -1
- package/dist/components/Slide/useWakePlayerFromIframe.d.ts +14 -1
- package/dist/components/Slide/useWakePlayerFromIframe.es.js +73 -39
- package/dist/components/Slide/useWakePlayerFromIframe.es.js.map +1 -1
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.cjs.js +2 -0
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.cjs.js.map +1 -0
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.d.ts +5 -0
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.es.js +6 -0
- package/dist/components/Slide/utils/playerKeyboardShortcutContext.es.js.map +1 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.js +2 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.js.map +1 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.d.ts +19 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js +58 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js.map +1 -0
- package/dist/components/Slide/utils/playerKeyboardShortcuts.test.d.ts +1 -0
- package/dist/components/Slide/utils/playerNavigationContext.cjs.js +2 -0
- package/dist/components/Slide/utils/playerNavigationContext.cjs.js.map +1 -0
- package/dist/components/Slide/utils/playerNavigationContext.d.ts +7 -0
- package/dist/components/Slide/utils/playerNavigationContext.es.js +9 -0
- package/dist/components/Slide/utils/playerNavigationContext.es.js.map +1 -0
- package/dist/components/Slide/utils/playerNavigationContext.test.d.ts +1 -0
- package/package.json +2 -1
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
4
|
-
import
|
|
5
|
-
import { DEFAULT_SLIDE_PLAYER_TEXTS as
|
|
6
|
-
import { DEFAULT_MOBILE_VIEW_MODE as
|
|
7
|
-
import { hasReachedAudioEnd as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
1
|
+
import { j as n } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
+
import Rr, { memo as Er, useId as Cr, useContext as Nr, useRef as c, useState as nr, useMemo as G, useCallback as t, useEffect as m } from "react";
|
|
3
|
+
import { cn as ur } from "../../lib/utils.es.js";
|
|
4
|
+
import vr from "./MobilePlayerSettingsSheet.es.js";
|
|
5
|
+
import { DEFAULT_SLIDE_PLAYER_TEXTS as Tr } from "./constants.es.js";
|
|
6
|
+
import { DEFAULT_MOBILE_VIEW_MODE as Kr } from "./utils/mobileScreenMode.es.js";
|
|
7
|
+
import { hasReachedAudioEnd as Pr } from "./utils/audioCompletion.es.js";
|
|
8
|
+
import { PlayerKeyboardShortcutContext as Ur } from "./utils/playerKeyboardShortcutContext.es.js";
|
|
9
|
+
import { activatePlayerKeyboardShortcutOwner as Fr, registerPlayerKeyboardShortcutOwner as Wr, isActivePlayerKeyboardShortcutOwner as Or, getPlayerKeyboardShortcutAction as Br, shouldIgnorePlayerKeyboardShortcutEvent as Vr } from "./utils/playerKeyboardShortcuts.es.js";
|
|
10
|
+
import { resolveAudioPlaybackSourceType as Hr } from "./utils/playbackSource.es.js";
|
|
11
|
+
import { shouldKeepPlayingAfterNavigation as $r } from "./utils/playbackPreference.es.js";
|
|
12
|
+
import { toPlayerCustomActionList as Zr } from "./utils/playerCustomActions.es.js";
|
|
13
|
+
import { suppressPlayerControlsWakeAfterNavigation as ar } from "./utils/playerNavigationContext.es.js";
|
|
11
14
|
/* empty css */
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
const
|
|
22
|
-
if (typeof window > "u" || !
|
|
15
|
+
import qr from "../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js";
|
|
16
|
+
import zr from "../../node_modules/lucide-react/dist/esm/icons/volume-2.es.js";
|
|
17
|
+
import Yr from "../../node_modules/lucide-react/dist/esm/icons/captions.es.js";
|
|
18
|
+
import Dr from "../../node_modules/lucide-react/dist/esm/icons/captions-off.es.js";
|
|
19
|
+
import Xr from "../../node_modules/lucide-react/dist/esm/icons/rotate-ccw.es.js";
|
|
20
|
+
import Gr from "../../node_modules/lucide-react/dist/esm/icons/rotate-cw.es.js";
|
|
21
|
+
import Jr from "../../node_modules/lucide-react/dist/esm/icons/scan-line.es.js";
|
|
22
|
+
import Qr from "../../node_modules/lucide-react/dist/esm/icons/maximize.es.js";
|
|
23
|
+
import Ir from "../../node_modules/lucide-react/dist/esm/icons/file-pen-line.es.js";
|
|
24
|
+
const sr = /* @__PURE__ */ new Map(), lr = (k) => {
|
|
25
|
+
if (typeof window > "u" || !k || sr.has(k))
|
|
23
26
|
return;
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
+
const j = window.document.createElement("audio");
|
|
28
|
+
j.preload = "auto", j.setAttribute("playsinline", "true"), j.src = k, j.load(), sr.set(k, j);
|
|
29
|
+
}, et = () => /* @__PURE__ */ n.jsxs(
|
|
27
30
|
"svg",
|
|
28
31
|
{
|
|
29
32
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -32,17 +35,17 @@ const ve = /* @__PURE__ */ new Map(), Fe = (R) => {
|
|
|
32
35
|
viewBox: "0 0 34 34",
|
|
33
36
|
fill: "none",
|
|
34
37
|
children: [
|
|
35
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ n.jsx(
|
|
36
39
|
"path",
|
|
37
40
|
{
|
|
38
41
|
d: "M16.6667 33.3333C25.8714 33.3333 33.3333 25.8714 33.3333 16.6667C33.3333 7.46192 25.8714 0 16.6667 0C7.46192 0 0 7.46192 0 16.6667C0 25.8714 7.46192 33.3333 16.6667 33.3333Z",
|
|
39
42
|
fill: "#0A0A0A"
|
|
40
43
|
}
|
|
41
44
|
),
|
|
42
|
-
/* @__PURE__ */
|
|
45
|
+
/* @__PURE__ */ n.jsx("path", { d: "M12 10H16V24H12V10ZM18 10H22V24H18V10Z", fill: "white" })
|
|
43
46
|
]
|
|
44
47
|
}
|
|
45
|
-
),
|
|
48
|
+
), rt = () => /* @__PURE__ */ n.jsxs(
|
|
46
49
|
"svg",
|
|
47
50
|
{
|
|
48
51
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -51,320 +54,372 @@ const ve = /* @__PURE__ */ new Map(), Fe = (R) => {
|
|
|
51
54
|
viewBox: "0 0 34 34",
|
|
52
55
|
fill: "none",
|
|
53
56
|
children: [
|
|
54
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ n.jsx(
|
|
55
58
|
"path",
|
|
56
59
|
{
|
|
57
60
|
d: "M16.6667 33.3333C25.8714 33.3333 33.3333 25.8714 33.3333 16.6667C33.3333 7.46192 25.8714 0 16.6667 0C7.46192 0 0 7.46192 0 16.6667C0 25.8714 7.46192 33.3333 16.6667 33.3333Z",
|
|
58
61
|
fill: "#0A0A0A"
|
|
59
62
|
}
|
|
60
63
|
),
|
|
61
|
-
/* @__PURE__ */
|
|
64
|
+
/* @__PURE__ */ n.jsx("path", { d: "M13.3333 10L23.3333 16.6667L13.3333 23.3333V10Z", fill: "white" })
|
|
62
65
|
]
|
|
63
66
|
}
|
|
64
|
-
),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
), J = {
|
|
68
|
+
fullscreen: "F",
|
|
69
|
+
next: "→",
|
|
70
|
+
notes: "N",
|
|
71
|
+
playback: "Space",
|
|
72
|
+
previous: "←",
|
|
73
|
+
subtitle: "C"
|
|
74
|
+
}, tt = (k, j) => k ? `${k} (${j})` : j, nt = ({
|
|
75
|
+
audioList: k = [],
|
|
76
|
+
className: j,
|
|
77
|
+
currentAudioIndex: h = -1,
|
|
68
78
|
defaultPlaying: g = !0,
|
|
69
|
-
isPlaybackPaused:
|
|
70
|
-
isAutoAdvanceEnabled:
|
|
71
|
-
useAutoAdvanceToggle:
|
|
72
|
-
onLoadingChange:
|
|
73
|
-
onPlaybackPreferenceChange:
|
|
74
|
-
onPlaybackStarted:
|
|
75
|
-
onPlaybackTimeChange:
|
|
76
|
-
onSubtitleToggle:
|
|
77
|
-
onPrev:
|
|
78
|
-
onNext:
|
|
79
|
-
onFullscreen:
|
|
80
|
-
isFullscreen:
|
|
81
|
-
mobileViewMode:
|
|
82
|
-
settingsPortalContainer:
|
|
83
|
-
onMobileViewModeChange:
|
|
84
|
-
onEnded:
|
|
85
|
-
onAutoAdvanceToggle:
|
|
86
|
-
onInteractionToggle:
|
|
87
|
-
hasInteraction:
|
|
88
|
-
isInteractionOpen:
|
|
89
|
-
isSubtitleEnabled:
|
|
90
|
-
prevDisabled:
|
|
91
|
-
nextDisabled:
|
|
92
|
-
showControls:
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
79
|
+
isPlaybackPaused: K = !1,
|
|
80
|
+
isAutoAdvanceEnabled: O = !0,
|
|
81
|
+
useAutoAdvanceToggle: N = !1,
|
|
82
|
+
onLoadingChange: xe,
|
|
83
|
+
onPlaybackPreferenceChange: ke,
|
|
84
|
+
onPlaybackStarted: Me,
|
|
85
|
+
onPlaybackTimeChange: ne,
|
|
86
|
+
onSubtitleToggle: Q,
|
|
87
|
+
onPrev: ue,
|
|
88
|
+
onNext: ae,
|
|
89
|
+
onFullscreen: I,
|
|
90
|
+
isFullscreen: Le = !1,
|
|
91
|
+
mobileViewMode: cr = Kr,
|
|
92
|
+
settingsPortalContainer: or,
|
|
93
|
+
onMobileViewModeChange: Ae,
|
|
94
|
+
onEnded: je,
|
|
95
|
+
onAutoAdvanceToggle: Re,
|
|
96
|
+
onInteractionToggle: se,
|
|
97
|
+
hasInteraction: me = !1,
|
|
98
|
+
isInteractionOpen: ee = !1,
|
|
99
|
+
isSubtitleEnabled: pe = !0,
|
|
100
|
+
prevDisabled: he = !1,
|
|
101
|
+
nextDisabled: ye = !1,
|
|
102
|
+
showControls: be = !0,
|
|
103
|
+
enableKeyboardShortcuts: ir = !0,
|
|
104
|
+
customActions: Ee,
|
|
105
|
+
customActionContext: Ce,
|
|
106
|
+
texts: Ne,
|
|
107
|
+
onFocusCapture: ve,
|
|
108
|
+
onPointerDown: Te,
|
|
109
|
+
...fr
|
|
97
110
|
}) => {
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
),
|
|
101
|
-
() => [...
|
|
111
|
+
const dr = Cr(), Ke = Nr(Ur), y = c(null), Pe = c(ee), P = c(null), Ue = c(null), R = c(0), o = c(null), le = c(void 0), v = c([]), ce = c(
|
|
112
|
+
N ? O : g
|
|
113
|
+
), re = c(!1), Fe = c(!1), b = c(!1), U = c(null), q = c(null), _ = c(!1), s = c(!1), S = c(null), E = c(!1), B = c(null), Se = c(0), F = c("unknown"), [oe, f] = nr(g), [We, z] = nr(!1), V = Ke?.ownerId ?? dr, T = ir && (Ke?.enabled ?? !0), d = h >= 0 ? k[h] : void 0, H = d?.audioUrl, M = G(
|
|
114
|
+
() => [...d?.audioSegments ?? []].sort(
|
|
102
115
|
(e, r) => e.segment_index - r.segment_index
|
|
103
116
|
),
|
|
104
|
-
[
|
|
105
|
-
),
|
|
106
|
-
() =>
|
|
107
|
-
[
|
|
108
|
-
),
|
|
117
|
+
[d?.audioSegments]
|
|
118
|
+
), Oe = G(
|
|
119
|
+
() => Zr(Ee, Ce),
|
|
120
|
+
[Ce, Ee]
|
|
121
|
+
), Be = Oe.length + 5, mr = G(
|
|
109
122
|
() => ({
|
|
110
|
-
"--slide-player-mobile-control-count": String(
|
|
123
|
+
"--slide-player-mobile-control-count": String(Be)
|
|
111
124
|
}),
|
|
112
|
-
[
|
|
113
|
-
),
|
|
125
|
+
[Be]
|
|
126
|
+
), l = G(
|
|
114
127
|
() => ({
|
|
115
|
-
...
|
|
116
|
-
...
|
|
128
|
+
...Tr,
|
|
129
|
+
...Ne
|
|
117
130
|
}),
|
|
118
|
-
[
|
|
119
|
-
),
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
131
|
+
[Ne]
|
|
132
|
+
), ge = G(() => d ? d.audioKey ?? `${String(d.sequenceNumber ?? "none")}:${String(d.audioUrl ?? "")}` : "none", [d]), pr = N ? O : oe, Ve = N ? O ? l.pauseAutoplayLabel : l.playAutoplayLabel : oe ? l.pauseLabel : l.playLabel, He = Le ? l.exitFullscreenLabel : l.enterFullscreenLabel, Y = t(
|
|
133
|
+
(e, r, a) => ({
|
|
134
|
+
ariaKeyShortcuts: T ? a : void 0,
|
|
135
|
+
title: T ? tt(e, r) : e
|
|
136
|
+
}),
|
|
137
|
+
[T]
|
|
138
|
+
), $e = Y(
|
|
139
|
+
l.subtitleToggleAriaLabel,
|
|
140
|
+
J.subtitle,
|
|
141
|
+
"c"
|
|
142
|
+
), Ze = Y(
|
|
143
|
+
l.previousLabel,
|
|
144
|
+
J.previous,
|
|
145
|
+
"ArrowLeft"
|
|
146
|
+
), qe = Y(
|
|
147
|
+
Ve,
|
|
148
|
+
J.playback,
|
|
149
|
+
"Space"
|
|
150
|
+
), ze = Y(
|
|
151
|
+
l.nextLabel,
|
|
152
|
+
J.next,
|
|
153
|
+
"ArrowRight"
|
|
154
|
+
), Ye = Y(
|
|
155
|
+
He,
|
|
156
|
+
J.fullscreen,
|
|
157
|
+
"f"
|
|
158
|
+
), De = Y(
|
|
159
|
+
l.notesLabel,
|
|
160
|
+
J.notes,
|
|
161
|
+
"n"
|
|
162
|
+
), ie = t(() => {
|
|
163
|
+
T && Fr(V);
|
|
164
|
+
}, [V, T]), hr = t(
|
|
165
|
+
(e) => {
|
|
166
|
+
ie(), Te?.(e);
|
|
167
|
+
},
|
|
168
|
+
[ie, Te]
|
|
169
|
+
), yr = t(
|
|
170
|
+
(e) => {
|
|
171
|
+
ie(), ve?.(e);
|
|
172
|
+
},
|
|
173
|
+
[ie, ve]
|
|
174
|
+
);
|
|
175
|
+
m(() => {
|
|
176
|
+
le.current = d;
|
|
177
|
+
}, [d]), m(() => {
|
|
178
|
+
ce.current = N ? O : g;
|
|
179
|
+
}, [g, O, N]), m(() => {
|
|
180
|
+
be || z(!1);
|
|
181
|
+
}, [be]), m(() => {
|
|
182
|
+
!Pe.current && ee && z(!1), Pe.current = ee;
|
|
183
|
+
}, [ee]), m(() => {
|
|
184
|
+
v.current = M;
|
|
185
|
+
}, [M]), m(() => {
|
|
186
|
+
const e = d?.audioUrl, r = h >= 0 ? k[h + 1]?.audioUrl : void 0;
|
|
187
|
+
lr(e), lr(r);
|
|
188
|
+
}, [k, d?.audioUrl, h]);
|
|
189
|
+
const u = t(
|
|
135
190
|
(e, r = null) => {
|
|
136
|
-
|
|
191
|
+
Fe.current === e && (!e || r === null) || (Fe.current = e, xe?.({
|
|
137
192
|
loading: e,
|
|
138
193
|
reason: e ? r : null
|
|
139
194
|
}));
|
|
140
195
|
},
|
|
141
|
-
[
|
|
142
|
-
),
|
|
196
|
+
[xe]
|
|
197
|
+
), $ = t(
|
|
143
198
|
(e) => {
|
|
144
|
-
|
|
199
|
+
ce.current = e, ke?.(e);
|
|
145
200
|
},
|
|
146
|
-
[
|
|
147
|
-
),
|
|
148
|
-
shouldContinuePlayback:
|
|
201
|
+
[ke]
|
|
202
|
+
), te = t(() => N ? {
|
|
203
|
+
shouldContinuePlayback: ce.current
|
|
149
204
|
} : {
|
|
150
|
-
shouldContinuePlayback:
|
|
151
|
-
defaultPlaying:
|
|
152
|
-
isPausedByUser:
|
|
205
|
+
shouldContinuePlayback: $r({
|
|
206
|
+
defaultPlaying: ce.current,
|
|
207
|
+
isPausedByUser: b.current
|
|
153
208
|
})
|
|
154
|
-
}, [
|
|
155
|
-
const e =
|
|
156
|
-
return e == null || e <= 0 ? 0 :
|
|
157
|
-
(r,
|
|
209
|
+
}, [N]), Xe = t((e) => e instanceof DOMException ? e.name === "NotAllowedError" || e.name === "SecurityError" : !1, []), W = t(() => g && !K && !b.current && F.current !== "blocked", [g, K]), Ge = t((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), Je = t(() => {
|
|
210
|
+
const e = o.current;
|
|
211
|
+
return e == null || e <= 0 ? 0 : v.current.slice(0, e).reduce(
|
|
212
|
+
(r, a) => r + Math.max(Number(a.duration_ms ?? 0), 0),
|
|
158
213
|
0
|
|
159
214
|
) / 1e3;
|
|
160
|
-
}, []), Z =
|
|
161
|
-
(r,
|
|
215
|
+
}, []), Z = t((e) => e <= 0 ? 0 : v.current.slice(0, e).reduce(
|
|
216
|
+
(r, a) => r + Math.max(Number(a.duration_ms ?? 0), 0),
|
|
162
217
|
0
|
|
163
|
-
), []),
|
|
164
|
-
const e =
|
|
165
|
-
return e ?
|
|
166
|
-
}, [Z]),
|
|
218
|
+
), []), Qe = t(() => {
|
|
219
|
+
const e = y.current;
|
|
220
|
+
return e ? U.current === "segment" ? Z(R.current) + Math.max(e.currentTime, 0) * 1e3 : S.current !== null && e.readyState === 0 ? S.current * 1e3 : Math.max(e.currentTime, 0) * 1e3 : o.current != null ? Z(o.current) : 0;
|
|
221
|
+
}, [Z]), w = t(
|
|
167
222
|
(e) => {
|
|
168
223
|
const r = Math.max(e, 0);
|
|
169
|
-
|
|
224
|
+
Se.current !== r && (Se.current = r, ne?.(r));
|
|
170
225
|
},
|
|
171
|
-
[
|
|
172
|
-
), i =
|
|
173
|
-
|
|
174
|
-
}, [
|
|
175
|
-
typeof window > "u" ||
|
|
176
|
-
}, []),
|
|
177
|
-
if (typeof window > "u" ||
|
|
226
|
+
[ne]
|
|
227
|
+
), i = t(() => {
|
|
228
|
+
w(Qe());
|
|
229
|
+
}, [Qe, w]), p = t(() => {
|
|
230
|
+
typeof window > "u" || B.current === null || (window.cancelAnimationFrame(B.current), B.current = null);
|
|
231
|
+
}, []), Ie = t(() => {
|
|
232
|
+
if (typeof window > "u" || B.current !== null)
|
|
178
233
|
return;
|
|
179
234
|
const e = () => {
|
|
180
235
|
i();
|
|
181
|
-
const r =
|
|
236
|
+
const r = y.current;
|
|
182
237
|
if (!r || r.paused || r.ended) {
|
|
183
|
-
|
|
238
|
+
B.current = null;
|
|
184
239
|
return;
|
|
185
240
|
}
|
|
186
|
-
|
|
241
|
+
B.current = window.requestAnimationFrame(e);
|
|
187
242
|
};
|
|
188
|
-
|
|
189
|
-
}, [i]),
|
|
190
|
-
const e =
|
|
191
|
-
e && (
|
|
192
|
-
}, [
|
|
243
|
+
B.current = window.requestAnimationFrame(e);
|
|
244
|
+
}, [i]), D = t(() => {
|
|
245
|
+
const e = y.current;
|
|
246
|
+
e && (p(), s.current = !1, b.current = !1, re.current = !1, U.current = null, S.current = null, _.current = !1, E.current = !1, q.current = null, e.pause(), e.removeAttribute("src"), e.load(), P.current = null, R.current = 0, o.current = null, w(0), f(!1), u(!1));
|
|
247
|
+
}, [w, p, u]), L = t(
|
|
193
248
|
(e) => {
|
|
194
|
-
const r =
|
|
249
|
+
const r = y.current;
|
|
195
250
|
if (!r)
|
|
196
251
|
return !1;
|
|
197
|
-
const
|
|
198
|
-
return
|
|
199
|
-
|
|
200
|
-
}).catch((
|
|
201
|
-
|
|
252
|
+
const a = r.play();
|
|
253
|
+
return a && typeof a.then == "function" && a.then(() => {
|
|
254
|
+
F.current === "unknown" && (F.current = "auto"), s.current = !1, E.current = !1;
|
|
255
|
+
}).catch((x) => {
|
|
256
|
+
F.current === "unknown" && Xe(x) && (F.current = "blocked", s.current = !1, u(!1)), E.current = !1, f(!1);
|
|
202
257
|
}), !0;
|
|
203
258
|
},
|
|
204
|
-
[
|
|
205
|
-
),
|
|
259
|
+
[Xe, u]
|
|
260
|
+
), C = t(
|
|
206
261
|
(e, r) => {
|
|
207
|
-
const
|
|
208
|
-
if (!
|
|
262
|
+
const a = y.current, x = v.current[e];
|
|
263
|
+
if (!a || !x)
|
|
209
264
|
return !1;
|
|
210
|
-
const A =
|
|
211
|
-
|
|
212
|
-
const
|
|
213
|
-
s.current =
|
|
214
|
-
const
|
|
215
|
-
return
|
|
265
|
+
const A = Ge(x.audio_data);
|
|
266
|
+
R.current = e, o.current = null, _.current = !1, E.current = !0, q.current = "segment", w(Z(e));
|
|
267
|
+
const de = W();
|
|
268
|
+
s.current = de, u(!1);
|
|
269
|
+
const jr = P.current !== A;
|
|
270
|
+
return U.current = "segment", jr && (a.pause(), a.removeAttribute("src"), a.load(), P.current = A, a.src = A, a.load()), S.current = 0, a.readyState > 0 && (a.currentTime = 0, S.current = null), de ? L(`start-segment:${r}`) : (s.current = !1, E.current = !1, a.pause(), f(!1), !0);
|
|
216
271
|
},
|
|
217
272
|
[
|
|
218
|
-
|
|
219
|
-
|
|
273
|
+
W,
|
|
274
|
+
Ge,
|
|
220
275
|
Z,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
276
|
+
w,
|
|
277
|
+
L,
|
|
278
|
+
u
|
|
224
279
|
]
|
|
225
|
-
),
|
|
280
|
+
), X = t(
|
|
226
281
|
(e) => {
|
|
227
|
-
|
|
282
|
+
p(), s.current = !1, _.current = !1, E.current = !1, i(), f(!1), u(!1), h >= 0 && je?.(h);
|
|
228
283
|
},
|
|
229
284
|
[
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
285
|
+
h,
|
|
286
|
+
je,
|
|
287
|
+
p,
|
|
233
288
|
i,
|
|
234
|
-
|
|
289
|
+
u
|
|
235
290
|
]
|
|
236
|
-
),
|
|
291
|
+
), fe = t(
|
|
237
292
|
(e) => {
|
|
238
|
-
const r =
|
|
239
|
-
return !r ||
|
|
293
|
+
const r = y.current;
|
|
294
|
+
return !r || U.current !== "url" || !Pr({
|
|
240
295
|
currentTimeSeconds: Math.max(r.currentTime, 0),
|
|
241
296
|
durationSeconds: r.duration
|
|
242
|
-
}) ? !1 : (s.current = !1, r.pause(),
|
|
297
|
+
}) ? !1 : (s.current = !1, r.pause(), X(e), !0);
|
|
243
298
|
},
|
|
244
|
-
[
|
|
245
|
-
),
|
|
246
|
-
const e =
|
|
247
|
-
if (
|
|
248
|
-
|
|
299
|
+
[X]
|
|
300
|
+
), er = t(() => {
|
|
301
|
+
const e = R.current + 1, r = v.current, a = r[e], x = le.current, A = r.some((de) => de.is_final);
|
|
302
|
+
if (a) {
|
|
303
|
+
C(e, "ended");
|
|
249
304
|
return;
|
|
250
305
|
}
|
|
251
|
-
if (
|
|
252
|
-
|
|
306
|
+
if (x?.isAudioStreaming || !A) {
|
|
307
|
+
R.current = e, o.current = e, _.current = !0, s.current = g, w(Z(e)), f(!1), u(!0, "waitingForMoreAudio");
|
|
253
308
|
return;
|
|
254
309
|
}
|
|
255
|
-
|
|
310
|
+
X("segments-completed");
|
|
256
311
|
}, [
|
|
257
312
|
g,
|
|
258
|
-
|
|
313
|
+
X,
|
|
259
314
|
Z,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
315
|
+
w,
|
|
316
|
+
C,
|
|
317
|
+
u
|
|
263
318
|
]);
|
|
264
|
-
|
|
265
|
-
if (
|
|
319
|
+
m(() => {
|
|
320
|
+
if (Ue.current === ge)
|
|
266
321
|
return;
|
|
267
|
-
|
|
268
|
-
const e =
|
|
269
|
-
e && (e.pause(), e.removeAttribute("src"), e.load(),
|
|
322
|
+
Ue.current = ge, R.current = 0, o.current = null, _.current = !1, b.current = !1, re.current = !1, s.current = !1, E.current = !1, U.current = null, q.current = null, P.current = null, p(), w(0), u(!1);
|
|
323
|
+
const e = y.current;
|
|
324
|
+
e && (e.pause(), e.removeAttribute("src"), e.load(), f(!1));
|
|
270
325
|
}, [
|
|
271
|
-
|
|
272
|
-
|
|
326
|
+
h,
|
|
327
|
+
ge,
|
|
273
328
|
M.length,
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
]),
|
|
279
|
-
const e =
|
|
329
|
+
H,
|
|
330
|
+
w,
|
|
331
|
+
p,
|
|
332
|
+
u
|
|
333
|
+
]), m(() => {
|
|
334
|
+
const e = y.current;
|
|
280
335
|
if (e) {
|
|
281
|
-
if (
|
|
282
|
-
|
|
336
|
+
if (K) {
|
|
337
|
+
re.current = !!(le.current && !b.current && (!e.paused || s.current || o.current !== null)), s.current = !1, u(!1), e.pause(), f(!1);
|
|
283
338
|
return;
|
|
284
339
|
}
|
|
285
|
-
if (!(!
|
|
286
|
-
if (
|
|
287
|
-
if (
|
|
288
|
-
|
|
340
|
+
if (!(!re.current || !le.current || b.current)) {
|
|
341
|
+
if (re.current = !1, o.current !== null) {
|
|
342
|
+
if (o.current < v.current.length) {
|
|
343
|
+
C(o.current, "external-resume");
|
|
289
344
|
return;
|
|
290
345
|
}
|
|
291
|
-
s.current = !0,
|
|
346
|
+
s.current = !0, u(!0, "waitingForMoreAudio");
|
|
292
347
|
return;
|
|
293
348
|
}
|
|
294
|
-
if (!
|
|
295
|
-
|
|
349
|
+
if (!P.current && v.current.length > 0) {
|
|
350
|
+
C(
|
|
296
351
|
Math.min(
|
|
297
|
-
|
|
298
|
-
|
|
352
|
+
R.current,
|
|
353
|
+
v.current.length - 1
|
|
299
354
|
),
|
|
300
355
|
"external-resume-init"
|
|
301
356
|
);
|
|
302
357
|
return;
|
|
303
358
|
}
|
|
304
|
-
e.paused && (s.current = !0,
|
|
359
|
+
e.paused && (s.current = !0, L("external-resume"));
|
|
305
360
|
}
|
|
306
361
|
}
|
|
307
362
|
}, [
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
]),
|
|
313
|
-
const e =
|
|
363
|
+
K,
|
|
364
|
+
C,
|
|
365
|
+
L,
|
|
366
|
+
u
|
|
367
|
+
]), m(() => {
|
|
368
|
+
const e = y.current;
|
|
314
369
|
if (!e)
|
|
315
370
|
return;
|
|
316
|
-
if (!
|
|
317
|
-
|
|
371
|
+
if (!d) {
|
|
372
|
+
D();
|
|
318
373
|
return;
|
|
319
374
|
}
|
|
320
|
-
if (
|
|
321
|
-
s.current = !1,
|
|
375
|
+
if (K) {
|
|
376
|
+
s.current = !1, u(!1), e.pause(), f(!1);
|
|
322
377
|
return;
|
|
323
378
|
}
|
|
324
|
-
const r =
|
|
325
|
-
activeSourceType:
|
|
326
|
-
hasAudioUrl: !!
|
|
379
|
+
const r = Hr({
|
|
380
|
+
activeSourceType: U.current,
|
|
381
|
+
hasAudioUrl: !!H,
|
|
327
382
|
segmentCount: M.length,
|
|
328
|
-
preferredSourceType:
|
|
329
|
-
waitingSegmentIndex:
|
|
383
|
+
preferredSourceType: q.current,
|
|
384
|
+
waitingSegmentIndex: o.current
|
|
330
385
|
});
|
|
331
|
-
if (r &&
|
|
332
|
-
const
|
|
333
|
-
if (
|
|
334
|
-
const A =
|
|
335
|
-
e.pause(), e.removeAttribute("src"), e.load(),
|
|
386
|
+
if (r && q.current !== r && (q.current = r), r === "url" && H) {
|
|
387
|
+
const a = P.current !== H, x = W();
|
|
388
|
+
if (a) {
|
|
389
|
+
const A = o.current !== null ? Je() : 0;
|
|
390
|
+
e.pause(), e.removeAttribute("src"), e.load(), P.current = H, U.current = "url", e.src = H, e.load(), S.current = A, w(A * 1e3), e.readyState > 0 && (e.currentTime = A, S.current = null);
|
|
336
391
|
}
|
|
337
|
-
if (s.current =
|
|
338
|
-
s.current = !1, e.pause(),
|
|
392
|
+
if (s.current = x, _.current = !1, E.current = !1, u(!1), !x) {
|
|
393
|
+
s.current = !1, e.pause(), f(!1);
|
|
339
394
|
return;
|
|
340
395
|
}
|
|
341
|
-
|
|
396
|
+
L(a ? "sync-url-init" : "sync-url");
|
|
342
397
|
return;
|
|
343
398
|
}
|
|
344
|
-
if (r === "segment" &&
|
|
345
|
-
if (
|
|
346
|
-
if (
|
|
347
|
-
|
|
399
|
+
if (r === "segment" && o.current !== null) {
|
|
400
|
+
if (o.current < M.length) {
|
|
401
|
+
if (b.current) {
|
|
402
|
+
f(!1), u(!1);
|
|
348
403
|
return;
|
|
349
404
|
}
|
|
350
|
-
|
|
405
|
+
C(o.current, "wait-resume");
|
|
351
406
|
return;
|
|
352
407
|
}
|
|
353
|
-
_.current = !0, s.current =
|
|
408
|
+
_.current = !0, s.current = W(), f(!1), u(W());
|
|
354
409
|
return;
|
|
355
410
|
}
|
|
356
411
|
if (r === "segment" && !M.length) {
|
|
357
|
-
if (
|
|
358
|
-
|
|
412
|
+
if (d.isAudioStreaming) {
|
|
413
|
+
o.current = R.current, _.current = !0, s.current = W(), f(!1), u(W());
|
|
359
414
|
return;
|
|
360
415
|
}
|
|
361
|
-
|
|
416
|
+
D();
|
|
362
417
|
return;
|
|
363
418
|
}
|
|
364
|
-
if (r === "segment" && !
|
|
365
|
-
|
|
419
|
+
if (r === "segment" && !P.current) {
|
|
420
|
+
C(
|
|
366
421
|
Math.min(
|
|
367
|
-
|
|
422
|
+
R.current,
|
|
368
423
|
M.length - 1
|
|
369
424
|
),
|
|
370
425
|
"effect-init"
|
|
@@ -372,283 +427,358 @@ const ve = /* @__PURE__ */ new Map(), Fe = (R) => {
|
|
|
372
427
|
return;
|
|
373
428
|
}
|
|
374
429
|
if (r !== "segment") {
|
|
375
|
-
|
|
430
|
+
D();
|
|
376
431
|
return;
|
|
377
432
|
}
|
|
378
|
-
if (!g ||
|
|
379
|
-
s.current = !1, e.pause(),
|
|
433
|
+
if (!g || b.current) {
|
|
434
|
+
s.current = !1, e.pause(), f(!1);
|
|
380
435
|
return;
|
|
381
436
|
}
|
|
382
|
-
e.paused && (s.current = !0,
|
|
437
|
+
e.paused && (s.current = !0, L("sync-paused-retry"));
|
|
383
438
|
}, [
|
|
384
|
-
|
|
385
|
-
|
|
439
|
+
d,
|
|
440
|
+
h,
|
|
386
441
|
M,
|
|
387
|
-
|
|
442
|
+
H,
|
|
388
443
|
g,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
]),
|
|
398
|
-
const
|
|
399
|
-
i(),
|
|
444
|
+
K,
|
|
445
|
+
W,
|
|
446
|
+
w,
|
|
447
|
+
D,
|
|
448
|
+
C,
|
|
449
|
+
L,
|
|
450
|
+
Je,
|
|
451
|
+
u
|
|
452
|
+
]), m(() => D, [D]), m(() => p, [p]);
|
|
453
|
+
const br = t(() => {
|
|
454
|
+
i(), Ie(), f(!0), u(!1), Me?.();
|
|
400
455
|
}, [
|
|
401
|
-
|
|
402
|
-
|
|
456
|
+
Me,
|
|
457
|
+
Ie,
|
|
403
458
|
i,
|
|
404
|
-
|
|
405
|
-
]),
|
|
406
|
-
_.current ||
|
|
407
|
-
}, [
|
|
408
|
-
const e =
|
|
409
|
-
e &&
|
|
459
|
+
u
|
|
460
|
+
]), Sr = t(() => {
|
|
461
|
+
_.current || E.current || (p(), i(), f(!1));
|
|
462
|
+
}, [h, p, i]), gr = t(() => {
|
|
463
|
+
const e = y.current;
|
|
464
|
+
e && S.current !== null && (e.currentTime = S.current, S.current = null), i(), !fe("canplay-seek-finished") && (!s.current || !g || L("canplay"));
|
|
410
465
|
}, [
|
|
411
|
-
|
|
466
|
+
h,
|
|
412
467
|
g,
|
|
413
|
-
|
|
468
|
+
fe,
|
|
414
469
|
i,
|
|
415
|
-
|
|
416
|
-
]),
|
|
417
|
-
const e =
|
|
418
|
-
e &&
|
|
419
|
-
}, [
|
|
470
|
+
L
|
|
471
|
+
]), _r = t(() => {
|
|
472
|
+
const e = y.current;
|
|
473
|
+
e && S.current !== null && (e.currentTime = S.current, S.current = null), i(), fe("metadata-seek-finished");
|
|
474
|
+
}, [h, fe, i]), wr = t(() => {
|
|
420
475
|
i();
|
|
421
|
-
}, [i]),
|
|
422
|
-
_.current ||
|
|
423
|
-
}, [
|
|
476
|
+
}, [i]), xr = t(() => {
|
|
477
|
+
_.current || u(!0, "loadingAudio");
|
|
478
|
+
}, [u]), kr = t(() => {
|
|
424
479
|
if (_.current) {
|
|
425
|
-
|
|
480
|
+
u(!0, "waitingForMoreAudio");
|
|
426
481
|
return;
|
|
427
482
|
}
|
|
428
|
-
|
|
429
|
-
}, [
|
|
483
|
+
u(!0, "loadingAudio");
|
|
484
|
+
}, [u]), rr = t(() => {
|
|
430
485
|
i();
|
|
431
|
-
}, [i]),
|
|
432
|
-
const e =
|
|
433
|
-
if (
|
|
434
|
-
|
|
486
|
+
}, [i]), Mr = t(() => {
|
|
487
|
+
const e = U.current === "url" || v.current.length === 0;
|
|
488
|
+
if (p(), E.current = !1, e) {
|
|
489
|
+
X("url-ended");
|
|
435
490
|
return;
|
|
436
491
|
}
|
|
437
|
-
|
|
438
|
-
}, [
|
|
439
|
-
|
|
440
|
-
}, [
|
|
492
|
+
er();
|
|
493
|
+
}, [X, er, p]), Lr = t(() => {
|
|
494
|
+
p(), i(), f(!1), u(!1);
|
|
495
|
+
}, [p, i, u]), Ar = t(
|
|
441
496
|
(e) => {
|
|
442
|
-
|
|
497
|
+
Ae?.(e), z(!1);
|
|
443
498
|
},
|
|
444
|
-
[
|
|
445
|
-
)
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
onLoadStart: Ie,
|
|
456
|
-
onLoadedMetadata: Je,
|
|
457
|
-
onCanPlay: Ge,
|
|
458
|
-
onPlay: Xe,
|
|
459
|
-
onPause: Ye,
|
|
460
|
-
onWaiting: er,
|
|
461
|
-
onSeeking: Te,
|
|
462
|
-
onSeeked: Te,
|
|
463
|
-
onTimeUpdate: Qe,
|
|
464
|
-
onEnded: rr,
|
|
465
|
-
onError: tr
|
|
466
|
-
}
|
|
467
|
-
),
|
|
468
|
-
te ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
469
|
-
/* @__PURE__ */ t.jsx(
|
|
470
|
-
ar,
|
|
471
|
-
{
|
|
472
|
-
container: Ve,
|
|
473
|
-
labels: {
|
|
474
|
-
fullscreen: B.fullscreenLabel,
|
|
475
|
-
nonFullscreen: B.nonFullscreenLabel,
|
|
476
|
-
screen: B.screenLabel,
|
|
477
|
-
subtitle: B.subtitleLabel,
|
|
478
|
-
subtitleToggle: B.subtitleToggleAriaLabel,
|
|
479
|
-
title: B.settingsTitle
|
|
480
|
-
},
|
|
481
|
-
isSubtitleEnabled: re,
|
|
482
|
-
onClose: () => K(!1),
|
|
483
|
-
onOpenChange: K,
|
|
484
|
-
onSubtitleToggle: ie ?? (() => {
|
|
485
|
-
}),
|
|
486
|
-
onViewModeChange: nr,
|
|
487
|
-
open: xe,
|
|
488
|
-
viewMode: We
|
|
489
|
-
}
|
|
499
|
+
[Ae]
|
|
500
|
+
), _e = t(() => {
|
|
501
|
+
if (N) {
|
|
502
|
+
const r = !O;
|
|
503
|
+
return $(r), Re?.(r), !0;
|
|
504
|
+
}
|
|
505
|
+
const e = y.current;
|
|
506
|
+
return K || !e || !d ? !1 : o.current !== null ? oe ? ($(!1), s.current = !1, b.current = !0, o.current = null, _.current = !1, f(!1), u(!1), e.pause(), !0) : ($(!0), F.current = "manual", b.current = !1, s.current = !0, u(!0, "waitingForMoreAudio"), !0) : !e.src && M.length > 0 ? ($(!0), F.current = "manual", b.current = !1, C(
|
|
507
|
+
Math.min(
|
|
508
|
+
R.current,
|
|
509
|
+
M.length - 1
|
|
490
510
|
),
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
511
|
+
"toggle"
|
|
512
|
+
), !0) : e.paused ? ($(!0), F.current = "manual", b.current = !1, s.current = !0, L("toggle-resume"), !0) : ($(!1), s.current = !1, b.current = !0, e.pause(), !0);
|
|
513
|
+
}, [
|
|
514
|
+
d,
|
|
515
|
+
M.length,
|
|
516
|
+
O,
|
|
517
|
+
K,
|
|
518
|
+
oe,
|
|
519
|
+
Re,
|
|
520
|
+
C,
|
|
521
|
+
L,
|
|
522
|
+
u,
|
|
523
|
+
$,
|
|
524
|
+
N
|
|
525
|
+
]);
|
|
526
|
+
m(() => {
|
|
527
|
+
if (T)
|
|
528
|
+
return Wr(V);
|
|
529
|
+
}, [V, T]);
|
|
530
|
+
const we = G(
|
|
531
|
+
() => ({
|
|
532
|
+
fullscreen: () => I ? (I(), !0) : !1,
|
|
533
|
+
interaction: () => se ? (me && se(), !0) : !1,
|
|
534
|
+
next: () => ae ? (ye || ae(
|
|
535
|
+
ar(te())
|
|
536
|
+
), !0) : !1,
|
|
537
|
+
previous: () => ue ? (he || ue(
|
|
538
|
+
ar(te())
|
|
539
|
+
), !0) : !1,
|
|
540
|
+
subtitle: () => Q ? (Q(), !0) : !1,
|
|
541
|
+
togglePlayback: () => (_e(), !0)
|
|
542
|
+
}),
|
|
543
|
+
[
|
|
544
|
+
te,
|
|
545
|
+
me,
|
|
546
|
+
ye,
|
|
547
|
+
I,
|
|
548
|
+
se,
|
|
549
|
+
ae,
|
|
550
|
+
ue,
|
|
551
|
+
Q,
|
|
552
|
+
he,
|
|
553
|
+
_e
|
|
554
|
+
]
|
|
555
|
+
), tr = c(we);
|
|
556
|
+
return m(() => {
|
|
557
|
+
tr.current = we;
|
|
558
|
+
}, [we]), m(() => {
|
|
559
|
+
if (!T || typeof document > "u")
|
|
560
|
+
return;
|
|
561
|
+
const e = (r) => {
|
|
562
|
+
if (!Or(V))
|
|
563
|
+
return;
|
|
564
|
+
const a = Br(r);
|
|
565
|
+
if (!a || Vr(r, a))
|
|
566
|
+
return;
|
|
567
|
+
let x = !1;
|
|
568
|
+
const A = tr.current[a];
|
|
569
|
+
x = A(), x && r.preventDefault();
|
|
570
|
+
};
|
|
571
|
+
return document.addEventListener("keydown", e), () => {
|
|
572
|
+
document.removeEventListener("keydown", e);
|
|
573
|
+
};
|
|
574
|
+
}, [V, T]), m(() => {
|
|
575
|
+
ne?.(Se.current);
|
|
576
|
+
}, [ne]), /* @__PURE__ */ n.jsxs(
|
|
577
|
+
"div",
|
|
578
|
+
{
|
|
579
|
+
...fr,
|
|
580
|
+
"data-slide-player-shortcut-owner": V,
|
|
581
|
+
className: ur("slide-player", j),
|
|
582
|
+
onFocusCapture: yr,
|
|
583
|
+
onPointerDown: hr,
|
|
584
|
+
children: [
|
|
585
|
+
/* @__PURE__ */ n.jsx(
|
|
586
|
+
"audio",
|
|
587
|
+
{
|
|
588
|
+
ref: y,
|
|
589
|
+
preload: "auto",
|
|
590
|
+
playsInline: !0,
|
|
591
|
+
onLoadStart: xr,
|
|
592
|
+
onLoadedMetadata: _r,
|
|
593
|
+
onCanPlay: gr,
|
|
594
|
+
onPlay: br,
|
|
595
|
+
onPause: Sr,
|
|
596
|
+
onWaiting: kr,
|
|
597
|
+
onSeeking: rr,
|
|
598
|
+
onSeeked: rr,
|
|
599
|
+
onTimeUpdate: wr,
|
|
600
|
+
onEnded: Mr,
|
|
601
|
+
onError: Lr
|
|
602
|
+
}
|
|
603
|
+
),
|
|
604
|
+
be ? /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
605
|
+
/* @__PURE__ */ n.jsx(
|
|
606
|
+
vr,
|
|
495
607
|
{
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
608
|
+
container: or,
|
|
609
|
+
labels: {
|
|
610
|
+
closeSettings: l.closeSettingsLabel,
|
|
611
|
+
fullscreen: l.fullscreenLabel,
|
|
612
|
+
nonFullscreen: l.nonFullscreenLabel,
|
|
613
|
+
screen: l.screenLabel,
|
|
614
|
+
screenMode: l.screenModeLabel,
|
|
615
|
+
subtitle: l.subtitleLabel,
|
|
616
|
+
subtitleToggle: l.subtitleToggleAriaLabel,
|
|
617
|
+
title: l.settingsTitle
|
|
502
618
|
},
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
619
|
+
isSubtitleEnabled: pe,
|
|
620
|
+
onClose: () => z(!1),
|
|
621
|
+
onOpenChange: z,
|
|
622
|
+
onSubtitleToggle: Q ?? (() => {
|
|
623
|
+
}),
|
|
624
|
+
onViewModeChange: Ar,
|
|
625
|
+
open: We,
|
|
626
|
+
viewMode: cr
|
|
511
627
|
}
|
|
512
628
|
),
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
"aria-label": B.subtitleToggleAriaLabel,
|
|
518
|
-
"aria-pressed": re,
|
|
519
|
-
className: "slide-player__action slide-player__action--subtitle",
|
|
520
|
-
onClick: ie,
|
|
521
|
-
type: "button",
|
|
522
|
-
children: re ? /* @__PURE__ */ t.jsx(yr, { className: "slide-player__icon", strokeWidth: 2.25 }) : /* @__PURE__ */ t.jsx(
|
|
523
|
-
gr,
|
|
629
|
+
/* @__PURE__ */ n.jsxs("div", { className: "slide-player__controls", style: mr, children: [
|
|
630
|
+
/* @__PURE__ */ n.jsxs("div", { className: "slide-player__group", children: [
|
|
631
|
+
/* @__PURE__ */ n.jsx(
|
|
632
|
+
"button",
|
|
524
633
|
{
|
|
525
|
-
|
|
526
|
-
|
|
634
|
+
"aria-expanded": We,
|
|
635
|
+
"aria-haspopup": "dialog",
|
|
636
|
+
"aria-label": l.moreOptionsAriaLabel,
|
|
637
|
+
className: "slide-player__action slide-player__action--mobile-more",
|
|
638
|
+
onClick: () => {
|
|
639
|
+
z((e) => !e);
|
|
640
|
+
},
|
|
641
|
+
type: "button",
|
|
642
|
+
children: /* @__PURE__ */ n.jsx(
|
|
643
|
+
qr,
|
|
644
|
+
{
|
|
645
|
+
className: "slide-player__icon",
|
|
646
|
+
strokeWidth: 2.25
|
|
647
|
+
}
|
|
648
|
+
)
|
|
527
649
|
}
|
|
528
|
-
)
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
disabled: He,
|
|
537
|
-
onClick: () => {
|
|
538
|
-
Ue?.(Me());
|
|
539
|
-
},
|
|
540
|
-
type: "button",
|
|
541
|
-
children: /* @__PURE__ */ t.jsx(_r, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
542
|
-
}
|
|
543
|
-
),
|
|
544
|
-
/* @__PURE__ */ t.jsx(
|
|
545
|
-
"button",
|
|
546
|
-
{
|
|
547
|
-
"aria-label": De,
|
|
548
|
-
className: "slide-player__toggle slide-player__toggle--playback",
|
|
549
|
-
onClick: () => {
|
|
550
|
-
if (T) {
|
|
551
|
-
const r = !$;
|
|
552
|
-
O(r), Be?.(r);
|
|
553
|
-
return;
|
|
650
|
+
),
|
|
651
|
+
/* @__PURE__ */ n.jsx(
|
|
652
|
+
"button",
|
|
653
|
+
{
|
|
654
|
+
"aria-label": l.volumeAriaLabel,
|
|
655
|
+
className: "hidden",
|
|
656
|
+
type: "button",
|
|
657
|
+
children: /* @__PURE__ */ n.jsx(zr, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
554
658
|
}
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
659
|
+
),
|
|
660
|
+
/* @__PURE__ */ n.jsx(
|
|
661
|
+
"button",
|
|
662
|
+
{
|
|
663
|
+
"aria-label": l.subtitleToggleAriaLabel,
|
|
664
|
+
"aria-keyshortcuts": $e.ariaKeyShortcuts,
|
|
665
|
+
"aria-pressed": pe,
|
|
666
|
+
className: "slide-player__action slide-player__action--subtitle",
|
|
667
|
+
onClick: Q,
|
|
668
|
+
title: $e.title,
|
|
669
|
+
type: "button",
|
|
670
|
+
children: pe ? /* @__PURE__ */ n.jsx(Yr, { className: "slide-player__icon", strokeWidth: 2.25 }) : /* @__PURE__ */ n.jsx(
|
|
671
|
+
Dr,
|
|
672
|
+
{
|
|
673
|
+
className: "slide-player__icon",
|
|
674
|
+
strokeWidth: 2.25
|
|
561
675
|
}
|
|
562
|
-
|
|
563
|
-
return;
|
|
564
|
-
}
|
|
565
|
-
if (!e.src && M.length > 0) {
|
|
566
|
-
O(!0), v.current = "manual", h.current = !1, E(
|
|
567
|
-
Math.min(
|
|
568
|
-
S.current,
|
|
569
|
-
M.length - 1
|
|
570
|
-
),
|
|
571
|
-
"toggle"
|
|
572
|
-
);
|
|
573
|
-
return;
|
|
574
|
-
}
|
|
575
|
-
if (e.paused) {
|
|
576
|
-
O(!0), v.current = "manual", h.current = !1, s.current = !0, k("toggle-resume");
|
|
577
|
-
return;
|
|
578
|
-
}
|
|
579
|
-
O(!1), s.current = !1, h.current = !0, e.pause();
|
|
676
|
+
)
|
|
580
677
|
}
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
}
|
|
585
|
-
),
|
|
586
|
-
/* @__PURE__ */ t.jsx(
|
|
587
|
-
"button",
|
|
588
|
-
{
|
|
589
|
-
"aria-label": "Forward",
|
|
590
|
-
className: "slide-player__action slide-player__action--next",
|
|
591
|
-
disabled: Ke,
|
|
592
|
-
onClick: () => {
|
|
593
|
-
Pe?.(Me());
|
|
594
|
-
},
|
|
595
|
-
type: "button",
|
|
596
|
-
children: /* @__PURE__ */ t.jsx(br, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
597
|
-
}
|
|
598
|
-
),
|
|
599
|
-
oe ? /* @__PURE__ */ t.jsx(
|
|
600
|
-
"button",
|
|
601
|
-
{
|
|
602
|
-
"aria-label": fe ? "Exit fullscreen" : "Enter fullscreen",
|
|
603
|
-
className: "slide-player__action slide-player__action--fullscreen",
|
|
604
|
-
onClick: oe,
|
|
605
|
-
type: "button",
|
|
606
|
-
children: fe ? /* @__PURE__ */ t.jsx(
|
|
607
|
-
xr,
|
|
678
|
+
),
|
|
679
|
+
/* @__PURE__ */ n.jsx(
|
|
680
|
+
"button",
|
|
608
681
|
{
|
|
609
|
-
|
|
610
|
-
|
|
682
|
+
"aria-keyshortcuts": Ze.ariaKeyShortcuts,
|
|
683
|
+
"aria-label": l.previousLabel,
|
|
684
|
+
className: "slide-player__action slide-player__action--prev",
|
|
685
|
+
disabled: he,
|
|
686
|
+
onClick: () => {
|
|
687
|
+
ue?.(te());
|
|
688
|
+
},
|
|
689
|
+
title: Ze.title,
|
|
690
|
+
type: "button",
|
|
691
|
+
children: /* @__PURE__ */ n.jsx(Xr, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
611
692
|
}
|
|
612
|
-
)
|
|
613
|
-
|
|
693
|
+
),
|
|
694
|
+
/* @__PURE__ */ n.jsx(
|
|
695
|
+
"button",
|
|
614
696
|
{
|
|
615
|
-
|
|
616
|
-
|
|
697
|
+
"aria-label": Ve,
|
|
698
|
+
"aria-keyshortcuts": qe.ariaKeyShortcuts,
|
|
699
|
+
className: "slide-player__toggle slide-player__toggle--playback",
|
|
700
|
+
onClick: () => {
|
|
701
|
+
_e();
|
|
702
|
+
},
|
|
703
|
+
title: qe.title,
|
|
704
|
+
type: "button",
|
|
705
|
+
children: pr ? /* @__PURE__ */ n.jsx(et, {}) : /* @__PURE__ */ n.jsx(rt, {})
|
|
706
|
+
}
|
|
707
|
+
),
|
|
708
|
+
/* @__PURE__ */ n.jsx(
|
|
709
|
+
"button",
|
|
710
|
+
{
|
|
711
|
+
"aria-keyshortcuts": ze.ariaKeyShortcuts,
|
|
712
|
+
"aria-label": l.nextLabel,
|
|
713
|
+
className: "slide-player__action slide-player__action--next",
|
|
714
|
+
disabled: ye,
|
|
715
|
+
onClick: () => {
|
|
716
|
+
ae?.(te());
|
|
717
|
+
},
|
|
718
|
+
title: ze.title,
|
|
719
|
+
type: "button",
|
|
720
|
+
children: /* @__PURE__ */ n.jsx(Gr, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
617
721
|
}
|
|
618
|
-
)
|
|
619
|
-
}
|
|
620
|
-
) : null
|
|
621
|
-
] }),
|
|
622
|
-
/* @__PURE__ */ t.jsx("div", { className: "slide-player__separator" }),
|
|
623
|
-
/* @__PURE__ */ t.jsxs("div", { className: "slide-player__group", children: [
|
|
624
|
-
Se.map((e, r) => /* @__PURE__ */ t.jsx(sr.Fragment, { children: e }, `custom-action-${r}`)),
|
|
625
|
-
/* @__PURE__ */ t.jsx(
|
|
626
|
-
"button",
|
|
627
|
-
{
|
|
628
|
-
"aria-label": "Notes",
|
|
629
|
-
className: Le(
|
|
630
|
-
"slide-player__action slide-player__action--notes",
|
|
631
|
-
D && "slide-player__action--active"
|
|
632
722
|
),
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
type: "button",
|
|
636
|
-
children: /* @__PURE__ */ t.jsx(
|
|
637
|
-
wr,
|
|
723
|
+
I ? /* @__PURE__ */ n.jsx(
|
|
724
|
+
"button",
|
|
638
725
|
{
|
|
639
|
-
|
|
640
|
-
|
|
726
|
+
"aria-label": He,
|
|
727
|
+
"aria-keyshortcuts": Ye.ariaKeyShortcuts,
|
|
728
|
+
className: "slide-player__action slide-player__action--fullscreen",
|
|
729
|
+
onClick: I,
|
|
730
|
+
title: Ye.title,
|
|
731
|
+
type: "button",
|
|
732
|
+
children: Le ? /* @__PURE__ */ n.jsx(
|
|
733
|
+
Jr,
|
|
734
|
+
{
|
|
735
|
+
className: "slide-player__icon",
|
|
736
|
+
strokeWidth: 2.25
|
|
737
|
+
}
|
|
738
|
+
) : /* @__PURE__ */ n.jsx(
|
|
739
|
+
Qr,
|
|
740
|
+
{
|
|
741
|
+
className: "slide-player__icon",
|
|
742
|
+
strokeWidth: 2.25
|
|
743
|
+
}
|
|
744
|
+
)
|
|
745
|
+
}
|
|
746
|
+
) : null
|
|
747
|
+
] }),
|
|
748
|
+
/* @__PURE__ */ n.jsx("div", { className: "slide-player__separator" }),
|
|
749
|
+
/* @__PURE__ */ n.jsxs("div", { className: "slide-player__group", children: [
|
|
750
|
+
Oe.map((e, r) => /* @__PURE__ */ n.jsx(Rr.Fragment, { children: e }, `custom-action-${r}`)),
|
|
751
|
+
/* @__PURE__ */ n.jsx(
|
|
752
|
+
"button",
|
|
753
|
+
{
|
|
754
|
+
"aria-label": l.notesLabel,
|
|
755
|
+
"aria-keyshortcuts": De.ariaKeyShortcuts,
|
|
756
|
+
className: ur(
|
|
757
|
+
"slide-player__action slide-player__action--notes",
|
|
758
|
+
ee && "slide-player__action--active"
|
|
759
|
+
),
|
|
760
|
+
disabled: !me,
|
|
761
|
+
onClick: se,
|
|
762
|
+
title: De.title,
|
|
763
|
+
type: "button",
|
|
764
|
+
children: /* @__PURE__ */ n.jsx(
|
|
765
|
+
Ir,
|
|
766
|
+
{
|
|
767
|
+
className: "slide-player__icon",
|
|
768
|
+
strokeWidth: 2.25
|
|
769
|
+
}
|
|
770
|
+
)
|
|
641
771
|
}
|
|
642
772
|
)
|
|
643
|
-
}
|
|
644
|
-
)
|
|
645
|
-
] })
|
|
646
|
-
]
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
},
|
|
650
|
-
|
|
773
|
+
] })
|
|
774
|
+
] })
|
|
775
|
+
] }) : null
|
|
776
|
+
]
|
|
777
|
+
}
|
|
778
|
+
);
|
|
779
|
+
}, ut = Er(nt);
|
|
780
|
+
ut.displayName = "Player";
|
|
651
781
|
export {
|
|
652
|
-
|
|
782
|
+
ut as default
|
|
653
783
|
};
|
|
654
784
|
//# sourceMappingURL=Player.es.js.map
|