From f830949af1e8f95a9680080a982998f66adb5506 Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Tue, 13 May 2025 18:37:26 +0200 Subject: [PATCH] [web] Streamline the name of components --- htdocs/assets/index.js | 8 ++++---- .../components/{HeadingHero.vue => PaneHero.vue} | 2 +- .../components/{HeadingTitle.vue => PaneTitle.vue} | 2 +- web-src/src/pages/PageAbout.vue | 6 +++--- web-src/src/pages/PageAlbum.vue | 6 +++--- web-src/src/pages/PageAlbumSpotify.vue | 6 +++--- web-src/src/pages/PageAlbums.vue | 6 +++--- web-src/src/pages/PageArtist.vue | 8 ++++---- web-src/src/pages/PageArtistSpotify.vue | 6 +++--- web-src/src/pages/PageArtistTracks.vue | 8 ++++---- web-src/src/pages/PageArtists.vue | 6 +++--- web-src/src/pages/PageAudiobooksAlbum.vue | 6 +++--- web-src/src/pages/PageAudiobooksAlbums.vue | 6 +++--- web-src/src/pages/PageAudiobooksArtist.vue | 8 ++++---- web-src/src/pages/PageAudiobooksArtists.vue | 6 +++--- web-src/src/pages/PageAudiobooksGenres.vue | 6 +++--- web-src/src/pages/PageComposerAlbums.vue | 6 +++--- web-src/src/pages/PageComposerTracks.vue | 6 +++--- web-src/src/pages/PageComposers.vue | 6 +++--- web-src/src/pages/PageFiles.vue | 6 +++--- web-src/src/pages/PageGenreAlbums.vue | 6 +++--- web-src/src/pages/PageGenreTracks.vue | 6 +++--- web-src/src/pages/PageGenres.vue | 6 +++--- web-src/src/pages/PageMusic.vue | 10 ++++------ web-src/src/pages/PageMusicRecentlyAdded.vue | 8 +++----- web-src/src/pages/PageMusicRecentlyPlayed.vue | 6 +++--- web-src/src/pages/PageMusicSpotify.vue | 10 ++++------ .../pages/PageMusicSpotifyFeaturedPlaylists.vue | 6 +++--- web-src/src/pages/PageMusicSpotifyNewReleases.vue | 6 +++--- web-src/src/pages/PagePlaylistFolder.vue | 6 +++--- web-src/src/pages/PagePlaylistTracks.vue | 6 +++--- web-src/src/pages/PagePlaylistTracksSpotify.vue | 6 +++--- web-src/src/pages/PagePodcast.vue | 6 +++--- web-src/src/pages/PagePodcasts.vue | 8 ++++---- web-src/src/pages/PageQueue.vue | 6 +++--- web-src/src/pages/PageRadioStreams.vue | 6 +++--- web-src/src/pages/PageSearchLibrary.vue | 6 +++--- web-src/src/pages/PageSearchSpotify.vue | 6 +++--- web-src/src/pages/PageSettingsArtwork.vue | 6 +++--- web-src/src/pages/PageSettingsDevices.vue | 10 ++++------ web-src/src/pages/PageSettingsOnlineServices.vue | 8 ++++---- web-src/src/pages/PageSettingsWebinterface.vue | 14 ++++++-------- 42 files changed, 134 insertions(+), 144 deletions(-) rename web-src/src/components/{HeadingHero.vue => PaneHero.vue} (96%) rename web-src/src/components/{HeadingTitle.vue => PaneTitle.vue} (96%) diff --git a/htdocs/assets/index.js b/htdocs/assets/index.js index 97a22735..28f8ae42 100644 --- a/htdocs/assets/index.js +++ b/htdocs/assets/index.js @@ -67,7 +67,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const no=typeof document<"u";function tS(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function IL(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&tS(t.default)}const ye=Object.assign;function ef(t,e){const n={};for(const s in e){const i=e[s];n[s]=Ds(i)?i.map(t):t(i)}return n}const Ea=()=>{},Ds=Array.isArray,eS=/#/g,PL=/&/g,NL=/\//g,DL=/=/g,ML=/\?/g,nS=/\+/g,RL=/%5B/g,LL=/%5D/g,sS=/%5E/g,$L=/%60/g,iS=/%7B/g,FL=/%7C/g,rS=/%7D/g,VL=/%20/g;function rm(t){return encodeURI(""+t).replace(FL,"|").replace(RL,"[").replace(LL,"]")}function HL(t){return rm(t).replace(iS,"{").replace(rS,"}").replace(sS,"^")}function wh(t){return rm(t).replace(nS,"%2B").replace(VL,"+").replace(eS,"%23").replace(PL,"%26").replace($L,"`").replace(iS,"{").replace(rS,"}").replace(sS,"^")}function UL(t){return wh(t).replace(DL,"%3D")}function jL(t){return rm(t).replace(eS,"%23").replace(ML,"%3F")}function BL(t){return t==null?"":jL(t).replace(NL,"%2F")}function Za(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const WL=/\/$/,GL=t=>t.replace(WL,"");function nf(t,e,n="/"){let s,i={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(s=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),i=t(r)),a>-1&&(s=s||e.slice(0,a),o=e.slice(a,e.length)),s=XL(s??e,n),{fullPath:s+(r&&"?")+r+o,path:s,query:i,hash:Za(o)}}function KL(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Yy(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function zL(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&xo(e.matched[s],n.matched[i])&&oS(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function xo(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function oS(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!qL(t[n],e[n]))return!1;return!0}function qL(t,e){return Ds(t)?Zy(t,e):Ds(e)?Zy(e,t):t===e}function Zy(t,e){return Ds(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function XL(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let r=n.length-1,o,a;for(o=0;o1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(o).join("/")}const xi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ja;(function(t){t.pop="pop",t.push="push"})(Ja||(Ja={}));var wa;(function(t){t.back="back",t.forward="forward",t.unknown=""})(wa||(wa={}));function YL(t){if(!t)if(no){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),GL(t)}const ZL=/^[^#]+#/;function JL(t,e){return t.replace(ZL,"#")+e}function QL(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const dd=()=>({left:window.scrollX,top:window.scrollY});function t4(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=QL(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function Jy(t,e){return(history.state?history.state.position-e:-1)+t}const kh=new Map;function e4(t,e){kh.set(t,e)}function n4(t){const e=kh.get(t);return kh.delete(t),e}let s4=()=>location.protocol+"//"+location.host;function aS(t,e){const{pathname:n,search:s,hash:i}=e,r=t.indexOf("#");if(r>-1){let a=i.includes(t.slice(r))?t.slice(r).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),Yy(l,"")}return Yy(n,t)+s+i}function i4(t,e,n,s){let i=[],r=[],o=null;const a=({state:f})=>{const h=aS(t,location),p=n.value,m=e.value;let b=0;if(f){if(n.value=h,e.value=f,o&&o===p){o=null;return}b=m?f.position-m.position:0}else s(h);i.forEach(y=>{y(n.value,p,{delta:b,type:Ja.pop,direction:b?b>0?wa.forward:wa.back:wa.unknown})})};function l(){o=n.value}function c(f){i.push(f);const h=()=>{const p=i.indexOf(f);p>-1&&i.splice(p,1)};return r.push(h),h}function u(){const{history:f}=window;f.state&&f.replaceState(ye({},f.state,{scroll:dd()}),"")}function d(){for(const f of r)f();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Qy(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?dd():null}}function r4(t){const{history:e,location:n}=window,s={value:aS(t,n)},i={value:e.state};i.value||r(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:s4()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),i.value=c}catch(h){console.error(h),n[u?"replace":"assign"](f)}}function o(l,c){const u=ye({},e.state,Qy(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});r(l,u,!0),s.value=l}function a(l,c){const u=ye({},i.value,e.state,{forward:l,scroll:dd()});r(u.current,u,!0);const d=ye({},Qy(s.value,l,null),{position:u.position+1},c);r(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:o}}function o4(t){t=YL(t);const e=r4(t),n=i4(t,e.state,e.location,e.replace);function s(r,o=!0){o||n.pauseListeners(),history.go(r)}const i=ye({location:"",base:t,go:s,createHref:JL.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function a4(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),o4(t)}function l4(t){return typeof t=="string"||t&&typeof t=="object"}function lS(t){return typeof t=="string"||typeof t=="symbol"}const cS=Symbol("");var tb;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(tb||(tb={}));function Io(t,e){return ye(new Error,{type:t,[cS]:!0},e)}function ei(t,e){return t instanceof Error&&cS in t&&(e==null||!!(t.type&e))}const eb="[^/]+?",c4={sensitive:!1,strict:!1,start:!0,end:!0},u4=/[.+*?^${}()[\]/\\]/g;function d4(t,e){const n=ye({},c4,e),s=[];let i=n.start?"^":"";const r=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function uS(t,e){let n=0;const s=t.score,i=e.score;for(;n0&&e[e.length-1]<0}const h4={type:0,value:""},p4=/[a-zA-Z0-9_]/;function m4(t){if(!t)return[[]];if(t==="/")return[[h4]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=0,s=n;const i=[];let r;function o(){r&&i.push(r),r=[]}let a=0,l,c="",u="";function d(){c&&(n===0?r.push({type:0,value:c}):n===1||n===2||n===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a{o(g)}:Ea}function o(d){if(lS(d)){const f=s.get(d);f&&(s.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&s.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=_4(d,n);n.splice(f,0,d),d.record.name&&!rb(d)&&s.set(d.record.name,d)}function c(d,f){let h,p={},m,b;if("name"in d&&d.name){if(h=s.get(d.name),!h)throw Io(1,{location:d});b=h.record.name,p=ye(sb(f.params,h.keys.filter(g=>!g.optional).concat(h.parent?h.parent.keys.filter(g=>g.optional):[]).map(g=>g.name)),d.params&&sb(d.params,h.keys.map(g=>g.name))),m=h.stringify(p)}else if(d.path!=null)m=d.path,h=n.find(g=>g.re.test(m)),h&&(p=h.parse(m),b=h.record.name);else{if(h=f.name?s.get(f.name):n.find(g=>g.re.test(f.path)),!h)throw Io(1,{location:d,currentLocation:f});b=h.record.name,p=ye({},f.params,d.params),m=h.stringify(p)}const y=[];let _=h;for(;_;)y.unshift(_.record),_=_.parent;return{name:b,path:m,params:p,matched:y,meta:v4(y)}}t.forEach(d=>r(d));function u(){n.length=0,s.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:i}}function sb(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function ib(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:b4(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function b4(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const s in t.components)e[s]=typeof n=="object"?n[s]:n;return e}function rb(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function v4(t){return t.reduce((e,n)=>ye(e,n.meta),{})}function ob(t,e){const n={};for(const s in t)n[s]=s in e?e[s]:t[s];return n}function _4(t,e){let n=0,s=e.length;for(;n!==s;){const r=n+s>>1;uS(t,e[r])<0?s=r:n=r+1}const i=S4(t);return i&&(s=e.lastIndexOf(i,s-1)),s}function S4(t){let e=t;for(;e=e.parent;)if(dS(e)&&uS(t,e)===0)return e}function dS({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function E4(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;ir&&wh(r)):[s&&wh(s)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function w4(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=Ds(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const k4=Symbol(""),lb=Symbol(""),om=Symbol(""),fS=Symbol(""),Th=Symbol("");function Qo(){let t=[];function e(s){return t.push(s),()=>{const i=t.indexOf(s);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Vi(t,e,n,s,i,r=o=>o()){const o=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((a,l)=>{const c=f=>{f===!1?l(Io(4,{from:n,to:e})):f instanceof Error?l(f):l4(f)?l(Io(2,{from:e,to:f})):(o&&s.enterCallbacks[i]===o&&typeof f=="function"&&o.push(f),a())},u=r(()=>t.call(s&&s.instances[i],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(f=>l(f))})}function sf(t,e,n,s,i=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(tS(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Vi(u,n,s,o,a,i))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=IL(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const h=(d.__vccOpts||d)[e];return h&&Vi(h,n,s,o,a,i)()}))}}return r}function cb(t){const e=cs(om),n=cs(fS),s=tn(()=>{const l=Vn(t.to);return e.resolve(l)}),i=tn(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(xo.bind(null,u));if(f>-1)return f;const h=ub(l[c-2]);return c>1&&ub(u)===h&&d[d.length-1].path!==h?d.findIndex(xo.bind(null,l[c-2])):f}),r=tn(()=>i.value>-1&&x4(n.params,s.value.params)),o=tn(()=>i.value>-1&&i.value===n.matched.length-1&&oS(n.params,s.value.params));function a(l={}){if(O4(l)){const c=e[Vn(t.replace)?"replace":"push"](Vn(t.to)).catch(Ea);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:tn(()=>s.value.href),isActive:r,isExactActive:o,navigate:a}}function T4(t){return t.length===1?t[0]:t}const C4=_i({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:cb,setup(t,{slots:e}){const n=No(cb(t)),{options:s}=cs(om),i=tn(()=>({[db(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[db(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&T4(e.default(n));return t.custom?r:Bs("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),A4=C4;function O4(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function x4(t,e){for(const n in e){const s=e[n],i=t[n];if(typeof s=="string"){if(s!==i)return!1}else if(!Ds(i)||i.length!==s.length||s.some((r,o)=>r!==i[o]))return!1}return!0}function ub(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const db=(t,e,n)=>t??e??n,I4=_i({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=cs(Th),i=tn(()=>t.route||s.value),r=cs(lb,0),o=tn(()=>{let c=Vn(r);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=tn(()=>i.value.matched[o.value]);ga(lb,tn(()=>o.value+1)),ga(k4,a),ga(Th,i);const l=ls();return Zn(()=>[l.value,a.value,t.name],([c,u,d],[f,h,p])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!xo(u,h)||!f)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,d=a.value,f=d&&d.components[u];if(!f)return fb(n.default,{Component:f,route:c});const h=d.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,b=Bs(f,ye({},p,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return fb(n.default,{Component:b,route:c})||b}}});function fb(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const P4=I4;function N4(t){const e=y4(t.routes,t),n=t.parseQuery||E4,s=t.stringifyQuery||ab,i=t.history,r=Qo(),o=Qo(),a=Qo(),l=bu(xi);let c=xi;no&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ef.bind(null,X=>""+X),d=ef.bind(null,BL),f=ef.bind(null,Za);function h(X,dt){let ct,bt;return lS(X)?(ct=e.getRecordMatcher(X),bt=dt):bt=X,e.addRoute(bt,ct)}function p(X){const dt=e.getRecordMatcher(X);dt&&e.removeRoute(dt)}function m(){return e.getRoutes().map(X=>X.record)}function b(X){return!!e.getRecordMatcher(X)}function y(X,dt){if(dt=ye({},dt||l.value),typeof X=="string"){const N=nf(n,X,dt.path),W=e.resolve({path:N.path},dt),nt=i.createHref(N.fullPath);return ye(N,W,{params:f(W.params),hash:Za(N.hash),redirectedFrom:void 0,href:nt})}let ct;if(X.path!=null)ct=ye({},X,{path:nf(n,X.path,dt.path).path});else{const N=ye({},X.params);for(const W in N)N[W]==null&&delete N[W];ct=ye({},X,{params:d(N)}),dt.params=d(dt.params)}const bt=e.resolve(ct,dt),Ht=X.hash||"";bt.params=u(f(bt.params));const Xt=KL(s,ye({},X,{hash:HL(Ht),path:bt.path})),O=i.createHref(Xt);return ye({fullPath:Xt,hash:Ht,query:s===ab?w4(X.query):X.query||{}},bt,{redirectedFrom:void 0,href:O})}function _(X){return typeof X=="string"?nf(n,X,l.value.path):ye({},X)}function g(X,dt){if(c!==X)return Io(8,{from:dt,to:X})}function v(X){return P(X)}function S(X){return v(ye(_(X),{replace:!0}))}function k(X){const dt=X.matched[X.matched.length-1];if(dt&&dt.redirect){const{redirect:ct}=dt;let bt=typeof ct=="function"?ct(X):ct;return typeof bt=="string"&&(bt=bt.includes("?")||bt.includes("#")?bt=_(bt):{path:bt},bt.params={}),ye({query:X.query,hash:X.hash,params:bt.path!=null?{}:X.params},bt)}}function P(X,dt){const ct=c=y(X),bt=l.value,Ht=X.state,Xt=X.force,O=X.replace===!0,N=k(ct);if(N)return P(ye(_(N),{state:typeof N=="object"?ye({},Ht,N.state):Ht,force:Xt,replace:O}),dt||ct);const W=ct;W.redirectedFrom=dt;let nt;return!Xt&&zL(s,bt,ct)&&(nt=Io(16,{to:W,from:bt}),Vt(bt,bt,!0,!1)),(nt?Promise.resolve(nt):D(W,bt)).catch(Q=>ei(Q)?ei(Q,2)?Q:qt(Q):at(Q,W,bt)).then(Q=>{if(Q){if(ei(Q,2))return P(ye({replace:O},_(Q.to),{state:typeof Q.to=="object"?ye({},Ht,Q.to.state):Ht,force:Xt}),dt||W)}else Q=F(W,bt,!0,O,Ht);return j(W,bt,Q),Q})}function R(X,dt){const ct=g(X,dt);return ct?Promise.reject(ct):Promise.resolve()}function T(X){const dt=ve.values().next().value;return dt&&typeof dt.runWithContext=="function"?dt.runWithContext(X):X()}function D(X,dt){let ct;const[bt,Ht,Xt]=D4(X,dt);ct=sf(bt.reverse(),"beforeRouteLeave",X,dt);for(const N of bt)N.leaveGuards.forEach(W=>{ct.push(Vi(W,X,dt))});const O=R.bind(null,X,dt);return ct.push(O),Wt(ct).then(()=>{ct=[];for(const N of r.list())ct.push(Vi(N,X,dt));return ct.push(O),Wt(ct)}).then(()=>{ct=sf(Ht,"beforeRouteUpdate",X,dt);for(const N of Ht)N.updateGuards.forEach(W=>{ct.push(Vi(W,X,dt))});return ct.push(O),Wt(ct)}).then(()=>{ct=[];for(const N of Xt)if(N.beforeEnter)if(Ds(N.beforeEnter))for(const W of N.beforeEnter)ct.push(Vi(W,X,dt));else ct.push(Vi(N.beforeEnter,X,dt));return ct.push(O),Wt(ct)}).then(()=>(X.matched.forEach(N=>N.enterCallbacks={}),ct=sf(Xt,"beforeRouteEnter",X,dt,T),ct.push(O),Wt(ct))).then(()=>{ct=[];for(const N of o.list())ct.push(Vi(N,X,dt));return ct.push(O),Wt(ct)}).catch(N=>ei(N,8)?N:Promise.reject(N))}function j(X,dt,ct){a.list().forEach(bt=>T(()=>bt(X,dt,ct)))}function F(X,dt,ct,bt,Ht){const Xt=g(X,dt);if(Xt)return Xt;const O=dt===xi,N=no?history.state:{};ct&&(bt||O?i.replace(X.fullPath,ye({scroll:O&&N&&N.scroll},Ht)):i.push(X.fullPath,Ht)),l.value=X,Vt(X,dt,ct,O),qt()}let U;function Y(){U||(U=i.listen((X,dt,ct)=>{if(!Se.listening)return;const bt=y(X),Ht=k(bt);if(Ht){P(ye(Ht,{replace:!0,force:!0}),bt).catch(Ea);return}c=bt;const Xt=l.value;no&&e4(Jy(Xt.fullPath,ct.delta),dd()),D(bt,Xt).catch(O=>ei(O,12)?O:ei(O,2)?(P(ye(_(O.to),{force:!0}),bt).then(N=>{ei(N,20)&&!ct.delta&&ct.type===Ja.pop&&i.go(-1,!1)}).catch(Ea),Promise.reject()):(ct.delta&&i.go(-ct.delta,!1),at(O,bt,Xt))).then(O=>{O=O||F(bt,Xt,!1),O&&(ct.delta&&!ei(O,8)?i.go(-ct.delta,!1):ct.type===Ja.pop&&ei(O,20)&&i.go(-1,!1)),j(bt,Xt,O)}).catch(Ea)}))}let ot=Qo(),G=Qo(),tt;function at(X,dt,ct){qt(X);const bt=G.list();return bt.length?bt.forEach(Ht=>Ht(X,dt,ct)):console.error(X),Promise.reject(X)}function Tt(){return tt&&l.value!==xi?Promise.resolve():new Promise((X,dt)=>{ot.add([X,dt])})}function qt(X){return tt||(tt=!X,Y(),ot.list().forEach(([dt,ct])=>X?ct(X):dt()),ot.reset()),X}function Vt(X,dt,ct,bt){const{scrollBehavior:Ht}=t;if(!no||!Ht)return Promise.resolve();const Xt=!ct&&n4(Jy(X.fullPath,0))||(bt||!ct)&&history.state&&history.state.scroll||null;return $r().then(()=>Ht(X,dt,Xt)).then(O=>O&&t4(O)).catch(O=>at(O,X,dt))}const Bt=X=>i.go(X);let ge;const ve=new Set,Se={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:m,resolve:y,options:t,push:v,replace:S,go:Bt,back:()=>Bt(-1),forward:()=>Bt(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:G.add,isReady:Tt,install(X){const dt=this;X.component("RouterLink",A4),X.component("RouterView",P4),X.config.globalProperties.$router=dt,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Vn(l)}),no&&!ge&&l.value===xi&&(ge=!0,v(i.location).catch(Ht=>{}));const ct={};for(const Ht in xi)Object.defineProperty(ct,Ht,{get:()=>l.value[Ht],enumerable:!0});X.provide(om,dt),X.provide(fS,jh(ct)),X.provide(Th,l);const bt=X.unmount;ve.add(X),X.unmount=function(){ve.delete(X),ve.size<1&&(c=xi,U&&U(),U=null,l.value=xi,ge=!1,tt=!1),bt()}}};function Wt(X){return X.reduce((dt,ct)=>dt.then(()=>T(ct)),Promise.resolve())}return Se}function D4(t,e){const n=[],s=[],i=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oxo(c,a))?s.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>xo(c,l))||i.push(l))}return[n,s,i]}const M4={name:"ContentWithHeading",data(){return{hidden:!0}},computed:{icon(){return this.hidden?"chevron-down":"chevron-up"}}},R4={class:"container"},L4={class:"columns is-centered"},$4={class:"column is-four-fifths"},F4={key:0,class:"my-2"},V4={class:"buttons is-centered"},H4={class:"level is-clipped"},U4={class:"level-left"},j4={class:"level-item has-text-centered-mobile"},B4={key:0,class:"level-right is-flex-shrink-1 has-text-centered-mobile"},W4={class:"buttons"},G4={key:0,class:"is-flex is-justify-content-center mt-4"};function K4(t,e,n,s,i,r){const o=w("mdicon");return x(),$("section",{class:Kt(["section",{"pt-0":t.$slots.options}])},[A("div",R4,[A("div",L4,[A("div",$4,[t.$slots.options?(x(),$("div",F4,[A("div",{class:Kt([{"is-hidden":i.hidden},"mt-4"])},[oe(t.$slots,"options")],2),A("div",V4,[A("button",{class:"button is-small",onClick:e[0]||(e[0]=a=>i.hidden=!i.hidden)},[E(o,{class:"icon",name:r.icon,size:"16"},null,8,["name"])])])])):vt("",!0),A("div",null,[A("nav",H4,[A("div",U4,[A("div",j4,[A("div",null,[oe(t.$slots,"heading")])])]),t.$slots.actions?(x(),$("div",B4,[A("div",W4,[oe(t.$slots,"actions")])])):vt("",!0)]),oe(t.$slots,"content"),t.$slots.footer?(x(),$("div",G4,[oe(t.$slots,"footer")])):vt("",!0)])])])])],2)}const ne=st(M4,[["render",K4]]),z4={name:"ControlButton",props:{button:{required:!0,type:Object}}},q4=["disabled"],X4=["textContent"],Y4=["textContent"];function Z4(t,e,n,s,i,r){const o=w("mdicon");return x(),$("button",{class:"button is-small is-rounded",disabled:n.button.disabled,onClick:e[0]||(e[0]=(...a)=>n.button.handler&&n.button.handler(...a))},[n.button.icon?(x(),gt(o,{key:0,class:"icon",name:n.button.icon,size:"16"},null,8,["name"])):vt("",!0),n.button.key?(x(),$("span",{key:1,textContent:J(t.$t(n.button.key))},null,8,X4)):vt("",!0),n.button.title?(x(),$("span",{key:2,textContent:J(n.button.title)},null,8,Y4)):vt("",!0)],8,q4)}const on=st(z4,[["render",Z4]]),J4={name:"HeadingTitle",props:{content:{required:!0,type:Object}}},Q4=["textContent"],t$={class:"is-size-7 is-uppercase"},e$=["onClick","textContent"],n$=["textContent"],s$={key:2};function i$(t,e,n,s,i,r){return x(),$(it,null,[n.content.title?(x(),$("div",{key:0,class:"title is-4",textContent:J(n.content.title)},null,8,Q4)):vt("",!0),A("div",t$,[(x(!0),$(it,null,ae(n.content.subtitle,(o,a)=>(x(),$(it,{key:a},[o.handler?(x(),$("a",{key:0,onClick:o.handler,textContent:J(t.$t(o.key,{count:t.$n(o.count)},o.count))},null,8,e$)):(x(),$("span",{key:1,textContent:J(t.$t(o.key,{count:t.$n(o.count)},o.count))},null,8,n$)),a!==n.content.subtitle.length-1?(x(),$("span",s$," | ")):vt("",!0)],64))),128))])],64)}const se=st(J4,[["render",i$]]),r$={name:"PageAbout",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se},setup(){return{configurationStore:Vo(),libraryStore:Vu(),uiStore:ts()}},computed:{properties(){return[{key:"property.name",value:this.configurationStore.library_name},{key:"property.artists",value:this.$n(this.libraryStore.artists)},{key:"property.albums",value:this.$n(this.libraryStore.albums)},{key:"property.tracks",value:this.$n(this.libraryStore.songs)},{key:"property.playtime",value:this.$formatters.toDuration(this.libraryStore.db_playtime)},{alternate:this.$formatters.toDateTime(this.libraryStore.updated_at),key:"property.updated",value:this.$formatters.toRelativeDuration(this.libraryStore.updated_at)},{alternate:this.$formatters.toDateTime(this.libraryStore.started_at),key:"property.uptime",value:this.$formatters.toDurationToNow(this.libraryStore.started_at)}]}},methods:{openUpdateDialog(){this.uiStore.showUpdateDialog=!0}}},o$=["textContent"],a$={class:"media-right"},l$=["textContent"],c$=["textContent"],u$=["textContent"],d$=["textContent"],f$=["textContent"];function h$(t,e,n,s,i,r){const o=w("heading-title"),a=w("control-button"),l=w("i18n-t"),c=w("content-with-heading");return x(),gt(c,null,{heading:M(()=>[E(o,{content:{title:t.$t("page.about.library")}},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openUpdateDialog,icon:"refresh",key:"page.about.update"},class:Kt({"is-loading":s.libraryStore.updating}),disabled:s.libraryStore.updating},null,8,["button","class","disabled"])]),content:M(()=>[(x(!0),$(it,null,ae(r.properties,u=>(x(),$("div",{key:u.key,class:"media is-align-items-center mb-0"},[A("div",{class:"media-content has-text-weight-bold",textContent:J(t.$t(u.key))},null,8,o$),A("div",a$,[A("span",{textContent:J(u.value)},null,8,l$),u.alternate?(x(),$("span",{key:0,class:"has-text-grey",textContent:J(` (${u.alternate})`)},null,8,c$)):vt("",!0)])]))),128)),A("div",{class:"is-size-7 mt-6",textContent:J(t.$t("page.about.version",{version:s.configurationStore.version}))},null,8,u$),A("div",{class:"is-size-7",textContent:J(t.$t("page.about.compiled-with",{options:s.configurationStore.buildoptions.join(", ")}))},null,8,d$),E(l,{tag:"div",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:M(()=>e[0]||(e[0]=[A("a",{href:"https://bulma.io"},"Bulma",-1)])),mdi:M(()=>e[1]||(e[1]=[A("a",{href:"https://pictogrammers.com/library/mdi/"}," Material Design Icons ",-1)])),vuejs:M(()=>e[2]||(e[2]=[A("a",{href:"https://vuejs.org/"},"Vue.js",-1)])),axios:M(()=>e[3]||(e[3]=[A("a",{href:"https://github.com/axios/axios"},"axios",-1)])),others:M(()=>[A("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:J(t.$t("page.about.more"))},null,8,f$)]),_:1})]),_:1})}const p$=st(r$,[["render",h$]]),m$={name:"ContentWithHero"},g$={class:"section"},y$={class:"container"},b$={class:"columns is-centered"},v$={class:"column is-four-fifths"},_$={class:"columns is-flex-direction-row-reverse"},S$={class:"column is-flex has-image"},E$={class:"column m-auto is-three-fifths has-text-centered-mobile"},w$={class:"section pt-0"},k$={class:"container"},T$={class:"columns is-centered"},C$={class:"column is-four-fifths"};function A$(t,e,n,s,i,r){return x(),$(it,null,[A("section",g$,[A("div",y$,[A("div",b$,[A("div",v$,[A("div",_$,[A("div",S$,[oe(t.$slots,"image",{},void 0,!0)]),A("div",E$,[oe(t.$slots,"heading",{},void 0,!0)])])])])])]),A("section",w$,[A("div",k$,[A("div",T$,[A("div",C$,[oe(t.$slots,"content",{},void 0,!0),oe(t.$slots,"footer",{},void 0,!0)])])])])],64)}const fd=st(m$,[["render",A$],["__scopeId","data-v-9f80a063"]]),O$=t=>{let e=0;for(const n of t)e=n.charCodeAt(0)+((e<<5)-e);return(e&16777215).toString(16)},x$=t=>[.2126,.7152,.0722].reduce((e,n,s)=>e+ +`0x${t.slice(s*2,s*2+2)}`*n,0)/255,I$=t=>{const e=O$(t.alternate),n=`{},Ds=Array.isArray,eS=/#/g,PL=/&/g,NL=/\//g,DL=/=/g,ML=/\?/g,nS=/\+/g,RL=/%5B/g,LL=/%5D/g,sS=/%5E/g,$L=/%60/g,iS=/%7B/g,FL=/%7C/g,rS=/%7D/g,VL=/%20/g;function rm(t){return encodeURI(""+t).replace(FL,"|").replace(RL,"[").replace(LL,"]")}function HL(t){return rm(t).replace(iS,"{").replace(rS,"}").replace(sS,"^")}function wh(t){return rm(t).replace(nS,"%2B").replace(VL,"+").replace(eS,"%23").replace(PL,"%26").replace($L,"`").replace(iS,"{").replace(rS,"}").replace(sS,"^")}function UL(t){return wh(t).replace(DL,"%3D")}function jL(t){return rm(t).replace(eS,"%23").replace(ML,"%3F")}function BL(t){return t==null?"":jL(t).replace(NL,"%2F")}function Za(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const WL=/\/$/,GL=t=>t.replace(WL,"");function nf(t,e,n="/"){let s,i={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(s=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),i=t(r)),a>-1&&(s=s||e.slice(0,a),o=e.slice(a,e.length)),s=XL(s??e,n),{fullPath:s+(r&&"?")+r+o,path:s,query:i,hash:Za(o)}}function KL(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Yy(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function zL(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&xo(e.matched[s],n.matched[i])&&oS(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function xo(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function oS(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!qL(t[n],e[n]))return!1;return!0}function qL(t,e){return Ds(t)?Zy(t,e):Ds(e)?Zy(e,t):t===e}function Zy(t,e){return Ds(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function XL(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let r=n.length-1,o,a;for(o=0;o1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(o).join("/")}const xi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Ja;(function(t){t.pop="pop",t.push="push"})(Ja||(Ja={}));var wa;(function(t){t.back="back",t.forward="forward",t.unknown=""})(wa||(wa={}));function YL(t){if(!t)if(no){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),GL(t)}const ZL=/^[^#]+#/;function JL(t,e){return t.replace(ZL,"#")+e}function QL(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const dd=()=>({left:window.scrollX,top:window.scrollY});function t4(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=QL(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function Jy(t,e){return(history.state?history.state.position-e:-1)+t}const kh=new Map;function e4(t,e){kh.set(t,e)}function n4(t){const e=kh.get(t);return kh.delete(t),e}let s4=()=>location.protocol+"//"+location.host;function aS(t,e){const{pathname:n,search:s,hash:i}=e,r=t.indexOf("#");if(r>-1){let a=i.includes(t.slice(r))?t.slice(r).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),Yy(l,"")}return Yy(n,t)+s+i}function i4(t,e,n,s){let i=[],r=[],o=null;const a=({state:f})=>{const h=aS(t,location),p=n.value,m=e.value;let b=0;if(f){if(n.value=h,e.value=f,o&&o===p){o=null;return}b=m?f.position-m.position:0}else s(h);i.forEach(y=>{y(n.value,p,{delta:b,type:Ja.pop,direction:b?b>0?wa.forward:wa.back:wa.unknown})})};function l(){o=n.value}function c(f){i.push(f);const h=()=>{const p=i.indexOf(f);p>-1&&i.splice(p,1)};return r.push(h),h}function u(){const{history:f}=window;f.state&&f.replaceState(ye({},f.state,{scroll:dd()}),"")}function d(){for(const f of r)f();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Qy(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?dd():null}}function r4(t){const{history:e,location:n}=window,s={value:aS(t,n)},i={value:e.state};i.value||r(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:s4()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),i.value=c}catch(h){console.error(h),n[u?"replace":"assign"](f)}}function o(l,c){const u=ye({},e.state,Qy(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});r(l,u,!0),s.value=l}function a(l,c){const u=ye({},i.value,e.state,{forward:l,scroll:dd()});r(u.current,u,!0);const d=ye({},Qy(s.value,l,null),{position:u.position+1},c);r(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:o}}function o4(t){t=YL(t);const e=r4(t),n=i4(t,e.state,e.location,e.replace);function s(r,o=!0){o||n.pauseListeners(),history.go(r)}const i=ye({location:"",base:t,go:s,createHref:JL.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function a4(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),o4(t)}function l4(t){return typeof t=="string"||t&&typeof t=="object"}function lS(t){return typeof t=="string"||typeof t=="symbol"}const cS=Symbol("");var tb;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(tb||(tb={}));function Io(t,e){return ye(new Error,{type:t,[cS]:!0},e)}function ei(t,e){return t instanceof Error&&cS in t&&(e==null||!!(t.type&e))}const eb="[^/]+?",c4={sensitive:!1,strict:!1,start:!0,end:!0},u4=/[.+*?^${}()[\]/\\]/g;function d4(t,e){const n=ye({},c4,e),s=[];let i=n.start?"^":"";const r=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function uS(t,e){let n=0;const s=t.score,i=e.score;for(;n0&&e[e.length-1]<0}const h4={type:0,value:""},p4=/[a-zA-Z0-9_]/;function m4(t){if(!t)return[[]];if(t==="/")return[[h4]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=0,s=n;const i=[];let r;function o(){r&&i.push(r),r=[]}let a=0,l,c="",u="";function d(){c&&(n===0?r.push({type:0,value:c}):n===1||n===2||n===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a{o(g)}:Ea}function o(d){if(lS(d)){const f=s.get(d);f&&(s.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&s.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=_4(d,n);n.splice(f,0,d),d.record.name&&!rb(d)&&s.set(d.record.name,d)}function c(d,f){let h,p={},m,b;if("name"in d&&d.name){if(h=s.get(d.name),!h)throw Io(1,{location:d});b=h.record.name,p=ye(sb(f.params,h.keys.filter(g=>!g.optional).concat(h.parent?h.parent.keys.filter(g=>g.optional):[]).map(g=>g.name)),d.params&&sb(d.params,h.keys.map(g=>g.name))),m=h.stringify(p)}else if(d.path!=null)m=d.path,h=n.find(g=>g.re.test(m)),h&&(p=h.parse(m),b=h.record.name);else{if(h=f.name?s.get(f.name):n.find(g=>g.re.test(f.path)),!h)throw Io(1,{location:d,currentLocation:f});b=h.record.name,p=ye({},f.params,d.params),m=h.stringify(p)}const y=[];let _=h;for(;_;)y.unshift(_.record),_=_.parent;return{name:b,path:m,params:p,matched:y,meta:v4(y)}}t.forEach(d=>r(d));function u(){n.length=0,s.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:i}}function sb(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function ib(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:b4(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function b4(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const s in t.components)e[s]=typeof n=="object"?n[s]:n;return e}function rb(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function v4(t){return t.reduce((e,n)=>ye(e,n.meta),{})}function ob(t,e){const n={};for(const s in t)n[s]=s in e?e[s]:t[s];return n}function _4(t,e){let n=0,s=e.length;for(;n!==s;){const r=n+s>>1;uS(t,e[r])<0?s=r:n=r+1}const i=S4(t);return i&&(s=e.lastIndexOf(i,s-1)),s}function S4(t){let e=t;for(;e=e.parent;)if(dS(e)&&uS(t,e)===0)return e}function dS({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function E4(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;ir&&wh(r)):[s&&wh(s)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function w4(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=Ds(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const k4=Symbol(""),lb=Symbol(""),om=Symbol(""),fS=Symbol(""),Th=Symbol("");function Qo(){let t=[];function e(s){return t.push(s),()=>{const i=t.indexOf(s);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Vi(t,e,n,s,i,r=o=>o()){const o=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((a,l)=>{const c=f=>{f===!1?l(Io(4,{from:n,to:e})):f instanceof Error?l(f):l4(f)?l(Io(2,{from:e,to:f})):(o&&s.enterCallbacks[i]===o&&typeof f=="function"&&o.push(f),a())},u=r(()=>t.call(s&&s.instances[i],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(f=>l(f))})}function sf(t,e,n,s,i=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(tS(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Vi(u,n,s,o,a,i))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=IL(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const h=(d.__vccOpts||d)[e];return h&&Vi(h,n,s,o,a,i)()}))}}return r}function cb(t){const e=cs(om),n=cs(fS),s=tn(()=>{const l=Vn(t.to);return e.resolve(l)}),i=tn(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(xo.bind(null,u));if(f>-1)return f;const h=ub(l[c-2]);return c>1&&ub(u)===h&&d[d.length-1].path!==h?d.findIndex(xo.bind(null,l[c-2])):f}),r=tn(()=>i.value>-1&&x4(n.params,s.value.params)),o=tn(()=>i.value>-1&&i.value===n.matched.length-1&&oS(n.params,s.value.params));function a(l={}){if(O4(l)){const c=e[Vn(t.replace)?"replace":"push"](Vn(t.to)).catch(Ea);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:tn(()=>s.value.href),isActive:r,isExactActive:o,navigate:a}}function T4(t){return t.length===1?t[0]:t}const C4=_i({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:cb,setup(t,{slots:e}){const n=No(cb(t)),{options:s}=cs(om),i=tn(()=>({[db(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[db(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&T4(e.default(n));return t.custom?r:Bs("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),A4=C4;function O4(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function x4(t,e){for(const n in e){const s=e[n],i=t[n];if(typeof s=="string"){if(s!==i)return!1}else if(!Ds(i)||i.length!==s.length||s.some((r,o)=>r!==i[o]))return!1}return!0}function ub(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const db=(t,e,n)=>t??e??n,I4=_i({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=cs(Th),i=tn(()=>t.route||s.value),r=cs(lb,0),o=tn(()=>{let c=Vn(r);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=tn(()=>i.value.matched[o.value]);ga(lb,tn(()=>o.value+1)),ga(k4,a),ga(Th,i);const l=ls();return Zn(()=>[l.value,a.value,t.name],([c,u,d],[f,h,p])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!xo(u,h)||!f)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,d=a.value,f=d&&d.components[u];if(!f)return fb(n.default,{Component:f,route:c});const h=d.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,b=Bs(f,ye({},p,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return fb(n.default,{Component:b,route:c})||b}}});function fb(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const P4=I4;function N4(t){const e=y4(t.routes,t),n=t.parseQuery||E4,s=t.stringifyQuery||ab,i=t.history,r=Qo(),o=Qo(),a=Qo(),l=bu(xi);let c=xi;no&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=ef.bind(null,X=>""+X),d=ef.bind(null,BL),f=ef.bind(null,Za);function h(X,dt){let ct,bt;return lS(X)?(ct=e.getRecordMatcher(X),bt=dt):bt=X,e.addRoute(bt,ct)}function p(X){const dt=e.getRecordMatcher(X);dt&&e.removeRoute(dt)}function m(){return e.getRoutes().map(X=>X.record)}function b(X){return!!e.getRecordMatcher(X)}function y(X,dt){if(dt=ye({},dt||l.value),typeof X=="string"){const N=nf(n,X,dt.path),W=e.resolve({path:N.path},dt),nt=i.createHref(N.fullPath);return ye(N,W,{params:f(W.params),hash:Za(N.hash),redirectedFrom:void 0,href:nt})}let ct;if(X.path!=null)ct=ye({},X,{path:nf(n,X.path,dt.path).path});else{const N=ye({},X.params);for(const W in N)N[W]==null&&delete N[W];ct=ye({},X,{params:d(N)}),dt.params=d(dt.params)}const bt=e.resolve(ct,dt),Ht=X.hash||"";bt.params=u(f(bt.params));const Xt=KL(s,ye({},X,{hash:HL(Ht),path:bt.path})),O=i.createHref(Xt);return ye({fullPath:Xt,hash:Ht,query:s===ab?w4(X.query):X.query||{}},bt,{redirectedFrom:void 0,href:O})}function _(X){return typeof X=="string"?nf(n,X,l.value.path):ye({},X)}function g(X,dt){if(c!==X)return Io(8,{from:dt,to:X})}function v(X){return P(X)}function S(X){return v(ye(_(X),{replace:!0}))}function k(X){const dt=X.matched[X.matched.length-1];if(dt&&dt.redirect){const{redirect:ct}=dt;let bt=typeof ct=="function"?ct(X):ct;return typeof bt=="string"&&(bt=bt.includes("?")||bt.includes("#")?bt=_(bt):{path:bt},bt.params={}),ye({query:X.query,hash:X.hash,params:bt.path!=null?{}:X.params},bt)}}function P(X,dt){const ct=c=y(X),bt=l.value,Ht=X.state,Xt=X.force,O=X.replace===!0,N=k(ct);if(N)return P(ye(_(N),{state:typeof N=="object"?ye({},Ht,N.state):Ht,force:Xt,replace:O}),dt||ct);const W=ct;W.redirectedFrom=dt;let nt;return!Xt&&zL(s,bt,ct)&&(nt=Io(16,{to:W,from:bt}),Vt(bt,bt,!0,!1)),(nt?Promise.resolve(nt):D(W,bt)).catch(Q=>ei(Q)?ei(Q,2)?Q:qt(Q):at(Q,W,bt)).then(Q=>{if(Q){if(ei(Q,2))return P(ye({replace:O},_(Q.to),{state:typeof Q.to=="object"?ye({},Ht,Q.to.state):Ht,force:Xt}),dt||W)}else Q=F(W,bt,!0,O,Ht);return j(W,bt,Q),Q})}function R(X,dt){const ct=g(X,dt);return ct?Promise.reject(ct):Promise.resolve()}function T(X){const dt=ve.values().next().value;return dt&&typeof dt.runWithContext=="function"?dt.runWithContext(X):X()}function D(X,dt){let ct;const[bt,Ht,Xt]=D4(X,dt);ct=sf(bt.reverse(),"beforeRouteLeave",X,dt);for(const N of bt)N.leaveGuards.forEach(W=>{ct.push(Vi(W,X,dt))});const O=R.bind(null,X,dt);return ct.push(O),Wt(ct).then(()=>{ct=[];for(const N of r.list())ct.push(Vi(N,X,dt));return ct.push(O),Wt(ct)}).then(()=>{ct=sf(Ht,"beforeRouteUpdate",X,dt);for(const N of Ht)N.updateGuards.forEach(W=>{ct.push(Vi(W,X,dt))});return ct.push(O),Wt(ct)}).then(()=>{ct=[];for(const N of Xt)if(N.beforeEnter)if(Ds(N.beforeEnter))for(const W of N.beforeEnter)ct.push(Vi(W,X,dt));else ct.push(Vi(N.beforeEnter,X,dt));return ct.push(O),Wt(ct)}).then(()=>(X.matched.forEach(N=>N.enterCallbacks={}),ct=sf(Xt,"beforeRouteEnter",X,dt,T),ct.push(O),Wt(ct))).then(()=>{ct=[];for(const N of o.list())ct.push(Vi(N,X,dt));return ct.push(O),Wt(ct)}).catch(N=>ei(N,8)?N:Promise.reject(N))}function j(X,dt,ct){a.list().forEach(bt=>T(()=>bt(X,dt,ct)))}function F(X,dt,ct,bt,Ht){const Xt=g(X,dt);if(Xt)return Xt;const O=dt===xi,N=no?history.state:{};ct&&(bt||O?i.replace(X.fullPath,ye({scroll:O&&N&&N.scroll},Ht)):i.push(X.fullPath,Ht)),l.value=X,Vt(X,dt,ct,O),qt()}let U;function Y(){U||(U=i.listen((X,dt,ct)=>{if(!Se.listening)return;const bt=y(X),Ht=k(bt);if(Ht){P(ye(Ht,{replace:!0,force:!0}),bt).catch(Ea);return}c=bt;const Xt=l.value;no&&e4(Jy(Xt.fullPath,ct.delta),dd()),D(bt,Xt).catch(O=>ei(O,12)?O:ei(O,2)?(P(ye(_(O.to),{force:!0}),bt).then(N=>{ei(N,20)&&!ct.delta&&ct.type===Ja.pop&&i.go(-1,!1)}).catch(Ea),Promise.reject()):(ct.delta&&i.go(-ct.delta,!1),at(O,bt,Xt))).then(O=>{O=O||F(bt,Xt,!1),O&&(ct.delta&&!ei(O,8)?i.go(-ct.delta,!1):ct.type===Ja.pop&&ei(O,20)&&i.go(-1,!1)),j(bt,Xt,O)}).catch(Ea)}))}let ot=Qo(),G=Qo(),tt;function at(X,dt,ct){qt(X);const bt=G.list();return bt.length?bt.forEach(Ht=>Ht(X,dt,ct)):console.error(X),Promise.reject(X)}function Tt(){return tt&&l.value!==xi?Promise.resolve():new Promise((X,dt)=>{ot.add([X,dt])})}function qt(X){return tt||(tt=!X,Y(),ot.list().forEach(([dt,ct])=>X?ct(X):dt()),ot.reset()),X}function Vt(X,dt,ct,bt){const{scrollBehavior:Ht}=t;if(!no||!Ht)return Promise.resolve();const Xt=!ct&&n4(Jy(X.fullPath,0))||(bt||!ct)&&history.state&&history.state.scroll||null;return $r().then(()=>Ht(X,dt,Xt)).then(O=>O&&t4(O)).catch(O=>at(O,X,dt))}const Bt=X=>i.go(X);let ge;const ve=new Set,Se={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:m,resolve:y,options:t,push:v,replace:S,go:Bt,back:()=>Bt(-1),forward:()=>Bt(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:G.add,isReady:Tt,install(X){const dt=this;X.component("RouterLink",A4),X.component("RouterView",P4),X.config.globalProperties.$router=dt,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Vn(l)}),no&&!ge&&l.value===xi&&(ge=!0,v(i.location).catch(Ht=>{}));const ct={};for(const Ht in xi)Object.defineProperty(ct,Ht,{get:()=>l.value[Ht],enumerable:!0});X.provide(om,dt),X.provide(fS,jh(ct)),X.provide(Th,l);const bt=X.unmount;ve.add(X),X.unmount=function(){ve.delete(X),ve.size<1&&(c=xi,U&&U(),U=null,l.value=xi,ge=!1,tt=!1),bt()}}};function Wt(X){return X.reduce((dt,ct)=>dt.then(()=>T(ct)),Promise.resolve())}return Se}function D4(t,e){const n=[],s=[],i=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oxo(c,a))?s.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>xo(c,l))||i.push(l))}return[n,s,i]}const M4={name:"ContentWithHeading",data(){return{hidden:!0}},computed:{icon(){return this.hidden?"chevron-down":"chevron-up"}}},R4={class:"container"},L4={class:"columns is-centered"},$4={class:"column is-four-fifths"},F4={key:0,class:"my-2"},V4={class:"buttons is-centered"},H4={class:"level is-clipped"},U4={class:"level-left"},j4={class:"level-item has-text-centered-mobile"},B4={key:0,class:"level-right is-flex-shrink-1 has-text-centered-mobile"},W4={class:"buttons"},G4={key:0,class:"is-flex is-justify-content-center mt-4"};function K4(t,e,n,s,i,r){const o=w("mdicon");return x(),$("section",{class:Kt(["section",{"pt-0":t.$slots.options}])},[A("div",R4,[A("div",L4,[A("div",$4,[t.$slots.options?(x(),$("div",F4,[A("div",{class:Kt([{"is-hidden":i.hidden},"mt-4"])},[oe(t.$slots,"options")],2),A("div",V4,[A("button",{class:"button is-small",onClick:e[0]||(e[0]=a=>i.hidden=!i.hidden)},[E(o,{class:"icon",name:r.icon,size:"16"},null,8,["name"])])])])):vt("",!0),A("div",null,[A("nav",H4,[A("div",U4,[A("div",j4,[A("div",null,[oe(t.$slots,"heading")])])]),t.$slots.actions?(x(),$("div",B4,[A("div",W4,[oe(t.$slots,"actions")])])):vt("",!0)]),oe(t.$slots,"content"),t.$slots.footer?(x(),$("div",G4,[oe(t.$slots,"footer")])):vt("",!0)])])])])],2)}const ne=st(M4,[["render",K4]]),z4={name:"ControlButton",props:{button:{required:!0,type:Object}}},q4=["disabled"],X4=["textContent"],Y4=["textContent"];function Z4(t,e,n,s,i,r){const o=w("mdicon");return x(),$("button",{class:"button is-small is-rounded",disabled:n.button.disabled,onClick:e[0]||(e[0]=(...a)=>n.button.handler&&n.button.handler(...a))},[n.button.icon?(x(),gt(o,{key:0,class:"icon",name:n.button.icon,size:"16"},null,8,["name"])):vt("",!0),n.button.key?(x(),$("span",{key:1,textContent:J(t.$t(n.button.key))},null,8,X4)):vt("",!0),n.button.title?(x(),$("span",{key:2,textContent:J(n.button.title)},null,8,Y4)):vt("",!0)],8,q4)}const on=st(z4,[["render",Z4]]),J4={name:"PaneTitle",props:{content:{required:!0,type:Object}}},Q4=["textContent"],t$={class:"is-size-7 is-uppercase"},e$=["onClick","textContent"],n$=["textContent"],s$={key:2};function i$(t,e,n,s,i,r){return x(),$(it,null,[n.content.title?(x(),$("div",{key:0,class:"title is-4",textContent:J(n.content.title)},null,8,Q4)):vt("",!0),A("div",t$,[(x(!0),$(it,null,ae(n.content.subtitle,(o,a)=>(x(),$(it,{key:a},[o.handler?(x(),$("a",{key:0,onClick:o.handler,textContent:J(t.$t(o.key,{count:t.$n(o.count)},o.count))},null,8,e$)):(x(),$("span",{key:1,textContent:J(t.$t(o.key,{count:t.$n(o.count)},o.count))},null,8,n$)),a!==n.content.subtitle.length-1?(x(),$("span",s$," | ")):vt("",!0)],64))),128))])],64)}const se=st(J4,[["render",i$]]),r$={name:"PageAbout",components:{ContentWithHeading:ne,ControlButton:on,PaneTitle:se},setup(){return{configurationStore:Vo(),libraryStore:Vu(),uiStore:ts()}},computed:{properties(){return[{key:"property.name",value:this.configurationStore.library_name},{key:"property.artists",value:this.$n(this.libraryStore.artists)},{key:"property.albums",value:this.$n(this.libraryStore.albums)},{key:"property.tracks",value:this.$n(this.libraryStore.songs)},{key:"property.playtime",value:this.$formatters.toDuration(this.libraryStore.db_playtime)},{alternate:this.$formatters.toDateTime(this.libraryStore.updated_at),key:"property.updated",value:this.$formatters.toRelativeDuration(this.libraryStore.updated_at)},{alternate:this.$formatters.toDateTime(this.libraryStore.started_at),key:"property.uptime",value:this.$formatters.toDurationToNow(this.libraryStore.started_at)}]}},methods:{openUpdateDialog(){this.uiStore.showUpdateDialog=!0}}},o$=["textContent"],a$={class:"media-right"},l$=["textContent"],c$=["textContent"],u$=["textContent"],d$=["textContent"],f$=["textContent"];function h$(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("i18n-t"),c=w("content-with-heading");return x(),gt(c,null,{heading:M(()=>[E(o,{content:{title:t.$t("page.about.library")}},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openUpdateDialog,icon:"refresh",key:"page.about.update"},class:Kt({"is-loading":s.libraryStore.updating}),disabled:s.libraryStore.updating},null,8,["button","class","disabled"])]),content:M(()=>[(x(!0),$(it,null,ae(r.properties,u=>(x(),$("div",{key:u.key,class:"media is-align-items-center mb-0"},[A("div",{class:"media-content has-text-weight-bold",textContent:J(t.$t(u.key))},null,8,o$),A("div",a$,[A("span",{textContent:J(u.value)},null,8,l$),u.alternate?(x(),$("span",{key:0,class:"has-text-grey",textContent:J(` (${u.alternate})`)},null,8,c$)):vt("",!0)])]))),128)),A("div",{class:"is-size-7 mt-6",textContent:J(t.$t("page.about.version",{version:s.configurationStore.version}))},null,8,u$),A("div",{class:"is-size-7",textContent:J(t.$t("page.about.compiled-with",{options:s.configurationStore.buildoptions.join(", ")}))},null,8,d$),E(l,{tag:"div",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:M(()=>e[0]||(e[0]=[A("a",{href:"https://bulma.io"},"Bulma",-1)])),mdi:M(()=>e[1]||(e[1]=[A("a",{href:"https://pictogrammers.com/library/mdi/"}," Material Design Icons ",-1)])),vuejs:M(()=>e[2]||(e[2]=[A("a",{href:"https://vuejs.org/"},"Vue.js",-1)])),axios:M(()=>e[3]||(e[3]=[A("a",{href:"https://github.com/axios/axios"},"axios",-1)])),others:M(()=>[A("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:J(t.$t("page.about.more"))},null,8,f$)]),_:1})]),_:1})}const p$=st(r$,[["render",h$]]),m$={name:"ContentWithHero"},g$={class:"section"},y$={class:"container"},b$={class:"columns is-centered"},v$={class:"column is-four-fifths"},_$={class:"columns is-flex-direction-row-reverse"},S$={class:"column is-flex has-image"},E$={class:"column m-auto is-three-fifths has-text-centered-mobile"},w$={class:"section pt-0"},k$={class:"container"},T$={class:"columns is-centered"},C$={class:"column is-four-fifths"};function A$(t,e,n,s,i,r){return x(),$(it,null,[A("section",g$,[A("div",y$,[A("div",b$,[A("div",v$,[A("div",_$,[A("div",S$,[oe(t.$slots,"image",{},void 0,!0)]),A("div",E$,[oe(t.$slots,"heading",{},void 0,!0)])])])])])]),A("section",w$,[A("div",k$,[A("div",T$,[A("div",C$,[oe(t.$slots,"content",{},void 0,!0),oe(t.$slots,"footer",{},void 0,!0)])])])])],64)}const fd=st(m$,[["render",A$],["__scopeId","data-v-9f80a063"]]),O$=t=>{let e=0;for(const n of t)e=n.charCodeAt(0)+((e<<5)-e);return(e&16777215).toString(16)},x$=t=>[.2126,.7152,.0722].reduce((e,n,s)=>e+ +`0x${t.slice(s*2,s*2+2)}`*n,0)/255,I$=t=>{const e=O$(t.alternate),n=` @@ -76,8 +76,8 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins font-size="${t.size/3}" fill="${x$(e)>.5?"#000000":"#FFFFFF"}"> ${t.caption} - `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`},P$={name:"ControlImage",props:{caption:{default:"",type:String},url:{default:"",type:String}},emits:["click"],data(){return{font:{family:"sans-serif",weight:"bold"},size:600}},computed:{source(){return{src:this.url||this.uri,lifecycle:{error:t=>{t.src=this.uri}}}},uri(){return I$({alternate:this.caption,caption:this.caption.substring(0,2),font:this.font,size:this.size})}}},N$={class:"figure has-shadow"};function D$(t,e,n,s,i,r){const o=Zh("lazy");return x(),$("figure",N$,[Qn(A("img",{onClick:e[0]||(e[0]=a=>t.$emit("click"))},null,512),[[o,r.source]])])}const Hr=st(P$,[["render",D$],["__scopeId","data-v-e61d86e1"]]),{t:Wl,locale:M$}=Fo.global,hS="NO_INDEX",R$=(t,e)=>t-e,L$=(t,e)=>t.localeCompare(e,M$.value),$$=(t,e)=>new Date(t)-new Date(e)||(t?e?0:1:-1),F$=t=>t.map(({field:e,type:n,order:s=1})=>{switch(n){case String:return(i,r)=>L$(i[e],r[e])*s;case Number:return(i,r)=>R$(i[e],r[e])*s;case Date:return(i,r)=>$$(i[e],r[e])*s;default:return()=>0}}),V$=(t="")=>{const e=t.charAt(0);return e.match(new RegExp("\\p{Letter}","gu"))?e.toUpperCase():e.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"},H$=t=>{},U$=[{difference:NaN,text:()=>Wl("grouped-list.undefined")},{difference:864e5,text:()=>Wl("grouped-list.today")},{difference:6048e5,text:()=>Wl("grouped-list.last-week")},{difference:2592e6,text:()=>Wl("grouped-list.last-month")},{difference:1/0,text:t=>t.getFullYear()}],j$=t=>{var s;const e=new Date(t),n=new Date-e;return(s=U$.find(i=>isNaN(n)||n{switch(e){case String:return n=>V$(n[t]);case Number:return n=>n[t];case Date:return n=>j$(n[t]);case"Digits":return n=>H$(n[t]);default:return()=>hS}};class kt{constructor({items:e=[],total:n=0,offset:s=0,limit:i=-1}={},r={}){this.items=e,this.total=n,this.offset=s,this.limit=i,this.count=e.length,this.indices=[],this.group(r)}group({criteria:e=[],filters:n=[],index:s}={}){const i=this.items.filter(l=>n.every(c=>c(l)));this.count=i.length;const r=F$(e),o=i.sort((l,c)=>r.reduce((u,d)=>u||d(l,c),0)),a=B$(s);return this.itemsGrouped=o.reduce((l,c)=>{const u=a(c);return l.set(u,[...l.get(u)||[],c]),l},new Map),this.indices=Array.from(this.itemsGrouped.keys()),this}*generate(){for(const[e,n]of this.itemsGrouped.entries()){e!==hS&&(yield{index:e,isItem:!1,item:{},itemId:e});for(const s of n)yield{index:e,isItem:!0,item:s,itemId:s.id}}}[Symbol.iterator](){return this.generate()}}const W$={name:"HeadingHero",components:{ControlButton:on},props:{content:{required:!0,type:Object}}},G$=["textContent"],K$={class:"subtitle is-6"},z$=["textContent"],q$=["textContent"],X$={class:"buttons is-centered-mobile mt-5"};function Y$(t,e,n,s,i,r){const o=w("control-button");return x(),$(it,null,[A("div",{class:"title is-5",textContent:J(n.content.title)},null,8,G$),A("div",K$,[A("a",{onClick:e[0]||(e[0]=(...a)=>n.content.handler&&n.content.handler(...a)),textContent:J(n.content.subtitle)},null,8,z$)]),A("div",{class:"is-size-7 is-uppercase has-text-centered-mobile",textContent:J(n.content.count)},null,8,q$),A("div",X$,[(x(!0),$(it,null,ae(n.content.actions,(a,l)=>(x(),gt(o,{key:l,button:a},null,8,["button"]))),128))])],64)}const hd=st(W$,[["render",Y$]]),am={name:"ControlProgress",props:{size:{default:36,type:Number},value:{default:0,type:Number}},computed:{offset(){return 1-this.value},progress(){return`${Math.round(this.value*100)}%`}}},hb=()=>{k1(t=>({"3ce61f74":t.offset}))},pb=am.setup;am.setup=pb?(t,e)=>(hb(),pb(t,e)):hb;const Z$={class:"is-flex"},J$=["width","height"],Q$=["textContent"];function t5(t,e,n,s,i,r){return x(),$("div",Z$,[(x(),$("svg",{width:n.size,height:n.size,viewBox:"0 0 200 200"},[e[0]||(e[0]=A("defs",null,[A("circle",{id:"circle",cx:"50%",cy:"50%",pathLength:"1",r:"90"})],-1)),e[1]||(e[1]=A("use",{href:"#circle",class:"progress-base"},null,-1)),e[2]||(e[2]=A("use",{href:"#circle",class:"progress-bar"},null,-1)),A("text",{x:"50%",y:"50%",class:"is-size-1 progress-text",textContent:J(r.progress)},null,8,Q$)],8,J$))])}const e5=st(am,[["render",t5],["__scopeId","data-v-06c7995f"]]),n5={name:"ListItem",components:{ControlImage:Hr,ControlProgress:e5},props:{icon:{default:null,type:String},image:{default:null,type:Object},index:{default:null,type:[String,Number]},isItem:{default:!0,type:Boolean},isPlayable:{default:!0,type:Boolean},isRead:{default:!1,type:Boolean},lines:{default:null,type:Array},progress:{default:null,type:Number}},emits:["open","openDetails"],methods:{open(){this.$emit("open")},openDetails(){this.$emit("openDetails")}}},s5={key:0,class:"py-5"},i5={class:"media-content"},r5=["id","textContent"],o5={class:"media-content"},a5=["textContent"],l5={key:0,class:"is-size-7 has-text-grey"},c5={key:2,class:"media-right"},u5={class:"media-right"};function d5(t,e,n,s,i,r){const o=w("mdicon"),a=w("control-image"),l=w("control-progress");return n.isItem?(x(),$("div",{key:1,class:Kt(["media is-align-items-center mb-0",{"is-clickable":n.isPlayable,"is-not-allowed":!n.isPlayable}]),onClick:e[1]||(e[1]=(...c)=>r.open&&r.open(...c))},[n.icon?(x(),gt(o,{key:0,class:"media-left icon",name:n.icon},null,8,["name"])):vt("",!0),n.image?(x(),gt(a,{key:1,url:n.image.url,caption:n.image.caption,class:"media-left is-small"},null,8,["url","caption"])):vt("",!0),A("div",o5,[(x(!0),$(it,null,ae(n.lines,(c,u)=>(x(),$("div",{key:u,class:Kt({"is-size-6":u===0,"is-size-7":u!==0,"has-text-weight-bold":u!==2,"has-text-grey":(u!==0||n.isRead)&&n.isPlayable,"has-text-grey-light":!n.isPlayable}),textContent:J(c)},null,10,a5))),128)),n.isPlayable?vt("",!0):(x(),$("div",l5,[oe(t.$slots,"reason",{},void 0,!0)]))]),n.progress?(x(),$("div",c5,[E(l,{value:n.progress},null,8,["value"])])):vt("",!0),A("div",u5,[A("a",{onClick:e[0]||(e[0]=Pn((...c)=>r.openDetails&&r.openDetails(...c),["prevent","stop"]))},[E(o,{class:"icon has-text-grey",name:"dots-vertical",size:"16"})])])],2)):(x(),$("div",s5,[A("div",i5,[A("span",{id:`index_${n.index}`,class:"tag is-small has-text-weight-bold",textContent:J(n.index)},null,8,r5)])]))}const Ls=st(n5,[["render",d5],["__scopeId","data-v-8ec36f11"]]),f5={name:"ListProperties",components:{ControlImage:Hr},props:{item:{required:!0,type:Object}}},h5=["textContent"],p5={class:"title is-6"},m5=["onClick","textContent"],g5=["textContent"];function y5(t,e,n,s,i,r){var a;const o=w("control-image");return x(),$(it,null,[n.item.image?(x(),gt(o,{key:0,url:n.item.image,caption:n.item.name,class:"is-normal mb-5"},null,8,["url","caption"])):vt("",!0),t.$slots.buttons?oe(t.$slots,"buttons",{key:1}):vt("",!0),(x(!0),$(it,null,ae((a=n.item.properties)==null?void 0:a.filter(l=>l.value),l=>(x(),$("div",{key:l.key,class:"mb-3"},[A("div",{class:"is-size-7 is-uppercase",textContent:J(t.$t(l.key))},null,8,h5),A("div",p5,[l.handler?(x(),$("a",{key:0,onClick:l.handler,textContent:J(l.value)},null,8,m5)):(x(),$("span",{key:1,class:"title is-6",textContent:J(l.value)},null,8,g5))])]))),128))],64)}const pS=st(f5,[["render",y5]]),b5={name:"ModalDialogPlayable",components:{ControlButton:on,ListProperties:pS,ModalDialog:sr},props:{buttons:{default:()=>[],type:Array},item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{actions(){return[{handler:this.addToQueue,icon:"playlist-plus",key:"actions.add"},{handler:this.addNextToQueue,icon:"playlist-play",key:"actions.add-next"},{handler:this.play,icon:"play",key:"actions.play"}]}},methods:{play(){this.$emit("close"),this.item.expression?ce.playExpression(this.item.expression,!1):ce.playUri(this.item.uris||this.item.uri,!1)},addToQueue(){this.$emit("close"),this.item.expression?ce.addExpression(this.item.expression):ce.addUri(this.item.uris||this.item.uri)},addNextToQueue(){this.$emit("close"),this.item.expression?ce.addExpression(this.item.expression,!0):ce.addUri(this.item.uris||this.item.uri,!0)}}},v5={class:"buttons"};function _5(t,e,n,s,i,r){const o=w("control-button"),a=w("list-properties"),l=w("modal-dialog");return x(),gt(l,{actions:r.actions,show:n.show,title:n.item.name,onClose:e[0]||(e[0]=c=>t.$emit("close"))},{content:M(()=>[E(a,{item:n.item},Ro({_:2},[n.buttons.length?{name:"buttons",fn:M(()=>[A("div",v5,[(x(!0),$(it,null,ae(n.buttons,c=>(x(),gt(o,{key:c.key,button:c},null,8,["button"]))),128))])]),key:"0"}:void 0]),1032,["item"])]),_:1},8,["actions","show","title"])}const gs=st(b5,[["render",_5]]),S5={name:"ModalDialogTrack",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close","play-count-changed"],computed:{buttons(){return this.item.media_kind!=="podcast"?[]:this.item.play_count>0?[{handler:this.markAsNew,key:"actions.mark-as-new"}]:[{handler:this.markAsPlayed,key:"actions.mark-as-played"}]},playable(){return{name:this.item.title,properties:[{handler:this.openAlbum,key:"property.album",value:this.item.album},{handler:this.openArtist,key:"property.album-artist",value:this.item.album_artist},{key:"property.composer",value:this.item.composer},{key:"property.release-date",value:this.$formatters.toDate(this.item.date_released)},{key:"property.year",value:this.item.year},{key:"property.genre",value:this.item.genre},{key:"property.position",value:this.item.track_number>0&&[this.item.disc_number,this.item.track_number].join(" / ")},{key:"property.duration",value:this.item.length_ms>0&&this.$formatters.toTimecode(this.item.length_ms)},{key:"property.type",value:`${this.$t(`media.kind.${this.item.media_kind}`)} - ${this.$t(`data.kind.${this.item.data_kind}`)}`},{key:"property.quality",value:this.item.data_kind!=="spotify"&&this.$t("dialog.track.quality-value",{bitrate:this.item.bitrate,channels:this.$t("data.channels",this.item.channels),format:this.item.type,samplerate:this.item.samplerate})},{key:"property.added-on",value:this.$formatters.toDateTime(this.item.time_added)},{key:"property.rating",value:this.$t("dialog.track.rating-value",{rating:Math.floor(this.item.rating/10)})},{key:"property.comment",value:this.item.comment},{key:"property.path",value:this.item.path}],uri:this.item.uri}}},methods:{markAsNew(){Ct.updateTrack(this.item.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},markAsPlayed(){Ct.updateTrack(this.item.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},openAlbum(){this.$emit("close"),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}})},openArtist(){this.$emit("close"),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}})},openGenre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{mediaKind:this.item.media_kind}})}}};function E5(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{buttons:r.buttons,item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["buttons","item","show"])}const w5=st(S5,[["render",E5]]),k5={name:"ListTracks",components:{ListItem:Ls,ModalDialogTrack:w5},props:{expression:{default:"",type:String},items:{default:null,type:Object},icon:{default:null,type:String},showProgress:{default:!1,type:Boolean},uris:{default:"",type:String}},emits:["play-count-changed"],data(){return{selectedItem:{},showDetailsModal:!1}},methods:{isRead(t){return t.media_kind==="podcast"&&t.play_count>0},open(t){this.uris?ce.playUri(this.uris,!1,this.items.items.indexOf(t)):this.expression?ce.playExpression(this.expression,!1,this.items.items.indexOf(t)):ce.playUri(t.uri,!1)},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0},progress(t){return this.showProgress&&t.seek_ms>0?t.seek_ms/t.length_ms:null}}};function T5(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-track");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,icon:n.icon,"is-item":l.isItem,"is-read":r.isRead(l.item),index:l.index,lines:[l.item.title,l.item.artist,l.item.album],progress:r.progress(l.item),onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["icon","is-item","is-read","index","lines","progress","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1),onPlayCountChanged:e[1]||(e[1]=l=>t.$emit("play-count-changed"))},null,8,["item","show"])],64)}const Bn=st(k5,[["render",T5]]),C5={name:"ModalDialogAlbum",components:{ModalDialog:sr,ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},mediaKind:{default:"",type:String},show:Boolean},emits:["close","play-count-changed","podcast-deleted"],data(){return{showRemovePodcastModal:!1}},computed:{actions(){return[{handler:this.cancel,icon:"cancel",key:this.$t("actions.cancel")},{handler:this.removePodcast,icon:"delete",key:this.$t("actions.remove")}]},buttons(){return this.mediaKindResolved==="podcast"?this.item.data_kind==="url"?[{handler:this.markAsPlayed,key:"actions.mark-as-played"},{handler:this.openRemovePodcastDialog,key:"actions.remove"}]:[{handler:this.markAsPlayed,key:"actions.mark-as-played"}]:[]},mediaKindResolved(){return this.mediaKind||this.item.media_kind},playable(){return{image:this.item.artwork_url,name:this.item.name,properties:[{handler:this.openArtist,key:"property.artist",value:this.item.artist},{key:"property.release-date",value:this.$formatters.toDate(this.item.date_released)},{key:"property.year",value:this.item.year},{key:"property.tracks",value:this.item.track_count},{key:"property.duration",value:this.$formatters.toTimecode(this.item.length_ms)},{key:"property.type",value:`${this.$t(`media.kind.${this.item.media_kind}`)} - ${this.$t(`data.kind.${this.item.data_kind}`)}`},{key:"property.added-on",value:this.$formatters.toDateTime(this.item.time_added)}],uri:this.item.uri}}},methods:{cancel(){this.showRemovePodcastModal=!1},markAsPlayed(){Ct.updateAlbum(this.item.id,{play_count:"played"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},openArtist(){this.$emit("close"),this.mediaKindResolved==="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}})},openRemovePodcastDialog(){this.showRemovePodcastModal=!0,this.showDetailsModal=!1},removePodcast(){this.showRemovePodcastModal=!1,Ct.albumTracks(this.item.id,{limit:1}).then(t=>{Ct.trackPlaylists(t.items[0].id).then(e=>{const{id:n}=e.items.find(s=>s.type==="rss");Ct.playlistDelete(n).then(()=>{this.$emit("podcast-deleted"),this.$emit("close")})})})}}},A5=["textContent"];function O5(t,e,n,s,i,r){const o=w("modal-dialog-playable"),a=w("i18n-t"),l=w("modal-dialog");return x(),$(it,null,[E(o,{buttons:r.buttons,item:r.playable,show:n.show,onClose:e[0]||(e[0]=c=>t.$emit("close"))},null,8,["buttons","item","show"]),E(l,{actions:r.actions,show:i.showRemovePodcastModal,title:t.$t("dialog.podcast.remove.title"),onClose:e[1]||(e[1]=c=>i.showRemovePodcastModal=!1),onRemove:r.removePodcast},{content:M(()=>[E(a,{keypath:"dialog.podcast.remove.info",tag:"p",scope:"global"},{separator:M(()=>e[2]||(e[2]=[A("br",null,null,-1)])),name:M(()=>[A("b",{textContent:J(n.item.name)},null,8,A5)]),_:1})]),_:1},8,["actions","show","title","onRemove"])],64)}const pd=st(C5,[["render",O5]]),x5={name:"PageAlbum",components:{ContentWithHero:fd,ControlImage:Hr,HeadingHero:hd,ListTracks:Bn,ModalDialogAlbum:pd},beforeRouteEnter(t,e,n){Promise.all([Ct.album(t.params.id),Ct.albumTracks(t.params.id)]).then(([s,i])=>{n(r=>{r.album=s,r.tracks=new kt(i,{criteria:[{field:"disc_number",type:Number}],index:{field:"disc_number",type:Number}}),r.tracks.indices.length<2&&r.tracks.group()})})},data(){return{album:{},showDetailsModal:!1,tracks:new kt}},computed:{heading(){return{count:this.$t("data.tracks",{count:this.album.track_count}),handler:this.openArtist,subtitle:this.album.artist,title:this.album.name,actions:[{handler:this.play,icon:"shuffle",key:"actions.shuffle"},{handler:this.openDetails,icon:"dots-horizontal"}]}}},methods:{openArtist(){this.showDetailsModal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},openDetails(){this.showDetailsModal=!0},play(){ce.playUri(this.album.uri,!0)}}};function I5(t,e,n,s,i,r){const o=w("heading-hero"),a=w("control-image"),l=w("list-tracks"),c=w("content-with-hero"),u=w("modal-dialog-album");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),image:M(()=>[E(a,{url:i.album.artwork_url,caption:i.album.name,class:"is-clickable is-medium",onClick:r.openDetails},null,8,["url","caption","onClick"])]),content:M(()=>[E(l,{items:i.tracks,uris:i.album.uri},null,8,["items","uris"])]),_:1}),E(u,{item:i.album,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const P5=st(x5,[["render",I5]]);function N5(t){return t.scrollHeight}function D5(t){return t.scrollWidth}function M5(t,e){t.scrollTop=t.scrollHeight-e+t.scrollTop}function R5(t,e){t.scrollLeft=t.scrollWidth-e+t.scrollLeft}const L5=A("div",{class:"loading"},"Loading...",-1),$5=A("div",{class:"no-more"},"No more.",-1),F5=A("div",{class:"no-results"},"No results.",-1),V5=A("div",{class:"error"},"Error.",-1),H5=_i({__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(t,{emit:e}){const n=t,s=ls();let i=ls("loading"),r=ls(n.isInitial),o=0;function a(){$r(()=>{var g,v;n.position==="top"?M5((g=n.container)!=null?g:document.documentElement,o):n.position==="left"&&R5((v=n.container)!=null?v:document.documentElement,o)})}function l(g,v){return g===0?r.value?(u(),"no-results"):(c(),"no-more"):g!==void 0&&v!==void 0&&g{var v,S;g.isIntersecting&&(n.position==="top"?o=N5((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(o=D5((S=n.container)!=null?S:document.documentElement)),m(),n.load({loaded:l,noMore:c,noResults:u,error:d},{isFirstLoad:r.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let _;return typeof IntersectionObserver<"u"&&Jv(()=>{_&&m(),_=y(),b()},{flush:"post"}),Zn(()=>n.isInitial,g=>{g&&f()}),Zn(r,g=>{g||e("update:isInitial",!1)}),(g,v)=>(x(),$("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:s},[Vn(i)==="loading"?oe(g.$slots,"loading",ro(ao({key:0},{isFirstLoad:Vn(r)})),()=>[L5]):Vn(i)==="no-more"?oe(g.$slots,"no-more",ro(ao({key:1},{retry:h})),()=>[$5]):Vn(i)==="no-results"?oe(g.$slots,"no-results",ro(ao({key:2},{retry:h})),()=>[F5]):Vn(i)==="error"?oe(g.$slots,"error",ro(ao({key:3},{retry:h})),()=>[V5]):vt("",!0)],512))}}),U5={name:"LoaderListItem",components:{VueEternalLoading:H5},props:{load:{default:null,type:Function},loaded:{default:!0,type:Boolean}}},j5={class:"columns is-centered"},B5={class:"column has-text-centered"};function W5(t,e,n,s,i,r){const o=w("mdicon"),a=w("vue-eternal-loading");return n.load&&!n.loaded?(x(),gt(a,{key:0,load:n.load},{loading:M(()=>[A("div",j5,[A("div",B5,[E(o,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":M(()=>e[0]||(e[0]=[A("br",null,null,-1)])),"no-results":M(()=>e[1]||(e[1]=[A("br",null,null,-1)])),_:1},8,["load"])):vt("",!0)}const md=st(U5,[["render",W5]]),G5={name:"ModalDialogTrackSpotify",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){var t;return this.item.artists?{name:this.item.name,properties:[{handler:this.openAlbum,key:"property.album",value:this.item.album.name},{handler:this.openArtist,key:"property.album-artist",value:(t=this.item.artists[0])==null?void 0:t.name},{key:"property.release-date",value:this.$formatters.toDate(this.item.album.release_date)},{key:"property.position",value:[this.item.disc_number,this.item.track_number].join(" / ")},{key:"property.duration",value:this.$formatters.toTimecode(this.item.duration_ms)},{key:"property.path",value:this.item.uri}],uri:this.item.uri}:{}}},methods:{openAlbum(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.album.id}})},openArtist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})}}};function K5(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const z5=st(G5,[["render",K5]]),q5={name:"ListTracksSpotify",components:{ListItem:Ls,LoaderListItem:md,ModalDialogTrackSpotify:z5},props:{contextUri:{default:"",type:String},items:{required:!0,type:Object},load:{default:null,type:Function},loaded:{default:!0,type:Boolean}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){t.is_playable&&ce.playUri(this.contextUri||t.uri,!1,t.position||0)},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}},X5=["textContent"],Y5=["textContent"];function Z5(t,e,n,s,i,r){const o=w("list-item"),a=w("loader-list-item"),l=w("modal-dialog-track-spotify");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,c=>(x(),gt(o,{key:c.id,"is-playable":c.is_playable,lines:[c.name,c.artists[0].name,c.album.name],onOpen:u=>r.open(c),onOpenDetails:u=>r.openDetails(c)},Ro({_:2},[c.is_playable?void 0:{name:"reason",fn:M(()=>{var u;return[e[1]||(e[1]=qs(" (")),A("span",{textContent:J(t.$t("list.spotify.not-playable-track"))},null,8,X5),(u=c.restrictions)!=null&&u.reason?(x(),$("span",{key:0,textContent:J(t.$t("list.spotify.restriction-reason",{reason:c.restrictions.reason}))},null,8,Y5)):vt("",!0),e[2]||(e[2]=qs(") "))]}),key:"0"}]),1032,["is-playable","lines","onOpen","onOpenDetails"]))),128)),E(a,{load:n.load,loaded:n.loaded},null,8,["load","loaded"]),E(l,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=c=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Zc=st(q5,[["render",Z5]]),J5={name:"ModalDialogAlbumSpotify",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){var t,e,n,s,i,r;return{image:((n=(e=(t=this.item)==null?void 0:t.images)==null?void 0:e[0])==null?void 0:n.url)||"",name:this.item.name||"",properties:[{handler:this.openArtist,key:"property.artist",value:(r=(i=(s=this.item)==null?void 0:s.artists)==null?void 0:i[0])==null?void 0:r.name},{key:"property.release-date",value:this.$formatters.toDate(this.item.release_date)},{key:"property.type",value:this.item.album_type}],uri:this.item.uri}}},methods:{openArtist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})}}};function Q5(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const mS=st(J5,[["render",Q5]]);var rf={exports:{}},mb;function t8(){return mb||(mb=1,function(t){var e=function(){var n="https://api.spotify.com/v1",s=null,i=null,r=function(f,h){return f.abort=h,f},o=function(f,h){var p;if(i!==null){var m=i.defer();f(function(b){m.resolve(b)},function(b){m.reject(b)}),p=m.promise}else window.Promise&&(p=new window.Promise(f));return p?new r(p,h):null},a=function(){var f=Array.prototype.slice.call(arguments),h=f[0],p=f.slice(1);return h=h||{},p.forEach(function(m){for(var b in m)m.hasOwnProperty(b)&&(h[b]=m[b])}),h},l=function(f,h){var p="";for(var m in h)if(h.hasOwnProperty(m)){var b=h[m];p+=encodeURIComponent(m)+"="+encodeURIComponent(b)+"&"}return p.length>0&&(p=p.substring(0,p.length-1),f=f+"?"+p),f},c=function(f,h){var p=new XMLHttpRequest,m=function(b,y){function _(k){b&&b(k),h&&h(null,k)}function g(){y&&y(p),h&&h(p,null)}var v=f.type||"GET";if(p.open(v,l(f.url,f.params)),s&&p.setRequestHeader("Authorization","Bearer "+s),p.onreadystatechange=function(){if(p.readyState===4){var k=null;try{k=p.responseText?JSON.parse(p.responseText):""}catch(P){console.error(P)}p.status>=200&&p.status<300?_(k):g()}},v==="GET")p.send(null);else{var S=null;f.postData&&(f.contentType==="image/jpeg"?(S=f.postData,p.setRequestHeader("Content-Type",f.contentType)):(S=JSON.stringify(f.postData),p.setRequestHeader("Content-Type","application/json"))),p.send(S)}};return h?(m(),null):o(m,function(){p.abort()})},u=function(f,h,p,m){var b={},y=null;typeof h=="object"?(b=h,y=p):typeof h=="function"&&(y=h);var _=f.type||"GET";return _!=="GET"&&f.postData&&!m?f.postData=a(f.postData,b):f.params=a(f.params,b),c(f,y)},d=function(){};return d.prototype={constructor:e},d.prototype.getGeneric=function(f,h){var p={url:f};return u(p,h)},d.prototype.getMe=function(f,h){var p={url:n+"/me"};return u(p,f,h)},d.prototype.getMySavedTracks=function(f,h){var p={url:n+"/me/tracks"};return u(p,f,h)},d.prototype.addToMySavedTracks=function(f,h,p){var m={url:n+"/me/tracks",type:"PUT",postData:f};return u(m,h,p)},d.prototype.removeFromMySavedTracks=function(f,h,p){var m={url:n+"/me/tracks",type:"DELETE",postData:f};return u(m,h,p)},d.prototype.containsMySavedTracks=function(f,h,p){var m={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getMySavedAlbums=function(f,h){var p={url:n+"/me/albums"};return u(p,f,h)},d.prototype.addToMySavedAlbums=function(f,h,p){var m={url:n+"/me/albums",type:"PUT",postData:f};return u(m,h,p)},d.prototype.removeFromMySavedAlbums=function(f,h,p){var m={url:n+"/me/albums",type:"DELETE",postData:f};return u(m,h,p)},d.prototype.containsMySavedAlbums=function(f,h,p){var m={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getMyTopArtists=function(f,h){var p={url:n+"/me/top/artists"};return u(p,f,h)},d.prototype.getMyTopTracks=function(f,h){var p={url:n+"/me/top/tracks"};return u(p,f,h)},d.prototype.getMyRecentlyPlayedTracks=function(f,h){var p={url:n+"/me/player/recently-played"};return u(p,f,h)},d.prototype.followUsers=function(f,h){var p={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return u(p,h)},d.prototype.followArtists=function(f,h){var p={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return u(p,h)},d.prototype.followPlaylist=function(f,h,p){var m={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return u(m,h,p)},d.prototype.unfollowUsers=function(f,h){var p={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return u(p,h)},d.prototype.unfollowArtists=function(f,h){var p={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return u(p,h)},d.prototype.unfollowPlaylist=function(f,h){var p={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return u(p,h)},d.prototype.isFollowingUsers=function(f,h){var p={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return u(p,h)},d.prototype.isFollowingArtists=function(f,h){var p={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return u(p,h)},d.prototype.areFollowingPlaylist=function(f,h,p){var m={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:h.join(",")}};return u(m,p)},d.prototype.getFollowedArtists=function(f,h){var p={url:n+"/me/following",type:"GET",params:{type:"artist"}};return u(p,f,h)},d.prototype.getUser=function(f,h,p){var m={url:n+"/users/"+encodeURIComponent(f)};return u(m,h,p)},d.prototype.getUserPlaylists=function(f,h,p){var m;return typeof f=="string"?m={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(m={url:n+"/me/playlists"},p=h,h=f),u(m,h,p)},d.prototype.getPlaylist=function(f,h,p){var m={url:n+"/playlists/"+f};return u(m,h,p)},d.prototype.getPlaylistTracks=function(f,h,p){var m={url:n+"/playlists/"+f+"/tracks"};return u(m,h,p)},d.prototype.getPlaylistCoverImage=function(f,h){var p={url:n+"/playlists/"+f+"/images"};return u(p,h)},d.prototype.createPlaylist=function(f,h,p){var m={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:h};return u(m,h,p)},d.prototype.changePlaylistDetails=function(f,h,p){var m={url:n+"/playlists/"+f,type:"PUT",postData:h};return u(m,h,p)},d.prototype.addTracksToPlaylist=function(f,h,p,m){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:h}};return u(b,p,m,!0)},d.prototype.replaceTracksInPlaylist=function(f,h,p){var m={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:h}};return u(m,{},p)},d.prototype.reorderTracksInPlaylist=function(f,h,p,m,b){var y={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:h,insert_before:p}};return u(y,m,b)},d.prototype.removeTracksFromPlaylist=function(f,h,p){var m=h.map(function(y){return typeof y=="string"?{uri:y}:y}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:m}};return u(b,{},p)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,h,p,m){var b=h.map(function(_){return typeof _=="string"?{uri:_}:_}),y={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:p}};return u(y,{},m)},d.prototype.removeTracksFromPlaylistInPositions=function(f,h,p,m){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:h,snapshot_id:p}};return u(b,{},m)},d.prototype.uploadCustomPlaylistCoverImage=function(f,h,p){var m={url:n+"/playlists/"+f+"/images",type:"PUT",postData:h.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return u(m,{},p)},d.prototype.getAlbum=function(f,h,p){var m={url:n+"/albums/"+f};return u(m,h,p)},d.prototype.getAlbumTracks=function(f,h,p){var m={url:n+"/albums/"+f+"/tracks"};return u(m,h,p)},d.prototype.getAlbums=function(f,h,p){var m={url:n+"/albums/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getTrack=function(f,h,p){var m={};return m.url=n+"/tracks/"+f,u(m,h,p)},d.prototype.getTracks=function(f,h,p){var m={url:n+"/tracks/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getArtist=function(f,h,p){var m={url:n+"/artists/"+f};return u(m,h,p)},d.prototype.getArtists=function(f,h,p){var m={url:n+"/artists/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getArtistAlbums=function(f,h,p){var m={url:n+"/artists/"+f+"/albums"};return u(m,h,p)},d.prototype.getArtistTopTracks=function(f,h,p,m){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:h}};return u(b,p,m)},d.prototype.getArtistRelatedArtists=function(f,h,p){var m={url:n+"/artists/"+f+"/related-artists"};return u(m,h,p)},d.prototype.getFeaturedPlaylists=function(f,h){var p={url:n+"/browse/featured-playlists"};return u(p,f,h)},d.prototype.getNewReleases=function(f,h){var p={url:n+"/browse/new-releases"};return u(p,f,h)},d.prototype.getCategories=function(f,h){var p={url:n+"/browse/categories"};return u(p,f,h)},d.prototype.getCategory=function(f,h,p){var m={url:n+"/browse/categories/"+f};return u(m,h,p)},d.prototype.getCategoryPlaylists=function(f,h,p){var m={url:n+"/browse/categories/"+f+"/playlists"};return u(m,h,p)},d.prototype.search=function(f,h,p,m){var b={url:n+"/search/",params:{q:f,type:h.join(",")}};return u(b,p,m)},d.prototype.searchAlbums=function(f,h,p){return this.search(f,["album"],h,p)},d.prototype.searchArtists=function(f,h,p){return this.search(f,["artist"],h,p)},d.prototype.searchTracks=function(f,h,p){return this.search(f,["track"],h,p)},d.prototype.searchPlaylists=function(f,h,p){return this.search(f,["playlist"],h,p)},d.prototype.searchShows=function(f,h,p){return this.search(f,["show"],h,p)},d.prototype.searchEpisodes=function(f,h,p){return this.search(f,["episode"],h,p)},d.prototype.getAudioFeaturesForTrack=function(f,h){var p={};return p.url=n+"/audio-features/"+f,u(p,{},h)},d.prototype.getAudioFeaturesForTracks=function(f,h){var p={url:n+"/audio-features",params:{ids:f}};return u(p,{},h)},d.prototype.getAudioAnalysisForTrack=function(f,h){var p={};return p.url=n+"/audio-analysis/"+f,u(p,{},h)},d.prototype.getRecommendations=function(f,h){var p={url:n+"/recommendations"};return u(p,f,h)},d.prototype.getAvailableGenreSeeds=function(f){var h={url:n+"/recommendations/available-genre-seeds"};return u(h,{},f)},d.prototype.getMyDevices=function(f){var h={url:n+"/me/player/devices"};return u(h,{},f)},d.prototype.getMyCurrentPlaybackState=function(f,h){var p={url:n+"/me/player"};return u(p,f,h)},d.prototype.getMyCurrentPlayingTrack=function(f,h){var p={url:n+"/me/player/currently-playing"};return u(p,f,h)},d.prototype.transferMyPlayback=function(f,h,p){var m=h||{};m.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:m};return u(b,h,p)},d.prototype.play=function(f,h){f=f||{};var p="device_id"in f?{device_id:f.device_id}:null,m={};["context_uri","uris","offset","position_ms"].forEach(function(_){_ in f&&(m[_]=f[_])});var b={type:"PUT",url:n+"/me/player/play",params:p,postData:m},y=typeof f=="function"?f:{};return u(b,y,h)},d.prototype.queue=function(f,h,p){h=h||{};var m="device_id"in h?{uri:f,device_id:h.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:m};return u(b,h,p)},d.prototype.pause=function(f,h){f=f||{};var p="device_id"in f?{device_id:f.device_id}:null,m={type:"PUT",url:n+"/me/player/pause",params:p};return u(m,f,h)},d.prototype.skipToNext=function(f,h){f=f||{};var p="device_id"in f?{device_id:f.device_id}:null,m={type:"POST",url:n+"/me/player/next",params:p};return u(m,f,h)},d.prototype.skipToPrevious=function(f,h){f=f||{};var p="device_id"in f?{device_id:f.device_id}:null,m={type:"POST",url:n+"/me/player/previous",params:p};return u(m,f,h)},d.prototype.seek=function(f,h,p){h=h||{};var m={position_ms:f};"device_id"in h&&(m.device_id=h.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:m};return u(b,h,p)},d.prototype.setRepeat=function(f,h,p){h=h||{};var m={state:f};"device_id"in h&&(m.device_id=h.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:m};return u(b,h,p)},d.prototype.setVolume=function(f,h,p){h=h||{};var m={volume_percent:f};"device_id"in h&&(m.device_id=h.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:m};return u(b,h,p)},d.prototype.setShuffle=function(f,h,p){h=h||{};var m={state:f};"device_id"in h&&(m.device_id=h.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:m};return u(b,h,p)},d.prototype.getShow=function(f,h,p){var m={};return m.url=n+"/shows/"+f,u(m,h,p)},d.prototype.getShows=function(f,h,p){var m={url:n+"/shows/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getMySavedShows=function(f,h){var p={url:n+"/me/shows"};return u(p,f,h)},d.prototype.addToMySavedShows=function(f,h,p){var m={url:n+"/me/shows",type:"PUT",postData:f};return u(m,h,p)},d.prototype.removeFromMySavedShows=function(f,h,p){var m={url:n+"/me/shows",type:"DELETE",postData:f};return u(m,h,p)},d.prototype.containsMySavedShows=function(f,h,p){var m={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getShowEpisodes=function(f,h,p){var m={url:n+"/shows/"+f+"/episodes"};return u(m,h,p)},d.prototype.getEpisode=function(f,h,p){var m={};return m.url=n+"/episodes/"+f,u(m,h,p)},d.prototype.getEpisodes=function(f,h,p){var m={url:n+"/episodes/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getAccessToken=function(){return s},d.prototype.setAccessToken=function(f){s=f},d.prototype.setPromiseImplementation=function(f){var h=!1;try{var p=new f(function(m){m()});typeof p.then=="function"&&typeof p.catch=="function"&&(h=!0)}catch(m){console.error(m)}if(h)i=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();t.exports=e}(rf)),rf.exports}var e8=t8();const Xs=Uu(e8),n8={name:"PageAlbumSpotify",components:{ContentWithHero:fd,ControlImage:Hr,HeadingHero:hd,ListTracksSpotify:Zc,ModalDialogAlbumSpotify:mS},beforeRouteEnter(t,e,n){const s=new Xs;xs.spotify().then(i=>{s.setAccessToken(i.webapi_token),s.getAlbum(t.params.id,{market:Je().spotify.webapi_country}).then(r=>{n(o=>{o.album=r})})})},setup(){return{servicesStore:Je()}},data(){return{album:{artists:[{}],tracks:{}},showDetailsModal:!1}},computed:{heading(){return{count:this.$t("data.tracks",{count:this.album.tracks.total}),handler:this.openArtist,subtitle:this.album.artists[0].name,title:this.album.name,actions:[{handler:this.play,icon:"shuffle",key:"actions.shuffle"},{handler:this.openDetails,icon:"dots-horizontal"}]}},tracks(){const{album:t}=this;return t.tracks.total?t.tracks.items.map(e=>({...e,album:t})):[]}},methods:{openArtist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},openDetails(){this.showDetailsModal=!0},play(){this.showDetailsModal=!1,ce.playUri(this.album.uri,!0)}}};function s8(t,e,n,s,i,r){const o=w("heading-hero"),a=w("control-image"),l=w("list-tracks-spotify"),c=w("content-with-hero"),u=w("modal-dialog-album-spotify");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),image:M(()=>{var d,f;return[E(a,{url:((f=(d=i.album.images)==null?void 0:d[0])==null?void 0:f.url)??"",caption:i.album.name,class:"is-clickable is-medium",onClick:r.openDetails},null,8,["url","caption","onClick"])]}),content:M(()=>[E(l,{items:r.tracks,"context-uri":i.album.uri},null,8,["items","context-uri"])]),_:1}),E(u,{item:i.album,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const i8=st(n8,[["render",s8]]),r8={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(t=>t.id===this.value)}}},methods:{deactivate(){this.active=!1},select(t){this.active=!1,this.$emit("update:value",t.id)}}},o8={class:"dropdown-trigger"},a8=["textContent"],l8={id:"dropdown",class:"dropdown-menu",role:"menu"},c8={class:"dropdown-content"},u8=["onClick","textContent"];function d8(t,e,n,s,i,r){const o=w("mdicon"),a=Zh("click-away");return Qn((x(),$("div",{class:Kt(["dropdown",{"is-active":i.active}])},[A("div",o8,[A("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:e[0]||(e[0]=l=>i.active=!i.active)},[A("span",{textContent:J(r.option.name)},null,8,a8),E(o,{class:"icon",name:"chevron-down",size:"16"})])]),A("div",l8,[A("div",c8,[(x(!0),$(it,null,ae(n.options,l=>(x(),$("a",{key:l.id,class:Kt(["dropdown-item",{"is-active":n.value===l.id}]),onClick:c=>r.select(l),textContent:J(l.name)},null,10,u8))),128))])])],2)),[[a,r.deactivate]])}const Ur=st(r8,[["render",d8]]),f8={name:"ListAlbums",components:{ListItem:Ls,ModalDialogAlbum:pd},props:{items:{required:!0,type:Object},mediaKind:{default:"",type:String}},emits:["play-count-changed","podcast-deleted"],setup(){return{settingsStore:bi()}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{image(t){return this.settingsStore.showCoverArtworkInAlbumLists?{url:t.item.artwork_url,caption:t.item.name}:null},open(t){this.selectedItem=t;const e=this.mediaKind||this.selectedItem.media_kind;e==="podcast"?this.$router.push({name:"podcast",params:{id:t.id}}):e==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:t.id}}):this.$router.push({name:"music-album",params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0},playCountChanged(){this.$emit("play-count-changed")},podcastDeleted(){this.$emit("podcast-deleted")}}};function h8(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-album");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,"is-item":l.isItem,image:r.image(l),index:l.index,lines:[l.item.name,l.item.artist,t.$formatters.toDate(l.item.date_released)],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["is-item","image","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,"media-kind":n.mediaKind,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1),onPlayCountChanged:r.playCountChanged,onPodcastDeleted:r.podcastDeleted},null,8,["item","media-kind","show","onPlayCountChanged","onPodcastDeleted"])],64)}const Xn=st(f8,[["render",h8]]),p8={name:"ListIndexButtons",props:{indices:{required:!0,type:Array}}},m8={class:"buttons is-centered mb-4"};function g8(t,e,n,s,i,r){const o=w("router-link");return x(),$("section",null,[A("nav",m8,[(x(!0),$(it,null,ae(n.indices,a=>(x(),gt(o,{key:a,class:"button is-small p-2 is-index",to:{hash:`#index_${a}`,query:t.$route.query}},{default:M(()=>[qs(J(a),1)]),_:2},1032,["to"]))),128))])])}const ys=st(p8,[["render",g8],["__scopeId","data-v-dc002763"]]),y8={name:"ListOptions"},b8={class:"columns"},v8={key:0,class:"column"},_8=["textContent"],S8={key:1,class:"column"},E8=["textContent"];function w8(t,e,n,s,i,r){return x(),$("div",b8,[t.$slots.filter?(x(),$("div",v8,[A("div",{class:"is-size-7 is-uppercase",textContent:J(t.$t("options.filter.title"))},null,8,_8),oe(t.$slots,"filter")])):vt("",!0),t.$slots.sort?(x(),$("div",S8,[A("div",{class:"is-size-7 is-uppercase",textContent:J(t.$t("options.sort.title"))},null,8,E8),oe(t.$slots,"sort")])):vt("",!0)])}const Ko=st(y8,[["render",w8]]),k8={name:"ControlTabList",props:{links:{required:!0,type:Array}}},T8={class:"section py-0 tabs-section"},C8={class:"container"},A8={class:"columns is-centered my-0"},O8={class:"column is-four-fifths py-0"},x8={class:"tabs is-centered is-small"},I8=["onClick","onKeypress"],P8=["textContent"];function N8(t,e,n,s,i,r){const o=w("mdicon"),a=w("router-link");return x(),$("section",T8,[A("div",C8,[A("div",A8,[A("div",O8,[A("div",x8,[A("ul",null,[(x(!0),$(it,null,ae(n.links,l=>(x(),gt(a,{key:l.to.name,to:{name:l.to.name},custom:""},{default:M(({navigate:c,isActive:u})=>[A("li",{class:Kt({"is-active":u})},[A("a",{onClick:c,onKeypress:N1(c,["enter"])},[l.icon?(x(),gt(o,{key:0,class:"icon is-small mx-1",name:l.icon},null,8,["name"])):vt("",!0),A("span",{class:Kt({"is-hidden-mobile":l.icon}),textContent:J(t.$t(l.key))},null,10,P8)],40,I8)],2)]),_:2},1032,["to"]))),128))])])])])])])}const lm=st(k8,[["render",N8],["__scopeId","data-v-197c6bae"]]),D8={name:"TabsMusic",components:{ControlTabList:lm},setup(){return{servicesStore:Je()}},computed:{links(){const t=[{icon:"history",key:"page.music.tabs.history",to:{name:"music-history"}},{icon:"account-music",key:"page.music.tabs.artists",to:{name:"music-artists"}},{icon:"album",key:"page.music.tabs.albums",to:{name:"music-albums"}},{icon:"speaker",key:"page.music.tabs.genres",to:{name:"music-genres"}},{icon:"book-open-page-variant",key:"page.music.tabs.composers",to:{name:"music-composers"}}];return this.servicesStore.isSpotifyActive&&t.push({icon:"spotify",key:"page.music.tabs.spotify",to:{name:"music-spotify"}}),t}}};function M8(t,e,n,s,i,r){const o=w("control-tab-list");return x(),gt(o,{links:r.links},null,8,["links"])}const Zs=st(D8,[["render",M8]]),R8={name:"PageAlbums",components:{ContentWithHeading:ne,ControlDropdown:Ur,ControlSwitch:Fr,HeadingTitle:se,ListIndexButtons:ys,ListAlbums:Xn,ListOptions:Ko,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.albums("music").then(s=>{n(i=>{i.albumList=new kt(s)})})},setup(){return{servicesStore:Je(),uiStore:ts()}},data(){return{albumList:new kt}},computed:{albums(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.albumsSort);return t.filters=[e=>!this.uiStore.hideSingles||e.track_count>2,e=>!this.uiStore.hideSpotify||e.data_kind!=="spotify"],this.albumList.group(t)},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("options.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}},{id:3,name:this.$t("options.sort.recently-released"),options:{criteria:[{field:"date_released",order:-1,type:Date}],index:{field:"date_released",type:Date}}},{id:4,name:this.$t("options.sort.artist-name"),options:{criteria:[{field:"artist",type:String},{field:"name_sort",type:String}],index:{field:"artist",type:String}}},{id:5,name:this.$t("options.sort.artist-date"),options:{criteria:[{field:"artist",type:String},{field:"date_released",type:Date}],index:{field:"artist",type:String}}}]},heading(){return{subtitle:[{count:this.albums.count,key:"data.albums"}],title:this.$t("page.albums.title")}}}},L8=["textContent"],$8=["textContent"],F8=["textContent"],V8=["textContent"];function H8(t,e,n,s,i,r){const o=w("tabs-music"),a=w("list-index-buttons"),l=w("control-switch"),c=w("control-dropdown"),u=w("list-options"),d=w("heading-title"),f=w("list-albums"),h=w("content-with-heading");return x(),$(it,null,[E(o),E(h,null,{options:M(()=>[E(a,{indices:r.albums.indices},null,8,["indices"]),E(u,null,{filter:M(()=>[E(l,{modelValue:s.uiStore.hideSingles,"onUpdate:modelValue":e[0]||(e[0]=p=>s.uiStore.hideSingles=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-singles"))},null,8,L8)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-singles-help"))},null,8,$8)]),_:1},8,["modelValue"]),s.servicesStore.isSpotifyActive?(x(),gt(l,{key:0,modelValue:s.uiStore.hideSpotify,"onUpdate:modelValue":e[1]||(e[1]=p=>s.uiStore.hideSpotify=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify"))},null,8,F8)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify-help"))},null,8,V8)]),_:1},8,["modelValue"])):vt("",!0)]),sort:M(()=>[E(c,{value:s.uiStore.albumsSort,"onUpdate:value":e[2]||(e[2]=p=>s.uiStore.albumsSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(d,{content:r.heading},null,8,["content"])]),content:M(()=>[E(f,{items:r.albums},null,8,["items"])]),_:1})],64)}const U8=st(R8,[["render",H8]]),j8={name:"ModalDialogArtist",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){return{name:this.item.name,properties:[{key:"property.albums",value:this.item.album_count},{key:"property.tracks",value:this.item.track_count},{key:"property.type",value:this.$t(`data.kind.${this.item.data_kind}`)},{key:"property.added-on",value:this.$formatters.toDateTime(this.item.time_added)}],uri:this.item.uri}}}};function B8(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const gd=st(j8,[["render",B8]]),W8={name:"PageArtist",components:{ContentWithHeading:ne,ControlButton:on,ControlDropdown:Ur,ControlSwitch:Fr,HeadingTitle:se,ListAlbums:Xn,ListOptions:Ko,ModalDialogArtist:gd},beforeRouteEnter(t,e,n){Promise.all([Ct.artist(t.params.id),Ct.artistAlbums(t.params.id)]).then(([s,i])=>{n(r=>{r.artist=s,r.albumList=new kt(i)})})},setup(){return{servicesStore:Je(),uiStore:ts()}},data(){return{albumList:new kt,artist:{},showDetailsModal:!1}},computed:{albums(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.artistAlbumsSort);return t.filters=[e=>!this.uiStore.hideSpotify||e.data_kind!=="spotify"],this.albumList.group(t)},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{criteria:[{field:"name_sort",type:String}]}},{id:2,name:this.$t("options.sort.release-date"),options:{criteria:[{field:"date_released",type:Date}]}}]},heading(){return{subtitle:[{count:this.albums.count,key:"data.albums"},{count:this.trackCount,handler:this.openTracks,key:"data.tracks"}],title:this.artist.name}},trackCount(){return[...this.albums].reduce((t,e)=>t+((e==null?void 0:e.item.track_count)||0),0)}},methods:{openDetails(){this.showDetailsModal=!0},openTracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){ce.playUri(this.albums.items.map(t=>t.uri).join(),!0)}}},G8=["textContent"],K8=["textContent"];function z8(t,e,n,s,i,r){const o=w("control-switch"),a=w("control-dropdown"),l=w("list-options"),c=w("heading-title"),u=w("control-button"),d=w("list-albums"),f=w("content-with-heading"),h=w("modal-dialog-artist");return x(),$(it,null,[E(f,null,{options:M(()=>[E(l,null,{filter:M(()=>[s.servicesStore.isSpotifyActive?(x(),gt(o,{key:0,modelValue:s.uiStore.hideSpotify,"onUpdate:modelValue":e[0]||(e[0]=p=>s.uiStore.hideSpotify=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify"))},null,8,G8)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify-help"))},null,8,K8)]),_:1},8,["modelValue"])):vt("",!0)]),sort:M(()=>[E(a,{value:s.uiStore.artistAlbumsSort,"onUpdate:value":e[1]||(e[1]=p=>s.uiStore.artistAlbumsSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(c,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(u,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(u,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(d,{items:r.albums},null,8,["items"])]),_:1}),E(h,{item:i.artist,show:i.showDetailsModal,onClose:e[2]||(e[2]=p=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const q8=st(W8,[["render",z8]]),X8={name:"ListAlbumsSpotify",components:{ListItem:Ls,LoaderListItem:md,ModalDialogAlbumSpotify:mS},props:{items:{required:!0,type:Object},load:{default:null,type:Function},loaded:{default:!0,type:Boolean}},setup(){return{settingsStore:bi()}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{image(t){var e,n;return this.settingsStore.showCoverArtworkInAlbumLists?{url:((n=(e=t.images)==null?void 0:e[0])==null?void 0:n.url)??"",caption:t.name}:null},open(t){this.$router.push({name:"music-spotify-album",params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function Y8(t,e,n,s,i,r){const o=w("list-item"),a=w("loader-list-item"),l=w("modal-dialog-album-spotify");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,c=>{var u;return x(),gt(o,{key:c.id,"is-item":c.isItem,image:r.image(c),index:c.index,lines:[c.name,(u=c.artists[0])==null?void 0:u.name,t.$formatters.toDate(c.release_date)],onOpen:d=>r.open(c),onOpenDetails:d=>r.openDetails(c)},null,8,["is-item","image","index","lines","onOpen","onOpenDetails"])}),128)),E(a,{load:n.load,loaded:n.loaded},null,8,["load","loaded"]),E(l,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=c=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Qa=st(X8,[["render",Y8]]),Z8={name:"ModalDialogArtistSpotify",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){var t,e;return{name:this.item.name,properties:[{key:"property.popularity",value:[this.item.popularity,(t=this.item.followers)==null?void 0:t.total].join(" / ")},{key:"property.genres",value:(e=this.item.genres)==null?void 0:e.join(", ")}],uri:this.item.uri}}}};function J8(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const gS=st(Z8,[["render",J8]]),of=50,Q8={name:"PageArtistSpotify",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se,ListAlbumsSpotify:Qa,ModalDialogArtistSpotify:gS},beforeRouteEnter(t,e,n){xs.spotify().then(s=>{const i=new Xs;i.setAccessToken(s.webapi_token),Promise.all([i.getArtist(t.params.id),i.getArtistAlbums(t.params.id,{include_groups:"album,single",limit:of,market:Je().spotify.webapi_country,offset:0})]).then(([r,o])=>{n(a=>{a.artist=r,a.albums=o.items,a.total=o.total,a.offset=o.limit})})})},setup(){return{servicesStore:Je()}},data(){return{albums:[],artist:{},offset:0,showDetailsModal:!1,total:0}},computed:{heading(){return{subtitle:[{count:this.total,key:"data.albums"}],title:this.artist.name}},loaded(){return!(this.offset{const n=new Xs;n.setAccessToken(e.webapi_token),n.getArtistAlbums(this.artist.id,{include_groups:"album,single",limit:of,offset:this.offset}).then(s=>{this.appendAlbums(s),t(s.items.length,of)})})},openDetails(){this.showDetailsModal=!0},play(){this.showDetailsModal=!1,ce.playUri(this.artist.uri,!0)}}};function t6(t,e,n,s,i,r){const o=w("heading-title"),a=w("control-button"),l=w("list-albums-spotify"),c=w("content-with-heading"),u=w("modal-dialog-artist-spotify");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.albums,load:r.load,loaded:r.loaded},null,8,["items","load","loaded"])]),_:1}),E(u,{item:i.artist,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const e6=st(Q8,[["render",t6]]),n6={name:"PageArtistTracks",components:{ContentWithHeading:ne,ControlButton:on,ControlDropdown:Ur,ControlSwitch:Fr,HeadingTitle:se,ListIndexButtons:ys,ListOptions:Ko,ListTracks:Bn,ModalDialogArtist:gd},beforeRouteEnter(t,e,n){Promise.all([Ct.artist(t.params.id),Ct.artistTracks(t.params.id)]).then(([s,i])=>{n(r=>{r.artist=s,r.trackList=new kt(i)})})},setup(){return{servicesStore:Je(),uiStore:ts()}},data(){return{artist:{},showDetailsModal:!1,trackList:new kt}},computed:{albumCount(){return new Set([...this.tracks].filter(t=>t.isItem).map(t=>t.item.album_id)).size},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("options.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}]},heading(){return{subtitle:[{count:this.albumCount,handler:this.openArtist,key:"data.albums"},{count:this.tracks.count,key:"data.tracks"}],title:this.artist.name}},trackUris(){return this.trackList.items.map(t=>t.uri).join()},tracks(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.artistTracksSort);return t.filters=[e=>!this.uiStore.hideSpotify||e.data_kind!=="spotify"],this.trackList.group(t)}},methods:{openArtist(){this.showDetailsModal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},openDetails(){this.showDetailsModal=!0},play(){ce.playUri(this.trackList.items.map(t=>t.uri).join(),!0)}}},s6=["textContent"],i6=["textContent"];function r6(t,e,n,s,i,r){const o=w("list-index-buttons"),a=w("control-switch"),l=w("control-dropdown"),c=w("list-options"),u=w("heading-title"),d=w("control-button"),f=w("list-tracks"),h=w("content-with-heading"),p=w("modal-dialog-artist");return x(),$(it,null,[E(h,null,{options:M(()=>[E(o,{indices:r.tracks.indices},null,8,["indices"]),E(c,null,{filter:M(()=>[s.servicesStore.isSpotifyActive?(x(),gt(a,{key:0,modelValue:s.uiStore.hideSpotify,"onUpdate:modelValue":e[0]||(e[0]=m=>s.uiStore.hideSpotify=m)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify"))},null,8,s6)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify-help"))},null,8,i6)]),_:1},8,["modelValue"])):vt("",!0)]),sort:M(()=>[E(l,{value:s.uiStore.artistTracksSort,"onUpdate:value":e[1]||(e[1]=m=>s.uiStore.artistTracksSort=m),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(u,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(d,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(d,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(f,{items:r.tracks,uris:r.trackUris},null,8,["items","uris"])]),_:1}),E(p,{item:i.artist,show:i.showDetailsModal,onClose:e[2]||(e[2]=m=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const o6=st(n6,[["render",r6]]),a6={name:"ListArtists",components:{ListItem:Ls,ModalDialogArtist:gd},props:{items:{required:!0,type:Object}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){this.selectedItem=t;const e=t.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:e,params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function l6(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-artist");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,"is-item":l.isItem,index:l.index,lines:[l.item.name],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Jc=st(a6,[["render",l6]]),c6={name:"PageArtists",components:{ContentWithHeading:ne,ControlDropdown:Ur,ControlSwitch:Fr,HeadingTitle:se,ListIndexButtons:ys,ListArtists:Jc,ListOptions:Ko,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.artists("music").then(s=>{n(i=>{i.artistList=new kt(s)})})},setup(){return{servicesStore:Je(),uiStore:ts()}},data(){return{artistList:new kt}},computed:{artists(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.artistsSort);return t.filters=[e=>!this.uiStore.hideSingles||e.track_count>e.album_count*2,e=>!this.uiStore.hideSpotify||e.data_kind!=="spotify"],this.artistList.group(t)},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("options.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}}]},heading(){return{subtitle:[{count:this.artists.count,key:"data.artists"}],title:this.$t("page.artists.title")}}}},u6=["textContent"],d6=["textContent"],f6=["textContent"],h6=["textContent"];function p6(t,e,n,s,i,r){const o=w("tabs-music"),a=w("list-index-buttons"),l=w("control-switch"),c=w("control-dropdown"),u=w("list-options"),d=w("heading-title"),f=w("list-artists"),h=w("content-with-heading");return x(),$(it,null,[E(o),E(h,null,{options:M(()=>[E(a,{indices:r.artists.indices},null,8,["indices"]),E(u,null,{filter:M(()=>[E(l,{modelValue:s.uiStore.hideSingles,"onUpdate:modelValue":e[0]||(e[0]=p=>s.uiStore.hideSingles=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-singles"))},null,8,u6)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-singles-help"))},null,8,d6)]),_:1},8,["modelValue"]),s.servicesStore.isSpotifyActive?(x(),gt(l,{key:0,modelValue:s.uiStore.hideSpotify,"onUpdate:modelValue":e[1]||(e[1]=p=>s.uiStore.hideSpotify=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify"))},null,8,f6)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify-help"))},null,8,h6)]),_:1},8,["modelValue"])):vt("",!0)]),sort:M(()=>[E(c,{value:s.uiStore.artistsSort,"onUpdate:value":e[2]||(e[2]=p=>s.uiStore.artistsSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(d,{content:r.heading},null,8,["content"])]),content:M(()=>[E(f,{items:r.artists},null,8,["items"])]),_:1})],64)}const m6=st(c6,[["render",p6]]),g6={name:"PageAudiobooksAlbum",components:{ContentWithHero:fd,ControlImage:Hr,HeadingHero:hd,ListTracks:Bn,ModalDialogAlbum:pd},beforeRouteEnter(t,e,n){Promise.all([Ct.album(t.params.id),Ct.albumTracks(t.params.id)]).then(([s,i])=>{n(r=>{r.album=s,r.tracks=new kt(i)})})},data(){return{album:{},showDetailsModal:!1,tracks:new kt}},computed:{heading(){return{count:this.$t("data.tracks",{count:this.album.track_count}),handler:this.openArtist,subtitle:this.album.artist,title:this.album.name,actions:[{handler:this.play,icon:"play",key:"actions.play"},{handler:this.openDetails,icon:"dots-horizontal"}]}}},methods:{openArtist(){this.showDetailsModal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},openDetails(){this.showDetailsModal=!0},play(){ce.playUri(this.album.uri,!1)}}};function y6(t,e,n,s,i,r){const o=w("heading-hero"),a=w("control-image"),l=w("list-tracks"),c=w("content-with-hero"),u=w("modal-dialog-album");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),image:M(()=>[E(a,{url:i.album.artwork_url,caption:i.album.name,class:"is-clickable is-medium",onClick:r.openDetails},null,8,["url","caption","onClick"])]),content:M(()=>[E(l,{items:i.tracks,"show-progress":!0,uris:i.album.uri},null,8,["items","uris"])]),_:1}),E(u,{item:i.album,show:i.showDetailsModal,"media-kind":"audiobook",onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const b6=st(g6,[["render",y6]]),v6={name:"TabsAudiobooks",components:{ControlTabList:lm},computed:{links(){return[{icon:"account-music",key:"page.audiobooks.tabs.authors",to:{name:"audiobooks-artists"}},{icon:"album",key:"page.audiobooks.tabs.audiobooks",to:{name:"audiobooks-albums"}},{icon:"speaker",key:"page.audiobooks.tabs.genres",to:{name:"audiobooks-genres"}}]}}};function _6(t,e,n,s,i,r){const o=w("control-tab-list");return x(),gt(o,{links:r.links},null,8,["links"])}const cm=st(v6,[["render",_6]]),S6={name:"PageAudiobooksAlbums",components:{ContentWithHeading:ne,HeadingTitle:se,ListIndexButtons:ys,ListAlbums:Xn,TabsAudiobooks:cm},beforeRouteEnter(t,e,n){Ct.albums("audiobook").then(s=>{n(i=>{i.albums=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{albums:new kt}},computed:{heading(){return{subtitle:[{count:this.albums.count,key:"data.audiobooks"}],title:this.$t("page.audiobooks.albums.title")}}}};function E6(t,e,n,s,i,r){const o=w("tabs-audiobooks"),a=w("list-index-buttons"),l=w("heading-title"),c=w("list-albums"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.albums.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.albums},null,8,["items"])]),_:1})],64)}const w6=st(S6,[["render",E6]]),k6={name:"PageAudiobooksArtist",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se,ListAlbums:Xn,ModalDialogArtist:gd},beforeRouteEnter(t,e,n){Promise.all([Ct.artist(t.params.id),Ct.artistAlbums(t.params.id)]).then(([s,i])=>{n(r=>{r.artist=s,r.albums=new kt(i)})})},data(){return{albums:new kt,artist:{},showDetailsModal:!1}},computed:{heading(){return this.artist.name?{subtitle:[{count:this.artist.album_count,key:"data.audiobooks"}],title:this.artist.name}:{}}},methods:{openDetails(){this.showDetailsModal=!0},play(){ce.playUri(this.albums.items.map(t=>t.uri).join(),!1)}}};function T6(t,e,n,s,i,r){const o=w("heading-title"),a=w("control-button"),l=w("list-albums"),c=w("content-with-heading"),u=w("modal-dialog-artist");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"play",key:"actions.play"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),_:1}),E(u,{item:i.artist,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const C6=st(k6,[["render",T6]]),A6={name:"PageAudiobooksArtists",components:{ContentWithHeading:ne,HeadingTitle:se,ListIndexButtons:ys,ListArtists:Jc,TabsAudiobooks:cm},beforeRouteEnter(t,e,n){Ct.artists("audiobook").then(s=>{n(i=>{i.artists=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{artists:new kt}},computed:{heading(){return{subtitle:[{count:this.artists.count,key:"data.authors"}],title:this.$t("page.audiobooks.artists.title")}}}};function O6(t,e,n,s,i,r){const o=w("tabs-audiobooks"),a=w("list-index-buttons"),l=w("heading-title"),c=w("list-artists"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.artists.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.artists},null,8,["items"])]),_:1})],64)}const x6=st(A6,[["render",O6]]),I6={name:"ModalDialogGenre",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},mediaKind:{required:!0,type:String},show:Boolean},emits:["close"],computed:{playable(){return{expression:`genre is "${this.item.name}" and media_kind is ${this.mediaKind}`,name:this.item.name,properties:[{key:"property.albums",value:this.item.album_count},{key:"property.tracks",value:this.item.track_count},{key:"property.duration",value:this.$formatters.toTimecode(this.item.length_ms)}]}}}};function P6(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const um=st(I6,[["render",P6]]),N6={name:"ListGenres",components:{ListItem:Ls,ModalDialogGenre:um},props:{items:{required:!0,type:Object},mediaKind:{required:!0,type:String}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){this.$router.push({name:"genre-albums",params:{name:t.name},query:{mediaKind:this.mediaKind}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function D6(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-genre");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,"is-item":l.isItem,index:l.index,lines:[l.item.name],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,"media-kind":n.mediaKind,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1)},null,8,["item","media-kind","show"])],64)}const yS=st(N6,[["render",D6]]),M6={name:"PageAudiobooksGenres",components:{ContentWithHeading:ne,HeadingTitle:se,ListIndexButtons:ys,ListGenres:yS,TabsAudiobooks:cm},beforeRouteEnter(t,e,n){Ct.genres("audiobook").then(s=>{n(i=>{i.genres=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{genres:new kt}},computed:{heading(){return{subtitle:[{count:this.genres.total,key:"data.genres"}],title:this.$t("page.genres.title")}}}};function R6(t,e,n,s,i,r){const o=w("tabs-audiobooks"),a=w("list-index-buttons"),l=w("heading-title"),c=w("list-genres"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.genres.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.genres,"media-kind":"audiobook"},null,8,["items"])]),_:1})],64)}const L6=st(M6,[["render",R6]]),$6={name:"ModalDialogComposer",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){return{expression:`composer is "${this.item.name}" and media_kind is music`,name:this.item.name,properties:[{handler:this.openAlbums,key:"property.albums",value:this.item.album_count},{handler:this.openTracks,key:"property.tracks",value:this.item.track_count},{key:"property.duration",value:this.$formatters.toTimecode(this.item.length_ms)}]}}},methods:{openAlbums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.item.name}})},openTracks(){this.$emit("close"),this.$router.push({name:"music-composer-tracks",params:{name:this.item.name}})}}};function F6(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const dm=st($6,[["render",F6]]),V6={name:"PageComposerAlbums",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se,ListAlbums:Xn,ModalDialogComposer:dm},beforeRouteEnter(t,e,n){Promise.all([Ct.composer(t.params.name),Ct.composerAlbums(t.params.name)]).then(([s,i])=>{n(r=>{r.composer=s,r.albums=new kt(i)})})},data(){return{albums:new kt,composer:{},showDetailsModal:!1}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},heading(){return this.composer.name?{subtitle:[{count:this.composer.album_count,key:"data.albums"},{count:this.composer.track_count,handler:this.openTracks,key:"data.tracks"}],title:this.composer.name}:{}}},methods:{openDetails(){this.showDetailsModal=!0},openTracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){ce.playExpression(this.expression,!0)}}};function H6(t,e,n,s,i,r){const o=w("heading-title"),a=w("control-button"),l=w("list-albums"),c=w("content-with-heading"),u=w("modal-dialog-composer");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),_:1}),E(u,{item:i.composer,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const U6=st(V6,[["render",H6]]),j6={name:"PageComposerTracks",components:{ContentWithHeading:ne,ControlButton:on,ControlDropdown:Ur,HeadingTitle:se,ListIndexButtons:ys,ListOptions:Ko,ListTracks:Bn,ModalDialogComposer:dm},beforeRouteEnter(t,e,n){Promise.all([Ct.composer(t.params.name),Ct.composerTracks(t.params.name)]).then(([s,i])=>{n(r=>{r.composer=s,r.trackList=new kt(i)})})},setup(){return{uiStore:ts()}},data(){return{composer:{},showDetailsModal:!1,trackList:new kt}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("options.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}]},heading(){return this.composer.name?{subtitle:[{count:this.composer.album_count,handler:this.openAlbums,key:"data.albums"},{count:this.composer.track_count,key:"data.tracks"}],title:this.composer.name}:{}},tracks(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.composerTracksSort);return this.trackList.group(t)}},methods:{openAlbums(){this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},openDetails(){this.showDetailsModal=!0},play(){ce.playExpression(this.expression,!0)}}};function B6(t,e,n,s,i,r){const o=w("list-index-buttons"),a=w("control-dropdown"),l=w("list-options"),c=w("heading-title"),u=w("control-button"),d=w("list-tracks"),f=w("content-with-heading"),h=w("modal-dialog-composer");return x(),$(it,null,[E(f,null,{options:M(()=>[E(o,{indices:r.tracks.indices},null,8,["indices"]),E(l,null,{sort:M(()=>[E(a,{value:s.uiStore.composerTracksSort,"onUpdate:value":e[0]||(e[0]=p=>s.uiStore.composerTracksSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(c,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(u,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(u,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(d,{items:r.tracks,expression:r.expression},null,8,["items","expression"])]),_:1}),E(h,{item:i.composer,show:i.showDetailsModal,onClose:e[1]||(e[1]=p=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const W6=st(j6,[["render",B6]]),G6={name:"ListComposers",components:{ListItem:Ls,ModalDialogComposer:dm},props:{items:{required:!0,type:Object}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){this.selectedItem=t,this.$router.push({name:"music-composer-albums",params:{name:t.name}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function K6(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-composer");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,"is-item":l.isItem,index:l.index,lines:[l.item.name],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Ch=st(G6,[["render",K6]]),z6={name:"PageComposers",components:{ContentWithHeading:ne,HeadingTitle:se,ListIndexButtons:ys,ListComposers:Ch,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.composers("music").then(s=>{n(i=>{i.composers=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{composers:new kt}},computed:{heading(){return{subtitle:[{count:this.composers.total,key:"data.composers"}],title:this.$t("page.composers.title")}}}};function q6(t,e,n,s,i,r){const o=w("tabs-music"),a=w("list-index-buttons"),l=w("heading-title"),c=w("list-composers"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.composers.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.composers},null,8,["items"])]),_:1})],64)}const X6=st(z6,[["render",q6]]),Y6={name:"ModalDialogDirectory",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:String},show:Boolean},emits:["close"],computed:{playable(){return{expression:`path starts with "${this.item}" order by path asc`,name:this.item}}}};function Z6(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const J6=st(Y6,[["render",Z6]]),Q6={name:"ListDirectories",components:{ListItem:Ls,ModalDialogDirectory:J6},props:{items:{required:!0,type:Array}},data(){return{selectedItem:"",showDetailsModal:!1}},computed:{directories(){var n;const t=[];let e="";return(n=this.$route.query)==null||n.directory.split("/").slice(1,-1).forEach((s,i)=>{e=`${e}/${s}`,t.push({index:i,name:s,path:e})}),t}},methods:{open(t){const e={name:"files"};t.index!==0&&(e.query={directory:t.path}),this.$router.push(e)},openDetails(t){this.selectedItem=t.path,this.showDetailsModal=!0},openParent(){this.open(this.directories.slice(-1).pop())}}},tF={key:0,class:"media is-align-items-center mb-0"},eF={class:"media-content"},nF={class:"breadcrumb"},sF=["onClick","textContent"],iF={class:"media-right"};function rF(t,e,n,s,i,r){const o=w("mdicon"),a=w("list-item"),l=w("modal-dialog-directory");return x(),$(it,null,[t.$route.query.directory?(x(),$("div",tF,[E(o,{class:"icon media-left is-clickable",name:"chevron-left",onClick:r.openParent},null,8,["onClick"]),A("div",eF,[A("nav",nF,[A("ul",null,[(x(!0),$(it,null,ae(r.directories,c=>(x(),$("li",{key:c.index},[A("a",{onClick:u=>r.open(c),textContent:J(c.name)},null,8,sF)]))),128))])])]),A("div",iF,[oe(t.$slots,"actions")])])):vt("",!0),(x(!0),$(it,null,ae(n.items,c=>(x(),gt(a,{key:c.path,icon:"folder",lines:[c.name],onOpen:u=>r.open(c),onOpenDetails:u=>r.openDetails(c)},null,8,["lines","onOpen","onOpenDetails"]))),128)),E(l,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=c=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const oF=st(Q6,[["render",rF]]),aF={name:"ModalDialogPlaylist",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean,uris:{default:"",type:String}},emits:["close"],computed:{playable(){return{name:this.item.name,properties:[{key:"property.tracks",value:this.item.item_count},{key:"property.type",value:this.$t(`playlist.type.${this.item.type}`)},{key:"property.path",value:this.item.path}],uri:this.item.uri,uris:this.uris}}}};function lF(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const bS=st(aF,[["render",lF]]),cF={name:"ListPlaylists",components:{ListItem:Ls,ModalDialogPlaylist:bS},props:{items:{required:!0,type:Object}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{icon(t){return t.type==="folder"?"folder":t.type==="rss"?"rss":"music-box-multiple"},open(t){t.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:t.id}}):this.$router.push({name:"playlist",params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function uF(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-playlist");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,icon:r.icon(l.item),"is-item":l.isItem,index:l.index,lines:[l.item.name],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["icon","is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Qc=st(cF,[["render",uF]]),dF={name:"PageFiles",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se,ListDirectories:oF,ListPlaylists:Qc,ListTracks:Bn,ModalDialogPlayable:gs},beforeRouteEnter(t,e,n){n(async s=>{await s.fetchData(t)})},beforeRouteUpdate(t,e,n){this.fetchData(t).then(()=>n())},setup(){return{configurationStore:Vo()}},data(){return{directories:[],playlists:new kt,showDetailsModal:!1,tracks:new kt}},computed:{current(){var t;return((t=this.$route.query)==null?void 0:t.directory)||"/"},name(){var t;return this.current!=="/"?(t=this.current)==null?void 0:t.slice(this.current.lastIndexOf("/")+1):this.$t("page.files.title")},playable(){return{expression:`path starts with "${this.current}" order by path asc`,name:this.current,properties:[{key:"property.folders",value:this.directories.length},{key:"property.playlists",value:this.playlists.total},{key:"property.tracks",value:this.tracks.total}]}}},methods:{async fetchData(t){if(t.query.directory){const e=await Ct.files(t.query.directory);e&&(this.directories=e.directories.map(n=>this.transform(n.path)),this.playlists=new kt(e.playlists),this.tracks=new kt(e.tracks))}else{const e=await W0.list();this.directories=e.directories.map(n=>this.transform(n)),this.playlists=new kt,this.tracks=new kt}},openDetails(){this.showDetailsModal=!0},play(){ce.playExpression(this.expression,!1)},transform(t){return{name:t.slice(t.lastIndexOf("/")+1),path:t}}}};function fF(t,e,n,s,i,r){const o=w("heading-title"),a=w("control-button"),l=w("list-directories"),c=w("list-playlists"),u=w("list-tracks"),d=w("content-with-heading"),f=w("modal-dialog-playable");return x(),$(it,null,[E(d,null,{heading:M(()=>[E(o,{content:{title:r.name}},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"play",key:"actions.play"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.directories},null,8,["items"]),E(c,{items:i.playlists},null,8,["items"]),E(u,{items:i.tracks,icon:"file-music-outline"},null,8,["items"])]),_:1}),E(f,{item:r.playable,show:i.showDetailsModal,onClose:e[0]||(e[0]=h=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const hF=st(dF,[["render",fF]]),pF={name:"PageGenreAlbums",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se,ListIndexButtons:ys,ListAlbums:Xn,ModalDialogGenre:um},beforeRouteEnter(t,e,n){Promise.all([Ct.genre(t.params.name,t.query.mediaKind),Ct.genreAlbums(t.params.name,t.query.mediaKind)]).then(([s,i])=>{n(r=>{r.genre=s.items.shift(),r.albums=new kt(i,{index:{field:"name_sort",type:String}})})})},data(){return{albums:new kt,genre:{},mediaKind:this.$route.query.mediaKind,showDetailsModal:!1}},computed:{heading(){return this.genre.name?{subtitle:[{count:this.genre.album_count,key:"data.albums"},{count:this.genre.track_count,handler:this.openTracks,key:"data.tracks"}],title:this.genre.name}:{}}},methods:{openDetails(){this.showDetailsModal=!0},openTracks(){this.showDetailsModal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{mediaKind:this.mediaKind}})},play(){ce.playExpression(`genre is "${this.genre.name}" and media_kind is ${this.mediaKind}`,!0)}}};function mF(t,e,n,s,i,r){const o=w("list-index-buttons"),a=w("heading-title"),l=w("control-button"),c=w("list-albums"),u=w("content-with-heading"),d=w("modal-dialog-genre");return x(),$(it,null,[E(u,null,{options:M(()=>[E(o,{indices:i.albums.indices},null,8,["indices"])]),heading:M(()=>[E(a,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(l,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(l,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(c,{items:i.albums},null,8,["items"])]),_:1}),E(d,{item:i.genre,"media-kind":i.mediaKind,show:i.showDetailsModal,onClose:e[0]||(e[0]=f=>i.showDetailsModal=!1)},null,8,["item","media-kind","show"])],64)}const gF=st(pF,[["render",mF]]),yF={name:"PageGenreTracks",components:{ContentWithHeading:ne,ControlButton:on,ControlDropdown:Ur,HeadingTitle:se,ListIndexButtons:ys,ListOptions:Ko,ListTracks:Bn,ModalDialogGenre:um},beforeRouteEnter(t,e,n){Promise.all([Ct.genre(t.params.name,t.query.mediaKind),Ct.genreTracks(t.params.name,t.query.mediaKind)]).then(([s,i])=>{n(r=>{r.genre=s.items.shift(),r.trackList=new kt(i)})})},setup(){return{uiStore:ts()}},data(){return{genre:{},mediaKind:this.$route.query.mediaKind,showDetailsModal:!1,trackList:new kt}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.mediaKind}`},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("options.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}]},heading(){return this.genre.name?{subtitle:[{count:this.genre.album_count,handler:this.openGenre,key:"data.albums"},{count:this.genre.track_count,key:"data.tracks"}],title:this.genre.name}:{}},tracks(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.genreTracksSort);return this.trackList.group(t)}},methods:{openGenre(){this.showDetailsModal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{mediaKind:this.mediaKind}})},play(){ce.playExpression(this.expression,!0)},openDetails(){this.showDetailsModal=!0}}};function bF(t,e,n,s,i,r){const o=w("list-index-buttons"),a=w("control-dropdown"),l=w("list-options"),c=w("heading-title"),u=w("control-button"),d=w("list-tracks"),f=w("content-with-heading"),h=w("modal-dialog-genre");return x(),$(it,null,[E(f,null,{options:M(()=>[E(o,{indices:r.tracks.indices},null,8,["indices"]),E(l,null,{sort:M(()=>[E(a,{value:s.uiStore.genreTracksSort,"onUpdate:value":e[0]||(e[0]=p=>s.uiStore.genreTracksSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(c,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(u,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(u,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(d,{items:r.tracks,expression:r.expression},null,8,["items","expression"])]),_:1}),E(h,{item:i.genre,"media-kind":i.mediaKind,show:i.showDetailsModal,onClose:e[1]||(e[1]=p=>i.showDetailsModal=!1)},null,8,["item","media-kind","show"])],64)}const vF=st(yF,[["render",bF]]),_F={name:"PageGenres",components:{ContentWithHeading:ne,HeadingTitle:se,ListIndexButtons:ys,ListGenres:yS,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.genres("music").then(s=>{n(i=>{i.genres=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{genres:new kt}},computed:{heading(){return{subtitle:[{count:this.genres.total,key:"data.genres"}],title:this.$t("page.genres.title")}}}};function SF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("list-index-buttons"),l=w("heading-title"),c=w("list-genres"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.genres.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.genres,"media-kind":"music"},null,8,["items"])]),_:1})],64)}const EF=st(_F,[["render",SF]]),wF={name:"PageMusic",components:{ContentWithHeading:ne,HeadingTitle:se,ListAlbums:Xn,ListTracks:Bn,TabsMusic:Zs},beforeRouteEnter(t,e,n){Promise.all([Ct.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"}),Ct.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3,type:"track"})]).then(([{albums:s},{tracks:i}])=>{n(r=>{r.albums=new kt(s),r.tracks=new kt(i)})})},data(){return{albums:[],tracks:null}}};function kF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("heading-title"),l=w("list-albums"),c=w("router-link"),u=w("content-with-heading"),d=w("list-tracks");return x(),$(it,null,[E(o),E(u,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.music.recently-added.title")}},null,8,["content"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),footer:M(()=>[E(c,{class:"button is-small is-rounded",to:{name:"music-recently-added"}},{default:M(()=>[qs(J(t.$t("actions.show-more")),1)]),_:1})]),_:1}),E(u,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.music.recently-played.title")}},null,8,["content"])]),content:M(()=>[E(d,{items:i.tracks},null,8,["items"])]),footer:M(()=>[E(c,{class:"button is-small is-rounded",to:{name:"music-recently-played"}},{default:M(()=>[qs(J(t.$t("actions.show-more")),1)]),_:1})]),_:1})],64)}const TF=st(wF,[["render",kF]]),CF={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:ne,HeadingTitle:se,ListAlbums:Xn,TabsMusic:Zs},beforeRouteEnter(t,e,n){const s=bi().recentlyAddedLimit;Ct.search({expression:"media_kind is music having track_count > 3 order by time_added desc",limit:s,type:"album"}).then(i=>{n(r=>{r.albums=new kt(i.albums,{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}})})})},setup(){return{settingsStore:bi()}},data(){return{albums:new kt}}};function AF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("heading-title"),l=w("list-albums"),c=w("content-with-heading");return x(),$(it,null,[E(o),E(c,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.music.recently-added.title")}},null,8,["content"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),_:1})],64)}const OF=st(CF,[["render",AF]]),xF={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:ne,HeadingTitle:se,ListTracks:Bn,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50,type:"track"}).then(s=>{n(i=>{i.tracks=new kt(s.tracks)})})},data(){return{tracks:new kt}}};function IF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("heading-title"),l=w("list-tracks"),c=w("content-with-heading");return x(),$(it,null,[E(o),E(c,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.music.recently-played.title")}},null,8,["content"])]),content:M(()=>[E(l,{items:i.tracks},null,8,["items"])]),_:1})],64)}const PF=st(xF,[["render",IF]]),NF={name:"ModalDialogPlaylistSpotify",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){var t,e;return{name:this.item.name,properties:[{key:"property.owner",value:(t=this.item.owner)==null?void 0:t.display_name},{key:"property.tracks",value:(e=this.item.tracks)==null?void 0:e.total},{key:"property.path",value:this.item.uri}],uri:this.item.uri}}}};function DF(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const vS=st(NF,[["render",DF]]),MF={name:"ListPlaylistsSpotify",components:{ListItem:Ls,LoaderListItem:md,ModalDialogPlaylistSpotify:vS},props:{items:{required:!0,type:Object},load:{default:null,type:Function},loaded:{default:!0,type:Boolean}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){this.$router.push({name:"playlist-spotify",params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function RF(t,e,n,s,i,r){const o=w("list-item"),a=w("loader-list-item"),l=w("modal-dialog-playlist-spotify");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,c=>(x(),gt(o,{key:c.id,"is-item":c.isItem,index:c.index,lines:[c.name,c.owner.display_name],onOpen:u=>r.open(c),onOpenDetails:u=>r.openDetails(c)},null,8,["is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{load:n.load,loaded:n.loaded},null,8,["load","loaded"]),E(l,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=c=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const tu=st(MF,[["render",RF]]),LF={name:"PageMusicSpotify",components:{ContentWithHeading:ne,HeadingTitle:se,ListAlbumsSpotify:Qa,ListPlaylistsSpotify:tu,TabsMusic:Zs},beforeRouteEnter(t,e,n){xs.spotify().then(s=>{const i=new Xs;i.setAccessToken(s.webapi_token),Promise.all([i.getNewReleases({country:s.webapi_country,limit:3}),i.getFeaturedPlaylists({country:s.webapi_country,limit:3})]).then(r=>{n(o=>{o.albums=r[0].albums.items,o.playlists=r[1].playlists.items})})})},data(){return{albums:[],playlists:[]}}};function $F(t,e,n,s,i,r){const o=w("tabs-music"),a=w("heading-title"),l=w("list-albums-spotify"),c=w("router-link"),u=w("content-with-heading"),d=w("list-playlists-spotify");return x(),$(it,null,[E(o),E(u,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.spotify.music.new-releases")}},null,8,["content"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),footer:M(()=>[E(c,{to:{name:"music-spotify-new-releases"},class:"button is-small is-rounded"},{default:M(()=>[qs(J(t.$t("actions.show-more")),1)]),_:1})]),_:1}),E(u,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.spotify.music.featured-playlists")}},null,8,["content"])]),content:M(()=>[E(d,{items:i.playlists},null,8,["items"])]),footer:M(()=>[E(c,{to:{name:"music-spotify-featured-playlists"},class:"button is-small is-rounded"},{default:M(()=>[qs(J(t.$t("actions.show-more")),1)]),_:1})]),_:1})],64)}const FF=st(LF,[["render",$F]]),VF={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:ne,HeadingTitle:se,ListPlaylistsSpotify:tu,TabsMusic:Zs},beforeRouteEnter(t,e,n){xs.spotify().then(s=>{const i=new Xs;i.setAccessToken(s.webapi_token),i.getFeaturedPlaylists({country:s.webapi_country,limit:50}).then(r=>{n(o=>{o.playlists=r.playlists.items})})})},data(){return{playlists:[]}},computed:{heading(){return{title:this.$t("page.spotify.music.featured-playlists")}}}};function HF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("heading-title"),l=w("list-playlists-spotify"),c=w("content-with-heading");return x(),$(it,null,[E(o),E(c,null,{heading:M(()=>[E(a,{content:r.heading},null,8,["content"])]),content:M(()=>[E(l,{items:i.playlists},null,8,["items"])]),_:1})],64)}const UF=st(VF,[["render",HF]]),jF={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:ne,HeadingTitle:se,ListAlbumsSpotify:Qa,TabsMusic:Zs},beforeRouteEnter(t,e,n){xs.spotify().then(s=>{const i=new Xs;i.setAccessToken(s.webapi_token),i.getNewReleases({country:s.webapi_country,limit:50}).then(r=>{n(o=>{o.albums=r.albums.items})})})},data(){return{albums:[]}},computed:{heading(){return{title:this.$t("page.spotify.music.new-releases")}}}};function BF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("heading-title"),l=w("list-albums-spotify"),c=w("content-with-heading");return x(),$(it,null,[E(o),E(c,null,{heading:M(()=>[E(a,{content:r.heading},null,8,["content"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),_:1})],64)}const WF=st(jF,[["render",BF]]),GF={name:"ModalDialogQueueItem",components:{ListProperties:pS,ModalDialog:sr},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],setup(){return{servicesStore:Je()}},data(){return{spotifyTrack:{}}},computed:{actions(){return[{handler:this.remove,icon:"delete",key:"actions.remove"},{handler:this.play,icon:"play",key:"actions.play"}]},playable(){return{name:this.item.title,properties:[{handler:this.openAlbum,key:"property.album",value:this.item.album},{handler:this.openAlbumArtist,key:"property.album-artist",value:this.item.album_artist},{key:"property.composer",value:this.item.composer},{key:"property.year",value:this.item.year},{handler:this.openGenre,key:"property.genre",value:this.item.genre},{key:"property.position",value:[this.item.disc_number,this.item.track_number].join(" / ")},{key:"property.duration",value:this.$formatters.toTimecode(this.item.length_ms)},{key:"property.path",value:this.item.path},{key:"property.type",value:`${this.$t(`media.kind.${this.item.media_kind}`)} - ${this.$t(`data.kind.${this.item.data_kind}`)}`},{key:"property.quality",value:this.$t("dialog.track.quality-value",{bitrate:this.item.bitrate,channels:this.$t("data.channels",this.item.channels),format:this.item.type,samplerate:this.item.samplerate})}],uri:this.item.uri}}},watch:{item(){var t;if(((t=this.item)==null?void 0:t.data_kind)==="spotify"){const e=new Xs;e.setAccessToken(this.servicesStore.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(n=>{this.spotifyTrack=n})}else this.spotifyTrack={}}},methods:{openAlbum(){this.$emit("close"),this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-album",params:{id:this.spotifyTrack.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}})},openAlbumArtist(){this.$emit("close"),this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotifyTrack.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}})},openGenre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{mediaKind:this.item.media_kind}})},play(){this.$emit("close"),sn.play({item_id:this.item.id})},remove(){this.$emit("close"),ce.remove(this.item.id)}}};function KF(t,e,n,s,i,r){const o=w("list-properties"),a=w("modal-dialog");return x(),gt(a,{actions:r.actions,show:n.show,title:n.item.title,onClose:e[0]||(e[0]=l=>t.$emit("close"))},{content:M(()=>[E(o,{item:r.playable},null,8,["item"])]),_:1},8,["actions","show","title"])}const _S=st(GF,[["render",KF]]),SS=7,zF=Math.floor(SS/2),qF={name:"PaneLyrics",setup(){return{playerStore:Wn(),queueStore:ms()}},data(){return{lastIndex:-1,time:0,timerId:null,lastProgress:0,lastUpdateTime:0,lyrics:[]}},computed:{verseIndex(){var i;const t=this.time,{lyrics:e}=this;let n=0,s=e.length-1;for(;n<=s;){const r=Math.floor((n+s)/2),o=e[r].time,a=(i=e[r+1])==null?void 0:i.time;if(o<=t&&(!a||a>t))return r;o{const i=t-zF+s;return i>=0&&i=t.start&&this.time\d+):(?\d+)(?:\.(?\d+))?\] ?(?.*)/u;return this.playerStore.lyricsContent.split(` -`).forEach(n=>{const s=e.exec(n);if(s){const{text:i,minutes:r,seconds:o,hundredths:a}=s.groups,l=i.trim();if(l){const c=(Number(r)*60+ +`${o}.${a??0}`)*1e3;t.push({text:l,time:c})}}}),t.forEach((n,s,i)=>{var u;const o=(((u=i[s+1])==null?void 0:u.time)??n.time+3e3)-n.time,a=n.text.match(/\S+\s*/gu)||[],l=a.reduce((d,f)=>d+f.length,0);let c=n.time;n.words=a.map(d=>{const f=o*(d.length/l),h=c,p=h+f;return c=p,{text:d,start:h,end:p}})}),t},startTimer(){this.timerId||(this.timerId=setInterval(this.tick,100))},stopTimer(){this.timerId&&(clearInterval(this.timerId),this.timerId=null)},tick(){this.time=this.lastProgress+Date.now()-this.lastUpdateTime},updateTime(){this.playerStore.isPlaying?this.startTimer():this.time=this.lastProgress}}},XF={class:"lyrics is-overlay"},YF={key:0},ZF={key:0,class:"title is-5 my-5 lh-2"},JF=["textContent"],QF=["textContent"],tV={key:1,textContent:" "};function eV(t,e,n,s,i,r){return x(),$("div",XF,[(x(!0),$(it,null,ae(r.visibleLyrics,(o,a)=>(x(),$("div",{key:a},[o?(x(),$("div",YF,[a===3?(x(),$("div",ZF,[(x(!0),$(it,null,ae(o.words,(l,c)=>(x(),$("span",{key:c,class:Kt({"is-highlighted":r.isWordHighlighted(l)}),textContent:J(l.text)},null,10,JF))),128))])):(x(),$("div",{key:1,class:"lh-2",textContent:J(o.text)},null,8,QF))])):(x(),$("div",tV))]))),128))])}const nV=st(qF,[["render",eV],["__scopeId","data-v-ba81ee93"]]),Ii=1e3,sV={name:"PageNowPlaying",components:{ControlImage:Hr,ControlSlider:Hu,PaneLyrics:nV,ModalDialogQueueItem:_S},setup(){return{playerStore:Wn(),queueStore:ms(),settingsStore:bi()}},data(){return{INTERVAL:Ii,intervalId:0,isDragged:!1,selectedItem:{},showDetailsModal:!1}},computed:{composer(){if(this.settingsStore.showComposerNowPlaying){const t=this.settingsStore.showComposerForGenre;if(!t||this.track.genre&&t.toLowerCase().split(",").findIndex(e=>this.track.genre.toLowerCase().indexOf(e.trim())>=0)>=0)return this.track.composer}return null},isLive(){return this.track.length_ms===0},track(){return this.queueStore.current},trackElapsedTime(){return this.$formatters.toTimecode(this.trackProgress*Ii)},trackProgress:{get(){return Math.floor(this.playerStore.item_progress_ms/Ii)},set(t){this.playerStore.item_progress_ms=t*Ii}},trackProgressMax(){return this.isLive?1:Math.floor(this.track.length_ms/Ii)},trackTotalTime(){return this.$t("page.now-playing.time",this.track.length_ms,{named:{time:this.$formatters.toTimecode(this.track.length_ms)}})}},watch:{"playerStore.state"(t){this.intervalId>0&&(window.clearTimeout(this.intervalId),this.intervalId=0),t==="play"&&(this.intervalId=window.setInterval(this.tick,Ii))}},created(){this.playerStore.state==="play"&&(this.intervalId=window.setInterval(this.tick,Ii))},unmounted(){this.intervalId>0&&(window.clearTimeout(this.intervalId),this.intervalId=0)},methods:{endDragging(){this.isDragged=!1},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0},seek(){this.isLive||sn.seekToPosition(this.trackProgress*Ii)},startDragging(){this.isDragged=!0},tick(){this.isDragged||(this.trackProgress+=1)}}},iV={class:"is-flex is-align-items-center has-text-centered px-5 is-full-height"},rV={key:0,class:"mx-auto",style:{"max-width":"32rem"}},oV={class:"is-relative"},aV={class:"is-flex is-justify-content-space-between"},lV=["textContent"],cV=["textContent"],uV=["textContent"],dV=["textContent"],fV=["textContent"],hV=["textContent"],pV=["textContent"],mV={key:1,class:"mx-auto"},gV=["textContent"],yV=["textContent"];function bV(t,e,n,s,i,r){const o=w("control-image"),a=w("pane-lyrics"),l=w("control-slider"),c=w("modal-dialog-queue-item");return x(),$(it,null,[A("div",iV,[r.track.id?(x(),$("div",rV,[A("div",oV,[E(o,{url:r.track.artwork_url,caption:r.track.album,class:Kt(["is-clickable is-big",{"is-masked":s.playerStore.lyrics}]),onClick:e[0]||(e[0]=u=>r.openDetails(r.track))},null,8,["url","caption","class"]),s.playerStore.lyrics?(x(),gt(a,{key:0})):vt("",!0)]),E(l,{value:r.trackProgress,"onUpdate:value":e[1]||(e[1]=u=>r.trackProgress=u),class:"mt-5",disabled:r.isLive,max:r.trackProgressMax,onChange:r.seek,onMousedown:r.startDragging,onMouseup:r.endDragging},null,8,["value","disabled","max","onChange","onMousedown","onMouseup"]),A("div",aV,[A("p",{class:"subtitle is-7",textContent:J(r.trackElapsedTime)},null,8,lV),A("p",{class:"subtitle is-7",textContent:J(r.trackTotalTime)},null,8,cV)]),A("p",{class:"title is-5",textContent:J(r.track.title)},null,8,uV),A("p",{class:"title is-6",textContent:J(r.track.artist)},null,8,dV),r.composer?(x(),$("p",{key:0,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:J(r.composer)},null,8,fV)):vt("",!0),r.track.album?(x(),$("p",{key:1,class:"subtitle is-6",textContent:J(r.track.album)},null,8,hV)):vt("",!0),s.settingsStore.showFilepathNowPlaying?(x(),$("p",{key:2,class:"subtitle is-6 has-text-grey",textContent:J(r.track.path)},null,8,pV)):vt("",!0)])):(x(),$("div",mV,[A("p",{class:"title is-5",textContent:J(t.$t("page.now-playing.title"))},null,8,gV),A("p",{class:"subtitle",textContent:J(t.$t("page.now-playing.info"))},null,8,yV)]))]),E(c,{show:i.showDetailsModal,item:i.selectedItem,onClose:e[2]||(e[2]=u=>i.showDetailsModal=!1)},null,8,["show","item"])],64)}const vV=st(sV,[["render",bV],["__scopeId","data-v-ec80d8c8"]]),_V={name:"PagePlaylistFolder",components:{ContentWithHeading:ne,HeadingTitle:se,ListPlaylists:Qc},beforeRouteEnter(t,e,n){n(async s=>{await s.fetchData(t.params.id)})},beforeRouteUpdate(t,e,n){this.fetchData(t.params.id).then(()=>n())},setup(){return{configurationStore:Vo()}},data(){return{playlist:{},playlistList:new kt}},computed:{heading(){return{subtitle:[{count:this.playlists.count,key:"data.playlists"}],title:this.$t("page.playlists.title",this.playlists.count,{name:this.playlist.name})}},playlists(){return this.playlistList.group({filters:[t=>t.folder||this.configurationStore.radio_playlists||t.stream_count===0||t.item_count>t.stream_count]})}},methods:{async fetchData(t){const[e,n]=await Promise.all([Ct.playlist(t),Ct.playlistFolder(t)]);this.playlist=e,this.playlistList=new kt(n)}}};function SV(t,e,n,s,i,r){const o=w("heading-title"),a=w("list-playlists"),l=w("content-with-heading");return x(),gt(l,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),content:M(()=>[E(a,{items:r.playlists},null,8,["items"])]),_:1})}const EV=st(_V,[["render",SV]]),wV={name:"PagePlaylistTracks",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se,ListTracks:Bn,ModalDialogPlaylist:bS},beforeRouteEnter(t,e,n){Promise.all([Ct.playlist(t.params.id),Ct.playlistTracks(t.params.id)]).then(([s,i])=>{n(r=>{r.playlist=s,r.tracks=new kt(i)})})},data(){return{playlist:{},showDetailsModal:!1,tracks:new kt}},computed:{heading(){return{subtitle:[{count:this.tracks.count,key:"data.tracks"}],title:this.playlist.name}},uris(){return this.playlist.random?this.tracks.map(t=>t.uri).join():this.playlist.uri}},methods:{play(){ce.playUri(this.uris,!0)},openDetails(){this.showDetailsModal=!0}}};function kV(t,e,n,s,i,r){const o=w("heading-title"),a=w("control-button"),l=w("list-tracks"),c=w("content-with-heading"),u=w("modal-dialog-playlist");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"},disabled:i.tracks.count===0},null,8,["button","disabled"])]),content:M(()=>[E(l,{items:i.tracks,uris:r.uris},null,8,["items","uris"])]),_:1}),E(u,{item:i.playlist,show:i.showDetailsModal,uris:r.uris,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show","uris"])],64)}const TV=st(wV,[["render",kV]]),af=50,CV={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se,ListTracksSpotify:Zc,ModalDialogPlaylistSpotify:vS},beforeRouteEnter(t,e,n){const s=new Xs;s.setAccessToken(Je().spotify.webapi_token),Promise.all([s.getPlaylist(t.params.id),s.getPlaylistTracks(t.params.id,{limit:af,market:Je().$state.spotify.webapi_country,offset:0})]).then(([i,r])=>{n(o=>{o.playlist=i,o.tracks=[],o.total=0,o.offset=0,o.appendTracks(r)})})},setup(){return{servicesStore:Je()}},data(){return{offset:0,playlist:{tracks:{}},showDetailsModal:!1,total:0,tracks:[]}},computed:{heading(){return this.playlist.name?{subtitle:[{count:this.playlist.tracks.total,key:"data.playlists"}],title:this.playlist.name}:{}},loaded(){return!(this.offsetn.position).filter(n=>n));t.items.forEach(n=>{const{track:s}=n;s&&(s.is_playable&&(e+=1,s.position=e),this.tracks.push(s))}),this.total=t.total,this.offset+=t.limit},load({loaded:t}){const e=new Xs;e.setAccessToken(this.servicesStore.spotify.webapi_token),e.getPlaylistTracks(this.playlist.id,{limit:af,market:this.servicesStore.spotify.webapi_country,offset:this.offset}).then(n=>{this.appendTracks(n),t(n.items.length,af)})},play(){this.showDetailsModal=!1,ce.playUri(this.playlist.uri,!0)},openDetails(){this.showDetailsModal=!0}}};function AV(t,e,n,s,i,r){const o=w("heading-title"),a=w("control-button"),l=w("list-tracks-spotify"),c=w("content-with-heading"),u=w("modal-dialog-playlist-spotify");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"},disabled:i.playlist.tracks.total===0},null,8,["button","disabled"])]),content:M(()=>[E(l,{"context-uri":i.playlist.uri,items:i.tracks,load:r.load,loaded:r.loaded},null,8,["context-uri","items","load","loaded"])]),_:1}),E(u,{item:i.playlist,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const OV=st(CV,[["render",AV]]),xV={name:"PagePodcast",components:{ContentWithHero:fd,ControlImage:Hr,HeadingHero:hd,ListTracks:Bn,ModalDialogAlbum:pd},beforeRouteEnter(t,e,n){Promise.all([Ct.album(t.params.id),Ct.podcastEpisodes(t.params.id)]).then(([s,i])=>{n(r=>{r.album=s,r.tracks=new kt(i)})})},data(){return{album:{},showDetailsModal:!1,tracks:new kt}},computed:{heading(){return{count:this.$t("data.tracks",{count:this.album.track_count}),subtitle:"",title:this.album.name,actions:[{handler:this.play,icon:"play",key:"actions.play"},{handler:this.openDetails,icon:"dots-horizontal"}]}}},methods:{play(){ce.playUri(this.album.uri,!1)},reloadTracks(){Ct.podcastEpisodes(this.album.id).then(t=>{this.tracks=new kt(t)})},openDetails(){this.showDetailsModal=!0},podcastDeleted(){this.$router.push({name:"podcasts"})}}};function IV(t,e,n,s,i,r){const o=w("heading-hero"),a=w("control-image"),l=w("list-tracks"),c=w("modal-dialog-album"),u=w("content-with-hero");return x(),gt(u,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),image:M(()=>[E(a,{url:i.album.artwork_url,caption:i.album.name,class:"is-clickable is-medium",onClick:r.openDetails},null,8,["url","caption","onClick"])]),content:M(()=>[E(l,{items:i.tracks,"show-progress":!0,onPlayCountChanged:r.reloadTracks},null,8,["items","onPlayCountChanged"]),E(c,{item:i.album,show:i.showDetailsModal,"media-kind":"podcast",onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1),onPlayCountChanged:r.reloadTracks,onPodcastDeleted:r.podcastDeleted},null,8,["item","show","onPlayCountChanged","onPodcastDeleted"])]),_:1})}const PV=st(xV,[["render",IV]]),NV={name:"ControlUrlField",props:{help:{default:"",type:String},icon:{required:!0,type:String},loading:{default:!1,type:Boolean},placeholder:{required:!0,type:String}},emits:["input"],data(){return{value:""}},mounted(){setTimeout(()=>{this.$refs.input.focus()},10)},methods:{validate(t){const{validity:e}=t.target,n=e.patternMismatch||e.valueMissing;this.$emit("input",this.value,n)}}},DV={class:"field"},MV={class:"control has-icons-left"},RV=["placeholder","disabled"],LV=["textContent"];function $V(t,e,n,s,i,r){const o=w("mdicon");return x(),$("div",DV,[A("div",MV,[Qn(A("input",{ref:"input","onUpdate:modelValue":e[0]||(e[0]=a=>i.value=a),class:"input",type:"url",pattern:"http[s]?://.+",required:"",placeholder:n.placeholder,disabled:n.loading,onInput:e[1]||(e[1]=(...a)=>r.validate&&r.validate(...a))},null,40,RV),[[Is,i.value]]),E(o,{class:"icon is-left",name:n.icon,size:"16"},null,8,["name"])]),n.help?(x(),$("div",{key:0,class:"help",textContent:J(n.help)},null,8,LV)):vt("",!0)])}const ES=st(NV,[["render",$V]]),FV={name:"ModalDialogAddRss",components:{ControlUrlField:ES,ModalDialog:sr},props:{show:Boolean},emits:["close","podcast-added"],data(){return{disabled:!0,loading:!1,url:""}},computed:{actions(){return this.loading?[{icon:"web",key:"dialog.add.rss.processing"}]:[{handler:this.cancel,icon:"cancel",key:"actions.cancel"},{disabled:this.disabled,handler:this.add,icon:"playlist-plus",key:"actions.add"}]}},methods:{add(){this.loading=!0,Ct.add(this.url).then(()=>{this.$emit("podcast-added"),this.$emit("close")}).finally(()=>{this.url="",this.loading=!1})},cancel(){this.$emit("close")},onUrlChange(t,e){this.url=t,this.disabled=e}}};function VV(t,e,n,s,i,r){const o=w("control-url-field"),a=w("modal-dialog");return x(),gt(a,{actions:r.actions,show:n.show,title:t.$t("dialog.add.rss.title"),onClose:e[1]||(e[1]=l=>t.$emit("close"))},{content:M(()=>[A("form",{onSubmit:e[0]||(e[0]=Pn((...l)=>r.add&&r.add(...l),["prevent"]))},[E(o,{icon:"rss",help:t.$t("dialog.add.rss.help"),loading:i.loading,placeholder:t.$t("dialog.add.rss.placeholder"),onInput:r.onUrlChange},null,8,["help","loading","placeholder","onInput"])],32)]),_:1},8,["actions","show","title"])}const HV=st(FV,[["render",VV]]),UV={name:"PagePodcasts",components:{ContentWithHeading:ne,ControlButton:on,HeadingTitle:se,ListAlbums:Xn,ListTracks:Bn,ModalDialogAddRss:HV},beforeRouteEnter(t,e,n){Promise.all([Ct.albums("podcast"),Ct.newPodcastEpisodes(),Ct.rssCount()]).then(([s,i,r])=>{n(o=>{o.albums=new kt(s),o.episodes=new kt(i),o.rssCount=r})})},setup(){return{libraryStore:Vu(),uiStore:ts()}},data(){return{albums:[],episodes:{items:[]},rssCount:{},showAddPodcastModal:!1}},computed:{hasRss(){return(this.rssCount.albums??0)>0},heading(){return this.albums.total?{subtitle:[{count:this.albums.count,key:"data.podcasts"}],title:this.$t("page.podcasts.title")}:{}}},methods:{markAllAsPlayed(){this.episodes.items.forEach(t=>{Ct.updateTrack(t.id,{play_count:"increment"})}),this.episodes.items={}},openAddPodcastDialog(){this.showAddPodcastModal=!0},reloadEpisodes(){Ct.newPodcastEpisodes().then(t=>{this.episodes=new kt(t)})},reloadPodcasts(){Ct.albums("podcast").then(t=>{this.albums=new kt(t),this.reloadEpisodes(),this.reloadRssCount()})},reloadRssCount(){Ct.rssCount().then(t=>{this.rssCount=t})},updateRss(){this.libraryStore.update_dialog_scan_kind="rss",this.uiStore.showUpdateDialog=!0}}};function jV(t,e,n,s,i,r){const o=w("heading-title"),a=w("control-button"),l=w("list-tracks"),c=w("content-with-heading"),u=w("list-albums"),d=w("modal-dialog-add-rss");return x(),$(it,null,[i.episodes.items.length>0?(x(),gt(c,{key:0},{heading:M(()=>[E(o,{content:{title:t.$t("page.podcasts.new-episodes")}},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.markAllAsPlayed,icon:"pencil",key:"actions.mark-all-played"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.episodes,"show-progress":!0,onPlayCountChanged:r.reloadEpisodes},null,8,["items","onPlayCountChanged"])]),_:1})):vt("",!0),E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[r.hasRss?(x(),gt(a,{key:0,button:{handler:r.updateRss,icon:"refresh",key:"actions.update"}},null,8,["button"])):vt("",!0),E(a,{button:{handler:r.openAddPodcastDialog,icon:"rss",key:"actions.add"}},null,8,["button"])]),content:M(()=>[E(u,{items:i.albums,onPlayCountChanged:r.reloadEpisodes,onPodcastDeleted:r.reloadPodcasts},null,8,["items","onPlayCountChanged","onPodcastDeleted"])]),_:1}),E(d,{show:i.showAddPodcastModal,onClose:e[0]||(e[0]=f=>i.showAddPodcastModal=!1),onPodcastAdded:r.reloadPodcasts},null,8,["show","onPodcastAdded"])],64)}const BV=st(UV,[["render",jV]]),WV={name:"ListItemQueueItem",props:{currentPosition:{required:!0,type:Number},editing:Boolean,item:{required:!0,type:Object},position:{required:!0,type:Number},hideReadItems:Boolean},setup(){return{playerStore:Wn()}},computed:{isCurrent(){return this.item.id===this.playerStore.item_id},isNext(){return this.currentPosition<0||this.position>=this.currentPosition}},methods:{play(){sn.play({item_id:this.item.id})}}},GV={key:0,class:"media-left"},KV={class:"media-content"},zV=["textContent"],qV=["textContent"],XV=["textContent"],YV={class:"media-right"};function ZV(t,e,n,s,i,r){const o=w("mdicon");return r.isNext||!n.hideReadItems?(x(),$("div",{key:0,class:"media is-align-items-center is-clickable mb-0",onClick:e[0]||(e[0]=(...a)=>r.play&&r.play(...a))},[n.editing?(x(),$("div",GV,[E(o,{class:"icon has-text-grey is-movable",name:"drag-horizontal",size:"18"})])):vt("",!0),A("div",KV,[A("div",{class:Kt(["is-size-6 has-text-weight-bold",{"has-text-primary":r.isCurrent,"has-text-grey-light":!r.isNext}]),textContent:J(n.item.title)},null,10,zV),A("div",{class:Kt(["is-size-7 has-text-weight-bold",{"has-text-primary":r.isCurrent,"has-text-grey-light":!r.isNext,"has-text-grey":r.isNext&&!r.isCurrent}]),textContent:J(n.item.artist)},null,10,qV),A("div",{class:Kt(["is-size-7",{"has-text-primary":r.isCurrent,"has-text-grey-light":!r.isNext,"has-text-grey":r.isNext&&!r.isCurrent}]),textContent:J(n.item.album)},null,10,XV)]),A("div",YV,[oe(t.$slots,"actions",{},void 0,!0)])])):vt("",!0)}const JV=st(WV,[["render",ZV],["__scopeId","data-v-5eab7ad4"]]),QV={name:"ModalDialogAddStream",components:{ControlUrlField:ES,ModalDialog:sr},props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,url:""}},computed:{actions(){return this.loading?[{icon:"web",key:"dialog.add.stream.processing"}]:[{handler:this.cancel,icon:"cancel",key:"actions.cancel"},{disabled:this.disabled,handler:this.add,icon:"playlist-plus",key:"actions.add"},{disabled:this.disabled,handler:this.play,icon:"play",key:"actions.play"}]}},methods:{add(){this.loading=!0,ce.add(this.url).then(()=>{this.$emit("close")}).finally(()=>{this.url="",this.loading=!1})},cancel(){this.$emit("close")},onUrlChange(t,e){this.url=t,this.disabled=e},play(){this.loading=!0,ce.playUri(this.url,!1).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})}}};function t9(t,e,n,s,i,r){const o=w("control-url-field"),a=w("modal-dialog");return x(),gt(a,{actions:r.actions,show:n.show,title:t.$t("dialog.add.stream.title"),onClose:e[1]||(e[1]=l=>t.$emit("close"))},{content:M(()=>[A("form",{onSubmit:e[0]||(e[0]=Pn((...l)=>r.play&&r.play(...l),["prevent"]))},[E(o,{icon:"web",loading:i.loading,placeholder:t.$t("dialog.add.stream.placeholder"),onInput:r.onUrlChange},null,8,["loading","placeholder","onInput"])],32)]),_:1},8,["actions","show","title"])}const e9=st(QV,[["render",t9]]),n9={name:"ModalDialogPlaylistSave",components:{ModalDialog:sr},props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,playlistName:""}},computed:{actions(){return this.loading?[{icon:"web",key:"dialog.playlist.save.saving"}]:[{handler:this.cancel,icon:"cancel",key:"actions.cancel"},{disabled:this.disabled,handler:this.save,icon:"download",key:"actions.save"}]}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.playlist_name_field.focus()},10))}},methods:{cancel(){this.$emit("close")},check(t){const{validity:e}=t.target;this.disabled=e.patternMismatch||e.valueMissing},save(){this.loading=!0,ce.saveToPlaylist(this.playlistName).then(()=>{this.$emit("close"),this.playlistName=""}).catch(()=>{this.loading=!1})}}},s9={class:"field"},i9={class:"control has-icons-left"},r9=["placeholder","disabled"];function o9(t,e,n,s,i,r){const o=w("mdicon"),a=w("modal-dialog");return x(),gt(a,{actions:r.actions,show:n.show,title:t.$t("dialog.playlist.save.title"),onClose:e[3]||(e[3]=l=>t.$emit("close"))},{content:M(()=>[A("form",{onSubmit:e[2]||(e[2]=Pn((...l)=>r.save&&r.save(...l),["prevent"]))},[A("div",s9,[A("div",i9,[Qn(A("input",{ref:"playlist_name_field","onUpdate:modelValue":e[0]||(e[0]=l=>i.playlistName=l),class:"input",type:"text",pattern:".+",required:"",placeholder:t.$t("dialog.playlist.save.playlist-name"),disabled:i.loading,onInput:e[1]||(e[1]=(...l)=>r.check&&r.check(...l))},null,40,r9),[[Is,i.playlistName]]),E(o,{class:"icon is-left",name:"playlist-music",size:"16"})])])],32)]),_:1},8,["actions","show","title"])}const a9=st(n9,[["render",o9]]);var hc={exports:{}};/**! + `;return`data:image/svg+xml;charset=UTF-8,${encodeURIComponent(n)}`},P$={name:"ControlImage",props:{caption:{default:"",type:String},url:{default:"",type:String}},emits:["click"],data(){return{font:{family:"sans-serif",weight:"bold"},size:600}},computed:{source(){return{src:this.url||this.uri,lifecycle:{error:t=>{t.src=this.uri}}}},uri(){return I$({alternate:this.caption,caption:this.caption.substring(0,2),font:this.font,size:this.size})}}},N$={class:"figure has-shadow"};function D$(t,e,n,s,i,r){const o=Zh("lazy");return x(),$("figure",N$,[Qn(A("img",{onClick:e[0]||(e[0]=a=>t.$emit("click"))},null,512),[[o,r.source]])])}const Hr=st(P$,[["render",D$],["__scopeId","data-v-e61d86e1"]]),{t:Wl,locale:M$}=Fo.global,hS="NO_INDEX",R$=(t,e)=>t-e,L$=(t,e)=>t.localeCompare(e,M$.value),$$=(t,e)=>new Date(t)-new Date(e)||(t?e?0:1:-1),F$=t=>t.map(({field:e,type:n,order:s=1})=>{switch(n){case String:return(i,r)=>L$(i[e],r[e])*s;case Number:return(i,r)=>R$(i[e],r[e])*s;case Date:return(i,r)=>$$(i[e],r[e])*s;default:return()=>0}}),V$=(t="")=>{const e=t.charAt(0);return e.match(new RegExp("\\p{Letter}","gu"))?e.toUpperCase():e.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"},H$=t=>{},U$=[{difference:NaN,text:()=>Wl("grouped-list.undefined")},{difference:864e5,text:()=>Wl("grouped-list.today")},{difference:6048e5,text:()=>Wl("grouped-list.last-week")},{difference:2592e6,text:()=>Wl("grouped-list.last-month")},{difference:1/0,text:t=>t.getFullYear()}],j$=t=>{var s;const e=new Date(t),n=new Date-e;return(s=U$.find(i=>isNaN(n)||n{switch(e){case String:return n=>V$(n[t]);case Number:return n=>n[t];case Date:return n=>j$(n[t]);case"Digits":return n=>H$(n[t]);default:return()=>hS}};class kt{constructor({items:e=[],total:n=0,offset:s=0,limit:i=-1}={},r={}){this.items=e,this.total=n,this.offset=s,this.limit=i,this.count=e.length,this.indices=[],this.group(r)}group({criteria:e=[],filters:n=[],index:s}={}){const i=this.items.filter(l=>n.every(c=>c(l)));this.count=i.length;const r=F$(e),o=i.sort((l,c)=>r.reduce((u,d)=>u||d(l,c),0)),a=B$(s);return this.itemsGrouped=o.reduce((l,c)=>{const u=a(c);return l.set(u,[...l.get(u)||[],c]),l},new Map),this.indices=Array.from(this.itemsGrouped.keys()),this}*generate(){for(const[e,n]of this.itemsGrouped.entries()){e!==hS&&(yield{index:e,isItem:!1,item:{},itemId:e});for(const s of n)yield{index:e,isItem:!0,item:s,itemId:s.id}}}[Symbol.iterator](){return this.generate()}}const W$={name:"PaneHero",components:{ControlButton:on},props:{content:{required:!0,type:Object}}},G$=["textContent"],K$={class:"subtitle is-6"},z$=["textContent"],q$=["textContent"],X$={class:"buttons is-centered-mobile mt-5"};function Y$(t,e,n,s,i,r){const o=w("control-button");return x(),$(it,null,[A("div",{class:"title is-5",textContent:J(n.content.title)},null,8,G$),A("div",K$,[A("a",{onClick:e[0]||(e[0]=(...a)=>n.content.handler&&n.content.handler(...a)),textContent:J(n.content.subtitle)},null,8,z$)]),A("div",{class:"is-size-7 is-uppercase has-text-centered-mobile",textContent:J(n.content.count)},null,8,q$),A("div",X$,[(x(!0),$(it,null,ae(n.content.actions,(a,l)=>(x(),gt(o,{key:l,button:a},null,8,["button"]))),128))])],64)}const hd=st(W$,[["render",Y$]]),am={name:"ControlProgress",props:{size:{default:36,type:Number},value:{default:0,type:Number}},computed:{offset(){return 1-this.value},progress(){return`${Math.round(this.value*100)}%`}}},hb=()=>{k1(t=>({"3ce61f74":t.offset}))},pb=am.setup;am.setup=pb?(t,e)=>(hb(),pb(t,e)):hb;const Z$={class:"is-flex"},J$=["width","height"],Q$=["textContent"];function t5(t,e,n,s,i,r){return x(),$("div",Z$,[(x(),$("svg",{width:n.size,height:n.size,viewBox:"0 0 200 200"},[e[0]||(e[0]=A("defs",null,[A("circle",{id:"circle",cx:"50%",cy:"50%",pathLength:"1",r:"90"})],-1)),e[1]||(e[1]=A("use",{href:"#circle",class:"progress-base"},null,-1)),e[2]||(e[2]=A("use",{href:"#circle",class:"progress-bar"},null,-1)),A("text",{x:"50%",y:"50%",class:"is-size-1 progress-text",textContent:J(r.progress)},null,8,Q$)],8,J$))])}const e5=st(am,[["render",t5],["__scopeId","data-v-06c7995f"]]),n5={name:"ListItem",components:{ControlImage:Hr,ControlProgress:e5},props:{icon:{default:null,type:String},image:{default:null,type:Object},index:{default:null,type:[String,Number]},isItem:{default:!0,type:Boolean},isPlayable:{default:!0,type:Boolean},isRead:{default:!1,type:Boolean},lines:{default:null,type:Array},progress:{default:null,type:Number}},emits:["open","openDetails"],methods:{open(){this.$emit("open")},openDetails(){this.$emit("openDetails")}}},s5={key:0,class:"py-5"},i5={class:"media-content"},r5=["id","textContent"],o5={class:"media-content"},a5=["textContent"],l5={key:0,class:"is-size-7 has-text-grey"},c5={key:2,class:"media-right"},u5={class:"media-right"};function d5(t,e,n,s,i,r){const o=w("mdicon"),a=w("control-image"),l=w("control-progress");return n.isItem?(x(),$("div",{key:1,class:Kt(["media is-align-items-center mb-0",{"is-clickable":n.isPlayable,"is-not-allowed":!n.isPlayable}]),onClick:e[1]||(e[1]=(...c)=>r.open&&r.open(...c))},[n.icon?(x(),gt(o,{key:0,class:"media-left icon",name:n.icon},null,8,["name"])):vt("",!0),n.image?(x(),gt(a,{key:1,url:n.image.url,caption:n.image.caption,class:"media-left is-small"},null,8,["url","caption"])):vt("",!0),A("div",o5,[(x(!0),$(it,null,ae(n.lines,(c,u)=>(x(),$("div",{key:u,class:Kt({"is-size-6":u===0,"is-size-7":u!==0,"has-text-weight-bold":u!==2,"has-text-grey":(u!==0||n.isRead)&&n.isPlayable,"has-text-grey-light":!n.isPlayable}),textContent:J(c)},null,10,a5))),128)),n.isPlayable?vt("",!0):(x(),$("div",l5,[oe(t.$slots,"reason",{},void 0,!0)]))]),n.progress?(x(),$("div",c5,[E(l,{value:n.progress},null,8,["value"])])):vt("",!0),A("div",u5,[A("a",{onClick:e[0]||(e[0]=Pn((...c)=>r.openDetails&&r.openDetails(...c),["prevent","stop"]))},[E(o,{class:"icon has-text-grey",name:"dots-vertical",size:"16"})])])],2)):(x(),$("div",s5,[A("div",i5,[A("span",{id:`index_${n.index}`,class:"tag is-small has-text-weight-bold",textContent:J(n.index)},null,8,r5)])]))}const Ls=st(n5,[["render",d5],["__scopeId","data-v-8ec36f11"]]),f5={name:"ListProperties",components:{ControlImage:Hr},props:{item:{required:!0,type:Object}}},h5=["textContent"],p5={class:"title is-6"},m5=["onClick","textContent"],g5=["textContent"];function y5(t,e,n,s,i,r){var a;const o=w("control-image");return x(),$(it,null,[n.item.image?(x(),gt(o,{key:0,url:n.item.image,caption:n.item.name,class:"is-normal mb-5"},null,8,["url","caption"])):vt("",!0),t.$slots.buttons?oe(t.$slots,"buttons",{key:1}):vt("",!0),(x(!0),$(it,null,ae((a=n.item.properties)==null?void 0:a.filter(l=>l.value),l=>(x(),$("div",{key:l.key,class:"mb-3"},[A("div",{class:"is-size-7 is-uppercase",textContent:J(t.$t(l.key))},null,8,h5),A("div",p5,[l.handler?(x(),$("a",{key:0,onClick:l.handler,textContent:J(l.value)},null,8,m5)):(x(),$("span",{key:1,class:"title is-6",textContent:J(l.value)},null,8,g5))])]))),128))],64)}const pS=st(f5,[["render",y5]]),b5={name:"ModalDialogPlayable",components:{ControlButton:on,ListProperties:pS,ModalDialog:sr},props:{buttons:{default:()=>[],type:Array},item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{actions(){return[{handler:this.addToQueue,icon:"playlist-plus",key:"actions.add"},{handler:this.addNextToQueue,icon:"playlist-play",key:"actions.add-next"},{handler:this.play,icon:"play",key:"actions.play"}]}},methods:{play(){this.$emit("close"),this.item.expression?ce.playExpression(this.item.expression,!1):ce.playUri(this.item.uris||this.item.uri,!1)},addToQueue(){this.$emit("close"),this.item.expression?ce.addExpression(this.item.expression):ce.addUri(this.item.uris||this.item.uri)},addNextToQueue(){this.$emit("close"),this.item.expression?ce.addExpression(this.item.expression,!0):ce.addUri(this.item.uris||this.item.uri,!0)}}},v5={class:"buttons"};function _5(t,e,n,s,i,r){const o=w("control-button"),a=w("list-properties"),l=w("modal-dialog");return x(),gt(l,{actions:r.actions,show:n.show,title:n.item.name,onClose:e[0]||(e[0]=c=>t.$emit("close"))},{content:M(()=>[E(a,{item:n.item},Ro({_:2},[n.buttons.length?{name:"buttons",fn:M(()=>[A("div",v5,[(x(!0),$(it,null,ae(n.buttons,c=>(x(),gt(o,{key:c.key,button:c},null,8,["button"]))),128))])]),key:"0"}:void 0]),1032,["item"])]),_:1},8,["actions","show","title"])}const gs=st(b5,[["render",_5]]),S5={name:"ModalDialogTrack",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close","play-count-changed"],computed:{buttons(){return this.item.media_kind!=="podcast"?[]:this.item.play_count>0?[{handler:this.markAsNew,key:"actions.mark-as-new"}]:[{handler:this.markAsPlayed,key:"actions.mark-as-played"}]},playable(){return{name:this.item.title,properties:[{handler:this.openAlbum,key:"property.album",value:this.item.album},{handler:this.openArtist,key:"property.album-artist",value:this.item.album_artist},{key:"property.composer",value:this.item.composer},{key:"property.release-date",value:this.$formatters.toDate(this.item.date_released)},{key:"property.year",value:this.item.year},{key:"property.genre",value:this.item.genre},{key:"property.position",value:this.item.track_number>0&&[this.item.disc_number,this.item.track_number].join(" / ")},{key:"property.duration",value:this.item.length_ms>0&&this.$formatters.toTimecode(this.item.length_ms)},{key:"property.type",value:`${this.$t(`media.kind.${this.item.media_kind}`)} - ${this.$t(`data.kind.${this.item.data_kind}`)}`},{key:"property.quality",value:this.item.data_kind!=="spotify"&&this.$t("dialog.track.quality-value",{bitrate:this.item.bitrate,channels:this.$t("data.channels",this.item.channels),format:this.item.type,samplerate:this.item.samplerate})},{key:"property.added-on",value:this.$formatters.toDateTime(this.item.time_added)},{key:"property.rating",value:this.$t("dialog.track.rating-value",{rating:Math.floor(this.item.rating/10)})},{key:"property.comment",value:this.item.comment},{key:"property.path",value:this.item.path}],uri:this.item.uri}}},methods:{markAsNew(){Ct.updateTrack(this.item.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},markAsPlayed(){Ct.updateTrack(this.item.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},openAlbum(){this.$emit("close"),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}})},openArtist(){this.$emit("close"),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}})},openGenre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{mediaKind:this.item.media_kind}})}}};function E5(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{buttons:r.buttons,item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["buttons","item","show"])}const w5=st(S5,[["render",E5]]),k5={name:"ListTracks",components:{ListItem:Ls,ModalDialogTrack:w5},props:{expression:{default:"",type:String},items:{default:null,type:Object},icon:{default:null,type:String},showProgress:{default:!1,type:Boolean},uris:{default:"",type:String}},emits:["play-count-changed"],data(){return{selectedItem:{},showDetailsModal:!1}},methods:{isRead(t){return t.media_kind==="podcast"&&t.play_count>0},open(t){this.uris?ce.playUri(this.uris,!1,this.items.items.indexOf(t)):this.expression?ce.playExpression(this.expression,!1,this.items.items.indexOf(t)):ce.playUri(t.uri,!1)},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0},progress(t){return this.showProgress&&t.seek_ms>0?t.seek_ms/t.length_ms:null}}};function T5(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-track");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,icon:n.icon,"is-item":l.isItem,"is-read":r.isRead(l.item),index:l.index,lines:[l.item.title,l.item.artist,l.item.album],progress:r.progress(l.item),onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["icon","is-item","is-read","index","lines","progress","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1),onPlayCountChanged:e[1]||(e[1]=l=>t.$emit("play-count-changed"))},null,8,["item","show"])],64)}const Bn=st(k5,[["render",T5]]),C5={name:"ModalDialogAlbum",components:{ModalDialog:sr,ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},mediaKind:{default:"",type:String},show:Boolean},emits:["close","play-count-changed","podcast-deleted"],data(){return{showRemovePodcastModal:!1}},computed:{actions(){return[{handler:this.cancel,icon:"cancel",key:this.$t("actions.cancel")},{handler:this.removePodcast,icon:"delete",key:this.$t("actions.remove")}]},buttons(){return this.mediaKindResolved==="podcast"?this.item.data_kind==="url"?[{handler:this.markAsPlayed,key:"actions.mark-as-played"},{handler:this.openRemovePodcastDialog,key:"actions.remove"}]:[{handler:this.markAsPlayed,key:"actions.mark-as-played"}]:[]},mediaKindResolved(){return this.mediaKind||this.item.media_kind},playable(){return{image:this.item.artwork_url,name:this.item.name,properties:[{handler:this.openArtist,key:"property.artist",value:this.item.artist},{key:"property.release-date",value:this.$formatters.toDate(this.item.date_released)},{key:"property.year",value:this.item.year},{key:"property.tracks",value:this.item.track_count},{key:"property.duration",value:this.$formatters.toTimecode(this.item.length_ms)},{key:"property.type",value:`${this.$t(`media.kind.${this.item.media_kind}`)} - ${this.$t(`data.kind.${this.item.data_kind}`)}`},{key:"property.added-on",value:this.$formatters.toDateTime(this.item.time_added)}],uri:this.item.uri}}},methods:{cancel(){this.showRemovePodcastModal=!1},markAsPlayed(){Ct.updateAlbum(this.item.id,{play_count:"played"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},openArtist(){this.$emit("close"),this.mediaKindResolved==="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}})},openRemovePodcastDialog(){this.showRemovePodcastModal=!0,this.showDetailsModal=!1},removePodcast(){this.showRemovePodcastModal=!1,Ct.albumTracks(this.item.id,{limit:1}).then(t=>{Ct.trackPlaylists(t.items[0].id).then(e=>{const{id:n}=e.items.find(s=>s.type==="rss");Ct.playlistDelete(n).then(()=>{this.$emit("podcast-deleted"),this.$emit("close")})})})}}},A5=["textContent"];function O5(t,e,n,s,i,r){const o=w("modal-dialog-playable"),a=w("i18n-t"),l=w("modal-dialog");return x(),$(it,null,[E(o,{buttons:r.buttons,item:r.playable,show:n.show,onClose:e[0]||(e[0]=c=>t.$emit("close"))},null,8,["buttons","item","show"]),E(l,{actions:r.actions,show:i.showRemovePodcastModal,title:t.$t("dialog.podcast.remove.title"),onClose:e[1]||(e[1]=c=>i.showRemovePodcastModal=!1),onRemove:r.removePodcast},{content:M(()=>[E(a,{keypath:"dialog.podcast.remove.info",tag:"p",scope:"global"},{separator:M(()=>e[2]||(e[2]=[A("br",null,null,-1)])),name:M(()=>[A("b",{textContent:J(n.item.name)},null,8,A5)]),_:1})]),_:1},8,["actions","show","title","onRemove"])],64)}const pd=st(C5,[["render",O5]]),x5={name:"PageAlbum",components:{ContentWithHero:fd,ControlImage:Hr,PaneHero:hd,ListTracks:Bn,ModalDialogAlbum:pd},beforeRouteEnter(t,e,n){Promise.all([Ct.album(t.params.id),Ct.albumTracks(t.params.id)]).then(([s,i])=>{n(r=>{r.album=s,r.tracks=new kt(i,{criteria:[{field:"disc_number",type:Number}],index:{field:"disc_number",type:Number}}),r.tracks.indices.length<2&&r.tracks.group()})})},data(){return{album:{},showDetailsModal:!1,tracks:new kt}},computed:{heading(){return{count:this.$t("data.tracks",{count:this.album.track_count}),handler:this.openArtist,subtitle:this.album.artist,title:this.album.name,actions:[{handler:this.play,icon:"shuffle",key:"actions.shuffle"},{handler:this.openDetails,icon:"dots-horizontal"}]}}},methods:{openArtist(){this.showDetailsModal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},openDetails(){this.showDetailsModal=!0},play(){ce.playUri(this.album.uri,!0)}}};function I5(t,e,n,s,i,r){const o=w("pane-hero"),a=w("control-image"),l=w("list-tracks"),c=w("content-with-hero"),u=w("modal-dialog-album");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),image:M(()=>[E(a,{url:i.album.artwork_url,caption:i.album.name,class:"is-clickable is-medium",onClick:r.openDetails},null,8,["url","caption","onClick"])]),content:M(()=>[E(l,{items:i.tracks,uris:i.album.uri},null,8,["items","uris"])]),_:1}),E(u,{item:i.album,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const P5=st(x5,[["render",I5]]);function N5(t){return t.scrollHeight}function D5(t){return t.scrollWidth}function M5(t,e){t.scrollTop=t.scrollHeight-e+t.scrollTop}function R5(t,e){t.scrollLeft=t.scrollWidth-e+t.scrollLeft}const L5=A("div",{class:"loading"},"Loading...",-1),$5=A("div",{class:"no-more"},"No more.",-1),F5=A("div",{class:"no-results"},"No results.",-1),V5=A("div",{class:"error"},"Error.",-1),H5=_i({__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(t,{emit:e}){const n=t,s=ls();let i=ls("loading"),r=ls(n.isInitial),o=0;function a(){$r(()=>{var g,v;n.position==="top"?M5((g=n.container)!=null?g:document.documentElement,o):n.position==="left"&&R5((v=n.container)!=null?v:document.documentElement,o)})}function l(g,v){return g===0?r.value?(u(),"no-results"):(c(),"no-more"):g!==void 0&&v!==void 0&&g{var v,S;g.isIntersecting&&(n.position==="top"?o=N5((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(o=D5((S=n.container)!=null?S:document.documentElement)),m(),n.load({loaded:l,noMore:c,noResults:u,error:d},{isFirstLoad:r.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let _;return typeof IntersectionObserver<"u"&&Jv(()=>{_&&m(),_=y(),b()},{flush:"post"}),Zn(()=>n.isInitial,g=>{g&&f()}),Zn(r,g=>{g||e("update:isInitial",!1)}),(g,v)=>(x(),$("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:s},[Vn(i)==="loading"?oe(g.$slots,"loading",ro(ao({key:0},{isFirstLoad:Vn(r)})),()=>[L5]):Vn(i)==="no-more"?oe(g.$slots,"no-more",ro(ao({key:1},{retry:h})),()=>[$5]):Vn(i)==="no-results"?oe(g.$slots,"no-results",ro(ao({key:2},{retry:h})),()=>[F5]):Vn(i)==="error"?oe(g.$slots,"error",ro(ao({key:3},{retry:h})),()=>[V5]):vt("",!0)],512))}}),U5={name:"LoaderListItem",components:{VueEternalLoading:H5},props:{load:{default:null,type:Function},loaded:{default:!0,type:Boolean}}},j5={class:"columns is-centered"},B5={class:"column has-text-centered"};function W5(t,e,n,s,i,r){const o=w("mdicon"),a=w("vue-eternal-loading");return n.load&&!n.loaded?(x(),gt(a,{key:0,load:n.load},{loading:M(()=>[A("div",j5,[A("div",B5,[E(o,{class:"icon mdi-spin",name:"loading"})])])]),"no-more":M(()=>e[0]||(e[0]=[A("br",null,null,-1)])),"no-results":M(()=>e[1]||(e[1]=[A("br",null,null,-1)])),_:1},8,["load"])):vt("",!0)}const md=st(U5,[["render",W5]]),G5={name:"ModalDialogTrackSpotify",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){var t;return this.item.artists?{name:this.item.name,properties:[{handler:this.openAlbum,key:"property.album",value:this.item.album.name},{handler:this.openArtist,key:"property.album-artist",value:(t=this.item.artists[0])==null?void 0:t.name},{key:"property.release-date",value:this.$formatters.toDate(this.item.album.release_date)},{key:"property.position",value:[this.item.disc_number,this.item.track_number].join(" / ")},{key:"property.duration",value:this.$formatters.toTimecode(this.item.duration_ms)},{key:"property.path",value:this.item.uri}],uri:this.item.uri}:{}}},methods:{openAlbum(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.item.album.id}})},openArtist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})}}};function K5(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const z5=st(G5,[["render",K5]]),q5={name:"ListTracksSpotify",components:{ListItem:Ls,LoaderListItem:md,ModalDialogTrackSpotify:z5},props:{contextUri:{default:"",type:String},items:{required:!0,type:Object},load:{default:null,type:Function},loaded:{default:!0,type:Boolean}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){t.is_playable&&ce.playUri(this.contextUri||t.uri,!1,t.position||0)},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}},X5=["textContent"],Y5=["textContent"];function Z5(t,e,n,s,i,r){const o=w("list-item"),a=w("loader-list-item"),l=w("modal-dialog-track-spotify");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,c=>(x(),gt(o,{key:c.id,"is-playable":c.is_playable,lines:[c.name,c.artists[0].name,c.album.name],onOpen:u=>r.open(c),onOpenDetails:u=>r.openDetails(c)},Ro({_:2},[c.is_playable?void 0:{name:"reason",fn:M(()=>{var u;return[e[1]||(e[1]=qs(" (")),A("span",{textContent:J(t.$t("list.spotify.not-playable-track"))},null,8,X5),(u=c.restrictions)!=null&&u.reason?(x(),$("span",{key:0,textContent:J(t.$t("list.spotify.restriction-reason",{reason:c.restrictions.reason}))},null,8,Y5)):vt("",!0),e[2]||(e[2]=qs(") "))]}),key:"0"}]),1032,["is-playable","lines","onOpen","onOpenDetails"]))),128)),E(a,{load:n.load,loaded:n.loaded},null,8,["load","loaded"]),E(l,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=c=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Zc=st(q5,[["render",Z5]]),J5={name:"ModalDialogAlbumSpotify",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){var t,e,n,s,i,r;return{image:((n=(e=(t=this.item)==null?void 0:t.images)==null?void 0:e[0])==null?void 0:n.url)||"",name:this.item.name||"",properties:[{handler:this.openArtist,key:"property.artist",value:(r=(i=(s=this.item)==null?void 0:s.artists)==null?void 0:i[0])==null?void 0:r.name},{key:"property.release-date",value:this.$formatters.toDate(this.item.release_date)},{key:"property.type",value:this.item.album_type}],uri:this.item.uri}}},methods:{openArtist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.item.artists[0].id}})}}};function Q5(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const mS=st(J5,[["render",Q5]]);var rf={exports:{}},mb;function t8(){return mb||(mb=1,function(t){var e=function(){var n="https://api.spotify.com/v1",s=null,i=null,r=function(f,h){return f.abort=h,f},o=function(f,h){var p;if(i!==null){var m=i.defer();f(function(b){m.resolve(b)},function(b){m.reject(b)}),p=m.promise}else window.Promise&&(p=new window.Promise(f));return p?new r(p,h):null},a=function(){var f=Array.prototype.slice.call(arguments),h=f[0],p=f.slice(1);return h=h||{},p.forEach(function(m){for(var b in m)m.hasOwnProperty(b)&&(h[b]=m[b])}),h},l=function(f,h){var p="";for(var m in h)if(h.hasOwnProperty(m)){var b=h[m];p+=encodeURIComponent(m)+"="+encodeURIComponent(b)+"&"}return p.length>0&&(p=p.substring(0,p.length-1),f=f+"?"+p),f},c=function(f,h){var p=new XMLHttpRequest,m=function(b,y){function _(k){b&&b(k),h&&h(null,k)}function g(){y&&y(p),h&&h(p,null)}var v=f.type||"GET";if(p.open(v,l(f.url,f.params)),s&&p.setRequestHeader("Authorization","Bearer "+s),p.onreadystatechange=function(){if(p.readyState===4){var k=null;try{k=p.responseText?JSON.parse(p.responseText):""}catch(P){console.error(P)}p.status>=200&&p.status<300?_(k):g()}},v==="GET")p.send(null);else{var S=null;f.postData&&(f.contentType==="image/jpeg"?(S=f.postData,p.setRequestHeader("Content-Type",f.contentType)):(S=JSON.stringify(f.postData),p.setRequestHeader("Content-Type","application/json"))),p.send(S)}};return h?(m(),null):o(m,function(){p.abort()})},u=function(f,h,p,m){var b={},y=null;typeof h=="object"?(b=h,y=p):typeof h=="function"&&(y=h);var _=f.type||"GET";return _!=="GET"&&f.postData&&!m?f.postData=a(f.postData,b):f.params=a(f.params,b),c(f,y)},d=function(){};return d.prototype={constructor:e},d.prototype.getGeneric=function(f,h){var p={url:f};return u(p,h)},d.prototype.getMe=function(f,h){var p={url:n+"/me"};return u(p,f,h)},d.prototype.getMySavedTracks=function(f,h){var p={url:n+"/me/tracks"};return u(p,f,h)},d.prototype.addToMySavedTracks=function(f,h,p){var m={url:n+"/me/tracks",type:"PUT",postData:f};return u(m,h,p)},d.prototype.removeFromMySavedTracks=function(f,h,p){var m={url:n+"/me/tracks",type:"DELETE",postData:f};return u(m,h,p)},d.prototype.containsMySavedTracks=function(f,h,p){var m={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getMySavedAlbums=function(f,h){var p={url:n+"/me/albums"};return u(p,f,h)},d.prototype.addToMySavedAlbums=function(f,h,p){var m={url:n+"/me/albums",type:"PUT",postData:f};return u(m,h,p)},d.prototype.removeFromMySavedAlbums=function(f,h,p){var m={url:n+"/me/albums",type:"DELETE",postData:f};return u(m,h,p)},d.prototype.containsMySavedAlbums=function(f,h,p){var m={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getMyTopArtists=function(f,h){var p={url:n+"/me/top/artists"};return u(p,f,h)},d.prototype.getMyTopTracks=function(f,h){var p={url:n+"/me/top/tracks"};return u(p,f,h)},d.prototype.getMyRecentlyPlayedTracks=function(f,h){var p={url:n+"/me/player/recently-played"};return u(p,f,h)},d.prototype.followUsers=function(f,h){var p={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return u(p,h)},d.prototype.followArtists=function(f,h){var p={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return u(p,h)},d.prototype.followPlaylist=function(f,h,p){var m={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return u(m,h,p)},d.prototype.unfollowUsers=function(f,h){var p={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return u(p,h)},d.prototype.unfollowArtists=function(f,h){var p={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return u(p,h)},d.prototype.unfollowPlaylist=function(f,h){var p={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return u(p,h)},d.prototype.isFollowingUsers=function(f,h){var p={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return u(p,h)},d.prototype.isFollowingArtists=function(f,h){var p={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return u(p,h)},d.prototype.areFollowingPlaylist=function(f,h,p){var m={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:h.join(",")}};return u(m,p)},d.prototype.getFollowedArtists=function(f,h){var p={url:n+"/me/following",type:"GET",params:{type:"artist"}};return u(p,f,h)},d.prototype.getUser=function(f,h,p){var m={url:n+"/users/"+encodeURIComponent(f)};return u(m,h,p)},d.prototype.getUserPlaylists=function(f,h,p){var m;return typeof f=="string"?m={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(m={url:n+"/me/playlists"},p=h,h=f),u(m,h,p)},d.prototype.getPlaylist=function(f,h,p){var m={url:n+"/playlists/"+f};return u(m,h,p)},d.prototype.getPlaylistTracks=function(f,h,p){var m={url:n+"/playlists/"+f+"/tracks"};return u(m,h,p)},d.prototype.getPlaylistCoverImage=function(f,h){var p={url:n+"/playlists/"+f+"/images"};return u(p,h)},d.prototype.createPlaylist=function(f,h,p){var m={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:h};return u(m,h,p)},d.prototype.changePlaylistDetails=function(f,h,p){var m={url:n+"/playlists/"+f,type:"PUT",postData:h};return u(m,h,p)},d.prototype.addTracksToPlaylist=function(f,h,p,m){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:h}};return u(b,p,m,!0)},d.prototype.replaceTracksInPlaylist=function(f,h,p){var m={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:h}};return u(m,{},p)},d.prototype.reorderTracksInPlaylist=function(f,h,p,m,b){var y={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:h,insert_before:p}};return u(y,m,b)},d.prototype.removeTracksFromPlaylist=function(f,h,p){var m=h.map(function(y){return typeof y=="string"?{uri:y}:y}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:m}};return u(b,{},p)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,h,p,m){var b=h.map(function(_){return typeof _=="string"?{uri:_}:_}),y={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:p}};return u(y,{},m)},d.prototype.removeTracksFromPlaylistInPositions=function(f,h,p,m){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:h,snapshot_id:p}};return u(b,{},m)},d.prototype.uploadCustomPlaylistCoverImage=function(f,h,p){var m={url:n+"/playlists/"+f+"/images",type:"PUT",postData:h.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return u(m,{},p)},d.prototype.getAlbum=function(f,h,p){var m={url:n+"/albums/"+f};return u(m,h,p)},d.prototype.getAlbumTracks=function(f,h,p){var m={url:n+"/albums/"+f+"/tracks"};return u(m,h,p)},d.prototype.getAlbums=function(f,h,p){var m={url:n+"/albums/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getTrack=function(f,h,p){var m={};return m.url=n+"/tracks/"+f,u(m,h,p)},d.prototype.getTracks=function(f,h,p){var m={url:n+"/tracks/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getArtist=function(f,h,p){var m={url:n+"/artists/"+f};return u(m,h,p)},d.prototype.getArtists=function(f,h,p){var m={url:n+"/artists/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getArtistAlbums=function(f,h,p){var m={url:n+"/artists/"+f+"/albums"};return u(m,h,p)},d.prototype.getArtistTopTracks=function(f,h,p,m){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:h}};return u(b,p,m)},d.prototype.getArtistRelatedArtists=function(f,h,p){var m={url:n+"/artists/"+f+"/related-artists"};return u(m,h,p)},d.prototype.getFeaturedPlaylists=function(f,h){var p={url:n+"/browse/featured-playlists"};return u(p,f,h)},d.prototype.getNewReleases=function(f,h){var p={url:n+"/browse/new-releases"};return u(p,f,h)},d.prototype.getCategories=function(f,h){var p={url:n+"/browse/categories"};return u(p,f,h)},d.prototype.getCategory=function(f,h,p){var m={url:n+"/browse/categories/"+f};return u(m,h,p)},d.prototype.getCategoryPlaylists=function(f,h,p){var m={url:n+"/browse/categories/"+f+"/playlists"};return u(m,h,p)},d.prototype.search=function(f,h,p,m){var b={url:n+"/search/",params:{q:f,type:h.join(",")}};return u(b,p,m)},d.prototype.searchAlbums=function(f,h,p){return this.search(f,["album"],h,p)},d.prototype.searchArtists=function(f,h,p){return this.search(f,["artist"],h,p)},d.prototype.searchTracks=function(f,h,p){return this.search(f,["track"],h,p)},d.prototype.searchPlaylists=function(f,h,p){return this.search(f,["playlist"],h,p)},d.prototype.searchShows=function(f,h,p){return this.search(f,["show"],h,p)},d.prototype.searchEpisodes=function(f,h,p){return this.search(f,["episode"],h,p)},d.prototype.getAudioFeaturesForTrack=function(f,h){var p={};return p.url=n+"/audio-features/"+f,u(p,{},h)},d.prototype.getAudioFeaturesForTracks=function(f,h){var p={url:n+"/audio-features",params:{ids:f}};return u(p,{},h)},d.prototype.getAudioAnalysisForTrack=function(f,h){var p={};return p.url=n+"/audio-analysis/"+f,u(p,{},h)},d.prototype.getRecommendations=function(f,h){var p={url:n+"/recommendations"};return u(p,f,h)},d.prototype.getAvailableGenreSeeds=function(f){var h={url:n+"/recommendations/available-genre-seeds"};return u(h,{},f)},d.prototype.getMyDevices=function(f){var h={url:n+"/me/player/devices"};return u(h,{},f)},d.prototype.getMyCurrentPlaybackState=function(f,h){var p={url:n+"/me/player"};return u(p,f,h)},d.prototype.getMyCurrentPlayingTrack=function(f,h){var p={url:n+"/me/player/currently-playing"};return u(p,f,h)},d.prototype.transferMyPlayback=function(f,h,p){var m=h||{};m.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:m};return u(b,h,p)},d.prototype.play=function(f,h){f=f||{};var p="device_id"in f?{device_id:f.device_id}:null,m={};["context_uri","uris","offset","position_ms"].forEach(function(_){_ in f&&(m[_]=f[_])});var b={type:"PUT",url:n+"/me/player/play",params:p,postData:m},y=typeof f=="function"?f:{};return u(b,y,h)},d.prototype.queue=function(f,h,p){h=h||{};var m="device_id"in h?{uri:f,device_id:h.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:m};return u(b,h,p)},d.prototype.pause=function(f,h){f=f||{};var p="device_id"in f?{device_id:f.device_id}:null,m={type:"PUT",url:n+"/me/player/pause",params:p};return u(m,f,h)},d.prototype.skipToNext=function(f,h){f=f||{};var p="device_id"in f?{device_id:f.device_id}:null,m={type:"POST",url:n+"/me/player/next",params:p};return u(m,f,h)},d.prototype.skipToPrevious=function(f,h){f=f||{};var p="device_id"in f?{device_id:f.device_id}:null,m={type:"POST",url:n+"/me/player/previous",params:p};return u(m,f,h)},d.prototype.seek=function(f,h,p){h=h||{};var m={position_ms:f};"device_id"in h&&(m.device_id=h.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:m};return u(b,h,p)},d.prototype.setRepeat=function(f,h,p){h=h||{};var m={state:f};"device_id"in h&&(m.device_id=h.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:m};return u(b,h,p)},d.prototype.setVolume=function(f,h,p){h=h||{};var m={volume_percent:f};"device_id"in h&&(m.device_id=h.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:m};return u(b,h,p)},d.prototype.setShuffle=function(f,h,p){h=h||{};var m={state:f};"device_id"in h&&(m.device_id=h.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:m};return u(b,h,p)},d.prototype.getShow=function(f,h,p){var m={};return m.url=n+"/shows/"+f,u(m,h,p)},d.prototype.getShows=function(f,h,p){var m={url:n+"/shows/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getMySavedShows=function(f,h){var p={url:n+"/me/shows"};return u(p,f,h)},d.prototype.addToMySavedShows=function(f,h,p){var m={url:n+"/me/shows",type:"PUT",postData:f};return u(m,h,p)},d.prototype.removeFromMySavedShows=function(f,h,p){var m={url:n+"/me/shows",type:"DELETE",postData:f};return u(m,h,p)},d.prototype.containsMySavedShows=function(f,h,p){var m={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getShowEpisodes=function(f,h,p){var m={url:n+"/shows/"+f+"/episodes"};return u(m,h,p)},d.prototype.getEpisode=function(f,h,p){var m={};return m.url=n+"/episodes/"+f,u(m,h,p)},d.prototype.getEpisodes=function(f,h,p){var m={url:n+"/episodes/",params:{ids:f.join(",")}};return u(m,h,p)},d.prototype.getAccessToken=function(){return s},d.prototype.setAccessToken=function(f){s=f},d.prototype.setPromiseImplementation=function(f){var h=!1;try{var p=new f(function(m){m()});typeof p.then=="function"&&typeof p.catch=="function"&&(h=!0)}catch(m){console.error(m)}if(h)i=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();t.exports=e}(rf)),rf.exports}var e8=t8();const Xs=Uu(e8),n8={name:"PageAlbumSpotify",components:{ContentWithHero:fd,ControlImage:Hr,PaneHero:hd,ListTracksSpotify:Zc,ModalDialogAlbumSpotify:mS},beforeRouteEnter(t,e,n){const s=new Xs;xs.spotify().then(i=>{s.setAccessToken(i.webapi_token),s.getAlbum(t.params.id,{market:Je().spotify.webapi_country}).then(r=>{n(o=>{o.album=r})})})},setup(){return{servicesStore:Je()}},data(){return{album:{artists:[{}],tracks:{}},showDetailsModal:!1}},computed:{heading(){return{count:this.$t("data.tracks",{count:this.album.tracks.total}),handler:this.openArtist,subtitle:this.album.artists[0].name,title:this.album.name,actions:[{handler:this.play,icon:"shuffle",key:"actions.shuffle"},{handler:this.openDetails,icon:"dots-horizontal"}]}},tracks(){const{album:t}=this;return t.tracks.total?t.tracks.items.map(e=>({...e,album:t})):[]}},methods:{openArtist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},openDetails(){this.showDetailsModal=!0},play(){this.showDetailsModal=!1,ce.playUri(this.album.uri,!0)}}};function s8(t,e,n,s,i,r){const o=w("pane-hero"),a=w("control-image"),l=w("list-tracks-spotify"),c=w("content-with-hero"),u=w("modal-dialog-album-spotify");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),image:M(()=>{var d,f;return[E(a,{url:((f=(d=i.album.images)==null?void 0:d[0])==null?void 0:f.url)??"",caption:i.album.name,class:"is-clickable is-medium",onClick:r.openDetails},null,8,["url","caption","onClick"])]}),content:M(()=>[E(l,{items:r.tracks,"context-uri":i.album.uri},null,8,["items","context-uri"])]),_:1}),E(u,{item:i.album,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const i8=st(n8,[["render",s8]]),r8={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(t=>t.id===this.value)}}},methods:{deactivate(){this.active=!1},select(t){this.active=!1,this.$emit("update:value",t.id)}}},o8={class:"dropdown-trigger"},a8=["textContent"],l8={id:"dropdown",class:"dropdown-menu",role:"menu"},c8={class:"dropdown-content"},u8=["onClick","textContent"];function d8(t,e,n,s,i,r){const o=w("mdicon"),a=Zh("click-away");return Qn((x(),$("div",{class:Kt(["dropdown",{"is-active":i.active}])},[A("div",o8,[A("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:e[0]||(e[0]=l=>i.active=!i.active)},[A("span",{textContent:J(r.option.name)},null,8,a8),E(o,{class:"icon",name:"chevron-down",size:"16"})])]),A("div",l8,[A("div",c8,[(x(!0),$(it,null,ae(n.options,l=>(x(),$("a",{key:l.id,class:Kt(["dropdown-item",{"is-active":n.value===l.id}]),onClick:c=>r.select(l),textContent:J(l.name)},null,10,u8))),128))])])],2)),[[a,r.deactivate]])}const Ur=st(r8,[["render",d8]]),f8={name:"ListAlbums",components:{ListItem:Ls,ModalDialogAlbum:pd},props:{items:{required:!0,type:Object},mediaKind:{default:"",type:String}},emits:["play-count-changed","podcast-deleted"],setup(){return{settingsStore:bi()}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{image(t){return this.settingsStore.showCoverArtworkInAlbumLists?{url:t.item.artwork_url,caption:t.item.name}:null},open(t){this.selectedItem=t;const e=this.mediaKind||this.selectedItem.media_kind;e==="podcast"?this.$router.push({name:"podcast",params:{id:t.id}}):e==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:t.id}}):this.$router.push({name:"music-album",params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0},playCountChanged(){this.$emit("play-count-changed")},podcastDeleted(){this.$emit("podcast-deleted")}}};function h8(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-album");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,"is-item":l.isItem,image:r.image(l),index:l.index,lines:[l.item.name,l.item.artist,t.$formatters.toDate(l.item.date_released)],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["is-item","image","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,"media-kind":n.mediaKind,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1),onPlayCountChanged:r.playCountChanged,onPodcastDeleted:r.podcastDeleted},null,8,["item","media-kind","show","onPlayCountChanged","onPodcastDeleted"])],64)}const Xn=st(f8,[["render",h8]]),p8={name:"ListIndexButtons",props:{indices:{required:!0,type:Array}}},m8={class:"buttons is-centered mb-4"};function g8(t,e,n,s,i,r){const o=w("router-link");return x(),$("section",null,[A("nav",m8,[(x(!0),$(it,null,ae(n.indices,a=>(x(),gt(o,{key:a,class:"button is-small p-2 is-index",to:{hash:`#index_${a}`,query:t.$route.query}},{default:M(()=>[qs(J(a),1)]),_:2},1032,["to"]))),128))])])}const ys=st(p8,[["render",g8],["__scopeId","data-v-dc002763"]]),y8={name:"ListOptions"},b8={class:"columns"},v8={key:0,class:"column"},_8=["textContent"],S8={key:1,class:"column"},E8=["textContent"];function w8(t,e,n,s,i,r){return x(),$("div",b8,[t.$slots.filter?(x(),$("div",v8,[A("div",{class:"is-size-7 is-uppercase",textContent:J(t.$t("options.filter.title"))},null,8,_8),oe(t.$slots,"filter")])):vt("",!0),t.$slots.sort?(x(),$("div",S8,[A("div",{class:"is-size-7 is-uppercase",textContent:J(t.$t("options.sort.title"))},null,8,E8),oe(t.$slots,"sort")])):vt("",!0)])}const Ko=st(y8,[["render",w8]]),k8={name:"ControlTabList",props:{links:{required:!0,type:Array}}},T8={class:"section py-0 tabs-section"},C8={class:"container"},A8={class:"columns is-centered my-0"},O8={class:"column is-four-fifths py-0"},x8={class:"tabs is-centered is-small"},I8=["onClick","onKeypress"],P8=["textContent"];function N8(t,e,n,s,i,r){const o=w("mdicon"),a=w("router-link");return x(),$("section",T8,[A("div",C8,[A("div",A8,[A("div",O8,[A("div",x8,[A("ul",null,[(x(!0),$(it,null,ae(n.links,l=>(x(),gt(a,{key:l.to.name,to:{name:l.to.name},custom:""},{default:M(({navigate:c,isActive:u})=>[A("li",{class:Kt({"is-active":u})},[A("a",{onClick:c,onKeypress:N1(c,["enter"])},[l.icon?(x(),gt(o,{key:0,class:"icon is-small mx-1",name:l.icon},null,8,["name"])):vt("",!0),A("span",{class:Kt({"is-hidden-mobile":l.icon}),textContent:J(t.$t(l.key))},null,10,P8)],40,I8)],2)]),_:2},1032,["to"]))),128))])])])])])])}const lm=st(k8,[["render",N8],["__scopeId","data-v-197c6bae"]]),D8={name:"TabsMusic",components:{ControlTabList:lm},setup(){return{servicesStore:Je()}},computed:{links(){const t=[{icon:"history",key:"page.music.tabs.history",to:{name:"music-history"}},{icon:"account-music",key:"page.music.tabs.artists",to:{name:"music-artists"}},{icon:"album",key:"page.music.tabs.albums",to:{name:"music-albums"}},{icon:"speaker",key:"page.music.tabs.genres",to:{name:"music-genres"}},{icon:"book-open-page-variant",key:"page.music.tabs.composers",to:{name:"music-composers"}}];return this.servicesStore.isSpotifyActive&&t.push({icon:"spotify",key:"page.music.tabs.spotify",to:{name:"music-spotify"}}),t}}};function M8(t,e,n,s,i,r){const o=w("control-tab-list");return x(),gt(o,{links:r.links},null,8,["links"])}const Zs=st(D8,[["render",M8]]),R8={name:"PageAlbums",components:{ContentWithHeading:ne,ControlDropdown:Ur,ControlSwitch:Fr,ListIndexButtons:ys,ListAlbums:Xn,ListOptions:Ko,PaneTitle:se,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.albums("music").then(s=>{n(i=>{i.albumList=new kt(s)})})},setup(){return{servicesStore:Je(),uiStore:ts()}},data(){return{albumList:new kt}},computed:{albums(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.albumsSort);return t.filters=[e=>!this.uiStore.hideSingles||e.track_count>2,e=>!this.uiStore.hideSpotify||e.data_kind!=="spotify"],this.albumList.group(t)},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("options.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}},{id:3,name:this.$t("options.sort.recently-released"),options:{criteria:[{field:"date_released",order:-1,type:Date}],index:{field:"date_released",type:Date}}},{id:4,name:this.$t("options.sort.artist-name"),options:{criteria:[{field:"artist",type:String},{field:"name_sort",type:String}],index:{field:"artist",type:String}}},{id:5,name:this.$t("options.sort.artist-date"),options:{criteria:[{field:"artist",type:String},{field:"date_released",type:Date}],index:{field:"artist",type:String}}}]},heading(){return{subtitle:[{count:this.albums.count,key:"data.albums"}],title:this.$t("page.albums.title")}}}},L8=["textContent"],$8=["textContent"],F8=["textContent"],V8=["textContent"];function H8(t,e,n,s,i,r){const o=w("tabs-music"),a=w("list-index-buttons"),l=w("control-switch"),c=w("control-dropdown"),u=w("list-options"),d=w("pane-title"),f=w("list-albums"),h=w("content-with-heading");return x(),$(it,null,[E(o),E(h,null,{options:M(()=>[E(a,{indices:r.albums.indices},null,8,["indices"]),E(u,null,{filter:M(()=>[E(l,{modelValue:s.uiStore.hideSingles,"onUpdate:modelValue":e[0]||(e[0]=p=>s.uiStore.hideSingles=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-singles"))},null,8,L8)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-singles-help"))},null,8,$8)]),_:1},8,["modelValue"]),s.servicesStore.isSpotifyActive?(x(),gt(l,{key:0,modelValue:s.uiStore.hideSpotify,"onUpdate:modelValue":e[1]||(e[1]=p=>s.uiStore.hideSpotify=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify"))},null,8,F8)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify-help"))},null,8,V8)]),_:1},8,["modelValue"])):vt("",!0)]),sort:M(()=>[E(c,{value:s.uiStore.albumsSort,"onUpdate:value":e[2]||(e[2]=p=>s.uiStore.albumsSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(d,{content:r.heading},null,8,["content"])]),content:M(()=>[E(f,{items:r.albums},null,8,["items"])]),_:1})],64)}const U8=st(R8,[["render",H8]]),j8={name:"ModalDialogArtist",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){return{name:this.item.name,properties:[{key:"property.albums",value:this.item.album_count},{key:"property.tracks",value:this.item.track_count},{key:"property.type",value:this.$t(`data.kind.${this.item.data_kind}`)},{key:"property.added-on",value:this.$formatters.toDateTime(this.item.time_added)}],uri:this.item.uri}}}};function B8(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const gd=st(j8,[["render",B8]]),W8={name:"PageArtist",components:{ContentWithHeading:ne,ControlButton:on,ControlDropdown:Ur,ControlSwitch:Fr,ListAlbums:Xn,ListOptions:Ko,ModalDialogArtist:gd,PaneTitle:se},beforeRouteEnter(t,e,n){Promise.all([Ct.artist(t.params.id),Ct.artistAlbums(t.params.id)]).then(([s,i])=>{n(r=>{r.artist=s,r.albumList=new kt(i)})})},setup(){return{servicesStore:Je(),uiStore:ts()}},data(){return{albumList:new kt,artist:{},showDetailsModal:!1}},computed:{albums(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.artistAlbumsSort);return t.filters=[e=>!this.uiStore.hideSpotify||e.data_kind!=="spotify"],this.albumList.group(t)},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{criteria:[{field:"name_sort",type:String}]}},{id:2,name:this.$t("options.sort.release-date"),options:{criteria:[{field:"date_released",type:Date}]}}]},heading(){return{subtitle:[{count:this.albums.count,key:"data.albums"},{count:this.trackCount,handler:this.openTracks,key:"data.tracks"}],title:this.artist.name}},trackCount(){return[...this.albums].reduce((t,e)=>t+((e==null?void 0:e.item.track_count)||0),0)}},methods:{openDetails(){this.showDetailsModal=!0},openTracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){ce.playUri(this.albums.items.map(t=>t.uri).join(),!0)}}},G8=["textContent"],K8=["textContent"];function z8(t,e,n,s,i,r){const o=w("control-switch"),a=w("control-dropdown"),l=w("list-options"),c=w("pane-title"),u=w("control-button"),d=w("list-albums"),f=w("content-with-heading"),h=w("modal-dialog-artist");return x(),$(it,null,[E(f,null,{options:M(()=>[E(l,null,{filter:M(()=>[s.servicesStore.isSpotifyActive?(x(),gt(o,{key:0,modelValue:s.uiStore.hideSpotify,"onUpdate:modelValue":e[0]||(e[0]=p=>s.uiStore.hideSpotify=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify"))},null,8,G8)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify-help"))},null,8,K8)]),_:1},8,["modelValue"])):vt("",!0)]),sort:M(()=>[E(a,{value:s.uiStore.artistAlbumsSort,"onUpdate:value":e[1]||(e[1]=p=>s.uiStore.artistAlbumsSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(c,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(u,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(u,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(d,{items:r.albums},null,8,["items"])]),_:1}),E(h,{item:i.artist,show:i.showDetailsModal,onClose:e[2]||(e[2]=p=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const q8=st(W8,[["render",z8]]),X8={name:"ListAlbumsSpotify",components:{ListItem:Ls,LoaderListItem:md,ModalDialogAlbumSpotify:mS},props:{items:{required:!0,type:Object},load:{default:null,type:Function},loaded:{default:!0,type:Boolean}},setup(){return{settingsStore:bi()}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{image(t){var e,n;return this.settingsStore.showCoverArtworkInAlbumLists?{url:((n=(e=t.images)==null?void 0:e[0])==null?void 0:n.url)??"",caption:t.name}:null},open(t){this.$router.push({name:"music-spotify-album",params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function Y8(t,e,n,s,i,r){const o=w("list-item"),a=w("loader-list-item"),l=w("modal-dialog-album-spotify");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,c=>{var u;return x(),gt(o,{key:c.id,"is-item":c.isItem,image:r.image(c),index:c.index,lines:[c.name,(u=c.artists[0])==null?void 0:u.name,t.$formatters.toDate(c.release_date)],onOpen:d=>r.open(c),onOpenDetails:d=>r.openDetails(c)},null,8,["is-item","image","index","lines","onOpen","onOpenDetails"])}),128)),E(a,{load:n.load,loaded:n.loaded},null,8,["load","loaded"]),E(l,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=c=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Qa=st(X8,[["render",Y8]]),Z8={name:"ModalDialogArtistSpotify",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){var t,e;return{name:this.item.name,properties:[{key:"property.popularity",value:[this.item.popularity,(t=this.item.followers)==null?void 0:t.total].join(" / ")},{key:"property.genres",value:(e=this.item.genres)==null?void 0:e.join(", ")}],uri:this.item.uri}}}};function J8(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const gS=st(Z8,[["render",J8]]),of=50,Q8={name:"PageArtistSpotify",components:{ContentWithHeading:ne,ControlButton:on,PaneTitle:se,ListAlbumsSpotify:Qa,ModalDialogArtistSpotify:gS},beforeRouteEnter(t,e,n){xs.spotify().then(s=>{const i=new Xs;i.setAccessToken(s.webapi_token),Promise.all([i.getArtist(t.params.id),i.getArtistAlbums(t.params.id,{include_groups:"album,single",limit:of,market:Je().spotify.webapi_country,offset:0})]).then(([r,o])=>{n(a=>{a.artist=r,a.albums=o.items,a.total=o.total,a.offset=o.limit})})})},setup(){return{servicesStore:Je()}},data(){return{albums:[],artist:{},offset:0,showDetailsModal:!1,total:0}},computed:{heading(){return{subtitle:[{count:this.total,key:"data.albums"}],title:this.artist.name}},loaded(){return!(this.offset{const n=new Xs;n.setAccessToken(e.webapi_token),n.getArtistAlbums(this.artist.id,{include_groups:"album,single",limit:of,offset:this.offset}).then(s=>{this.appendAlbums(s),t(s.items.length,of)})})},openDetails(){this.showDetailsModal=!0},play(){this.showDetailsModal=!1,ce.playUri(this.artist.uri,!0)}}};function t6(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("list-albums-spotify"),c=w("content-with-heading"),u=w("modal-dialog-artist-spotify");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.albums,load:r.load,loaded:r.loaded},null,8,["items","load","loaded"])]),_:1}),E(u,{item:i.artist,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const e6=st(Q8,[["render",t6]]),n6={name:"PageArtistTracks",components:{ContentWithHeading:ne,ControlButton:on,ControlDropdown:Ur,ControlSwitch:Fr,ListIndexButtons:ys,ListOptions:Ko,ListTracks:Bn,ModalDialogArtist:gd,PaneTitle:se},beforeRouteEnter(t,e,n){Promise.all([Ct.artist(t.params.id),Ct.artistTracks(t.params.id)]).then(([s,i])=>{n(r=>{r.artist=s,r.trackList=new kt(i)})})},setup(){return{servicesStore:Je(),uiStore:ts()}},data(){return{artist:{},showDetailsModal:!1,trackList:new kt}},computed:{albumCount(){return new Set([...this.tracks].filter(t=>t.isItem).map(t=>t.item.album_id)).size},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("options.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}]},heading(){return{subtitle:[{count:this.albumCount,handler:this.openArtist,key:"data.albums"},{count:this.tracks.count,key:"data.tracks"}],title:this.artist.name}},trackUris(){return this.trackList.items.map(t=>t.uri).join()},tracks(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.artistTracksSort);return t.filters=[e=>!this.uiStore.hideSpotify||e.data_kind!=="spotify"],this.trackList.group(t)}},methods:{openArtist(){this.showDetailsModal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},openDetails(){this.showDetailsModal=!0},play(){ce.playUri(this.trackList.items.map(t=>t.uri).join(),!0)}}},s6=["textContent"],i6=["textContent"];function r6(t,e,n,s,i,r){const o=w("list-index-buttons"),a=w("control-switch"),l=w("control-dropdown"),c=w("list-options"),u=w("pane-title"),d=w("control-button"),f=w("list-tracks"),h=w("content-with-heading"),p=w("modal-dialog-artist");return x(),$(it,null,[E(h,null,{options:M(()=>[E(o,{indices:r.tracks.indices},null,8,["indices"]),E(c,null,{filter:M(()=>[s.servicesStore.isSpotifyActive?(x(),gt(a,{key:0,modelValue:s.uiStore.hideSpotify,"onUpdate:modelValue":e[0]||(e[0]=m=>s.uiStore.hideSpotify=m)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify"))},null,8,s6)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify-help"))},null,8,i6)]),_:1},8,["modelValue"])):vt("",!0)]),sort:M(()=>[E(l,{value:s.uiStore.artistTracksSort,"onUpdate:value":e[1]||(e[1]=m=>s.uiStore.artistTracksSort=m),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(u,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(d,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(d,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(f,{items:r.tracks,uris:r.trackUris},null,8,["items","uris"])]),_:1}),E(p,{item:i.artist,show:i.showDetailsModal,onClose:e[2]||(e[2]=m=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const o6=st(n6,[["render",r6]]),a6={name:"ListArtists",components:{ListItem:Ls,ModalDialogArtist:gd},props:{items:{required:!0,type:Object}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){this.selectedItem=t;const e=t.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:e,params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function l6(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-artist");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,"is-item":l.isItem,index:l.index,lines:[l.item.name],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Jc=st(a6,[["render",l6]]),c6={name:"PageArtists",components:{ContentWithHeading:ne,ControlDropdown:Ur,ControlSwitch:Fr,ListIndexButtons:ys,ListArtists:Jc,ListOptions:Ko,PaneTitle:se,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.artists("music").then(s=>{n(i=>{i.artistList=new kt(s)})})},setup(){return{servicesStore:Je(),uiStore:ts()}},data(){return{artistList:new kt}},computed:{artists(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.artistsSort);return t.filters=[e=>!this.uiStore.hideSingles||e.track_count>e.album_count*2,e=>!this.uiStore.hideSpotify||e.data_kind!=="spotify"],this.artistList.group(t)},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"name_sort",type:String}}},{id:2,name:this.$t("options.sort.recently-added"),options:{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}}}]},heading(){return{subtitle:[{count:this.artists.count,key:"data.artists"}],title:this.$t("page.artists.title")}}}},u6=["textContent"],d6=["textContent"],f6=["textContent"],h6=["textContent"];function p6(t,e,n,s,i,r){const o=w("tabs-music"),a=w("list-index-buttons"),l=w("control-switch"),c=w("control-dropdown"),u=w("list-options"),d=w("pane-title"),f=w("list-artists"),h=w("content-with-heading");return x(),$(it,null,[E(o),E(h,null,{options:M(()=>[E(a,{indices:r.artists.indices},null,8,["indices"]),E(u,null,{filter:M(()=>[E(l,{modelValue:s.uiStore.hideSingles,"onUpdate:modelValue":e[0]||(e[0]=p=>s.uiStore.hideSingles=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-singles"))},null,8,u6)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-singles-help"))},null,8,d6)]),_:1},8,["modelValue"]),s.servicesStore.isSpotifyActive?(x(),gt(l,{key:0,modelValue:s.uiStore.hideSpotify,"onUpdate:modelValue":e[1]||(e[1]=p=>s.uiStore.hideSpotify=p)},{label:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify"))},null,8,f6)]),help:M(()=>[A("span",{textContent:J(t.$t("options.filter.hide-spotify-help"))},null,8,h6)]),_:1},8,["modelValue"])):vt("",!0)]),sort:M(()=>[E(c,{value:s.uiStore.artistsSort,"onUpdate:value":e[2]||(e[2]=p=>s.uiStore.artistsSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(d,{content:r.heading},null,8,["content"])]),content:M(()=>[E(f,{items:r.artists},null,8,["items"])]),_:1})],64)}const m6=st(c6,[["render",p6]]),g6={name:"PageAudiobooksAlbum",components:{ContentWithHero:fd,ControlImage:Hr,PaneHero:hd,ListTracks:Bn,ModalDialogAlbum:pd},beforeRouteEnter(t,e,n){Promise.all([Ct.album(t.params.id),Ct.albumTracks(t.params.id)]).then(([s,i])=>{n(r=>{r.album=s,r.tracks=new kt(i)})})},data(){return{album:{},showDetailsModal:!1,tracks:new kt}},computed:{heading(){return{count:this.$t("data.tracks",{count:this.album.track_count}),handler:this.openArtist,subtitle:this.album.artist,title:this.album.name,actions:[{handler:this.play,icon:"play",key:"actions.play"},{handler:this.openDetails,icon:"dots-horizontal"}]}}},methods:{openArtist(){this.showDetailsModal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},openDetails(){this.showDetailsModal=!0},play(){ce.playUri(this.album.uri,!1)}}};function y6(t,e,n,s,i,r){const o=w("pane-hero"),a=w("control-image"),l=w("list-tracks"),c=w("content-with-hero"),u=w("modal-dialog-album");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),image:M(()=>[E(a,{url:i.album.artwork_url,caption:i.album.name,class:"is-clickable is-medium",onClick:r.openDetails},null,8,["url","caption","onClick"])]),content:M(()=>[E(l,{items:i.tracks,"show-progress":!0,uris:i.album.uri},null,8,["items","uris"])]),_:1}),E(u,{item:i.album,show:i.showDetailsModal,"media-kind":"audiobook",onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const b6=st(g6,[["render",y6]]),v6={name:"TabsAudiobooks",components:{ControlTabList:lm},computed:{links(){return[{icon:"account-music",key:"page.audiobooks.tabs.authors",to:{name:"audiobooks-artists"}},{icon:"album",key:"page.audiobooks.tabs.audiobooks",to:{name:"audiobooks-albums"}},{icon:"speaker",key:"page.audiobooks.tabs.genres",to:{name:"audiobooks-genres"}}]}}};function _6(t,e,n,s,i,r){const o=w("control-tab-list");return x(),gt(o,{links:r.links},null,8,["links"])}const cm=st(v6,[["render",_6]]),S6={name:"PageAudiobooksAlbums",components:{ContentWithHeading:ne,ListIndexButtons:ys,ListAlbums:Xn,PaneTitle:se,TabsAudiobooks:cm},beforeRouteEnter(t,e,n){Ct.albums("audiobook").then(s=>{n(i=>{i.albums=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{albums:new kt}},computed:{heading(){return{subtitle:[{count:this.albums.count,key:"data.audiobooks"}],title:this.$t("page.audiobooks.albums.title")}}}};function E6(t,e,n,s,i,r){const o=w("tabs-audiobooks"),a=w("list-index-buttons"),l=w("pane-title"),c=w("list-albums"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.albums.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.albums},null,8,["items"])]),_:1})],64)}const w6=st(S6,[["render",E6]]),k6={name:"PageAudiobooksArtist",components:{ContentWithHeading:ne,ControlButton:on,ListAlbums:Xn,ModalDialogArtist:gd,PaneTitle:se},beforeRouteEnter(t,e,n){Promise.all([Ct.artist(t.params.id),Ct.artistAlbums(t.params.id)]).then(([s,i])=>{n(r=>{r.artist=s,r.albums=new kt(i)})})},data(){return{albums:new kt,artist:{},showDetailsModal:!1}},computed:{heading(){return this.artist.name?{subtitle:[{count:this.artist.album_count,key:"data.audiobooks"}],title:this.artist.name}:{}}},methods:{openDetails(){this.showDetailsModal=!0},play(){ce.playUri(this.albums.items.map(t=>t.uri).join(),!1)}}};function T6(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("list-albums"),c=w("content-with-heading"),u=w("modal-dialog-artist");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"play",key:"actions.play"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),_:1}),E(u,{item:i.artist,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const C6=st(k6,[["render",T6]]),A6={name:"PageAudiobooksArtists",components:{ContentWithHeading:ne,ListIndexButtons:ys,ListArtists:Jc,PaneTitle:se,TabsAudiobooks:cm},beforeRouteEnter(t,e,n){Ct.artists("audiobook").then(s=>{n(i=>{i.artists=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{artists:new kt}},computed:{heading(){return{subtitle:[{count:this.artists.count,key:"data.authors"}],title:this.$t("page.audiobooks.artists.title")}}}};function O6(t,e,n,s,i,r){const o=w("tabs-audiobooks"),a=w("list-index-buttons"),l=w("pane-title"),c=w("list-artists"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.artists.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.artists},null,8,["items"])]),_:1})],64)}const x6=st(A6,[["render",O6]]),I6={name:"ModalDialogGenre",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},mediaKind:{required:!0,type:String},show:Boolean},emits:["close"],computed:{playable(){return{expression:`genre is "${this.item.name}" and media_kind is ${this.mediaKind}`,name:this.item.name,properties:[{key:"property.albums",value:this.item.album_count},{key:"property.tracks",value:this.item.track_count},{key:"property.duration",value:this.$formatters.toTimecode(this.item.length_ms)}]}}}};function P6(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const um=st(I6,[["render",P6]]),N6={name:"ListGenres",components:{ListItem:Ls,ModalDialogGenre:um},props:{items:{required:!0,type:Object},mediaKind:{required:!0,type:String}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){this.$router.push({name:"genre-albums",params:{name:t.name},query:{mediaKind:this.mediaKind}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function D6(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-genre");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,"is-item":l.isItem,index:l.index,lines:[l.item.name],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,"media-kind":n.mediaKind,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1)},null,8,["item","media-kind","show"])],64)}const yS=st(N6,[["render",D6]]),M6={name:"PageAudiobooksGenres",components:{ContentWithHeading:ne,PaneTitle:se,ListIndexButtons:ys,ListGenres:yS,TabsAudiobooks:cm},beforeRouteEnter(t,e,n){Ct.genres("audiobook").then(s=>{n(i=>{i.genres=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{genres:new kt}},computed:{heading(){return{subtitle:[{count:this.genres.total,key:"data.genres"}],title:this.$t("page.genres.title")}}}};function R6(t,e,n,s,i,r){const o=w("tabs-audiobooks"),a=w("list-index-buttons"),l=w("pane-title"),c=w("list-genres"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.genres.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.genres,"media-kind":"audiobook"},null,8,["items"])]),_:1})],64)}const L6=st(M6,[["render",R6]]),$6={name:"ModalDialogComposer",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){return{expression:`composer is "${this.item.name}" and media_kind is music`,name:this.item.name,properties:[{handler:this.openAlbums,key:"property.albums",value:this.item.album_count},{handler:this.openTracks,key:"property.tracks",value:this.item.track_count},{key:"property.duration",value:this.$formatters.toTimecode(this.item.length_ms)}]}}},methods:{openAlbums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.item.name}})},openTracks(){this.$emit("close"),this.$router.push({name:"music-composer-tracks",params:{name:this.item.name}})}}};function F6(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const dm=st($6,[["render",F6]]),V6={name:"PageComposerAlbums",components:{ContentWithHeading:ne,ControlButton:on,PaneTitle:se,ListAlbums:Xn,ModalDialogComposer:dm},beforeRouteEnter(t,e,n){Promise.all([Ct.composer(t.params.name),Ct.composerAlbums(t.params.name)]).then(([s,i])=>{n(r=>{r.composer=s,r.albums=new kt(i)})})},data(){return{albums:new kt,composer:{},showDetailsModal:!1}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},heading(){return this.composer.name?{subtitle:[{count:this.composer.album_count,key:"data.albums"},{count:this.composer.track_count,handler:this.openTracks,key:"data.tracks"}],title:this.composer.name}:{}}},methods:{openDetails(){this.showDetailsModal=!0},openTracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){ce.playExpression(this.expression,!0)}}};function H6(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("list-albums"),c=w("content-with-heading"),u=w("modal-dialog-composer");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),_:1}),E(u,{item:i.composer,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const U6=st(V6,[["render",H6]]),j6={name:"PageComposerTracks",components:{ContentWithHeading:ne,ControlButton:on,ControlDropdown:Ur,PaneTitle:se,ListIndexButtons:ys,ListOptions:Ko,ListTracks:Bn,ModalDialogComposer:dm},beforeRouteEnter(t,e,n){Promise.all([Ct.composer(t.params.name),Ct.composerTracks(t.params.name)]).then(([s,i])=>{n(r=>{r.composer=s,r.trackList=new kt(i)})})},setup(){return{uiStore:ts()}},data(){return{composer:{},showDetailsModal:!1,trackList:new kt}},computed:{expression(){return`composer is "${this.composer.name}" and media_kind is music`},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("options.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}]},heading(){return this.composer.name?{subtitle:[{count:this.composer.album_count,handler:this.openAlbums,key:"data.albums"},{count:this.composer.track_count,key:"data.tracks"}],title:this.composer.name}:{}},tracks(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.composerTracksSort);return this.trackList.group(t)}},methods:{openAlbums(){this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},openDetails(){this.showDetailsModal=!0},play(){ce.playExpression(this.expression,!0)}}};function B6(t,e,n,s,i,r){const o=w("list-index-buttons"),a=w("control-dropdown"),l=w("list-options"),c=w("pane-title"),u=w("control-button"),d=w("list-tracks"),f=w("content-with-heading"),h=w("modal-dialog-composer");return x(),$(it,null,[E(f,null,{options:M(()=>[E(o,{indices:r.tracks.indices},null,8,["indices"]),E(l,null,{sort:M(()=>[E(a,{value:s.uiStore.composerTracksSort,"onUpdate:value":e[0]||(e[0]=p=>s.uiStore.composerTracksSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(c,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(u,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(u,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(d,{items:r.tracks,expression:r.expression},null,8,["items","expression"])]),_:1}),E(h,{item:i.composer,show:i.showDetailsModal,onClose:e[1]||(e[1]=p=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const W6=st(j6,[["render",B6]]),G6={name:"ListComposers",components:{ListItem:Ls,ModalDialogComposer:dm},props:{items:{required:!0,type:Object}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){this.selectedItem=t,this.$router.push({name:"music-composer-albums",params:{name:t.name}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function K6(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-composer");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,"is-item":l.isItem,index:l.index,lines:[l.item.name],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Ch=st(G6,[["render",K6]]),z6={name:"PageComposers",components:{ContentWithHeading:ne,PaneTitle:se,ListIndexButtons:ys,ListComposers:Ch,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.composers("music").then(s=>{n(i=>{i.composers=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{composers:new kt}},computed:{heading(){return{subtitle:[{count:this.composers.total,key:"data.composers"}],title:this.$t("page.composers.title")}}}};function q6(t,e,n,s,i,r){const o=w("tabs-music"),a=w("list-index-buttons"),l=w("pane-title"),c=w("list-composers"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.composers.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.composers},null,8,["items"])]),_:1})],64)}const X6=st(z6,[["render",q6]]),Y6={name:"ModalDialogDirectory",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:String},show:Boolean},emits:["close"],computed:{playable(){return{expression:`path starts with "${this.item}" order by path asc`,name:this.item}}}};function Z6(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const J6=st(Y6,[["render",Z6]]),Q6={name:"ListDirectories",components:{ListItem:Ls,ModalDialogDirectory:J6},props:{items:{required:!0,type:Array}},data(){return{selectedItem:"",showDetailsModal:!1}},computed:{directories(){var n;const t=[];let e="";return(n=this.$route.query)==null||n.directory.split("/").slice(1,-1).forEach((s,i)=>{e=`${e}/${s}`,t.push({index:i,name:s,path:e})}),t}},methods:{open(t){const e={name:"files"};t.index!==0&&(e.query={directory:t.path}),this.$router.push(e)},openDetails(t){this.selectedItem=t.path,this.showDetailsModal=!0},openParent(){this.open(this.directories.slice(-1).pop())}}},tF={key:0,class:"media is-align-items-center mb-0"},eF={class:"media-content"},nF={class:"breadcrumb"},sF=["onClick","textContent"],iF={class:"media-right"};function rF(t,e,n,s,i,r){const o=w("mdicon"),a=w("list-item"),l=w("modal-dialog-directory");return x(),$(it,null,[t.$route.query.directory?(x(),$("div",tF,[E(o,{class:"icon media-left is-clickable",name:"chevron-left",onClick:r.openParent},null,8,["onClick"]),A("div",eF,[A("nav",nF,[A("ul",null,[(x(!0),$(it,null,ae(r.directories,c=>(x(),$("li",{key:c.index},[A("a",{onClick:u=>r.open(c),textContent:J(c.name)},null,8,sF)]))),128))])])]),A("div",iF,[oe(t.$slots,"actions")])])):vt("",!0),(x(!0),$(it,null,ae(n.items,c=>(x(),gt(a,{key:c.path,icon:"folder",lines:[c.name],onOpen:u=>r.open(c),onOpenDetails:u=>r.openDetails(c)},null,8,["lines","onOpen","onOpenDetails"]))),128)),E(l,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=c=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const oF=st(Q6,[["render",rF]]),aF={name:"ModalDialogPlaylist",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean,uris:{default:"",type:String}},emits:["close"],computed:{playable(){return{name:this.item.name,properties:[{key:"property.tracks",value:this.item.item_count},{key:"property.type",value:this.$t(`playlist.type.${this.item.type}`)},{key:"property.path",value:this.item.path}],uri:this.item.uri,uris:this.uris}}}};function lF(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const bS=st(aF,[["render",lF]]),cF={name:"ListPlaylists",components:{ListItem:Ls,ModalDialogPlaylist:bS},props:{items:{required:!0,type:Object}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{icon(t){return t.type==="folder"?"folder":t.type==="rss"?"rss":"music-box-multiple"},open(t){t.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:t.id}}):this.$router.push({name:"playlist",params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function uF(t,e,n,s,i,r){const o=w("list-item"),a=w("modal-dialog-playlist");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,l=>(x(),gt(o,{key:l.itemId,icon:r.icon(l.item),"is-item":l.isItem,index:l.index,lines:[l.item.name],onOpen:c=>r.open(l.item),onOpenDetails:c=>r.openDetails(l.item)},null,8,["icon","is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=l=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const Qc=st(cF,[["render",uF]]),dF={name:"PageFiles",components:{ContentWithHeading:ne,ControlButton:on,PaneTitle:se,ListDirectories:oF,ListPlaylists:Qc,ListTracks:Bn,ModalDialogPlayable:gs},beforeRouteEnter(t,e,n){n(async s=>{await s.fetchData(t)})},beforeRouteUpdate(t,e,n){this.fetchData(t).then(()=>n())},setup(){return{configurationStore:Vo()}},data(){return{directories:[],playlists:new kt,showDetailsModal:!1,tracks:new kt}},computed:{current(){var t;return((t=this.$route.query)==null?void 0:t.directory)||"/"},name(){var t;return this.current!=="/"?(t=this.current)==null?void 0:t.slice(this.current.lastIndexOf("/")+1):this.$t("page.files.title")},playable(){return{expression:`path starts with "${this.current}" order by path asc`,name:this.current,properties:[{key:"property.folders",value:this.directories.length},{key:"property.playlists",value:this.playlists.total},{key:"property.tracks",value:this.tracks.total}]}}},methods:{async fetchData(t){if(t.query.directory){const e=await Ct.files(t.query.directory);e&&(this.directories=e.directories.map(n=>this.transform(n.path)),this.playlists=new kt(e.playlists),this.tracks=new kt(e.tracks))}else{const e=await W0.list();this.directories=e.directories.map(n=>this.transform(n)),this.playlists=new kt,this.tracks=new kt}},openDetails(){this.showDetailsModal=!0},play(){ce.playExpression(this.expression,!1)},transform(t){return{name:t.slice(t.lastIndexOf("/")+1),path:t}}}};function fF(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("list-directories"),c=w("list-playlists"),u=w("list-tracks"),d=w("content-with-heading"),f=w("modal-dialog-playable");return x(),$(it,null,[E(d,null,{heading:M(()=>[E(o,{content:{title:r.name}},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"play",key:"actions.play"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.directories},null,8,["items"]),E(c,{items:i.playlists},null,8,["items"]),E(u,{items:i.tracks,icon:"file-music-outline"},null,8,["items"])]),_:1}),E(f,{item:r.playable,show:i.showDetailsModal,onClose:e[0]||(e[0]=h=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const hF=st(dF,[["render",fF]]),pF={name:"PageGenreAlbums",components:{ContentWithHeading:ne,ControlButton:on,PaneTitle:se,ListIndexButtons:ys,ListAlbums:Xn,ModalDialogGenre:um},beforeRouteEnter(t,e,n){Promise.all([Ct.genre(t.params.name,t.query.mediaKind),Ct.genreAlbums(t.params.name,t.query.mediaKind)]).then(([s,i])=>{n(r=>{r.genre=s.items.shift(),r.albums=new kt(i,{index:{field:"name_sort",type:String}})})})},data(){return{albums:new kt,genre:{},mediaKind:this.$route.query.mediaKind,showDetailsModal:!1}},computed:{heading(){return this.genre.name?{subtitle:[{count:this.genre.album_count,key:"data.albums"},{count:this.genre.track_count,handler:this.openTracks,key:"data.tracks"}],title:this.genre.name}:{}}},methods:{openDetails(){this.showDetailsModal=!0},openTracks(){this.showDetailsModal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{mediaKind:this.mediaKind}})},play(){ce.playExpression(`genre is "${this.genre.name}" and media_kind is ${this.mediaKind}`,!0)}}};function mF(t,e,n,s,i,r){const o=w("list-index-buttons"),a=w("pane-title"),l=w("control-button"),c=w("list-albums"),u=w("content-with-heading"),d=w("modal-dialog-genre");return x(),$(it,null,[E(u,null,{options:M(()=>[E(o,{indices:i.albums.indices},null,8,["indices"])]),heading:M(()=>[E(a,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(l,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(l,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(c,{items:i.albums},null,8,["items"])]),_:1}),E(d,{item:i.genre,"media-kind":i.mediaKind,show:i.showDetailsModal,onClose:e[0]||(e[0]=f=>i.showDetailsModal=!1)},null,8,["item","media-kind","show"])],64)}const gF=st(pF,[["render",mF]]),yF={name:"PageGenreTracks",components:{ContentWithHeading:ne,ControlButton:on,ControlDropdown:Ur,PaneTitle:se,ListIndexButtons:ys,ListOptions:Ko,ListTracks:Bn,ModalDialogGenre:um},beforeRouteEnter(t,e,n){Promise.all([Ct.genre(t.params.name,t.query.mediaKind),Ct.genreTracks(t.params.name,t.query.mediaKind)]).then(([s,i])=>{n(r=>{r.genre=s.items.shift(),r.trackList=new kt(i)})})},setup(){return{uiStore:ts()}},data(){return{genre:{},mediaKind:this.$route.query.mediaKind,showDetailsModal:!1,trackList:new kt}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.mediaKind}`},groupings(){return[{id:1,name:this.$t("options.sort.name"),options:{index:{field:"title_sort",type:String}}},{id:2,name:this.$t("options.sort.rating"),options:{criteria:[{field:"rating",order:-1,type:Number}],index:{field:"rating",type:"Digits"}}}]},heading(){return this.genre.name?{subtitle:[{count:this.genre.album_count,handler:this.openGenre,key:"data.albums"},{count:this.genre.track_count,key:"data.tracks"}],title:this.genre.name}:{}},tracks(){const{options:t}=this.groupings.find(e=>e.id===this.uiStore.genreTracksSort);return this.trackList.group(t)}},methods:{openGenre(){this.showDetailsModal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{mediaKind:this.mediaKind}})},play(){ce.playExpression(this.expression,!0)},openDetails(){this.showDetailsModal=!0}}};function bF(t,e,n,s,i,r){const o=w("list-index-buttons"),a=w("control-dropdown"),l=w("list-options"),c=w("pane-title"),u=w("control-button"),d=w("list-tracks"),f=w("content-with-heading"),h=w("modal-dialog-genre");return x(),$(it,null,[E(f,null,{options:M(()=>[E(o,{indices:r.tracks.indices},null,8,["indices"]),E(l,null,{sort:M(()=>[E(a,{value:s.uiStore.genreTracksSort,"onUpdate:value":e[0]||(e[0]=p=>s.uiStore.genreTracksSort=p),options:r.groupings},null,8,["value","options"])]),_:1})]),heading:M(()=>[E(c,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(u,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(u,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"}},null,8,["button"])]),content:M(()=>[E(d,{items:r.tracks,expression:r.expression},null,8,["items","expression"])]),_:1}),E(h,{item:i.genre,"media-kind":i.mediaKind,show:i.showDetailsModal,onClose:e[1]||(e[1]=p=>i.showDetailsModal=!1)},null,8,["item","media-kind","show"])],64)}const vF=st(yF,[["render",bF]]),_F={name:"PageGenres",components:{ContentWithHeading:ne,PaneTitle:se,ListIndexButtons:ys,ListGenres:yS,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.genres("music").then(s=>{n(i=>{i.genres=new kt(s,{index:{field:"name_sort",type:String}})})})},data(){return{genres:new kt}},computed:{heading(){return{subtitle:[{count:this.genres.total,key:"data.genres"}],title:this.$t("page.genres.title")}}}};function SF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("list-index-buttons"),l=w("pane-title"),c=w("list-genres"),u=w("content-with-heading");return x(),$(it,null,[E(o),E(u,null,{options:M(()=>[E(a,{indices:i.genres.indices},null,8,["indices"])]),heading:M(()=>[E(l,{content:r.heading},null,8,["content"])]),content:M(()=>[E(c,{items:i.genres,"media-kind":"music"},null,8,["items"])]),_:1})],64)}const EF=st(_F,[["render",SF]]),wF={name:"PageMusic",components:{ContentWithHeading:ne,ListAlbums:Xn,ListTracks:Bn,PaneTitle:se,TabsMusic:Zs},beforeRouteEnter(t,e,n){Promise.all([Ct.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"}),Ct.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3,type:"track"})]).then(([{albums:s},{tracks:i}])=>{n(r=>{r.albums=new kt(s),r.tracks=new kt(i)})})},data(){return{albums:[],tracks:null}}};function kF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("pane-title"),l=w("list-albums"),c=w("router-link"),u=w("content-with-heading"),d=w("list-tracks");return x(),$(it,null,[E(o),E(u,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.music.recently-added.title")}},null,8,["content"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),footer:M(()=>[E(c,{class:"button is-small is-rounded",to:{name:"music-recently-added"}},{default:M(()=>[qs(J(t.$t("actions.show-more")),1)]),_:1})]),_:1}),E(u,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.music.recently-played.title")}},null,8,["content"])]),content:M(()=>[E(d,{items:i.tracks},null,8,["items"])]),footer:M(()=>[E(c,{class:"button is-small is-rounded",to:{name:"music-recently-played"}},{default:M(()=>[qs(J(t.$t("actions.show-more")),1)]),_:1})]),_:1})],64)}const TF=st(wF,[["render",kF]]),CF={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:ne,ListAlbums:Xn,PaneTitle:se,TabsMusic:Zs},beforeRouteEnter(t,e,n){const s=bi().recentlyAddedLimit;Ct.search({expression:"media_kind is music having track_count > 3 order by time_added desc",limit:s,type:"album"}).then(i=>{n(r=>{r.albums=new kt(i.albums,{criteria:[{field:"time_added",order:-1,type:Date}],index:{field:"time_added",type:Date}})})})},setup(){return{settingsStore:bi()}},data(){return{albums:new kt}}};function AF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("pane-title"),l=w("list-albums"),c=w("content-with-heading");return x(),$(it,null,[E(o),E(c,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.music.recently-added.title")}},null,8,["content"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),_:1})],64)}const OF=st(CF,[["render",AF]]),xF={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:ne,PaneTitle:se,ListTracks:Bn,TabsMusic:Zs},beforeRouteEnter(t,e,n){Ct.search({expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50,type:"track"}).then(s=>{n(i=>{i.tracks=new kt(s.tracks)})})},data(){return{tracks:new kt}}};function IF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("pane-title"),l=w("list-tracks"),c=w("content-with-heading");return x(),$(it,null,[E(o),E(c,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.music.recently-played.title")}},null,8,["content"])]),content:M(()=>[E(l,{items:i.tracks},null,8,["items"])]),_:1})],64)}const PF=st(xF,[["render",IF]]),NF={name:"ModalDialogPlaylistSpotify",components:{ModalDialogPlayable:gs},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],computed:{playable(){var t,e;return{name:this.item.name,properties:[{key:"property.owner",value:(t=this.item.owner)==null?void 0:t.display_name},{key:"property.tracks",value:(e=this.item.tracks)==null?void 0:e.total},{key:"property.path",value:this.item.uri}],uri:this.item.uri}}}};function DF(t,e,n,s,i,r){const o=w("modal-dialog-playable");return x(),gt(o,{item:r.playable,show:n.show,onClose:e[0]||(e[0]=a=>t.$emit("close"))},null,8,["item","show"])}const vS=st(NF,[["render",DF]]),MF={name:"ListPlaylistsSpotify",components:{ListItem:Ls,LoaderListItem:md,ModalDialogPlaylistSpotify:vS},props:{items:{required:!0,type:Object},load:{default:null,type:Function},loaded:{default:!0,type:Boolean}},data(){return{selectedItem:{},showDetailsModal:!1}},methods:{open(t){this.$router.push({name:"playlist-spotify",params:{id:t.id}})},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0}}};function RF(t,e,n,s,i,r){const o=w("list-item"),a=w("loader-list-item"),l=w("modal-dialog-playlist-spotify");return x(),$(it,null,[(x(!0),$(it,null,ae(n.items,c=>(x(),gt(o,{key:c.id,"is-item":c.isItem,index:c.index,lines:[c.name,c.owner.display_name],onOpen:u=>r.open(c),onOpenDetails:u=>r.openDetails(c)},null,8,["is-item","index","lines","onOpen","onOpenDetails"]))),128)),E(a,{load:n.load,loaded:n.loaded},null,8,["load","loaded"]),E(l,{item:i.selectedItem,show:i.showDetailsModal,onClose:e[0]||(e[0]=c=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const tu=st(MF,[["render",RF]]),LF={name:"PageMusicSpotify",components:{ContentWithHeading:ne,PaneTitle:se,ListAlbumsSpotify:Qa,ListPlaylistsSpotify:tu,TabsMusic:Zs},beforeRouteEnter(t,e,n){xs.spotify().then(s=>{const i=new Xs;i.setAccessToken(s.webapi_token),Promise.all([i.getNewReleases({country:s.webapi_country,limit:3}),i.getFeaturedPlaylists({country:s.webapi_country,limit:3})]).then(r=>{n(o=>{o.albums=r[0].albums.items,o.playlists=r[1].playlists.items})})})},data(){return{albums:[],playlists:[]}}};function $F(t,e,n,s,i,r){const o=w("tabs-music"),a=w("pane-title"),l=w("list-albums-spotify"),c=w("router-link"),u=w("content-with-heading"),d=w("list-playlists-spotify");return x(),$(it,null,[E(o),E(u,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.spotify.music.new-releases")}},null,8,["content"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),footer:M(()=>[E(c,{to:{name:"music-spotify-new-releases"},class:"button is-small is-rounded"},{default:M(()=>[qs(J(t.$t("actions.show-more")),1)]),_:1})]),_:1}),E(u,null,{heading:M(()=>[E(a,{content:{title:t.$t("page.spotify.music.featured-playlists")}},null,8,["content"])]),content:M(()=>[E(d,{items:i.playlists},null,8,["items"])]),footer:M(()=>[E(c,{to:{name:"music-spotify-featured-playlists"},class:"button is-small is-rounded"},{default:M(()=>[qs(J(t.$t("actions.show-more")),1)]),_:1})]),_:1})],64)}const FF=st(LF,[["render",$F]]),VF={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:ne,PaneTitle:se,ListPlaylistsSpotify:tu,TabsMusic:Zs},beforeRouteEnter(t,e,n){xs.spotify().then(s=>{const i=new Xs;i.setAccessToken(s.webapi_token),i.getFeaturedPlaylists({country:s.webapi_country,limit:50}).then(r=>{n(o=>{o.playlists=r.playlists.items})})})},data(){return{playlists:[]}},computed:{heading(){return{title:this.$t("page.spotify.music.featured-playlists")}}}};function HF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("pane-title"),l=w("list-playlists-spotify"),c=w("content-with-heading");return x(),$(it,null,[E(o),E(c,null,{heading:M(()=>[E(a,{content:r.heading},null,8,["content"])]),content:M(()=>[E(l,{items:i.playlists},null,8,["items"])]),_:1})],64)}const UF=st(VF,[["render",HF]]),jF={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:ne,PaneTitle:se,ListAlbumsSpotify:Qa,TabsMusic:Zs},beforeRouteEnter(t,e,n){xs.spotify().then(s=>{const i=new Xs;i.setAccessToken(s.webapi_token),i.getNewReleases({country:s.webapi_country,limit:50}).then(r=>{n(o=>{o.albums=r.albums.items})})})},data(){return{albums:[]}},computed:{heading(){return{title:this.$t("page.spotify.music.new-releases")}}}};function BF(t,e,n,s,i,r){const o=w("tabs-music"),a=w("pane-title"),l=w("list-albums-spotify"),c=w("content-with-heading");return x(),$(it,null,[E(o),E(c,null,{heading:M(()=>[E(a,{content:r.heading},null,8,["content"])]),content:M(()=>[E(l,{items:i.albums},null,8,["items"])]),_:1})],64)}const WF=st(jF,[["render",BF]]),GF={name:"ModalDialogQueueItem",components:{ListProperties:pS,ModalDialog:sr},props:{item:{required:!0,type:Object},show:Boolean},emits:["close"],setup(){return{servicesStore:Je()}},data(){return{spotifyTrack:{}}},computed:{actions(){return[{handler:this.remove,icon:"delete",key:"actions.remove"},{handler:this.play,icon:"play",key:"actions.play"}]},playable(){return{name:this.item.title,properties:[{handler:this.openAlbum,key:"property.album",value:this.item.album},{handler:this.openAlbumArtist,key:"property.album-artist",value:this.item.album_artist},{key:"property.composer",value:this.item.composer},{key:"property.year",value:this.item.year},{handler:this.openGenre,key:"property.genre",value:this.item.genre},{key:"property.position",value:[this.item.disc_number,this.item.track_number].join(" / ")},{key:"property.duration",value:this.$formatters.toTimecode(this.item.length_ms)},{key:"property.path",value:this.item.path},{key:"property.type",value:`${this.$t(`media.kind.${this.item.media_kind}`)} - ${this.$t(`data.kind.${this.item.data_kind}`)}`},{key:"property.quality",value:this.$t("dialog.track.quality-value",{bitrate:this.item.bitrate,channels:this.$t("data.channels",this.item.channels),format:this.item.type,samplerate:this.item.samplerate})}],uri:this.item.uri}}},watch:{item(){var t;if(((t=this.item)==null?void 0:t.data_kind)==="spotify"){const e=new Xs;e.setAccessToken(this.servicesStore.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(n=>{this.spotifyTrack=n})}else this.spotifyTrack={}}},methods:{openAlbum(){this.$emit("close"),this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-album",params:{id:this.spotifyTrack.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}})},openAlbumArtist(){this.$emit("close"),this.item.data_kind==="spotify"?this.$router.push({name:"music-spotify-artist",params:{id:this.spotifyTrack.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}})},openGenre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{mediaKind:this.item.media_kind}})},play(){this.$emit("close"),sn.play({item_id:this.item.id})},remove(){this.$emit("close"),ce.remove(this.item.id)}}};function KF(t,e,n,s,i,r){const o=w("list-properties"),a=w("modal-dialog");return x(),gt(a,{actions:r.actions,show:n.show,title:n.item.title,onClose:e[0]||(e[0]=l=>t.$emit("close"))},{content:M(()=>[E(o,{item:r.playable},null,8,["item"])]),_:1},8,["actions","show","title"])}const _S=st(GF,[["render",KF]]),SS=7,zF=Math.floor(SS/2),qF={name:"PaneLyrics",setup(){return{playerStore:Wn(),queueStore:ms()}},data(){return{lastIndex:-1,time:0,timerId:null,lastProgress:0,lastUpdateTime:0,lyrics:[]}},computed:{verseIndex(){var i;const t=this.time,{lyrics:e}=this;let n=0,s=e.length-1;for(;n<=s;){const r=Math.floor((n+s)/2),o=e[r].time,a=(i=e[r+1])==null?void 0:i.time;if(o<=t&&(!a||a>t))return r;o{const i=t-zF+s;return i>=0&&i=t.start&&this.time\d+):(?\d+)(?:\.(?\d+))?\] ?(?.*)/u;return this.playerStore.lyricsContent.split(` +`).forEach(n=>{const s=e.exec(n);if(s){const{text:i,minutes:r,seconds:o,hundredths:a}=s.groups,l=i.trim();if(l){const c=(Number(r)*60+ +`${o}.${a??0}`)*1e3;t.push({text:l,time:c})}}}),t.forEach((n,s,i)=>{var u;const o=(((u=i[s+1])==null?void 0:u.time)??n.time+3e3)-n.time,a=n.text.match(/\S+\s*/gu)||[],l=a.reduce((d,f)=>d+f.length,0);let c=n.time;n.words=a.map(d=>{const f=o*(d.length/l),h=c,p=h+f;return c=p,{text:d,start:h,end:p}})}),t},startTimer(){this.timerId||(this.timerId=setInterval(this.tick,100))},stopTimer(){this.timerId&&(clearInterval(this.timerId),this.timerId=null)},tick(){this.time=this.lastProgress+Date.now()-this.lastUpdateTime},updateTime(){this.playerStore.isPlaying?this.startTimer():this.time=this.lastProgress}}},XF={class:"lyrics is-overlay"},YF={key:0},ZF={key:0,class:"title is-5 my-5 lh-2"},JF=["textContent"],QF=["textContent"],tV={key:1,textContent:" "};function eV(t,e,n,s,i,r){return x(),$("div",XF,[(x(!0),$(it,null,ae(r.visibleLyrics,(o,a)=>(x(),$("div",{key:a},[o?(x(),$("div",YF,[a===3?(x(),$("div",ZF,[(x(!0),$(it,null,ae(o.words,(l,c)=>(x(),$("span",{key:c,class:Kt({"is-highlighted":r.isWordHighlighted(l)}),textContent:J(l.text)},null,10,JF))),128))])):(x(),$("div",{key:1,class:"lh-2",textContent:J(o.text)},null,8,QF))])):(x(),$("div",tV))]))),128))])}const nV=st(qF,[["render",eV],["__scopeId","data-v-ba81ee93"]]),Ii=1e3,sV={name:"PageNowPlaying",components:{ControlImage:Hr,ControlSlider:Hu,PaneLyrics:nV,ModalDialogQueueItem:_S},setup(){return{playerStore:Wn(),queueStore:ms(),settingsStore:bi()}},data(){return{INTERVAL:Ii,intervalId:0,isDragged:!1,selectedItem:{},showDetailsModal:!1}},computed:{composer(){if(this.settingsStore.showComposerNowPlaying){const t=this.settingsStore.showComposerForGenre;if(!t||this.track.genre&&t.toLowerCase().split(",").findIndex(e=>this.track.genre.toLowerCase().indexOf(e.trim())>=0)>=0)return this.track.composer}return null},isLive(){return this.track.length_ms===0},track(){return this.queueStore.current},trackElapsedTime(){return this.$formatters.toTimecode(this.trackProgress*Ii)},trackProgress:{get(){return Math.floor(this.playerStore.item_progress_ms/Ii)},set(t){this.playerStore.item_progress_ms=t*Ii}},trackProgressMax(){return this.isLive?1:Math.floor(this.track.length_ms/Ii)},trackTotalTime(){return this.$t("page.now-playing.time",this.track.length_ms,{named:{time:this.$formatters.toTimecode(this.track.length_ms)}})}},watch:{"playerStore.state"(t){this.intervalId>0&&(window.clearTimeout(this.intervalId),this.intervalId=0),t==="play"&&(this.intervalId=window.setInterval(this.tick,Ii))}},created(){this.playerStore.state==="play"&&(this.intervalId=window.setInterval(this.tick,Ii))},unmounted(){this.intervalId>0&&(window.clearTimeout(this.intervalId),this.intervalId=0)},methods:{endDragging(){this.isDragged=!1},openDetails(t){this.selectedItem=t,this.showDetailsModal=!0},seek(){this.isLive||sn.seekToPosition(this.trackProgress*Ii)},startDragging(){this.isDragged=!0},tick(){this.isDragged||(this.trackProgress+=1)}}},iV={class:"is-flex is-align-items-center has-text-centered px-5 is-full-height"},rV={key:0,class:"mx-auto",style:{"max-width":"32rem"}},oV={class:"is-relative"},aV={class:"is-flex is-justify-content-space-between"},lV=["textContent"],cV=["textContent"],uV=["textContent"],dV=["textContent"],fV=["textContent"],hV=["textContent"],pV=["textContent"],mV={key:1,class:"mx-auto"},gV=["textContent"],yV=["textContent"];function bV(t,e,n,s,i,r){const o=w("control-image"),a=w("pane-lyrics"),l=w("control-slider"),c=w("modal-dialog-queue-item");return x(),$(it,null,[A("div",iV,[r.track.id?(x(),$("div",rV,[A("div",oV,[E(o,{url:r.track.artwork_url,caption:r.track.album,class:Kt(["is-clickable is-big",{"is-masked":s.playerStore.lyrics}]),onClick:e[0]||(e[0]=u=>r.openDetails(r.track))},null,8,["url","caption","class"]),s.playerStore.lyrics?(x(),gt(a,{key:0})):vt("",!0)]),E(l,{value:r.trackProgress,"onUpdate:value":e[1]||(e[1]=u=>r.trackProgress=u),class:"mt-5",disabled:r.isLive,max:r.trackProgressMax,onChange:r.seek,onMousedown:r.startDragging,onMouseup:r.endDragging},null,8,["value","disabled","max","onChange","onMousedown","onMouseup"]),A("div",aV,[A("p",{class:"subtitle is-7",textContent:J(r.trackElapsedTime)},null,8,lV),A("p",{class:"subtitle is-7",textContent:J(r.trackTotalTime)},null,8,cV)]),A("p",{class:"title is-5",textContent:J(r.track.title)},null,8,uV),A("p",{class:"title is-6",textContent:J(r.track.artist)},null,8,dV),r.composer?(x(),$("p",{key:0,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:J(r.composer)},null,8,fV)):vt("",!0),r.track.album?(x(),$("p",{key:1,class:"subtitle is-6",textContent:J(r.track.album)},null,8,hV)):vt("",!0),s.settingsStore.showFilepathNowPlaying?(x(),$("p",{key:2,class:"subtitle is-6 has-text-grey",textContent:J(r.track.path)},null,8,pV)):vt("",!0)])):(x(),$("div",mV,[A("p",{class:"title is-5",textContent:J(t.$t("page.now-playing.title"))},null,8,gV),A("p",{class:"subtitle",textContent:J(t.$t("page.now-playing.info"))},null,8,yV)]))]),E(c,{show:i.showDetailsModal,item:i.selectedItem,onClose:e[2]||(e[2]=u=>i.showDetailsModal=!1)},null,8,["show","item"])],64)}const vV=st(sV,[["render",bV],["__scopeId","data-v-ec80d8c8"]]),_V={name:"PagePlaylistFolder",components:{ContentWithHeading:ne,PaneTitle:se,ListPlaylists:Qc},beforeRouteEnter(t,e,n){n(async s=>{await s.fetchData(t.params.id)})},beforeRouteUpdate(t,e,n){this.fetchData(t.params.id).then(()=>n())},setup(){return{configurationStore:Vo()}},data(){return{playlist:{},playlistList:new kt}},computed:{heading(){return{subtitle:[{count:this.playlists.count,key:"data.playlists"}],title:this.$t("page.playlists.title",this.playlists.count,{name:this.playlist.name})}},playlists(){return this.playlistList.group({filters:[t=>t.folder||this.configurationStore.radio_playlists||t.stream_count===0||t.item_count>t.stream_count]})}},methods:{async fetchData(t){const[e,n]=await Promise.all([Ct.playlist(t),Ct.playlistFolder(t)]);this.playlist=e,this.playlistList=new kt(n)}}};function SV(t,e,n,s,i,r){const o=w("pane-title"),a=w("list-playlists"),l=w("content-with-heading");return x(),gt(l,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),content:M(()=>[E(a,{items:r.playlists},null,8,["items"])]),_:1})}const EV=st(_V,[["render",SV]]),wV={name:"PagePlaylistTracks",components:{ContentWithHeading:ne,ControlButton:on,PaneTitle:se,ListTracks:Bn,ModalDialogPlaylist:bS},beforeRouteEnter(t,e,n){Promise.all([Ct.playlist(t.params.id),Ct.playlistTracks(t.params.id)]).then(([s,i])=>{n(r=>{r.playlist=s,r.tracks=new kt(i)})})},data(){return{playlist:{},showDetailsModal:!1,tracks:new kt}},computed:{heading(){return{subtitle:[{count:this.tracks.count,key:"data.tracks"}],title:this.playlist.name}},uris(){return this.playlist.random?this.tracks.map(t=>t.uri).join():this.playlist.uri}},methods:{play(){ce.playUri(this.uris,!0)},openDetails(){this.showDetailsModal=!0}}};function kV(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("list-tracks"),c=w("content-with-heading"),u=w("modal-dialog-playlist");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"},disabled:i.tracks.count===0},null,8,["button","disabled"])]),content:M(()=>[E(l,{items:i.tracks,uris:r.uris},null,8,["items","uris"])]),_:1}),E(u,{item:i.playlist,show:i.showDetailsModal,uris:r.uris,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show","uris"])],64)}const TV=st(wV,[["render",kV]]),af=50,CV={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:ne,ControlButton:on,PaneTitle:se,ListTracksSpotify:Zc,ModalDialogPlaylistSpotify:vS},beforeRouteEnter(t,e,n){const s=new Xs;s.setAccessToken(Je().spotify.webapi_token),Promise.all([s.getPlaylist(t.params.id),s.getPlaylistTracks(t.params.id,{limit:af,market:Je().$state.spotify.webapi_country,offset:0})]).then(([i,r])=>{n(o=>{o.playlist=i,o.tracks=[],o.total=0,o.offset=0,o.appendTracks(r)})})},setup(){return{servicesStore:Je()}},data(){return{offset:0,playlist:{tracks:{}},showDetailsModal:!1,total:0,tracks:[]}},computed:{heading(){return this.playlist.name?{subtitle:[{count:this.playlist.tracks.total,key:"data.playlists"}],title:this.playlist.name}:{}},loaded(){return!(this.offsetn.position).filter(n=>n));t.items.forEach(n=>{const{track:s}=n;s&&(s.is_playable&&(e+=1,s.position=e),this.tracks.push(s))}),this.total=t.total,this.offset+=t.limit},load({loaded:t}){const e=new Xs;e.setAccessToken(this.servicesStore.spotify.webapi_token),e.getPlaylistTracks(this.playlist.id,{limit:af,market:this.servicesStore.spotify.webapi_country,offset:this.offset}).then(n=>{this.appendTracks(n),t(n.items.length,af)})},play(){this.showDetailsModal=!1,ce.playUri(this.playlist.uri,!0)},openDetails(){this.showDetailsModal=!0}}};function AV(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("list-tracks-spotify"),c=w("content-with-heading"),u=w("modal-dialog-playlist-spotify");return x(),$(it,null,[E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.openDetails,icon:"dots-horizontal"}},null,8,["button"]),E(a,{button:{handler:r.play,icon:"shuffle",key:"actions.shuffle"},disabled:i.playlist.tracks.total===0},null,8,["button","disabled"])]),content:M(()=>[E(l,{"context-uri":i.playlist.uri,items:i.tracks,load:r.load,loaded:r.loaded},null,8,["context-uri","items","load","loaded"])]),_:1}),E(u,{item:i.playlist,show:i.showDetailsModal,onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1)},null,8,["item","show"])],64)}const OV=st(CV,[["render",AV]]),xV={name:"PagePodcast",components:{ContentWithHero:fd,ControlImage:Hr,PaneHero:hd,ListTracks:Bn,ModalDialogAlbum:pd},beforeRouteEnter(t,e,n){Promise.all([Ct.album(t.params.id),Ct.podcastEpisodes(t.params.id)]).then(([s,i])=>{n(r=>{r.album=s,r.tracks=new kt(i)})})},data(){return{album:{},showDetailsModal:!1,tracks:new kt}},computed:{heading(){return{count:this.$t("data.tracks",{count:this.album.track_count}),subtitle:"",title:this.album.name,actions:[{handler:this.play,icon:"play",key:"actions.play"},{handler:this.openDetails,icon:"dots-horizontal"}]}}},methods:{play(){ce.playUri(this.album.uri,!1)},reloadTracks(){Ct.podcastEpisodes(this.album.id).then(t=>{this.tracks=new kt(t)})},openDetails(){this.showDetailsModal=!0},podcastDeleted(){this.$router.push({name:"podcasts"})}}};function IV(t,e,n,s,i,r){const o=w("pane-hero"),a=w("control-image"),l=w("list-tracks"),c=w("modal-dialog-album"),u=w("content-with-hero");return x(),gt(u,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),image:M(()=>[E(a,{url:i.album.artwork_url,caption:i.album.name,class:"is-clickable is-medium",onClick:r.openDetails},null,8,["url","caption","onClick"])]),content:M(()=>[E(l,{items:i.tracks,"show-progress":!0,onPlayCountChanged:r.reloadTracks},null,8,["items","onPlayCountChanged"]),E(c,{item:i.album,show:i.showDetailsModal,"media-kind":"podcast",onClose:e[0]||(e[0]=d=>i.showDetailsModal=!1),onPlayCountChanged:r.reloadTracks,onPodcastDeleted:r.podcastDeleted},null,8,["item","show","onPlayCountChanged","onPodcastDeleted"])]),_:1})}const PV=st(xV,[["render",IV]]),NV={name:"ControlUrlField",props:{help:{default:"",type:String},icon:{required:!0,type:String},loading:{default:!1,type:Boolean},placeholder:{required:!0,type:String}},emits:["input"],data(){return{value:""}},mounted(){setTimeout(()=>{this.$refs.input.focus()},10)},methods:{validate(t){const{validity:e}=t.target,n=e.patternMismatch||e.valueMissing;this.$emit("input",this.value,n)}}},DV={class:"field"},MV={class:"control has-icons-left"},RV=["placeholder","disabled"],LV=["textContent"];function $V(t,e,n,s,i,r){const o=w("mdicon");return x(),$("div",DV,[A("div",MV,[Qn(A("input",{ref:"input","onUpdate:modelValue":e[0]||(e[0]=a=>i.value=a),class:"input",type:"url",pattern:"http[s]?://.+",required:"",placeholder:n.placeholder,disabled:n.loading,onInput:e[1]||(e[1]=(...a)=>r.validate&&r.validate(...a))},null,40,RV),[[Is,i.value]]),E(o,{class:"icon is-left",name:n.icon,size:"16"},null,8,["name"])]),n.help?(x(),$("div",{key:0,class:"help",textContent:J(n.help)},null,8,LV)):vt("",!0)])}const ES=st(NV,[["render",$V]]),FV={name:"ModalDialogAddRss",components:{ControlUrlField:ES,ModalDialog:sr},props:{show:Boolean},emits:["close","podcast-added"],data(){return{disabled:!0,loading:!1,url:""}},computed:{actions(){return this.loading?[{icon:"web",key:"dialog.add.rss.processing"}]:[{handler:this.cancel,icon:"cancel",key:"actions.cancel"},{disabled:this.disabled,handler:this.add,icon:"playlist-plus",key:"actions.add"}]}},methods:{add(){this.loading=!0,Ct.add(this.url).then(()=>{this.$emit("podcast-added"),this.$emit("close")}).finally(()=>{this.url="",this.loading=!1})},cancel(){this.$emit("close")},onUrlChange(t,e){this.url=t,this.disabled=e}}};function VV(t,e,n,s,i,r){const o=w("control-url-field"),a=w("modal-dialog");return x(),gt(a,{actions:r.actions,show:n.show,title:t.$t("dialog.add.rss.title"),onClose:e[1]||(e[1]=l=>t.$emit("close"))},{content:M(()=>[A("form",{onSubmit:e[0]||(e[0]=Pn((...l)=>r.add&&r.add(...l),["prevent"]))},[E(o,{icon:"rss",help:t.$t("dialog.add.rss.help"),loading:i.loading,placeholder:t.$t("dialog.add.rss.placeholder"),onInput:r.onUrlChange},null,8,["help","loading","placeholder","onInput"])],32)]),_:1},8,["actions","show","title"])}const HV=st(FV,[["render",VV]]),UV={name:"PagePodcasts",components:{ContentWithHeading:ne,ControlButton:on,PaneTitle:se,ListAlbums:Xn,ListTracks:Bn,ModalDialogAddRss:HV},beforeRouteEnter(t,e,n){Promise.all([Ct.albums("podcast"),Ct.newPodcastEpisodes(),Ct.rssCount()]).then(([s,i,r])=>{n(o=>{o.albums=new kt(s),o.episodes=new kt(i),o.rssCount=r})})},setup(){return{libraryStore:Vu(),uiStore:ts()}},data(){return{albums:[],episodes:{items:[]},rssCount:{},showAddPodcastModal:!1}},computed:{hasRss(){return(this.rssCount.albums??0)>0},heading(){return this.albums.total?{subtitle:[{count:this.albums.count,key:"data.podcasts"}],title:this.$t("page.podcasts.title")}:{}}},methods:{markAllAsPlayed(){this.episodes.items.forEach(t=>{Ct.updateTrack(t.id,{play_count:"increment"})}),this.episodes.items={}},openAddPodcastDialog(){this.showAddPodcastModal=!0},reloadEpisodes(){Ct.newPodcastEpisodes().then(t=>{this.episodes=new kt(t)})},reloadPodcasts(){Ct.albums("podcast").then(t=>{this.albums=new kt(t),this.reloadEpisodes(),this.reloadRssCount()})},reloadRssCount(){Ct.rssCount().then(t=>{this.rssCount=t})},updateRss(){this.libraryStore.update_dialog_scan_kind="rss",this.uiStore.showUpdateDialog=!0}}};function jV(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("list-tracks"),c=w("content-with-heading"),u=w("list-albums"),d=w("modal-dialog-add-rss");return x(),$(it,null,[i.episodes.items.length>0?(x(),gt(c,{key:0},{heading:M(()=>[E(o,{content:{title:t.$t("page.podcasts.new-episodes")}},null,8,["content"])]),actions:M(()=>[E(a,{button:{handler:r.markAllAsPlayed,icon:"pencil",key:"actions.mark-all-played"}},null,8,["button"])]),content:M(()=>[E(l,{items:i.episodes,"show-progress":!0,onPlayCountChanged:r.reloadEpisodes},null,8,["items","onPlayCountChanged"])]),_:1})):vt("",!0),E(c,null,{heading:M(()=>[E(o,{content:r.heading},null,8,["content"])]),actions:M(()=>[r.hasRss?(x(),gt(a,{key:0,button:{handler:r.updateRss,icon:"refresh",key:"actions.update"}},null,8,["button"])):vt("",!0),E(a,{button:{handler:r.openAddPodcastDialog,icon:"rss",key:"actions.add"}},null,8,["button"])]),content:M(()=>[E(u,{items:i.albums,onPlayCountChanged:r.reloadEpisodes,onPodcastDeleted:r.reloadPodcasts},null,8,["items","onPlayCountChanged","onPodcastDeleted"])]),_:1}),E(d,{show:i.showAddPodcastModal,onClose:e[0]||(e[0]=f=>i.showAddPodcastModal=!1),onPodcastAdded:r.reloadPodcasts},null,8,["show","onPodcastAdded"])],64)}const BV=st(UV,[["render",jV]]),WV={name:"ListItemQueueItem",props:{currentPosition:{required:!0,type:Number},editing:Boolean,item:{required:!0,type:Object},position:{required:!0,type:Number},hideReadItems:Boolean},setup(){return{playerStore:Wn()}},computed:{isCurrent(){return this.item.id===this.playerStore.item_id},isNext(){return this.currentPosition<0||this.position>=this.currentPosition}},methods:{play(){sn.play({item_id:this.item.id})}}},GV={key:0,class:"media-left"},KV={class:"media-content"},zV=["textContent"],qV=["textContent"],XV=["textContent"],YV={class:"media-right"};function ZV(t,e,n,s,i,r){const o=w("mdicon");return r.isNext||!n.hideReadItems?(x(),$("div",{key:0,class:"media is-align-items-center is-clickable mb-0",onClick:e[0]||(e[0]=(...a)=>r.play&&r.play(...a))},[n.editing?(x(),$("div",GV,[E(o,{class:"icon has-text-grey is-movable",name:"drag-horizontal",size:"18"})])):vt("",!0),A("div",KV,[A("div",{class:Kt(["is-size-6 has-text-weight-bold",{"has-text-primary":r.isCurrent,"has-text-grey-light":!r.isNext}]),textContent:J(n.item.title)},null,10,zV),A("div",{class:Kt(["is-size-7 has-text-weight-bold",{"has-text-primary":r.isCurrent,"has-text-grey-light":!r.isNext,"has-text-grey":r.isNext&&!r.isCurrent}]),textContent:J(n.item.artist)},null,10,qV),A("div",{class:Kt(["is-size-7",{"has-text-primary":r.isCurrent,"has-text-grey-light":!r.isNext,"has-text-grey":r.isNext&&!r.isCurrent}]),textContent:J(n.item.album)},null,10,XV)]),A("div",YV,[oe(t.$slots,"actions",{},void 0,!0)])])):vt("",!0)}const JV=st(WV,[["render",ZV],["__scopeId","data-v-5eab7ad4"]]),QV={name:"ModalDialogAddStream",components:{ControlUrlField:ES,ModalDialog:sr},props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,url:""}},computed:{actions(){return this.loading?[{icon:"web",key:"dialog.add.stream.processing"}]:[{handler:this.cancel,icon:"cancel",key:"actions.cancel"},{disabled:this.disabled,handler:this.add,icon:"playlist-plus",key:"actions.add"},{disabled:this.disabled,handler:this.play,icon:"play",key:"actions.play"}]}},methods:{add(){this.loading=!0,ce.add(this.url).then(()=>{this.$emit("close")}).finally(()=>{this.url="",this.loading=!1})},cancel(){this.$emit("close")},onUrlChange(t,e){this.url=t,this.disabled=e},play(){this.loading=!0,ce.playUri(this.url,!1).then(()=>{this.$emit("close"),this.url=""}).catch(()=>{this.loading=!1})}}};function t9(t,e,n,s,i,r){const o=w("control-url-field"),a=w("modal-dialog");return x(),gt(a,{actions:r.actions,show:n.show,title:t.$t("dialog.add.stream.title"),onClose:e[1]||(e[1]=l=>t.$emit("close"))},{content:M(()=>[A("form",{onSubmit:e[0]||(e[0]=Pn((...l)=>r.play&&r.play(...l),["prevent"]))},[E(o,{icon:"web",loading:i.loading,placeholder:t.$t("dialog.add.stream.placeholder"),onInput:r.onUrlChange},null,8,["loading","placeholder","onInput"])],32)]),_:1},8,["actions","show","title"])}const e9=st(QV,[["render",t9]]),n9={name:"ModalDialogPlaylistSave",components:{ModalDialog:sr},props:{show:Boolean},emits:["close"],data(){return{disabled:!0,loading:!1,playlistName:""}},computed:{actions(){return this.loading?[{icon:"web",key:"dialog.playlist.save.saving"}]:[{handler:this.cancel,icon:"cancel",key:"actions.cancel"},{disabled:this.disabled,handler:this.save,icon:"download",key:"actions.save"}]}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.playlist_name_field.focus()},10))}},methods:{cancel(){this.$emit("close")},check(t){const{validity:e}=t.target;this.disabled=e.patternMismatch||e.valueMissing},save(){this.loading=!0,ce.saveToPlaylist(this.playlistName).then(()=>{this.$emit("close"),this.playlistName=""}).catch(()=>{this.loading=!1})}}},s9={class:"field"},i9={class:"control has-icons-left"},r9=["placeholder","disabled"];function o9(t,e,n,s,i,r){const o=w("mdicon"),a=w("modal-dialog");return x(),gt(a,{actions:r.actions,show:n.show,title:t.$t("dialog.playlist.save.title"),onClose:e[3]||(e[3]=l=>t.$emit("close"))},{content:M(()=>[A("form",{onSubmit:e[2]||(e[2]=Pn((...l)=>r.save&&r.save(...l),["prevent"]))},[A("div",s9,[A("div",i9,[Qn(A("input",{ref:"playlist_name_field","onUpdate:modelValue":e[0]||(e[0]=l=>i.playlistName=l),class:"input",type:"text",pattern:".+",required:"",placeholder:t.$t("dialog.playlist.save.playlist-name"),disabled:i.loading,onInput:e[1]||(e[1]=(...l)=>r.check&&r.check(...l))},null,40,r9),[[Is,i.playlistName]]),E(o,{class:"icon is-left",name:"playlist-music",size:"16"})])])],32)]),_:1},8,["actions","show","title"])}const a9=st(n9,[["render",o9]]);var hc={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa * @author owenm @@ -86,4 +86,4 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var g9="1.14.0";function pi(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var Ei=pi(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),bl=pi(/Edge/i),yb=pi(/firefox/i),ka=pi(/safari/i)&&!pi(/chrome/i)&&!pi(/android/i),wS=pi(/iP(ad|od|hone)/i),y9=pi(/chrome/i)&&pi(/android/i),kS={capture:!1,passive:!1};function Jt(t,e,n){t.addEventListener(e,n,!Ei&&kS)}function zt(t,e,n){t.removeEventListener(e,n,!Ei&&kS)}function eu(t,e){if(e){if(e[0]===">"&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch{return!1}return!1}}function b9(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function ks(t,e,n,s){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&eu(t,e):eu(t,e))||s&&t===n)return t;if(t===n)break}while(t=b9(t))}return null}var bb=/\s+/g;function Pe(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var s=(" "+t.className+" ").replace(bb," ").replace(" "+e+" "," ");t.className=(s+(n?" "+e:"")).replace(bb," ")}}function Et(t,e,n){var s=t&&t.style;if(s){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in s)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),s[e]=n+(typeof n=="string"?"":"px")}}function Ar(t,e){var n="";if(typeof t=="string")n=t;else do{var s=Et(t,"transform");s&&s!=="none"&&(n=s+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function TS(t,e,n){if(t){var s=t.getElementsByTagName(e),i=0,r=s.length;if(n)for(;i=r,!o)return s;if(s===Ks())break;s=Wi(s,!1)}return!1}function Po(t,e,n,s){for(var i=0,r=0,o=t.children;r2&&arguments[2]!==void 0?arguments[2]:{},i=s.evt,r=u9(s,T9);vl.pluginEvent.bind(Nt)(e,n,Ys({dragEl:ft,parentEl:Me,ghostEl:Ut,rootEl:Ae,nextEl:pr,lastDownEl:mc,cloneEl:Re,cloneHidden:ji,dragStarted:ca,putSortable:an,activeSortable:Nt.active,originalEvent:i,oldIndex:co,oldDraggableIndex:Ca,newIndex:Kn,newDraggableIndex:Hi,hideGhostForTarget:PS,unhideGhostForTarget:NS,cloneNowHidden:function(){ji=!0},cloneNowShown:function(){ji=!1},dispatchSortableEvent:function(a){wn({sortable:n,name:a,originalEvent:i})}},r))};function wn(t){la(Ys({putSortable:an,cloneEl:Re,targetEl:ft,rootEl:Ae,oldIndex:co,oldDraggableIndex:Ca,newIndex:Kn,newDraggableIndex:Hi},t))}var ft,Me,Ut,Ae,pr,mc,Re,ji,co,Kn,Ca,Hi,Gl,an,so=!1,nu=!1,su=[],dr,Ss,df,ff,Eb,wb,ca,Zr,Aa,Oa=!1,Kl=!1,gc,un,hf=[],Oh=!1,iu=[],yd=typeof document<"u",zl=wS,kb=bl||Ei?"cssFloat":"float",C9=yd&&!y9&&!wS&&"draggable"in document.createElement("div"),OS=function(){if(yd){if(Ei)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),xS=function(e,n){var s=Et(e),i=parseInt(s.width)-parseInt(s.paddingLeft)-parseInt(s.paddingRight)-parseInt(s.borderLeftWidth)-parseInt(s.borderRightWidth),r=Po(e,0,n),o=Po(e,1,n),a=r&&Et(r),l=o&&Et(o),c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+xe(r).width,u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+xe(o).width;if(s.display==="flex")return s.flexDirection==="column"||s.flexDirection==="column-reverse"?"vertical":"horizontal";if(s.display==="grid")return s.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(r&&a.float&&a.float!=="none"){var d=a.float==="left"?"left":"right";return o&&(l.clear==="both"||l.clear===d)?"vertical":"horizontal"}return r&&(a.display==="block"||a.display==="flex"||a.display==="table"||a.display==="grid"||c>=i&&s[kb]==="none"||o&&s[kb]==="none"&&c+u>i)?"vertical":"horizontal"},A9=function(e,n,s){var i=s?e.left:e.top,r=s?e.right:e.bottom,o=s?e.width:e.height,a=s?n.left:n.top,l=s?n.right:n.bottom,c=s?n.width:n.height;return i===a||r===l||i+o/2===a+c/2},O9=function(e,n){var s;return su.some(function(i){var r=i[vn].options.emptyInsertThreshold;if(!(!r||fm(i))){var o=xe(i),a=e>=o.left-r&&e<=o.right+r,l=n>=o.top-r&&n<=o.bottom+r;if(a&&l)return s=i}}),s},IS=function(e){function n(r,o){return function(a,l,c,u){var d=a.options.group.name&&l.options.group.name&&a.options.group.name===l.options.group.name;if(r==null&&(o||d))return!0;if(r==null||r===!1)return!1;if(o&&r==="clone")return r;if(typeof r=="function")return n(r(a,l,c,u),o)(a,l,c,u);var f=(o?a:l).options.group.name;return r===!0||typeof r=="string"&&r===f||r.join&&r.indexOf(f)>-1}}var s={},i=e.group;(!i||pc(i)!="object")&&(i={name:i}),s.name=i.name,s.checkPull=n(i.pull,!0),s.checkPut=n(i.put),s.revertClone=i.revertClone,e.group=s},PS=function(){!OS&&Ut&&Et(Ut,"display","none")},NS=function(){!OS&&Ut&&Et(Ut,"display","")};yd&&document.addEventListener("click",function(t){if(nu)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),nu=!1,!1},!0);var fr=function(e){if(ft){e=e.touches?e.touches[0]:e;var n=O9(e.clientX,e.clientY);if(n){var s={};for(var i in e)e.hasOwnProperty(i)&&(s[i]=e[i]);s.target=s.rootEl=n,s.preventDefault=void 0,s.stopPropagation=void 0,n[vn]._onDragOver(s)}}},x9=function(e){ft&&ft.parentNode[vn]._isOutsideThisEl(e.target)};function Nt(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=ps({},e),t[vn]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return xS(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(o,a){o.setData("Text",a.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Nt.supportPointer!==!1&&"PointerEvent"in window&&!ka,emptyInsertThreshold:5};vl.initializePlugins(this,t,n);for(var s in n)!(s in e)&&(e[s]=n[s]);IS(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:C9,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Jt(t,"pointerdown",this._onTapStart):(Jt(t,"mousedown",this._onTapStart),Jt(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(Jt(t,"dragover",this),Jt(t,"dragenter",this)),su.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ps(this,E9())}Nt.prototype={constructor:Nt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Zr=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,ft):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,s=this.el,i=this.options,r=i.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,l=(a||e).target,c=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,u=i.filter;if($9(s),!ft&&!(/mousedown|pointerdown/.test(o)&&e.button!==0||i.disabled)&&!c.isContentEditable&&!(!this.nativeDraggable&&ka&&l&&l.tagName.toUpperCase()==="SELECT")&&(l=ks(l,i.draggable,s,!1),!(l&&l.animated)&&mc!==l)){if(co=Fe(l),Ca=Fe(l,i.draggable),typeof u=="function"){if(u.call(this,e,l,this)){wn({sortable:n,rootEl:c,name:"filter",targetEl:l,toEl:s,fromEl:s}),Mn("filter",n,{evt:e}),r&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(d){if(d=ks(c,d.trim(),s,!1),d)return wn({sortable:n,rootEl:d,name:"filter",targetEl:l,fromEl:s,toEl:s}),Mn("filter",n,{evt:e}),!0}),u)){r&&e.cancelable&&e.preventDefault();return}i.handle&&!ks(c,i.handle,s,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,n,s){var i=this,r=i.el,o=i.options,a=r.ownerDocument,l;if(s&&!ft&&s.parentNode===r){var c=xe(s);if(Ae=r,ft=s,Me=ft.parentNode,pr=ft.nextSibling,mc=s,Gl=o.group,Nt.dragged=ft,dr={target:ft,clientX:(n||e).clientX,clientY:(n||e).clientY},Eb=dr.clientX-c.left,wb=dr.clientY-c.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,ft.style["will-change"]="all",l=function(){if(Mn("delayEnded",i,{evt:e}),Nt.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!yb&&i.nativeDraggable&&(ft.draggable=!0),i._triggerDragStart(e,n),wn({sortable:i,name:"choose",originalEvent:e}),Pe(ft,o.chosenClass,!0)},o.ignore.split(",").forEach(function(u){TS(ft,u.trim(),pf)}),Jt(a,"dragover",fr),Jt(a,"mousemove",fr),Jt(a,"touchmove",fr),Jt(a,"mouseup",i._onDrop),Jt(a,"touchend",i._onDrop),Jt(a,"touchcancel",i._onDrop),yb&&this.nativeDraggable&&(this.options.touchStartThreshold=4,ft.draggable=!0),Mn("delayStart",this,{evt:e}),o.delay&&(!o.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(bl||Ei))){if(Nt.eventCanceled){this._onDrop();return}Jt(a,"mouseup",i._disableDelayedDrag),Jt(a,"touchend",i._disableDelayedDrag),Jt(a,"touchcancel",i._disableDelayedDrag),Jt(a,"mousemove",i._delayedDragTouchMoveHandler),Jt(a,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&Jt(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(l,o.delay)}else l()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){ft&&pf(ft),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;zt(e,"mouseup",this._disableDelayedDrag),zt(e,"touchend",this._disableDelayedDrag),zt(e,"touchcancel",this._disableDelayedDrag),zt(e,"mousemove",this._delayedDragTouchMoveHandler),zt(e,"touchmove",this._delayedDragTouchMoveHandler),zt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?Jt(document,"pointermove",this._onTouchMove):n?Jt(document,"touchmove",this._onTouchMove):Jt(document,"mousemove",this._onTouchMove):(Jt(ft,"dragend",this),Jt(Ae,"dragstart",this._onDragStart));try{document.selection?yc(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(so=!1,Ae&&ft){Mn("dragStarted",this,{evt:n}),this.nativeDraggable&&Jt(document,"dragover",x9);var s=this.options;!e&&Pe(ft,s.dragClass,!1),Pe(ft,s.ghostClass,!0),Nt.active=this,e&&this._appendGhost(),wn({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(Ss){this._lastX=Ss.clientX,this._lastY=Ss.clientY,PS();for(var e=document.elementFromPoint(Ss.clientX,Ss.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(Ss.clientX,Ss.clientY),e!==n);)n=e;if(ft.parentNode[vn]._isOutsideThisEl(e),n)do{if(n[vn]){var s=void 0;if(s=n[vn]._onDragOver({clientX:Ss.clientX,clientY:Ss.clientY,target:e,rootEl:n}),s&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);NS()}},_onTouchMove:function(e){if(dr){var n=this.options,s=n.fallbackTolerance,i=n.fallbackOffset,r=e.touches?e.touches[0]:e,o=Ut&&Ar(Ut,!0),a=Ut&&o&&o.a,l=Ut&&o&&o.d,c=zl&&un&&_b(un),u=(r.clientX-dr.clientX+i.x)/(a||1)+(c?c[0]-hf[0]:0)/(a||1),d=(r.clientY-dr.clientY+i.y)/(l||1)+(c?c[1]-hf[1]:0)/(l||1);if(!Nt.active&&!so){if(s&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))=0&&(wn({rootEl:Me,name:"add",toEl:Me,fromEl:Ae,originalEvent:e}),wn({sortable:this,name:"remove",toEl:Me,originalEvent:e}),wn({rootEl:Me,name:"sort",toEl:Me,fromEl:Ae,originalEvent:e}),wn({sortable:this,name:"sort",toEl:Me,originalEvent:e})),an&&an.save()):Kn!==co&&Kn>=0&&(wn({sortable:this,name:"update",toEl:Me,originalEvent:e}),wn({sortable:this,name:"sort",toEl:Me,originalEvent:e})),Nt.active&&((Kn==null||Kn===-1)&&(Kn=co,Hi=Ca),wn({sortable:this,name:"end",toEl:Me,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Mn("nulling",this),Ae=ft=Me=Ut=pr=Re=mc=ji=dr=Ss=ca=Kn=Hi=co=Ca=Zr=Aa=an=Gl=Nt.dragged=Nt.ghost=Nt.clone=Nt.active=null,iu.forEach(function(e){e.checked=!0}),iu.length=df=ff=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":ft&&(this._onDragOver(e),I9(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,s=this.el.children,i=0,r=s.length,o=this.options;is.right+i||t.clientX<=s.right&&t.clientY>s.bottom&&t.clientX>=s.left:t.clientX>s.right&&t.clientY>s.top||t.clientX<=s.right&&t.clientY>s.bottom+i}function M9(t,e,n,s,i,r,o,a){var l=s?t.clientY:t.clientX,c=s?n.height:n.width,u=s?n.top:n.left,d=s?n.bottom:n.right,f=!1;if(!o){if(a&&gcu+c*r/2:ld-gc)return-Aa}else if(l>u+c*(1-i)/2&&ld-c*r/2)?l>u+c/2?1:-1:0}function R9(t){return Fe(ft)1&&($t.forEach(function(a){r.addAnimationState({target:a,rect:Rn?xe(a):o}),cf(a),a.fromRect=o,s.removeAnimationState(a)}),Rn=!1,j9(!this.options.removeCloneOnHide,i))},dragOverCompleted:function(n){var s=n.sortable,i=n.isOwner,r=n.insertion,o=n.activeSortable,a=n.parentEl,l=n.putSortable,c=this.options;if(r){if(i&&o._hideClone(),ea=!1,c.animation&&$t.length>1&&(Rn||!i&&!o.options.sort&&!l)){var u=xe(we,!1,!0,!0);$t.forEach(function(f){f!==we&&(Sb(f,u),a.appendChild(f))}),Rn=!0}if(!i)if(Rn||Yl(),$t.length>1){var d=Xl;o._showClone(s),o.options.animation&&!Xl&&d&&Gn.forEach(function(f){o.addAnimationState({target:f,rect:na}),f.fromRect=na,f.thisAnimationDuration=null})}else o._showClone(s)}},dragOverAnimationCapture:function(n){var s=n.dragRect,i=n.isOwner,r=n.activeSortable;if($t.forEach(function(a){a.thisAnimationDuration=null}),r.options.animation&&!i&&r.multiDrag.isMultiDrag){na=ps({},s);var o=Ar(we,!0);na.top-=o.f,na.left-=o.e}},dragOverAnimationComplete:function(){Rn&&(Rn=!1,Yl())},drop:function(n){var s=n.originalEvent,i=n.rootEl,r=n.parentEl,o=n.sortable,a=n.dispatchSortableEvent,l=n.oldIndex,c=n.putSortable,u=c||this.sortable;if(s){var d=this.options,f=r.children;if(!Jr)if(d.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Pe(we,d.selectedClass,!~$t.indexOf(we)),~$t.indexOf(we))$t.splice($t.indexOf(we),1),ta=null,la({sortable:o,rootEl:i,name:"deselect",targetEl:we});else{if($t.push(we),la({sortable:o,rootEl:i,name:"select",targetEl:we}),s.shiftKey&&ta&&o.el.contains(ta)){var h=Fe(ta),p=Fe(we);if(~h&&~p&&h!==p){var m,b;for(p>h?(b=h,m=p):(b=p,m=h+1);b1){var y=xe(we),_=Fe(we,":not(."+this.options.selectedClass+")");if(!ea&&d.animation&&(we.thisAnimationDuration=null),u.captureAnimationState(),!ea&&(d.animation&&(we.fromRect=y,$t.forEach(function(v){if(v.thisAnimationDuration=null,v!==we){var S=Rn?xe(v):y;v.fromRect=S,u.addAnimationState({target:v,rect:S})}})),Yl(),$t.forEach(function(v){f[_]?r.insertBefore(v,f[_]):r.appendChild(v),_++}),l===Fe(we))){var g=!1;$t.forEach(function(v){if(v.sortableIndex!==Fe(v)){g=!0;return}}),g&&a("update")}$t.forEach(function(v){cf(v)}),u.animateAll()}Es=u}(i===r||c&&c.lastPutMode!=="clone")&&Gn.forEach(function(v){v.parentNode&&v.parentNode.removeChild(v)})}},nullingGlobal:function(){this.isMultiDrag=Jr=!1,Gn.length=0},destroyGlobal:function(){this._deselectMultiDrag(),zt(document,"pointerup",this._deselectMultiDrag),zt(document,"mouseup",this._deselectMultiDrag),zt(document,"touchend",this._deselectMultiDrag),zt(document,"keydown",this._checkKeyDown),zt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(n){if(!(typeof Jr<"u"&&Jr)&&Es===this.sortable&&!(n&&ks(n.target,this.options.draggable,this.sortable.el,!1))&&!(n&&n.button!==0))for(;$t.length;){var s=$t[0];Pe(s,this.options.selectedClass,!1),$t.shift(),la({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:s})}},_checkKeyDown:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(n){n.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},ps(t,{pluginName:"multiDrag",utils:{select:function(n){var s=n.parentNode[vn];!s||!s.options.multiDrag||~$t.indexOf(n)||(Es&&Es!==s&&(Es.multiDrag._deselectMultiDrag(),Es=s),Pe(n,s.options.selectedClass,!0),$t.push(n))},deselect:function(n){var s=n.parentNode[vn],i=$t.indexOf(n);!s||!s.options.multiDrag||!~i||(Pe(n,s.options.selectedClass,!1),$t.splice(i,1))}},eventProperties:function(){var n=this,s=[],i=[];return $t.forEach(function(r){s.push({multiDragElement:r,index:r.sortableIndex});var o;Rn&&r!==we?o=-1:Rn?o=Fe(r,":not(."+n.options.selectedClass+")"):o=Fe(r),i.push({multiDragElement:r,index:o})}),{items:d9($t),clones:[].concat(Gn),oldIndicies:s,newIndicies:i}},optionListeners:{multiDragKey:function(n){return n=n.toLowerCase(),n==="ctrl"?n="Control":n.length>1&&(n=n.charAt(0).toUpperCase()+n.substr(1)),n}}})}function j9(t,e){$t.forEach(function(n,s){var i=e.children[n.sortableIndex+(t?Number(s):0)];i?e.insertBefore(n,i):e.appendChild(n)})}function Cb(t,e){Gn.forEach(function(n,s){var i=e.children[n.sortableIndex+(t?Number(s):0)];i?e.insertBefore(n,i):e.appendChild(n)})}function Yl(){$t.forEach(function(t){t!==we&&t.parentNode&&t.parentNode.removeChild(t)})}Nt.mount(new F9);Nt.mount(mm,pm);const B9=Object.freeze(Object.defineProperty({__proto__:null,MultiDrag:U9,Sortable:Nt,Swap:V9,default:Nt},Symbol.toStringTag,{value:"Module"})),W9=ju(B9);var G9=hc.exports,Ab;function K9(){return Ab||(Ab=1,function(t,e){(function(s,i){t.exports=i(Z_(),W9)})(typeof self<"u"?self:G9,function(n,s){return function(i){var r={};function o(a){if(r[a])return r[a].exports;var l=r[a]={i:a,l:!1,exports:{}};return i[a].call(l.exports,l,l.exports,o),l.l=!0,l.exports}return o.m=i,o.c=r,o.d=function(a,l,c){o.o(a,l)||Object.defineProperty(a,l,{enumerable:!0,get:c})},o.r=function(a){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(a,"__esModule",{value:!0})},o.t=function(a,l){if(l&1&&(a=o(a)),l&8||l&4&&typeof a=="object"&&a&&a.__esModule)return a;var c=Object.create(null);if(o.r(c),Object.defineProperty(c,"default",{enumerable:!0,value:a}),l&2&&typeof a!="string")for(var u in a)o.d(c,u,(function(d){return a[d]}).bind(null,u));return c},o.n=function(a){var l=a&&a.__esModule?function(){return a.default}:function(){return a};return o.d(l,"a",l),l},o.o=function(a,l){return Object.prototype.hasOwnProperty.call(a,l)},o.p="",o(o.s="fb15")}({"00ee":function(i,r,o){var a=o("b622"),l=a("toStringTag"),c={};c[l]="z",i.exports=String(c)==="[object z]"},"0366":function(i,r,o){var a=o("1c0b");i.exports=function(l,c,u){if(a(l),c===void 0)return l;switch(u){case 0:return function(){return l.call(c)};case 1:return function(d){return l.call(c,d)};case 2:return function(d,f){return l.call(c,d,f)};case 3:return function(d,f,h){return l.call(c,d,f,h)}}return function(){return l.apply(c,arguments)}}},"057f":function(i,r,o){var a=o("fc6a"),l=o("241c").f,c={}.toString,u=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],d=function(f){try{return l(f)}catch{return u.slice()}};i.exports.f=function(h){return u&&c.call(h)=="[object Window]"?d(h):l(a(h))}},"06cf":function(i,r,o){var a=o("83ab"),l=o("d1e7"),c=o("5c6c"),u=o("fc6a"),d=o("c04e"),f=o("5135"),h=o("0cfb"),p=Object.getOwnPropertyDescriptor;r.f=a?p:function(b,y){if(b=u(b),y=d(y,!0),h)try{return p(b,y)}catch{}if(f(b,y))return c(!l.f.call(b,y),b[y])}},"0cfb":function(i,r,o){var a=o("83ab"),l=o("d039"),c=o("cc12");i.exports=!a&&!l(function(){return Object.defineProperty(c("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(i,r,o){var a=o("23e7"),l=o("d58f").left,c=o("a640"),u=o("ae40"),d=c("reduce"),f=u("reduce",{1:0});a({target:"Array",proto:!0,forced:!d||!f},{reduce:function(p){return l(this,p,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(i,r,o){var a=o("c6b6"),l=o("9263");i.exports=function(c,u){var d=c.exec;if(typeof d=="function"){var f=d.call(c,u);if(typeof f!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return f}if(a(c)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return l.call(c,u)}},"159b":function(i,r,o){var a=o("da84"),l=o("fdbc"),c=o("17c2"),u=o("9112");for(var d in l){var f=a[d],h=f&&f.prototype;if(h&&h.forEach!==c)try{u(h,"forEach",c)}catch{h.forEach=c}}},"17c2":function(i,r,o){var a=o("b727").forEach,l=o("a640"),c=o("ae40"),u=l("forEach"),d=c("forEach");i.exports=!u||!d?function(h){return a(this,h,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(i,r,o){var a=o("d066");i.exports=a("document","documentElement")},"1c0b":function(i,r){i.exports=function(o){if(typeof o!="function")throw TypeError(String(o)+" is not a function");return o}},"1c7e":function(i,r,o){var a=o("b622"),l=a("iterator"),c=!1;try{var u=0,d={next:function(){return{done:!!u++}},return:function(){c=!0}};d[l]=function(){return this},Array.from(d,function(){throw 2})}catch{}i.exports=function(f,h){if(!h&&!c)return!1;var p=!1;try{var m={};m[l]=function(){return{next:function(){return{done:p=!0}}}},f(m)}catch{}return p}},"1d80":function(i,r){i.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}},"1dde":function(i,r,o){var a=o("d039"),l=o("b622"),c=o("2d00"),u=l("species");i.exports=function(d){return c>=51||!a(function(){var f=[],h=f.constructor={};return h[u]=function(){return{foo:1}},f[d](Boolean).foo!==1})}},"23cb":function(i,r,o){var a=o("a691"),l=Math.max,c=Math.min;i.exports=function(u,d){var f=a(u);return f<0?l(f+d,0):c(f,d)}},"23e7":function(i,r,o){var a=o("da84"),l=o("06cf").f,c=o("9112"),u=o("6eeb"),d=o("ce4e"),f=o("e893"),h=o("94ca");i.exports=function(p,m){var b=p.target,y=p.global,_=p.stat,g,v,S,k,P,R;if(y?v=a:_?v=a[b]||d(b,{}):v=(a[b]||{}).prototype,v)for(S in m){if(P=m[S],p.noTargetGet?(R=l(v,S),k=R&&R.value):k=v[S],g=h(y?S:b+(_?".":"#")+S,p.forced),!g&&k!==void 0){if(typeof P==typeof k)continue;f(P,k)}(p.sham||k&&k.sham)&&c(P,"sham",!0),u(v,S,P,p)}}},"241c":function(i,r,o){var a=o("ca84"),l=o("7839"),c=l.concat("length","prototype");r.f=Object.getOwnPropertyNames||function(d){return a(d,c)}},"25f0":function(i,r,o){var a=o("6eeb"),l=o("825a"),c=o("d039"),u=o("ad6d"),d="toString",f=RegExp.prototype,h=f[d],p=c(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),m=h.name!=d;(p||m)&&a(RegExp.prototype,d,function(){var y=l(this),_=String(y.source),g=y.flags,v=String(g===void 0&&y instanceof RegExp&&!("flags"in f)?u.call(y):g);return"/"+_+"/"+v},{unsafe:!0})},"2ca0":function(i,r,o){var a=o("23e7"),l=o("06cf").f,c=o("50c4"),u=o("5a34"),d=o("1d80"),f=o("ab13"),h=o("c430"),p="".startsWith,m=Math.min,b=f("startsWith"),y=!h&&!b&&!!function(){var _=l(String.prototype,"startsWith");return _&&!_.writable}();a({target:"String",proto:!0,forced:!y&&!b},{startsWith:function(g){var v=String(d(this));u(g);var S=c(m(arguments.length>1?arguments[1]:void 0,v.length)),k=String(g);return p?p.call(v,k,S):v.slice(S,S+k.length)===k}})},"2d00":function(i,r,o){var a=o("da84"),l=o("342f"),c=a.process,u=c&&c.versions,d=u&&u.v8,f,h;d?(f=d.split("."),h=f[0]+f[1]):l&&(f=l.match(/Edge\/(\d+)/),(!f||f[1]>=74)&&(f=l.match(/Chrome\/(\d+)/),f&&(h=f[1]))),i.exports=h&&+h},"342f":function(i,r,o){var a=o("d066");i.exports=a("navigator","userAgent")||""},"35a1":function(i,r,o){var a=o("f5df"),l=o("3f8c"),c=o("b622"),u=c("iterator");i.exports=function(d){if(d!=null)return d[u]||d["@@iterator"]||l[a(d)]}},"37e8":function(i,r,o){var a=o("83ab"),l=o("9bf2"),c=o("825a"),u=o("df75");i.exports=a?Object.defineProperties:function(f,h){c(f);for(var p=u(h),m=p.length,b=0,y;m>b;)l.f(f,y=p[b++],h[y]);return f}},"3bbe":function(i,r,o){var a=o("861d");i.exports=function(l){if(!a(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype");return l}},"3ca3":function(i,r,o){var a=o("6547").charAt,l=o("69f3"),c=o("7dd0"),u="String Iterator",d=l.set,f=l.getterFor(u);c(String,"String",function(h){d(this,{type:u,string:String(h),index:0})},function(){var p=f(this),m=p.string,b=p.index,y;return b>=m.length?{value:void 0,done:!0}:(y=a(m,b),p.index+=y.length,{value:y,done:!1})})},"3f8c":function(i,r){i.exports={}},4160:function(i,r,o){var a=o("23e7"),l=o("17c2");a({target:"Array",proto:!0,forced:[].forEach!=l},{forEach:l})},"428f":function(i,r,o){var a=o("da84");i.exports=a},"44ad":function(i,r,o){var a=o("d039"),l=o("c6b6"),c="".split;i.exports=a(function(){return!Object("z").propertyIsEnumerable(0)})?function(u){return l(u)=="String"?c.call(u,""):Object(u)}:Object},"44d2":function(i,r,o){var a=o("b622"),l=o("7c73"),c=o("9bf2"),u=a("unscopables"),d=Array.prototype;d[u]==null&&c.f(d,u,{configurable:!0,value:l(null)}),i.exports=function(f){d[u][f]=!0}},"44e7":function(i,r,o){var a=o("861d"),l=o("c6b6"),c=o("b622"),u=c("match");i.exports=function(d){var f;return a(d)&&((f=d[u])!==void 0?!!f:l(d)=="RegExp")}},4930:function(i,r,o){var a=o("d039");i.exports=!!Object.getOwnPropertySymbols&&!a(function(){return!String(Symbol())})},"4d64":function(i,r,o){var a=o("fc6a"),l=o("50c4"),c=o("23cb"),u=function(d){return function(f,h,p){var m=a(f),b=l(m.length),y=c(p,b),_;if(d&&h!=h){for(;b>y;)if(_=m[y++],_!=_)return!0}else for(;b>y;y++)if((d||y in m)&&m[y]===h)return d||y||0;return!d&&-1}};i.exports={includes:u(!0),indexOf:u(!1)}},"4de4":function(i,r,o){var a=o("23e7"),l=o("b727").filter,c=o("1dde"),u=o("ae40"),d=c("filter"),f=u("filter");a({target:"Array",proto:!0,forced:!d||!f},{filter:function(p){return l(this,p,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(i,r,o){var a=o("0366"),l=o("7b0b"),c=o("9bdd"),u=o("e95a"),d=o("50c4"),f=o("8418"),h=o("35a1");i.exports=function(m){var b=l(m),y=typeof this=="function"?this:Array,_=arguments.length,g=_>1?arguments[1]:void 0,v=g!==void 0,S=h(b),k=0,P,R,T,D,j,F;if(v&&(g=a(g,_>2?arguments[2]:void 0,2)),S!=null&&!(y==Array&&u(S)))for(D=S.call(b),j=D.next,R=new y;!(T=j.call(D)).done;k++)F=v?c(D,g,[T.value,k],!0):T.value,f(R,k,F);else for(P=d(b.length),R=new y(P);P>k;k++)F=v?g(b[k],k):b[k],f(R,k,F);return R.length=k,R}},"4fad":function(i,r,o){var a=o("23e7"),l=o("6f53").entries;a({target:"Object",stat:!0},{entries:function(u){return l(u)}})},"50c4":function(i,r,o){var a=o("a691"),l=Math.min;i.exports=function(c){return c>0?l(a(c),9007199254740991):0}},5135:function(i,r){var o={}.hasOwnProperty;i.exports=function(a,l){return o.call(a,l)}},5319:function(i,r,o){var a=o("d784"),l=o("825a"),c=o("7b0b"),u=o("50c4"),d=o("a691"),f=o("1d80"),h=o("8aa5"),p=o("14c3"),m=Math.max,b=Math.min,y=Math.floor,_=/\$([$&'`]|\d\d?|<[^>]*>)/g,g=/\$([$&'`]|\d\d?)/g,v=function(S){return S===void 0?S:String(S)};a("replace",2,function(S,k,P,R){var T=R.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,D=R.REPLACE_KEEPS_$0,j=T?"$":"$0";return[function(Y,ot){var G=f(this),tt=Y==null?void 0:Y[S];return tt!==void 0?tt.call(Y,G,ot):k.call(String(G),Y,ot)},function(U,Y){if(!T&&D||typeof Y=="string"&&Y.indexOf(j)===-1){var ot=P(k,U,this,Y);if(ot.done)return ot.value}var G=l(U),tt=String(this),at=typeof Y=="function";at||(Y=String(Y));var Tt=G.global;if(Tt){var qt=G.unicode;G.lastIndex=0}for(var Vt=[];;){var Bt=p(G,tt);if(Bt===null||(Vt.push(Bt),!Tt))break;var ge=String(Bt[0]);ge===""&&(G.lastIndex=h(tt,u(G.lastIndex),qt))}for(var ve="",Se=0,Wt=0;Wt=Se&&(ve+=tt.slice(Se,dt)+O,Se=dt+X.length)}return ve+tt.slice(Se)}];function F(U,Y,ot,G,tt,at){var Tt=ot+U.length,qt=G.length,Vt=g;return tt!==void 0&&(tt=c(tt),Vt=_),k.call(at,Vt,function(Bt,ge){var ve;switch(ge.charAt(0)){case"$":return"$";case"&":return U;case"`":return Y.slice(0,ot);case"'":return Y.slice(Tt);case"<":ve=tt[ge.slice(1,-1)];break;default:var Se=+ge;if(Se===0)return Bt;if(Se>qt){var Wt=y(Se/10);return Wt===0?Bt:Wt<=qt?G[Wt-1]===void 0?ge.charAt(1):G[Wt-1]+ge.charAt(1):Bt}ve=G[Se-1]}return ve===void 0?"":ve})}})},5692:function(i,r,o){var a=o("c430"),l=o("c6cd");(i.exports=function(c,u){return l[c]||(l[c]=u!==void 0?u:{})})("versions",[]).push({version:"3.6.5",mode:a?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(i,r,o){var a=o("d066"),l=o("241c"),c=o("7418"),u=o("825a");i.exports=a("Reflect","ownKeys")||function(f){var h=l.f(u(f)),p=c.f;return p?h.concat(p(f)):h}},"5a34":function(i,r,o){var a=o("44e7");i.exports=function(l){if(a(l))throw TypeError("The method doesn't accept regular expressions");return l}},"5c6c":function(i,r){i.exports=function(o,a){return{enumerable:!(o&1),configurable:!(o&2),writable:!(o&4),value:a}}},"5db7":function(i,r,o){var a=o("23e7"),l=o("a2bf"),c=o("7b0b"),u=o("50c4"),d=o("1c0b"),f=o("65f0");a({target:"Array",proto:!0},{flatMap:function(p){var m=c(this),b=u(m.length),y;return d(p),y=f(m,0),y.length=l(y,m,m,b,0,1,p,arguments.length>1?arguments[1]:void 0),y}})},6547:function(i,r,o){var a=o("a691"),l=o("1d80"),c=function(u){return function(d,f){var h=String(l(d)),p=a(f),m=h.length,b,y;return p<0||p>=m?u?"":void 0:(b=h.charCodeAt(p),b<55296||b>56319||p+1===m||(y=h.charCodeAt(p+1))<56320||y>57343?u?h.charAt(p):b:u?h.slice(p,p+2):(b-55296<<10)+(y-56320)+65536)}};i.exports={codeAt:c(!1),charAt:c(!0)}},"65f0":function(i,r,o){var a=o("861d"),l=o("e8b5"),c=o("b622"),u=c("species");i.exports=function(d,f){var h;return l(d)&&(h=d.constructor,typeof h=="function"&&(h===Array||l(h.prototype))?h=void 0:a(h)&&(h=h[u],h===null&&(h=void 0))),new(h===void 0?Array:h)(f===0?0:f)}},"69f3":function(i,r,o){var a=o("7f9a"),l=o("da84"),c=o("861d"),u=o("9112"),d=o("5135"),f=o("f772"),h=o("d012"),p=l.WeakMap,m,b,y,_=function(T){return y(T)?b(T):m(T,{})},g=function(T){return function(D){var j;if(!c(D)||(j=b(D)).type!==T)throw TypeError("Incompatible receiver, "+T+" required");return j}};if(a){var v=new p,S=v.get,k=v.has,P=v.set;m=function(T,D){return P.call(v,T,D),D},b=function(T){return S.call(v,T)||{}},y=function(T){return k.call(v,T)}}else{var R=f("state");h[R]=!0,m=function(T,D){return u(T,R,D),D},b=function(T){return d(T,R)?T[R]:{}},y=function(T){return d(T,R)}}i.exports={set:m,get:b,has:y,enforce:_,getterFor:g}},"6eeb":function(i,r,o){var a=o("da84"),l=o("9112"),c=o("5135"),u=o("ce4e"),d=o("8925"),f=o("69f3"),h=f.get,p=f.enforce,m=String(String).split("String");(i.exports=function(b,y,_,g){var v=g?!!g.unsafe:!1,S=g?!!g.enumerable:!1,k=g?!!g.noTargetGet:!1;if(typeof _=="function"&&(typeof y=="string"&&!c(_,"name")&&l(_,"name",y),p(_).source=m.join(typeof y=="string"?y:"")),b===a){S?b[y]=_:u(y,_);return}else v?!k&&b[y]&&(S=!0):delete b[y];S?b[y]=_:l(b,y,_)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||d(this)})},"6f53":function(i,r,o){var a=o("83ab"),l=o("df75"),c=o("fc6a"),u=o("d1e7").f,d=function(f){return function(h){for(var p=c(h),m=l(p),b=m.length,y=0,_=[],g;b>y;)g=m[y++],(!a||u.call(p,g))&&_.push(f?[g,p[g]]:p[g]);return _}};i.exports={entries:d(!0),values:d(!1)}},"73d9":function(i,r,o){var a=o("44d2");a("flatMap")},7418:function(i,r){r.f=Object.getOwnPropertySymbols},"746f":function(i,r,o){var a=o("428f"),l=o("5135"),c=o("e538"),u=o("9bf2").f;i.exports=function(d){var f=a.Symbol||(a.Symbol={});l(f,d)||u(f,d,{value:c.f(d)})}},7839:function(i,r){i.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(i,r,o){var a=o("1d80");i.exports=function(l){return Object(a(l))}},"7c73":function(i,r,o){var a=o("825a"),l=o("37e8"),c=o("7839"),u=o("d012"),d=o("1be4"),f=o("cc12"),h=o("f772"),p=">",m="<",b="prototype",y="script",_=h("IE_PROTO"),g=function(){},v=function(T){return m+y+p+T+m+"/"+y+p},S=function(T){T.write(v("")),T.close();var D=T.parentWindow.Object;return T=null,D},k=function(){var T=f("iframe"),D="java"+y+":",j;return T.style.display="none",d.appendChild(T),T.src=String(D),j=T.contentWindow.document,j.open(),j.write(v("document.F=Object")),j.close(),j.F},P,R=function(){try{P=document.domain&&new ActiveXObject("htmlfile")}catch{}R=P?S(P):k();for(var T=c.length;T--;)delete R[b][c[T]];return R()};u[_]=!0,i.exports=Object.create||function(D,j){var F;return D!==null?(g[b]=a(D),F=new g,g[b]=null,F[_]=D):F=R(),j===void 0?F:l(F,j)}},"7dd0":function(i,r,o){var a=o("23e7"),l=o("9ed3"),c=o("e163"),u=o("d2bb"),d=o("d44e"),f=o("9112"),h=o("6eeb"),p=o("b622"),m=o("c430"),b=o("3f8c"),y=o("ae93"),_=y.IteratorPrototype,g=y.BUGGY_SAFARI_ITERATORS,v=p("iterator"),S="keys",k="values",P="entries",R=function(){return this};i.exports=function(T,D,j,F,U,Y,ot){l(j,D,F);var G=function(Wt){if(Wt===U&&Vt)return Vt;if(!g&&Wt in Tt)return Tt[Wt];switch(Wt){case S:return function(){return new j(this,Wt)};case k:return function(){return new j(this,Wt)};case P:return function(){return new j(this,Wt)}}return function(){return new j(this)}},tt=D+" Iterator",at=!1,Tt=T.prototype,qt=Tt[v]||Tt["@@iterator"]||U&&Tt[U],Vt=!g&&qt||G(U),Bt=D=="Array"&&Tt.entries||qt,ge,ve,Se;if(Bt&&(ge=c(Bt.call(new T)),_!==Object.prototype&&ge.next&&(!m&&c(ge)!==_&&(u?u(ge,_):typeof ge[v]!="function"&&f(ge,v,R)),d(ge,tt,!0,!0),m&&(b[tt]=R))),U==k&&qt&&qt.name!==k&&(at=!0,Vt=function(){return qt.call(this)}),(!m||ot)&&Tt[v]!==Vt&&f(Tt,v,Vt),b[D]=Vt,U)if(ve={values:G(k),keys:Y?Vt:G(S),entries:G(P)},ot)for(Se in ve)(g||at||!(Se in Tt))&&h(Tt,Se,ve[Se]);else a({target:D,proto:!0,forced:g||at},ve);return ve}},"7f9a":function(i,r,o){var a=o("da84"),l=o("8925"),c=a.WeakMap;i.exports=typeof c=="function"&&/native code/.test(l(c))},"825a":function(i,r,o){var a=o("861d");i.exports=function(l){if(!a(l))throw TypeError(String(l)+" is not an object");return l}},"83ab":function(i,r,o){var a=o("d039");i.exports=!a(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(i,r,o){var a=o("c04e"),l=o("9bf2"),c=o("5c6c");i.exports=function(u,d,f){var h=a(d);h in u?l.f(u,h,c(0,f)):u[h]=f}},"861d":function(i,r){i.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}},8875:function(i,r,o){var a,l,c;(function(u,d){l=[],a=d,c=typeof a=="function"?a.apply(r,l):a,c!==void 0&&(i.exports=c)})(typeof self<"u"?self:this,function(){function u(){var d=Object.getOwnPropertyDescriptor(document,"currentScript");if(!d&&"currentScript"in document&&document.currentScript||d&&d.get!==u&&document.currentScript)return document.currentScript;try{throw new Error}catch(P){var f=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,h=/@([^@]*):(\d+):(\d+)\s*$/ig,p=f.exec(P.stack)||h.exec(P.stack),m=p&&p[1]||!1,b=p&&p[2]||!1,y=document.location.href.replace(document.location.hash,""),_,g,v,S=document.getElementsByTagName("script");m===y&&(_=document.documentElement.outerHTML,g=new RegExp("(?:[^\\n]+?\\n){0,"+(b-2)+"}[^<]* diff --git a/web-src/src/pages/PageAbout.vue b/web-src/src/pages/PageAbout.vue index 3bedd873..b506e54f 100644 --- a/web-src/src/pages/PageAbout.vue +++ b/web-src/src/pages/PageAbout.vue @@ -1,7 +1,7 @@