ecplayer 1.0.0 → 1.0.2

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.
@@ -1,645 +1,20 @@
1
- import xt, { forwardRef as gt, createElement as rt, useState as v, useRef as C, useEffect as L } from "react";
2
- var nt = { exports: {} }, Je = {};
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 Ct = (o) => o.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Rt = (o) => o.replace(
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
- (u, g, m) => m ? m.toUpperCase() : g.toLowerCase()
637
- ), ft = (o) => {
638
- const u = Rt(o);
639
- return u.charAt(0).toUpperCase() + u.slice(1);
640
- }, pt = (...o) => o.filter((u, g, m) => !!u && u.trim() !== "" && m.indexOf(u) === g).join(" ").trim(), Tt = (o) => {
641
- for (const u in o)
642
- if (u.startsWith("aria-") || u === "role" || u === "title")
11
+ (c, g, h) => h ? h.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, h) => !!c && c.trim() !== "" && h.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 Pt = {
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 qt = gt(
43
+ const Xe = Oe(
669
44
  ({
670
- color: o = "currentColor",
671
- size: u = 24,
45
+ color: i = "currentColor",
46
+ size: c = 24,
672
47
  strokeWidth: g = 2,
673
- absoluteStrokeWidth: m,
674
- className: _ = "",
675
- children: p,
676
- iconNode: k,
677
- ...y
678
- }, N) => rt(
48
+ absoluteStrokeWidth: h,
49
+ className: q = "",
50
+ children: m,
51
+ iconNode: x,
52
+ ...v
53
+ }, P) => Ie(
679
54
  "svg",
680
55
  {
681
- ref: N,
682
- ...Pt,
683
- width: u,
684
- height: u,
685
- stroke: o,
686
- strokeWidth: m ? Number(g) * 24 / Number(u) : g,
687
- className: pt("lucide", _),
688
- ...!p && !Tt(y) && { "aria-hidden": "true" },
689
- ...y
56
+ ref: P,
57
+ ...Ke,
58
+ width: c,
59
+ height: c,
60
+ stroke: i,
61
+ strokeWidth: h ? 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
- ...k.map(([q, M]) => rt(q, M)),
693
- ...Array.isArray(p) ? p : [p]
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 Pe = (o, u) => {
704
- const g = gt(
705
- ({ className: m, ..._ }, p) => rt(qt, {
706
- ref: p,
707
- iconNode: u,
708
- className: pt(
709
- `lucide-${Ct(ft(o))}`,
710
- `lucide-${o}`,
711
- m
78
+ const ce = (i, c) => {
79
+ const g = Oe(
80
+ ({ className: h, ...q }, m) => Ie(Xe, {
81
+ ref: m,
82
+ iconNode: c,
83
+ className: Ve(
84
+ `lucide-${We(_e(i))}`,
85
+ `lucide-${i}`,
86
+ h
712
87
  ),
713
- ..._
88
+ ...q
714
89
  })
715
90
  );
716
- return g.displayName = ft(o), g;
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 _t = [
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
- ], St = Pe("maximize", _t);
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 At = [
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
- ], Ft = Pe("minimize", At);
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 Lt = [
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
- ], Ze = Pe("pause", Lt);
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 Mt = [
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
- ], et = Pe("play", Mt);
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 Ot = [
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
- ], zt = Pe("repeat", Ot);
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 It = [
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
- ], Qe = Pe("sliders-vertical", It);
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 Dt = [
177
+ const lt = [
803
178
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
804
- ], mt = Pe("square", Dt);
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 Bt = [
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
- ], Ht = Pe("upload", Bt);
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 Wt = [
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
- ], at = Pe("volume-2", Wt);
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 Vt = [
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
- ], st = Pe("volume-x", Vt), Ae = {
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 Ut({ theme: o, setTheme: u, close: g }) {
950
- const m = Object.keys(Ae).map((_) => ({
951
- key: _,
952
- name: Ae[_].name,
953
- colors: Ae[_].bars
324
+ function ut({ theme: i, setTheme: c, close: g }) {
325
+ const h = Object.keys(be).map((q) => ({
326
+ key: q,
327
+ name: be[q].name,
328
+ colors: be[q].bars
954
329
  }));
955
- return /* @__PURE__ */ e.jsxs("div", { className: "container-glass rounded-xl p-6 mb-6", children: [
956
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between items-center mb-4", children: [
957
- /* @__PURE__ */ e.jsx("h2", { className: "text-lg font-semibold text-gray-800", children: "Choose Color Palette" }),
958
- /* @__PURE__ */ e.jsx(
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.jsx("div", { className: "theme-selector grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3", children: m.map((_) => /* @__PURE__ */ e.jsxs(
342
+ /* @__PURE__ */ e("div", { className: "theme-selector grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 gap-3", children: h.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 ${o === _.key ? "border-current shadow-lg" : "border-transparent"}`,
971
- onClick: () => u(_.key),
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.jsx("div", { className: "color-preview h-10 rounded mb-2", style: { background: `linear-gradient(to right, ${_.colors.join(", ")})` } }),
974
- /* @__PURE__ */ e.jsx("div", { className: "text-sm font-medium text-gray-700", children: _.name })
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
- _.key
352
+ q.key
978
353
  )) })
979
354
  ] });
980
355
  }
981
- function Yt({
982
- audio: o,
983
- name: u = "No track loaded",
356
+ function gt({
357
+ audio: i,
358
+ name: c = "No track loaded",
984
359
  author: g,
985
- theme: m = "rainbow",
986
- volume: _ = 100,
987
- thumbnail: p = null,
988
- controls: k = {
360
+ theme: h = "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: y = "light",
1000
- bands: N = null,
1001
- transparent: q = !1,
1002
- autoPlay: M = !1,
1003
- equalizer: O = {
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 [S, V] = v(!1), [U, Y] = v(0), [K, $] = v(0), [b, we] = v(_ || 100), [me, $e] = v(!1), [se, ce] = v(!1), [ye, he] = v(!1), [X, ke] = v([]), [H, F] = v(!1), [z, fe] = v({
1010
- bass: O.bass || 0,
1011
- mid: O.mid || 0,
1012
- treble: O.treble || 0
1013
- }), [be, ue] = v(1), [le, R] = v(0), f = C(null), B = C(null), ie = C(null), Ne = C(null), Q = C(null), xe = C(null), ne = C(null), T = C(null), oe = C(null), ae = C(null);
1014
- L(() => {
1015
- const r = ae.current;
1016
- if (!r) return;
1017
- const a = new ResizeObserver((l) => {
1018
- for (let i of l)
1019
- R(i.contentRect.width);
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 a.observe(r), () => a.disconnect();
1022
- }, []), L(() => {
1023
- const r = [];
1024
- if (o && typeof o != "string" && r.push(["TypeError", "audio must be a string (URL or path)"]), u && typeof u != "string" && r.push(["TypeError", "name must be a string"]), m && typeof m != "string" && typeof m != "object")
1025
- r.push(["TypeError", "theme must be a string or a valid theme object"]);
1026
- else if (typeof m == "object") {
1027
- const a = ["name", "bg", "bars", "peak", "button", "buttonHover", "slider"];
1028
- for (const l of a)
1029
- l in m || r.push(["ThemeError", `theme object missing key: ${l}`]);
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"]), h && typeof h != "string" && typeof h != "object")
400
+ t.push(["TypeError", "theme must be a string or a valid theme object"]);
401
+ else if (typeof h == "object") {
402
+ const n = ["name", "bg", "bars", "peak", "button", "buttonHover", "slider"];
403
+ for (const s of n)
404
+ s in h || t.push(["ThemeError", `theme object missing key: ${s}`]);
1030
405
  }
1031
- (typeof _ != "number" || _ < 0 || _ > 100) && r.push(["TypeError", "volume must be a number between 0 and 100"]), typeof k != "object" || Array.isArray(k) ? r.push(["TypeError", "controls must be an object"]) : ["play", "pause", "stop", "seekbar", "volume", "loop", "trackName", "equalizer"].forEach((l) => {
1032
- k && l in k && typeof k[l] != "boolean" && r.push(["TypeError", `controls.${l} must be a boolean`]);
1033
- }), N && (Array.isArray(N) ? N.length === 0 ? r.push(["ValueError", "bands array cannot be empty"]) : N.forEach((a, l) => {
1034
- typeof a.freq != "number" && r.push(["TypeError", `bands[${l}].freq must be a number`]);
1035
- }) : r.push(["TypeError", "bands must be an array"])), r.length > 0 ? (ke(r), console.group("%cVisualizePlayer: Prop validation failed", "color:red"), r.forEach((a) => console.error(`${a[0]}: ${a[1]}`)), console.groupEnd()) : ke([]);
1036
- }, [o, u, m, _, k, y, N]);
1037
- const s = N || [
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, h, 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
- ], x = C(s.map(() => 0)), E = C(s.map(() => 0)), G = C(s.map(() => 0)), J = C(!1), te = C(typeof m == "string" ? m : "purple");
1070
- let d = typeof m == "string" ? Ae[m] || Ae.purple : typeof m == "object" ? m : Ae.purple;
1071
- const j = y === "dark", ve = typeof k == "object" && Object.keys(k).length === 0;
1072
- L(() => {
1073
- typeof m == "string" ? te.current = m : te.current = "purple", Ce();
1074
- }, [m]), L(() => {
1075
- f.current || (f.current = new Audio());
1076
- const r = f.current, a = () => {
1077
- ye || Y(r.currentTime);
444
+ ], d = y(a.map(() => 0)), b = y(a.map(() => 0)), B = y(a.map(() => 0)), D = y(!1), J = y(typeof h == "string" ? h : "purple");
445
+ let o = typeof h == "string" ? be[h] || be.purple : typeof h == "object" ? h : be.purple;
446
+ const p = v === "dark", ge = typeof x == "object" && Object.keys(x).length === 0;
447
+ C(() => {
448
+ typeof h == "string" ? J.current = h : J.current = "purple", he();
449
+ }, [h]), 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
- $(r.duration);
1080
- }, i = () => {
1081
- se || (V(!1), T.current && cancelAnimationFrame(T.current));
1082
- }, w = () => V(!0), I = () => V(!1);
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
- }, [ye, se]), L(() => () => {
1087
- f.current && (f.current.pause(), f.current.src = "", f.current.load()), B.current && B.current.close().catch((r) => console.warn("AudioContext cleanup error:", r)), T.current && cancelAnimationFrame(T.current);
1088
- }, []), L(() => {
1089
- if (o) {
1090
- const r = S, a = b, l = se;
1091
- if (T.current && (cancelAnimationFrame(T.current), T.current = null), Ne.current) {
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
- Ne.current.disconnect();
1094
- } catch (Z) {
1095
- console.warn("Source disconnect error:", Z);
468
+ me.current.disconnect();
469
+ } catch (W) {
470
+ console.warn("Source disconnect error:", W);
1096
471
  }
1097
- Ne.current = null;
472
+ me.current = null;
1098
473
  }
1099
- if (ie.current) {
474
+ if (X.current) {
1100
475
  try {
1101
- ie.current.disconnect();
1102
- } catch (Z) {
1103
- console.warn("Analyser disconnect error:", Z);
476
+ X.current.disconnect();
477
+ } catch (W) {
478
+ console.warn("Analyser disconnect error:", W);
1104
479
  }
1105
- ie.current = null;
480
+ X.current = null;
1106
481
  }
1107
- if (Q.current) {
482
+ if (V.current) {
1108
483
  try {
1109
- Q.current.disconnect();
1110
- } catch (Z) {
1111
- console.warn("Bass filter disconnect error:", Z);
484
+ V.current.disconnect();
485
+ } catch (W) {
486
+ console.warn("Bass filter disconnect error:", W);
1112
487
  }
1113
- Q.current = null;
488
+ V.current = null;
1114
489
  }
1115
- if (xe.current) {
490
+ if (te.current) {
1116
491
  try {
1117
- xe.current.disconnect();
1118
- } catch (Z) {
1119
- console.warn("Mid filter disconnect error:", Z);
492
+ te.current.disconnect();
493
+ } catch (W) {
494
+ console.warn("Mid filter disconnect error:", W);
1120
495
  }
1121
- xe.current = null;
496
+ te.current = null;
1122
497
  }
1123
- if (ne.current) {
498
+ if (Z.current) {
1124
499
  try {
1125
- ne.current.disconnect();
1126
- } catch (Z) {
1127
- console.warn("Treble filter disconnect error:", Z);
500
+ Z.current.disconnect();
501
+ } catch (W) {
502
+ console.warn("Treble filter disconnect error:", W);
1128
503
  }
1129
- ne.current = null;
504
+ Z.current = null;
1130
505
  }
1131
- B.current && (B.current.close().catch((Z) => console.warn("AudioContext close error:", Z)), B.current = null), f.current && (f.current.pause(), f.current.src = "", f.current.load()), f.current = new Audio();
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
- f.current.crossOrigin = "anonymous";
1134
- } catch (Z) {
1135
- console.debug("Could not set crossOrigin on audio element", Z);
508
+ u.current.crossOrigin = "anonymous";
509
+ } catch (W) {
510
+ console.debug("Could not set crossOrigin on audio element", W);
1136
511
  }
1137
- f.current.src = o, f.current.preload = "auto", f.current.muted = !1, f.current.volume = me ? 0 : a / 100, f.current.loop = l, f.current.load();
1138
- const i = f.current, w = () => {
1139
- ye || Y(i.currentTime);
1140
- }, I = () => {
1141
- $(i.duration);
1142
- }, de = () => {
1143
- se || (V(!1), T.current && cancelAnimationFrame(T.current));
1144
- }, Te = () => V(!0), De = () => V(!1);
1145
- i.addEventListener("timeupdate", w), i.addEventListener("loadedmetadata", I), i.addEventListener("ended", de), i.addEventListener("play", Te), i.addEventListener("pause", De), Y(0), V(!1), console.debug("Audio element created", { src: f.current.src, volume: f.current.volume, loop: f.current.loop }), x.current = s.map(() => 0), E.current = s.map(() => 0), G.current = s.map(() => 0), Ce(), r && f.current.play().catch((Z) => console.error("Play failed:", Z));
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), he(), t && u.current.play().catch((W) => console.error("Play failed:", W));
1146
521
  }
1147
- }, [o]), L(() => {
1148
- f.current && (f.current.volume = me ? 0 : b / 100);
1149
- }, [b, me]), L(() => {
1150
- f.current && (f.current.loop = se);
1151
- }, [se]), L(() => {
1152
- f.current && (f.current.playbackRate = be);
1153
- }, [be]), L(() => {
1154
- B.current && (Q.current && (Q.current.gain.value = z.bass), xe.current && (xe.current.gain.value = z.mid), ne.current && (ne.current.gain.value = z.treble));
1155
- }, [z]), L(() => {
1156
- J.current = S, T.current && (cancelAnimationFrame(T.current), T.current = null), S ? (B.current || qe(), _e()) : Ee();
1157
- }, [S]);
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()) : pe();
532
+ }, [M]);
1158
533
  const qe = () => {
1159
- if (!B.current && f.current)
534
+ if (!A.current && u.current)
1160
535
  try {
1161
- const r = window.AudioContext || window.webkitAudioContext;
1162
- if (r) {
1163
- const a = new r();
1164
- B.current = a;
1165
- const l = a.createBiquadFilter();
1166
- l.type = "lowshelf", l.frequency.value = 320, l.gain.value = z.bass;
1167
- const i = a.createBiquadFilter();
1168
- i.type = "peaking", i.frequency.value = 1e3, i.Q.value = 0.5, i.gain.value = z.mid;
1169
- const w = a.createBiquadFilter();
1170
- w.type = "highshelf", w.frequency.value = 3200, w.gain.value = z.treble;
1171
- const I = a.createAnalyser();
1172
- I.fftSize = 8192, I.smoothingTimeConstant = 0.7;
1173
- const de = a.createMediaElementSource(f.current);
1174
- de.connect(l), l.connect(i), i.connect(w), w.connect(I), I.connect(a.destination), Q.current = l, xe.current = i, ne.current = w, ie.current = I, Ne.current = de;
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 (r) {
1177
- console.error("Failed to setup audio context:", r);
551
+ } catch (t) {
552
+ console.error("Failed to setup audio context:", t);
1178
553
  }
1179
- }, Fe = (r) => {
1180
- const a = B.current, l = ie.current;
1181
- if (!a || !l) return 0;
1182
- const i = a.sampleRate / 2, w = Math.round(r / i * l.frequencyBinCount);
1183
- return Math.min(w, l.frequencyBinCount - 1);
1184
- }, Ee = () => {
1185
- if (J.current) return;
1186
- x.current = x.current.map((i) => i * 0.7);
1187
- const r = Date.now();
1188
- E.current = E.current.map((i, w) => r - G.current[w] > 1500 ? i * 0.95 : i), Ce();
1189
- const a = Math.max(...x.current), l = Math.max(...E.current);
1190
- a > 0.01 || l > 0.01 ? T.current = requestAnimationFrame(Ee) : (J.current || (x.current = s.map(() => 0), E.current = s.map(() => 0), G.current = s.map(() => 0), Ce()), T.current && cancelAnimationFrame(T.current), T.current = null);
1191
- }, _e = () => {
1192
- if (!ie.current || !J.current) return;
1193
- const r = ie.current.frequencyBinCount, a = new Uint8Array(r);
1194
- ie.current.getByteFrequencyData(a), s.forEach((l, i) => {
1195
- const w = Fe(l.freq), I = i < s.length - 1 ? Fe(s[i + 1].freq) : a.length;
1196
- let de = 0, Te = 0;
1197
- for (let Ge = w; Ge < I; Ge++)
1198
- de += a[Ge], Te++;
1199
- let De = Te > 0 ? de / Te / 255 : 0;
1200
- De = Math.pow(De, 0.6), x.current[i] = x.current[i] * 0.8 + De * 0.2;
1201
- const Z = Date.now();
1202
- x.current[i] > E.current[i] ? (E.current[i] = x.current[i], G.current[i] = Z) : Z - G.current[i] > 1500 && (E.current[i] *= 0.95);
1203
- }), Ce(), T.current = requestAnimationFrame(_e);
1204
- }, Ce = () => {
1205
- if (!oe.current) return;
1206
- const r = Ae[te.current] || Ae.rainbow;
1207
- let a = "";
1208
- s.forEach((l, i) => {
1209
- const w = x.current[i] * 100, I = 100 - E.current[i] * 100, de = Math.floor(i / s.length * r.bars.length), Te = r.bars[Math.min(de, r.bars.length - 1)];
1210
- a += `
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
+ }, pe = () => {
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), he();
564
+ const n = Math.max(...d.current), s = Math.max(...b.current);
565
+ n > 0.01 || s > 0.01 ? $.current = requestAnimationFrame(pe) : (D.current || (d.current = a.map(() => 0), b.current = a.map(() => 0), B.current = a.map(() => 0), he()), $.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
+ }), he(), $.current = requestAnimationFrame(ke);
579
+ }, he = () => {
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: ${Te};">
1213
- ${E.current[i] > 0.1 ? `<div class="absolute w-full h-0.5 transition-all duration-100" style="top: ${I}%; background: ${r.peak};"></div>` : ""}
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
- }), oe.current.innerHTML = a;
1218
- }, He = () => {
1219
- !f.current || !o || (S ? f.current.pause() : (B.current && B.current.state === "suspended" && B.current.resume(), f.current.play().catch((r) => console.error("Play failed:", r))));
1220
- }, Le = () => {
1221
- f.current && (f.current.pause(), f.current.currentTime = 0, V(!1), Y(0), x.current = s.map(() => 0), E.current = s.map(() => 0), G.current = s.map(() => 0), Ce());
1222
- }, Me = (r) => {
1223
- const l = parseFloat(r.target.value) / 100 * K;
1224
- Y(l), f.current && !ye && (f.current.currentTime = l);
1225
- }, Oe = () => {
1226
- he(!0);
1227
- }, We = () => {
1228
- f.current && (f.current.currentTime = U), he(!1);
1229
- }, Ve = (r) => {
1230
- const a = parseInt(r.target.value);
1231
- we(a), $e(a === 0);
1232
- }, Ue = () => {
1233
- $e(!me);
1234
- }, ze = (r) => {
1235
- ue(parseFloat(r.target.value));
1236
- }, Ke = () => {
1237
- ce(!se);
1238
- }, Se = (r, a) => {
1239
- fe((l) => ({
1240
- ...l,
1241
- [r]: a
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), he());
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
- }, Re = () => {
1244
- fe({ bass: 0, mid: 0, treble: 0 });
618
+ }, ye = () => {
619
+ ie({ bass: 0, mid: 0, treble: 0 });
1245
620
  };
1246
- L(() => {
1247
- ((typeof k == "object" && Object.keys(k).length === 0 || !k) && !S || M) && He();
1248
- }, [k]);
1249
- const Ie = (r) => {
1250
- if (isNaN(r)) return "0:00";
1251
- const a = Math.floor(r / 60), l = Math.floor(r % 60);
1252
- return `${a}:${l.toString().padStart(2, "0")}`;
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 X && X.length > 0 ? X.map((r, a) => /* @__PURE__ */ e.jsxs("div", { className: "text-red-500 text-sm bg-red-50 p-3 rounded mb-4 border border-red-300", children: [
1255
- /* @__PURE__ */ e.jsxs("strong", { children: [
1256
- r[0],
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
- r[1]
1261
- ] }, a)) : /* @__PURE__ */ e.jsx("div", { ref: ae, className: "w-full rounded-xl overflow-hidden", style: { backgroundColor: ve || q ? void 0 : j ? "#6060606a" : "#ffffffab" }, children: /* @__PURE__ */ e.jsxs("div", { style: { background: ve || q ? void 0 : d.bg }, className: ve || q ? "" : "p-4", children: [
1262
- /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
1263
- /* @__PURE__ */ e.jsx("div", { className: `${q && H ? "opacity-30" : ""} ${ve || q ? "" : j ? "bg-black/40" : "bg-white/70"} rounded-lg ${ve ? "" : "mb-6"} ${ve || q ? "" : "p-4"} shadow-sm`, children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-center items-end gap-1 h-64", ref: oe }) }),
1264
- H && /* @__PURE__ */ e.jsxs("div", { className: `absolute inset-0 flex flex-col w-full justify-center z-10 ${!(ve || q) && (j ? "bg-black/50" : "bg-white/80")} rounded-lg p-4 shadow-sm transition-all duration-300`, children: [
1265
- /* @__PURE__ */ e.jsx("h3", { className: `text-sm font-medium mb-4 ${j ? "text-gray-200" : "text-gray-700"}`, children: "Equalizer" }),
1266
- /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
1267
- /* @__PURE__ */ e.jsxs("div", { children: [
1268
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
1269
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${j ? "text-gray-300" : "text-gray-600"}`, children: "Bass" }),
1270
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${j ? "text-gray-300" : "text-gray-600"}`, children: [
1271
- z.bass,
635
+ t[1]
636
+ ] }, n)) : /* @__PURE__ */ e("div", { ref: Y, className: "w-full rounded-xl overflow-hidden", style: { backgroundColor: ge || T ? void 0 : p ? "#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 ? "" : p ? "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) && (p ? "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 ${p ? "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 ${p ? "text-gray-300" : "text-gray-600"}`, children: "Bass" }),
645
+ /* @__PURE__ */ r("span", { className: `text-xs ${p ? "text-gray-300" : "text-gray-600"}`, children: [
646
+ j.bass,
1272
647
  " dB"
1273
648
  ] })
1274
649
  ] }),
1275
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1276
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${j ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
1277
- /* @__PURE__ */ e.jsx(
650
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
651
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "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: z.bass,
1284
- onChange: (r) => Se("bass", parseInt(r.target.value)),
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, ${d.slider} ${(z.bass + 20) / 40 * 100}%, ${d.slider + "30"} ${(z.bass + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${j ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
666
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1292
667
  ] })
1293
668
  ] }),
1294
- /* @__PURE__ */ e.jsxs("div", { children: [
1295
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
1296
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${j ? "text-gray-300" : "text-gray-600"}`, children: "Mid" }),
1297
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${j ? "text-gray-300" : "text-gray-600"}`, children: [
1298
- z.mid,
669
+ /* @__PURE__ */ r("div", { children: [
670
+ /* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
671
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "text-gray-300" : "text-gray-600"}`, children: "Mid" }),
672
+ /* @__PURE__ */ r("span", { className: `text-xs ${p ? "text-gray-300" : "text-gray-600"}`, children: [
673
+ j.mid,
1299
674
  " dB"
1300
675
  ] })
1301
676
  ] }),
1302
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1303
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${j ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
1304
- /* @__PURE__ */ e.jsx(
677
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
678
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "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: z.mid,
1311
- onChange: (r) => Se("mid", parseInt(r.target.value)),
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, ${d.slider} ${(z.mid + 20) / 40 * 100}%, ${d.slider + "30"} ${(z.mid + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${j ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
693
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1319
694
  ] })
1320
695
  ] }),
1321
- /* @__PURE__ */ e.jsxs("div", { children: [
1322
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
1323
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${j ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
1324
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${j ? "text-gray-300" : "text-gray-600"}`, children: [
1325
- z.treble,
696
+ /* @__PURE__ */ r("div", { children: [
697
+ /* @__PURE__ */ r("div", { className: "flex justify-between mb-1", children: [
698
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
699
+ /* @__PURE__ */ r("span", { className: `text-xs ${p ? "text-gray-300" : "text-gray-600"}`, children: [
700
+ j.treble,
1326
701
  " dB"
1327
702
  ] })
1328
703
  ] }),
1329
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1330
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${j ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
1331
- /* @__PURE__ */ e.jsx(
704
+ /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
705
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "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: z.treble,
1338
- onChange: (r) => Se("treble", parseInt(r.target.value)),
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, ${d.slider} ${(z.treble + 20) / 40 * 100}%, ${d.slider + "30"} ${(z.treble + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${j ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
720
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1346
721
  ] })
1347
722
  ] })
1348
723
  ] }),
1349
- /* @__PURE__ */ e.jsx("div", { className: "flex justify-end mt-4", children: /* @__PURE__ */ e.jsx(
724
+ /* @__PURE__ */ e("div", { className: "flex justify-end mt-4", children: /* @__PURE__ */ e(
1350
725
  "button",
1351
726
  {
1352
- onClick: Re,
1353
- className: `px-3 py-1 rounded text-xs ${j ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
727
+ onClick: ye,
728
+ className: `px-3 py-1 rounded text-xs ${p ? "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
- k.trackName && /* @__PURE__ */ e.jsxs("div", { className: "mb-6 flex items-center", children: [
1360
- p && /* @__PURE__ */ e.jsx("div", { className: "mr-2", children: /* @__PURE__ */ e.jsx("img", { src: p, alt: "", className: `${S ? "animation-spin" : ""} h-12 w-12 rounded-full` }) }),
1361
- /* @__PURE__ */ e.jsxs("div", { children: [
1362
- /* @__PURE__ */ e.jsx("div", { className: `${j ? "text-gray-100" : "text-gray-700"} font-medium truncate`, children: u }),
1363
- g && typeof g == "string" && /* @__PURE__ */ e.jsx("div", { className: `${j ? "text-gray-300" : "text-gray-500"} text-xs`, children: g })
734
+ x.trackName && /* @__PURE__ */ r("div", { className: "mb-6 flex items-center", children: [
735
+ m && /* @__PURE__ */ e("div", { className: "mr-2", children: /* @__PURE__ */ e("img", { src: m, alt: "", className: `${M ? "animation-spin" : ""} h-12 w-12 rounded-full` }) }),
736
+ /* @__PURE__ */ r("div", { children: [
737
+ /* @__PURE__ */ e("div", { className: `${p ? "text-gray-100" : "text-gray-700"} font-medium truncate`, children: c }),
738
+ g && typeof g == "string" && /* @__PURE__ */ e("div", { className: `${p ? "text-gray-300" : "text-gray-500"} text-xs`, children: g })
1364
739
  ] })
1365
740
  ] }),
1366
- k.seekbar && /* @__PURE__ */ e.jsx("div", { className: "mb-6", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center md:gap-1", children: [
1367
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${j ? "text-gray-100" : "text-gray-600"} font-mono w-12`, children: Ie(U) }),
1368
- /* @__PURE__ */ e.jsx(
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 ${p ? "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: K > 0 ? U / K * 100 : 0,
1375
- onChange: Me,
1376
- onMouseDown: Oe,
1377
- onMouseUp: We,
1378
- onTouchStart: Oe,
1379
- onTouchEnd: We,
1380
- disabled: !o,
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: o && K > 0 ? `linear-gradient(to right, ${d.slider} ${U / K * 100}%, ${d.slider + "30"} ${U / K * 100}%)` : d.slider + "30"
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.jsx("span", { className: `text-xs ${j ? "text-gray-100" : "text-gray-600"} font-mono w-12 text-right`, children: Ie(K) })
762
+ /* @__PURE__ */ e("span", { className: `text-xs ${p ? "text-gray-100" : "text-gray-600"} font-mono w-12 text-right`, children: $e(S) })
1388
763
  ] }) }),
1389
- /* @__PURE__ */ e.jsxs("div", { className: `flex flex-wrap items-center ${le < 330 ? "gap-2" : "gap-3"}`, children: [
1390
- k.play && /* @__PURE__ */ e.jsxs(
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: He,
1394
- disabled: !o,
1395
- className: `${le < 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`,
1396
- style: { backgroundColor: d.button },
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__ */ e.jsxs("div", { className: "relative w-4 flex items-center", children: [
1399
- /* @__PURE__ */ e.jsx(Ze, { size: 16, className: `${S ? "" : "scale-0 translate-y-10"} transition-all absolute` }),
1400
- /* @__PURE__ */ e.jsx(et, { size: 16, className: `${S ? "scale-0 -translate-y-10" : ""} transition-all absolute` })
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.jsx("span", { style: { display: le < 350 ? "none" : "block" }, children: S ? "Pause" : "Play" })
777
+ /* @__PURE__ */ e("span", { style: { display: K < 350 ? "none" : "block" }, children: M ? "Pause" : "Play" })
1403
778
  ]
1404
779
  }
1405
780
  ),
1406
- k.stop && /* @__PURE__ */ e.jsxs(
781
+ x.stop && /* @__PURE__ */ r(
1407
782
  "button",
1408
783
  {
1409
- onClick: Le,
1410
- disabled: !o,
1411
- className: `${j ? "bg-gray-100 text-black" : "bg-gray-700 text-white"} ${le < 600 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium ${j ? "hover:bg-gray-300" : "hover:bg-gray-800"} disabled:opacity-40 disabled:cursor-not-allowed flex items-center gap-2 transition-all`,
784
+ onClick: Te,
785
+ disabled: !i,
786
+ className: `${p ? "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 ${p ? "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.jsx(mt, { size: 16 }),
1414
- /* @__PURE__ */ e.jsx("span", { style: { display: le < 600 ? "none" : "block" }, children: "Stop" })
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
- k.equalizer && /* @__PURE__ */ e.jsxs(
793
+ x.equalizer && /* @__PURE__ */ r(
1419
794
  "button",
1420
795
  {
1421
- onClick: () => F(!H),
1422
- disabled: !o,
1423
- className: `${le < 600 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${H ? "text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-300"} disabled:opacity-40 disabled:cursor-not-allowed`,
1424
- style: H ? { backgroundColor: d.button } : {},
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.jsx(Qe, { size: 16 }),
1427
- /* @__PURE__ */ e.jsx("span", { style: { display: le < 600 ? "none" : "block" }, children: "EQ" })
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
- k.loop && /* @__PURE__ */ e.jsxs(
806
+ x.loop && /* @__PURE__ */ r(
1432
807
  "button",
1433
808
  {
1434
- onClick: Ke,
1435
- disabled: !o,
1436
- className: `${le < 700 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${se ? "text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-300"} disabled:opacity-40 disabled:cursor-not-allowed`,
1437
- style: se ? { backgroundColor: d.button } : {},
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.jsx(zt, { size: 16, className: `${se ? "rotate-180" : ""} transition-all` }),
1440
- /* @__PURE__ */ e.jsx("span", { style: { display: le < 700 ? "none" : "block" }, children: "Loop" })
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
- k.speed && /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(
819
+ x.speed && /* @__PURE__ */ e("div", { className: "flex items-center", children: /* @__PURE__ */ r(
1445
820
  "select",
1446
821
  {
1447
- value: be,
1448
- onChange: ze,
1449
- className: `rounded-full text-sm font-medium border-none outline-none cursor-pointer transition-all bg-transparent ${j ? "text-gray-200" : "text-gray-800"}`,
822
+ value: ue,
823
+ onChange: Ne,
824
+ className: `rounded-full text-sm font-medium border-none outline-none cursor-pointer transition-all bg-transparent ${p ? "text-gray-200" : "text-gray-800"}`,
1450
825
  children: [
1451
- /* @__PURE__ */ e.jsx("option", { value: "0.5", className: j ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "0.5x" }),
1452
- /* @__PURE__ */ e.jsx("option", { value: "0.75", className: j ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "0.75x" }),
1453
- /* @__PURE__ */ e.jsx("option", { value: "1", className: j ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1x" }),
1454
- /* @__PURE__ */ e.jsx("option", { value: "1.25", className: j ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1.25x" }),
1455
- /* @__PURE__ */ e.jsx("option", { value: "1.5", className: j ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1.5x" }),
1456
- /* @__PURE__ */ e.jsx("option", { value: "2", className: j ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "2x" })
826
+ /* @__PURE__ */ e("option", { value: "0.5", className: p ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "0.5x" }),
827
+ /* @__PURE__ */ e("option", { value: "0.75", className: p ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "0.75x" }),
828
+ /* @__PURE__ */ e("option", { value: "1", className: p ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1x" }),
829
+ /* @__PURE__ */ e("option", { value: "1.25", className: p ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1.25x" }),
830
+ /* @__PURE__ */ e("option", { value: "1.5", className: p ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "1.5x" }),
831
+ /* @__PURE__ */ e("option", { value: "2", className: p ? "bg-gray-800 text-gray-100" : "bg-white text-gray-800", children: "2x" })
1457
832
  ]
1458
833
  }
1459
834
  ) }),
1460
- k.volume && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 md:gap-3 ml-auto", children: [
1461
- /* @__PURE__ */ e.jsx(
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: Ue,
839
+ onClick: ze,
1465
840
  className: "p-2 rounded-full hover:bg-gray-100/50 transition-all",
1466
- children: me || b === 0 ? /* @__PURE__ */ e.jsx(st, { size: 20, className: j ? "text-gray-100" : "text-gray-600" }) : /* @__PURE__ */ e.jsx(at, { size: 20, className: j ? "text-gray-100" : "text-gray-600" })
841
+ children: ae || E === 0 ? /* @__PURE__ */ e(De, { size: 20, className: p ? "text-gray-100" : "text-gray-600" }) : /* @__PURE__ */ e(He, { size: 20, className: p ? "text-gray-100" : "text-gray-600" })
1467
842
  }
1468
843
  ),
1469
- /* @__PURE__ */ e.jsx(
844
+ /* @__PURE__ */ e(
1470
845
  "input",
1471
846
  {
1472
847
  type: "range",
1473
848
  min: "0",
1474
849
  max: "100",
1475
- value: b,
1476
- onChange: Ve,
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, ${d.slider} ${b}%, ${d.slider + "30"} ${b}%)`,
1480
- display: le < 460 ? "none" : "block"
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__ */ e.jsxs("span", { style: { display: le < 800 ? "none" : "block" }, className: `hidden sm:block text-xs ${j ? "text-gray-100" : "text-gray-700"} font-mono w-10 text-right`, children: [
1485
- b,
859
+ /* @__PURE__ */ r("span", { style: { display: K < 800 ? "none" : "block" }, className: `hidden sm:block text-xs ${p ? "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.jsx("style", { children: `
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: ${d.slider};
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: ${d.slider};
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 Kt({
1552
- audio: o,
1553
- gradient: u = ["#cd7eff", "#ff00f2"],
926
+ function ft({
927
+ audio: i,
928
+ gradient: c = ["#cd7eff", "#ff00f2"],
1554
929
  background: g = "#f4e4ffff",
1555
- autoPlay: m = !1,
1556
- thumbnail: _ = null,
1557
- width: p,
1558
- equalizer: k = {
930
+ autoPlay: h = !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: y = "light"
938
+ mode: v = "light"
1564
939
  }) {
1565
- const [N, q] = v(!1), [M, O] = v(0), [S, V] = v(0), [U, Y] = v(!1), [K, $] = v(80), [b, we] = v(1), [me, $e] = v([]), [se, ce] = v(null), [ye, he] = v(!1), [X, ke] = v({
1566
- bass: k.bass || 0,
1567
- mid: k.mid || 0,
1568
- treble: k.treble || 0
1569
- }), H = C(null), F = C(null), z = C(null), fe = C(null), be = C(null), ue = C(null), le = () => {
1570
- const s = [];
1571
- for (let x = 0; x < 100; x++) {
1572
- const E = 20 + Math.random() * 60;
1573
- s.push(E);
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 s;
950
+ return a;
1576
951
  };
1577
- L(() => {
1578
- if (!o)
952
+ C(() => {
953
+ if (!i)
1579
954
  return;
1580
- if (!Array.isArray(u) || u.length < 2) {
1581
- ce("Gradient must be an array with at least 2 colors");
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 s = H.current;
1585
- if (!s) return;
1586
- const x = () => O(s.currentTime), E = () => {
1587
- V(s.duration), $e(le());
1588
- }, G = () => q(!1), J = (te) => {
1589
- var d, j;
1590
- ce(`Audio error: ${((j = (d = te.target) == null ? void 0 : d.error) == null ? void 0 : j.message) || "Failed to load audio"}`);
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, p;
965
+ G(`Audio error: ${((p = (o = J.target) == null ? void 0 : o.error) == null ? void 0 : p.message) || "Failed to load audio"}`);
1591
966
  };
1592
- return s.addEventListener("timeupdate", x), s.addEventListener("loadedmetadata", E), s.addEventListener("ended", G), s.addEventListener("error", J), () => {
1593
- s.removeEventListener("timeupdate", x), s.removeEventListener("loadedmetadata", E), s.removeEventListener("ended", G), s.removeEventListener("error", J);
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
- }, [o, u, y]), L(() => {
1596
- o && H.current && m && (H.current.play().catch((s) => {
1597
- console.error("Play failed:", s), q(!1);
1598
- }), q(!0));
1599
- }, [o]), L(() => {
1600
- if (H.current && !F.current && H.current) {
1601
- const s = window.AudioContext || window.webkitAudioContext;
1602
- if (s) {
1603
- const x = new s();
1604
- F.current = x;
1605
- const E = x.createMediaElementSource(H.current);
1606
- z.current = E;
1607
- const G = x.createBiquadFilter();
1608
- G.type = "lowshelf", G.frequency.value = 200, fe.current = G;
1609
- const J = x.createBiquadFilter();
1610
- J.type = "peaking", J.frequency.value = 1e3, J.Q.value = 1, be.current = J;
1611
- const te = x.createBiquadFilter();
1612
- te.type = "highshelf", te.frequency.value = 3e3, ue.current = te, E.connect(G).connect(J).connect(te).connect(x.destination);
970
+ }, [i, c, v]), C(() => {
971
+ i && R.current && h && (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
- }, [o]), L(() => {
1616
- H.current && (H.current.volume = U ? 0 : K / 100);
1617
- }, [K, U]), L(() => {
1618
- H.current && (H.current.playbackRate = b);
1619
- }, [b]);
1620
- const R = () => {
1621
- H.current && (N ? H.current.pause() : H.current.play().catch((s) => {
1622
- ce(`Playback failed: ${s instanceof Error ? s.message : String(s)}`);
1623
- }), q(!N));
1624
- }, f = () => {
1625
- Y(!U);
1626
- }, B = (s) => {
1627
- $(parseInt(s.target.value)), U && parseInt(s.target.value) > 0 && Y(!1);
1628
- }, ie = (s) => {
1629
- we(parseFloat(s.target.value));
1630
- }, Ne = (s) => {
1631
- const x = s.currentTarget.getBoundingClientRect(), J = (s.clientX - x.left) / x.width * S;
1632
- H.current && (H.current.currentTime = J, O(J));
1633
- }, Q = (s, x) => {
1634
- ke((E) => ({ ...E, [s]: x })), s === "bass" && fe.current && (fe.current.gain.value = x), s === "mid" && be.current && (be.current.gain.value = x), s === "treble" && ue.current && (ue.current.gain.value = x);
1635
- }, xe = () => {
1636
- Q("bass", 0), Q("mid", 0), Q("treble", 0);
1637
- }, ne = (s) => {
1638
- if (isNaN(s)) return "0:00";
1639
- const x = Math.floor(s / 60), E = Math.floor(s % 60);
1640
- return `${x}:${E.toString().padStart(2, "0")}`;
1641
- }, T = S > 0 ? M / S * 100 : 0;
1642
- if (se)
1643
- return /* @__PURE__ */ e.jsx("div", { className: "w-lg p-6 rounded-xl", style: { background: g }, children: /* @__PURE__ */ e.jsxs("div", { className: `text-center ${y === "dark" ? "text-red-300" : "text-red-600"}`, children: [
1644
- /* @__PURE__ */ e.jsx("p", { className: "font-medium", children: "Error" }),
1645
- /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: se })
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 (!o) return null;
1648
- const oe = y === "dark" ? "text-gray-300" : "text-gray-700", ae = y === "dark" ? "text-gray-400" : "text-gray-500";
1649
- return /* @__PURE__ */ e.jsxs("div", { className: "w-full max-w-lg relative", style: { width: p + "px" }, children: [
1650
- /* @__PURE__ */ e.jsx("audio", { ref: H, src: o }),
1651
- /* @__PURE__ */ e.jsx("div", { className: "rounded-2xl shadow-2xl", children: /* @__PURE__ */ e.jsxs("div", { className: "rounded-2xl p-6 backdrop-blur-xl", style: { background: g }, children: [
1652
- _ && /* @__PURE__ */ e.jsx("div", { className: "w-full p-4", children: /* @__PURE__ */ e.jsx("img", { src: _, alt: "", className: "w-full aspect-square rounded-xl" }) }),
1653
- /* @__PURE__ */ e.jsxs(
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: Ne,
1032
+ onClick: me,
1658
1033
  children: [
1659
- /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 flex items-end justify-center h-full w-full gap-px", children: me.map((s, x) => {
1660
- const G = x / me.length * 100 <= T;
1661
- return /* @__PURE__ */ e.jsx(
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: `${s}%`,
1667
- background: G ? u[0] : u[1],
1668
- opacity: G ? 1 : 0.4
1041
+ height: `${a}%`,
1042
+ background: B ? c[0] : c[1],
1043
+ opacity: B ? 1 : 0.4
1669
1044
  }
1670
1045
  },
1671
- x
1046
+ d
1672
1047
  );
1673
1048
  }) }),
1674
- /* @__PURE__ */ e.jsx(
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: `${T}%`, transform: "translateX(-50%)" }
1053
+ style: { left: `${$}%`, transform: "translateX(-50%)" }
1679
1054
  }
1680
1055
  )
1681
1056
  ]
1682
1057
  }
1683
1058
  ),
1684
- /* @__PURE__ */ e.jsxs("div", { className: `flex justify-between text-sm ${ae} mb-6`, children: [
1685
- /* @__PURE__ */ e.jsx("span", { children: ne(M) }),
1686
- /* @__PURE__ */ e.jsx("span", { children: ne(S) })
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__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center justify-between mb-4", children: [
1689
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1690
- /* @__PURE__ */ e.jsx(
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: f,
1068
+ onClick: u,
1694
1069
  className: "p-2 rounded-full transition-all",
1695
1070
  style: {
1696
- background: `linear-gradient(135deg, ${u[0]}, ${u[1]})`
1071
+ background: `linear-gradient(135deg, ${c[0]}, ${c[1]})`
1697
1072
  },
1698
- children: U || K === 0 ? /* @__PURE__ */ e.jsx(st, { className: "w-4 h-4 text-white" }) : /* @__PURE__ */ e.jsx(at, { className: "w-4 h-4 text-white" })
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.jsx(
1076
+ /* @__PURE__ */ e(
1702
1077
  "input",
1703
1078
  {
1704
1079
  type: "range",
1705
1080
  min: "0",
1706
1081
  max: "100",
1707
- value: K,
1708
- onChange: B,
1709
- className: `${p ? "" : "hidden sm:block"} w-20 h-1.5 rounded-lg appearance-none cursor-pointer`,
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, ${u[0]} ${K}%, ${y === "dark" ? "#374151" : "#d1d5db"} ${K}%)`,
1712
- display: p && p < 400 ? "none" : void 0
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
- p && p < 400 && /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ e.jsx(
1091
+ m && m < 400 && /* @__PURE__ */ e("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ e(
1717
1092
  "button",
1718
1093
  {
1719
- onClick: () => he(!ye),
1094
+ onClick: () => le(!se),
1720
1095
  className: "p-2 rounded-full transition-all",
1721
1096
  style: {
1722
- background: `linear-gradient(135deg, ${u[0]}, ${u[1]})`
1097
+ background: `linear-gradient(135deg, ${c[0]}, ${c[1]})`
1723
1098
  },
1724
- children: /* @__PURE__ */ e.jsx(Qe, { className: "w-4 h-4 text-white" })
1099
+ children: /* @__PURE__ */ e(Ae, { className: "w-4 h-4 text-white" })
1725
1100
  }
1726
1101
  ) })
1727
1102
  ] }),
1728
- /* @__PURE__ */ e.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ e.jsx(
1103
+ /* @__PURE__ */ e("div", { className: "flex justify-center", children: /* @__PURE__ */ e(
1729
1104
  "button",
1730
1105
  {
1731
- onClick: R,
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, ${u[0]}, ${u[1]})`
1109
+ background: `linear-gradient(135deg, ${c[0]}, ${c[1]})`
1735
1110
  },
1736
- children: N ? /* @__PURE__ */ e.jsx(Ze, { className: "w-6 h-6 text-white fill-white" }) : /* @__PURE__ */ e.jsx(et, { className: "w-6 h-6 text-white fill-white" })
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__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1740
- /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ e.jsxs(
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: b,
1744
- style: { background: g, color: u[0] },
1745
- onChange: ie,
1746
- className: `py-1 px-2 rounded-lg text-sm ${oe} ${y === "dark" ? "bg-gray-800" : "bg-gray-100"}`,
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.jsx("option", { value: "0.5", children: "0.5x" }),
1749
- /* @__PURE__ */ e.jsx("option", { value: "0.75", children: "0.75x" }),
1750
- /* @__PURE__ */ e.jsx("option", { value: "1", children: "1x" }),
1751
- /* @__PURE__ */ e.jsx("option", { value: "1.25", children: "1.25x" }),
1752
- /* @__PURE__ */ e.jsx("option", { value: "1.5", children: "1.5x" }),
1753
- /* @__PURE__ */ e.jsx("option", { value: "2", children: "2x" })
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
- !(p && p < 400) && /* @__PURE__ */ e.jsx("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ e.jsx(
1132
+ !(m && m < 400) && /* @__PURE__ */ e("div", { className: "flex items-center justify-end", children: /* @__PURE__ */ e(
1758
1133
  "button",
1759
1134
  {
1760
- onClick: () => he(!ye),
1135
+ onClick: () => le(!se),
1761
1136
  className: "p-2 rounded-full transition-all",
1762
1137
  style: {
1763
- background: `linear-gradient(135deg, ${u[0]}, ${u[1]})`
1138
+ background: `linear-gradient(135deg, ${c[0]}, ${c[1]})`
1764
1139
  },
1765
- children: /* @__PURE__ */ e.jsx(Qe, { className: "w-4 h-4 text-white" })
1140
+ children: /* @__PURE__ */ e(Ae, { className: "w-4 h-4 text-white" })
1766
1141
  }
1767
1142
  ) })
1768
1143
  ] })
1769
1144
  ] })
1770
1145
  ] }) }),
1771
- ye && /* @__PURE__ */ e.jsx("div", { className: "absolute inset-0 bg-black bg-opacity-20 flex items-center justify-center z-10 rounded-2xl p-4", children: /* @__PURE__ */ e.jsxs("div", { className: `max-w-xs w-full p-4 pt-2 rounded-xl ${y === "dark" ? "bg-gray-800" : "bg-white"}`, children: [
1772
- /* @__PURE__ */ e.jsx("h3", { className: `text-lg font-medium mb-2 ${y === "dark" ? "text-gray-200" : "text-gray-700"}`, children: "Equalizer" }),
1773
- /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
1774
- /* @__PURE__ */ e.jsxs("div", { children: [
1775
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
1776
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Bass" }),
1777
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${y === "dark" ? "text-gray-300" : "text-gray-600"}`, children: [
1778
- X.bass,
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__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1783
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
1784
- /* @__PURE__ */ e.jsx(
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: X.bass,
1791
- onChange: (s) => Q("bass", parseInt(s.target.value)),
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, ${u[0]} ${(X.bass + 20) / 40 * 100}%, ${u[1] + "30"} ${(X.bass + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1173
+ /* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1799
1174
  ] })
1800
1175
  ] }),
1801
- /* @__PURE__ */ e.jsxs("div", { children: [
1802
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
1803
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Mid" }),
1804
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${y === "dark" ? "text-gray-300" : "text-gray-600"}`, children: [
1805
- X.mid,
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__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1810
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
1811
- /* @__PURE__ */ e.jsx(
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: X.mid,
1818
- onChange: (s) => Q("mid", parseInt(s.target.value)),
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, ${u[0]} ${(X.mid + 20) / 40 * 100}%, ${u[1] + "30"} ${(X.mid + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1200
+ /* @__PURE__ */ e("span", { className: `text-xs ${v === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1826
1201
  ] })
1827
1202
  ] }),
1828
- /* @__PURE__ */ e.jsxs("div", { children: [
1829
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
1830
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
1831
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${y === "dark" ? "text-gray-300" : "text-gray-600"}`, children: [
1832
- X.treble,
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__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
1837
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
1838
- /* @__PURE__ */ e.jsx(
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: X.treble,
1845
- onChange: (s) => Q("treble", parseInt(s.target.value)),
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, ${u[0]} ${(X.treble + 20) / 40 * 100}%, ${u[1] + "30"} ${(X.treble + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${y === "dark" ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
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__ */ e.jsxs("div", { className: "flex justify-between mt-6", children: [
1857
- /* @__PURE__ */ e.jsx(
1231
+ /* @__PURE__ */ r("div", { className: "flex justify-between mt-6", children: [
1232
+ /* @__PURE__ */ e(
1858
1233
  "button",
1859
1234
  {
1860
- onClick: xe,
1861
- className: `px-3 py-1 rounded text-xs ${y === "dark" ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
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.jsx(
1240
+ /* @__PURE__ */ e(
1866
1241
  "button",
1867
1242
  {
1868
- onClick: () => he(!1),
1869
- className: `px-3 py-1 rounded text-xs ${y === "dark" ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
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.jsx("style", { children: `
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 Gt({ audio: o, thumbnail: u, gradient: g = ["#cd7eff", "#fe59f6"], background: m = "#1f273a", autoPlay: _ = !1 }) {
1896
- const [p, k] = v(!1), [, y] = v(0), N = C(null), [q, M] = v(0), [O, S] = v(0), [V, U] = v(0);
1897
- L(() => {
1898
- const $ = N.current;
1899
- if (!$) return;
1900
- const b = () => y($.currentTime);
1901
- return $.addEventListener("timeupdate", b), () => $.removeEventListener("timeupdate", b);
1902
- }, []), L(() => {
1903
- const $ = setInterval(() => {
1904
- p && M((b) => b + 0.1);
1270
+ function mt({ audio: i, thumbnail: c, gradient: g = ["#cd7eff", "#fe59f6"], background: h = "#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
- }, [p]), L(() => {
1908
- const $ = setInterval(() => {
1909
- p && U((b) => b + 0.1);
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
- }, [p]), L(() => {
1913
- o && N.current && _ && (N.current.play().catch(() => k(!1)), k(!0));
1914
- }, [o]), L(() => {
1915
- const $ = N.current;
1916
- if (!$) return;
1917
- const b = () => {
1918
- S($.duration), console.log("Audio duration:", $.duration);
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 U(0), $.addEventListener("loadedmetadata", b), () => {
1921
- $.removeEventListener("loadedmetadata", b);
1295
+ return H(0), N.addEventListener("loadedmetadata", E), () => {
1296
+ N.removeEventListener("loadedmetadata", E);
1922
1297
  };
1923
- }, [o]);
1924
- const Y = () => {
1925
- N.current && (p ? N.current.pause() : N.current.play().catch(($) => console.error("NanoPlayer play failed:", $)), k(!p));
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 (!o) return null;
1928
- const K = {
1302
+ if (!i) return null;
1303
+ const S = {
1929
1304
  background: `linear-gradient(135deg, ${g[0]}, ${g[1]})`
1930
1305
  };
1931
- return /* @__PURE__ */ e.jsxs(
1306
+ return /* @__PURE__ */ r(
1932
1307
  "div",
1933
1308
  {
1934
- style: { backgroundColor: m },
1309
+ style: { backgroundColor: h },
1935
1310
  className: `
1936
1311
  relative overflow-hidden inline-flex flex-col
1937
- ${u ? "rounded-2xl" : "rounded-full"}
1312
+ ${c ? "rounded-2xl" : "rounded-full"}
1938
1313
  px-3 py-2 shadow-lg
1939
- ${u ? "w-[120px] h-[150px]" : "w-[110px] h-[40px]"}
1314
+ ${c ? "w-[120px] h-[150px]" : "w-[110px] h-[40px]"}
1940
1315
  `,
1941
1316
  children: [
1942
- /* @__PURE__ */ e.jsx(
1317
+ /* @__PURE__ */ e(
1943
1318
  "audio",
1944
1319
  {
1945
- ref: N,
1946
- src: o,
1320
+ ref: P,
1321
+ src: i,
1947
1322
  onEnded: () => {
1948
- k(!1), U(0);
1323
+ x(!1), H(0);
1949
1324
  }
1950
1325
  }
1951
1326
  ),
1952
- /* @__PURE__ */ e.jsx(
1327
+ /* @__PURE__ */ e(
1953
1328
  "div",
1954
1329
  {
1955
1330
  style: {
1956
- width: `${(O > 0 ? V / O : 0) * 100}%`,
1957
- backgroundImage: K.background
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__ */ e.jsxs("div", { className: "absolute flex flex-col", children: [
1963
- u && /* @__PURE__ */ e.jsx("div", { className: "w-24 pb-2", children: /* @__PURE__ */ e.jsx("img", { src: u, alt: "", className: "w-24 aspect-square rounded-xl" }) }),
1964
- /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
1965
- /* @__PURE__ */ e.jsx(
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: Y,
1969
- style: K,
1343
+ onClick: z,
1344
+ style: S,
1970
1345
  className: "p-1.5 rounded-full hover:scale-110 transition-transform flex-shrink-0",
1971
- children: p ? /* @__PURE__ */ e.jsx(Ze, { fill: m, className: "w-3 h-3 text-transparent" }) : /* @__PURE__ */ e.jsx(et, { fill: m, className: "w-3 h-3 text-transparent" })
1346
+ children: m ? /* @__PURE__ */ e(Re, { fill: h, className: "w-3 h-3 text-transparent" }) : /* @__PURE__ */ e(Fe, { fill: h, className: "w-3 h-3 text-transparent" })
1972
1347
  }
1973
1348
  ),
1974
- /* @__PURE__ */ e.jsx("div", { className: "flex w-full min-w-12 items-center gap-0.5 h-6", children: [...Array(12)].map(($, b) => /* @__PURE__ */ e.jsx(
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: p ? `${8 + Math.sin((q * 8 + b) * 0.6) * 10}px` : "8px",
1982
- opacity: p ? 0.8 : 0.4
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
- b
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 Xt({
1994
- video: o,
1995
- name: u = "No video loaded",
1368
+ function yt({
1369
+ video: i,
1370
+ name: c = "No video loaded",
1996
1371
  audioVisual: g = null,
1997
- volume: m = 100,
1998
- thumbnail: _ = null,
1999
- controls: p = {
1372
+ volume: h = 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: k = "light",
2011
- transparent: y = !1,
2012
- autoPlay: N = !1,
2013
- color: q = "#3b82f6",
2014
- equalizer: M = {
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 [O, S] = v(!1), [V, U] = v(0), [Y, K] = v(0), [$, b] = v(m || 100), [we, me] = v(!1), [$e, se] = v(!1), [ce, ye] = v(!1), [he, X] = v([]), [ke, H] = v(!1), [F, z] = v({
2021
- bass: M.bass || 0,
2022
- mid: M.mid || 0,
2023
- treble: M.treble || 0
2024
- }), [fe, be] = v(1), [ue, le] = v(0), R = C(null), f = C(null), B = C(null), ie = C(null), Ne = C(null), Q = C(null), xe = C(null), ne = C(null), T = C(null), oe = C(null), ae = C(0), s = C(0), x = C(0), E = C(0), G = C(0), J = C(0), te = C(!1), d = k === "dark" || ce, j = typeof p == "object" && Object.keys(p).length === 0;
2025
- L(() => {
2026
- const r = f.current;
2027
- if (!r) return;
2028
- const a = new ResizeObserver((l) => {
2029
- for (let i of l)
2030
- le(i.contentRect.width);
1395
+ const [I, M] = f(!1), [_, H] = f(0), [z, S] = f(0), [N, E] = f(h || 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, p = 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 a.observe(r), () => a.disconnect();
2033
- }, []), L(() => {
2034
- const r = [];
2035
- o && typeof o != "string" && r.push(["TypeError", "video must be a string (URL or path)"]), u && typeof u != "string" && r.push(["TypeError", "name must be a string"]), (typeof m != "number" || m < 0 || m > 100) && r.push(["TypeError", "volume must be a number between 0 and 100"]), g && typeof g != "object" ? r.push(["TypeError", "audioVisual must be an object"]) : g && (["left", "right", "top", "bottom"].includes(g.side) || r.push(["ValueError", "audioVisual.side must be 'left', 'right', 'top', or 'bottom'"])), r.length > 0 ? (X(r), console.group("%cVideoPlayer: Prop validation failed", "color:red"), r.forEach((a) => console.error(`${a[0]}: ${a[1]}`)), console.groupEnd()) : X([]);
2036
- }, [o, u, m, g, p, k]), L(() => {
2037
- if (!R.current) return;
2038
- const r = R.current, a = () => {
2039
- $e || U(r.currentTime);
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 h != "number" || h < 0 || h > 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, h, 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
- K(r.duration);
2042
- }, i = () => {
2043
- S(!1), T.current && cancelAnimationFrame(T.current);
2044
- }, w = () => S(!0), I = () => S(!1);
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
- }, [$e]), L(() => {
2049
- if (o) {
2050
- const r = O, a = $;
2051
- if (R.current && R.current.pause(), R.current) {
2052
- R.current.pause(), R.current.src = o, R.current.volume = we ? 0 : a / 100;
2053
- const l = () => {
2054
- r && R.current && R.current.play().catch((i) => console.error("Play failed:", i)), R.current && R.current.removeEventListener("canplay", l);
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
- R.current.addEventListener("canplay", l), R.current.load();
1431
+ k.current.addEventListener("canplay", s), k.current.load();
2057
1432
  }
2058
- U(0), S(!1), ae.current = 0, s.current = 0, x.current = 0, E.current = 0, G.current = 0, J.current = 0, Ee();
1433
+ H(0), M(!1), Y.current = 0, a.current = 0, d.current = 0, b.current = 0, B.current = 0, D.current = 0, pe();
2059
1434
  }
2060
- }, [o]), L(() => {
2061
- R.current && (R.current.volume = we ? 0 : $ / 100);
2062
- }, [$, we]), L(() => {
2063
- R.current && (R.current.playbackRate = fe);
2064
- }, [fe]), L(() => {
2065
- B.current && (Q.current && (Q.current.gain.value = F.bass), xe.current && (xe.current.gain.value = F.mid), ne.current && (ne.current.gain.value = F.treble));
2066
- }, [F]), L(() => {
2067
- te.current = O, T.current && (cancelAnimationFrame(T.current), T.current = null), O && g ? (B.current || ve(), Fe()) : !O && g && qe();
2068
- }, [O, g]), L(() => {
2069
- const r = () => {
2070
- ye(!!document.fullscreenElement);
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", r), () => document.removeEventListener("fullscreenchange", r);
2073
- }, []), L(() => () => {
2074
- T.current && cancelAnimationFrame(T.current), B.current && B.current.close().catch((r) => console.warn("AudioContext cleanup error:", r));
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 ve = () => {
2077
- if (!B.current && R.current)
1451
+ const ge = () => {
1452
+ if (!A.current && k.current)
2078
1453
  try {
2079
- const r = window.AudioContext || window.webkitAudioContext;
2080
- if (r) {
2081
- const a = new r();
2082
- B.current = a;
2083
- const l = a.createBiquadFilter();
2084
- l.type = "lowshelf", l.frequency.value = 320, l.gain.value = F.bass;
2085
- const i = a.createBiquadFilter();
2086
- i.type = "peaking", i.frequency.value = 1e3, i.Q.value = 0.5, i.gain.value = F.mid;
2087
- const w = a.createBiquadFilter();
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 I = a.createAnalyser();
2090
- I.fftSize = 2048, I.smoothingTimeConstant = 0.8;
2091
- const de = a.createMediaElementSource(R.current);
2092
- de.connect(l), l.connect(i), i.connect(w), w.connect(I), w.connect(a.destination), Q.current = l, xe.current = i, ne.current = w, ie.current = I, Ne.current = de;
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 (r) {
2095
- console.error("Failed to setup audio context:", r);
1469
+ } catch (t) {
1470
+ console.error("Failed to setup audio context:", t);
2096
1471
  }
2097
1472
  }, qe = () => {
2098
- if (te.current) return;
2099
- ae.current *= 0.7, s.current *= 0.7;
2100
- const r = Date.now();
2101
- r - G.current > 1500 && (x.current *= 0.95), r - J.current > 1500 && (E.current *= 0.95), Ee();
2102
- const a = Math.max(ae.current, s.current), l = Math.max(x.current, E.current);
2103
- a > 0.01 || l > 0.01 ? T.current = requestAnimationFrame(qe) : (te.current || (ae.current = 0, s.current = 0, x.current = 0, E.current = 0, Ee()), T.current && cancelAnimationFrame(T.current), T.current = null);
2104
- }, Fe = () => {
2105
- if (!ie.current || !te.current) return;
2106
- const r = ie.current.frequencyBinCount, a = new Uint8Array(r);
2107
- ie.current.getByteFrequencyData(a);
2108
- let l = 0;
2109
- for (let I = 0; I < r; I++)
2110
- l += a[I];
2111
- let i = l / r / 255;
2112
- i = Math.pow(i, 0.5), ae.current = ae.current * 0.7 + i * 0.3, s.current = s.current * 0.7 + i * 0.3;
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), pe();
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, pe()), $.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
- ae.current > x.current ? (x.current = ae.current, G.current = w) : w - G.current > 1500 && (x.current *= 0.95), s.current > E.current ? (E.current = s.current, J.current = w) : w - J.current > 1500 && (E.current *= 0.95), Ee(), T.current = requestAnimationFrame(Fe);
2115
- }, Ee = () => {
2116
- if (!oe.current || !g) return;
2117
- const r = g.color || "#00ff00", a = g.peak || "#ff0000", l = ae.current * 100, i = s.current * 100, w = 100 - x.current * 100, I = 100 - E.current * 100;
2118
- g.side === "top" || g.side === "bottom" ? oe.current.innerHTML = `
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), pe(), $.current = requestAnimationFrame(we);
1490
+ }, pe = () => {
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 ${d ? "text-gray-100" : "text-gray-900"} opacity-80 w-4 text-center">L</div>
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: ${l}%; background: ${r};"></div>
2124
- ${x.current > 0.1 ? `<div class="absolute top-0 w-1 h-full transition-all duration-100" style="right: ${x.current * 100}%; background: ${a};"></div>` : ""}
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: ${i}%; background: ${r};"></div>
2129
- ${E.current > 0.1 ? `<div class="absolute top-0 w-1 h-full transition-all duration-100" style="left: ${E.current * 100}%; background: ${a};"></div>` : ""}
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 ${d ? "text-gray-100" : "text-gray-900"} opacity-80 w-4 text-center">R</div>
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
- ` : oe.current.innerHTML = `
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: ${l}%; background: ${r};">
2140
- ${x.current > 0.1 ? `<div class="absolute w-full h-1 transition-all duration-100" style="top: ${w}%; background: ${a};"></div>` : ""}
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: ${i}%; background: ${r};">
2148
- ${E.current > 0.1 ? `<div class="absolute w-full h-1 transition-all duration-100" style="top: ${I}%; background: ${a};"></div>` : ""}
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
- }, _e = () => {
2154
- !R.current || !o || (O ? R.current.pause() : (B.current && B.current.state === "suspended" && B.current.resume(), R.current.play().catch((r) => console.error("Play failed:", r))));
2155
- }, Ce = () => {
2156
- R.current && (R.current.pause(), R.current.currentTime = 0, S(!1), U(0), ae.current = 0, s.current = 0, x.current = 0, E.current = 0, Ee());
2157
- }, He = (r) => {
2158
- const l = parseFloat(r.target.value) / 100 * Y;
2159
- U(l), R.current && !$e && (R.current.currentTime = l);
2160
- }, Le = () => se(!0), Me = () => {
2161
- R.current && (R.current.currentTime = V), se(!1);
2162
- }, Oe = (r) => {
2163
- const a = parseInt(r.target.value);
2164
- b(a), me(a === 0);
2165
- }, We = (r) => {
2166
- be(parseFloat(r.target.value));
2167
- }, Ve = () => me(!we), Ue = () => {
2168
- f.current && (document.fullscreenElement ? document.exitFullscreen() : f.current.requestFullscreen().catch((r) => console.error("Fullscreen failed:", r)));
2169
- }, ze = (r, a) => {
2170
- z((l) => ({
2171
- ...l,
2172
- [r]: a
2173
- })), B.current && (r === "bass" && Q.current && (Q.current.gain.value = a), r === "mid" && xe.current && (xe.current.gain.value = a), r === "treble" && ne.current && (ne.current.gain.value = a));
2174
- }, Ke = () => {
2175
- z({ bass: 0, mid: 0, treble: 0 });
2176
- }, Se = (r) => {
2177
- if (isNaN(r)) return "0:00";
2178
- const a = Math.floor(r / 60), l = Math.floor(r % 60);
2179
- return `${a}:${l.toString().padStart(2, "0")}`;
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
+ }, he = () => {
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, pe());
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 (L(() => {
2182
- (j && !O || N) && _e();
2183
- }, [p]), he && he.length > 0)
2184
- return he.map((r, a) => /* @__PURE__ */ e.jsxs("div", { className: "text-red-500 text-sm bg-red-50 p-3 rounded mb-4 border border-red-300", children: [
2185
- /* @__PURE__ */ e.jsxs("strong", { children: [
2186
- r[0],
1556
+ if (C(() => {
1557
+ (p && !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
- r[1]
2191
- ] }, a));
2192
- const Re = g ? g.side : null, Ie = Re === "top" || Re === "bottom";
2193
- return /* @__PURE__ */ e.jsx(
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: f,
2197
- className: `rounded-xl overflow-hidden transition-all duration-300 ${ce ? "fixed inset-0 z-[9999] flex flex-col h-screen w-screen bg-black" : "relative"}`,
2198
- style: { backgroundColor: j || y ? void 0 : d ? "#49494937" : "white" },
2199
- children: /* @__PURE__ */ e.jsxs("div", { style: { background: j || y ? void 0 : d ? "#1a1a1ab0" : "#f5f5f5", height: ce ? "100%" : "auto" }, className: `${j || y ? "" : "p-4"} ${ce ? "flex flex-col flex-1" : ""}`, children: [
2200
- p.videoName && !ce && /* @__PURE__ */ e.jsx("div", { className: "mb-4", children: /* @__PURE__ */ e.jsx("div", { className: `${d ? "text-gray-100" : "text-gray-700"} font-medium`, children: u }) }),
2201
- /* @__PURE__ */ e.jsxs("div", { className: `relative ${Ie ? "flex flex-col gap-3" : "flex gap-3"} ${ce ? "flex-1 min-h-0" : "mb-4"}`, children: [
2202
- g && Re === "top" && /* @__PURE__ */ e.jsx("div", { className: "w-full h-12", ref: oe }),
2203
- /* @__PURE__ */ e.jsxs("div", { className: `flex ${!Ie && "flex-1"} gap-3`, children: [
2204
- g && Re === "left" && /* @__PURE__ */ e.jsx("div", { className: "w-12 bg-black/50 rounded-lg p-1", ref: oe }),
2205
- /* @__PURE__ */ e.jsxs("div", { className: `flex-1 ${d ? "bg-black/70" : "bg-white/70"} rounded-lg overflow-hidden relative`, children: [
2206
- /* @__PURE__ */ e.jsxs(
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: p || v ? void 0 : o ? "#49494937" : "white" },
1574
+ children: /* @__PURE__ */ r("div", { style: { background: p || v ? void 0 : o ? "#1a1a1ab0" : "#f5f5f5", height: G ? "100%" : "auto" }, className: `${p || 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: R,
1584
+ ref: k,
2210
1585
  className: "w-full h-full object-contain",
2211
- poster: _ || void 0,
1586
+ poster: q || void 0,
2212
1587
  children: [
2213
- o && /* @__PURE__ */ e.jsx("source", { src: o }),
1588
+ i && /* @__PURE__ */ e("source", { src: i }),
2214
1589
  "Your browser does not support the video tag."
2215
1590
  ]
2216
1591
  }
2217
1592
  ),
2218
- ke && /* @__PURE__ */ e.jsx("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__ */ e.jsxs("div", { className: `max-w-[600px] w-full mx-auto flex flex-col justify-center z-10 ${d ? "bg-black/70" : "bg-white/80"} rounded-lg p-4 shadow-sm transition-all duration-300`, children: [
2219
- /* @__PURE__ */ e.jsx("h3", { className: `text-sm font-medium mb-4 ${d ? "text-gray-200" : "text-gray-700"}`, children: "Equalizer" }),
2220
- /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
2221
- /* @__PURE__ */ e.jsxs("div", { children: [
2222
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
2223
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${d ? "text-gray-300" : "text-gray-600"}`, children: "Bass" }),
2224
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${d ? "text-gray-300" : "text-gray-600"}`, children: [
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__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
2230
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${d ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
2231
- /* @__PURE__ */ e.jsx(
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: (r) => ze("bass", parseInt(r.target.value)),
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, ${q} ${(F.bass + 20) / 40 * 100}%, #e5e7eb ${(F.bass + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${d ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1620
+ /* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
2246
1621
  ] })
2247
1622
  ] }),
2248
- /* @__PURE__ */ e.jsxs("div", { children: [
2249
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
2250
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${d ? "text-gray-300" : "text-gray-600"}`, children: "Mid" }),
2251
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${d ? "text-gray-300" : "text-gray-600"}`, children: [
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__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
2257
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${d ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
2258
- /* @__PURE__ */ e.jsx(
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: (r) => ze("mid", parseInt(r.target.value)),
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, ${q} ${(F.mid + 20) / 40 * 100}%, #e5e7eb ${(F.mid + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${d ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1647
+ /* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
2273
1648
  ] })
2274
1649
  ] }),
2275
- /* @__PURE__ */ e.jsxs("div", { children: [
2276
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mb-1", children: [
2277
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${d ? "text-gray-300" : "text-gray-600"}`, children: "Treble" }),
2278
- /* @__PURE__ */ e.jsxs("span", { className: `text-xs ${d ? "text-gray-300" : "text-gray-600"}`, children: [
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__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
2284
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${d ? "text-gray-400" : "text-gray-500"}`, children: "-20" }),
2285
- /* @__PURE__ */ e.jsx(
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: (r) => ze("treble", parseInt(r.target.value)),
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, ${q} ${(F.treble + 20) / 40 * 100}%, #e5e7eb ${(F.treble + 20) / 40 * 100}%)`
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.jsx("span", { className: `text-xs ${d ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
1674
+ /* @__PURE__ */ e("span", { className: `text-xs ${o ? "text-gray-400" : "text-gray-500"}`, children: "+20" })
2300
1675
  ] })
2301
1676
  ] })
2302
1677
  ] }),
2303
- /* @__PURE__ */ e.jsxs("div", { className: "flex justify-between mt-6", children: [
2304
- /* @__PURE__ */ e.jsx(
1678
+ /* @__PURE__ */ r("div", { className: "flex justify-between mt-6", children: [
1679
+ /* @__PURE__ */ e(
2305
1680
  "button",
2306
1681
  {
2307
- onClick: Ke,
2308
- className: `px-3 py-1 rounded text-xs ${d ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
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.jsx(
1687
+ /* @__PURE__ */ e(
2313
1688
  "button",
2314
1689
  {
2315
- onClick: () => H(!1),
2316
- className: `ml-2 px-3 py-1 rounded text-xs ${d ? "bg-gray-700 text-gray-200 hover:bg-gray-600" : "bg-gray-200 text-gray-700 hover:bg-gray-300"} transition-all`,
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 && Re === "right" && /* @__PURE__ */ e.jsx("div", { className: "w-12 bg-black/50 rounded-lg p-1", ref: oe })
1698
+ g && ye === "right" && /* @__PURE__ */ e("div", { className: "w-12 bg-black/50 rounded-lg p-1", ref: re })
2324
1699
  ] }),
2325
- g && Re === "bottom" && /* @__PURE__ */ e.jsx("div", { className: "w-full h-12", ref: oe })
1700
+ g && ye === "bottom" && /* @__PURE__ */ e("div", { className: "w-full h-12", ref: re })
2326
1701
  ] }),
2327
- p.seekbar && /* @__PURE__ */ e.jsx("div", { className: `mb-4 ${ce ? "mt-3" : ""}`, children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
2328
- /* @__PURE__ */ e.jsx("span", { className: `text-xs ${d ? "text-gray-100" : "text-gray-600"} font-mono w-12`, children: Se(V) }),
2329
- /* @__PURE__ */ e.jsx(
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: Y > 0 ? V / Y * 100 : 0,
2336
- onChange: He,
2337
- onMouseDown: Le,
2338
- onMouseUp: Me,
2339
- onTouchStart: Le,
2340
- onTouchEnd: Me,
2341
- disabled: !o,
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: o && Y > 0 ? `linear-gradient(to right, ${q} ${V / Y * 100}%, #e5e7eb ${V / Y * 100}%)` : "#e5e7eb"
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.jsx("span", { className: `text-xs ${d ? "text-gray-100" : "text-gray-600"} font-mono w-12 text-right`, children: Se(Y) })
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__ */ e.jsxs("div", { className: "flex flex-wrap items-center gap-3", children: [
2351
- p.play && /* @__PURE__ */ e.jsxs(
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: _e,
2355
- disabled: !o,
2356
- style: { backgroundColor: q },
2357
- className: `${ue > 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`,
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__ */ e.jsxs("div", { className: "relative w-4 flex items-center", children: [
2360
- /* @__PURE__ */ e.jsx(Ze, { size: 16, className: `${O ? "" : "scale-0 translate-y-10"} transition-all absolute` }),
2361
- /* @__PURE__ */ e.jsx(et, { size: 16, className: `${O ? "scale-0 -translate-y-10" : ""} transition-all absolute` })
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
- ue > 400 && (O ? "Pause" : "Play")
1738
+ ee > 400 && (I ? "Pause" : "Play")
2364
1739
  ]
2365
1740
  }
2366
1741
  ),
2367
- p.stop && /* @__PURE__ */ e.jsx(
1742
+ m.stop && /* @__PURE__ */ e(
2368
1743
  "button",
2369
1744
  {
2370
- onClick: Ce,
2371
- disabled: !o,
2372
- className: `${d ? "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`,
2373
- children: /* @__PURE__ */ e.jsx(mt, { size: 16 })
1745
+ onClick: he,
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
- p.fullscreen && /* @__PURE__ */ e.jsxs(
1751
+ m.fullscreen && /* @__PURE__ */ r(
2377
1752
  "button",
2378
1753
  {
2379
- onClick: Ue,
2380
- className: `${ue < 800 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${d ? "bg-gray-100 text-black hover:bg-gray-300" : "bg-gray-700 text-white hover:bg-gray-800"}`,
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
- ce ? /* @__PURE__ */ e.jsx(Ft, { size: 16 }) : /* @__PURE__ */ e.jsx(St, { size: 16 }),
2383
- /* @__PURE__ */ e.jsx("span", { style: { display: ue < 800 ? "none" : "block" }, children: ce ? "Exit" : "Full" })
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
- p.equalizer && /* @__PURE__ */ e.jsxs(
1762
+ m.equalizer && /* @__PURE__ */ r(
2388
1763
  "button",
2389
1764
  {
2390
- onClick: () => H(!ke),
2391
- disabled: !o,
2392
- className: `${ue < 700 ? "px-3 py-3" : "px-4 py-2"} rounded-full text-sm font-medium flex items-center gap-2 transition-all ${ke ? "text-white" : "bg-gray-100 text-gray-700 hover:bg-gray-300"} disabled:opacity-40 disabled:cursor-not-allowed`,
2393
- style: ke ? { backgroundColor: q } : {},
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.jsx(Qe, { size: 16 }),
2396
- /* @__PURE__ */ e.jsx("span", { style: { display: ue < 700 ? "none" : "block" }, children: "EQ" })
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
- p.speed && /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(
1775
+ m.speed && /* @__PURE__ */ e("div", { className: "flex items-center", children: /* @__PURE__ */ r(
2401
1776
  "select",
2402
1777
  {
2403
- value: fe,
2404
- onChange: We,
2405
- className: `rounded-full text-sm font-medium border-none outline-none cursor-pointer transition-all bg-transparent ${d ? "text-gray-200" : "text-gray-800"}`,
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.jsx("option", { value: "0.5", className: d ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "0.5x" }),
2408
- /* @__PURE__ */ e.jsx("option", { value: "0.75", className: d ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "0.75x" }),
2409
- /* @__PURE__ */ e.jsx("option", { value: "1", className: d ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1x" }),
2410
- /* @__PURE__ */ e.jsx("option", { value: "1.25", className: d ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1.25x" }),
2411
- /* @__PURE__ */ e.jsx("option", { value: "1.5", className: d ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "1.5x" }),
2412
- /* @__PURE__ */ e.jsx("option", { value: "2", className: d ? "bg-gray-800 text-gray-100" : "bg-gray-100 text-gray-800", children: "2x" })
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
- p.volume && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-1 md:gap-3 ml-auto", children: [
2417
- /* @__PURE__ */ e.jsx(
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: Ve,
1795
+ onClick: je,
2421
1796
  className: "p-2 rounded-lg hover:bg-gray-100 transition-all",
2422
- children: we || $ === 0 ? /* @__PURE__ */ e.jsx(st, { size: 20, className: d ? "text-gray-100" : "text-gray-600" }) : /* @__PURE__ */ e.jsx(at, { size: 20, className: d ? "text-gray-100" : "text-gray-600" })
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.jsx(
1800
+ /* @__PURE__ */ e(
2426
1801
  "input",
2427
1802
  {
2428
1803
  type: "range",
2429
1804
  min: "0",
2430
1805
  max: "100",
2431
- value: $,
2432
- onChange: Oe,
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, ${q} ${$}%, #e5e7eb ${$}%)`,
2436
- display: ue < 460 ? "none" : "block"
1810
+ background: `linear-gradient(to right, ${T} ${N}%, #e5e7eb ${N}%)`,
1811
+ display: ee < 460 ? "none" : "block"
2437
1812
  }
2438
1813
  }
2439
1814
  ),
2440
- /* @__PURE__ */ e.jsxs("span", { style: { display: ue < 800 ? "none" : "block" }, className: `text-xs ${d ? "text-gray-100" : "text-gray-700"} font-mono w-10 text-right`, children: [
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.jsx("style", { children: `
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: ${q};
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: ${q};
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 Qt() {
2498
- const [o, u] = v(null), [g, m] = v("No track loaded"), [_, p] = v("purple"), [k, y] = v(!1), [N, q] = v(!1), [M, O] = v("light"), S = C(null), V = (Y) => {
2499
- var $;
2500
- const K = ($ = Y.target.files) == null ? void 0 : $[0];
2501
- if (K) {
2502
- const b = URL.createObjectURL(K);
2503
- u(b), m(K.name);
2504
- }
2505
- }, U = () => {
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, h] = 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__ */ e.jsxs(
1882
+ /* @__PURE__ */ r(
2518
1883
  "button",
2519
1884
  {
2520
- onClick: () => y(!k),
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.jsx("span", { children: "🎨" }),
1888
+ /* @__PURE__ */ e("span", { children: "🎨" }),
2524
1889
  " Themes"
2525
1890
  ]
2526
1891
  }
2527
1892
  )
2528
1893
  ] }),
2529
- /* @__PURE__ */ e.jsx(
2530
- Yt,
1894
+ /* @__PURE__ */ e(
1895
+ gt,
2531
1896
  {
2532
- audio: o || void 0,
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: M,
2539
- transparent: N,
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.jsx(Kt, { audio: o || "", width: 400, thumbnail: "https://cdn-icons-png.flaticon.com/512/8316/8316619.png", autoPlay: !1, gradient: ["#26ce3aff", "#39eed9ff"], background: "#c0ffefff" }),
2553
- /* @__PURE__ */ e.jsx(Gt, { audio: o || "", thumbnail: "https://cdn-icons-png.flaticon.com/512/17524/17524837.png", autoPlay: !1, gradient: ["#26ce3aff", "#39eed9ff"], background: "#c0ffefff" }),
2554
- /* @__PURE__ */ e.jsxs("div", { className: "mt-6 flex flex-wrap items-center gap-3", children: [
2555
- /* @__PURE__ */ e.jsx(
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: S,
2560
- onChange: V,
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), h(S.name);
1931
+ }
1932
+ },
2561
1933
  accept: "audio/*",
2562
1934
  className: "hidden"
2563
1935
  }
2564
1936
  ),
2565
- /* @__PURE__ */ e.jsxs(
1937
+ /* @__PURE__ */ r(
2566
1938
  "button",
2567
1939
  {
2568
- onClick: U,
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.jsx(Ht, { size: 16 }),
1946
+ /* @__PURE__ */ e(ct, { size: 16 }),
2572
1947
  "Load Audio"
2573
1948
  ]
2574
1949
  }
2575
1950
  ),
2576
- /* @__PURE__ */ e.jsx(
1951
+ /* @__PURE__ */ e(
2577
1952
  "button",
2578
1953
  {
2579
- onClick: () => O(M === "dark" ? "light" : "dark"),
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: M === "dark" ? "Light" : "Dark"
1956
+ children: U === "dark" ? "Light" : "Dark"
2582
1957
  }
2583
1958
  ),
2584
- /* @__PURE__ */ e.jsxs(
1959
+ /* @__PURE__ */ r(
2585
1960
  "button",
2586
1961
  {
2587
- onClick: () => q(!N),
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(N)
1966
+ String(P)
2592
1967
  ]
2593
1968
  }
2594
1969
  )
@@ -2597,11 +1972,11 @@ function Qt() {
2597
1972
  ] }) });
2598
1973
  }
2599
1974
  export {
2600
- Qt as DemoVisualizePlayer,
2601
- Gt as NanoAudioPlayer,
2602
- Ut as ThemeSelector,
2603
- Xt as VideoPlayer,
2604
- Yt as VisualizePlayer,
2605
- Kt as WaveAudioPlayer,
2606
- Ae as themes
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
  };