strataplayer 1.0.4 → 1.0.5
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/strataplayer.es.js +950 -488
- package/dist/strataplayer.es.js.map +1 -1
- package/dist/strataplayer.umd.js +181 -6
- package/dist/strataplayer.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/strataplayer.es.js
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { createRoot as
|
|
6
|
-
import { jsxs as
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
class Lt {
|
|
1
|
+
var tt = Object.defineProperty;
|
|
2
|
+
var it = (c, e, i) => e in c ? tt(c, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : c[e] = i;
|
|
3
|
+
var g = (c, e, i) => it(c, typeof e != "symbol" ? e + "" : e, i);
|
|
4
|
+
import Le, { useState as w, useEffect as R, forwardRef as He, createElement as oe, useRef as q, useMemo as st, useSyncExternalStore as at, useCallback as rt } from "react";
|
|
5
|
+
import { createRoot as nt } from "react-dom/client";
|
|
6
|
+
import { jsxs as d, jsx as t, Fragment as A } from "react/jsx-runtime";
|
|
7
|
+
import U from "hls.js";
|
|
8
|
+
class ot {
|
|
10
9
|
constructor() {
|
|
11
|
-
|
|
10
|
+
g(this, "events");
|
|
12
11
|
this.events = /* @__PURE__ */ new Map();
|
|
13
12
|
}
|
|
14
13
|
on(e, i) {
|
|
@@ -19,21 +18,21 @@ class Lt {
|
|
|
19
18
|
const s = this.events.get(e);
|
|
20
19
|
s && this.events.set(
|
|
21
20
|
e,
|
|
22
|
-
s.filter((
|
|
21
|
+
s.filter((r) => r !== i)
|
|
23
22
|
);
|
|
24
23
|
}
|
|
25
24
|
emit(e, i) {
|
|
26
25
|
const s = this.events.get(e);
|
|
27
|
-
s && s.forEach((
|
|
26
|
+
s && s.forEach((r) => r(i));
|
|
28
27
|
}
|
|
29
28
|
destroy() {
|
|
30
29
|
this.events.clear();
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
class
|
|
32
|
+
class lt {
|
|
34
33
|
constructor(e) {
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
g(this, "state");
|
|
35
|
+
g(this, "listeners");
|
|
37
36
|
this.state = e, this.listeners = /* @__PURE__ */ new Set();
|
|
38
37
|
}
|
|
39
38
|
get() {
|
|
@@ -41,7 +40,7 @@ class At {
|
|
|
41
40
|
}
|
|
42
41
|
setState(e) {
|
|
43
42
|
const i = this.state, s = typeof e == "function" ? e(i) : e;
|
|
44
|
-
this.state = { ...i, ...s }, this.listeners.forEach((
|
|
43
|
+
this.state = { ...i, ...s }, this.listeners.forEach((r) => r(this.state, i));
|
|
45
44
|
}
|
|
46
45
|
subscribe(e) {
|
|
47
46
|
return this.listeners.add(e), () => this.listeners.delete(e);
|
|
@@ -50,13 +49,13 @@ class At {
|
|
|
50
49
|
this.listeners.clear();
|
|
51
50
|
}
|
|
52
51
|
}
|
|
53
|
-
class
|
|
52
|
+
class ct {
|
|
54
53
|
constructor(e) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
g(this, "context", null);
|
|
55
|
+
g(this, "source", null);
|
|
56
|
+
g(this, "gainNode", null);
|
|
57
|
+
g(this, "video");
|
|
58
|
+
g(this, "isInitialized", !1);
|
|
60
59
|
this.video = e;
|
|
61
60
|
}
|
|
62
61
|
/**
|
|
@@ -79,7 +78,7 @@ class Bt {
|
|
|
79
78
|
this.context && this.context.close(), this.isInitialized = !1;
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
|
-
const
|
|
81
|
+
const ce = {
|
|
83
82
|
useNative: !1,
|
|
84
83
|
fixCapitalization: !1,
|
|
85
84
|
backgroundOpacity: 50,
|
|
@@ -90,7 +89,7 @@ const oe = {
|
|
|
90
89
|
isBold: !1,
|
|
91
90
|
textColor: "#ffffff",
|
|
92
91
|
verticalOffset: 40
|
|
93
|
-
},
|
|
92
|
+
}, qe = "strata-settings-v3", O = {
|
|
94
93
|
isPlaying: !1,
|
|
95
94
|
isBuffering: !1,
|
|
96
95
|
currentTime: 0,
|
|
@@ -110,7 +109,7 @@ const oe = {
|
|
|
110
109
|
subtitleTracks: [],
|
|
111
110
|
currentSubtitle: -1,
|
|
112
111
|
subtitleOffset: 0,
|
|
113
|
-
subtitleSettings:
|
|
112
|
+
subtitleSettings: ce,
|
|
114
113
|
activeCues: [],
|
|
115
114
|
viewMode: "normal",
|
|
116
115
|
notifications: [],
|
|
@@ -119,69 +118,69 @@ const oe = {
|
|
|
119
118
|
theme: "default",
|
|
120
119
|
sources: [],
|
|
121
120
|
currentSourceIndex: -1
|
|
122
|
-
},
|
|
121
|
+
}, De = (c = {}) => {
|
|
123
122
|
let e = {};
|
|
124
|
-
if (!
|
|
123
|
+
if (!c.disablePersistence && typeof window < "u")
|
|
125
124
|
try {
|
|
126
|
-
const s = localStorage.getItem(
|
|
125
|
+
const s = localStorage.getItem(qe);
|
|
127
126
|
s && (e = JSON.parse(s));
|
|
128
127
|
} catch {
|
|
129
128
|
}
|
|
130
129
|
const i = {
|
|
131
|
-
...
|
|
130
|
+
...ce,
|
|
132
131
|
...e.subtitleSettings || {},
|
|
133
|
-
...
|
|
132
|
+
...c.subtitleSettings || {}
|
|
134
133
|
};
|
|
135
134
|
return {
|
|
136
135
|
...O,
|
|
137
136
|
...e,
|
|
138
137
|
// Load saved first
|
|
139
138
|
// Override with config if present (not undefined)
|
|
140
|
-
volume:
|
|
141
|
-
isMuted:
|
|
142
|
-
playbackRate:
|
|
143
|
-
audioGain:
|
|
144
|
-
theme:
|
|
145
|
-
themeColor:
|
|
146
|
-
iconSize:
|
|
139
|
+
volume: c.volume ?? e.volume ?? O.volume,
|
|
140
|
+
isMuted: c.muted ?? e.isMuted ?? O.isMuted,
|
|
141
|
+
playbackRate: c.playbackRate ?? e.playbackRate ?? O.playbackRate,
|
|
142
|
+
audioGain: c.audioGain ?? e.audioGain ?? O.audioGain,
|
|
143
|
+
theme: c.theme ?? e.theme ?? O.theme,
|
|
144
|
+
themeColor: c.themeColor ?? e.themeColor ?? O.themeColor,
|
|
145
|
+
iconSize: c.iconSize ?? e.iconSize ?? O.iconSize,
|
|
147
146
|
subtitleSettings: i
|
|
148
147
|
};
|
|
149
148
|
};
|
|
150
|
-
class
|
|
149
|
+
class dt {
|
|
151
150
|
constructor(e = {}, i) {
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
151
|
+
g(this, "video");
|
|
152
|
+
g(this, "container", null);
|
|
153
|
+
g(this, "events");
|
|
154
|
+
g(this, "store");
|
|
155
|
+
g(this, "plugins", /* @__PURE__ */ new Map());
|
|
156
|
+
g(this, "audioEngine");
|
|
157
|
+
g(this, "config");
|
|
159
158
|
// Retry Logic
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
g(this, "retryCount", 0);
|
|
160
|
+
g(this, "maxRetries", 5);
|
|
161
|
+
g(this, "retryTimer", null);
|
|
162
|
+
g(this, "currentSource", null);
|
|
163
|
+
g(this, "currentSrc", "");
|
|
164
|
+
g(this, "currentTracks", []);
|
|
166
165
|
// Cast
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
this.config = e, this.video = i || document.createElement("video"), this.video.crossOrigin = "anonymous", this.events = new
|
|
171
|
-
const s =
|
|
172
|
-
this.store = new
|
|
166
|
+
g(this, "castInitialized", !1);
|
|
167
|
+
g(this, "boundCueChange");
|
|
168
|
+
g(this, "boundFullscreenChange");
|
|
169
|
+
this.config = e, this.video = i || document.createElement("video"), this.video.crossOrigin = "anonymous", this.events = new ot();
|
|
170
|
+
const s = De(e);
|
|
171
|
+
this.store = new lt(s), this.audioEngine = new ct(this.video), this.boundCueChange = this.handleCueChange.bind(this), this.boundFullscreenChange = () => {
|
|
173
172
|
this.store.setState({ isFullscreen: !!document.fullscreenElement });
|
|
174
|
-
}, this.video.volume = s.volume, this.video.muted = s.isMuted, this.video.playbackRate = s.playbackRate, s.audioGain > 1 && this.audioEngine.setGain(s.audioGain), this.initVideoListeners(), this.initCast(), e.disablePersistence || this.store.subscribe((
|
|
173
|
+
}, this.video.volume = s.volume, this.video.muted = s.isMuted, this.video.playbackRate = s.playbackRate, s.audioGain > 1 && this.audioEngine.setGain(s.audioGain), this.initVideoListeners(), this.initCast(), e.disablePersistence || this.store.subscribe((r) => {
|
|
175
174
|
const l = {
|
|
176
|
-
volume:
|
|
177
|
-
isMuted:
|
|
178
|
-
playbackRate:
|
|
179
|
-
subtitleSettings:
|
|
180
|
-
iconSize:
|
|
181
|
-
themeColor:
|
|
182
|
-
theme:
|
|
175
|
+
volume: r.volume,
|
|
176
|
+
isMuted: r.isMuted,
|
|
177
|
+
playbackRate: r.playbackRate,
|
|
178
|
+
subtitleSettings: r.subtitleSettings,
|
|
179
|
+
iconSize: r.iconSize,
|
|
180
|
+
themeColor: r.themeColor,
|
|
181
|
+
theme: r.theme
|
|
183
182
|
};
|
|
184
|
-
localStorage.setItem(
|
|
183
|
+
localStorage.setItem(qe, JSON.stringify(l));
|
|
185
184
|
});
|
|
186
185
|
}
|
|
187
186
|
initVideoListeners() {
|
|
@@ -199,12 +198,12 @@ class Ot {
|
|
|
199
198
|
const i = this.video.error, s = e || (i == null ? void 0 : i.message) || (i ? `Code ${i.code}` : "Unknown Error");
|
|
200
199
|
if (this.removeNotification("retry"), this.retryCount < this.maxRetries) {
|
|
201
200
|
this.retryCount++;
|
|
202
|
-
const
|
|
201
|
+
const r = Math.pow(2, this.retryCount - 1) * 1500;
|
|
203
202
|
this.notify({
|
|
204
203
|
id: "retry",
|
|
205
204
|
type: "loading",
|
|
206
205
|
message: `Error: ${s}. Retrying (${this.retryCount}/${this.maxRetries})...`
|
|
207
|
-
}), console.warn(`[StrataPlayer] Error: ${s}. Retrying in ${
|
|
206
|
+
}), console.warn(`[StrataPlayer] Error: ${s}. Retrying in ${r}ms...`), this.retryTimer && clearTimeout(this.retryTimer), this.retryTimer = setTimeout(() => {
|
|
208
207
|
if (this.currentSource) {
|
|
209
208
|
this.load(this.currentSource, this.currentTracks, !0);
|
|
210
209
|
const l = this.store.get().currentTime;
|
|
@@ -215,11 +214,11 @@ class Ot {
|
|
|
215
214
|
this.video.addEventListener("canplay", m);
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
|
-
},
|
|
217
|
+
}, r);
|
|
219
218
|
} else {
|
|
220
219
|
this.removeNotification("retry");
|
|
221
|
-
const
|
|
222
|
-
this.store.setState({ error:
|
|
220
|
+
const r = `Failed to play after ${this.maxRetries} attempts: ${s}`;
|
|
221
|
+
this.store.setState({ error: r });
|
|
223
222
|
}
|
|
224
223
|
}
|
|
225
224
|
updateBuffer() {
|
|
@@ -233,10 +232,10 @@ class Ot {
|
|
|
233
232
|
}
|
|
234
233
|
updateSubtitles() {
|
|
235
234
|
setTimeout(() => {
|
|
236
|
-
const e = Array.from(this.video.textTracks).filter((s) => s.kind === "subtitles" || s.kind === "captions").map((s,
|
|
237
|
-
label: s.label || s.language || `Track ${
|
|
235
|
+
const e = Array.from(this.video.textTracks).filter((s) => s.kind === "subtitles" || s.kind === "captions").map((s, r) => ({
|
|
236
|
+
label: s.label || s.language || `Track ${r + 1}`,
|
|
238
237
|
language: s.language,
|
|
239
|
-
index:
|
|
238
|
+
index: r
|
|
240
239
|
}));
|
|
241
240
|
this.store.setState({ subtitleTracks: e });
|
|
242
241
|
const i = this.store.get();
|
|
@@ -247,11 +246,11 @@ class Ot {
|
|
|
247
246
|
async fetchWithRetry(e, i = 3) {
|
|
248
247
|
for (let s = 0; s < i; s++)
|
|
249
248
|
try {
|
|
250
|
-
const
|
|
251
|
-
if (!
|
|
252
|
-
return
|
|
253
|
-
} catch (
|
|
254
|
-
if (s === i - 1) throw
|
|
249
|
+
const r = await fetch(e);
|
|
250
|
+
if (!r.ok) throw new Error(`HTTP ${r.status}`);
|
|
251
|
+
return r;
|
|
252
|
+
} catch (r) {
|
|
253
|
+
if (s === i - 1) throw r;
|
|
255
254
|
await new Promise((l) => setTimeout(l, 1e3 * Math.pow(2, s)));
|
|
256
255
|
}
|
|
257
256
|
throw new Error("Fetch failed");
|
|
@@ -269,19 +268,19 @@ class Ot {
|
|
|
269
268
|
switchSource(e) {
|
|
270
269
|
const i = this.store.get().sources;
|
|
271
270
|
if (e >= 0 && e < i.length) {
|
|
272
|
-
const s = this.video.currentTime,
|
|
271
|
+
const s = this.video.currentTime, r = !this.video.paused;
|
|
273
272
|
this.load(i[e], this.currentTracks);
|
|
274
273
|
const l = () => {
|
|
275
|
-
this.video.currentTime = s,
|
|
274
|
+
this.video.currentTime = s, r && this.video.play(), this.video.removeEventListener("canplay", l);
|
|
276
275
|
};
|
|
277
276
|
this.video.addEventListener("canplay", l);
|
|
278
277
|
}
|
|
279
278
|
}
|
|
280
279
|
load(e, i = [], s = !1) {
|
|
281
280
|
this.retryTimer && clearTimeout(this.retryTimer);
|
|
282
|
-
const
|
|
283
|
-
s || (this.retryCount = 0, this.store.setState({ error: null }), this.removeNotification("retry")), this.currentSrc =
|
|
284
|
-
const m = this.store.get().sources.findIndex((
|
|
281
|
+
const r = typeof e == "string" ? { url: e, type: "auto" } : e;
|
|
282
|
+
s || (this.retryCount = 0, this.store.setState({ error: null }), this.removeNotification("retry")), this.currentSrc = r.url, this.currentSource = r, this.currentTracks = i;
|
|
283
|
+
const m = this.store.get().sources.findIndex((f) => f.url === r.url);
|
|
285
284
|
this.store.setState({
|
|
286
285
|
isBuffering: !0,
|
|
287
286
|
qualityLevels: [],
|
|
@@ -293,40 +292,40 @@ class Ot {
|
|
|
293
292
|
// subtitleTracks and currentSubtitle are purposely preserved
|
|
294
293
|
currentSourceIndex: m
|
|
295
294
|
});
|
|
296
|
-
let
|
|
297
|
-
|
|
295
|
+
let b = r.type || "auto";
|
|
296
|
+
b === "auto" && (r.url.includes(".m3u8") ? b = "hls" : r.url.includes(".mpd") ? b = "dash" : b = "mp4"), this.events.emit("load", { url: r.url, type: b });
|
|
298
297
|
const h = this.video.getElementsByTagName("track");
|
|
299
298
|
for (; h.length > 0; )
|
|
300
299
|
h[0].remove();
|
|
301
|
-
i.length > 0 && i.forEach((
|
|
302
|
-
this.fetchWithRetry(
|
|
303
|
-
this.addTextTrackInternal(
|
|
304
|
-
}).catch((
|
|
305
|
-
this.notify({ type: "warning", message: `Failed to load subtitle: ${
|
|
300
|
+
i.length > 0 && i.forEach((f) => {
|
|
301
|
+
this.fetchWithRetry(f.src).then(() => {
|
|
302
|
+
this.addTextTrackInternal(f.src, f.label, f.srcLang, f.default);
|
|
303
|
+
}).catch((n) => {
|
|
304
|
+
this.notify({ type: "warning", message: `Failed to load subtitle: ${f.label}`, duration: 4e3 });
|
|
306
305
|
});
|
|
307
|
-
}), (
|
|
306
|
+
}), (b === "mp4" || b === "webm" || b === "ogg") && (this.video.src = r.url);
|
|
308
307
|
}
|
|
309
308
|
addTextTrack(e, i) {
|
|
310
309
|
const s = new FileReader();
|
|
311
|
-
s.onload = (
|
|
310
|
+
s.onload = (r) => {
|
|
312
311
|
var h;
|
|
313
|
-
if (!((h =
|
|
314
|
-
let l =
|
|
312
|
+
if (!((h = r.target) != null && h.result)) return;
|
|
313
|
+
let l = r.target.result;
|
|
315
314
|
(e.name.toLowerCase().endsWith(".srt") || !l.trim().startsWith("WEBVTT")) && (l = l.replace(/(\d{2}:\d{2}:\d{2}),(\d{3})/g, "$1.$2"), l.trim().startsWith("WEBVTT") || (l = `WEBVTT
|
|
316
315
|
|
|
317
316
|
` + l));
|
|
318
|
-
const m = new Blob([l], { type: "text/vtt" }),
|
|
319
|
-
this.addTextTrackInternal(
|
|
320
|
-
const
|
|
321
|
-
|
|
317
|
+
const m = new Blob([l], { type: "text/vtt" }), b = URL.createObjectURL(m);
|
|
318
|
+
this.addTextTrackInternal(b, i, "user", !0), setTimeout(() => {
|
|
319
|
+
const n = this.store.get().subtitleTracks.findIndex((x) => x.label === i);
|
|
320
|
+
n !== -1 && (this.setSubtitle(n), this.notify({ type: "success", message: "Subtitle uploaded", duration: 3e3 }));
|
|
322
321
|
}, 200);
|
|
323
322
|
}, s.onerror = () => {
|
|
324
323
|
this.notify({ type: "error", message: "Failed to read file", duration: 3e3 });
|
|
325
324
|
}, s.readAsText(e);
|
|
326
325
|
}
|
|
327
|
-
addTextTrackInternal(e, i, s = "",
|
|
326
|
+
addTextTrackInternal(e, i, s = "", r = !1) {
|
|
328
327
|
const l = document.createElement("track");
|
|
329
|
-
l.kind = "subtitles", l.label = i, l.src = e, l.srclang = s,
|
|
328
|
+
l.kind = "subtitles", l.label = i, l.src = e, l.srclang = s, r && (l.default = !0), this.video.appendChild(l), this.updateSubtitles();
|
|
330
329
|
}
|
|
331
330
|
play() {
|
|
332
331
|
return this.video.play();
|
|
@@ -403,8 +402,8 @@ class Ot {
|
|
|
403
402
|
try {
|
|
404
403
|
const i = e.cast.framework.CastContext.getInstance().getCurrentSession();
|
|
405
404
|
if (!i) return;
|
|
406
|
-
const s = new e.chrome.cast.media.MediaInfo(this.currentSrc, this.currentSrc.includes(".m3u8") ? "application/x-mpegurl" : "video/mp4"),
|
|
407
|
-
i.loadMedia(
|
|
405
|
+
const s = new e.chrome.cast.media.MediaInfo(this.currentSrc, this.currentSrc.includes(".m3u8") ? "application/x-mpegurl" : "video/mp4"), r = new e.chrome.cast.media.LoadRequest(s);
|
|
406
|
+
i.loadMedia(r).then(() => {
|
|
408
407
|
this.notify({ type: "success", message: "Casting...", duration: 3e3 });
|
|
409
408
|
}).catch((l) => console.error("Cast load error", l));
|
|
410
409
|
} catch (i) {
|
|
@@ -417,10 +416,10 @@ class Ot {
|
|
|
417
416
|
this.store.setState({ activeCues: [] });
|
|
418
417
|
return;
|
|
419
418
|
}
|
|
420
|
-
const s = Array.from(this.video.textTracks).filter((
|
|
419
|
+
const s = Array.from(this.video.textTracks).filter((r) => r.kind === "subtitles" || r.kind === "captions")[e.currentSubtitle];
|
|
421
420
|
if (s && s.activeCues) {
|
|
422
|
-
const
|
|
423
|
-
this.store.setState({ activeCues:
|
|
421
|
+
const r = Array.from(s.activeCues).map((l) => l.text);
|
|
422
|
+
this.store.setState({ activeCues: r });
|
|
424
423
|
} else
|
|
425
424
|
this.store.setState({ activeCues: [] });
|
|
426
425
|
}
|
|
@@ -428,10 +427,10 @@ class Ot {
|
|
|
428
427
|
if (Array.from(this.video.textTracks).forEach((i) => {
|
|
429
428
|
i.removeEventListener("cuechange", this.boundCueChange), i.mode = "hidden";
|
|
430
429
|
}), this.store.setState({ currentSubtitle: e, subtitleOffset: 0, activeCues: [] }), e !== -1) {
|
|
431
|
-
const s = Array.from(this.video.textTracks).filter((
|
|
430
|
+
const s = Array.from(this.video.textTracks).filter((r) => r.kind === "subtitles" || r.kind === "captions")[e];
|
|
432
431
|
if (s) {
|
|
433
|
-
const
|
|
434
|
-
s.mode =
|
|
432
|
+
const r = this.store.get().subtitleSettings;
|
|
433
|
+
s.mode = r.useNative ? "showing" : "hidden", s.addEventListener("cuechange", this.boundCueChange), this.handleCueChange();
|
|
435
434
|
}
|
|
436
435
|
}
|
|
437
436
|
}
|
|
@@ -440,12 +439,12 @@ class Ot {
|
|
|
440
439
|
this.store.setState({ subtitleSettings: s }), e.useNative !== void 0 && this.setSubtitle(this.store.get().currentSubtitle);
|
|
441
440
|
}
|
|
442
441
|
resetSubtitleSettings() {
|
|
443
|
-
this.store.setState({ subtitleSettings:
|
|
442
|
+
this.store.setState({ subtitleSettings: ce }), this.setSubtitle(this.store.get().currentSubtitle);
|
|
444
443
|
}
|
|
445
444
|
setSubtitleOffset(e) {
|
|
446
445
|
const i = this.store.get().subtitleOffset, s = e - i;
|
|
447
|
-
Math.abs(s) < 1e-3 || (Array.from(this.video.textTracks).forEach((
|
|
448
|
-
(
|
|
446
|
+
Math.abs(s) < 1e-3 || (Array.from(this.video.textTracks).forEach((r) => {
|
|
447
|
+
(r.mode === "showing" || r.mode === "hidden") && r.cues && Array.from(r.cues).forEach((l) => {
|
|
449
448
|
l.startTime += s, l.endTime += s;
|
|
450
449
|
});
|
|
451
450
|
}), this.store.setState({ subtitleOffset: e }), this.notify({ type: "info", message: `Subtitle Offset: ${e > 0 ? "+" : ""}${e.toFixed(1)}s`, duration: 1500 }));
|
|
@@ -460,21 +459,21 @@ class Ot {
|
|
|
460
459
|
}
|
|
461
460
|
const i = this.notify({ type: "loading", message: "Preparing download...", progress: 0 });
|
|
462
461
|
try {
|
|
463
|
-
const
|
|
464
|
-
if (!
|
|
465
|
-
const l =
|
|
462
|
+
const r = await this.fetchWithRetry(e);
|
|
463
|
+
if (!r.body) throw new Error("No body");
|
|
464
|
+
const l = r.body.getReader(), m = r.headers.get("Content-Length"), b = m ? parseInt(m, 10) : 0;
|
|
466
465
|
let h = 0;
|
|
467
|
-
const
|
|
466
|
+
const f = [];
|
|
468
467
|
for (; ; ) {
|
|
469
|
-
const { done:
|
|
470
|
-
if (
|
|
471
|
-
if (
|
|
472
|
-
const
|
|
473
|
-
this.notify({ id: i, type: "loading", message: `Downloading... ${
|
|
468
|
+
const { done: T, value: z } = await l.read();
|
|
469
|
+
if (T) break;
|
|
470
|
+
if (f.push(z), h += z.length, b) {
|
|
471
|
+
const u = Math.round(h / b * 100);
|
|
472
|
+
this.notify({ id: i, type: "loading", message: `Downloading... ${u}%`, progress: u });
|
|
474
473
|
}
|
|
475
474
|
}
|
|
476
|
-
const
|
|
477
|
-
|
|
475
|
+
const n = new Blob(f), x = window.URL.createObjectURL(n), C = document.createElement("a");
|
|
476
|
+
C.style.display = "none", C.href = x, C.download = ((s = e.split("/").pop()) == null ? void 0 : s.split("?")[0]) || "video.mp4", document.body.appendChild(C), C.click(), window.URL.revokeObjectURL(x), document.body.removeChild(C), this.notify({ id: i, type: "success", message: "Saved!", duration: 3e3 });
|
|
478
477
|
} catch {
|
|
479
478
|
this.notify({ id: i, type: "error", message: "Download failed.", duration: 4e3 }), window.open(e, "_blank");
|
|
480
479
|
}
|
|
@@ -500,15 +499,15 @@ class Ot {
|
|
|
500
499
|
this.events.destroy(), this.store.destroy(), this.plugins.forEach((i) => i.destroy && i.destroy()), this.plugins.clear(), this.video.remove(), this.audioEngine.destroy();
|
|
501
500
|
}
|
|
502
501
|
}
|
|
503
|
-
class
|
|
502
|
+
class ut {
|
|
504
503
|
constructor() {
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
504
|
+
g(this, "name", "HlsPlugin");
|
|
505
|
+
g(this, "hls", null);
|
|
506
|
+
g(this, "core", null);
|
|
508
507
|
}
|
|
509
508
|
init(e) {
|
|
510
509
|
this.core = e, this.core.events.on("load", (i) => {
|
|
511
|
-
i.type === "hls" || i.url.includes(".m3u8") ?
|
|
510
|
+
i.type === "hls" || i.url.includes(".m3u8") ? U.isSupported() ? this.loadHls(i.url) : this.core.video.canPlayType("application/vnd.apple.mpegurl") && (this.core.video.src = i.url) : this.hls && (this.hls.destroy(), this.hls = null);
|
|
512
511
|
}), this.core.events.on("quality-request", (i) => {
|
|
513
512
|
this.hls && (this.hls.currentLevel = i);
|
|
514
513
|
}), this.core.events.on("audio-track-request", (i) => {
|
|
@@ -516,34 +515,34 @@ class Ft {
|
|
|
516
515
|
});
|
|
517
516
|
}
|
|
518
517
|
loadHls(e) {
|
|
519
|
-
this.hls && this.hls.destroy(), this.hls = new
|
|
518
|
+
this.hls && this.hls.destroy(), this.hls = new U({
|
|
520
519
|
autoStartLoad: !0,
|
|
521
520
|
startLevel: -1,
|
|
522
521
|
// Auto
|
|
523
522
|
capLevelToPlayerSize: !0
|
|
524
523
|
// Performance opt
|
|
525
|
-
}), this.hls.loadSource(e), this.hls.attachMedia(this.core.video), this.hls.on(
|
|
526
|
-
const
|
|
524
|
+
}), this.hls.loadSource(e), this.hls.attachMedia(this.core.video), this.hls.on(U.Events.MANIFEST_PARSED, (i, s) => {
|
|
525
|
+
const r = s.levels.map((l, m) => ({
|
|
527
526
|
height: l.height,
|
|
528
527
|
bitrate: l.bitrate,
|
|
529
528
|
index: m
|
|
530
529
|
}));
|
|
531
|
-
this.core.store.setState({ qualityLevels:
|
|
532
|
-
}), this.hls.on(
|
|
533
|
-
const
|
|
530
|
+
this.core.store.setState({ qualityLevels: r });
|
|
531
|
+
}), this.hls.on(U.Events.AUDIO_TRACKS_UPDATED, (i, s) => {
|
|
532
|
+
const r = s.audioTracks.map((l, m) => ({
|
|
534
533
|
label: l.name || l.lang || `Audio ${m + 1}`,
|
|
535
534
|
language: l.lang || "",
|
|
536
535
|
index: m
|
|
537
536
|
}));
|
|
538
537
|
this.core.store.setState({
|
|
539
|
-
audioTracks:
|
|
538
|
+
audioTracks: r,
|
|
540
539
|
currentAudioTrack: this.hls.audioTrack
|
|
541
540
|
});
|
|
542
|
-
}), this.hls.on(
|
|
543
|
-
}), this.hls.on(
|
|
541
|
+
}), this.hls.on(U.Events.LEVEL_SWITCHED, (i, s) => {
|
|
542
|
+
}), this.hls.on(U.Events.ERROR, (i, s) => {
|
|
544
543
|
if (s.fatal) {
|
|
545
|
-
const
|
|
546
|
-
this.core.triggerError(
|
|
544
|
+
const r = s.details || "Unknown HLS Error";
|
|
545
|
+
this.core.triggerError(r, !0);
|
|
547
546
|
}
|
|
548
547
|
});
|
|
549
548
|
}
|
|
@@ -551,53 +550,53 @@ class Ft {
|
|
|
551
550
|
this.hls && (this.hls.destroy(), this.hls = null);
|
|
552
551
|
}
|
|
553
552
|
}
|
|
554
|
-
const
|
|
555
|
-
if (isNaN(
|
|
556
|
-
const e = Math.floor(
|
|
553
|
+
const ne = (c) => {
|
|
554
|
+
if (isNaN(c)) return "00:00";
|
|
555
|
+
const e = Math.floor(c / 3600), i = Math.floor(c % 3600 / 60), s = Math.floor(c % 60);
|
|
557
556
|
return e > 0 ? `${e}:${i.toString().padStart(2, "0")}:${s.toString().padStart(2, "0")}` : `${i}:${s.toString().padStart(2, "0")}`;
|
|
558
|
-
},
|
|
557
|
+
}, ht = async (c, e = 3) => {
|
|
559
558
|
for (let i = 0; i < e; i++)
|
|
560
559
|
try {
|
|
561
|
-
const s = await fetch(
|
|
560
|
+
const s = await fetch(c);
|
|
562
561
|
if (!s.ok) throw new Error(`HTTP ${s.status}`);
|
|
563
562
|
return await s.text();
|
|
564
563
|
} catch (s) {
|
|
565
564
|
if (i === e - 1) throw s;
|
|
566
|
-
await new Promise((
|
|
565
|
+
await new Promise((r) => setTimeout(r, 1e3));
|
|
567
566
|
}
|
|
568
567
|
throw new Error("Failed");
|
|
569
|
-
},
|
|
568
|
+
}, mt = async (c, e) => {
|
|
570
569
|
try {
|
|
571
|
-
const s = (await
|
|
572
|
-
`),
|
|
570
|
+
const s = (await ht(c)).split(`
|
|
571
|
+
`), r = [];
|
|
573
572
|
let l = null, m = null;
|
|
574
|
-
const
|
|
575
|
-
const
|
|
573
|
+
const b = c.substring(0, c.lastIndexOf("/") + 1), h = (f) => {
|
|
574
|
+
const n = f.split(":");
|
|
576
575
|
let x = 0;
|
|
577
|
-
return
|
|
576
|
+
return n.length === 3 ? (x += parseFloat(n[0]) * 3600, x += parseFloat(n[1]) * 60, x += parseFloat(n[2])) : (x += parseFloat(n[0]) * 60, x += parseFloat(n[1])), x;
|
|
578
577
|
};
|
|
579
|
-
for (let
|
|
580
|
-
if (
|
|
581
|
-
const
|
|
582
|
-
l = h(
|
|
583
|
-
} else if (l !== null && m !== null &&
|
|
584
|
-
let [
|
|
585
|
-
!
|
|
586
|
-
let
|
|
578
|
+
for (let f of s)
|
|
579
|
+
if (f = f.trim(), f.includes("-->")) {
|
|
580
|
+
const n = f.split("-->");
|
|
581
|
+
l = h(n[0].trim()), m = h(n[1].trim());
|
|
582
|
+
} else if (l !== null && m !== null && f.length > 0) {
|
|
583
|
+
let [n, x] = f.split("#");
|
|
584
|
+
!n.match(/^https?:\/\//) && !n.startsWith("data:") && (n = b + n);
|
|
585
|
+
let C = 0, T = 0, z = 0, u = 0;
|
|
587
586
|
if (x && x.startsWith("xywh=")) {
|
|
588
|
-
const
|
|
589
|
-
|
|
587
|
+
const M = x.replace("xywh=", "").split(",");
|
|
588
|
+
M.length === 4 && (C = parseInt(M[0]), T = parseInt(M[1]), z = parseInt(M[2]), u = parseInt(M[3]));
|
|
590
589
|
}
|
|
591
|
-
|
|
590
|
+
z > 0 && u > 0 && r.push({ start: l, end: m, url: n, x: C, y: T, w: z, h: u }), l = null, m = null;
|
|
592
591
|
}
|
|
593
|
-
return
|
|
592
|
+
return r;
|
|
594
593
|
} catch {
|
|
595
594
|
return e({ type: "warning", message: "Failed to load thumbnails", duration: 4e3 }), [];
|
|
596
595
|
}
|
|
597
|
-
},
|
|
598
|
-
const [i, s] = w(
|
|
599
|
-
return
|
|
600
|
-
if (
|
|
596
|
+
}, $e = (c, e = 200) => {
|
|
597
|
+
const [i, s] = w(c), [r, l] = w(!1);
|
|
598
|
+
return R(() => {
|
|
599
|
+
if (c)
|
|
601
600
|
s(!0), requestAnimationFrame(() => {
|
|
602
601
|
requestAnimationFrame(() => {
|
|
603
602
|
l(!0);
|
|
@@ -610,14 +609,467 @@ const ae = (d) => {
|
|
|
610
609
|
}, e);
|
|
611
610
|
return () => clearTimeout(m);
|
|
612
611
|
}
|
|
613
|
-
}, [
|
|
614
|
-
}
|
|
615
|
-
|
|
612
|
+
}, [c, e]), { isMounted: i, isVisible: r };
|
|
613
|
+
};
|
|
614
|
+
/**
|
|
615
|
+
* @license lucide-react v0.462.0 - ISC
|
|
616
|
+
*
|
|
617
|
+
* This source code is licensed under the ISC license.
|
|
618
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
619
|
+
*/
|
|
620
|
+
const pt = (c) => c.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Ue = (...c) => c.filter((e, i, s) => !!e && e.trim() !== "" && s.indexOf(e) === i).join(" ").trim();
|
|
621
|
+
/**
|
|
622
|
+
* @license lucide-react v0.462.0 - ISC
|
|
623
|
+
*
|
|
624
|
+
* This source code is licensed under the ISC license.
|
|
625
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
626
|
+
*/
|
|
627
|
+
var ft = {
|
|
628
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
629
|
+
width: 24,
|
|
630
|
+
height: 24,
|
|
631
|
+
viewBox: "0 0 24 24",
|
|
632
|
+
fill: "none",
|
|
633
|
+
stroke: "currentColor",
|
|
634
|
+
strokeWidth: 2,
|
|
635
|
+
strokeLinecap: "round",
|
|
636
|
+
strokeLinejoin: "round"
|
|
637
|
+
};
|
|
638
|
+
/**
|
|
639
|
+
* @license lucide-react v0.462.0 - ISC
|
|
640
|
+
*
|
|
641
|
+
* This source code is licensed under the ISC license.
|
|
642
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
643
|
+
*/
|
|
644
|
+
const vt = He(
|
|
645
|
+
({
|
|
646
|
+
color: c = "currentColor",
|
|
647
|
+
size: e = 24,
|
|
648
|
+
strokeWidth: i = 2,
|
|
649
|
+
absoluteStrokeWidth: s,
|
|
650
|
+
className: r = "",
|
|
651
|
+
children: l,
|
|
652
|
+
iconNode: m,
|
|
653
|
+
...b
|
|
654
|
+
}, h) => oe(
|
|
655
|
+
"svg",
|
|
656
|
+
{
|
|
657
|
+
ref: h,
|
|
658
|
+
...ft,
|
|
659
|
+
width: e,
|
|
660
|
+
height: e,
|
|
661
|
+
stroke: c,
|
|
662
|
+
strokeWidth: s ? Number(i) * 24 / Number(e) : i,
|
|
663
|
+
className: Ue("lucide", r),
|
|
664
|
+
...b
|
|
665
|
+
},
|
|
666
|
+
[
|
|
667
|
+
...m.map(([f, n]) => oe(f, n)),
|
|
668
|
+
...Array.isArray(l) ? l : [l]
|
|
669
|
+
]
|
|
670
|
+
)
|
|
671
|
+
);
|
|
672
|
+
/**
|
|
673
|
+
* @license lucide-react v0.462.0 - ISC
|
|
674
|
+
*
|
|
675
|
+
* This source code is licensed under the ISC license.
|
|
676
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
677
|
+
*/
|
|
678
|
+
const v = (c, e) => {
|
|
679
|
+
const i = He(
|
|
680
|
+
({ className: s, ...r }, l) => oe(vt, {
|
|
681
|
+
ref: l,
|
|
682
|
+
iconNode: e,
|
|
683
|
+
className: Ue(`lucide-${pt(c)}`, s),
|
|
684
|
+
...r
|
|
685
|
+
})
|
|
686
|
+
);
|
|
687
|
+
return i.displayName = `${c}`, i;
|
|
688
|
+
};
|
|
689
|
+
/**
|
|
690
|
+
* @license lucide-react v0.462.0 - ISC
|
|
691
|
+
*
|
|
692
|
+
* This source code is licensed under the ISC license.
|
|
693
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
694
|
+
*/
|
|
695
|
+
const bt = v("ArrowLeft", [
|
|
696
|
+
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
697
|
+
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
698
|
+
]);
|
|
699
|
+
/**
|
|
700
|
+
* @license lucide-react v0.462.0 - ISC
|
|
701
|
+
*
|
|
702
|
+
* This source code is licensed under the ISC license.
|
|
703
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
704
|
+
*/
|
|
705
|
+
const gt = v("Bold", [
|
|
706
|
+
[
|
|
707
|
+
"path",
|
|
708
|
+
{ d: "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8", key: "mg9rjx" }
|
|
709
|
+
]
|
|
710
|
+
]);
|
|
711
|
+
/**
|
|
712
|
+
* @license lucide-react v0.462.0 - ISC
|
|
713
|
+
*
|
|
714
|
+
* This source code is licensed under the ISC license.
|
|
715
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
716
|
+
*/
|
|
717
|
+
const yt = v("Captions", [
|
|
718
|
+
["rect", { width: "18", height: "14", x: "3", y: "5", rx: "2", ry: "2", key: "12ruh7" }],
|
|
719
|
+
["path", { d: "M7 15h4M15 15h2M7 11h2M13 11h4", key: "1ueiar" }]
|
|
720
|
+
]);
|
|
721
|
+
/**
|
|
722
|
+
* @license lucide-react v0.462.0 - ISC
|
|
723
|
+
*
|
|
724
|
+
* This source code is licensed under the ISC license.
|
|
725
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
726
|
+
*/
|
|
727
|
+
const xt = v("CaseUpper", [
|
|
728
|
+
["path", { d: "m3 15 4-8 4 8", key: "1vwr6u" }],
|
|
729
|
+
["path", { d: "M4 13h6", key: "1r9ots" }],
|
|
730
|
+
["path", { d: "M15 11h4.5a2 2 0 0 1 0 4H15V7h4a2 2 0 0 1 0 4", key: "1sqfas" }]
|
|
731
|
+
]);
|
|
732
|
+
/**
|
|
733
|
+
* @license lucide-react v0.462.0 - ISC
|
|
734
|
+
*
|
|
735
|
+
* This source code is licensed under the ISC license.
|
|
736
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
737
|
+
*/
|
|
738
|
+
const wt = v("Cast", [
|
|
739
|
+
["path", { d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6", key: "3zrzxg" }],
|
|
740
|
+
["path", { d: "M2 12a9 9 0 0 1 8 8", key: "g6cvee" }],
|
|
741
|
+
["path", { d: "M2 16a5 5 0 0 1 4 4", key: "1y1dii" }],
|
|
742
|
+
["line", { x1: "2", x2: "2.01", y1: "20", y2: "20", key: "xu2jvo" }]
|
|
743
|
+
]);
|
|
744
|
+
/**
|
|
745
|
+
* @license lucide-react v0.462.0 - ISC
|
|
746
|
+
*
|
|
747
|
+
* This source code is licensed under the ISC license.
|
|
748
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
749
|
+
*/
|
|
750
|
+
const kt = v("Check", [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]]);
|
|
751
|
+
/**
|
|
752
|
+
* @license lucide-react v0.462.0 - ISC
|
|
753
|
+
*
|
|
754
|
+
* This source code is licensed under the ISC license.
|
|
755
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
756
|
+
*/
|
|
757
|
+
const Ct = v("Clock", [
|
|
758
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
759
|
+
["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
|
|
760
|
+
]);
|
|
761
|
+
/**
|
|
762
|
+
* @license lucide-react v0.462.0 - ISC
|
|
763
|
+
*
|
|
764
|
+
* This source code is licensed under the ISC license.
|
|
765
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
766
|
+
*/
|
|
767
|
+
const Nt = v("Download", [
|
|
768
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
769
|
+
["polyline", { points: "7 10 12 15 17 10", key: "2ggqvy" }],
|
|
770
|
+
["line", { x1: "12", x2: "12", y1: "15", y2: "3", key: "1vk2je" }]
|
|
771
|
+
]);
|
|
772
|
+
/**
|
|
773
|
+
* @license lucide-react v0.462.0 - ISC
|
|
774
|
+
*
|
|
775
|
+
* This source code is licensed under the ISC license.
|
|
776
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
777
|
+
*/
|
|
778
|
+
const St = v("Droplet", [
|
|
779
|
+
[
|
|
780
|
+
"path",
|
|
781
|
+
{
|
|
782
|
+
d: "M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5C6 11.1 5 13 5 15a7 7 0 0 0 7 7z",
|
|
783
|
+
key: "c7niix"
|
|
784
|
+
}
|
|
785
|
+
]
|
|
786
|
+
]);
|
|
787
|
+
/**
|
|
788
|
+
* @license lucide-react v0.462.0 - ISC
|
|
789
|
+
*
|
|
790
|
+
* This source code is licensed under the ISC license.
|
|
791
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
792
|
+
*/
|
|
793
|
+
const Tt = v("Eye", [
|
|
794
|
+
[
|
|
795
|
+
"path",
|
|
796
|
+
{
|
|
797
|
+
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
798
|
+
key: "1nclc0"
|
|
799
|
+
}
|
|
800
|
+
],
|
|
801
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
802
|
+
]);
|
|
803
|
+
/**
|
|
804
|
+
* @license lucide-react v0.462.0 - ISC
|
|
805
|
+
*
|
|
806
|
+
* This source code is licensed under the ISC license.
|
|
807
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
808
|
+
*/
|
|
809
|
+
const zt = v("LoaderCircle", [
|
|
810
|
+
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
811
|
+
]);
|
|
812
|
+
/**
|
|
813
|
+
* @license lucide-react v0.462.0 - ISC
|
|
814
|
+
*
|
|
815
|
+
* This source code is licensed under the ISC license.
|
|
816
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
817
|
+
*/
|
|
818
|
+
const Mt = v("Maximize", [
|
|
819
|
+
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
|
|
820
|
+
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
|
|
821
|
+
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
|
|
822
|
+
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
|
|
823
|
+
]);
|
|
824
|
+
/**
|
|
825
|
+
* @license lucide-react v0.462.0 - ISC
|
|
826
|
+
*
|
|
827
|
+
* This source code is licensed under the ISC license.
|
|
828
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
829
|
+
*/
|
|
830
|
+
const Et = v("Minimize", [
|
|
831
|
+
["path", { d: "M8 3v3a2 2 0 0 1-2 2H3", key: "hohbtr" }],
|
|
832
|
+
["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3", key: "5jw1f3" }],
|
|
833
|
+
["path", { d: "M3 16h3a2 2 0 0 1 2 2v3", key: "198tvr" }],
|
|
834
|
+
["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3", key: "ph8mxp" }]
|
|
835
|
+
]);
|
|
836
|
+
/**
|
|
837
|
+
* @license lucide-react v0.462.0 - ISC
|
|
838
|
+
*
|
|
839
|
+
* This source code is licensed under the ISC license.
|
|
840
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
841
|
+
*/
|
|
842
|
+
const It = v("Minus", [["path", { d: "M5 12h14", key: "1ays0h" }]]);
|
|
843
|
+
/**
|
|
844
|
+
* @license lucide-react v0.462.0 - ISC
|
|
845
|
+
*
|
|
846
|
+
* This source code is licensed under the ISC license.
|
|
847
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
848
|
+
*/
|
|
849
|
+
const Rt = v("MoveVertical", [
|
|
850
|
+
["path", { d: "M12 2v20", key: "t6zp3m" }],
|
|
851
|
+
["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
|
|
852
|
+
["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
|
|
853
|
+
]);
|
|
854
|
+
/**
|
|
855
|
+
* @license lucide-react v0.462.0 - ISC
|
|
856
|
+
*
|
|
857
|
+
* This source code is licensed under the ISC license.
|
|
858
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
859
|
+
*/
|
|
860
|
+
const Pt = v("Palette", [
|
|
861
|
+
["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor", key: "1okk4w" }],
|
|
862
|
+
["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
|
|
863
|
+
["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }],
|
|
864
|
+
["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
|
|
865
|
+
[
|
|
866
|
+
"path",
|
|
867
|
+
{
|
|
868
|
+
d: "M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z",
|
|
869
|
+
key: "12rzf8"
|
|
870
|
+
}
|
|
871
|
+
]
|
|
872
|
+
]);
|
|
873
|
+
/**
|
|
874
|
+
* @license lucide-react v0.462.0 - ISC
|
|
875
|
+
*
|
|
876
|
+
* This source code is licensed under the ISC license.
|
|
877
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
878
|
+
*/
|
|
879
|
+
const Lt = v("Pause", [
|
|
880
|
+
["rect", { x: "14", y: "4", width: "4", height: "16", rx: "1", key: "zuxfzm" }],
|
|
881
|
+
["rect", { x: "6", y: "4", width: "4", height: "16", rx: "1", key: "1okwgv" }]
|
|
882
|
+
]);
|
|
883
|
+
/**
|
|
884
|
+
* @license lucide-react v0.462.0 - ISC
|
|
885
|
+
*
|
|
886
|
+
* This source code is licensed under the ISC license.
|
|
887
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
888
|
+
*/
|
|
889
|
+
const $t = v("PictureInPicture", [
|
|
890
|
+
[
|
|
891
|
+
"path",
|
|
892
|
+
{
|
|
893
|
+
d: "M8 4.5v5H3m-1-6 6 6m13 0v-3c0-1.16-.84-2-2-2h-7m-9 9v2c0 1.05.95 2 2 2h3",
|
|
894
|
+
key: "bcd8fb"
|
|
895
|
+
}
|
|
896
|
+
],
|
|
897
|
+
["rect", { width: "10", height: "7", x: "12", y: "13.5", ry: "2", key: "136fx3" }]
|
|
898
|
+
]);
|
|
899
|
+
/**
|
|
900
|
+
* @license lucide-react v0.462.0 - ISC
|
|
901
|
+
*
|
|
902
|
+
* This source code is licensed under the ISC license.
|
|
903
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
904
|
+
*/
|
|
905
|
+
const At = v("Play", [
|
|
906
|
+
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
|
|
907
|
+
]);
|
|
908
|
+
/**
|
|
909
|
+
* @license lucide-react v0.462.0 - ISC
|
|
910
|
+
*
|
|
911
|
+
* This source code is licensed under the ISC license.
|
|
912
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
913
|
+
*/
|
|
914
|
+
const Bt = v("Plus", [
|
|
915
|
+
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
916
|
+
["path", { d: "M12 5v14", key: "s699le" }]
|
|
917
|
+
]);
|
|
918
|
+
/**
|
|
919
|
+
* @license lucide-react v0.462.0 - ISC
|
|
920
|
+
*
|
|
921
|
+
* This source code is licensed under the ISC license.
|
|
922
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
923
|
+
*/
|
|
924
|
+
const Vt = v("RefreshCcw", [
|
|
925
|
+
["path", { d: "M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "14sxne" }],
|
|
926
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }],
|
|
927
|
+
["path", { d: "M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16", key: "1hlbsb" }],
|
|
928
|
+
["path", { d: "M16 16h5v5", key: "ccwih5" }]
|
|
929
|
+
]);
|
|
930
|
+
/**
|
|
931
|
+
* @license lucide-react v0.462.0 - ISC
|
|
932
|
+
*
|
|
933
|
+
* This source code is licensed under the ISC license.
|
|
934
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
935
|
+
*/
|
|
936
|
+
const Ot = v("RotateCcw", [
|
|
937
|
+
["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
|
|
938
|
+
["path", { d: "M3 3v5h5", key: "1xhq8a" }]
|
|
939
|
+
]);
|
|
940
|
+
/**
|
|
941
|
+
* @license lucide-react v0.462.0 - ISC
|
|
942
|
+
*
|
|
943
|
+
* This source code is licensed under the ISC license.
|
|
944
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
945
|
+
*/
|
|
946
|
+
const jt = v("RotateCw", [
|
|
947
|
+
["path", { d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8", key: "1p45f6" }],
|
|
948
|
+
["path", { d: "M21 3v5h-5", key: "1q7to0" }]
|
|
949
|
+
]);
|
|
950
|
+
/**
|
|
951
|
+
* @license lucide-react v0.462.0 - ISC
|
|
952
|
+
*
|
|
953
|
+
* This source code is licensed under the ISC license.
|
|
954
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
955
|
+
*/
|
|
956
|
+
const Ft = v("Settings", [
|
|
957
|
+
[
|
|
958
|
+
"path",
|
|
959
|
+
{
|
|
960
|
+
d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",
|
|
961
|
+
key: "1qme2f"
|
|
962
|
+
}
|
|
963
|
+
],
|
|
964
|
+
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
965
|
+
]);
|
|
966
|
+
/**
|
|
967
|
+
* @license lucide-react v0.462.0 - ISC
|
|
968
|
+
*
|
|
969
|
+
* This source code is licensed under the ISC license.
|
|
970
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
971
|
+
*/
|
|
972
|
+
const Ht = v("SlidersHorizontal", [
|
|
973
|
+
["line", { x1: "21", x2: "14", y1: "4", y2: "4", key: "obuewd" }],
|
|
974
|
+
["line", { x1: "10", x2: "3", y1: "4", y2: "4", key: "1q6298" }],
|
|
975
|
+
["line", { x1: "21", x2: "12", y1: "12", y2: "12", key: "1iu8h1" }],
|
|
976
|
+
["line", { x1: "8", x2: "3", y1: "12", y2: "12", key: "ntss68" }],
|
|
977
|
+
["line", { x1: "21", x2: "16", y1: "20", y2: "20", key: "14d8ph" }],
|
|
978
|
+
["line", { x1: "12", x2: "3", y1: "20", y2: "20", key: "m0wm8r" }],
|
|
979
|
+
["line", { x1: "14", x2: "14", y1: "2", y2: "6", key: "14e1ph" }],
|
|
980
|
+
["line", { x1: "8", x2: "8", y1: "10", y2: "14", key: "1i6ji0" }],
|
|
981
|
+
["line", { x1: "16", x2: "16", y1: "18", y2: "22", key: "1lctlv" }]
|
|
982
|
+
]);
|
|
983
|
+
/**
|
|
984
|
+
* @license lucide-react v0.462.0 - ISC
|
|
985
|
+
*
|
|
986
|
+
* This source code is licensed under the ISC license.
|
|
987
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
988
|
+
*/
|
|
989
|
+
const qt = v("Type", [
|
|
990
|
+
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
|
|
991
|
+
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
|
|
992
|
+
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
|
|
993
|
+
]);
|
|
994
|
+
/**
|
|
995
|
+
* @license lucide-react v0.462.0 - ISC
|
|
996
|
+
*
|
|
997
|
+
* This source code is licensed under the ISC license.
|
|
998
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
999
|
+
*/
|
|
1000
|
+
const Dt = v("Upload", [
|
|
1001
|
+
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
|
|
1002
|
+
["polyline", { points: "17 8 12 3 7 8", key: "t8dd8p" }],
|
|
1003
|
+
["line", { x1: "12", x2: "12", y1: "3", y2: "15", key: "widbto" }]
|
|
1004
|
+
]);
|
|
1005
|
+
/**
|
|
1006
|
+
* @license lucide-react v0.462.0 - ISC
|
|
1007
|
+
*
|
|
1008
|
+
* This source code is licensed under the ISC license.
|
|
1009
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1010
|
+
*/
|
|
1011
|
+
const Ut = v("Users", [
|
|
1012
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
1013
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
|
|
1014
|
+
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
1015
|
+
["path", { d: "M16 3.13a4 4 0 0 1 0 7.75", key: "1da9ce" }]
|
|
1016
|
+
]);
|
|
1017
|
+
/**
|
|
1018
|
+
* @license lucide-react v0.462.0 - ISC
|
|
1019
|
+
*
|
|
1020
|
+
* This source code is licensed under the ISC license.
|
|
1021
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1022
|
+
*/
|
|
1023
|
+
const Gt = v("Volume1", [
|
|
1024
|
+
[
|
|
1025
|
+
"path",
|
|
1026
|
+
{
|
|
1027
|
+
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
1028
|
+
key: "uqj9uw"
|
|
1029
|
+
}
|
|
1030
|
+
],
|
|
1031
|
+
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }]
|
|
1032
|
+
]);
|
|
1033
|
+
/**
|
|
1034
|
+
* @license lucide-react v0.462.0 - ISC
|
|
1035
|
+
*
|
|
1036
|
+
* This source code is licensed under the ISC license.
|
|
1037
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1038
|
+
*/
|
|
1039
|
+
const Wt = v("Volume2", [
|
|
1040
|
+
[
|
|
1041
|
+
"path",
|
|
1042
|
+
{
|
|
1043
|
+
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
1044
|
+
key: "uqj9uw"
|
|
1045
|
+
}
|
|
1046
|
+
],
|
|
1047
|
+
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
|
|
1048
|
+
["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
|
|
1049
|
+
]);
|
|
1050
|
+
/**
|
|
1051
|
+
* @license lucide-react v0.462.0 - ISC
|
|
1052
|
+
*
|
|
1053
|
+
* This source code is licensed under the ISC license.
|
|
1054
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1055
|
+
*/
|
|
1056
|
+
const _t = v("VolumeX", [
|
|
1057
|
+
[
|
|
1058
|
+
"path",
|
|
1059
|
+
{
|
|
1060
|
+
d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
|
|
1061
|
+
key: "uqj9uw"
|
|
1062
|
+
}
|
|
1063
|
+
],
|
|
1064
|
+
["line", { x1: "22", x2: "16", y1: "9", y2: "15", key: "1ewh16" }],
|
|
1065
|
+
["line", { x1: "16", x2: "22", y1: "9", y2: "15", key: "5ykzw1" }]
|
|
1066
|
+
]), Ae = At, Be = Lt, Qt = Wt, Xt = Gt, Jt = _t, Kt = Mt, Yt = Et, Zt = Ft, Ge = kt, ei = $t, ti = yt, ii = Nt, si = Dt, ai = bt, le = zt, ri = wt, ni = Ut, oi = Ct, li = It, ci = Bt, di = Ht, ui = qt, We = Pt, hi = Tt, mi = Rt, pi = Vt, fi = gt, vi = xt, bi = St, Ve = ({ className: c }) => /* @__PURE__ */ d("div", { className: `relative flex items-center justify-center ${c}`, children: [
|
|
1067
|
+
/* @__PURE__ */ t(Ot, { className: "w-full h-full", strokeWidth: 2 }),
|
|
616
1068
|
/* @__PURE__ */ t("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
|
|
617
|
-
] }),
|
|
618
|
-
/* @__PURE__ */ t(
|
|
1069
|
+
] }), Oe = ({ className: c }) => /* @__PURE__ */ d("div", { className: `relative flex items-center justify-center ${c}`, children: [
|
|
1070
|
+
/* @__PURE__ */ t(jt, { className: "w-full h-full", strokeWidth: 2 }),
|
|
619
1071
|
/* @__PURE__ */ t("span", { className: "absolute inset-0 flex items-center justify-center text-[32%] font-bold select-none mt-[1px]", children: "10" })
|
|
620
|
-
] }),
|
|
1072
|
+
] }), gi = ({ notifications: c }) => /* @__PURE__ */ t("div", { className: "absolute top-4 left-4 z-50 flex flex-col gap-2 pointer-events-none font-sans", children: c.map((e) => /* @__PURE__ */ d(
|
|
621
1073
|
"div",
|
|
622
1074
|
{
|
|
623
1075
|
className: `
|
|
@@ -626,16 +1078,16 @@ const ae = (d) => {
|
|
|
626
1078
|
${e.type === "warning" ? "border-amber-500/50 text-amber-100" : ""}
|
|
627
1079
|
`,
|
|
628
1080
|
children: [
|
|
629
|
-
e.type === "loading" && /* @__PURE__ */ t(
|
|
630
|
-
/* @__PURE__ */
|
|
1081
|
+
e.type === "loading" && /* @__PURE__ */ t(le, { className: "w-4 h-4 animate-spin text-[var(--accent)]" }),
|
|
1082
|
+
/* @__PURE__ */ d("div", { className: "flex flex-col gap-1 w-full", children: [
|
|
631
1083
|
/* @__PURE__ */ t("span", { children: e.message }),
|
|
632
1084
|
typeof e.progress == "number" && /* @__PURE__ */ t("div", { className: "h-1 w-full bg-white/10 rounded-full overflow-hidden", children: /* @__PURE__ */ t("div", { className: "h-full bg-[var(--accent)] transition-all duration-300", style: { width: `${e.progress}%` } }) })
|
|
633
1085
|
] })
|
|
634
1086
|
]
|
|
635
1087
|
},
|
|
636
1088
|
e.id
|
|
637
|
-
)) }),
|
|
638
|
-
if (e.useNative ||
|
|
1089
|
+
)) }), yi = ({ cues: c, settings: e }) => {
|
|
1090
|
+
if (e.useNative || c.length === 0) return null;
|
|
639
1091
|
const i = () => {
|
|
640
1092
|
switch (e.textStyle) {
|
|
641
1093
|
case "outline":
|
|
@@ -657,7 +1109,7 @@ const ae = (d) => {
|
|
|
657
1109
|
style: {
|
|
658
1110
|
bottom: `${e.verticalOffset}px`
|
|
659
1111
|
},
|
|
660
|
-
children:
|
|
1112
|
+
children: c.map((s, r) => /* @__PURE__ */ t(
|
|
661
1113
|
"div",
|
|
662
1114
|
{
|
|
663
1115
|
className: "mb-1 inline-block max-w-[80%]",
|
|
@@ -681,68 +1133,68 @@ const ae = (d) => {
|
|
|
681
1133
|
}
|
|
682
1134
|
)
|
|
683
1135
|
},
|
|
684
|
-
|
|
1136
|
+
r
|
|
685
1137
|
))
|
|
686
1138
|
}
|
|
687
1139
|
);
|
|
688
|
-
},
|
|
689
|
-
const l =
|
|
1140
|
+
}, _e = ({ children: c, onClose: e, align: i = "right", maxHeight: s, className: r }) => {
|
|
1141
|
+
const l = q(null), m = i === "center" ? "left-1/2 -translate-x-1/2 origin-bottom" : "right-0 origin-bottom-right", b = s ? { maxHeight: `${s}px` } : {};
|
|
690
1142
|
return /* @__PURE__ */ t(
|
|
691
1143
|
"div",
|
|
692
1144
|
{
|
|
693
|
-
className: `absolute bottom-full mb-4 ${m} bg-[var(--bg-panel)] backdrop-blur-xl border-[length:var(--border-width)] border-white/10 shadow-2xl overflow-hidden w-[300px] max-w-[calc(100vw-32px)] text-sm z-50 ring-1 ring-white/5 font-[family-name:var(--font-main)] flex flex-col p-1.5 transition-all duration-300 ease-out ${
|
|
694
|
-
style: { ...
|
|
1145
|
+
className: `absolute bottom-full mb-4 ${m} bg-[var(--bg-panel)] backdrop-blur-xl border-[length:var(--border-width)] border-white/10 shadow-2xl overflow-hidden w-[300px] max-w-[calc(100vw-32px)] text-sm z-50 ring-1 ring-white/5 font-[family-name:var(--font-main)] flex flex-col p-1.5 transition-all duration-300 ease-out ${r}`,
|
|
1146
|
+
style: { ...b, borderRadius: "var(--radius-lg)" },
|
|
695
1147
|
onClick: (h) => h.stopPropagation(),
|
|
696
|
-
children: /* @__PURE__ */ t("div", { className: "overflow-y-auto hide-scrollbar flex-1", style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t("div", { ref: l, children:
|
|
1148
|
+
children: /* @__PURE__ */ t("div", { className: "overflow-y-auto hide-scrollbar flex-1", style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t("div", { ref: l, children: c }) })
|
|
697
1149
|
}
|
|
698
1150
|
);
|
|
699
|
-
},
|
|
1151
|
+
}, k = ({ label: c, value: e, active: i, onClick: s, hasSubmenu: r, icon: l }) => /* @__PURE__ */ d(
|
|
700
1152
|
"button",
|
|
701
1153
|
{
|
|
702
1154
|
onClick: s,
|
|
703
1155
|
className: "w-full flex items-center justify-between px-3 py-2.5 hover:bg-white/10 transition-colors text-left text-zinc-200 active:bg-white/5 focus:outline-none focus:bg-white/10 group overflow-hidden my-0.5",
|
|
704
1156
|
style: { borderRadius: "var(--radius)" },
|
|
705
1157
|
children: [
|
|
706
|
-
/* @__PURE__ */
|
|
1158
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-3 overflow-hidden", children: [
|
|
707
1159
|
l && /* @__PURE__ */ t("span", { className: "text-zinc-400 shrink-0 group-hover:text-zinc-300 transition-colors", children: l }),
|
|
708
|
-
/* @__PURE__ */ t("span", { className: `font-medium truncate text-sm ${i ? "text-[var(--accent)]" : ""}`, title:
|
|
1160
|
+
/* @__PURE__ */ t("span", { className: `font-medium truncate text-sm ${i ? "text-[var(--accent)]" : ""}`, title: c, children: c })
|
|
709
1161
|
] }),
|
|
710
|
-
/* @__PURE__ */
|
|
1162
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 text-zinc-400 shrink-0", children: [
|
|
711
1163
|
e && /* @__PURE__ */ t("span", { className: "text-xs font-medium truncate max-w-[60px]", title: e, children: e }),
|
|
712
|
-
i && /* @__PURE__ */ t(
|
|
713
|
-
|
|
1164
|
+
i && /* @__PURE__ */ t(Ge, { className: "w-4 h-4 text-[var(--accent)] shrink-0" }),
|
|
1165
|
+
r && /* @__PURE__ */ t("span", { className: "text-xs group-hover:translate-x-0.5 transition-transform text-zinc-500 shrink-0", children: "›" })
|
|
714
1166
|
] })
|
|
715
1167
|
]
|
|
716
1168
|
}
|
|
717
|
-
),
|
|
1169
|
+
), j = ({ label: c, onBack: e, rightAction: i }) => /* @__PURE__ */ d(
|
|
718
1170
|
"div",
|
|
719
1171
|
{
|
|
720
1172
|
className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 sticky top-0 z-10 backdrop-blur-md",
|
|
721
1173
|
style: { borderRadius: "var(--radius)" },
|
|
722
1174
|
children: [
|
|
723
|
-
/* @__PURE__ */
|
|
1175
|
+
/* @__PURE__ */ d(
|
|
724
1176
|
"button",
|
|
725
1177
|
{
|
|
726
1178
|
className: "flex items-center gap-2 hover:text-white transition-colors focus:outline-none",
|
|
727
1179
|
onClick: e,
|
|
728
1180
|
children: [
|
|
729
|
-
/* @__PURE__ */ t(
|
|
730
|
-
/* @__PURE__ */ t("span", { children:
|
|
1181
|
+
/* @__PURE__ */ t(ai, { className: "w-3 h-3" }),
|
|
1182
|
+
/* @__PURE__ */ t("span", { children: c })
|
|
731
1183
|
]
|
|
732
1184
|
}
|
|
733
1185
|
),
|
|
734
1186
|
i
|
|
735
1187
|
]
|
|
736
1188
|
}
|
|
737
|
-
),
|
|
1189
|
+
), je = () => /* @__PURE__ */ t("div", { className: "h-px bg-white/5 mx-2 my-1" }), K = ({ label: c, checked: e, onChange: i, icon: s }) => /* @__PURE__ */ d(
|
|
738
1190
|
"div",
|
|
739
1191
|
{
|
|
740
1192
|
className: "flex items-center justify-between py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
741
1193
|
style: { borderRadius: "var(--radius)" },
|
|
742
1194
|
children: [
|
|
743
|
-
/* @__PURE__ */
|
|
1195
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
|
|
744
1196
|
s && /* @__PURE__ */ t("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors", children: s }),
|
|
745
|
-
/* @__PURE__ */ t("span", { className: "text-sm text-zinc-300 font-medium group-hover:text-white transition-colors", children:
|
|
1197
|
+
/* @__PURE__ */ t("span", { className: "text-sm text-zinc-300 font-medium group-hover:text-white transition-colors", children: c })
|
|
746
1198
|
] }),
|
|
747
1199
|
/* @__PURE__ */ t(
|
|
748
1200
|
"button",
|
|
@@ -766,16 +1218,16 @@ const ae = (d) => {
|
|
|
766
1218
|
)
|
|
767
1219
|
]
|
|
768
1220
|
}
|
|
769
|
-
),
|
|
1221
|
+
), Y = ({ label: c, value: e, min: i, max: s, step: r, onChange: l, formatValue: m, icon: b }) => /* @__PURE__ */ d(
|
|
770
1222
|
"div",
|
|
771
1223
|
{
|
|
772
1224
|
className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
773
1225
|
style: { borderRadius: "var(--radius)" },
|
|
774
1226
|
children: [
|
|
775
|
-
/* @__PURE__ */
|
|
776
|
-
/* @__PURE__ */
|
|
777
|
-
|
|
778
|
-
/* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children:
|
|
1227
|
+
/* @__PURE__ */ d("div", { className: "flex justify-between items-center mb-2", children: [
|
|
1228
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
|
|
1229
|
+
b && /* @__PURE__ */ t("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors", children: b }),
|
|
1230
|
+
/* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: c })
|
|
779
1231
|
] }),
|
|
780
1232
|
/* @__PURE__ */ t(
|
|
781
1233
|
"span",
|
|
@@ -786,14 +1238,14 @@ const ae = (d) => {
|
|
|
786
1238
|
}
|
|
787
1239
|
)
|
|
788
1240
|
] }),
|
|
789
|
-
/* @__PURE__ */
|
|
1241
|
+
/* @__PURE__ */ d("div", { className: "relative h-4 flex items-center px-1", children: [
|
|
790
1242
|
/* @__PURE__ */ t(
|
|
791
1243
|
"input",
|
|
792
1244
|
{
|
|
793
1245
|
type: "range",
|
|
794
1246
|
min: i,
|
|
795
1247
|
max: s,
|
|
796
|
-
step:
|
|
1248
|
+
step: r,
|
|
797
1249
|
value: e,
|
|
798
1250
|
onChange: (h) => l(parseFloat(h.target.value)),
|
|
799
1251
|
className: "w-full h-1.5 appearance-none cursor-pointer focus:outline-none focus:ring-2 strata-range-input",
|
|
@@ -824,17 +1276,17 @@ const ae = (d) => {
|
|
|
824
1276
|
] })
|
|
825
1277
|
]
|
|
826
1278
|
}
|
|
827
|
-
),
|
|
1279
|
+
), xi = ({ label: c, value: e, options: i, onChange: s, icon: r }) => /* @__PURE__ */ d(
|
|
828
1280
|
"div",
|
|
829
1281
|
{
|
|
830
1282
|
className: "py-2.5 px-3 hover:bg-white/5 group transition-colors",
|
|
831
1283
|
style: { borderRadius: "var(--radius)" },
|
|
832
1284
|
children: [
|
|
833
|
-
/* @__PURE__ */
|
|
834
|
-
|
|
835
|
-
/* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children:
|
|
1285
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
1286
|
+
r && /* @__PURE__ */ t("span", { className: "text-zinc-500 group-hover:text-zinc-400 transition-colors", children: r }),
|
|
1287
|
+
/* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: c })
|
|
836
1288
|
] }),
|
|
837
|
-
/* @__PURE__ */
|
|
1289
|
+
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
838
1290
|
/* @__PURE__ */ t(
|
|
839
1291
|
"select",
|
|
840
1292
|
{
|
|
@@ -849,102 +1301,99 @@ const ae = (d) => {
|
|
|
849
1301
|
] })
|
|
850
1302
|
]
|
|
851
1303
|
}
|
|
852
|
-
),
|
|
853
|
-
|
|
1304
|
+
), D = ({ title: c, children: e }) => /* @__PURE__ */ d("div", { className: "py-2", children: [
|
|
1305
|
+
c && /* @__PURE__ */ t("h4", { className: "px-3 text-[10px] font-bold text-[var(--accent)] uppercase tracking-wider mb-1 mt-2", children: c }),
|
|
854
1306
|
/* @__PURE__ */ t("div", { className: "space-y-0.5", children: e })
|
|
855
|
-
] }),
|
|
856
|
-
const [
|
|
857
|
-
return /* @__PURE__ */
|
|
858
|
-
|
|
1307
|
+
] }), wi = ({ tracks: c, current: e, onSelect: i, onUpload: s, onClose: r, settings: l, onSettingsChange: m, onReset: b, offset: h, onOffsetChange: f, maxHeight: n, animationClass: x }) => {
|
|
1308
|
+
const [C, T] = w("main"), z = q(null);
|
|
1309
|
+
return /* @__PURE__ */ d(_e, { onClose: r, align: "right", maxHeight: n, className: x, children: [
|
|
1310
|
+
C === "main" && /* @__PURE__ */ d("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
|
|
859
1311
|
/* @__PURE__ */ t("div", { className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 rounded-lg", children: /* @__PURE__ */ t("span", { children: "Subtitles" }) }),
|
|
860
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ d("div", { children: [
|
|
861
1313
|
/* @__PURE__ */ t(
|
|
862
|
-
|
|
1314
|
+
k,
|
|
863
1315
|
{
|
|
864
1316
|
label: "Upload Subtitle",
|
|
865
|
-
icon: /* @__PURE__ */ t(
|
|
1317
|
+
icon: /* @__PURE__ */ t(si, { className: "w-4 h-4" }),
|
|
866
1318
|
onClick: () => {
|
|
867
1319
|
var u;
|
|
868
|
-
return (u =
|
|
1320
|
+
return (u = z.current) == null ? void 0 : u.click();
|
|
869
1321
|
}
|
|
870
1322
|
}
|
|
871
1323
|
),
|
|
872
|
-
/* @__PURE__ */ t("input", { type: "file", accept: ".vtt,.srt", ref:
|
|
873
|
-
var
|
|
874
|
-
(
|
|
1324
|
+
/* @__PURE__ */ t("input", { type: "file", accept: ".vtt,.srt", ref: z, className: "hidden", onChange: (u) => {
|
|
1325
|
+
var M;
|
|
1326
|
+
(M = u.target.files) != null && M[0] && s(u.target.files[0]);
|
|
875
1327
|
} }),
|
|
876
1328
|
/* @__PURE__ */ t(
|
|
877
|
-
|
|
1329
|
+
k,
|
|
878
1330
|
{
|
|
879
1331
|
label: "Customize",
|
|
880
|
-
icon: /* @__PURE__ */ t(
|
|
881
|
-
onClick: () =>
|
|
1332
|
+
icon: /* @__PURE__ */ t(di, { className: "w-4 h-4" }),
|
|
1333
|
+
onClick: () => T("customize"),
|
|
882
1334
|
hasSubmenu: !0
|
|
883
1335
|
}
|
|
884
1336
|
),
|
|
885
1337
|
/* @__PURE__ */ t("div", { className: "h-px bg-white/5 mx-2 my-1" }),
|
|
886
1338
|
/* @__PURE__ */ t(
|
|
887
|
-
|
|
1339
|
+
k,
|
|
888
1340
|
{
|
|
889
1341
|
label: "Off",
|
|
890
1342
|
active: e === -1,
|
|
891
1343
|
onClick: () => {
|
|
892
|
-
i(-1),
|
|
1344
|
+
i(-1), r();
|
|
893
1345
|
}
|
|
894
1346
|
}
|
|
895
1347
|
),
|
|
896
|
-
|
|
897
|
-
|
|
1348
|
+
c.map((u) => /* @__PURE__ */ t(
|
|
1349
|
+
k,
|
|
898
1350
|
{
|
|
899
1351
|
label: u.label,
|
|
900
1352
|
value: u.language,
|
|
901
1353
|
active: e === u.index,
|
|
902
1354
|
onClick: () => {
|
|
903
|
-
i(u.index),
|
|
1355
|
+
i(u.index), r();
|
|
904
1356
|
}
|
|
905
1357
|
},
|
|
906
1358
|
u.index
|
|
907
1359
|
))
|
|
908
1360
|
] })
|
|
909
1361
|
] }),
|
|
910
|
-
|
|
1362
|
+
C === "customize" && /* @__PURE__ */ d("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
|
|
911
1363
|
/* @__PURE__ */ t(
|
|
912
|
-
|
|
1364
|
+
j,
|
|
913
1365
|
{
|
|
914
1366
|
label: "Customize",
|
|
915
|
-
onBack: () =>
|
|
916
|
-
rightAction: /* @__PURE__ */ t("button", { onClick:
|
|
1367
|
+
onBack: () => T("main"),
|
|
1368
|
+
rightAction: /* @__PURE__ */ t("button", { onClick: b, className: "p-1.5 text-zinc-400 hover:text-white transition-colors rounded-md hover:bg-white/10", title: "Reset All", children: /* @__PURE__ */ t(pi, { className: "w-4 h-4" }) })
|
|
917
1369
|
}
|
|
918
1370
|
),
|
|
919
|
-
/* @__PURE__ */
|
|
920
|
-
/* @__PURE__ */ t(
|
|
921
|
-
|
|
1371
|
+
/* @__PURE__ */ d("div", { className: "pb-1", children: [
|
|
1372
|
+
/* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(
|
|
1373
|
+
K,
|
|
922
1374
|
{
|
|
923
1375
|
label: "Native Video Subtitle",
|
|
924
1376
|
checked: l.useNative,
|
|
925
1377
|
onChange: (u) => m({ useNative: u })
|
|
926
1378
|
}
|
|
927
1379
|
) }),
|
|
928
|
-
!l.useNative && /* @__PURE__ */
|
|
929
|
-
/* @__PURE__ */
|
|
930
|
-
/* @__PURE__ */
|
|
931
|
-
/* @__PURE__ */ t("div", { className: "flex justify-between items-center mb-2", children: /* @__PURE__ */
|
|
932
|
-
/* @__PURE__ */ t(
|
|
1380
|
+
!l.useNative && /* @__PURE__ */ d(A, { children: [
|
|
1381
|
+
/* @__PURE__ */ d(D, { title: "Sync & Position", children: [
|
|
1382
|
+
/* @__PURE__ */ d("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
|
|
1383
|
+
/* @__PURE__ */ t("div", { className: "flex justify-between items-center mb-2", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
|
|
1384
|
+
/* @__PURE__ */ t(oi, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
|
|
933
1385
|
/* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Sync Offset" })
|
|
934
1386
|
] }) }),
|
|
935
|
-
/* @__PURE__ */
|
|
1387
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-2", children: [
|
|
936
1388
|
/* @__PURE__ */ t(
|
|
937
1389
|
"button",
|
|
938
1390
|
{
|
|
939
|
-
onClick: () =>
|
|
940
|
-
const u = window._strataPlayer;
|
|
941
|
-
u && u.setSubtitleOffset(Math.round((h - 0.1) * 10) / 10);
|
|
942
|
-
},
|
|
1391
|
+
onClick: () => f(Math.round((h - 0.1) * 10) / 10),
|
|
943
1392
|
className: "w-8 h-8 flex items-center justify-center bg-zinc-800 rounded-lg hover:bg-zinc-700 text-zinc-300 transition-colors active:scale-95",
|
|
944
|
-
children: /* @__PURE__ */ t(
|
|
1393
|
+
children: /* @__PURE__ */ t(li, { className: "w-4 h-4" })
|
|
945
1394
|
}
|
|
946
1395
|
),
|
|
947
|
-
/* @__PURE__ */
|
|
1396
|
+
/* @__PURE__ */ d("div", { className: "flex-1 bg-zinc-900 border border-white/5 rounded-lg h-8 flex items-center justify-center text-xs font-mono font-medium text-[var(--accent)]", children: [
|
|
948
1397
|
h > 0 ? "+" : "",
|
|
949
1398
|
(h == null ? void 0 : h.toFixed(1)) || "0.0",
|
|
950
1399
|
"s"
|
|
@@ -952,21 +1401,18 @@ const ae = (d) => {
|
|
|
952
1401
|
/* @__PURE__ */ t(
|
|
953
1402
|
"button",
|
|
954
1403
|
{
|
|
955
|
-
onClick: () =>
|
|
956
|
-
const u = window._strataPlayer;
|
|
957
|
-
u && u.setSubtitleOffset(Math.round((h + 0.1) * 10) / 10);
|
|
958
|
-
},
|
|
1404
|
+
onClick: () => f(Math.round((h + 0.1) * 10) / 10),
|
|
959
1405
|
className: "w-8 h-8 flex items-center justify-center bg-zinc-800 rounded-lg hover:bg-zinc-700 text-zinc-300 transition-colors active:scale-95",
|
|
960
|
-
children: /* @__PURE__ */ t(
|
|
1406
|
+
children: /* @__PURE__ */ t(ci, { className: "w-4 h-4" })
|
|
961
1407
|
}
|
|
962
1408
|
)
|
|
963
1409
|
] })
|
|
964
1410
|
] }),
|
|
965
1411
|
/* @__PURE__ */ t(
|
|
966
|
-
|
|
1412
|
+
Y,
|
|
967
1413
|
{
|
|
968
1414
|
label: "Vertical Position",
|
|
969
|
-
icon: /* @__PURE__ */ t(
|
|
1415
|
+
icon: /* @__PURE__ */ t(mi, { className: "w-4 h-4" }),
|
|
970
1416
|
value: l.verticalOffset,
|
|
971
1417
|
min: 0,
|
|
972
1418
|
max: 200,
|
|
@@ -976,12 +1422,12 @@ const ae = (d) => {
|
|
|
976
1422
|
}
|
|
977
1423
|
)
|
|
978
1424
|
] }),
|
|
979
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ d(D, { title: "Appearance", children: [
|
|
980
1426
|
/* @__PURE__ */ t(
|
|
981
|
-
|
|
1427
|
+
Y,
|
|
982
1428
|
{
|
|
983
1429
|
label: "Text Size",
|
|
984
|
-
icon: /* @__PURE__ */ t(
|
|
1430
|
+
icon: /* @__PURE__ */ t(ui, { className: "w-4 h-4" }),
|
|
985
1431
|
value: l.textSize,
|
|
986
1432
|
min: 50,
|
|
987
1433
|
max: 200,
|
|
@@ -990,12 +1436,12 @@ const ae = (d) => {
|
|
|
990
1436
|
formatValue: (u) => `${u}%`
|
|
991
1437
|
}
|
|
992
1438
|
),
|
|
993
|
-
/* @__PURE__ */
|
|
994
|
-
/* @__PURE__ */
|
|
995
|
-
/* @__PURE__ */ t(
|
|
1439
|
+
/* @__PURE__ */ d("div", { className: "py-2.5 px-3 rounded-lg hover:bg-white/5 group transition-colors", children: [
|
|
1440
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-3 mb-2", children: [
|
|
1441
|
+
/* @__PURE__ */ t(We, { className: "w-4 h-4 text-zinc-500 group-hover:text-zinc-400 transition-colors" }),
|
|
996
1442
|
/* @__PURE__ */ t("span", { className: "text-xs font-bold text-zinc-400 uppercase tracking-wider group-hover:text-zinc-300 transition-colors", children: "Text Color" })
|
|
997
1443
|
] }),
|
|
998
|
-
/* @__PURE__ */
|
|
1444
|
+
/* @__PURE__ */ d("div", { className: "flex items-center justify-between gap-2 p-1 bg-zinc-800/50 rounded-lg", children: [
|
|
999
1445
|
["#ffffff", "#ffff00", "#00ffff", "#ff00ff", "#ff0000", "#00ff00"].map((u) => /* @__PURE__ */ t(
|
|
1000
1446
|
"button",
|
|
1001
1447
|
{
|
|
@@ -1018,7 +1464,7 @@ const ae = (d) => {
|
|
|
1018
1464
|
] })
|
|
1019
1465
|
] }),
|
|
1020
1466
|
/* @__PURE__ */ t(
|
|
1021
|
-
|
|
1467
|
+
xi,
|
|
1022
1468
|
{
|
|
1023
1469
|
label: "Text Style",
|
|
1024
1470
|
value: l.textStyle,
|
|
@@ -1032,17 +1478,17 @@ const ae = (d) => {
|
|
|
1032
1478
|
onChange: (u) => m({ textStyle: u })
|
|
1033
1479
|
}
|
|
1034
1480
|
),
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
/* @__PURE__ */ t(
|
|
1037
|
-
/* @__PURE__ */ t(
|
|
1481
|
+
/* @__PURE__ */ d("div", { className: "grid grid-cols-2 gap-2 mt-1 px-1", children: [
|
|
1482
|
+
/* @__PURE__ */ t(K, { label: "Bold", icon: /* @__PURE__ */ t(fi, { className: "w-4 h-4" }), checked: l.isBold, onChange: (u) => m({ isBold: u }) }),
|
|
1483
|
+
/* @__PURE__ */ t(K, { label: "Fix Caps", icon: /* @__PURE__ */ t(vi, { className: "w-4 h-4" }), checked: l.fixCapitalization, onChange: (u) => m({ fixCapitalization: u }) })
|
|
1038
1484
|
] })
|
|
1039
1485
|
] }),
|
|
1040
|
-
/* @__PURE__ */
|
|
1486
|
+
/* @__PURE__ */ d(D, { title: "Background", children: [
|
|
1041
1487
|
/* @__PURE__ */ t(
|
|
1042
|
-
|
|
1488
|
+
Y,
|
|
1043
1489
|
{
|
|
1044
1490
|
label: "Opacity",
|
|
1045
|
-
icon: /* @__PURE__ */ t(
|
|
1491
|
+
icon: /* @__PURE__ */ t(hi, { className: "w-4 h-4" }),
|
|
1046
1492
|
value: l.backgroundOpacity,
|
|
1047
1493
|
min: 0,
|
|
1048
1494
|
max: 100,
|
|
@@ -1051,9 +1497,9 @@ const ae = (d) => {
|
|
|
1051
1497
|
formatValue: (u) => `${u}%`
|
|
1052
1498
|
}
|
|
1053
1499
|
),
|
|
1054
|
-
/* @__PURE__ */ t(
|
|
1500
|
+
/* @__PURE__ */ t(K, { label: "Blur Background", icon: /* @__PURE__ */ t(bi, { className: "w-4 h-4" }), checked: l.backgroundBlur, onChange: (u) => m({ backgroundBlur: u }) }),
|
|
1055
1501
|
l.backgroundBlur && /* @__PURE__ */ t(
|
|
1056
|
-
|
|
1502
|
+
Y,
|
|
1057
1503
|
{
|
|
1058
1504
|
label: "Blur Intensity",
|
|
1059
1505
|
value: l.backgroundBlurAmount,
|
|
@@ -1069,126 +1515,126 @@ const ae = (d) => {
|
|
|
1069
1515
|
] })
|
|
1070
1516
|
] })
|
|
1071
1517
|
] });
|
|
1072
|
-
},
|
|
1518
|
+
}, ki = [
|
|
1073
1519
|
{ label: "Strata", value: "#6366f1" },
|
|
1074
1520
|
{ label: "Emerald", value: "#10b981" },
|
|
1075
1521
|
{ label: "Rose", value: "#f43f5e" },
|
|
1076
1522
|
{ label: "Amber", value: "#f59e0b" },
|
|
1077
1523
|
{ label: "Sky", value: "#0ea5e9" },
|
|
1078
1524
|
{ label: "Violet", value: "#8b5cf6" }
|
|
1079
|
-
],
|
|
1525
|
+
], Ci = [
|
|
1080
1526
|
{ label: "Default", value: "default", color: "#6366f1" },
|
|
1081
1527
|
{ label: "Pixel", value: "pixel", color: "#ef4444" },
|
|
1082
1528
|
{ label: "Game", value: "game", color: "#eab308" },
|
|
1083
1529
|
{ label: "Hacker", value: "hacker", color: "#22c55e" }
|
|
1084
|
-
], Fe = (
|
|
1085
|
-
var
|
|
1086
|
-
const { src: e, sources: i, poster: s, autoPlay:
|
|
1087
|
-
|
|
1088
|
-
}, [
|
|
1089
|
-
() =>
|
|
1090
|
-
() =>
|
|
1091
|
-
), [
|
|
1092
|
-
|
|
1093
|
-
if (!
|
|
1094
|
-
const
|
|
1095
|
-
|
|
1096
|
-
const
|
|
1097
|
-
for (const S of
|
|
1098
|
-
|
|
1530
|
+
], Fe = (c) => {
|
|
1531
|
+
var Ee, Ie, Re, Pe;
|
|
1532
|
+
const { src: e, sources: i, poster: s, autoPlay: r, thumbnails: l, textTracks: m, plugins: b, ...h } = c, f = q(null), [n, x] = w(null), [C, T] = w(!1), [z, u] = w(0), M = st(() => De(h), []), o = at(
|
|
1533
|
+
rt((a) => n ? n.store.subscribe(a) : () => {
|
|
1534
|
+
}, [n]),
|
|
1535
|
+
() => n ? n.store.get() : M,
|
|
1536
|
+
() => M
|
|
1537
|
+
), [Z, X] = w(!0), [E, P] = w(!1), [I, B] = w(!1), [L, N] = w("main"), de = $e(E, 200), ue = $e(I, 200), [ee, he] = w(!1), [te, me] = w(0), [pe, fe] = w(!1), [ve, be] = w(!1), [ge, ye] = w([]), [xe, we] = w(null), [Qe, Xe] = w(0), [V, ke] = w(null), [G, ie] = w(null), [Ni, Ce] = w(null), W = q(null), _ = q(null), se = q(null), ae = q(null);
|
|
1538
|
+
R(() => {
|
|
1539
|
+
if (!f.current) return;
|
|
1540
|
+
const a = new dt(h);
|
|
1541
|
+
b && b.length > 0 ? b.forEach((y) => a.use(y)) : a.use(new ut()), a.attach(f.current), x(a);
|
|
1542
|
+
const p = new ResizeObserver((y) => {
|
|
1543
|
+
for (const S of y)
|
|
1544
|
+
u(S.contentRect.height);
|
|
1099
1545
|
});
|
|
1100
|
-
return
|
|
1101
|
-
|
|
1546
|
+
return p.observe(f.current), () => {
|
|
1547
|
+
p.disconnect(), a.destroy(), x(null);
|
|
1102
1548
|
};
|
|
1103
|
-
}, []),
|
|
1104
|
-
if (!
|
|
1105
|
-
const
|
|
1106
|
-
h.theme !== void 0 && h.theme !== o.theme && (
|
|
1107
|
-
}, [
|
|
1108
|
-
if (!
|
|
1109
|
-
const
|
|
1110
|
-
i && i.length > 0 ? (
|
|
1111
|
-
}, [e, i, m,
|
|
1112
|
-
}, [
|
|
1113
|
-
|
|
1549
|
+
}, []), R(() => {
|
|
1550
|
+
if (!n) return;
|
|
1551
|
+
const a = {};
|
|
1552
|
+
h.theme !== void 0 && h.theme !== o.theme && (a.theme = h.theme), h.themeColor !== void 0 && h.themeColor !== o.themeColor && (a.themeColor = h.themeColor), h.iconSize !== void 0 && h.iconSize !== o.iconSize && (a.iconSize = h.iconSize), Object.keys(a).length > 0 && n.setAppearance(a), h.volume !== void 0 && Math.abs(h.volume - o.volume) > 0.01 && n.setVolume(h.volume), h.muted !== void 0 && h.muted !== o.isMuted && (h.muted ? n.video.muted = !0 : n.video.muted = !1);
|
|
1553
|
+
}, [n, h.theme, h.themeColor, h.iconSize, h.volume, h.muted]), R(() => {
|
|
1554
|
+
if (!n) return;
|
|
1555
|
+
const a = m || [];
|
|
1556
|
+
i && i.length > 0 ? (T(!1), n.setSources(i, a)) : e && (T(!1), n.setSources([{ url: e, type: "auto" }], a));
|
|
1557
|
+
}, [e, i, m, n]), R(() => {
|
|
1558
|
+
}, [n, s]), R(() => {
|
|
1559
|
+
n && r && (n.video.muted = !0, n.store.setState({ isMuted: !0 }), n.play().catch(() => {
|
|
1114
1560
|
}));
|
|
1115
|
-
}, [
|
|
1116
|
-
o.isPlaying && !
|
|
1117
|
-
}, [o.isPlaying,
|
|
1118
|
-
l &&
|
|
1119
|
-
}, [l,
|
|
1120
|
-
const
|
|
1121
|
-
var
|
|
1122
|
-
if (
|
|
1123
|
-
switch (
|
|
1561
|
+
}, [n, r]), R(() => {
|
|
1562
|
+
o.isPlaying && !C && T(!0);
|
|
1563
|
+
}, [o.isPlaying, C]), R(() => {
|
|
1564
|
+
l && n ? mt(l, n.notify.bind(n)).then((a) => ye(a)) : ye([]);
|
|
1565
|
+
}, [l, n]), R(() => {
|
|
1566
|
+
const a = (p) => {
|
|
1567
|
+
var y;
|
|
1568
|
+
if (n && ((y = document.activeElement) == null ? void 0 : y.tagName) !== "INPUT")
|
|
1569
|
+
switch (p.key.toLowerCase()) {
|
|
1124
1570
|
case " ":
|
|
1125
1571
|
case "k":
|
|
1126
|
-
|
|
1572
|
+
p.preventDefault(), n.togglePlay();
|
|
1127
1573
|
break;
|
|
1128
1574
|
case "arrowright":
|
|
1129
|
-
|
|
1575
|
+
p.preventDefault(), n.skip(5);
|
|
1130
1576
|
break;
|
|
1131
1577
|
case "arrowleft":
|
|
1132
|
-
|
|
1578
|
+
p.preventDefault(), n.skip(-5);
|
|
1133
1579
|
break;
|
|
1134
1580
|
case "arrowup":
|
|
1135
|
-
|
|
1581
|
+
p.preventDefault(), n.setVolume(n.video.volume + 0.1);
|
|
1136
1582
|
break;
|
|
1137
1583
|
case "arrowdown":
|
|
1138
|
-
|
|
1584
|
+
p.preventDefault(), n.setVolume(n.video.volume - 0.1);
|
|
1139
1585
|
break;
|
|
1140
1586
|
case "f":
|
|
1141
|
-
|
|
1587
|
+
p.preventDefault(), n.toggleFullscreen();
|
|
1142
1588
|
break;
|
|
1143
1589
|
case "m":
|
|
1144
|
-
|
|
1590
|
+
p.preventDefault(), n.toggleMute();
|
|
1145
1591
|
break;
|
|
1146
1592
|
}
|
|
1147
1593
|
};
|
|
1148
|
-
return window.addEventListener("keydown",
|
|
1149
|
-
}, [
|
|
1150
|
-
const
|
|
1151
|
-
|
|
1152
|
-
!o.isPlaying ||
|
|
1594
|
+
return window.addEventListener("keydown", a), () => window.removeEventListener("keydown", a);
|
|
1595
|
+
}, [n]);
|
|
1596
|
+
const Ne = () => {
|
|
1597
|
+
X(!0), _.current && clearTimeout(_.current), !(E || I) && (_.current = setTimeout(() => {
|
|
1598
|
+
!o.isPlaying || E || I || X(!1);
|
|
1153
1599
|
}, 2500));
|
|
1154
1600
|
};
|
|
1155
|
-
|
|
1156
|
-
!
|
|
1157
|
-
}, [
|
|
1158
|
-
const re = (
|
|
1159
|
-
if (!
|
|
1160
|
-
const
|
|
1161
|
-
return Math.max(0, Math.min(1, (
|
|
1162
|
-
},
|
|
1163
|
-
|
|
1164
|
-
const
|
|
1165
|
-
|
|
1601
|
+
R(() => {
|
|
1602
|
+
!E && !I && o.isPlaying ? Ne() : (E || I) && (X(!0), _.current && clearTimeout(_.current));
|
|
1603
|
+
}, [E, I, o.isPlaying]);
|
|
1604
|
+
const re = (a) => {
|
|
1605
|
+
if (!se.current || !o.duration) return 0;
|
|
1606
|
+
const p = se.current.getBoundingClientRect(), y = "touches" in a ? a.touches[0].clientX : a.clientX;
|
|
1607
|
+
return Math.max(0, Math.min(1, (y - p.left) / p.width)) * o.duration;
|
|
1608
|
+
}, Se = (a) => {
|
|
1609
|
+
he(!0), me(re(a));
|
|
1610
|
+
const p = (S) => me(re(S)), y = (S) => {
|
|
1611
|
+
n == null || n.seek(re(S)), he(!1), document.removeEventListener("mousemove", p), document.removeEventListener("touchmove", p), document.removeEventListener("mouseup", y), document.removeEventListener("touchend", y);
|
|
1166
1612
|
};
|
|
1167
|
-
document.addEventListener("mousemove",
|
|
1168
|
-
},
|
|
1169
|
-
if (!
|
|
1170
|
-
const
|
|
1171
|
-
return Math.max(0, Math.min(1, (
|
|
1172
|
-
},
|
|
1173
|
-
if (!
|
|
1174
|
-
|
|
1175
|
-
const
|
|
1176
|
-
|
|
1613
|
+
document.addEventListener("mousemove", p), document.addEventListener("touchmove", p), document.addEventListener("mouseup", y), document.addEventListener("touchend", y);
|
|
1614
|
+
}, Te = (a) => {
|
|
1615
|
+
if (!ae.current) return 0;
|
|
1616
|
+
const p = ae.current.getBoundingClientRect(), y = "touches" in a ? a.touches[0].clientX : a.clientX;
|
|
1617
|
+
return Math.max(0, Math.min(1, (y - p.left) / p.width));
|
|
1618
|
+
}, ze = (a) => {
|
|
1619
|
+
if (!n) return;
|
|
1620
|
+
fe(!0), n.setVolume(Te(a));
|
|
1621
|
+
const p = (S) => n.setVolume(Te(S)), y = () => {
|
|
1622
|
+
fe(!1), document.removeEventListener("mousemove", p), document.removeEventListener("touchmove", p), document.removeEventListener("mouseup", y), document.removeEventListener("touchend", y);
|
|
1177
1623
|
};
|
|
1178
|
-
document.addEventListener("mousemove",
|
|
1179
|
-
},
|
|
1624
|
+
document.addEventListener("mousemove", p), document.addEventListener("touchmove", p), document.addEventListener("mouseup", y), document.addEventListener("touchend", y);
|
|
1625
|
+
}, Je = (a) => {
|
|
1180
1626
|
if (!o.duration) return;
|
|
1181
|
-
const
|
|
1182
|
-
|
|
1183
|
-
},
|
|
1184
|
-
|
|
1185
|
-
},
|
|
1186
|
-
if (
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
|
|
1627
|
+
const p = a.currentTarget.getBoundingClientRect(), y = (a.clientX - p.left) / p.width, S = y * o.duration;
|
|
1628
|
+
Xe(y * 100), we(S), ge.length > 0 && ke(ge.find((Q) => S >= Q.start && S < Q.end) || null);
|
|
1629
|
+
}, J = (a) => {
|
|
1630
|
+
n && (n.skip(a === "forward" ? 10 : -10), Ce(a), setTimeout(() => Ce(null), 300));
|
|
1631
|
+
}, Ke = (a) => {
|
|
1632
|
+
if (E && P(!1), I && B(!1), !n) return;
|
|
1633
|
+
const p = a.currentTarget.getBoundingClientRect(), y = a.clientX - p.left, S = p.width, Q = Date.now();
|
|
1634
|
+
W.current ? (clearTimeout(W.current), W.current = null, y < S * 0.35 ? (J("rewind"), ie({ type: "rewind", id: Q })) : y > S * 0.65 ? (J("forward"), ie({ type: "forward", id: Q })) : n.toggleFullscreen()) : W.current = setTimeout(() => {
|
|
1635
|
+
n.togglePlay(), W.current = null;
|
|
1190
1636
|
}, 250);
|
|
1191
|
-
},
|
|
1637
|
+
}, Ye = o.isMuted || o.volume === 0 ? Jt : o.volume < 0.5 ? Xt : Qt, Me = Math.max(100, z - 120), Ze = () => {
|
|
1192
1638
|
switch (o.iconSize) {
|
|
1193
1639
|
case "small":
|
|
1194
1640
|
return "w-4 h-4";
|
|
@@ -1197,7 +1643,7 @@ const ae = (d) => {
|
|
|
1197
1643
|
default:
|
|
1198
1644
|
return "w-5 h-5";
|
|
1199
1645
|
}
|
|
1200
|
-
},
|
|
1646
|
+
}, et = () => {
|
|
1201
1647
|
switch (o.iconSize) {
|
|
1202
1648
|
case "small":
|
|
1203
1649
|
return "p-1.5";
|
|
@@ -1206,7 +1652,7 @@ const ae = (d) => {
|
|
|
1206
1652
|
default:
|
|
1207
1653
|
return "p-2";
|
|
1208
1654
|
}
|
|
1209
|
-
},
|
|
1655
|
+
}, $ = Ze(), F = et(), H = (() => {
|
|
1210
1656
|
switch (o.iconSize) {
|
|
1211
1657
|
case "small":
|
|
1212
1658
|
return {
|
|
@@ -1231,14 +1677,14 @@ const ae = (d) => {
|
|
|
1231
1677
|
};
|
|
1232
1678
|
}
|
|
1233
1679
|
})();
|
|
1234
|
-
return /* @__PURE__ */
|
|
1680
|
+
return /* @__PURE__ */ d(
|
|
1235
1681
|
"div",
|
|
1236
1682
|
{
|
|
1237
|
-
ref:
|
|
1238
|
-
className: "group relative w-full h-full bg-black overflow-hidden select-none font-[family-name:var(--font-main)] outline-none touch-none rounded-[var(--radius)] text-zinc-100",
|
|
1239
|
-
onMouseMove:
|
|
1683
|
+
ref: f,
|
|
1684
|
+
className: "group relative w-full h-full bg-black overflow-hidden select-none font-[family-name:var(--font-main)] outline-none touch-none rounded-[var(--radius)] text-zinc-100 strata-player-reset",
|
|
1685
|
+
onMouseMove: Ne,
|
|
1240
1686
|
onMouseLeave: () => {
|
|
1241
|
-
o.isPlaying && !
|
|
1687
|
+
o.isPlaying && !E && !I && X(!1);
|
|
1242
1688
|
},
|
|
1243
1689
|
tabIndex: 0,
|
|
1244
1690
|
role: "region",
|
|
@@ -1338,69 +1784,69 @@ const ae = (d) => {
|
|
|
1338
1784
|
}
|
|
1339
1785
|
` }),
|
|
1340
1786
|
o.theme === "hacker" && /* @__PURE__ */ t("div", { className: "strata-scanlines" }),
|
|
1341
|
-
!
|
|
1342
|
-
|
|
1343
|
-
/* @__PURE__ */ t(
|
|
1344
|
-
/* @__PURE__ */ t(
|
|
1345
|
-
/* @__PURE__ */ t("div", { className: "absolute inset-0 z-0", onClick:
|
|
1346
|
-
s && !
|
|
1787
|
+
!n && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center bg-zinc-950 z-50", children: /* @__PURE__ */ t(le, { className: "w-10 h-10 text-[var(--accent)] animate-spin" }) }),
|
|
1788
|
+
n && /* @__PURE__ */ d(A, { children: [
|
|
1789
|
+
/* @__PURE__ */ t(gi, { notifications: o.notifications }),
|
|
1790
|
+
/* @__PURE__ */ t(yi, { cues: o.activeCues, settings: o.subtitleSettings }),
|
|
1791
|
+
/* @__PURE__ */ t("div", { className: "absolute inset-0 z-0", onClick: Ke, "aria-hidden": "true" }),
|
|
1792
|
+
s && !C && /* @__PURE__ */ t(
|
|
1347
1793
|
"div",
|
|
1348
1794
|
{
|
|
1349
1795
|
className: "absolute inset-0 bg-cover bg-center z-[5] pointer-events-none",
|
|
1350
1796
|
style: { backgroundImage: `url(${s})` }
|
|
1351
1797
|
}
|
|
1352
1798
|
),
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
/* @__PURE__ */ t("span", { className: "font-bold text-sm mt-2 font-mono", children:
|
|
1356
|
-
] }) },
|
|
1357
|
-
o.isBuffering && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center z-20 pointer-events-none", children: /* @__PURE__ */ t(
|
|
1358
|
-
o.error && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center z-30 bg-black/90 backdrop-blur-md animate-in fade-in", children: /* @__PURE__ */
|
|
1799
|
+
G && /* @__PURE__ */ t("div", { className: `absolute top-0 bottom-0 flex items-center justify-center w-[35%] z-20 bg-white/5 backdrop-blur-[1px] animate-out fade-out duration-500 ${G.type === "rewind" ? "left-0 rounded-r-[4rem]" : "right-0 rounded-l-[4rem]"}`, onAnimationEnd: () => ie(null), children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center text-white drop-shadow-lg", children: [
|
|
1800
|
+
G.type === "rewind" ? /* @__PURE__ */ t(Ve, { className: "w-12 h-12 animate-pulse" }) : /* @__PURE__ */ t(Oe, { className: "w-12 h-12 animate-pulse" }),
|
|
1801
|
+
/* @__PURE__ */ t("span", { className: "font-bold text-sm mt-2 font-mono", children: G.type === "rewind" ? "-10s" : "+10s" })
|
|
1802
|
+
] }) }, G.id),
|
|
1803
|
+
o.isBuffering && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center z-20 pointer-events-none", children: /* @__PURE__ */ t(le, { className: "w-12 h-12 text-[var(--accent)] animate-spin drop-shadow-lg" }) }),
|
|
1804
|
+
o.error && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center z-30 bg-black/90 backdrop-blur-md animate-in fade-in", children: /* @__PURE__ */ d("div", { className: "flex flex-col items-center gap-4 text-red-500 p-8 max-w-md text-center", children: [
|
|
1359
1805
|
/* @__PURE__ */ t("span", { className: "text-5xl mb-2", children: "⚠️" }),
|
|
1360
1806
|
/* @__PURE__ */ t("h3", { className: "text-xl font-bold text-white", children: "Playback Error" }),
|
|
1361
1807
|
/* @__PURE__ */ t("p", { className: "text-zinc-400 text-sm", children: o.error }),
|
|
1362
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
1808
|
+
/* @__PURE__ */ t("button", { onClick: () => n.load(n.store.get().sources[n.store.get().currentSourceIndex] || { url: e || "" }, m), className: "px-6 py-2 bg-[var(--accent)] text-white font-medium rounded-full hover:opacity-90 transition-opacity mt-4 shadow-lg", children: "Try Again" })
|
|
1363
1809
|
] }) }),
|
|
1364
|
-
(!o.isPlaying && !o.isBuffering && !o.error ||
|
|
1365
|
-
/* @__PURE__ */ t("button", { onClick: (
|
|
1366
|
-
|
|
1367
|
-
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all active:scale-110 text-white/90 focus:outline-none backdrop-blur-sm ${
|
|
1368
|
-
/* @__PURE__ */ t("button", { onClick: (
|
|
1369
|
-
|
|
1370
|
-
}, className: `group relative flex items-center justify-center rounded-full bg-white/10 hover:bg-[var(--accent)] border border-white/10 shadow-2xl transition-all hover:scale-105 active:scale-110 duration-75 focus:outline-none backdrop-blur-md ${
|
|
1371
|
-
/* @__PURE__ */ t("button", { onClick: (
|
|
1372
|
-
|
|
1373
|
-
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all active:scale-110 text-white/90 focus:outline-none backdrop-blur-sm ${
|
|
1810
|
+
(!o.isPlaying && !o.isBuffering && !o.error || Z) && !o.isBuffering ? /* @__PURE__ */ t("div", { className: `absolute inset-0 flex items-center justify-center z-10 transition-opacity duration-300 pointer-events-none ${Z || !o.isPlaying ? "opacity-100" : "opacity-0"}`, children: /* @__PURE__ */ d("div", { className: "flex items-center gap-8 md:gap-16 pointer-events-auto", children: [
|
|
1811
|
+
/* @__PURE__ */ t("button", { onClick: (a) => {
|
|
1812
|
+
a.stopPropagation(), P(!1), B(!1), J("rewind");
|
|
1813
|
+
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all active:scale-110 text-white/90 focus:outline-none backdrop-blur-sm ${H.skipBtn}`, children: /* @__PURE__ */ t(Ve, { className: H.skipIcon }) }),
|
|
1814
|
+
/* @__PURE__ */ t("button", { onClick: (a) => {
|
|
1815
|
+
a.stopPropagation(), P(!1), B(!1), n.togglePlay();
|
|
1816
|
+
}, className: `group relative flex items-center justify-center rounded-full bg-white/10 hover:bg-[var(--accent)] border border-white/10 shadow-2xl transition-all hover:scale-105 active:scale-110 duration-75 focus:outline-none backdrop-blur-md ${H.playBtn}`, children: o.isPlaying ? /* @__PURE__ */ t(Be, { className: `${H.playIcon} text-white fill-current` }) : /* @__PURE__ */ t(Ae, { className: `${H.playIcon} text-white ml-1 fill-current` }) }),
|
|
1817
|
+
/* @__PURE__ */ t("button", { onClick: (a) => {
|
|
1818
|
+
a.stopPropagation(), P(!1), B(!1), J("forward");
|
|
1819
|
+
}, className: `group flex items-center justify-center rounded-full bg-black/40 hover:bg-black/60 border border-white/10 transition-all active:scale-110 text-white/90 focus:outline-none backdrop-blur-sm ${H.skipBtn}`, children: /* @__PURE__ */ t(Oe, { className: H.skipIcon }) })
|
|
1374
1820
|
] }) }) : null,
|
|
1375
|
-
/* @__PURE__ */
|
|
1376
|
-
|
|
1821
|
+
/* @__PURE__ */ d("div", { className: `absolute inset-x-0 bottom-0 z-30 transition-all duration-300 px-4 md:px-6 pb-4 md:pb-6 pt-24 bg-gradient-to-t from-black/95 via-black/70 to-transparent ${Z ? "opacity-100 translate-y-0" : "opacity-0 translate-y-4"}`, onClick: (a) => {
|
|
1822
|
+
a.target === a.currentTarget && (P(!1), B(!1)), a.stopPropagation();
|
|
1377
1823
|
}, children: [
|
|
1378
|
-
/* @__PURE__ */
|
|
1824
|
+
/* @__PURE__ */ d(
|
|
1379
1825
|
"div",
|
|
1380
1826
|
{
|
|
1381
|
-
ref:
|
|
1827
|
+
ref: se,
|
|
1382
1828
|
className: "relative w-full h-3 group/slider mb-3 cursor-pointer touch-none flex items-center",
|
|
1383
|
-
onMouseMove:
|
|
1829
|
+
onMouseMove: Je,
|
|
1384
1830
|
onMouseLeave: () => {
|
|
1385
|
-
|
|
1831
|
+
we(null), ke(null);
|
|
1386
1832
|
},
|
|
1387
|
-
onMouseDown:
|
|
1388
|
-
onTouchStart:
|
|
1833
|
+
onMouseDown: Se,
|
|
1834
|
+
onTouchStart: Se,
|
|
1389
1835
|
children: [
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
/* @__PURE__ */ t("div", { className: "strata-tooltip px-2 py-0.5 text-[11px] font-bold font-mono shadow-lg tabular-nums mt-1", children:
|
|
1836
|
+
xe !== null && /* @__PURE__ */ d("div", { className: "absolute bottom-full mb-1.5 flex flex-col items-center transform -translate-x-1/2 z-40 pointer-events-none transition-opacity duration-150", style: { left: `clamp(70px, ${Qe}%, calc(100% - 70px))` }, children: [
|
|
1837
|
+
V && /* @__PURE__ */ t("div", { className: "bg-black/90 border border-white/10 shadow-2xl overflow-hidden backdrop-blur-sm", style: { width: `${V.w * 0.5}px`, height: `${V.h * 0.5}px`, borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t("div", { style: { backgroundImage: `url("${V.url}")`, width: `${V.w}px`, height: `${V.h}px`, backgroundPosition: `-${V.x}px -${V.y}px`, backgroundRepeat: "no-repeat", transform: "scale(0.5)", transformOrigin: "top left" } }) }),
|
|
1838
|
+
/* @__PURE__ */ t("div", { className: "strata-tooltip px-2 py-0.5 text-[11px] font-bold font-mono shadow-lg tabular-nums mt-1", children: ne(xe) })
|
|
1393
1839
|
] }),
|
|
1394
|
-
/* @__PURE__ */
|
|
1395
|
-
o.duration > 0 && o.buffered.map((
|
|
1396
|
-
/* @__PURE__ */ t("div", { className: "absolute left-0 top-0 bottom-0 bg-[var(--accent)]", style: { width: `${(
|
|
1840
|
+
/* @__PURE__ */ d("div", { className: "w-full h-1 bg-white/20 overflow-hidden relative backdrop-blur-sm border-[length:var(--border-width)] border-white/10", style: { borderRadius: "var(--radius-full)" }, children: [
|
|
1841
|
+
o.duration > 0 && o.buffered.map((a, p) => /* @__PURE__ */ t("div", { className: "absolute top-0 bottom-0 bg-white/20", style: { left: `${a.start / o.duration * 100}%`, width: `${(a.end - a.start) / o.duration * 100}%` } }, p)),
|
|
1842
|
+
/* @__PURE__ */ t("div", { className: "absolute left-0 top-0 bottom-0 bg-[var(--accent)]", style: { width: `${(ee ? te : o.currentTime) / o.duration * 100}%` } })
|
|
1397
1843
|
] }),
|
|
1398
1844
|
/* @__PURE__ */ t(
|
|
1399
1845
|
"div",
|
|
1400
1846
|
{
|
|
1401
1847
|
className: "absolute top-1/2 -translate-y-1/2 -translate-x-1/2 w-3.5 h-3.5 bg-white shadow-md scale-0 group-hover/slider:scale-100 transition-transform duration-100 z-10",
|
|
1402
1848
|
style: {
|
|
1403
|
-
left: `${(
|
|
1849
|
+
left: `${(ee ? te : o.currentTime) / o.duration * 100}%`,
|
|
1404
1850
|
borderRadius: "var(--radius-full)"
|
|
1405
1851
|
}
|
|
1406
1852
|
}
|
|
@@ -1408,16 +1854,16 @@ const ae = (d) => {
|
|
|
1408
1854
|
]
|
|
1409
1855
|
}
|
|
1410
1856
|
),
|
|
1411
|
-
/* @__PURE__ */
|
|
1412
|
-
/* @__PURE__ */
|
|
1413
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
1414
|
-
/* @__PURE__ */
|
|
1415
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
1416
|
-
/* @__PURE__ */ t("div", { className: `relative h-8 flex items-center transition-all duration-300 ease-out overflow-hidden ${
|
|
1857
|
+
/* @__PURE__ */ d("div", { className: "flex items-center justify-between", children: [
|
|
1858
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-3", children: [
|
|
1859
|
+
/* @__PURE__ */ t("button", { onClick: () => n.togglePlay(), className: `strata-control-btn text-zinc-300 hover:text-white transition-colors hover:bg-white/10 focus:outline-none ${F}`, style: { borderRadius: "var(--radius)" }, children: o.isPlaying ? /* @__PURE__ */ t(Be, { className: `${$} fill-current` }) : /* @__PURE__ */ t(Ae, { className: `${$} fill-current` }) }),
|
|
1860
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-2 group/vol relative", onMouseEnter: () => be(!0), onMouseLeave: () => be(!1), children: [
|
|
1861
|
+
/* @__PURE__ */ t("button", { onClick: () => n.toggleMute(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 focus:outline-none ${F}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t(Ye, { className: $ }) }),
|
|
1862
|
+
/* @__PURE__ */ t("div", { className: `relative h-8 flex items-center transition-all duration-300 ease-out overflow-hidden ${ve || pe ? "w-28 opacity-100 ml-1" : "w-0 opacity-0"}`, children: /* @__PURE__ */ d("div", { ref: ae, className: "relative w-full h-full flex items-center cursor-pointer px-2", onMouseDown: ze, onTouchStart: ze, children: [
|
|
1417
1863
|
/* @__PURE__ */ t("div", { className: "w-full h-1 bg-white/20 overflow-hidden", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ t("div", { className: "h-full bg-white", style: { width: `${(o.isMuted ? 0 : o.volume) * 100}%`, borderRadius: "var(--radius-full)" } }) }),
|
|
1418
1864
|
/* @__PURE__ */ t("div", { className: "absolute h-3 w-3 bg-white shadow-md top-1/2 -translate-y-1/2 pointer-events-none", style: { left: `calc(${(o.isMuted ? 0 : o.volume) * 100}% * 0.85 + 4px)`, borderRadius: "var(--radius-full)" } })
|
|
1419
1865
|
] }) }),
|
|
1420
|
-
(
|
|
1866
|
+
(ve || pe) && /* @__PURE__ */ t(
|
|
1421
1867
|
"div",
|
|
1422
1868
|
{
|
|
1423
1869
|
className: "strata-tooltip absolute bottom-full mb-2 px-1.5 py-0.5 rounded text-[10px] font-bold font-mono shadow-lg pointer-events-none whitespace-nowrap z-50 transform -translate-x-1/2",
|
|
@@ -1426,115 +1872,131 @@ const ae = (d) => {
|
|
|
1426
1872
|
}
|
|
1427
1873
|
)
|
|
1428
1874
|
] }),
|
|
1429
|
-
/* @__PURE__ */
|
|
1430
|
-
|
|
1875
|
+
/* @__PURE__ */ d("div", { className: "text-xs font-medium text-zinc-400 font-mono select-none hidden sm:block tabular-nums", children: [
|
|
1876
|
+
ne(ee ? te : o.currentTime),
|
|
1431
1877
|
" ",
|
|
1432
1878
|
/* @__PURE__ */ t("span", { className: "text-zinc-600", children: "/" }),
|
|
1433
1879
|
" ",
|
|
1434
|
-
|
|
1880
|
+
ne(o.duration)
|
|
1435
1881
|
] })
|
|
1436
1882
|
] }),
|
|
1437
|
-
/* @__PURE__ */
|
|
1438
|
-
/* @__PURE__ */
|
|
1439
|
-
/* @__PURE__ */ t("button", { onClick: (
|
|
1440
|
-
|
|
1441
|
-
}, className: `strata-control-btn transition-colors focus:outline-none ${
|
|
1442
|
-
|
|
1883
|
+
/* @__PURE__ */ d("div", { className: "flex items-center gap-1", children: [
|
|
1884
|
+
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
1885
|
+
/* @__PURE__ */ t("button", { onClick: (a) => {
|
|
1886
|
+
a.stopPropagation(), B(!I), P(!1);
|
|
1887
|
+
}, className: `strata-control-btn transition-colors focus:outline-none ${F} ${I ? "text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t(ti, { className: $ }) }),
|
|
1888
|
+
ue.isMounted && /* @__PURE__ */ t(
|
|
1889
|
+
wi,
|
|
1890
|
+
{
|
|
1891
|
+
tracks: o.subtitleTracks,
|
|
1892
|
+
current: o.currentSubtitle,
|
|
1893
|
+
onSelect: (a) => n.setSubtitle(a),
|
|
1894
|
+
onUpload: (a) => n.addTextTrack(a, a.name),
|
|
1895
|
+
onClose: () => B(!1),
|
|
1896
|
+
settings: o.subtitleSettings,
|
|
1897
|
+
onSettingsChange: (a) => n.updateSubtitleSettings(a),
|
|
1898
|
+
onReset: () => n.resetSubtitleSettings(),
|
|
1899
|
+
offset: o.subtitleOffset,
|
|
1900
|
+
onOffsetChange: (a) => n.setSubtitleOffset(a),
|
|
1901
|
+
maxHeight: Me,
|
|
1902
|
+
animationClass: ue.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95"
|
|
1903
|
+
}
|
|
1904
|
+
)
|
|
1443
1905
|
] }),
|
|
1444
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
1445
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
1446
|
-
/* @__PURE__ */
|
|
1447
|
-
/* @__PURE__ */ t("button", { onClick: (
|
|
1448
|
-
|
|
1449
|
-
}, className: `strata-control-btn transition-all duration-300 focus:outline-none ${
|
|
1450
|
-
|
|
1451
|
-
|
|
1906
|
+
/* @__PURE__ */ t("button", { onClick: () => n.togglePip(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${F}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t(ei, { className: $ }) }),
|
|
1907
|
+
/* @__PURE__ */ t("button", { onClick: () => n.download(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 transition-colors hidden sm:block focus:outline-none ${F}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t(ii, { className: $ }) }),
|
|
1908
|
+
/* @__PURE__ */ d("div", { className: "relative", children: [
|
|
1909
|
+
/* @__PURE__ */ t("button", { onClick: (a) => {
|
|
1910
|
+
a.stopPropagation(), P(!E), B(!1), N("main");
|
|
1911
|
+
}, className: `strata-control-btn transition-all duration-300 focus:outline-none ${F} ${E ? "rotate-90 text-[var(--accent)] bg-white/10" : "text-zinc-300 hover:text-white hover:bg-white/10"}`, style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t(Zt, { className: $ }) }),
|
|
1912
|
+
de.isMounted && /* @__PURE__ */ t(_e, { onClose: () => P(!1), align: "right", maxHeight: Me, className: de.isVisible ? "opacity-100 translate-y-0 scale-100" : "opacity-0 translate-y-2 scale-95", children: /* @__PURE__ */ d("div", { className: "w-full", children: [
|
|
1913
|
+
L === "main" && /* @__PURE__ */ d("div", { className: "animate-in slide-in-from-left-4 fade-in duration-200", children: [
|
|
1452
1914
|
/* @__PURE__ */ t("div", { className: "px-3 py-2 mb-1 border-b border-white/5 font-bold text-zinc-400 uppercase text-[11px] tracking-wider flex justify-between items-center bg-white/5 sticky top-0 z-10 backdrop-blur-md", style: { borderRadius: "var(--radius)" }, children: /* @__PURE__ */ t("span", { children: "Settings" }) }),
|
|
1453
|
-
o.sources.length > 1 && /* @__PURE__ */ t(
|
|
1454
|
-
/* @__PURE__ */ t(
|
|
1455
|
-
/* @__PURE__ */ t(
|
|
1456
|
-
/* @__PURE__ */ t(
|
|
1457
|
-
/* @__PURE__ */ t(
|
|
1458
|
-
/* @__PURE__ */ t(
|
|
1459
|
-
/* @__PURE__ */ t(
|
|
1460
|
-
/* @__PURE__ */ t(
|
|
1461
|
-
|
|
1915
|
+
o.sources.length > 1 && /* @__PURE__ */ t(k, { label: "Source", value: ((Ee = o.sources[o.currentSourceIndex]) == null ? void 0 : Ee.name) || `Source ${o.currentSourceIndex + 1}`, onClick: () => N("sources"), hasSubmenu: !0 }),
|
|
1916
|
+
/* @__PURE__ */ t(k, { label: "Speed", value: `${o.playbackRate}x`, onClick: () => N("speed"), hasSubmenu: !0 }),
|
|
1917
|
+
/* @__PURE__ */ t(k, { label: "Quality", value: o.currentQuality === -1 ? "Auto" : `${(Ie = o.qualityLevels[o.currentQuality]) == null ? void 0 : Ie.height}p`, onClick: () => N("quality"), hasSubmenu: !0 }),
|
|
1918
|
+
/* @__PURE__ */ t(k, { label: "Audio", value: ((Re = o.audioTracks[o.currentAudioTrack]) == null ? void 0 : Re.label) || "Default", onClick: () => N("audio"), hasSubmenu: !0 }),
|
|
1919
|
+
/* @__PURE__ */ t(k, { label: "Audio Boost", value: o.audioGain > 1 ? `${o.audioGain}x` : "Off", onClick: () => N("boost"), hasSubmenu: !0 }),
|
|
1920
|
+
/* @__PURE__ */ t(je, {}),
|
|
1921
|
+
/* @__PURE__ */ t(k, { label: "Watch Party", icon: /* @__PURE__ */ t(ni, { className: "w-4 h-4" }), onClick: () => N("party"), hasSubmenu: !0 }),
|
|
1922
|
+
/* @__PURE__ */ t(k, { label: "Cast to Device", icon: /* @__PURE__ */ t(ri, { className: "w-4 h-4" }), onClick: () => {
|
|
1923
|
+
n.requestCast(), P(!1);
|
|
1462
1924
|
} }),
|
|
1463
|
-
/* @__PURE__ */ t(
|
|
1464
|
-
/* @__PURE__ */ t(
|
|
1925
|
+
/* @__PURE__ */ t(je, {}),
|
|
1926
|
+
/* @__PURE__ */ t(k, { label: "Appearance", icon: /* @__PURE__ */ t(We, { className: "w-4 h-4" }), onClick: () => N("appearance"), hasSubmenu: !0 })
|
|
1465
1927
|
] }),
|
|
1466
|
-
["speed", "quality", "audio", "boost", "party", "appearance", "sources"].includes(
|
|
1467
|
-
|
|
1468
|
-
/* @__PURE__ */ t(
|
|
1469
|
-
o.sources.map((
|
|
1928
|
+
["speed", "quality", "audio", "boost", "party", "appearance", "sources"].includes(L) && /* @__PURE__ */ d("div", { className: "animate-in slide-in-from-right-4 fade-in duration-200", children: [
|
|
1929
|
+
L === "sources" && /* @__PURE__ */ d(A, { children: [
|
|
1930
|
+
/* @__PURE__ */ t(j, { label: "Select Source", onBack: () => N("main") }),
|
|
1931
|
+
o.sources.map((a, p) => /* @__PURE__ */ t(k, { label: a.name || `Source ${p + 1}`, value: a.type, active: o.currentSourceIndex === p, onClick: () => n.switchSource(p) }, p))
|
|
1470
1932
|
] }),
|
|
1471
|
-
|
|
1472
|
-
/* @__PURE__ */ t(
|
|
1473
|
-
[0.5, 1, 1.5, 2].map((
|
|
1933
|
+
L === "speed" && /* @__PURE__ */ d(A, { children: [
|
|
1934
|
+
/* @__PURE__ */ t(j, { label: "Speed", onBack: () => N("main") }),
|
|
1935
|
+
[0.5, 1, 1.5, 2].map((a) => /* @__PURE__ */ t(k, { label: `${a}x`, active: o.playbackRate === a, onClick: () => n.video.playbackRate = a }, a))
|
|
1474
1936
|
] }),
|
|
1475
|
-
|
|
1476
|
-
/* @__PURE__ */ t(
|
|
1477
|
-
/* @__PURE__ */ t(
|
|
1478
|
-
o.qualityLevels.map((
|
|
1937
|
+
L === "quality" && /* @__PURE__ */ d(A, { children: [
|
|
1938
|
+
/* @__PURE__ */ t(j, { label: "Quality", onBack: () => N("main") }),
|
|
1939
|
+
/* @__PURE__ */ t(k, { label: "Auto", active: o.currentQuality === -1, onClick: () => n.setQuality(-1) }),
|
|
1940
|
+
o.qualityLevels.map((a) => /* @__PURE__ */ t(k, { label: `${a.height}p`, value: `${Math.round(a.bitrate / 1e3)}k`, active: o.currentQuality === a.index, onClick: () => n.setQuality(a.index) }, a.index))
|
|
1479
1941
|
] }),
|
|
1480
|
-
|
|
1481
|
-
/* @__PURE__ */ t(
|
|
1942
|
+
L === "audio" && /* @__PURE__ */ d(A, { children: [
|
|
1943
|
+
/* @__PURE__ */ t(j, { label: "Audio Track", onBack: () => N("main") }),
|
|
1482
1944
|
o.audioTracks.length === 0 && /* @__PURE__ */ t("div", { className: "px-4 py-3 text-zinc-500 text-xs text-center", children: "No tracks available" }),
|
|
1483
|
-
o.audioTracks.map((
|
|
1945
|
+
o.audioTracks.map((a) => /* @__PURE__ */ t(k, { label: a.label, value: a.language, active: o.currentAudioTrack === a.index, onClick: () => n.setAudioTrack(a.index) }, a.index))
|
|
1484
1946
|
] }),
|
|
1485
|
-
|
|
1486
|
-
/* @__PURE__ */ t(
|
|
1487
|
-
[1, 1.5, 2, 3].map((
|
|
1947
|
+
L === "boost" && /* @__PURE__ */ d(A, { children: [
|
|
1948
|
+
/* @__PURE__ */ t(j, { label: "Audio Boost", onBack: () => N("main") }),
|
|
1949
|
+
[1, 1.5, 2, 3].map((a) => /* @__PURE__ */ t(k, { label: a === 1 ? "Off" : `${a}x`, active: o.audioGain === a, onClick: () => n.setAudioGain(a) }, a))
|
|
1488
1950
|
] }),
|
|
1489
|
-
|
|
1490
|
-
/* @__PURE__ */ t(
|
|
1491
|
-
/* @__PURE__ */
|
|
1951
|
+
L === "party" && /* @__PURE__ */ d(A, { children: [
|
|
1952
|
+
/* @__PURE__ */ t(j, { label: "Watch Party", onBack: () => N("main") }),
|
|
1953
|
+
/* @__PURE__ */ d("div", { className: "p-4 space-y-3", children: [
|
|
1492
1954
|
/* @__PURE__ */ t("p", { className: "text-xs text-zinc-400 leading-relaxed", children: "Create a synchronized room on WatchParty.me to watch together." }),
|
|
1493
|
-
/* @__PURE__ */ t("a", { href: `https://www.watchparty.me/create?video=${encodeURIComponent(((
|
|
1955
|
+
/* @__PURE__ */ t("a", { href: `https://www.watchparty.me/create?video=${encodeURIComponent(((Pe = o.sources[o.currentSourceIndex]) == null ? void 0 : Pe.url) || e || "")}`, target: "_blank", rel: "noopener noreferrer", className: "flex items-center justify-center w-full py-2.5 bg-[var(--accent)] hover:opacity-90 text-white font-medium transition-opacity text-xs", style: { borderRadius: "var(--radius)" }, children: "Create Room" })
|
|
1494
1956
|
] })
|
|
1495
1957
|
] }),
|
|
1496
|
-
|
|
1497
|
-
/* @__PURE__ */ t(
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */ t(
|
|
1958
|
+
L === "appearance" && /* @__PURE__ */ d(A, { children: [
|
|
1959
|
+
/* @__PURE__ */ t(j, { label: "Appearance", onBack: () => N("main") }),
|
|
1960
|
+
/* @__PURE__ */ d("div", { className: "pb-1", children: [
|
|
1961
|
+
/* @__PURE__ */ t(D, { title: "Theme", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-2 gap-2 px-3", children: Ci.map((a) => /* @__PURE__ */ t(
|
|
1500
1962
|
"button",
|
|
1501
1963
|
{
|
|
1502
|
-
onClick: () =>
|
|
1503
|
-
className: `py-2 text-xs font-bold uppercase tracking-wide transition-colors border-[length:var(--border-width)] border-white/10 ${o.theme ===
|
|
1964
|
+
onClick: () => n.setAppearance({ theme: a.value, themeColor: a.color }),
|
|
1965
|
+
className: `py-2 text-xs font-bold uppercase tracking-wide transition-colors border-[length:var(--border-width)] border-white/10 ${o.theme === a.value ? "bg-[var(--accent)] text-white" : "bg-white/5 text-zinc-400 hover:text-white"}`,
|
|
1504
1966
|
style: { borderRadius: "var(--radius)" },
|
|
1505
|
-
children:
|
|
1967
|
+
children: a.label
|
|
1506
1968
|
},
|
|
1507
|
-
|
|
1969
|
+
a.value
|
|
1508
1970
|
)) }) }),
|
|
1509
|
-
/* @__PURE__ */ t(
|
|
1971
|
+
/* @__PURE__ */ t(D, { title: "Icon Size", children: /* @__PURE__ */ t("div", { className: "grid grid-cols-3 gap-1 px-3", children: ["small", "medium", "large"].map((a) => /* @__PURE__ */ t(
|
|
1510
1972
|
"button",
|
|
1511
1973
|
{
|
|
1512
|
-
onClick: () =>
|
|
1513
|
-
className: `py-1.5 text-xs font-medium transition-colors ${o.iconSize ===
|
|
1974
|
+
onClick: () => n.setAppearance({ iconSize: a }),
|
|
1975
|
+
className: `py-1.5 text-xs font-medium transition-colors ${o.iconSize === a ? "bg-white text-black" : "bg-white/5 text-zinc-400 hover:text-zinc-200"}`,
|
|
1514
1976
|
style: { borderRadius: "var(--radius)" },
|
|
1515
|
-
children:
|
|
1977
|
+
children: a.charAt(0).toUpperCase() + a.slice(1)
|
|
1516
1978
|
},
|
|
1517
|
-
|
|
1979
|
+
a
|
|
1518
1980
|
)) }) }),
|
|
1519
|
-
/* @__PURE__ */
|
|
1520
|
-
/* @__PURE__ */ t("div", { className: "grid grid-cols-6 gap-2 px-3", children:
|
|
1981
|
+
/* @__PURE__ */ d(D, { title: "Theme Color", children: [
|
|
1982
|
+
/* @__PURE__ */ t("div", { className: "grid grid-cols-6 gap-2 px-3", children: ki.map((a) => /* @__PURE__ */ t(
|
|
1521
1983
|
"button",
|
|
1522
1984
|
{
|
|
1523
|
-
title:
|
|
1524
|
-
onClick: () =>
|
|
1525
|
-
className: `w-6 h-6 transition-transform hover:scale-110 ${o.themeColor ===
|
|
1526
|
-
style: { backgroundColor:
|
|
1527
|
-
children: o.themeColor ===
|
|
1985
|
+
title: a.label,
|
|
1986
|
+
onClick: () => n.setAppearance({ themeColor: a.value }),
|
|
1987
|
+
className: `w-6 h-6 transition-transform hover:scale-110 ${o.themeColor === a.value ? "ring-2 ring-white scale-110" : "ring-1 ring-white/10"}`,
|
|
1988
|
+
style: { backgroundColor: a.value, borderRadius: "var(--radius-full)" },
|
|
1989
|
+
children: o.themeColor === a.value && /* @__PURE__ */ t(Ge, { className: "w-3 h-3 text-white mx-auto stroke-[3]" })
|
|
1528
1990
|
},
|
|
1529
|
-
|
|
1991
|
+
a.value
|
|
1530
1992
|
)) }),
|
|
1531
|
-
/* @__PURE__ */ t("div", { className: "px-3 pt-4", children: /* @__PURE__ */
|
|
1993
|
+
/* @__PURE__ */ t("div", { className: "px-3 pt-4", children: /* @__PURE__ */ d("div", { className: "flex items-center gap-3 bg-white/5 p-2 hover:bg-white/10 transition-colors group", style: { borderRadius: "var(--radius)" }, children: [
|
|
1532
1994
|
/* @__PURE__ */ t("div", { className: "relative w-6 h-6 overflow-hidden ring-1 ring-white/20", style: { borderRadius: "var(--radius-full)" }, children: /* @__PURE__ */ t(
|
|
1533
1995
|
"input",
|
|
1534
1996
|
{
|
|
1535
1997
|
type: "color",
|
|
1536
1998
|
value: o.themeColor,
|
|
1537
|
-
onChange: (
|
|
1999
|
+
onChange: (a) => n.setAppearance({ themeColor: a.target.value }),
|
|
1538
2000
|
className: "absolute inset-[-4px] w-[150%] h-[150%] cursor-pointer p-0 border-0"
|
|
1539
2001
|
}
|
|
1540
2002
|
) }),
|
|
@@ -1547,7 +2009,7 @@ const ae = (d) => {
|
|
|
1547
2009
|
] })
|
|
1548
2010
|
] }) })
|
|
1549
2011
|
] }),
|
|
1550
|
-
/* @__PURE__ */ t("button", { onClick: () =>
|
|
2012
|
+
/* @__PURE__ */ t("button", { onClick: () => n.toggleFullscreen(), className: `strata-control-btn text-zinc-300 hover:text-white hover:bg-white/10 rounded-lg transition-transform hover:scale-110 focus:outline-none ${F}`, style: { borderRadius: "var(--radius)" }, children: o.isFullscreen ? /* @__PURE__ */ t(Yt, { className: $ }) : /* @__PURE__ */ t(Kt, { className: $ }) })
|
|
1551
2013
|
] })
|
|
1552
2014
|
] })
|
|
1553
2015
|
] })
|
|
@@ -1555,21 +2017,21 @@ const ae = (d) => {
|
|
|
1555
2017
|
]
|
|
1556
2018
|
}
|
|
1557
2019
|
);
|
|
1558
|
-
},
|
|
1559
|
-
const i =
|
|
1560
|
-
return i.render(
|
|
2020
|
+
}, Ri = (c, e) => {
|
|
2021
|
+
const i = nt(c);
|
|
2022
|
+
return i.render(Le.createElement(Fe, e)), {
|
|
1561
2023
|
unmount: () => {
|
|
1562
2024
|
i.unmount();
|
|
1563
2025
|
},
|
|
1564
2026
|
update: (s) => {
|
|
1565
|
-
i.render(
|
|
2027
|
+
i.render(Le.createElement(Fe, { ...e, ...s }));
|
|
1566
2028
|
}
|
|
1567
2029
|
};
|
|
1568
2030
|
};
|
|
1569
2031
|
export {
|
|
1570
|
-
|
|
1571
|
-
|
|
2032
|
+
ut as HlsPlugin,
|
|
2033
|
+
dt as StrataCore,
|
|
1572
2034
|
Fe as StrataPlayer,
|
|
1573
|
-
|
|
2035
|
+
Ri as mountStrataPlayer
|
|
1574
2036
|
};
|
|
1575
2037
|
//# sourceMappingURL=strataplayer.es.js.map
|