@stronk-tech/react-librespot-controller 0.0.10

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 ADDED
@@ -0,0 +1,24 @@
1
+ This is free and unencumbered software released into the public domain.
2
+
3
+ Anyone is free to copy, modify, publish, use, compile, sell, or
4
+ distribute this software, either in source code form or as a compiled
5
+ binary, for any purpose, commercial or non-commercial, and by any
6
+ means.
7
+
8
+ In jurisdictions that recognize copyright laws, the author or authors
9
+ of this software dedicate any and all copyright interest in the
10
+ software to the public domain. We make this dedication for the benefit
11
+ of the public at large and to the detriment of our heirs and
12
+ successors. We intend this dedication to be an overt act of
13
+ relinquishment in perpetuity of all present and future rights to this
14
+ software under copyright law.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
+ IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20
+ OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For more information, please refer to <https://unlicense.org>
package/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # SpotifyPlayer
2
+ [![NPM](https://img.shields.io/npm/v/@stronk-tech/spotify-player.svg)](https://www.npmjs.com/package/@stronk-tech/spotify-player)
3
+
4
+ > [`go-librespot`](https://github.com/devgianlu/go-librespot) web frontend for small touchscreens
5
+
6
+ Can be deployed standalone or imported as a NPM module.
7
+
8
+ The player is styled in the [Tokyo Night](https://github.com/tokyo-night/tokyo-night-vscode-theme) colour scheme except for the album image, which emits an ambilight effect based on the colours in the image.
9
+
10
+ ## Install `go-librespot`
11
+ TODO: refer to OG source instructions + explain `systemd` script
12
+ ```
13
+ [Unit]
14
+ Description=Spotify daemon
15
+ Documentation=https://github.com/devgianlu/go-librespot
16
+ Wants=sound.target
17
+ After=sound.target
18
+ Wants=network-online.target
19
+ After=network-online.target
20
+
21
+ [Service]
22
+ WorkingDirectory=/home/pulseaudio/go-librespot
23
+ ExecStart=/usr/local/go/bin/go run /home/pulseaudio/go-librespot/cmd/daemon
24
+ Restart=always
25
+ RestartSec=12
26
+
27
+ [Install]
28
+ WantedBy=default.target
29
+ ```
30
+
31
+ ## Config `go-librespot`
32
+ TODO: instructions to enable the API
33
+
34
+ Make sure to mention the bind address and to not expose API to public net.
35
+
36
+ ## Standalone
37
+
38
+ Create a `.env` file and fill in you API endpoints
39
+ ```
40
+ REACT_APP_API_BASE_URL=http://apollo:3678
41
+ REACT_APP_WS_URL=ws://apollo:3678/events
42
+ ```
43
+
44
+ Run `npm run test` for local debugging.
45
+
46
+ ## Module
47
+
48
+ First install the dependency:
49
+ ```
50
+ npm install --save `@stronk-tech/spotify-player`
51
+ ```
52
+
53
+ Then import the component and fill in your API endpoints:
54
+ ```
55
+ import MediaPlayer from "@stronk-tech/spotify-player";
56
+ <MediaPlayer websocketUrl={"ws://apollo:3678/events"} apiBaseUrl={"http://apollo:3678"} hideOnDisconnect={true} />
57
+ ```
58
+
59
+ If you set `hideOnDisconnect` to true, the entire component will hide itself when there is no connection to the API endpoint.
60
+
61
+ # Screen shots
62
+ The player arranges itself based on the screen dimensions, with three possible layouts:
63
+
64
+ ### Wide screen
65
+ ![Wide](screenshot_wide.png)
66
+
67
+ ### Narrow screen
68
+ ![Mid](screenshot_mid.png)
69
+
70
+ ### Portrait screen
71
+ ![Portrait](screenshot_portrait.png)
@@ -0,0 +1,15 @@
1
+ "use strict";var e=require("react");function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var r,n={exports:{}},a={exports:{}},o={};var i,c,l,s,u,p,d,f,y,m,h,b,g,v,x,w={};
2
+ /** @license React v16.13.1
3
+ * react-is.development.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */function k(){return c||(c=1,"production"===process.env.NODE_ENV?a.exports=function(){if(r)return o;r=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,a=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,c=e?Symbol.for("react.profiler"):60114,l=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,u=e?Symbol.for("react.async_mode"):60111,p=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,y=e?Symbol.for("react.suspense_list"):60120,m=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,b=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,x=e?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var r=e.$$typeof;switch(r){case t:switch(e=e.type){case u:case p:case a:case c:case i:case f:return e;default:switch(e=e&&e.$$typeof){case s:case d:case h:case m:case l:return e;default:return r}}case n:return r}}}function k(e){return w(e)===p}return o.AsyncMode=u,o.ConcurrentMode=p,o.ContextConsumer=s,o.ContextProvider=l,o.Element=t,o.ForwardRef=d,o.Fragment=a,o.Lazy=h,o.Memo=m,o.Portal=n,o.Profiler=c,o.StrictMode=i,o.Suspense=f,o.isAsyncMode=function(e){return k(e)||w(e)===u},o.isConcurrentMode=k,o.isContextConsumer=function(e){return w(e)===s},o.isContextProvider=function(e){return w(e)===l},o.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},o.isForwardRef=function(e){return w(e)===d},o.isFragment=function(e){return w(e)===a},o.isLazy=function(e){return w(e)===h},o.isMemo=function(e){return w(e)===m},o.isPortal=function(e){return w(e)===n},o.isProfiler=function(e){return w(e)===c},o.isStrictMode=function(e){return w(e)===i},o.isSuspense=function(e){return w(e)===f},o.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===c||e===i||e===f||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===l||e.$$typeof===s||e.$$typeof===d||e.$$typeof===g||e.$$typeof===v||e.$$typeof===x||e.$$typeof===b)},o.typeOf=w,o}():a.exports=(i||(i=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,a=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,c=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,s=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,p=e?Symbol.for("react.suspense"):60113,d=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,y=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,h=e?Symbol.for("react.fundamental"):60117,b=e?Symbol.for("react.responder"):60118,g=e?Symbol.for("react.scope"):60119;function v(e){if("object"==typeof e&&null!==e){var d=e.$$typeof;switch(d){case t:var m=e.type;switch(m){case l:case s:case n:case o:case a:case p:return m;default:var h=m&&m.$$typeof;switch(h){case c:case u:case y:case f:case i:return h;default:return d}}case r:return d}}}var x=l,k=s,z=c,E=i,O=t,S=u,j=n,C=y,N=f,P=r,M=o,T=a,_=p,V=!1;function $(e){return v(e)===s}w.AsyncMode=x,w.ConcurrentMode=k,w.ContextConsumer=z,w.ContextProvider=E,w.Element=O,w.ForwardRef=S,w.Fragment=j,w.Lazy=C,w.Memo=N,w.Portal=P,w.Profiler=M,w.StrictMode=T,w.Suspense=_,w.isAsyncMode=function(e){return V||(V=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),$(e)||v(e)===l},w.isConcurrentMode=$,w.isContextConsumer=function(e){return v(e)===c},w.isContextProvider=function(e){return v(e)===i},w.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},w.isForwardRef=function(e){return v(e)===u},w.isFragment=function(e){return v(e)===n},w.isLazy=function(e){return v(e)===y},w.isMemo=function(e){return v(e)===f},w.isPortal=function(e){return v(e)===r},w.isProfiler=function(e){return v(e)===o},w.isStrictMode=function(e){return v(e)===a},w.isSuspense=function(e){return v(e)===p},w.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===s||e===o||e===a||e===p||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===f||e.$$typeof===i||e.$$typeof===c||e.$$typeof===u||e.$$typeof===h||e.$$typeof===b||e.$$typeof===g||e.$$typeof===m)},w.typeOf=v}()),w)),a.exports}
10
+ /*
11
+ object-assign
12
+ (c) Sindre Sorhus
13
+ @license MIT
14
+ */function z(){if(s)return l;s=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;return l=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(n,a){for(var o,i,c=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(n),l=1;l<arguments.length;l++){for(var s in o=Object(arguments[l]))t.call(o,s)&&(c[s]=o[s]);if(e){i=e(o);for(var u=0;u<i.length;u++)r.call(o,i[u])&&(c[i[u]]=o[i[u]])}}return c},l}function E(){if(p)return u;p=1;return u="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"}function O(){return f?d:(f=1,d=Function.call.bind(Object.prototype.hasOwnProperty))}function S(){if(m)return y;m=1;var e=function(){};if("production"!==process.env.NODE_ENV){var t=E(),r={},n=O();e=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}}function a(a,o,i,c,l){if("production"!==process.env.NODE_ENV)for(var s in a)if(n(a,s)){var u;try{if("function"!=typeof a[s]){var p=Error((c||"React class")+": "+i+" type `"+s+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[s]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}u=a[s](o,s,c,i,null,t)}catch(e){u=e}if(!u||u instanceof Error||e((c||"React class")+": type specification of "+i+" `"+s+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in r)){r[u.message]=!0;var d=l?l():"";e("Failed "+i+" type: "+u.message+(null!=d?d:""))}}}return a.resetWarningCache=function(){"production"!==process.env.NODE_ENV&&(r={})},y=a}function j(){if(b)return h;b=1;var e=k(),t=z(),r=E(),n=O(),a=S(),o=function(){};function i(){return null}return"production"!==process.env.NODE_ENV&&(o=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}}),h=function(c,l){var s="function"==typeof Symbol&&Symbol.iterator;var u="<<anonymous>>",p={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:y(i),arrayOf:function(e){return y((function(t,n,a,o,i){if("function"!=typeof e)return new f("Property `"+i+"` of component `"+a+"` has invalid PropType notation inside arrayOf.");var c=t[n];if(!Array.isArray(c))return new f("Invalid "+o+" `"+i+"` of type `"+g(c)+"` supplied to `"+a+"`, expected an array.");for(var l=0;l<c.length;l++){var s=e(c,l,a,o,i+"["+l+"]",r);if(s instanceof Error)return s}return null}))},element:y((function(e,t,r,n,a){var o=e[t];return c(o)?null:new f("Invalid "+n+" `"+a+"` of type `"+g(o)+"` supplied to `"+r+"`, expected a single ReactElement.")})),elementType:y((function(t,r,n,a,o){var i=t[r];return e.isValidElementType(i)?null:new f("Invalid "+a+" `"+o+"` of type `"+g(i)+"` supplied to `"+n+"`, expected a single ReactElement type.")})),instanceOf:function(e){return y((function(t,r,n,a,o){if(!(t[r]instanceof e)){var i=e.name||u;return new f("Invalid "+a+" `"+o+"` of type `"+(((c=t[r]).constructor&&c.constructor.name?c.constructor.name:u)+"` supplied to `")+n+"`, expected instance of `"+i+"`.")}var c;return null}))},node:y((function(e,t,r,n,a){return b(e[t])?null:new f("Invalid "+n+" `"+a+"` supplied to `"+r+"`, expected a ReactNode.")})),objectOf:function(e){return y((function(t,a,o,i,c){if("function"!=typeof e)return new f("Property `"+c+"` of component `"+o+"` has invalid PropType notation inside objectOf.");var l=t[a],s=g(l);if("object"!==s)return new f("Invalid "+i+" `"+c+"` of type `"+s+"` supplied to `"+o+"`, expected an object.");for(var u in l)if(n(l,u)){var p=e(l,u,o,i,c+"."+u,r);if(p instanceof Error)return p}return null}))},oneOf:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),i;return y((function(t,r,n,a,o){for(var i=t[r],c=0;c<e.length;c++)if(d(i,e[c]))return null;var l=JSON.stringify(e,(function(e,t){return"symbol"===v(t)?String(t):t}));return new f("Invalid "+a+" `"+o+"` of value `"+String(i)+"` supplied to `"+n+"`, expected one of "+l+".")}))},oneOfType:function(e){if(!Array.isArray(e))return"production"!==process.env.NODE_ENV&&o("Invalid argument supplied to oneOfType, expected an instance of array."),i;for(var t=0;t<e.length;t++){var a=e[t];if("function"!=typeof a)return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+x(a)+" at index "+t+"."),i}return y((function(t,a,o,i,c){for(var l=[],s=0;s<e.length;s++){var u=(0,e[s])(t,a,o,i,c,r);if(null==u)return null;u.data&&n(u.data,"expectedType")&&l.push(u.data.expectedType)}return new f("Invalid "+i+" `"+c+"` supplied to `"+o+"`"+(l.length>0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return y((function(t,n,a,o,i){var c=t[n],l=g(c);if("object"!==l)return new f("Invalid "+o+" `"+i+"` of type `"+l+"` supplied to `"+a+"`, expected `object`.");for(var s in e){var u=e[s];if("function"!=typeof u)return h(a,o,i,s,v(u));var p=u(c,s,a,o,i+"."+s,r);if(p)return p}return null}))},exact:function(e){return y((function(a,o,i,c,l){var s=a[o],u=g(s);if("object"!==u)return new f("Invalid "+c+" `"+l+"` of type `"+u+"` supplied to `"+i+"`, expected `object`.");var p=t({},a[o],e);for(var d in p){var y=e[d];if(n(e,d)&&"function"!=typeof y)return h(i,c,l,d,v(y));if(!y)return new f("Invalid "+c+" `"+l+"` key `"+d+"` supplied to `"+i+"`.\nBad object: "+JSON.stringify(a[o],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=y(s,d,i,c,l+"."+d,r);if(m)return m}return null}))}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function f(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function y(e){if("production"!==process.env.NODE_ENV)var t={},n=0;function a(a,i,c,s,p,d,y){if(s=s||u,d=d||c,y!==r){if(l){var m=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw m.name="Invariant Violation",m}if("production"!==process.env.NODE_ENV&&"undefined"!=typeof console){var h=s+":"+c;!t[h]&&n<3&&(o("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[h]=!0,n++)}}return null==i[c]?a?null===i[c]?new f("The "+p+" `"+d+"` is marked as required in `"+s+"`, but its value is `null`."):new f("The "+p+" `"+d+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:e(i,c,s,p,d)}var i=a.bind(null,!1);return i.isRequired=a.bind(null,!0),i}function m(e){return y((function(t,r,n,a,o,i){var c=t[r];return g(c)!==e?new f("Invalid "+a+" `"+o+"` of type `"+v(c)+"` supplied to `"+n+"`, expected `"+e+"`.",{expectedType:e}):null}))}function h(e,t,r,n,a){return new f((e||"React class")+": "+t+" type `"+r+"."+n+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+a+"`.")}function b(e){switch(typeof e){case"number":case"string":case"undefined":return!0;case"boolean":return!e;case"object":if(Array.isArray(e))return e.every(b);if(null===e||c(e))return!0;var t=function(e){var t=e&&(s&&e[s]||e["@@iterator"]);if("function"==typeof t)return t}(e);if(!t)return!1;var r,n=t.call(e);if(t!==e.entries){for(;!(r=n.next()).done;)if(!b(r.value))return!1}else for(;!(r=n.next()).done;){var a=r.value;if(a&&!b(a[1]))return!1}return!0;default:return!1}}function g(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=g(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function x(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return f.prototype=Error.prototype,p.checkPropTypes=a,p.resetWarningCache=a.resetWarningCache,p.PropTypes=p,p},h}function C(){if(v)return g;v=1;var e=E();function t(){}function r(){}return r.resetWarningCache=t,g=function(){function n(t,r,n,a,o,i){if(i!==e){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function a(){return n}n.isRequired=n;var o={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:a,element:n,elementType:n,instanceOf:a,node:n,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:r,resetWarningCache:t};return o.PropTypes=o,o}}function N(){if(x)return n.exports;if(x=1,"production"!==process.env.NODE_ENV){var e=k();n.exports=j()(e.isElement,true)}else n.exports=C()();return n.exports}var P=t(N());function M(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?T(Object(r),!0).forEach((function(t){M(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}document.head.appendChild(document.createElement("style")).textContent='.spotify-player-album-card-wrapper{position:relative;margin:1em;flex-shrink:1;border-radius:0.4em;overflow:visible;display:flex;align-items:center;justify-content:center;z-index:1;transition:width 0.3s ease,height 0.3s ease,filter 0.3s ease,z-index 0s;background:var(--gradient-border,linear-gradient(to right,#000,#333));}.spotify-player-album-card-wrapper::after{content:"";position:absolute;top:-6px;left:-6px;right:-6px;bottom:-6px;border:3px solid var(--darkest);border-radius:inherit;background:radial-gradient(circle at 50% 50%,rgba(255,255,255,0.4),transparent);box-shadow:inset 0px 4px 15px rgba(0,0,0,0.8);z-index:4;pointer-events:none;overflow:hidden;}.spotify-player-album-card-wrapper::before{content:"";position:absolute;background:var(--gradient-border);border-radius:inherit;z-index:1;opacity:0.6;animation:pulsate-glow 4s infinite alternate ease-in-out;transition:all 0.3s ease;}@keyframes pulsate-glow{0%{filter:blur(10px);top:-0.20em;left:-0.20em;right:-0.20em;bottom:-0.2em;}50%{filter:blur(30px);top:-0.30em;left:-0.30em;right:-0.30em;bottom:-0.3em;}100%{filter:blur(10px);top:-0.20em;left:-0.20em;right:-0.20em;bottom:-0.2em;}}.spotify-player-album-card-wrapper:hover{filter:brightness(1.25);}.spotify-player-album-card-container{position:relative;width:100%;height:auto;padding:0;overflow:visible;box-sizing:border-box;z-index:5;border-radius:inherit;}.spotify-player-album-card-container-border{position:absolute;top:-4px;left:-4px;right:-4px;bottom:-4px;border-radius:inherit;background:var(--gradient-border,linear-gradient(to right,var(--blue),var(--lighter)));pointer-events:none;z-index:3;}.spotify-player-album-card-image-container{position:relative;width:100%;height:100%;border-radius:inherit;box-sizing:border-box;overflow:hidden;z-index:6;}.spotify-player-album-card-image-container::before{content:"";position:absolute;top:0;left:0;right:0;bottom:0;border-radius:inherit;background:linear-gradient(to right,rgba(0,0,0,0.5),rgba(0,0,0,0.2) 15%,rgba(0,0,0,0) 30%,rgba(0,0,0,0) 70%,rgba(0,0,0,0.2) 85%,rgba(0,0,0,0.5));pointer-events:none;z-index:9;}.spotify-player-album-card-image{width:100%;height:auto;object-fit:cover;display:block;border-radius:inherit;box-sizing:border-box;position:relative;z-index:7;transition:all 0.3s ease;}.spotify-player-album-card-title-container{position:absolute;top:0;left:0;right:0;background:linear-gradient(to bottom,rgba(10,10,10,0.8),rgba(20,20,20,0.8),rgba(30,30,30,0.7),rgba(40,40,40,0.5),rgba(50,50,50,0.3));border-top-left-radius:0.1em;border-top-right-radius:0.1em;padding:0.5em;box-sizing:border-box;z-index:10;transition:all 0.3s ease;border-top-left-radius:inherit;border-top-right-radius:inherit;}.spotify-player-album-card-title{position:relative;font-size:1em;font-weight:bold;text-align:center;background:linear-gradient(135deg,#f5f5dc,#e6e6e6,#d4d4d4);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;color:transparent;font-family:\'Cinzel\',serif;box-sizing:border-box;z-index:11;transition:all 0.3s ease;overflow:visible;filter:drop-shadow(2px 2px 4px rgba(0,0,0,0.6));}@supports not (-webkit-background-clip:text){.spotify-player-album-card-title{color:#d4af37;}}.spotify-player-album-card-subtitle{position:absolute;bottom:0;left:0;right:0;background:linear-gradient(0deg,var(--darkest),rgba(20,20,30,0.9));background-color:var(--darker);background-blend-mode:overlay;background-size:cover;opacity:0.8;color:var(--lighter);font-style:italic;font-size:0.6em;text-align:center;padding:0.3em;padding-left:0.1em;padding-right:0.1em;border-top:2px solid var(--darkest);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;transition:all 0.3s ease;font-family:\'Cinzel\',serif;box-sizing:border-box;z-index:10;}';const V=t=>{let{title:r,subtitle:n,image:a}=t;const[o,i]=e.useState(!1),[c,l]=e.useState(""),s=e.useRef(),[u,p]=e.useState((()=>(new Date).getTime()/200%360));e.useEffect((()=>{if(a){const e=new Image;e.crossOrigin="Anonymous",e.src=a,e.onload=()=>{const t=(e=>{const t=s.current,r=t.getContext("2d");t.width=e.width,t.height=e.height,r.drawImage(e,0,0,t.width,t.height);const n=r.getImageData(0,0,t.width,t.height).data,a={},o=50;for(let e=0;e<n.length;e+=4){const t=Math.round(n[e]/o)*o,r=Math.round(n[e+1]/o)*o,i=Math.round(n[e+2]/o)*o,c="rgb(".concat(t,",").concat(r,",").concat(i,")");a[c]=(a[c]||0)+1}const i=Object.entries(a).sort(((e,t)=>t[1]-e[1])).slice(0,3).map((e=>e[0]));return i.length>1?"linear-gradient(to right, ".concat(i.join(", "),")"):"linear-gradient(to right, ".concat(i[0],", ").concat(i[0],")")})(e);l(t),i(!0)},e.onerror=()=>{console.error("Failed to load album art."),l("linear-gradient(to right, #000, #333)"),i(!0)}}}),[a]),e.useEffect((()=>{const e=setInterval((()=>{const e=(new Date).getTime();p(e/200%360)}),300);return()=>clearInterval(e)}),[]);const d="".concat(c.replace("to right","".concat(u,"deg")));return e.createElement("div",{className:"spotify-player-album-card-wrapper",style:{"--gradient-border":d,opacity:o?1:0}},e.createElement("canvas",{ref:s,style:{display:"none"}}),e.createElement("div",{className:"spotify-player-album-card-container"},e.createElement("div",{className:"spotify-player-album-card-container-border"}),e.createElement("div",{className:"spotify-player-album-card-image-container"},e.createElement("img",{className:"spotify-player-album-card-image",alt:"".concat(r," - ").concat(n),src:a})),e.createElement("div",{className:"spotify-player-album-card-title-container"},e.createElement("div",{className:"spotify-player-album-card-title"},r)),e.createElement("div",{className:"spotify-player-album-card-subtitle"},n)))};var $={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},H=e.createContext&&e.createContext($),I=["attr","size","title"];function A(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},L.apply(this,arguments)}function R(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function D(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?R(Object(r),!0).forEach((function(t){B(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):R(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function B(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(t,"string"))?n:n+"")in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function W(t){return t&&t.map(((t,r)=>e.createElement(t.tag,D({key:r},t.attr),W(t.child))))}function F(t){return r=>e.createElement(U,L({attr:D({},t.attr)},r),W(t.child))}function U(t){var r=r=>{var n,{attr:a,size:o,title:i}=t,c=A(t,I),l=o||r.size||"1em";return r.className&&(n=r.className),t.className&&(n=(n?n+" ":"")+t.className),e.createElement("svg",L({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,a,c,{className:n,style:D(D({color:t.color||r.color},r.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),i&&e.createElement("title",null,i),t.children)};return void 0!==H?e.createElement(H.Consumer,null,(e=>r(e))):r($)}function q(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M336.77 30.56A240 240 0 0 0 137.145 48 240 240 0 0 0 20.162 298.94l142.405-25.665c-6.87-38.47 10.598-78.89 46.42-99.323 25.063-14.296 53.977-15.877 79.228-6.808L336.77 30.56zm52.936 26.914l-80.56 120.245c11.773 7.904 21.943 18.56 29.43 31.683 25.942 45.482 10.03 103.645-35.452 129.588-43.752 24.957-99.236 11.178-126.487-30.395L55.644 388a240 240 0 0 0 319.322 76.943 240 240 0 0 0 89.56-327.382 240 240 0 0 0-74.82-80.086zM290.19 187.387c-22.148-10.942-49.142-11-72.286 2.2-30.09 17.163-44.195 51.33-37.098 83.402 1.637 7.4 4.404 14.687 8.364 21.63 21.123 37.033 68.003 49.86 105.035 28.737s49.858-68.003 28.736-105.035c-7.92-13.887-19.463-24.37-32.75-30.935zm-15.607 33.635a40 40 0 0 1 16.218 15.632 40 40 0 0 1-14.927 54.563 40 40 0 0 1-54.56-14.927 40 40 0 0 1-4.31-11.153 40 40 0 0 1 19.232-43.41 40 40 0 0 1 38.348-.705zm-109.206 63.764L27.33 327.966a240 240 0 0 0 13.3 34.151L170.765 298.3c-2.17-4.418-3.96-8.937-5.388-13.514z"},child:[]}]})(e)}function J(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M73 25v238h366V25H283v16h140v192H89V41h140V25H73zm174 0v16h18V25h-18zM107 59v156h298V59H107zM71.03 281l-43.5 174H484.5L441 281h-29.9l20 96h-99.6l16 64H163.8l20-64H80.93l19.97-96H71.03zm48.27 0l-2.9 14H147l2.3-14h-30zm48.4 0l-2.3 14h30.7l1.7-14h-30.1zm48.2 0l-1.7 14H247v-14h-31.1zm49.1 0v14h32.8l-1.7-14H265zm49.2 0l1.7 14h30.7l-2.3-14h-30.1zm48.5 0l2.3 14h30.6l-2.9-14h-30zm-250 32l-3 14h31.9l2.4-14h-31.3zm49.7 0l-2.4 14h32.1l1.7-14h-31.4zm49.5 0l-1.7 14H247v-14h-35.1zm53.1 0v14h36.8l-1.7-14H265zm53.2 0l1.7 14H352l-2.4-14h-31.4zm49.8 0l2.4 14h31.9l-3-14H368zm-262 32l-2.9 14h33.2l2.3-14H106zm51 0l-2.3 14h33.4l1.7-14H157zm50.9 0l-1.7 14H247v-14h-39.1zm57.1 0v14h40.8l-1.7-14H265zm57.2 0l1.7 14h33.4l-2.3-14h-32.8zm51.2 0l2.3 14h33.2l-2.9-14h-32.6zm-170.8 32l-14.4 46h136.3L313 377H202.6zM28 473v18h456v-18H28z"},child:[]}]})(e)}function Y(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M60.307 17.998A201.117 201.117 0 0 0 55.002 64c0 78.375 45.002 146.35 110.539 179.486-8.783-10.556-16.478-22.658-23.1-35.912-42.318-33.5-69.443-85.327-69.443-143.574 0-15.895 2.035-31.305 5.832-46.002H60.307zm66.644 0c-5.142 14.384-7.949 29.87-7.949 46.002 0 51.245 28.27 95.989 70.031 119.482-6.264-10.227-11.17-21.604-15.023-33.158C151.2 128.657 136.998 98.02 136.998 64c0-16.319 3.275-31.856 9.193-46.002h-19.24zm72.445 0C189.156 30.565 183.002 46.585 183.002 64c0 26.543 14.293 49.845 35.572 62.623-3.806-9.484-6.58-20.417-8.332-32.014-5.84-8.738-9.244-19.259-9.244-30.609 0-11.35 3.403-21.87 9.244-30.61a168.14 168.14 0 0 1 3.053-15.392h-13.899zm99.31 0a168.14 168.14 0 0 1 3.052 15.393c5.84 8.738 9.244 19.259 9.244 30.609 0 11.35-3.403 21.87-9.244 30.61-1.751 11.596-4.526 22.529-8.332 32.013 21.279-12.778 35.572-36.08 35.572-62.623 0-17.415-6.153-33.435-16.394-46.002h-13.899zm67.103 0c5.918 14.146 9.193 29.683 9.193 46.002 0 34.02-14.202 64.657-37.012 86.324-3.852 11.554-8.76 22.93-15.023 33.158C364.728 159.99 392.998 115.245 392.998 64c0-16.132-2.807-31.618-7.95-46.002h-19.24zm67.36 0A183.653 183.653 0 0 1 439.003 64c0 58.247-27.125 110.074-69.443 143.574-6.622 13.254-14.317 25.356-23.1 35.912C411.996 210.35 456.998 142.375 456.998 64c0-15.825-1.837-31.226-5.305-46.002H433.17zM256 40.998c-12.81 0-23.002 10.192-23.002 23.002 0 12.81 10.192 23.002 23.002 23.002 12.81 0 23.002-10.192 23.002-23.002 0-12.81-10.192-23.002-23.002-23.002zm-20.35 58.537L119.398 477.354l17.204 5.292 13.15-42.74L256 415.39l106.248 24.517 13.15 42.74 17.204-5.292L276.35 99.535a40.612 40.612 0 0 1-17.192 5.328l49.654 161.381L256 283.848l-52.813-17.604 49.655-161.38a40.612 40.612 0 0 1-17.192-5.329zM197.893 283.45l29.65 9.885-36.428 12.143 6.778-22.028zm116.214 0l6.778 22.028-36.428-12.143 29.65-9.885zM256 302.82l52.652 17.55L256 339.516l-52.65-19.147L256 302.82zm-73.074 29.275l46.74 16.998-58.518 21.28 11.778-38.278zm146.148 0l11.778 38.277-58.52-21.28 46.742-16.997zM256 358.666l64.354 23.402L256 396.92l-64.355-14.852L256 358.666zm-92.16 35.455l52.144 12.033-60.115 13.873 7.97-25.906zm184.318 0l7.973 25.904-60.113-13.87 52.14-12.034z"},child:[]}]})(e)}function G(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M499.99 176h-59.87l-16.64-41.6C406.38 91.63 365.57 64 319.5 64h-127c-46.06 0-86.88 27.63-103.99 70.4L71.87 176H12.01C4.2 176-1.53 183.34.37 190.91l6 24C7.7 220.25 12.5 224 18.01 224h20.07C24.65 235.73 16 252.78 16 272v48c0 16.12 6.16 30.67 16 41.93V416c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-32h256v32c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32v-54.07c9.84-11.25 16-25.8 16-41.93v-48c0-19.22-8.65-36.27-22.07-48H494c5.51 0 10.31-3.75 11.64-9.09l6-24c1.89-7.57-3.84-14.91-11.65-14.91zm-352.06-17.83c7.29-18.22 24.94-30.17 44.57-30.17h127c19.63 0 37.28 11.95 44.57 30.17L384 208H128l19.93-49.83zM96 319.8c-19.2 0-32-12.76-32-31.9S76.8 256 96 256s48 28.71 48 47.85-28.8 15.95-48 15.95zm320 0c-19.2 0-48 3.19-48-15.95S396.8 256 416 256s32 12.76 32 31.9-12.8 31.9-32 31.9z"},child:[]}]})(e)}function K(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z"},child:[]}]})(e)}function Q(e){return F({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M144 479H48c-26.5 0-48-21.5-48-48V79c0-26.5 21.5-48 48-48h96c26.5 0 48 21.5 48 48v352c0 26.5-21.5 48-48 48zm304-48V79c0-26.5-21.5-48-48-48h-96c-26.5 0-48 21.5-48 48v352c0 26.5 21.5 48 48 48h96c26.5 0 48-21.5 48-48z"},child:[]}]})(e)}function X(e){return F({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"},child:[]}]})(e)}function Z(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zM262.655 90c-54.497 0-89.255 22.957-116.549 63.758-3.536 5.286-2.353 12.415 2.715 16.258l34.699 26.31c5.205 3.947 12.621 3.008 16.665-2.122 17.864-22.658 30.113-35.797 57.303-35.797 20.429 0 45.698 13.148 45.698 32.958 0 14.976-12.363 22.667-32.534 33.976C247.128 238.528 216 254.941 216 296v4c0 6.627 5.373 12 12 12h56c6.627 0 12-5.373 12-12v-1.333c0-28.462 83.186-29.647 83.186-106.667 0-58.002-60.165-102-116.531-102zM256 338c-25.365 0-46 20.635-46 46 0 25.364 20.635 46 46 46s46-20.636 46-46c0-25.365-20.635-46-46-46z"},child:[]}]})(e)}function ee(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M504.971 359.029c9.373 9.373 9.373 24.569 0 33.941l-80 79.984c-15.01 15.01-40.971 4.49-40.971-16.971V416h-58.785a12.004 12.004 0 0 1-8.773-3.812l-70.556-75.596 53.333-57.143L352 336h32v-39.981c0-21.438 25.943-31.998 40.971-16.971l80 79.981zM12 176h84l52.781 56.551 53.333-57.143-70.556-75.596A11.999 11.999 0 0 0 122.785 96H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12zm372 0v39.984c0 21.46 25.961 31.98 40.971 16.971l80-79.984c9.373-9.373 9.373-24.569 0-33.941l-80-79.981C409.943 24.021 384 34.582 384 56.019V96h-58.785a12.004 12.004 0 0 0-8.773 3.812L96 336H12c-6.627 0-12 5.373-12 12v56c0 6.627 5.373 12 12 12h110.785c3.326 0 6.503-1.381 8.773-3.812L352 176h32z"},child:[]}]})(e)}function te(e){return F({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M64 468V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12v176.4l195.5-181C352.1 22.3 384 36.6 384 64v384c0 27.4-31.9 41.7-52.5 24.6L136 292.7V468c0 6.6-5.4 12-12 12H76c-6.6 0-12-5.4-12-12z"},child:[]}]})(e)}function re(e){return F({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M384 44v424c0 6.6-5.4 12-12 12h-48c-6.6 0-12-5.4-12-12V291.6l-195.5 181C95.9 489.7 64 475.4 64 448V64c0-27.4 31.9-41.7 52.5-24.6L312 219.3V44c0-6.6 5.4-12 12-12h48c6.6 0 12 5.4 12 12z"},child:[]}]})(e)}function ne(e){return F({tag:"svg",attr:{viewBox:"0 0 384 512"},child:[{tag:"path",attr:{d:"M215.03 72.04L126.06 161H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V89.02c0-21.47-25.96-31.98-40.97-16.98zm123.2 108.08c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 229.28 336 242.62 336 257c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.87z"},child:[]}]})(e)}function ae(e){return F({tag:"svg",attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zm233.32-51.08c-11.17-7.33-26.18-4.24-33.51 6.95-7.34 11.17-4.22 26.18 6.95 33.51 66.27 43.49 105.82 116.6 105.82 195.58 0 78.98-39.55 152.09-105.82 195.58-11.17 7.32-14.29 22.34-6.95 33.5 7.04 10.71 21.93 14.56 33.51 6.95C528.27 439.58 576 351.33 576 256S528.27 72.43 448.35 19.97zM480 256c0-63.53-32.06-121.94-85.77-156.24-11.19-7.14-26.03-3.82-33.12 7.46s-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256zm-141.77-76.87c-11.58-6.33-26.19-2.16-32.61 9.45-6.39 11.61-2.16 26.2 9.45 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88s-17.54-61.32-45.78-76.86z"},child:[]}]})(e)}const oe={computer:J,tablet:function(e){return F({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M400 0H48C21.5 0 0 21.5 0 48v416c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V48c0-26.5-21.5-48-48-48zM224 480c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm176-108c0 6.6-5.4 12-12 12H60c-6.6 0-12-5.4-12-12V60c0-6.6 5.4-12 12-12h328c6.6 0 12 5.4 12 12v312z"},child:[]}]})(e)},smartphone:function(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M160 32c-16 0-32 16-32 32v384c0 16 16 32 32 32h192c16 0 32-16 32-32V64c0-16-16-32-32-32H160zm21.68 23h96v18h-96V55zM304 55h32v18h-32V55zM154 96h204v320H154V96zm70 342h63.984c16 0 16 16 16 16v6H208v-6s0-16 16-16z"},child:[]}]})(e)},speaker:function(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M275.5 96l-96 96h-96v128h96l96 96V96zm51.46 27.668l-4.66 17.387c52.066 13.95 88.2 61.04 88.2 114.945 0 53.904-36.134 100.994-88.2 114.945l4.66 17.387C386.81 372.295 428.5 317.962 428.5 256c0-61.963-41.69-116.295-101.54-132.332zm-12.425 46.365l-4.658 17.387C340.96 195.748 362.5 223.822 362.5 256s-21.54 60.252-52.623 68.58l4.658 17.387C353.402 331.552 380.5 296.237 380.5 256c0-40.238-27.098-75.552-65.965-85.967zm-12.424 46.363l-4.657 17.387C307.55 236.49 314.5 245.547 314.5 256s-6.95 19.51-17.047 22.217l4.658 17.387c17.884-4.792 30.39-21.09 30.39-39.604 0-18.513-12.506-34.812-30.39-39.604z"},child:[]}]})(e)},tv:function(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M132.992 48.756l-9.984 14.976 77.287 51.524c4.32-4.192 9.542-8.012 15.703-11.162l-83.006-55.338zm246.016 0l-83.006 55.338c6.16 3.15 11.383 6.97 15.703 11.162l77.287-51.524-9.984-14.976zM256 113.244c-22 0-35.334 7.06-43.637 15.363-4.703 4.704-7.58 9.97-9.316 14.637h105.906c-1.736-4.668-4.613-9.933-9.316-14.637-8.303-8.303-21.637-15.363-43.637-15.363zm-191.936 48c-5.044 0-11.106 2.784-15.697 7.37-4.59 4.584-7.367 10.63-7.367 15.63v279h430V184.2c.026-5.457-2.764-11.393-7.227-15.87-4.463-4.477-10.346-7.086-14.826-7.086H64.064zm30.295 23h257.745c10.374 0 20.79 6.818 26.776 16H112c-16 0-32 16-32 32v160c25.924-162.54 145.877-185.697 299.016-191.795 3.106 4.836 4.984 10.315 4.984 15.794v192c0 16-16 32-33.88 32H95.35c-15.35 0-31.35-16-31.35-32v-192c0-16 16-32 30.36-32zm328.663 7c13.7 0 25 11.3 25 25s-11.3 25-25 25-25-11.3-25-25 11.3-25 25-25zm-23.023 144h48v18h-48v-18zm0 32h48v18h-48v-18zm0 32h48v18h-48v-18z"},child:[]}]})(e)},avr:Y,stb:function(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M470.38 1.51L150.41 96A32 32 0 0 0 128 126.51v261.41A139 139 0 0 0 96 384c-53 0-96 28.66-96 64s43 64 96 64 96-28.66 96-64V214.32l256-75v184.61a138.4 138.4 0 0 0-32-3.93c-53 0-96 28.66-96 64s43 64 96 64 96-28.65 96-64V32a32 32 0 0 0-41.62-30.49z"},child:[]}]})(e)},audio_dongle:q,game_console:function(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M155.084 125.945c-.46 0-.926.01-1.397.034-5.646.285-12.097 2.464-20.707 8.204-21.824 14.55-51.912 60.395-67.834 110.005-15.92 49.61-18.046 102.25 5.936 132.966 4.142 5.306 13.387 8.93 23.756 8.846 10.216-.084 20.682-3.838 26.482-9.44 1.022-1.47 9.296-13.336 21.39-27.404 12.863-14.96 28.716-31.686 45.835-38.777 41.863-17.34 93.024-17.34 134.887 0 17.118 7.092 32.97 23.818 45.834 38.778 12.095 14.068 20.37 25.933 21.39 27.404 5.8 5.602 16.267 9.356 26.483 9.44 10.368.085 19.612-3.54 23.755-8.846 23.973-30.704 21.885-83.575 5.978-133.287-15.907-49.713-46.054-95.526-67.783-109.624-11.498-7.46-19.198-8.73-26.285-7.64-7.088 1.093-14.347 5.197-22.866 11.07-17.038 11.746-38.898 30.02-73.952 30.02-35.212 0-57.115-18.514-74.13-30.356-8.505-5.92-15.73-10.025-22.743-11.078-1.315-.198-2.65-.312-4.03-.317zm212.904 48.75a16 16 0 0 1 16 16 16 16 0 0 1-16 16 16 16 0 0 1-16-16 16 16 0 0 1 16-16zM135 183h18v32h32v18h-32v32h-18v-32h-32v-18h32v-32zm200.988 23.695a16 16 0 0 1 16 16 16 16 0 0 1-16 16 16 16 0 0 1-16-16 16 16 0 0 1 16-16zm64 0a16 16 0 0 1 16 16 16 16 0 0 1-16 16 16 16 0 0 1-16-16 16 16 0 0 1 16-16zm-32 32a16 16 0 0 1 16 16 16 16 0 0 1-16 16 16 16 0 0 1-16-16 16 16 0 0 1 16-16zm-160 7h32v18h-32v-18zm64 0h27.897v18h-27.897v-18z"},child:[]}]})(e)},cast_video:function(e){return F({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M447.8,64H64c-23.6,0-42.7,19.1-42.7,42.7v63.9H64v-63.9h383.8v298.6H298.6V448H448c23.6,0,42.7-19.1,42.7-42.7V106.7 C490.7,83.1,471.4,64,447.8,64z M21.3,383.6L21.3,383.6l0,63.9h63.9C85.2,412.2,56.6,383.6,21.3,383.6L21.3,383.6z M21.3,298.6V341 c58.9,0,106.6,48.1,106.6,107h42.7C170.7,365.6,103.7,298.7,21.3,298.6z M213.4,448h42.7c-0.5-129.5-105.3-234.3-234.8-234.6l0,42.4 C127.3,255.6,213.3,342,213.4,448z"},child:[]}]})(e)},cast_audio:q,automobile:G,smartwatch:function(e){return F({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z",opacity:".1"},child:[]},{tag:"path",attr:{d:"M20 12c0-2.54-1.19-4.81-3.04-6.27L16 0H8l-.95 5.73C5.19 7.19 4 9.45 4 12s1.19 4.81 3.05 6.27L8 24h8l.96-5.73A7.976 7.976 0 0 0 20 12zM6 12c0-3.31 2.69-6 6-6s6 2.69 6 6-2.69 6-6 6-6-2.69-6-6z"},child:[]}]})(e)},chromebook:J,car_thing:G,observer:Z,home_thing:Y},ie=t=>{let{isConnected:r,deviceName:n,isPlaying:a,deviceType:o}=t;const i=null==o?void 0:o.toLowerCase(),c=oe[i]||Z;return e.createElement("div",{className:"spotify-player-device-title"},r?e.createElement(c,{className:a?"spotify-player-connected-icon rotating":"spotify-player-connected-icon"}):e.createElement(K,{className:"spotify-player-connected-icon disconnected"}),e.createElement("h4",null,n))},ce=t=>{var r;let{track:n,formatReleaseDate:a}=t;return e.createElement("div",{className:"spotify-player-track-details"},e.createElement("table",{className:"spotify-player-track-details-table"},e.createElement("tbody",null,e.createElement("tr",{className:"spotify-player-track-details-row"},e.createElement("td",{className:"track-details-cell key-cell"},"Title"),e.createElement("td",{className:"track-details-cell value-cell"},(null==n?void 0:n.name)||"N/A")),e.createElement("tr",{className:"spotify-player-track-details-row"},e.createElement("td",{className:"track-details-cell key-cell"},"Artist"),e.createElement("td",{className:"track-details-cell value-cell"},(null==n||null===(r=n.artist_names)||void 0===r?void 0:r.join(", "))||"N/A")),e.createElement("tr",{className:"spotify-player-track-details-row"},e.createElement("td",{className:"track-details-cell key-cell"},"Released"),e.createElement("td",{className:"track-details-cell value-cell"},null!=n&&n.release_date?a(n.release_date):"N/A")))))},le=t=>{let{isPlaying:r,handlePlayPause:n,handleNextTrack:a,handlePreviousTrack:o,shuffleContext:i,toggleShuffle:c,track:l,currentPosition:s,handleSeek:u,handleVolumeChange:p,volume:d,maxVolume:f}=t;return e.createElement("div",{className:"spotify-player-controls-container"},e.createElement("div",{className:"spotify-player-playback-controls"},e.createElement("button",{onClick:o,className:"spotify-player-control-button"},e.createElement(te,null)),e.createElement("button",{onClick:n,className:"spotify-player-control-button"},r?e.createElement(Q,null):e.createElement(X,null)),e.createElement("button",{onClick:a,className:"spotify-player-control-button"},e.createElement(re,null)),i?e.createElement("div",{className:"spotify-player-toggle-container on",onClick:c},e.createElement("div",{className:"spotify-player-toggle-track-text"},"ON"),e.createElement("div",{className:"spotify-player-toggle-thumb"},e.createElement(ee,{className:"spotify-player-toggle-thumb-icon"}))):e.createElement("div",{className:"spotify-player-toggle-container off",onClick:c},e.createElement("div",{className:"spotify-player-toggle-thumb"},e.createElement(ee,{className:"spotify-player-toggle-thumb-icon"})),e.createElement("div",{className:"spotify-player-toggle-track-text"},"OFF"))),l&&e.createElement("div",{className:"spotify-player-seek-container"},e.createElement("span",null,Math.floor(s/1e3),"s"),e.createElement("input",{type:"range",min:"0",max:"100",value:s/l.duration*100,onChange:u,className:"spotify-player-seek-bar"}),e.createElement("span",null,Math.floor(l.duration/1e3),"s")),e.createElement("div",{className:"spotify-player-volume-control"},e.createElement("span",null,e.createElement(ne,null)),e.createElement("input",{type:"range",min:"0",max:"100",value:d/f*100,onChange:p,className:"spotify-player-volume-slider"}),e.createElement("span",null,e.createElement(ae,null))))},se=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{const n=await fetch(e,t);return n.ok?n:(console.error("API call failed: ".concat(n.status," ").concat(n.statusText)),r)}catch(e){return console.error("Error in API call:",e),r}};let ue="";const pe=async e=>{ue!==e&&(ue=e);return(await se("".concat(ue,"/status"),{},{})).json()},de=async()=>await se("".concat(ue,"/player/resume"),{method:"POST"}),fe=async()=>await se("".concat(ue,"/player/pause"),{method:"POST"}),ye=async()=>await se("".concat(ue,"/player/prev"),{method:"POST"}),me=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return await se("".concat(ue,"/player/seek"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({position:e,relative:t})})},he=async function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return await se("".concat(ue,"/player/volume"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({volume:e,relative:t})})},be=async e=>await se("".concat(ue,"/player/shuffle_context"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({shuffle_context:e})});document.head.appendChild(document.createElement("style")).textContent=".spotify-player-spotify-card{display:flex;flex-direction:column;gap:0.8em;background-color:var(--darker);transition:all 0.3s ease;margin:0 auto;border:1px solid var(--dark);border-radius:0.3em;position:relative;padding:1.2em;z-index:1;overflow:visible;box-shadow:rgba(40,44,52,0.5) 2px 4px 6px 2px;}.spotify-player-spotify-card:hover{box-shadow:0 12px 24px rgba(0,0,0,0.3);z-index:3;position:relative;}.spotify-player-info-container{display:flex;gap:1.2em;align-items:center;justify-content:center;transition:width 0.3s ease,height 0.3s ease,filter 0.3s ease,z-index 0s;width:100%;}.spotify-player-spotify-details{display:flex;flex-direction:column;width:100%;transition:width 0.3s ease,height 0.3s ease,filter 0.3s ease,z-index 0s;white-space:nowrap;}.spotify-player-spotify-details:hover{white-space:unset;}.spotify-player-device-title{display:flex;flex-direction:row;gap:1em;text-align:center;background-color:var(--dark);width:100%;transition:width 0.3s ease,height 0.3s ease,filter 0.3s ease,z-index 0s;justify-content:center;box-shadow:0 0 10px rgba(0,0,0,0.5);align-items:center;padding:0.5em;padding-left:0.3em;padding-right:0.3em;border-radius:0.2em;margin:0;margin-bottom:0.5em;}.spotify-player-device-title h4{font-weight:bold;text-align:center;font-size:1.5rem;color:var(--weird);text-align:center;margin:20px 0;transition:transform 0.2s,color 0.3s ease;}.spotify-player-device-title:hover h4{transform:scale(1.1);color:var(--yellow);}.spotify-player-controls-container{display:flex;flex-direction:column;gap:1em;text-align:center;width:100%;margin-top:1em;transition:width 0.3s ease,height 0.3s ease,filter 0.3s ease,z-index 0s;justify-content:center;align-items:center;}.spotify-player-track-details{flex:1;margin-top:0.5em;background-color:var(--darkest);padding:0.3em;border-radius:0.5em;border:1px solid var(--grey);box-shadow:inset 0 0 5px rgba(0,0,0,0.5);}.spotify-player-track-details-table{width:100%;border-collapse:collapse;table-layout:fixed;}.spotify-player-track-details-row{display:flex;justify-content:space-between;padding:0.1em 0;}.spotify-player-track-details-cell{padding:0.1em;word-wrap:break-word;overflow:hidden;text-overflow:ellipsis;font-size:0.8em;}.spotify-player-key-cell{font-weight:bold;color:var(--lightest);flex-basis:30%;}.spotify-player-value-cell{flex-basis:70%;color:var(--lightest);user-select:text;}@media (max-width:500px){.spotify-player-info-container{flex-direction:column-reverse;}.spotify-player-track-info{flex-direction:column;}.spotify-player-album-cover{max-width:100%;}.spotify-player-seek-container{width:100%;padding:0 1rem;}.spotify-player-volume-control{width:100%;padding:0 1rem;}}.spotify-player-track-info{display:flex;align-items:center;margin:0.4em;gap:1.5rem;}.spotify-player-album-cover{width:120px;height:120px;border-radius:0.4em;}.spotify-player-seek-container{display:flex;align-items:center;gap:1rem;width:100%;margin:0.4em;max-width:500px;}.spotify-player-seek-container span{flex:1;justify-content:center;align-items:center;display:flex;}.spotify-player-seek-bar{-webkit-appearance:none;flex:4;height:8px;border-radius:0.4em;background-color:var(--blue);transition:background 0.3s ease;}.spotify-player-seek-bar:hover{background:var(--cyan);cursor:pointer;}.spotify-player-seek-bar::-webkit-slider-runnable-track{-webkit-appearance:none;appearance:none;border-radius:0.4em;background:var(--lighter);height:18px;}.spotify-player-seek-bar::-webkit-slider-runnable-track:hover{background:var(--lightest);cursor:pointer;}.spotify-player-seek-bar::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:24px;border-radius:0.4em;background:var(--grey);cursor:pointer;position:relative;top:-3px;transition:all 0.2s ease;}.spotify-player-seek-bar::-webkit-slider-thumb:hover{background:var(--blue);transform:scale(1.2);}.spotify-player-playback-controls{display:flex;align-items:center;justify-content:space-between;background:var(--button-background);border-radius:0.4em;padding-left:0.4em;padding-right:0.4em;max-width:500px;}.spotify-player-control-button{font-family:'Roboto',sans-serif;text-decoration:none;outline:none;border:none;transition:all 0.3s ease;flex:1;display:flex;align-items:center;justify-content:center;height:36px;width:36px;font-size:1.5rem;background:var(--button-background);border-radius:0.4em;cursor:pointer;}.spotify-player-control-button:hover{transform:scale(1.1);box-shadow:0 5px 15px rgba(0,0,0,0.2);background:var(--button-hover-background);}.spotify-player-volume-control{display:flex;flex:3;align-items:center;gap:1rem;width:100%;margin:0.4em;max-width:500px;}.spotify-player-volume-control span{flex:1;justify-content:center;align-items:center;display:flex;}.spotify-player-volume-slider{-webkit-appearance:none;flex:4;height:8px;border-radius:0.4em;background:var(--green);transition:background 0.3s ease;}.spotify-player-volume-slider:hover{background:var(--cyan);cursor:pointer;}.spotify-player-volume-slider::-webkit-slider-runnable-track{-webkit-appearance:none;appearance:none;border-radius:0.4em;background:var(--lighter);height:18px;}.spotify-player-volume-slider::-webkit-slider-runnable-track:hover{background:var(--lightest);cursor:pointer;}.spotify-player-volume-slider::-webkit-slider-runnable-track:hover{background:var(--lightest);cursor:pointer;}.spotify-player-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:18px;height:24px;border-radius:0.4em;background:var(--grey);position:relative;top:-3px;cursor:pointer;transition:all 0.2s ease;}.spotify-player-volume-slider::-webkit-slider-thumb:hover{background:var(--blue);transform:scale(1.2);}.spotify-player-toggle-container{display:flex;align-items:center;justify-content:space-between;padding-left:0.5em;padding-right:0.5em;width:90px;height:36px;border-radius:0.4em;background:var(--darker);position:relative;cursor:pointer;transition:all 0.3s ease;margin:0.4em;}.spotify-player-toggle-container:hover{transform:scale(1.1);}.spotify-player-toggle-container.on{background:var(--blue);}.spotify-player-toggle-container.off{background:var(--darkest);}.spotify-player-toggle-track-text{flex:1;font-size:0.85rem;font-weight:bold;color:var(--text-color);padding:0 8px;text-align:center;user-select:none;}.spotify-player-toggle-thumb{top:4px;width:28px;height:28px;border-radius:0.4em;background:var(--light);display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0,0,0,0.3);flex:1;}.spotify-player-toggle-thumb-icon{font-size:1rem;color:var(--darker);}.spotify-player-connected-icon{font-size:2rem;color:var(--blue);}.spotify-player-connected-icon.disconnected{color:var(--red);}.spotify-player-connected-icon.rotating{animation:spin 2s linear infinite;}@keyframes spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}@media (min-width:900px){.spotify-player-spotify-details{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:1em;}.spotify-player-details-container{flex:2;display:flex;flex-direction:column;gap:0.5em;}.spotify-player-controls-container{flex:1;max-width:300px;margin-top:0;}}";const ge=t=>{let{websocketUrl:r=process.env.REACT_APP_WS_URL||"ws://localhost:3678/events",apiBaseUrl:n="http://apollo:3678",hideOnDisconnect:a=!1}=t;const[o,i]=e.useState(null),[c,l]=e.useState(null),[s,u]=e.useState(0),[p,d]=e.useState(100),[f,y]=e.useState(!1),[m,h]=e.useState(!1),[b,g]=e.useState(0),v=e.useRef(null),{isConnected:x,error:w}=((t,r)=>{const[n,a]=e.useState({isConnected:!1,error:null}),o=e.useRef(0),i=e.useRef(null),c=e.useRef(null),l=()=>{if(o.current>10)return a({isConnected:!1,error:"Max reconnection attempts reached."}),void console.warn("Max WebSocket reconnection attempts reached.");if(i.current)return void console.warn("WebSocket instance already exists. Skipping connect.");console.log("Connecting to WebSocket at ".concat(t," (Retry: ").concat(o.current,")"));const e=new WebSocket(t);i.current=e,e.onopen=()=>{console.log("WebSocket connected successfully."),a({isConnected:!0,error:null}),o.current=0},e.onmessage=e=>{try{const t=JSON.parse(e.data);r&&r(t)}catch(e){console.error("Failed to parse WebSocket message:",e)}},e.onerror=e=>{console.error("WebSocket encountered an error:",e.message||e),a((t=>_(_({},t),{},{error:e.message||"WebSocket encountered an error"})))},e.onclose=e=>{if(console.warn("WebSocket closed (code: ".concat(e.code,", reason: ").concat(e.reason||"none",")")),1e3===e.code)return console.log("WebSocket closed normally."),a({isConnected:!1,error:null}),void(i.current=null);a({isConnected:!1,error:e.reason||"Connection closed"}),i.current=null;const t=Math.min(1e3*2**o.current,3e4);console.log("Reconnecting in ".concat(t/1e3," seconds...")),c.current=setTimeout((()=>{o.current+=1,l()}),t)}};return e.useEffect((()=>(l(),()=>{c.current&&clearTimeout(c.current),i.current&&(console.log("Closing WebSocket due to component unmount."),i.current.close(1e3,"Component unmounted"),i.current=null)})),[t]),n})(r,(e=>{switch(e.type){case"metadata":l(e.data),g(0);break;case"playing":y(!0);break;case"paused":y(!1);break;case"seek":g(e.data.position);break;case"volume":u(e.data.value);break;case"shuffle_context":h(e.data.value)}}));e.useEffect((()=>{(async()=>{var e;const t=await pe(n);i(t),l(t.track),u(t.volume),d(t.volume_steps),y(!t.paused),h(t.shuffle_context),g((null===(e=t.track)||void 0===e?void 0:e.position)||0)})()}),[n]),e.useEffect((()=>(f&&c?v.current=setInterval((()=>{g((e=>{const t=e+1e3;return t<c.duration?t:c.duration}))}),1e3):clearInterval(v.current),()=>clearInterval(v.current))),[f,c]);if(!a||x)return e.createElement("div",{className:"spotify-player-spotify-card"},e.createElement("div",{className:"spotify-player-info-container"},e.createElement(V,{title:(null==c?void 0:c.album_name)||"N/A",subtitle:"Disc ".concat((null==c?void 0:c.disc_number)||"N/A",", Track ").concat((null==c?void 0:c.track_number)||"N/A"),image:null==c?void 0:c.album_cover_url}),e.createElement("div",{className:"spotify-player-spotify-details"},e.createElement("div",{className:"spotify-player-details-container"},e.createElement(ie,{isConnected:x,deviceName:null==o?void 0:o.device_name,deviceType:null==o?void 0:o.device_type,isPlaying:f}),e.createElement(ce,{track:c,formatReleaseDate:e=>{const t=e.match(/year:\s*(\d+)\s*month:\s*(\d+)\s*day:\s*(\d+)/);if(t){const e=t[1],r=t[2].padStart(2,"0"),n=t[3].padStart(2,"0");return"".concat(e,"-").concat(r,"-").concat(n)}return"Invalid Date"}})),e.createElement(le,{isPlaying:f,handlePlayPause:()=>{f?fe():de(),y(!f)},handleNextTrack:()=>{c&&(me(c.duration-50),g(c.duration-50))},handlePreviousTrack:ye,shuffleContext:m,toggleShuffle:()=>{be(!m),h(!m)},track:c,currentPosition:b,handleSeek:e=>{const t=e.target.value/100*c.duration;me(Math.floor(t)),g(t)},volume:s,maxVolume:p,handleVolumeChange:e=>{const t=e.target.value/100*p;he(Math.round(t)),u(Math.round(t))}}))),w&&e.createElement("span",{className:"error"},"Error: ",w))};ge.propTypes={websocketUrl:P.string,apiBaseUrl:P.string,hideOnDisconnect:P.bool},document.head.appendChild(document.createElement("style")).textContent=":root{--red:#f7768e;--orange:#ff9e64;--yellow:#e0af68;--weird:#cfc9c2;--green:#73daca;--cyan:#7dcfff;--blue:#7aa2f7;--magenta:#bb9af7;--lightest:#c0caf5;--lighter:#a9b1d6;--light:#9aa5ce;--grey:#565f89;--dark:#414868;--darker:#24283b;--darkest:#1a1b26;--body-background-color:var(--darkest);--section-background:var(--darker);--button-background:var(--grey);--button-border:var(--dark);--button-text-color:var(--lightest);--button-hover-background:var(--dark);--visitor-counter-background:var(--dark);--text-color:var(--lightest);--heading-color:var(--lightest);--heading-color-alt:var(--lighter);--scrollbar-track-color:var(--darker);--scrollbar-thumb-color:var(--grey);--scrollbar-thumb-hover-color:var(--blue);--accent-color:var(--yellow);--link-color:var(--cyan);--link-hover-color:var(--magenta);--subtext-color:var(--light);--description-color:var(--grey);--scroll-factor:0.2;}*{margin:0;padding:0;box-sizing:border-box;}#root{overflow-x:hidden;overflow-y:hidden;font-family:'Roboto',sans-serif;background:var(--body-background-color);color:var(--text-color);overflow-x:hidden;overflow-y:hidden;padding:0;margin:0;width:100%;height:100%;}",module.exports=ge;
15
+ //# sourceMappingURL=index.cjs.js.map