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