From 0873c6cb65e3a44f642154819fb085faae7c8e44 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 21 Apr 2024 18:09:35 +0000 Subject: [PATCH] [web] Rebuild web interface --- htdocs/assets/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/assets/index.js b/htdocs/assets/index.js index bba03ee5..97f07776 100644 --- a/htdocs/assets/index.js +++ b/htdocs/assets/index.js @@ -58,7 +58,7 @@ font-size="${e.size/3}" fill="${PP(t)>.5?"#000000":"#FFFFFF"}"> ${e.caption} - `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`},LP={name:"CoverArtwork",props:{album:{default:"",type:String},artist:{default:"",type:String},artwork_url:{default:"",type:String}},emits:["click"],data(){return{font:{family:"sans-serif",weight:"bold"},lifecycle:{error:e=>{e.src=this.dataURI()}},size:600}},computed:{alt_text(){return`${this.artist} - ${this.album}`},caption(){return(this.album||this.artist||"").substring(0,2)}},methods:{dataURI(){return IP({alternate:this.alt_text,caption:this.caption,font:this.font,size:this.size})}}};function NP(e,t,n,r,o,s){const i=vd("lazy");return E(),P("figure",null,[pt(c("img",{onClick:t[0]||(t[0]=a=>e.$emit("click"))},null,512),[[i,{src:n.artwork_url,lifecycle:o.lifecycle}]])])}const xr=ie(LP,[["render",NP]]),{t:ca,locale:DP}=Pl.global,q1="NO_INDEX",RP=(e,t)=>e-t,MP=(e,t)=>e.localeCompare(t,DP.value),FP=(e,t)=>new Date(e)-new Date(t)||(e?t?0:1:-1),VP=e=>{e.map(({field:t,type:n,order:r=1})=>{switch(n){case String:return(o,s)=>MP(o[t],s[t])*r;case Number:return(o,s)=>RP(o[t],s[t])*r;case Date:return(o,s)=>FP(o[t],s[t])*r;default:return null}})},HP=(e="")=>{const t=e.charAt(0);return t.match(new RegExp("\\p{Letter}","gu"))?t.toUpperCase():t.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"},UP=e=>{},jP=[{difference:NaN,text:()=>ca("grouped-list.undefined")},{difference:864e5,text:()=>ca("grouped-list.today")},{difference:6048e5,text:()=>ca("grouped-list.last-week")},{difference:2592e6,text:()=>ca("grouped-list.last-month")},{difference:1/0,text:e=>e.getFullYear()}],BP=e=>{var r;const t=new Date(e),n=new Date-t;return(r=jP.find(o=>isNaN(n)||n{switch(t){case String:return n=>HP(n[e]);case Number:return n=>n[e];case Date:return n=>BP(n[e]);case"Digits":return n=>UP(n[e]);default:return n=>q1}};class Ee{constructor({items:t=[],total:n=0,offset:r=0,limit:o=-1}={},s){this.items=t,this.total=n,this.offset=r,this.limit=o,this.count=t.length,this.indices=[],this.group(s)}group({criteria:t=[],filters:n=[],index:r}={}){const o=WP(r),s=this.items.filter(l=>n.every(u=>u(l)));this.count=s.length;const i=VP(t),a=s.sort((l,u)=>i.reduce((d,m)=>d||m(l,u),0));this.itemsGrouped=a.reduce((l,u)=>{const d=o(u);return l.set(d,[...l.get(d)||[],u]),l},new Map),this.indices=Array.from(this.itemsGrouped.keys())}*generate(){for(const[t,n]of this.itemsGrouped.entries()){t!==q1&&(yield{index:t,isItem:!1,item:{},itemId:t});for(const r of n)yield{index:t,isItem:!0,item:r,itemId:r.id}}}[Symbol.iterator](){return this.generate()}}var G1={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,o=null,s=function(f,p){return f.abort=p,f},i=function(f,p){var h;if(o!==null){var _=o.defer();f(function(b){_.resolve(b)},function(b){_.reject(b)}),h=_.promise}else window.Promise&&(h=new window.Promise(f));return h?new s(h,p):null},a=function(){var f=Array.prototype.slice.call(arguments),p=f[0],h=f.slice(1);return p=p||{},h.forEach(function(_){for(var b in _)_.hasOwnProperty(b)&&(p[b]=_[b])}),p},l=function(f,p){var h="";for(var _ in p)if(p.hasOwnProperty(_)){var b=p[_];h+=encodeURIComponent(_)+"="+encodeURIComponent(b)+"&"}return h.length>0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},u=function(f,p){var h=new XMLHttpRequest,_=function(b,C){function k(w){b&&b(w),p&&p(null,w)}function y(){C&&C(h),p&&p(h,null)}var z=f.type||"GET";if(h.open(z,l(f.url,f.params)),r&&h.setRequestHeader("Authorization","Bearer "+r),h.onreadystatechange=function(){if(h.readyState===4){var w=null;try{w=h.responseText?JSON.parse(h.responseText):""}catch(N){console.error(N)}h.status>=200&&h.status<300?k(w):y()}},z==="GET")h.send(null);else{var x=null;f.postData&&(f.contentType==="image/jpeg"?(x=f.postData,h.setRequestHeader("Content-Type",f.contentType)):(x=JSON.stringify(f.postData),h.setRequestHeader("Content-Type","application/json"))),h.send(x)}};return p?(_(),null):i(_,function(){h.abort()})},d=function(f,p,h,_){var b={},C=null;typeof p=="object"?(b=p,C=h):typeof p=="function"&&(C=p);var k=f.type||"GET";return k!=="GET"&&f.postData&&!_?f.postData=a(f.postData,b):f.params=a(f.params,b),u(f,C)},m=function(){};return m.prototype={constructor:t},m.prototype.getGeneric=function(f,p){var h={url:f};return d(h,p)},m.prototype.getMe=function(f,p){var h={url:n+"/me"};return d(h,f,p)},m.prototype.getMySavedTracks=function(f,p){var h={url:n+"/me/tracks"};return d(h,f,p)},m.prototype.addToMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"PUT",postData:f};return d(_,p,h)},m.prototype.removeFromMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"DELETE",postData:f};return d(_,p,h)},m.prototype.containsMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getMySavedAlbums=function(f,p){var h={url:n+"/me/albums"};return d(h,f,p)},m.prototype.addToMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"PUT",postData:f};return d(_,p,h)},m.prototype.removeFromMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"DELETE",postData:f};return d(_,p,h)},m.prototype.containsMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getMyTopArtists=function(f,p){var h={url:n+"/me/top/artists"};return d(h,f,p)},m.prototype.getMyTopTracks=function(f,p){var h={url:n+"/me/top/tracks"};return d(h,f,p)},m.prototype.getMyRecentlyPlayedTracks=function(f,p){var h={url:n+"/me/player/recently-played"};return d(h,f,p)},m.prototype.followUsers=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return d(h,p)},m.prototype.followArtists=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return d(h,p)},m.prototype.followPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return d(_,p,h)},m.prototype.unfollowUsers=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return d(h,p)},m.prototype.unfollowArtists=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return d(h,p)},m.prototype.unfollowPlaylist=function(f,p){var h={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return d(h,p)},m.prototype.isFollowingUsers=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return d(h,p)},m.prototype.isFollowingArtists=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return d(h,p)},m.prototype.areFollowingPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return d(_,h)},m.prototype.getFollowedArtists=function(f,p){var h={url:n+"/me/following",type:"GET",params:{type:"artist"}};return d(h,f,p)},m.prototype.getUser=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)};return d(_,p,h)},m.prototype.getUserPlaylists=function(f,p,h){var _;return typeof f=="string"?_={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(_={url:n+"/me/playlists"},h=p,p=f),d(_,p,h)},m.prototype.getPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f};return d(_,p,h)},m.prototype.getPlaylistTracks=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks"};return d(_,p,h)},m.prototype.getPlaylistCoverImage=function(f,p){var h={url:n+"/playlists/"+f+"/images"};return d(h,p)},m.prototype.createPlaylist=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return d(_,p,h)},m.prototype.changePlaylistDetails=function(f,p,h){var _={url:n+"/playlists/"+f,type:"PUT",postData:p};return d(_,p,h)},m.prototype.addTracksToPlaylist=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return d(b,h,_,!0)},m.prototype.replaceTracksInPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return d(_,{},h)},m.prototype.reorderTracksInPlaylist=function(f,p,h,_,b){var C={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return d(C,_,b)},m.prototype.removeTracksFromPlaylist=function(f,p,h){var _=p.map(function(C){return typeof C=="string"?{uri:C}:C}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:_}};return d(b,{},h)},m.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,_){var b=p.map(function(k){return typeof k=="string"?{uri:k}:k}),C={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:h}};return d(C,{},_)},m.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return d(b,{},_)},m.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var _={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return d(_,{},h)},m.prototype.getAlbum=function(f,p,h){var _={url:n+"/albums/"+f};return d(_,p,h)},m.prototype.getAlbumTracks=function(f,p,h){var _={url:n+"/albums/"+f+"/tracks"};return d(_,p,h)},m.prototype.getAlbums=function(f,p,h){var _={url:n+"/albums/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getTrack=function(f,p,h){var _={};return _.url=n+"/tracks/"+f,d(_,p,h)},m.prototype.getTracks=function(f,p,h){var _={url:n+"/tracks/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getArtist=function(f,p,h){var _={url:n+"/artists/"+f};return d(_,p,h)},m.prototype.getArtists=function(f,p,h){var _={url:n+"/artists/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getArtistAlbums=function(f,p,h){var _={url:n+"/artists/"+f+"/albums"};return d(_,p,h)},m.prototype.getArtistTopTracks=function(f,p,h,_){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return d(b,h,_)},m.prototype.getArtistRelatedArtists=function(f,p,h){var _={url:n+"/artists/"+f+"/related-artists"};return d(_,p,h)},m.prototype.getFeaturedPlaylists=function(f,p){var h={url:n+"/browse/featured-playlists"};return d(h,f,p)},m.prototype.getNewReleases=function(f,p){var h={url:n+"/browse/new-releases"};return d(h,f,p)},m.prototype.getCategories=function(f,p){var h={url:n+"/browse/categories"};return d(h,f,p)},m.prototype.getCategory=function(f,p,h){var _={url:n+"/browse/categories/"+f};return d(_,p,h)},m.prototype.getCategoryPlaylists=function(f,p,h){var _={url:n+"/browse/categories/"+f+"/playlists"};return d(_,p,h)},m.prototype.search=function(f,p,h,_){var b={url:n+"/search/",params:{q:f,type:p.join(",")}};return d(b,h,_)},m.prototype.searchAlbums=function(f,p,h){return this.search(f,["album"],p,h)},m.prototype.searchArtists=function(f,p,h){return this.search(f,["artist"],p,h)},m.prototype.searchTracks=function(f,p,h){return this.search(f,["track"],p,h)},m.prototype.searchPlaylists=function(f,p,h){return this.search(f,["playlist"],p,h)},m.prototype.searchShows=function(f,p,h){return this.search(f,["show"],p,h)},m.prototype.searchEpisodes=function(f,p,h){return this.search(f,["episode"],p,h)},m.prototype.getAudioFeaturesForTrack=function(f,p){var h={};return h.url=n+"/audio-features/"+f,d(h,{},p)},m.prototype.getAudioFeaturesForTracks=function(f,p){var h={url:n+"/audio-features",params:{ids:f}};return d(h,{},p)},m.prototype.getAudioAnalysisForTrack=function(f,p){var h={};return h.url=n+"/audio-analysis/"+f,d(h,{},p)},m.prototype.getRecommendations=function(f,p){var h={url:n+"/recommendations"};return d(h,f,p)},m.prototype.getAvailableGenreSeeds=function(f){var p={url:n+"/recommendations/available-genre-seeds"};return d(p,{},f)},m.prototype.getMyDevices=function(f){var p={url:n+"/me/player/devices"};return d(p,{},f)},m.prototype.getMyCurrentPlaybackState=function(f,p){var h={url:n+"/me/player"};return d(h,f,p)},m.prototype.getMyCurrentPlayingTrack=function(f,p){var h={url:n+"/me/player/currently-playing"};return d(h,f,p)},m.prototype.transferMyPlayback=function(f,p,h){var _=p||{};_.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:_};return d(b,p,h)},m.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={};["context_uri","uris","offset","position_ms"].forEach(function(k){k in f&&(_[k]=f[k])});var b={type:"PUT",url:n+"/me/player/play",params:h,postData:_},C=typeof f=="function"?f:{};return d(b,C,p)},m.prototype.queue=function(f,p,h){p=p||{};var _="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:_};return d(b,p,h)},m.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"PUT",url:n+"/me/player/pause",params:h};return d(_,f,p)},m.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/next",params:h};return d(_,f,p)},m.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/previous",params:h};return d(_,f,p)},m.prototype.seek=function(f,p,h){p=p||{};var _={position_ms:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:_};return d(b,p,h)},m.prototype.setRepeat=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:_};return d(b,p,h)},m.prototype.setVolume=function(f,p,h){p=p||{};var _={volume_percent:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:_};return d(b,p,h)},m.prototype.setShuffle=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:_};return d(b,p,h)},m.prototype.getShow=function(f,p,h){var _={};return _.url=n+"/shows/"+f,d(_,p,h)},m.prototype.getShows=function(f,p,h){var _={url:n+"/shows/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getMySavedShows=function(f,p){var h={url:n+"/me/shows"};return d(h,f,p)},m.prototype.addToMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"PUT",postData:f};return d(_,p,h)},m.prototype.removeFromMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"DELETE",postData:f};return d(_,p,h)},m.prototype.containsMySavedShows=function(f,p,h){var _={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getShowEpisodes=function(f,p,h){var _={url:n+"/shows/"+f+"/episodes"};return d(_,p,h)},m.prototype.getEpisode=function(f,p,h){var _={};return _.url=n+"/episodes/"+f,d(_,p,h)},m.prototype.getEpisodes=function(f,p,h){var _={url:n+"/episodes/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getAccessToken=function(){return r},m.prototype.setAccessToken=function(f){r=f},m.prototype.setPromiseImplementation=function(f){var p=!1;try{var h=new f(function(_){_()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(_){console.error(_)}if(p)o=f;else throw new Error("Unsupported implementation of Promises/A+")},m}();e.exports=t})(G1);var qP=G1.exports;const Jn=Nl(qP),GP={name:"ModalDialogTrack",props:{item:{required:!0,type:Object},show:Boolean},emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"&&this.item.media_kind!=="podcast"){const e=new Jn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{mark_new(){j.library_track_update(this.item.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){j.library_track_update(this.item.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open_album(){this.item.data_kind==="spotify"&&this.item.media_kind!=="podcast"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):this.item.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.album_id}}):this.item.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.album_id}}):this.item.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.item.media_kind==="music"||this.item.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}}):this.item.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-artist",params:{id:this.item.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{media_kind:this.item.media_kind}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},KP={key:0,class:"modal is-active"},ZP={class:"modal-content"},YP={class:"card"},XP={class:"card-content"},JP=["textContent"],QP=["textContent"],eI={key:0,class:"buttons"},tI=["textContent"],nI=["textContent"],rI={class:"content is-small"},oI={key:0},sI=["textContent"],iI=["textContent"],aI={key:1},lI=["textContent"],cI=["textContent"],uI={key:2},dI=["textContent"],mI=["textContent"],fI={key:3},pI=["textContent"],hI=["textContent"],_I={key:4},gI=["textContent"],yI=["textContent"],vI={key:5},bI=["textContent"],zI=["textContent"],CI={key:6},wI=["textContent"],kI=["textContent"],xI={key:7},SI=["textContent"],EI=["textContent"],$I=["textContent"],TI=["textContent"],AI=["textContent"],OI={class:"title is-6"},PI=["textContent"],II={key:8},LI=["textContent"],NI={class:"title is-6"},DI=["textContent"],RI=["textContent"],MI=["textContent"],FI=["textContent"],VI=["textContent"],HI=["textContent"],UI=["textContent"],jI=["textContent"],BI={key:9},WI=["textContent"],qI=["textContent"],GI={class:"card-footer"},KI=["textContent"],ZI=["textContent"],YI=["textContent"];function XI(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",KP,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",ZP,[c("div",YP,[c("div",XP,[c("p",{class:"title is-4",textContent:g(n.item.title)},null,8,JP),c("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,QP),n.item.media_kind==="podcast"?(E(),P("div",eI,[n.item.play_count>0?(E(),P("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...a)=>s.mark_new&&s.mark_new(...a)),textContent:g(e.$t("dialog.track.mark-as-new"))},null,8,tI)):ee("",!0),n.item.play_count===0?(E(),P("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...a)=>s.mark_played&&s.mark_played(...a)),textContent:g(e.$t("dialog.track.mark-as-played"))},null,8,nI)):ee("",!0)])):ee("",!0),c("div",rI,[n.item.album?(E(),P("p",oI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,sI),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.item.album)},null,8,iI)])):ee("",!0),n.item.album_artist&&n.item.media_kind!=="audiobook"?(E(),P("p",aI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,lI),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:g(n.item.album_artist)},null,8,cI)])):ee("",!0),n.item.composer?(E(),P("p",uI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,dI),c("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,mI)])):ee("",!0),n.item.date_released?(E(),P("p",fI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,pI),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.item.date_released))},null,8,hI)])):n.item.year?(E(),P("p",_I,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,gI),c("span",{class:"title is-6",textContent:g(n.item.year)},null,8,yI)])):ee("",!0),n.item.genre?(E(),P("p",vI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,bI),c("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:g(n.item.genre)},null,8,zI)])):ee("",!0),n.item.disc_number?(E(),P("p",CI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,wI),c("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,kI)])):ee("",!0),n.item.length_ms?(E(),P("p",xI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,SI),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,EI)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,$I),c("span",{class:"title is-6",textContent:g(n.item.path)},null,8,TI)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,AI),c("span",OI,[c("span",{textContent:g(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,PI)])]),n.item.samplerate?(E(),P("p",II,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,LI),c("span",NI,[c("span",{textContent:g(n.item.type)},null,8,DI),n.item.samplerate?(E(),P("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.item.samplerate}))},null,8,RI)):ee("",!0),n.item.channels?(E(),P("span",{key:1,textContent:g(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,MI)):ee("",!0),n.item.bitrate?(E(),P("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.item.bitrate}))},null,8,FI)):ee("",!0)])])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,VI),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.item.time_added))},null,8,HI)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,UI),c("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.item.rating/10)}))},null,8,jI)]),n.item.comment?(E(),P("p",BI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,WI),c("span",{class:"title is-6",textContent:g(n.item.comment)},null,8,qI)])):ee("",!0)])]),c("footer",GI,[c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add"))},null,8,KI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add-next"))},null,8,ZI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.play"))},null,8,YI)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[9]||(t[9]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const JI=ie(GP,[["render",XI]]),QI={name:"ListTracks",components:{ModalDialogTrack:JI},props:{expression:{default:"",type:String},items:{required:!0,type:Object},show_icon:Boolean,show_progress:Boolean,uris:{default:"",type:String}},emits:["play-count-changed"],data(){return{selected_item:{},show_details_modal:!1}},methods:{open_dialog(e){this.selected_item=e,this.show_details_modal=!0},play(e){this.uris?j.player_play_uri(this.uris,!1,this.items.items.indexOf(e)):this.expression?j.player_play_expression(this.expression,!1,this.items.items.indexOf(e)):j.player_play_uri(e.uri,!1)}}},eL={key:0,class:"mt-6 mb-5 py-2"},tL=["id","textContent"],nL=["onClick"],rL={key:0,class:"media-left is-clickable"},oL={class:"media-content is-clickable is-clipped"},sL=["textContent"],iL=["textContent"],aL=["textContent"],lL=["max","value"],cL={class:"media-right"},uL=["onClick"];function dL(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-track");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P(Ce,{key:l.itemId},[l.isItem?(E(),P("div",{key:1,class:ze(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:u=>s.play(l.item)},[n.show_icon?(E(),P("figure",rL,[v(i,{class:"icon",name:"file-outline",size:"16"})])):ee("",!0),c("div",oL,[c("h1",{class:ze(["title is-6",{"has-text-grey":l.item.media_kind==="podcast"&&l.item.play_count>0}]),textContent:g(l.item.title)},null,10,sL),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(l.item.artist)},null,8,iL),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.item.album)},null,8,aL),n.show_progress&&l.item.seek_ms>0?(E(),P("progress",{key:0,class:"progress is-info",max:l.item.length_ms,value:l.item.seek_ms},null,8,lL)):ee("",!0)]),c("div",cL,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,uL)])],10,nL)):(E(),P("div",eL,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,tL)]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=l=>e.$emit("play-count-changed"))},null,8,["item","show"])]))],64)}const mn=ie(QI,[["render",dL],["__scopeId","data-v-84498238"]]),mL={name:"ModalDialogAlbum",components:{CoverArtwork:xr},props:{item:{required:!0,type:Object},media_kind:{default:"",type:String},show:Boolean},emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{media_kind_resolved(){return this.media_kind||this.item.media_kind}},methods:{mark_played(){j.library_album_track_update(this.item.id,{play_count:"played"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.id}}):this.$router.push({name:"music-album",params:{id:this.item.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.item.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.item.artist_id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},fL={key:0,class:"modal is-active"},pL={class:"modal-content"},hL={class:"card"},_L={class:"card-content"},gL={class:"title is-4"},yL=["textContent"],vL={key:0,class:"buttons"},bL=["textContent"],zL=["textContent"],CL={class:"content is-small"},wL={key:0},kL=["textContent"],xL=["textContent"],SL={key:1},EL=["textContent"],$L=["textContent"],TL={key:2},AL=["textContent"],OL=["textContent"],PL=["textContent"],IL=["textContent"],LL=["textContent"],NL=["textContent"],DL=["textContent"],RL=["textContent"],ML=["textContent"],FL=["textContent"],VL={class:"card-footer"},HL=["textContent"],UL=["textContent"],jL=["textContent"];function BL(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",fL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",pL,[c("div",hL,[c("div",_L,[v(i,{artwork_url:n.item.artwork_url,artist:n.item.artist,album:n.item.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["artwork_url","artist","album"]),c("p",gL,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open&&s.open(...l)),textContent:g(n.item.name)},null,8,yL)]),s.media_kind_resolved==="podcast"?(E(),P("div",vL,[c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>s.mark_played&&s.mark_played(...l)),textContent:g(e.$t("dialog.album.mark-as-played"))},null,8,bL),n.item.data_kind==="url"?(E(),P("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:g(e.$t("dialog.album.remove-podcast"))},null,8,zL)):ee("",!0)])):ee("",!0),c("div",CL,[n.item.artist?(E(),P("p",wL,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,kL),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:g(n.item.artist)},null,8,xL)])):ee("",!0),n.item.date_released?(E(),P("p",SL,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,EL),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.item.date_released))},null,8,$L)])):n.item.year?(E(),P("p",TL,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,AL),c("span",{class:"title is-6",textContent:g(n.item.year)},null,8,OL)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,PL),c("span",{class:"title is-6",textContent:g(n.item.track_count)},null,8,IL)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,LL),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,NL)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,DL),c("span",{class:"title is-6",textContent:g(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,RL)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,ML),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.item.time_added))},null,8,FL)])])]),c("footer",VL,[c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.queue_add&&s.queue_add(...l))},[v(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add"))},null,8,HL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[v(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add-next"))},null,8,UL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>s.play&&s.play(...l))},[v(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.play"))},null,8,jL)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):ee("",!0)]),_:1})}const jl=ie(mL,[["render",BL]]),Tp={load(e){return Promise.all([j.library_album(e.params.id),j.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data,{criteria:[{field:"disc_number",type:Number}],index:{field:"disc_number",type:Number}}),e.tracks.indices.length<2&&e.tracks.group()}},WL={name:"PageAlbum",components:{ContentWithHero:Ul,CoverArtwork:xr,ListTracks:mn,ModalDialogAlbum:jl},beforeRouteEnter(e,t,n){Tp.load(e).then(r=>{n(o=>Tp.set(o,r))})},data(){return{album:{},show_details_modal:!1,tracks:new Ee}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){j.player_play_uri(this.album.uri,!0)}}},qL=["textContent"],GL={class:"subtitle is-6 has-text-link"},KL=["textContent"],ZL={class:"buttons fd-is-centered-mobile mt-5"},YL=["textContent"],XL=["textContent"];function JL(e,t,n,r,o,s){const i=A("mdicon"),a=A("cover-artwork"),l=A("list-tracks"),u=A("modal-dialog-album"),d=A("content-with-hero");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,qL),c("h2",GL,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...m)=>s.open_artist&&s.open_artist(...m)),textContent:g(o.album.artist)},null,8,KL)]),c("div",ZL,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.album.shuffle"))},null,8,YL)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=m=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":L(()=>[v(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=m=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.album.track-count",{count:o.album.track_count}))},null,8,XL),v(l,{items:o.tracks,uris:o.album.uri},null,8,["items","uris"]),v(u,{item:o.album,show:o.show_details_modal,onClose:t[4]||(t[4]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const QL=ie(WL,[["render",JL]]),e4={name:"ModalDialogTrackSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},t4={key:0,class:"modal is-active"},n4={class:"modal-content"},r4={class:"card"},o4={class:"card-content"},s4=["textContent"],i4=["textContent"],a4={class:"content is-small"},l4=["textContent"],c4=["textContent"],u4=["textContent"],d4=["textContent"],m4=["textContent"],f4=["textContent"],p4=["textContent"],h4=["textContent"],_4=["textContent"],g4=["textContent"],y4=["textContent"],v4=["textContent"],b4={class:"card-footer"},z4=["textContent"],C4=["textContent"],w4=["textContent"];function k4(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",t4,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",n4,[c("div",r4,[c("div",o4,[c("p",{class:"title is-4",textContent:g(n.item.name)},null,8,s4),c("p",{class:"subtitle",textContent:g(n.item.artists[0].name)},null,8,i4),c("div",a4,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,l4),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.item.album.name)},null,8,c4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,u4),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:g(n.item.artists[0].name)},null,8,d4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,m4),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.item.album.release_date))},null,8,f4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,p4),c("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,h4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,_4),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.duration_ms))},null,8,g4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,y4),c("span",{class:"title is-6",textContent:g(n.item.uri)},null,8,v4)])])]),c("footer",b4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add"))},null,8,z4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add-next"))},null,8,C4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.play"))},null,8,w4)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const x4=ie(e4,[["render",k4]]),S4={name:"ListTracksSpotify",components:{ModalDialogTrackSpotify:x4},props:{context_uri:{default:"",type:String},items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open_dialog(e){this.selected_item=e,this.show_details_modal=!0},play(e){e.is_playable&&j.player_play_uri(this.context_uri||e.uri,!1,e.position||0)}}},E4=["onClick"],$4=["textContent"],T4=["textContent"],A4=["textContent"],O4={key:0,class:"subtitle is-7"},P4=["textContent"],I4=["textContent"],L4={class:"media-right"},N4=["onClick"];function D4(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-track-spotify");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P("div",{key:l.id,class:"media is-align-items-center"},[c("div",{class:ze(["media-content is-clipped",{"is-clickable":l.is_playable,"fd-is-not-allowed":!l.is_playable}]),onClick:u=>s.play(l)},[c("h1",{class:ze(["title is-6",{"has-text-grey-light":!l.is_playable}]),textContent:g(l.name)},null,10,$4),c("h2",{class:ze(["subtitle is-7 has-text-weight-bold",{"has-text-grey":l.is_playable,"has-text-grey-light":!l.is_playable}]),textContent:g(l.artists[0].name)},null,10,T4),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.album.name)},null,8,A4),l.is_playable?ee("",!0):(E(),P("h2",O4,[xt(" ("),c("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,P4),l.restrictions&&l.restrictions.reason?(E(),P("span",{key:0,textContent:g(e.$t("list.spotify.restriction-reason",{reason:l.restrictions.reason}))},null,8,I4)):ee("",!0),xt(") ")]))],10,E4),c("div",L4,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,N4)])]))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const Qa=ie(S4,[["render",D4]]),R4={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:xr},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],data(){return{artwork_visible:!1}},methods:{artwork_error(){this.artwork_visible=!1},artwork_loaded(){this.artwork_visible=!0},artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""},open(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},M4={key:0,class:"modal is-active"},F4={class:"modal-content"},V4={class:"card"},H4={class:"card-content"},U4={class:"title is-4"},j4=["textContent"],B4={class:"content is-small"},W4=["textContent"],q4=["textContent"],G4=["textContent"],K4=["textContent"],Z4=["textContent"],Y4=["textContent"],X4={class:"card-footer"},J4=["textContent"],Q4=["textContent"],eN=["textContent"];function tN(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",M4,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",F4,[c("div",V4,[c("div",H4,[v(i,{artwork_url:s.artwork_url(n.item),artist:n.item.artist,album:n.item.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:s.artwork_loaded,onError:s.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),c("p",U4,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open&&s.open(...l)),textContent:g(n.item.name)},null,8,j4)]),c("div",B4,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,W4),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:g(n.item.artists[0].name)},null,8,q4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,G4),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.item.release_date))},null,8,K4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,Z4),c("span",{class:"title is-6",textContent:g(n.item.album_type)},null,8,Y4)])])]),c("footer",X4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>s.queue_add&&s.queue_add(...l))},[v(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add"))},null,8,J4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[v(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add-next"))},null,8,Q4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.play&&s.play(...l))},[v(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.play"))},null,8,eN)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):ee("",!0)]),_:1})}const K1=ie(R4,[["render",tN]]),Ap={load(e){const t=new Jn;return t.setAccessToken(ht.state.spotify.webapi_token),t.getAlbum(e.params.id,{market:ht.state.spotify.webapi_country})},set(e,t){e.album=t}},nN={name:"PageAlbumSpotify",components:{ContentWithHero:Ul,CoverArtwork:xr,ListTracksSpotify:Qa,ModalDialogAlbumSpotify:K1},beforeRouteEnter(e,t,n){Ap.load(e).then(r=>{n(o=>Ap.set(o,r))})},data(){return{album:{artists:[{}],tracks:{}},show_details_modal:!1}},computed:{tracks(){const{album:e}=this;return e.tracks.total?e.tracks.items.map(t=>({...t,album:e})):{}}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)??""},open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,j.player_play_uri(this.album.uri,!0)}}},rN=["textContent"],oN={class:"subtitle is-6 has-text-link"},sN=["textContent"],iN={class:"buttons fd-is-centered-mobile mt-5"},aN=["textContent"],lN=["textContent"];function cN(e,t,n,r,o,s){const i=A("mdicon"),a=A("cover-artwork"),l=A("list-tracks-spotify"),u=A("modal-dialog-album-spotify"),d=A("content-with-hero");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,rN),c("h2",oN,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...m)=>s.open_artist&&s.open_artist(...m)),textContent:g(o.album.artists[0].name)},null,8,sN)]),c("div",iN,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.album.shuffle"))},null,8,aN)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=m=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":L(()=>[v(a,{artwork_url:s.artwork_url(o.album),artist:o.album.artists[0].name,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=m=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.spotify.album.track-count",{count:o.album.tracks.total}))},null,8,lN),v(l,{items:s.tracks,context_uri:o.album.uri},null,8,["items","context_uri"]),v(u,{item:o.album,show:o.show_details_modal,onClose:t[4]||(t[4]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const uN=ie(nN,[["render",cN]]),dN={name:"ContentWithHeading",data(){return{options_visible:!1}},computed:{icon_name(){return this.options_visible?"chevron-up":"chevron-down"},position(){return{hash:this.options_visible?"#top":"#app",query:this.$route.query}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options_ref))},methods:{onElementObserved(e){e.forEach(({target:t,isIntersecting:n})=>{this.options_visible=n})},visibilityChanged(e){this.options_visible=e}}},mN={class:"section"},fN={class:"container"},pN={class:"columns is-centered"},hN={class:"column is-four-fifths"},_N={key:0},gN={ref:"options_ref",style:{height:"1px"}},yN={class:"buttons is-centered mt-4 mb-2"},vN={id:"top",class:"level is-clipped"},bN={class:"level-left is-flex-shrink-1"},zN={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},CN={class:"level-right has-text-centered-mobile"},wN={class:"mt-4"};function kN(e,t,n,r,o,s){const i=A("mdicon"),a=A("router-link");return E(),P("section",mN,[c("div",fN,[c("div",pN,[c("div",hN,[e.$slots.options?(E(),P("section",_N,[c("div",gN,null,512),vt(e.$slots,"options"),c("nav",yN,[v(a,{class:"button is-small is-white",to:s.position},{default:L(()=>[v(i,{class:"icon is-small",name:s.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):ee("",!0),c("div",{class:ze({"is-full-height":e.$slots.options})},[c("nav",vN,[c("div",bN,[c("div",zN,[c("div",null,[vt(e.$slots,"heading-left")])])]),c("div",CN,[vt(e.$slots,"heading-right")])]),vt(e.$slots,"content"),c("div",wN,[vt(e.$slots,"footer")])],2)])])])])}const Qe=ie(dN,[["render",kN]]),xN={name:"ControlDropdown",props:{options:{required:!0,type:Array},value:{required:!0,type:[String,Number]}},emits:["update:value"],data(){return{active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{deactivate(){this.active=!1},select(e){this.active=!1,this.$emit("update:value",e.id)}}},SN={class:"dropdown-trigger"},EN=["textContent"],$N={id:"dropdown",class:"dropdown-menu",role:"menu"},TN={class:"dropdown-content"},AN=["onClick","textContent"];function ON(e,t,n,r,o,s){const i=A("mdicon"),a=vd("click-away");return pt((E(),P("div",{class:ze(["dropdown",{"is-active":o.active}])},[c("div",SN,[c("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>o.active=!o.active)},[c("span",{textContent:g(s.option.name)},null,8,EN),v(i,{class:"icon",name:"chevron-down",size:"16"})])]),c("div",$N,[c("div",TN,[(E(!0),P(Ce,null,Ct(n.options,l=>(E(),P("a",{key:l.id,class:ze(["dropdown-item",{"is-active":n.value===l.id}]),onClick:u=>s.select(l),textContent:g(l.name)},null,10,AN))),128))])])],2)),[[a,s.deactivate]])}const Ao=ie(xN,[["render",ON]]),PN={name:"IndexButtonList",props:{indices:{required:!0,type:Array}}},IN={class:"buttons is-centered mb-4 fd-is-square"};function LN(e,t,n,r,o,s){const i=A("router-link");return E(),P("section",null,[c("nav",IN,[(E(!0),P(Ce,null,Ct(n.indices,a=>(E(),xe(i,{key:a,class:"button is-small",to:{hash:`#index_${a}`,query:e.$route.query}},{default:L(()=>[xt(g(a),1)]),_:2},1032,["to"]))),128))])])}const Qn=ie(PN,[["render",LN]]),NN={name:"ListAlbums",components:{CoverArtwork:xr,ModalDialog:Dd,ModalDialogAlbum:jl},props:{items:{required:!0,type:Object},media_kind:{default:"",type:String}},emits:["play-count-changed","podcast-deleted"],data(){return{rss_playlist_to_remove:{},selected_item:{},show_details_modal:!1,show_remove_podcast_modal:!1}},computed:{media_kind_resolved(){return this.media_kind||this.selected_item.media_kind},show_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open(e){this.selected_item=e,this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:e.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:e.id}}):this.$router.push({name:"music-album",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0},open_remove_podcast_dialog(){j.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:e})=>{j.library_track_playlists(e.items[0].id).then(({data:t})=>{[this.rss_playlist_to_remove]=t.items.filter(n=>n.type==="rss"),this.show_remove_podcast_modal=!0,this.show_details_modal=!1})})},play_count_changed(){this.$emit("play-count-changed")},remove_podcast(){this.show_remove_podcast_modal=!1,j.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},DN={key:0,class:"mt-6 mb-5 py-2"},RN=["id","textContent"],MN=["onClick"],FN={key:0,class:"media-left"},VN={class:"media-content is-clickable is-clipped"},HN=["textContent"],UN=["textContent"],jN=["textContent"],BN={class:"media-right"},WN=["onClick"],qN=["textContent"],GN={class:"is-size-7"},KN=["textContent"],ZN=["textContent"];function YN(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("mdicon"),l=A("modal-dialog-album"),u=A("modal-dialog");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,d=>(E(),P(Ce,{key:d.itemId},[d.isItem?(E(),P("div",{key:1,class:"media is-align-items-center",onClick:m=>s.open(d.item)},[s.show_artwork?(E(),P("div",FN,[v(i,{artwork_url:d.item.artwork_url,artist:d.item.artist,album:d.item.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):ee("",!0),c("div",VN,[c("div",null,[c("h1",{class:"title is-6",textContent:g(d.item.name)},null,8,HN),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(d.item.artist)},null,8,UN),d.item.date_released&&d.item.media_kind==="music"?(E(),P("h2",{key:0,class:"subtitle is-7 has-text-grey",textContent:g(e.$filters.date(d.item.date_released))},null,8,jN)):ee("",!0)])]),c("div",BN,[c("a",{onClick:_t(m=>s.open_dialog(d.item),["prevent","stop"])},[v(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,WN)])],8,MN)):(E(),P("div",DN,[c("span",{id:`index_${d.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(d.index)},null,8,RN)]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(l,{item:o.selected_item,media_kind:n.media_kind,show:o.show_details_modal,onClose:t[0]||(t[0]=d=>o.show_details_modal=!1),onRemovePodcast:t[1]||(t[1]=d=>s.open_remove_podcast_dialog()),onPlayCountChanged:t[2]||(t[2]=d=>s.play_count_changed())},null,8,["item","media_kind","show"]),v(u,{delete_action:e.$t("page.podcast.remove"),show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),onClose:t[3]||(t[3]=d=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":L(()=>[c("p",{textContent:g(e.$t("list.albums.info-1"))},null,8,qN),c("p",GN,[xt(" ("),c("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,KN),c("b",{textContent:g(o.rss_playlist_to_remove.name)},null,8,ZN),xt(") ")])]),_:1},8,["delete_action","show","title","onDelete"])]))],64)}const bn=ie(NN,[["render",YN]]),XN={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},JN={class:"section fd-tabs-section"},QN={class:"container"},e6={class:"columns is-centered"},t6={class:"column is-four-fifths"},n6={class:"tabs is-centered is-small"},r6=["onClick","onKeypress"],o6=["textContent"],s6=["onClick","onKeypress"],i6=["textContent"],a6=["onClick","onKeypress"],l6=["textContent"],c6=["onClick","onKeypress"],u6=["textContent"],d6=["onClick","onKeypress"],m6=["textContent"],f6=["onClick","onKeypress"],p6=["textContent"];function h6(e,t,n,r,o,s){const i=A("mdicon"),a=A("router-link");return E(),P("section",JN,[c("div",QN,[c("div",e6,[c("div",t6,[c("div",n6,[c("ul",null,[v(a,{to:{name:"music-history"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"history",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.history"))},null,8,o6)],40,r6)],2)]),_:1}),v(a,{to:{name:"music-artists"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.artists"))},null,8,i6)],40,s6)],2)]),_:1}),v(a,{to:{name:"music-albums"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.albums"))},null,8,l6)],40,a6)],2)]),_:1}),v(a,{to:{name:"music-genres"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.genres"))},null,8,u6)],40,c6)],2)]),_:1}),v(a,{to:{name:"music-composers"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.composers"))},null,8,m6)],40,d6)],2)]),_:1}),s.spotify_enabled?(E(),xe(a,{key:0,to:{name:"music-spotify"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"spotify",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.spotify"))},null,8,p6)],40,f6)],2)]),_:1})):ee("",!0)])])])])])])}const dr=ie(XN,[["render",h6]]),Op={load(e){return j.library_albums("music")},set(e,t){e.albums_list=new Ee(t.data)}},_6={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListAlbums:bn,TabsMusic:dr},beforeRouteEnter(e,t,n){Op.load(e).then(r=>{n(o=>Op.set(o,r))})},data(){return{albums_list:new Ee,grouping_options:[{id:1,name:this.$t("page.albums.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.albums.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}},{id:3,name:this.$t("page.albums.sort.recently-released"),options:{criteria:[{field:"date_released",order:-1,type:Date}],index:{field:"date_released",type:Date}}},{id:4,name:this.$t("page.albums.sort.artist-name"),options:{criteria:[{field:"artist",type:String},{field:"name_sort",type:String}],index:{field:"artist",type:String}}},{id:5,name:this.$t("page.albums.sort.artist-date"),options:{criteria:[{field:"artist",type:String},{field:"date_released",type:Date}],index:{field:"artist",type:String}}}]}},computed:{albums(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e.options),this.albums_list},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(ll,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(ki,e)}},selected_grouping_option_id:{get(){return this.$store.state.albums_sort},set(e){this.$store.commit(yh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},g6={class:"fd-page-with-tabs"},y6={class:"columns"},v6={class:"column"},b6=["textContent"],z6={class:"field"},C6={class:"control"},w6=["textContent"],k6=["textContent"],x6={key:0,class:"field"},S6={class:"control"},E6=["textContent"],$6=["textContent"],T6={class:"column"},A6=["textContent"],O6=["textContent"],P6=["textContent"];function I6(e,t,n,r,o,s){const i=A("tabs-music"),a=A("index-button-list"),l=A("control-dropdown"),u=A("list-albums"),d=A("content-with-heading");return E(),P("div",g6,[v(i),v(d,null,{options:L(()=>[v(a,{indices:s.albums.indices},null,8,["indices"]),c("div",y6,[c("div",v6,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,b6),c("div",z6,[c("div",C6,[pt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=m=>s.hide_singles=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:g(e.$t("page.albums.hide-singles"))},null,8,w6)]),c("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,k6)]),s.spotify_enabled?(E(),P("div",x6,[c("div",S6,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=m=>s.hide_spotify=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.albums.hide-spotify"))},null,8,E6)]),c("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,$6)])):ee("",!0)]),c("div",T6,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort.title"))},null,8,A6),v(l,{value:s.selected_grouping_option_id,"onUpdate:value":t[2]||(t[2]=m=>s.selected_grouping_option_id=m),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.albums.title"))},null,8,O6),c("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:s.albums.count}))},null,8,P6)]),"heading-right":L(()=>[]),content:L(()=>[v(u,{items:s.albums},null,8,["items"])]),_:1})])}const L6=ie(_6,[["render",I6]]),N6={name:"ModalDialogArtist",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.item.id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},D6={key:0,class:"modal is-active"},R6={class:"modal-content"},M6={class:"card"},F6={class:"card-content"},V6={class:"title is-4"},H6=["textContent"],U6={class:"content is-small"},j6=["textContent"],B6=["textContent"],W6=["textContent"],q6=["textContent"],G6=["textContent"],K6=["textContent"],Z6=["textContent"],Y6=["textContent"],X6={class:"card-footer"},J6=["textContent"],Q6=["textContent"],e5=["textContent"];function t5(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",D6,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",R6,[c("div",M6,[c("div",F6,[c("p",V6,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,H6)]),c("div",U6,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,j6),c("span",{class:"title is-6",textContent:g(n.item.album_count)},null,8,B6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,W6),c("span",{class:"title is-6",textContent:g(n.item.track_count)},null,8,q6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,G6),c("span",{class:"title is-6",textContent:g(e.$t(`data.kind.${n.item.data_kind}`))},null,8,K6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,Z6),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.item.time_added))},null,8,Y6)])])]),c("footer",X6,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add"))},null,8,J6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add-next"))},null,8,Q6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.play"))},null,8,e5)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Bl=ie(N6,[["render",t5]]),Pp={load(e){return Promise.all([j.library_artist(e.params.id),j.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new Ee(t[1].data)}},n5={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:Ao,ListAlbums:bn,ModalDialogArtist:Bl},beforeRouteEnter(e,t,n){Pp.load(e).then(r=>{n(o=>Pp.set(o,r))})},data(){return{albums_list:new Ee,artist:{},grouping_options:[{id:1,name:this.$t("page.artist.sort.name"),options:{criteria:[{field:"name_sort",type:String}]}},{id:2,name:this.$t("page.artist.sort.release-date"),options:{criteria:[{field:"date_released",type:Date}]}}],show_details_modal:!1}},computed:{albums(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e.options),this.albums_list},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(ki,e)}},selected_grouping_option_id:{get(){return this.$store.state.artist_albums_sort},set(e){this.$store.commit(bh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},track_count(){return[...this.albums].reduce((e,t)=>e+(t.isItem?t.item.track_count:0),0)}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){j.player_play_uri(this.albums.items.map(e=>e.uri).join(),!0)}}},r5={class:"columns"},o5={class:"column"},s5=["textContent"],i5={key:0,class:"field"},a5={class:"control"},l5=["textContent"],c5=["textContent"],u5={class:"column"},d5=["textContent"],m5=["textContent"],f5={class:"buttons is-centered"},p5=["textContent"],h5={class:"heading has-text-centered-mobile"},_5=["textContent"],g5=c("span",null," | ",-1),y5=["textContent"];function v5(e,t,n,r,o,s){const i=A("control-dropdown"),a=A("mdicon"),l=A("list-albums"),u=A("modal-dialog-artist"),d=A("content-with-heading");return E(),P("div",null,[v(d,null,{options:L(()=>[c("div",r5,[c("div",o5,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.filter"))},null,8,s5),s.spotify_enabled?(E(),P("div",i5,[c("div",a5,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=m=>s.hide_spotify=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artist.hide-spotify"))},null,8,l5)]),c("p",{class:"help",textContent:g(e.$t("page.artist.hide-spotify-help"))},null,8,c5)])):ee("",!0)]),c("div",u5,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,d5),v(i,{value:s.selected_grouping_option_id,"onUpdate:value":t[1]||(t[1]=m=>s.selected_grouping_option_id=m),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,m5)]),"heading-right":L(()=>[c("div",f5,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=m=>o.show_details_modal=!0)},[v(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...m)=>s.play&&s.play(...m))},[v(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,p5)])])]),content:L(()=>[c("p",h5,[c("span",{textContent:g(e.$t("page.artist.album-count",{count:s.albums.count}))},null,8,_5),g5,c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...m)=>s.open_tracks&&s.open_tracks(...m)),textContent:g(e.$t("page.artist.track-count",{count:s.track_count}))},null,8,y5)]),v(l,{items:s.albums},null,8,["items"]),v(u,{item:o.artist,show:o.show_details_modal,onClose:t[5]||(t[5]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const b5=ie(n5,[["render",v5]]),z5={name:"ListAlbumsSpotify",components:{CoverArtwork:xr,ModalDialogAlbumSpotify:K1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},computed:{show_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)??""},open(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},C5=["onClick"],w5={key:0,class:"media-left is-clickable"},k5={class:"media-content is-clickable is-clipped"},x5=["textContent"],S5=["textContent"],E5=["textContent"],$5={class:"media-right"},T5=["onClick"];function A5(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("mdicon"),l=A("modal-dialog-album-spotify");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,u=>{var d;return E(),P("div",{key:u.id,class:"media is-align-items-center",onClick:m=>s.open(u)},[s.show_artwork?(E(),P("div",w5,[v(i,{artwork_url:s.artwork_url(u),artist:u.artist,album:u.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):ee("",!0),c("div",k5,[c("h1",{class:"title is-6",textContent:g(u.name)},null,8,x5),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g((d=u.artists[0])==null?void 0:d.name)},null,8,S5),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g([u.album_type,e.$filters.date(u.release_date)].join(", "))},null,8,E5)]),c("div",$5,[c("a",{onClick:_t(m=>s.open_dialog(u),["prevent","stop"])},[v(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,T5)])],8,C5)}),128)),(E(),xe(Dn,{to:"#app"},[v(l,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=u=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const wi=ie(z5,[["render",A5]]),O5={name:"ModalDialogArtistSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},P5={key:0,class:"modal is-active"},I5={class:"modal-content"},L5={class:"card"},N5={class:"card-content"},D5={class:"title is-4"},R5=["textContent"],M5={class:"content is-small"},F5=["textContent"],V5=["textContent"],H5=["textContent"],U5=["textContent"],j5={class:"card-footer"},B5=["textContent"],W5=["textContent"],q5=["textContent"];function G5(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",P5,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",I5,[c("div",L5,[c("div",N5,[c("p",D5,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,R5)]),c("div",M5,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,F5),c("span",{class:"title is-6",textContent:g([n.item.popularity,n.item.followers.total].join(" / "))},null,8,V5)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,H5),c("span",{class:"title is-6",textContent:g(n.item.genres.join(", "))},null,8,U5)])])]),c("footer",j5,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add"))},null,8,B5)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add-next"))},null,8,W5)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.play"))},null,8,q5)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Z1=ie(O5,[["render",G5]]);function K5(e){return e.scrollHeight}function Z5(e){return e.scrollWidth}function Y5(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function X5(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const J5=c("div",{class:"loading"},"Loading...",-1),Q5=c("div",{class:"no-more"},"No more.",-1),eD=c("div",{class:"no-results"},"No results.",-1),tD=c("div",{class:"error"},"Error.",-1),Kd=wr({__name:"VueEternalLoading",props:{load:{required:!0,type:Function},isInitial:{required:!1,type:Boolean,default:!0},position:{required:!1,type:String,default:"default"},container:{required:!1,type:Object,default:null},margin:{required:!1,type:String,default:void 0}},emits:["update:isInitial"],setup(e,{emit:t}){const n=e,r=ir();let o=ir("loading"),s=ir(n.isInitial),i=0;function a(){Cs(()=>{var y,z;n.position==="top"?Y5((y=n.container)!=null?y:document.documentElement,i):n.position==="left"&&X5((z=n.container)!=null?z:document.documentElement,i)})}function l(y,z){return y===0?s.value?(d(),"no-results"):(u(),"no-more"):y!==void 0&&z!==void 0&&y{var z,x;y.isIntersecting&&(n.position==="top"?i=K5((z=n.container)!=null?z:document.documentElement):n.position==="left"&&(i=Z5((x=n.container)!=null?x:document.documentElement)),_(),n.load({loaded:l,noMore:u,noResults:d,error:m},{isFirstLoad:s.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let k;return typeof IntersectionObserver<"u"&&eg(()=>{k&&_(),k=C(),b()},{flush:"post"}),Cn(()=>n.isInitial,y=>{y&&f()}),Cn(s,y=>{y||t("update:isInitial",!1)}),(y,z)=>(E(),P("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[vn(o)==="loading"?vt(y.$slots,"loading",Vs(Bo({key:0},{isFirstLoad:vn(s)})),()=>[J5]):vn(o)==="no-more"?vt(y.$slots,"no-more",Vs(Bo({key:1},{retry:p})),()=>[Q5]):vn(o)==="no-results"?vt(y.$slots,"no-results",Vs(Bo({key:2},{retry:p})),()=>[eD]):vn(o)==="error"?vt(y.$slots,"error",Vs(Bo({key:3},{retry:p})),()=>[tD]):ee("",!0)],512))}}),Iu=50,Ip={load(e){const t=new Jn;return t.setAccessToken(ht.state.spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{include_groups:"album,single",limit:Iu,market:ht.state.spotify.webapi_country,offset:0})])},set(e,t){e.artist=t[0],e.albums=[],e.total=0,e.offset=0,e.append_albums(t[1])}},nD={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,ListAlbumsSpotify:wi,ModalDialogArtistSpotify:Z1,VueEternalLoading:Kd},beforeRouteEnter(e,t,n){Ip.load(e).then(r=>{n(o=>Ip.set(o,r))})},data(){return{albums:[],artist:{},offset:0,show_details_modal:!1,total:0}},methods:{append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},load_next({loaded:e}){const t=new Jn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{include_groups:"album,single",limit:Iu,offset:this.offset}).then(n=>{this.append_albums(n),e(n.items.length,Iu)})},play(){this.show_album_details_modal=!1,j.player_play_uri(this.artist.uri,!0)}}},rD=["textContent"],oD={class:"buttons is-centered"},sD=["textContent"],iD=["textContent"],aD={class:"columns is-centered"},lD={class:"column has-text-centered"};function cD(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-albums-spotify"),l=A("VueEternalLoading"),u=A("modal-dialog-artist-spotify"),d=A("content-with-heading");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,rD)]),"heading-right":L(()=>[c("div",oD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.artist.shuffle"))},null,8,sD)])])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:o.total}))},null,8,iD),v(a,{items:o.albums},null,8,["items"]),o.offset[c("div",aD,[c("div",lD,[v(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":L(()=>[xt(" ")]),_:1},8,["load"])):ee("",!0),v(u,{item:o.artist,show:o.show_details_modal,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const uD=ie(nD,[["render",cD]]),Lp={load(e){return Promise.all([j.library_artist(e.params.id),j.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new Ee(t[1].data.tracks)}},dD={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListTracks:mn,ModalDialogArtist:Bl},beforeRouteEnter(e,t,n){Lp.load(e).then(r=>{n(o=>Lp.set(o,r))})},data(){return{artist:{},grouping_options:[{id:1,name:this.$t("page.artist.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.artist.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new Ee}},computed:{album_count(){return new Set([...this.tracks].filter(e=>e.isItem).map(e=>e.item.album_id)).size},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(ki,e)}},selected_grouping_option_id:{get(){return this.$store.state.artist_tracks_sort},set(e){this.$store.commit(zh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},track_uris(){return this.tracks_list.items.map(e=>e.uri).join()},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.tracks_list.group(e.options),this.tracks_list}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){j.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(),!0)}}},mD={class:"columns"},fD={class:"column"},pD=["textContent"],hD={key:0,class:"field"},_D={class:"control"},gD=["textContent"],yD=["textContent"],vD={class:"column"},bD=["textContent"],zD=["textContent"],CD={class:"buttons is-centered"},wD=["textContent"],kD={class:"heading has-text-centered-mobile"},xD=["textContent"],SD=c("span",null," | ",-1),ED=["textContent"];function $D(e,t,n,r,o,s){const i=A("index-button-list"),a=A("control-dropdown"),l=A("mdicon"),u=A("list-tracks"),d=A("modal-dialog-artist"),m=A("content-with-heading");return E(),P("div",null,[v(m,null,{options:L(()=>[v(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",mD,[c("div",fD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.filter"))},null,8,pD),s.spotify_enabled?(E(),P("div",hD,[c("div",_D,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=f=>s.hide_spotify=f),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artist.hide-spotify"))},null,8,gD)]),c("p",{class:"help",textContent:g(e.$t("page.artist.hide-spotify-help"))},null,8,yD)])):ee("",!0)]),c("div",vD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,bD),v(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[1]||(t[1]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,zD)]),"heading-right":L(()=>[c("div",CD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},[v(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...f)=>s.play&&s.play(...f))},[v(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,wD)])])]),content:L(()=>[c("p",kD,[c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...f)=>s.open_artist&&s.open_artist(...f)),textContent:g(e.$t("page.artist.album-count",{count:s.album_count}))},null,8,xD),SD,c("span",{textContent:g(e.$t("page.artist.track-count",{count:s.tracks.count}))},null,8,ED)]),v(u,{items:s.tracks,uris:s.track_uris},null,8,["items","uris"]),v(d,{item:o.artist,show:o.show_details_modal,onClose:t[5]||(t[5]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const TD=ie(dD,[["render",$D]]),AD={name:"ListArtists",components:{ModalDialogArtist:Bl},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.selected_item=e;const t=e.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:t,params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},OD={key:0,class:"mt-6 mb-5 py-2"},PD={class:"media-content is-clipped"},ID=["id","textContent"],LD=["onClick"],ND={class:"media-content is-clickable is-clipped"},DD=["textContent"],RD={class:"media-right"},MD=["onClick"];function FD(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-artist");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P(Ce,{key:l.itemId},[l.isItem?(E(),P("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",ND,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,DD)]),c("div",RD,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,MD)])],8,LD)):(E(),P("div",OD,[c("div",PD,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,ID)])]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const el=ie(AD,[["render",FD]]),Np={load(e){return j.library_artists("music")},set(e,t){e.artists_list=new Ee(t.data)}},VD={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListArtists:el,TabsMusic:dr},beforeRouteEnter(e,t,n){Np.load(e).then(r=>{n(o=>Np.set(o,r))})},data(){return{artists_list:new Ee,grouping_options:[{id:1,name:this.$t("page.artists.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.artists.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}}]}},computed:{artists(){if(!this.artists_list)return[];const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.artists_list.group(e.options),this.artists_list},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(ll,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(ki,e)}},selected_grouping_option_id:{get(){return this.$store.state.artists_sort},set(e){this.$store.commit(vh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},HD={class:"fd-page-with-tabs"},UD={class:"columns"},jD={class:"column"},BD=["textContent"],WD={class:"field"},qD={class:"control"},GD=["textContent"],KD=["textContent"],ZD={key:0,class:"field"},YD={class:"control"},XD=["textContent"],JD=["textContent"],QD={class:"column"},e3=["textContent"],t3=["textContent"],n3=["textContent"];function r3(e,t,n,r,o,s){const i=A("tabs-music"),a=A("index-button-list"),l=A("control-dropdown"),u=A("list-artists"),d=A("content-with-heading");return E(),P("div",HD,[v(i),v(d,null,{options:L(()=>[v(a,{indices:s.artists.indices},null,8,["indices"]),c("div",UD,[c("div",jD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,BD),c("div",WD,[c("div",qD,[pt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=m=>s.hide_singles=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:g(e.$t("page.artists.hide-singles"))},null,8,GD)]),c("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,KD)]),s.spotify_enabled?(E(),P("div",ZD,[c("div",YD,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=m=>s.hide_spotify=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artists.hide-spotify"))},null,8,XD)]),c("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,JD)])):ee("",!0)]),c("div",QD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort.title"))},null,8,e3),v(l,{value:s.selected_grouping_option_id,"onUpdate:value":t[2]||(t[2]=m=>s.selected_grouping_option_id=m),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.artists.title"))},null,8,t3),c("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:s.artists.count}))},null,8,n3)]),"heading-right":L(()=>[]),content:L(()=>[v(u,{items:s.artists},null,8,["items"])]),_:1})])}const o3=ie(VD,[["render",r3]]),Dp={load(e){return Promise.all([j.library_album(e.params.id),j.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data)}},s3={name:"PageAudiobooksAlbum",components:{ContentWithHero:Ul,CoverArtwork:xr,ListTracks:mn,ModalDialogAlbum:jl},beforeRouteEnter(e,t,n){Dp.load(e).then(r=>{n(o=>Dp.set(o,r))})},data(){return{album:{},show_details_modal:!1,tracks:new Ee}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){j.player_play_uri(this.album.uri,!1)}}},i3=["textContent"],a3={class:"subtitle is-6 has-text-link"},l3=["textContent"],c3={class:"buttons fd-is-centered-mobile mt-5"},u3=["textContent"],d3=["textContent"];function m3(e,t,n,r,o,s){const i=A("mdicon"),a=A("cover-artwork"),l=A("list-tracks"),u=A("modal-dialog-album"),d=A("content-with-hero");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,i3),c("h2",a3,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...m)=>s.open_artist&&s.open_artist(...m)),textContent:g(o.album.artist)},null,8,l3)]),c("div",c3,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.album.play"))},null,8,u3)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=m=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":L(()=>[v(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=m=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.audiobooks.album.track-count",{count:o.album.track_count}))},null,8,d3),v(l,{items:o.tracks,show_progress:!0,uris:o.album.uri},null,8,["items","uris"]),v(u,{item:o.album,show:o.show_details_modal,media_kind:"audiobook",onClose:t[4]||(t[4]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const f3=ie(s3,[["render",m3]]),p3={name:"TabsAudiobooks"},h3={class:"section fd-tabs-section"},_3={class:"container"},g3={class:"columns is-centered"},y3={class:"column is-four-fifths"},v3={class:"tabs is-centered is-small"},b3=["onClick","onKeypress"],z3=["textContent"],C3=["onClick","onKeypress"],w3=["textContent"],k3=["onClick","onKeypress"],x3=["textContent"];function S3(e,t,n,r,o,s){const i=A("mdicon"),a=A("router-link");return E(),P("section",h3,[c("div",_3,[c("div",g3,[c("div",y3,[c("div",v3,[c("ul",null,[v(a,{to:{name:"audiobooks-artists"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.audiobooks.tabs.authors"))},null,8,z3)],40,b3)],2)]),_:1}),v(a,{to:{name:"audiobooks-albums"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,w3)],40,C3)],2)]),_:1}),v(a,{to:{name:"audiobooks-genres"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.audiobooks.tabs.genres"))},null,8,x3)],40,k3)],2)]),_:1})])])])])])])}const Zd=ie(p3,[["render",S3]]),Rp={load(e){return j.library_albums("audiobook")},set(e,t){e.albums=new Ee(t.data,{index:{field:"name_sort",type:String}})}},E3={name:"PageAudiobooksAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListAlbums:bn,TabsAudiobooks:Zd},beforeRouteEnter(e,t,n){Rp.load(e).then(r=>{n(o=>Rp.set(o,r))})},data(){return{albums:new Ee}}},$3={class:"fd-page-with-tabs"},T3=["textContent"],A3=["textContent"];function O3(e,t,n,r,o,s){const i=A("tabs-audiobooks"),a=A("index-button-list"),l=A("list-albums"),u=A("content-with-heading");return E(),P("div",$3,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.albums.title"))},null,8,T3),c("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:o.albums.count}))},null,8,A3)]),content:L(()=>[v(l,{items:o.albums},null,8,["items"])]),_:1})])}const P3=ie(E3,[["render",O3]]),Mp={load(e){return Promise.all([j.library_artist(e.params.id),j.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new Ee(t[1].data)}},I3={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:bn,ModalDialogArtist:Bl},beforeRouteEnter(e,t,n){Mp.load(e).then(r=>{n(o=>Mp.set(o,r))})},data(){return{albums:new Ee,artist:{},show_details_modal:!1}},methods:{play(){j.player_play_uri(this.albums.items.map(e=>e.uri).join(),!1)}}},L3=["textContent"],N3={class:"buttons is-centered"},D3=["textContent"],R3=["textContent"];function M3(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-albums"),l=A("modal-dialog-artist"),u=A("content-with-heading");return E(),P("div",null,[v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,L3)]),"heading-right":L(()=>[c("div",N3,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.artist.play"))},null,8,D3)])])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.audiobooks.artist.album-count",{count:o.artist.album_count}))},null,8,R3),v(a,{items:o.albums},null,8,["items"]),v(l,{item:o.artist,show:o.show_details_modal,onClose:t[2]||(t[2]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const F3=ie(I3,[["render",M3]]),Fp={load(e){return j.library_artists("audiobook")},set(e,t){e.artists=new Ee(t.data,{index:{field:"name_sort",type:String}})}},V3={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListArtists:el,TabsAudiobooks:Zd},beforeRouteEnter(e,t,n){Fp.load(e).then(r=>{n(o=>Fp.set(o,r))})},data(){return{artists:new Ee}}},H3={class:"fd-page-with-tabs"},U3=["textContent"],j3=["textContent"];function B3(e,t,n,r,o,s){const i=A("tabs-audiobooks"),a=A("index-button-list"),l=A("list-artists"),u=A("content-with-heading");return E(),P("div",H3,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.artists.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.artists.title"))},null,8,U3),c("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,j3)]),"heading-right":L(()=>[]),content:L(()=>[v(l,{items:o.artists},null,8,["items"])]),_:1})])}const W3=ie(V3,[["render",B3]]),q3={name:"ModalDialogGenre",props:{item:{required:!0,type:Object},media_kind:{required:!0,type:String},show:Boolean},emits:["close"],computed:{expression(){return`genre is "${this.item.name}" and media_kind is ${this.media_kind}`}},methods:{open(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.item.name},query:{media_kind:this.media_kind}})},play(){this.$emit("close"),j.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),j.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),j.queue_expression_add_next(this.expression)}}},G3={key:0,class:"modal is-active"},K3={class:"modal-content"},Z3={class:"card"},Y3={class:"card-content"},X3={class:"title is-4"},J3=["textContent"],Q3={class:"content is-small"},eR=["textContent"],tR=["textContent"],nR=["textContent"],rR=["textContent"],oR=["textContent"],sR=["textContent"],iR={class:"card-footer"},aR=["textContent"],lR=["textContent"],cR=["textContent"];function uR(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",G3,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",K3,[c("div",Z3,[c("div",Y3,[c("p",X3,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,J3)]),c("div",Q3,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,eR),c("span",{class:"title is-6",textContent:g(n.item.album_count)},null,8,tR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,nR),c("span",{class:"title is-6",textContent:g(n.item.track_count)},null,8,rR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,oR),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,sR)])])]),c("footer",iR,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add"))},null,8,aR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add-next"))},null,8,lR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.play"))},null,8,cR)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Yd=ie(q3,[["render",uR]]),dR={name:"ListGenres",components:{ModalDialogGenre:Yd},props:{items:{required:!0,type:Object},media_kind:{required:!0,type:String}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},mR={key:0,class:"mt-6 mb-5 py-2"},fR={class:"media-content is-clipped"},pR=["id","textContent"],hR=["onClick"],_R={class:"media-content is-clickable is-clipped"},gR=["textContent"],yR={class:"media-right"},vR=["onClick"];function bR(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-genre");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P(Ce,{key:l.itemId},[l.isItem?(E(),P("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",_R,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,gR)]),c("div",yR,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,vR)])],8,hR)):(E(),P("div",mR,[c("div",fR,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,pR)])]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,media_kind:n.media_kind,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]))],64)}const Y1=ie(dR,[["render",bR]]),Vp={load(e){return j.library_genres("audiobook")},set(e,t){e.genres=new Ee(t.data.genres,{index:{field:"name_sort",type:String}})}},zR={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListGenres:Y1,TabsAudiobooks:Zd},beforeRouteEnter(e,t,n){Vp.load(e).then(r=>{n(o=>Vp.set(o,r))})},data(){return{genres:new Ee}}},CR={class:"fd-page-with-tabs"},wR=["textContent"],kR=["textContent"];function xR(e,t,n,r,o,s){const i=A("tabs-audiobooks"),a=A("index-button-list"),l=A("list-genres"),u=A("content-with-heading");return E(),P("div",CR,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,wR),c("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:o.genres.total}))},null,8,kR)]),content:L(()=>[v(l,{items:o.genres,media_kind:"audiobook"},null,8,["items"])]),_:1})])}const SR=ie(zR,[["render",xR]]),ER={name:"ModalDialogComposer",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.item.name}})},open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.item.name}})},play(){this.$emit("close"),j.player_play_expression(`composer is "${this.item.name}" and media_kind is music`,!1)},queue_add(){this.$emit("close"),j.queue_expression_add(`composer is "${this.item.name}" and media_kind is music`)},queue_add_next(){this.$emit("close"),j.queue_expression_add_next(`composer is "${this.item.name}" and media_kind is music`)}}},$R={key:0,class:"modal is-active"},TR={class:"modal-content"},AR={class:"card"},OR={class:"card-content"},PR={class:"title is-4"},IR=["textContent"],LR=["textContent"],NR=["textContent"],DR=["textContent"],RR=["textContent"],MR=["textContent"],FR=["textContent"],VR={class:"card-footer"},HR=["textContent"],UR=["textContent"],jR=["textContent"];function BR(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",$R,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",TR,[c("div",AR,[c("div",OR,[c("p",PR,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:g(n.item.name)},null,8,IR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,LR),c("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:g(n.item.album_count)},null,8,NR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,DR),c("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...a)=>s.open_tracks&&s.open_tracks(...a)),textContent:g(n.item.track_count)},null,8,RR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,MR),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,FR)])]),c("footer",VR,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add"))},null,8,HR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add-next"))},null,8,UR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.play"))},null,8,jR)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Xd=ie(ER,[["render",BR]]),Hp={load(e){return Promise.all([j.library_composer(e.params.name),j.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums=new Ee(t[1].data.albums)}},WR={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:bn,ModalDialogComposer:Xd},beforeRouteEnter(e,t,n){Hp.load(e).then(r=>{n(o=>Hp.set(o,r))})},data(){return{albums:new Ee,composer:{},show_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){j.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},qR=["textContent"],GR={class:"buttons is-centered"},KR=["textContent"],ZR={class:"heading has-text-centered-mobile"},YR=["textContent"],XR=c("span",null," | ",-1),JR=["textContent"];function QR(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-albums"),l=A("modal-dialog-composer"),u=A("content-with-heading");return E(),P("div",null,[v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.composer.name)},null,8,qR)]),"heading-right":L(()=>[c("div",GR,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,KR)])])]),content:L(()=>[c("p",ZR,[c("span",{textContent:g(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,YR),XR,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:g(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,JR)]),v(a,{items:o.albums},null,8,["items"]),v(l,{item:o.composer,show:o.show_details_modal,onClose:t[3]||(t[3]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const eM=ie(WR,[["render",QR]]),Up={load(e){return Promise.all([j.library_composer(e.params.name),j.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new Ee(t[1].data.tracks)}},tM={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListTracks:mn,ModalDialogComposer:Xd},beforeRouteEnter(e,t,n){Up.load(e).then(r=>{n(o=>Up.set(o,r))})},data(){return{composer:{},grouping_options:[{id:1,name:this.$t("page.composer.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.composer.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new Ee}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},selected_grouping_option_id:{get(){return this.$store.state.composer_tracks_sort},set(e){this.$store.commit(Ch,e)}},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){j.player_play_expression(this.expression,!0)}}},nM={class:"columns"},rM={class:"column"},oM=["textContent"],sM=["textContent"],iM={class:"buttons is-centered"},aM=["textContent"],lM={class:"heading has-text-centered-mobile"},cM=["textContent"],uM=c("span",null," | ",-1),dM=["textContent"];function mM(e,t,n,r,o,s){const i=A("index-button-list"),a=A("control-dropdown"),l=A("mdicon"),u=A("list-tracks"),d=A("modal-dialog-composer"),m=A("content-with-heading");return E(),P("div",null,[v(m,null,{options:L(()=>[v(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",nM,[c("div",rM,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,oM),v(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.composer.name)},null,8,sM)]),"heading-right":L(()=>[c("div",iM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[v(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[v(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,aM)])])]),content:L(()=>[c("p",lM,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_albums&&s.open_albums(...f)),textContent:g(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,cM),uM,c("span",{textContent:g(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,dM)]),v(u,{items:s.tracks,expression:s.expression},null,8,["items","expression"]),v(d,{item:o.composer,show:o.show_details_modal,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const fM=ie(tM,[["render",mM]]),pM={name:"ListComposers",components:{ModalDialogComposer:Xd},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.selected_item=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},hM={key:0,class:"mt-6 mb-5 py-2"},_M={class:"media-content is-clipped"},gM=["id","textContent"],yM=["onClick"],vM={class:"media-content is-clickable is-clipped"},bM=["textContent"],zM={class:"media-right"},CM=["onClick"];function wM(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-composer");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P(Ce,{key:l.itemId},[l.isItem?(E(),P("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",vM,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,bM)]),c("div",zM,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,CM)])],8,yM)):(E(),P("div",hM,[c("div",_M,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,gM)])]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const Lu=ie(pM,[["render",wM]]),jp={load(e){return j.library_composers("music")},set(e,t){e.composers=new Ee(t.data,{index:{field:"name_sort",type:String}})}},kM={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListComposers:Lu,TabsMusic:dr},beforeRouteEnter(e,t,n){jp.load(e).then(r=>{n(o=>jp.set(o,r))})},data(){return{composers:new Ee}}},xM={class:"fd-page-with-tabs"},SM=["textContent"],EM=["textContent"];function $M(e,t,n,r,o,s){const i=A("tabs-music"),a=A("index-button-list"),l=A("list-composers"),u=A("content-with-heading");return E(),P("div",xM,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.composers.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.composers.title"))},null,8,SM),c("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:o.composers.total}))},null,8,EM)]),content:L(()=>[v(l,{items:o.composers},null,8,["items"])]),_:1})])}const TM=ie(kM,[["render",$M]]),AM={name:"ModalDialogDirectory",props:{item:{required:!0,type:String},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),j.player_play_expression(`path starts with "${this.item}" order by path asc`,!1)},queue_add(){this.$emit("close"),j.queue_expression_add(`path starts with "${this.item}" order by path asc`)},queue_add_next(){this.$emit("close"),j.queue_expression_add_next(`path starts with "${this.item}" order by path asc`)}}},OM={key:0,class:"modal is-active"},PM={class:"modal-content"},IM={class:"card"},LM={class:"card-content"},NM=["textContent"],DM={class:"card-footer"},RM=["textContent"],MM=["textContent"],FM=["textContent"];function VM(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",OM,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",PM,[c("div",IM,[c("div",LM,[c("p",{class:"title is-4",textContent:g(n.item)},null,8,NM)]),c("footer",DM,[c("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add"))},null,8,RM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add-next"))},null,8,MM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.play"))},null,8,FM)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const X1=ie(AM,[["render",VM]]),HM={name:"ListDirectories",components:{ModalDialogDirectory:X1},props:{items:{required:!0,type:Array}},data(){return{selected_item:"",show_details_modal:!1}},computed:{current(){var e;return((e=this.$route.query)==null?void 0:e.directory)||"/"}},methods:{open(e){this.$router.push({name:"files",query:{directory:e.path}})},open_dialog(e){this.selected_item=e.path,this.show_details_modal=!0},open_parent(){this.current.slice(0,this.current.lastIndexOf("/"))===""||this.$store.state.config.directories.includes(this.current)?this.$router.push({name:"files"}):this.$router.push({name:"files",query:{directory:this.current.slice(0,this.current.lastIndexOf("/"))}})}}},UM={class:"media-left is-clickable"},jM=c("div",{class:"media-content is-clickable is-clipped"},[c("h1",{class:"title is-6"},"..")],-1),BM={class:"media-right"},WM=["onClick"],qM={class:"media-left is-clickable"},GM={class:"media-content is-clickable is-clipped"},KM=["textContent"],ZM=["textContent"],YM={class:"media-right"},XM=["onClick"];function JM(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-directory");return E(),P(Ce,null,[e.$route.query.directory?(E(),P("div",{key:0,class:"media is-align-items-center",onClick:t[0]||(t[0]=l=>s.open_parent())},[c("figure",UM,[v(i,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),jM,c("div",BM,[vt(e.$slots,"actions")])])):ee("",!0),(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P("div",{key:l.path,class:"media is-align-items-center",onClick:u=>s.open(l)},[c("figure",qM,[v(i,{class:"icon",name:"folder",size:"16"})]),c("div",GM,[c("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,KM),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.path)},null,8,ZM)]),c("div",YM,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,XM)])],8,WM))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[1]||(t[1]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const QM=ie(HM,[["render",JM]]),e7={name:"ModalDialogPlaylist",props:{item:{required:!0,type:Object},show:Boolean,uris:{default:"",type:String}},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.item.id}})},play(){this.$emit("close"),j.player_play_uri(this.uris||this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.uris||this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.uris||this.item.uri)}}},t7={key:0,class:"modal is-active"},n7={class:"modal-content"},r7={class:"card"},o7={class:"card-content"},s7={class:"title is-4"},i7=["textContent"],a7={class:"content is-small"},l7=["textContent"],c7=["textContent"],u7=["textContent"],d7=["textContent"],m7={key:0},f7=["textContent"],p7=["textContent"],h7={key:0,class:"card-footer"},_7=["textContent"],g7=["textContent"],y7=["textContent"];function v7(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",t7,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",n7,[c("div",r7,[c("div",o7,[c("p",s7,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,i7)]),c("div",a7,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,l7),c("span",{class:"title is-6",textContent:g(n.item.path)},null,8,c7)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,u7),c("span",{class:"title is-6",textContent:g(e.$t(`playlist.type.${n.item.type}`))},null,8,d7)]),n.item.folder?ee("",!0):(E(),P("p",m7,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.tracks"))},null,8,f7),c("span",{class:"title is-6",textContent:g(n.item.item_count)},null,8,p7)]))])]),n.item.folder?ee("",!0):(E(),P("footer",h7,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add"))},null,8,_7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add-next"))},null,8,g7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.play"))},null,8,y7)])]))])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const J1=ie(e7,[["render",v7]]),b7={name:"ListPlaylists",components:{ModalDialogPlaylist:J1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"},open(e){e.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:e.id}}):this.$router.push({name:"playlist",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},z7=["onClick"],C7={class:"media-left is-clickable"},w7={class:"media-content is-clickable is-clipped"},k7=["textContent"],x7={class:"media-right"},S7=["onClick"];function E7(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-playlist");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P("div",{key:l.itemId,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("figure",C7,[v(i,{class:"icon",name:s.icon_name(l.item),size:"16"},null,8,["name"])]),c("div",w7,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,k7)]),c("div",x7,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,S7)])],8,z7))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const tl=ie(b7,[["render",E7]]),ua={load(e){return e.query.directory?j.library_files(e.query.directory):Promise.resolve()},set(e,t){t?(e.dirs=t.data.directories,e.playlists=new Ee(t.data.playlists),e.tracks=new Ee(t.data.tracks)):(e.$store.state.config.directories?e.dirs=e.$store.state.config.directories.map(n=>({path:n})):j.config().then(n=>{e.dirs=n.data.directories.map(r=>({path:r}))}),e.playlists=new Ee,e.tracks=new Ee)}},$7={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:QM,ListPlaylists:tl,ListTracks:mn,ModalDialogDirectory:X1},beforeRouteEnter(e,t,n){ua.load(e).then(r=>{n(o=>ua.set(o,r))})},beforeRouteUpdate(e,t,n){ua.load(e).then(r=>{ua.set(this,r),n()})},data(){return{dirs:[],playlists:new Ee,show_details_modal:!1,tracks:new Ee}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"},play_expression(){return`path starts with "${this.current_directory}" order by path asc`}},methods:{play(){j.player_play_expression(this.play_expression,!1)}}},T7=["textContent"],A7=["textContent"],O7={class:"buttons is-centered"},P7=["textContent"];function I7(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-directories"),l=A("list-playlists"),u=A("list-tracks"),d=A("modal-dialog-directory"),m=A("content-with-heading");return E(),P("div",null,[v(m,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.files.title"))},null,8,T7),c("p",{class:"title is-7 has-text-grey",textContent:g(s.current_directory)},null,8,A7)]),"heading-right":L(()=>[c("div",O7,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.files.play"))},null,8,P7)])])]),content:L(()=>[v(a,{items:o.dirs},null,8,["items"]),v(l,{items:o.playlists},null,8,["items"]),v(u,{expression:s.play_expression,items:o.tracks,show_icon:!0},null,8,["expression","items"]),v(d,{item:s.current_directory,show:o.show_details_modal,onClose:t[2]||(t[2]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const L7=ie($7,[["render",I7]]),Bp={load(e){return Promise.all([j.library_genre(e.params.name,e.query.media_kind),j.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data.genres.items[0],e.albums=new Ee(t[1].data.albums,{index:{field:"name_sort",type:String}})}},N7={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListAlbums:bn,ModalDialogGenre:Yd},beforeRouteEnter(e,t,n){Bp.load(e).then(r=>{n(o=>Bp.set(o,r))})},data(){return{albums:new Ee,genre:{},media_kind:this.$route.query.media_kind,show_details_modal:!1}},methods:{open_tracks(){this.show_details_modal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){j.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},D7=["textContent"],R7={class:"buttons is-centered"},M7=["textContent"],F7={class:"heading has-text-centered-mobile"},V7=["textContent"],H7=c("span",null," | ",-1),U7=["textContent"];function j7(e,t,n,r,o,s){const i=A("index-button-list"),a=A("mdicon"),l=A("list-albums"),u=A("modal-dialog-genre"),d=A("content-with-heading");return E(),P("div",null,[v(d,null,{options:L(()=>[v(i,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.genre.name)},null,8,D7)]),"heading-right":L(()=>[c("div",R7,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[v(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,M7)])])]),content:L(()=>[c("p",F7,[c("span",{textContent:g(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,V7),H7,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>s.open_tracks&&s.open_tracks(...m)),textContent:g(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,U7)]),v(l,{items:o.albums},null,8,["items"]),v(u,{item:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[3]||(t[3]=m=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]),_:1})])}const B7=ie(N7,[["render",j7]]),Wp={load(e){return Promise.all([j.library_genre(e.params.name,e.query.media_kind),j.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data.genres.items[0],e.tracks_list=new Ee(t[1].data.tracks)}},W7={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListTracks:mn,ModalDialogGenre:Yd},beforeRouteEnter(e,t,n){Wp.load(e).then(r=>{n(o=>Wp.set(o,r))})},data(){return{genre:{},grouping_options:[{id:1,name:this.$t("page.genre.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.genre.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],media_kind:this.$route.query.media_kind,show_details_modal:!1,tracks_list:new Ee}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_grouping_option_id:{get(){return this.$store.state.genre_tracks_sort},set(e){this.$store.commit(wh,e)}},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_genre(){this.show_details_modal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){j.player_play_expression(this.expression,!0)}}},q7={class:"columns"},G7={class:"column"},K7=["textContent"],Z7=["textContent"],Y7={class:"buttons is-centered"},X7=["textContent"],J7={class:"heading has-text-centered-mobile"},Q7=["textContent"],eF=c("span",null," | ",-1),tF=["textContent"];function nF(e,t,n,r,o,s){const i=A("index-button-list"),a=A("control-dropdown"),l=A("mdicon"),u=A("list-tracks"),d=A("modal-dialog-genre"),m=A("content-with-heading");return E(),P("div",null,[v(m,null,{options:L(()=>[v(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",q7,[c("div",G7,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort.title"))},null,8,K7),v(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.genre.name)},null,8,Z7)]),"heading-right":L(()=>[c("div",Y7,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[v(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[v(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,X7)])])]),content:L(()=>[c("p",J7,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_genre&&s.open_genre(...f)),textContent:g(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,Q7),eF,c("span",{textContent:g(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,tF)]),v(u,{items:s.tracks,expression:s.expression},null,8,["items","expression"]),v(d,{item:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]),_:1})])}const rF=ie(W7,[["render",nF]]),qp={load(e){return j.library_genres("music")},set(e,t){e.genres=new Ee(t.data.genres,{index:{field:"name_sort",type:String}})}},oF={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListGenres:Y1,TabsMusic:dr},beforeRouteEnter(e,t,n){qp.load(e).then(r=>{n(o=>qp.set(o,r))})},data(){return{genres:new Ee}}},sF={class:"fd-page-with-tabs"},iF=["textContent"],aF=["textContent"];function lF(e,t,n,r,o,s){const i=A("tabs-music"),a=A("index-button-list"),l=A("list-genres"),u=A("content-with-heading");return E(),P("div",sF,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,iF),c("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:o.genres.total}))},null,8,aF)]),content:L(()=>[v(l,{items:o.genres,media_kind:"music"},null,8,["items"])]),_:1})])}const cF=ie(oF,[["render",lF]]),Gp={load(e){return Promise.all([j.search({expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3,type:"album"}),j.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3,type:"track"})])},set(e,t){e.recently_added=new Ee(t[0].data.albums),e.recently_played=new Ee(t[1].data.tracks)}},uF={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:bn,ListTracks:mn,TabsMusic:dr},beforeRouteEnter(e,t,n){Gp.load(e).then(r=>{n(o=>Gp.set(o,r))})},data(){return{recently_added:[],recently_played:{items:[]},selected_track:{}}}},dF={class:"fd-page-with-tabs"},mF=["textContent"],fF={class:"level"},pF={class:"level-item"},hF=["textContent"],_F={class:"level"},gF={class:"level-item"};function yF(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-albums"),l=A("router-link"),u=A("content-with-heading"),d=A("list-tracks");return E(),P("div",dF,[v(i),v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,mF)]),content:L(()=>[v(a,{items:o.recently_added},null,8,["items"])]),footer:L(()=>[c("nav",fF,[c("p",pF,[v(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:L(()=>[xt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,hF)]),content:L(()=>[v(d,{items:o.recently_played},null,8,["items"])]),footer:L(()=>[c("nav",_F,[c("p",gF,[v(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:L(()=>[xt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const vF=ie(uF,[["render",yF]]),Kp={load(e){const t=ht.getters.settings_option_recently_added_limit;return j.search({expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t,type:"album"})},set(e,t){e.recently_added=new Ee(t.data.albums,{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}})}},bF={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,ListAlbums:bn,TabsMusic:dr},beforeRouteEnter(e,t,n){Kp.load(e).then(r=>{n(o=>Kp.set(o,r))})},data(){return{recently_added:new Ee}}},zF={class:"fd-page-with-tabs"},CF=["textContent"];function wF(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-albums"),l=A("content-with-heading");return E(),P("div",zF,[v(i),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,CF)]),content:L(()=>[v(a,{items:o.recently_added},null,8,["items"])]),_:1})])}const kF=ie(bF,[["render",wF]]),Zp={load(e){return j.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50,type:"track"})},set(e,t){e.recently_played=new Ee(t.data.tracks)}},xF={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,ListTracks:mn,TabsMusic:dr},beforeRouteEnter(e,t,n){Zp.load(e).then(r=>{n(o=>Zp.set(o,r))})},data(){return{recently_played:{}}}},SF={class:"fd-page-with-tabs"},EF=["textContent"];function $F(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-tracks"),l=A("content-with-heading");return E(),P("div",SF,[v(i),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,EF)]),content:L(()=>[v(a,{items:o.recently_played},null,8,["items"])]),_:1})])}const TF=ie(xF,[["render",$F]]),AF={name:"ModalDialogPlaylistSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.item.id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},OF={key:0,class:"modal is-active"},PF={class:"modal-content"},IF={class:"card"},LF={class:"card-content"},NF={class:"title is-4"},DF=["textContent"],RF={class:"content is-small"},MF=["textContent"],FF=["textContent"],VF=["textContent"],HF=["textContent"],UF=["textContent"],jF=["textContent"],BF={class:"card-footer"},WF=["textContent"],qF=["textContent"],GF=["textContent"];function KF(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",OF,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",PF,[c("div",IF,[c("div",LF,[c("p",NF,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,DF)]),c("div",RF,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,MF),c("span",{class:"title is-6",textContent:g(n.item.owner.display_name)},null,8,FF)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,VF),c("span",{class:"title is-6",textContent:g(n.item.tracks.total)},null,8,HF)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,UF),c("span",{class:"title is-6",textContent:g(n.item.uri)},null,8,jF)])])]),c("footer",BF,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add"))},null,8,WF)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add-next"))},null,8,qF)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.play"))},null,8,GF)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Q1=ie(AF,[["render",KF]]),ZF={name:"ListPlaylistsSpotify",components:{ModalDialogPlaylistSpotify:Q1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.$router.push({name:"playlist-spotify",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},YF=["onClick"],XF=["textContent"],JF=["textContent"],QF={class:"media-right"},eV=["onClick"];function tV(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-playlist-spotify");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P("div",{key:l.id,class:"media is-align-items-center"},[c("div",{class:"media-content is-clickable is-clipped",onClick:u=>s.open(l)},[c("h1",{class:"title is-6",textContent:g(l.name)},null,8,XF),c("h2",{class:"subtitle is-7",textContent:g(l.owner.display_name)},null,8,JF)],8,YF),c("div",QF,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,eV)])]))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const nl=ie(ZF,[["render",tV]]),Yp={load(e){return j.spotify().then(({data:t})=>{const n=new Jn;return n.setAccessToken(t.webapi_token),Promise.all([n.getNewReleases({country:t.webapi_country,limit:3}),n.getFeaturedPlaylists({country:t.webapi_country,limit:3})])})},set(e,t){e.new_releases=t[0].albums.items,e.featured_playlists=t[1].playlists.items}},nV={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,ListAlbumsSpotify:wi,ListPlaylistsSpotify:nl,TabsMusic:dr},beforeRouteEnter(e,t,n){Yp.load(e).then(r=>{n(o=>Yp.set(o,r))})},data(){return{featured_playlists:[],new_releases:[]}}},rV={class:"fd-page-with-tabs"},oV=["textContent"],sV={class:"level"},iV={class:"level-item"},aV=["textContent"],lV={class:"level"},cV={class:"level-item"};function uV(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-albums-spotify"),l=A("router-link"),u=A("content-with-heading"),d=A("list-playlists-spotify");return E(),P("div",rV,[v(i),v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,oV)]),content:L(()=>[v(a,{items:o.new_releases},null,8,["items"])]),footer:L(()=>[c("nav",sV,[c("p",iV,[v(l,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:L(()=>[xt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,aV)]),content:L(()=>[v(d,{items:o.featured_playlists},null,8,["items"])]),footer:L(()=>[c("nav",lV,[c("p",cV,[v(l,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:L(()=>[xt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const dV=ie(nV,[["render",uV]]),Xp={load(e){return j.spotify().then(({data:t})=>{const n=new Jn;return n.setAccessToken(t.webapi_token),n.getFeaturedPlaylists({country:t.webapi_country,limit:50})})},set(e,t){e.featured_playlists=t.playlists.items}},mV={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListPlaylistsSpotify:nl,TabsMusic:dr},beforeRouteEnter(e,t,n){Xp.load(e).then(r=>{n(o=>Xp.set(o,r))})},data(){return{featured_playlists:[]}}},fV={class:"fd-page-with-tabs"},pV=["textContent"];function hV(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-playlists-spotify"),l=A("content-with-heading");return E(),P("div",fV,[v(i),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,pV)]),content:L(()=>[v(a,{items:o.featured_playlists},null,8,["items"])]),_:1})])}const _V=ie(mV,[["render",hV]]),Jp={load(e){return j.spotify().then(({data:t})=>{const n=new Jn;return n.setAccessToken(t.webapi_token),n.getNewReleases({country:t.webapi_country,limit:50})})},set(e,t){e.new_releases=t.albums.items}},gV={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,ListAlbumsSpotify:wi,TabsMusic:dr},beforeRouteEnter(e,t,n){Jp.load(e).then(r=>{n(o=>Jp.set(o,r))})},data(){return{new_releases:[]}}},yV={class:"fd-page-with-tabs"},vV=["textContent"];function bV(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-albums-spotify"),l=A("content-with-heading");return E(),P("div",yV,[v(i),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,vV)]),content:L(()=>[v(a,{items:o.new_releases},null,8,["items"])]),_:1})])}const zV=ie(gV,[["render",bV]]),CV={name:"LyricsPane",data(){return this.lastIndex=-1,this.scrollingTimer=null,this.lastItemId=-1,{autoScrolling:!0}},computed:{is_playing(){return this.player.state==="play"},lyrics(){const e=this.$store.state.lyrics.content,t=[];if(e){const n=/(\[(\d+):(\d+)(?:\.\d+)?\] ?)?(.*)/u;e.split(` + `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`},LP={name:"CoverArtwork",props:{album:{default:"",type:String},artist:{default:"",type:String},artwork_url:{default:"",type:String}},emits:["click"],data(){return{font:{family:"sans-serif",weight:"bold"},lifecycle:{error:e=>{e.src=this.dataURI()}},size:600}},computed:{alt_text(){return`${this.artist} - ${this.album}`},caption(){return(this.album||this.artist||"").substring(0,2)}},methods:{dataURI(){return IP({alternate:this.alt_text,caption:this.caption,font:this.font,size:this.size})}}};function NP(e,t,n,r,o,s){const i=vd("lazy");return E(),P("figure",null,[pt(c("img",{onClick:t[0]||(t[0]=a=>e.$emit("click"))},null,512),[[i,{src:n.artwork_url,lifecycle:o.lifecycle}]])])}const xr=ie(LP,[["render",NP]]),{t:ca,locale:DP}=Pl.global,q1="NO_INDEX",RP=(e,t)=>e-t,MP=(e,t)=>e.localeCompare(t,DP.value),FP=(e,t)=>new Date(e)-new Date(t)||(e?t?0:1:-1),VP=e=>e.map(({field:t,type:n,order:r=1})=>{switch(n){case String:return(o,s)=>MP(o[t],s[t])*r;case Number:return(o,s)=>RP(o[t],s[t])*r;case Date:return(o,s)=>FP(o[t],s[t])*r;default:return(o,s)=>0}}),HP=(e="")=>{const t=e.charAt(0);return t.match(new RegExp("\\p{Letter}","gu"))?t.toUpperCase():t.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"},UP=e=>{},jP=[{difference:NaN,text:()=>ca("grouped-list.undefined")},{difference:864e5,text:()=>ca("grouped-list.today")},{difference:6048e5,text:()=>ca("grouped-list.last-week")},{difference:2592e6,text:()=>ca("grouped-list.last-month")},{difference:1/0,text:e=>e.getFullYear()}],BP=e=>{var r;const t=new Date(e),n=new Date-t;return(r=jP.find(o=>isNaN(n)||n{switch(t){case String:return n=>HP(n[e]);case Number:return n=>n[e];case Date:return n=>BP(n[e]);case"Digits":return n=>UP(n[e]);default:return n=>q1}};class Ee{constructor({items:t=[],total:n=0,offset:r=0,limit:o=-1}={},s){this.items=t,this.total=n,this.offset=r,this.limit=o,this.count=t.length,this.indices=[],this.group(s)}group({criteria:t=[],filters:n=[],index:r}={}){const o=WP(r),s=this.items.filter(l=>n.every(u=>u(l)));this.count=s.length;const i=VP(t),a=s.sort((l,u)=>i.reduce((d,m)=>d||m(l,u),0));this.itemsGrouped=a.reduce((l,u)=>{const d=o(u);return l.set(d,[...l.get(d)||[],u]),l},new Map),this.indices=Array.from(this.itemsGrouped.keys())}*generate(){for(const[t,n]of this.itemsGrouped.entries()){t!==q1&&(yield{index:t,isItem:!1,item:{},itemId:t});for(const r of n)yield{index:t,isItem:!0,item:r,itemId:r.id}}}[Symbol.iterator](){return this.generate()}}var G1={exports:{}};(function(e){var t=function(){var n="https://api.spotify.com/v1",r=null,o=null,s=function(f,p){return f.abort=p,f},i=function(f,p){var h;if(o!==null){var _=o.defer();f(function(b){_.resolve(b)},function(b){_.reject(b)}),h=_.promise}else window.Promise&&(h=new window.Promise(f));return h?new s(h,p):null},a=function(){var f=Array.prototype.slice.call(arguments),p=f[0],h=f.slice(1);return p=p||{},h.forEach(function(_){for(var b in _)_.hasOwnProperty(b)&&(p[b]=_[b])}),p},l=function(f,p){var h="";for(var _ in p)if(p.hasOwnProperty(_)){var b=p[_];h+=encodeURIComponent(_)+"="+encodeURIComponent(b)+"&"}return h.length>0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},u=function(f,p){var h=new XMLHttpRequest,_=function(b,C){function k(w){b&&b(w),p&&p(null,w)}function y(){C&&C(h),p&&p(h,null)}var z=f.type||"GET";if(h.open(z,l(f.url,f.params)),r&&h.setRequestHeader("Authorization","Bearer "+r),h.onreadystatechange=function(){if(h.readyState===4){var w=null;try{w=h.responseText?JSON.parse(h.responseText):""}catch(N){console.error(N)}h.status>=200&&h.status<300?k(w):y()}},z==="GET")h.send(null);else{var x=null;f.postData&&(f.contentType==="image/jpeg"?(x=f.postData,h.setRequestHeader("Content-Type",f.contentType)):(x=JSON.stringify(f.postData),h.setRequestHeader("Content-Type","application/json"))),h.send(x)}};return p?(_(),null):i(_,function(){h.abort()})},d=function(f,p,h,_){var b={},C=null;typeof p=="object"?(b=p,C=h):typeof p=="function"&&(C=p);var k=f.type||"GET";return k!=="GET"&&f.postData&&!_?f.postData=a(f.postData,b):f.params=a(f.params,b),u(f,C)},m=function(){};return m.prototype={constructor:t},m.prototype.getGeneric=function(f,p){var h={url:f};return d(h,p)},m.prototype.getMe=function(f,p){var h={url:n+"/me"};return d(h,f,p)},m.prototype.getMySavedTracks=function(f,p){var h={url:n+"/me/tracks"};return d(h,f,p)},m.prototype.addToMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"PUT",postData:f};return d(_,p,h)},m.prototype.removeFromMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"DELETE",postData:f};return d(_,p,h)},m.prototype.containsMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getMySavedAlbums=function(f,p){var h={url:n+"/me/albums"};return d(h,f,p)},m.prototype.addToMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"PUT",postData:f};return d(_,p,h)},m.prototype.removeFromMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"DELETE",postData:f};return d(_,p,h)},m.prototype.containsMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getMyTopArtists=function(f,p){var h={url:n+"/me/top/artists"};return d(h,f,p)},m.prototype.getMyTopTracks=function(f,p){var h={url:n+"/me/top/tracks"};return d(h,f,p)},m.prototype.getMyRecentlyPlayedTracks=function(f,p){var h={url:n+"/me/player/recently-played"};return d(h,f,p)},m.prototype.followUsers=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return d(h,p)},m.prototype.followArtists=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return d(h,p)},m.prototype.followPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return d(_,p,h)},m.prototype.unfollowUsers=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return d(h,p)},m.prototype.unfollowArtists=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return d(h,p)},m.prototype.unfollowPlaylist=function(f,p){var h={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return d(h,p)},m.prototype.isFollowingUsers=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return d(h,p)},m.prototype.isFollowingArtists=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return d(h,p)},m.prototype.areFollowingPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return d(_,h)},m.prototype.getFollowedArtists=function(f,p){var h={url:n+"/me/following",type:"GET",params:{type:"artist"}};return d(h,f,p)},m.prototype.getUser=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)};return d(_,p,h)},m.prototype.getUserPlaylists=function(f,p,h){var _;return typeof f=="string"?_={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(_={url:n+"/me/playlists"},h=p,p=f),d(_,p,h)},m.prototype.getPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f};return d(_,p,h)},m.prototype.getPlaylistTracks=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks"};return d(_,p,h)},m.prototype.getPlaylistCoverImage=function(f,p){var h={url:n+"/playlists/"+f+"/images"};return d(h,p)},m.prototype.createPlaylist=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return d(_,p,h)},m.prototype.changePlaylistDetails=function(f,p,h){var _={url:n+"/playlists/"+f,type:"PUT",postData:p};return d(_,p,h)},m.prototype.addTracksToPlaylist=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return d(b,h,_,!0)},m.prototype.replaceTracksInPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return d(_,{},h)},m.prototype.reorderTracksInPlaylist=function(f,p,h,_,b){var C={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return d(C,_,b)},m.prototype.removeTracksFromPlaylist=function(f,p,h){var _=p.map(function(C){return typeof C=="string"?{uri:C}:C}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:_}};return d(b,{},h)},m.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,_){var b=p.map(function(k){return typeof k=="string"?{uri:k}:k}),C={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:h}};return d(C,{},_)},m.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return d(b,{},_)},m.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var _={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return d(_,{},h)},m.prototype.getAlbum=function(f,p,h){var _={url:n+"/albums/"+f};return d(_,p,h)},m.prototype.getAlbumTracks=function(f,p,h){var _={url:n+"/albums/"+f+"/tracks"};return d(_,p,h)},m.prototype.getAlbums=function(f,p,h){var _={url:n+"/albums/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getTrack=function(f,p,h){var _={};return _.url=n+"/tracks/"+f,d(_,p,h)},m.prototype.getTracks=function(f,p,h){var _={url:n+"/tracks/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getArtist=function(f,p,h){var _={url:n+"/artists/"+f};return d(_,p,h)},m.prototype.getArtists=function(f,p,h){var _={url:n+"/artists/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getArtistAlbums=function(f,p,h){var _={url:n+"/artists/"+f+"/albums"};return d(_,p,h)},m.prototype.getArtistTopTracks=function(f,p,h,_){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return d(b,h,_)},m.prototype.getArtistRelatedArtists=function(f,p,h){var _={url:n+"/artists/"+f+"/related-artists"};return d(_,p,h)},m.prototype.getFeaturedPlaylists=function(f,p){var h={url:n+"/browse/featured-playlists"};return d(h,f,p)},m.prototype.getNewReleases=function(f,p){var h={url:n+"/browse/new-releases"};return d(h,f,p)},m.prototype.getCategories=function(f,p){var h={url:n+"/browse/categories"};return d(h,f,p)},m.prototype.getCategory=function(f,p,h){var _={url:n+"/browse/categories/"+f};return d(_,p,h)},m.prototype.getCategoryPlaylists=function(f,p,h){var _={url:n+"/browse/categories/"+f+"/playlists"};return d(_,p,h)},m.prototype.search=function(f,p,h,_){var b={url:n+"/search/",params:{q:f,type:p.join(",")}};return d(b,h,_)},m.prototype.searchAlbums=function(f,p,h){return this.search(f,["album"],p,h)},m.prototype.searchArtists=function(f,p,h){return this.search(f,["artist"],p,h)},m.prototype.searchTracks=function(f,p,h){return this.search(f,["track"],p,h)},m.prototype.searchPlaylists=function(f,p,h){return this.search(f,["playlist"],p,h)},m.prototype.searchShows=function(f,p,h){return this.search(f,["show"],p,h)},m.prototype.searchEpisodes=function(f,p,h){return this.search(f,["episode"],p,h)},m.prototype.getAudioFeaturesForTrack=function(f,p){var h={};return h.url=n+"/audio-features/"+f,d(h,{},p)},m.prototype.getAudioFeaturesForTracks=function(f,p){var h={url:n+"/audio-features",params:{ids:f}};return d(h,{},p)},m.prototype.getAudioAnalysisForTrack=function(f,p){var h={};return h.url=n+"/audio-analysis/"+f,d(h,{},p)},m.prototype.getRecommendations=function(f,p){var h={url:n+"/recommendations"};return d(h,f,p)},m.prototype.getAvailableGenreSeeds=function(f){var p={url:n+"/recommendations/available-genre-seeds"};return d(p,{},f)},m.prototype.getMyDevices=function(f){var p={url:n+"/me/player/devices"};return d(p,{},f)},m.prototype.getMyCurrentPlaybackState=function(f,p){var h={url:n+"/me/player"};return d(h,f,p)},m.prototype.getMyCurrentPlayingTrack=function(f,p){var h={url:n+"/me/player/currently-playing"};return d(h,f,p)},m.prototype.transferMyPlayback=function(f,p,h){var _=p||{};_.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:_};return d(b,p,h)},m.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={};["context_uri","uris","offset","position_ms"].forEach(function(k){k in f&&(_[k]=f[k])});var b={type:"PUT",url:n+"/me/player/play",params:h,postData:_},C=typeof f=="function"?f:{};return d(b,C,p)},m.prototype.queue=function(f,p,h){p=p||{};var _="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:_};return d(b,p,h)},m.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"PUT",url:n+"/me/player/pause",params:h};return d(_,f,p)},m.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/next",params:h};return d(_,f,p)},m.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/previous",params:h};return d(_,f,p)},m.prototype.seek=function(f,p,h){p=p||{};var _={position_ms:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:_};return d(b,p,h)},m.prototype.setRepeat=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:_};return d(b,p,h)},m.prototype.setVolume=function(f,p,h){p=p||{};var _={volume_percent:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:_};return d(b,p,h)},m.prototype.setShuffle=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:_};return d(b,p,h)},m.prototype.getShow=function(f,p,h){var _={};return _.url=n+"/shows/"+f,d(_,p,h)},m.prototype.getShows=function(f,p,h){var _={url:n+"/shows/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getMySavedShows=function(f,p){var h={url:n+"/me/shows"};return d(h,f,p)},m.prototype.addToMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"PUT",postData:f};return d(_,p,h)},m.prototype.removeFromMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"DELETE",postData:f};return d(_,p,h)},m.prototype.containsMySavedShows=function(f,p,h){var _={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getShowEpisodes=function(f,p,h){var _={url:n+"/shows/"+f+"/episodes"};return d(_,p,h)},m.prototype.getEpisode=function(f,p,h){var _={};return _.url=n+"/episodes/"+f,d(_,p,h)},m.prototype.getEpisodes=function(f,p,h){var _={url:n+"/episodes/",params:{ids:f.join(",")}};return d(_,p,h)},m.prototype.getAccessToken=function(){return r},m.prototype.setAccessToken=function(f){r=f},m.prototype.setPromiseImplementation=function(f){var p=!1;try{var h=new f(function(_){_()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(_){console.error(_)}if(p)o=f;else throw new Error("Unsupported implementation of Promises/A+")},m}();e.exports=t})(G1);var qP=G1.exports;const Jn=Nl(qP),GP={name:"ModalDialogTrack",props:{item:{required:!0,type:Object},show:Boolean},emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"&&this.item.media_kind!=="podcast"){const e=new Jn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{mark_new(){j.library_track_update(this.item.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){j.library_track_update(this.item.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open_album(){this.item.data_kind==="spotify"&&this.item.media_kind!=="podcast"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):this.item.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.album_id}}):this.item.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.album_id}}):this.item.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.item.media_kind==="music"||this.item.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}}):this.item.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-artist",params:{id:this.item.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{media_kind:this.item.media_kind}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},KP={key:0,class:"modal is-active"},ZP={class:"modal-content"},YP={class:"card"},XP={class:"card-content"},JP=["textContent"],QP=["textContent"],eI={key:0,class:"buttons"},tI=["textContent"],nI=["textContent"],rI={class:"content is-small"},oI={key:0},sI=["textContent"],iI=["textContent"],aI={key:1},lI=["textContent"],cI=["textContent"],uI={key:2},dI=["textContent"],mI=["textContent"],fI={key:3},pI=["textContent"],hI=["textContent"],_I={key:4},gI=["textContent"],yI=["textContent"],vI={key:5},bI=["textContent"],zI=["textContent"],CI={key:6},wI=["textContent"],kI=["textContent"],xI={key:7},SI=["textContent"],EI=["textContent"],$I=["textContent"],TI=["textContent"],AI=["textContent"],OI={class:"title is-6"},PI=["textContent"],II={key:8},LI=["textContent"],NI={class:"title is-6"},DI=["textContent"],RI=["textContent"],MI=["textContent"],FI=["textContent"],VI=["textContent"],HI=["textContent"],UI=["textContent"],jI=["textContent"],BI={key:9},WI=["textContent"],qI=["textContent"],GI={class:"card-footer"},KI=["textContent"],ZI=["textContent"],YI=["textContent"];function XI(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",KP,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",ZP,[c("div",YP,[c("div",XP,[c("p",{class:"title is-4",textContent:g(n.item.title)},null,8,JP),c("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,QP),n.item.media_kind==="podcast"?(E(),P("div",eI,[n.item.play_count>0?(E(),P("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...a)=>s.mark_new&&s.mark_new(...a)),textContent:g(e.$t("dialog.track.mark-as-new"))},null,8,tI)):ee("",!0),n.item.play_count===0?(E(),P("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...a)=>s.mark_played&&s.mark_played(...a)),textContent:g(e.$t("dialog.track.mark-as-played"))},null,8,nI)):ee("",!0)])):ee("",!0),c("div",rI,[n.item.album?(E(),P("p",oI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,sI),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.item.album)},null,8,iI)])):ee("",!0),n.item.album_artist&&n.item.media_kind!=="audiobook"?(E(),P("p",aI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,lI),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:g(n.item.album_artist)},null,8,cI)])):ee("",!0),n.item.composer?(E(),P("p",uI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,dI),c("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,mI)])):ee("",!0),n.item.date_released?(E(),P("p",fI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,pI),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.item.date_released))},null,8,hI)])):n.item.year?(E(),P("p",_I,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,gI),c("span",{class:"title is-6",textContent:g(n.item.year)},null,8,yI)])):ee("",!0),n.item.genre?(E(),P("p",vI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,bI),c("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:g(n.item.genre)},null,8,zI)])):ee("",!0),n.item.disc_number?(E(),P("p",CI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,wI),c("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,kI)])):ee("",!0),n.item.length_ms?(E(),P("p",xI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,SI),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,EI)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,$I),c("span",{class:"title is-6",textContent:g(n.item.path)},null,8,TI)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,AI),c("span",OI,[c("span",{textContent:g(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,PI)])]),n.item.samplerate?(E(),P("p",II,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,LI),c("span",NI,[c("span",{textContent:g(n.item.type)},null,8,DI),n.item.samplerate?(E(),P("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.item.samplerate}))},null,8,RI)):ee("",!0),n.item.channels?(E(),P("span",{key:1,textContent:g(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,MI)):ee("",!0),n.item.bitrate?(E(),P("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.item.bitrate}))},null,8,FI)):ee("",!0)])])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,VI),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.item.time_added))},null,8,HI)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,UI),c("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.item.rating/10)}))},null,8,jI)]),n.item.comment?(E(),P("p",BI,[c("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,WI),c("span",{class:"title is-6",textContent:g(n.item.comment)},null,8,qI)])):ee("",!0)])]),c("footer",GI,[c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add"))},null,8,KI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add-next"))},null,8,ZI)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.play"))},null,8,YI)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[9]||(t[9]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const JI=ie(GP,[["render",XI]]),QI={name:"ListTracks",components:{ModalDialogTrack:JI},props:{expression:{default:"",type:String},items:{required:!0,type:Object},show_icon:Boolean,show_progress:Boolean,uris:{default:"",type:String}},emits:["play-count-changed"],data(){return{selected_item:{},show_details_modal:!1}},methods:{open_dialog(e){this.selected_item=e,this.show_details_modal=!0},play(e){this.uris?j.player_play_uri(this.uris,!1,this.items.items.indexOf(e)):this.expression?j.player_play_expression(this.expression,!1,this.items.items.indexOf(e)):j.player_play_uri(e.uri,!1)}}},eL={key:0,class:"mt-6 mb-5 py-2"},tL=["id","textContent"],nL=["onClick"],rL={key:0,class:"media-left is-clickable"},oL={class:"media-content is-clickable is-clipped"},sL=["textContent"],iL=["textContent"],aL=["textContent"],lL=["max","value"],cL={class:"media-right"},uL=["onClick"];function dL(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-track");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P(Ce,{key:l.itemId},[l.isItem?(E(),P("div",{key:1,class:ze(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:u=>s.play(l.item)},[n.show_icon?(E(),P("figure",rL,[v(i,{class:"icon",name:"file-outline",size:"16"})])):ee("",!0),c("div",oL,[c("h1",{class:ze(["title is-6",{"has-text-grey":l.item.media_kind==="podcast"&&l.item.play_count>0}]),textContent:g(l.item.title)},null,10,sL),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(l.item.artist)},null,8,iL),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.item.album)},null,8,aL),n.show_progress&&l.item.seek_ms>0?(E(),P("progress",{key:0,class:"progress is-info",max:l.item.length_ms,value:l.item.seek_ms},null,8,lL)):ee("",!0)]),c("div",cL,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,uL)])],10,nL)):(E(),P("div",eL,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,tL)]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=l=>e.$emit("play-count-changed"))},null,8,["item","show"])]))],64)}const mn=ie(QI,[["render",dL],["__scopeId","data-v-84498238"]]),mL={name:"ModalDialogAlbum",components:{CoverArtwork:xr},props:{item:{required:!0,type:Object},media_kind:{default:"",type:String},show:Boolean},emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{media_kind_resolved(){return this.media_kind||this.item.media_kind}},methods:{mark_played(){j.library_album_track_update(this.item.id,{play_count:"played"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},open(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.id}}):this.$router.push({name:"music-album",params:{id:this.item.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.item.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.item.artist_id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},fL={key:0,class:"modal is-active"},pL={class:"modal-content"},hL={class:"card"},_L={class:"card-content"},gL={class:"title is-4"},yL=["textContent"],vL={key:0,class:"buttons"},bL=["textContent"],zL=["textContent"],CL={class:"content is-small"},wL={key:0},kL=["textContent"],xL=["textContent"],SL={key:1},EL=["textContent"],$L=["textContent"],TL={key:2},AL=["textContent"],OL=["textContent"],PL=["textContent"],IL=["textContent"],LL=["textContent"],NL=["textContent"],DL=["textContent"],RL=["textContent"],ML=["textContent"],FL=["textContent"],VL={class:"card-footer"},HL=["textContent"],UL=["textContent"],jL=["textContent"];function BL(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",fL,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",pL,[c("div",hL,[c("div",_L,[v(i,{artwork_url:n.item.artwork_url,artist:n.item.artist,album:n.item.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["artwork_url","artist","album"]),c("p",gL,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open&&s.open(...l)),textContent:g(n.item.name)},null,8,yL)]),s.media_kind_resolved==="podcast"?(E(),P("div",vL,[c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>s.mark_played&&s.mark_played(...l)),textContent:g(e.$t("dialog.album.mark-as-played"))},null,8,bL),n.item.data_kind==="url"?(E(),P("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:g(e.$t("dialog.album.remove-podcast"))},null,8,zL)):ee("",!0)])):ee("",!0),c("div",CL,[n.item.artist?(E(),P("p",wL,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,kL),c("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:g(n.item.artist)},null,8,xL)])):ee("",!0),n.item.date_released?(E(),P("p",SL,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,EL),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.item.date_released))},null,8,$L)])):n.item.year?(E(),P("p",TL,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,AL),c("span",{class:"title is-6",textContent:g(n.item.year)},null,8,OL)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,PL),c("span",{class:"title is-6",textContent:g(n.item.track_count)},null,8,IL)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,LL),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,NL)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,DL),c("span",{class:"title is-6",textContent:g(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,RL)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,ML),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.item.time_added))},null,8,FL)])])]),c("footer",VL,[c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.queue_add&&s.queue_add(...l))},[v(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add"))},null,8,HL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[v(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add-next"))},null,8,UL)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>s.play&&s.play(...l))},[v(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.play"))},null,8,jL)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):ee("",!0)]),_:1})}const jl=ie(mL,[["render",BL]]),Tp={load(e){return Promise.all([j.library_album(e.params.id),j.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data,{criteria:[{field:"disc_number",type:Number}],index:{field:"disc_number",type:Number}}),e.tracks.indices.length<2&&e.tracks.group()}},WL={name:"PageAlbum",components:{ContentWithHero:Ul,CoverArtwork:xr,ListTracks:mn,ModalDialogAlbum:jl},beforeRouteEnter(e,t,n){Tp.load(e).then(r=>{n(o=>Tp.set(o,r))})},data(){return{album:{},show_details_modal:!1,tracks:new Ee}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){j.player_play_uri(this.album.uri,!0)}}},qL=["textContent"],GL={class:"subtitle is-6 has-text-link"},KL=["textContent"],ZL={class:"buttons fd-is-centered-mobile mt-5"},YL=["textContent"],XL=["textContent"];function JL(e,t,n,r,o,s){const i=A("mdicon"),a=A("cover-artwork"),l=A("list-tracks"),u=A("modal-dialog-album"),d=A("content-with-hero");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,qL),c("h2",GL,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...m)=>s.open_artist&&s.open_artist(...m)),textContent:g(o.album.artist)},null,8,KL)]),c("div",ZL,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.album.shuffle"))},null,8,YL)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=m=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":L(()=>[v(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=m=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.album.track-count",{count:o.album.track_count}))},null,8,XL),v(l,{items:o.tracks,uris:o.album.uri},null,8,["items","uris"]),v(u,{item:o.album,show:o.show_details_modal,onClose:t[4]||(t[4]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const QL=ie(WL,[["render",JL]]),e4={name:"ModalDialogTrackSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},t4={key:0,class:"modal is-active"},n4={class:"modal-content"},r4={class:"card"},o4={class:"card-content"},s4=["textContent"],i4=["textContent"],a4={class:"content is-small"},l4=["textContent"],c4=["textContent"],u4=["textContent"],d4=["textContent"],m4=["textContent"],f4=["textContent"],p4=["textContent"],h4=["textContent"],_4=["textContent"],g4=["textContent"],y4=["textContent"],v4=["textContent"],b4={class:"card-footer"},z4=["textContent"],C4=["textContent"],w4=["textContent"];function k4(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",t4,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",n4,[c("div",r4,[c("div",o4,[c("p",{class:"title is-4",textContent:g(n.item.name)},null,8,s4),c("p",{class:"subtitle",textContent:g(n.item.artists[0].name)},null,8,i4),c("div",a4,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,l4),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.item.album.name)},null,8,c4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,u4),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_artist&&s.open_artist(...a)),textContent:g(n.item.artists[0].name)},null,8,d4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,m4),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.item.album.release_date))},null,8,f4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,p4),c("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,h4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,_4),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.duration_ms))},null,8,g4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,y4),c("span",{class:"title is-6",textContent:g(n.item.uri)},null,8,v4)])])]),c("footer",b4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add"))},null,8,z4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add-next"))},null,8,C4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.play"))},null,8,w4)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const x4=ie(e4,[["render",k4]]),S4={name:"ListTracksSpotify",components:{ModalDialogTrackSpotify:x4},props:{context_uri:{default:"",type:String},items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open_dialog(e){this.selected_item=e,this.show_details_modal=!0},play(e){e.is_playable&&j.player_play_uri(this.context_uri||e.uri,!1,e.position||0)}}},E4=["onClick"],$4=["textContent"],T4=["textContent"],A4=["textContent"],O4={key:0,class:"subtitle is-7"},P4=["textContent"],I4=["textContent"],L4={class:"media-right"},N4=["onClick"];function D4(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-track-spotify");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P("div",{key:l.id,class:"media is-align-items-center"},[c("div",{class:ze(["media-content is-clipped",{"is-clickable":l.is_playable,"fd-is-not-allowed":!l.is_playable}]),onClick:u=>s.play(l)},[c("h1",{class:ze(["title is-6",{"has-text-grey-light":!l.is_playable}]),textContent:g(l.name)},null,10,$4),c("h2",{class:ze(["subtitle is-7 has-text-weight-bold",{"has-text-grey":l.is_playable,"has-text-grey-light":!l.is_playable}]),textContent:g(l.artists[0].name)},null,10,T4),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.album.name)},null,8,A4),l.is_playable?ee("",!0):(E(),P("h2",O4,[xt(" ("),c("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,P4),l.restrictions&&l.restrictions.reason?(E(),P("span",{key:0,textContent:g(e.$t("list.spotify.restriction-reason",{reason:l.restrictions.reason}))},null,8,I4)):ee("",!0),xt(") ")]))],10,E4),c("div",L4,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,N4)])]))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const Qa=ie(S4,[["render",D4]]),R4={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:xr},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],data(){return{artwork_visible:!1}},methods:{artwork_error(){this.artwork_visible=!1},artwork_loaded(){this.artwork_visible=!0},artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)||""},open(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},M4={key:0,class:"modal is-active"},F4={class:"modal-content"},V4={class:"card"},H4={class:"card-content"},U4={class:"title is-4"},j4=["textContent"],B4={class:"content is-small"},W4=["textContent"],q4=["textContent"],G4=["textContent"],K4=["textContent"],Z4=["textContent"],Y4=["textContent"],X4={class:"card-footer"},J4=["textContent"],Q4=["textContent"],eN=["textContent"];function tN(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",M4,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),c("div",F4,[c("div",V4,[c("div",H4,[v(i,{artwork_url:s.artwork_url(n.item),artist:n.item.artist,album:n.item.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:s.artwork_loaded,onError:s.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),c("p",U4,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>s.open&&s.open(...l)),textContent:g(n.item.name)},null,8,j4)]),c("div",B4,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,W4),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>s.open_artist&&s.open_artist(...l)),textContent:g(n.item.artists[0].name)},null,8,q4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,G4),c("span",{class:"title is-6",textContent:g(e.$filters.date(n.item.release_date))},null,8,K4)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,Z4),c("span",{class:"title is-6",textContent:g(n.item.album_type)},null,8,Y4)])])]),c("footer",X4,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>s.queue_add&&s.queue_add(...l))},[v(a,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add"))},null,8,J4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>s.queue_add_next&&s.queue_add_next(...l))},[v(a,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add-next"))},null,8,Q4)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>s.play&&s.play(...l))},[v(a,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.play"))},null,8,eN)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):ee("",!0)]),_:1})}const K1=ie(R4,[["render",tN]]),Ap={load(e){const t=new Jn;return t.setAccessToken(ht.state.spotify.webapi_token),t.getAlbum(e.params.id,{market:ht.state.spotify.webapi_country})},set(e,t){e.album=t}},nN={name:"PageAlbumSpotify",components:{ContentWithHero:Ul,CoverArtwork:xr,ListTracksSpotify:Qa,ModalDialogAlbumSpotify:K1},beforeRouteEnter(e,t,n){Ap.load(e).then(r=>{n(o=>Ap.set(o,r))})},data(){return{album:{artists:[{}],tracks:{}},show_details_modal:!1}},computed:{tracks(){const{album:e}=this;return e.tracks.total?e.tracks.items.map(t=>({...t,album:e})):{}}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)??""},open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,j.player_play_uri(this.album.uri,!0)}}},rN=["textContent"],oN={class:"subtitle is-6 has-text-link"},sN=["textContent"],iN={class:"buttons fd-is-centered-mobile mt-5"},aN=["textContent"],lN=["textContent"];function cN(e,t,n,r,o,s){const i=A("mdicon"),a=A("cover-artwork"),l=A("list-tracks-spotify"),u=A("modal-dialog-album-spotify"),d=A("content-with-hero");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,rN),c("h2",oN,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...m)=>s.open_artist&&s.open_artist(...m)),textContent:g(o.album.artists[0].name)},null,8,sN)]),c("div",iN,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.album.shuffle"))},null,8,aN)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=m=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":L(()=>[v(a,{artwork_url:s.artwork_url(o.album),artist:o.album.artists[0].name,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=m=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.spotify.album.track-count",{count:o.album.tracks.total}))},null,8,lN),v(l,{items:s.tracks,context_uri:o.album.uri},null,8,["items","context_uri"]),v(u,{item:o.album,show:o.show_details_modal,onClose:t[4]||(t[4]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const uN=ie(nN,[["render",cN]]),dN={name:"ContentWithHeading",data(){return{options_visible:!1}},computed:{icon_name(){return this.options_visible?"chevron-up":"chevron-down"},position(){return{hash:this.options_visible?"#top":"#app",query:this.$route.query}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options_ref))},methods:{onElementObserved(e){e.forEach(({target:t,isIntersecting:n})=>{this.options_visible=n})},visibilityChanged(e){this.options_visible=e}}},mN={class:"section"},fN={class:"container"},pN={class:"columns is-centered"},hN={class:"column is-four-fifths"},_N={key:0},gN={ref:"options_ref",style:{height:"1px"}},yN={class:"buttons is-centered mt-4 mb-2"},vN={id:"top",class:"level is-clipped"},bN={class:"level-left is-flex-shrink-1"},zN={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},CN={class:"level-right has-text-centered-mobile"},wN={class:"mt-4"};function kN(e,t,n,r,o,s){const i=A("mdicon"),a=A("router-link");return E(),P("section",mN,[c("div",fN,[c("div",pN,[c("div",hN,[e.$slots.options?(E(),P("section",_N,[c("div",gN,null,512),vt(e.$slots,"options"),c("nav",yN,[v(a,{class:"button is-small is-white",to:s.position},{default:L(()=>[v(i,{class:"icon is-small",name:s.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):ee("",!0),c("div",{class:ze({"is-full-height":e.$slots.options})},[c("nav",vN,[c("div",bN,[c("div",zN,[c("div",null,[vt(e.$slots,"heading-left")])])]),c("div",CN,[vt(e.$slots,"heading-right")])]),vt(e.$slots,"content"),c("div",wN,[vt(e.$slots,"footer")])],2)])])])])}const Qe=ie(dN,[["render",kN]]),xN={name:"ControlDropdown",props:{options:{required:!0,type:Array},value:{required:!0,type:[String,Number]}},emits:["update:value"],data(){return{active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{deactivate(){this.active=!1},select(e){this.active=!1,this.$emit("update:value",e.id)}}},SN={class:"dropdown-trigger"},EN=["textContent"],$N={id:"dropdown",class:"dropdown-menu",role:"menu"},TN={class:"dropdown-content"},AN=["onClick","textContent"];function ON(e,t,n,r,o,s){const i=A("mdicon"),a=vd("click-away");return pt((E(),P("div",{class:ze(["dropdown",{"is-active":o.active}])},[c("div",SN,[c("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>o.active=!o.active)},[c("span",{textContent:g(s.option.name)},null,8,EN),v(i,{class:"icon",name:"chevron-down",size:"16"})])]),c("div",$N,[c("div",TN,[(E(!0),P(Ce,null,Ct(n.options,l=>(E(),P("a",{key:l.id,class:ze(["dropdown-item",{"is-active":n.value===l.id}]),onClick:u=>s.select(l),textContent:g(l.name)},null,10,AN))),128))])])],2)),[[a,s.deactivate]])}const Ao=ie(xN,[["render",ON]]),PN={name:"IndexButtonList",props:{indices:{required:!0,type:Array}}},IN={class:"buttons is-centered mb-4 fd-is-square"};function LN(e,t,n,r,o,s){const i=A("router-link");return E(),P("section",null,[c("nav",IN,[(E(!0),P(Ce,null,Ct(n.indices,a=>(E(),xe(i,{key:a,class:"button is-small",to:{hash:`#index_${a}`,query:e.$route.query}},{default:L(()=>[xt(g(a),1)]),_:2},1032,["to"]))),128))])])}const Qn=ie(PN,[["render",LN]]),NN={name:"ListAlbums",components:{CoverArtwork:xr,ModalDialog:Dd,ModalDialogAlbum:jl},props:{items:{required:!0,type:Object},media_kind:{default:"",type:String}},emits:["play-count-changed","podcast-deleted"],data(){return{rss_playlist_to_remove:{},selected_item:{},show_details_modal:!1,show_remove_podcast_modal:!1}},computed:{media_kind_resolved(){return this.media_kind||this.selected_item.media_kind},show_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open(e){this.selected_item=e,this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:e.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:e.id}}):this.$router.push({name:"music-album",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0},open_remove_podcast_dialog(){j.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:e})=>{j.library_track_playlists(e.items[0].id).then(({data:t})=>{[this.rss_playlist_to_remove]=t.items.filter(n=>n.type==="rss"),this.show_remove_podcast_modal=!0,this.show_details_modal=!1})})},play_count_changed(){this.$emit("play-count-changed")},remove_podcast(){this.show_remove_podcast_modal=!1,j.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},DN={key:0,class:"mt-6 mb-5 py-2"},RN=["id","textContent"],MN=["onClick"],FN={key:0,class:"media-left"},VN={class:"media-content is-clickable is-clipped"},HN=["textContent"],UN=["textContent"],jN=["textContent"],BN={class:"media-right"},WN=["onClick"],qN=["textContent"],GN={class:"is-size-7"},KN=["textContent"],ZN=["textContent"];function YN(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("mdicon"),l=A("modal-dialog-album"),u=A("modal-dialog");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,d=>(E(),P(Ce,{key:d.itemId},[d.isItem?(E(),P("div",{key:1,class:"media is-align-items-center",onClick:m=>s.open(d.item)},[s.show_artwork?(E(),P("div",FN,[v(i,{artwork_url:d.item.artwork_url,artist:d.item.artist,album:d.item.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):ee("",!0),c("div",VN,[c("div",null,[c("h1",{class:"title is-6",textContent:g(d.item.name)},null,8,HN),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g(d.item.artist)},null,8,UN),d.item.date_released&&d.item.media_kind==="music"?(E(),P("h2",{key:0,class:"subtitle is-7 has-text-grey",textContent:g(e.$filters.date(d.item.date_released))},null,8,jN)):ee("",!0)])]),c("div",BN,[c("a",{onClick:_t(m=>s.open_dialog(d.item),["prevent","stop"])},[v(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,WN)])],8,MN)):(E(),P("div",DN,[c("span",{id:`index_${d.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(d.index)},null,8,RN)]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(l,{item:o.selected_item,media_kind:n.media_kind,show:o.show_details_modal,onClose:t[0]||(t[0]=d=>o.show_details_modal=!1),onRemovePodcast:t[1]||(t[1]=d=>s.open_remove_podcast_dialog()),onPlayCountChanged:t[2]||(t[2]=d=>s.play_count_changed())},null,8,["item","media_kind","show"]),v(u,{delete_action:e.$t("page.podcast.remove"),show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),onClose:t[3]||(t[3]=d=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":L(()=>[c("p",{textContent:g(e.$t("list.albums.info-1"))},null,8,qN),c("p",GN,[xt(" ("),c("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,KN),c("b",{textContent:g(o.rss_playlist_to_remove.name)},null,8,ZN),xt(") ")])]),_:1},8,["delete_action","show","title","onDelete"])]))],64)}const bn=ie(NN,[["render",YN]]),XN={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},JN={class:"section fd-tabs-section"},QN={class:"container"},e6={class:"columns is-centered"},t6={class:"column is-four-fifths"},n6={class:"tabs is-centered is-small"},r6=["onClick","onKeypress"],o6=["textContent"],s6=["onClick","onKeypress"],i6=["textContent"],a6=["onClick","onKeypress"],l6=["textContent"],c6=["onClick","onKeypress"],u6=["textContent"],d6=["onClick","onKeypress"],m6=["textContent"],f6=["onClick","onKeypress"],p6=["textContent"];function h6(e,t,n,r,o,s){const i=A("mdicon"),a=A("router-link");return E(),P("section",JN,[c("div",QN,[c("div",e6,[c("div",t6,[c("div",n6,[c("ul",null,[v(a,{to:{name:"music-history"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"history",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.history"))},null,8,o6)],40,r6)],2)]),_:1}),v(a,{to:{name:"music-artists"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.artists"))},null,8,i6)],40,s6)],2)]),_:1}),v(a,{to:{name:"music-albums"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.albums"))},null,8,l6)],40,a6)],2)]),_:1}),v(a,{to:{name:"music-genres"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.genres"))},null,8,u6)],40,c6)],2)]),_:1}),v(a,{to:{name:"music-composers"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.composers"))},null,8,m6)],40,d6)],2)]),_:1}),s.spotify_enabled?(E(),xe(a,{key:0,to:{name:"music-spotify"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"spotify",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.music.tabs.spotify"))},null,8,p6)],40,f6)],2)]),_:1})):ee("",!0)])])])])])])}const dr=ie(XN,[["render",h6]]),Op={load(e){return j.library_albums("music")},set(e,t){e.albums_list=new Ee(t.data)}},_6={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListAlbums:bn,TabsMusic:dr},beforeRouteEnter(e,t,n){Op.load(e).then(r=>{n(o=>Op.set(o,r))})},data(){return{albums_list:new Ee,grouping_options:[{id:1,name:this.$t("page.albums.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.albums.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}},{id:3,name:this.$t("page.albums.sort.recently-released"),options:{criteria:[{field:"date_released",order:-1,type:Date}],index:{field:"date_released",type:Date}}},{id:4,name:this.$t("page.albums.sort.artist-name"),options:{criteria:[{field:"artist",type:String},{field:"name_sort",type:String}],index:{field:"artist",type:String}}},{id:5,name:this.$t("page.albums.sort.artist-date"),options:{criteria:[{field:"artist",type:String},{field:"date_released",type:Date}],index:{field:"artist",type:String}}}]}},computed:{albums(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e.options),this.albums_list},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(ll,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(ki,e)}},selected_grouping_option_id:{get(){return this.$store.state.albums_sort},set(e){this.$store.commit(yh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},g6={class:"fd-page-with-tabs"},y6={class:"columns"},v6={class:"column"},b6=["textContent"],z6={class:"field"},C6={class:"control"},w6=["textContent"],k6=["textContent"],x6={key:0,class:"field"},S6={class:"control"},E6=["textContent"],$6=["textContent"],T6={class:"column"},A6=["textContent"],O6=["textContent"],P6=["textContent"];function I6(e,t,n,r,o,s){const i=A("tabs-music"),a=A("index-button-list"),l=A("control-dropdown"),u=A("list-albums"),d=A("content-with-heading");return E(),P("div",g6,[v(i),v(d,null,{options:L(()=>[v(a,{indices:s.albums.indices},null,8,["indices"]),c("div",y6,[c("div",v6,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,b6),c("div",z6,[c("div",C6,[pt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=m=>s.hide_singles=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:g(e.$t("page.albums.hide-singles"))},null,8,w6)]),c("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,k6)]),s.spotify_enabled?(E(),P("div",x6,[c("div",S6,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=m=>s.hide_spotify=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.albums.hide-spotify"))},null,8,E6)]),c("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,$6)])):ee("",!0)]),c("div",T6,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort.title"))},null,8,A6),v(l,{value:s.selected_grouping_option_id,"onUpdate:value":t[2]||(t[2]=m=>s.selected_grouping_option_id=m),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.albums.title"))},null,8,O6),c("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:s.albums.count}))},null,8,P6)]),"heading-right":L(()=>[]),content:L(()=>[v(u,{items:s.albums},null,8,["items"])]),_:1})])}const L6=ie(_6,[["render",I6]]),N6={name:"ModalDialogArtist",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.item.id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},D6={key:0,class:"modal is-active"},R6={class:"modal-content"},M6={class:"card"},F6={class:"card-content"},V6={class:"title is-4"},H6=["textContent"],U6={class:"content is-small"},j6=["textContent"],B6=["textContent"],W6=["textContent"],q6=["textContent"],G6=["textContent"],K6=["textContent"],Z6=["textContent"],Y6=["textContent"],X6={class:"card-footer"},J6=["textContent"],Q6=["textContent"],e5=["textContent"];function t5(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",D6,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",R6,[c("div",M6,[c("div",F6,[c("p",V6,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,H6)]),c("div",U6,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,j6),c("span",{class:"title is-6",textContent:g(n.item.album_count)},null,8,B6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,W6),c("span",{class:"title is-6",textContent:g(n.item.track_count)},null,8,q6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,G6),c("span",{class:"title is-6",textContent:g(e.$t(`data.kind.${n.item.data_kind}`))},null,8,K6)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,Z6),c("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.item.time_added))},null,8,Y6)])])]),c("footer",X6,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add"))},null,8,J6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add-next"))},null,8,Q6)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.play"))},null,8,e5)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Bl=ie(N6,[["render",t5]]),Pp={load(e){return Promise.all([j.library_artist(e.params.id),j.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new Ee(t[1].data)}},n5={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:Ao,ListAlbums:bn,ModalDialogArtist:Bl},beforeRouteEnter(e,t,n){Pp.load(e).then(r=>{n(o=>Pp.set(o,r))})},data(){return{albums_list:new Ee,artist:{},grouping_options:[{id:1,name:this.$t("page.artist.sort.name"),options:{criteria:[{field:"name_sort",type:String}]}},{id:2,name:this.$t("page.artist.sort.release-date"),options:{criteria:[{field:"date_released",type:Date}]}}],show_details_modal:!1}},computed:{albums(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.albums_list.group(e.options),this.albums_list},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(ki,e)}},selected_grouping_option_id:{get(){return this.$store.state.artist_albums_sort},set(e){this.$store.commit(bh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},track_count(){return[...this.albums].reduce((e,t)=>e+(t.isItem?t.item.track_count:0),0)}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){j.player_play_uri(this.albums.items.map(e=>e.uri).join(),!0)}}},r5={class:"columns"},o5={class:"column"},s5=["textContent"],i5={key:0,class:"field"},a5={class:"control"},l5=["textContent"],c5=["textContent"],u5={class:"column"},d5=["textContent"],m5=["textContent"],f5={class:"buttons is-centered"},p5=["textContent"],h5={class:"heading has-text-centered-mobile"},_5=["textContent"],g5=c("span",null," | ",-1),y5=["textContent"];function v5(e,t,n,r,o,s){const i=A("control-dropdown"),a=A("mdicon"),l=A("list-albums"),u=A("modal-dialog-artist"),d=A("content-with-heading");return E(),P("div",null,[v(d,null,{options:L(()=>[c("div",r5,[c("div",o5,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.filter"))},null,8,s5),s.spotify_enabled?(E(),P("div",i5,[c("div",a5,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=m=>s.hide_spotify=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artist.hide-spotify"))},null,8,l5)]),c("p",{class:"help",textContent:g(e.$t("page.artist.hide-spotify-help"))},null,8,c5)])):ee("",!0)]),c("div",u5,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,d5),v(i,{value:s.selected_grouping_option_id,"onUpdate:value":t[1]||(t[1]=m=>s.selected_grouping_option_id=m),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,m5)]),"heading-right":L(()=>[c("div",f5,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=m=>o.show_details_modal=!0)},[v(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...m)=>s.play&&s.play(...m))},[v(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,p5)])])]),content:L(()=>[c("p",h5,[c("span",{textContent:g(e.$t("page.artist.album-count",{count:s.albums.count}))},null,8,_5),g5,c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...m)=>s.open_tracks&&s.open_tracks(...m)),textContent:g(e.$t("page.artist.track-count",{count:s.track_count}))},null,8,y5)]),v(l,{items:s.albums},null,8,["items"]),v(u,{item:o.artist,show:o.show_details_modal,onClose:t[5]||(t[5]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const b5=ie(n5,[["render",v5]]),z5={name:"ListAlbumsSpotify",components:{CoverArtwork:xr,ModalDialogAlbumSpotify:K1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},computed:{show_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{artwork_url(e){var t,n;return((n=(t=e.images)==null?void 0:t[0])==null?void 0:n.url)??""},open(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},C5=["onClick"],w5={key:0,class:"media-left is-clickable"},k5={class:"media-content is-clickable is-clipped"},x5=["textContent"],S5=["textContent"],E5=["textContent"],$5={class:"media-right"},T5=["onClick"];function A5(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("mdicon"),l=A("modal-dialog-album-spotify");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,u=>{var d;return E(),P("div",{key:u.id,class:"media is-align-items-center",onClick:m=>s.open(u)},[s.show_artwork?(E(),P("div",w5,[v(i,{artwork_url:s.artwork_url(u),artist:u.artist,album:u.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):ee("",!0),c("div",k5,[c("h1",{class:"title is-6",textContent:g(u.name)},null,8,x5),c("h2",{class:"subtitle is-7 has-text-grey has-text-weight-bold",textContent:g((d=u.artists[0])==null?void 0:d.name)},null,8,S5),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g([u.album_type,e.$filters.date(u.release_date)].join(", "))},null,8,E5)]),c("div",$5,[c("a",{onClick:_t(m=>s.open_dialog(u),["prevent","stop"])},[v(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,T5)])],8,C5)}),128)),(E(),xe(Dn,{to:"#app"},[v(l,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=u=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const wi=ie(z5,[["render",A5]]),O5={name:"ModalDialogArtistSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},P5={key:0,class:"modal is-active"},I5={class:"modal-content"},L5={class:"card"},N5={class:"card-content"},D5={class:"title is-4"},R5=["textContent"],M5={class:"content is-small"},F5=["textContent"],V5=["textContent"],H5=["textContent"],U5=["textContent"],j5={class:"card-footer"},B5=["textContent"],W5=["textContent"],q5=["textContent"];function G5(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",P5,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",I5,[c("div",L5,[c("div",N5,[c("p",D5,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,R5)]),c("div",M5,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,F5),c("span",{class:"title is-6",textContent:g([n.item.popularity,n.item.followers.total].join(" / "))},null,8,V5)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,H5),c("span",{class:"title is-6",textContent:g(n.item.genres.join(", "))},null,8,U5)])])]),c("footer",j5,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add"))},null,8,B5)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add-next"))},null,8,W5)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.play"))},null,8,q5)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Z1=ie(O5,[["render",G5]]);function K5(e){return e.scrollHeight}function Z5(e){return e.scrollWidth}function Y5(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function X5(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const J5=c("div",{class:"loading"},"Loading...",-1),Q5=c("div",{class:"no-more"},"No more.",-1),eD=c("div",{class:"no-results"},"No results.",-1),tD=c("div",{class:"error"},"Error.",-1),Kd=wr({__name:"VueEternalLoading",props:{load:{required:!0,type:Function},isInitial:{required:!1,type:Boolean,default:!0},position:{required:!1,type:String,default:"default"},container:{required:!1,type:Object,default:null},margin:{required:!1,type:String,default:void 0}},emits:["update:isInitial"],setup(e,{emit:t}){const n=e,r=ir();let o=ir("loading"),s=ir(n.isInitial),i=0;function a(){Cs(()=>{var y,z;n.position==="top"?Y5((y=n.container)!=null?y:document.documentElement,i):n.position==="left"&&X5((z=n.container)!=null?z:document.documentElement,i)})}function l(y,z){return y===0?s.value?(d(),"no-results"):(u(),"no-more"):y!==void 0&&z!==void 0&&y{var z,x;y.isIntersecting&&(n.position==="top"?i=K5((z=n.container)!=null?z:document.documentElement):n.position==="left"&&(i=Z5((x=n.container)!=null?x:document.documentElement)),_(),n.load({loaded:l,noMore:u,noResults:d,error:m},{isFirstLoad:s.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let k;return typeof IntersectionObserver<"u"&&eg(()=>{k&&_(),k=C(),b()},{flush:"post"}),Cn(()=>n.isInitial,y=>{y&&f()}),Cn(s,y=>{y||t("update:isInitial",!1)}),(y,z)=>(E(),P("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[vn(o)==="loading"?vt(y.$slots,"loading",Vs(Bo({key:0},{isFirstLoad:vn(s)})),()=>[J5]):vn(o)==="no-more"?vt(y.$slots,"no-more",Vs(Bo({key:1},{retry:p})),()=>[Q5]):vn(o)==="no-results"?vt(y.$slots,"no-results",Vs(Bo({key:2},{retry:p})),()=>[eD]):vn(o)==="error"?vt(y.$slots,"error",Vs(Bo({key:3},{retry:p})),()=>[tD]):ee("",!0)],512))}}),Iu=50,Ip={load(e){const t=new Jn;return t.setAccessToken(ht.state.spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{include_groups:"album,single",limit:Iu,market:ht.state.spotify.webapi_country,offset:0})])},set(e,t){e.artist=t[0],e.albums=[],e.total=0,e.offset=0,e.append_albums(t[1])}},nD={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,ListAlbumsSpotify:wi,ModalDialogArtistSpotify:Z1,VueEternalLoading:Kd},beforeRouteEnter(e,t,n){Ip.load(e).then(r=>{n(o=>Ip.set(o,r))})},data(){return{albums:[],artist:{},offset:0,show_details_modal:!1,total:0}},methods:{append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},load_next({loaded:e}){const t=new Jn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{include_groups:"album,single",limit:Iu,offset:this.offset}).then(n=>{this.append_albums(n),e(n.items.length,Iu)})},play(){this.show_album_details_modal=!1,j.player_play_uri(this.artist.uri,!0)}}},rD=["textContent"],oD={class:"buttons is-centered"},sD=["textContent"],iD=["textContent"],aD={class:"columns is-centered"},lD={class:"column has-text-centered"};function cD(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-albums-spotify"),l=A("VueEternalLoading"),u=A("modal-dialog-artist-spotify"),d=A("content-with-heading");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,rD)]),"heading-right":L(()=>[c("div",oD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.artist.shuffle"))},null,8,sD)])])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:o.total}))},null,8,iD),v(a,{items:o.albums},null,8,["items"]),o.offset[c("div",aD,[c("div",lD,[v(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":L(()=>[xt(" ")]),_:1},8,["load"])):ee("",!0),v(u,{item:o.artist,show:o.show_details_modal,onClose:t[2]||(t[2]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const uD=ie(nD,[["render",cD]]),Lp={load(e){return Promise.all([j.library_artist(e.params.id),j.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new Ee(t[1].data.tracks)}},dD={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListTracks:mn,ModalDialogArtist:Bl},beforeRouteEnter(e,t,n){Lp.load(e).then(r=>{n(o=>Lp.set(o,r))})},data(){return{artist:{},grouping_options:[{id:1,name:this.$t("page.artist.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.artist.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new Ee}},computed:{album_count(){return new Set([...this.tracks].filter(e=>e.isItem).map(e=>e.item.album_id)).size},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(ki,e)}},selected_grouping_option_id:{get(){return this.$store.state.artist_tracks_sort},set(e){this.$store.commit(zh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},track_uris(){return this.tracks_list.items.map(e=>e.uri).join()},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_spotify||t.data_kind!=="spotify"],this.tracks_list.group(e.options),this.tracks_list}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){j.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(),!0)}}},mD={class:"columns"},fD={class:"column"},pD=["textContent"],hD={key:0,class:"field"},_D={class:"control"},gD=["textContent"],yD=["textContent"],vD={class:"column"},bD=["textContent"],zD=["textContent"],CD={class:"buttons is-centered"},wD=["textContent"],kD={class:"heading has-text-centered-mobile"},xD=["textContent"],SD=c("span",null," | ",-1),ED=["textContent"];function $D(e,t,n,r,o,s){const i=A("index-button-list"),a=A("control-dropdown"),l=A("mdicon"),u=A("list-tracks"),d=A("modal-dialog-artist"),m=A("content-with-heading");return E(),P("div",null,[v(m,null,{options:L(()=>[v(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",mD,[c("div",fD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.filter"))},null,8,pD),s.spotify_enabled?(E(),P("div",hD,[c("div",_D,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[0]||(t[0]=f=>s.hide_spotify=f),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artist.hide-spotify"))},null,8,gD)]),c("p",{class:"help",textContent:g(e.$t("page.artist.hide-spotify-help"))},null,8,yD)])):ee("",!0)]),c("div",vD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,bD),v(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[1]||(t[1]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,zD)]),"heading-right":L(()=>[c("div",CD,[c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},[v(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[3]||(t[3]=(...f)=>s.play&&s.play(...f))},[v(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,wD)])])]),content:L(()=>[c("p",kD,[c("a",{class:"has-text-link",onClick:t[4]||(t[4]=(...f)=>s.open_artist&&s.open_artist(...f)),textContent:g(e.$t("page.artist.album-count",{count:s.album_count}))},null,8,xD),SD,c("span",{textContent:g(e.$t("page.artist.track-count",{count:s.tracks.count}))},null,8,ED)]),v(u,{items:s.tracks,uris:s.track_uris},null,8,["items","uris"]),v(d,{item:o.artist,show:o.show_details_modal,onClose:t[5]||(t[5]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const TD=ie(dD,[["render",$D]]),AD={name:"ListArtists",components:{ModalDialogArtist:Bl},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.selected_item=e;const t=e.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:t,params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},OD={key:0,class:"mt-6 mb-5 py-2"},PD={class:"media-content is-clipped"},ID=["id","textContent"],LD=["onClick"],ND={class:"media-content is-clickable is-clipped"},DD=["textContent"],RD={class:"media-right"},MD=["onClick"];function FD(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-artist");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P(Ce,{key:l.itemId},[l.isItem?(E(),P("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",ND,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,DD)]),c("div",RD,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,MD)])],8,LD)):(E(),P("div",OD,[c("div",PD,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,ID)])]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const el=ie(AD,[["render",FD]]),Np={load(e){return j.library_artists("music")},set(e,t){e.artists_list=new Ee(t.data)}},VD={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListArtists:el,TabsMusic:dr},beforeRouteEnter(e,t,n){Np.load(e).then(r=>{n(o=>Np.set(o,r))})},data(){return{artists_list:new Ee,grouping_options:[{id:1,name:this.$t("page.artists.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("page.artists.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}}]}},computed:{artists(){if(!this.artists_list)return[];const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return e.options.filters=[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"],this.artists_list.group(e.options),this.artists_list},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(ll,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(ki,e)}},selected_grouping_option_id:{get(){return this.$store.state.artists_sort},set(e){this.$store.commit(vh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},HD={class:"fd-page-with-tabs"},UD={class:"columns"},jD={class:"column"},BD=["textContent"],WD={class:"field"},qD={class:"control"},GD=["textContent"],KD=["textContent"],ZD={key:0,class:"field"},YD={class:"control"},XD=["textContent"],JD=["textContent"],QD={class:"column"},e3=["textContent"],t3=["textContent"],n3=["textContent"];function r3(e,t,n,r,o,s){const i=A("tabs-music"),a=A("index-button-list"),l=A("control-dropdown"),u=A("list-artists"),d=A("content-with-heading");return E(),P("div",HD,[v(i),v(d,null,{options:L(()=>[v(a,{indices:s.artists.indices},null,8,["indices"]),c("div",UD,[c("div",jD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,BD),c("div",WD,[c("div",qD,[pt(c("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=m=>s.hide_singles=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_singles]]),c("label",{for:"switchHideSingles",textContent:g(e.$t("page.artists.hide-singles"))},null,8,GD)]),c("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,KD)]),s.spotify_enabled?(E(),P("div",ZD,[c("div",YD,[pt(c("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=m=>s.hide_spotify=m),type:"checkbox",class:"switch is-rounded"},null,512),[[In,s.hide_spotify]]),c("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artists.hide-spotify"))},null,8,XD)]),c("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,JD)])):ee("",!0)]),c("div",QD,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort.title"))},null,8,e3),v(l,{value:s.selected_grouping_option_id,"onUpdate:value":t[2]||(t[2]=m=>s.selected_grouping_option_id=m),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.artists.title"))},null,8,t3),c("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:s.artists.count}))},null,8,n3)]),"heading-right":L(()=>[]),content:L(()=>[v(u,{items:s.artists},null,8,["items"])]),_:1})])}const o3=ie(VD,[["render",r3]]),Dp={load(e){return Promise.all([j.library_album(e.params.id),j.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data)}},s3={name:"PageAudiobooksAlbum",components:{ContentWithHero:Ul,CoverArtwork:xr,ListTracks:mn,ModalDialogAlbum:jl},beforeRouteEnter(e,t,n){Dp.load(e).then(r=>{n(o=>Dp.set(o,r))})},data(){return{album:{},show_details_modal:!1,tracks:new Ee}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){j.player_play_uri(this.album.uri,!1)}}},i3=["textContent"],a3={class:"subtitle is-6 has-text-link"},l3=["textContent"],c3={class:"buttons fd-is-centered-mobile mt-5"},u3=["textContent"],d3=["textContent"];function m3(e,t,n,r,o,s){const i=A("mdicon"),a=A("cover-artwork"),l=A("list-tracks"),u=A("modal-dialog-album"),d=A("content-with-hero");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,i3),c("h2",a3,[c("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...m)=>s.open_artist&&s.open_artist(...m)),textContent:g(o.album.artist)},null,8,l3)]),c("div",c3,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.album.play"))},null,8,u3)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=m=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":L(()=>[v(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=m=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.audiobooks.album.track-count",{count:o.album.track_count}))},null,8,d3),v(l,{items:o.tracks,show_progress:!0,uris:o.album.uri},null,8,["items","uris"]),v(u,{item:o.album,show:o.show_details_modal,media_kind:"audiobook",onClose:t[4]||(t[4]=m=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const f3=ie(s3,[["render",m3]]),p3={name:"TabsAudiobooks"},h3={class:"section fd-tabs-section"},_3={class:"container"},g3={class:"columns is-centered"},y3={class:"column is-four-fifths"},v3={class:"tabs is-centered is-small"},b3=["onClick","onKeypress"],z3=["textContent"],C3=["onClick","onKeypress"],w3=["textContent"],k3=["onClick","onKeypress"],x3=["textContent"];function S3(e,t,n,r,o,s){const i=A("mdicon"),a=A("router-link");return E(),P("section",h3,[c("div",_3,[c("div",g3,[c("div",y3,[c("div",v3,[c("ul",null,[v(a,{to:{name:"audiobooks-artists"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"account-music",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.audiobooks.tabs.authors"))},null,8,z3)],40,b3)],2)]),_:1}),v(a,{to:{name:"audiobooks-albums"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"album",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,w3)],40,C3)],2)]),_:1}),v(a,{to:{name:"audiobooks-genres"},custom:""},{default:L(({navigate:l,isActive:u})=>[c("li",{class:ze({"is-active":u})},[c("a",{onClick:l,onKeypress:sn(l,["enter"])},[v(i,{class:"icon is-small",name:"speaker",size:"16"}),c("span",{class:"is-hidden-mobile",textContent:g(e.$t("page.audiobooks.tabs.genres"))},null,8,x3)],40,k3)],2)]),_:1})])])])])])])}const Zd=ie(p3,[["render",S3]]),Rp={load(e){return j.library_albums("audiobook")},set(e,t){e.albums=new Ee(t.data,{index:{field:"name_sort",type:String}})}},E3={name:"PageAudiobooksAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListAlbums:bn,TabsAudiobooks:Zd},beforeRouteEnter(e,t,n){Rp.load(e).then(r=>{n(o=>Rp.set(o,r))})},data(){return{albums:new Ee}}},$3={class:"fd-page-with-tabs"},T3=["textContent"],A3=["textContent"];function O3(e,t,n,r,o,s){const i=A("tabs-audiobooks"),a=A("index-button-list"),l=A("list-albums"),u=A("content-with-heading");return E(),P("div",$3,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.albums.title"))},null,8,T3),c("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:o.albums.count}))},null,8,A3)]),content:L(()=>[v(l,{items:o.albums},null,8,["items"])]),_:1})])}const P3=ie(E3,[["render",O3]]),Mp={load(e){return Promise.all([j.library_artist(e.params.id),j.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new Ee(t[1].data)}},I3={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:bn,ModalDialogArtist:Bl},beforeRouteEnter(e,t,n){Mp.load(e).then(r=>{n(o=>Mp.set(o,r))})},data(){return{albums:new Ee,artist:{},show_details_modal:!1}},methods:{play(){j.player_play_uri(this.albums.items.map(e=>e.uri).join(),!1)}}},L3=["textContent"],N3={class:"buttons is-centered"},D3=["textContent"],R3=["textContent"];function M3(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-albums"),l=A("modal-dialog-artist"),u=A("content-with-heading");return E(),P("div",null,[v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.artist.name)},null,8,L3)]),"heading-right":L(()=>[c("div",N3,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.audiobooks.artist.play"))},null,8,D3)])])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.audiobooks.artist.album-count",{count:o.artist.album_count}))},null,8,R3),v(a,{items:o.albums},null,8,["items"]),v(l,{item:o.artist,show:o.show_details_modal,onClose:t[2]||(t[2]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const F3=ie(I3,[["render",M3]]),Fp={load(e){return j.library_artists("audiobook")},set(e,t){e.artists=new Ee(t.data,{index:{field:"name_sort",type:String}})}},V3={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListArtists:el,TabsAudiobooks:Zd},beforeRouteEnter(e,t,n){Fp.load(e).then(r=>{n(o=>Fp.set(o,r))})},data(){return{artists:new Ee}}},H3={class:"fd-page-with-tabs"},U3=["textContent"],j3=["textContent"];function B3(e,t,n,r,o,s){const i=A("tabs-audiobooks"),a=A("index-button-list"),l=A("list-artists"),u=A("content-with-heading");return E(),P("div",H3,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.artists.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.artists.title"))},null,8,U3),c("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,j3)]),"heading-right":L(()=>[]),content:L(()=>[v(l,{items:o.artists},null,8,["items"])]),_:1})])}const W3=ie(V3,[["render",B3]]),q3={name:"ModalDialogGenre",props:{item:{required:!0,type:Object},media_kind:{required:!0,type:String},show:Boolean},emits:["close"],computed:{expression(){return`genre is "${this.item.name}" and media_kind is ${this.media_kind}`}},methods:{open(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.item.name},query:{media_kind:this.media_kind}})},play(){this.$emit("close"),j.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),j.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),j.queue_expression_add_next(this.expression)}}},G3={key:0,class:"modal is-active"},K3={class:"modal-content"},Z3={class:"card"},Y3={class:"card-content"},X3={class:"title is-4"},J3=["textContent"],Q3={class:"content is-small"},eR=["textContent"],tR=["textContent"],nR=["textContent"],rR=["textContent"],oR=["textContent"],sR=["textContent"],iR={class:"card-footer"},aR=["textContent"],lR=["textContent"],cR=["textContent"];function uR(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",G3,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",K3,[c("div",Z3,[c("div",Y3,[c("p",X3,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,J3)]),c("div",Q3,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,eR),c("span",{class:"title is-6",textContent:g(n.item.album_count)},null,8,tR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,nR),c("span",{class:"title is-6",textContent:g(n.item.track_count)},null,8,rR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,oR),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,sR)])])]),c("footer",iR,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add"))},null,8,aR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add-next"))},null,8,lR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.play"))},null,8,cR)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Yd=ie(q3,[["render",uR]]),dR={name:"ListGenres",components:{ModalDialogGenre:Yd},props:{items:{required:!0,type:Object},media_kind:{required:!0,type:String}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},mR={key:0,class:"mt-6 mb-5 py-2"},fR={class:"media-content is-clipped"},pR=["id","textContent"],hR=["onClick"],_R={class:"media-content is-clickable is-clipped"},gR=["textContent"],yR={class:"media-right"},vR=["onClick"];function bR(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-genre");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P(Ce,{key:l.itemId},[l.isItem?(E(),P("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",_R,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,gR)]),c("div",yR,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,vR)])],8,hR)):(E(),P("div",mR,[c("div",fR,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,pR)])]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,media_kind:n.media_kind,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]))],64)}const Y1=ie(dR,[["render",bR]]),Vp={load(e){return j.library_genres("audiobook")},set(e,t){e.genres=new Ee(t.data.genres,{index:{field:"name_sort",type:String}})}},zR={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListGenres:Y1,TabsAudiobooks:Zd},beforeRouteEnter(e,t,n){Vp.load(e).then(r=>{n(o=>Vp.set(o,r))})},data(){return{genres:new Ee}}},CR={class:"fd-page-with-tabs"},wR=["textContent"],kR=["textContent"];function xR(e,t,n,r,o,s){const i=A("tabs-audiobooks"),a=A("index-button-list"),l=A("list-genres"),u=A("content-with-heading");return E(),P("div",CR,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,wR),c("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:o.genres.total}))},null,8,kR)]),content:L(()=>[v(l,{items:o.genres,media_kind:"audiobook"},null,8,["items"])]),_:1})])}const SR=ie(zR,[["render",xR]]),ER={name:"ModalDialogComposer",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.item.name}})},open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.item.name}})},play(){this.$emit("close"),j.player_play_expression(`composer is "${this.item.name}" and media_kind is music`,!1)},queue_add(){this.$emit("close"),j.queue_expression_add(`composer is "${this.item.name}" and media_kind is music`)},queue_add_next(){this.$emit("close"),j.queue_expression_add_next(`composer is "${this.item.name}" and media_kind is music`)}}},$R={key:0,class:"modal is-active"},TR={class:"modal-content"},AR={class:"card"},OR={class:"card-content"},PR={class:"title is-4"},IR=["textContent"],LR=["textContent"],NR=["textContent"],DR=["textContent"],RR=["textContent"],MR=["textContent"],FR=["textContent"],VR={class:"card-footer"},HR=["textContent"],UR=["textContent"],jR=["textContent"];function BR(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",$R,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",TR,[c("div",AR,[c("div",OR,[c("p",PR,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:g(n.item.name)},null,8,IR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,LR),c("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...a)=>s.open_albums&&s.open_albums(...a)),textContent:g(n.item.album_count)},null,8,NR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,DR),c("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...a)=>s.open_tracks&&s.open_tracks(...a)),textContent:g(n.item.track_count)},null,8,RR)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,MR),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,FR)])]),c("footer",VR,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add"))},null,8,HR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add-next"))},null,8,UR)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.play"))},null,8,jR)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Xd=ie(ER,[["render",BR]]),Hp={load(e){return Promise.all([j.library_composer(e.params.name),j.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums=new Ee(t[1].data.albums)}},WR={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:bn,ModalDialogComposer:Xd},beforeRouteEnter(e,t,n){Hp.load(e).then(r=>{n(o=>Hp.set(o,r))})},data(){return{albums:new Ee,composer:{},show_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){j.player_play_expression(`composer is "${this.composer.name}" and media_kind is music`,!0)}}},qR=["textContent"],GR={class:"buttons is-centered"},KR=["textContent"],ZR={class:"heading has-text-centered-mobile"},YR=["textContent"],XR=c("span",null," | ",-1),JR=["textContent"];function QR(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-albums"),l=A("modal-dialog-composer"),u=A("content-with-heading");return E(),P("div",null,[v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.composer.name)},null,8,qR)]),"heading-right":L(()=>[c("div",GR,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,KR)])])]),content:L(()=>[c("p",ZR,[c("span",{textContent:g(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,YR),XR,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>s.open_tracks&&s.open_tracks(...d)),textContent:g(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,JR)]),v(a,{items:o.albums},null,8,["items"]),v(l,{item:o.composer,show:o.show_details_modal,onClose:t[3]||(t[3]=d=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const eM=ie(WR,[["render",QR]]),Up={load(e){return Promise.all([j.library_composer(e.params.name),j.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new Ee(t[1].data.tracks)}},tM={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListTracks:mn,ModalDialogComposer:Xd},beforeRouteEnter(e,t,n){Up.load(e).then(r=>{n(o=>Up.set(o,r))})},data(){return{composer:{},grouping_options:[{id:1,name:this.$t("page.composer.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.composer.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],show_details_modal:!1,tracks_list:new Ee}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},selected_grouping_option_id:{get(){return this.$store.state.composer_tracks_sort},set(e){this.$store.commit(Ch,e)}},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){j.player_play_expression(this.expression,!0)}}},nM={class:"columns"},rM={class:"column"},oM=["textContent"],sM=["textContent"],iM={class:"buttons is-centered"},aM=["textContent"],lM={class:"heading has-text-centered-mobile"},cM=["textContent"],uM=c("span",null," | ",-1),dM=["textContent"];function mM(e,t,n,r,o,s){const i=A("index-button-list"),a=A("control-dropdown"),l=A("mdicon"),u=A("list-tracks"),d=A("modal-dialog-composer"),m=A("content-with-heading");return E(),P("div",null,[v(m,null,{options:L(()=>[v(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",nM,[c("div",rM,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort.title"))},null,8,oM),v(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.composer.name)},null,8,sM)]),"heading-right":L(()=>[c("div",iM,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[v(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[v(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,aM)])])]),content:L(()=>[c("p",lM,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_albums&&s.open_albums(...f)),textContent:g(e.$t("page.composer.album-count",{count:o.composer.album_count}))},null,8,cM),uM,c("span",{textContent:g(e.$t("page.composer.track-count",{count:o.composer.track_count}))},null,8,dM)]),v(u,{items:s.tracks,expression:s.expression},null,8,["items","expression"]),v(d,{item:o.composer,show:o.show_details_modal,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const fM=ie(tM,[["render",mM]]),pM={name:"ListComposers",components:{ModalDialogComposer:Xd},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.selected_item=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},hM={key:0,class:"mt-6 mb-5 py-2"},_M={class:"media-content is-clipped"},gM=["id","textContent"],yM=["onClick"],vM={class:"media-content is-clickable is-clipped"},bM=["textContent"],zM={class:"media-right"},CM=["onClick"];function wM(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-composer");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P(Ce,{key:l.itemId},[l.isItem?(E(),P("div",{key:1,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("div",vM,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,bM)]),c("div",zM,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,CM)])],8,yM)):(E(),P("div",hM,[c("div",_M,[c("span",{id:`index_${l.index}`,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.index)},null,8,gM)])]))],64))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const Lu=ie(pM,[["render",wM]]),jp={load(e){return j.library_composers("music")},set(e,t){e.composers=new Ee(t.data,{index:{field:"name_sort",type:String}})}},kM={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListComposers:Lu,TabsMusic:dr},beforeRouteEnter(e,t,n){jp.load(e).then(r=>{n(o=>jp.set(o,r))})},data(){return{composers:new Ee}}},xM={class:"fd-page-with-tabs"},SM=["textContent"],EM=["textContent"];function $M(e,t,n,r,o,s){const i=A("tabs-music"),a=A("index-button-list"),l=A("list-composers"),u=A("content-with-heading");return E(),P("div",xM,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.composers.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.composers.title"))},null,8,SM),c("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:o.composers.total}))},null,8,EM)]),content:L(()=>[v(l,{items:o.composers},null,8,["items"])]),_:1})])}const TM=ie(kM,[["render",$M]]),AM={name:"ModalDialogDirectory",props:{item:{required:!0,type:String},show:Boolean},emits:["close"],methods:{play(){this.$emit("close"),j.player_play_expression(`path starts with "${this.item}" order by path asc`,!1)},queue_add(){this.$emit("close"),j.queue_expression_add(`path starts with "${this.item}" order by path asc`)},queue_add_next(){this.$emit("close"),j.queue_expression_add_next(`path starts with "${this.item}" order by path asc`)}}},OM={key:0,class:"modal is-active"},PM={class:"modal-content"},IM={class:"card"},LM={class:"card-content"},NM=["textContent"],DM={class:"card-footer"},RM=["textContent"],MM=["textContent"],FM=["textContent"];function VM(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",OM,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",PM,[c("div",IM,[c("div",LM,[c("p",{class:"title is-4",textContent:g(n.item)},null,8,NM)]),c("footer",DM,[c("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add"))},null,8,RM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add-next"))},null,8,MM)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.play"))},null,8,FM)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const X1=ie(AM,[["render",VM]]),HM={name:"ListDirectories",components:{ModalDialogDirectory:X1},props:{items:{required:!0,type:Array}},data(){return{selected_item:"",show_details_modal:!1}},computed:{current(){var e;return((e=this.$route.query)==null?void 0:e.directory)||"/"}},methods:{open(e){this.$router.push({name:"files",query:{directory:e.path}})},open_dialog(e){this.selected_item=e.path,this.show_details_modal=!0},open_parent(){this.current.slice(0,this.current.lastIndexOf("/"))===""||this.$store.state.config.directories.includes(this.current)?this.$router.push({name:"files"}):this.$router.push({name:"files",query:{directory:this.current.slice(0,this.current.lastIndexOf("/"))}})}}},UM={class:"media-left is-clickable"},jM=c("div",{class:"media-content is-clickable is-clipped"},[c("h1",{class:"title is-6"},"..")],-1),BM={class:"media-right"},WM=["onClick"],qM={class:"media-left is-clickable"},GM={class:"media-content is-clickable is-clipped"},KM=["textContent"],ZM=["textContent"],YM={class:"media-right"},XM=["onClick"];function JM(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-directory");return E(),P(Ce,null,[e.$route.query.directory?(E(),P("div",{key:0,class:"media is-align-items-center",onClick:t[0]||(t[0]=l=>s.open_parent())},[c("figure",UM,[v(i,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),jM,c("div",BM,[vt(e.$slots,"actions")])])):ee("",!0),(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P("div",{key:l.path,class:"media is-align-items-center",onClick:u=>s.open(l)},[c("figure",qM,[v(i,{class:"icon",name:"folder",size:"16"})]),c("div",GM,[c("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,KM),c("h2",{class:"subtitle is-7 has-text-grey",textContent:g(l.path)},null,8,ZM)]),c("div",YM,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,XM)])],8,WM))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[1]||(t[1]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const QM=ie(HM,[["render",JM]]),e7={name:"ModalDialogPlaylist",props:{item:{required:!0,type:Object},show:Boolean,uris:{default:"",type:String}},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.item.id}})},play(){this.$emit("close"),j.player_play_uri(this.uris||this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.uris||this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.uris||this.item.uri)}}},t7={key:0,class:"modal is-active"},n7={class:"modal-content"},r7={class:"card"},o7={class:"card-content"},s7={class:"title is-4"},i7=["textContent"],a7={class:"content is-small"},l7=["textContent"],c7=["textContent"],u7=["textContent"],d7=["textContent"],m7={key:0},f7=["textContent"],p7=["textContent"],h7={key:0,class:"card-footer"},_7=["textContent"],g7=["textContent"],y7=["textContent"];function v7(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",t7,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",n7,[c("div",r7,[c("div",o7,[c("p",s7,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,i7)]),c("div",a7,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,l7),c("span",{class:"title is-6",textContent:g(n.item.path)},null,8,c7)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,u7),c("span",{class:"title is-6",textContent:g(e.$t(`playlist.type.${n.item.type}`))},null,8,d7)]),n.item.folder?ee("",!0):(E(),P("p",m7,[c("span",{class:"heading",textContent:g(e.$t("dialog.playlist.tracks"))},null,8,f7),c("span",{class:"title is-6",textContent:g(n.item.item_count)},null,8,p7)]))])]),n.item.folder?ee("",!0):(E(),P("footer",h7,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add"))},null,8,_7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add-next"))},null,8,g7)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.play"))},null,8,y7)])]))])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const J1=ie(e7,[["render",v7]]),b7={name:"ListPlaylists",components:{ModalDialogPlaylist:J1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"},open(e){e.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:e.id}}):this.$router.push({name:"playlist",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},z7=["onClick"],C7={class:"media-left is-clickable"},w7={class:"media-content is-clickable is-clipped"},k7=["textContent"],x7={class:"media-right"},S7=["onClick"];function E7(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-playlist");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P("div",{key:l.itemId,class:"media is-align-items-center",onClick:u=>s.open(l.item)},[c("figure",C7,[v(i,{class:"icon",name:s.icon_name(l.item),size:"16"},null,8,["name"])]),c("div",w7,[c("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,k7)]),c("div",x7,[c("a",{onClick:_t(u=>s.open_dialog(l.item),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,S7)])],8,z7))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const tl=ie(b7,[["render",E7]]),ua={load(e){return e.query.directory?j.library_files(e.query.directory):Promise.resolve()},set(e,t){t?(e.dirs=t.data.directories,e.playlists=new Ee(t.data.playlists),e.tracks=new Ee(t.data.tracks)):(e.$store.state.config.directories?e.dirs=e.$store.state.config.directories.map(n=>({path:n})):j.config().then(n=>{e.dirs=n.data.directories.map(r=>({path:r}))}),e.playlists=new Ee,e.tracks=new Ee)}},$7={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:QM,ListPlaylists:tl,ListTracks:mn,ModalDialogDirectory:X1},beforeRouteEnter(e,t,n){ua.load(e).then(r=>{n(o=>ua.set(o,r))})},beforeRouteUpdate(e,t,n){ua.load(e).then(r=>{ua.set(this,r),n()})},data(){return{dirs:[],playlists:new Ee,show_details_modal:!1,tracks:new Ee}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"},play_expression(){return`path starts with "${this.current_directory}" order by path asc`}},methods:{play(){j.player_play_expression(this.play_expression,!1)}}},T7=["textContent"],A7=["textContent"],O7={class:"buttons is-centered"},P7=["textContent"];function I7(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-directories"),l=A("list-playlists"),u=A("list-tracks"),d=A("modal-dialog-directory"),m=A("content-with-heading");return E(),P("div",null,[v(m,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.files.title"))},null,8,T7),c("p",{class:"title is-7 has-text-grey",textContent:g(s.current_directory)},null,8,A7)]),"heading-right":L(()=>[c("div",O7,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>s.play&&s.play(...f))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.files.play"))},null,8,P7)])])]),content:L(()=>[v(a,{items:o.dirs},null,8,["items"]),v(l,{items:o.playlists},null,8,["items"]),v(u,{expression:s.play_expression,items:o.tracks,show_icon:!0},null,8,["expression","items"]),v(d,{item:s.current_directory,show:o.show_details_modal,onClose:t[2]||(t[2]=f=>o.show_details_modal=!1)},null,8,["item","show"])]),_:1})])}const L7=ie($7,[["render",I7]]),Bp={load(e){return Promise.all([j.library_genre(e.params.name,e.query.media_kind),j.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data.genres.items[0],e.albums=new Ee(t[1].data.albums,{index:{field:"name_sort",type:String}})}},N7={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListAlbums:bn,ModalDialogGenre:Yd},beforeRouteEnter(e,t,n){Bp.load(e).then(r=>{n(o=>Bp.set(o,r))})},data(){return{albums:new Ee,genre:{},media_kind:this.$route.query.media_kind,show_details_modal:!1}},methods:{open_tracks(){this.show_details_modal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){j.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},D7=["textContent"],R7={class:"buttons is-centered"},M7=["textContent"],F7={class:"heading has-text-centered-mobile"},V7=["textContent"],H7=c("span",null," | ",-1),U7=["textContent"];function j7(e,t,n,r,o,s){const i=A("index-button-list"),a=A("mdicon"),l=A("list-albums"),u=A("modal-dialog-genre"),d=A("content-with-heading");return E(),P("div",null,[v(d,null,{options:L(()=>[v(i,{indices:o.albums.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.genre.name)},null,8,D7)]),"heading-right":L(()=>[c("div",R7,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_details_modal=!0)},[v(a,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(a,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,M7)])])]),content:L(()=>[c("p",F7,[c("span",{textContent:g(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,V7),H7,c("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>s.open_tracks&&s.open_tracks(...m)),textContent:g(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,U7)]),v(l,{items:o.albums},null,8,["items"]),v(u,{item:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[3]||(t[3]=m=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]),_:1})])}const B7=ie(N7,[["render",j7]]),Wp={load(e){return Promise.all([j.library_genre(e.params.name,e.query.media_kind),j.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data.genres.items[0],e.tracks_list=new Ee(t[1].data.tracks)}},W7={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:Ao,IndexButtonList:Qn,ListTracks:mn,ModalDialogGenre:Yd},beforeRouteEnter(e,t,n){Wp.load(e).then(r=>{n(o=>Wp.set(o,r))})},data(){return{genre:{},grouping_options:[{id:1,name:this.$t("page.genre.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("page.genre.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}],media_kind:this.$route.query.media_kind,show_details_modal:!1,tracks_list:new Ee}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_grouping_option_id:{get(){return this.$store.state.genre_tracks_sort},set(e){this.$store.commit(wh,e)}},tracks(){const e=this.grouping_options.find(t=>t.id===this.selected_grouping_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_genre(){this.show_details_modal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){j.player_play_expression(this.expression,!0)}}},q7={class:"columns"},G7={class:"column"},K7=["textContent"],Z7=["textContent"],Y7={class:"buttons is-centered"},X7=["textContent"],J7={class:"heading has-text-centered-mobile"},Q7=["textContent"],eF=c("span",null," | ",-1),tF=["textContent"];function nF(e,t,n,r,o,s){const i=A("index-button-list"),a=A("control-dropdown"),l=A("mdicon"),u=A("list-tracks"),d=A("modal-dialog-genre"),m=A("content-with-heading");return E(),P("div",null,[v(m,null,{options:L(()=>[v(i,{indices:s.tracks.indices},null,8,["indices"]),c("div",q7,[c("div",G7,[c("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort.title"))},null,8,K7),v(a,{value:s.selected_grouping_option_id,"onUpdate:value":t[0]||(t[0]=f=>s.selected_grouping_option_id=f),options:o.grouping_options},null,8,["value","options"])])])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.genre.name)},null,8,Z7)]),"heading-right":L(()=>[c("div",Y7,[c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[v(l,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>s.play&&s.play(...f))},[v(l,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,X7)])])]),content:L(()=>[c("p",J7,[c("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>s.open_genre&&s.open_genre(...f)),textContent:g(e.$t("page.genre.album-count",{count:o.genre.album_count}))},null,8,Q7),eF,c("span",{textContent:g(e.$t("page.genre.track-count",{count:o.genre.track_count}))},null,8,tF)]),v(u,{items:s.tracks,expression:s.expression},null,8,["items","expression"]),v(d,{item:o.genre,media_kind:o.media_kind,show:o.show_details_modal,onClose:t[4]||(t[4]=f=>o.show_details_modal=!1)},null,8,["item","media_kind","show"])]),_:1})])}const rF=ie(W7,[["render",nF]]),qp={load(e){return j.library_genres("music")},set(e,t){e.genres=new Ee(t.data.genres,{index:{field:"name_sort",type:String}})}},oF={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Qn,ListGenres:Y1,TabsMusic:dr},beforeRouteEnter(e,t,n){qp.load(e).then(r=>{n(o=>qp.set(o,r))})},data(){return{genres:new Ee}}},sF={class:"fd-page-with-tabs"},iF=["textContent"],aF=["textContent"];function lF(e,t,n,r,o,s){const i=A("tabs-music"),a=A("index-button-list"),l=A("list-genres"),u=A("content-with-heading");return E(),P("div",sF,[v(i),v(u,null,{options:L(()=>[v(a,{indices:o.genres.indices},null,8,["indices"])]),"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,iF),c("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:o.genres.total}))},null,8,aF)]),content:L(()=>[v(l,{items:o.genres,media_kind:"music"},null,8,["items"])]),_:1})])}const cF=ie(oF,[["render",lF]]),Gp={load(e){return Promise.all([j.search({expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3,type:"album"}),j.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3,type:"track"})])},set(e,t){e.recently_added=new Ee(t[0].data.albums),e.recently_played=new Ee(t[1].data.tracks)}},uF={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:bn,ListTracks:mn,TabsMusic:dr},beforeRouteEnter(e,t,n){Gp.load(e).then(r=>{n(o=>Gp.set(o,r))})},data(){return{recently_added:[],recently_played:{items:[]},selected_track:{}}}},dF={class:"fd-page-with-tabs"},mF=["textContent"],fF={class:"level"},pF={class:"level-item"},hF=["textContent"],_F={class:"level"},gF={class:"level-item"};function yF(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-albums"),l=A("router-link"),u=A("content-with-heading"),d=A("list-tracks");return E(),P("div",dF,[v(i),v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,mF)]),content:L(()=>[v(a,{items:o.recently_added},null,8,["items"])]),footer:L(()=>[c("nav",fF,[c("p",pF,[v(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:L(()=>[xt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,hF)]),content:L(()=>[v(d,{items:o.recently_played},null,8,["items"])]),footer:L(()=>[c("nav",_F,[c("p",gF,[v(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:L(()=>[xt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const vF=ie(uF,[["render",yF]]),Kp={load(e){const t=ht.getters.settings_option_recently_added_limit;return j.search({expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t,type:"album"})},set(e,t){e.recently_added=new Ee(t.data.albums,{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}})}},bF={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,ListAlbums:bn,TabsMusic:dr},beforeRouteEnter(e,t,n){Kp.load(e).then(r=>{n(o=>Kp.set(o,r))})},data(){return{recently_added:new Ee}}},zF={class:"fd-page-with-tabs"},CF=["textContent"];function wF(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-albums"),l=A("content-with-heading");return E(),P("div",zF,[v(i),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,CF)]),content:L(()=>[v(a,{items:o.recently_added},null,8,["items"])]),_:1})])}const kF=ie(bF,[["render",wF]]),Zp={load(e){return j.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50,type:"track"})},set(e,t){e.recently_played=new Ee(t.data.tracks)}},xF={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,ListTracks:mn,TabsMusic:dr},beforeRouteEnter(e,t,n){Zp.load(e).then(r=>{n(o=>Zp.set(o,r))})},data(){return{recently_played:{}}}},SF={class:"fd-page-with-tabs"},EF=["textContent"];function $F(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-tracks"),l=A("content-with-heading");return E(),P("div",SF,[v(i),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,EF)]),content:L(()=>[v(a,{items:o.recently_played},null,8,["items"])]),_:1})])}const TF=ie(xF,[["render",$F]]),AF={name:"ModalDialogPlaylistSpotify",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],methods:{open(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.item.id}})},play(){this.$emit("close"),j.player_play_uri(this.item.uri,!1)},queue_add(){this.$emit("close"),j.queue_add(this.item.uri)},queue_add_next(){this.$emit("close"),j.queue_add_next(this.item.uri)}}},OF={key:0,class:"modal is-active"},PF={class:"modal-content"},IF={class:"card"},LF={class:"card-content"},NF={class:"title is-4"},DF=["textContent"],RF={class:"content is-small"},MF=["textContent"],FF=["textContent"],VF=["textContent"],HF=["textContent"],UF=["textContent"],jF=["textContent"],BF={class:"card-footer"},WF=["textContent"],qF=["textContent"],GF=["textContent"];function KF(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",OF,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",PF,[c("div",IF,[c("div",LF,[c("p",NF,[c("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open&&s.open(...a)),textContent:g(n.item.name)},null,8,DF)]),c("div",RF,[c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,MF),c("span",{class:"title is-6",textContent:g(n.item.owner.display_name)},null,8,FF)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,VF),c("span",{class:"title is-6",textContent:g(n.item.tracks.total)},null,8,HF)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,UF),c("span",{class:"title is-6",textContent:g(n.item.uri)},null,8,jF)])])]),c("footer",BF,[c("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...a)=>s.queue_add&&s.queue_add(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add"))},null,8,WF)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...a)=>s.queue_add_next&&s.queue_add_next(...a))},[v(i,{class:"icon",name:"playlist-play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add-next"))},null,8,qF)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.play"))},null,8,GF)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const Q1=ie(AF,[["render",KF]]),ZF={name:"ListPlaylistsSpotify",components:{ModalDialogPlaylistSpotify:Q1},props:{items:{required:!0,type:Object}},data(){return{selected_item:{},show_details_modal:!1}},methods:{open(e){this.$router.push({name:"playlist-spotify",params:{id:e.id}})},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},YF=["onClick"],XF=["textContent"],JF=["textContent"],QF={class:"media-right"},eV=["onClick"];function tV(e,t,n,r,o,s){const i=A("mdicon"),a=A("modal-dialog-playlist-spotify");return E(),P(Ce,null,[(E(!0),P(Ce,null,Ct(n.items,l=>(E(),P("div",{key:l.id,class:"media is-align-items-center"},[c("div",{class:"media-content is-clickable is-clipped",onClick:u=>s.open(l)},[c("h1",{class:"title is-6",textContent:g(l.name)},null,8,XF),c("h2",{class:"subtitle is-7",textContent:g(l.owner.display_name)},null,8,JF)],8,YF),c("div",QF,[c("a",{onClick:_t(u=>s.open_dialog(l),["prevent","stop"])},[v(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,eV)])]))),128)),(E(),xe(Dn,{to:"#app"},[v(a,{item:o.selected_item,show:o.show_details_modal,onClose:t[0]||(t[0]=l=>o.show_details_modal=!1)},null,8,["item","show"])]))],64)}const nl=ie(ZF,[["render",tV]]),Yp={load(e){return j.spotify().then(({data:t})=>{const n=new Jn;return n.setAccessToken(t.webapi_token),Promise.all([n.getNewReleases({country:t.webapi_country,limit:3}),n.getFeaturedPlaylists({country:t.webapi_country,limit:3})])})},set(e,t){e.new_releases=t[0].albums.items,e.featured_playlists=t[1].playlists.items}},nV={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,ListAlbumsSpotify:wi,ListPlaylistsSpotify:nl,TabsMusic:dr},beforeRouteEnter(e,t,n){Yp.load(e).then(r=>{n(o=>Yp.set(o,r))})},data(){return{featured_playlists:[],new_releases:[]}}},rV={class:"fd-page-with-tabs"},oV=["textContent"],sV={class:"level"},iV={class:"level-item"},aV=["textContent"],lV={class:"level"},cV={class:"level-item"};function uV(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-albums-spotify"),l=A("router-link"),u=A("content-with-heading"),d=A("list-playlists-spotify");return E(),P("div",rV,[v(i),v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,oV)]),content:L(()=>[v(a,{items:o.new_releases},null,8,["items"])]),footer:L(()=>[c("nav",sV,[c("p",iV,[v(l,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:L(()=>[xt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),v(u,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,aV)]),content:L(()=>[v(d,{items:o.featured_playlists},null,8,["items"])]),footer:L(()=>[c("nav",lV,[c("p",cV,[v(l,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:L(()=>[xt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const dV=ie(nV,[["render",uV]]),Xp={load(e){return j.spotify().then(({data:t})=>{const n=new Jn;return n.setAccessToken(t.webapi_token),n.getFeaturedPlaylists({country:t.webapi_country,limit:50})})},set(e,t){e.featured_playlists=t.playlists.items}},mV={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListPlaylistsSpotify:nl,TabsMusic:dr},beforeRouteEnter(e,t,n){Xp.load(e).then(r=>{n(o=>Xp.set(o,r))})},data(){return{featured_playlists:[]}}},fV={class:"fd-page-with-tabs"},pV=["textContent"];function hV(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-playlists-spotify"),l=A("content-with-heading");return E(),P("div",fV,[v(i),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,pV)]),content:L(()=>[v(a,{items:o.featured_playlists},null,8,["items"])]),_:1})])}const _V=ie(mV,[["render",hV]]),Jp={load(e){return j.spotify().then(({data:t})=>{const n=new Jn;return n.setAccessToken(t.webapi_token),n.getNewReleases({country:t.webapi_country,limit:50})})},set(e,t){e.new_releases=t.albums.items}},gV={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,ListAlbumsSpotify:wi,TabsMusic:dr},beforeRouteEnter(e,t,n){Jp.load(e).then(r=>{n(o=>Jp.set(o,r))})},data(){return{new_releases:[]}}},yV={class:"fd-page-with-tabs"},vV=["textContent"];function bV(e,t,n,r,o,s){const i=A("tabs-music"),a=A("list-albums-spotify"),l=A("content-with-heading");return E(),P("div",yV,[v(i),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,vV)]),content:L(()=>[v(a,{items:o.new_releases},null,8,["items"])]),_:1})])}const zV=ie(gV,[["render",bV]]),CV={name:"LyricsPane",data(){return this.lastIndex=-1,this.scrollingTimer=null,this.lastItemId=-1,{autoScrolling:!0}},computed:{is_playing(){return this.player.state==="play"},lyrics(){const e=this.$store.state.lyrics.content,t=[];if(e){const n=/(\[(\d+):(\d+)(?:\.\d+)?\] ?)?(.*)/u;e.split(` `).forEach((r,o)=>{const s=n.exec(r);if(s&&s[4]){const i={text:s[4],time:s[2]*60+Number(s[3])};t.push(i)}}),t.forEach((r,o,s)=>{const a=(o{const d=u.length*a;return l+=d,{duration:d,delay:l,text:u}})})}return t},player(){return this.$store.state.player},verse_index(){if(this.lyrics.length&&this.lyrics[0].time){const e=this.player.item_progress_ms/1e3,t=this.lyrics,n=this.player.item_id!==this.lastItemId,r=this.lastIndex>=0&&this.lastIndexe;if((n||r)&&this.reset_scrolling(),this.lastIndexe||this.lastIndex===t.length-1)return this.lastIndex;if(this.lastIndexe)return this.lastIndex+1;let o=t.length-1,s=0,i=0;for(;i<=o;){s=i+o>>1;const a=t[s],l=t[s+1];if(a.time<=e&&((l==null?void 0:l.time)>e||!l))return s;a.time>1)+(t.offsetHeight>>1)-e.scrollTop})},start_scrolling(e){(e.screenX||e.screenX!==0||e.screenY||e.screenY!==0)&&(this.autoScrolling=!1,this.scrollingTimer&&clearTimeout(this.scrollingTimer),this.scrollingTimer=setTimeout(this.autoScrolling=!0,2e3))}}},wV=["textContent"],kV={key:1};function xV(e,t,n,r,o,s){return E(),P("div",{ref:"lyrics",class:"lyrics",onTouchstart:t[0]||(t[0]=i=>o.autoScrolling=!1),onTouchend:t[1]||(t[1]=i=>o.autoScrolling=!0),onScrollPassive:t[2]||(t[2]=(...i)=>s.start_scrolling&&s.start_scrolling(...i)),onWheelPassive:t[3]||(t[3]=(...i)=>s.start_scrolling&&s.start_scrolling(...i))},[(E(!0),P(Ce,null,Ct(s.lyrics,(i,a)=>(E(),P(Ce,{key:a},[a===s.verse_index?(E(),P("div",{key:0,class:ze({"is-highlighted":s.is_playing})},[(E(!0),P(Ce,null,Ct(i.words,l=>(E(),P("span",{key:l,class:"has-text-weight-bold is-size-5"},[c("span",{style:eo({"animation-duration":`${l.delay}s`}),textContent:g(l.text)},null,12,wV)]))),128))],2)):(E(),P("div",kV,g(i.text),1))],64))),128))],544)}const SV=ie(CV,[["render",xV],["__scopeId","data-v-47753880"]]),EV={name:"ModalDialogQueueItem",props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"){const e=new Jn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{open_album(){this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}}):this.item.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.item.album_id}}):this.item.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.item.album_id}}):this.item.media_kind==="music"&&this.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}}):this.item.media_kind==="music"||this.item.media_kind==="podcast"?this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}}):this.item.media_kind==="audiobook"&&this.$router.push({name:"audiobooks-artist",params:{id:this.item.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{media_kind:this.item.media_kind}})},play(){this.$emit("close"),j.player_play({item_id:this.item.id})},remove(){this.$emit("close"),j.queue_remove(this.item.id)}}},$V={key:0,class:"modal is-active"},TV={class:"modal-content"},AV={class:"card"},OV={class:"card-content"},PV=["textContent"],IV=["textContent"],LV={class:"content is-small"},NV={key:0},DV=["textContent"],RV=["textContent"],MV={key:1},FV=["textContent"],VV=["textContent"],HV={key:2},UV=["textContent"],jV=["textContent"],BV={key:3},WV=["textContent"],qV=["textContent"],GV={key:4},KV=["textContent"],ZV=["textContent"],YV={key:5},XV=["textContent"],JV=["textContent"],QV={key:6},e9=["textContent"],t9=["textContent"],n9=["textContent"],r9=["textContent"],o9=["textContent"],s9={class:"title is-6"},i9=["textContent"],a9={key:7},l9=["textContent"],c9={class:"title is-6"},u9=["textContent"],d9=["textContent"],m9=["textContent"],f9=["textContent"],p9={class:"card-footer"},h9=["textContent"],_9=["textContent"];function g9(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",$V,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",TV,[c("div",AV,[c("div",OV,[c("p",{class:"title is-4",textContent:g(n.item.title)},null,8,PV),c("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,IV),c("div",LV,[n.item.album?(E(),P("p",NV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album"))},null,8,DV),c("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...a)=>s.open_album&&s.open_album(...a)),textContent:g(n.item.album)},null,8,RV)])):ee("",!0),n.item.album_artist?(E(),P("p",MV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album-artist"))},null,8,FV),c("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...a)=>s.open_album_artist&&s.open_album_artist(...a)),textContent:g(n.item.album_artist)},null,8,VV)])):ee("",!0),n.item.composer?(E(),P("p",HV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.composer"))},null,8,UV),c("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,jV)])):ee("",!0),n.item.year?(E(),P("p",BV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.year"))},null,8,WV),c("span",{class:"title is-6",textContent:g(n.item.year)},null,8,qV)])):ee("",!0),n.item.genre?(E(),P("p",GV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.genre"))},null,8,KV),c("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...a)=>s.open_genre&&s.open_genre(...a)),textContent:g(n.item.genre)},null,8,ZV)])):ee("",!0),n.item.disc_number?(E(),P("p",YV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.position"))},null,8,XV),c("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,JV)])):ee("",!0),n.item.length_ms?(E(),P("p",QV,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.duration"))},null,8,e9),c("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,t9)])):ee("",!0),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.path"))},null,8,n9),c("span",{class:"title is-6",textContent:g(n.item.path)},null,8,r9)]),c("p",null,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.type"))},null,8,o9),c("span",s9,[c("span",{textContent:g(`${e.$t(`media.kind.${n.item.media_kind}`)} - ${e.$t(`data.kind.${n.item.data_kind}`)}`)},null,8,i9)])]),n.item.samplerate?(E(),P("p",a9,[c("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.quality"))},null,8,l9),c("span",c9,[c("span",{textContent:g(n.item.type)},null,8,u9),n.item.samplerate?(E(),P("span",{key:0,textContent:g(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,d9)):ee("",!0),n.item.channels?(E(),P("span",{key:1,textContent:g(e.$t("dialog.queue-item.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,m9)):ee("",!0),n.item.bitrate?(E(),P("span",{key:2,textContent:g(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,f9)):ee("",!0)])])):ee("",!0)])]),c("footer",p9,[c("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...a)=>s.remove&&s.remove(...a))},[v(i,{class:"icon",name:"delete",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.remove"))},null,8,h9)]),c("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.play"))},null,8,_9)])])])]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const ev=ie(EV,[["render",g9]]),Nr=1e3,y9={name:"PageNowPlaying",components:{ControlSlider:Rd,CoverArtwork:xr,LyricsPane:SV,ModalDialogQueueItem:ev},data(){return{cursor:Ll,INTERVAL:Nr,interval_id:0,is_dragged:!1,selected_item:{},show_details_modal:!1}},computed:{composer(){return this.settings_option_show_composer_now_playing&&(!this.settings_option_show_composer_for_genre||this.track.genre&&this.settings_option_show_composer_for_genre.toLowerCase().split(",").findIndex(e=>this.track.genre.toLowerCase().indexOf(e.trim())>=0)>=0)?this.track.composer:null},filepath(){return this.settings_option_show_filepath_now_playing?this.track.path:null},is_live(){return this.track.length_ms===0},lyrics_visible(){return this.$store.state.lyrics.pane},player(){return this.$store.state.player},settings_option_show_composer_for_genre(){return this.$store.getters.settings_option_show_composer_for_genre},settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing},settings_option_show_filepath_now_playing(){return this.$store.getters.settings_option_show_filepath_now_playing},track(){return this.$store.getters.now_playing},track_elapsed_time(){return this.$filters.durationInHours(this.track_progress*Nr)},track_progress:{get(){return Math.floor(this.player.item_progress_ms/Nr)},set(e){this.player.item_progress_ms=e*Nr}},track_progress_max(){return this.is_live?1:Math.floor(this.track.length_ms/Nr)},track_total_time(){return this.is_live?this.$t("page.now-playing.live"):this.$filters.durationInHours(this.track.length_ms)}},watch:{player(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Nr))}},created(){j.player_status().then(({data:e})=>{this.$store.commit(Bu,e),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Nr))})},unmounted(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},methods:{end_dragging(){this.is_dragged=!1},open_dialog(e){this.selected_item=e,this.show_details_modal=!0},seek(){this.is_live||j.player_seek_to_pos(this.track_progress*Nr)},start_dragging(){this.is_dragged=!0},tick(){this.is_dragged||(this.track_progress+=1)}}},v9={class:"hero is-full-height"},b9={key:0,class:"hero-body is-flex is-align-items-center"},z9={class:"container has-text-centered",style:{"max-width":"500px"}},C9={class:"is-flex is-justify-content-space-between"},w9=["textContent"],k9=["textContent"],x9=["textContent"],S9=["textContent"],E9=["textContent"],$9=["textContent"],T9=["textContent"],A9={key:1,class:"hero-body is-flex is-align-items-center"},O9={class:"container has-text-centered"},P9=["textContent"],I9=["textContent"];function L9(e,t,n,r,o,s){const i=A("cover-artwork"),a=A("lyrics-pane"),l=A("control-slider"),u=A("modal-dialog-queue-item");return E(),P("div",v9,[s.track.id>0?(E(),P("div",b9,[c("div",z9,[v(i,{artwork_url:s.track.artwork_url,artist:s.track.artist,album:s.track.album,class:ze(["is-clickable fd-has-shadow fd-cover-big-image",{"is-masked":s.lyrics_visible}]),onClick:t[0]||(t[0]=d=>s.open_dialog(s.track))},null,8,["artwork_url","artist","album","class"]),s.lyrics_visible?(E(),xe(a,{key:0})):ee("",!0),v(l,{value:s.track_progress,"onUpdate:value":t[1]||(t[1]=d=>s.track_progress=d),class:"mt-5",disabled:s.is_live,max:s.track_progress_max,cursor:o.cursor,onChange:s.seek,onMousedown:s.start_dragging,onMouseup:s.end_dragging},null,8,["value","disabled","max","cursor","onChange","onMousedown","onMouseup"]),c("div",C9,[c("p",{class:"subtitle is-7",textContent:g(s.track_elapsed_time)},null,8,w9),c("p",{class:"subtitle is-7",textContent:g(s.track_total_time)},null,8,k9)]),c("p",{class:"title is-5",textContent:g(s.track.title)},null,8,x9),c("p",{class:"title is-6",textContent:g(s.track.artist)},null,8,S9),s.composer?(E(),P("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:g(s.composer)},null,8,E9)):ee("",!0),s.track.album?(E(),P("p",{key:2,class:"subtitle is-6",textContent:g(s.track.album)},null,8,$9)):ee("",!0),s.filepath?(E(),P("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:g(s.filepath)},null,8,T9)):ee("",!0)])])):(E(),P("div",A9,[c("div",O9,[c("p",{class:"title is-5",textContent:g(e.$t("page.now-playing.title"))},null,8,P9),c("p",{class:"subtitle",textContent:g(e.$t("page.now-playing.info"))},null,8,I9)])])),v(u,{show:o.show_details_modal,item:o.selected_item,onClose:t[2]||(t[2]=d=>o.show_details_modal=!1)},null,8,["show","item"])])}const N9=ie(y9,[["render",L9]]),da={load(e){return Promise.all([j.library_playlist(e.params.id),j.library_playlist_folder(e.params.id)])},set(e,t){e.playlist=t[0].data,e.playlists_list=new Ee(t[1].data)}},D9={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:tl},beforeRouteEnter(e,t,n){da.load(e).then(r=>{n(o=>da.set(o,r))})},beforeRouteUpdate(e,t,n){da.load(e).then(r=>{da.set(this,r),n()})},data(){return{playlist:{},playlists_list:new Ee}},computed:{playlists(){return this.playlists_list.group({filters:[e=>e.folder||this.radio_playlists||e.stream_count===0||e.item_count>e.stream_count]}),this.playlists_list},radio_playlists(){return this.$store.state.config.radio_playlists}}},R9=["textContent"],M9=["textContent"];function F9(e,t,n,r,o,s){const i=A("list-playlists"),a=A("content-with-heading");return E(),P("div",null,[v(a,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(o.playlist.id===0?e.$t("page.playlists.title"):o.playlist.name)},null,8,R9),c("p",{class:"heading",textContent:g(e.$t("page.playlists.count",{count:s.playlists.count}))},null,8,M9)]),content:L(()=>[v(i,{items:s.playlists},null,8,["items"])]),_:1})])}const V9=ie(D9,[["render",F9]]),Qp={load(e){return Promise.all([j.library_playlist(e.params.id),j.library_playlist_tracks(e.params.id)])},set(e,t){e.playlist=t[0].data,e.tracks=new Ee(t[1].data)}},H9={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:mn,ModalDialogPlaylist:J1},beforeRouteEnter(e,t,n){Qp.load(e).then(r=>{n(o=>Qp.set(o,r))})},data(){return{playlist:{},show_details_modal:!1,tracks:new Ee}},computed:{uris(){return this.playlist.random?this.tracks.map(e=>e.uri).join():this.playlist.uri}},methods:{play(){j.player_play_uri(this.uris,!0)}}},U9=["textContent"],j9={class:"buttons is-centered"},B9=["textContent"],W9=["textContent"];function q9(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-tracks"),l=A("modal-dialog-playlist"),u=A("content-with-heading");return E(),P("div",null,[v(u,null,{"heading-left":L(()=>[c("div",{class:"title is-4",textContent:g(o.playlist.name)},null,8,U9)]),"heading-right":L(()=>[c("div",j9,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>s.play&&s.play(...d))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.playlist.shuffle"))},null,8,B9)])])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.playlist.track-count",{count:o.tracks.count}))},null,8,W9),v(a,{items:o.tracks,uris:s.uris},null,8,["items","uris"]),v(l,{item:o.playlist,show:o.show_details_modal,uris:s.uris,onClose:t[2]||(t[2]=d=>o.show_details_modal=!1)},null,8,["item","show","uris"])]),_:1})])}const G9=ie(H9,[["render",q9]]),Nu=50,eh={load(e){const t=new Jn;return t.setAccessToken(ht.state.spotify.webapi_token),Promise.all([t.getPlaylist(e.params.id),t.getPlaylistTracks(e.params.id,{limit:Nu,market:ht.state.spotify.webapi_country,offset:0})])},set(e,t){e.playlist=t[0],e.tracks=[],e.total=0,e.offset=0,e.append_tracks(t[1])}},K9={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListTracksSpotify:Qa,ModalDialogPlaylistSpotify:Q1,VueEternalLoading:Kd},beforeRouteEnter(e,t,n){eh.load(e).then(r=>{n(o=>eh.set(o,r))})},data(){return{offset:0,playlist:{tracks:{}},show_playlist_details_modal:!1,total:0,tracks:[]}},methods:{append_tracks(e){let t=Math.max(-1,...this.tracks.map(n=>n.position).filter(n=>n));e.items.forEach(n=>{const{track:r}=n;r&&(r.is_playable&&(r.position=++t),this.tracks.push(r))}),this.total=e.total,this.offset+=e.limit},load_next({loaded:e}){const t=new Jn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getPlaylistTracks(this.playlist.id,{limit:Nu,market:ht.state.spotify.webapi_country,offset:this.offset}).then(n=>{this.append_tracks(n),e(n.items.length,Nu)})},play(){this.show_details_modal=!1,j.player_play_uri(this.playlist.uri,!0)}}},Z9=["textContent"],Y9={class:"buttons is-centered"},X9=["textContent"],J9=["textContent"],Q9={class:"columns is-centered"},eH={class:"column has-text-centered"};function tH(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-tracks-spotify"),l=A("VueEternalLoading"),u=A("modal-dialog-playlist-spotify"),d=A("content-with-heading");return E(),P("div",null,[v(d,null,{"heading-left":L(()=>[c("div",{class:"title is-4",textContent:g(o.playlist.name)},null,8,Z9)]),"heading-right":L(()=>[c("div",Y9,[c("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>o.show_playlist_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})]),c("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>s.play&&s.play(...m))},[v(i,{class:"icon",name:"shuffle",size:"16"}),c("span",{textContent:g(e.$t("page.spotify.playlist.shuffle"))},null,8,X9)])])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.playlist.count",{count:o.playlist.tracks.total}))},null,8,J9),v(a,{items:o.tracks,context_uri:o.playlist.uri},null,8,["items","context_uri"]),o.offset[c("div",Q9,[c("div",eH,[v(i,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":L(()=>[xt(" ")]),_:1},8,["load"])):ee("",!0),v(u,{item:o.playlist,show:o.show_playlist_details_modal,onClose:t[2]||(t[2]=m=>o.show_playlist_details_modal=!1)},null,8,["item","show"])]),_:1})])}const nH=ie(K9,[["render",tH]]),th={load(e){return Promise.all([j.library_album(e.params.id),j.library_podcast_episodes(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new Ee(t[1].data.tracks)}},rH={name:"PagePodcast",components:{ContentWithHero:Ul,CoverArtwork:xr,ListTracks:mn,ModalDialog:Dd,ModalDialogAlbum:jl},beforeRouteEnter(e,t,n){th.load(e).then(r=>{n(o=>th.set(o,r))})},data(){return{album:{},rss_playlist_to_remove:{},show_details_modal:!1,show_remove_podcast_modal:!1,tracks:new Ee}},methods:{open_remove_podcast_dialog(){j.library_track_playlists(this.tracks.items[0].id).then(({data:e})=>{[this.rss_playlist_to_remove]=e.items.filter(t=>t.type==="rss"),this.show_remove_podcast_modal=!0,this.show_details_modal=!1})},play(){j.player_play_uri(this.album.uri,!1)},reload_tracks(){j.library_podcast_episodes(this.album.id).then(({data:e})=>{this.tracks=new Ee(e.tracks)})},remove_podcast(){this.show_remove_podcast_modal=!1,j.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({name:"podcasts"})})}}},oH=["textContent"],sH=c("h2",{class:"subtitle is-6"}," ",-1),iH={class:"buttons fd-is-centered-mobile mt-5"},aH=["textContent"],lH=["textContent"],cH=["textContent"],uH={class:"is-size-7"},dH=["textContent"],mH=["textContent"];function fH(e,t,n,r,o,s){const i=A("mdicon"),a=A("cover-artwork"),l=A("list-tracks"),u=A("modal-dialog-album"),d=A("modal-dialog"),m=A("content-with-hero");return E(),P("div",null,[v(m,null,{"heading-left":L(()=>[c("h1",{class:"title is-5",textContent:g(o.album.name)},null,8,oH),sH,c("div",iH,[c("a",{class:"button is-small is-dark is-rounded",onClick:t[0]||(t[0]=(...f)=>s.play&&s.play(...f))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{textContent:g(e.$t("page.podcast.play"))},null,8,aH)]),c("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>o.show_details_modal=!0)},[v(i,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":L(()=>[v(a,{artwork_url:o.album.artwork_url,artist:o.album.artist,album:o.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[2]||(t[2]=f=>o.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:L(()=>[c("p",{class:"heading has-text-centered-mobile mt-5",textContent:g(e.$t("page.podcast.track-count",{count:o.album.track_count}))},null,8,lH),v(l,{items:o.tracks,show_progress:!0,onPlayCountChanged:s.reload_tracks},null,8,["items","onPlayCountChanged"]),v(u,{item:o.album,show:o.show_details_modal,media_kind:"podcast",onClose:t[3]||(t[3]=f=>o.show_details_modal=!1),onPlayCountChanged:s.reload_tracks,onRemovePodcast:s.open_remove_podcast_dialog},null,8,["item","show","onPlayCountChanged","onRemovePodcast"]),v(d,{show:o.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[4]||(t[4]=f=>o.show_remove_podcast_modal=!1),onDelete:s.remove_podcast},{"modal-content":L(()=>[c("p",{textContent:g(e.$t("page.podcast.remove-info-1"))},null,8,cH),c("p",uH,[xt(" ("),c("span",{textContent:g(e.$t("page.podcast.remove-info-2"))},null,8,dH),c("b",{textContent:g(o.rss_playlist_to_remove.name)},null,8,mH),xt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]),_:1})])}const pH=ie(rH,[["render",fH]]),hH={name:"ModalDialogAddRss",props:{show:Boolean},emits:["close","podcast-added"],data(){return{disabled:!0,loading:!1,url:""}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,j.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})},check_url(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing}}},_H={key:0,class:"modal is-active"},gH={class:"modal-content"},yH={class:"card-content"},vH=["textContent"],bH={class:"field"},zH={class:"control has-icons-left"},CH=["placeholder","disabled"],wH=["textContent"],kH={key:0,class:"card-footer"},xH={class:"card-footer-item has-text-dark"},SH=["textContent"],EH={key:1,class:"card-footer is-clipped"},$H=["textContent"],TH=["textContent"];function AH(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",_H,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",gH,[c("form",{class:"card",onSubmit:t[5]||(t[5]=_t((...a)=>s.add_stream&&s.add_stream(...a),["prevent"]))},[c("div",yH,[c("p",{class:"title is-4",textContent:g(e.$t("dialog.add.rss.title"))},null,8,vH),c("div",bH,[c("p",zH,[pt(c("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.url=a),class:"input is-shadowless",type:"url",pattern:"http[s]?://.+",required:"",placeholder:e.$t("dialog.add.rss.placeholder"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_url&&s.check_url(...a))},null,40,CH),[[dn,o.url]]),v(i,{class:"icon is-left",name:"rss",size:"16"})]),c("p",{class:"help",textContent:g(e.$t("dialog.add.rss.help"))},null,8,wH)])]),o.loading?(E(),P("footer",kH,[c("a",xH,[v(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.processing"))},null,8,SH)])])):(E(),P("footer",EH,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[v(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.cancel"))},null,8,$H)]),c("a",{class:ze([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[4]||(t[4]=(...a)=>s.add_stream&&s.add_stream(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.add"))},null,8,TH)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const OH=ie(hH,[["render",AH]]),nh={load(e){return Promise.all([j.library_albums("podcast"),j.library_podcasts_new_episodes()])},set(e,t){e.albums=new Ee(t[0].data),e.new_episodes=new Ee(t[1].data.tracks)}},PH={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListAlbums:bn,ListTracks:mn,ModalDialogAddRss:OH},beforeRouteEnter(e,t,n){nh.load(e).then(r=>{n(o=>nh.set(o,r))})},data(){return{albums:[],new_episodes:{items:[]},show_url_modal:!1}},computed:{rss(){return this.$store.state.rss_count}},methods:{mark_all_played(){this.new_episodes.items.forEach(e=>{j.library_track_update(e.id,{play_count:"increment"})}),this.new_episodes.items={}},open_add_podcast_dialog(){this.show_url_modal=!0},reload_new_episodes(){j.library_podcasts_new_episodes().then(({data:e})=>{this.new_episodes=new Ee(e.tracks)})},reload_podcasts(){j.library_albums("podcast").then(({data:e})=>{this.albums=new Ee(e),this.reload_new_episodes()})},update_rss(){this.$store.commit(ju,"rss"),this.$store.commit(xi,!0)}}},IH=["textContent"],LH={class:"buttons is-centered"},NH=["textContent"],DH=["textContent"],RH=["textContent"],MH={class:"buttons is-centered"},FH=["textContent"],VH=["textContent"];function HH(e,t,n,r,o,s){const i=A("mdicon"),a=A("list-tracks"),l=A("content-with-heading"),u=A("list-albums"),d=A("modal-dialog-add-rss");return E(),P("div",null,[o.new_episodes.items.length>0?(E(),xe(l,{key:0},{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.new-episodes"))},null,8,IH)]),"heading-right":L(()=>[c("div",LH,[c("a",{class:"button is-small",onClick:t[0]||(t[0]=(...m)=>s.mark_all_played&&s.mark_all_played(...m))},[v(i,{class:"icon",name:"pencil",size:"16"}),c("span",{textContent:g(e.$t("page.podcasts.mark-all-played"))},null,8,NH)])])]),content:L(()=>[v(a,{items:o.new_episodes,show_progress:!0,onPlayCountChanged:s.reload_new_episodes},null,8,["items","onPlayCountChanged"])]),_:1})):ee("",!0),v(l,null,{"heading-left":L(()=>[c("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.title"))},null,8,DH),c("p",{class:"heading",textContent:g(e.$t("page.podcasts.count",{count:o.albums.total}))},null,8,RH)]),"heading-right":L(()=>[c("div",MH,[s.rss.tracks>0?(E(),P("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...m)=>s.update_rss&&s.update_rss(...m))},[v(i,{class:"icon",name:"refresh",size:"16"}),c("span",{textContent:g(e.$t("page.podcasts.update"))},null,8,FH)])):ee("",!0),c("a",{class:"button is-small",onClick:t[2]||(t[2]=(...m)=>s.open_add_podcast_dialog&&s.open_add_podcast_dialog(...m))},[v(i,{class:"icon",name:"rss",size:"16"}),c("span",{textContent:g(e.$t("page.podcasts.add"))},null,8,VH)])])]),content:L(()=>[v(u,{items:o.albums,onPlayCountChanged:t[3]||(t[3]=m=>s.reload_new_episodes()),onPodcastDeleted:t[4]||(t[4]=m=>s.reload_podcasts())},null,8,["items"]),v(d,{show:o.show_url_modal,onClose:t[5]||(t[5]=m=>o.show_url_modal=!1),onPodcastAdded:t[6]||(t[6]=m=>s.reload_podcasts())},null,8,["show"])]),_:1})])}const UH=ie(PH,[["render",HH]]),jH={name:"ListItemQueueItem",props:{current_position:{required:!0,type:Number},edit_mode:Boolean,item:{required:!0,type:Object},position:{required:!0,type:Number},show_only_next_items:Boolean},computed:{is_next(){return this.current_position<0||this.position>=this.current_position},state(){return this.$store.state.player}},methods:{play(){j.player_play({item_id:this.item.id})}}},BH={key:0,class:"media is-align-items-center"},WH={key:0,class:"media-left"},qH=["textContent"],GH=["textContent"],KH=["textContent"],ZH={class:"media-right"};function YH(e,t,n,r,o,s){const i=A("mdicon");return s.is_next||!n.show_only_next_items?(E(),P("div",BH,[n.edit_mode?(E(),P("div",WH,[v(i,{class:"icon has-text-grey fd-is-movable handle",name:"drag-horizontal",size:"16"})])):ee("",!0),c("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...a)=>s.play&&s.play(...a))},[c("h1",{class:ze(["title is-6",{"has-text-primary":n.item.id===s.state.item_id,"has-text-grey-light":!s.is_next}]),textContent:g(n.item.title)},null,10,qH),c("h2",{class:ze(["subtitle is-7 has-text-weight-bold",{"has-text-primary":n.item.id===s.state.item_id,"has-text-grey-light":!s.is_next,"has-text-grey":s.is_next&&n.item.id!==s.state.item_id}]),textContent:g(n.item.artist)},null,10,GH),c("h2",{class:ze(["subtitle is-7",{"has-text-primary":n.item.id===s.state.item_id,"has-text-grey-light":!s.is_next,"has-text-grey":s.is_next&&n.item.id!==s.state.item_id}]),textContent:g(n.item.album)},null,10,KH)]),c("div",ZH,[vt(e.$slots,"actions")])])):ee("",!0)}const XH=ie(jH,[["render",YH]]),JH={name:"ModalDialogAddUrlStream",props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,url:""}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,j.queue_add(this.url).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})},check_url(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing},play(){this.loading=!0,j.player_play_uri(this.url,!1).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})}}},QH={key:0,class:"modal is-active"},eU={class:"modal-content"},tU={class:"card-content"},nU=["textContent"],rU={class:"field"},oU={class:"control has-icons-left"},sU=["placeholder","disabled"],iU={key:0,class:"card-footer"},aU={class:"card-footer-item has-text-dark"},lU=["textContent"],cU={key:1,class:"card-footer is-clipped"},uU=["textContent"],dU=["textContent"],mU=["textContent"];function fU(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",QH,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",eU,[c("form",{class:"card",onSubmit:t[6]||(t[6]=_t((...a)=>s.play&&s.play(...a),["prevent"]))},[c("div",tU,[c("p",{class:"title is-4",textContent:g(e.$t("dialog.add.stream.title"))},null,8,nU),c("div",rU,[c("p",oU,[pt(c("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.url=a),class:"input is-shadowless",type:"url",pattern:"http[s]?://.+",required:"",placeholder:e.$t("dialog.add.stream.placeholder"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_url&&s.check_url(...a))},null,40,sU),[[dn,o.url]]),v(i,{class:"icon is-left",name:"web",size:"16"})])])]),o.loading?(E(),P("footer",iU,[c("a",aU,[v(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.stream.loading"))},null,8,lU)])])):(E(),P("footer",cU,[c("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[v(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.stream.cancel"))},null,8,uU)]),c("a",{class:ze([{"is-disabled":o.disabled},"card-footer-item has-text-dark"]),onClick:t[4]||(t[4]=(...a)=>s.add_stream&&s.add_stream(...a))},[v(i,{class:"icon",name:"playlist-plus",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.stream.add"))},null,8,dU)],2),c("a",{class:ze([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[5]||(t[5]=(...a)=>s.play&&s.play(...a))},[v(i,{class:"icon",name:"play",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.stream.play"))},null,8,mU)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const pU=ie(JH,[["render",fU]]),hU={name:"ModalDialogPlaylistSave",props:{show:Boolean},emits:["close"],data(){return{disabled:!0,playlist_name:"",loading:!1}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.playlist_name_field.focus()},10))}},methods:{check_name(e){const{validity:t}=e.target;this.disabled=t.patternMismatch||t.valueMissing},save(){this.loading=!0,j.queue_save_playlist(this.playlist_name).then(()=>{this.$emit("close"),this.playlist_name=""}).catch(()=>{this.loading=!1})}}},_U={key:0,class:"modal is-active"},gU={class:"modal-content"},yU={class:"card-content"},vU=["textContent"],bU={class:"field"},zU={class:"control has-icons-left"},CU=["placeholder","disabled"],wU={key:0,class:"card-footer"},kU={class:"card-footer-item has-text-dark"},xU=["textContent"],SU={key:1,class:"card-footer is-clipped"},EU=["textContent"],$U=["textContent"];function TU(e,t,n,r,o,s){const i=A("mdicon");return E(),xe(Nt,{name:"fade"},{default:L(()=>[n.show?(E(),P("div",_U,[c("div",{class:"modal-background",onClick:t[0]||(t[0]=a=>e.$emit("close"))}),c("div",gU,[c("form",{class:"card",onSubmit:t[5]||(t[5]=_t((...a)=>s.save&&s.save(...a),["prevent"]))},[c("div",yU,[c("p",{class:"title is-4",textContent:g(e.$t("dialog.playlist.save.title"))},null,8,vU),c("div",bU,[c("p",zU,[pt(c("input",{ref:"playlist_name_field","onUpdate:modelValue":t[1]||(t[1]=a=>o.playlist_name=a),class:"input is-shadowless",type:"text",pattern:".+",required:"",placeholder:e.$t("dialog.playlist.save.playlist-name"),disabled:o.loading,onInput:t[2]||(t[2]=(...a)=>s.check_name&&s.check_name(...a))},null,40,CU),[[dn,o.playlist_name]]),v(i,{class:"icon is-left",name:"file-music",size:"16"})])])]),o.loading?(E(),P("footer",wU,[c("a",kU,[v(i,{class:"icon",name:"web",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.save.saving"))},null,8,xU)])])):(E(),P("footer",SU,[c("a",{class:"card-footer-item has-text-danger",onClick:t[3]||(t[3]=a=>e.$emit("close"))},[v(i,{class:"icon",name:"cancel",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.save.cancel"))},null,8,EU)]),c("a",{class:ze([{"is-disabled":o.disabled},"card-footer-item has-background-info has-text-white has-text-weight-bold"]),onClick:t[4]||(t[4]=(...a)=>s.save&&s.save(...a))},[v(i,{class:"icon",name:"content-save",size:"16"}),c("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.save.save"))},null,8,$U)],2)]))],32)]),c("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=a=>e.$emit("close"))})])):ee("",!0)]),_:1})}const AU=ie(hU,[["render",TU]]);var tv={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa