diff --git a/public/js/bundle.js b/public/js/bundle.js index 4398fac..26497ec 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -2504,10 +2504,10 @@ a { .table--charts .clickable:hover { text-decoration: underline; } -`;styleInject(css_248z$2);class CustomSocket extends WebSocket{constructor(a){super(a);this.listeners={}}emit(a,n){if(this.readyState!==WebSocket.OPEN)return!1;this.send(JSON.stringify({key:a,data:n}))}on(a,n){Object.keys(this.listeners).includes(a)||(console.log("on:",a),this.listeners[a]=n,this.addEventListener("message",r=>{const i=JSON.parse(r.data);i.key===a&&n(i.data)}))}off(a){Object.keys(this.listeners).includes(a)&&(console.log("off:",a),this.removeEventListener("message",this.listeners[a]),delete this.listeners[a])}}const socket=new CustomSocket("ws://"+location.host+"/");var __vue_render__$w=function(e,a){var n=a._c;return n("div",{directives:[{name:"show",rawName:"v-show",value:!a.props.hidden,expression:"!props.hidden"}],staticClass:"flex justify-center items-center flex-col flex-1 h-full",class:a.props.additionalClasses},[n("span",{staticClass:"mb-5"},[a._v(a._s(a.props.text||"Loading..."))]),a._v(" "),a._m(0)])},__vue_staticRenderFns__$w=[function(e,a){var n=a._c;return n("div",{staticClass:"lds-ring"},[n("div"),a._v(" "),n("div"),a._v(" "),n("div"),a._v(" "),n("div")])}];const __vue_inject_styles__$w=function(e){!e||e("data-v-4e4e821e_0",{source:".lds-ring[data-v-4e4e821e]{display:inline-block;position:relative;width:80px;height:80px}.lds-ring div[data-v-4e4e821e]{box-sizing:border-box;display:block;position:absolute;width:64px;height:64px;margin:8px;border:8px solid #fff;border-radius:50%;animation:lds-ring-data-v-4e4e821e 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.lds-ring div[data-v-4e4e821e]:nth-child(1){animation-delay:-.45s}.lds-ring div[data-v-4e4e821e]:nth-child(2){animation-delay:-.3s}.lds-ring div[data-v-4e4e821e]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-data-v-4e4e821e{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}",map:void 0,media:void 0})},__vue_scope_id__$w="data-v-4e4e821e",__vue_module_identifier__$d=void 0,__vue_is_functional_template__$w=!0;function __vue_normalize__$w(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="BaseLoadingPlaceholder.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$d(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$d.styles||(__vue_create_injector__$d.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` +`;styleInject(css_248z$2);class CustomSocket extends WebSocket{constructor(a){super(a);this.listeners={}}emit(a,n){if(this.readyState!==WebSocket.OPEN)return!1;this.send(JSON.stringify({key:a,data:n}))}on(a,n){Object.keys(this.listeners).includes(a)||(this.listeners[a]=n,this.addEventListener("message",r=>{const i=JSON.parse(r.data);i.key===a&&n(i.data)}))}off(a){Object.keys(this.listeners).includes(a)&&(this.removeEventListener("message",this.listeners[a]),delete this.listeners[a])}}const socket=new CustomSocket("ws://"+location.host+"/");var __vue_render__$w=function(e,a){var n=a._c;return n("div",{directives:[{name:"show",rawName:"v-show",value:!a.props.hidden,expression:"!props.hidden"}],staticClass:"flex justify-center items-center flex-col flex-1 h-full",class:a.props.additionalClasses},[n("span",{staticClass:"mb-5"},[a._v(a._s(a.props.text||"Loading..."))]),a._v(" "),a._m(0)])},__vue_staticRenderFns__$w=[function(e,a){var n=a._c;return n("div",{staticClass:"lds-ring"},[n("div"),a._v(" "),n("div"),a._v(" "),n("div"),a._v(" "),n("div")])}];const __vue_inject_styles__$w=function(e){!e||e("data-v-4e4e821e_0",{source:".lds-ring[data-v-4e4e821e]{display:inline-block;position:relative;width:80px;height:80px}.lds-ring div[data-v-4e4e821e]{box-sizing:border-box;display:block;position:absolute;width:64px;height:64px;margin:8px;border:8px solid #fff;border-radius:50%;animation:lds-ring-data-v-4e4e821e 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:#fff transparent transparent transparent}.lds-ring div[data-v-4e4e821e]:nth-child(1){animation-delay:-.45s}.lds-ring div[data-v-4e4e821e]:nth-child(2){animation-delay:-.3s}.lds-ring div[data-v-4e4e821e]:nth-child(3){animation-delay:-.15s}@keyframes lds-ring-data-v-4e4e821e{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}",map:void 0,media:void 0})},__vue_scope_id__$w="data-v-4e4e821e",__vue_module_identifier__$d=void 0,__vue_is_functional_template__$w=!0;function __vue_normalize__$w(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="BaseLoadingPlaceholder.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$d(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$d.styles||(__vue_create_injector__$d.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` -`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var BaseLoadingPlaceholder=__vue_normalize__$w({render:__vue_render__$w,staticRenderFns:__vue_staticRenderFns__$w},__vue_inject_styles__$w,{},__vue_scope_id__$w,__vue_is_functional_template__$w,__vue_module_identifier__$d,__vue_create_injector__$d);function fetchData(e,a={},n="GET"){const r=new URL(`${window.location.origin}/api/${e}`);return Object.keys(a).forEach(i=>{r.searchParams.append(i,a[i])}),fetch(r.href,{method:n}).then(i=>i.json()).catch(i=>(console.error("There has been a problem with your fetch operation:",i),Promise.reject(i)))}const postToServer=(e,a)=>{const n=new URL(`${window.location.origin}/api/${e}`);return fetch(n,{body:JSON.stringify(a),headers:{"Content-Type":"application/json"},method:"POST"}).then(r=>{if(!r.ok)throw new Error("Network response was not ok");return r.json()}).catch(r=>{console.error("There has been a problem with your fetch operation:",r)})};function sendAddToQueue(e,a=null){if(!e)throw new Error("No URL given to sendAddToQueue function!");fetchData("addToQueue",{url:e,bitrate:a},"POST")}function aggregateDownloadLinks(e){const a=[];return e.forEach(n=>{a.push(n.link)}),a.join(";")}function generatePath(e){if(!e)throw new Error("No element passed to the generatePath function!");const a=[e];for(;(e=e.parentNode)&&e!==document;)a.push(e);return a}function isValidURL(e){const a=e.toLowerCase();if(a.startsWith("http")){if(a.includes("deezer.com")||a.includes("deezer.page.link")||a.includes("open.spotify.com")||a.includes("link.tospotify.com"))return!0}else if(a.startsWith("spotify:"))return!0;return!1}function convertDuration(e){let a,n;return a=Math.floor(e/60),n=e-a*60,n<10&&(n="0"+n),a+":"+n}function convertDurationSeparated(e){let a,n,r;return n=Math.floor(e/60),a=Math.floor(n/60),r=e-n*60,n-=a*60,[a,n,r]}function numberWithDots(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function debounce$1(e,a,n){let r;return function(){const i=this,s=arguments,l=function(){r=null,n||e.apply(i,s)},c=n&&!r;clearTimeout(r),r=setTimeout(l,a),c&&e.apply(i,s)}}function copyToClipboard(e){const a=document.createElement("input");document.body.appendChild(a),a.setAttribute("type","text"),a.setAttribute("value",e),a.select(),a.setSelectionRange(0,99999),document.execCommand("copy"),a.remove()}function getPropertyWithFallback(e,...a){for(const n of a){const i=/\./.test(n)?n.split(".").reduce((s,l)=>{if(s)return s[l]},e):e[n];if(typeof i!="undefined")return i}return null}var Utils={isValidURL,convertDuration,convertDurationSeparated,numberWithDots,debounce:debounce$1};const downloadQualities=[{objName:"flac",label:"FLAC",value:9},{objName:"320kbps",label:"MP3 320kbps",value:3},{objName:"128kbps",label:"MP3 128kbps",value:1},{objName:"realityAudioHQ",label:"360 Reality Audio [HQ]",value:15},{objName:"realityAudioMQ",label:"360 Reality Audio [MQ]",value:14},{objName:"realityAudioLQ",label:"360 Reality Audio [LQ]",value:13}];var script$u={data(){return{menuOpen:!1,xPos:0,yPos:0,deezerHref:"",generalHref:"",imgSrc:""}},computed:{options(){const e={cut:{label:this.$t("globals.cut"),show:!1,position:1,action:()=>{document.execCommand("Cut")}},copy:{label:this.$t("globals.copy"),show:!1,position:2,action:()=>{document.execCommand("Copy")}},copyLink:{label:this.$t("globals.copyLink"),show:!1,position:3,action:()=>{copyToClipboard(this.generalHref)}},copyImageLink:{label:this.$t("globals.copyImageLink"),show:!1,position:4,action:()=>{copyToClipboard(this.imgSrc)}},copyDeezerLink:{label:this.$t("globals.copyDeezerLink"),show:!1,position:5,action:()=>{copyToClipboard(this.deezerHref)}},paste:{label:this.$t("globals.paste"),show:!1,position:6,action:()=>{clipboard in navigator?navigator.clipboard.readText().then(n=>{document.execCommand("insertText",void 0,n)}):document.execCommand("paste")}}},a=Object.values(e).length+1;return downloadQualities.forEach((n,r)=>{e[n.objName]={label:`${this.$t("globals.download",{thing:n.label})}`,show:!1,position:a+r,action:sendAddToQueue.bind(null,this.deezerHref,n.value)}}),e},sortedOptions(){return Object.values(this.options).sort((e,a)=>e.position{this.menuOpen=!1,this.options.copyLink.show=!1,this.options.copyDeezerLink.show=!1,this.options.copyImageLink.show=!1,downloadQualities.forEach(e=>{this.options[e.objName].show=!1})}).catch(e=>{console.error(e)})},positionMenu(e,a){this.xPos=`${e}px`,this.yPos=`${a}px`,this.$nextTick().then(()=>{const{innerHeight:n,innerWidth:r}=window,i=e+this.$refs.contextMenu.getBoundingClientRect().width,s=a+this.$refs.contextMenu.getBoundingClientRect().height;if(i>r){const l=i-r+15;this.xPos=`${e-l}px`}if(s>n){const l=s-n+15;this.yPos=`${a-l}px`}})},showDeezerOptions(e){e||(this.options.copyDeezerLink.show=!0),downloadQualities.forEach(a=>{this.options[a.objName].show=!0})}}};const __vue_script__$u=script$u;var __vue_render__$v=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.menuOpen,expression:"menuOpen"}],ref:"contextMenu",staticClass:"context-menu",style:{top:e.yPos,left:e.xPos}},e._l(e.sortedOptions,function(r){return n("button",{directives:[{name:"show",rawName:"v-show",value:r.show,expression:"option.show"}],key:r.label,staticClass:"btn menu-option",on:{click:function(i){return i.preventDefault(),r.action(i)}}},[n("span",{staticClass:"menu-option__text"},[e._v(e._s(r.label))])])}),0)},__vue_staticRenderFns__$v=[];const __vue_inject_styles__$v=function(e){!e||e("data-v-4fdee10f_0",{source:".context-menu[data-v-4fdee10f]{position:absolute;top:0;left:0;min-width:100px;border-radius:7px;background:var(--secondary-background);box-shadow:4px 10px 18px 0 rgba(0,0,0,.15);overflow:hidden;z-index:10000}.menu-option[data-v-4fdee10f]{display:flex;align-items:center;width:100%;height:40px;padding-left:10px;padding-right:10px;color:var(--foreground);cursor:pointer}.menu-option[data-v-4fdee10f]:hover{background:var(--table-highlight);filter:brightness(150%)}.menu-option__text[data-v-4fdee10f]{text-transform:capitalize}button[data-v-4fdee10f]{color:var(--primary-text);color:unset;background-color:var(--primary-color);background-color:unset;min-width:unset;position:unset;border:unset;border-radius:unset;font-family:unset;font-weight:unset;font-size:unset;padding:unset;margin-right:unset;height:unset;text-transform:unset;cursor:unset;transition:unset}button[data-v-4fdee10f]:focus{outline:0}button[data-v-4fdee10f]:active{background-color:unset;transform:unset}button[data-v-4fdee10f]:hover{background:unset;border:unset}",map:void 0,media:void 0})},__vue_scope_id__$v="data-v-4fdee10f",__vue_module_identifier__$c=void 0,__vue_is_functional_template__$v=!1;function __vue_normalize__$v(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheContextMenu.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$c(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$c.styles||(__vue_create_injector__$c.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` +`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var BaseLoadingPlaceholder=__vue_normalize__$w({render:__vue_render__$w,staticRenderFns:__vue_staticRenderFns__$w},__vue_inject_styles__$w,{},__vue_scope_id__$w,__vue_is_functional_template__$w,__vue_module_identifier__$d,__vue_create_injector__$d);function fetchData(e,a={},n="GET"){const r=new URL(`${window.location.origin}/api/${e}`);return Object.keys(a).forEach(i=>{r.searchParams.append(i,a[i])}),fetch(r.href,{method:n}).then(i=>i.json()).catch(i=>(console.error("There has been a problem with your fetch operation:",i),Promise.reject(i)))}const postToServer=(e,a)=>{const n=new URL(`${window.location.origin}/api/${e}`);return fetch(n,{body:JSON.stringify(a),headers:{"Content-Type":"application/json"},method:"POST"}).then(r=>{if(!r.ok)throw new Error("Network response was not ok");return r.json()}).catch(r=>{console.error("There has been a problem with your fetch operation:",r)})};function sendAddToQueue(e,a=null){if(!e)throw new Error("No URL given to sendAddToQueue function!");fetchData("addToQueue",{url:e,bitrate:a},"POST")}function aggregateDownloadLinks(e){const a=[];return e.forEach(n=>{a.push(n.link)}),a.join(";")}function generatePath(e){if(!e)throw new Error("No element passed to the generatePath function!");const a=[e];for(;(e=e.parentNode)&&e!==document;)a.push(e);return a}function isValidURL(e){const a=e.toLowerCase();if(a.startsWith("http")){if(a.includes("deezer.com")||a.includes("deezer.page.link")||a.includes("open.spotify.com")||a.includes("link.tospotify.com"))return!0}else if(a.startsWith("spotify:"))return!0;return!1}function convertDuration(e){let a,n;return a=Math.floor(e/60),n=e-a*60,n<10&&(n="0"+n),a+":"+n}function convertDurationSeparated(e){let a,n,r;return n=Math.floor(e/60),a=Math.floor(n/60),r=e-n*60,n-=a*60,[a,n,r]}function numberWithDots(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function debounce$1(e,a,n){let r;return function(){const i=this,s=arguments,l=function(){r=null,n||e.apply(i,s)},c=n&&!r;clearTimeout(r),r=setTimeout(l,a),c&&e.apply(i,s)}}function copyToClipboard(e){const a=document.createElement("input");document.body.appendChild(a),a.setAttribute("type","text"),a.setAttribute("value",e),a.select(),a.setSelectionRange(0,99999),document.execCommand("copy"),a.remove()}function getPropertyWithFallback(e,...a){for(const n of a){const i=/\./.test(n)?n.split(".").reduce((s,l)=>{if(s)return s[l]},e):e[n];if(typeof i!="undefined")return i}return null}var Utils={isValidURL,convertDuration,convertDurationSeparated,numberWithDots,debounce:debounce$1};const downloadQualities=[{objName:"flac",label:"FLAC",value:9},{objName:"320kbps",label:"MP3 320kbps",value:3},{objName:"128kbps",label:"MP3 128kbps",value:1},{objName:"realityAudioHQ",label:"360 Reality Audio [HQ]",value:15},{objName:"realityAudioMQ",label:"360 Reality Audio [MQ]",value:14},{objName:"realityAudioLQ",label:"360 Reality Audio [LQ]",value:13}];var script$u={data(){return{menuOpen:!1,xPos:0,yPos:0,deezerHref:"",generalHref:"",imgSrc:""}},computed:{options(){const e={cut:{label:this.$t("globals.cut"),show:!1,position:1,action:()=>{document.execCommand("Cut")}},copy:{label:this.$t("globals.copy"),show:!1,position:2,action:()=>{document.execCommand("Copy")}},copyLink:{label:this.$t("globals.copyLink"),show:!1,position:3,action:()=>{copyToClipboard(this.generalHref)}},copyImageLink:{label:this.$t("globals.copyImageLink"),show:!1,position:4,action:()=>{copyToClipboard(this.imgSrc)}},copyDeezerLink:{label:this.$t("globals.copyDeezerLink"),show:!1,position:5,action:()=>{copyToClipboard(this.deezerHref)}},paste:{label:this.$t("globals.paste"),show:!1,position:6,action:()=>{clipboard in navigator?navigator.clipboard.readText().then(n=>{document.execCommand("insertText",void 0,n)}):document.execCommand("paste")}}},a=Object.values(e).length+1;return downloadQualities.forEach((n,r)=>{e[n.objName]={label:`${this.$t("globals.download",{thing:n.label})}`,show:!1,position:a+r,action:sendAddToQueue.bind(null,this.deezerHref,n.value)}}),e},sortedOptions(){return Object.values(this.options).sort((e,a)=>e.position{this.menuOpen=!1,this.options.copyLink.show=!1,this.options.copyDeezerLink.show=!1,this.options.copyImageLink.show=!1,downloadQualities.forEach(e=>{this.options[e.objName].show=!1})}).catch(e=>{console.error(e)})},positionMenu(e,a){this.xPos=`${e}px`,this.yPos=`${a}px`,this.$nextTick().then(()=>{const{innerHeight:n,innerWidth:r}=window,i=e+this.$refs.contextMenu.getBoundingClientRect().width,s=a+this.$refs.contextMenu.getBoundingClientRect().height;if(i>r){const l=i-r+15;this.xPos=`${e-l}px`}if(s>n){const l=s-n+15;this.yPos=`${a-l}px`}})},showDeezerOptions(e){e||(this.options.copyDeezerLink.show=!0),downloadQualities.forEach(a=>{this.options[a.objName].show=!0})}}};const __vue_script__$u=script$u;var __vue_render__$v=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{directives:[{name:"show",rawName:"v-show",value:e.menuOpen,expression:"menuOpen"}],ref:"contextMenu",staticClass:"context-menu",style:{top:e.yPos,left:e.xPos}},e._l(e.sortedOptions,function(r){return n("button",{directives:[{name:"show",rawName:"v-show",value:r.show,expression:"option.show"}],key:r.label,staticClass:"btn menu-option",on:{click:function(i){return i.preventDefault(),r.action(i)}}},[n("span",{staticClass:"menu-option__text"},[e._v(e._s(r.label))])])}),0)},__vue_staticRenderFns__$v=[];const __vue_inject_styles__$v=function(e){!e||e("data-v-56c7988a_0",{source:".context-menu[data-v-56c7988a]{position:absolute;top:0;left:0;min-width:100px;border-radius:7px;background:var(--secondary-background);box-shadow:4px 10px 18px 0 rgba(0,0,0,.15);overflow:hidden;z-index:10000}.menu-option[data-v-56c7988a]{display:flex;align-items:center;width:100%;height:40px;padding-left:10px;padding-right:10px;color:var(--foreground);cursor:pointer}.menu-option[data-v-56c7988a]:hover{background:var(--table-highlight);filter:brightness(150%)}.menu-option__text[data-v-56c7988a]{text-transform:capitalize}button[data-v-56c7988a]{color:var(--primary-text);color:unset;background-color:var(--primary-color);background-color:unset;min-width:unset;position:unset;border:unset;border-radius:unset;font-family:unset;font-weight:unset;font-size:unset;padding:unset;margin-right:unset;height:unset;text-transform:unset;cursor:unset;transition:unset}button[data-v-56c7988a]:focus{outline:0}button[data-v-56c7988a]:active{background-color:unset;transform:unset}button[data-v-56c7988a]:hover{background:unset;border:unset}",map:void 0,media:void 0})},__vue_scope_id__$v="data-v-56c7988a",__vue_module_identifier__$c=void 0,__vue_is_functional_template__$v=!1;function __vue_normalize__$v(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheContextMenu.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$c(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$c.styles||(__vue_create_injector__$c.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` `);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var TheContextMenu=__vue_normalize__$v({render:__vue_render__$v,staticRenderFns:__vue_staticRenderFns__$v},__vue_inject_styles__$v,__vue_script__$u,__vue_scope_id__$v,__vue_is_functional_template__$v,__vue_module_identifier__$c,__vue_create_injector__$c);/*! @@ -2776,7 +2776,7 @@ a { `)]),e._v(" "),n("div",{staticClass:"relative flex items-center w-full justify-evenly",class:{"inline-grid gap-2":e.isSlim},attrs:{id:"theme_togglers"}},e._l(e.THEMES,function(r){return n("div",{key:r,staticClass:"w-6 h-6 border rounded-full cursor-pointer theme_toggler border-grayscale-500 gap",class:[{"theme_toggler--active":e.currentTheme===r},"theme_toggler--"+r],on:{click:function(i){e.currentTheme=r}}})}),0)])],2)},__vue_staticRenderFns__$s=[];const __vue_inject_styles__$s=function(e){!e||e("data-v-8565b61a_0",{source:".deemix-icon-container[data-v-8565b61a]{display:grid;place-content:center}.slim-sidebar .deemix-icon-container[data-v-8565b61a]{margin:.5rem 0}.slim-sidebar .deemix-icon-container[data-v-8565b61a] svg{height:30px}.deemix-icon-container[data-v-8565b61a] svg{height:75px}#update-notification[data-v-8565b61a]{top:12px;left:30px}.theme_toggler[data-v-8565b61a]{transition:border .2s ease-in-out}.theme_toggler--active[data-v-8565b61a]{border-width:3px}.theme_toggler--light[data-v-8565b61a]{background-color:#fff}.theme_toggler--dark[data-v-8565b61a]{background-color:#141414}.theme_toggler--purple[data-v-8565b61a]{background:#460eaf}",map:void 0,media:void 0})},__vue_scope_id__$s="data-v-8565b61a",__vue_module_identifier__$a=void 0,__vue_is_functional_template__$s=!1;function __vue_normalize__$s(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheSidebar.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$a(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$a.styles||(__vue_create_injector__$a.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` -`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var TheSidebar=__vue_normalize__$s({render:__vue_render__$s,staticRenderFns:__vue_staticRenderFns__$s},__vue_inject_styles__$s,__vue_script__$r,__vue_scope_id__$s,__vue_is_functional_template__$s,__vue_module_identifier__$a,__vue_create_injector__$a),script$q=defineComponent({setup(){return{lastTextSearch:ref("")}},created(){const e=n=>{n.keyCode===70&&n.ctrlKey&&(n.preventDefault(),this.$refs.searchbar.focus())},a=n=>{!(n.key=="Backspace"&&n.ctrlKey&&n.shiftKey)||(this.$refs.searchbar.value="",this.$refs.searchbar.focus())};document.addEventListener("keydown",e),document.addEventListener("keyup",a),this.$on("hook:destroyed",()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",a)})},methods:{async performSearch(e){if(!(e.keyCode===13))return;const n=this.$refs.searchbar.value;if(n==="")return;const i=isValidURL(n),s=e.ctrlKey,l=this.$route.name==="Link Analyzer",c=this.$route.name==="Search",o=n===this.lastTextSearch;if(i){if(s){this.$root.$emit("ContextMenu:searchbar",n);return}if(l)try{const u=await fetchData("analyzeLink",{term:n});if(!!u.errorCode)throw new Error(u.errorMessage);u.type==="track"&&EventBus.$emit("analyze_track",u),u.type==="album"&&EventBus.$emit("analyze_album",u);return}catch(u){console.error(u);return}sendAddToQueue(n)}else{if(c&&o)return;this.lastTextSearch=n,await this.$router.push({name:"Search",query:{term:n}})}}}});const __vue_script__$q=script$q;var __vue_render__$r=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("header",{attrs:{id:"search","aria-label":"searchbar"}},[e._m(0),e._v(" "),n("input",{ref:"searchbar",staticClass:"w-full",attrs:{id:"searchbar",autocomplete:"off",type:"search",name:"searchbar",value:"",placeholder:e.$t("searchbar"),autofocus:""},on:{keyup:function(r){return e.performSearch(r)}}})])},__vue_staticRenderFns__$r=[function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"search__icon"},[n("i",{staticClass:"material-icons"},[e._v("search")])])}];const __vue_inject_styles__$r=function(e){!e||e("data-v-9efebc00_0",{source:`input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;width:28px;height:28px;background-color:var(--foreground);-webkit-mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E")}#search{background-color:var(--secondary-background);padding:0 1em;display:flex;align-items:center;border:1px solid transparent;transition:border .2s ease-in-out;border-radius:15px;margin:10px 10px 20px 10px}#search .search__icon{width:2rem;height:2rem}#search .search__icon i{font-size:2rem;color:var(--foreground)}#search .search__icon i::selection{background:0 0}#search #searchbar{height:45px;padding-left:.5em;border:0;border-radius:0;background-color:var(--secondary-background);color:var(--foreground);font-size:1.2rem;font-family:'Open Sans';font-weight:300;margin-bottom:0}#search #searchbar:focus{outline:0}#search #searchbar::-webkit-search-cancel-button{appearance:none;width:28px;height:28px;background-color:var(--foreground);mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E")}#search #searchbar:-webkit-autofill,#search #searchbar:-webkit-autofill:active,#search #searchbar:-webkit-autofill:focus,#search #searchbar:-webkit-autofill:hover{box-shadow:0 0 0 45px var(--secondary-background) inset!important}#search:focus-within{border:1px solid var(--foreground)}`,map:void 0,media:void 0})},__vue_scope_id__$r=void 0,__vue_module_identifier__$9=void 0,__vue_is_functional_template__$r=!1;function __vue_normalize__$r(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheSearchBar.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$9(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$9.styles||(__vue_create_injector__$9.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` +`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var TheSidebar=__vue_normalize__$s({render:__vue_render__$s,staticRenderFns:__vue_staticRenderFns__$s},__vue_inject_styles__$s,__vue_script__$r,__vue_scope_id__$s,__vue_is_functional_template__$s,__vue_module_identifier__$a,__vue_create_injector__$a),script$q=defineComponent({setup(){return{lastTextSearch:ref("")}},created(){const e=n=>{n.keyCode===70&&n.ctrlKey&&(n.preventDefault(),this.$refs.searchbar.focus())},a=n=>{!(n.key=="Backspace"&&n.ctrlKey&&n.shiftKey)||(this.$refs.searchbar.value="",this.$refs.searchbar.focus())};document.addEventListener("keydown",e),document.addEventListener("keyup",a),this.$on("hook:destroyed",()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",a)})},methods:{async performSearch(e){if(!(e.keyCode===13))return;const n=this.$refs.searchbar.value;if(n==="")return;const i=isValidURL(n),s=e.ctrlKey,l=this.$route.name==="Link Analyzer",c=this.$route.name==="Search",o=n===this.lastTextSearch;if(i){if(s){this.$root.$emit("ContextMenu:searchbar",n);return}if(l)try{const u=await fetchData("analyzeLink",{term:n});if(!!u.errorCode)throw new Error(u.errorMessage);u.type==="track"&&EventBus.$emit("analyze_track",u),u.type==="album"&&EventBus.$emit("analyze_album",u);return}catch(u){console.error(u);return}sendAddToQueue(n)}else{if(c&&o)return;this.lastTextSearch=n,await this.$router.push({name:"Search",query:{term:n}})}}}});const __vue_script__$q=script$q;var __vue_render__$r=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("header",{attrs:{id:"search","aria-label":"searchbar"}},[e._m(0),e._v(" "),n("input",{ref:"searchbar",staticClass:"w-full",attrs:{id:"searchbar",autocomplete:"off",type:"search",name:"searchbar",value:"",placeholder:e.$t("searchbar"),autofocus:""},on:{keyup:function(r){return e.performSearch(r)}}})])},__vue_staticRenderFns__$r=[function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"search__icon"},[n("i",{staticClass:"material-icons"},[e._v("search")])])}];const __vue_inject_styles__$r=function(e){!e||e("data-v-c1ffbb4a_0",{source:`input[type=search]::-webkit-search-cancel-button{-webkit-appearance:none;width:28px;height:28px;background-color:var(--foreground);-webkit-mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E")}#search{background-color:var(--secondary-background);padding:0 1em;display:flex;align-items:center;border:1px solid transparent;transition:border .2s ease-in-out;border-radius:15px;margin:10px 10px 20px 10px}#search .search__icon{width:2rem;height:2rem}#search .search__icon i{font-size:2rem;color:var(--foreground)}#search .search__icon i::selection{background:0 0}#search #searchbar{height:45px;padding-left:.5em;border:0;border-radius:0;background-color:var(--secondary-background);color:var(--foreground);font-size:1.2rem;font-family:'Open Sans';font-weight:300;margin-bottom:0}#search #searchbar:focus{outline:0}#search #searchbar::-webkit-search-cancel-button{appearance:none;width:28px;height:28px;background-color:var(--foreground);mask-image:url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' height='28' viewBox='0 0 24 24' width='28'%3E%%3Cpath fill='%23ffffff' d='M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z'/%3E3Cpath d='M0 0h24v24H0z' fill='none'/%3E%3C/svg%3E")}#search #searchbar:-webkit-autofill,#search #searchbar:-webkit-autofill:active,#search #searchbar:-webkit-autofill:focus,#search #searchbar:-webkit-autofill:hover{box-shadow:0 0 0 45px var(--secondary-background) inset!important}#search:focus-within{border:1px solid var(--foreground)}`,map:void 0,media:void 0})},__vue_scope_id__$r=void 0,__vue_module_identifier__$9=void 0,__vue_is_functional_template__$r=!1;function __vue_normalize__$r(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheSearchBar.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$9(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$9.styles||(__vue_create_injector__$9.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` `);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var TheSearchBar=__vue_normalize__$r({render:__vue_render__$r,staticRenderFns:__vue_staticRenderFns__$r},__vue_inject_styles__$r,__vue_script__$q,__vue_scope_id__$r,__vue_is_functional_template__$r,__vue_module_identifier__$9,__vue_create_injector__$9),__vue_render__$q=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("button",{staticClass:"btn-primary border-transparent border-solid flex items-center justify-center p-1 m-0 w-16 h-16 rounded-full z-10",on:{click:function(r){return e.$router.back()}}},[n("i",{staticClass:"material-icons mirrored text-4xl text-white"},[e._v("forward")])])},__vue_staticRenderFns__$q=[];const __vue_inject_styles__$q=function(e){!e||e("data-v-932b8142_0",{source:"button[data-v-932b8142]{transition:background .2s ease-in-out}",map:void 0,media:void 0})},__vue_scope_id__$q="data-v-932b8142",__vue_module_identifier__$8=void 0,__vue_is_functional_template__$q=!1;function __vue_normalize__$q(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="BackButton.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$8(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$8.styles||(__vue_create_injector__$8.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` @@ -2906,13 +2906,13 @@ a { .toastify .circle-loader { border-bottom-color: var(--toast-secondary); }\r -`;styleInject(css_248z);const sharedOptions={gravity:"bottom",position:"left"},toastsWithId={},toast=function(e,a=null,n=!0,r=null){if(toastsWithId[r]){const i=toastsWithId[r],s=document.querySelectorAll(`div.toastify[toast_id=${r}]`);if(e&&s.forEach(l=>{l.querySelectorAll(".toast-message").forEach(o=>{o.innerText=e})}),a){const l=document.createElement("span");if(l.classList.add("toast-icon"),a=="loading"){const c=document.createElement("div");c.classList.add("circle-loader"),l.appendChild(c)}else{const c=document.createElement("i");c.classList.add("material-icons"),c.appendChild(document.createTextNode(a)),l.appendChild(c)}s.forEach(c=>{c.querySelectorAll(".toast-icon").forEach(u=>{u.parentNode.replaceChild(l,u)})})}n!==null&&n&&(s.forEach(l=>{l.classList.add("dismissable")}),setTimeout(()=>{i.hideToast(),delete toastsWithId[r]},3e3))}else{const i=document.createElement("span");if(i.classList.add("toast-icon"),a==null)i.appendChild(document.createTextNode(""));else if(a=="loading"){const o=document.createElement("div");o.classList.add("circle-loader"),i.appendChild(o)}else{const o=document.createElement("i");o.classList.add("material-icons"),o.appendChild(document.createTextNode(a)),i.appendChild(o)}const s=document.createElement("span");s.classList.add("toast-message"),s.appendChild(document.createTextNode(e));const l=document.createElement("toast");l.appendChild(i),l.appendChild(s);const c=toastify({...sharedOptions,node:l,duration:n?3e3:0,className:n?"dismissable":"",onClick(){let o=!0;if(r){const u=document.querySelector(`div.toastify[toast_id=${r}]`).classList;u&&(o=Array.prototype.slice.call(u).includes("dismissable"))}c&&o&&(c.hideToast(),r&&delete toastsWithId[r])},offset:{x:localStorage.getItem("slimSidebar")==="true"?"3rem":"14rem"}}).showToast();r&&(toastsWithId[r]=c,c.toastElement.setAttribute("toast_id",r))}};socket.on("toast",e=>{const{msg:a,icon:n,dismiss:r,id:i}=e;toast(a,n||null,r!==void 0?r:!0,i||null)});const tabMinWidth=250,tabMaxWidth=500;var script$n={components:{QueueItem},data(){return{cachedTabWidth:parseInt(localStorage.getItem("downloadTabWidth"))||300,queue:[],queueList:{},queueComplete:[],isExpanded:localStorage.getItem("downloadTabOpen")==="true"}},computed:{...mapGetters({clientMode:"getClientMode",isSlim:"getSlimDownloads"}),finishedWithoutErrors(){const e=a=>a.errors.length===0;return Object.values(this.queueList).filter(e)}},created(){const e=a=>{!(a.ctrlKey&&a.key==="b")||this.toggleDownloadTab()};document.addEventListener("keyup",e),this.$on("hook:destroyed",()=>{document.removeEventListener("keyup",e)})},mounted(){socket.on("startDownload",this.startDownload),socket.on("startConversion",this.startConversion),socket.on("finishConversion",this.finishConversion),socket.on("addedToQueue",this.addToQueue),socket.on("updateQueue",this.updateQueue),socket.on("removedFromQueue",this.removeFromQueue),socket.on("finishDownload",this.finishDownload),socket.on("removedAllDownloads",this.removeAllDownloads),socket.on("removedFinishedDownloads",this.removedFinishedDownloads),fetchData("getQueue").then(e=>{this.initQueue(e)}).catch(console.error),localStorage.getItem("slimDownloads")==="true"&&this.$refs.list.classList.add("slim"),this.isExpanded&&this.setTabWidth(this.cachedTabWidth),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",this.handleDrag)}),window.addEventListener("beforeunload",()=>{localStorage.setItem("downloadTabWidth",this.cachedTabWidth)})},methods:{...mapActions(["setErrors"]),onRemoveItem(e){socket.emit("removeFromQueue",e)},setTabWidth(e){e===void 0?(this.$refs.container.style.width="",this.$refs.list.style.width=""):(this.$refs.container.style.width=e+"px",this.$refs.list.style.width=e+"px")},initQueue(e){const{order:a,currentItem:n,queue:r,restored:i}=e;console.log({initQueueList:r});const s=Object.values(r).filter(l=>["completed","withErrors","failed"].includes(l.status)).map(l=>l.uuid);console.log({initQueueComplete:s}),s&&s.length&&s.forEach(l=>{r[l].silent=!0,this.addToQueue(r[l])}),n&&(n.silent=!0,this.addToQueue(n,!0)),a.forEach(l=>{r[l].silent=!0,this.addToQueue(r[l])}),i&&(toast(this.$t("toasts.queueRestored"),"done",!0,"restoring_queue"),socket.emit("queueRestored"))},addToQueue(e,a=!1){if(Array.isArray(e))if(e.length>1){e.forEach((i,s)=>{i.silent=!0,this.addToQueue(i)}),toast(this.$t("toasts.addedMoreToQueue",{n:e.length}),"playlist_add_check");return}else e=e[0];if(e.downloaded=e.downloaded||0,e.failed=e.failed||0,e.progress=e.progress||0,e.conversion=e.conversion||0,e.errors=e.errors||[],this.$set(e,"current",a),this.$set(this.queueList,e.uuid,e),e.downloaded+e.failed==e.size){const i=!this.queueComplete.includes(e.uuid);this.$set(this.queueList[e.uuid],"status","download finished"),i&&this.queueComplete.push(e.uuid)}else!this.queue.includes(e.uuid)&&this.queue.push(e.uuid);(e.progress>0&&e.progress<100||a)&&this.startDownload(e.uuid),e.silent||toast(this.$t("toasts.addedToQueue",{item:e.title}),"playlist_add_check")},updateQueue(e){const{uuid:a,downloaded:n,failed:r,progress:i,conversion:s,error:l,data:c,errid:o}=e;a&&this.queue.includes(a)&&(n&&this.queueList[a].downloaded++,r&&(this.queueList[a].failed++,this.queueList[a].errors.push({message:l,data:c,errid:o})),i&&(this.queueList[a].progress=i),s&&(this.queueList[a].conversion=s))},removeFromQueue(e){const a=this.queue.indexOf(e);a>-1&&(this.$delete(this.queue,a),this.$delete(this.queueList,e))},removeAllDownloads(e){if(this.queueComplete=[],!e)this.queue=[],this.queueList={};else{this.queue=[e];const a=this.queueList[e];this.queueList={},this.queueList[e]=a}},removedFinishedDownloads(){this.queueComplete=this.finishedWithoutErrors.map(e=>e.uuid),this.queueComplete.forEach(e=>{this.$delete(this.queueList,e)}),this.queueComplete=[]},toggleDownloadTab(){this.setTabWidth(),this.$refs.container.style.transition="all 250ms ease-in-out",this.isExpanded=!this.isExpanded,this.isExpanded&&this.setTabWidth(this.cachedTabWidth),localStorage.setItem("downloadTabOpen",this.isExpanded)},cleanQueue(){socket.emit("removeFinishedDownloads")},cancelQueue(){socket.emit("cancelAllDownloads")},openDownloadsFolder(){window.api.send("openDownloadsFolder")},handleDrag(e){let a=window.innerWidth-e.pageX+2;atabMaxWidth&&(a=tabMaxWidth),this.cachedTabWidth=a,this.setTabWidth(a)},startDrag(){document.addEventListener("mousemove",this.handleDrag)},startDownload(e){this.$set(this.queueList[e],"status","downloading")},finishDownload(e){if(!this.queue.includes(e))return;this.$set(this.queueList[e],"status","download finished"),toast(this.$t("toasts.finishDownload",{item:this.queueList[e].title}),"done");const n=this.queue.indexOf(e);n>-1&&(this.queue.splice(n,1),this.queueComplete.push(e)),this.queue.length<=0&&toast(this.$t("toasts.allDownloaded"),"done_all")},startConversion(e){this.$set(this.queueList[e],"status","converting"),this.$set(this.queueList[e],"conversion",0)},finishConversion(e){this.$set(this.queueList[e.uuid],"size",e.size)},async showErrorsTab(e){await this.setErrors(e),this.$router.push({name:"Errors"})}}};const __vue_script__$n=script$n;var __vue_render__$n=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("section",{ref:"container",staticClass:"block h-screen bg-panels-bg text-foreground",class:{"tab-hidden":!e.isExpanded,"w-8":!e.isExpanded},attrs:{id:"download_tab_container","data-label":e.$t("downloads"),"aria-label":"downloads"},on:{transitionend:function(r){e.$refs.container.style.transition=""}}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isExpanded,expression:"isExpanded"}],staticClass:"absolute w-4 h-full bg-grayscale-200",staticStyle:{cursor:"ew-resize"},on:{mousedown:function(r){return r.preventDefault(),e.startDrag(r)}}}),e._v(" "),n("i",{ref:"toggler",staticClass:"m-1 text-2xl cursor-pointer material-icons",class:{"ml-1":!e.isExpanded,"ml-5":e.isExpanded},attrs:{id:"toggle_download_tab",title:e.$t("globals.toggle_download_tab_hint")},on:{click:function(r){return r.preventDefault(),e.toggleDownloadTab(r)}}}),e._v(" "),n("div",{staticClass:"absolute top-0 right-0 transition-all duration-200 ease-in-out",class:{"opacity-0 invisible":!e.isExpanded,"opacity-100 visible":e.isExpanded}},[e.clientMode?n("i",{staticClass:"m-1 text-2xl cursor-pointer material-icons",attrs:{title:e.$t("globals.open_downloads_folder")},on:{click:e.openDownloadsFolder}},[e._v(` +`;styleInject(css_248z);const sharedOptions={gravity:"bottom",position:"left"},toastsWithId={},toast=function(e,a=null,n=!0,r=null){if(toastsWithId[r]){const i=toastsWithId[r],s=document.querySelectorAll(`div.toastify[toast_id=${r}]`);if(e&&s.forEach(l=>{l.querySelectorAll(".toast-message").forEach(o=>{o.innerText=e})}),a){const l=document.createElement("span");if(l.classList.add("toast-icon"),a=="loading"){const c=document.createElement("div");c.classList.add("circle-loader"),l.appendChild(c)}else{const c=document.createElement("i");c.classList.add("material-icons"),c.appendChild(document.createTextNode(a)),l.appendChild(c)}s.forEach(c=>{c.querySelectorAll(".toast-icon").forEach(u=>{u.parentNode.replaceChild(l,u)})})}n!==null&&n&&(s.forEach(l=>{l.classList.add("dismissable")}),setTimeout(()=>{i.hideToast(),delete toastsWithId[r]},3e3))}else{const i=document.createElement("span");if(i.classList.add("toast-icon"),a==null)i.appendChild(document.createTextNode(""));else if(a=="loading"){const o=document.createElement("div");o.classList.add("circle-loader"),i.appendChild(o)}else{const o=document.createElement("i");o.classList.add("material-icons"),o.appendChild(document.createTextNode(a)),i.appendChild(o)}const s=document.createElement("span");s.classList.add("toast-message"),s.appendChild(document.createTextNode(e));const l=document.createElement("toast");l.appendChild(i),l.appendChild(s);const c=toastify({...sharedOptions,node:l,duration:n?3e3:0,className:n?"dismissable":"",onClick(){let o=!0;if(r){const u=document.querySelector(`div.toastify[toast_id=${r}]`).classList;u&&(o=Array.prototype.slice.call(u).includes("dismissable"))}c&&o&&(c.hideToast(),r&&delete toastsWithId[r])},offset:{x:localStorage.getItem("slimSidebar")==="true"?"3rem":"14rem"}}).showToast();r&&(toastsWithId[r]=c,c.toastElement.setAttribute("toast_id",r))}};socket.on("toast",e=>{const{msg:a,icon:n,dismiss:r,id:i}=e;toast(a,n||null,r!==void 0?r:!0,i||null)});const tabMinWidth=250,tabMaxWidth=500;var script$n={components:{QueueItem},data(){return{cachedTabWidth:parseInt(localStorage.getItem("downloadTabWidth"))||300,queue:[],queueList:{},queueComplete:[],isExpanded:localStorage.getItem("downloadTabOpen")==="true"}},computed:{...mapGetters({clientMode:"getClientMode",isSlim:"getSlimDownloads"}),finishedWithoutErrors(){const e=a=>a.errors.length===0;return Object.values(this.queueList).filter(e)}},created(){const e=a=>{!(a.ctrlKey&&a.key==="b")||this.toggleDownloadTab()};document.addEventListener("keyup",e),this.$on("hook:destroyed",()=>{document.removeEventListener("keyup",e)})},mounted(){socket.on("startDownload",this.startDownload),socket.on("startConversion",this.startConversion),socket.on("finishConversion",this.finishConversion),socket.on("addedToQueue",this.addToQueue),socket.on("updateQueue",this.updateQueue),socket.on("removedFromQueue",this.removeFromQueue),socket.on("finishDownload",this.finishDownload),socket.on("removedAllDownloads",this.removeAllDownloads),socket.on("removedFinishedDownloads",this.removedFinishedDownloads),fetchData("getQueue").then(e=>{this.initQueue(e)}).catch(console.error),localStorage.getItem("slimDownloads")==="true"&&this.$refs.list.classList.add("slim"),this.isExpanded&&this.setTabWidth(this.cachedTabWidth),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",this.handleDrag)}),window.addEventListener("beforeunload",()=>{localStorage.setItem("downloadTabWidth",this.cachedTabWidth)})},methods:{...mapActions(["setErrors"]),onRemoveItem(e){socket.emit("removeFromQueue",e)},setTabWidth(e){e===void 0?(this.$refs.container.style.width="",this.$refs.list.style.width=""):(this.$refs.container.style.width=e+"px",this.$refs.list.style.width=e+"px")},initQueue(e){const{order:a,currentItem:n,queue:r,restored:i}=e,s=Object.values(r).filter(l=>["completed","withErrors","failed"].includes(l.status)).map(l=>l.uuid);s&&s.length&&s.forEach(l=>{r[l].silent=!0,this.addToQueue(r[l])}),n&&(n.silent=!0,this.addToQueue(n,!0)),a.forEach(l=>{r[l].silent=!0,this.addToQueue(r[l])}),i&&(toast(this.$t("toasts.queueRestored"),"done",!0,"restoring_queue"),socket.emit("queueRestored"))},addToQueue(e,a=!1){if(Array.isArray(e))if(e.length>1){e.forEach((i,s)=>{i.silent=!0,this.addToQueue(i)}),toast(this.$t("toasts.addedMoreToQueue",{n:e.length}),"playlist_add_check");return}else e=e[0];if(e.downloaded=e.downloaded||0,e.failed=e.failed||0,e.progress=e.progress||0,e.conversion=e.conversion||0,e.errors=e.errors||[],this.$set(e,"current",a),this.$set(this.queueList,e.uuid,e),e.downloaded+e.failed==e.size){const i=!this.queueComplete.includes(e.uuid);this.$set(this.queueList[e.uuid],"status","download finished"),i&&this.queueComplete.push(e.uuid)}else!this.queue.includes(e.uuid)&&this.queue.push(e.uuid);(e.progress>0&&e.progress<100||a)&&this.startDownload(e.uuid),e.silent||toast(this.$t("toasts.addedToQueue",{item:e.title}),"playlist_add_check")},updateQueue(e){const{uuid:a,downloaded:n,failed:r,progress:i,conversion:s,error:l,data:c,errid:o}=e;a&&this.queue.includes(a)&&(n&&this.queueList[a].downloaded++,r&&(this.queueList[a].failed++,this.queueList[a].errors.push({message:l,data:c,errid:o})),i&&(this.queueList[a].progress=i),s&&(this.queueList[a].conversion=s))},removeFromQueue(e){const a=this.queue.indexOf(e);a>-1&&(this.$delete(this.queue,a),this.$delete(this.queueList,e))},removeAllDownloads(e){if(this.queueComplete=[],!e)this.queue=[],this.queueList={};else{this.queue=[e];const a=this.queueList[e];this.queueList={},this.queueList[e]=a}},removedFinishedDownloads(){this.queueComplete=this.finishedWithoutErrors.map(e=>e.uuid),this.queueComplete.forEach(e=>{this.$delete(this.queueList,e)}),this.queueComplete=[]},toggleDownloadTab(){this.setTabWidth(),this.$refs.container.style.transition="all 250ms ease-in-out",this.isExpanded=!this.isExpanded,this.isExpanded&&this.setTabWidth(this.cachedTabWidth),localStorage.setItem("downloadTabOpen",this.isExpanded)},cleanQueue(){socket.emit("removeFinishedDownloads")},cancelQueue(){socket.emit("cancelAllDownloads")},openDownloadsFolder(){window.api.send("openDownloadsFolder")},handleDrag(e){let a=window.innerWidth-e.pageX+2;atabMaxWidth&&(a=tabMaxWidth),this.cachedTabWidth=a,this.setTabWidth(a)},startDrag(){document.addEventListener("mousemove",this.handleDrag)},startDownload(e){this.$set(this.queueList[e],"status","downloading")},finishDownload(e){if(!this.queue.includes(e))return;this.$set(this.queueList[e],"status","download finished"),toast(this.$t("toasts.finishDownload",{item:this.queueList[e].title}),"done");const n=this.queue.indexOf(e);n>-1&&(this.queue.splice(n,1),this.queueComplete.push(e)),this.queue.length<=0&&toast(this.$t("toasts.allDownloaded"),"done_all")},startConversion(e){this.$set(this.queueList[e],"status","converting"),this.$set(this.queueList[e],"conversion",0)},finishConversion(e){this.$set(this.queueList[e.uuid],"size",e.size)},async showErrorsTab(e){await this.setErrors(e),this.$router.push({name:"Errors"})}}};const __vue_script__$n=script$n;var __vue_render__$n=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("section",{ref:"container",staticClass:"block h-screen bg-panels-bg text-foreground",class:{"tab-hidden":!e.isExpanded,"w-8":!e.isExpanded},attrs:{id:"download_tab_container","data-label":e.$t("downloads"),"aria-label":"downloads"},on:{transitionend:function(r){e.$refs.container.style.transition=""}}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.isExpanded,expression:"isExpanded"}],staticClass:"absolute w-4 h-full bg-grayscale-200",staticStyle:{cursor:"ew-resize"},on:{mousedown:function(r){return r.preventDefault(),e.startDrag(r)}}}),e._v(" "),n("i",{ref:"toggler",staticClass:"m-1 text-2xl cursor-pointer material-icons",class:{"ml-1":!e.isExpanded,"ml-5":e.isExpanded},attrs:{id:"toggle_download_tab",title:e.$t("globals.toggle_download_tab_hint")},on:{click:function(r){return r.preventDefault(),e.toggleDownloadTab(r)}}}),e._v(" "),n("div",{staticClass:"absolute top-0 right-0 transition-all duration-200 ease-in-out",class:{"opacity-0 invisible":!e.isExpanded,"opacity-100 visible":e.isExpanded}},[e.clientMode?n("i",{staticClass:"m-1 text-2xl cursor-pointer material-icons",attrs:{title:e.$t("globals.open_downloads_folder")},on:{click:e.openDownloadsFolder}},[e._v(` folder_open `)]):e._e(),e._v(" "),n("i",{staticClass:"m-1 text-2xl cursor-pointer material-icons",attrs:{title:e.$t("globals.clean_queue_hint")},on:{click:e.cleanQueue}},[e._v(` clear_all `)]),e._v(" "),n("i",{staticClass:"m-1 text-2xl cursor-pointer material-icons",attrs:{title:e.$t("globals.cancel_queue_hint")},on:{click:e.cancelQueue}},[e._v(` delete_sweep - `)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isExpanded,expression:"isExpanded"}],ref:"list",staticClass:"w-full pr-2",class:{slim:e.isSlim},attrs:{id:"download_list"}},e._l(e.queueList,function(r){return n("QueueItem",{key:r.uuid,attrs:{"queue-item":r},on:{"show-errors":e.showErrorsTab,"remove-item":e.onRemoveItem}})}),1)])},__vue_staticRenderFns__$n=[];const __vue_inject_styles__$n=function(e){!e||e("data-v-54ef9067_0",{source:"#toggle_download_tab[data-v-54ef9067]{width:25px;height:25px}#toggle_download_tab[data-v-54ef9067]::before{font-family:'Material Icons';font-style:normal;font-weight:400;content:'chevron_right'}#download_tab_container.tab-hidden #toggle_download_tab[data-v-54ef9067]::before{content:'chevron_left'}#download_tab_container.tab-hidden[data-v-54ef9067]::after{content:attr(data-label);display:flex;align-items:center;text-transform:capitalize;writing-mode:vertical-rl;line-height:2rem}#download_list[data-v-54ef9067]{height:calc(100% - 32px);padding-left:28px;overflow-y:scroll}#download_list[data-v-54ef9067]::-webkit-scrollbar{width:10px}#download_list[data-v-54ef9067]::-webkit-scrollbar-track{background:var(--panels-background)}#download_list[data-v-54ef9067]::-webkit-scrollbar-thumb{background:var(--panels-scroll);border-radius:4px;width:6px;padding:0 2px}",map:void 0,media:void 0})},__vue_scope_id__$n="data-v-54ef9067",__vue_module_identifier__$5=void 0,__vue_is_functional_template__$n=!1;function __vue_normalize__$n(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheDownloadBar.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$5(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$5.styles||(__vue_create_injector__$5.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` + `)])]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.isExpanded,expression:"isExpanded"}],ref:"list",staticClass:"w-full pr-2",class:{slim:e.isSlim},attrs:{id:"download_list"}},e._l(e.queueList,function(r){return n("QueueItem",{key:r.uuid,attrs:{"queue-item":r},on:{"show-errors":e.showErrorsTab,"remove-item":e.onRemoveItem}})}),1)])},__vue_staticRenderFns__$n=[];const __vue_inject_styles__$n=function(e){!e||e("data-v-d7ecf8d0_0",{source:"#toggle_download_tab[data-v-d7ecf8d0]{width:25px;height:25px}#toggle_download_tab[data-v-d7ecf8d0]::before{font-family:'Material Icons';font-style:normal;font-weight:400;content:'chevron_right'}#download_tab_container.tab-hidden #toggle_download_tab[data-v-d7ecf8d0]::before{content:'chevron_left'}#download_tab_container.tab-hidden[data-v-d7ecf8d0]::after{content:attr(data-label);display:flex;align-items:center;text-transform:capitalize;writing-mode:vertical-rl;line-height:2rem}#download_list[data-v-d7ecf8d0]{height:calc(100% - 32px);padding-left:28px;overflow-y:scroll}#download_list[data-v-d7ecf8d0]::-webkit-scrollbar{width:10px}#download_list[data-v-d7ecf8d0]::-webkit-scrollbar-track{background:var(--panels-background)}#download_list[data-v-d7ecf8d0]::-webkit-scrollbar-thumb{background:var(--panels-scroll);border-radius:4px;width:6px;padding:0 2px}",map:void 0,media:void 0})},__vue_scope_id__$n="data-v-d7ecf8d0",__vue_module_identifier__$5=void 0,__vue_is_functional_template__$n=!1;function __vue_normalize__$n(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="TheDownloadBar.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$5(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$5.styles||(__vue_create_injector__$5.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` `);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var TheDownloadBar=__vue_normalize__$n({render:__vue_render__$n,staticRenderFns:__vue_staticRenderFns__$n},__vue_inject_styles__$n,__vue_script__$n,__vue_scope_id__$n,__vue_is_functional_template__$n,__vue_module_identifier__$5,__vue_create_injector__$5),script$m={components:{TheSidebar,TheSearchBar,TheDownloadBar,TheTrackPreview,TheQualityModal,BaseLoadingPlaceholder,TheContextMenu,TheContent},data(){return{isSocketConnected:!1}},mounted(){socket.addEventListener("open",e=>{console.log("Connected to WebSocket"),this.isSocketConnected=!0})}};const __vue_script__$m=script$m;var __vue_render__$m=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{attrs:{id:"app"}},[n("div",{staticClass:"app-container"},[n("TheSidebar"),e._v(" "),n("div",{staticClass:"content-container"},[n("TheSearchBar"),e._v(" "),n("TheContent")],1),e._v(" "),n("TheDownloadBar")],1),e._v(" "),n("BaseLoadingPlaceholder",{attrs:{text:"Connecting to local server...",hidden:e.isSocketConnected,"additional-classes":"absolute top-0 left-0 w-screen h-screen bg-black bg-opacity-50 z-50"}}),e._v(" "),n("TheTrackPreview"),e._v(" "),n("TheQualityModal"),e._v(" "),n("TheContextMenu")],1)},__vue_staticRenderFns__$m=[];const __vue_inject_styles__$m=function(e){!e||e("data-v-047e2277_0",{source:".app-container{display:flex}.content-container{width:100%;display:flex;flex-direction:column}",map:void 0,media:void 0})},__vue_scope_id__$m=void 0,__vue_module_identifier__$4=void 0,__vue_is_functional_template__$m=!1;function __vue_normalize__$m(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="App.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$4(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$4.styles||(__vue_create_injector__$4.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` @@ -3053,17 +3053,17 @@ a { `)])])],1)}),0)])])])},__vue_staticRenderFns__$g=[];const __vue_inject_styles__$g=void 0,__vue_scope_id__$g=void 0,__vue_is_functional_template__$g=!1;function __vue_normalize__$g(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="Charts.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Charts=__vue_normalize__$g({render:__vue_render__$g,staticRenderFns:__vue_staticRenderFns__$g},__vue_inject_styles__$g,__vue_script__$g,__vue_scope_id__$g,__vue_is_functional_template__$g),script$f={computed:{...mapGetters(["getErrors"]),title(){return`${this.getErrors.artist} - ${this.getErrors.title}`},errors(){return this.getErrors.errors}}};const __vue_script__$f=script$f;var __vue_render__$f=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",[n("h1",{staticClass:"mb-8 text-5xl"},[e._v(e._s(e.$t("errors.title",{name:e.title})))]),e._v(" "),n("table",{staticClass:"table table--tracklist"},[n("tr",[n("th",[e._v("ID")]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.artist",1)))]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.title",1)))]),e._v(" "),n("th",[e._v(e._s(e.$tc("globals.listTabs.error",1)))])]),e._v(" "),e._l(e.errors,function(r){return n("tr",{key:r.data.id},[n("td",[e._v(e._s(r.data.id))]),e._v(" "),n("td",[e._v(e._s(r.data.artist))]),e._v(" "),n("td",[e._v(e._s(r.data.title))]),e._v(" "),n("td",[e._v(e._s(r.errid?e.$t("errors.ids."+r.errid):r.message))])])})],2)])},__vue_staticRenderFns__$f=[];const __vue_inject_styles__$f=void 0,__vue_scope_id__$f=void 0,__vue_is_functional_template__$f=!1;function __vue_normalize__$f(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};return o.__file="Errors.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r,o}var Errors=__vue_normalize__$f({render:__vue_render__$f,staticRenderFns:__vue_staticRenderFns__$f},__vue_inject_styles__$f,__vue_script__$f,__vue_scope_id__$f,__vue_is_functional_template__$f),script$e={inheritAttrs:!1,props:{cover:{type:String,reqired:!0},isRounded:{type:Boolean,required:!1},isCircle:{type:Boolean,required:!1},link:{type:String,reqired:!0}}};const __vue_script__$e=script$e;var __vue_render__$e=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{staticClass:"relative cover-container group"},[n("img",{staticClass:"block w-full opacity-100 coverart",class:{rounded:e.isRounded,"rounded-full":e.isCircle},attrs:{"aria-hidden":"true",src:e.cover}}),e._v(" "),n("button",e._g({staticClass:"absolute p-0 text-center bg-black border-0 rounded-full opacity-0 download_overlay hover:bg-primary",attrs:{role:"button","aria-label":"download","data-link":e.link,tabindex:"0"}},e.$listeners),[n("i",{staticClass:"text-white cursor-pointer material-icons",attrs:{title:e.$t("globals.download_hint")}},[e._v("get_app")])])])},__vue_staticRenderFns__$e=[];const __vue_inject_styles__$e=function(e){!e||e("data-v-c6343cfa_0",{source:".cover-container[data-v-c6343cfa]{width:156px;height:156px;margin-bottom:10px}.cover-container .coverart[data-v-c6343cfa]{backface-visibility:hidden;transition:.5s ease;height:auto}.cover-container .download_overlay[data-v-c6343cfa]{top:50%;left:50%;transform:translate(-50%,-50%);transition:.5s ease;opacity:0;min-width:2rem;height:2.75rem;text-align:center}.cover-container .download_overlay i[data-v-c6343cfa]{padding:.625rem}.cover-container .download_overlay[data-v-c6343cfa]:focus{opacity:1}.cover-container:hover .coverart[data-v-c6343cfa]{opacity:.75}.cover-container:hover .download_overlay[data-v-c6343cfa]{opacity:1;border:0}",map:void 0,media:void 0})},__vue_scope_id__$e="data-v-c6343cfa",__vue_module_identifier__$2=void 0,__vue_is_functional_template__$e=!1;function __vue_normalize__$e(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="CoverContainer.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__$2(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__$2.styles||(__vue_create_injector__$2.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` -`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var CoverContainer=__vue_normalize__$e({render:__vue_render__$e,staticRenderFns:__vue_staticRenderFns__$e},__vue_inject_styles__$e,__vue_script__$e,__vue_scope_id__$e,__vue_is_functional_template__$e,__vue_module_identifier__$2,__vue_create_injector__$2);let settingsData={},defaultSettingsData={},spotifyCredentials={};async function getSettingsData(){{const e=await fetchData("getSettings"),{settings:a,defaultSettings:n,spotifySettings:r}=e;settingsData=a,defaultSettingsData=n,spotifyCredentials=r||{}}return{settingsData,defaultSettingsData,spotifyCredentials}}function getInitialPreviewVolume(){let e=parseInt(localStorage.getItem("previewVolume"));return isNaN(e)&&(e=80,localStorage.setItem("previewVolume",e.toString())),e}function checkInitialSlimDownloads(){return localStorage.getItem("slimDownloads")==="true"}function checkInitialSlimSidebar(){return localStorage.getItem("slimSidebar")==="true"}const state$2=()=>({currentCommit:null,latestCommit:null,updateAvailable:!1,deemixVersion:null,previewVolume:getInitialPreviewVolume(),hasSlimDownloads:checkInitialSlimDownloads(),hasSlimSidebar:checkInitialSlimSidebar()}),actions$2={setAppInfo({commit:e},a){e("SET_CURRENT_COMMIT",a.currentCommit),e("SET_LATEST_COMMIT",a.latestCommit),e("SET_UPDATE_AVAILABLE",a.updateAvailable),e("SET_DEEMIX_VERSION",a.deemixVersion)},setPreviewVolume({commit:e},a){e("SET_PREVIEW_VOLUME",a),localStorage.setItem("previewVolume",a.toString())},setSlimDownloads({commit:e},a){e("SET_SLIM_DOWNLOADS",a),localStorage.setItem("slimDownloads",a.toString())},setSlimSidebar({commit:e},a){e("SET_SLIM_SIDEBAR",a),localStorage.setItem("slimSidebar",a.toString()),Array.from(document.getElementsByClassName("toastify")).forEach(n=>{n.style.transform=`translate(${a?"3rem":"14rem"}, 0)`})}},getters$2={getAppInfo:e=>e,getPreviewVolume:e=>e.previewVolume,getSlimDownloads:e=>e.hasSlimDownloads,getSlimSidebar:e=>e.hasSlimSidebar},mutations$2={SET_CURRENT_COMMIT(e,a){e.currentCommit=a},SET_LATEST_COMMIT(e,a){e.latestCommit=a},SET_UPDATE_AVAILABLE(e,a){e.updateAvailable=a},SET_DEEMIX_VERSION(e,a){e.deemixVersion=a},SET_PREVIEW_VOLUME(e,a){e.previewVolume=a},SET_SLIM_DOWNLOADS(e,a){e.hasSlimDownloads=a},SET_SLIM_SIDEBAR(e,a){e.hasSlimSidebar=a}};var appInfo={state:state$2,getters:getters$2,actions:actions$2,mutations:mutations$2};const getDefaultState=()=>({arl:localStorage.getItem("arl")||"",accessToken:localStorage.getItem("accessToken")||"",status:null,user:{id:null,name:"",picture:""},spotifyUser:{id:localStorage.getItem("spotifyUser"),name:null,picture:null},clientMode:!1}),state$1=()=>getDefaultState(),actions$1={login({commit:e,dispatch:a},n){const{arl:r,user:i,status:s}=n;a("setARL",{arl:r}),e("SET_USER",i),e("SET_STATUS",s)},logout({commit:e}){localStorage.removeItem("arl"),localStorage.removeItem("accessToken"),e("RESET_LOGIN")},setARL({commit:e},a){let{arl:n,saveOnLocalStorage:r}=a;r=typeof r=="undefined"?!0:r,e("SET_ARL",n),r&&localStorage.setItem("arl",n)},setAccessToken({commit:e},a){let{accessToken:n,saveOnLocalStorage:r}=a;r=typeof r=="undefined"?!0:r,e("SET_ACCESS_TOKEN",n),r&&localStorage.setItem("accessToken",n)},removeARL({commit:e}){e("SET_ARL",""),localStorage.removeItem("arl")},removeAccessToken({commit:e}){e("SET_ACCESS_TOKEN",""),localStorage.removeItem("accessToken")},setUser({commit:e},a){e("SET_USER",a)},setClientMode({commit:e},a){e("SET_CLIENT_MODE",a)}},getters$1={getARL:e=>e.arl,getAccessToken:e=>e.accessToken,getUser:e=>e.user,getSpotifyUser:e=>e.spotifyUser,getClientMode:e=>e.clientMode,isLoggedIn:e=>!!e.arl,isLoggedWithSpotify:e=>!!e.spotifyUser.id},mutations$1={SET_ARL(e,a){e.arl=a},SET_ACCESS_TOKEN(e,a){e.accessToken=a},SET_STATUS(e,a){e.status=a},SET_USER(e,a){e.user=a},SET_CLIENT_MODE(e,a){e.clientMode=a},RESET_LOGIN(e){const a=e.clientMode;Object.assign(e,getDefaultState()),e.clientMode=a}};var login={state:state$1,getters:getters$1,actions:actions$1,mutations:mutations$1};const state=()=>({artist:"",bitrate:"",cover:"",downloaded:0,errors:[],failed:0,id:"",progress:0,silent:!0,size:0,title:"",type:"",uuid:""}),actions={setErrors({commit:e},a){e("SET_ERRORS",a)}},getters={getErrors:e=>e},mutations={SET_ERRORS(e,a){for(const n in e)if(e.hasOwnProperty(n)){const r=a[n];e[n]=r}}};var errors={state,getters,actions,mutations};Vue$2.use(index);var store=new index.Store({modules:{appInfo,login,errors},strict:!1});const favoriteArtists=ref([]),favoriteAlbums=ref([]),favoriteSpotifyPlaylists=ref([]),favoritePlaylists=ref([]),favoriteTracks=ref([]),isRefreshingFavorites=ref(!1);function refreshFavorites({isInitial:e=!1}){e||(isRefreshingFavorites.value=!0),fetchData("getUserFavorites").then(setAllFavorites).catch(console.error),store.getters.isLoggedWithSpotify&&fetchData("getUserSpotifyPlaylists",{spotifyUser:store.getters.getSpotifyUser.id}).then(a=>{favoriteSpotifyPlaylists.value=a}).catch(console.error)}function setAllFavorites(e){const{tracks:a,albums:n,artists:r,playlists:i}=e;isRefreshingFavorites.value=!1,favoriteArtists.value=r,favoriteAlbums.value=n,favoritePlaylists.value=i,favoriteTracks.value=a}function useFavorites(){return{favoriteArtists,favoriteAlbums,favoriteSpotifyPlaylists,favoritePlaylists,favoriteTracks,isRefreshingFavorites,refreshFavorites}}var script$d=defineComponent({components:{PreviewControls,CoverContainer,BaseTabs,BaseTab},setup(e,a){const n=reactive({activeTab:"playlist",tabs:["playlist","album","artist","track"]}),{favoriteArtists:r,favoriteAlbums:i,favoriteSpotifyPlaylists:s,favoritePlaylists:l,favoriteTracks:c,isRefreshingFavorites:o,refreshFavorites:u}=useFavorites();return u({isInitial:!0}),watch(o,(d,f)=>{!(f&&!d)||toast(a.root.$t("toasts.refreshFavs"),"done",!0)}),{...toRefs(n),tracks:c,albums:i,artists:r,playlists:l,spotifyPlaylists:s,refreshFavorites:u,isRefreshingFavorites:o}},computed:{activeTabEmpty(){return this.getActiveRelease()?.length===0}},methods:{playPausePreview,convertDuration,downloadAllOfType(){try{const e=this.getActiveRelease();if(this.activeTab==="track"){const a=this.getLovedTracksPlaylist();sendAddToQueue(a.link)}else sendAddToQueue(aggregateDownloadLinks(e))}catch(e){console.error(e.message)}},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},getActiveRelease(e=this.activeTab){let a;switch(e){case"playlist":a=this.playlists;break;case"album":a=this.albums;break;case"artist":a=this.artists;break;case"track":a=this.tracks;break}return a},getTabLength(e=this.activeTab){return this[`${e}s`]?.length||0},getLovedTracksPlaylist(){const e=this.playlists.filter(a=>a.is_loved_track);if(e.length!==0)return e[0];throw new Error("No loved tracks playlist!")}}});const __vue_script__$d=script$d;var __vue_render__$d=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",[n("h1",{staticClass:"mb-8 text-5xl"},[e._v(` +`);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var CoverContainer=__vue_normalize__$e({render:__vue_render__$e,staticRenderFns:__vue_staticRenderFns__$e},__vue_inject_styles__$e,__vue_script__$e,__vue_scope_id__$e,__vue_is_functional_template__$e,__vue_module_identifier__$2,__vue_create_injector__$2);let settingsData={},defaultSettingsData={},spotifyCredentials={};async function getSettingsData(){{const e=await fetchData("getSettings"),{settings:a,defaultSettings:n,spotifySettings:r}=e;settingsData=a,defaultSettingsData=n,spotifyCredentials=r||{}}return{settingsData,defaultSettingsData,spotifyCredentials}}function getInitialPreviewVolume(){let e=parseInt(localStorage.getItem("previewVolume"));return isNaN(e)&&(e=80,localStorage.setItem("previewVolume",e.toString())),e}function checkInitialSlimDownloads(){return localStorage.getItem("slimDownloads")==="true"}function checkInitialSlimSidebar(){return localStorage.getItem("slimSidebar")==="true"}const state$2=()=>({currentCommit:null,latestCommit:null,updateAvailable:!1,deemixVersion:null,previewVolume:getInitialPreviewVolume(),hasSlimDownloads:checkInitialSlimDownloads(),hasSlimSidebar:checkInitialSlimSidebar()}),actions$2={setAppInfo({commit:e},a){e("SET_CURRENT_COMMIT",a.currentCommit),e("SET_LATEST_COMMIT",a.latestCommit),e("SET_UPDATE_AVAILABLE",a.updateAvailable),e("SET_DEEMIX_VERSION",a.deemixVersion)},setPreviewVolume({commit:e},a){e("SET_PREVIEW_VOLUME",a),localStorage.setItem("previewVolume",a.toString())},setSlimDownloads({commit:e},a){e("SET_SLIM_DOWNLOADS",a),localStorage.setItem("slimDownloads",a.toString())},setSlimSidebar({commit:e},a){e("SET_SLIM_SIDEBAR",a),localStorage.setItem("slimSidebar",a.toString()),Array.from(document.getElementsByClassName("toastify")).forEach(n=>{n.style.transform=`translate(${a?"3rem":"14rem"}, 0)`})}},getters$2={getAppInfo:e=>e,getPreviewVolume:e=>e.previewVolume,getSlimDownloads:e=>e.hasSlimDownloads,getSlimSidebar:e=>e.hasSlimSidebar},mutations$2={SET_CURRENT_COMMIT(e,a){e.currentCommit=a},SET_LATEST_COMMIT(e,a){e.latestCommit=a},SET_UPDATE_AVAILABLE(e,a){e.updateAvailable=a},SET_DEEMIX_VERSION(e,a){e.deemixVersion=a},SET_PREVIEW_VOLUME(e,a){e.previewVolume=a},SET_SLIM_DOWNLOADS(e,a){e.hasSlimDownloads=a},SET_SLIM_SIDEBAR(e,a){e.hasSlimSidebar=a}};var appInfo={state:state$2,getters:getters$2,actions:actions$2,mutations:mutations$2};const getDefaultState=()=>({arl:localStorage.getItem("arl")||"",accessToken:localStorage.getItem("accessToken")||"",status:null,user:{id:null,name:"",picture:""},spotifyUser:{id:localStorage.getItem("spotifyUser"),name:null,picture:null},clientMode:!1}),state$1=()=>getDefaultState(),actions$1={login({commit:e,dispatch:a},n){const{arl:r,user:i,status:s}=n;a("setARL",{arl:r}),e("SET_USER",i),e("SET_STATUS",s)},logout({commit:e}){localStorage.removeItem("arl"),localStorage.removeItem("accessToken"),e("RESET_LOGIN")},setARL({commit:e},a){let{arl:n,saveOnLocalStorage:r}=a;r=typeof r=="undefined"?!0:r,e("SET_ARL",n),r&&localStorage.setItem("arl",n)},setAccessToken({commit:e},a){let{accessToken:n,saveOnLocalStorage:r}=a;r=typeof r=="undefined"?!0:r,e("SET_ACCESS_TOKEN",n),r&&localStorage.setItem("accessToken",n)},removeARL({commit:e}){e("SET_ARL",""),localStorage.removeItem("arl")},removeAccessToken({commit:e}){e("SET_ACCESS_TOKEN",""),localStorage.removeItem("accessToken")},setUser({commit:e},a){e("SET_USER",a)},setClientMode({commit:e},a){e("SET_CLIENT_MODE",a)}},getters$1={getARL:e=>e.arl,getAccessToken:e=>e.accessToken,getUser:e=>e.user,getSpotifyUser:e=>e.spotifyUser,getClientMode:e=>e.clientMode,isLoggedIn:e=>!!e.arl,isLoggedWithSpotify:e=>!!e.spotifyUser.id&&!!e.spotifyUser.name},mutations$1={SET_ARL(e,a){e.arl=a},SET_ACCESS_TOKEN(e,a){e.accessToken=a},SET_STATUS(e,a){e.status=a},SET_USER(e,a){e.user=a},SET_CLIENT_MODE(e,a){e.clientMode=a},RESET_LOGIN(e){const a=e.clientMode;Object.assign(e,getDefaultState()),e.clientMode=a}};var login={state:state$1,getters:getters$1,actions:actions$1,mutations:mutations$1};const state=()=>({artist:"",bitrate:"",cover:"",downloaded:0,errors:[],failed:0,id:"",progress:0,silent:!0,size:0,title:"",type:"",uuid:""}),actions={setErrors({commit:e},a){e("SET_ERRORS",a)}},getters={getErrors:e=>e},mutations={SET_ERRORS(e,a){for(const n in e)if(e.hasOwnProperty(n)){const r=a[n];e[n]=r}}};var errors={state,getters,actions,mutations};Vue$2.use(index);var store=new index.Store({modules:{appInfo,login,errors},strict:!1});const favoriteArtists=ref([]),favoriteAlbums=ref([]),favoriteSpotifyPlaylists=ref([]),favoritePlaylists=ref([]),favoriteTracks=ref([]),isRefreshingFavorites=ref(!1);function refreshFavorites({isInitial:e=!1}){e||(isRefreshingFavorites.value=!0),fetchData("getUserFavorites").then(setAllFavorites).catch(console.error),store.getters.isLoggedWithSpotify&&fetchData("getUserSpotifyPlaylists",{spotifyUser:store.getters.getSpotifyUser.id}).then(a=>{favoriteSpotifyPlaylists.value=a}).catch(console.error)}function setAllFavorites(e){const{tracks:a,albums:n,artists:r,playlists:i}=e;isRefreshingFavorites.value=!1,favoriteArtists.value=r,favoriteAlbums.value=n,favoritePlaylists.value=i,favoriteTracks.value=a}function useFavorites(){return{favoriteArtists,favoriteAlbums,favoriteSpotifyPlaylists,favoritePlaylists,favoriteTracks,isRefreshingFavorites,refreshFavorites}}var script$d=defineComponent({components:{PreviewControls,CoverContainer,BaseTabs,BaseTab},setup(e,a){const n=reactive({activeTab:"playlist",tabs:["playlist","album","artist","track"]}),{favoriteArtists:r,favoriteAlbums:i,favoriteSpotifyPlaylists:s,favoritePlaylists:l,favoriteTracks:c,isRefreshingFavorites:o,refreshFavorites:u}=useFavorites();return u({isInitial:!0}),watch(o,(d,f)=>{!(f&&!d)||toast(a.root.$t("toasts.refreshFavs"),"done",!0)}),{...toRefs(n),tracks:c,albums:i,artists:r,playlists:l,spotifyPlaylists:s,refreshFavorites:u,isRefreshingFavorites:o}},computed:{activeTabEmpty(){return this.getActiveRelease()?.length===0}},methods:{playPausePreview,convertDuration,downloadAllOfType(){try{const e=this.getActiveRelease();if(this.activeTab==="track"){const a=this.getLovedTracksPlaylist();sendAddToQueue(a.link)}else sendAddToQueue(aggregateDownloadLinks(e))}catch(e){console.error(e.message)}},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},getActiveRelease(e=this.activeTab){let a;switch(e){case"playlist":a=this.playlists;break;case"album":a=this.albums;break;case"artist":a=this.artists;break;case"track":a=this.tracks;break}return a},getTabLength(e=this.activeTab){return this[`${e}s`]?.length||0},getLovedTracksPlaylist(){const e=this.playlists.filter(a=>a.is_loved_track);if(e.length!==0)return e[0];throw new Error("No loved tracks playlist!")}}});const __vue_script__$d=script$d;var __vue_render__$d=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",[n("h1",{staticClass:"mb-8 text-5xl"},[e._v(` `+e._s(e.$t("favorites.title"))+` `),n("div",{ref:"reloadButton",staticClass:"inline-block clickable",attrs:{"aria-label":"reload",role:"button"},on:{click:e.refreshFavorites}},[n("i",{staticClass:"material-icons",class:{spin:e.isRefreshingFavorites}},[e._v("sync")])])]),e._v(" "),n("BaseTabs",e._l(e.tabs,function(r){return n("BaseTab",{key:r,class:{active:e.activeTab===r},on:{click:function(i){e.activeTab=r}}},[e._v(` `+e._s(e.$tc("globals.listTabs."+r,2))+` `)])}),1),e._v(" "),e.activeTabEmpty?e._e():n("button",{staticClass:"btn btn-primary",staticStyle:{"margin-bottom":"2rem"},on:{click:e.downloadAllOfType}},[e._v(` `+e._s(e.$t("globals.download",{thing:e.$tc("globals.listTabs."+e.activeTab+"N",e.getTabLength())}))+` - `)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.activeTab==="playlist",expression:"activeTab === 'playlist'"}]},[e.playlists.length==0?n("div",[n("h1",[e._v(e._s(e.$t("favorites.noPlaylists")))])]):e._e(),e._v(" "),e.playlists.length>0||e.spotifyPlaylists>0?n("div",{staticClass:"release-grid"},[e._l(e.playlists,function(r){return n("div",{key:r.id,staticClass:"release"},[n("router-link",{staticClass:"cursor-pointer",attrs:{to:{name:"Playlist",params:{id:r.id}},tag:"div"}},[n("CoverContainer",{attrs:{cover:r.picture_medium,link:r.link,"is-rounded":""},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(r.title))])],1),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v(` + `)]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.activeTab==="playlist",expression:"activeTab === 'playlist'"}]},[e.playlists.length==0?n("div",[n("h1",[e._v(e._s(e.$t("favorites.noPlaylists")))])]):e._e(),e._v(" "),e.playlists.length>0||e.spotifyPlaylists.length>0?n("div",{staticClass:"release-grid"},[e._l(e.playlists,function(r){return n("div",{key:r.id,staticClass:"release"},[n("router-link",{staticClass:"cursor-pointer",attrs:{to:{name:"Playlist",params:{id:r.id}},tag:"div"}},[n("CoverContainer",{attrs:{cover:r.picture_medium,link:r.link,"is-rounded":""},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(r.title))])],1),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v(` `+e._s(e.$t("globals.by",{artist:r.creator.name})+" - "+e.$tc("globals.listTabs.trackN",r.nb_tracks))+` `)])],1)}),e._v(" "),e._l(e.spotifyPlaylists,function(r){return n("div",{key:r.id,staticClass:"release"},[n("router-link",{staticClass:"cursor-pointer",attrs:{to:{name:"Spotify Playlist",params:{id:r.id}},tag:"div"}},[n("CoverContainer",{attrs:{cover:r.picture_medium,link:r.link,"is-rounded":""},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(r.title))])],1),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v(` `+e._s(e.$t("globals.by",{artist:r.creator.name})+" - "+e.$tc("globals.listTabs.trackN",r.nb_tracks))+` - `)])],1)})],2):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.activeTab==="album",expression:"activeTab === 'album'"}]},[e.albums.length==0?n("div",[n("h1",[e._v(e._s(e.$t("favorites.noAlbums")))])]):e._e(),e._v(" "),e.albums.length>0?n("div",{staticClass:"release-grid"},e._l(e.albums,function(r){return n("router-link",{key:r.id,staticClass:"release clickable",attrs:{to:{name:"Album",params:{id:r.id}},tag:"div"}},[n("CoverContainer",{attrs:{cover:r.cover_medium,link:r.link,"is-rounded":""},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(r.title))]),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v(e._s(""+e.$t("globals.by",{artist:r.artist.name})))])],1)}),1):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.activeTab==="artist",expression:"activeTab === 'artist'"}]},[e.artists.length==0?n("div",[n("h1",[e._v(e._s(e.$t("favorites.noArtists")))])]):e._e(),e._v(" "),e.artists.length>0?n("div",{staticClass:"release-grid"},e._l(e.artists,function(r){return n("router-link",{key:r.id,staticClass:"release clickable",attrs:{to:{name:"Artist",params:{id:r.id}},tag:"div"}},[n("CoverContainer",{attrs:{cover:r.picture_medium,link:r.link,"is-circle":""},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(r.name))])],1)}),1):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.activeTab==="track",expression:"activeTab === 'track'"}]},[e.tracks.length==0?n("div",[n("h1",[e._v(e._s(e.$t("favorites.noTracks")))])]):e._e(),e._v(" "),e.tracks.length>0?n("table",{staticClass:"table"},e._l(e.tracks,function(r){return n("tr",{staticClass:"track_row"},[n("td",{staticClass:"p-3 text-center cursor-default",class:{first:r.position===1}},[e._v(` + `)])],1)})],2):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.activeTab==="album",expression:"activeTab === 'album'"}]},[e.albums.length===0?n("div",[n("h1",[e._v(e._s(e.$t("favorites.noAlbums")))])]):e._e(),e._v(" "),e.albums.length>0?n("div",{staticClass:"release-grid"},e._l(e.albums,function(r){return n("router-link",{key:r.id,staticClass:"release clickable",attrs:{to:{name:"Album",params:{id:r.id}},tag:"div"}},[n("CoverContainer",{attrs:{cover:r.cover_medium,link:r.link,"is-rounded":""},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(r.title))]),e._v(" "),n("p",{staticClass:"secondary-text"},[e._v(e._s(""+e.$t("globals.by",{artist:r.artist.name})))])],1)}),1):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.activeTab==="artist",expression:"activeTab === 'artist'"}]},[e.artists.length==0?n("div",[n("h1",[e._v(e._s(e.$t("favorites.noArtists")))])]):e._e(),e._v(" "),e.artists.length>0?n("div",{staticClass:"release-grid"},e._l(e.artists,function(r){return n("router-link",{key:r.id,staticClass:"release clickable",attrs:{to:{name:"Artist",params:{id:r.id}},tag:"div"}},[n("CoverContainer",{attrs:{cover:r.picture_medium,link:r.link,"is-circle":""},on:{click:function(i){return i.stopPropagation(),e.addToQueue(i)}}}),e._v(" "),n("p",{staticClass:"primary-text"},[e._v(e._s(r.name))])],1)}),1):e._e()]),e._v(" "),n("div",{directives:[{name:"show",rawName:"v-show",value:e.activeTab==="track",expression:"activeTab === 'track'"}]},[e.tracks.length==0?n("div",[n("h1",[e._v(e._s(e.$t("favorites.noTracks")))])]):e._e(),e._v(" "),e.tracks.length>0?n("table",{staticClass:"table"},e._l(e.tracks,function(r){return n("tr",{staticClass:"track_row"},[n("td",{staticClass:"p-3 text-center cursor-default",class:{first:r.position===1}},[e._v(` `+e._s(r.position)+` `)]),e._v(" "),n("td",[n("span",{staticClass:"relative inline-block rounded cursor-pointer",attrs:{"data-preview":r.preview},on:{click:e.playPausePreview}},[r.preview?n("PreviewControls"):e._e(),e._v(" "),n("img",{staticClass:"rounded coverart",attrs:{src:r.album.cover_small}})],1)]),e._v(" "),n("td",{staticClass:"table__cell--large"},[e._v(` `+e._s(r.title+(r.title_version&&r.title.indexOf(r.title_version)==-1?" "+r.title_version:""))+` @@ -4886,7 +4886,7 @@ a { `+e._s(e.$t("settings.spotify.title"))+` `)])]},proxy:!0}])},[e._v(" "),n("RouterLink",{attrs:{to:{name:"Spotify Features"}}},[e._v(` `+e._s(e.$t("settings.spotify.question"))+` - `)]),e._v(" "),n("div",{staticClass:"input-group"},[n("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.clientID")))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyFeatures.clientId,expression:"spotifyFeatures.clientId"}],attrs:{type:"text"},domProps:{value:e.spotifyFeatures.clientId},on:{input:function(r){r.target.composing||e.$set(e.spotifyFeatures,"clientId",r.target.value)}}})]),e._v(" "),n("div",{staticClass:"input-group"},[n("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.clientSecret")))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyFeatures.clientSecret,expression:"spotifyFeatures.clientSecret"}],attrs:{type:"password"},domProps:{value:e.spotifyFeatures.clientSecret},on:{input:function(r){r.target.composing||e.$set(e.spotifyFeatures,"clientSecret",r.target.value)}}})]),e._v(" "),n("div",{staticClass:"input-group"},[n("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.username")))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyUser,expression:"spotifyUser"}],attrs:{type:"text"},domProps:{value:e.spotifyUser},on:{input:function(r){r.target.composing||(e.spotifyUser=r.target.value)}}})])],1),e._v(" "),n("footer",{staticClass:"bg-background-main"},[n("button",{staticClass:"mr-2 btn btn-primary",on:{click:e.resetToDefault}},[e._v(e._s(e.$t("settings.reset")))]),e._v(" "),n("button",{staticClass:"btn btn-primary",on:{click:e.saveSettings}},[e._v(e._s(e.$t("settings.save")))])])],1)},__vue_staticRenderFns__$1=[function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("label",[n("span",[e._v("E-mail")]),e._v(" "),n("input",{attrs:{type:"text",name:"email"}})])},function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("label",[n("span",[e._v("Password")]),e._v(" "),n("input",{attrs:{type:"password",name:"password"}})])}];const __vue_inject_styles__$1=function(e){!e||e("data-v-1b6aaec8_0",{source:"#logged_in_info[data-v-1b6aaec8]{display:flex;align-items:center;flex-direction:column;justify-content:space-evenly;height:250px}.locale-flag[data-v-1b6aaec8]{justify-content:center;cursor:pointer;width:60px}.locale-flag[data-v-1b6aaec8]:not(:last-child){margin-right:10px}.locale-flag.locale-flag--current[data-v-1b6aaec8] svg{filter:brightness(1)!important}.locale-flag[data-v-1b6aaec8] svg{width:40px!important;height:40px!important;filter:brightness(.5)}.settings-group[data-v-1b6aaec8]{border-top-width:1px;border-color:gray}.settings-group__header[data-v-1b6aaec8]{display:inline-flex;align-items:center;padding-top:2rem;padding-bottom:2rem;font-size:1.5rem}.settings-group__header i.material-icons[data-v-1b6aaec8]{margin-right:1rem}.settings-container[data-v-1b6aaec8]{display:flex}.settings-container__half[data-v-1b6aaec8]{width:50%}.settings-container__third[data-v-1b6aaec8]{width:33%}.settings-container__third--only-checkbox[data-v-1b6aaec8]{display:flex;align-items:start;flex-direction:column;justify-content:center}.settings-container__half>*[data-v-1b6aaec8],.settings-container__third>*[data-v-1b6aaec8]{margin-bottom:1rem}.with-checkbox[data-v-1b6aaec8]{display:flex;align-items:center}.with-checkbox [type=checkbox][data-v-1b6aaec8]{cursor:pointer}.with-checkbox .checkbox-text[data-v-1b6aaec8]{margin-left:10px;cursor:pointer;user-select:none}.input-group .input-group-text[data-v-1b6aaec8]{margin-bottom:.5rem}",map:void 0,media:void 0})},__vue_scope_id__$1="data-v-1b6aaec8",__vue_module_identifier__=void 0,__vue_is_functional_template__$1=!1;function __vue_normalize__$1(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="Settings.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__.styles||(__vue_create_injector__.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` + `)]),e._v(" "),n("div",{staticClass:"input-group"},[n("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.clientID")))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyFeatures.clientId,expression:"spotifyFeatures.clientId"}],attrs:{type:"text"},domProps:{value:e.spotifyFeatures.clientId},on:{input:function(r){r.target.composing||e.$set(e.spotifyFeatures,"clientId",r.target.value)}}})]),e._v(" "),n("div",{staticClass:"input-group"},[n("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.clientSecret")))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyFeatures.clientSecret,expression:"spotifyFeatures.clientSecret"}],attrs:{type:"password"},domProps:{value:e.spotifyFeatures.clientSecret},on:{input:function(r){r.target.composing||e.$set(e.spotifyFeatures,"clientSecret",r.target.value)}}})]),e._v(" "),n("div",{staticClass:"input-group"},[n("p",{staticClass:"input-group-text"},[e._v(e._s(e.$t("settings.spotify.username")))]),e._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:e.spotifyUser,expression:"spotifyUser"}],attrs:{type:"text"},domProps:{value:e.spotifyUser},on:{input:function(r){r.target.composing||(e.spotifyUser=r.target.value)}}})])],1),e._v(" "),n("footer",{staticClass:"bg-background-main"},[n("button",{staticClass:"mr-2 btn btn-primary",on:{click:e.resetToDefault}},[e._v(e._s(e.$t("settings.reset")))]),e._v(" "),n("button",{staticClass:"btn btn-primary",on:{click:e.saveSettings}},[e._v(e._s(e.$t("settings.save")))])])],1)},__vue_staticRenderFns__$1=[function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("label",[n("span",[e._v("E-mail")]),e._v(" "),n("input",{attrs:{type:"text",name:"email"}})])},function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("label",[n("span",[e._v("Password")]),e._v(" "),n("input",{attrs:{type:"password",name:"password"}})])}];const __vue_inject_styles__$1=function(e){!e||e("data-v-1cc4c9a6_0",{source:"#logged_in_info[data-v-1cc4c9a6]{display:flex;align-items:center;flex-direction:column;justify-content:space-evenly;height:250px}.locale-flag[data-v-1cc4c9a6]{justify-content:center;cursor:pointer;width:60px}.locale-flag[data-v-1cc4c9a6]:not(:last-child){margin-right:10px}.locale-flag.locale-flag--current[data-v-1cc4c9a6] svg{filter:brightness(1)!important}.locale-flag[data-v-1cc4c9a6] svg{width:40px!important;height:40px!important;filter:brightness(.5)}.settings-group[data-v-1cc4c9a6]{border-top-width:1px;border-color:gray}.settings-group__header[data-v-1cc4c9a6]{display:inline-flex;align-items:center;padding-top:2rem;padding-bottom:2rem;font-size:1.5rem}.settings-group__header i.material-icons[data-v-1cc4c9a6]{margin-right:1rem}.settings-container[data-v-1cc4c9a6]{display:flex}.settings-container__half[data-v-1cc4c9a6]{width:50%}.settings-container__third[data-v-1cc4c9a6]{width:33%}.settings-container__third--only-checkbox[data-v-1cc4c9a6]{display:flex;align-items:start;flex-direction:column;justify-content:center}.settings-container__half>*[data-v-1cc4c9a6],.settings-container__third>*[data-v-1cc4c9a6]{margin-bottom:1rem}.with-checkbox[data-v-1cc4c9a6]{display:flex;align-items:center}.with-checkbox [type=checkbox][data-v-1cc4c9a6]{cursor:pointer}.with-checkbox .checkbox-text[data-v-1cc4c9a6]{margin-left:10px;cursor:pointer;user-select:none}.input-group .input-group-text[data-v-1cc4c9a6]{margin-bottom:.5rem}",map:void 0,media:void 0})},__vue_scope_id__$1="data-v-1cc4c9a6",__vue_module_identifier__=void 0,__vue_is_functional_template__$1=!1;function __vue_normalize__$1(e,a,n,r,i,s,l,c){const o=(typeof n=="function"?n.options:n)||{};o.__file="Settings.vue",o.render||(o.render=e.render,o.staticRenderFns=e.staticRenderFns,o._compiled=!0,i&&(o.functional=!0)),o._scopeId=r;{let u;if(a&&(u=function(d){a.call(this,l(d))}),u!==void 0)if(o.functional){const d=o.render;o.render=function(h,m){return u.call(m),d(h,m)}}else{const d=o.beforeCreate;o.beforeCreate=d?[].concat(d,u):[u]}}return o}function __vue_create_injector__(){const e=document.head||document.getElementsByTagName("head")[0],a=__vue_create_injector__.styles||(__vue_create_injector__.styles={}),n=typeof navigator!="undefined"&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(i,s){if(document.querySelector('style[data-vue-ssr-id~="'+i+'"]'))return;const l=n?s.media||"default":i,c=a[l]||(a[l]={ids:[],parts:[],element:void 0});if(!c.ids.includes(i)){let o=s.source,u=c.ids.length;if(c.ids.push(i),s.map&&(o+=` /*# sourceURL=`+s.map.sources[0]+" */",o+=` /*# sourceMappingURL=data:application/json;base64,`+btoa(unescape(encodeURIComponent(JSON.stringify(s.map))))+" */"),n&&(c.element=c.element||document.querySelector("style[data-group="+l+"]")),!c.element){const d=c.element=document.createElement("style");d.type="text/css",s.media&&d.setAttribute("media",s.media),n&&(d.setAttribute("data-group",l),d.setAttribute("data-next-index","0")),e.appendChild(d)}if(n&&(u=parseInt(c.element.getAttribute("data-next-index")),c.element.setAttribute("data-next-index",u+1)),c.element.styleSheet)c.parts.push(o),c.element.styleSheet.cssText=c.parts.filter(Boolean).join(` `);else{const d=document.createTextNode(o),f=c.element.childNodes;f[u]&&c.element.removeChild(f[u]),f.length?c.element.insertBefore(d,f[u]):c.element.appendChild(d)}}}}var Settings=__vue_normalize__$1({render:__vue_render__$1,staticRenderFns:__vue_staticRenderFns__$1},__vue_inject_styles__$1,__vue_script__$1,__vue_scope_id__$1,__vue_is_functional_template__$1,__vue_module_identifier__,__vue_create_injector__),script={data(){return{title:"",metadata:"",release_date:"",label:"",explicit:!1,image:"",type:"empty",link:"",body:[]}},mounted(){EventBus.$on("showAlbum",this.showAlbum),EventBus.$on("showPlaylist",this.showPlaylist),EventBus.$on("showSpotifyPlaylist",this.showSpotifyPlaylist)},methods:{playPausePreview,reset(){this.title="Loading...",this.image="",this.metadata="",this.label="",this.release_date="",this.explicit=!1,this.type="empty",this.body=[]},addToQueue(e){sendAddToQueue(e.currentTarget.dataset.link)},toggleAll(e){this.body.forEach(a=>{a.type==="track"&&(a.selected=e.currentTarget.checked)})},selectedLinks(){const e=[];return this.body&&this.body.forEach(a=>{a.type==="track"&&a.selected&&e.push(this.type==="spotifyPlaylist"?a.uri:a.link)}),e.join(";")},convertDuration:Utils.convertDuration,showAlbum(e){this.reset();const{id:a,title:n,explicit_lyrics:r,label:i,artist:{name:s},tracks:l,tracks:{length:c},release_date:o,cover_xl:u}=e;this.type="album",this.link=`https://www.deezer.com/album/${a}`,this.title=n,this.explicit=r,this.label=i,this.metadata=`${s} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,this.release_date=o.substring(0,10),this.image=u,isEmpty(l)?this.body=null:this.body=l},showPlaylist(e){this.reset();const{id:a,title:n,picture_xl:r,creation_date:i,creator:{name:s},tracks:l,tracks:{length:c}}=e;this.type="playlist",this.link=`https://www.deezer.com/playlist/${a}`,this.title=n,this.image=r,this.release_date=i.substring(0,10),this.metadata=`${this.$t("globals.by",{artist:s})} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,isEmpty(l)?this.body=null:this.body=l},showSpotifyPlaylist(e){this.reset();const{uri:a,name:n,images:r,images:{length:i},owner:{display_name:s},tracks:l,tracks:{length:c}}=e;this.type="spotifyPlaylist",this.link=a,this.title=n,this.image=i?r[0].url:"https://e-cdns-images.dzcdn.net/images/cover/d41d8cd98f00b204e9800998ecf8427e/1000x1000-000000-80-0-0.jpg",this.release_date="",this.metadata=`${this.$t("globals.by",{artist:s})} \u2022 ${this.$tc("globals.listTabs.trackN",c)}`,isEmpty(l)?this.body=null:this.body=l},selectRow(e,a){a.selected=!a.selected}}};const __vue_script__=script;var __vue_render__=function(){var e=this,a=e.$createElement,n=e._self._c||a;return n("div",{ref:"root",staticClass:"relative fixed-footer bg-background-main image-header"},[n("header",{style:{"background-image":"linear-gradient(to bottom, transparent 0%, var(--main-background) 100%), url('"+e.image+"')"}},[n("h1",{staticClass:"flex items-center m-0 text-5xl"},[e._v(` diff --git a/src/components/downloads/TheDownloadBar.vue b/src/components/downloads/TheDownloadBar.vue index b7bd638..2ae9618 100644 --- a/src/components/downloads/TheDownloadBar.vue +++ b/src/components/downloads/TheDownloadBar.vue @@ -220,14 +220,11 @@ export default { queue: initQueueList, restored } = data - console.log({ initQueueList }) const initQueueComplete = Object.values(initQueueList) .filter(el => ['completed', 'withErrors', 'failed'].includes(el.status)) .map(el => el.uuid) - console.log({ initQueueComplete }) - if (initQueueComplete && initQueueComplete.length) { initQueueComplete.forEach(item => { initQueueList[item].silent = true diff --git a/src/components/globals/TheContextMenu.vue b/src/components/globals/TheContextMenu.vue index a0598b6..929c935 100644 --- a/src/components/globals/TheContextMenu.vue +++ b/src/components/globals/TheContextMenu.vue @@ -124,7 +124,6 @@ export default { }, methods: { showSearchbarMenu(url) { - console.log(url) const searchbar = document.getElementById('searchbar') searchbar.dataset.cmLink = url const contextMenuEvent = { diff --git a/src/components/pages/Favorites.vue b/src/components/pages/Favorites.vue index b639c41..5555f75 100644 --- a/src/components/pages/Favorites.vue +++ b/src/components/pages/Favorites.vue @@ -27,7 +27,7 @@

{{ $t('favorites.noPlaylists') }}

-
+
@@ -63,7 +63,7 @@
-
+

{{ $t('favorites.noAlbums') }}

@@ -183,7 +183,7 @@ export default defineComponent({ BaseTabs, BaseTab }, - setup(props, ctx) { + setup(_, ctx) { const state = reactive({ activeTab: 'playlist', tabs: ['playlist', 'album', 'artist', 'track'] @@ -251,7 +251,6 @@ export default defineComponent({ }, getActiveRelease(tab = this.activeTab) { let toDownload - // console.log({ tab, play: this.playlists }) switch (tab) { case 'playlist': diff --git a/src/components/pages/Search.vue b/src/components/pages/Search.vue index 53ee2f0..89d3af0 100644 --- a/src/components/pages/Search.vue +++ b/src/components/pages/Search.vue @@ -191,12 +191,9 @@ export default defineComponent({ const currentTabKey = `${type}Tab` let next = total - // console.log({ currentTabKey, test: state.currentTab.searchType }) - if (nextResult) { next = parseInt(nextResult.match(/index=(\d*)/)[1]) } - // console.log({ next, total, type, newData }) if (state.results[currentTabKey].total !== total) { state.results[currentTabKey].total = total diff --git a/src/store/modules/login.js b/src/store/modules/login.js index cd67165..b4d0265 100644 --- a/src/store/modules/login.js +++ b/src/store/modules/login.js @@ -81,7 +81,7 @@ const getters = { getClientMode: state => state.clientMode, isLoggedIn: state => !!state.arl, - isLoggedWithSpotify: state => !!state.spotifyUser.id + isLoggedWithSpotify: state => !!state.spotifyUser.id && !!state.spotifyUser.name } const mutations = { diff --git a/src/utils/socket.js b/src/utils/socket.js index a1c2972..c3c1072 100644 --- a/src/utils/socket.js +++ b/src/utils/socket.js @@ -12,7 +12,7 @@ class CustomSocket extends WebSocket { on(key, cb) { if (!Object.keys(this.listeners).includes(key)) { - console.log('on:', key) + // console.log('on:', key) this.listeners[key] = cb this.addEventListener('message', event => { @@ -27,7 +27,7 @@ class CustomSocket extends WebSocket { off(key) { if (Object.keys(this.listeners).includes(key)) { - console.log('off:', key) + // console.log('off:', key) this.removeEventListener('message', this.listeners[key]) delete this.listeners[key] }