diff --git a/public/js/bundle.js b/public/js/bundle.js index af73163..689516d 100644 --- a/public/js/bundle.js +++ b/public/js/bundle.js @@ -17,14 +17,14 @@ function(e){if(Number(e.version.split(".")[0])>=2)e.mixin({beforeCreate:a});else * * Copyright (C) 2018 Varun A P */ -!function(t,a){e.exports?e.exports=a():t.Toastify=a()}(Oo,(function(e){var t=function(e){return new t.lib.init(e)};function a(e,t){return!(!e||"string"!=typeof t)&&!!(e.className&&e.className.trim().split(/\s+/gi).indexOf(t)>-1)}return t.lib=t.prototype={toastify:"1.8.0",constructor:t,init:function(e){return e||(e={}),this.options={},this.toastElement=null,this.options.text=e.text||"Hi there!",this.options.node=e.node,this.options.duration=0===e.duration?0:e.duration||3e3,this.options.selector=e.selector,this.options.callback=e.callback||function(){},this.options.destination=e.destination,this.options.newWindow=e.newWindow||!1,this.options.close=e.close||!1,this.options.gravity="bottom"===e.gravity?"toastify-bottom":"toastify-top",this.options.positionLeft=e.positionLeft||!1,this.options.position=e.position||"",this.options.backgroundColor=e.backgroundColor,this.options.avatar=e.avatar||"",this.options.className=e.className||"",this.options.stopOnFocus=void 0===e.stopOnFocus||e.stopOnFocus,this.options.onClick=e.onClick,this},buildToast:function(){if(!this.options)throw"Toastify is not initialized";var e=document.createElement("div");if(e.className="toastify on "+this.options.className,this.options.position?e.className+=" toastify-"+this.options.position:!0===this.options.positionLeft?(e.className+=" toastify-left",console.warn("Property `positionLeft` will be depreciated in further versions. Please use `position` instead.")):e.className+=" toastify-right",e.className+=" "+this.options.gravity,this.options.backgroundColor&&(e.style.background=this.options.backgroundColor),this.options.node&&this.options.node.nodeType===Node.ELEMENT_NODE)e.appendChild(this.options.node);else if(e.innerHTML=this.options.text,""!==this.options.avatar){var t=document.createElement("img");t.src=this.options.avatar,t.className="toastify-avatar","left"==this.options.position||!0===this.options.positionLeft?e.appendChild(t):e.insertAdjacentElement("beforeend",t)}if(!0===this.options.close){var a=document.createElement("span");a.innerHTML="✖",a.className="toast-close",a.addEventListener("click",function(e){e.stopPropagation(),this.removeElement(this.toastElement),window.clearTimeout(this.toastElement.timeOutValue)}.bind(this));var n=window.innerWidth>0?window.innerWidth:screen.width;("left"==this.options.position||!0===this.options.positionLeft)&&n>360?e.insertAdjacentElement("afterbegin",a):e.appendChild(a)}if(this.options.stopOnFocus&&this.options.duration>0){const t=this;e.addEventListener("mouseover",(function(t){window.clearTimeout(e.timeOutValue)})),e.addEventListener("mouseleave",(function(){e.timeOutValue=window.setTimeout((function(){t.removeElement(e)}),t.options.duration)}))}return void 0!==this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),!0===this.options.newWindow?window.open(this.options.destination,"_blank"):window.location=this.options.destination}.bind(this)),"function"==typeof this.options.onClick&&void 0===this.options.destination&&e.addEventListener("click",function(e){e.stopPropagation(),this.options.onClick()}.bind(this)),e},showToast:function(){var e;if(this.toastElement=this.buildToast(),!(e=void 0===this.options.selector?document.body:document.getElementById(this.options.selector)))throw"Root element is not defined";return e.insertBefore(this.toastElement,e.firstChild),t.reposition(),this.options.duration>0&&(this.toastElement.timeOutValue=window.setTimeout(function(){this.removeElement(this.toastElement)}.bind(this),this.options.duration)),this},hideToast:function(){this.toastElement.timeOutValue&&clearTimeout(this.toastElement.timeOutValue),this.removeElement(this.toastElement)},removeElement:function(e){e.className=e.className.replace(" on",""),window.setTimeout(function(){this.options.node&&this.options.node.parentNode&&this.options.node.parentNode.removeChild(this.options.node),e.parentNode&&e.parentNode.removeChild(e),this.options.callback.call(e),t.reposition()}.bind(this),400)}},t.reposition=function(){for(var e,t={top:15,bottom:15},n={top:15,bottom:15},i={top:15,bottom:15},r=document.getElementsByClassName("toastify"),s=0;s0?window.innerWidth:screen.width)<=360?(r[s].style[e]=i[e]+"px",i[e]+=o+15):!0===a(r[s],"toastify-left")?(r[s].style[e]=t[e]+"px",t[e]+=o+15):(r[s].style[e]=n[e]+"px",n[e]+=o+15)}return this},t.lib.init.prototype=t.lib,t}))}));let qo={};const Vo=function(e,t=null,a=!0,n=null){if(qo[n]){let i=qo[n],r=document.querySelectorAll(`div.toastify[toast_id=${n}]`);e&&r.forEach(t=>{t.querySelectorAll(".toast-message").forEach(t=>{t.innerHTML=e})}),t&&(t="loading"==t?'
':`${t}`,r.forEach(e=>{e.querySelectorAll(".toast-icon").forEach(e=>{e.innerHTML=t})})),null!==a&&a&&(r.forEach(e=>{e.classList.add("dismissable")}),setTimeout(()=>{i.hideToast(),delete qo[n]},3e3))}else{let i=Uo({text:`${t=null==t?"":"loading"==t?'
':`${t}`}
${e}`,duration:a?3e3:0,gravity:"bottom",position:"left",className:a?"dismissable":"",onClick:function(){let e=!0;if(n){let t=document.querySelector(`div.toastify[toast_id=${n}]`).classList;t&&(e=-1!=Array.prototype.slice.call(t).indexOf("dismissable"))}i&&e&&(i.hideToast(),n&&delete qo[n])}}).showToast();n&&(qo[n]=i,i.toastElement.setAttribute("toast_id",n))}};Bo.on("toast",e=>{const{msg:t,icon:a,dismiss:n,id:i}=e;Vo(t,a||null,void 0===n||n,i||null)});const Go={components:{QueueItem:$o},data:()=>({cachedTabWidth:parseInt(localStorage.getItem("downloadTabWidth"))||300,queue:[],queueList:{},queueComplete:[]}),computed:{..._o({clientMode:"getClientMode"})},created(){const e=e=>{e.ctrlKey&&"b"===e.key&&this.toggleDownloadTab()};document.addEventListener("keyup",e),this.$on("hook:destroyed",()=>{document.removeEventListener("keyup",e)})},mounted(){Bo.on("startDownload",this.startDownload),Bo.on("startConversion",this.startConversion),Bo.on("init_downloadQueue",this.initQueue),Bo.on("addedToQueue",this.addToQueue),Bo.on("updateQueue",this.updateQueue),Bo.on("removedFromQueue",this.removeFromQueue),Bo.on("finishDownload",this.finishDownload),Bo.on("removedAllDownloads",this.removeAllDownloads),Bo.on("removedFinishedDownloads",this.removedFinishedDownloads),"true"===localStorage.getItem("slimDownloads")&&this.$refs.list.classList.add("slim"),"true"===localStorage.getItem("downloadTabOpen")&&(this.$refs.container.classList.remove("tab_hidden"),this.setTabWidth(this.cachedTabWidth)),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",this.handleDrag)}),window.addEventListener("beforeunload",()=>{localStorage.setItem("downloadTabWidth",this.cachedTabWidth)})},methods:{...Ao(["setErrors"]),onRemoveItem(e){Bo.emit("removeFromQueue",e)},setTabWidth(e){void 0===e?(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{queue:t,queueComplete:a,currentItem:n,queueList:i,restored:r}=e;a.length&&a.forEach(e=>{i[e].silent=!0,this.addToQueue(i[e])}),n&&(i[n].silent=!0,this.addToQueue(i[n],!0)),t.forEach(e=>{i[e].silent=!0,this.addToQueue(i[e])}),r&&(Vo(this.$t("toasts.queueRestored"),"done",!0,"restoring_queue"),Bo.emit("queueRestored"))},addToQueue(e,t=!1){if(Array.isArray(e)){if(e.length>1)return e.forEach((e,t)=>{e.silent=!0,this.addToQueue(e)}),void Vo(this.$t("toasts.addedMoreToQueue",{n:e.length}),"playlist_add_check");e=e[0]}this.$set(e,"current",t),this.$set(this.queueList,e.uuid,e);if(e.downloaded+e.failed==e.size){const t=-1==this.queueComplete.indexOf(e.uuid);this.$set(this.queueList[e.uuid],"status","download finished"),t&&this.queueComplete.push(e.uuid)}else{-1==this.queue.indexOf(e.uuid)&&this.queue.push(e.uuid)}(e.progress>0&&e.progress<100||t)&&this.startDownload(e.uuid),e.silent||Vo(this.$t("toasts.addedToQueue",{item:e.title}),"playlist_add_check")},updateQueue(e){const{uuid:t,downloaded:a,failed:n,progress:i,conversion:r,error:s,data:o,errid:l}=e;t&&this.queue.indexOf(t)>-1&&(a&&this.queueList[t].downloaded++,n&&(this.queueList[t].failed++,this.queueList[t].errors.push({message:s,data:o,errid:l})),i&&(this.queueList[t].progress=i),r&&(this.queueList[t].conversion=r))},removeFromQueue(e){let t=this.queue.indexOf(e);t>-1&&(this.$delete(this.queue,t),this.$delete(this.queueList,e))},removeAllDownloads(e){if(this.queueComplete=[],e){this.queue=[e];let t=this.queueList[e];this.queueList={},this.queueList[e]=t}else this.queue=[],this.queueList={}},removedFinishedDownloads(){this.queueComplete.forEach(e=>{this.$delete(this.queueList,e)}),this.queueComplete=[]},toggleDownloadTab(){this.setTabWidth(),this.$refs.container.style.transition="all 250ms ease-in-out";let e=this.$refs.container.classList.toggle("tab_hidden");e||this.setTabWidth(this.cachedTabWidth),localStorage.setItem("downloadTabOpen",!e)},cleanQueue(){Bo.emit("removeFinishedDownloads")},cancelQueue(){Bo.emit("cancelAllDownloads")},openDownloadsFolder(){Bo.emit("openDownloadsFolder")},handleDrag(e){let t=window.innerWidth-e.pageX+2;t<250?t=250:t>500&&(t=500),this.cachedTabWidth=t,this.setTabWidth(t)},startDrag(){document.addEventListener("mousemove",this.handleDrag)},startDownload(e){this.$set(this.queueList[e],"status","downloading")},finishDownload(e){if(!(this.queue.indexOf(e)>-1))return;this.$set(this.queueList[e],"status","download finished"),Vo(this.$t("toasts.finishDownload",{item:this.queueList[e].title}),"done");let t=this.queue.indexOf(e);t>-1&&(this.queue.splice(t,1),this.queueComplete.push(e)),this.queue.length<=0&&Vo(this.$t("toasts.allDownloaded"),"done_all")},startConversion(e){this.$set(this.queueList[e],"status","converting"),this.$set(this.queueList[e],"conversion",0)},async showErrorsTab(e){await this.setErrors(e),this.$router.push({name:"Errors"})}}};var Ho=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"container",staticClass:"tab_hidden",attrs:{id:"download_tab_container","data-label":e.$t("downloads"),"aria-label":"downloads"},on:{transitionend:function(t){e.$refs.container.style.transition=""}}},[a("div",{ref:"dragHandler",attrs:{id:"download_tab_drag_handler"},on:{mousedown:function(t){return t.preventDefault(),e.startDrag(t)}}}),e._v(" "),a("i",{ref:"toggler",staticClass:"material-icons download_bar_icon",attrs:{id:"toggle_download_tab",title:e.$t("globals.toggle_download_tab_hint")},on:{click:function(t){return t.preventDefault(),e.toggleDownloadTab(t)}}}),e._v(" "),a("div",{attrs:{id:"queue_buttons"}},[e.clientMode?a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.open_downloads_folder")},on:{click:e.openDownloadsFolder}},[e._v("\n\t\t\tfolder_open\n\t\t")]):e._e(),e._v(" "),a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.clean_queue_hint")},on:{click:e.cleanQueue}},[e._v("\n\t\t\tclear_all\n\t\t")]),e._v(" "),a("i",{staticClass:"material-icons download_bar_icon",attrs:{title:e.$t("globals.cancel_queue_hint")},on:{click:e.cancelQueue}},[e._v("\n\t\t\tdelete_sweep\n\t\t")])]),e._v(" "),a("div",{ref:"list",attrs:{id:"download_list"}},e._l(e.queueList,(function(t){return a("QueueItem",{key:t.uuid,attrs:{"queue-item":t},on:{"show-errors":e.showErrorsTab,"remove-item":e.onRemoveItem}})})),1)])};Ho._withStripped=!0;var Wo=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\downloads\\TheDownloadBar.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:Ho,staticRenderFns:[]},(function(e){e&&e("data-v-2eb8163c_0",{source:"#download_tab_container[data-v-2eb8163c] {\n height: 100vh;\n}\n\n/*# sourceMappingURL=TheDownloadBar.vue.map */",map:{version:3,sources:["C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui/C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui/C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\downloads\\TheDownloadBar.vue","TheDownloadBar.vue"],names:[],mappings:"AA8CA;EACA,aAAA;AAAA;;AC5CA,6CAA6C",file:"TheDownloadBar.vue",sourcesContent:[null,"#download_tab_container {\n height: 100vh; }\n\n/*# sourceMappingURL=TheDownloadBar.vue.map */"]},media:void 0})}),Go,"data-v-2eb8163c",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));const Ko={props:{text:{type:String,required:!1,default:"Loading..."},id:{type:String,required:!1},hidden:{type:Boolean,required:!1,default:!1}}};var Qo=function(e,t){var a=t._c;return a("div",{staticClass:"loading_placeholder",class:{"loading_placeholder--hidden":t.props.hidden},attrs:{id:t.props.id}},[a("span",{staticClass:"loading_placeholder__text"},[t._v(t._s(t.props.text))]),t._v(" "),t._m(0)])};Qo._withStripped=!0;var Yo=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};return l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\globals\\BaseLoadingPlaceholder.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n,l}({render:Qo,staticRenderFns:[function(e,t){var a=t._c;return a("div",{staticClass:"lds-ring"},[a("div"),t._v(" "),a("div"),t._v(" "),a("div"),t._v(" "),a("div")])}]},0,Ko,void 0,!0);function Jo(e,t=null){e&&Bo.emit("addToQueue",{url:e,bitrate:t},()=>{})}var Zo={sendAddToQueue:Jo};function Xo(e){let t=e.toLowerCase();if(t.startsWith("http")){if(t.indexOf("deezer.com")>=0||t.indexOf("deezer.page.link")>=0||t.indexOf("open.spotify.com")>=0)return!0}else if(t.startsWith("spotify:"))return!0;return!1}function el(e){let t,a;return t=Math.floor(e/60),a=e-60*t,a<10&&(a="0"+a),t+":"+a}function tl(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,".")}function al(e,t,a){var n;return function(){var i=this,r=arguments,s=function(){n=null,a||e.apply(i,r)},o=a&&!n;clearTimeout(n),n=setTimeout(s,t),o&&e.apply(i,r)}}function nl(e){const t=document.createElement("input");document.body.appendChild(t),t.setAttribute("type","text"),t.setAttribute("value",e),t.select(),t.setSelectionRange(0,99999),document.execCommand("copy"),t.remove()}var il={isValidURL:Xo,convertDuration:el,convertDurationSeparated:function(e){let t,a,n;return a=Math.floor(e/60),t=Math.floor(a/60),n=e-60*a,a-=60*t,[t,a,n]},numberWithDots:tl,debounce:al};const rl=[{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}];const sl={data:()=>({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:()=>{nl(this.generalHref)}},copyImageLink:{label:this.$t("globals.copyImageLink"),show:!1,position:4,action:()=>{nl(this.imgSrc)}},copyDeezerLink:{label:this.$t("globals.copyDeezerLink"),show:!1,position:5,action:()=>{nl(this.deezerHref)}},paste:{label:this.$t("globals.paste"),show:!1,position:6,action:()=>{clipboard in navigator?navigator.clipboard.readText().then(e=>{document.execCommand("insertText",void 0,e)}):document.execCommand("paste")}}};let t=Object.values(e).length+1;return rl.forEach((a,n)=>{e[a.objName]={label:""+this.$t("globals.download",{thing:a.label}),show:!1,position:t+n,action:Jo.bind(null,this.deezerHref,a.value)}}),e},sortedOptions(){return Object.values(this.options).sort((e,t)=>e.position{this.menuOpen=!1,this.options.copyLink.show=!1,this.options.copyDeezerLink.show=!1,this.options.copyImageLink.show=!1,rl.forEach(e=>{this.options[e.objName].show=!1})}).catch(e=>{console.error(e)})},positionMenu(e,t){this.xPos=e+"px",this.yPos=t+"px",this.$nextTick().then(()=>{const{innerHeight:a,innerWidth:n}=window,i=e+this.$refs.contextMenu.getBoundingClientRect().width,r=t+this.$refs.contextMenu.getBoundingClientRect().height;if(i>n){const t=i-n+15;this.xPos=e-t+"px"}if(r>a){const e=r-a+15;this.yPos=t-e+"px"}})},showDeezerOptions(){this.options.copyDeezerLink.show=!0,rl.forEach(e=>{this.options[e.objName].show=!0})}}};var ol=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("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(t){return a("button",{directives:[{name:"show",rawName:"v-show",value:t.show,expression:"option.show"}],key:t.label,staticClass:"menu-option",on:{click:function(e){return e.preventDefault(),t.action(e)}}},[a("span",{staticClass:"menu-option__text"},[e._v(e._s(t.label))])])})),0)};ol._withStripped=!0;var ll=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\globals\\TheContextMenu.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:ol,staticRenderFns:[]},(function(e){e&&e("data-v-5bd3f801_0",{source:".context-menu[data-v-5bd3f801] {\n position: absolute;\n top: 0;\n left: 0;\n min-width: 100px;\n border-radius: 7px;\n background: var(--foreground-inverted);\n box-shadow: 4px 10px 18px 0px rgba(0, 0, 0, 0.15);\n overflow: hidden;\n z-index: 10000;\n}\n.menu-option[data-v-5bd3f801] {\n display: flex;\n align-items: center;\n width: 100%;\n height: 40px;\n padding-left: 10px;\n padding-right: 10px;\n color: var(--foreground);\n cursor: pointer;\n}\n.menu-option[data-v-5bd3f801]:hover {\n background: var(--table-highlight);\n filter: brightness(150%);\n}\n.menu-option__text[data-v-5bd3f801] {\n text-transform: capitalize;\n}\nbutton[data-v-5bd3f801] {\n color: var(--accent-text);\n color: unset;\n background-color: var(--accent-color);\n background-color: unset;\n min-width: unset;\n position: unset;\n border: unset;\n border-radius: unset;\n font-family: unset;\n font-weight: unset;\n font-size: unset;\n padding: unset;\n margin-right: unset;\n height: unset;\n text-transform: unset;\n cursor: unset;\n transition: unset;\n}\nbutton[data-v-5bd3f801]:focus {\n outline: none;\n}\nbutton[disabled][data-v-5bd3f801] {\n background-color: unset;\n color: unset;\n opacity: unset;\n}\nbutton.selective[data-v-5bd3f801] {\n background-color: unset;\n color: unset;\n}\nbutton.selective.active[data-v-5bd3f801] {\n background-color: unset;\n color: unset;\n}\nbutton.with_icon[data-v-5bd3f801] {\n display: unset;\n align-items: unset;\n}\nbutton.with_icon i[data-v-5bd3f801] {\n margin-left: unset;\n}\nbutton[data-v-5bd3f801]:active {\n background-color: unset;\n transform: unset;\n}\nbutton[data-v-5bd3f801]:hover {\n background: unset;\n border: unset;\n}\n\n/*# sourceMappingURL=TheContextMenu.vue.map */",map:{version:3,sources:["C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui/C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui/C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\globals\\TheContextMenu.vue","TheContextMenu.vue"],names:[],mappings:"AA4NA;EACA,kBAAA;EACA,MAAA;EACA,OAAA;EACA,gBAAA;EACA,kBAAA;EACA,sCAAA;EACA,iDAAA;EACA,gBAAA;EACA,cAAA;AAAA;AAGA;EACA,aAAA;EACA,mBAAA;EACA,WAAA;EACA,YAAA;EACA,kBAAA;EACA,mBAAA;EACA,wBAAA;EACA,eAAA;AAAA;AARA;IAWA,kCAAA;IACA,wBAAA;AAAA;AAGA;IACA,0BAAA;AAAA;AAKA;EACA,yBAAA;EACA,YAAA;EACA,qCAAA;EACA,uBAAA;EACA,gBAAA;EACA,eAAA;EACA,aAAA;EACA,oBAAA;EACA,kBAAA;EACA,kBAAA;EACA,gBAAA;EACA,cAAA;EACA,mBAAA;EACA,aAAA;EACA,qBAAA;EACA,aAAA;EACA,iBAAA;AAAA;AAjBA;IAoBA,aAAA;AAAA;AApBA;IAwBA,uBAAA;IACA,YAAA;IACA,cAAA;AAAA;AA1BA;IA8BA,uBAAA;IACA,YAAA;AAAA;AA/BA;MAkCA,uBAAA;MACA,YAAA;AAAA;AAnCA;IAwCA,cAAA;IACA,kBAAA;AAAA;AAzCA;MA4CA,kBAAA;AAAA;AA5CA;IAiDA,uBAAA;IACA,gBAAA;AAAA;AAlDA;IAsDA,iBAAA;IACA,aAAA;AAAA;;AChPA,6CAA6C",file:"TheContextMenu.vue",sourcesContent:[null,".context-menu {\n position: absolute;\n top: 0;\n left: 0;\n min-width: 100px;\n border-radius: 7px;\n background: var(--foreground-inverted);\n box-shadow: 4px 10px 18px 0px rgba(0, 0, 0, 0.15);\n overflow: hidden;\n z-index: 10000; }\n\n.menu-option {\n display: flex;\n align-items: center;\n width: 100%;\n height: 40px;\n padding-left: 10px;\n padding-right: 10px;\n color: var(--foreground);\n cursor: pointer; }\n .menu-option:hover {\n background: var(--table-highlight);\n filter: brightness(150%); }\n .menu-option__text {\n text-transform: capitalize; }\n\nbutton {\n color: var(--accent-text);\n color: unset;\n background-color: var(--accent-color);\n background-color: unset;\n min-width: unset;\n position: unset;\n border: unset;\n border-radius: unset;\n font-family: unset;\n font-weight: unset;\n font-size: unset;\n padding: unset;\n margin-right: unset;\n height: unset;\n text-transform: unset;\n cursor: unset;\n transition: unset; }\n button:focus {\n outline: none; }\n button[disabled] {\n background-color: unset;\n color: unset;\n opacity: unset; }\n button.selective {\n background-color: unset;\n color: unset; }\n button.selective.active {\n background-color: unset;\n color: unset; }\n button.with_icon {\n display: unset;\n align-items: unset; }\n button.with_icon i {\n margin-left: unset; }\n button:active {\n background-color: unset;\n transform: unset; }\n button:hover {\n background: unset;\n border: unset; }\n\n/*# sourceMappingURL=TheContextMenu.vue.map */"]},media:void 0})}),sl,"data-v-5bd3f801",!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}})),cl=new ka;async function dl(e,t,{duration:a=1e3,easing:n=ul,interval:i=13}={}){const r=e.volume,s=t-r;if(!(s&&a&&n&&i))return e.volume=t,Promise.resolve();const o=Math.floor(a/i);let l=1;return new Promise(t=>{const a=setInterval(()=>{e.volume=r+n(l/o)*s,++l===o&&(clearInterval(a),t())},i)})}function ul(e){return.5-Math.cos(e*Math.PI)/2}const pl={data:()=>({previewStopped:!1}),mounted(){this.$refs.preview.volume=1,cl.$on("trackPreview:playPausePreview",this.playPausePreview),cl.$on("trackPreview:stopStackedTabsPreview",this.stopStackedTabsPreview),cl.$on("trackPreview:previewMouseEnter",this.previewMouseEnter),cl.$on("trackPreview:previewMouseLeave",this.previewMouseLeave)},methods:{async onCanPlay(){await this.$refs.preview.play(),this.previewStopped=!1,await dl(this.$refs.preview,window.vol.preview_max_volume/100,{duration:500})},async onTimeUpdate(){if(isNaN(this.$refs.preview.duration))return;let e=this.$refs.preview.duration;isFinite(e)||(e=30),e-this.$refs.preview.currentTime>=1||this.previewStopped||(await dl(this.$refs.preview,0,{duration:800}),this.previewStopped=!0,document.querySelectorAll("a[playing] > .preview_controls").forEach(e=>{e.style.opacity=0}),document.querySelectorAll("*").forEach(e=>{e.removeAttribute("playing")}),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(e=>{e.textContent="play_arrow"}))},async playPausePreview(e){e.preventDefault(),e.stopPropagation();const{currentTarget:t}=event;var a="I"==t.tagName?t:t.querySelector("i");t.hasAttribute("playing")?this.$refs.preview.paused?(this.$refs.preview.play(),this.previewStopped=!1,a.innerText="pause",await dl(this.$refs.preview,window.vol.preview_max_volume/100,{duration:500})):(this.previewStopped=!0,a.innerText="play_arrow",await dl(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause()):(document.querySelectorAll("*").forEach(e=>{e.removeAttribute("playing")}),t.setAttribute("playing",!0),document.querySelectorAll(".preview_controls, .preview_playlist_controls").forEach(e=>{e.textContent="play_arrow"}),document.querySelectorAll(".preview_controls").forEach(e=>{e.style.opacity=0}),a.innerText="pause",a.style.opacity=1,this.previewStopped=!1,await dl(this.$refs.preview,0,{duration:250}),this.$refs.preview.pause(),document.getElementById("preview-track_source").src=t.getAttribute("data-preview"),this.$refs.preview.load())},async stopStackedTabsPreview(){let e=Array.prototype.slice.call(document.querySelectorAll(".preview_playlist_controls[playing]"));0!==e.length&&(await dl(this.$refs.preview,0,{duration:800}),this.previewStopped=!0,e.forEach(e=>{e.removeAttribute("playing"),e.innerText="play_arrow"}))},previewMouseEnter(e){e.currentTarget.style.opacity=1},previewMouseLeave(e){const{currentTarget:t}=e,a=t.parentElement.hasAttribute("playing");(a&&this.previewStopped||!a)&&(t.style.opacity=0)}}};var hl=function(){var e=this.$createElement,t=this._self._c||e;return t("audio",{ref:"preview",attrs:{id:"preview-track"},on:{canplay:this.onCanPlay,timeupdate:this.onTimeUpdate}},[t("source",{attrs:{id:"preview-track_source",src:"",type:"audio/mpeg"}})])};hl._withStripped=!0;var ml=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\globals\\TheTrackPreview.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:hl,staticRenderFns:[]},(function(e){e&&e("data-v-00e70a4e_0",{source:"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n",map:{version:3,sources:[],names:[],mappings:"",file:"TheTrackPreview.vue"},media:void 0})}),pl,void 0,!1,0,(function e(){const t=document.head||document.getElementsByTagName("head")[0],a=e.styles||(e.styles={}),n="undefined"!=typeof navigator&&/msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());return function(e,i){if(document.querySelector('style[data-vue-ssr-id~="'+e+'"]'))return;const r=n?i.media||"default":e,s=a[r]||(a[r]={ids:[],parts:[],element:void 0});if(!s.ids.includes(e)){let a=i.source,o=s.ids.length;if(s.ids.push(e),n&&(s.element=s.element||document.querySelector("style[data-group="+r+"]")),!s.element){const e=s.element=document.createElement("style");e.type="text/css",i.media&&e.setAttribute("media",i.media),n&&(e.setAttribute("data-group",r),e.setAttribute("data-next-index","0")),t.appendChild(e)}if(n&&(o=parseInt(s.element.getAttribute("data-next-index")),s.element.setAttribute("data-next-index",o+1)),s.element.styleSheet)s.parts.push(a),s.element.styleSheet.cssText=s.parts.filter(Boolean).join("\n");else{const e=document.createTextNode(a),t=s.element.childNodes;t[o]&&s.element.removeChild(t[o]),t.length?s.element.insertBefore(e,t[o]):s.element.appendChild(e)}}}}));const gl={data:()=>({open:!1,url:""}),mounted(){this.$root.$on("QualityModal:open",this.openModal),this.$refs.modal.addEventListener("webkitAnimationEnd",this.handleAnimationEnd)},methods:{tryToDownloadTrack(e){const{target:t}=e;this.$refs.modal.classList.add("animated","fadeOut"),t.matches(".quality-button")&&Zo.sendAddToQueue(this.url,t.dataset.qualityValue)},openModal(e){this.url=e,this.open=!0,this.$refs.modal.classList.add("animated","fadeIn")},handleAnimationEnd(e){const{animationName:t}=e;this.$refs.modal.classList.remove("animated",t),"fadeIn"!==t&&(this.open=!1)}}};var fl=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],ref:"modal",staticClass:"smallmodal",attrs:{id:"modal_quality"},on:{click:function(t){return e.tryToDownloadTrack(t)}}},[a("div",{staticClass:"smallmodal-content"},[a("button",{staticClass:"quality-button",attrs:{"data-quality-value":"9"}},[e._v(e._s(e.$t("globals.download",{thing:"FLAC"})))]),e._v(" "),a("button",{staticClass:"quality-button",attrs:{"data-quality-value":"3"}},[e._v(e._s(e.$t("globals.download",{thing:"MP3 320kbps"})))]),e._v(" "),a("button",{staticClass:"quality-button",attrs:{"data-quality-value":"1"}},[e._v(e._s(e.$t("globals.download",{thing:"MP3 128kbps"})))]),e._v(" "),a("button",{staticClass:"quality-button",attrs:{"data-quality-value":"15"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [HQ]"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"quality-button",attrs:{"data-quality-value":"14"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [MQ]"}))+"\n\t\t")]),e._v(" "),a("button",{staticClass:"quality-button",attrs:{"data-quality-value":"13"}},[e._v("\n\t\t\t"+e._s(e.$t("globals.download",{thing:"360 Reality Audio [LQ]"}))+"\n\t\t")])])])};fl._withStripped=!0;var vl=function(e,t,a,n,i,r,s,o){const l=("function"==typeof a?a.options:a)||{};l.__file="C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\globals\\TheQualityModal.vue",l.render||(l.render=e.render,l.staticRenderFns=e.staticRenderFns,l._compiled=!0,i&&(l.functional=!0)),l._scopeId=n;{let e;if(t&&(e=function(e){t.call(this,s(e))}),void 0!==e)if(l.functional){const t=l.render;l.render=function(a,n){return e.call(n),t(a,n)}}else{const t=l.beforeCreate;l.beforeCreate=t?[].concat(t,e):[e]}}return l}({render:fl,staticRenderFns:[]},(function(e){e&&e("data-v-19da7f1c_0",{source:"\n.smallmodal {\r\n\tposition: fixed;\r\n\tz-index: 1250;\r\n\tleft: 0;\r\n\ttop: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\toverflow: auto;\r\n\tbackground-color: hsla(0, 0%, 0%, 0.4);\r\n\tanimation-duration: 0.3s;\n}\n.smallmodal-content {\r\n\tbackground-color: transparent;\r\n\tmargin: auto;\r\n\twidth: var(--modal-content-width);\r\n\tposition: relative;\r\n\ttop: 50%;\r\n\ttransform: translateY(-50%);\n}\n.smallmodal-content button {\r\n\twidth: 100%;\r\n\tmargin-bottom: 8px;\n}\r\n",map:{version:3,sources:["C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui/C:\\Users\\Roberto\\Dev\\repos\\deemix-pyweb\\webui\\src\\components\\globals\\TheQualityModal.vue"],names:[],mappings:";AAmBA;CACA,eAAA;CACA,aAAA;CACA,OAAA;CACA,MAAA;CACA,WAAA;CACA,YAAA;CACA,cAAA;CACA,sCAAA;CACA,wBAAA;AACA;AAEA;CACA,6BAAA;CACA,YAAA;CACA,iCAAA;CACA,kBAAA;CACA,QAAA;CACA,2BAAA;AACA;AAEA;CACA,WAAA;CACA,kBAAA;AACA",file:"TheQualityModal.vue",sourcesContent:["\r\n\r\n