twist-aplayer 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +12 -12
- package/dist/index.mjs +136 -135
- package/dist/twist-aplayer.umd.js +10 -10
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as ee from "react";
|
|
2
|
-
import _e, { useMemo as K, useRef as F, useState as H, useEffect as
|
|
2
|
+
import _e, { useMemo as K, useRef as F, useState as H, useEffect as k, useCallback as L } from "react";
|
|
3
3
|
var be = { exports: {} }, ie = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
@@ -15,14 +15,14 @@ function Br() {
|
|
|
15
15
|
if (er) return ie;
|
|
16
16
|
er = 1;
|
|
17
17
|
var e = _e, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, f = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
18
|
-
function p
|
|
18
|
+
function y(p, s, d) {
|
|
19
19
|
var b, l = {}, c = null, E = null;
|
|
20
20
|
d !== void 0 && (c = "" + d), s.key !== void 0 && (c = "" + s.key), s.ref !== void 0 && (E = s.ref);
|
|
21
21
|
for (b in s) a.call(s, b) && !f.hasOwnProperty(b) && (l[b] = s[b]);
|
|
22
|
-
if (
|
|
23
|
-
return { $$typeof: t, type:
|
|
22
|
+
if (p && p.defaultProps) for (b in s = p.defaultProps, s) l[b] === void 0 && (l[b] = s[b]);
|
|
23
|
+
return { $$typeof: t, type: p, key: c, ref: E, props: l, _owner: i.current };
|
|
24
24
|
}
|
|
25
|
-
return ie.Fragment = n, ie.jsx =
|
|
25
|
+
return ie.Fragment = n, ie.jsx = y, ie.jsxs = y, ie;
|
|
26
26
|
}
|
|
27
27
|
var oe = {};
|
|
28
28
|
/**
|
|
@@ -37,7 +37,7 @@ var oe = {};
|
|
|
37
37
|
var rr;
|
|
38
38
|
function zr() {
|
|
39
39
|
return rr || (rr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
40
|
-
var e = _e, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"),
|
|
40
|
+
var e = _e, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), f = Symbol.for("react.profiler"), y = Symbol.for("react.provider"), p = Symbol.for("react.context"), s = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), l = Symbol.for("react.memo"), c = Symbol.for("react.lazy"), E = Symbol.for("react.offscreen"), S = Symbol.iterator, o = "@@iterator";
|
|
41
41
|
function h(r) {
|
|
42
42
|
if (r === null || typeof r != "object")
|
|
43
43
|
return null;
|
|
@@ -65,7 +65,7 @@ function zr() {
|
|
|
65
65
|
var C = !1, re = !1, U = !1, B = !1, ce = !1, le;
|
|
66
66
|
le = Symbol.for("react.module.reference");
|
|
67
67
|
function Se(r) {
|
|
68
|
-
return !!(typeof r == "string" || typeof r == "function" || r === a || r === f || ce || r === i || r === d || r === b || B || r === E || C || re || U || typeof r == "object" && r !== null && (r.$$typeof === c || r.$$typeof === l || r.$$typeof ===
|
|
68
|
+
return !!(typeof r == "string" || typeof r == "function" || r === a || r === f || ce || r === i || r === d || r === b || B || r === E || C || re || U || typeof r == "object" && r !== null && (r.$$typeof === c || r.$$typeof === l || r.$$typeof === y || r.$$typeof === p || r.$$typeof === s || // This needs to include all possible module reference object
|
|
69
69
|
// types supported by any Flight configuration anywhere since
|
|
70
70
|
// we don't know which Flight build this will end up being used
|
|
71
71
|
// with.
|
|
@@ -81,7 +81,7 @@ function zr() {
|
|
|
81
81
|
function fe(r) {
|
|
82
82
|
return r.displayName || "Context";
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function I(r) {
|
|
85
85
|
if (r == null)
|
|
86
86
|
return null;
|
|
87
87
|
if (typeof r.tag == "number" && x("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
|
|
@@ -104,21 +104,21 @@ function zr() {
|
|
|
104
104
|
}
|
|
105
105
|
if (typeof r == "object")
|
|
106
106
|
switch (r.$$typeof) {
|
|
107
|
-
case
|
|
107
|
+
case p:
|
|
108
108
|
var u = r;
|
|
109
109
|
return fe(u) + ".Consumer";
|
|
110
|
-
case
|
|
110
|
+
case y:
|
|
111
111
|
var m = r;
|
|
112
112
|
return fe(m._context) + ".Provider";
|
|
113
113
|
case s:
|
|
114
114
|
return we(r, r.render, "ForwardRef");
|
|
115
115
|
case l:
|
|
116
116
|
var _ = r.displayName || null;
|
|
117
|
-
return _ !== null ? _ :
|
|
117
|
+
return _ !== null ? _ : I(r.type) || "Memo";
|
|
118
118
|
case c: {
|
|
119
119
|
var j = r, R = j._payload, T = j._init;
|
|
120
120
|
try {
|
|
121
|
-
return
|
|
121
|
+
return I(T(R));
|
|
122
122
|
} catch {
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
@@ -126,11 +126,11 @@ function zr() {
|
|
|
126
126
|
}
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
var
|
|
129
|
+
var V = Object.assign, Y = 0, J, te, ne, ae, O, de, De;
|
|
130
130
|
function ke() {
|
|
131
131
|
}
|
|
132
132
|
ke.__reactDisabledLog = !0;
|
|
133
|
-
function
|
|
133
|
+
function pr() {
|
|
134
134
|
{
|
|
135
135
|
if (Y === 0) {
|
|
136
136
|
J = console.log, te = console.info, ne = console.warn, ae = console.error, O = console.group, de = console.groupCollapsed, De = console.groupEnd;
|
|
@@ -162,25 +162,25 @@ function zr() {
|
|
|
162
162
|
writable: !0
|
|
163
163
|
};
|
|
164
164
|
Object.defineProperties(console, {
|
|
165
|
-
log:
|
|
165
|
+
log: V({}, r, {
|
|
166
166
|
value: J
|
|
167
167
|
}),
|
|
168
|
-
info:
|
|
168
|
+
info: V({}, r, {
|
|
169
169
|
value: te
|
|
170
170
|
}),
|
|
171
|
-
warn:
|
|
171
|
+
warn: V({}, r, {
|
|
172
172
|
value: ne
|
|
173
173
|
}),
|
|
174
|
-
error:
|
|
174
|
+
error: V({}, r, {
|
|
175
175
|
value: ae
|
|
176
176
|
}),
|
|
177
|
-
group:
|
|
177
|
+
group: V({}, r, {
|
|
178
178
|
value: O
|
|
179
179
|
}),
|
|
180
|
-
groupCollapsed:
|
|
180
|
+
groupCollapsed: V({}, r, {
|
|
181
181
|
value: de
|
|
182
182
|
}),
|
|
183
|
-
groupEnd:
|
|
183
|
+
groupEnd: V({}, r, {
|
|
184
184
|
value: De
|
|
185
185
|
})
|
|
186
186
|
});
|
|
@@ -207,7 +207,7 @@ function zr() {
|
|
|
207
207
|
var gr = typeof WeakMap == "function" ? WeakMap : Map;
|
|
208
208
|
me = new gr();
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function Ve(r, u) {
|
|
211
211
|
if (!r || Oe)
|
|
212
212
|
return "";
|
|
213
213
|
{
|
|
@@ -220,7 +220,7 @@ function zr() {
|
|
|
220
220
|
var j = Error.prepareStackTrace;
|
|
221
221
|
Error.prepareStackTrace = void 0;
|
|
222
222
|
var R;
|
|
223
|
-
R = Te.current, Te.current = null,
|
|
223
|
+
R = Te.current, Te.current = null, pr();
|
|
224
224
|
try {
|
|
225
225
|
if (u) {
|
|
226
226
|
var T = function() {
|
|
@@ -279,7 +279,7 @@ function zr() {
|
|
|
279
279
|
return typeof r == "function" && me.set(r, Ze), Ze;
|
|
280
280
|
}
|
|
281
281
|
function Er(r, u, m) {
|
|
282
|
-
return
|
|
282
|
+
return Ve(r, !1);
|
|
283
283
|
}
|
|
284
284
|
function xr(r) {
|
|
285
285
|
var u = r.prototype;
|
|
@@ -289,7 +289,7 @@ function zr() {
|
|
|
289
289
|
if (r == null)
|
|
290
290
|
return "";
|
|
291
291
|
if (typeof r == "function")
|
|
292
|
-
return
|
|
292
|
+
return Ve(r, xr(r));
|
|
293
293
|
if (typeof r == "string")
|
|
294
294
|
return ve(r);
|
|
295
295
|
switch (r) {
|
|
@@ -314,8 +314,8 @@ function zr() {
|
|
|
314
314
|
}
|
|
315
315
|
return "";
|
|
316
316
|
}
|
|
317
|
-
var
|
|
318
|
-
function
|
|
317
|
+
var ye = Object.prototype.hasOwnProperty, Ie = {}, Fe = g.ReactDebugCurrentFrame;
|
|
318
|
+
function pe(r) {
|
|
319
319
|
if (r) {
|
|
320
320
|
var u = r._owner, m = he(r.type, r._source, u ? u.type : null);
|
|
321
321
|
Fe.setExtraStackFrame(m);
|
|
@@ -324,7 +324,7 @@ function zr() {
|
|
|
324
324
|
}
|
|
325
325
|
function _r(r, u, m, _, j) {
|
|
326
326
|
{
|
|
327
|
-
var R = Function.call.bind(
|
|
327
|
+
var R = Function.call.bind(ye);
|
|
328
328
|
for (var T in r)
|
|
329
329
|
if (R(r, T)) {
|
|
330
330
|
var w = void 0;
|
|
@@ -337,7 +337,7 @@ function zr() {
|
|
|
337
337
|
} catch ($) {
|
|
338
338
|
w = $;
|
|
339
339
|
}
|
|
340
|
-
w && !(w instanceof Error) && (
|
|
340
|
+
w && !(w instanceof Error) && (pe(j), x("%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).", _ || "React class", m, T, typeof w), pe(null)), w instanceof Error && !(w.message in Ie) && (Ie[w.message] = !0, pe(j), x("Failed %s type: %s", m, w.message), pe(null));
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
}
|
|
@@ -372,7 +372,7 @@ function zr() {
|
|
|
372
372
|
__source: !0
|
|
373
373
|
}, We, Ue;
|
|
374
374
|
function Or(r) {
|
|
375
|
-
if (
|
|
375
|
+
if (ye.call(r, "ref")) {
|
|
376
376
|
var u = Object.getOwnPropertyDescriptor(r, "ref").get;
|
|
377
377
|
if (u && u.isReactWarning)
|
|
378
378
|
return !1;
|
|
@@ -380,7 +380,7 @@ function zr() {
|
|
|
380
380
|
return r.ref !== void 0;
|
|
381
381
|
}
|
|
382
382
|
function Rr(r) {
|
|
383
|
-
if (
|
|
383
|
+
if (ye.call(r, "key")) {
|
|
384
384
|
var u = Object.getOwnPropertyDescriptor(r, "key").get;
|
|
385
385
|
if (u && u.isReactWarning)
|
|
386
386
|
return !1;
|
|
@@ -446,7 +446,7 @@ function zr() {
|
|
|
446
446
|
var R, T = {}, w = null, M = null;
|
|
447
447
|
m !== void 0 && (ze(m), w = "" + m), Rr(u) && (ze(u.key), w = "" + u.key), Or(u) && (M = u.ref, Lr(u, j));
|
|
448
448
|
for (R in u)
|
|
449
|
-
|
|
449
|
+
ye.call(u, R) && !jr.hasOwnProperty(R) && (T[R] = u[R]);
|
|
450
450
|
if (r && r.defaultProps) {
|
|
451
451
|
var $ = r.defaultProps;
|
|
452
452
|
for (R in $)
|
|
@@ -475,7 +475,7 @@ function zr() {
|
|
|
475
475
|
function Ge() {
|
|
476
476
|
{
|
|
477
477
|
if (Le.current) {
|
|
478
|
-
var r =
|
|
478
|
+
var r = I(Le.current.type);
|
|
479
479
|
if (r)
|
|
480
480
|
return `
|
|
481
481
|
|
|
@@ -510,7 +510,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
510
510
|
return;
|
|
511
511
|
Ke[m] = !0;
|
|
512
512
|
var _ = "";
|
|
513
|
-
r && r._owner && r._owner !== Le.current && (_ = " It was passed a child from " +
|
|
513
|
+
r && r._owner && r._owner !== Le.current && (_ = " It was passed a child from " + I(r._owner.type) + "."), X(r), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, _), X(null);
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
function Xe(r, u) {
|
|
@@ -547,11 +547,11 @@ Check the top-level render call using <` + m + ">.");
|
|
|
547
547
|
else
|
|
548
548
|
return;
|
|
549
549
|
if (m) {
|
|
550
|
-
var _ =
|
|
550
|
+
var _ = I(u);
|
|
551
551
|
_r(m, r.props, "prop", _, r);
|
|
552
552
|
} else if (u.PropTypes !== void 0 && !Pe) {
|
|
553
553
|
Pe = !0;
|
|
554
|
-
var j =
|
|
554
|
+
var j = I(u);
|
|
555
555
|
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
|
|
556
556
|
}
|
|
557
557
|
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
@@ -578,7 +578,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
578
578
|
var M = Nr();
|
|
579
579
|
M ? w += M : w += Ge();
|
|
580
580
|
var $;
|
|
581
|
-
r === null ? $ = "null" : Re(r) ? $ = "array" : r !== void 0 && r.$$typeof === t ? ($ = "<" + (
|
|
581
|
+
r === null ? $ = "null" : Re(r) ? $ = "array" : r !== void 0 && r.$$typeof === t ? ($ = "<" + (I(r.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof r, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, w);
|
|
582
582
|
}
|
|
583
583
|
var A = Ar(r, u, m, j, R);
|
|
584
584
|
if (A == null)
|
|
@@ -602,11 +602,11 @@ Check the top-level render call using <` + m + ">.");
|
|
|
602
602
|
function kr(r, u, m) {
|
|
603
603
|
return Qe(r, u, m, !0);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function Vr(r, u, m) {
|
|
606
606
|
return Qe(r, u, m, !1);
|
|
607
607
|
}
|
|
608
|
-
var
|
|
609
|
-
oe.Fragment = a, oe.jsx =
|
|
608
|
+
var Ir = Vr, Fr = kr;
|
|
609
|
+
oe.Fragment = a, oe.jsx = Ir, oe.jsxs = Fr;
|
|
610
610
|
}()), oe;
|
|
611
611
|
}
|
|
612
612
|
var tr;
|
|
@@ -632,8 +632,8 @@ function Wr(e, t) {
|
|
|
632
632
|
cv: (a) => ge(`${n()}-${e}-${a}`),
|
|
633
633
|
cvm: (a, i = {}) => {
|
|
634
634
|
const f = n();
|
|
635
|
-
for (const
|
|
636
|
-
i[ge(`${f}-${e}-${
|
|
635
|
+
for (const y of Object.keys(a))
|
|
636
|
+
i[ge(`${f}-${e}-${y}`)] = a[y];
|
|
637
637
|
return i;
|
|
638
638
|
},
|
|
639
639
|
gcv: (a) => nr(`${n()}-${e}-${a}`),
|
|
@@ -641,8 +641,8 @@ function Wr(e, t) {
|
|
|
641
641
|
nv: (a) => ge(`${n()}-${a}`),
|
|
642
642
|
nvm: (a, i = {}) => {
|
|
643
643
|
const f = n();
|
|
644
|
-
for (const
|
|
645
|
-
i[ge(`${f}-${
|
|
644
|
+
for (const y of Object.keys(a))
|
|
645
|
+
i[ge(`${f}-${y}`)] = a[y];
|
|
646
646
|
return i;
|
|
647
647
|
},
|
|
648
648
|
gnv: (a) => nr(`${n()}-${a}`),
|
|
@@ -689,19 +689,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
689
689
|
function Kr(e, t) {
|
|
690
690
|
var n = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
691
691
|
if (n != null) {
|
|
692
|
-
var a, i, f,
|
|
692
|
+
var a, i, f, y, p = [], s = !0, d = !1;
|
|
693
693
|
try {
|
|
694
|
-
if (f = (n = n.call(e)).next, t !== 0) for (; !(s = (a = f.call(n)).done) && (
|
|
694
|
+
if (f = (n = n.call(e)).next, t !== 0) for (; !(s = (a = f.call(n)).done) && (p.push(a.value), p.length !== t); s = !0) ;
|
|
695
695
|
} catch (b) {
|
|
696
696
|
d = !0, i = b;
|
|
697
697
|
} finally {
|
|
698
698
|
try {
|
|
699
|
-
if (!s && n.return != null && (
|
|
699
|
+
if (!s && n.return != null && (y = n.return(), Object(y) !== y)) return;
|
|
700
700
|
} finally {
|
|
701
701
|
if (d) throw i;
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
-
return
|
|
704
|
+
return p;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
function Jr(e) {
|
|
@@ -723,19 +723,19 @@ function Xr(e, t) {
|
|
|
723
723
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
724
724
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
725
725
|
}
|
|
726
|
-
var f,
|
|
726
|
+
var f, y = !0, p = !1;
|
|
727
727
|
return { s: function() {
|
|
728
728
|
n = n.call(e);
|
|
729
729
|
}, n: function() {
|
|
730
730
|
var d = n.next();
|
|
731
|
-
return
|
|
731
|
+
return y = d.done, d;
|
|
732
732
|
}, e: function(d) {
|
|
733
|
-
|
|
733
|
+
p = !0, f = d;
|
|
734
734
|
}, f: function() {
|
|
735
735
|
try {
|
|
736
|
-
|
|
736
|
+
y || n.return == null || n.return();
|
|
737
737
|
} finally {
|
|
738
|
-
if (
|
|
738
|
+
if (p) throw f;
|
|
739
739
|
}
|
|
740
740
|
} };
|
|
741
741
|
}
|
|
@@ -817,14 +817,14 @@ function tt(e, t) {
|
|
|
817
817
|
return n;
|
|
818
818
|
}
|
|
819
819
|
function nt(e) {
|
|
820
|
-
var t = e.attrs, n = e.size, a = e.title, i = e.spin, f = e.rotate,
|
|
820
|
+
var t = e.attrs, n = e.size, a = e.title, i = e.spin, f = e.rotate, y = e.color, p = rt(e, Ur), s = function(b) {
|
|
821
821
|
var l = n || b.size || "1em", c, E = "", S = "";
|
|
822
822
|
return b.className && (c = b.className), e.className && (c = c ? "".concat(c, " ").concat(e.className) : e.className), i && (c ? c += " twist-icon-loading" : c = "twist-icon-loading"), f && (E = "rotate(".concat(f, "deg)"), S = "rotate(".concat(f, "deg)")), /* @__PURE__ */ ee.createElement("svg", xe({
|
|
823
823
|
xmlns: "http://www.w3.org/2000/svg"
|
|
824
|
-
}, b.attrs, t,
|
|
824
|
+
}, b.attrs, t, p, {
|
|
825
825
|
className: c,
|
|
826
826
|
style: se(se({
|
|
827
|
-
color:
|
|
827
|
+
color: y || b.color,
|
|
828
828
|
msTransform: E,
|
|
829
829
|
transform: S
|
|
830
830
|
}, b.style), e.style),
|
|
@@ -840,7 +840,7 @@ function at(e) {
|
|
|
840
840
|
var t = {}, n = e.split(";"), a = Xr(n), i;
|
|
841
841
|
try {
|
|
842
842
|
for (a.s(); !(i = a.n()).done; ) {
|
|
843
|
-
var f = i.value,
|
|
843
|
+
var f = i.value, y = f.split(":"), p = Yr(y, 2), s = p[0], d = p[1];
|
|
844
844
|
if (s && d) {
|
|
845
845
|
var b = s.trim().replace(/-./g, function(l) {
|
|
846
846
|
return l.charAt(1).toUpperCase();
|
|
@@ -894,22 +894,22 @@ function ut({
|
|
|
894
894
|
playedPercentage: t,
|
|
895
895
|
onSeek: n
|
|
896
896
|
}) {
|
|
897
|
-
const a = W("aplayer-bar"), i = W("aplayer-icon"), f = F(null), [
|
|
898
|
-
|
|
899
|
-
s.current ||
|
|
897
|
+
const a = W("aplayer-bar"), i = W("aplayer-icon"), f = F(null), [y, p] = H(t), s = F(!1);
|
|
898
|
+
k(() => {
|
|
899
|
+
s.current || p(t);
|
|
900
900
|
}, [t]);
|
|
901
901
|
const d = L(
|
|
902
902
|
(b) => {
|
|
903
903
|
s.current = !0;
|
|
904
904
|
const l = Ce(b, f);
|
|
905
|
-
|
|
905
|
+
p(l);
|
|
906
906
|
const c = (S) => {
|
|
907
907
|
const o = Ce(S, f);
|
|
908
|
-
|
|
908
|
+
p(o);
|
|
909
909
|
}, E = (S) => {
|
|
910
910
|
document.removeEventListener("mousemove", c), document.removeEventListener("mouseup", E);
|
|
911
911
|
const o = Ce(S, f);
|
|
912
|
-
|
|
912
|
+
p(o), n == null || n(o), s.current = !1;
|
|
913
913
|
};
|
|
914
914
|
document.addEventListener("mousemove", c), document.addEventListener("mouseup", E);
|
|
915
915
|
},
|
|
@@ -929,12 +929,12 @@ function ut({
|
|
|
929
929
|
style: { width: `${e * 100}%` }
|
|
930
930
|
}
|
|
931
931
|
) : null,
|
|
932
|
-
typeof
|
|
932
|
+
typeof y < "u" ? /* @__PURE__ */ v.jsx(
|
|
933
933
|
"div",
|
|
934
934
|
{
|
|
935
935
|
className: a.be("played"),
|
|
936
936
|
style: {
|
|
937
|
-
width: `${
|
|
937
|
+
width: `${y * 100}%`
|
|
938
938
|
},
|
|
939
939
|
children: /* @__PURE__ */ v.jsx(
|
|
940
940
|
"span",
|
|
@@ -973,22 +973,22 @@ function mt(e) {
|
|
|
973
973
|
function ht(e) {
|
|
974
974
|
return N({ attrs: { viewBox: "0 0 24 24" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M7 15V9h4l5-5v16l-5-5z" } }] })(e);
|
|
975
975
|
}
|
|
976
|
-
function
|
|
976
|
+
function yt(e) {
|
|
977
977
|
return N({ attrs: { viewBox: "0 0 24 24" }, children: [{ tag: "path", attrs: { fill: "currentColor", d: "M19 11.975q0-2.075-1.1-3.787t-2.95-2.563q-.375-.175-.55-.537t-.05-.738q.15-.4.538-.575t.787 0Q18.1 4.85 19.55 7.063T21 11.974t-1.45 4.913t-3.875 3.287q-.4.175-.788 0t-.537-.575q-.125-.375.05-.737t.55-.538q1.85-.85 2.95-2.562t1.1-3.788M7 15H4q-.425 0-.712-.288T3 14v-4q0-.425.288-.712T4 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T10.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.513.013T14 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2" } }] })(e);
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function pt({
|
|
980
980
|
volume: e,
|
|
981
981
|
muted: t,
|
|
982
982
|
onToggleMuted: n,
|
|
983
983
|
onChangeVolume: a
|
|
984
984
|
}) {
|
|
985
|
-
const i = W("aplayer-volumn"), f = W("aplayer-icon"),
|
|
985
|
+
const i = W("aplayer-volumn"), f = W("aplayer-icon"), y = F(null), [p, s] = H(!1), d = L(
|
|
986
986
|
(b) => {
|
|
987
|
-
a(Ae(b,
|
|
987
|
+
a(Ae(b, y)), s(!0);
|
|
988
988
|
const l = (E) => {
|
|
989
|
-
a(Ae(E,
|
|
989
|
+
a(Ae(E, y));
|
|
990
990
|
}, c = (E) => {
|
|
991
|
-
document.removeEventListener("mouseup", c), document.removeEventListener("mousemove", l), s(!1), a(Ae(E,
|
|
991
|
+
document.removeEventListener("mouseup", c), document.removeEventListener("mousemove", l), s(!1), a(Ae(E, y));
|
|
992
992
|
};
|
|
993
993
|
document.addEventListener("mousemove", l), document.addEventListener("mouseup", c);
|
|
994
994
|
},
|
|
@@ -1001,16 +1001,16 @@ function yt({
|
|
|
1001
1001
|
type: "button",
|
|
1002
1002
|
className: P(f.b(), f.bs("volume-down")),
|
|
1003
1003
|
onClick: () => n(),
|
|
1004
|
-
children: t || !e ? /* @__PURE__ */ v.jsx(ht, {}) : e >= 1 ? /* @__PURE__ */ v.jsx(
|
|
1004
|
+
children: t || !e ? /* @__PURE__ */ v.jsx(ht, {}) : e >= 1 ? /* @__PURE__ */ v.jsx(yt, {}) : /* @__PURE__ */ v.jsx(mt, {})
|
|
1005
1005
|
}
|
|
1006
1006
|
),
|
|
1007
1007
|
/* @__PURE__ */ v.jsx(
|
|
1008
1008
|
"div",
|
|
1009
1009
|
{
|
|
1010
1010
|
className: P(i.be("bar-wrap"), {
|
|
1011
|
-
[i.bem("bar-wrap", "active")]:
|
|
1011
|
+
[i.bem("bar-wrap", "active")]: p
|
|
1012
1012
|
}),
|
|
1013
|
-
ref:
|
|
1013
|
+
ref: y,
|
|
1014
1014
|
onMouseDown: d,
|
|
1015
1015
|
children: /* @__PURE__ */ v.jsx("div", { className: i.be("bar"), children: /* @__PURE__ */ v.jsx(
|
|
1016
1016
|
"div",
|
|
@@ -1030,7 +1030,7 @@ function ur(e) {
|
|
|
1030
1030
|
return "--:--";
|
|
1031
1031
|
if (Number.isNaN(e))
|
|
1032
1032
|
return "00:00";
|
|
1033
|
-
const t = (
|
|
1033
|
+
const t = (y) => y < 10 ? `0${y}` : `${y}`, n = Math.trunc(e / 60), a = Math.trunc(e - n * 60), i = Math.trunc(n / 60), f = Math.trunc(
|
|
1034
1034
|
e / 60 - 60 * Math.trunc(e / 60 / 60)
|
|
1035
1035
|
);
|
|
1036
1036
|
return e >= 3600 ? `${t(i)}:${t(f)}:${t(a)}` : `${t(n)}:${t(a)}`;
|
|
@@ -1057,8 +1057,8 @@ function St({
|
|
|
1057
1057
|
currentTime: a,
|
|
1058
1058
|
audioDurationSeconds: i,
|
|
1059
1059
|
bufferedSeconds: f,
|
|
1060
|
-
onToggleMenu:
|
|
1061
|
-
onToggleMuted:
|
|
1060
|
+
onToggleMenu: y,
|
|
1061
|
+
onToggleMuted: p,
|
|
1062
1062
|
order: s,
|
|
1063
1063
|
onOrderChange: d,
|
|
1064
1064
|
loop: b,
|
|
@@ -1111,11 +1111,11 @@ function St({
|
|
|
1111
1111
|
}
|
|
1112
1112
|
),
|
|
1113
1113
|
/* @__PURE__ */ v.jsx(
|
|
1114
|
-
|
|
1114
|
+
pt,
|
|
1115
1115
|
{
|
|
1116
1116
|
volume: e,
|
|
1117
1117
|
muted: n,
|
|
1118
|
-
onToggleMuted:
|
|
1118
|
+
onToggleMuted: p,
|
|
1119
1119
|
onChangeVolume: t
|
|
1120
1120
|
}
|
|
1121
1121
|
),
|
|
@@ -1146,7 +1146,7 @@ function St({
|
|
|
1146
1146
|
{
|
|
1147
1147
|
type: "button",
|
|
1148
1148
|
className: P(C.b(), C.bs("menu")),
|
|
1149
|
-
onClick: () =>
|
|
1149
|
+
onClick: () => y == null ? void 0 : y(),
|
|
1150
1150
|
children: /* @__PURE__ */ v.jsx(Et, {})
|
|
1151
1151
|
}
|
|
1152
1152
|
),
|
|
@@ -1171,8 +1171,8 @@ function wt({
|
|
|
1171
1171
|
onPlayAudio: a,
|
|
1172
1172
|
listMaxHeight: i
|
|
1173
1173
|
}) {
|
|
1174
|
-
const f = W("aplayer-list"),
|
|
1175
|
-
return
|
|
1174
|
+
const f = W("aplayer-list"), y = i ? { maxHeight: i } : void 0, p = L((d) => d ? typeof d == "string" ? d : d.name ?? "Audio artist" : "Audio artist", []), s = F(null);
|
|
1175
|
+
return k(() => {
|
|
1176
1176
|
if (s.current) {
|
|
1177
1177
|
const d = s.current;
|
|
1178
1178
|
return d.style.maxHeight = `${Math.min(
|
|
@@ -1189,7 +1189,7 @@ function wt({
|
|
|
1189
1189
|
className: P(f.b(), {
|
|
1190
1190
|
[f.bm("hide")]: !e
|
|
1191
1191
|
}),
|
|
1192
|
-
children: /* @__PURE__ */ v.jsx("ol", { style:
|
|
1192
|
+
children: /* @__PURE__ */ v.jsx("ol", { style: y, children: t.map((d, b) => /* @__PURE__ */ v.jsxs(
|
|
1193
1193
|
"li",
|
|
1194
1194
|
{
|
|
1195
1195
|
className: P({
|
|
@@ -1202,7 +1202,7 @@ function wt({
|
|
|
1202
1202
|
/* @__PURE__ */ v.jsx("span", { className: f.be("cur") }),
|
|
1203
1203
|
/* @__PURE__ */ v.jsx("span", { className: f.be("index"), children: b + 1 }),
|
|
1204
1204
|
/* @__PURE__ */ v.jsx("span", { className: f.be("title"), children: d.name ?? "Audio name" }),
|
|
1205
|
-
/* @__PURE__ */ v.jsx("span", { className: f.be("author"), children:
|
|
1205
|
+
/* @__PURE__ */ v.jsx("span", { className: f.be("author"), children: p(d.artist) })
|
|
1206
1206
|
]
|
|
1207
1207
|
},
|
|
1208
1208
|
d.name || b
|
|
@@ -1212,13 +1212,13 @@ function wt({
|
|
|
1212
1212
|
}
|
|
1213
1213
|
function sr({ show: e, lrcText: t, currentTime: n }) {
|
|
1214
1214
|
const a = W("aplayer-lrc"), i = K(() => Tt(t), [t]), f = K(() => {
|
|
1215
|
-
for (let
|
|
1216
|
-
const s = i[
|
|
1215
|
+
for (let p = 0; p < i.length; p++) {
|
|
1216
|
+
const s = i[p], d = i[p + 1];
|
|
1217
1217
|
if (n >= s[0] && (!d || n < d[0]))
|
|
1218
|
-
return
|
|
1218
|
+
return p;
|
|
1219
1219
|
}
|
|
1220
1220
|
return 0;
|
|
1221
|
-
}, [n, i]),
|
|
1221
|
+
}, [n, i]), y = K(() => ({
|
|
1222
1222
|
transform: `translateY(${-f * 16}px)`,
|
|
1223
1223
|
WebkitTransform: `translateY(${-f * 16}px)`
|
|
1224
1224
|
}), [f]);
|
|
@@ -1228,13 +1228,13 @@ function sr({ show: e, lrcText: t, currentTime: n }) {
|
|
|
1228
1228
|
className: P(a.b(), {
|
|
1229
1229
|
[a.bm("hide")]: !e
|
|
1230
1230
|
}),
|
|
1231
|
-
children: t ? /* @__PURE__ */ v.jsx("div", { className: a.be("contents"), style:
|
|
1231
|
+
children: t ? /* @__PURE__ */ v.jsx("div", { className: a.be("contents"), style: y, children: i.map(([, p], s) => /* @__PURE__ */ v.jsx(
|
|
1232
1232
|
"p",
|
|
1233
1233
|
{
|
|
1234
1234
|
className: P({
|
|
1235
1235
|
[a.be("current")]: s === f
|
|
1236
1236
|
}),
|
|
1237
|
-
children:
|
|
1237
|
+
children: p
|
|
1238
1238
|
},
|
|
1239
1239
|
s
|
|
1240
1240
|
)) }) : null
|
|
@@ -1248,12 +1248,12 @@ function Tt(e) {
|
|
|
1248
1248
|
const t = e.split(`
|
|
1249
1249
|
`), n = [], a = t.length;
|
|
1250
1250
|
for (let i = 0; i < a; i++) {
|
|
1251
|
-
const f = t[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g),
|
|
1251
|
+
const f = t[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g), y = t[i].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g, "").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g, "").replace(/^\s+|\s+$/g, "");
|
|
1252
1252
|
if (f) {
|
|
1253
|
-
const
|
|
1254
|
-
for (let s = 0; s <
|
|
1253
|
+
const p = f.length;
|
|
1254
|
+
for (let s = 0; s < p; s++) {
|
|
1255
1255
|
const d = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/.exec(f[s]), b = d[1] * 60, l = Number.parseInt(d[2]), c = d[4] ? Number.parseInt(d[4]) / (`${d[4]}`.length === 2 ? 100 : 1e3) : 0, E = b + l + c;
|
|
1256
|
-
n.push([E,
|
|
1256
|
+
n.push([E, y]);
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
}
|
|
@@ -1279,8 +1279,8 @@ function jt() {
|
|
|
1279
1279
|
function t(l, c) {
|
|
1280
1280
|
return l === c && (l !== 0 || 1 / l === 1 / c) || l !== l && c !== c;
|
|
1281
1281
|
}
|
|
1282
|
-
var n = typeof Object.is == "function" ? Object.is : t, a = e.useState, i = e.useEffect, f = e.useLayoutEffect,
|
|
1283
|
-
function
|
|
1282
|
+
var n = typeof Object.is == "function" ? Object.is : t, a = e.useState, i = e.useEffect, f = e.useLayoutEffect, y = e.useDebugValue;
|
|
1283
|
+
function p(l, c) {
|
|
1284
1284
|
var E = c(), S = a({ inst: { value: E, getSnapshot: c } }), o = S[0].inst, h = S[1];
|
|
1285
1285
|
return f(
|
|
1286
1286
|
function() {
|
|
@@ -1294,7 +1294,7 @@ function jt() {
|
|
|
1294
1294
|
});
|
|
1295
1295
|
},
|
|
1296
1296
|
[l]
|
|
1297
|
-
),
|
|
1297
|
+
), y(E), E;
|
|
1298
1298
|
}
|
|
1299
1299
|
function s(l) {
|
|
1300
1300
|
var c = l.getSnapshot;
|
|
@@ -1309,7 +1309,7 @@ function jt() {
|
|
|
1309
1309
|
function d(l, c) {
|
|
1310
1310
|
return c();
|
|
1311
1311
|
}
|
|
1312
|
-
var b = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d :
|
|
1312
|
+
var b = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : p;
|
|
1313
1313
|
return Ne.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : b, Ne;
|
|
1314
1314
|
}
|
|
1315
1315
|
var qe = {};
|
|
@@ -1339,7 +1339,7 @@ function Ot() {
|
|
|
1339
1339
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
1340
1340
|
), l = !0);
|
|
1341
1341
|
}
|
|
1342
|
-
h =
|
|
1342
|
+
h = y({
|
|
1343
1343
|
inst: { value: o, getSnapshot: S }
|
|
1344
1344
|
});
|
|
1345
1345
|
var g = h[0].inst, x = h[1];
|
|
@@ -1348,7 +1348,7 @@ function Ot() {
|
|
|
1348
1348
|
g.value = o, g.getSnapshot = S, n(g) && x({ inst: g });
|
|
1349
1349
|
},
|
|
1350
1350
|
[E, o, S]
|
|
1351
|
-
),
|
|
1351
|
+
), p(
|
|
1352
1352
|
function() {
|
|
1353
1353
|
return n(g) && x({ inst: g }), E(function() {
|
|
1354
1354
|
n(g) && x({ inst: g });
|
|
@@ -1371,7 +1371,7 @@ function Ot() {
|
|
|
1371
1371
|
return S();
|
|
1372
1372
|
}
|
|
1373
1373
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
1374
|
-
var i = _e, f = typeof Object.is == "function" ? Object.is : e,
|
|
1374
|
+
var i = _e, f = typeof Object.is == "function" ? Object.is : e, y = i.useState, p = i.useEffect, s = i.useLayoutEffect, d = i.useDebugValue, b = !1, l = !1, c = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : t;
|
|
1375
1375
|
qe.useSyncExternalStore = i.useSyncExternalStore !== void 0 ? i.useSyncExternalStore : c, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
1376
1376
|
}()), qe;
|
|
1377
1377
|
}
|
|
@@ -1383,25 +1383,26 @@ var G = Rt();
|
|
|
1383
1383
|
const Z = [];
|
|
1384
1384
|
function Lt(e) {
|
|
1385
1385
|
const t = F();
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1386
|
+
return k(() => {
|
|
1387
|
+
if (typeof window < "u" && !t.current) {
|
|
1388
|
+
const n = t.current = document.createElement("audio");
|
|
1389
|
+
typeof (e == null ? void 0 : e.src) < "u" && (n.src = e.src), typeof (e == null ? void 0 : e.autoPlay) < "u" && (n.autoplay = e.autoPlay), typeof (e == null ? void 0 : e.initialVolume) < "u" && (n.volume = e.initialVolume), Z.includes(n) || Z.push(n);
|
|
1390
|
+
}
|
|
1391
|
+
}, [e == null ? void 0 : e.autoPlay, e == null ? void 0 : e.initialVolume, e == null ? void 0 : e.src]), k(() => {
|
|
1391
1392
|
if (typeof window > "u") return;
|
|
1392
1393
|
const n = t.current;
|
|
1393
1394
|
if (n && (e != null && e.onError))
|
|
1394
1395
|
return n.addEventListener("error", e.onError), () => {
|
|
1395
1396
|
n.removeEventListener("error", e.onError);
|
|
1396
1397
|
};
|
|
1397
|
-
}, [e == null ? void 0 : e.onError]),
|
|
1398
|
+
}, [e == null ? void 0 : e.onError]), k(() => {
|
|
1398
1399
|
if (typeof window > "u") return;
|
|
1399
1400
|
const n = t.current;
|
|
1400
1401
|
if (n && (e != null && e.onEnded))
|
|
1401
1402
|
return n.addEventListener("ended", e.onEnded), () => {
|
|
1402
1403
|
n.removeEventListener("ended", e.onEnded);
|
|
1403
1404
|
};
|
|
1404
|
-
}, [e == null ? void 0 : e.onEnded]),
|
|
1405
|
+
}, [e == null ? void 0 : e.onEnded]), k(() => () => {
|
|
1405
1406
|
const n = t.current;
|
|
1406
1407
|
if (n) {
|
|
1407
1408
|
n.pause(), n.currentTime = 0;
|
|
@@ -1441,9 +1442,9 @@ function Pt(e) {
|
|
|
1441
1442
|
t.current.currentTime = o;
|
|
1442
1443
|
},
|
|
1443
1444
|
[t]
|
|
1444
|
-
),
|
|
1445
|
+
), y = L(() => {
|
|
1445
1446
|
t.current && (t.current.muted = !t.current.muted);
|
|
1446
|
-
}, [t]),
|
|
1447
|
+
}, [t]), p = L(
|
|
1447
1448
|
(o) => {
|
|
1448
1449
|
t.current && (t.current.volume = o);
|
|
1449
1450
|
},
|
|
@@ -1602,8 +1603,8 @@ function Pt(e) {
|
|
|
1602
1603
|
playAudio: a,
|
|
1603
1604
|
togglePlay: i,
|
|
1604
1605
|
seek: f,
|
|
1605
|
-
toggleMuted:
|
|
1606
|
-
setVolume:
|
|
1606
|
+
toggleMuted: y,
|
|
1607
|
+
setVolume: p,
|
|
1607
1608
|
volume: s,
|
|
1608
1609
|
muted: d,
|
|
1609
1610
|
currentTime: b,
|
|
@@ -1613,9 +1614,9 @@ function Pt(e) {
|
|
|
1613
1614
|
isLoading: S
|
|
1614
1615
|
};
|
|
1615
1616
|
}
|
|
1616
|
-
function
|
|
1617
|
+
function yr() {
|
|
1617
1618
|
const e = F([]);
|
|
1618
|
-
return
|
|
1619
|
+
return k(() => {
|
|
1619
1620
|
const n = e.current;
|
|
1620
1621
|
return () => {
|
|
1621
1622
|
for (const a of n)
|
|
@@ -1627,11 +1628,11 @@ function pr() {
|
|
|
1627
1628
|
}, []);
|
|
1628
1629
|
}
|
|
1629
1630
|
function $t() {
|
|
1630
|
-
const e = F(), [t, n] = H({ text: "", style: { opacity: 0 } }), a =
|
|
1631
|
-
(f,
|
|
1631
|
+
const e = F(), [t, n] = H({ text: "", style: { opacity: 0 } }), a = yr(), i = L(
|
|
1632
|
+
(f, y = 2e3) => {
|
|
1632
1633
|
e.current && clearTimeout(e.current), n({ text: f, style: { opacity: 1 } }), e.current = a(() => {
|
|
1633
1634
|
n({ text: f, style: { opacity: 0 } });
|
|
1634
|
-
},
|
|
1635
|
+
}, y);
|
|
1635
1636
|
},
|
|
1636
1637
|
[a]
|
|
1637
1638
|
);
|
|
@@ -1654,8 +1655,8 @@ function Nt(e, {
|
|
|
1654
1655
|
initialOrder: n = "list",
|
|
1655
1656
|
getSongId: a
|
|
1656
1657
|
}) {
|
|
1657
|
-
const [i, f] = H(t), [
|
|
1658
|
-
|
|
1658
|
+
const [i, f] = H(t), [y, p] = H(n), s = K(() => y === "list" ? e : Ct(e), [e, y]), [d, b] = H(s[0]);
|
|
1659
|
+
k(() => {
|
|
1659
1660
|
const o = s.find(
|
|
1660
1661
|
(h) => a(h) === a(d)
|
|
1661
1662
|
);
|
|
@@ -1684,8 +1685,8 @@ function Nt(e, {
|
|
|
1684
1685
|
next: c,
|
|
1685
1686
|
previous: E,
|
|
1686
1687
|
prioritize: S,
|
|
1687
|
-
order:
|
|
1688
|
-
setOrder:
|
|
1688
|
+
order: y,
|
|
1689
|
+
setOrder: p,
|
|
1689
1690
|
loop: i,
|
|
1690
1691
|
setLoop: f,
|
|
1691
1692
|
length: s.length
|
|
@@ -1704,8 +1705,8 @@ function kt({
|
|
|
1704
1705
|
initialLoop: a,
|
|
1705
1706
|
initialOrder: i,
|
|
1706
1707
|
autoPlay: f = !1,
|
|
1707
|
-
listMaxHeight:
|
|
1708
|
-
mini:
|
|
1708
|
+
listMaxHeight: y = 250,
|
|
1709
|
+
mini: p = !1,
|
|
1709
1710
|
mutex: s = !0,
|
|
1710
1711
|
listFolded: d = !1,
|
|
1711
1712
|
theme: b = "light"
|
|
@@ -1715,7 +1716,7 @@ function kt({
|
|
|
1715
1716
|
initialLoop: a,
|
|
1716
1717
|
initialOrder: i,
|
|
1717
1718
|
getSongId: (O) => O.url
|
|
1718
|
-
}), [E, S] = $t(), o =
|
|
1719
|
+
}), [E, S] = $t(), o = yr(), h = F(), g = L(() => {
|
|
1719
1720
|
h.current && (clearTimeout(h.current), h.current = void 0);
|
|
1720
1721
|
}, []), x = Pt({
|
|
1721
1722
|
src: c.currentSong.url,
|
|
@@ -1734,11 +1735,11 @@ function kt({
|
|
|
1734
1735
|
c.hasNextSong && c.next();
|
|
1735
1736
|
}
|
|
1736
1737
|
});
|
|
1737
|
-
|
|
1738
|
+
k(() => {
|
|
1738
1739
|
f && x.playAudio(c.currentSong.url);
|
|
1739
1740
|
}, []);
|
|
1740
1741
|
const q = F(!0);
|
|
1741
|
-
|
|
1742
|
+
k(() => {
|
|
1742
1743
|
q.current ? q.current = !1 : c.currentSong && x.playAudio(c.currentSong.url);
|
|
1743
1744
|
}, [c.currentSong, x.playAudio]);
|
|
1744
1745
|
const C = L(() => {
|
|
@@ -1751,10 +1752,10 @@ function kt({
|
|
|
1751
1752
|
g(), ce(O);
|
|
1752
1753
|
},
|
|
1753
1754
|
[g, ce]
|
|
1754
|
-
), [Se, we] = H(() => U && !d), [fe,
|
|
1755
|
-
return
|
|
1756
|
-
|
|
1757
|
-
}, [
|
|
1755
|
+
), [Se, we] = H(() => U && !d), [fe, I] = H(p), [V, Y] = H(!0), J = F(null);
|
|
1756
|
+
return k(() => {
|
|
1757
|
+
I(p);
|
|
1758
|
+
}, [p]), k(() => {
|
|
1758
1759
|
if (t === "fixed" && J.current) {
|
|
1759
1760
|
const O = J.current;
|
|
1760
1761
|
return O.style.width = `${O.offsetWidth - 18}px`, () => {
|
|
@@ -1808,7 +1809,7 @@ function kt({
|
|
|
1808
1809
|
t === "fixed" ? null : /* @__PURE__ */ v.jsx(
|
|
1809
1810
|
sr,
|
|
1810
1811
|
{
|
|
1811
|
-
show:
|
|
1812
|
+
show: V,
|
|
1812
1813
|
lrcText: c.currentSong.lrc,
|
|
1813
1814
|
currentTime: x.currentTime ?? 0
|
|
1814
1815
|
}
|
|
@@ -1837,7 +1838,7 @@ function kt({
|
|
|
1837
1838
|
onSkipBack: () => {
|
|
1838
1839
|
c.previous();
|
|
1839
1840
|
},
|
|
1840
|
-
showLyrics:
|
|
1841
|
+
showLyrics: V,
|
|
1841
1842
|
onToggleLyrics: () => {
|
|
1842
1843
|
Y((O) => !O);
|
|
1843
1844
|
}
|
|
@@ -1849,7 +1850,7 @@ function kt({
|
|
|
1849
1850
|
"div",
|
|
1850
1851
|
{
|
|
1851
1852
|
className: l.be("miniswitcher"),
|
|
1852
|
-
onClick: () =>
|
|
1853
|
+
onClick: () => I((O) => !O),
|
|
1853
1854
|
children: /* @__PURE__ */ v.jsx("button", { className: l.bs("icon"), type: "button", children: /* @__PURE__ */ v.jsx(qt, {}) })
|
|
1854
1855
|
}
|
|
1855
1856
|
)
|
|
@@ -1861,13 +1862,13 @@ function kt({
|
|
|
1861
1862
|
audio: B,
|
|
1862
1863
|
playingAudioUrl: c.currentSong.url,
|
|
1863
1864
|
onPlayAudio: le,
|
|
1864
|
-
listMaxHeight:
|
|
1865
|
+
listMaxHeight: y
|
|
1865
1866
|
}
|
|
1866
1867
|
) : null,
|
|
1867
1868
|
t === "fixed" && /* @__PURE__ */ v.jsx(
|
|
1868
1869
|
sr,
|
|
1869
1870
|
{
|
|
1870
|
-
show:
|
|
1871
|
+
show: V,
|
|
1871
1872
|
lrcText: c.currentSong.lrc,
|
|
1872
1873
|
currentTime: x.currentTime ?? 0
|
|
1873
1874
|
}
|