ecplayer 1.0.1 → 1.0.3
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/ecplayer.es.js +937 -1562
- package/dist/ecplayer.umd.js +40 -69
- package/dist/style.css +1 -1
- package/package.json +4 -2
package/dist/ecplayer.es.js
CHANGED
|
@@ -1,645 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @license React
|
|
5
|
-
* react-jsx-runtime.production.min.js
|
|
6
|
-
*
|
|
7
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
var ut;
|
|
13
|
-
function $t() {
|
|
14
|
-
if (ut) return Je;
|
|
15
|
-
ut = 1;
|
|
16
|
-
var o = xt, u = Symbol.for("react.element"), g = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, _ = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
-
function k(y, N, q) {
|
|
18
|
-
var M, O = {}, S = null, V = null;
|
|
19
|
-
q !== void 0 && (S = "" + q), N.key !== void 0 && (S = "" + N.key), N.ref !== void 0 && (V = N.ref);
|
|
20
|
-
for (M in N) m.call(N, M) && !p.hasOwnProperty(M) && (O[M] = N[M]);
|
|
21
|
-
if (y && y.defaultProps) for (M in N = y.defaultProps, N) O[M] === void 0 && (O[M] = N[M]);
|
|
22
|
-
return { $$typeof: u, type: y, key: S, ref: V, props: O, _owner: _.current };
|
|
23
|
-
}
|
|
24
|
-
return Je.Fragment = g, Je.jsx = k, Je.jsxs = k, Je;
|
|
25
|
-
}
|
|
26
|
-
var Xe = {};
|
|
27
|
-
/**
|
|
28
|
-
* @license React
|
|
29
|
-
* react-jsx-runtime.development.js
|
|
30
|
-
*
|
|
31
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
32
|
-
*
|
|
33
|
-
* This source code is licensed under the MIT license found in the
|
|
34
|
-
* LICENSE file in the root directory of this source tree.
|
|
35
|
-
*/
|
|
36
|
-
var dt;
|
|
37
|
-
function Et() {
|
|
38
|
-
return dt || (dt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
39
|
-
var o = xt, u = Symbol.for("react.element"), g = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), _ = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), k = Symbol.for("react.provider"), y = Symbol.for("react.context"), N = Symbol.for("react.forward_ref"), q = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), S = Symbol.for("react.lazy"), V = Symbol.for("react.offscreen"), U = Symbol.iterator, Y = "@@iterator";
|
|
40
|
-
function K(t) {
|
|
41
|
-
if (t === null || typeof t != "object")
|
|
42
|
-
return null;
|
|
43
|
-
var n = U && t[U] || t[Y];
|
|
44
|
-
return typeof n == "function" ? n : null;
|
|
45
|
-
}
|
|
46
|
-
var $ = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
|
-
function b(t) {
|
|
48
|
-
{
|
|
49
|
-
for (var n = arguments.length, c = new Array(n > 1 ? n - 1 : 0), h = 1; h < n; h++)
|
|
50
|
-
c[h - 1] = arguments[h];
|
|
51
|
-
we("error", t, c);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function we(t, n, c) {
|
|
55
|
-
{
|
|
56
|
-
var h = $.ReactDebugCurrentFrame, D = h.getStackAddendum();
|
|
57
|
-
D !== "" && (n += "%s", c = c.concat([D]));
|
|
58
|
-
var W = c.map(function(A) {
|
|
59
|
-
return String(A);
|
|
60
|
-
});
|
|
61
|
-
W.unshift("Warning: " + n), Function.prototype.apply.call(console[t], console, W);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
var me = !1, $e = !1, se = !1, ce = !1, ye = !1, he;
|
|
65
|
-
he = Symbol.for("react.module.reference");
|
|
66
|
-
function X(t) {
|
|
67
|
-
return !!(typeof t == "string" || typeof t == "function" || t === m || t === p || ye || t === _ || t === q || t === M || ce || t === V || me || $e || se || typeof t == "object" && t !== null && (t.$$typeof === S || t.$$typeof === O || t.$$typeof === k || t.$$typeof === y || t.$$typeof === N || // This needs to include all possible module reference object
|
|
68
|
-
// types supported by any Flight configuration anywhere since
|
|
69
|
-
// we don't know which Flight build this will end up being used
|
|
70
|
-
// with.
|
|
71
|
-
t.$$typeof === he || t.getModuleId !== void 0));
|
|
72
|
-
}
|
|
73
|
-
function ke(t, n, c) {
|
|
74
|
-
var h = t.displayName;
|
|
75
|
-
if (h)
|
|
76
|
-
return h;
|
|
77
|
-
var D = n.displayName || n.name || "";
|
|
78
|
-
return D !== "" ? c + "(" + D + ")" : c;
|
|
79
|
-
}
|
|
80
|
-
function H(t) {
|
|
81
|
-
return t.displayName || "Context";
|
|
82
|
-
}
|
|
83
|
-
function F(t) {
|
|
84
|
-
if (t == null)
|
|
85
|
-
return null;
|
|
86
|
-
if (typeof t.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
|
|
87
|
-
return t.displayName || t.name || null;
|
|
88
|
-
if (typeof t == "string")
|
|
89
|
-
return t;
|
|
90
|
-
switch (t) {
|
|
91
|
-
case m:
|
|
92
|
-
return "Fragment";
|
|
93
|
-
case g:
|
|
94
|
-
return "Portal";
|
|
95
|
-
case p:
|
|
96
|
-
return "Profiler";
|
|
97
|
-
case _:
|
|
98
|
-
return "StrictMode";
|
|
99
|
-
case q:
|
|
100
|
-
return "Suspense";
|
|
101
|
-
case M:
|
|
102
|
-
return "SuspenseList";
|
|
103
|
-
}
|
|
104
|
-
if (typeof t == "object")
|
|
105
|
-
switch (t.$$typeof) {
|
|
106
|
-
case y:
|
|
107
|
-
var n = t;
|
|
108
|
-
return H(n) + ".Consumer";
|
|
109
|
-
case k:
|
|
110
|
-
var c = t;
|
|
111
|
-
return H(c._context) + ".Provider";
|
|
112
|
-
case N:
|
|
113
|
-
return ke(t, t.render, "ForwardRef");
|
|
114
|
-
case O:
|
|
115
|
-
var h = t.displayName || null;
|
|
116
|
-
return h !== null ? h : F(t.type) || "Memo";
|
|
117
|
-
case S: {
|
|
118
|
-
var D = t, W = D._payload, A = D._init;
|
|
119
|
-
try {
|
|
120
|
-
return F(A(W));
|
|
121
|
-
} catch {
|
|
122
|
-
return null;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
return null;
|
|
127
|
-
}
|
|
128
|
-
var z = Object.assign, fe = 0, be, ue, le, R, f, B, ie;
|
|
129
|
-
function Ne() {
|
|
130
|
-
}
|
|
131
|
-
Ne.__reactDisabledLog = !0;
|
|
132
|
-
function Q() {
|
|
133
|
-
{
|
|
134
|
-
if (fe === 0) {
|
|
135
|
-
be = console.log, ue = console.info, le = console.warn, R = console.error, f = console.group, B = console.groupCollapsed, ie = console.groupEnd;
|
|
136
|
-
var t = {
|
|
137
|
-
configurable: !0,
|
|
138
|
-
enumerable: !0,
|
|
139
|
-
value: Ne,
|
|
140
|
-
writable: !0
|
|
141
|
-
};
|
|
142
|
-
Object.defineProperties(console, {
|
|
143
|
-
info: t,
|
|
144
|
-
log: t,
|
|
145
|
-
warn: t,
|
|
146
|
-
error: t,
|
|
147
|
-
group: t,
|
|
148
|
-
groupCollapsed: t,
|
|
149
|
-
groupEnd: t
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
fe++;
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
function xe() {
|
|
156
|
-
{
|
|
157
|
-
if (fe--, fe === 0) {
|
|
158
|
-
var t = {
|
|
159
|
-
configurable: !0,
|
|
160
|
-
enumerable: !0,
|
|
161
|
-
writable: !0
|
|
162
|
-
};
|
|
163
|
-
Object.defineProperties(console, {
|
|
164
|
-
log: z({}, t, {
|
|
165
|
-
value: be
|
|
166
|
-
}),
|
|
167
|
-
info: z({}, t, {
|
|
168
|
-
value: ue
|
|
169
|
-
}),
|
|
170
|
-
warn: z({}, t, {
|
|
171
|
-
value: le
|
|
172
|
-
}),
|
|
173
|
-
error: z({}, t, {
|
|
174
|
-
value: R
|
|
175
|
-
}),
|
|
176
|
-
group: z({}, t, {
|
|
177
|
-
value: f
|
|
178
|
-
}),
|
|
179
|
-
groupCollapsed: z({}, t, {
|
|
180
|
-
value: B
|
|
181
|
-
}),
|
|
182
|
-
groupEnd: z({}, t, {
|
|
183
|
-
value: ie
|
|
184
|
-
})
|
|
185
|
-
});
|
|
186
|
-
}
|
|
187
|
-
fe < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
var ne = $.ReactCurrentDispatcher, T;
|
|
191
|
-
function oe(t, n, c) {
|
|
192
|
-
{
|
|
193
|
-
if (T === void 0)
|
|
194
|
-
try {
|
|
195
|
-
throw Error();
|
|
196
|
-
} catch (D) {
|
|
197
|
-
var h = D.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
-
T = h && h[1] || "";
|
|
199
|
-
}
|
|
200
|
-
return `
|
|
201
|
-
` + T + t;
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
var ae = !1, s;
|
|
205
|
-
{
|
|
206
|
-
var x = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
-
s = new x();
|
|
208
|
-
}
|
|
209
|
-
function E(t, n) {
|
|
210
|
-
if (!t || ae)
|
|
211
|
-
return "";
|
|
212
|
-
{
|
|
213
|
-
var c = s.get(t);
|
|
214
|
-
if (c !== void 0)
|
|
215
|
-
return c;
|
|
216
|
-
}
|
|
217
|
-
var h;
|
|
218
|
-
ae = !0;
|
|
219
|
-
var D = Error.prepareStackTrace;
|
|
220
|
-
Error.prepareStackTrace = void 0;
|
|
221
|
-
var W;
|
|
222
|
-
W = ne.current, ne.current = null, Q();
|
|
223
|
-
try {
|
|
224
|
-
if (n) {
|
|
225
|
-
var A = function() {
|
|
226
|
-
throw Error();
|
|
227
|
-
};
|
|
228
|
-
if (Object.defineProperty(A.prototype, "props", {
|
|
229
|
-
set: function() {
|
|
230
|
-
throw Error();
|
|
231
|
-
}
|
|
232
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
|
-
try {
|
|
234
|
-
Reflect.construct(A, []);
|
|
235
|
-
} catch (pe) {
|
|
236
|
-
h = pe;
|
|
237
|
-
}
|
|
238
|
-
Reflect.construct(t, [], A);
|
|
239
|
-
} else {
|
|
240
|
-
try {
|
|
241
|
-
A.call();
|
|
242
|
-
} catch (pe) {
|
|
243
|
-
h = pe;
|
|
244
|
-
}
|
|
245
|
-
t.call(A.prototype);
|
|
246
|
-
}
|
|
247
|
-
} else {
|
|
248
|
-
try {
|
|
249
|
-
throw Error();
|
|
250
|
-
} catch (pe) {
|
|
251
|
-
h = pe;
|
|
252
|
-
}
|
|
253
|
-
t();
|
|
254
|
-
}
|
|
255
|
-
} catch (pe) {
|
|
256
|
-
if (pe && h && typeof pe.stack == "string") {
|
|
257
|
-
for (var P = pe.stack.split(`
|
|
258
|
-
`), ge = h.stack.split(`
|
|
259
|
-
`), ee = P.length - 1, re = ge.length - 1; ee >= 1 && re >= 0 && P[ee] !== ge[re]; )
|
|
260
|
-
re--;
|
|
261
|
-
for (; ee >= 1 && re >= 0; ee--, re--)
|
|
262
|
-
if (P[ee] !== ge[re]) {
|
|
263
|
-
if (ee !== 1 || re !== 1)
|
|
264
|
-
do
|
|
265
|
-
if (ee--, re--, re < 0 || P[ee] !== ge[re]) {
|
|
266
|
-
var je = `
|
|
267
|
-
` + P[ee].replace(" at new ", " at ");
|
|
268
|
-
return t.displayName && je.includes("<anonymous>") && (je = je.replace("<anonymous>", t.displayName)), typeof t == "function" && s.set(t, je), je;
|
|
269
|
-
}
|
|
270
|
-
while (ee >= 1 && re >= 0);
|
|
271
|
-
break;
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
} finally {
|
|
275
|
-
ae = !1, ne.current = W, xe(), Error.prepareStackTrace = D;
|
|
276
|
-
}
|
|
277
|
-
var Ye = t ? t.displayName || t.name : "", Be = Ye ? oe(Ye) : "";
|
|
278
|
-
return typeof t == "function" && s.set(t, Be), Be;
|
|
279
|
-
}
|
|
280
|
-
function G(t, n, c) {
|
|
281
|
-
return E(t, !1);
|
|
282
|
-
}
|
|
283
|
-
function J(t) {
|
|
284
|
-
var n = t.prototype;
|
|
285
|
-
return !!(n && n.isReactComponent);
|
|
286
|
-
}
|
|
287
|
-
function te(t, n, c) {
|
|
288
|
-
if (t == null)
|
|
289
|
-
return "";
|
|
290
|
-
if (typeof t == "function")
|
|
291
|
-
return E(t, J(t));
|
|
292
|
-
if (typeof t == "string")
|
|
293
|
-
return oe(t);
|
|
294
|
-
switch (t) {
|
|
295
|
-
case q:
|
|
296
|
-
return oe("Suspense");
|
|
297
|
-
case M:
|
|
298
|
-
return oe("SuspenseList");
|
|
299
|
-
}
|
|
300
|
-
if (typeof t == "object")
|
|
301
|
-
switch (t.$$typeof) {
|
|
302
|
-
case N:
|
|
303
|
-
return G(t.render);
|
|
304
|
-
case O:
|
|
305
|
-
return te(t.type, n, c);
|
|
306
|
-
case S: {
|
|
307
|
-
var h = t, D = h._payload, W = h._init;
|
|
308
|
-
try {
|
|
309
|
-
return te(W(D), n, c);
|
|
310
|
-
} catch {
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
return "";
|
|
315
|
-
}
|
|
316
|
-
var d = Object.prototype.hasOwnProperty, j = {}, ve = $.ReactDebugCurrentFrame;
|
|
317
|
-
function qe(t) {
|
|
318
|
-
if (t) {
|
|
319
|
-
var n = t._owner, c = te(t.type, t._source, n ? n.type : null);
|
|
320
|
-
ve.setExtraStackFrame(c);
|
|
321
|
-
} else
|
|
322
|
-
ve.setExtraStackFrame(null);
|
|
323
|
-
}
|
|
324
|
-
function Fe(t, n, c, h, D) {
|
|
325
|
-
{
|
|
326
|
-
var W = Function.call.bind(d);
|
|
327
|
-
for (var A in t)
|
|
328
|
-
if (W(t, A)) {
|
|
329
|
-
var P = void 0;
|
|
330
|
-
try {
|
|
331
|
-
if (typeof t[A] != "function") {
|
|
332
|
-
var ge = Error((h || "React class") + ": " + c + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
333
|
-
throw ge.name = "Invariant Violation", ge;
|
|
334
|
-
}
|
|
335
|
-
P = t[A](n, A, h, c, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
336
|
-
} catch (ee) {
|
|
337
|
-
P = ee;
|
|
338
|
-
}
|
|
339
|
-
P && !(P instanceof Error) && (qe(D), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", h || "React class", c, A, typeof P), qe(null)), P instanceof Error && !(P.message in j) && (j[P.message] = !0, qe(D), b("Failed %s type: %s", c, P.message), qe(null));
|
|
340
|
-
}
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
var Ee = Array.isArray;
|
|
344
|
-
function _e(t) {
|
|
345
|
-
return Ee(t);
|
|
346
|
-
}
|
|
347
|
-
function Ce(t) {
|
|
348
|
-
{
|
|
349
|
-
var n = typeof Symbol == "function" && Symbol.toStringTag, c = n && t[Symbol.toStringTag] || t.constructor.name || "Object";
|
|
350
|
-
return c;
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
function He(t) {
|
|
354
|
-
try {
|
|
355
|
-
return Le(t), !1;
|
|
356
|
-
} catch {
|
|
357
|
-
return !0;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
function Le(t) {
|
|
361
|
-
return "" + t;
|
|
362
|
-
}
|
|
363
|
-
function Me(t) {
|
|
364
|
-
if (He(t))
|
|
365
|
-
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ce(t)), Le(t);
|
|
366
|
-
}
|
|
367
|
-
var Oe = $.ReactCurrentOwner, We = {
|
|
368
|
-
key: !0,
|
|
369
|
-
ref: !0,
|
|
370
|
-
__self: !0,
|
|
371
|
-
__source: !0
|
|
372
|
-
}, Ve, Ue;
|
|
373
|
-
function ze(t) {
|
|
374
|
-
if (d.call(t, "ref")) {
|
|
375
|
-
var n = Object.getOwnPropertyDescriptor(t, "ref").get;
|
|
376
|
-
if (n && n.isReactWarning)
|
|
377
|
-
return !1;
|
|
378
|
-
}
|
|
379
|
-
return t.ref !== void 0;
|
|
380
|
-
}
|
|
381
|
-
function Ke(t) {
|
|
382
|
-
if (d.call(t, "key")) {
|
|
383
|
-
var n = Object.getOwnPropertyDescriptor(t, "key").get;
|
|
384
|
-
if (n && n.isReactWarning)
|
|
385
|
-
return !1;
|
|
386
|
-
}
|
|
387
|
-
return t.key !== void 0;
|
|
388
|
-
}
|
|
389
|
-
function Se(t, n) {
|
|
390
|
-
typeof t.ref == "string" && Oe.current;
|
|
391
|
-
}
|
|
392
|
-
function Re(t, n) {
|
|
393
|
-
{
|
|
394
|
-
var c = function() {
|
|
395
|
-
Ve || (Ve = !0, b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
396
|
-
};
|
|
397
|
-
c.isReactWarning = !0, Object.defineProperty(t, "key", {
|
|
398
|
-
get: c,
|
|
399
|
-
configurable: !0
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
function Ie(t, n) {
|
|
404
|
-
{
|
|
405
|
-
var c = function() {
|
|
406
|
-
Ue || (Ue = !0, b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
407
|
-
};
|
|
408
|
-
c.isReactWarning = !0, Object.defineProperty(t, "ref", {
|
|
409
|
-
get: c,
|
|
410
|
-
configurable: !0
|
|
411
|
-
});
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
var r = function(t, n, c, h, D, W, A) {
|
|
415
|
-
var P = {
|
|
416
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
417
|
-
$$typeof: u,
|
|
418
|
-
// Built-in properties that belong on the element
|
|
419
|
-
type: t,
|
|
420
|
-
key: n,
|
|
421
|
-
ref: c,
|
|
422
|
-
props: A,
|
|
423
|
-
// Record the component responsible for creating this element.
|
|
424
|
-
_owner: W
|
|
425
|
-
};
|
|
426
|
-
return P._store = {}, Object.defineProperty(P._store, "validated", {
|
|
427
|
-
configurable: !1,
|
|
428
|
-
enumerable: !1,
|
|
429
|
-
writable: !0,
|
|
430
|
-
value: !1
|
|
431
|
-
}), Object.defineProperty(P, "_self", {
|
|
432
|
-
configurable: !1,
|
|
433
|
-
enumerable: !1,
|
|
434
|
-
writable: !1,
|
|
435
|
-
value: h
|
|
436
|
-
}), Object.defineProperty(P, "_source", {
|
|
437
|
-
configurable: !1,
|
|
438
|
-
enumerable: !1,
|
|
439
|
-
writable: !1,
|
|
440
|
-
value: D
|
|
441
|
-
}), Object.freeze && (Object.freeze(P.props), Object.freeze(P)), P;
|
|
442
|
-
};
|
|
443
|
-
function a(t, n, c, h, D) {
|
|
444
|
-
{
|
|
445
|
-
var W, A = {}, P = null, ge = null;
|
|
446
|
-
c !== void 0 && (Me(c), P = "" + c), Ke(n) && (Me(n.key), P = "" + n.key), ze(n) && (ge = n.ref, Se(n, D));
|
|
447
|
-
for (W in n)
|
|
448
|
-
d.call(n, W) && !We.hasOwnProperty(W) && (A[W] = n[W]);
|
|
449
|
-
if (t && t.defaultProps) {
|
|
450
|
-
var ee = t.defaultProps;
|
|
451
|
-
for (W in ee)
|
|
452
|
-
A[W] === void 0 && (A[W] = ee[W]);
|
|
453
|
-
}
|
|
454
|
-
if (P || ge) {
|
|
455
|
-
var re = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
|
|
456
|
-
P && Re(A, re), ge && Ie(A, re);
|
|
457
|
-
}
|
|
458
|
-
return r(t, P, ge, D, h, Oe.current, A);
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
var l = $.ReactCurrentOwner, i = $.ReactDebugCurrentFrame;
|
|
462
|
-
function w(t) {
|
|
463
|
-
if (t) {
|
|
464
|
-
var n = t._owner, c = te(t.type, t._source, n ? n.type : null);
|
|
465
|
-
i.setExtraStackFrame(c);
|
|
466
|
-
} else
|
|
467
|
-
i.setExtraStackFrame(null);
|
|
468
|
-
}
|
|
469
|
-
var I;
|
|
470
|
-
I = !1;
|
|
471
|
-
function de(t) {
|
|
472
|
-
return typeof t == "object" && t !== null && t.$$typeof === u;
|
|
473
|
-
}
|
|
474
|
-
function Te() {
|
|
475
|
-
{
|
|
476
|
-
if (l.current) {
|
|
477
|
-
var t = F(l.current.type);
|
|
478
|
-
if (t)
|
|
479
|
-
return `
|
|
480
|
-
|
|
481
|
-
Check the render method of \`` + t + "`.";
|
|
482
|
-
}
|
|
483
|
-
return "";
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
function De(t) {
|
|
487
|
-
return "";
|
|
488
|
-
}
|
|
489
|
-
var Z = {};
|
|
490
|
-
function Ge(t) {
|
|
491
|
-
{
|
|
492
|
-
var n = Te();
|
|
493
|
-
if (!n) {
|
|
494
|
-
var c = typeof t == "string" ? t : t.displayName || t.name;
|
|
495
|
-
c && (n = `
|
|
496
|
-
|
|
497
|
-
Check the top-level render call using <` + c + ">.");
|
|
498
|
-
}
|
|
499
|
-
return n;
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
function lt(t, n) {
|
|
503
|
-
{
|
|
504
|
-
if (!t._store || t._store.validated || t.key != null)
|
|
505
|
-
return;
|
|
506
|
-
t._store.validated = !0;
|
|
507
|
-
var c = Ge(n);
|
|
508
|
-
if (Z[c])
|
|
509
|
-
return;
|
|
510
|
-
Z[c] = !0;
|
|
511
|
-
var h = "";
|
|
512
|
-
t && t._owner && t._owner !== l.current && (h = " It was passed a child from " + F(t._owner.type) + "."), w(t), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', c, h), w(null);
|
|
513
|
-
}
|
|
514
|
-
}
|
|
515
|
-
function it(t, n) {
|
|
516
|
-
{
|
|
517
|
-
if (typeof t != "object")
|
|
518
|
-
return;
|
|
519
|
-
if (_e(t))
|
|
520
|
-
for (var c = 0; c < t.length; c++) {
|
|
521
|
-
var h = t[c];
|
|
522
|
-
de(h) && lt(h, n);
|
|
523
|
-
}
|
|
524
|
-
else if (de(t))
|
|
525
|
-
t._store && (t._store.validated = !0);
|
|
526
|
-
else if (t) {
|
|
527
|
-
var D = K(t);
|
|
528
|
-
if (typeof D == "function" && D !== t.entries)
|
|
529
|
-
for (var W = D.call(t), A; !(A = W.next()).done; )
|
|
530
|
-
de(A.value) && lt(A.value, n);
|
|
531
|
-
}
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
function ht(t) {
|
|
535
|
-
{
|
|
536
|
-
var n = t.type;
|
|
537
|
-
if (n == null || typeof n == "string")
|
|
538
|
-
return;
|
|
539
|
-
var c;
|
|
540
|
-
if (typeof n == "function")
|
|
541
|
-
c = n.propTypes;
|
|
542
|
-
else if (typeof n == "object" && (n.$$typeof === N || // Note: Memo only checks outer props here.
|
|
543
|
-
// Inner props are checked in the reconciler.
|
|
544
|
-
n.$$typeof === O))
|
|
545
|
-
c = n.propTypes;
|
|
546
|
-
else
|
|
547
|
-
return;
|
|
548
|
-
if (c) {
|
|
549
|
-
var h = F(n);
|
|
550
|
-
Fe(c, t.props, "prop", h, t);
|
|
551
|
-
} else if (n.PropTypes !== void 0 && !I) {
|
|
552
|
-
I = !0;
|
|
553
|
-
var D = F(n);
|
|
554
|
-
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
|
|
555
|
-
}
|
|
556
|
-
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
function yt(t) {
|
|
560
|
-
{
|
|
561
|
-
for (var n = Object.keys(t.props), c = 0; c < n.length; c++) {
|
|
562
|
-
var h = n[c];
|
|
563
|
-
if (h !== "children" && h !== "key") {
|
|
564
|
-
w(t), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", h), w(null);
|
|
565
|
-
break;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
t.ref !== null && (w(t), b("Invalid attribute `ref` supplied to `React.Fragment`."), w(null));
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
var ot = {};
|
|
572
|
-
function ct(t, n, c, h, D, W) {
|
|
573
|
-
{
|
|
574
|
-
var A = X(t);
|
|
575
|
-
if (!A) {
|
|
576
|
-
var P = "";
|
|
577
|
-
(t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
578
|
-
var ge = De();
|
|
579
|
-
ge ? P += ge : P += Te();
|
|
580
|
-
var ee;
|
|
581
|
-
t === null ? ee = "null" : _e(t) ? ee = "array" : t !== void 0 && t.$$typeof === u ? (ee = "<" + (F(t.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof t, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ee, P);
|
|
582
|
-
}
|
|
583
|
-
var re = a(t, n, c, D, W);
|
|
584
|
-
if (re == null)
|
|
585
|
-
return re;
|
|
586
|
-
if (A) {
|
|
587
|
-
var je = n.children;
|
|
588
|
-
if (je !== void 0)
|
|
589
|
-
if (h)
|
|
590
|
-
if (_e(je)) {
|
|
591
|
-
for (var Ye = 0; Ye < je.length; Ye++)
|
|
592
|
-
it(je[Ye], t);
|
|
593
|
-
Object.freeze && Object.freeze(je);
|
|
594
|
-
} else
|
|
595
|
-
b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
596
|
-
else
|
|
597
|
-
it(je, t);
|
|
598
|
-
}
|
|
599
|
-
if (d.call(n, "key")) {
|
|
600
|
-
var Be = F(t), pe = Object.keys(n).filter(function(Nt) {
|
|
601
|
-
return Nt !== "key";
|
|
602
|
-
}), tt = pe.length > 0 ? "{key: someKey, " + pe.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
-
if (!ot[Be + tt]) {
|
|
604
|
-
var kt = pe.length > 0 ? "{" + pe.join(": ..., ") + ": ...}" : "{}";
|
|
605
|
-
b(`A props object containing a "key" prop is being spread into JSX:
|
|
606
|
-
let props = %s;
|
|
607
|
-
<%s {...props} />
|
|
608
|
-
React keys must be passed directly to JSX without using spread:
|
|
609
|
-
let props = %s;
|
|
610
|
-
<%s key={someKey} {...props} />`, tt, Be, kt, Be), ot[Be + tt] = !0;
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
return t === m ? yt(re) : ht(re), re;
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
function bt(t, n, c) {
|
|
617
|
-
return ct(t, n, c, !0);
|
|
618
|
-
}
|
|
619
|
-
function vt(t, n, c) {
|
|
620
|
-
return ct(t, n, c, !1);
|
|
621
|
-
}
|
|
622
|
-
var jt = vt, wt = bt;
|
|
623
|
-
Xe.Fragment = m, Xe.jsx = jt, Xe.jsxs = wt;
|
|
624
|
-
}()), Xe;
|
|
625
|
-
}
|
|
626
|
-
process.env.NODE_ENV === "production" ? nt.exports = $t() : nt.exports = Et();
|
|
627
|
-
var e = nt.exports;
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as Oe, createElement as Ie, useState as f, useRef as y, useEffect as C } from "react";
|
|
628
3
|
/**
|
|
629
4
|
* @license lucide-react v0.540.0 - ISC
|
|
630
5
|
*
|
|
631
6
|
* This source code is licensed under the ISC license.
|
|
632
7
|
* See the LICENSE file in the root directory of this source tree.
|
|
633
8
|
*/
|
|
634
|
-
const
|
|
9
|
+
const We = (i) => i.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Qe = (i) => i.replace(
|
|
635
10
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
636
|
-
(
|
|
637
|
-
),
|
|
638
|
-
const
|
|
639
|
-
return
|
|
640
|
-
},
|
|
641
|
-
for (const
|
|
642
|
-
if (
|
|
11
|
+
(c, g, p) => p ? p.toUpperCase() : g.toLowerCase()
|
|
12
|
+
), _e = (i) => {
|
|
13
|
+
const c = Qe(i);
|
|
14
|
+
return c.charAt(0).toUpperCase() + c.slice(1);
|
|
15
|
+
}, Ve = (...i) => i.filter((c, g, p) => !!c && c.trim() !== "" && p.indexOf(c) === g).join(" ").trim(), Ge = (i) => {
|
|
16
|
+
for (const c in i)
|
|
17
|
+
if (c.startsWith("aria-") || c === "role" || c === "title")
|
|
643
18
|
return !0;
|
|
644
19
|
};
|
|
645
20
|
/**
|
|
@@ -648,7 +23,7 @@ const Ct = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Rt = (
|
|
|
648
23
|
* This source code is licensed under the ISC license.
|
|
649
24
|
* See the LICENSE file in the root directory of this source tree.
|
|
650
25
|
*/
|
|
651
|
-
var
|
|
26
|
+
var Ke = {
|
|
652
27
|
xmlns: "http://www.w3.org/2000/svg",
|
|
653
28
|
width: 24,
|
|
654
29
|
height: 24,
|
|
@@ -665,32 +40,32 @@ var Pt = {
|
|
|
665
40
|
* This source code is licensed under the ISC license.
|
|
666
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
667
42
|
*/
|
|
668
|
-
const
|
|
43
|
+
const Xe = Oe(
|
|
669
44
|
({
|
|
670
|
-
color:
|
|
671
|
-
size:
|
|
45
|
+
color: i = "currentColor",
|
|
46
|
+
size: c = 24,
|
|
672
47
|
strokeWidth: g = 2,
|
|
673
|
-
absoluteStrokeWidth:
|
|
674
|
-
className:
|
|
675
|
-
children:
|
|
676
|
-
iconNode:
|
|
677
|
-
...
|
|
678
|
-
},
|
|
48
|
+
absoluteStrokeWidth: p,
|
|
49
|
+
className: q = "",
|
|
50
|
+
children: m,
|
|
51
|
+
iconNode: x,
|
|
52
|
+
...v
|
|
53
|
+
}, P) => Ie(
|
|
679
54
|
"svg",
|
|
680
55
|
{
|
|
681
|
-
ref:
|
|
682
|
-
...
|
|
683
|
-
width:
|
|
684
|
-
height:
|
|
685
|
-
stroke:
|
|
686
|
-
strokeWidth:
|
|
687
|
-
className:
|
|
688
|
-
...!
|
|
689
|
-
...
|
|
56
|
+
ref: P,
|
|
57
|
+
...Ke,
|
|
58
|
+
width: c,
|
|
59
|
+
height: c,
|
|
60
|
+
stroke: i,
|
|
61
|
+
strokeWidth: p ? Number(g) * 24 / Number(c) : g,
|
|
62
|
+
className: Ve("lucide", q),
|
|
63
|
+
...!m && !Ge(v) && { "aria-hidden": "true" },
|
|
64
|
+
...v
|
|
690
65
|
},
|
|
691
66
|
[
|
|
692
|
-
...
|
|
693
|
-
...Array.isArray(
|
|
67
|
+
...x.map(([T, U]) => Ie(T, U)),
|
|
68
|
+
...Array.isArray(m) ? m : [m]
|
|
694
69
|
]
|
|
695
70
|
)
|
|
696
71
|
);
|
|
@@ -700,20 +75,20 @@ const qt = gt(
|
|
|
700
75
|
* This source code is licensed under the ISC license.
|
|
701
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
702
77
|
*/
|
|
703
|
-
const
|
|
704
|
-
const g =
|
|
705
|
-
({ className:
|
|
706
|
-
ref:
|
|
707
|
-
iconNode:
|
|
708
|
-
className:
|
|
709
|
-
`lucide-${
|
|
710
|
-
`lucide-${
|
|
711
|
-
|
|
78
|
+
const ce = (i, c) => {
|
|
79
|
+
const g = Oe(
|
|
80
|
+
({ className: p, ...q }, m) => Ie(Xe, {
|
|
81
|
+
ref: m,
|
|
82
|
+
iconNode: c,
|
|
83
|
+
className: Ve(
|
|
84
|
+
`lucide-${We(_e(i))}`,
|
|
85
|
+
`lucide-${i}`,
|
|
86
|
+
p
|
|
712
87
|
),
|
|
713
|
-
...
|
|
88
|
+
...q
|
|
714
89
|
})
|
|
715
90
|
);
|
|
716
|
-
return g.displayName =
|
|
91
|
+
return g.displayName = _e(i), g;
|
|
717
92
|
};
|
|
718
93
|
/**
|
|
719
94
|
* @license lucide-react v0.540.0 - ISC
|
|
@@ -721,41 +96,41 @@ const Pe = (o, u) => {
|
|
|
721
96
|
* This source code is licensed under the ISC license.
|
|
722
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
723
98
|
*/
|
|
724
|
-
const
|
|
99
|
+
const Ze = [
|
|
725
100
|
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
|
|
726
101
|
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
|
|
727
102
|
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
|
|
728
103
|
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
|
|
729
|
-
],
|
|
104
|
+
], Ye = ce("maximize", Ze);
|
|
730
105
|
/**
|
|
731
106
|
* @license lucide-react v0.540.0 - ISC
|
|
732
107
|
*
|
|
733
108
|
* This source code is licensed under the ISC license.
|
|
734
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
735
110
|
*/
|
|
736
|
-
const
|
|
111
|
+
const Je = [
|
|
737
112
|
["path", { d: "M8 3v3a2 2 0 0 1-2 2H3", key: "hohbtr" }],
|
|
738
113
|
["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3", key: "5jw1f3" }],
|
|
739
114
|
["path", { d: "M3 16h3a2 2 0 0 1 2 2v3", key: "198tvr" }],
|
|
740
115
|
["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3", key: "ph8mxp" }]
|
|
741
|
-
],
|
|
116
|
+
], et = ce("minimize", Je);
|
|
742
117
|
/**
|
|
743
118
|
* @license lucide-react v0.540.0 - ISC
|
|
744
119
|
*
|
|
745
120
|
* This source code is licensed under the ISC license.
|
|
746
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
747
122
|
*/
|
|
748
|
-
const
|
|
123
|
+
const tt = [
|
|
749
124
|
["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1", key: "kaeet6" }],
|
|
750
125
|
["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1", key: "1wsw3u" }]
|
|
751
|
-
],
|
|
126
|
+
], Re = ce("pause", tt);
|
|
752
127
|
/**
|
|
753
128
|
* @license lucide-react v0.540.0 - ISC
|
|
754
129
|
*
|
|
755
130
|
* This source code is licensed under the ISC license.
|
|
756
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
757
132
|
*/
|
|
758
|
-
const
|
|
133
|
+
const rt = [
|
|
759
134
|
[
|
|
760
135
|
"path",
|
|
761
136
|
{
|
|
@@ -763,26 +138,26 @@ const Mt = [
|
|
|
763
138
|
key: "10ikf1"
|
|
764
139
|
}
|
|
765
140
|
]
|
|
766
|
-
],
|
|
141
|
+
], Fe = ce("play", rt);
|
|
767
142
|
/**
|
|
768
143
|
* @license lucide-react v0.540.0 - ISC
|
|
769
144
|
*
|
|
770
145
|
* This source code is licensed under the ISC license.
|
|
771
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
772
147
|
*/
|
|
773
|
-
const
|
|
148
|
+
const nt = [
|
|
774
149
|
["path", { d: "m17 2 4 4-4 4", key: "nntrym" }],
|
|
775
150
|
["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14", key: "84bu3i" }],
|
|
776
151
|
["path", { d: "m7 22-4-4 4-4", key: "1wqhfi" }],
|
|
777
152
|
["path", { d: "M21 13v1a4 4 0 0 1-4 4H3", key: "1rx37r" }]
|
|
778
|
-
],
|
|
153
|
+
], at = ce("repeat", nt);
|
|
779
154
|
/**
|
|
780
155
|
* @license lucide-react v0.540.0 - ISC
|
|
781
156
|
*
|
|
782
157
|
* This source code is licensed under the ISC license.
|
|
783
158
|
* See the LICENSE file in the root directory of this source tree.
|
|
784
159
|
*/
|
|
785
|
-
const
|
|
160
|
+
const st = [
|
|
786
161
|
["line", { x1: "4", x2: "4", y1: "21", y2: "14", key: "1p332r" }],
|
|
787
162
|
["line", { x1: "4", x2: "4", y1: "10", y2: "3", key: "gb41h5" }],
|
|
788
163
|
["line", { x1: "12", x2: "12", y1: "21", y2: "12", key: "hf2csr" }],
|
|
@@ -792,34 +167,34 @@ const It = [
|
|
|
792
167
|
["line", { x1: "2", x2: "6", y1: "14", y2: "14", key: "1uebub" }],
|
|
793
168
|
["line", { x1: "10", x2: "14", y1: "8", y2: "8", key: "1yglbp" }],
|
|
794
169
|
["line", { x1: "18", x2: "22", y1: "16", y2: "16", key: "1jxqpz" }]
|
|
795
|
-
],
|
|
170
|
+
], Ae = ce("sliders-vertical", st);
|
|
796
171
|
/**
|
|
797
172
|
* @license lucide-react v0.540.0 - ISC
|
|
798
173
|
*
|
|
799
174
|
* This source code is licensed under the ISC license.
|
|
800
175
|
* See the LICENSE file in the root directory of this source tree.
|
|
801
176
|
*/
|
|
802
|
-
const
|
|
177
|
+
const lt = [
|
|
803
178
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
804
|
-
],
|
|
179
|
+
], Ue = ce("square", lt);
|
|
805
180
|
/**
|
|
806
181
|
* @license lucide-react v0.540.0 - ISC
|
|
807
182
|
*
|
|
808
183
|
* This source code is licensed under the ISC license.
|
|
809
184
|
* See the LICENSE file in the root directory of this source tree.
|
|
810
185
|
*/
|
|
811
|
-
const
|
|
186
|
+
const it = [
|
|
812
187
|
["path", { d: "M12 3v12", key: "1x0j5s" }],
|
|
813
188
|
["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
|
|
814
189
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
|
|
815
|
-
],
|
|
190
|
+
], ct = ce("upload", it);
|
|
816
191
|
/**
|
|
817
192
|
* @license lucide-react v0.540.0 - ISC
|
|
818
193
|
*
|
|
819
194
|
* This source code is licensed under the ISC license.
|
|
820
195
|
* See the LICENSE file in the root directory of this source tree.
|
|
821
196
|
*/
|
|
822
|
-
const
|
|
197
|
+
const ot = [
|
|
823
198
|
[
|
|
824
199
|
"path",
|
|
825
200
|
{
|
|
@@ -829,14 +204,14 @@ const Wt = [
|
|
|
829
204
|
],
|
|
830
205
|
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
|
|
831
206
|
["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
|
|
832
|
-
],
|
|
207
|
+
], He = ce("volume-2", ot);
|
|
833
208
|
/**
|
|
834
209
|
* @license lucide-react v0.540.0 - ISC
|
|
835
210
|
*
|
|
836
211
|
* This source code is licensed under the ISC license.
|
|
837
212
|
* See the LICENSE file in the root directory of this source tree.
|
|
838
213
|
*/
|
|
839
|
-
const
|
|
214
|
+
const dt = [
|
|
840
215
|
[
|
|
841
216
|
"path",
|
|
842
217
|
{
|
|
@@ -846,7 +221,7 @@ const Vt = [
|
|
|
846
221
|
],
|
|
847
222
|
["line", { x1: "22", x2: "16", y1: "9", y2: "15", key: "1ewh16" }],
|
|
848
223
|
["line", { x1: "16", x2: "22", y1: "9", y2: "15", key: "5ykzw1" }]
|
|
849
|
-
],
|
|
224
|
+
], De = ce("volume-x", dt), be = {
|
|
850
225
|
rainbow: {
|
|
851
226
|
name: "Rainbow",
|
|
852
227
|
bg: "linear-gradient(135deg, #ef444422 0%, #f9731622 15%, #f59e0b22 30%, #10b98122 45%, #06b6d422 60%, #3b82f622 75%, #6366f122 85%, #a855f722 92%, #ec489922 100%)",
|
|
@@ -946,16 +321,16 @@ const Vt = [
|
|
|
946
321
|
slider: "#ec4899"
|
|
947
322
|
}
|
|
948
323
|
};
|
|
949
|
-
function
|
|
950
|
-
const
|
|
951
|
-
key:
|
|
952
|
-
name:
|
|
953
|
-
colors:
|
|
324
|
+
function ut({ theme: i, setTheme: c, close: g }) {
|
|
325
|
+
const p = Object.keys(be).map((q) => ({
|
|
326
|
+
key: q,
|
|
327
|
+
name: be[q].name,
|
|
328
|
+
colors: be[q].bars
|
|
954
329
|
}));
|
|
955
|
-
return /* @__PURE__ */
|
|
956
|
-
/* @__PURE__ */
|
|
957
|
-
/* @__PURE__ */ e
|
|
958
|
-
/* @__PURE__ */ e
|
|
330
|
+
return /* @__PURE__ */ r("div", { className: "container-glass rounded-xl p-6 mb-6", children: [
|
|
331
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between items-center mb-4", children: [
|
|
332
|
+
/* @__PURE__ */ e("h2", { className: "text-lg font-semibold text-gray-800", children: "Choose Color Palette" }),
|
|
333
|
+
/* @__PURE__ */ e(
|
|
959
334
|
"button",
|
|
960
335
|
{
|
|
961
336
|
onClick: () => g(),
|
|
@@ -964,28 +339,28 @@ function Ut({ theme: o, setTheme: u, close: g }) {
|
|
|
964
339
|
}
|
|
965
340
|
)
|
|
966
341
|
] }),
|
|
967
|
-
/* @__PURE__ */ e
|
|
342
|
+
/* @__PURE__ */ e("div", { className: "theme-selector grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3", children: p.map((q) => /* @__PURE__ */ r(
|
|
968
343
|
"div",
|
|
969
344
|
{
|
|
970
|
-
className: `theme-card bg-white p-4 rounded-lg cursor-pointer border-2 transition-all ${
|
|
971
|
-
onClick: () =>
|
|
345
|
+
className: `theme-card bg-white p-4 rounded-lg cursor-pointer border-2 transition-all ${i === q.key ? "border-current shadow-lg" : "border-transparent"}`,
|
|
346
|
+
onClick: () => c(q.key),
|
|
972
347
|
children: [
|
|
973
|
-
/* @__PURE__ */ e
|
|
974
|
-
/* @__PURE__ */ e
|
|
348
|
+
/* @__PURE__ */ e("div", { className: "color-preview h-10 rounded mb-2", style: { background: `linear-gradient(to right, ${q.colors.join(", ")})` } }),
|
|
349
|
+
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-gray-700", children: q.name })
|
|
975
350
|
]
|
|
976
351
|
},
|
|
977
|
-
|
|
352
|
+
q.key
|
|
978
353
|
)) })
|
|
979
354
|
] });
|
|
980
355
|
}
|
|
981
|
-
function
|
|
982
|
-
audio:
|
|
983
|
-
name:
|
|
356
|
+
function gt({
|
|
357
|
+
audio: i,
|
|
358
|
+
name: c = "No track loaded",
|
|
984
359
|
author: g,
|
|
985
|
-
theme:
|
|
986
|
-
volume:
|
|
987
|
-
thumbnail:
|
|
988
|
-
controls:
|
|
360
|
+
theme: p = "rainbow",
|
|
361
|
+
volume: q = 100,
|
|
362
|
+
thumbnail: m = null,
|
|
363
|
+
controls: x = {
|
|
989
364
|
play: !0,
|
|
990
365
|
pause: !0,
|
|
991
366
|
stop: !0,
|
|
@@ -996,45 +371,45 @@ function Yt({
|
|
|
996
371
|
equalizer: !0,
|
|
997
372
|
speed: !0
|
|
998
373
|
},
|
|
999
|
-
mode:
|
|
1000
|
-
bands:
|
|
1001
|
-
transparent:
|
|
1002
|
-
autoPlay:
|
|
1003
|
-
equalizer:
|
|
374
|
+
mode: v = "light",
|
|
375
|
+
bands: P = null,
|
|
376
|
+
transparent: T = !1,
|
|
377
|
+
autoPlay: U = !1,
|
|
378
|
+
equalizer: I = {
|
|
1004
379
|
bass: 0,
|
|
1005
380
|
mid: 0,
|
|
1006
381
|
treble: 0
|
|
1007
382
|
}
|
|
1008
383
|
}) {
|
|
1009
|
-
const [
|
|
1010
|
-
bass:
|
|
1011
|
-
mid:
|
|
1012
|
-
treble:
|
|
1013
|
-
}), [
|
|
1014
|
-
|
|
1015
|
-
const
|
|
1016
|
-
if (!
|
|
1017
|
-
const
|
|
1018
|
-
for (let
|
|
1019
|
-
|
|
384
|
+
const [M, _] = f(!1), [H, z] = f(0), [S, N] = f(0), [E, oe] = f(q || 100), [ae, fe] = f(!1), [Q, G] = f(!1), [se, le] = f(!1), [O, de] = f([]), [R, F] = f(!1), [j, ie] = f({
|
|
385
|
+
bass: I.bass || 0,
|
|
386
|
+
mid: I.mid || 0,
|
|
387
|
+
treble: I.treble || 0
|
|
388
|
+
}), [ue, ee] = f(1), [K, k] = f(0), u = y(null), A = y(null), X = y(null), me = y(null), V = y(null), te = y(null), Z = y(null), $ = y(null), re = y(null), Y = y(null);
|
|
389
|
+
C(() => {
|
|
390
|
+
const t = Y.current;
|
|
391
|
+
if (!t) return;
|
|
392
|
+
const n = new ResizeObserver((s) => {
|
|
393
|
+
for (let l of s)
|
|
394
|
+
k(l.contentRect.width);
|
|
1020
395
|
});
|
|
1021
|
-
return
|
|
1022
|
-
}, []),
|
|
1023
|
-
const
|
|
1024
|
-
if (
|
|
1025
|
-
|
|
1026
|
-
else if (typeof
|
|
1027
|
-
const
|
|
1028
|
-
for (const
|
|
1029
|
-
|
|
396
|
+
return n.observe(t), () => n.disconnect();
|
|
397
|
+
}, []), C(() => {
|
|
398
|
+
const t = [];
|
|
399
|
+
if (i && typeof i != "string" && t.push(["TypeError", "audio must be a string (URL or path)"]), c && typeof c != "string" && t.push(["TypeError", "name must be a string"]), p && typeof p != "string" && typeof p != "object")
|
|
400
|
+
t.push(["TypeError", "theme must be a string or a valid theme object"]);
|
|
401
|
+
else if (typeof p == "object") {
|
|
402
|
+
const n = ["name", "bg", "bars", "peak", "button", "buttonHover", "slider"];
|
|
403
|
+
for (const s of n)
|
|
404
|
+
s in p || t.push(["ThemeError", `theme object missing key: ${s}`]);
|
|
1030
405
|
}
|
|
1031
|
-
(typeof
|
|
1032
|
-
|
|
1033
|
-
}),
|
|
1034
|
-
typeof
|
|
1035
|
-
}) :
|
|
1036
|
-
}, [
|
|
1037
|
-
const
|
|
406
|
+
(typeof q != "number" || q < 0 || q > 100) && t.push(["TypeError", "volume must be a number between 0 and 100"]), typeof x != "object" || Array.isArray(x) ? t.push(["TypeError", "controls must be an object"]) : ["play", "pause", "stop", "seekbar", "volume", "loop", "trackName", "equalizer"].forEach((s) => {
|
|
407
|
+
x && s in x && typeof x[s] != "boolean" && t.push(["TypeError", `controls.${s} must be a boolean`]);
|
|
408
|
+
}), P && (Array.isArray(P) ? P.length === 0 ? t.push(["ValueError", "bands array cannot be empty"]) : P.forEach((n, s) => {
|
|
409
|
+
typeof n.freq != "number" && t.push(["TypeError", `bands[${s}].freq must be a number`]);
|
|
410
|
+
}) : t.push(["TypeError", "bands must be an array"])), t.length > 0 ? (de(t), console.group("%cVisualizePlayer: Prop validation failed", "color:red"), t.forEach((n) => console.error(`${n[0]}: ${n[1]}`)), console.groupEnd()) : de([]);
|
|
411
|
+
}, [i, c, p, q, x, v, P]);
|
|
412
|
+
const a = P || [
|
|
1038
413
|
{ freq: 0 },
|
|
1039
414
|
{ freq: 10 },
|
|
1040
415
|
{ freq: 20 },
|
|
@@ -1066,435 +441,435 @@ function Yt({
|
|
|
1066
441
|
{ freq: 8e3 },
|
|
1067
442
|
{ freq: 1e4 },
|
|
1068
443
|
{ freq: 12500 }
|
|
1069
|
-
],
|
|
1070
|
-
let
|
|
1071
|
-
const
|
|
1072
|
-
|
|
1073
|
-
typeof
|
|
1074
|
-
}, [
|
|
1075
|
-
|
|
1076
|
-
const
|
|
1077
|
-
|
|
444
|
+
], d = y(a.map(() => 0)), b = y(a.map(() => 0)), B = y(a.map(() => 0)), D = y(!1), J = y(typeof p == "string" ? p : "purple");
|
|
445
|
+
let o = typeof p == "string" ? be[p] || be.purple : typeof p == "object" ? p : be.purple;
|
|
446
|
+
const h = v === "dark", ge = typeof x == "object" && Object.keys(x).length === 0;
|
|
447
|
+
C(() => {
|
|
448
|
+
typeof p == "string" ? J.current = p : J.current = "purple", pe();
|
|
449
|
+
}, [p]), C(() => {
|
|
450
|
+
u.current || (u.current = new Audio());
|
|
451
|
+
const t = u.current, n = () => {
|
|
452
|
+
se || z(t.currentTime);
|
|
453
|
+
}, s = () => {
|
|
454
|
+
N(t.duration);
|
|
1078
455
|
}, l = () => {
|
|
1079
|
-
|
|
1080
|
-
},
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
return r.addEventListener("timeupdate", a), r.addEventListener("loadedmetadata", l), r.addEventListener("ended", i), r.addEventListener("play", w), r.addEventListener("pause", I), () => {
|
|
1084
|
-
r.removeEventListener("timeupdate", a), r.removeEventListener("loadedmetadata", l), r.removeEventListener("ended", i), r.removeEventListener("play", w), r.removeEventListener("pause", I);
|
|
456
|
+
Q || (_(!1), $.current && cancelAnimationFrame($.current));
|
|
457
|
+
}, w = () => _(!0), L = () => _(!1);
|
|
458
|
+
return t.addEventListener("timeupdate", n), t.addEventListener("loadedmetadata", s), t.addEventListener("ended", l), t.addEventListener("play", w), t.addEventListener("pause", L), () => {
|
|
459
|
+
t.removeEventListener("timeupdate", n), t.removeEventListener("loadedmetadata", s), t.removeEventListener("ended", l), t.removeEventListener("play", w), t.removeEventListener("pause", L);
|
|
1085
460
|
};
|
|
1086
|
-
}, [
|
|
1087
|
-
|
|
1088
|
-
}, []),
|
|
1089
|
-
if (
|
|
1090
|
-
const
|
|
1091
|
-
if (
|
|
461
|
+
}, [se, Q]), C(() => () => {
|
|
462
|
+
u.current && (u.current.pause(), u.current.src = "", u.current.load()), A.current && A.current.close().catch((t) => console.warn("AudioContext cleanup error:", t)), $.current && cancelAnimationFrame($.current);
|
|
463
|
+
}, []), C(() => {
|
|
464
|
+
if (i) {
|
|
465
|
+
const t = M, n = E, s = Q;
|
|
466
|
+
if ($.current && (cancelAnimationFrame($.current), $.current = null), me.current) {
|
|
1092
467
|
try {
|
|
1093
|
-
|
|
1094
|
-
} catch (
|
|
1095
|
-
console.warn("Source disconnect error:",
|
|
468
|
+
me.current.disconnect();
|
|
469
|
+
} catch (W) {
|
|
470
|
+
console.warn("Source disconnect error:", W);
|
|
1096
471
|
}
|
|
1097
|
-
|
|
472
|
+
me.current = null;
|
|
1098
473
|
}
|
|
1099
|
-
if (
|
|
474
|
+
if (X.current) {
|
|
1100
475
|
try {
|
|
1101
|
-
|
|
1102
|
-
} catch (
|
|
1103
|
-
console.warn("Analyser disconnect error:",
|
|
476
|
+
X.current.disconnect();
|
|
477
|
+
} catch (W) {
|
|
478
|
+
console.warn("Analyser disconnect error:", W);
|
|
1104
479
|
}
|
|
1105
|
-
|
|
480
|
+
X.current = null;
|
|
1106
481
|
}
|
|
1107
|
-
if (
|
|
482
|
+
if (V.current) {
|
|
1108
483
|
try {
|
|
1109
|
-
|
|
1110
|
-
} catch (
|
|
1111
|
-
console.warn("Bass filter disconnect error:",
|
|
484
|
+
V.current.disconnect();
|
|
485
|
+
} catch (W) {
|
|
486
|
+
console.warn("Bass filter disconnect error:", W);
|
|
1112
487
|
}
|
|
1113
|
-
|
|
488
|
+
V.current = null;
|
|
1114
489
|
}
|
|
1115
|
-
if (
|
|
490
|
+
if (te.current) {
|
|
1116
491
|
try {
|
|
1117
|
-
|
|
1118
|
-
} catch (
|
|
1119
|
-
console.warn("Mid filter disconnect error:",
|
|
492
|
+
te.current.disconnect();
|
|
493
|
+
} catch (W) {
|
|
494
|
+
console.warn("Mid filter disconnect error:", W);
|
|
1120
495
|
}
|
|
1121
|
-
|
|
496
|
+
te.current = null;
|
|
1122
497
|
}
|
|
1123
|
-
if (
|
|
498
|
+
if (Z.current) {
|
|
1124
499
|
try {
|
|
1125
|
-
|
|
1126
|
-
} catch (
|
|
1127
|
-
console.warn("Treble filter disconnect error:",
|
|
500
|
+
Z.current.disconnect();
|
|
501
|
+
} catch (W) {
|
|
502
|
+
console.warn("Treble filter disconnect error:", W);
|
|
1128
503
|
}
|
|
1129
|
-
|
|
504
|
+
Z.current = null;
|
|
1130
505
|
}
|
|
1131
|
-
|
|
506
|
+
A.current && (A.current.close().catch((W) => console.warn("AudioContext close error:", W)), A.current = null), u.current && (u.current.pause(), u.current.src = "", u.current.load()), u.current = new Audio();
|
|
1132
507
|
try {
|
|
1133
|
-
|
|
1134
|
-
} catch (
|
|
1135
|
-
console.debug("Could not set crossOrigin on audio element",
|
|
508
|
+
u.current.crossOrigin = "anonymous";
|
|
509
|
+
} catch (W) {
|
|
510
|
+
console.debug("Could not set crossOrigin on audio element", W);
|
|
1136
511
|
}
|
|
1137
|
-
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1140
|
-
},
|
|
1141
|
-
|
|
1142
|
-
},
|
|
1143
|
-
|
|
1144
|
-
},
|
|
1145
|
-
|
|
512
|
+
u.current.src = i, u.current.preload = "auto", u.current.muted = !1, u.current.volume = ae ? 0 : n / 100, u.current.loop = s, u.current.load();
|
|
513
|
+
const l = u.current, w = () => {
|
|
514
|
+
se || z(l.currentTime);
|
|
515
|
+
}, L = () => {
|
|
516
|
+
N(l.duration);
|
|
517
|
+
}, ne = () => {
|
|
518
|
+
Q || (_(!1), $.current && cancelAnimationFrame($.current));
|
|
519
|
+
}, xe = () => _(!0), Ce = () => _(!1);
|
|
520
|
+
l.addEventListener("timeupdate", w), l.addEventListener("loadedmetadata", L), l.addEventListener("ended", ne), l.addEventListener("play", xe), l.addEventListener("pause", Ce), z(0), _(!1), console.debug("Audio element created", { src: u.current.src, volume: u.current.volume, loop: u.current.loop }), d.current = a.map(() => 0), b.current = a.map(() => 0), B.current = a.map(() => 0), pe(), t && u.current.play().catch((W) => console.error("Play failed:", W));
|
|
1146
521
|
}
|
|
1147
|
-
}, [
|
|
1148
|
-
|
|
1149
|
-
}, [
|
|
1150
|
-
|
|
1151
|
-
}, [
|
|
1152
|
-
|
|
1153
|
-
}, [
|
|
1154
|
-
|
|
1155
|
-
}, [
|
|
1156
|
-
|
|
1157
|
-
}, [
|
|
522
|
+
}, [i]), C(() => {
|
|
523
|
+
u.current && (u.current.volume = ae ? 0 : E / 100);
|
|
524
|
+
}, [E, ae]), C(() => {
|
|
525
|
+
u.current && (u.current.loop = Q);
|
|
526
|
+
}, [Q]), C(() => {
|
|
527
|
+
u.current && (u.current.playbackRate = ue);
|
|
528
|
+
}, [ue]), C(() => {
|
|
529
|
+
A.current && (V.current && (V.current.gain.value = j.bass), te.current && (te.current.gain.value = j.mid), Z.current && (Z.current.gain.value = j.treble));
|
|
530
|
+
}, [j]), C(() => {
|
|
531
|
+
D.current = M, $.current && (cancelAnimationFrame($.current), $.current = null), M ? (A.current || qe(), ke()) : he();
|
|
532
|
+
}, [M]);
|
|
1158
533
|
const qe = () => {
|
|
1159
|
-
if (!
|
|
534
|
+
if (!A.current && u.current)
|
|
1160
535
|
try {
|
|
1161
|
-
const
|
|
1162
|
-
if (
|
|
1163
|
-
const
|
|
1164
|
-
|
|
1165
|
-
const
|
|
1166
|
-
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
const w =
|
|
1170
|
-
w.type = "highshelf", w.frequency.value = 3200, w.gain.value =
|
|
1171
|
-
const
|
|
1172
|
-
|
|
1173
|
-
const
|
|
1174
|
-
|
|
536
|
+
const t = window.AudioContext || window.webkitAudioContext;
|
|
537
|
+
if (t) {
|
|
538
|
+
const n = new t();
|
|
539
|
+
A.current = n;
|
|
540
|
+
const s = n.createBiquadFilter();
|
|
541
|
+
s.type = "lowshelf", s.frequency.value = 320, s.gain.value = j.bass;
|
|
542
|
+
const l = n.createBiquadFilter();
|
|
543
|
+
l.type = "peaking", l.frequency.value = 1e3, l.Q.value = 0.5, l.gain.value = j.mid;
|
|
544
|
+
const w = n.createBiquadFilter();
|
|
545
|
+
w.type = "highshelf", w.frequency.value = 3200, w.gain.value = j.treble;
|
|
546
|
+
const L = n.createAnalyser();
|
|
547
|
+
L.fftSize = 8192, L.smoothingTimeConstant = 0.7;
|
|
548
|
+
const ne = n.createMediaElementSource(u.current);
|
|
549
|
+
ne.connect(s), s.connect(l), l.connect(w), w.connect(L), L.connect(n.destination), V.current = s, te.current = l, Z.current = w, X.current = L, me.current = ne;
|
|
1175
550
|
}
|
|
1176
|
-
} catch (
|
|
1177
|
-
console.error("Failed to setup audio context:",
|
|
551
|
+
} catch (t) {
|
|
552
|
+
console.error("Failed to setup audio context:", t);
|
|
1178
553
|
}
|
|
1179
|
-
},
|
|
1180
|
-
const
|
|
1181
|
-
if (!
|
|
1182
|
-
const
|
|
1183
|
-
return Math.min(w,
|
|
1184
|
-
},
|
|
1185
|
-
if (
|
|
1186
|
-
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
const
|
|
1190
|
-
|
|
1191
|
-
},
|
|
1192
|
-
if (!
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1195
|
-
const w =
|
|
1196
|
-
let
|
|
1197
|
-
for (let
|
|
1198
|
-
|
|
1199
|
-
let
|
|
1200
|
-
|
|
1201
|
-
const
|
|
1202
|
-
|
|
1203
|
-
}),
|
|
1204
|
-
},
|
|
1205
|
-
if (!
|
|
1206
|
-
const
|
|
1207
|
-
let
|
|
1208
|
-
|
|
1209
|
-
const w =
|
|
1210
|
-
|
|
554
|
+
}, we = (t) => {
|
|
555
|
+
const n = A.current, s = X.current;
|
|
556
|
+
if (!n || !s) return 0;
|
|
557
|
+
const l = n.sampleRate / 2, w = Math.round(t / l * s.frequencyBinCount);
|
|
558
|
+
return Math.min(w, s.frequencyBinCount - 1);
|
|
559
|
+
}, he = () => {
|
|
560
|
+
if (D.current) return;
|
|
561
|
+
d.current = d.current.map((l) => l * 0.7);
|
|
562
|
+
const t = Date.now();
|
|
563
|
+
b.current = b.current.map((l, w) => t - B.current[w] > 1500 ? l * 0.95 : l), pe();
|
|
564
|
+
const n = Math.max(...d.current), s = Math.max(...b.current);
|
|
565
|
+
n > 0.01 || s > 0.01 ? $.current = requestAnimationFrame(he) : (D.current || (d.current = a.map(() => 0), b.current = a.map(() => 0), B.current = a.map(() => 0), pe()), $.current && cancelAnimationFrame($.current), $.current = null);
|
|
566
|
+
}, ke = () => {
|
|
567
|
+
if (!X.current || !D.current) return;
|
|
568
|
+
const t = X.current.frequencyBinCount, n = new Uint8Array(t);
|
|
569
|
+
X.current.getByteFrequencyData(n), a.forEach((s, l) => {
|
|
570
|
+
const w = we(s.freq), L = l < a.length - 1 ? we(a[l + 1].freq) : n.length;
|
|
571
|
+
let ne = 0, xe = 0;
|
|
572
|
+
for (let Be = w; Be < L; Be++)
|
|
573
|
+
ne += n[Be], xe++;
|
|
574
|
+
let Ce = xe > 0 ? ne / xe / 255 : 0;
|
|
575
|
+
Ce = Math.pow(Ce, 0.6), d.current[l] = d.current[l] * 0.8 + Ce * 0.2;
|
|
576
|
+
const W = Date.now();
|
|
577
|
+
d.current[l] > b.current[l] ? (b.current[l] = d.current[l], B.current[l] = W) : W - B.current[l] > 1500 && (b.current[l] *= 0.95);
|
|
578
|
+
}), pe(), $.current = requestAnimationFrame(ke);
|
|
579
|
+
}, pe = () => {
|
|
580
|
+
if (!re.current) return;
|
|
581
|
+
const t = be[J.current] || be.rainbow;
|
|
582
|
+
let n = "";
|
|
583
|
+
a.forEach((s, l) => {
|
|
584
|
+
const w = d.current[l] * 100, L = 100 - b.current[l] * 100, ne = Math.floor(l / a.length * t.bars.length), xe = t.bars[Math.min(ne, t.bars.length - 1)];
|
|
585
|
+
n += `
|
|
1211
586
|
<div class="flex-1 h-full relative flex flex-col justify-end">
|
|
1212
|
-
<div class="rounded-t transition-all duration-75" style="height: ${w}%; background: ${
|
|
1213
|
-
${
|
|
587
|
+
<div class="rounded-t transition-all duration-75" style="height: ${w}%; background: ${xe};">
|
|
588
|
+
${b.current[l] > 0.1 ? `<div class="absolute w-full h-0.5 transition-all duration-100" style="top: ${L}%; background: ${t.peak};"></div>` : ""}
|
|
1214
589
|
</div>
|
|
1215
590
|
</div>
|
|
1216
591
|
`;
|
|
1217
|
-
}),
|
|
1218
|
-
},
|
|
1219
|
-
!
|
|
1220
|
-
},
|
|
1221
|
-
|
|
1222
|
-
},
|
|
1223
|
-
const
|
|
1224
|
-
|
|
1225
|
-
},
|
|
1226
|
-
|
|
1227
|
-
},
|
|
1228
|
-
|
|
1229
|
-
},
|
|
1230
|
-
const
|
|
1231
|
-
|
|
1232
|
-
},
|
|
1233
|
-
|
|
1234
|
-
},
|
|
1235
|
-
|
|
1236
|
-
},
|
|
1237
|
-
|
|
1238
|
-
},
|
|
1239
|
-
|
|
1240
|
-
...
|
|
1241
|
-
[
|
|
592
|
+
}), re.current.innerHTML = n;
|
|
593
|
+
}, Ee = () => {
|
|
594
|
+
!u.current || !i || (M ? u.current.pause() : (A.current && A.current.state === "suspended" && A.current.resume(), u.current.play().catch((t) => console.error("Play failed:", t))));
|
|
595
|
+
}, Te = () => {
|
|
596
|
+
u.current && (u.current.pause(), u.current.currentTime = 0, _(!1), z(0), d.current = a.map(() => 0), b.current = a.map(() => 0), B.current = a.map(() => 0), pe());
|
|
597
|
+
}, Le = (t) => {
|
|
598
|
+
const s = parseFloat(t.target.value) / 100 * S;
|
|
599
|
+
z(s), u.current && !se && (u.current.currentTime = s);
|
|
600
|
+
}, Pe = () => {
|
|
601
|
+
le(!0);
|
|
602
|
+
}, Me = () => {
|
|
603
|
+
u.current && (u.current.currentTime = H), le(!1);
|
|
604
|
+
}, je = (t) => {
|
|
605
|
+
const n = parseInt(t.target.value);
|
|
606
|
+
oe(n), fe(n === 0);
|
|
607
|
+
}, ze = () => {
|
|
608
|
+
fe(!ae);
|
|
609
|
+
}, Ne = (t) => {
|
|
610
|
+
ee(parseFloat(t.target.value));
|
|
611
|
+
}, Se = () => {
|
|
612
|
+
G(!Q);
|
|
613
|
+
}, ve = (t, n) => {
|
|
614
|
+
ie((s) => ({
|
|
615
|
+
...s,
|
|
616
|
+
[t]: n
|
|
1242
617
|
}));
|
|
1243
|
-
},
|
|
1244
|
-
|
|
618
|
+
}, ye = () => {
|
|
619
|
+
ie({ bass: 0, mid: 0, treble: 0 });
|
|
1245
620
|
};
|
|
1246
|
-
|
|
1247
|
-
((typeof
|
|
1248
|
-
}, [
|
|
1249
|
-
const
|
|
1250
|
-
if (isNaN(
|
|
1251
|
-
const
|
|
1252
|
-
return `${
|
|
621
|
+
C(() => {
|
|
622
|
+
((typeof x == "object" && Object.keys(x).length === 0 || !x) && !M || U) && Ee();
|
|
623
|
+
}, [x]);
|
|
624
|
+
const $e = (t) => {
|
|
625
|
+
if (isNaN(t)) return "0:00";
|
|
626
|
+
const n = Math.floor(t / 60), s = Math.floor(t % 60);
|
|
627
|
+
return `${n}:${s.toString().padStart(2, "0")}`;
|
|
1253
628
|
};
|
|
1254
|
-
return
|
|
1255
|
-
/* @__PURE__ */
|
|
1256
|
-
|
|
629
|
+
return O && O.length > 0 ? O.map((t, n) => /* @__PURE__ */ r("div", { className: "text-red-500 text-sm bg-red-50 p-3 rounded mb-4 border border-red-300", children: [
|
|
630
|
+
/* @__PURE__ */ r("strong", { children: [
|
|
631
|
+
t[0],
|
|
1257
632
|
":"
|
|
1258
633
|
] }),
|
|
1259
634
|
" ",
|
|
1260
|
-
|
|
1261
|
-
] },
|
|
1262
|
-
/* @__PURE__ */
|
|
1263
|
-
/* @__PURE__ */ e
|
|
1264
|
-
|
|
1265
|
-
/* @__PURE__ */ e
|
|
1266
|
-
/* @__PURE__ */
|
|
1267
|
-
/* @__PURE__ */
|
|
1268
|
-
/* @__PURE__ */
|
|
1269
|
-
/* @__PURE__ */ e
|
|
1270
|
-
/* @__PURE__ */
|
|
1271
|
-
|
|
635
|
+
t[1]
|
|
636
|
+
] }, n)) : /* @__PURE__ */ e("div", { ref: Y, className: "w-full rounded-xl overflow-hidden", style: { backgroundColor: ge || T ? void 0 : h ? "#6060606a" : "#ffffffab" }, children: /* @__PURE__ */ r("div", { style: { background: ge || T ? void 0 : o.bg }, className: ge || T ? "" : "p-4", children: [
|
|
637
|
+
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
638
|
+
/* @__PURE__ */ e("div", { className: `${T && R ? "opacity-30" : ""} ${ge || T ? "" : h ? "bg-black/40" : "bg-white/70"} rounded-lg ${ge ? "" : "mb-6"} ${ge || T ? "" : "p-4"} shadow-sm`, children: /* @__PURE__ */ e("div", { className: "flex justify-center items-end gap-1 h-64", ref: re }) }),
|
|
639
|
+
R && /* @__PURE__ */ r("div", { className: `absolute inset-0 flex flex-col w-full justify-center z-10 ${!(ge || T) && (h ? "bg-black/50" : "bg-white/80")} rounded-lg p-4 shadow-sm transition-all duration-300`, children: [
|
|
640
|
+
/* @__PURE__ */ e("h3", { className: `text-sm font-medium mb-4 ${h ? "text-gray-200" : "text-gray-700"}`, children: "Equalizer" }),
|
|
641
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
642
|
+
/* @__PURE__ */ r("div", { children: [
|
|
643
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
644
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-300" : "text-gray-600"}`, children: "Bass" }),
|
|
645
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${h ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
646
|
+
j.bass,
|
|
1272
647
|
" dB"
|
|
1273
648
|
] })
|
|
1274
649
|
] }),
|
|
1275
|
-
/* @__PURE__ */
|
|
1276
|
-
/* @__PURE__ */ e
|
|
1277
|
-
/* @__PURE__ */ e
|
|
650
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
651
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
652
|
+
/* @__PURE__ */ e(
|
|
1278
653
|
"input",
|
|
1279
654
|
{
|
|
1280
655
|
type: "range",
|
|
1281
656
|
min: "-20",
|
|
1282
657
|
max: "20",
|
|
1283
|
-
value:
|
|
1284
|
-
onChange: (
|
|
658
|
+
value: j.bass,
|
|
659
|
+
onChange: (t) => ve("bass", parseInt(t.target.value)),
|
|
1285
660
|
className: "flex-1 h-8 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1286
661
|
style: {
|
|
1287
|
-
background: `linear-gradient(to right, ${
|
|
662
|
+
background: `linear-gradient(to right, ${o.slider} ${(j.bass + 20) / 40 * 100}%, ${o.slider + "30"} ${(j.bass + 20) / 40 * 100}%)`
|
|
1288
663
|
}
|
|
1289
664
|
}
|
|
1290
665
|
),
|
|
1291
|
-
/* @__PURE__ */ e
|
|
666
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1292
667
|
] })
|
|
1293
668
|
] }),
|
|
1294
|
-
/* @__PURE__ */
|
|
1295
|
-
/* @__PURE__ */
|
|
1296
|
-
/* @__PURE__ */ e
|
|
1297
|
-
/* @__PURE__ */
|
|
1298
|
-
|
|
669
|
+
/* @__PURE__ */ r("div", { children: [
|
|
670
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
671
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-300" : "text-gray-600"}`, children: "Mid" }),
|
|
672
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${h ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
673
|
+
j.mid,
|
|
1299
674
|
" dB"
|
|
1300
675
|
] })
|
|
1301
676
|
] }),
|
|
1302
|
-
/* @__PURE__ */
|
|
1303
|
-
/* @__PURE__ */ e
|
|
1304
|
-
/* @__PURE__ */ e
|
|
677
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
678
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
679
|
+
/* @__PURE__ */ e(
|
|
1305
680
|
"input",
|
|
1306
681
|
{
|
|
1307
682
|
type: "range",
|
|
1308
683
|
min: "-20",
|
|
1309
684
|
max: "20",
|
|
1310
|
-
value:
|
|
1311
|
-
onChange: (
|
|
685
|
+
value: j.mid,
|
|
686
|
+
onChange: (t) => ve("mid", parseInt(t.target.value)),
|
|
1312
687
|
className: "flex-1 h-8 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1313
688
|
style: {
|
|
1314
|
-
background: `linear-gradient(to right, ${
|
|
689
|
+
background: `linear-gradient(to right, ${o.slider} ${(j.mid + 20) / 40 * 100}%, ${o.slider + "30"} ${(j.mid + 20) / 40 * 100}%)`
|
|
1315
690
|
}
|
|
1316
691
|
}
|
|
1317
692
|
),
|
|
1318
|
-
/* @__PURE__ */ e
|
|
693
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1319
694
|
] })
|
|
1320
695
|
] }),
|
|
1321
|
-
/* @__PURE__ */
|
|
1322
|
-
/* @__PURE__ */
|
|
1323
|
-
/* @__PURE__ */ e
|
|
1324
|
-
/* @__PURE__ */
|
|
1325
|
-
|
|
696
|
+
/* @__PURE__ */ r("div", { children: [
|
|
697
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
698
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
|
|
699
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${h ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
700
|
+
j.treble,
|
|
1326
701
|
" dB"
|
|
1327
702
|
] })
|
|
1328
703
|
] }),
|
|
1329
|
-
/* @__PURE__ */
|
|
1330
|
-
/* @__PURE__ */ e
|
|
1331
|
-
/* @__PURE__ */ e
|
|
704
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
705
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
706
|
+
/* @__PURE__ */ e(
|
|
1332
707
|
"input",
|
|
1333
708
|
{
|
|
1334
709
|
type: "range",
|
|
1335
710
|
min: "-20",
|
|
1336
711
|
max: "20",
|
|
1337
|
-
value:
|
|
1338
|
-
onChange: (
|
|
712
|
+
value: j.treble,
|
|
713
|
+
onChange: (t) => ve("treble", parseInt(t.target.value)),
|
|
1339
714
|
className: "flex-1 h-8 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1340
715
|
style: {
|
|
1341
|
-
background: `linear-gradient(to right, ${
|
|
716
|
+
background: `linear-gradient(to right, ${o.slider} ${(j.treble + 20) / 40 * 100}%, ${o.slider + "30"} ${(j.treble + 20) / 40 * 100}%)`
|
|
1342
717
|
}
|
|
1343
718
|
}
|
|
1344
719
|
),
|
|
1345
|
-
/* @__PURE__ */ e
|
|
720
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1346
721
|
] })
|
|
1347
722
|
] })
|
|
1348
723
|
] }),
|
|
1349
|
-
/* @__PURE__ */ e
|
|
724
|
+
/* @__PURE__ */ e("div", { className: "flex justify-end mt-4", children: /* @__PURE__ */ e(
|
|
1350
725
|
"button",
|
|
1351
726
|
{
|
|
1352
|
-
onClick:
|
|
1353
|
-
className: `px-3 py-1 rounded text-xs ${
|
|
727
|
+
onClick: ye,
|
|
728
|
+
className: `px-3 py-1 rounded text-xs ${h ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
1354
729
|
children: "Reset"
|
|
1355
730
|
}
|
|
1356
731
|
) })
|
|
1357
732
|
] })
|
|
1358
733
|
] }),
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
/* @__PURE__ */
|
|
1362
|
-
/* @__PURE__ */ e
|
|
1363
|
-
g && typeof g == "string" && /* @__PURE__ */ e
|
|
734
|
+
x.trackName && /* @__PURE__ */ r("div", { className: "mb-6 flex items-center", children: [
|
|
735
|
+
m && /* @__PURE__ */ e("div", { className: "mr-2 w-12 flex-shrink-0", children: /* @__PURE__ */ e("img", { src: m, alt: "", className: `${M ? "animation-spin" : ""} h-12 w-12 rounded-full` }) }),
|
|
736
|
+
/* @__PURE__ */ r("div", { className: "w-full min-w-0", children: [
|
|
737
|
+
/* @__PURE__ */ e("div", { className: `${h ? "text-gray-100" : "text-gray-700"} font-medium truncate`, children: c }),
|
|
738
|
+
g && typeof g == "string" && /* @__PURE__ */ e("div", { className: `${h ? "text-gray-300" : "text-gray-500"} text-xs`, children: g })
|
|
1364
739
|
] })
|
|
1365
740
|
] }),
|
|
1366
|
-
|
|
1367
|
-
/* @__PURE__ */ e
|
|
1368
|
-
/* @__PURE__ */ e
|
|
741
|
+
x.seekbar && /* @__PURE__ */ e("div", { className: "mb-6", children: /* @__PURE__ */ r("div", { className: "flex items-center md:gap-1", children: [
|
|
742
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-100" : "text-gray-600"} font-mono w-12`, children: $e(H) }),
|
|
743
|
+
/* @__PURE__ */ e(
|
|
1369
744
|
"input",
|
|
1370
745
|
{
|
|
1371
746
|
type: "range",
|
|
1372
747
|
min: "0",
|
|
1373
748
|
max: "100",
|
|
1374
|
-
value:
|
|
1375
|
-
onChange:
|
|
1376
|
-
onMouseDown:
|
|
1377
|
-
onMouseUp:
|
|
1378
|
-
onTouchStart:
|
|
1379
|
-
onTouchEnd:
|
|
1380
|
-
disabled: !
|
|
749
|
+
value: S > 0 ? H / S * 100 : 0,
|
|
750
|
+
onChange: Le,
|
|
751
|
+
onMouseDown: Pe,
|
|
752
|
+
onMouseUp: Me,
|
|
753
|
+
onTouchStart: Pe,
|
|
754
|
+
onTouchEnd: Me,
|
|
755
|
+
disabled: !i,
|
|
1381
756
|
className: "flex-1 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",
|
|
1382
757
|
style: {
|
|
1383
|
-
background:
|
|
758
|
+
background: i && S > 0 ? `linear-gradient(to right, ${o.slider} ${H / S * 100}%, ${o.slider + "30"} ${H / S * 100}%)` : o.slider + "30"
|
|
1384
759
|
}
|
|
1385
760
|
}
|
|
1386
761
|
),
|
|
1387
|
-
/* @__PURE__ */ e
|
|
762
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${h ? "text-gray-100" : "text-gray-600"} font-mono w-12 text-right`, children: $e(S) })
|
|
1388
763
|
] }) }),
|
|
1389
|
-
/* @__PURE__ */
|
|
1390
|
-
|
|
764
|
+
/* @__PURE__ */ r("div", { className: `flex flex-wrap items-center ${K < 330 ? "gap-2" : "gap-3"}`, children: [
|
|
765
|
+
x.play && /* @__PURE__ */ r(
|
|
1391
766
|
"button",
|
|
1392
767
|
{
|
|
1393
|
-
onClick:
|
|
1394
|
-
disabled: !
|
|
1395
|
-
className: `${
|
|
1396
|
-
style: { backgroundColor:
|
|
768
|
+
onClick: Ee,
|
|
769
|
+
disabled: !i,
|
|
770
|
+
className: `${K < 350 ? "px-3 py-5" : "px-4 py-2 md:w-24"} rounded-full text-sm font-medium text-white disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-2 transition-all hover:opacity-90`,
|
|
771
|
+
style: { backgroundColor: o.button },
|
|
1397
772
|
children: [
|
|
1398
|
-
/* @__PURE__ */
|
|
1399
|
-
/* @__PURE__ */ e
|
|
1400
|
-
/* @__PURE__ */ e
|
|
773
|
+
/* @__PURE__ */ r("div", { className: "relative w-4 flex items-center", children: [
|
|
774
|
+
/* @__PURE__ */ e(Re, { size: 16, className: `${M ? "" : "scale-0 translate-y-10"} transition-all absolute` }),
|
|
775
|
+
/* @__PURE__ */ e(Fe, { size: 16, className: `${M ? "scale-0 -translate-y-10" : ""} transition-all absolute` })
|
|
1401
776
|
] }),
|
|
1402
|
-
/* @__PURE__ */ e
|
|
777
|
+
/* @__PURE__ */ e("span", { style: { display: K < 350 ? "none" : "block" }, children: M ? "Pause" : "Play" })
|
|
1403
778
|
]
|
|
1404
779
|
}
|
|
1405
780
|
),
|
|
1406
|
-
|
|
781
|
+
x.stop && /* @__PURE__ */ r(
|
|
1407
782
|
"button",
|
|
1408
783
|
{
|
|
1409
|
-
onClick:
|
|
1410
|
-
disabled: !
|
|
1411
|
-
className: `${
|
|
784
|
+
onClick: Te,
|
|
785
|
+
disabled: !i,
|
|
786
|
+
className: `${h ? "bg-gray-100 text-black" : "bg-gray-700 text-white"} ${K < 600 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium ${h ? "hover:bg-gray-300" : "hover:bg-gray-800"} disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-2 transition-all`,
|
|
1412
787
|
children: [
|
|
1413
|
-
/* @__PURE__ */ e
|
|
1414
|
-
/* @__PURE__ */ e
|
|
788
|
+
/* @__PURE__ */ e(Ue, { size: 16 }),
|
|
789
|
+
/* @__PURE__ */ e("span", { style: { display: K < 600 ? "none" : "block" }, children: "Stop" })
|
|
1415
790
|
]
|
|
1416
791
|
}
|
|
1417
792
|
),
|
|
1418
|
-
|
|
793
|
+
x.equalizer && /* @__PURE__ */ r(
|
|
1419
794
|
"button",
|
|
1420
795
|
{
|
|
1421
|
-
onClick: () => F(!
|
|
1422
|
-
disabled: !
|
|
1423
|
-
className: `${
|
|
1424
|
-
style:
|
|
796
|
+
onClick: () => F(!R),
|
|
797
|
+
disabled: !i,
|
|
798
|
+
className: `${K < 600 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${R ? "text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-300"} disabled:opacity-40 disabled:cursor-not-allowed`,
|
|
799
|
+
style: R ? { backgroundColor: o.button } : {},
|
|
1425
800
|
children: [
|
|
1426
|
-
/* @__PURE__ */ e
|
|
1427
|
-
/* @__PURE__ */ e
|
|
801
|
+
/* @__PURE__ */ e(Ae, { size: 16 }),
|
|
802
|
+
/* @__PURE__ */ e("span", { style: { display: K < 600 ? "none" : "block" }, children: "EQ" })
|
|
1428
803
|
]
|
|
1429
804
|
}
|
|
1430
805
|
),
|
|
1431
|
-
|
|
806
|
+
x.loop && /* @__PURE__ */ r(
|
|
1432
807
|
"button",
|
|
1433
808
|
{
|
|
1434
|
-
onClick:
|
|
1435
|
-
disabled: !
|
|
1436
|
-
className: `${
|
|
1437
|
-
style:
|
|
809
|
+
onClick: Se,
|
|
810
|
+
disabled: !i,
|
|
811
|
+
className: `${K < 700 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${Q ? "text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-300"} disabled:opacity-40 disabled:cursor-not-allowed`,
|
|
812
|
+
style: Q ? { backgroundColor: o.button } : {},
|
|
1438
813
|
children: [
|
|
1439
|
-
/* @__PURE__ */ e
|
|
1440
|
-
/* @__PURE__ */ e
|
|
814
|
+
/* @__PURE__ */ e(at, { size: 16, className: `${Q ? "rotate-180" : ""} transition-all` }),
|
|
815
|
+
/* @__PURE__ */ e("span", { style: { display: K < 700 ? "none" : "block" }, children: "Loop" })
|
|
1441
816
|
]
|
|
1442
817
|
}
|
|
1443
818
|
),
|
|
1444
|
-
|
|
819
|
+
x.speed && /* @__PURE__ */ e("div", { className: "flex items-center", children: /* @__PURE__ */ r(
|
|
1445
820
|
"select",
|
|
1446
821
|
{
|
|
1447
|
-
value:
|
|
1448
|
-
onChange:
|
|
1449
|
-
className: `rounded-full text-sm font-medium border-none outline-none cursor-pointer transition-all bg-transparent ${
|
|
822
|
+
value: ue,
|
|
823
|
+
onChange: Ne,
|
|
824
|
+
className: `rounded-full text-sm font-medium border-none outline-none cursor-pointer transition-all bg-transparent ${h ? "text-gray-200" : "text-gray-800"}`,
|
|
1450
825
|
children: [
|
|
1451
|
-
/* @__PURE__ */ e
|
|
1452
|
-
/* @__PURE__ */ e
|
|
1453
|
-
/* @__PURE__ */ e
|
|
1454
|
-
/* @__PURE__ */ e
|
|
1455
|
-
/* @__PURE__ */ e
|
|
1456
|
-
/* @__PURE__ */ e
|
|
826
|
+
/* @__PURE__ */ e("option", { value: "0.5", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "0.5x" }),
|
|
827
|
+
/* @__PURE__ */ e("option", { value: "0.75", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "0.75x" }),
|
|
828
|
+
/* @__PURE__ */ e("option", { value: "1", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1x" }),
|
|
829
|
+
/* @__PURE__ */ e("option", { value: "1.25", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1.25x" }),
|
|
830
|
+
/* @__PURE__ */ e("option", { value: "1.5", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1.5x" }),
|
|
831
|
+
/* @__PURE__ */ e("option", { value: "2", className: h ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "2x" })
|
|
1457
832
|
]
|
|
1458
833
|
}
|
|
1459
834
|
) }),
|
|
1460
|
-
|
|
1461
|
-
/* @__PURE__ */ e
|
|
835
|
+
x.volume && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 md:gap-3 ml-auto", children: [
|
|
836
|
+
/* @__PURE__ */ e(
|
|
1462
837
|
"button",
|
|
1463
838
|
{
|
|
1464
|
-
onClick:
|
|
839
|
+
onClick: ze,
|
|
1465
840
|
className: "p-2 rounded-full hover:bg-gray-100/50 transition-all",
|
|
1466
|
-
children:
|
|
841
|
+
children: ae || E === 0 ? /* @__PURE__ */ e(De, { size: 20, className: h ? "text-gray-100" : "text-gray-600" }) : /* @__PURE__ */ e(He, { size: 20, className: h ? "text-gray-100" : "text-gray-600" })
|
|
1467
842
|
}
|
|
1468
843
|
),
|
|
1469
|
-
/* @__PURE__ */ e
|
|
844
|
+
/* @__PURE__ */ e(
|
|
1470
845
|
"input",
|
|
1471
846
|
{
|
|
1472
847
|
type: "range",
|
|
1473
848
|
min: "0",
|
|
1474
849
|
max: "100",
|
|
1475
|
-
value:
|
|
1476
|
-
onChange:
|
|
850
|
+
value: E,
|
|
851
|
+
onChange: je,
|
|
1477
852
|
className: "hide-for-xs w-24 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer",
|
|
1478
853
|
style: {
|
|
1479
|
-
background: `linear-gradient(to right, ${
|
|
1480
|
-
display:
|
|
854
|
+
background: `linear-gradient(to right, ${o.slider} ${E}%, ${o.slider + "30"} ${E}%)`,
|
|
855
|
+
display: K < 460 ? "none" : "block"
|
|
1481
856
|
}
|
|
1482
857
|
}
|
|
1483
858
|
),
|
|
1484
|
-
/* @__PURE__ */
|
|
1485
|
-
|
|
859
|
+
/* @__PURE__ */ r("span", { style: { display: K < 800 ? "none" : "block" }, className: `hidden sm:block text-xs ${h ? "text-gray-100" : "text-gray-700"} font-mono w-10 text-right`, children: [
|
|
860
|
+
E,
|
|
1486
861
|
"%"
|
|
1487
862
|
] })
|
|
1488
863
|
] })
|
|
1489
864
|
] }),
|
|
1490
|
-
/* @__PURE__ */ e
|
|
865
|
+
/* @__PURE__ */ e("style", { children: `
|
|
1491
866
|
input[type="range"]::-webkit-slider-thumb {
|
|
1492
867
|
-webkit-appearance: none;
|
|
1493
868
|
appearance: none;
|
|
1494
869
|
width: 16px;
|
|
1495
870
|
height: 16px;
|
|
1496
871
|
border-radius: 50%;
|
|
1497
|
-
background: ${
|
|
872
|
+
background: ${o.slider};
|
|
1498
873
|
cursor: pointer;
|
|
1499
874
|
border: 2px solid white;
|
|
1500
875
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
@@ -1504,7 +879,7 @@ function Yt({
|
|
|
1504
879
|
width: 16px;
|
|
1505
880
|
height: 16px;
|
|
1506
881
|
border-radius: 50%;
|
|
1507
|
-
background: ${
|
|
882
|
+
background: ${o.slider};
|
|
1508
883
|
cursor: pointer;
|
|
1509
884
|
border: 2px solid white;
|
|
1510
885
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
@@ -1548,331 +923,331 @@ function Yt({
|
|
|
1548
923
|
` })
|
|
1549
924
|
] }) });
|
|
1550
925
|
}
|
|
1551
|
-
function
|
|
1552
|
-
audio:
|
|
1553
|
-
gradient:
|
|
926
|
+
function ft({
|
|
927
|
+
audio: i,
|
|
928
|
+
gradient: c = ["#cd7eff", "#ff00f2"],
|
|
1554
929
|
background: g = "#f4e4ffff",
|
|
1555
|
-
autoPlay:
|
|
1556
|
-
thumbnail:
|
|
1557
|
-
width:
|
|
1558
|
-
equalizer:
|
|
930
|
+
autoPlay: p = !1,
|
|
931
|
+
thumbnail: q = null,
|
|
932
|
+
width: m,
|
|
933
|
+
equalizer: x = {
|
|
1559
934
|
bass: 0,
|
|
1560
935
|
mid: 0,
|
|
1561
936
|
treble: 0
|
|
1562
937
|
},
|
|
1563
|
-
mode:
|
|
938
|
+
mode: v = "light"
|
|
1564
939
|
}) {
|
|
1565
|
-
const [
|
|
1566
|
-
bass:
|
|
1567
|
-
mid:
|
|
1568
|
-
treble:
|
|
1569
|
-
}),
|
|
1570
|
-
const
|
|
1571
|
-
for (let
|
|
1572
|
-
const
|
|
1573
|
-
|
|
940
|
+
const [P, T] = f(!1), [U, I] = f(0), [M, _] = f(0), [H, z] = f(!1), [S, N] = f(80), [E, oe] = f(1), [ae, fe] = f([]), [Q, G] = f(null), [se, le] = f(!1), [O, de] = f({
|
|
941
|
+
bass: x.bass || 0,
|
|
942
|
+
mid: x.mid || 0,
|
|
943
|
+
treble: x.treble || 0
|
|
944
|
+
}), R = y(null), F = y(null), j = y(null), ie = y(null), ue = y(null), ee = y(null), K = () => {
|
|
945
|
+
const a = [];
|
|
946
|
+
for (let d = 0; d < 100; d++) {
|
|
947
|
+
const b = 20 + Math.random() * 60;
|
|
948
|
+
a.push(b);
|
|
1574
949
|
}
|
|
1575
|
-
return
|
|
950
|
+
return a;
|
|
1576
951
|
};
|
|
1577
|
-
|
|
1578
|
-
if (!
|
|
952
|
+
C(() => {
|
|
953
|
+
if (!i)
|
|
1579
954
|
return;
|
|
1580
|
-
if (!Array.isArray(
|
|
1581
|
-
|
|
955
|
+
if (!Array.isArray(c) || c.length < 2) {
|
|
956
|
+
G("Gradient must be an array with at least 2 colors");
|
|
1582
957
|
return;
|
|
1583
958
|
}
|
|
1584
|
-
const
|
|
1585
|
-
if (!
|
|
1586
|
-
const
|
|
1587
|
-
|
|
1588
|
-
},
|
|
1589
|
-
var
|
|
1590
|
-
|
|
959
|
+
const a = R.current;
|
|
960
|
+
if (!a) return;
|
|
961
|
+
const d = () => I(a.currentTime), b = () => {
|
|
962
|
+
_(a.duration), fe(K());
|
|
963
|
+
}, B = () => T(!1), D = (J) => {
|
|
964
|
+
var o, h;
|
|
965
|
+
G(`Audio error: ${((h = (o = J.target) == null ? void 0 : o.error) == null ? void 0 : h.message) || "Failed to load audio"}`);
|
|
1591
966
|
};
|
|
1592
|
-
return
|
|
1593
|
-
|
|
967
|
+
return a.addEventListener("timeupdate", d), a.addEventListener("loadedmetadata", b), a.addEventListener("ended", B), a.addEventListener("error", D), () => {
|
|
968
|
+
a.removeEventListener("timeupdate", d), a.removeEventListener("loadedmetadata", b), a.removeEventListener("ended", B), a.removeEventListener("error", D);
|
|
1594
969
|
};
|
|
1595
|
-
}, [
|
|
1596
|
-
|
|
1597
|
-
console.error("Play failed:",
|
|
1598
|
-
}),
|
|
1599
|
-
}, [
|
|
1600
|
-
if (
|
|
1601
|
-
const
|
|
1602
|
-
if (
|
|
1603
|
-
const
|
|
1604
|
-
F.current =
|
|
1605
|
-
const
|
|
1606
|
-
|
|
1607
|
-
const
|
|
1608
|
-
|
|
1609
|
-
const
|
|
1610
|
-
|
|
1611
|
-
const
|
|
1612
|
-
|
|
970
|
+
}, [i, c, v]), C(() => {
|
|
971
|
+
i && R.current && p && (R.current.play().catch((a) => {
|
|
972
|
+
console.error("Play failed:", a), T(!1);
|
|
973
|
+
}), T(!0));
|
|
974
|
+
}, [i]), C(() => {
|
|
975
|
+
if (R.current && !F.current && R.current) {
|
|
976
|
+
const a = window.AudioContext || window.webkitAudioContext;
|
|
977
|
+
if (a) {
|
|
978
|
+
const d = new a();
|
|
979
|
+
F.current = d;
|
|
980
|
+
const b = d.createMediaElementSource(R.current);
|
|
981
|
+
j.current = b;
|
|
982
|
+
const B = d.createBiquadFilter();
|
|
983
|
+
B.type = "lowshelf", B.frequency.value = 200, ie.current = B;
|
|
984
|
+
const D = d.createBiquadFilter();
|
|
985
|
+
D.type = "peaking", D.frequency.value = 1e3, D.Q.value = 1, ue.current = D;
|
|
986
|
+
const J = d.createBiquadFilter();
|
|
987
|
+
J.type = "highshelf", J.frequency.value = 3e3, ee.current = J, b.connect(B).connect(D).connect(J).connect(d.destination);
|
|
1613
988
|
}
|
|
1614
989
|
}
|
|
1615
|
-
}, [
|
|
1616
|
-
|
|
1617
|
-
}, [
|
|
1618
|
-
|
|
1619
|
-
}, [
|
|
1620
|
-
const
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
}),
|
|
1624
|
-
},
|
|
1625
|
-
|
|
1626
|
-
},
|
|
1627
|
-
|
|
1628
|
-
},
|
|
1629
|
-
|
|
1630
|
-
},
|
|
1631
|
-
const
|
|
1632
|
-
|
|
1633
|
-
},
|
|
1634
|
-
|
|
1635
|
-
},
|
|
1636
|
-
|
|
1637
|
-
},
|
|
1638
|
-
if (isNaN(
|
|
1639
|
-
const
|
|
1640
|
-
return `${
|
|
1641
|
-
},
|
|
1642
|
-
if (
|
|
1643
|
-
return /* @__PURE__ */ e
|
|
1644
|
-
/* @__PURE__ */ e
|
|
1645
|
-
/* @__PURE__ */ e
|
|
990
|
+
}, [i]), C(() => {
|
|
991
|
+
R.current && (R.current.volume = H ? 0 : S / 100);
|
|
992
|
+
}, [S, H]), C(() => {
|
|
993
|
+
R.current && (R.current.playbackRate = E);
|
|
994
|
+
}, [E]);
|
|
995
|
+
const k = () => {
|
|
996
|
+
R.current && (P ? R.current.pause() : R.current.play().catch((a) => {
|
|
997
|
+
G(`Playback failed: ${a instanceof Error ? a.message : String(a)}`);
|
|
998
|
+
}), T(!P));
|
|
999
|
+
}, u = () => {
|
|
1000
|
+
z(!H);
|
|
1001
|
+
}, A = (a) => {
|
|
1002
|
+
N(parseInt(a.target.value)), H && parseInt(a.target.value) > 0 && z(!1);
|
|
1003
|
+
}, X = (a) => {
|
|
1004
|
+
oe(parseFloat(a.target.value));
|
|
1005
|
+
}, me = (a) => {
|
|
1006
|
+
const d = a.currentTarget.getBoundingClientRect(), D = (a.clientX - d.left) / d.width * M;
|
|
1007
|
+
R.current && (R.current.currentTime = D, I(D));
|
|
1008
|
+
}, V = (a, d) => {
|
|
1009
|
+
de((b) => ({ ...b, [a]: d })), a === "bass" && ie.current && (ie.current.gain.value = d), a === "mid" && ue.current && (ue.current.gain.value = d), a === "treble" && ee.current && (ee.current.gain.value = d);
|
|
1010
|
+
}, te = () => {
|
|
1011
|
+
V("bass", 0), V("mid", 0), V("treble", 0);
|
|
1012
|
+
}, Z = (a) => {
|
|
1013
|
+
if (isNaN(a)) return "0:00";
|
|
1014
|
+
const d = Math.floor(a / 60), b = Math.floor(a % 60);
|
|
1015
|
+
return `${d}:${b.toString().padStart(2, "0")}`;
|
|
1016
|
+
}, $ = M > 0 ? U / M * 100 : 0;
|
|
1017
|
+
if (Q)
|
|
1018
|
+
return /* @__PURE__ */ e("div", { className: "w-lg p-6 rounded-xl", style: { background: g }, children: /* @__PURE__ */ r("div", { className: `text-center ${v === "dark" ? "text-red-300" : "text-red-600"}`, children: [
|
|
1019
|
+
/* @__PURE__ */ e("p", { className: "font-medium", children: "Error" }),
|
|
1020
|
+
/* @__PURE__ */ e("p", { className: "text-sm", children: Q })
|
|
1646
1021
|
] }) });
|
|
1647
|
-
if (!
|
|
1648
|
-
const
|
|
1649
|
-
return /* @__PURE__ */
|
|
1650
|
-
/* @__PURE__ */ e
|
|
1651
|
-
/* @__PURE__ */ e
|
|
1652
|
-
|
|
1653
|
-
/* @__PURE__ */
|
|
1022
|
+
if (!i) return null;
|
|
1023
|
+
const re = v === "dark" ? "text-gray-300" : "text-gray-700", Y = v === "dark" ? "text-gray-400" : "text-gray-500";
|
|
1024
|
+
return /* @__PURE__ */ r("div", { className: "w-full max-w-lg relative", style: { width: m + "px" }, children: [
|
|
1025
|
+
/* @__PURE__ */ e("audio", { ref: R, src: i }),
|
|
1026
|
+
/* @__PURE__ */ e("div", { className: "rounded-2xl shadow-2xl", children: /* @__PURE__ */ r("div", { className: "rounded-2xl p-6 backdrop-blur-xl", style: { background: g }, children: [
|
|
1027
|
+
q && /* @__PURE__ */ e("div", { className: "w-full p-4", children: /* @__PURE__ */ e("img", { src: q, alt: "", className: "w-full aspect-square rounded-xl" }) }),
|
|
1028
|
+
/* @__PURE__ */ r(
|
|
1654
1029
|
"div",
|
|
1655
1030
|
{
|
|
1656
1031
|
className: "relative h-20 mb-6 cursor-pointer",
|
|
1657
|
-
onClick:
|
|
1032
|
+
onClick: me,
|
|
1658
1033
|
children: [
|
|
1659
|
-
/* @__PURE__ */ e
|
|
1660
|
-
const
|
|
1661
|
-
return /* @__PURE__ */ e
|
|
1034
|
+
/* @__PURE__ */ e("div", { className: "absolute inset-0 flex items-end justify-center h-full w-full gap-px", children: ae.map((a, d) => {
|
|
1035
|
+
const B = d / ae.length * 100 <= $;
|
|
1036
|
+
return /* @__PURE__ */ e(
|
|
1662
1037
|
"div",
|
|
1663
1038
|
{
|
|
1664
1039
|
className: "w-1 rounded-t transition-all duration-150",
|
|
1665
1040
|
style: {
|
|
1666
|
-
height: `${
|
|
1667
|
-
background:
|
|
1668
|
-
opacity:
|
|
1041
|
+
height: `${a}%`,
|
|
1042
|
+
background: B ? c[0] : c[1],
|
|
1043
|
+
opacity: B ? 1 : 0.4
|
|
1669
1044
|
}
|
|
1670
1045
|
},
|
|
1671
|
-
|
|
1046
|
+
d
|
|
1672
1047
|
);
|
|
1673
1048
|
}) }),
|
|
1674
|
-
/* @__PURE__ */ e
|
|
1049
|
+
/* @__PURE__ */ e(
|
|
1675
1050
|
"div",
|
|
1676
1051
|
{
|
|
1677
1052
|
className: "absolute top-0 h-full w-1 bg-white border-r border-black rounded-full transition-all duration-150",
|
|
1678
|
-
style: { left: `${
|
|
1053
|
+
style: { left: `${$}%`, transform: "translateX(-50%)" }
|
|
1679
1054
|
}
|
|
1680
1055
|
)
|
|
1681
1056
|
]
|
|
1682
1057
|
}
|
|
1683
1058
|
),
|
|
1684
|
-
/* @__PURE__ */
|
|
1685
|
-
/* @__PURE__ */ e
|
|
1686
|
-
/* @__PURE__ */ e
|
|
1059
|
+
/* @__PURE__ */ r("div", { className: `flex justify-between text-sm ${Y} mb-6`, children: [
|
|
1060
|
+
/* @__PURE__ */ e("span", { children: Z(U) }),
|
|
1061
|
+
/* @__PURE__ */ e("span", { children: Z(M) })
|
|
1687
1062
|
] }),
|
|
1688
|
-
/* @__PURE__ */
|
|
1689
|
-
/* @__PURE__ */
|
|
1690
|
-
/* @__PURE__ */ e
|
|
1063
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center justify-between mb-4", children: [
|
|
1064
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1065
|
+
/* @__PURE__ */ e(
|
|
1691
1066
|
"button",
|
|
1692
1067
|
{
|
|
1693
|
-
onClick:
|
|
1068
|
+
onClick: u,
|
|
1694
1069
|
className: "p-2 rounded-full transition-all",
|
|
1695
1070
|
style: {
|
|
1696
|
-
background: `linear-gradient(135deg, ${
|
|
1071
|
+
background: `linear-gradient(135deg, ${c[0]}, ${c[1]})`
|
|
1697
1072
|
},
|
|
1698
|
-
children:
|
|
1073
|
+
children: H || S === 0 ? /* @__PURE__ */ e(De, { className: "w-4 h-4 text-white" }) : /* @__PURE__ */ e(He, { className: "w-4 h-4 text-white" })
|
|
1699
1074
|
}
|
|
1700
1075
|
),
|
|
1701
|
-
/* @__PURE__ */ e
|
|
1076
|
+
/* @__PURE__ */ e(
|
|
1702
1077
|
"input",
|
|
1703
1078
|
{
|
|
1704
1079
|
type: "range",
|
|
1705
1080
|
min: "0",
|
|
1706
1081
|
max: "100",
|
|
1707
|
-
value:
|
|
1708
|
-
onChange:
|
|
1709
|
-
className: `${
|
|
1082
|
+
value: S,
|
|
1083
|
+
onChange: A,
|
|
1084
|
+
className: `${m ? "" : "hidden sm:block"} w-20 h-1.5 rounded-lg appearance-none cursor-pointer`,
|
|
1710
1085
|
style: {
|
|
1711
|
-
background: `linear-gradient(to right, ${
|
|
1712
|
-
display:
|
|
1086
|
+
background: `linear-gradient(to right, ${c[0]} ${S}%, ${v === "dark" ? "#374151" : "#d1d5db"} ${S}%)`,
|
|
1087
|
+
display: m && m < 400 ? "none" : void 0
|
|
1713
1088
|
}
|
|
1714
1089
|
}
|
|
1715
1090
|
),
|
|
1716
|
-
|
|
1091
|
+
m && m < 400 && /* @__PURE__ */ e("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ e(
|
|
1717
1092
|
"button",
|
|
1718
1093
|
{
|
|
1719
|
-
onClick: () =>
|
|
1094
|
+
onClick: () => le(!se),
|
|
1720
1095
|
className: "p-2 rounded-full transition-all",
|
|
1721
1096
|
style: {
|
|
1722
|
-
background: `linear-gradient(135deg, ${
|
|
1097
|
+
background: `linear-gradient(135deg, ${c[0]}, ${c[1]})`
|
|
1723
1098
|
},
|
|
1724
|
-
children: /* @__PURE__ */ e
|
|
1099
|
+
children: /* @__PURE__ */ e(Ae, { className: "w-4 h-4 text-white" })
|
|
1725
1100
|
}
|
|
1726
1101
|
) })
|
|
1727
1102
|
] }),
|
|
1728
|
-
/* @__PURE__ */ e
|
|
1103
|
+
/* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ e(
|
|
1729
1104
|
"button",
|
|
1730
1105
|
{
|
|
1731
|
-
onClick:
|
|
1106
|
+
onClick: k,
|
|
1732
1107
|
className: "p-4 rounded-full transition-all hover:scale-105 shadow-lg",
|
|
1733
1108
|
style: {
|
|
1734
|
-
background: `linear-gradient(135deg, ${
|
|
1109
|
+
background: `linear-gradient(135deg, ${c[0]}, ${c[1]})`
|
|
1735
1110
|
},
|
|
1736
|
-
children:
|
|
1111
|
+
children: P ? /* @__PURE__ */ e(Re, { className: "w-6 h-6 text-white fill-white" }) : /* @__PURE__ */ e(Fe, { className: "w-6 h-6 text-white fill-white" })
|
|
1737
1112
|
}
|
|
1738
1113
|
) }),
|
|
1739
|
-
/* @__PURE__ */
|
|
1740
|
-
/* @__PURE__ */ e
|
|
1114
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1115
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ r(
|
|
1741
1116
|
"select",
|
|
1742
1117
|
{
|
|
1743
|
-
value:
|
|
1744
|
-
style: { background: g, color:
|
|
1745
|
-
onChange:
|
|
1746
|
-
className: `py-1 px-2 rounded-lg text-sm ${
|
|
1118
|
+
value: E,
|
|
1119
|
+
style: { background: g, color: c[0] },
|
|
1120
|
+
onChange: X,
|
|
1121
|
+
className: `py-1 px-2 rounded-lg text-sm ${re} ${v === "dark" ? "bg-gray-800" : "bg-gray-100"}`,
|
|
1747
1122
|
children: [
|
|
1748
|
-
/* @__PURE__ */ e
|
|
1749
|
-
/* @__PURE__ */ e
|
|
1750
|
-
/* @__PURE__ */ e
|
|
1751
|
-
/* @__PURE__ */ e
|
|
1752
|
-
/* @__PURE__ */ e
|
|
1753
|
-
/* @__PURE__ */ e
|
|
1123
|
+
/* @__PURE__ */ e("option", { value: "0.5", children: "0.5x" }),
|
|
1124
|
+
/* @__PURE__ */ e("option", { value: "0.75", children: "0.75x" }),
|
|
1125
|
+
/* @__PURE__ */ e("option", { value: "1", children: "1x" }),
|
|
1126
|
+
/* @__PURE__ */ e("option", { value: "1.25", children: "1.25x" }),
|
|
1127
|
+
/* @__PURE__ */ e("option", { value: "1.5", children: "1.5x" }),
|
|
1128
|
+
/* @__PURE__ */ e("option", { value: "2", children: "2x" })
|
|
1754
1129
|
]
|
|
1755
1130
|
}
|
|
1756
1131
|
) }),
|
|
1757
|
-
!(
|
|
1132
|
+
!(m && m < 400) && /* @__PURE__ */ e("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ e(
|
|
1758
1133
|
"button",
|
|
1759
1134
|
{
|
|
1760
|
-
onClick: () =>
|
|
1135
|
+
onClick: () => le(!se),
|
|
1761
1136
|
className: "p-2 rounded-full transition-all",
|
|
1762
1137
|
style: {
|
|
1763
|
-
background: `linear-gradient(135deg, ${
|
|
1138
|
+
background: `linear-gradient(135deg, ${c[0]}, ${c[1]})`
|
|
1764
1139
|
},
|
|
1765
|
-
children: /* @__PURE__ */ e
|
|
1140
|
+
children: /* @__PURE__ */ e(Ae, { className: "w-4 h-4 text-white" })
|
|
1766
1141
|
}
|
|
1767
1142
|
) })
|
|
1768
1143
|
] })
|
|
1769
1144
|
] })
|
|
1770
1145
|
] }) }),
|
|
1771
|
-
|
|
1772
|
-
/* @__PURE__ */ e
|
|
1773
|
-
/* @__PURE__ */
|
|
1774
|
-
/* @__PURE__ */
|
|
1775
|
-
/* @__PURE__ */
|
|
1776
|
-
/* @__PURE__ */ e
|
|
1777
|
-
/* @__PURE__ */
|
|
1778
|
-
|
|
1146
|
+
se && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-black bg-opacity-20 flex items-center justify-center z-10 rounded-2xl p-4", children: /* @__PURE__ */ r("div", { className: `max-w-xs w-full p-4 pt-2 rounded-xl ${v === "dark" ? "bg-gray-800" : "bg-white"}`, children: [
|
|
1147
|
+
/* @__PURE__ */ e("h3", { className: `text-lg font-medium mb-2 ${v === "dark" ? "text-gray-200" : "text-gray-700"}`, children: "Equalizer" }),
|
|
1148
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
1149
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1150
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1151
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Bass" }),
|
|
1152
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${v === "dark" ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
1153
|
+
O.bass,
|
|
1779
1154
|
" dB"
|
|
1780
1155
|
] })
|
|
1781
1156
|
] }),
|
|
1782
|
-
/* @__PURE__ */
|
|
1783
|
-
/* @__PURE__ */ e
|
|
1784
|
-
/* @__PURE__ */ e
|
|
1157
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1158
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1159
|
+
/* @__PURE__ */ e(
|
|
1785
1160
|
"input",
|
|
1786
1161
|
{
|
|
1787
1162
|
type: "range",
|
|
1788
1163
|
min: "-20",
|
|
1789
1164
|
max: "20",
|
|
1790
|
-
value:
|
|
1791
|
-
onChange: (
|
|
1165
|
+
value: O.bass,
|
|
1166
|
+
onChange: (a) => V("bass", parseInt(a.target.value)),
|
|
1792
1167
|
className: "flex-1 h-4 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1793
1168
|
style: {
|
|
1794
|
-
background: `linear-gradient(to right, ${
|
|
1169
|
+
background: `linear-gradient(to right, ${c[0]} ${(O.bass + 20) / 40 * 100}%, ${c[1] + "30"} ${(O.bass + 20) / 40 * 100}%)`
|
|
1795
1170
|
}
|
|
1796
1171
|
}
|
|
1797
1172
|
),
|
|
1798
|
-
/* @__PURE__ */ e
|
|
1173
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1799
1174
|
] })
|
|
1800
1175
|
] }),
|
|
1801
|
-
/* @__PURE__ */
|
|
1802
|
-
/* @__PURE__ */
|
|
1803
|
-
/* @__PURE__ */ e
|
|
1804
|
-
/* @__PURE__ */
|
|
1805
|
-
|
|
1176
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1177
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1178
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Mid" }),
|
|
1179
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${v === "dark" ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
1180
|
+
O.mid,
|
|
1806
1181
|
" dB"
|
|
1807
1182
|
] })
|
|
1808
1183
|
] }),
|
|
1809
|
-
/* @__PURE__ */
|
|
1810
|
-
/* @__PURE__ */ e
|
|
1811
|
-
/* @__PURE__ */ e
|
|
1184
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1185
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1186
|
+
/* @__PURE__ */ e(
|
|
1812
1187
|
"input",
|
|
1813
1188
|
{
|
|
1814
1189
|
type: "range",
|
|
1815
1190
|
min: "-20",
|
|
1816
1191
|
max: "20",
|
|
1817
|
-
value:
|
|
1818
|
-
onChange: (
|
|
1192
|
+
value: O.mid,
|
|
1193
|
+
onChange: (a) => V("mid", parseInt(a.target.value)),
|
|
1819
1194
|
className: "flex-1 h-4 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1820
1195
|
style: {
|
|
1821
|
-
background: `linear-gradient(to right, ${
|
|
1196
|
+
background: `linear-gradient(to right, ${c[0]} ${(O.mid + 20) / 40 * 100}%, ${c[1] + "30"} ${(O.mid + 20) / 40 * 100}%)`
|
|
1822
1197
|
}
|
|
1823
1198
|
}
|
|
1824
1199
|
),
|
|
1825
|
-
/* @__PURE__ */ e
|
|
1200
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1826
1201
|
] })
|
|
1827
1202
|
] }),
|
|
1828
|
-
/* @__PURE__ */
|
|
1829
|
-
/* @__PURE__ */
|
|
1830
|
-
/* @__PURE__ */ e
|
|
1831
|
-
/* @__PURE__ */
|
|
1832
|
-
|
|
1203
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1204
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1205
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
|
|
1206
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${v === "dark" ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
1207
|
+
O.treble,
|
|
1833
1208
|
" dB"
|
|
1834
1209
|
] })
|
|
1835
1210
|
] }),
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */ e
|
|
1838
|
-
/* @__PURE__ */ e
|
|
1211
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1212
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1213
|
+
/* @__PURE__ */ e(
|
|
1839
1214
|
"input",
|
|
1840
1215
|
{
|
|
1841
1216
|
type: "range",
|
|
1842
1217
|
min: "-20",
|
|
1843
1218
|
max: "20",
|
|
1844
|
-
value:
|
|
1845
|
-
onChange: (
|
|
1219
|
+
value: O.treble,
|
|
1220
|
+
onChange: (a) => V("treble", parseInt(a.target.value)),
|
|
1846
1221
|
className: "flex-1 h-4 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
1847
1222
|
style: {
|
|
1848
|
-
background: `linear-gradient(to right, ${
|
|
1223
|
+
background: `linear-gradient(to right, ${c[0]} ${(O.treble + 20) / 40 * 100}%, ${c[1] + "30"} ${(O.treble + 20) / 40 * 100}%)`
|
|
1849
1224
|
}
|
|
1850
1225
|
}
|
|
1851
1226
|
),
|
|
1852
|
-
/* @__PURE__ */ e
|
|
1227
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
1853
1228
|
] })
|
|
1854
1229
|
] })
|
|
1855
1230
|
] }),
|
|
1856
|
-
/* @__PURE__ */
|
|
1857
|
-
/* @__PURE__ */ e
|
|
1231
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mt-6", children: [
|
|
1232
|
+
/* @__PURE__ */ e(
|
|
1858
1233
|
"button",
|
|
1859
1234
|
{
|
|
1860
|
-
onClick:
|
|
1861
|
-
className: `px-3 py-1 rounded text-xs ${
|
|
1235
|
+
onClick: te,
|
|
1236
|
+
className: `px-3 py-1 rounded text-xs ${v === "dark" ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
1862
1237
|
children: "Reset"
|
|
1863
1238
|
}
|
|
1864
1239
|
),
|
|
1865
|
-
/* @__PURE__ */ e
|
|
1240
|
+
/* @__PURE__ */ e(
|
|
1866
1241
|
"button",
|
|
1867
1242
|
{
|
|
1868
|
-
onClick: () =>
|
|
1869
|
-
className: `px-3 py-1 rounded text-xs ${
|
|
1243
|
+
onClick: () => le(!1),
|
|
1244
|
+
className: `px-3 py-1 rounded text-xs ${v === "dark" ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
1870
1245
|
children: "Close"
|
|
1871
1246
|
}
|
|
1872
1247
|
)
|
|
1873
1248
|
] })
|
|
1874
1249
|
] }) }),
|
|
1875
|
-
/* @__PURE__ */ e
|
|
1250
|
+
/* @__PURE__ */ e("style", { children: `
|
|
1876
1251
|
input[type="range"].eq-slider::-webkit-slider-thumb {
|
|
1877
1252
|
-webkit-appearance: none;
|
|
1878
1253
|
appearance: none;
|
|
@@ -1892,97 +1267,97 @@ function Kt({
|
|
|
1892
1267
|
` })
|
|
1893
1268
|
] });
|
|
1894
1269
|
}
|
|
1895
|
-
function
|
|
1896
|
-
const [
|
|
1897
|
-
|
|
1898
|
-
const
|
|
1899
|
-
if (
|
|
1900
|
-
const
|
|
1901
|
-
return
|
|
1902
|
-
}, []),
|
|
1903
|
-
const
|
|
1904
|
-
|
|
1270
|
+
function mt({ audio: i, thumbnail: c, gradient: g = ["#cd7eff", "#fe59f6"], background: p = "#1f273a", autoPlay: q = !1 }) {
|
|
1271
|
+
const [m, x] = f(!1), [, v] = f(0), P = y(null), [T, U] = f(0), [I, M] = f(0), [_, H] = f(0);
|
|
1272
|
+
C(() => {
|
|
1273
|
+
const N = P.current;
|
|
1274
|
+
if (!N) return;
|
|
1275
|
+
const E = () => v(N.currentTime);
|
|
1276
|
+
return N.addEventListener("timeupdate", E), () => N.removeEventListener("timeupdate", E);
|
|
1277
|
+
}, []), C(() => {
|
|
1278
|
+
const N = setInterval(() => {
|
|
1279
|
+
m && U((E) => E + 0.1);
|
|
1905
1280
|
}, 100);
|
|
1906
|
-
return () => clearInterval(
|
|
1907
|
-
}, [
|
|
1908
|
-
const
|
|
1909
|
-
|
|
1281
|
+
return () => clearInterval(N);
|
|
1282
|
+
}, [m]), C(() => {
|
|
1283
|
+
const N = setInterval(() => {
|
|
1284
|
+
m && H((E) => E + 0.1);
|
|
1910
1285
|
}, 100);
|
|
1911
|
-
return () => clearInterval(
|
|
1912
|
-
}, [
|
|
1913
|
-
|
|
1914
|
-
}, [
|
|
1915
|
-
const
|
|
1916
|
-
if (
|
|
1917
|
-
const
|
|
1918
|
-
|
|
1286
|
+
return () => clearInterval(N);
|
|
1287
|
+
}, [m]), C(() => {
|
|
1288
|
+
i && P.current && q && (P.current.play().catch(() => x(!1)), x(!0));
|
|
1289
|
+
}, [i]), C(() => {
|
|
1290
|
+
const N = P.current;
|
|
1291
|
+
if (!N) return;
|
|
1292
|
+
const E = () => {
|
|
1293
|
+
M(N.duration), console.log("Audio duration:", N.duration);
|
|
1919
1294
|
};
|
|
1920
|
-
return
|
|
1921
|
-
|
|
1295
|
+
return H(0), N.addEventListener("loadedmetadata", E), () => {
|
|
1296
|
+
N.removeEventListener("loadedmetadata", E);
|
|
1922
1297
|
};
|
|
1923
|
-
}, [
|
|
1924
|
-
const
|
|
1925
|
-
|
|
1298
|
+
}, [i]);
|
|
1299
|
+
const z = () => {
|
|
1300
|
+
P.current && (m ? P.current.pause() : P.current.play().catch((N) => console.error("NanoPlayer play failed:", N)), x(!m));
|
|
1926
1301
|
};
|
|
1927
|
-
if (!
|
|
1928
|
-
const
|
|
1302
|
+
if (!i) return null;
|
|
1303
|
+
const S = {
|
|
1929
1304
|
background: `linear-gradient(135deg, ${g[0]}, ${g[1]})`
|
|
1930
1305
|
};
|
|
1931
|
-
return /* @__PURE__ */
|
|
1306
|
+
return /* @__PURE__ */ r(
|
|
1932
1307
|
"div",
|
|
1933
1308
|
{
|
|
1934
|
-
style: { backgroundColor:
|
|
1309
|
+
style: { backgroundColor: p },
|
|
1935
1310
|
className: `
|
|
1936
1311
|
relative overflow-hidden inline-flex flex-col
|
|
1937
|
-
${
|
|
1312
|
+
${c ? "rounded-2xl" : "rounded-full"}
|
|
1938
1313
|
px-3 py-2 shadow-lg
|
|
1939
|
-
${
|
|
1314
|
+
${c ? "w-[120px] h-[150px]" : "w-[110px] h-[40px]"}
|
|
1940
1315
|
`,
|
|
1941
1316
|
children: [
|
|
1942
|
-
/* @__PURE__ */ e
|
|
1317
|
+
/* @__PURE__ */ e(
|
|
1943
1318
|
"audio",
|
|
1944
1319
|
{
|
|
1945
|
-
ref:
|
|
1946
|
-
src:
|
|
1320
|
+
ref: P,
|
|
1321
|
+
src: i,
|
|
1947
1322
|
onEnded: () => {
|
|
1948
|
-
|
|
1323
|
+
x(!1), H(0);
|
|
1949
1324
|
}
|
|
1950
1325
|
}
|
|
1951
1326
|
),
|
|
1952
|
-
/* @__PURE__ */ e
|
|
1327
|
+
/* @__PURE__ */ e(
|
|
1953
1328
|
"div",
|
|
1954
1329
|
{
|
|
1955
1330
|
style: {
|
|
1956
|
-
width: `${(
|
|
1957
|
-
backgroundImage:
|
|
1331
|
+
width: `${(I > 0 ? _ / I : 0) * 100}%`,
|
|
1332
|
+
backgroundImage: S.background
|
|
1958
1333
|
},
|
|
1959
1334
|
className: "absolute top-0 left-0 h-full opacity-20"
|
|
1960
1335
|
}
|
|
1961
1336
|
),
|
|
1962
|
-
/* @__PURE__ */
|
|
1963
|
-
|
|
1964
|
-
/* @__PURE__ */
|
|
1965
|
-
/* @__PURE__ */ e
|
|
1337
|
+
/* @__PURE__ */ r("div", { className: "absolute flex flex-col", children: [
|
|
1338
|
+
c && /* @__PURE__ */ e("div", { className: "w-24 pb-2", children: /* @__PURE__ */ e("img", { src: c, alt: "", className: "w-24 aspect-square rounded-xl" }) }),
|
|
1339
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
1340
|
+
/* @__PURE__ */ e(
|
|
1966
1341
|
"button",
|
|
1967
1342
|
{
|
|
1968
|
-
onClick:
|
|
1969
|
-
style:
|
|
1343
|
+
onClick: z,
|
|
1344
|
+
style: S,
|
|
1970
1345
|
className: "p-1.5 rounded-full hover:scale-110 transition-transform flex-shrink-0",
|
|
1971
|
-
children:
|
|
1346
|
+
children: m ? /* @__PURE__ */ e(Re, { fill: p, className: "w-3 h-3 text-transparent" }) : /* @__PURE__ */ e(Fe, { fill: p, className: "w-3 h-3 text-transparent" })
|
|
1972
1347
|
}
|
|
1973
1348
|
),
|
|
1974
|
-
/* @__PURE__ */ e
|
|
1349
|
+
/* @__PURE__ */ e("div", { className: "flex w-full min-w-12 items-center gap-0.5 h-6", children: [...Array(12)].map((N, E) => /* @__PURE__ */ e(
|
|
1975
1350
|
"div",
|
|
1976
1351
|
{
|
|
1977
1352
|
className: "rounded-full transition-all duration-200",
|
|
1978
1353
|
style: {
|
|
1979
1354
|
width: "100%",
|
|
1980
1355
|
background: `linear-gradient(to top, ${g[0]}, ${g[1]})`,
|
|
1981
|
-
height:
|
|
1982
|
-
opacity:
|
|
1356
|
+
height: m ? `${8 + Math.sin((T * 8 + E) * 0.6) * 10}px` : "8px",
|
|
1357
|
+
opacity: m ? 0.8 : 0.4
|
|
1983
1358
|
}
|
|
1984
1359
|
},
|
|
1985
|
-
|
|
1360
|
+
E
|
|
1986
1361
|
)) })
|
|
1987
1362
|
] })
|
|
1988
1363
|
] })
|
|
@@ -1990,13 +1365,13 @@ function Gt({ audio: o, thumbnail: u, gradient: g = ["#cd7eff", "#fe59f6"], back
|
|
|
1990
1365
|
}
|
|
1991
1366
|
);
|
|
1992
1367
|
}
|
|
1993
|
-
function
|
|
1994
|
-
video:
|
|
1995
|
-
name:
|
|
1368
|
+
function yt({
|
|
1369
|
+
video: i,
|
|
1370
|
+
name: c = "No video loaded",
|
|
1996
1371
|
audioVisual: g = null,
|
|
1997
|
-
volume:
|
|
1998
|
-
thumbnail:
|
|
1999
|
-
controls:
|
|
1372
|
+
volume: p = 100,
|
|
1373
|
+
thumbnail: q = null,
|
|
1374
|
+
controls: m = {
|
|
2000
1375
|
play: !0,
|
|
2001
1376
|
pause: !0,
|
|
2002
1377
|
stop: !0,
|
|
@@ -2007,450 +1382,450 @@ function Xt({
|
|
|
2007
1382
|
equalizer: !0,
|
|
2008
1383
|
speed: !0
|
|
2009
1384
|
},
|
|
2010
|
-
mode:
|
|
2011
|
-
transparent:
|
|
2012
|
-
autoPlay:
|
|
2013
|
-
color:
|
|
2014
|
-
equalizer:
|
|
1385
|
+
mode: x = "light",
|
|
1386
|
+
transparent: v = !1,
|
|
1387
|
+
autoPlay: P = !1,
|
|
1388
|
+
color: T = "#3b82f6",
|
|
1389
|
+
equalizer: U = {
|
|
2015
1390
|
bass: 0,
|
|
2016
1391
|
mid: 0,
|
|
2017
1392
|
treble: 0
|
|
2018
1393
|
}
|
|
2019
1394
|
}) {
|
|
2020
|
-
const [
|
|
2021
|
-
bass:
|
|
2022
|
-
mid:
|
|
2023
|
-
treble:
|
|
2024
|
-
}), [
|
|
2025
|
-
|
|
2026
|
-
const
|
|
2027
|
-
if (!
|
|
2028
|
-
const
|
|
2029
|
-
for (let
|
|
2030
|
-
|
|
1395
|
+
const [I, M] = f(!1), [_, H] = f(0), [z, S] = f(0), [N, E] = f(p || 100), [oe, ae] = f(!1), [fe, Q] = f(!1), [G, se] = f(!1), [le, O] = f([]), [de, R] = f(!1), [F, j] = f({
|
|
1396
|
+
bass: U.bass || 0,
|
|
1397
|
+
mid: U.mid || 0,
|
|
1398
|
+
treble: U.treble || 0
|
|
1399
|
+
}), [ie, ue] = f(1), [ee, K] = f(0), k = y(null), u = y(null), A = y(null), X = y(null), me = y(null), V = y(null), te = y(null), Z = y(null), $ = y(null), re = y(null), Y = y(0), a = y(0), d = y(0), b = y(0), B = y(0), D = y(0), J = y(!1), o = x === "dark" || G, h = typeof m == "object" && Object.keys(m).length === 0;
|
|
1400
|
+
C(() => {
|
|
1401
|
+
const t = u.current;
|
|
1402
|
+
if (!t) return;
|
|
1403
|
+
const n = new ResizeObserver((s) => {
|
|
1404
|
+
for (let l of s)
|
|
1405
|
+
K(l.contentRect.width);
|
|
2031
1406
|
});
|
|
2032
|
-
return
|
|
2033
|
-
}, []),
|
|
2034
|
-
const
|
|
2035
|
-
|
|
2036
|
-
}, [
|
|
2037
|
-
if (!
|
|
2038
|
-
const
|
|
2039
|
-
|
|
1407
|
+
return n.observe(t), () => n.disconnect();
|
|
1408
|
+
}, []), C(() => {
|
|
1409
|
+
const t = [];
|
|
1410
|
+
i && typeof i != "string" && t.push(["TypeError", "video must be a string (URL or path)"]), c && typeof c != "string" && t.push(["TypeError", "name must be a string"]), (typeof p != "number" || p < 0 || p > 100) && t.push(["TypeError", "volume must be a number between 0 and 100"]), g && typeof g != "object" ? t.push(["TypeError", "audioVisual must be an object"]) : g && (["left", "right", "top", "bottom"].includes(g.side) || t.push(["ValueError", "audioVisual.side must be 'left', 'right', 'top', or 'bottom'"])), t.length > 0 ? (O(t), console.group("%cVideoPlayer: Prop validation failed", "color:red"), t.forEach((n) => console.error(`${n[0]}: ${n[1]}`)), console.groupEnd()) : O([]);
|
|
1411
|
+
}, [i, c, p, g, m, x]), C(() => {
|
|
1412
|
+
if (!k.current) return;
|
|
1413
|
+
const t = k.current, n = () => {
|
|
1414
|
+
fe || H(t.currentTime);
|
|
1415
|
+
}, s = () => {
|
|
1416
|
+
S(t.duration);
|
|
2040
1417
|
}, l = () => {
|
|
2041
|
-
|
|
2042
|
-
},
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
return r.addEventListener("timeupdate", a), r.addEventListener("loadedmetadata", l), r.addEventListener("ended", i), r.addEventListener("play", w), r.addEventListener("pause", I), () => {
|
|
2046
|
-
r.removeEventListener("timeupdate", a), r.removeEventListener("loadedmetadata", l), r.removeEventListener("ended", i), r.removeEventListener("play", w), r.removeEventListener("pause", I);
|
|
1418
|
+
M(!1), $.current && cancelAnimationFrame($.current);
|
|
1419
|
+
}, w = () => M(!0), L = () => M(!1);
|
|
1420
|
+
return t.addEventListener("timeupdate", n), t.addEventListener("loadedmetadata", s), t.addEventListener("ended", l), t.addEventListener("play", w), t.addEventListener("pause", L), () => {
|
|
1421
|
+
t.removeEventListener("timeupdate", n), t.removeEventListener("loadedmetadata", s), t.removeEventListener("ended", l), t.removeEventListener("play", w), t.removeEventListener("pause", L);
|
|
2047
1422
|
};
|
|
2048
|
-
}, [
|
|
2049
|
-
if (
|
|
2050
|
-
const
|
|
2051
|
-
if (
|
|
2052
|
-
|
|
2053
|
-
const
|
|
2054
|
-
|
|
1423
|
+
}, [fe]), C(() => {
|
|
1424
|
+
if (i) {
|
|
1425
|
+
const t = I, n = N;
|
|
1426
|
+
if (k.current && k.current.pause(), k.current) {
|
|
1427
|
+
k.current.pause(), k.current.src = i, k.current.volume = oe ? 0 : n / 100;
|
|
1428
|
+
const s = () => {
|
|
1429
|
+
t && k.current && k.current.play().catch((l) => console.error("Play failed:", l)), k.current && k.current.removeEventListener("canplay", s);
|
|
2055
1430
|
};
|
|
2056
|
-
|
|
1431
|
+
k.current.addEventListener("canplay", s), k.current.load();
|
|
2057
1432
|
}
|
|
2058
|
-
|
|
1433
|
+
H(0), M(!1), Y.current = 0, a.current = 0, d.current = 0, b.current = 0, B.current = 0, D.current = 0, he();
|
|
2059
1434
|
}
|
|
2060
|
-
}, [
|
|
2061
|
-
|
|
2062
|
-
}, [
|
|
2063
|
-
|
|
2064
|
-
}, [
|
|
2065
|
-
|
|
2066
|
-
}, [F]),
|
|
2067
|
-
|
|
2068
|
-
}, [
|
|
2069
|
-
const
|
|
2070
|
-
|
|
1435
|
+
}, [i]), C(() => {
|
|
1436
|
+
k.current && (k.current.volume = oe ? 0 : N / 100);
|
|
1437
|
+
}, [N, oe]), C(() => {
|
|
1438
|
+
k.current && (k.current.playbackRate = ie);
|
|
1439
|
+
}, [ie]), C(() => {
|
|
1440
|
+
A.current && (V.current && (V.current.gain.value = F.bass), te.current && (te.current.gain.value = F.mid), Z.current && (Z.current.gain.value = F.treble));
|
|
1441
|
+
}, [F]), C(() => {
|
|
1442
|
+
J.current = I, $.current && (cancelAnimationFrame($.current), $.current = null), I && g ? (A.current || ge(), we()) : !I && g && qe();
|
|
1443
|
+
}, [I, g]), C(() => {
|
|
1444
|
+
const t = () => {
|
|
1445
|
+
se(!!document.fullscreenElement);
|
|
2071
1446
|
};
|
|
2072
|
-
return document.addEventListener("fullscreenchange",
|
|
2073
|
-
}, []),
|
|
2074
|
-
|
|
1447
|
+
return document.addEventListener("fullscreenchange", t), () => document.removeEventListener("fullscreenchange", t);
|
|
1448
|
+
}, []), C(() => () => {
|
|
1449
|
+
$.current && cancelAnimationFrame($.current), A.current && A.current.close().catch((t) => console.warn("AudioContext cleanup error:", t));
|
|
2075
1450
|
}, []);
|
|
2076
|
-
const
|
|
2077
|
-
if (!
|
|
1451
|
+
const ge = () => {
|
|
1452
|
+
if (!A.current && k.current)
|
|
2078
1453
|
try {
|
|
2079
|
-
const
|
|
2080
|
-
if (
|
|
2081
|
-
const
|
|
2082
|
-
|
|
2083
|
-
const
|
|
2084
|
-
|
|
2085
|
-
const
|
|
2086
|
-
|
|
2087
|
-
const w =
|
|
1454
|
+
const t = window.AudioContext || window.webkitAudioContext;
|
|
1455
|
+
if (t) {
|
|
1456
|
+
const n = new t();
|
|
1457
|
+
A.current = n;
|
|
1458
|
+
const s = n.createBiquadFilter();
|
|
1459
|
+
s.type = "lowshelf", s.frequency.value = 320, s.gain.value = F.bass;
|
|
1460
|
+
const l = n.createBiquadFilter();
|
|
1461
|
+
l.type = "peaking", l.frequency.value = 1e3, l.Q.value = 0.5, l.gain.value = F.mid;
|
|
1462
|
+
const w = n.createBiquadFilter();
|
|
2088
1463
|
w.type = "highshelf", w.frequency.value = 3200, w.gain.value = F.treble;
|
|
2089
|
-
const
|
|
2090
|
-
|
|
2091
|
-
const
|
|
2092
|
-
|
|
1464
|
+
const L = n.createAnalyser();
|
|
1465
|
+
L.fftSize = 2048, L.smoothingTimeConstant = 0.8;
|
|
1466
|
+
const ne = n.createMediaElementSource(k.current);
|
|
1467
|
+
ne.connect(s), s.connect(l), l.connect(w), w.connect(L), w.connect(n.destination), V.current = s, te.current = l, Z.current = w, X.current = L, me.current = ne;
|
|
2093
1468
|
}
|
|
2094
|
-
} catch (
|
|
2095
|
-
console.error("Failed to setup audio context:",
|
|
1469
|
+
} catch (t) {
|
|
1470
|
+
console.error("Failed to setup audio context:", t);
|
|
2096
1471
|
}
|
|
2097
1472
|
}, qe = () => {
|
|
2098
|
-
if (
|
|
2099
|
-
|
|
2100
|
-
const
|
|
2101
|
-
|
|
2102
|
-
const
|
|
2103
|
-
|
|
2104
|
-
},
|
|
2105
|
-
if (!
|
|
2106
|
-
const
|
|
2107
|
-
|
|
2108
|
-
let
|
|
2109
|
-
for (let
|
|
2110
|
-
|
|
2111
|
-
let
|
|
2112
|
-
|
|
1473
|
+
if (J.current) return;
|
|
1474
|
+
Y.current *= 0.7, a.current *= 0.7;
|
|
1475
|
+
const t = Date.now();
|
|
1476
|
+
t - B.current > 1500 && (d.current *= 0.95), t - D.current > 1500 && (b.current *= 0.95), he();
|
|
1477
|
+
const n = Math.max(Y.current, a.current), s = Math.max(d.current, b.current);
|
|
1478
|
+
n > 0.01 || s > 0.01 ? $.current = requestAnimationFrame(qe) : (J.current || (Y.current = 0, a.current = 0, d.current = 0, b.current = 0, he()), $.current && cancelAnimationFrame($.current), $.current = null);
|
|
1479
|
+
}, we = () => {
|
|
1480
|
+
if (!X.current || !J.current) return;
|
|
1481
|
+
const t = X.current.frequencyBinCount, n = new Uint8Array(t);
|
|
1482
|
+
X.current.getByteFrequencyData(n);
|
|
1483
|
+
let s = 0;
|
|
1484
|
+
for (let L = 0; L < t; L++)
|
|
1485
|
+
s += n[L];
|
|
1486
|
+
let l = s / t / 255;
|
|
1487
|
+
l = Math.pow(l, 0.5), Y.current = Y.current * 0.7 + l * 0.3, a.current = a.current * 0.7 + l * 0.3;
|
|
2113
1488
|
const w = Date.now();
|
|
2114
|
-
|
|
2115
|
-
},
|
|
2116
|
-
if (!
|
|
2117
|
-
const
|
|
2118
|
-
g.side === "top" || g.side === "bottom" ?
|
|
1489
|
+
Y.current > d.current ? (d.current = Y.current, B.current = w) : w - B.current > 1500 && (d.current *= 0.95), a.current > b.current ? (b.current = a.current, D.current = w) : w - D.current > 1500 && (b.current *= 0.95), he(), $.current = requestAnimationFrame(we);
|
|
1490
|
+
}, he = () => {
|
|
1491
|
+
if (!re.current || !g) return;
|
|
1492
|
+
const t = g.color || "#00ff00", n = g.peak || "#ff0000", s = Y.current * 100, l = a.current * 100, w = 100 - d.current * 100, L = 100 - b.current * 100;
|
|
1493
|
+
g.side === "top" || g.side === "bottom" ? re.current.innerHTML = `
|
|
2119
1494
|
<div class="flex flex-col gap-1 h-full justify-center">
|
|
2120
1495
|
<div class="flex items-center justify-center gap-2">
|
|
2121
|
-
<div class="text-xs ${
|
|
1496
|
+
<div class="text-xs ${o ? "text-gray-100" : "text-gray-900"} opacity-80 w-4 text-center">L</div>
|
|
2122
1497
|
<div class="relative flex-1 h-3 bg-black/40 rounded-full overflow-hidden flex justify-end">
|
|
2123
|
-
<div class="h-full rounded-l-full transition-all duration-75" style="width: ${
|
|
2124
|
-
${
|
|
1498
|
+
<div class="h-full rounded-l-full transition-all duration-75" style="width: ${s}%; background: ${t};"></div>
|
|
1499
|
+
${d.current > 0.1 ? `<div class="absolute top-0 w-1 h-full transition-all duration-100" style="right: ${d.current * 100}%; background: ${n};"></div>` : ""}
|
|
2125
1500
|
</div>
|
|
2126
1501
|
<div class="w-px h-4 bg-white/20"></div>
|
|
2127
1502
|
<div class="relative flex-1 h-3 bg-black/40 rounded-full overflow-hidden flex justify-start">
|
|
2128
|
-
<div class="h-full rounded-r-full transition-all duration-75" style="width: ${
|
|
2129
|
-
${
|
|
1503
|
+
<div class="h-full rounded-r-full transition-all duration-75" style="width: ${l}%; background: ${t};"></div>
|
|
1504
|
+
${b.current > 0.1 ? `<div class="absolute top-0 w-1 h-full transition-all duration-100" style="left: ${b.current * 100}%; background: ${n};"></div>` : ""}
|
|
2130
1505
|
</div>
|
|
2131
|
-
<div class="text-xs ${
|
|
1506
|
+
<div class="text-xs ${o ? "text-gray-100" : "text-gray-900"} opacity-80 w-4 text-center">R</div>
|
|
2132
1507
|
</div>
|
|
2133
1508
|
</div>
|
|
2134
|
-
` :
|
|
1509
|
+
` : re.current.innerHTML = `
|
|
2135
1510
|
<div class="flex gap-2 h-full">
|
|
2136
1511
|
<div class="flex-1 flex flex-col">
|
|
2137
1512
|
<div class="text-xs text-white opacity-70 text-center mb-1">L</div>
|
|
2138
1513
|
<div class="flex-1 relative flex flex-col justify-end bg-black/30 rounded-lg overflow-hidden">
|
|
2139
|
-
<div class="rounded-t transition-all duration-75" style="height: ${
|
|
2140
|
-
${
|
|
1514
|
+
<div class="rounded-t transition-all duration-75" style="height: ${s}%; background: ${t};">
|
|
1515
|
+
${d.current > 0.1 ? `<div class="absolute w-full h-1 transition-all duration-100" style="top: ${w}%; background: ${n};"></div>` : ""}
|
|
2141
1516
|
</div>
|
|
2142
1517
|
</div>
|
|
2143
1518
|
</div>
|
|
2144
1519
|
<div class="flex-1 flex flex-col">
|
|
2145
1520
|
<div class="text-xs text-white opacity-70 text-center mb-1">R</div>
|
|
2146
1521
|
<div class="flex-1 relative flex flex-col justify-end bg-black/30 rounded-lg overflow-hidden">
|
|
2147
|
-
<div class="rounded-t transition-all duration-75" style="height: ${
|
|
2148
|
-
${
|
|
1522
|
+
<div class="rounded-t transition-all duration-75" style="height: ${l}%; background: ${t};">
|
|
1523
|
+
${b.current > 0.1 ? `<div class="absolute w-full h-1 transition-all duration-100" style="top: ${L}%; background: ${n};"></div>` : ""}
|
|
2149
1524
|
</div>
|
|
2150
1525
|
</div>
|
|
2151
1526
|
</div>
|
|
2152
1527
|
`;
|
|
2153
|
-
},
|
|
2154
|
-
!
|
|
2155
|
-
},
|
|
2156
|
-
|
|
2157
|
-
},
|
|
2158
|
-
const
|
|
2159
|
-
|
|
2160
|
-
},
|
|
2161
|
-
|
|
2162
|
-
},
|
|
2163
|
-
const
|
|
2164
|
-
|
|
2165
|
-
},
|
|
2166
|
-
|
|
2167
|
-
},
|
|
2168
|
-
|
|
2169
|
-
},
|
|
2170
|
-
|
|
2171
|
-
...
|
|
2172
|
-
[
|
|
2173
|
-
})),
|
|
2174
|
-
},
|
|
2175
|
-
|
|
2176
|
-
},
|
|
2177
|
-
if (isNaN(
|
|
2178
|
-
const
|
|
2179
|
-
return `${
|
|
1528
|
+
}, ke = () => {
|
|
1529
|
+
!k.current || !i || (I ? k.current.pause() : (A.current && A.current.state === "suspended" && A.current.resume(), k.current.play().catch((t) => console.error("Play failed:", t))));
|
|
1530
|
+
}, pe = () => {
|
|
1531
|
+
k.current && (k.current.pause(), k.current.currentTime = 0, M(!1), H(0), Y.current = 0, a.current = 0, d.current = 0, b.current = 0, he());
|
|
1532
|
+
}, Ee = (t) => {
|
|
1533
|
+
const s = parseFloat(t.target.value) / 100 * z;
|
|
1534
|
+
H(s), k.current && !fe && (k.current.currentTime = s);
|
|
1535
|
+
}, Te = () => Q(!0), Le = () => {
|
|
1536
|
+
k.current && (k.current.currentTime = _), Q(!1);
|
|
1537
|
+
}, Pe = (t) => {
|
|
1538
|
+
const n = parseInt(t.target.value);
|
|
1539
|
+
E(n), ae(n === 0);
|
|
1540
|
+
}, Me = (t) => {
|
|
1541
|
+
ue(parseFloat(t.target.value));
|
|
1542
|
+
}, je = () => ae(!oe), ze = () => {
|
|
1543
|
+
u.current && (document.fullscreenElement ? document.exitFullscreen() : u.current.requestFullscreen().catch((t) => console.error("Fullscreen failed:", t)));
|
|
1544
|
+
}, Ne = (t, n) => {
|
|
1545
|
+
j((s) => ({
|
|
1546
|
+
...s,
|
|
1547
|
+
[t]: n
|
|
1548
|
+
})), A.current && (t === "bass" && V.current && (V.current.gain.value = n), t === "mid" && te.current && (te.current.gain.value = n), t === "treble" && Z.current && (Z.current.gain.value = n));
|
|
1549
|
+
}, Se = () => {
|
|
1550
|
+
j({ bass: 0, mid: 0, treble: 0 });
|
|
1551
|
+
}, ve = (t) => {
|
|
1552
|
+
if (isNaN(t)) return "0:00";
|
|
1553
|
+
const n = Math.floor(t / 60), s = Math.floor(t % 60);
|
|
1554
|
+
return `${n}:${s.toString().padStart(2, "0")}`;
|
|
2180
1555
|
};
|
|
2181
|
-
if (
|
|
2182
|
-
(
|
|
2183
|
-
}, [
|
|
2184
|
-
return
|
|
2185
|
-
/* @__PURE__ */
|
|
2186
|
-
|
|
1556
|
+
if (C(() => {
|
|
1557
|
+
(h && !I || P) && ke();
|
|
1558
|
+
}, [m]), le && le.length > 0)
|
|
1559
|
+
return le.map((t, n) => /* @__PURE__ */ r("div", { className: "text-red-500 text-sm bg-red-50 p-3 rounded mb-4 border border-red-300", children: [
|
|
1560
|
+
/* @__PURE__ */ r("strong", { children: [
|
|
1561
|
+
t[0],
|
|
2187
1562
|
":"
|
|
2188
1563
|
] }),
|
|
2189
1564
|
" ",
|
|
2190
|
-
|
|
2191
|
-
] },
|
|
2192
|
-
const
|
|
2193
|
-
return /* @__PURE__ */ e
|
|
1565
|
+
t[1]
|
|
1566
|
+
] }, n));
|
|
1567
|
+
const ye = g ? g.side : null, $e = ye === "top" || ye === "bottom";
|
|
1568
|
+
return /* @__PURE__ */ e(
|
|
2194
1569
|
"div",
|
|
2195
1570
|
{
|
|
2196
|
-
ref:
|
|
2197
|
-
className: `rounded-xl overflow-hidden transition-all duration-300 ${
|
|
2198
|
-
style: { backgroundColor:
|
|
2199
|
-
children: /* @__PURE__ */
|
|
2200
|
-
|
|
2201
|
-
/* @__PURE__ */
|
|
2202
|
-
g &&
|
|
2203
|
-
/* @__PURE__ */
|
|
2204
|
-
g &&
|
|
2205
|
-
/* @__PURE__ */
|
|
2206
|
-
/* @__PURE__ */
|
|
1571
|
+
ref: u,
|
|
1572
|
+
className: `rounded-xl overflow-hidden transition-all duration-300 ${G ? "fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black" : "relative"}`,
|
|
1573
|
+
style: { backgroundColor: h || v ? void 0 : o ? "#49494937" : "white" },
|
|
1574
|
+
children: /* @__PURE__ */ r("div", { style: { background: h || v ? void 0 : o ? "#1a1a1ab0" : "#f5f5f5", height: G ? "100%" : "auto" }, className: `${h || v ? "" : "p-4"} ${G ? "flex flex-col flex-1" : ""}`, children: [
|
|
1575
|
+
m.videoName && !G && /* @__PURE__ */ e("div", { className: "mb-4", children: /* @__PURE__ */ e("div", { className: `${o ? "text-gray-100" : "text-gray-700"} font-medium`, children: c }) }),
|
|
1576
|
+
/* @__PURE__ */ r("div", { className: `relative ${$e ? "flex flex-col gap-3" : "flex gap-3"} ${G ? "flex-1 min-h-0" : "mb-4"}`, children: [
|
|
1577
|
+
g && ye === "top" && /* @__PURE__ */ e("div", { className: "w-full h-12", ref: re }),
|
|
1578
|
+
/* @__PURE__ */ r("div", { className: `flex ${!$e && "flex-1"} gap-3`, children: [
|
|
1579
|
+
g && ye === "left" && /* @__PURE__ */ e("div", { className: "w-12 bg-black/50 rounded-lg p-1", ref: re }),
|
|
1580
|
+
/* @__PURE__ */ r("div", { className: `flex-1 ${o ? "bg-black/70" : "bg-white/70"} rounded-lg overflow-hidden relative`, children: [
|
|
1581
|
+
/* @__PURE__ */ r(
|
|
2207
1582
|
"video",
|
|
2208
1583
|
{
|
|
2209
|
-
ref:
|
|
1584
|
+
ref: k,
|
|
2210
1585
|
className: "w-full h-full object-contain",
|
|
2211
|
-
poster:
|
|
1586
|
+
poster: q || void 0,
|
|
2212
1587
|
children: [
|
|
2213
|
-
|
|
1588
|
+
i && /* @__PURE__ */ e("source", { src: i }),
|
|
2214
1589
|
"Your browser does not support the video tag."
|
|
2215
1590
|
]
|
|
2216
1591
|
}
|
|
2217
1592
|
),
|
|
2218
|
-
|
|
2219
|
-
/* @__PURE__ */ e
|
|
2220
|
-
/* @__PURE__ */
|
|
2221
|
-
/* @__PURE__ */
|
|
2222
|
-
/* @__PURE__ */
|
|
2223
|
-
/* @__PURE__ */ e
|
|
2224
|
-
/* @__PURE__ */
|
|
1593
|
+
de && /* @__PURE__ */ e("div", { className: "absolute inset-0 flex flex-col w-full justify-center z-10 rounded-lg p-4 shadow-sm transition-all duration-300", children: /* @__PURE__ */ r("div", { className: `max-w-[600px] w-full mx-auto flex flex-col justify-center z-10 ${o ? "bg-black/70" : "bg-white/80"} rounded-lg p-4 shadow-sm transition-all duration-300`, children: [
|
|
1594
|
+
/* @__PURE__ */ e("h3", { className: `text-sm font-medium mb-4 ${o ? "text-gray-200" : "text-gray-700"}`, children: "Equalizer" }),
|
|
1595
|
+
/* @__PURE__ */ r("div", { className: "space-y-4", children: [
|
|
1596
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1597
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1598
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: "Bass" }),
|
|
1599
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
2225
1600
|
F.bass,
|
|
2226
1601
|
" dB"
|
|
2227
1602
|
] })
|
|
2228
1603
|
] }),
|
|
2229
|
-
/* @__PURE__ */
|
|
2230
|
-
/* @__PURE__ */ e
|
|
2231
|
-
/* @__PURE__ */ e
|
|
1604
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1605
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1606
|
+
/* @__PURE__ */ e(
|
|
2232
1607
|
"input",
|
|
2233
1608
|
{
|
|
2234
1609
|
type: "range",
|
|
2235
1610
|
min: "-20",
|
|
2236
1611
|
max: "20",
|
|
2237
1612
|
value: F.bass,
|
|
2238
|
-
onChange: (
|
|
1613
|
+
onChange: (t) => Ne("bass", parseInt(t.target.value)),
|
|
2239
1614
|
className: "flex-1 h-6 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
2240
1615
|
style: {
|
|
2241
|
-
background: `linear-gradient(to right, ${
|
|
1616
|
+
background: `linear-gradient(to right, ${T} ${(F.bass + 20) / 40 * 100}%, #e5e7eb ${(F.bass + 20) / 40 * 100}%)`
|
|
2242
1617
|
}
|
|
2243
1618
|
}
|
|
2244
1619
|
),
|
|
2245
|
-
/* @__PURE__ */ e
|
|
1620
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
2246
1621
|
] })
|
|
2247
1622
|
] }),
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
/* @__PURE__ */ e
|
|
2251
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1624
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1625
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: "Mid" }),
|
|
1626
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
2252
1627
|
F.mid,
|
|
2253
1628
|
" dB"
|
|
2254
1629
|
] })
|
|
2255
1630
|
] }),
|
|
2256
|
-
/* @__PURE__ */
|
|
2257
|
-
/* @__PURE__ */ e
|
|
2258
|
-
/* @__PURE__ */ e
|
|
1631
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1632
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1633
|
+
/* @__PURE__ */ e(
|
|
2259
1634
|
"input",
|
|
2260
1635
|
{
|
|
2261
1636
|
type: "range",
|
|
2262
1637
|
min: "-20",
|
|
2263
1638
|
max: "20",
|
|
2264
1639
|
value: F.mid,
|
|
2265
|
-
onChange: (
|
|
1640
|
+
onChange: (t) => Ne("mid", parseInt(t.target.value)),
|
|
2266
1641
|
className: "flex-1 h-6 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
2267
1642
|
style: {
|
|
2268
|
-
background: `linear-gradient(to right, ${
|
|
1643
|
+
background: `linear-gradient(to right, ${T} ${(F.mid + 20) / 40 * 100}%, #e5e7eb ${(F.mid + 20) / 40 * 100}%)`
|
|
2269
1644
|
}
|
|
2270
1645
|
}
|
|
2271
1646
|
),
|
|
2272
|
-
/* @__PURE__ */ e
|
|
1647
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
2273
1648
|
] })
|
|
2274
1649
|
] }),
|
|
2275
|
-
/* @__PURE__ */
|
|
2276
|
-
/* @__PURE__ */
|
|
2277
|
-
/* @__PURE__ */ e
|
|
2278
|
-
/* @__PURE__ */
|
|
1650
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1651
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
|
|
1652
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
|
|
1653
|
+
/* @__PURE__ */ r("span", { className: `text-xs ${o ? "text-gray-300" : "text-gray-600"}`, children: [
|
|
2279
1654
|
F.treble,
|
|
2280
1655
|
" dB"
|
|
2281
1656
|
] })
|
|
2282
1657
|
] }),
|
|
2283
|
-
/* @__PURE__ */
|
|
2284
|
-
/* @__PURE__ */ e
|
|
2285
|
-
/* @__PURE__ */ e
|
|
1658
|
+
/* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1659
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
|
|
1660
|
+
/* @__PURE__ */ e(
|
|
2286
1661
|
"input",
|
|
2287
1662
|
{
|
|
2288
1663
|
type: "range",
|
|
2289
1664
|
min: "-20",
|
|
2290
1665
|
max: "20",
|
|
2291
1666
|
value: F.treble,
|
|
2292
|
-
onChange: (
|
|
1667
|
+
onChange: (t) => Ne("treble", parseInt(t.target.value)),
|
|
2293
1668
|
className: "flex-1 h-6 bg-gray-300 rounded-lg appearance-none cursor-pointer eq-slider",
|
|
2294
1669
|
style: {
|
|
2295
|
-
background: `linear-gradient(to right, ${
|
|
1670
|
+
background: `linear-gradient(to right, ${T} ${(F.treble + 20) / 40 * 100}%, #e5e7eb ${(F.treble + 20) / 40 * 100}%)`
|
|
2296
1671
|
}
|
|
2297
1672
|
}
|
|
2298
1673
|
),
|
|
2299
|
-
/* @__PURE__ */ e
|
|
1674
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
|
|
2300
1675
|
] })
|
|
2301
1676
|
] })
|
|
2302
1677
|
] }),
|
|
2303
|
-
/* @__PURE__ */
|
|
2304
|
-
/* @__PURE__ */ e
|
|
1678
|
+
/* @__PURE__ */ r("div", { className: "flex justify-between mt-6", children: [
|
|
1679
|
+
/* @__PURE__ */ e(
|
|
2305
1680
|
"button",
|
|
2306
1681
|
{
|
|
2307
|
-
onClick:
|
|
2308
|
-
className: `px-3 py-1 rounded text-xs ${
|
|
1682
|
+
onClick: Se,
|
|
1683
|
+
className: `px-3 py-1 rounded text-xs ${o ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
2309
1684
|
children: "Reset"
|
|
2310
1685
|
}
|
|
2311
1686
|
),
|
|
2312
|
-
/* @__PURE__ */ e
|
|
1687
|
+
/* @__PURE__ */ e(
|
|
2313
1688
|
"button",
|
|
2314
1689
|
{
|
|
2315
|
-
onClick: () =>
|
|
2316
|
-
className: `ml-2 px-3 py-1 rounded text-xs ${
|
|
1690
|
+
onClick: () => R(!1),
|
|
1691
|
+
className: `ml-2 px-3 py-1 rounded text-xs ${o ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
|
|
2317
1692
|
children: "Close"
|
|
2318
1693
|
}
|
|
2319
1694
|
)
|
|
2320
1695
|
] })
|
|
2321
1696
|
] }) })
|
|
2322
1697
|
] }),
|
|
2323
|
-
g &&
|
|
1698
|
+
g && ye === "right" && /* @__PURE__ */ e("div", { className: "w-12 bg-black/50 rounded-lg p-1", ref: re })
|
|
2324
1699
|
] }),
|
|
2325
|
-
g &&
|
|
1700
|
+
g && ye === "bottom" && /* @__PURE__ */ e("div", { className: "w-full h-12", ref: re })
|
|
2326
1701
|
] }),
|
|
2327
|
-
|
|
2328
|
-
/* @__PURE__ */ e
|
|
2329
|
-
/* @__PURE__ */ e
|
|
1702
|
+
m.seekbar && /* @__PURE__ */ e("div", { className: `mb-4 ${G ? "mt-3" : ""}`, children: /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
|
|
1703
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-100" : "text-gray-600"} font-mono w-12`, children: ve(_) }),
|
|
1704
|
+
/* @__PURE__ */ e(
|
|
2330
1705
|
"input",
|
|
2331
1706
|
{
|
|
2332
1707
|
type: "range",
|
|
2333
1708
|
min: "0",
|
|
2334
1709
|
max: "100",
|
|
2335
|
-
value:
|
|
2336
|
-
onChange:
|
|
2337
|
-
onMouseDown:
|
|
2338
|
-
onMouseUp:
|
|
2339
|
-
onTouchStart:
|
|
2340
|
-
onTouchEnd:
|
|
2341
|
-
disabled: !
|
|
1710
|
+
value: z > 0 ? _ / z * 100 : 0,
|
|
1711
|
+
onChange: Ee,
|
|
1712
|
+
onMouseDown: Te,
|
|
1713
|
+
onMouseUp: Le,
|
|
1714
|
+
onTouchStart: Te,
|
|
1715
|
+
onTouchEnd: Le,
|
|
1716
|
+
disabled: !i,
|
|
2342
1717
|
className: "flex-1 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer disabled:opacity-40 disabled:cursor-not-allowed",
|
|
2343
1718
|
style: {
|
|
2344
|
-
background:
|
|
1719
|
+
background: i && z > 0 ? `linear-gradient(to right, ${T} ${_ / z * 100}%, #e5e7eb ${_ / z * 100}%)` : "#e5e7eb"
|
|
2345
1720
|
}
|
|
2346
1721
|
}
|
|
2347
1722
|
),
|
|
2348
|
-
/* @__PURE__ */ e
|
|
1723
|
+
/* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-100" : "text-gray-600"} font-mono w-12 text-right`, children: ve(z) })
|
|
2349
1724
|
] }) }),
|
|
2350
|
-
/* @__PURE__ */
|
|
2351
|
-
|
|
1725
|
+
/* @__PURE__ */ r("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
1726
|
+
m.play && /* @__PURE__ */ r(
|
|
2352
1727
|
"button",
|
|
2353
1728
|
{
|
|
2354
|
-
onClick:
|
|
2355
|
-
disabled: !
|
|
2356
|
-
style: { backgroundColor:
|
|
2357
|
-
className: `${
|
|
1729
|
+
onClick: ke,
|
|
1730
|
+
disabled: !i,
|
|
1731
|
+
style: { backgroundColor: T },
|
|
1732
|
+
className: `${ee > 400 ? " px-4 py-2" : "px-3 py-5"} rounded-full text-sm font-medium text-white hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-2 transition-all`,
|
|
2358
1733
|
children: [
|
|
2359
|
-
/* @__PURE__ */
|
|
2360
|
-
/* @__PURE__ */ e
|
|
2361
|
-
/* @__PURE__ */ e
|
|
1734
|
+
/* @__PURE__ */ r("div", { className: "relative w-4 flex items-center", children: [
|
|
1735
|
+
/* @__PURE__ */ e(Re, { size: 16, className: `${I ? "" : "scale-0 translate-y-10"} transition-all absolute` }),
|
|
1736
|
+
/* @__PURE__ */ e(Fe, { size: 16, className: `${I ? "scale-0 -translate-y-10" : ""} transition-all absolute` })
|
|
2362
1737
|
] }),
|
|
2363
|
-
|
|
1738
|
+
ee > 400 && (I ? "Pause" : "Play")
|
|
2364
1739
|
]
|
|
2365
1740
|
}
|
|
2366
1741
|
),
|
|
2367
|
-
|
|
1742
|
+
m.stop && /* @__PURE__ */ e(
|
|
2368
1743
|
"button",
|
|
2369
1744
|
{
|
|
2370
|
-
onClick:
|
|
2371
|
-
disabled: !
|
|
2372
|
-
className: `${
|
|
2373
|
-
children: /* @__PURE__ */ e
|
|
1745
|
+
onClick: pe,
|
|
1746
|
+
disabled: !i,
|
|
1747
|
+
className: `${o ? "bg-gray-100 text-black hover:bg-gray-300" : "bg-gray-700 text-white hover:bg-gray-800"} px-3 py-3 rounded-full text-sm font-medium disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-2 transition-all`,
|
|
1748
|
+
children: /* @__PURE__ */ e(Ue, { size: 16 })
|
|
2374
1749
|
}
|
|
2375
1750
|
),
|
|
2376
|
-
|
|
1751
|
+
m.fullscreen && /* @__PURE__ */ r(
|
|
2377
1752
|
"button",
|
|
2378
1753
|
{
|
|
2379
|
-
onClick:
|
|
2380
|
-
className: `${
|
|
1754
|
+
onClick: ze,
|
|
1755
|
+
className: `${ee < 800 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${o ? "bg-gray-100 text-black hover:bg-gray-300" : "bg-gray-700 text-white hover:bg-gray-800"}`,
|
|
2381
1756
|
children: [
|
|
2382
|
-
|
|
2383
|
-
/* @__PURE__ */ e
|
|
1757
|
+
G ? /* @__PURE__ */ e(et, { size: 16 }) : /* @__PURE__ */ e(Ye, { size: 16 }),
|
|
1758
|
+
/* @__PURE__ */ e("span", { style: { display: ee < 800 ? "none" : "block" }, children: G ? "Exit" : "Full" })
|
|
2384
1759
|
]
|
|
2385
1760
|
}
|
|
2386
1761
|
),
|
|
2387
|
-
|
|
1762
|
+
m.equalizer && /* @__PURE__ */ r(
|
|
2388
1763
|
"button",
|
|
2389
1764
|
{
|
|
2390
|
-
onClick: () =>
|
|
2391
|
-
disabled: !
|
|
2392
|
-
className: `${
|
|
2393
|
-
style:
|
|
1765
|
+
onClick: () => R(!de),
|
|
1766
|
+
disabled: !i,
|
|
1767
|
+
className: `${ee < 700 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${de ? "text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-300"} disabled:opacity-40 disabled:cursor-not-allowed`,
|
|
1768
|
+
style: de ? { backgroundColor: T } : {},
|
|
2394
1769
|
children: [
|
|
2395
|
-
/* @__PURE__ */ e
|
|
2396
|
-
/* @__PURE__ */ e
|
|
1770
|
+
/* @__PURE__ */ e(Ae, { size: 16 }),
|
|
1771
|
+
/* @__PURE__ */ e("span", { style: { display: ee < 700 ? "none" : "block" }, children: "EQ" })
|
|
2397
1772
|
]
|
|
2398
1773
|
}
|
|
2399
1774
|
),
|
|
2400
|
-
|
|
1775
|
+
m.speed && /* @__PURE__ */ e("div", { className: "flex items-center", children: /* @__PURE__ */ r(
|
|
2401
1776
|
"select",
|
|
2402
1777
|
{
|
|
2403
|
-
value:
|
|
2404
|
-
onChange:
|
|
2405
|
-
className: `rounded-full text-sm font-medium border-none outline-none cursor-pointer transition-all bg-transparent ${
|
|
1778
|
+
value: ie,
|
|
1779
|
+
onChange: Me,
|
|
1780
|
+
className: `rounded-full text-sm font-medium border-none outline-none cursor-pointer transition-all bg-transparent ${o ? "text-gray-200" : "text-gray-800"}`,
|
|
2406
1781
|
children: [
|
|
2407
|
-
/* @__PURE__ */ e
|
|
2408
|
-
/* @__PURE__ */ e
|
|
2409
|
-
/* @__PURE__ */ e
|
|
2410
|
-
/* @__PURE__ */ e
|
|
2411
|
-
/* @__PURE__ */ e
|
|
2412
|
-
/* @__PURE__ */ e
|
|
1782
|
+
/* @__PURE__ */ e("option", { value: "0.5", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "0.5x" }),
|
|
1783
|
+
/* @__PURE__ */ e("option", { value: "0.75", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "0.75x" }),
|
|
1784
|
+
/* @__PURE__ */ e("option", { value: "1", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1x" }),
|
|
1785
|
+
/* @__PURE__ */ e("option", { value: "1.25", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1.25x" }),
|
|
1786
|
+
/* @__PURE__ */ e("option", { value: "1.5", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1.5x" }),
|
|
1787
|
+
/* @__PURE__ */ e("option", { value: "2", className: o ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "2x" })
|
|
2413
1788
|
]
|
|
2414
1789
|
}
|
|
2415
1790
|
) }),
|
|
2416
|
-
|
|
2417
|
-
/* @__PURE__ */ e
|
|
1791
|
+
m.volume && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 md:gap-3 ml-auto", children: [
|
|
1792
|
+
/* @__PURE__ */ e(
|
|
2418
1793
|
"button",
|
|
2419
1794
|
{
|
|
2420
|
-
onClick:
|
|
1795
|
+
onClick: je,
|
|
2421
1796
|
className: "p-2 rounded-lg hover:bg-gray-100 transition-all",
|
|
2422
|
-
children:
|
|
1797
|
+
children: oe || N === 0 ? /* @__PURE__ */ e(De, { size: 20, className: o ? "text-gray-100" : "text-gray-600" }) : /* @__PURE__ */ e(He, { size: 20, className: o ? "text-gray-100" : "text-gray-600" })
|
|
2423
1798
|
}
|
|
2424
1799
|
),
|
|
2425
|
-
/* @__PURE__ */ e
|
|
1800
|
+
/* @__PURE__ */ e(
|
|
2426
1801
|
"input",
|
|
2427
1802
|
{
|
|
2428
1803
|
type: "range",
|
|
2429
1804
|
min: "0",
|
|
2430
1805
|
max: "100",
|
|
2431
|
-
value:
|
|
2432
|
-
onChange:
|
|
1806
|
+
value: N,
|
|
1807
|
+
onChange: Pe,
|
|
2433
1808
|
className: "hide-for-xs w-24 h-2 bg-gray-200 rounded-lg appearance-none cursor-pointer",
|
|
2434
1809
|
style: {
|
|
2435
|
-
background: `linear-gradient(to right, ${
|
|
2436
|
-
display:
|
|
1810
|
+
background: `linear-gradient(to right, ${T} ${N}%, #e5e7eb ${N}%)`,
|
|
1811
|
+
display: ee < 460 ? "none" : "block"
|
|
2437
1812
|
}
|
|
2438
1813
|
}
|
|
2439
1814
|
),
|
|
2440
|
-
/* @__PURE__ */
|
|
2441
|
-
|
|
1815
|
+
/* @__PURE__ */ r("span", { style: { display: ee < 800 ? "none" : "block" }, className: `text-xs ${o ? "text-gray-100" : "text-gray-700"} font-mono w-10 text-right`, children: [
|
|
1816
|
+
N,
|
|
2442
1817
|
"%"
|
|
2443
1818
|
] })
|
|
2444
1819
|
] })
|
|
2445
1820
|
] }),
|
|
2446
|
-
/* @__PURE__ */ e
|
|
1821
|
+
/* @__PURE__ */ e("style", { children: `
|
|
2447
1822
|
input[type="range"]::-webkit-slider-thumb {
|
|
2448
1823
|
-webkit-appearance: none;
|
|
2449
1824
|
appearance: none;
|
|
2450
1825
|
width: 16px;
|
|
2451
1826
|
height: 16px;
|
|
2452
1827
|
border-radius: 50%;
|
|
2453
|
-
background: ${
|
|
1828
|
+
background: ${T};
|
|
2454
1829
|
cursor: pointer;
|
|
2455
1830
|
border: 2px solid white;
|
|
2456
1831
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
@@ -2460,7 +1835,7 @@ function Xt({
|
|
|
2460
1835
|
width: 16px;
|
|
2461
1836
|
height: 16px;
|
|
2462
1837
|
border-radius: 50%;
|
|
2463
|
-
background: ${
|
|
1838
|
+
background: ${T};
|
|
2464
1839
|
cursor: pointer;
|
|
2465
1840
|
border: 2px solid white;
|
|
2466
1841
|
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
|
|
@@ -2494,49 +1869,39 @@ function Xt({
|
|
|
2494
1869
|
}
|
|
2495
1870
|
);
|
|
2496
1871
|
}
|
|
2497
|
-
function
|
|
2498
|
-
const [
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
var Y;
|
|
2507
|
-
(Y = S.current) == null || Y.click();
|
|
2508
|
-
};
|
|
2509
|
-
return /* @__PURE__ */ e.jsx("div", { className: "min-h-screen flex items-center justify-center p-4 md:p-8", style: { backgroundColor: M === "dark" ? "#222" : "white" }, children: /* @__PURE__ */ e.jsxs("div", { className: "w-full h-full md:h-auto md:max-w-4xl", children: [
|
|
2510
|
-
k && /* @__PURE__ */ e.jsx(Ut, { theme: _, setTheme: p, close: () => y(!1) }),
|
|
2511
|
-
/* @__PURE__ */ e.jsxs("div", { className: "container-glass rounded-xl p-8", children: [
|
|
2512
|
-
/* @__PURE__ */ e.jsxs("div", { className: "mb-6 flex justify-between items-start", children: [
|
|
2513
|
-
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2514
|
-
/* @__PURE__ */ e.jsx("h1", { className: `text-2xl font-semibold ${M === "dark" ? "text-gray-200" : "text-gray-800"} mb-1`, children: "Audio Visualizer" }),
|
|
2515
|
-
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-gray-500", children: "Professional frequency analyzer" })
|
|
1872
|
+
function bt() {
|
|
1873
|
+
const [i, c] = f(null), [g, p] = f("No track loaded"), [q, m] = f("purple"), [x, v] = f(!1), [P, T] = f(!1), [U, I] = f("light"), M = y(null);
|
|
1874
|
+
return /* @__PURE__ */ e("div", { className: "min-h-screen flex items-center justify-center p-4 md:p-8", style: { backgroundColor: U === "dark" ? "#222" : "white" }, children: /* @__PURE__ */ r("div", { className: "w-full h-full md:h-auto md:max-w-4xl", children: [
|
|
1875
|
+
x && /* @__PURE__ */ e(ut, { theme: q, setTheme: m, close: () => v(!1) }),
|
|
1876
|
+
/* @__PURE__ */ r("div", { className: "container-glass rounded-xl p-8", children: [
|
|
1877
|
+
/* @__PURE__ */ r("div", { className: "mb-6 flex justify-between items-start", children: [
|
|
1878
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1879
|
+
/* @__PURE__ */ e("h1", { className: `text-2xl font-semibold ${U === "dark" ? "text-gray-200" : "text-gray-800"} mb-1`, children: "Audio Visualizer" }),
|
|
1880
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-gray-500", children: "Professional frequency analyzer" })
|
|
2516
1881
|
] }),
|
|
2517
|
-
/* @__PURE__ */
|
|
1882
|
+
/* @__PURE__ */ r(
|
|
2518
1883
|
"button",
|
|
2519
1884
|
{
|
|
2520
|
-
onClick: () =>
|
|
1885
|
+
onClick: () => v(!x),
|
|
2521
1886
|
className: "bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 flex items-center gap-2",
|
|
2522
1887
|
children: [
|
|
2523
|
-
/* @__PURE__ */ e
|
|
1888
|
+
/* @__PURE__ */ e("span", { children: "🎨" }),
|
|
2524
1889
|
" Themes"
|
|
2525
1890
|
]
|
|
2526
1891
|
}
|
|
2527
1892
|
)
|
|
2528
1893
|
] }),
|
|
2529
|
-
/* @__PURE__ */ e
|
|
2530
|
-
|
|
1894
|
+
/* @__PURE__ */ e(
|
|
1895
|
+
gt,
|
|
2531
1896
|
{
|
|
2532
|
-
audio:
|
|
1897
|
+
audio: i || void 0,
|
|
2533
1898
|
name: g || void 0,
|
|
2534
1899
|
author: "K.Prabhasha",
|
|
2535
|
-
theme:
|
|
1900
|
+
theme: q,
|
|
2536
1901
|
autoPlay: !1,
|
|
2537
1902
|
thumbnail: "https://cdn-icons-png.flaticon.com/512/3845/3845874.png",
|
|
2538
|
-
mode:
|
|
2539
|
-
transparent:
|
|
1903
|
+
mode: U,
|
|
1904
|
+
transparent: P,
|
|
2540
1905
|
volume: 70,
|
|
2541
1906
|
controls: {
|
|
2542
1907
|
play: !0,
|
|
@@ -2549,46 +1914,56 @@ function Qt() {
|
|
|
2549
1914
|
}
|
|
2550
1915
|
}
|
|
2551
1916
|
),
|
|
2552
|
-
/* @__PURE__ */ e
|
|
2553
|
-
/* @__PURE__ */ e
|
|
2554
|
-
/* @__PURE__ */
|
|
2555
|
-
/* @__PURE__ */ e
|
|
1917
|
+
/* @__PURE__ */ e(ft, { audio: i || "", width: 400, thumbnail: "https://cdn-icons-png.flaticon.com/512/8316/8316619.png", autoPlay: !1, gradient: ["#26ce3aff", "#39eed9ff"], background: "#c0ffefff" }),
|
|
1918
|
+
/* @__PURE__ */ e(mt, { audio: i || "", thumbnail: "https://cdn-icons-png.flaticon.com/512/17524/17524837.png", autoPlay: !1, gradient: ["#26ce3aff", "#39eed9ff"], background: "#c0ffefff" }),
|
|
1919
|
+
/* @__PURE__ */ r("div", { className: "mt-6 flex flex-wrap items-center gap-3", children: [
|
|
1920
|
+
/* @__PURE__ */ e(
|
|
2556
1921
|
"input",
|
|
2557
1922
|
{
|
|
2558
1923
|
type: "file",
|
|
2559
|
-
ref:
|
|
2560
|
-
onChange:
|
|
1924
|
+
ref: M,
|
|
1925
|
+
onChange: (z) => {
|
|
1926
|
+
var N;
|
|
1927
|
+
const S = (N = z.target.files) == null ? void 0 : N[0];
|
|
1928
|
+
if (S) {
|
|
1929
|
+
const E = URL.createObjectURL(S);
|
|
1930
|
+
c(E), p(S.name);
|
|
1931
|
+
}
|
|
1932
|
+
},
|
|
2561
1933
|
accept: "audio/*",
|
|
2562
1934
|
className: "hidden"
|
|
2563
1935
|
}
|
|
2564
1936
|
),
|
|
2565
|
-
/* @__PURE__ */
|
|
1937
|
+
/* @__PURE__ */ r(
|
|
2566
1938
|
"button",
|
|
2567
1939
|
{
|
|
2568
|
-
onClick:
|
|
1940
|
+
onClick: () => {
|
|
1941
|
+
var z;
|
|
1942
|
+
(z = M.current) == null || z.click();
|
|
1943
|
+
},
|
|
2569
1944
|
className: "bg-white border border-gray-300 text-gray-700 px-6 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 flex items-center gap-2",
|
|
2570
1945
|
children: [
|
|
2571
|
-
/* @__PURE__ */ e
|
|
1946
|
+
/* @__PURE__ */ e(ct, { size: 16 }),
|
|
2572
1947
|
"Load Audio"
|
|
2573
1948
|
]
|
|
2574
1949
|
}
|
|
2575
1950
|
),
|
|
2576
|
-
/* @__PURE__ */ e
|
|
1951
|
+
/* @__PURE__ */ e(
|
|
2577
1952
|
"button",
|
|
2578
1953
|
{
|
|
2579
|
-
onClick: () =>
|
|
1954
|
+
onClick: () => I(U === "dark" ? "light" : "dark"),
|
|
2580
1955
|
className: "bg-white border border-gray-300 text-gray-700 px-6 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 flex items-center gap-2",
|
|
2581
|
-
children:
|
|
1956
|
+
children: U === "dark" ? "Light" : "Dark"
|
|
2582
1957
|
}
|
|
2583
1958
|
),
|
|
2584
|
-
/* @__PURE__ */
|
|
1959
|
+
/* @__PURE__ */ r(
|
|
2585
1960
|
"button",
|
|
2586
1961
|
{
|
|
2587
|
-
onClick: () =>
|
|
1962
|
+
onClick: () => T(!P),
|
|
2588
1963
|
className: "bg-white border border-gray-300 text-gray-700 px-6 py-2 rounded-lg text-sm font-medium hover:bg-gray-50 flex items-center gap-2",
|
|
2589
1964
|
children: [
|
|
2590
1965
|
"Transparent: ",
|
|
2591
|
-
String(
|
|
1966
|
+
String(P)
|
|
2592
1967
|
]
|
|
2593
1968
|
}
|
|
2594
1969
|
)
|
|
@@ -2597,11 +1972,11 @@ function Qt() {
|
|
|
2597
1972
|
] }) });
|
|
2598
1973
|
}
|
|
2599
1974
|
export {
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
1975
|
+
bt as DemoVisualizePlayer,
|
|
1976
|
+
mt as NanoAudioPlayer,
|
|
1977
|
+
ut as ThemeSelector,
|
|
1978
|
+
yt as VideoPlayer,
|
|
1979
|
+
gt as VisualizePlayer,
|
|
1980
|
+
ft as WaveAudioPlayer,
|
|
1981
|
+
be as themes
|
|
2607
1982
|
};
|