twist-aplayer 1.2.0 → 1.3.0
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/LICENSE.md +20 -20
- package/README.md +139 -139
- package/dist/index.d.ts +39 -22
- package/dist/index.js +12 -12
- package/dist/index.min.css +1 -1
- package/dist/index.mjs +535 -548
- package/dist/twist-aplayer.umd.js +14 -14
- package/package.json +84 -75
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react");function qr(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const J=qr(d);var ye={exports:{}},te={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Ke;function Dr(){if(Ke)return
|
|
9
|
+
*/var Ke;function Dr(){if(Ke)return te;Ke=1;var e=d,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,c={key:!0,ref:!0,__self:!0,__source:!0};function p(E,s,v){var x,g={},f=null,l=null;v!==void 0&&(f=""+v),s.key!==void 0&&(f=""+s.key),s.ref!==void 0&&(l=s.ref);for(x in s)a.call(s,x)&&!c.hasOwnProperty(x)&&(g[x]=s[x]);if(E&&E.defaultProps)for(x in s=E.defaultProps,s)g[x]===void 0&&(g[x]=s[x]);return{$$typeof:t,type:E,key:f,ref:l,props:g,_owner:i.current}}return te.Fragment=n,te.jsx=p,te.jsxs=p,te}var ne={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,19 +14,19 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Je;function
|
|
18
|
-
`+
|
|
17
|
+
*/var Je;function Ir(){return Je||(Je=1,process.env.NODE_ENV!=="production"&&function(){var e=d,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),E=Symbol.for("react.context"),s=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),g=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),l=Symbol.for("react.offscreen"),_=Symbol.iterator,o="@@iterator";function y(r){if(r===null||typeof r!="object")return null;var u=_&&r[_]||r[o];return typeof u=="function"?u:null}var b=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function O(r){{for(var u=arguments.length,h=new Array(u>1?u-1:0),S=1;S<u;S++)h[S-1]=arguments[S];w("error",r,h)}}function w(r,u,h){{var S=b.ReactDebugCurrentFrame,R=S.getStackAddendum();R!==""&&(u+="%s",h=h.concat([R]));var C=h.map(function(j){return String(j)});C.unshift("Warning: "+u),Function.prototype.apply.call(console[r],console,C)}}var A=!1,X=!1,z=!1,V=!1,ue=!1,oe;oe=Symbol.for("react.module.reference");function se(r){return!!(typeof r=="string"||typeof r=="function"||r===a||r===c||ue||r===i||r===v||r===x||V||r===l||A||X||z||typeof r=="object"&&r!==null&&(r.$$typeof===f||r.$$typeof===g||r.$$typeof===p||r.$$typeof===E||r.$$typeof===s||r.$$typeof===oe||r.getModuleId!==void 0))}function Ee(r,u,h){var S=r.displayName;if(S)return S;var R=u.displayName||u.name||"";return R!==""?h+"("+R+")":h}function le(r){return r.displayName||"Context"}function I(r){if(r==null)return null;if(typeof r.tag=="number"&&O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case a:return"Fragment";case n:return"Portal";case c:return"Profiler";case i:return"StrictMode";case v:return"Suspense";case x:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case E:var u=r;return le(u)+".Consumer";case p:var h=r;return le(h._context)+".Provider";case s:return Ee(r,r.render,"ForwardRef");case g:var S=r.displayName||null;return S!==null?S:I(r.type)||"Memo";case f:{var R=r,C=R._payload,j=R._init;try{return I(j(C))}catch{return null}}}return null}var D=Object.assign,H=0,U,Q,Z,ee,re,P,ce;function Ae(){}Ae.__reactDisabledLog=!0;function dr(){{if(H===0){U=console.log,Q=console.info,Z=console.warn,ee=console.error,re=console.group,P=console.groupCollapsed,ce=console.groupEnd;var r={configurable:!0,enumerable:!0,value:Ae,writable:!0};Object.defineProperties(console,{info:r,log:r,warn:r,error:r,group:r,groupCollapsed:r,groupEnd:r})}H++}}function vr(){{if(H--,H===0){var r={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:D({},r,{value:U}),info:D({},r,{value:Q}),warn:D({},r,{value:Z}),error:D({},r,{value:ee}),group:D({},r,{value:re}),groupCollapsed:D({},r,{value:P}),groupEnd:D({},r,{value:ce})})}H<0&&O("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var xe=b.ReactCurrentDispatcher,Se;function fe(r,u,h){{if(Se===void 0)try{throw Error()}catch(R){var S=R.stack.trim().match(/\n( *(at )?)/);Se=S&&S[1]||""}return`
|
|
18
|
+
`+Se+r}}var _e=!1,de;{var mr=typeof WeakMap=="function"?WeakMap:Map;de=new mr}function Me(r,u){if(!r||_e)return"";{var h=de.get(r);if(h!==void 0)return h}var S;_e=!0;var R=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var C;C=xe.current,xe.current=null,dr();try{if(u){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(F){S=F}Reflect.construct(r,[],j)}else{try{j.call()}catch(F){S=F}r.call(j.prototype)}}else{try{throw Error()}catch(F){S=F}r()}}catch(F){if(F&&S&&typeof F.stack=="string"){for(var T=F.stack.split(`
|
|
19
19
|
`),N=S.stack.split(`
|
|
20
20
|
`),$=T.length-1,M=N.length-1;$>=1&&M>=0&&T[$]!==N[M];)M--;for(;$>=1&&M>=0;$--,M--)if(T[$]!==N[M]){if($!==1||M!==1)do if($--,M--,M<0||T[$]!==N[M]){var q=`
|
|
21
|
-
`+T[$].replace(" at new "," at ");return r.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",r.displayName)),typeof r=="function"&&
|
|
21
|
+
`+T[$].replace(" at new "," at ");return r.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",r.displayName)),typeof r=="function"&&de.set(r,q),q}while($>=1&&M>=0);break}}}finally{_e=!1,xe.current=C,vr(),Error.prepareStackTrace=R}var G=r?r.displayName||r.name:"",Ge=G?fe(G):"";return typeof r=="function"&&de.set(r,Ge),Ge}function hr(r,u,h){return Me(r,!1)}function yr(r){var u=r.prototype;return!!(u&&u.isReactComponent)}function ve(r,u,h){if(r==null)return"";if(typeof r=="function")return Me(r,yr(r));if(typeof r=="string")return fe(r);switch(r){case v:return fe("Suspense");case x:return fe("SuspenseList")}if(typeof r=="object")switch(r.$$typeof){case s:return hr(r.render);case g:return ve(r.type,u,h);case f:{var S=r,R=S._payload,C=S._init;try{return ve(C(R),u,h)}catch{}}}return""}var me=Object.prototype.hasOwnProperty,ke={},Ne=b.ReactDebugCurrentFrame;function he(r){if(r){var u=r._owner,h=ve(r.type,r._source,u?u.type:null);Ne.setExtraStackFrame(h)}else Ne.setExtraStackFrame(null)}function br(r,u,h,S,R){{var C=Function.call.bind(me);for(var j in r)if(C(r,j)){var T=void 0;try{if(typeof r[j]!="function"){var N=Error((S||"React class")+": "+h+" type `"+j+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof r[j]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw N.name="Invariant Violation",N}T=r[j](u,j,S,h,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch($){T=$}T&&!(T instanceof Error)&&(he(R),O("%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).",S||"React class",h,j,typeof T),he(null)),T instanceof Error&&!(T.message in ke)&&(ke[T.message]=!0,he(R),O("Failed %s type: %s",h,T.message),he(null))}}}var pr=Array.isArray;function Te(r){return pr(r)}function gr(r){{var u=typeof Symbol=="function"&&Symbol.toStringTag,h=u&&r[Symbol.toStringTag]||r.constructor.name||"Object";return h}}function Er(r){try{return qe(r),!1}catch{return!0}}function qe(r){return""+r}function De(r){if(Er(r))return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",gr(r)),qe(r)}var Ie=b.ReactCurrentOwner,xr={key:!0,ref:!0,__self:!0,__source:!0},Ve,Fe;function Sr(r){if(me.call(r,"ref")){var u=Object.getOwnPropertyDescriptor(r,"ref").get;if(u&&u.isReactWarning)return!1}return r.ref!==void 0}function _r(r){if(me.call(r,"key")){var u=Object.getOwnPropertyDescriptor(r,"key").get;if(u&&u.isReactWarning)return!1}return r.key!==void 0}function Tr(r,u){typeof r.ref=="string"&&Ie.current}function wr(r,u){{var h=function(){Ve||(Ve=!0,O("%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)",u))};h.isReactWarning=!0,Object.defineProperty(r,"key",{get:h,configurable:!0})}}function jr(r,u){{var h=function(){Fe||(Fe=!0,O("%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)",u))};h.isReactWarning=!0,Object.defineProperty(r,"ref",{get:h,configurable:!0})}}var Or=function(r,u,h,S,R,C,j){var T={$$typeof:t,type:r,key:u,ref:h,props:j,_owner:C};return T._store={},Object.defineProperty(T._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(T,"_self",{configurable:!1,enumerable:!1,writable:!1,value:S}),Object.defineProperty(T,"_source",{configurable:!1,enumerable:!1,writable:!1,value:R}),Object.freeze&&(Object.freeze(T.props),Object.freeze(T)),T};function Rr(r,u,h,S,R){{var C,j={},T=null,N=null;h!==void 0&&(De(h),T=""+h),_r(u)&&(De(u.key),T=""+u.key),Sr(u)&&(N=u.ref,Tr(u,R));for(C in u)me.call(u,C)&&!xr.hasOwnProperty(C)&&(j[C]=u[C]);if(r&&r.defaultProps){var $=r.defaultProps;for(C in $)j[C]===void 0&&(j[C]=$[C])}if(T||N){var M=typeof r=="function"?r.displayName||r.name||"Unknown":r;T&&wr(j,M),N&&jr(j,M)}return Or(r,T,N,R,S,Ie.current,j)}}var we=b.ReactCurrentOwner,Be=b.ReactDebugCurrentFrame;function Y(r){if(r){var u=r._owner,h=ve(r.type,r._source,u?u.type:null);Be.setExtraStackFrame(h)}else Be.setExtraStackFrame(null)}var je;je=!1;function Oe(r){return typeof r=="object"&&r!==null&&r.$$typeof===t}function ze(){{if(we.current){var r=I(we.current.type);if(r)return`
|
|
22
22
|
|
|
23
|
-
Check the render method of \``+r+"`."}return""}}function Cr(r){return""}var He={};function Pr(r){{var
|
|
23
|
+
Check the render method of \``+r+"`."}return""}}function Cr(r){return""}var He={};function Pr(r){{var u=ze();if(!u){var h=typeof r=="string"?r:r.displayName||r.name;h&&(u=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+h+">.")}return
|
|
26
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
27
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c,y=!0,g=!1;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return y=d.done,d},e:function(d){g=!0,c=d},f:function(){try{y||n.return==null||n.return()}finally{if(g)throw c}}}}function sr(e,t){if(e){if(typeof e=="string")return er(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?er(e,t):void 0}}function er(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function Ee(){return Ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},Ee.apply(null,arguments)}function rr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rr(Object(n),!0).forEach(function(a){Gr(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Gr(e,t,n){return(t=Kr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){var t=Jr(e,"string");return ie(t)=="symbol"?t:t+""}function Jr(e,t){if(ie(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(ie(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xr(e,t){if(e==null)return{};var n,a,i=Qr(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a<c.length;a++)n=c[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qr(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}function Zr(e){var t=e.attrs,n=e.size,a=e.title,i=e.spin,c=e.rotate,y=e.color,g=Xr(e,Br),s=function(E){var p=n||E.size||"1em",f,l="",_="";return E.className&&(f=E.className),e.className&&(f=f?"".concat(f," ").concat(e.className):e.className),i&&(f?f+=" twist-icon-loading":f="twist-icon-loading"),c&&(l="rotate(".concat(c,"deg)"),_="rotate(".concat(c,"deg)")),X.createElement("svg",Ee({xmlns:"http://www.w3.org/2000/svg"},E.attrs,t,g,{className:f,style:ue(ue({color:y||E.color,msTransform:l,transform:_},E.style),e.style),width:p,height:p}),a&&X.createElement("title",null,a),e.children)};return Ae!==void 0?X.createElement(Ae.Consumer,null,function(d){return s(d)}):s(or)}function et(e){var t={},n=e.split(";"),a=Yr(n),i;try{for(a.s();!(i=a.n()).done;){var c=i.value,y=c.split(":"),g=zr(y,2),s=g[0],d=g[1];if(s&&d){var E=s.trim().replace(/-./g,function(p){return p.charAt(1).toUpperCase()});t[E]=d.trim()}}}catch(p){a.e(p)}finally{a.f()}return t}function lr(e){return e&&e.map(function(t,n){return X.createElement(t.tag,ue(ue({},t.attrs),{},{key:n,style:t.attrs.style?et(t.attrs.style):null}),lr(t.children))})}function k(e){return function(t){return X.createElement(Zr,Ee({attrs:ue({},e.attrs)},t),lr(e.children))}}function rt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 2.25c-5.384 0-9.75 4.366-9.75 9.75s4.366 9.75 9.75 9.75v-2.437A7.312 7.312 0 1 1 19.313 12h2.437c0-5.384-4.366-9.75-9.75-9.75"}}]})(e)}function tt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M18.25 12L8.5 17.629V6.37z"}}]})(e)}function cr(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=cr(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function L(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=cr(e))&&(a&&(a+=" "),a+=t);return a}function nt({bufferedPercentage:e,playedPercentage:t,onSeek:n}){const a=B("aplayer-bar"),i=B("aplayer-icon"),c=v.useRef(null),[y,g]=v.useState(t),s=v.useRef(!1);v.useEffect(()=>{s.current||g(t)},[t]);const d=v.useCallback(E=>{s.current=!0;const p=Ce(E,c);g(p);const f=_=>{const u=Ce(_,c);g(u)},l=_=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",l);const u=Ce(_,c);g(u),n==null||n(u),s.current=!1};document.addEventListener("mousemove",f),document.addEventListener("mouseup",l)},[n]);return m.jsx("div",{ref:c,className:L(a.b(),a.bs("vars")),onMouseDown:d,role:"slider","aria-label":"Audio progress","aria-valuenow":y?y*100:0,"aria-valuemin":0,"aria-valuemax":100,"aria-live":"polite",children:m.jsxs("div",{className:a.be("inner"),children:[typeof e<"u"?m.jsx("div",{className:a.be("loaded"),style:{width:`${e*100}%`}}):null,typeof y<"u"?m.jsx("div",{className:a.be("played"),style:{width:`${y*100}%`},children:m.jsx("span",{className:a.be("thumb"),children:m.jsx("span",{className:L(i.bs("loading")),children:m.jsx(rt,{})})})}):null]})})}function at(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M16.15 13H5q-.425 0-.712-.288T4 12t.288-.712T5 11h11.15L13.3 8.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L19.3 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-4.575 4.575q-.3.3-.712.288t-.713-.313q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function it(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M10.5 17q1.05 0 1.775-.725T13 14.5V9h3V7h-4v5.5q-.325-.225-.7-.363T10.5 12q-1.05 0-1.775.725T8 14.5t.725 1.775T10.5 17M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.587 1.413T20 20z"}}]})(e)}function ut(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14 19V5h4v14zm-8 0V5h4v14z"}}]})(e)}function ot(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"}}]})(e)}function st(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.5 10.5h-.75q-.325 0-.537-.213T10 9.75t.213-.537T10.75 9H12q.425 0 .713.288T13 10v4.25q0 .325-.213.538T12.25 15t-.537-.213t-.213-.537zM6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function lt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function ct(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M9 15H6q-.425 0-.712-.288T5 14v-4q0-.425.288-.712T6 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T12.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.512.013T16 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2"}}]})(e)}function ft(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7 15V9h4l5-5v16l-5-5z"}}]})(e)}function dt(e){return k({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)}function vt({volume:e,muted:t,onToggleMuted:n,onChangeVolume:a}){const i=B("aplayer-volumn"),c=B("aplayer-icon"),y=v.useRef(null),[g,s]=v.useState(!1),d=v.useCallback(E=>{a(Pe(E,y)),s(!0);const p=l=>{a(Pe(l,y))},f=l=>{document.removeEventListener("mouseup",f),document.removeEventListener("mousemove",p),s(!1),a(Pe(l,y))};document.addEventListener("mousemove",p),document.addEventListener("mouseup",f)},[a]);return m.jsxs("div",{className:L(i.b(),i.bs("vars")),children:[m.jsx("button",{type:"button",className:L(c.b(),c.bs("volume-down")),onClick:()=>n(),"aria-label":t||!e?"Muted":"unMuted",children:t||!e?m.jsx(ft,{}):e>=1?m.jsx(dt,{}):m.jsx(ct,{})}),m.jsx("div",{className:L(i.be("bar-wrap"),{[i.bem("bar-wrap","active")]:g}),ref:y,onMouseDown:d,children:m.jsx("div",{className:i.be("bar"),children:m.jsx("div",{className:i.be("thumb"),style:{height:t?0:`${e*100}%`}})})})]})}function tr(e){if(typeof e>"u")return"--:--";if(Number.isNaN(e))return"00:00";const t=y=>y<10?`0${y}`:`${y}`,n=Math.trunc(e/60),a=Math.trunc(e-n*60),i=Math.trunc(n/60),c=Math.trunc(e/60-60*Math.trunc(e/60/60));return e>=3600?`${t(i)}:${t(c)}:${t(a)}`:`${t(n)}:${t(a)}`}function mt(e){return k({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9m320 0L518.2 498a18.6 18.6 0 0 0-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9"}}]})(e)}function ht(e){return k({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28m-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14s-2.1-10.4-6.2-14"}}]})(e)}function yt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"}}]})(e)}function bt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 5.27L3.28 4L20 20.72L18.73 22l-3-3H7v3l-4-4l4-4v3h6.73L7 10.27V11H5V8.27zM17 13h2v4.18l-2-2zm0-8V2l4 4l-4 4V7H8.82l-2-2z"}}]})(e)}function pt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m17 3l5.25 4.5L17 12l5.25 4.5L17 21v-3h-2.74l-2.82-2.82l2.12-2.12L15.5 15H17V9h-1.5l-9 9H2v-3h3.26l9-9H17zM2 6h4.5l2.82 2.82l-2.12 2.12L5.26 9H2z"}}]})(e)}function gt({volume:e,onChangeVolume:t,muted:n,currentTime:a,audioDurationSeconds:i,bufferedSeconds:c,onToggleMenu:y,onToggleMuted:g,order:s,onOrderChange:d,loop:E,onLoopChange:p,onSeek:f,isPlaying:l,onTogglePlay:_,onSkipForward:u,onSkipBack:b,showLyrics:x=!0,onToggleLyrics:R}){const w=B("aplayer-controller"),A=B("aplayer-icon"),Q=v.useCallback(()=>{const I={list:"random",random:"list"}[s];d(I)},[s,d]),z=v.useCallback(()=>{const I={all:"one",one:"none",none:"all"}[E];p(I)},[E,p]);return m.jsxs("div",{className:L(w.b(),w.bs("vars")),role:"group","aria-label":"Audio Controls",children:[m.jsx(nt,{playedPercentage:typeof a>"u"||typeof i>"u"?void 0:a/i,bufferedPercentage:typeof c>"u"||typeof i>"u"?void 0:c/i,onSeek:I=>f==null?void 0:f(I*i)}),m.jsxs("div",{className:w.be("time"),children:[m.jsxs("span",{className:w.be("time-inner"),"aria-live":"polite",children:[m.jsx("span",{className:w.be("ptime"),children:tr(a)})," / ",m.jsx("span",{className:w.be("dtime"),children:tr(i)})]}),m.jsx("button",{className:L(A.b(),A.bs("back")),onClick:b,type:"button","aria-label":"Previous track",children:m.jsx(mt,{})}),m.jsx("button",{className:L(A.b(),A.bs("play")),onClick:_,type:"button","aria-label":l?"Pause audio":"Play audio",children:l?m.jsx(ut,{}):m.jsx(ot,{})}),m.jsx("button",{className:L(A.b(),A.bs("forward")),onClick:u,type:"button","aria-label":"Next track",children:m.jsx(ht,{})}),m.jsx(vt,{volume:e,muted:n,onToggleMuted:g,onChangeVolume:t}),m.jsx("button",{className:L(A.b(),A.bs("order")),onClick:Q,type:"button","aria-label":`Playback order: ${s}`,children:{list:m.jsx(at,{}),random:m.jsx(pt,{})}[s]}),m.jsx("button",{className:L(A.b(),A.bs("order")),onClick:z,type:"button","aria-label":`Loop mode: ${E}`,children:{all:m.jsx(lt,{}),one:m.jsx(st,{}),none:m.jsx(bt,{})}[E]}),m.jsx("button",{type:"button",className:L(A.b(),A.bs("menu")),onClick:()=>y==null?void 0:y(),"aria-label":"Toggle playlist menu",children:m.jsx(yt,{})}),m.jsx("button",{type:"button",className:L(A.b(),A.bs("lrc"),{[A.ns("lrc-inactivity")]:!x}),onClick:R,"aria-label":x?"Hide lyrics":"Show lyrics","aria-pressed":x,children:m.jsx(it,{})})]})]})}function Et({open:e,audio:t,playingAudioUrl:n,onPlayAudio:a,listMaxHeight:i}){const c=B("aplayer-list"),y=i?{maxHeight:i}:void 0,g=v.useCallback(d=>d?typeof d=="string"?d:d.name??"Audio artist":"Audio artist",[]),s=v.useRef(null);return v.useEffect(()=>{if(s.current){const d=s.current;return d.style.maxHeight=`${Math.min(d.scrollHeight,i??1/0)}px`,()=>{d.removeAttribute("style")}}},[i]),m.jsx("div",{ref:s,className:L(c.b(),{[c.bm("hide")]:!e}),"aria-label":"Audio playlist","aria-live":"polite",children:m.jsx("ol",{style:y,children:t.map((d,E)=>m.jsxs("li",{className:L({[c.bm("active")]:d.url===n}),onClick:()=>{d.url!==n&&(a==null||a(d))},role:"button","aria-label":`${d.name??"Audio name"} by ${g(d.artist)}}`,children:[m.jsx("span",{className:c.be("cur")}),m.jsx("span",{className:c.be("index"),children:E+1}),m.jsx("span",{className:c.be("title"),children:d.name??"Audio name"}),m.jsx("span",{className:c.be("author"),children:g(d.artist)})]},d.name||E))})})}function nr({show:e,lrcText:t,currentTime:n}){const a=B("aplayer-lrc"),i=v.useMemo(()=>xt(t),[t]),c=v.useMemo(()=>{for(let g=0;g<i.length;g++){const s=i[g],d=i[g+1];if(n>=s[0]&&(!d||n<d[0]))return g}return 0},[n,i]),y=v.useMemo(()=>({transform:`translateY(${-c*16}px)`,WebkitTransform:`translateY(${-c*16}px)`}),[c]);return m.jsx("div",{className:L(a.b(),{[a.bm("hide")]:!e}),children:t?m.jsx("div",{className:a.be("contents"),style:y,children:i.map(([,g],s)=>m.jsx("p",{className:L({[a.be("current")]:s===c}),children:g},s))}):null})}function xt(e){if(e){e=e.replace(/([^\]^\n])\[/g,(i,c)=>`${c}
|
|
25
|
+
Check the top-level render call using <`+h+">.")}return u}}function We(r,u){{if(!r._store||r._store.validated||r.key!=null)return;r._store.validated=!0;var h=Pr(u);if(He[h])return;He[h]=!0;var S="";r&&r._owner&&r._owner!==we.current&&(S=" It was passed a child from "+I(r._owner.type)+"."),Y(r),O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',h,S),Y(null)}}function Ue(r,u){{if(typeof r!="object")return;if(Te(r))for(var h=0;h<r.length;h++){var S=r[h];Oe(S)&&We(S,u)}else if(Oe(r))r._store&&(r._store.validated=!0);else if(r){var R=y(r);if(typeof R=="function"&&R!==r.entries)for(var C=R.call(r),j;!(j=C.next()).done;)Oe(j.value)&&We(j.value,u)}}}function Lr(r){{var u=r.type;if(u==null||typeof u=="string")return;var h;if(typeof u=="function")h=u.propTypes;else if(typeof u=="object"&&(u.$$typeof===s||u.$$typeof===g))h=u.propTypes;else return;if(h){var S=I(u);br(h,r.props,"prop",S,r)}else if(u.PropTypes!==void 0&&!je){je=!0;var R=I(u);O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",R||"Unknown")}typeof u.getDefaultProps=="function"&&!u.getDefaultProps.isReactClassApproved&&O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function $r(r){{for(var u=Object.keys(r.props),h=0;h<u.length;h++){var S=u[h];if(S!=="children"&&S!=="key"){Y(r),O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",S),Y(null);break}}r.ref!==null&&(Y(r),O("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}function Ye(r,u,h,S,R,C){{var j=se(r);if(!j){var T="";(r===void 0||typeof r=="object"&&r!==null&&Object.keys(r).length===0)&&(T+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var N=Cr();N?T+=N:T+=ze();var $;r===null?$="null":Te(r)?$="array":r!==void 0&&r.$$typeof===t?($="<"+(I(r.type)||"Unknown")+" />",T=" Did you accidentally export a JSX literal instead of a component?"):$=typeof r,O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",$,T)}var M=Rr(r,u,h,R,C);if(M==null)return M;if(j){var q=u.children;if(q!==void 0)if(S)if(Te(q)){for(var G=0;G<q.length;G++)Ue(q[G],r);Object.freeze&&Object.freeze(q)}else O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ue(q,r)}return r===a?$r(M):Lr(M),M}}function Ar(r,u,h){return Ye(r,u,h,!0)}function Mr(r,u,h){return Ye(r,u,h,!1)}var kr=Mr,Nr=Ar;ne.Fragment=a,ne.jsx=kr,ne.jsxs=Nr}()),ne}var Xe;function Vr(){return Xe||(Xe=1,process.env.NODE_ENV==="production"?ye.exports=Dr():ye.exports=Ir()),ye.exports}var m=Vr(),be=e=>`--${e}`,Qe=e=>`var(--${e})`,Ze=(e,t)=>`--${e}: ${t};`;function Fr(e,t){const n=a=>t;return{b:()=>`${n()}-${e}`,be:a=>`${n()}-${e}__${a}`,bm:a=>`${n()}-${e}--${a}`,bem:(a,i)=>`${n()}-${e}__${a}--${i}`,bs:a=>`${n()}-${e}-${a}`,ns:a=>`${n()}-${a}`,cb:()=>`.${n()}-${e}`,cbe:a=>`.${n()}-${e}__${a}`,cbm:a=>`.${n()}-${e}--${a}`,cbem:(a,i)=>`.${n()}-${e}__${a}--${i}`,cbs:a=>`.${n()}-${e}-${a}`,cns:a=>`.${n()}-${a}`,cv:a=>be(`${n()}-${e}-${a}`),cvm:(a,i={})=>{const c=n();for(const p of Object.keys(a))i[be(`${c}-${e}-${p}`)]=a[p];return i},gcv:a=>Qe(`${n()}-${e}-${a}`),scv:(a,i)=>Ze(`${n()}-${e}-${a}`,i),nv:a=>be(`${n()}-${a}`),nvm:(a,i={})=>{const c=n();for(const p of Object.keys(a))i[be(`${c}-${p}`)]=a[p];return i},gnv:a=>Qe(`${n()}-${a}`),snv:(a,i)=>Ze(`${n()}-${a}`,i)}}function B(e){return d.useMemo(()=>Fr(e,"twist"),[e])}function Re(e,t){if(!t.current)return 0;let n=(e.clientX-t.current.getBoundingClientRect().left)/t.current.clientWidth;return n=Math.max(n,0),n=Math.min(n,1),n=Math.floor(n*100)/100,n}function Ce(e,t){if(!t.current)return 0;let n=1-(e.clientY-t.current.getBoundingClientRect().top)/t.current.clientHeight;return n=Math.max(n,0),n=Math.min(n,1),n=Math.floor(n*100)/100,n}var or={color:void 0,size:void 0,className:void 0,style:void 0,attrs:void 0},$e=J.createContext(or);$e.Provider;function ae(e){"@babel/helpers - typeof";return ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ae(e)}var Br=["attrs","size","title","spin","rotate","color"];function zr(e,t){return Ur(e)||Wr(e,t)||sr(e,t)||Hr()}function Hr(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
26
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Wr(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var a,i,c,p,E=[],s=!0,v=!1;try{if(c=(n=n.call(e)).next,t!==0)for(;!(s=(a=c.call(n)).done)&&(E.push(a.value),E.length!==t);s=!0);}catch(x){v=!0,i=x}finally{try{if(!s&&n.return!=null&&(p=n.return(),Object(p)!==p))return}finally{if(v)throw i}}return E}}function Ur(e){if(Array.isArray(e))return e}function Yr(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=sr(e))||t){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(v){throw v},f:i}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
27
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c,p=!0,E=!1;return{s:function(){n=n.call(e)},n:function(){var v=n.next();return p=v.done,v},e:function(v){E=!0,c=v},f:function(){try{p||n.return==null||n.return()}finally{if(E)throw c}}}}function sr(e,t){if(e){if(typeof e=="string")return er(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?er(e,t):void 0}}function er(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function ge(){return ge=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},ge.apply(null,arguments)}function rr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,a)}return n}function ie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rr(Object(n),!0).forEach(function(a){Gr(e,a,n[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rr(Object(n)).forEach(function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(n,a))})}return e}function Gr(e,t,n){return(t=Kr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kr(e){var t=Jr(e,"string");return ae(t)=="symbol"?t:t+""}function Jr(e,t){if(ae(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var a=n.call(e,t);if(ae(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xr(e,t){if(e==null)return{};var n,a,i=Qr(e,t);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);for(a=0;a<c.length;a++)n=c[a],t.includes(n)||{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Qr(e,t){if(e==null)return{};var n={};for(var a in e)if({}.hasOwnProperty.call(e,a)){if(t.includes(a))continue;n[a]=e[a]}return n}function Zr(e){var t=e.attrs,n=e.size,a=e.title,i=e.spin,c=e.rotate,p=e.color,E=Xr(e,Br),s=function(x){var g=n||x.size||"1em",f,l="",_="";return x.className&&(f=x.className),e.className&&(f=f?"".concat(f," ").concat(e.className):e.className),i&&(f?f+=" twist-icon-loading":f="twist-icon-loading"),c&&(l="rotate(".concat(c,"deg)"),_="rotate(".concat(c,"deg)")),J.createElement("svg",ge({xmlns:"http://www.w3.org/2000/svg"},x.attrs,t,E,{className:f,style:ie(ie({color:p||x.color,msTransform:l,transform:_},x.style),e.style),width:g,height:g}),a&&J.createElement("title",null,a),e.children)};return $e!==void 0?J.createElement($e.Consumer,null,function(v){return s(v)}):s(or)}function et(e){var t={},n=e.split(";"),a=Yr(n),i;try{for(a.s();!(i=a.n()).done;){var c=i.value,p=c.split(":"),E=zr(p,2),s=E[0],v=E[1];if(s&&v){var x=s.trim().replace(/-./g,function(g){return g.charAt(1).toUpperCase()});t[x]=v.trim()}}}catch(g){a.e(g)}finally{a.f()}return t}function lr(e){return e&&e.map(function(t,n){return J.createElement(t.tag,ie(ie({},t.attrs),{},{key:n,style:t.attrs.style?et(t.attrs.style):null}),lr(t.children))})}function k(e){return function(t){return J.createElement(Zr,ge({attrs:ie({},e.attrs)},t),lr(e.children))}}function rt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M12 2.25c-5.384 0-9.75 4.366-9.75 9.75s4.366 9.75 9.75 9.75v-2.437A7.312 7.312 0 1 1 19.313 12h2.437c0-5.384-4.366-9.75-9.75-9.75"}}]})(e)}function tt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M18.25 12L8.5 17.629V6.37z"}}]})(e)}function cr(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=cr(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function L(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=cr(e))&&(a&&(a+=" "),a+=t);return a}function nt({bufferedPercentage:e,playedPercentage:t,onSeek:n}){const a=B("aplayer-bar"),i=B("aplayer-icon"),c=d.useRef(null),[p,E]=d.useState(t),s=d.useRef(!1);d.useEffect(()=>{s.current||E(t)},[t]);const v=d.useCallback(x=>{s.current=!0;const g=Re(x,c);E(g);const f=_=>{const o=Re(_,c);E(o)},l=_=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",l);const o=Re(_,c);E(o),n==null||n(o),s.current=!1};document.addEventListener("mousemove",f),document.addEventListener("mouseup",l)},[n]);return m.jsx("div",{ref:c,className:L(a.b(),a.bs("vars")),onMouseDown:v,role:"slider","aria-label":"Audio progress","aria-valuenow":p?p*100:0,"aria-valuemin":0,"aria-valuemax":100,"aria-live":"polite",children:m.jsxs("div",{className:a.be("inner"),children:[typeof e<"u"?m.jsx("div",{className:a.be("loaded"),style:{width:`${e*100}%`}}):null,typeof p<"u"?m.jsx("div",{className:a.be("played"),style:{width:`${p*100}%`},children:m.jsx("span",{className:a.be("thumb"),children:m.jsx("span",{className:L(i.bs("loading")),children:m.jsx(rt,{})})})}):null]})})}function at(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M16.15 13H5q-.425 0-.712-.288T4 12t.288-.712T5 11h11.15L13.3 8.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L19.3 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-4.575 4.575q-.3.3-.712.288t-.713-.313q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function it(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M10.5 17q1.05 0 1.775-.725T13 14.5V9h3V7h-4v5.5q-.325-.225-.7-.363T10.5 12q-1.05 0-1.775.725T8 14.5t.725 1.775T10.5 17M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.587 1.413T20 20z"}}]})(e)}function ut(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14 19V5h4v14zm-8 0V5h4v14z"}}]})(e)}function ot(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"}}]})(e)}function st(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.5 10.5h-.75q-.325 0-.537-.213T10 9.75t.213-.537T10.75 9H12q.425 0 .713.288T13 10v4.25q0 .325-.213.538T12.25 15t-.537-.213t-.213-.537zM6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function lt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function ct(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M9 15H6q-.425 0-.712-.288T5 14v-4q0-.425.288-.712T6 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T12.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.512.013T16 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2"}}]})(e)}function ft(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7 15V9h4l5-5v16l-5-5z"}}]})(e)}function dt(e){return k({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)}function vt({volume:e,muted:t,onToggleMuted:n,onChangeVolume:a}){const i=B("aplayer-volumn"),c=B("aplayer-icon"),p=d.useRef(null),[E,s]=d.useState(!1),v=d.useCallback(x=>{a(Ce(x,p)),s(!0);const g=l=>{a(Ce(l,p))},f=l=>{document.removeEventListener("mouseup",f),document.removeEventListener("mousemove",g),s(!1),a(Ce(l,p))};document.addEventListener("mousemove",g),document.addEventListener("mouseup",f)},[a]);return m.jsxs("div",{className:L(i.b(),i.bs("vars")),children:[m.jsx("button",{type:"button",className:L(c.b(),c.bs("volume-down")),onClick:()=>n(),"aria-label":t||!e?"Muted":"unMuted",children:t||!e?m.jsx(ft,{}):e>=1?m.jsx(dt,{}):m.jsx(ct,{})}),m.jsx("div",{className:L(i.be("bar-wrap"),{[i.bem("bar-wrap","active")]:E}),ref:p,onMouseDown:v,children:m.jsx("div",{className:i.be("bar"),children:m.jsx("div",{className:i.be("thumb"),style:{height:t?0:`${e*100}%`}})})})]})}function tr(e){if(typeof e>"u")return"--:--";if(Number.isNaN(e))return"00:00";const t=p=>p<10?`0${p}`:`${p}`,n=Math.trunc(e/60),a=Math.trunc(e-n*60),i=Math.trunc(n/60),c=Math.trunc(e/60-60*Math.trunc(e/60/60));return e>=3600?`${t(i)}:${t(c)}:${t(a)}`:`${t(n)}:${t(a)}`}function mt(e){return k({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9m320 0L518.2 498a18.6 18.6 0 0 0-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9"}}]})(e)}function ht(e){return k({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28m-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14s-2.1-10.4-6.2-14"}}]})(e)}function yt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"}}]})(e)}function bt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 5.27L3.28 4L20 20.72L18.73 22l-3-3H7v3l-4-4l4-4v3h6.73L7 10.27V11H5V8.27zM17 13h2v4.18l-2-2zm0-8V2l4 4l-4 4V7H8.82l-2-2z"}}]})(e)}function pt(e){return k({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m17 3l5.25 4.5L17 12l5.25 4.5L17 21v-3h-2.74l-2.82-2.82l2.12-2.12L15.5 15H17V9h-1.5l-9 9H2v-3h3.26l9-9H17zM2 6h4.5l2.82 2.82l-2.12 2.12L5.26 9H2z"}}]})(e)}function gt({volume:e,onChangeVolume:t,muted:n,currentTime:a,audioDurationSeconds:i,bufferedSeconds:c,onToggleMenu:p,onToggleMuted:E,order:s,onOrderChange:v,loop:x,onLoopChange:g,onSeek:f,isPlaying:l,onTogglePlay:_,onSkipForward:o,onSkipBack:y,showLyrics:b=!0,onToggleLyrics:O}){const w=B("aplayer-controller"),A=B("aplayer-icon"),X=d.useCallback(()=>{const V={list:"random",random:"list"}[s];v(V)},[s,v]),z=d.useCallback(()=>{const V={all:"one",one:"none",none:"all"}[x];g(V)},[x,g]);return m.jsxs("div",{className:L(w.b(),w.bs("vars")),role:"group","aria-label":"Audio Controls",children:[m.jsx(nt,{playedPercentage:typeof a>"u"||typeof i>"u"?void 0:a/i,bufferedPercentage:typeof c>"u"||typeof i>"u"?void 0:c/i,onSeek:V=>f==null?void 0:f(V*i)}),m.jsxs("div",{className:w.be("time"),children:[m.jsxs("span",{className:w.be("time-inner"),"aria-live":"polite",children:[m.jsx("span",{className:w.be("ptime"),children:tr(a)})," / ",m.jsx("span",{className:w.be("dtime"),children:tr(i)})]}),m.jsx("button",{className:L(A.b(),A.bs("back")),onClick:y,type:"button","aria-label":"Previous track",children:m.jsx(mt,{})}),m.jsx("button",{className:L(A.b(),A.bs("play")),onClick:_,type:"button","aria-label":l?"Pause audio":"Play audio",children:l?m.jsx(ut,{}):m.jsx(ot,{})}),m.jsx("button",{className:L(A.b(),A.bs("forward")),onClick:o,type:"button","aria-label":"Next track",children:m.jsx(ht,{})}),m.jsx(vt,{volume:e,muted:n,onToggleMuted:E,onChangeVolume:t}),m.jsx("button",{className:L(A.b(),A.bs("order")),onClick:X,type:"button","aria-label":`Playback order: ${s}`,children:{list:m.jsx(at,{}),random:m.jsx(pt,{})}[s]}),m.jsx("button",{className:L(A.b(),A.bs("order")),onClick:z,type:"button","aria-label":`Loop mode: ${x}`,children:{all:m.jsx(lt,{}),one:m.jsx(st,{}),none:m.jsx(bt,{})}[x]}),m.jsx("button",{type:"button",className:L(A.b(),A.bs("menu")),onClick:()=>p==null?void 0:p(),"aria-label":"Toggle playlist menu",children:m.jsx(yt,{})}),m.jsx("button",{type:"button",className:L(A.b(),A.bs("lrc"),{[A.ns("lrc-inactivity")]:!b}),onClick:O,"aria-label":b?"Hide lyrics":"Show lyrics","aria-pressed":b,children:m.jsx(it,{})})]})]})}function Et({open:e,audio:t,playingAudioUrl:n,onPlayAudio:a,listMaxHeight:i}){const c=B("aplayer-list"),p=i?{maxHeight:i}:void 0,E=d.useCallback(v=>v?typeof v=="string"?v:v.name??"Audio artist":"Audio artist",[]),s=d.useRef(null);return d.useEffect(()=>{if(s.current){const v=s.current;return v.style.maxHeight=`${Math.min(v.scrollHeight,i??1/0)}px`,()=>{v.removeAttribute("style")}}},[i]),m.jsx("div",{ref:s,className:L(c.b(),{[c.bm("hide")]:!e}),"aria-label":"Audio playlist","aria-live":"polite",children:m.jsx("ol",{style:p,children:t.map((v,x)=>m.jsxs("li",{className:L({[c.bm("active")]:v.url===n}),onClick:()=>{v.url!==n&&(a==null||a(v))},role:"button","aria-label":`${v.name??"Audio name"} by ${E(v.artist)}}`,children:[m.jsx("span",{className:c.be("cur")}),m.jsx("span",{className:c.be("index"),children:x+1}),m.jsx("span",{className:c.be("title"),children:v.name??"Audio name"}),m.jsx("span",{className:c.be("author"),children:E(v.artist)})]},v.name||x))})})}function nr({show:e,lrcText:t,currentTime:n}){const a=B("aplayer-lrc"),i=d.useMemo(()=>xt(t),[t]),c=d.useMemo(()=>{for(let E=0;E<i.length;E++){const s=i[E],v=i[E+1];if(n>=s[0]&&(!v||n<v[0]))return E}return 0},[n,i]),p=d.useMemo(()=>({transform:`translateY(${-c*16}px)`,WebkitTransform:`translateY(${-c*16}px)`}),[c]);return m.jsx("div",{className:L(a.b(),{[a.bm("hide")]:!e}),children:t?m.jsx("div",{className:a.be("contents"),style:p,children:i.map(([,E],s)=>m.jsx("p",{className:L({[a.be("current")]:s===c}),children:E},s))}):null})}function xt(e){if(e){e=e.replace(/([^\]^\n])\[/g,(i,c)=>`${c}
|
|
28
28
|
[`);const t=e.split(`
|
|
29
|
-
`),n=[],a=t.length;for(let i=0;i<a;i++){const c=t[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g),
|
|
29
|
+
`),n=[],a=t.length;for(let i=0;i<a;i++){const c=t[i].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g),p=t[i].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g,"").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g,"").replace(/^\s+|\s+$/g,"");if(c){const E=c.length;for(let s=0;s<E;s++){const v=/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/.exec(c[s]),x=v[1]*60,g=Number.parseInt(v[2]),f=v[4]?Number.parseInt(v[4])/(`${v[4]}`.length===2?100:1e3):0,l=x+g+f;n.push([l,p])}}}return n.sort((i,c)=>i[0]-c[0]),n}else return[]}var pe={exports:{}},Pe={};/**
|
|
30
30
|
* @license React
|
|
31
31
|
* use-sync-external-store-shim.production.js
|
|
32
32
|
*
|
|
@@ -34,7 +34,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
34
34
|
*
|
|
35
35
|
* This source code is licensed under the MIT license found in the
|
|
36
36
|
* LICENSE file in the root directory of this source tree.
|
|
37
|
-
*/var ar;function St(){if(ar)return
|
|
37
|
+
*/var ar;function St(){if(ar)return Pe;ar=1;var e=d;function t(g,f){return g===f&&(g!==0||1/g===1/f)||g!==g&&f!==f}var n=typeof Object.is=="function"?Object.is:t,a=e.useState,i=e.useEffect,c=e.useLayoutEffect,p=e.useDebugValue;function E(g,f){var l=f(),_=a({inst:{value:l,getSnapshot:f}}),o=_[0].inst,y=_[1];return c(function(){o.value=l,o.getSnapshot=f,s(o)&&y({inst:o})},[g,l,f]),i(function(){return s(o)&&y({inst:o}),g(function(){s(o)&&y({inst:o})})},[g]),p(l),l}function s(g){var f=g.getSnapshot;g=g.value;try{var l=f();return!n(g,l)}catch{return!0}}function v(g,f){return f()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:E;return Pe.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:x,Pe}var Le={};/**
|
|
38
38
|
* @license React
|
|
39
39
|
* use-sync-external-store-shim.development.js
|
|
40
40
|
*
|
|
@@ -42,4 +42,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
42
42
|
*
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
|
-
*/var ir;function _t(){return ir||(ir=1,process.env.NODE_ENV!=="production"&&function(){function e(l,_){return l===_&&(l!==0||1/l===1/_)||l!==l&&_!==_}function t(l,_){E||i.startTransition===void 0||(E=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var u=_();if(!p){var b=_();c(u,b)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),p=!0)}b=y({inst:{value:u,getSnapshot:_}});var x=b[0].inst,R=b[1];return s(function(){x.value=u,x.getSnapshot=_,n(x)&&R({inst:x})},[l,u,_]),g(function(){return n(x)&&R({inst:x}),l(function(){n(x)&&R({inst:x})})},[l]),d(u),u}function n(l){var _=l.getSnapshot;l=l.value;try{var u=_();return!c(l,u)}catch{return!0}}function a(l,_){return _()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=v,c=typeof Object.is=="function"?Object.is:e,y=i.useState,g=i.useEffect,s=i.useLayoutEffect,d=i.useDebugValue,E=!1,p=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;$e.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),$e}var ur;function Tt(){return ur||(ur=1,process.env.NODE_ENV==="production"?ge.exports=St():ge.exports=_t()),ge.exports}var U=Tt();const J=[];function wt(e){const t=v.useRef();return v.useEffect(()=>{if(typeof window<"u"&&!t.current){const n=t.current=document.createElement("audio");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),J.includes(n)||J.push(n)}},[e==null?void 0:e.autoPlay,e==null?void 0:e.initialVolume,e==null?void 0:e.src]),v.useEffect(()=>{if(typeof window>"u")return;const n=t.current;if(n&&(e!=null&&e.onError))return n.addEventListener("error",e.onError),()=>{n.removeEventListener("error",e.onError)}},[e==null?void 0:e.onError]),v.useEffect(()=>{if(typeof window>"u")return;const n=t.current;if(n&&(e!=null&&e.onEnded))return n.addEventListener("ended",e.onEnded),()=>{n.removeEventListener("ended",e.onEnded)}},[e==null?void 0:e.onEnded]),v.useEffect(()=>()=>{const n=t.current;if(n){n.pause(),n.currentTime=0;const a=J.indexOf(n);a!==-1&&J.splice(a,1)}t.current=void 0},[]),t}function jt(e){const t=wt(e),n=v.useCallback(u=>{for(let b=0;b<J.length;b++){const x=J[b];x!==u&&!x.paused&&x.pause()}},[]),a=v.useCallback(async u=>{var x;const b=t.current;if(b){e.mutex&&n(b),b.src!==u&&(b.pause(),b.currentTime=0,b.src=u);try{await((x=t.current)==null?void 0:x.play())}catch{}}},[t,e.mutex,n]),i=v.useCallback(u=>{const b=t.current;b&&(b.paused?a(u):b.pause())},[t,a]),c=v.useCallback(u=>{t.current.currentTime=u},[t]),y=v.useCallback(()=>{t.current&&(t.current.muted=!t.current.muted)},[t]),g=v.useCallback(u=>{t.current&&(t.current.volume=u)},[t]),s=U.useSyncExternalStore(v.useCallback(u=>{var b;return(b=t.current)==null||b.addEventListener("volumechange",u),()=>{var x;(x=t.current)==null||x.removeEventListener("volumechange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.volume},()=>{}),d=U.useSyncExternalStore(v.useCallback(u=>{var b;return(b=t.current)==null||b.addEventListener("volumechange",u),()=>{var x;(x=t.current)==null||x.removeEventListener("volumechange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.muted},()=>{}),E=U.useSyncExternalStore(v.useCallback(u=>{var b;return(b=t.current)==null||b.addEventListener("timeupdate",u),()=>{var x;(x=t.current)==null||x.removeEventListener("timeupdate",u)}},[t]),()=>{if(t.current)return Math.round(t.current.currentTime)},()=>{}),p=U.useSyncExternalStore(v.useCallback(u=>{var b;return(b=t.current)==null||b.addEventListener("durationchange",u),()=>{var x;(x=t.current)==null||x.removeEventListener("durationchange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.duration},()=>{}),f=U.useSyncExternalStore(v.useCallback(u=>{var b;return(b=t.current)==null||b.addEventListener("progress",u),()=>{var x;(x=t.current)==null||x.removeEventListener("progress",u)}},[t]),()=>{const u=t.current;return u&&u.buffered.length>0?u.buffered.end(u.buffered.length-1):0},()=>{}),l=U.useSyncExternalStore(v.useCallback(u=>{var b,x;return(b=t.current)==null||b.addEventListener("play",u),(x=t.current)==null||x.addEventListener("pause",u),()=>{var R,w;(R=t.current)==null||R.removeEventListener("play",u),(w=t.current)==null||w.removeEventListener("pause",u)}},[t]),()=>{const u=t.current;return u?!u.paused:!1},()=>{}),_=U.useSyncExternalStore(v.useCallback(u=>{var b,x;return(b=t.current)==null||b.addEventListener("playing",u),(x=t.current)==null||x.addEventListener("waiting",u),()=>{var R,w;(R=t.current)==null||R.removeEventListener("playing",u),(w=t.current)==null||w.removeEventListener("waiting",u)}},[t]),()=>{const u=t.current;return u?u.networkState===u.NETWORK_LOADING:!1},()=>{});return{playAudio:a,togglePlay:i,seek:c,toggleMuted:y,setVolume:g,volume:s,muted:d,currentTime:E,duration:p,bufferedSeconds:f,isPlaying:l,isLoading:_}}function fr(){const e=v.useRef([]);return v.useEffect(()=>{const n=e.current;return()=>{for(const a of n)clearTimeout(a)}},[]),v.useCallback((n,a)=>{const i=setTimeout(n,a);return e.current.push(i),i},[])}function Ot(){const e=v.useRef(),[t,n]=v.useState({text:"",style:{opacity:0}}),a=fr(),i=v.useCallback((c,y=2e3)=>{e.current&&clearTimeout(e.current),n({text:c,style:{opacity:1}}),e.current=a(()=>{n({text:c,style:{opacity:0}})},y)},[a]);return[t,i]}function Rt(e){return Ct(e.slice())}function Ct(e){let t=e.length,n;for(;t!==0;)n=Math.floor(Math.random()*t),t--,[e[t],e[n]]=[e[n],e[t]];return e}function Pt(e,{initialLoop:t="all",initialOrder:n="list",getSongId:a}){const[i,c]=v.useState(t),[y,g]=v.useState(n),s=v.useMemo(()=>y==="list"?e:Rt(e),[e,y]),[d,E]=v.useState(s[0]);v.useEffect(()=>{const u=s.find(b=>a(b)===a(d));E(u||s[0])},[s,a,d]);const p=v.useMemo(()=>{if(i==="one")return{...d};const u=s.indexOf(d);if(u<s.length-1)return s[u+1];if(i!=="none")return s[0]},[s,d,i]),f=v.useCallback(()=>{p&&E(p)},[p]),l=v.useCallback(()=>{E(u=>{const b=s.indexOf(u);return b>0?s[b-1]:u})},[s]),_=v.useCallback(u=>{E(u)},[]);return{currentSong:d,hasNextSong:typeof p<"u",next:f,previous:l,prioritize:_,order:y,setOrder:g,loop:i,setLoop:c,length:s.length}}function Lt(e){return k({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z",fill:"currentColor"}}]})(e)}function $t(e){return k({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M208 432h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16m144 0h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16"}}]})(e)}function At({audio:e,appearance:t="normal",volume:n=.7,initialLoop:a,initialOrder:i,autoPlay:c=!1,listMaxHeight:y=250,mini:g=!1,mutex:s=!0,listFolded:d=!1,theme:E="light",border:p=!1}){var ee,re,te;const f=B("aplayer"),l=Pt(Array.isArray(e)?e:[e],{initialLoop:a,initialOrder:i,getSongId:O=>O.url}),[_,u]=Ot(),b=fr(),x=v.useRef(),R=v.useCallback(()=>{x.current&&(clearTimeout(x.current),x.current=void 0)},[]),w=jt({src:l.currentSong.url,initialVolume:n,autoPlay:c,mutex:s,onError(O){const{error:fe}=O.target;fe&&u("An audio error has occurred, player will skip forward in 2 seconds."),l.hasNextSong&&(x.current=b(()=>{l.next()},2e3))},onEnded(){l.hasNextSong&&l.next()}}),A=v.useCallback(()=>{R(),w.togglePlay(l.currentSong.url)},[w,R,l.currentSong.url]),Q=v.useCallback(O=>O?typeof O=="string"?O:O.url?m.jsx("a",{href:O.url,target:"_blank",rel:"noreferrer",children:O.name??"Audio artist"}):O.name??"Audio artist":"Audio artist",[]),z=l.length>1,I=v.useMemo(()=>Array.isArray(e)?e:[e],[e]),{prioritize:oe}=l,se=v.useCallback(O=>{R(),oe(O)},[R,oe]),[le,xe]=v.useState(()=>z&&!d),[ce,V]=v.useState(g),[D,H]=v.useState(!0),W=v.useRef(null);v.useEffect(()=>{V(g)},[g]),v.useEffect(()=>{c&&w.playAudio(l.currentSong.url)},[]);const Y=v.useRef(null),Z=v.useRef(!0);return v.useEffect(()=>{if(!l.currentSong)return;const O=l.currentSong.url;if(Z.current){Z.current=!1,Y.current=O;return}(l.loop==="one"||O!==Y.current)&&(w.playAudio(O),Y.current=O)},[l.currentSong,l.loop]),v.useEffect(()=>{if(t==="fixed"&&W.current){const O=W.current;return O.style.width=`${O.offsetWidth-18}px`,()=>{O.removeAttribute("style")}}},[t]),m.jsxs("div",{className:L(f.b(),{[f.bs(E)]:!0,[f.bs("vars")]:!0,[f.bm(t)]:!0,[f.bm("loading")]:w.isLoading,[f.bm("withlist")]:z,[f.bm("list-folded")]:!le,[f.bm("withlrc")]:!!l.currentSong.lrc&&t!=="fixed",[f.bm("narrow")]:ce,[f.bm("border")]:p}),role:"region","aria-label":"Audio Player",children:[m.jsxs("div",{ref:W,className:f.be("body"),children:[m.jsx("div",{className:f.be("pic"),onClick:A,style:{backgroundImage:`url("${(ee=l.currentSong)==null?void 0:ee.cover}")`},role:"button","aria-label":w.isPlaying?"Pause audio":"Play audio",children:m.jsx("div",{className:L(f.be("button"),w.isPlaying?f.bm("pause"):f.bm("play")),role:"presentation",children:w.isPlaying?m.jsx($t,{}):m.jsx(tt,{})})}),m.jsxs("div",{className:L(f.be("info")),children:[m.jsxs("div",{className:L(f.be("music")),children:[m.jsx("span",{className:L(f.be("title")),children:((re=l.currentSong)==null?void 0:re.name)??"Audio name"}),m.jsxs("span",{className:L(f.be("author")),children:[" ","-"," ",Q((te=l.currentSong)==null?void 0:te.artist)]})]}),t==="fixed"?null:m.jsx(nr,{show:D,lrcText:l.currentSong.lrc,currentTime:w.currentTime??0}),m.jsx(gt,{volume:w.volume??n,onChangeVolume:w.setVolume,muted:w.muted??!1,onToggleMuted:()=>w.toggleMuted(),currentTime:w.currentTime,audioDurationSeconds:w.duration,bufferedSeconds:w.bufferedSeconds,onSeek:O=>w.seek(O),onToggleMenu:()=>xe(O=>!O),order:l.order,onOrderChange:l.setOrder,loop:l.loop,onLoopChange:l.setLoop,isPlaying:w.isPlaying??!1,onTogglePlay:A,onSkipForward:()=>{l.hasNextSong&&l.next()},onSkipBack:()=>{l.previous()},showLyrics:D,onToggleLyrics:()=>{H(O=>!O)}})]}),m.jsx("div",{className:f.be("notice"),style:_.style,children:_.text}),m.jsx("div",{className:f.be("miniswitcher"),onClick:()=>V(O=>!O),children:m.jsx("button",{className:L(f.bs("icon"),f.bs("icon-right")),type:"button",children:m.jsx(Lt,{})})})]}),z?m.jsx(Et,{open:le,audio:I,playingAudioUrl:l.currentSong.url,onPlayAudio:se,listMaxHeight:y}):null,t==="fixed"&&m.jsx(nr,{show:D,lrcText:l.currentSong.lrc,currentTime:w.currentTime??0})]})}exports.TwistAPlayer=At;
|
|
45
|
+
*/var ir;function _t(){return ir||(ir=1,process.env.NODE_ENV!=="production"&&function(){function e(l,_){return l===_&&(l!==0||1/l===1/_)||l!==l&&_!==_}function t(l,_){x||i.startTransition===void 0||(x=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var o=_();if(!g){var y=_();c(o,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),g=!0)}y=p({inst:{value:o,getSnapshot:_}});var b=y[0].inst,O=y[1];return s(function(){b.value=o,b.getSnapshot=_,n(b)&&O({inst:b})},[l,o,_]),E(function(){return n(b)&&O({inst:b}),l(function(){n(b)&&O({inst:b})})},[l]),v(o),o}function n(l){var _=l.getSnapshot;l=l.value;try{var o=_();return!c(l,o)}catch{return!0}}function a(l,_){return _()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var i=d,c=typeof Object.is=="function"?Object.is:e,p=i.useState,E=i.useEffect,s=i.useLayoutEffect,v=i.useDebugValue,x=!1,g=!1,f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:t;Le.useSyncExternalStore=i.useSyncExternalStore!==void 0?i.useSyncExternalStore:f,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Le}var ur;function Tt(){return ur||(ur=1,process.env.NODE_ENV==="production"?pe.exports=St():pe.exports=_t()),pe.exports}var W=Tt();const K=[];function wt(e){const t=d.useRef();return d.useEffect(()=>{if(typeof window<"u"&&!t.current){const n=t.current=document.createElement("audio");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),K.includes(n)||K.push(n)}},[e==null?void 0:e.autoPlay,e==null?void 0:e.initialVolume,e==null?void 0:e.src]),d.useEffect(()=>{if(typeof window>"u")return;const n=t.current;if(n&&(e!=null&&e.onError))return n.addEventListener("error",e.onError),()=>{n.removeEventListener("error",e.onError)}},[e==null?void 0:e.onError]),d.useEffect(()=>{if(typeof window>"u")return;const n=t.current;if(n&&(e!=null&&e.onEnded))return n.addEventListener("ended",e.onEnded),()=>{n.removeEventListener("ended",e.onEnded)}},[e==null?void 0:e.onEnded]),d.useEffect(()=>()=>{const n=t.current;if(n){n.pause(),n.currentTime=0;const a=K.indexOf(n);a!==-1&&K.splice(a,1)}t.current=void 0},[]),t}function jt(e){const t=wt(e),n=d.useCallback(o=>{for(let y=0;y<K.length;y++){const b=K[y];b!==o&&!b.paused&&b.pause()}},[]),a=d.useCallback(async o=>{var b;const y=t.current;if(y){e.mutex&&n(y),y.src!==o&&(y.pause(),y.currentTime=0,y.src=o);try{await((b=t.current)==null?void 0:b.play())}catch{}}},[t,e.mutex,n]),i=d.useCallback(o=>{const y=t.current;y&&(y.paused?a(o):y.pause())},[t,a]),c=d.useCallback(o=>{t.current.currentTime=o},[t]),p=d.useCallback(()=>{t.current&&(t.current.muted=!t.current.muted)},[t]),E=d.useCallback(o=>{t.current&&(t.current.volume=o)},[t]),s=W.useSyncExternalStore(d.useCallback(o=>{var y;return(y=t.current)==null||y.addEventListener("volumechange",o),()=>{var b;(b=t.current)==null||b.removeEventListener("volumechange",o)}},[t]),()=>{var o;return(o=t.current)==null?void 0:o.volume},()=>{}),v=W.useSyncExternalStore(d.useCallback(o=>{var y;return(y=t.current)==null||y.addEventListener("volumechange",o),()=>{var b;(b=t.current)==null||b.removeEventListener("volumechange",o)}},[t]),()=>{var o;return(o=t.current)==null?void 0:o.muted},()=>{}),x=W.useSyncExternalStore(d.useCallback(o=>{var y;return(y=t.current)==null||y.addEventListener("timeupdate",o),()=>{var b;(b=t.current)==null||b.removeEventListener("timeupdate",o)}},[t]),()=>{if(t.current)return Math.round(t.current.currentTime)},()=>{}),g=W.useSyncExternalStore(d.useCallback(o=>{var y;return(y=t.current)==null||y.addEventListener("durationchange",o),()=>{var b;(b=t.current)==null||b.removeEventListener("durationchange",o)}},[t]),()=>{var o;return(o=t.current)==null?void 0:o.duration},()=>{}),f=W.useSyncExternalStore(d.useCallback(o=>{var y;return(y=t.current)==null||y.addEventListener("progress",o),()=>{var b;(b=t.current)==null||b.removeEventListener("progress",o)}},[t]),()=>{const o=t.current;return o&&o.buffered.length>0?o.buffered.end(o.buffered.length-1):0},()=>{}),l=W.useSyncExternalStore(d.useCallback(o=>{var y,b;return(y=t.current)==null||y.addEventListener("play",o),(b=t.current)==null||b.addEventListener("pause",o),()=>{var O,w;(O=t.current)==null||O.removeEventListener("play",o),(w=t.current)==null||w.removeEventListener("pause",o)}},[t]),()=>{const o=t.current;return o?!o.paused:!1},()=>{}),_=W.useSyncExternalStore(d.useCallback(o=>{var y,b;return(y=t.current)==null||y.addEventListener("playing",o),(b=t.current)==null||b.addEventListener("waiting",o),()=>{var O,w;(O=t.current)==null||O.removeEventListener("playing",o),(w=t.current)==null||w.removeEventListener("waiting",o)}},[t]),()=>{const o=t.current;return o?o.networkState===o.NETWORK_LOADING:!1},()=>{});return{playAudio:a,togglePlay:i,seek:c,toggleMuted:p,setVolume:E,volume:s,muted:v,currentTime:x,duration:g,bufferedSeconds:f,isPlaying:l,isLoading:_}}function fr(){const e=d.useRef([]);return d.useEffect(()=>{const n=e.current;return()=>{for(const a of n)clearTimeout(a)}},[]),d.useCallback((n,a)=>{const i=setTimeout(n,a);return e.current.push(i),i},[])}function Ot(){const e=d.useRef(),[t,n]=d.useState({text:"",style:{opacity:0}}),a=fr(),i=d.useCallback((c,p=2e3)=>{e.current&&clearTimeout(e.current),n({text:c,style:{opacity:1}}),e.current=a(()=>{n({text:c,style:{opacity:0}})},p)},[a]);return[t,i]}function Rt(e){return Ct(e.slice())}function Ct(e){let t=e.length,n;for(;t!==0;)n=Math.floor(Math.random()*t),t--,[e[t],e[n]]=[e[n],e[t]];return e}function Pt(e,t){const{initialLoop:n="all",initialOrder:a="list"}=t,[i,c]=d.useState(n),[p,E]=d.useState(a),s=d.useMemo(()=>p==="list"?e:Rt(e),[e,p]),[v,x]=d.useState(s[0]),g=d.useCallback(y=>y.url,[]),f=d.useMemo(()=>s.findIndex(b=>g(b)===g(v))<s.length-1||i!=="none",[s,v,i,g]),l=d.useCallback(()=>{x(y=>{const b=s.findIndex(O=>g(O)===g(y));return b<s.length-1?s[b+1]:i!=="none"?s[0]:y})},[i,s,g]),_=d.useCallback(()=>{x(y=>{const b=s.indexOf(y);return b>0?s[b-1]:y})},[s]),o=d.useCallback(y=>{x(y)},[]);return d.useEffect(()=>{const y=s.find(b=>g(b)===g(v));x(y||s[0])},[s,g,v]),{currentSong:v,hasNextSong:f,next:l,previous:_,prioritize:o,order:p,setOrder:E,loop:i,setLoop:c,length:s.length}}function Lt(e){return k({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z",fill:"currentColor"}}]})(e)}function $t(e){return k({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M208 432h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16m144 0h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16"}}]})(e)}function At({audio:e,appearance:t="normal",volume:n=.7,initialLoop:a,initialOrder:i,autoPlay:c=!1,listMaxHeight:p=250,mini:E=!1,mutex:s=!0,listFolded:v=!1,theme:x="light",border:g=!1}){var Z,ee,re;const f=B("aplayer"),l=Pt(Array.isArray(e)?e:[e],{initialLoop:a,initialOrder:i}),[_,o]=Ot(),y=fr(),b=d.useRef(),O=d.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=void 0)},[]),w=jt({src:l.currentSong.url,initialVolume:n,autoPlay:c,mutex:s,onError(P){const{error:ce}=P.target;ce&&o("An audio error has occurred, player will skip forward in 2 seconds."),l.hasNextSong&&(b.current=y(()=>{l.next()},2e3))},onEnded(){if(l.loop==="one"){l.prioritize({...l.currentSong});return}l.hasNextSong&&l.next()}}),A=d.useCallback(()=>{O(),w.togglePlay(l.currentSong.url)},[w,O,l.currentSong.url]),X=d.useCallback(P=>P?typeof P=="string"?P:P.url?m.jsx("a",{href:P.url,target:"_blank",rel:"noreferrer",children:P.name??"Audio artist"}):P.name??"Audio artist":"Audio artist",[]),z=l.length>1,V=d.useMemo(()=>Array.isArray(e)?e:[e],[e]),{prioritize:ue}=l,oe=d.useCallback(P=>{O(),ue(P)},[O,ue]),[se,Ee]=d.useState(()=>z&&!v),[le,I]=d.useState(E),[D,H]=d.useState(!0),U=d.useRef(null);d.useEffect(()=>{I(E)},[E]),d.useEffect(()=>{c&&w.playAudio(l.currentSong.url)},[]);const Q=d.useRef(!0);return d.useEffect(()=>{Q.current?Q.current=!1:l.currentSong&&w.playAudio(l.currentSong.url)},[l.currentSong]),d.useEffect(()=>{if(t==="fixed"&&U.current){const P=U.current;return P.style.width=`${P.offsetWidth-18}px`,()=>{P.removeAttribute("style")}}},[t]),m.jsxs("div",{className:L(f.b(),{[f.bs(x)]:!0,[f.bs("vars")]:!0,[f.bm(t)]:!0,[f.bm("loading")]:w.isLoading,[f.bm("withlist")]:z,[f.bm("list-folded")]:!se,[f.bm("withlrc")]:!!l.currentSong.lrc&&t!=="fixed",[f.bm("narrow")]:le,[f.bm("border")]:g}),role:"region","aria-label":"Audio Player",children:[m.jsxs("div",{ref:U,className:f.be("body"),children:[m.jsx("div",{className:f.be("pic"),onClick:A,style:{backgroundImage:`url("${(Z=l.currentSong)==null?void 0:Z.cover}")`},role:"button","aria-label":w.isPlaying?"Pause audio":"Play audio",children:m.jsx("div",{className:L(f.be("button"),w.isPlaying?f.bm("pause"):f.bm("play")),role:"presentation",children:w.isPlaying?m.jsx($t,{}):m.jsx(tt,{})})}),m.jsxs("div",{className:L(f.be("info")),children:[m.jsxs("div",{className:L(f.be("music")),children:[m.jsx("span",{className:L(f.be("title")),children:((ee=l.currentSong)==null?void 0:ee.name)??"Audio name"}),m.jsxs("span",{className:L(f.be("author")),children:[" ","-"," ",X((re=l.currentSong)==null?void 0:re.artist)]})]}),t==="fixed"?null:m.jsx(nr,{show:D,lrcText:l.currentSong.lrc,currentTime:w.currentTime??0}),m.jsx(gt,{volume:w.volume??n,onChangeVolume:w.setVolume,muted:w.muted??!1,onToggleMuted:()=>w.toggleMuted(),currentTime:w.currentTime,audioDurationSeconds:w.duration,bufferedSeconds:w.bufferedSeconds,onSeek:P=>w.seek(P),onToggleMenu:()=>Ee(P=>!P),order:l.order,onOrderChange:l.setOrder,loop:l.loop,onLoopChange:l.setLoop,isPlaying:w.isPlaying??!1,onTogglePlay:A,onSkipForward:()=>{l.hasNextSong&&l.next()},onSkipBack:()=>{l.previous()},showLyrics:D,onToggleLyrics:()=>{H(P=>!P)}})]}),m.jsx("div",{className:f.be("notice"),style:_.style,children:_.text}),m.jsx("div",{className:f.be("miniswitcher"),onClick:()=>I(P=>!P),children:m.jsx("button",{className:L(f.bs("icon"),f.bs("icon-right")),type:"button",children:m.jsx(Lt,{})})})]}),z?m.jsx(Et,{open:se,audio:V,playingAudioUrl:l.currentSong.url,onPlayAudio:oe,listMaxHeight:p}):null,t==="fixed"&&m.jsx(nr,{show:D,lrcText:l.currentSong.lrc,currentTime:w.currentTime??0})]})}exports.TwistAPlayer=At;
|
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.twist-aplayer-light{--tp-background: 0 0% 100%;--tp-foreground: 240 10% 3.9%;--tp-card: 0 0% 100%;--tp-card-foreground: 240 10% 3.9%;--tp-primary: 240 5.9% 10%;--tp-primary-foreground: 0 0% 98%;--tp-secondary: 240 4.8% 95.9%;--tp-secondary-foreground: 240 5.9% 10%;--tp-muted: 240 4.8% 95.9%;--tp-muted-foreground: 240 3.8% 46.1%;--tp-accent: 240 4.8% 95.9%;--tp-accent-foreground: 240 5.9% 10%;--tp-border: 240 5.9% 90%}.twist-aplayer-dark{--tp-background: 240 10% 3.9%;--tp-foreground: 0 0% 98%;--tp-card: 240 10% 3.9%;--tp-card-foreground: 0 0% 98%;--tp-primary: 0 0% 98%;--tp-primary-foreground: 240 5.9% 10%;--tp-secondary: 240 3.7% 15.9%;--tp-secondary-foreground: 0 0% 98%;--tp-muted: 240 3.7% 15.9%;--tp-muted-foreground: 240 5% 64.9%;--tp-accent: 240 3.7% 15.9%;--tp-accent-foreground: 0 0% 98%;--tp-border: 240 3.7% 15.9%}.twist-aplayer-vars{--tp-icon-width: 15px;--tp-icon-height: 15px;--tp-icon-font-size: 15px;--tp-icon-transition-function: ease-in-out;--tp-icon-transition-timing: .2s;--tp-max-width: 400px;--tp-zIndex: 99;--tp-pic-width: 66px;--tp-pic-height: 66px;--tp-pic-transition-function: ease;--tp-pic-transition-timing: .3s;--tp-button-background: rgba(0, 0, 0, .2);--tp-box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tp-user-border: hsl(var(--tp-border) / .3)}.twist-aplayer{font-family:Arial,Helvetica,sans-serif;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:normal;border-radius:2px;box-shadow:var(--tp-box-shadow);overflow:hidden}.twist-aplayer--border{border:1px solid var(--tp-user-border)}.twist-aplayer *{box-sizing:content-box}.twist-aplayer__body{background-color:hsl(var(--tp-background))}.twist-aplayer-icon{width:var(--tp-icon-width);height:var(--tp-icon-width);border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:var(--tp-icon-font-size);margin:0;display:inline-block}.twist-aplayer-controller__time .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer-controller__time .twist-aplayer-icon:hover path{fill:hsl(var(--tp-primary))}.twist-aplayer-icon path{transition:all var(--tp-icon-transition-timing) var(--tp-icon-transition-function)}.twist-aplayer-icon-lrc-inactivity svg{opacity:.4}.twist-aplayer-icon-loading{display:none}.twist-aplayer--loading .twist-aplayer-icon-loading{display:block}.twist-aplayer-icon-loading svg{position:absolute;width:10px;height:10px;animation:rotate 1s linear infinite}.twist-aplayer-icon-loading svg path{fill:hsl(var(--tp-background))}.twist-aplayer-icon-back,.twist-aplayer-icon-forward,.twist-aplayer-icon-lrc,.twist-aplayer-icon-order,.twist-aplayer-icon-play{display:none}.twist-aplayer.twist-aplayer--fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:var(--tp-zIndex);overflow:visible;max-width:var(--tp-max-width);box-shadow:none}.twist-aplayer--fixed .twist-aplayer__body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;padding-right:18px;transition:all .3s ease;max-width:400px}.twist-aplayer--fixed .twist-aplayer__info{transform:scaleX(1);transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid hsl(var(--tp-border))}.twist-aplayer--fixed.twist-aplayer--border.twist-aplayer--list-folded .twist-aplayer__info,.twist-aplayer--fixed.twist-aplayer--list-folded .twist-aplayer__info{border-top:none}.twist-aplayer--normal.twist-aplayer--withlist .twist-aplayer__info{border-bottom:1px solid hsl(var(--tp-border))}.twist-aplayer--normal.twist-aplayer--border.twist-aplayer--list-folded .twist-aplayer__info,.twist-aplayer--withlist.twist-aplayer--list-folded .twist-aplayer__info{border-bottom:none}.twist-aplayer--fixed .twist-aplayer-list{margin-bottom:65px;border:1px solid hsl(var(--tp-border));border-bottom:none}.twist-aplayer--withlist .twist-aplayer-list{display:block}.twist-aplayer--fixed .twist-aplayer-list--hide.twist-aplayer-list{border-top:none}.twist-aplayer--withlist .twist-aplayer-icon-order,.twist-aplayer--withlist .twist-aplayer-icon-menu{display:inline}.twist-aplayer--fixed .twist-aplayer-icon-right{display:flex;justify-content:center;align-items:center}.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer--fixed .twist-aplayer-icon-lrc,.twist-aplayer--fixed .twist-aplayer-icon-play{display:inline-block}.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer--fixed .twist-aplayer-icon-menu,.twist-aplayer--fixed .twist-aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px}.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer--fixed .twist-aplayer-icon-play,.twist-aplayer--fixed .twist-aplayer-icon-menu{font-size:20px}.twist-aplayer--fixed .twist-aplayer-icon-back{right:75px}.twist-aplayer--fixed .twist-aplayer-icon-play{right:50px}.twist-aplayer--fixed .twist-aplayer-icon-forward{right:25px}.twist-aplayer--fixed .twist-aplayer-icon-menu{right:0%}.twist-aplayer--narrow{width:66px}.twist-aplayer--narrow .twist-aplayer__info,.twist-aplayer--narrow .twist-aplayer-list{display:none}.twist-aplayer--narrow .twist-aplayer__body,.twist-aplayer--narrow .twist-aplayer__pic{width:66px!important;height:66px!important}.twist-aplayer--fixed .twist-aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.twist-aplayer--fixed .twist-aplayer-lrc:after,.twist-aplayer--fixed .twist-aplayer-lrc:before{display:none}.twist-aplayer--withlrc .twist-aplayer-lrc{display:block}.twist-aplayer--withlrc .twist-aplayer__info{margin-left:90px;height:90px;padding:10px 7px 0}.twist-aplayer--withlrc .twist-aplayer__pic{height:90px;width:90px}.twist-aplayer__pic{position:relative;float:left;width:var(--tp-pic-width);height:var(--tp-pic-height);background-size:cover;background-position:50%;transition:all var(--tp-pic-transition-timing) var(--tp-pic-transition-function);cursor:pointer}.twist-aplayer__button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px #0003;background:hsl(var(--tp-primary-foreground));transition:all .1s ease}.twist-aplayer--play{width:28px;height:28px;bottom:50%;right:50%;margin:0 -15px -15px 0}.twist-aplayer--play svg{position:absolute;top:4px;left:5px;height:20px;width:20px}.twist-aplayer--pause{font-size:12px;width:18px;height:18px;bottom:4px;right:4px}.twist-aplayer--pause svg{position:absolute;top:3px;left:3px;height:12px;width:12px}.twist-aplayer--play path,.twist-aplayer--pause path{fill:hsl(var(--tp-accent-foreground))}.twist-aplayer__info{margin-left:66px;padding:14px 7px 0 10px;height:66px;box-sizing:border-box}.twist-aplayer__music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:default;padding-bottom:2px;height:20px}.twist-aplayer-controller__time .twist-aplayer-icon{cursor:pointer;transition:all .2s ease}.twist-aplayer__notice{opacity:0;position:absolute;top:50%;left:50%;z-index:100;transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;pointer-events:none;background-color:hsl(var(--tp-accent));color:hsl(var(--tp-accent-foreground))}.twist-aplayer--fixed .twist-aplayer__miniswitcher{display:block}.twist-aplayer__miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:hsl(var(--tp-accent));width:18px;border-radius:0 2px 2px 0}.twist-aplayer__miniswitcher .twist-aplayer-icon{height:100%;width:100%;transform:rotateY(180deg);transition:all .3s ease}.twist-aplayer__miniswitcher .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer--fixed.twist-aplayer--narrow .twist-aplayer-icon{transform:rotateY(0)}.twist-aplayer__title{color:hsl(var(--tp-secondary-foreground));font-size:14px}.twist-aplayer__author{font-size:12px;color:hsl(var(--tp-muted-foreground))}.twist-aplayer__author>a{color:inherit;text-decoration:none}.twist-aplayer-bar{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;flex:1;transition:all .2s ease-in-out}.twist-aplayer-bar-vars{--tp-bar-width: 100%;--tp-bar-height: 2px;--tp-bar-background: hsl(var(--tp-primary) / .2);--tp-bar-played-background: hsl(var(--tp-accent-foreground));--tp-bar-loaded-background: hsl(var(--tp-secondary));--tp-bar-loaded-transition-timing: .5s;--tp-bar-loaded-transition-function: ease;--tp-bar-thumb-width: 10px;--tp-bar-thumb-height: 10px;--tp-bar-thumb-margin-top: -4px;--tp-bar-thumb-margin-right: -10px;--tp-bar-thumb-transition-function: ease-in-out;--tp-bar-thumb-transition-timing: .3s;--tp-bar-thumb-hover-scale: 1;--tp-bar-thumb-border-radius: 50%;--tp-bar-thumb-background: hsl(var(--tp-foreground))}.twist-aplayer-bar__inner{position:relative;width:var(--tp-bar-width);height:var(--tp-bar-height);background:var(--tp-bar-background)}.twist-aplayer-bar__loaded{position:absolute;left:0;top:0;bottom:0;height:var(--tp-bar-height);background:var(--tp-bar-loaded-background);transition:all var(--tp-bar-loaded-transition-timing) var(--tp-bar-loaded-transition-function)}.twist-aplayer-bar__played{position:absolute;left:0;top:0;bottom:0;height:var(--tp-bar-height);background-color:var(--tp-bar-played-background)}.twist-aplayer-bar__thumb{position:absolute;top:0;right:5px;margin-top:var(--tp-bar-thumb-margin-top);margin-right:var(--tp-bar-thumb-margin-right);width:var(--tp-bar-thumb-width);height:var(--tp-bar-thumb-height);border-radius:var(--tp-bar-thumb-border-radius);cursor:pointer;background-color:var(--tp-bar-thumb-background);transition:all var(--tp-bar-thumb-transition-timing) var(--tp-bar-thumb-transition-function);transform:scale(0);-webkit-transform:scale(0)}.twist-aplayer-bar:hover .twist-aplayer-bar__thumb{transform:scale(var(--tp-bar-thumb-hover-scale));-webkit-transform:scale(var(--tp-bar-thumb-hover-scale))}.twist-aplayer-volumn{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.twist-aplayer-volumn-vars{--tp-volume-bar-background: hsl(var(--tp-primary) / .3);--tp-volume-bar-width: 5px;--tp-volume-bar-height: 35px;--tp-volume-bar-border-radius: 2.5px;--tp-volume-thumb-width: 5px;--tp-volume-thumb-background: hsl(var(--tp-primary));--tp-volume-thumb-transition-function: ease;--tp-volume-bar-wrap-transition-function: ease-in-out;--tp-volume-bar-wrap-timing: .2s;--tp-volume-thumb-timing: .1s}.twist-aplayer-volumn__bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;transition:all var(--tp-volume-bar-wrap-timing) var(--tp-volume-bar-wrap-transition-function)}.twist-aplayer-volumn:hover .twist-aplayer-volumn__bar-wrap,.twist-aplayer-volumn__bar-wrap--active{height:40px}.twist-aplayer-volumn__bar{position:absolute;bottom:0;right:10px;width:var(--tp-volume-bar-width);height:var(--tp-volume-bar-height);background:var(--tp-volume-bar-background);border-radius:var(--tp-volume-bar-border-radius);overflow:hidden}.twist-aplayer-volumn__thumb{position:absolute;bottom:0;right:0;width:var(--tp-volume-thumb-width);background-color:var(--tp-volume-thumb-background);transition:all var(--tp-volume-thumb-timing) var(--tp-volume-thumb-transition-function)}.twist-aplayer-controller{position:relative;display:flex}.twist-aplayer-controller__time{position:relative;right:0;bottom:4px;height:17px;font-size:11px;padding-left:7px}.twist-aplayer-controller__time-inner{color:hsl(var(--tp-muted-foreground));vertical-align:middle}.twist-aplayer-list{overflow:auto;transition:all .5s ease;will-change:height;display:none;overflow:hidden}.twist-aplayer-list--hide{max-height:0!important}.twist-aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.twist-aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid hsl(var(--tp-border));cursor:pointer;transition:all .2s ease;overflow:hidden;margin:0;background-color:hsl(var(--tp-background))}.twist-aplayer-list ol li.twist-aplayer-list--active{background-color:hsl(var(--tp-secondary))}.twist-aplayer-list ol li:first-child{border:none}.twist-aplayer-list__cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer;background-color:hsl(var(--tp-accent-foreground))}.twist-aplayer-list--active .twist-aplayer-list__cur{display:inline-block}.twist-aplayer-list__index{color:hsl(var(--tp-muted-foreground));margin-right:12px;cursor:pointer}.twist-aplayer-list__title{color:hsl(var(--tp-secondary-foreground))}.twist-aplayer-list__author{color:hsl(var(--tp-muted-foreground));float:right;cursor:pointer}.twist-aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.twist-aplayer-lrc:after,.twist-aplayer-lrc:before{content:" ";position:absolute;z-index:1;display:block;overflow:hidden;width:100%}.twist-aplayer-lrc:before{top:0;height:10%;background:linear-gradient(180deg,hsl(var(--tp-background)) 0,#fff0);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.twist-aplayer-lrc:after{bottom:0;height:33%;background:linear-gradient(180deg,#fff0 0,hsl(var(--tp-background)));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.twist-aplayer-lrc p{font-size:12px;color:hsl(var(--tp-secondary-foreground));line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;transition:all .5s ease-out;opacity:.4;overflow:hidden;text-shadow:none}.twist-aplayer-lrc__contents{width:100%;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:default}.twist-aplayer-lrc p.twist-aplayer-lrc__current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.twist-aplayer-lrc.twist-aplayer-lrc--hide{display:none}
|
|
1
|
+
@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.twist-aplayer-light{--tp-background: 0 0% 100%;--tp-foreground: 240 10% 3.9%;--tp-card: 0 0% 100%;--tp-card-foreground: 240 10% 3.9%;--tp-primary: 240 5.9% 10%;--tp-primary-foreground: 0 0% 98%;--tp-secondary: 240 4.8% 95.9%;--tp-secondary-foreground: 240 5.9% 10%;--tp-muted: 240 4.8% 95.9%;--tp-muted-foreground: 240 3.8% 46.1%;--tp-accent: 240 4.8% 95.9%;--tp-accent-foreground: 240 5.9% 10%;--tp-border: 240 5.9% 90%}.twist-aplayer-dark{--tp-background: 240 10% 3.9%;--tp-foreground: 0 0% 98%;--tp-card: 240 10% 3.9%;--tp-card-foreground: 0 0% 98%;--tp-primary: 0 0% 98%;--tp-primary-foreground: 240 5.9% 10%;--tp-secondary: 240 3.7% 15.9%;--tp-secondary-foreground: 0 0% 98%;--tp-muted: 240 3.7% 15.9%;--tp-muted-foreground: 240 5% 64.9%;--tp-accent: 240 3.7% 15.9%;--tp-accent-foreground: 0 0% 98%;--tp-border: 240 3.7% 15.9%}.twist-aplayer-vars{--tp-icon-width: 15px;--tp-icon-height: 15px;--tp-icon-font-size: 15px;--tp-icon-transition-function: ease-in-out;--tp-icon-transition-timing: .2s;--tp-max-width: 400px;--tp-zIndex: 99;--tp-pic-width: 66px;--tp-pic-height: 66px;--tp-pic-transition-function: ease;--tp-pic-transition-timing: .3s;--tp-button-background: rgba(0, 0, 0, .2);--tp-box-shadow: 0 0 #0000, 0 0 #0000, 0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tp-user-border: hsl(var(--tp-border) / .3)}.twist-aplayer{font-family:Arial,Helvetica,sans-serif;-webkit-user-select:none;-moz-user-select:none;user-select:none;line-height:normal;border-radius:2px;box-shadow:var(--tp-box-shadow);overflow:hidden}.twist-aplayer--border{border:1px solid var(--tp-user-border)}.twist-aplayer *{box-sizing:content-box}.twist-aplayer__body{background-color:hsl(var(--tp-background))}.twist-aplayer-icon{width:var(--tp-icon-width);height:var(--tp-icon-width);border:none;background-color:transparent;outline:none;cursor:pointer;opacity:.8;vertical-align:middle;padding:0;font-size:var(--tp-icon-font-size);margin:0;display:inline-block}.twist-aplayer-controller__time .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer-controller__time .twist-aplayer-icon:hover path{fill:hsl(var(--tp-primary))}.twist-aplayer-icon path{transition:all var(--tp-icon-transition-timing) var(--tp-icon-transition-function)}.twist-aplayer-icon-lrc-inactivity svg{opacity:.4}.twist-aplayer-icon-loading{display:none}.twist-aplayer--loading .twist-aplayer-icon-loading{display:block}.twist-aplayer-icon-loading svg{position:absolute;width:10px;height:10px;animation:rotate 1s linear infinite}.twist-aplayer-icon-loading svg path{fill:hsl(var(--tp-background))}.twist-aplayer-icon-back,.twist-aplayer-icon-forward,.twist-aplayer-icon-lrc,.twist-aplayer-icon-order,.twist-aplayer-icon-play{display:none}.twist-aplayer.twist-aplayer--fixed{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:var(--tp-zIndex);overflow:visible;max-width:var(--tp-max-width);box-shadow:none}.twist-aplayer--fixed .twist-aplayer__body{position:fixed;bottom:0;left:0;right:0;margin:0;z-index:99;padding-right:18px;transition:all .3s ease;max-width:400px}.twist-aplayer--fixed .twist-aplayer__info{transform:scaleX(1);transform-origin:0 0;transition:all .3s ease;border-bottom:none;border-top:1px solid hsl(var(--tp-border))}.twist-aplayer--fixed.twist-aplayer--border.twist-aplayer--list-folded .twist-aplayer__info,.twist-aplayer--fixed.twist-aplayer--list-folded .twist-aplayer__info{border-top:none}.twist-aplayer--normal.twist-aplayer--border.twist-aplayer--list-folded .twist-aplayer__info,.twist-aplayer--withlist.twist-aplayer--list-folded .twist-aplayer__info{border-bottom:none}.twist-aplayer--fixed .twist-aplayer-list{margin-bottom:65px;border:1px solid hsl(var(--tp-border));border-bottom:none}.twist-aplayer--withlist .twist-aplayer-list{display:block}.twist-aplayer--fixed .twist-aplayer-list--hide.twist-aplayer-list{border-top:none}.twist-aplayer--withlist .twist-aplayer-icon-order,.twist-aplayer--withlist .twist-aplayer-icon-menu{display:inline}.twist-aplayer--fixed .twist-aplayer-icon-right{display:flex;justify-content:center;align-items:center}.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer--fixed .twist-aplayer-icon-lrc,.twist-aplayer--fixed .twist-aplayer-icon-play{display:inline-block}.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer--fixed .twist-aplayer-icon-menu,.twist-aplayer--fixed .twist-aplayer-icon-play{position:absolute;bottom:27px;width:20px;height:20px}.twist-aplayer--fixed .twist-aplayer-icon-back,.twist-aplayer--fixed .twist-aplayer-icon-forward,.twist-aplayer--fixed .twist-aplayer-icon-play,.twist-aplayer--fixed .twist-aplayer-icon-menu{font-size:20px}.twist-aplayer--fixed .twist-aplayer-icon-back{right:75px}.twist-aplayer--fixed .twist-aplayer-icon-play{right:50px}.twist-aplayer--fixed .twist-aplayer-icon-forward{right:25px}.twist-aplayer--fixed .twist-aplayer-icon-menu{right:0%}.twist-aplayer--narrow{width:66px}.twist-aplayer--narrow .twist-aplayer__info,.twist-aplayer--narrow .twist-aplayer-list{display:none}.twist-aplayer--narrow .twist-aplayer__body,.twist-aplayer--narrow .twist-aplayer__pic{width:66px!important;height:66px!important}.twist-aplayer--fixed .twist-aplayer-lrc{display:block;position:fixed;bottom:10px;left:0;right:0;margin:0;z-index:98;pointer-events:none;text-shadow:-1px -1px 0 #fff}.twist-aplayer--fixed .twist-aplayer-lrc:after,.twist-aplayer--fixed .twist-aplayer-lrc:before{display:none}.twist-aplayer--withlrc .twist-aplayer-lrc{display:block}.twist-aplayer--withlrc .twist-aplayer__info{margin-left:90px;height:90px;padding:10px 7px 0}.twist-aplayer--withlrc .twist-aplayer__pic{height:90px;width:90px}.twist-aplayer__pic{position:relative;float:left;width:var(--tp-pic-width);height:var(--tp-pic-height);background-size:cover;background-position:50%;transition:all var(--tp-pic-transition-timing) var(--tp-pic-transition-function);cursor:pointer}.twist-aplayer__button{position:absolute;border-radius:50%;opacity:.8;text-shadow:0 1px 1px rgba(0,0,0,.2);box-shadow:0 1px 1px #0003;background:hsl(var(--tp-primary-foreground));transition:all .1s ease}.twist-aplayer--play{width:28px;height:28px;bottom:50%;right:50%;margin:0 -15px -15px 0}.twist-aplayer--play svg{position:absolute;top:4px;left:5px;height:20px;width:20px}.twist-aplayer--pause{font-size:12px;width:18px;height:18px;bottom:4px;right:4px}.twist-aplayer--pause svg{position:absolute;top:3px;left:3px;height:12px;width:12px}.twist-aplayer--play path,.twist-aplayer--pause path{fill:hsl(var(--tp-accent-foreground))}.twist-aplayer__info{margin-left:66px;padding:14px 7px 0 10px;height:66px;box-sizing:border-box}.twist-aplayer__music{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin:0 0 13px 5px;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:default;padding-bottom:2px;height:20px}.twist-aplayer-controller__time .twist-aplayer-icon{cursor:pointer;transition:all .2s ease}.twist-aplayer__notice{opacity:0;position:absolute;top:50%;left:50%;z-index:100;transform:translate(-50%,-50%);font-size:12px;border-radius:4px;padding:5px 10px;transition:all .3s ease-in-out;overflow:hidden;pointer-events:none;background-color:hsl(var(--tp-accent));color:hsl(var(--tp-accent-foreground))}.twist-aplayer--fixed .twist-aplayer__miniswitcher{display:block}.twist-aplayer__miniswitcher{display:none;position:absolute;top:0;right:0;bottom:0;height:100%;background:hsl(var(--tp-accent));width:18px;border-radius:0 2px 2px 0}.twist-aplayer__miniswitcher .twist-aplayer-icon{height:100%;width:100%;transform:rotateY(180deg);transition:all .3s ease}.twist-aplayer__miniswitcher .twist-aplayer-icon path{fill:hsl(var(--tp-muted-foreground))}.twist-aplayer--fixed.twist-aplayer--narrow .twist-aplayer-icon{transform:rotateY(0)}.twist-aplayer__title{color:hsl(var(--tp-secondary-foreground));font-size:14px}.twist-aplayer__author{font-size:12px;color:hsl(var(--tp-muted-foreground))}.twist-aplayer__author>a{color:inherit;text-decoration:none}.twist-aplayer-bar{margin:0 0 0 5px;padding:4px 0;cursor:pointer!important;flex:1;transition:all .2s ease-in-out}.twist-aplayer-bar-vars{--tp-bar-width: 100%;--tp-bar-height: 2px;--tp-bar-background: hsl(var(--tp-primary) / .2);--tp-bar-played-background: hsl(var(--tp-accent-foreground));--tp-bar-loaded-background: hsl(var(--tp-secondary));--tp-bar-loaded-transition-timing: .5s;--tp-bar-loaded-transition-function: ease;--tp-bar-thumb-width: 10px;--tp-bar-thumb-height: 10px;--tp-bar-thumb-margin-top: -4px;--tp-bar-thumb-margin-right: -10px;--tp-bar-thumb-transition-function: ease-in-out;--tp-bar-thumb-transition-timing: .3s;--tp-bar-thumb-hover-scale: 1;--tp-bar-thumb-border-radius: 50%;--tp-bar-thumb-background: hsl(var(--tp-foreground))}.twist-aplayer-bar__inner{position:relative;width:var(--tp-bar-width);height:var(--tp-bar-height);background:var(--tp-bar-background)}.twist-aplayer-bar__loaded{position:absolute;left:0;top:0;bottom:0;height:var(--tp-bar-height);background:var(--tp-bar-loaded-background);transition:all var(--tp-bar-loaded-transition-timing) var(--tp-bar-loaded-transition-function)}.twist-aplayer-bar__played{position:absolute;left:0;top:0;bottom:0;height:var(--tp-bar-height);background-color:var(--tp-bar-played-background)}.twist-aplayer-bar__thumb{position:absolute;top:0;right:5px;margin-top:var(--tp-bar-thumb-margin-top);margin-right:var(--tp-bar-thumb-margin-right);width:var(--tp-bar-thumb-width);height:var(--tp-bar-thumb-height);border-radius:var(--tp-bar-thumb-border-radius);cursor:pointer;background-color:var(--tp-bar-thumb-background);transition:all var(--tp-bar-thumb-transition-timing) var(--tp-bar-thumb-transition-function);transform:scale(0);-webkit-transform:scale(0)}.twist-aplayer-bar:hover .twist-aplayer-bar__thumb{transform:scale(var(--tp-bar-thumb-hover-scale));-webkit-transform:scale(var(--tp-bar-thumb-hover-scale))}.twist-aplayer-volumn{position:relative;display:inline-block;margin-left:3px;cursor:pointer!important}.twist-aplayer-volumn-vars{--tp-volume-bar-background: hsl(var(--tp-primary) / .3);--tp-volume-bar-width: 5px;--tp-volume-bar-height: 35px;--tp-volume-bar-border-radius: 2.5px;--tp-volume-thumb-width: 5px;--tp-volume-thumb-background: hsl(var(--tp-primary));--tp-volume-thumb-transition-function: ease;--tp-volume-bar-wrap-transition-function: ease-in-out;--tp-volume-bar-wrap-timing: .2s;--tp-volume-thumb-timing: .1s}.twist-aplayer-volumn__bar-wrap{position:absolute;bottom:15px;right:-3px;width:25px;height:0;z-index:99;overflow:hidden;transition:all var(--tp-volume-bar-wrap-timing) var(--tp-volume-bar-wrap-transition-function)}.twist-aplayer-volumn:hover .twist-aplayer-volumn__bar-wrap,.twist-aplayer-volumn__bar-wrap--active{height:40px}.twist-aplayer-volumn__bar{position:absolute;bottom:0;right:10px;width:var(--tp-volume-bar-width);height:var(--tp-volume-bar-height);background:var(--tp-volume-bar-background);border-radius:var(--tp-volume-bar-border-radius);overflow:hidden}.twist-aplayer-volumn__thumb{position:absolute;bottom:0;right:0;width:var(--tp-volume-thumb-width);background-color:var(--tp-volume-thumb-background);transition:all var(--tp-volume-thumb-timing) var(--tp-volume-thumb-transition-function)}.twist-aplayer-controller{position:relative;display:flex}.twist-aplayer-controller__time{position:relative;right:0;bottom:4px;height:17px;font-size:11px;padding-left:7px}.twist-aplayer-controller__time-inner{color:hsl(var(--tp-muted-foreground));vertical-align:middle}.twist-aplayer-list{overflow:auto;transition:all .5s ease;will-change:height;display:none;overflow:hidden}.twist-aplayer-list--hide{max-height:0!important}.twist-aplayer-list ol{list-style-type:none;margin:0;padding:0;overflow-y:auto}.twist-aplayer-list ol li{position:relative;height:32px;line-height:32px;padding:0 15px;font-size:12px;border-top:1px solid hsl(var(--tp-border));cursor:pointer;transition:all .2s ease;overflow:hidden;margin:0;background-color:hsl(var(--tp-background))}.twist-aplayer-list ol li.twist-aplayer-list--active{background-color:hsl(var(--tp-secondary))}.twist-aplayer-list ol li:first-child{border:none}.twist-aplayer-list__cur{display:none;width:3px;height:22px;position:absolute;left:0;top:5px;cursor:pointer;background-color:hsl(var(--tp-accent-foreground))}.twist-aplayer-list--active .twist-aplayer-list__cur{display:inline-block}.twist-aplayer-list__index{color:hsl(var(--tp-muted-foreground));margin-right:12px;cursor:pointer}.twist-aplayer-list__title{color:hsl(var(--tp-secondary-foreground))}.twist-aplayer-list__author{color:hsl(var(--tp-muted-foreground));float:right;cursor:pointer}.twist-aplayer-lrc{display:none;position:relative;height:30px;text-align:center;overflow:hidden;margin:-10px 0 7px}.twist-aplayer-lrc:after,.twist-aplayer-lrc:before{content:" ";position:absolute;z-index:1;display:block;overflow:hidden;width:100%}.twist-aplayer-lrc:before{top:0;height:10%;background:linear-gradient(180deg,hsl(var(--tp-background)) 0,#fff0);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#ffffff",endColorstr="#00ffffff",GradientType=0)}.twist-aplayer-lrc:after{bottom:0;height:33%;background:linear-gradient(180deg,#fff0 0,hsl(var(--tp-background)));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#00ffffff",endColorstr="#ccffffff",GradientType=0)}.twist-aplayer-lrc p{font-size:12px;color:hsl(var(--tp-secondary-foreground));line-height:16px!important;height:16px!important;padding:0!important;margin:0!important;transition:all .5s ease-out;opacity:.4;overflow:hidden;text-shadow:none}.twist-aplayer-lrc__contents{width:100%;transition:all .5s ease-out;-webkit-user-select:text;-moz-user-select:text;user-select:text;cursor:default}.twist-aplayer-lrc p.twist-aplayer-lrc__current{opacity:1;overflow:visible;height:auto!important;min-height:16px}.twist-aplayer-lrc.twist-aplayer-lrc--hide{display:none}
|