platypush/platypush/backend/http/dist/static/js/chunk-3ffdd2f0.c56c2562.js

2 lines
50 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3ffdd2f0"],{"03eb":function(t,e,n){"use strict";n("c3da")},"0d41":function(t,e,n){"use strict";n.r(e);n("c975"),n("d81d"),n("b0c0"),n("d3b7"),n("ac1f"),n("841c"),n("ddb0");var a=n("2909"),c=n("7a23"),l=Object(c["K"])("data-v-2ccb9e3d");Object(c["u"])("data-v-2ccb9e3d");var i={class:"nav-container"},s={class:"view-container"},r={class:"track-info-container"},o={key:0,class:"track-info-content"},u={key:0,class:"row file"},d=Object(c["h"])("div",{class:"col-3 attr"},"File",-1),f={key:1,class:"row artist"},b=Object(c["h"])("div",{class:"col-3 attr"},"Artist",-1),h={class:"col-9 value"},O={key:2,class:"row track-title"},v=Object(c["h"])("div",{class:"col-3 attr"},"Title",-1),p={key:3,class:"row album"},j=Object(c["h"])("div",{class:"col-3 attr"},"Album",-1),y={class:"col-9 value"},k={key:4,class:"row date"},m=Object(c["h"])("div",{class:"col-3 attr"},"Date",-1),g={key:5,class:"row duration"},C=Object(c["h"])("div",{class:"col-3 attr"},"Duration",-1),x={key:6,class:"row track"},w=Object(c["h"])("div",{class:"col-3 attr"},"Track",-1),T={key:7,class:"row disc"},$=Object(c["h"])("div",{class:"col-3 attr"},"Disc",-1),P={class:"playlists-modal-container"},S={class:"filter"},R={class:"playlists"},I=Object(c["h"])("i",{class:"fa fa-plus"},null,-1),A=Object(c["g"])("   Add ");Object(c["s"])();var D=l((function(t,e,n,D,E,F){var L=Object(c["z"])("Loading"),M=Object(c["z"])("Nav"),z=Object(c["z"])("Playlist"),_=Object(c["z"])("Playlists"),N=Object(c["z"])("Search"),V=Object(c["z"])("Library"),q=Object(c["z"])("MediaView"),K=Object(c["z"])("Modal"),U=Object(c["z"])("FormFooter");return Object(c["r"])(),Object(c["e"])(c["a"],null,[n.loading?(Object(c["r"])(),Object(c["e"])(L,{key:0})):(Object(c["r"])(),Object(c["e"])(q,{key:1,"plugin-name":n.pluginName,status:n.status,track:F.track,onPlay:e[28]||(e[28]=function(e){return t.$emit("play",e)}),onPause:e[29]||(e[29]=function(e){return t.$emit("pause")}),onStop:e[30]||(e[30]=function(e){return t.$emit("stop")}),onPrevious:e[31]||(e[31]=function(e){return t.$emit("previous")}),onNext:e[32]||(e[32]=function(e){return t.$emit("next")}),onSetVolume:e[33]||(e[33]=function(e){return t.$emit("set-volume",e)}),onSeek:e[34]||(e[34]=function(e){return t.$emit("seek",e)}),onConsume:e[35]||(e[35]=function(e){return t.$emit("consume",e)}),onRepeat:e[36]||(e[36]=function(e){return t.$emit("repeat",e)}),onRandom:e[37]||(e[37]=function(e){return t.$emit("random",e)}),onSearch:F.search},{default:l((function(){return[Object(c["h"])("main",null,[Object(c["h"])("div",i,[Object(c["h"])(M,{"selected-view":E.selectedView,onInput:e[1]||(e[1]=function(t){return E.selectedView=t})},null,8,["selected-view"])]),Object(c["h"])("div",s,["playing"===E.selectedView?(Object(c["r"])(),Object(c["e"])(z,{key:0,tracks:n.tracks,status:n.status,loading:n.loading,onPlay:e[2]||(e[2]=function(e){return t.$emit("play",e)}),onClear:e[3]||(e[3]=function(e){return t.$emit("clear")}),onSwap:e[4]||(e[4]=function(e){return t.$emit("swap-tracks",e)}),onAdd:e[5]||(e[5]=function(e){return t.$emit("add-to-tracklist",e)}),onRemove:e[6]||(e[6]=function(e){return t.$emit("remove-from-tracklist",e)}),onMove:e[7]||(e[7]=function(e){return t.$emit("tracklist-move",e)}),onSave:e[8]||(e[8]=function(e){return t.$emit("tracklist-save",e)}),onInfo:e[9]||(e[9]=function(e){return t.$emit("info",e)}),onAddToPlaylist:F.openAddToPlaylist,onSearch:F.search},null,8,["tracks","status","loading","onAddToPlaylist","onSearch"])):"playlists"===E.selectedView?(Object(c["r"])(),Object(c["e"])(_,{key:1,playlists:n.playlists,loading:n.loading,"edited-playlist":n.editedPlaylist,tracks:n.editedPlaylistTracks,onPlay:e[10]||(e[10]=function(e){return t.$emit("play-playlist",e)}),onLoad:e[11]||(e[11]=function(e){return t.$emit("load-playlist",e)}),onRemove:e[12]||(e[12]=function(e){return t.$emit("remove-playlist",e)}),onPlaylistEdit:e[13]||(e[13]=function(e){return t.$emit("playlist-edit",e)}),onLoadTrack:e[14]||(e[14]=function(e){return t.$emit("add-to-tracklist-from-edited-playlist",e)}),onRemoveTrack:e[15]||(e[15]=function(e){return t.$emit("remove-from-playlist",e)}),onInfo:e[16]||(e[16]=function(e){return t.$emit("info",e)}),onPlaylistAdd:e[17]||(e[17]=function(e){return t.$emit("playlist-add",e)}),onAddToPlaylist:F.openAddToPlaylist,onTrackMove:e[18]||(e[18]=function(e){return t.$emit("playlist-track-move",e)}),onSearch:F.search},null,8,["playlists","loading","edited-playlist","tracks","onAddToPlaylist","onSearch"])):"search"===E.selectedView?(Object(c["r"])(),Object(c["e"])(N,{key:2,loading:n.loading,onSearch:F.search,results:n.searchResults,onClear:e[19]||(e[19]=function(e){return t.$emit("search-clear")}),onInfo:e[20]||(e[20]=function(e){return t.$emit("info",e)}),onPlay:e[21]||(e[21]=function(e){return t.$emit("play",e)}),onLoad:e[22]||(e[22]=function(e){return t.$emit("add-to-tracklist",e)}),onAddToPlaylist:F.openAddToPlaylist},null,8,["loading","onSearch","results","onAddToPlaylist"])):"library"===E.selectedView?(Object(c["r"])(),Object(c["e"])(V,{key:3,loading:n.loading,onSearch:F.search,results:n.libraryResults,path:n.path,onClear:e[23]||(e[23]=function(e){return t.$emit("search-clear")}),onInfo:e[24]||(e[24]=function(e){return t.$emit("info",e)}),onPlay:e[25]||(e[25]=function(e){return t.$emit("play",e)}),onLoad:e[26]||(e[26]=function(e){return t.$emit("add-to-tracklist",e)}),onAddToPlaylist:F.openAddToPlaylist,onCd:e[27]||(e[27]=function(e){return t.$emit("cd",e)})},null,8,["loading","onSearch","results","path","onAddToPlaylist"])):Object(c["f"])("",!0)])])]})),_:1},8,["plugin-name","status","track","onSearch"])),Object(c["h"])("div",r,[Object(c["h"])(K,{title:"Track info",ref:"trackInfo"},{default:l((function(){return[n.trackInfo?(Object(c["r"])(),Object(c["e"])("div",o,[n.trackInfo.file?(Object(c["r"])(),Object(c["e"])("div",u,[d,Object(c["h"])("div",{class:"col-9 value",textContent:Object(c["C"])(n.trackInfo.file)},null,8,["textContent"])])):Object(c["f"])("",!0),n.trackInfo.artist?(Object(c["r"])(),Object(c["e"])("div",f,[b,Object(c["h"])("div",h,[Object(c["h"])("a",{href:t.$route.fullPath,textContent:Object(c["C"])(n.trackInfo.artist),onClick:e[38]||(e[38]=Object(c["J"])((function(t){return F.search({artist:n.trackInfo.artist})}),["prevent"]))},null,8,["href","textContent"])])])):Object(c["f"])("",!0),n.trackInfo.title?(Object(c["r"])(),Object(c["e"])("div",O,[v,Object(c["h"])("div",{class:"col-9 value",textContent:Object(c["C"])(n.trackInfo.title)},null,8,["textContent"])])):Object(c["f"])("",!0),n.trackInfo.album?(Object(c["r"])(),Object(c["e"])("div",p,[j,Object(c["h"])("div",y,[Object(c["h"])("a",{href:t.$route.fullPath,textContent:Object(c["C"])(n.trackInfo.album),onClick:e[39]||(e[39]=Object(c["J"])((function(t){return F.search({artist:n.trackInfo.artist,album:n.trackInfo.album})}),["prevent"]))},null,8,["href","textContent"])])])):Object(c["f"])("",!0),n.trackInfo.date?(Object(c["r"])(),Object(c["e"])("div",k,[m,Object(c["h"])("div",{class:"col-9 value",textContent:Object(c["C"])(n.trackInfo.date)},null,8,["textContent"])])):Object(c["f"])("",!0),n.trackInfo.time?(Object(c["r"])(),Object(c["e"])("div",g,[C,Object(c["h"])("div",{class:"col-9 value",textContent:Object(c["C"])(t.convertTime(n.trackInfo.time))},null,8,["textContent"])])):Object(c["f"])("",!0),n.trackInfo.track?(Object(c["r"])(),Object(c["e"])("div",x,[w,Object(c["h"])("div",{class:"col-9 value",textContent:Object(c["C"])(n.trackInfo.track)},null,8,["textContent"])])):Object(c["f"])("",!0),n.trackInfo.disc?(Object(c["r"])(),Object(c["e"])("div",T,[$,Object(c["h"])("div",{class:"col-9 value",textContent:Object(c["C"])(n.trackInfo.disc)},null,8,["textContent"])])):Object(c["f"])("",!0)])):Object(c["f"])("",!0)]})),_:1},512)]),Object(c["h"])("div",P,[Object(c["h"])(K,{title:"Playlists",ref:"playlistsModal",onClose:e[42]||(e[42]=function(t){return E.addToPlaylistTrack=null}),onOpen:e[43]||(e[43]=function(t){return E.selectedPlaylists=Object(a["a"])(Array(n.playlists.length).keys()).map((function(){return!1}))})},{default:l((function(){return[Object(c["h"])("div",S,[Object(c["h"])("label",null,[Object(c["I"])(Object(c["h"])("input",{type:"search",placeholder:"Filter","onUpdate:modelValue":e[40]||(e[40]=function(t){return E.playlistFilter=t})},null,512),[[c["F"],E.playlistFilter]])])]),Object(c["h"])("div",R,[(Object(c["r"])(!0),Object(c["e"])(c["a"],null,Object(c["x"])(n.playlists,(function(t,e){var n;return Object(c["r"])(),Object(c["e"])("label",{class:["row playlist",{hidden:(null===(n=E.playlistFilter)||void 0===n?void 0:n.length)>0&&t.name.toLowerCase().indexOf(E.playlistFilter.toLowerCase())<0}],key:e},[Object(c["h"])("input",{type:"checkbox",checked:E.selectedPlaylists[e],onChange:function(t){return E.selectedPlaylists[e]=t.target.checked}},null,40,["checked","onChange"]),Object(c["h"])("span",{class:"name",textContent:Object(c["C"])(t.name)},null,8,["textContent"])],2)})),128))]),Object(c["h"])(U,null,{default:l((function(){return[Object(c["h"])("button",{onClick:e[41]||(e[41]=function(){return F.addToPlaylist.apply(F,arguments)})},[I,A])]})),_:1})]})),_:1},512)])],64)})),E=(n("99af"),n("4de4"),n("a9e3"),n("96cf"),n("1da1")),F=Object(c["K"])("data-v-2495ce8a");Object(c["u"])("data-v-2495ce8a");var L={class:"form-footer"};Object(c["s"])();var M=F((function(t,e,n,a,l,i){return Object(c["r"])(),Object(c["e"])("div",L,[Object(c["y"])(t.$slots,"default")])})),z={name:"FormFooter"};n("03eb");z.render=M,z.__scopeId="data-v-2495ce8a";var _=z,N=n("3a5e"),V=n("714b"),q=n("18dc"),K=n("7726"),U=Object(c["K"])("data-v-edee6494"),J=U((function(t,e,n,a,l,i){return Object(c["r"])(),Object(c["e"])("nav",null,[(Object(c["r"])(!0),Object(c["e"])(c["a"],null,Object(c["x"])(n.views,(function(e,a){return Object(c["r"])(),Object(c["e"])("li",{key:a,title:e.displayName,class:{selected:a===n.selectedView},onClick:function(e){return t.$emit("input",a)}},[Object(c["h"])("i",{class:e.iconClass},null,2)],10,["title","onClick"])})),128))])})),H={name:"Nav",emits:["input"],props:{selectedView:{type:String},collapsed:{type:Boolean,default:!1},views:{type:Object,default:function(){return{playing:{iconClass:"fas fa-play",displayName:"Queue"},search:{iconClass:"fas fa-search",displayName:"Search"},playlists:{iconClass:"fas fa-list-ul",displayName:"Playlists"},library:{iconClass:"fas fa-compact-disc",displayName:"Library"}}}}}};n("981c");H.render=J,H.__scopeId="data-v-edee6494";var B=H,Q=(n("6062"),n("3ca3"),Object(c["K"])("data-v-341a3890"));Object(c["u"])("data-v-341a3890");var W={key:1,class:"playlist fade-in"},G={class:"header-container"},X={class:"col-8 filter"},Y={class:"col-4 buttons"},Z=Object(c["h"])("i",{class:"fa fa-plus"},null,-1),tt={class:"body",ref:"body"},et={key:0,class:"no-content"},nt={class:"col-10"},at={class:"title"},ct={key:0,class:"artist"},lt={key:1,class:"album"},it={class:"col-2 right-side"},st={class:"actions"};Object(c["s"])();var rt=Q((function(t,e,n,l,i,s){var r,o=Object(c["z"])("Loading"),u=Object(c["z"])("DropdownItem"),d=Object(c["z"])("Dropdown"),f=Object(c["z"])("MusicHeader");return n.loading?(Object(c["r"])(),Object(c["e"])(o,{key:0})):(Object(c["r"])(),Object(c["e"])("div",W,[Object(c["h"])("div",G,[Object(c["h"])(f,{ref:"header"},{default:Q((function(){return[Object(c["h"])("div",X,[Object(c["h"])("label",null,[Object(c["I"])(Object(c["h"])("input",{type:"search",placeholder:"Filter","onUpdate:modelValue":e[1]||(e[1]=function(t){return i.filter=t})},null,512),[[c["F"],i.filter]])])]),Object(c["h"])("div",Y,[Object(c["h"])("button",{title:"Add track",onClick:e[2]||(e[2]=function(){return s.addTrack.apply(s,arguments)})},[Z]),Object(c["h"])(d,{title:"Actions","icon-class":"fa fa-ellipsis-h"},{default:Q((function(){var l,r,o,d,f,b,h;return[Object(c["h"])(u,{text:"Save as playlist","icon-class":"fa fa-save",disabled:!(null===(l=n.tracks)||void 0===l?void 0:l.length),onClick:s.playlistSave},null,8,["disabled","onClick"]),2===(null===(r=i.selectedTracks)||void 0===r?void 0:r.length)?(Object(c["r"])(),Object(c["e"])(u,{key:0,text:"Swap tracks","icon-class":"fa fa-retweet",onClick:e[3]||(e[3]=function(e){return t.$emit("swap",i.selectedTracks)})})):Object(c["f"])("",!0),Object(c["h"])(u,{text:i.selectionMode?"End selection":"Start selection","icon-class":"far fa-check-square",disabled:!(null===(o=n.tracks)||void 0===o?void 0:o.length),onClick:e[4]||(e[4]=function(t){return i.selectionMode=!i.selectionMode})},null,8,["text","disabled"]),Object(c["h"])(u,{text:(null===(d=i.selectedTracks)||void 0===d?void 0:d.length)===(null===(f=n.tracks)||void 0===f?void 0:f.length)?"Unselect all":"Select all","icon-class":"fa fa-check-double",disabled:!(null===(b=n.tracks)||void 0===b?void 0:b.length),onClick:e[5]||(e[5]=function(t){return i.selectedTracks=i.selectedTracks.length===n.tracks.length?[]:Object(a["a"])(Array(n.tracks.length).keys())})},null,8,["text","disabled"]),i.selectedTracks.length>0?(Object(c["r"])(),Object(c["e"])(u,{key:1,text:"Remove track"+(i.selectedTracks.length>1?"s":""),"icon-class":"fa fa-trash",onClick:e[6]||(e[6]=function(e){return t.$emit("remove",Object(a["a"])(new Set(i.selectedTracks)))})},null,8,["text"])):Object(c["f"])("",!0),Object(c["h"])(u,{text:"Clear playlist","icon-class":"fa fa-ban",disabled:!(null===(h=n.tracks)||void 0===h?void 0:h.length),onClick:e[7]||(e[7]=function(e){return t.$emit("clear")})},null,8,["disabled"])]})),_:1})])]})),_:1},512)]),Object(c["h"])("div",tt,[(null===(r=n.tracks)||void 0===r?void 0:r.length)?Object(c["f"])("",!0):(Object(c["r"])(),Object(c["e"])("div",et," No tracks are loaded ")),(Object(c["r"])(!0),Object(c["e"])(c["a"],null,Object(c["x"])(n.tracks,(function(e,l){var r,o,f,b,h;return Object(c["r"])(),Object(c["e"])("div",{class:["row track",{selected:s.selectedTracksSet.has(l),active:(null===(r=n.status)||void 0===r?void 0:r.playingPos)===l,hidden:!s.displayedTracks.has(l)}],onDragstart:function(t){return s.onTrackDragStart(l)},onDragend:function(t){return s.onTrackDragEnd(l)},onDragover:function(t){return s.onTrackDragOver(l)},draggable:"true",key:l,onClick:function(t){return s.onTrackClick(t,l)},onDblclick:function(e){return t.$emit("play",{pos:l})}},[Object(c["h"])("div",nt,[Object(c["h"])("div",at,[Object(c["g"])(Object(c["C"])(e.title||"[No Title]")+" ",1),(null===(o=n.status)||void 0===o?void 0:o.playingPos)!==l||"play"!==(null===(f=n.status)||void 0===f?void 0:f.state)&&"pause"!==(null===(b=n.status)||void 0===b?void 0:b.state)?Object(c["f"])("",!0):(Object(c["r"])(),Object(c["e"])("div",{key:0,class:["playing-icon",{paused:"pause"===(null===(h=n.status)||void 0===h?void 0:h.state)}]},[(Object(c["r"])(!0),Object(c["e"])(c["a"],null,Object(c["x"])(Object(a["a"])(Array(3).keys()),(function(t){return Object(c["r"])(),Object(c["e"])("span",{key:t})})),128))],2))]),e.artist?(Object(c["r"])(),Object(c["e"])("div",ct,[Object(c["h"])("a",{href:t.$route.fullPath,textContent:Object(c["C"])(e.artist),onClick:Object(c["J"])((function(n){return t.$emit("search",{artist:e.artist})}),["prevent"])},null,8,["href","textContent","onClick"])])):Object(c["f"])("",!0),e.album?(Object(c["r"])(),Object(c["e"])("div",lt,[Object(c["h"])("a",{href:t.$route.fullPath,textContent:Object(c["C"])(e.album),onClick:Object(c["J"])((function(n){return t.$emit("search",{artist:e.artist,album:e.album})}),["prevent"])},null,8,["href","textContent","onClick"])])):Object(c["f"])("",!0)]),Object(c["h"])("div",it,[Object(c["h"])("span",{class:"duration",textContent:Object(c["C"])(e.time?t.convertTime(e.time):"-:--")},null,8,["textContent"]),Object(c["h"])("span",st,[Object(c["h"])(d,{title:"Actions","icon-class":"fa fa-ellipsis-h"},{default:Q((function(){return[Object(c["h"])(u,{text:"Play","icon-class":"fa fa-play",onClick:function(e){return t.$emit("play",{pos:l})}},null,8,["onClick"]),Object(c["h"])(u,{text:"Add to playlist","icon-class":"fa fa-list-ul",onClick:function(n){return t.$emit("add-to-playlist",e)}},null,8,["onClick"]),Object(c["h"])(u,{text:"Remove","icon-class":"fa fa-trash",onClick:function(e){return t.$emit("remove",Object(a["a"])(new Set([].concat(Object(a["a"])(i.selectedTracks),[l]))))}},null,8,["onClick"]),Object(c["h"])(u,{text:"Info","icon-class":"fa fa-info",onClick:function(e){return t.$emit("info",n.tracks[l])}},null,8,["onClick"])]})),_:1})])])],42,["onDragstart","onDragend","onDragover","onClick","onDblclick"])})),128))],512)]))})),ot=(n("4160"),n("a434"),n("159b"),Object(c["K"])("data-v-25f0cdf5"));Object(c["u"])("data-v-25f0cdf5");var ut={class:"header"};Object(c["s"])();var dt=ot((function(t,e,n,a,l,i){return Object(c["r"])(),Object(c["e"])("div",ut,[Object(c["y"])(t.$slots,"default")])})),ft={name:"Header"};n("4563");ft.render=dt,ft.__scopeId="data-v-25f0cdf5";var bt=ft,ht=n("ab0f"),Ot=n("524a"),vt={name:"Playlist",mixins:[q["a"]],components:{DropdownItem:Ot["a"],Dropdown:ht["a"],MusicHeader:bt},emits:["play","clear","add","remove","swap","search","move","save","info"],props:{tracks:{type:Array,default:function(){return[]}},loading:{type:Boolean,default:!1},status:{type:Object,default:function(){}}},data:function(){return{selectionMode:!1,selectedTracks:[],filter:"",infoTrack:null,sourcePos:null,targetPos:null}},computed:{selectedTracksSet:function(){return new Set(this.selectedTracks)},displayedTracks:function(){var t,e=this,n=Object(a["a"])(Array(this.tracks.length).keys());if(!(null===(t=this.filter)||void 0===t?void 0:t.length))return new Set(n);var c=this,l=(c.filter||"").toLowerCase();return new Set(n.filter((function(t){var n=e.tracks[t];return((null===n||void 0===n?void 0:n.artist)||"").toLowerCase().indexOf(l)>=0||((null===n||void 0===n?void 0:n.title)||"").toLowerCase().indexOf(l)>=0||((null===n||void 0===n?void 0:n.album)||"").toLowerCase().indexOf(l)>=0})))}},methods:{onTrackClick:function(t,e){if(t.shiftKey){var n=this.selectedTracks.sort();n.length?e<n[0]?this.selectedTracks=[].concat(Object(a["a"])(this.selectedTracks),Object(a["a"])(Object(a["a"])(Array(n[0]-e).keys()).map((function(t){return t+e})))):e>n[n.length-1]&&(this.selectedTracks=[].concat(Object(a["a"])(this.selectedTracks),Object(a["a"])(Object(a["a"])(Array(e-n[n.length-1]+1).keys()).map((function(t){return t+n[n.length-1]}))))):this.selectedTracks=[e]}else{var c=this.selectedTracks.indexOf(e);this.selectionMode||t.ctrlKey?c>=0?this.selectedTracks.splice(c,1):this.selectedTracks.push(e):this.selectedTracks=c>=0?[]:[e]}},addTrack:function(){var t=prompt("Item path or URL");(null===t||void 0===t?void 0:t.length)&&this.$emit("add",t)},onTrackDragStart:function(t){this.sourcePos=t},onTrackDragEnd:function(){this.$refs.body.querySelectorAll(".track").forEach((function(t){return t.classList.remove("dragover")})),null!=this.sourcePos&&null!=this.targetPos&&this.sourcePos!==this.targetPos&&(this.$emit("move",{from:this.sourcePos,to:this.targetPos}),this.sourcePos=null,this.targetPos=null)},onTrackDragOver:function(t){this.targetPos=t;var e=this.$refs.body.querySelectorAll(".track");e.forEach((function(t){return t.classList.remove("dragover")})),Object(a["a"])(e)[t].classList.add("dragover")},playlistSave:function(){var t=prompt("Playlist name");(null===t||void 0===t?void 0:t.length)&&this.$emit("save",t)}},mounted:function(){var t=this;this.$watch((function(){var e;return null===(e=t.status)||void 0===e?void 0:e.playingPos}),(function(e){if(null!=e){var n=Object(a["a"])(t.$refs.body.querySelectorAll(".track"))[e],c=n.offsetTop-parseFloat(getComputedStyle(t.$refs.header.$el).height);t.$refs.body.scrollTo(0,c)}}))}};n("9fe6");vt.render=rt,vt.__scopeId="data-v-341a3890";var pt=vt,jt=Object(c["K"])("data-v-101dc818");Object(c["u"])("data-v-101dc818");var yt={key:1,class:"editor-container fade-in"},kt={class:"header-container"},mt=Object(c["h"])("i",{class:"fas fa-arrow-left"},null,-1),gt={class:"search-box"},Ct=Object(c["h"])("i",{class:"fas fa-plus"},null,-1),xt={class:"editor",ref:"editor"},wt={key:0,class:"no-content"},Tt={class:"col-10"},$t={class:"title"},Pt={key:0,class:"artist"},St={key:1,class:"album"},Rt={class:"col-2 right-side"},It={class:"actions"},At={key:2,class:"playlists fade-in"},Dt={class:"header-container"},Et={class:"col-8 filter"},Ft={class:"body",ref:"body"},Lt={key:0,class:"no-content"},Mt={class:"col-10"},zt={class:"col-2 right-side"},_t={class:"actions"};Object(c["s"])();var Nt=jt((function(t,e,n,l,i,s){var r,o,u=Object(c["z"])("Loading"),d=Object(c["z"])("MusicHeader"),f=Object(c["z"])("DropdownItem"),b=Object(c["z"])("Dropdown");return n.loading?(Object(c["r"])(),Object(c["e"])(u,{key:0})):n.editedPlaylist?(Object(c["r"])(),Object(c["e"])("div",yt,[Object(c["h"])("div",kt,[Object(c["h"])(d,{ref:"header"},{default:jt((function(){return[Object(c["h"])("button",{class:"back-btn",title:"Back",onClick:e[1]||(e[1]=function(e){return t.$emit("playlist-edit",null)})},[mt]),Object(c["h"])("label",gt,[Object(c["I"])(Object(c["h"])("input",{type:"search",placeholder:"Filter","onUpdate:modelValue":e[2]||(e[2]=function(t){return i.trackFilter=t})},null,512),[[c["F"],i.trackFilter]])]),Object(c["h"])("button",{class:"add-btn",title:"Add track",onClick:e[3]||(e[3]=function(){return s.addTrack.apply(s,arguments)})},[Ct])]})),_:1},512)]),Object(c["h"])("div",xt,[(null===(r=n.tracks)||void 0===r?void 0:r.length)?Object(c["f"])("",!0):(Object(c["r"])(),Object(c["e"])("div",wt," No tracks found ")),(Object(c["r"])(!0),Object(c["e"])(c["a"],null,Object(c["x"])(n.tracks,(function(e,l){var r;return Object(c["r"])(),Object(c["e"])("div",{class:["row track",{selected:s.selectedTracksSet.has(l),active:(null===(r=t.status)||void 0===r?void 0:r.playingPos)===l,hidden:!s.displayedTracks.has(l)}],draggable:"true",key:l,onDragstart:function(t){return s.onTrackDragStart(l)},onDragend:function(t){return s.onTrackDragEnd(l)},onDragover:function(t){return s.onTrackDragOver(l)},onClick:function(t){return s.onTrackClick(t,l)},onDblclick:function(e){return t.$emit("load-track",{pos:l,play:!0})}},[Object(c["h"])("div",Tt,[Object(c["h"])("div",$t,Object(c["C"])(e.title||"[No Title]"),1),e.artist?(Object(c["r"])(),Object(c["e"])("div",Pt,[Object(c["h"])("a",{href:t.$route.fullPath,textContent:Object(c["C"])(e.artist),onClick:Object(c["J"])((function(n){return t.$emit("search",{artist:e.artist})}),["prevent"])},null,8,["href","textContent","onClick"])])):Object(c["f"])("",!0),e.album?(Object(c["r"])(),Object(c["e"])("div",St,[Object(c["h"])("a",{href:t.$route.fullPath,textContent:Object(c["C"])(e.album),onClick:Object(c["J"])((function(n){return t.$emit("search",{artist:e.artist,album:e.album})}),["prevent"])},null,8,["href","textContent","onClick"])])):Object(c["f"])("",!0)]),Object(c["h"])("div",Rt,[Object(c["h"])("span",{class:"duration",textContent:Object(c["C"])(e.time?t.convertTime(e.time):"-:--")},null,8,["textContent"]),Object(c["h"])("span",It,[Object(c["h"])(b,{title:"Actions","icon-class":"fa fa-ellipsis-h"},{default:jt((function(){return[Object(c["h"])(f,{text:"Play","icon-class":"fa fa-play",onClick:function(e){return t.$emit("load-track",{pos:l,play:!0})}},null,8,["onClick"]),Object(c["h"])(f,{text:"Add to queue","icon-class":"fa fa-plus",onClick:function(e){return t.$emit("load-track",{pos:l,play:!1})}},null,8,["onClick"]),Object(c["h"])(f,{text:"Add to playlist","icon-class":"fa fa-list-ul",onClick:function(n){return t.$emit("add-to-playlist",e)}},null,8,["onClick"]),Object(c["h"])(f,{text:"Remove","icon-class":"fa fa-trash",onClick:function(e){return t.$emit("remove-track",Object(a["a"])(new Set([].concat(Object(a["a"])(i.selectedTracks),[l]))))}},null,8,["onClick"]),Object(c["h"])(f,{text:"Info","icon-class":"fa fa-info",onClick:Object(c["J"])((function(e){return t.$emit("info",n.tracks[l])}),["stop"])},null,8,["onClick"])]})),_:1})])])],42,["onDragstart","onDragend","onDragover","onClick","onDblclick"])})),128))],512)])):(Object(c["r"])(),Object(c["e"])("div",At,[Object(c["h"])("div",Dt,[Object(c["h"])(d,{ref:"header"},{default:jt((function(){return[Object(c["h"])("div",Et,[Object(c["h"])("label",null,[Object(c["I"])(Object(c["h"])("input",{type:"search",placeholder:"Filter","onUpdate:modelValue":e[4]||(e[4]=function(t){return i.filter=t})},null,512),[[c["F"],i.filter]])])])]})),_:1},512)]),Object(c["h"])("div",Ft,[(null===(o=n.playlists)||void 0===o?void 0:o.length)?Object(c["f"])("",!0):(Object(c["r"])(),Object(c["e"])("div",Lt," No playlists found ")),(Object(c["r"])(!0),Object(c["e"])(c["a"],null,Object(c["x"])(n.playlists,(function(e,n){return Object(c["r"])(),Object(c["e"])("div",{class:["row playlist",{hidden:!s.displayedPlaylists.has(n)}],key:n,onClick:function(e){return t.$emit("playlist-edit",n)},onDblclick:function(e){return t.$emit("load",n)}},[Object(c["h"])("div",Mt,[Object(c["h"])("div",{class:"name",textContent:Object(c["C"])(e.name||"[No Name]")},null,8,["textContent"])]),Object(c["h"])("div",zt,[Object(c["h"])("span",_t,[Object(c["h"])(b,{title:"Actions","icon-class":"fa fa-ellipsis-h"},{default:jt((function(){return[Object(c["h"])(f,{text:"Play","icon-class":"fa fa-play",onClick:Object(c["J"])((function(e){return t.$emit("play",n)}),["stop"])},null,8,["onClick"]),Object(c["h"])(f,{text:"Load","icon-class":"fa fa-list-ul",onClick:Object(c["J"])((function(e){return t.$emit("load",n)}),["stop"])},null,8,["onClick"]),Object(c["h"])(f,{text:"Edit","icon-class":"fa fa-edit",onClick:Object(c["J"])((function(e){return t.$emit("playlist-edit",n)}),["stop"])},null,8,["onClick"]),Object(c["h"])(f,{text:"Remove","icon-class":"fa fa-trash",onClick:Object(c["J"])((function(e){return t.$emit("remove",n)}),["stop"])},null,8,["onClick"])]})),_:1})])])],42,["onClick","onDblclick"])})),128))],512)]))})),Vt={name:"Playlists",mixins:[q["a"]],components:{DropdownItem:Ot["a"],Dropdown:ht["a"],MusicHeader:bt},emits:["play","load","remove","playlist-edit","search","remove-track","load-track","info","playlist-add","add-to-playlist","track-move"],props:{playlists:{type:Array,default:function(){return[]}},loading:{type:Boolean,default:!1},tracks:{type:Array,default:function(){return[]}},editedPlaylist:{type:Number}},data:function(){return{selectedTracks:[],filter:"",trackFilter:"",sourcePos:null,targetPos:null}},computed:{selectedTracksSet:function(){return new Set(this.selectedTracks)},displayedPlaylists:function(){var t,e=this,n=Object(a["a"])(Array(this.playlists.length).keys());if(!(null===(t=this.filter)||void 0===t?void 0:t.length))return new Set(n);var c=this,l=(c.filter||"").toLowerCase();return new Set(n.filter((function(t){var n=e.playlists[t];return((null===n||void 0===n?void 0:n.name)||"").toLowerCase().indexOf(l)>=0})))},displayedTracks:function(){var t,e=this,n=Object(a["a"])(Array(this.tracks.length).keys());if(!(null===(t=this.trackFilter)||void 0===t?void 0:t.length))return new Set(n);var c=this,l=(c.trackFilter||"").toLowerCase();return new Set(n.filter((function(t){var n=e.tracks[t];return((null===n||void 0===n?void 0:n.artist)||"").toLowerCase().indexOf(l)>=0||((null===n||void 0===n?void 0:n.title)||"").toLowerCase().indexOf(l)>=0||((null===n||void 0===n?void 0:n.album)||"").toLowerCase().indexOf(l)>=0})))}},methods:{onTrackClick:function(t,e){if(t.shiftKey){var n=this.selectedTracks.sort();n.length?e<n[0]?this.selectedTracks=[].concat(Object(a["a"])(this.selectedTracks),Object(a["a"])(Object(a["a"])(Array(n[0]-e).keys()).map((function(t){return t+e})))):e>n[n.length-1]&&(this.selectedTracks=[].concat(Object(a["a"])(this.selectedTracks),Object(a["a"])(Object(a["a"])(Array(e-n[n.length-1]+1).keys()).map((function(t){return t+n[n.length-1]}))))):this.selectedTracks=[e]}else{var c=this.selectedTracks.indexOf(e);t.ctrlKey?c>=0?this.selectedTracks.splice(c,1):this.selectedTracks.push(e):this.selectedTracks=c>=0?[]:[e]}},addTrack:function(){var t=prompt("Track path or URL");(null===t||void 0===t?void 0:t.length)&&this.$emit("playlist-add",t)},onTrackDragStart:function(t){this.sourcePos=t},onTrackDragEnd:function(){this.$refs.editor.querySelectorAll(".track").forEach((function(t){return t.classList.remove("dragover")})),null!=this.sourcePos&&null!=this.targetPos&&this.sourcePos!==this.targetPos&&(this.$emit("track-move",{from:this.sourcePos,to:this.targetPos,playlist:this.editedPlaylist}),this.sourcePos=null,this.targetPos=null)},onTrackDragOver:function(t){this.targetPos=t;var e=this.$refs.editor.querySelectorAll(".track");e.forEach((function(t){return t.classList.remove("dragover")})),Object(a["a"])(e)[t].classList.add("dragover")}}};n("cd4d");Vt.render=Nt,Vt.__scopeId="data-v-101dc818";var qt=Vt,Kt=Object(c["K"])("data-v-bc0f0676");Object(c["u"])("data-v-bc0f0676");var Ut={class:"row"},Jt={class:"row"},Ht={class:"row"},Bt={class:"row"},Qt=Object(c["h"])("i",{class:"icon fa fa-times"},null,-1),Wt=Object(c["h"])("span",{class:"btn-title"},"Clear",-1),Gt=Object(c["h"])("button",{type:"submit"},[Object(c["h"])("i",{class:"icon fa fa-search"}),Object(c["h"])("span",{class:"btn-title"},"Search")],-1),Xt={class:"search-box"},Yt={class:"buttons"},Zt=Object(c["h"])("i",{class:"icon fa fa-times"},null,-1),te=Object(c["h"])("span",{class:"btn-title"},"Clear",-1),ee={class:"results"},ne={class:"col-10"},ae={class:"title"},ce={class:"col-2 right-side"},le={class:"actions"};Object(c["s"])();var ie=Kt((function(t,e,n,a,l,i){var s=Object(c["z"])("FormFooter"),r=Object(c["z"])("MusicHeader"),o=Object(c["z"])("DropdownItem"),u=Object(c["z"])("Dropdown");return Object(c["r"])(),Object(c["e"])("div",{class:["search fade-in",{"form-collapsed":i.formCollapsed}]},[i.formCollapsed?(Object(c["r"])(),Object(c["e"])(r,{key:1},{default:Kt((function(){return[Object(c["h"])("label",Xt,[Object(c["I"])(Object(c["h"])("input",{type:"search",placeholder:"Filter","onUpdate:modelValue":e[7]||(e[7]=function(t){return l.filter=t})},null,512),[[c["F"],l.filter]])]),Object(c["h"])("span",Yt,[Object(c["h"])("button",{onClick:e[8]||(e[8]=function(){return i.clear.apply(i,arguments)})},[Zt,te])])]})),_:1})):(Object(c["r"])(),Object(c["e"])("form",{key:0,class:"search-form",onSubmit:e[6]||(e[6]=Object(c["J"])((function(e){return t.$emit("search",i.filteredQuery)}),["prevent"]))},[Object(c["h"])("div",Ut,[Object(c["h"])("label",null,[Object(c["I"])(Object(c["h"])("input",{type:"text",placeholder:"Any","onUpdate:modelValue":e[1]||(e[1]=function(t){return l.query.any=t})},null,512),[[c["F"],l.query.any]])])]),Object(c["h"])("div",Jt,[Object(c["h"])("label",null,[Object(c["I"])(Object(c["h"])("input",{type:"text",placeholder:"Artist","onUpdate:modelValue":e[2]||(e[2]=function(t){return l.query.artist=t})},null,512),[[c["F"],l.query.artist]])])]),Object(c["h"])("div",Ht,[Object(c["h"])("label",null,[Object(c["I"])(Object(c["h"])("input",{type:"text",placeholder:"Title","onUpdate:modelValue":e[3]||(e[3]=function(t){return l.query.title=t})},null,512),[[c["F"],l.query.title]])])]),Object(c["h"])("div",Bt,[Object(c["h"])("label",null,[Object(c["I"])(Object(c["h"])("input",{type:"text",placeholder:"Album","onUpdate:modelValue":e[4]||(e[4]=function(t){return l.query.album=t})},null,512),[[c["F"],l.query.album]])])]),Object(c["h"])(s,null,{default:Kt((function(){return[Object(c["h"])("button",{onClick:e[5]||(e[5]=function(){return i.clear.apply(i,arguments)})},[Qt,Wt]),Gt]})),_:1})],32)),Object(c["h"])("div",ee,[(Object(c["r"])(!0),Object(c["e"])(c["a"],null,Object(c["x"])(n.results,(function(e,n){var a,s;return Object(c["r"])(),Object(c["e"])("div",{class:["row track",{selected:l.selectedResults.has(n),hidden:!i.displayedTracks.has(n)}],key:n,onClick:function(t){return i.resultClick(n,t)}},[Object(c["h"])("div",ne,[Object(c["h"])("div",ae,Object(c["C"])(e.title||"[No Title]"),1),(null===(a=e.artist)||void 0===a?void 0:a.length)?(Object(c["r"])(),Object(c["e"])("div",{key:0,class:"artist",textContent:Object(c["C"])(e.artist)},null,8,["textContent"])):Object(c["f"])("",!0),(null===(s=e.album)||void 0===s?void 0:s.length)?(Object(c["r"])(),Object(c["e"])("div",{key:1,class:"album",textContent:Object(c["C"])(e.album)},null,8,["textContent"])):Object(c["f"])("",!0)]),Object(c["h"])("div",ce,[Object(c["h"])("span",{class:"duration",textContent:Object(c["C"])(e.time&&parseInt(e.time)?t.convertTime(e.time):"-:--")},null,8,["textContent"]),Object(c["h"])("span",le,[Object(c["h"])(u,{title:"Actions","icon-class":"fa fa-ellipsis-h"},{default:Kt((function(){return[Object(c["h"])(o,{text:"Play","icon-class":"fa fa-play",onClick:function(t){return i.play(n)}},null,8,["onClick"]),Object(c["h"])(o,{text:"Add to queue","icon-class":"fa fa-plus",onClick:function(t){return i.load(n)}},null,8,["onClick"]),Object(c["h"])(o,{text:"Add to playlist","icon-class":"fa fa-list-ul",onClick:function(n){return t.$emit("add-to-playlist",e)}},null,8,["onClick"]),Object(c["h"])(o,{text:"Info","icon-class":"fa fa-info",onClick:function(n){return t.$emit("info",e)}},null,8,["onClick"])]})),_:1})])])],10,["onClick"])})),128))])],2)})),se=(n("13d5"),n("4fad"),n("3835")),re={name:"Search",components:{Dropdown:ht["a"],DropdownItem:Ot["a"],FormFooter:_,MusicHeader:bt},mixins:[q["a"]],emits:["search","clear","play","load","add-to-playlist","info"],props:{loading:{type:Boolean,default:!1},results:{type:Array}},data:function(){return{selectedResults:new Set,filter:"",query:{any:"",artist:"",title:"",album:""}}},computed:{formCollapsed:function(){var t;return(null===(t=this.results)||void 0===t?void 0:t.length)>0},filteredQuery:function(){return Object.entries(this.query).filter((function(t){var e;return null===(e=t[1])||void 0===e?void 0:e.length})).reduce((function(t,e){var n=Object(se["a"])(e,2),a=n[0],c=n[1];return t[a]=c,t}),{})},displayedTracks:function(){var t,e=this;return new Set(Object(a["a"])(Array((null===(t=this.results)||void 0===t?void 0:t.length)||0).keys()).filter((function(t){var n,a=e.results[t];if(!(null===(n=e.filter)||void 0===n?void 0:n.length))return a;var c=e.filter.toLowerCase();return((null===a||void 0===a?void 0:a.artist)||"").toLowerCase().indexOf(c)>=0||((null===a||void 0===a?void 0:a.title)||"").toLowerCase().indexOf(c)>=0||((null===a||void 0===a?void 0:a.album)||"").toLowerCase().indexOf(c)>=0})))}},methods:{clear:function(){this.$emit("clear"),this.selectedResults=new Set},resultClick:function(t,e){if(e.shiftKey){if(this.selectedResults.size>0&&!this.selectedResults.has(t)){var n=Object(a["a"])(this.selectedResults),c=Math.min(Math.min(n),t),l=Math.max(Math.max(n),t);this.selectedResults=new Set(Object(a["a"])(Array(l-c+1).keys()).map((function(t){return t+c})))}}else e.ctrlKey||(this.selectedResults=new Set),this.selectedResults.has(t)?this.selectedResults.delete(t):this.selectedResults.add(t)},play:function(t){var e=this;this.$emit("play",this.results[t]),this.selectedResults.size&&this.selectedResults.forEach((function(t){e.$emit("load",t)}))},load:function(t){var e=this;this.selectedResults.has(t)||this.selectedResults.add(t),this.selectedResults.forEach((function(t){e.$emit("load",e.results[t])}))}}};n("8716");re.render=ie,re.__scopeId="data-v-bc0f0676";var oe=re,ue=(n("1276"),Object(c["K"])("data-v-6696f4d8"));Object(c["u"])("data-v-6696f4d8");var de={class:"library fade-in"},fe={class:"search-box"},be={class:"results"},he=Object(c["h"])("div",{class:"icon-container"},[Object(c["h"])("i",{class:"icon fa fa-folder"})],-1),Oe=Object(c["h"])("div",{class:"result-container"},[Object(c["h"])("div",{class:"title"},"..")],-1),ve={class:"col-10 left-side"},pe={class:"icon-container"},je={key:0,class:"icon fa fa-folder"},ye={key:1,class:"icon fa fa-music"},ke={class:"info"},me={class:"title"},ge={class:"artist-album"},Ce={class:"col-2 right-side"},xe={class:"actions"};Object(c["s"])();var we=ue((function(t,e,n,a,l,i){var s=Object(c["z"])("Loading"),r=Object(c["z"])("MusicHeader"),o=Object(c["z"])("DropdownItem"),u=Object(c["z"])("Dropdown");return Object(c["r"])(),Object(c["e"])("div",de,[n.loading?(Object(c["r"])(),Object(c["e"])(s,{key:0})):Object(c["f"])("",!0),Object(c["h"])(r,null,{default:ue((function(){return[Object(c["h"])("label",fe,[Object(c["I"])(Object(c["h"])("input",{type:"search",placeholder:"Filter","onUpdate:modelValue":e[1]||(e[1]=function(t){return l.filter=t})},null,512),[[c["F"],l.filter]])])]})),_:1}),Object(c["h"])("div",be,["/"!==n.path?(Object(c["r"])(),Object(c["e"])("div",{key:0,class:"row track back-track",onClick:e[2]||(e[2]=function(){return i.back.apply(i,arguments)})},[he,Oe])):Object(c["f"])("",!0),(Object(c["r"])(!0),Object(c["e"])(c["a"],null,Object(c["x"])(n.results,(function(e,n){var a,s;return Object(c["r"])(),Object(c["e"])("div",{class:["row track",{selected:l.selectedResults.has(n),hidden:!i.displayedResults.has(n)}],key:n,onClick:function(t){return i.resultClick(n,t)}},[Object(c["h"])("div",ve,[Object(c["h"])("div",pe,[e.directory?(Object(c["r"])(),Object(c["e"])("i",je)):e.file?(Object(c["r"])(),Object(c["e"])("i",ye)):Object(c["f"])("",!0)]),Object(c["h"])("div",ke,[Object(c["h"])("div",me,[e.directory?(Object(c["r"])(),Object(c["e"])("span",{key:0,textContent:Object(c["C"])(e.directory.split("/").pop())},null,8,["textContent"])):e.title?(Object(c["r"])(),Object(c["e"])("span",{key:1,textContent:Object(c["C"])(e.title)},null,8,["textContent"])):Object(c["f"])("",!0)]),Object(c["h"])("div",ge,[(null===(a=e.artist)||void 0===a?void 0:a.length)?(Object(c["r"])(),Object(c["e"])("div",{key:0,class:"artist",textContent:Object(c["C"])(e.artist)},null,8,["textContent"])):Object(c["f"])("",!0),(null===(s=e.album)||void 0===s?void 0:s.length)?(Object(c["r"])(),Object(c["e"])("div",{key:1,class:"album",textContent:Object(c["C"])(e.album)},null,8,["textContent"])):Object(c["f"])("",!0)])])]),Object(c["h"])("div",Ce,[Object(c["h"])("span",{class:"duration",textContent:Object(c["C"])(e.time&&parseInt(e.time)?t.convertTime(e.time):"-:--")},null,8,["textContent"]),Object(c["h"])("span",xe,[Object(c["h"])(u,{title:"Actions","icon-class":"fa fa-ellipsis-h"},{default:ue((function(){return[Object(c["h"])(o,{text:"Play","icon-class":"fa fa-play",onClick:function(t){return i.play(n)}},null,8,["onClick"]),Object(c["h"])(o,{text:"Add to queue","icon-class":"fa fa-plus",onClick:function(t){return i.load(n)}},null,8,["onClick"]),Object(c["h"])(o,{text:"Add to playlist","icon-class":"fa fa-list-ul",onClick:function(n){return t.$emit("add-to-playlist",e)}},null,8,["onClick"]),Object(c["h"])(o,{text:"Info","icon-class":"fa fa-info",onClick:function(n){return t.$emit("info",e)}},null,8,["onClick"])]})),_:1})])])],10,["onClick"])})),128))])])})),Te=(n("a15b"),n("fb6a"),{name:"Library",components:{Dropdown:ht["a"],DropdownItem:Ot["a"],MusicHeader:bt,Loading:N["a"]},mixins:[q["a"]],emits:["search","play","load","add-to-playlist","info","cd"],props:{loading:{type:Boolean,default:!1},results:{type:Array},path:{type:String}},data:function(){return{selectedResults:new Set,filter:"",query:{any:"",artist:"",title:"",album:""}}},computed:{displayedResults:function(){var t,e=this;return new Set(Object(a["a"])(Array((null===(t=this.results)||void 0===t?void 0:t.length)||0).keys()).filter((function(t){var n,a=e.results[t];if(!(null===(n=e.filter)||void 0===n?void 0:n.length))return a;var c=e.filter.toLowerCase();return((null===a||void 0===a?void 0:a.artist)||"").toLowerCase().indexOf(c)>=0||((null===a||void 0===a?void 0:a.title)||"").toLowerCase().indexOf(c)>=0||((null===a||void 0===a?void 0:a.album)||"").toLowerCase().indexOf(c)>=0||((null===a||void 0===a?void 0:a.directory)||"").toLowerCase().indexOf(c)>=0})))}},methods:{resultClick:function(t,e){if(e.shiftKey){if(this.selectedResults.size>0&&!this.selectedResults.has(t)){var n=Object(a["a"])(this.selectedResults),c=Math.min(Math.min(n),t),l=Math.max(Math.max(n),t);this.selectedResults=new Set(Object(a["a"])(Array(l-c+1).keys()).map((function(t){return t+c})))}}else e.ctrlKey?this.selectedResults.has(t)?this.selectedResults.delete(t):this.selectedResults.add(t):this.results[t].directory?this.$emit("cd",this.results[t].directory):(this.selectedResults=new Set,this.selectedResults.has(t)?this.selectedResults.delete(t):this.selectedResults.add(t))},play:function(t){var e=this;this.$emit("play",this.results[t]),this.selectedResults.size&&this.selectedResults.forEach((function(t){e.$emit("load",t)}))},load:function(t){var e=this;this.selectedResults.has(t)||this.selectedResults.add(t),this.selectedResults.forEach((function(t){e.$emit("load",e.results[t])}))},back:function(){var t=this.path.split("/");this.$emit("cd",t.slice(0,t.length-1).join("/"))}}});n("ea5f");Te.render=we,Te.__scopeId="data-v-6696f4d8";var $e=Te,Pe=n("3e54"),Se={name:"Music",emits:["play","pause","stop","clear","previous","next","set-volume","seek","consume","repeat","random","status-update","playlist-update","new-playing-track","add-to-tracklist","remove-from-tracklist","swap-tracks","play-playlist","load-playlist","remove-playlist","tracklist-move","tracklist-save","add-to-tracklist-from-edited-playlist","remove-from-playlist","info","playlist-add","add-to-playlist","playlist-track-move","search","search-clear","cd"],mixins:[Pe["a"],q["a"]],components:{Loading:N["a"],Modal:V["a"],Nav:B,MediaView:K["a"],Playlist:pt,Playlists:qt,FormFooter:_,Search:oe,Library:$e},props:{pluginName:{type:String,required:!0},loading:{type:Boolean,default:!1},config:{type:Object,default:function(){}},tracks:{type:Array,default:function(){return[]}},editedPlaylistTracks:{type:Array,default:function(){return[]}},playlists:{type:Array,default:function(){return[]}},status:{type:Object,default:function(){}},editedPlaylist:{type:Number},trackInfo:{type:String},searchResults:{type:Array},libraryResults:{type:Array},path:{type:String}},data:function(){return{selectedView:"playing",selectedPlaylists:[],addToPlaylistTrack:null,playlistFilter:""}},computed:{track:function(){var t;return null==(null===(t=this.status)||void 0===t?void 0:t.playingPos)?null:this.tracks[this.status.playingPos]}},methods:{onStatusEvent:function(t){var e=this;return Object(E["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.plugin_name===e.pluginName){n.next=2;break}return n.abrupt("return");case 2:e.$emit("status-update",t);case 3:case"end":return n.stop()}}),n)})))()},onPlaylistEvent:function(t){var e=this;return Object(E["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.plugin_name===e.pluginName){n.next=2;break}return n.abrupt("return");case 2:e.$emit("playlist-update",t);case 3:case"end":return n.stop()}}),n)})))()},onNewPlayingTrack:function(t){var e=this;return Object(E["a"])(regeneratorRuntime.mark((function n(){var a,c;return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t.plugin_name===e.pluginName){n.next=2;break}return n.abrupt("return");case 2:e.notify({html:"<b>".concat(null===(a=t.track)||void 0===a?void 0:a.artist,"</b><br>").concat(null===(c=t.track)||void 0===c?void 0:c.title),image:{iconClass:"fa fa-play"}}),e.$emit("new-playing-track",t);case 4:case"end":return n.stop()}}),n)})))()},openAddToPlaylist:function(t){var e=this;return Object(E["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.addToPlaylistTrack=t,e.$refs.playlistsModal.isVisible=!0;case 2:case"end":return n.stop()}}),n)})))()},addToPlaylist:function(){var t=this;return Object(E["a"])(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$emit("add-to-playlist",{track:t.addToPlaylistTrack,playlists:Object(a["a"])(Array(t.selectedPlaylists.length).keys()).filter((function(e){return t.selectedPlaylists[e]}))}),t.$refs.playlistsModal.isVisible=!1,t.addToPlaylistTrack=null,t.playlistFilter="";case 4:case"end":return e.stop()}}),e)})))()},search:function(t){var e=this;return Object(E["a"])(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){while(1)switch(n.prev=n.next){case 0:e.$emit("search",t),e.$refs.trackInfo.isVisible=!1,e.selectedView="search";case 3:case"end":return n.stop()}}),n)})))()}},mounted:function(){var t=this;this.subscribe(this.onStatusEvent,"on-status-update","platypush.message.event.music.MusicPlayEvent","platypush.message.event.music.MusicPauseEvent","platypush.message.event.music.MusicStopEvent","platypush.message.event.music.SeekChangeEvent","platypush.message.event.music.VolumeChangeEvent","platypush.message.event.music.MuteChangeEvent","platypush.message.event.music.PlaybackRepeatModeChangeEvent","platypush.message.event.music.PlaybackRandomModeChangeEvent","platypush.message.event.music.PlaybackConsumeModeChangeEvent","platypush.message.event.music.PlaybackSingleModeChangeEvent"),this.subscribe(this.onPlaylistEvent,"on-playlist-update","platypush.message.event.music.PlaylistChangeEvent"),this.subscribe(this.onNewPlayingTrack,"on-new-playing-track","platypush.message.event.music.NewPlayingTrackEvent"),this.$watch((function(){return t.trackInfo}),(function(e){null!=e&&(t.$refs.trackInfo.isVisible=!0)}))},unmounted:function(){this.unsubscribe("on-status-update"),this.unsubscribe("on-playlist-update")}};n("b8b0");Se.render=D,Se.__scopeId="data-v-2ccb9e3d";e["default"]=Se},"391b":function(t,e,n){},4563:function(t,e,n){"use strict";n("a0a3")},"577a":function(t,e,n){},6062:function(t,e,n){"use strict";var a=n("6d61"),c=n("6566");t.exports=a("Set",(function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}}),c)},6566:function(t,e,n){"use strict";var a=n("9bf2").f,c=n("7c73"),l=n("e2cc"),i=n("0366"),s=n("19aa"),r=n("2266"),o=n("7dd0"),u=n("2626"),d=n("83ab"),f=n("f183").fastKey,b=n("69f3"),h=b.set,O=b.getterFor;t.exports={getConstructor:function(t,e,n,o){var u=t((function(t,a){s(t,u,e),h(t,{type:e,index:c(null),first:void 0,last:void 0,size:0}),d||(t.size=0),void 0!=a&&r(a,t[o],{that:t,AS_ENTRIES:n})})),b=O(e),v=function(t,e,n){var a,c,l=b(t),i=p(t,e);return i?i.value=n:(l.last=i={index:c=f(e,!0),key:e,value:n,previous:a=l.last,next:void 0,removed:!1},l.first||(l.first=i),a&&(a.next=i),d?l.size++:t.size++,"F"!==c&&(l.index[c]=i)),t},p=function(t,e){var n,a=b(t),c=f(e);if("F"!==c)return a.index[c];for(n=a.first;n;n=n.next)if(n.key==e)return n};return l(u.prototype,{clear:function(){var t=this,e=b(t),n=e.index,a=e.first;while(a)a.removed=!0,a.previous&&(a.previous=a.previous.next=void 0),delete n[a.index],a=a.next;e.first=e.last=void 0,d?e.size=0:t.size=0},delete:function(t){var e=this,n=b(e),a=p(e,t);if(a){var c=a.next,l=a.previous;delete n.index[a.index],a.removed=!0,l&&(l.next=c),c&&(c.previous=l),n.first==a&&(n.first=c),n.last==a&&(n.last=l),d?n.size--:e.size--}return!!a},forEach:function(t){var e,n=b(this),a=i(t,arguments.length>1?arguments[1]:void 0,3);while(e=e?e.next:n.first){a(e.value,e.key,this);while(e&&e.removed)e=e.previous}},has:function(t){return!!p(this,t)}}),l(u.prototype,n?{get:function(t){var e=p(this,t);return e&&e.value},set:function(t,e){return v(this,0===t?0:t,e)}}:{add:function(t){return v(this,t=0===t?0:t,t)}}),d&&a(u.prototype,"size",{get:function(){return b(this).size}}),u},setStrong:function(t,e,n){var a=e+" Iterator",c=O(e),l=O(a);o(t,e,(function(t,e){h(this,{type:a,target:t,state:c(t),kind:e,last:void 0})}),(function(){var t=l(this),e=t.kind,n=t.last;while(n&&n.removed)n=n.previous;return t.target&&(t.last=n=n?n.next:t.state.first)?"keys"==e?{value:n.key,done:!1}:"values"==e?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(t.target=void 0,{value:void 0,done:!0})}),n?"entries":"values",!n,!0),u(e)}}},"6d61":function(t,e,n){"use strict";var a=n("23e7"),c=n("da84"),l=n("94ca"),i=n("6eeb"),s=n("f183"),r=n("2266"),o=n("19aa"),u=n("861d"),d=n("d039"),f=n("1c7e"),b=n("d44e"),h=n("7156");t.exports=function(t,e,n){var O=-1!==t.indexOf("Map"),v=-1!==t.indexOf("Weak"),p=O?"set":"add",j=c[t],y=j&&j.prototype,k=j,m={},g=function(t){var e=y[t];i(y,t,"add"==t?function(t){return e.call(this,0===t?0:t),this}:"delete"==t?function(t){return!(v&&!u(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return v&&!u(t)?void 0:e.call(this,0===t?0:t)}:"has"==t?function(t){return!(v&&!u(t))&&e.call(this,0===t?0:t)}:function(t,n){return e.call(this,0===t?0:t,n),this})};if(l(t,"function"!=typeof j||!(v||y.forEach&&!d((function(){(new j).entries().next()})))))k=n.getConstructor(e,t,O,p),s.REQUIRED=!0;else if(l(t,!0)){var C=new k,x=C[p](v?{}:-0,1)!=C,w=d((function(){C.has(1)})),T=f((function(t){new j(t)})),$=!v&&d((function(){var t=new j,e=5;while(e--)t[p](e,e);return!t.has(-0)}));T||(k=e((function(e,n){o(e,k,t);var a=h(new j,e,k);return void 0!=n&&r(n,a[p],{that:a,AS_ENTRIES:O}),a})),k.prototype=y,y.constructor=k),(w||$)&&(g("delete"),g("has"),O&&g("get")),($||x)&&g(p),v&&y.clear&&delete y.clear}return m[t]=k,a({global:!0,forced:k!=j},m),b(k,t),v||n.setStrong(k,t,O),k}},7198:function(t,e,n){},"7efc":function(t,e,n){},8716:function(t,e,n){"use strict";n("f27c")},"981c":function(t,e,n){"use strict";n("7198")},"9fe6":function(t,e,n){"use strict";n("577a")},a0a3:function(t,e,n){},a434:function(t,e,n){"use strict";var a=n("23e7"),c=n("23cb"),l=n("a691"),i=n("50c4"),s=n("7b0b"),r=n("65f0"),o=n("8418"),u=n("1dde"),d=n("ae40"),f=u("splice"),b=d("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,O=Math.min,v=9007199254740991,p="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!f||!b},{splice:function(t,e){var n,a,u,d,f,b,j=s(this),y=i(j.length),k=c(t,y),m=arguments.length;if(0===m?n=a=0:1===m?(n=0,a=y-k):(n=m-2,a=O(h(l(e),0),y-k)),y+n-a>v)throw TypeError(p);for(u=r(j,a),d=0;d<a;d++)f=k+d,f in j&&o(u,d,j[f]);if(u.length=a,n<a){for(d=k;d<y-a;d++)f=d+a,b=d+n,f in j?j[b]=j[f]:delete j[b];for(d=y;d>y-a+n;d--)delete j[d-1]}else if(n>a)for(d=y-a;d>k;d--)f=d+a-1,b=d+n-1,f in j?j[b]=j[f]:delete j[b];for(d=0;d<n;d++)j[d+k]=arguments[d+2];return j.length=y-a+n,u}})},b8b0:function(t,e,n){"use strict";n("d83f")},bb2f:function(t,e,n){var a=n("d039");t.exports=!a((function(){return Object.isExtensible(Object.preventExtensions({}))}))},c3da:function(t,e,n){},cd4d:function(t,e,n){"use strict";n("391b")},d83f:function(t,e,n){},ea5f:function(t,e,n){"use strict";n("7efc")},f183:function(t,e,n){var a=n("d012"),c=n("861d"),l=n("5135"),i=n("9bf2").f,s=n("90e3"),r=n("bb2f"),o=s("meta"),u=0,d=Object.isExtensible||function(){return!0},f=function(t){i(t,o,{value:{objectID:"O"+ ++u,weakData:{}}})},b=function(t,e){if(!c(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!l(t,o)){if(!d(t))return"F";if(!e)return"E";f(t)}return t[o].objectID},h=function(t,e){if(!l(t,o)){if(!d(t))return!0;if(!e)return!1;f(t)}return t[o].weakData},O=function(t){return r&&v.REQUIRED&&d(t)&&!l(t,o)&&f(t),t},v=t.exports={REQUIRED:!1,fastKey:b,getWeakData:h,onFreeze:O};a[o]=!0},f27c:function(t,e,n){}}]);
//# sourceMappingURL=chunk-3ffdd2f0.c56c2562.js.map