diff --git a/htdocs/assets/index.js b/htdocs/assets/index.js index c9311702..d00f82c2 100644 --- a/htdocs/assets/index.js +++ b/htdocs/assets/index.js @@ -27,7 +27,7 @@ * vue-router v4.2.5 * (c) 2023 Eduardo San Martin Morote * @license MIT - */const Ls=typeof window<"u";function OT(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const it=Object.assign;function ju(e,t){const n={};for(const r in t){const s=t[r];n[r]=Gn(s)?s.map(e):e(s)}return n}const ea=()=>{},Gn=Array.isArray,DT=/\/$/,PT=e=>e.replace(DT,"");function qu(e,t,n="/"){let r,s={},o="",a="";const i=t.indexOf("#");let l=t.indexOf("?");return i=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,i>-1?i:t.length),s=e(o)),i>-1&&(r=r||t.slice(0,i),a=t.slice(i,t.length)),r=LT(r??t,n),{fullPath:r+(o&&"?")+o+a,path:r,query:s,hash:a}}function IT(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Kp(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function FT(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&lo(t.matched[r],n.matched[s])&&qv(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function lo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function qv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!RT(e[n],t[n]))return!1;return!0}function RT(e,t){return Gn(e)?Gp(e,t):Gn(t)?Gp(t,e):e===t}function Gp(e,t){return Gn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function LT(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,a,i;for(a=0;a1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(a-(a===r.length?1:0)).join("/")}var za;(function(e){e.pop="pop",e.push="push"})(za||(za={}));var ta;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ta||(ta={}));function NT(e){if(!e)if(Ls){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),PT(e)}const MT=/^[^#]+#/;function VT(e,t){return e.replace(MT,"#")+t}function HT(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const cu=()=>({left:window.pageXOffset,top:window.pageYOffset});function BT(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=HT(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Zp(e,t){return(history.state?history.state.position-t:-1)+e}const Yc=new Map;function UT(e,t){Yc.set(e,t)}function jT(e){const t=Yc.get(e);return Yc.delete(e),t}let qT=()=>location.protocol+"//"+location.host;function Wv(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let i=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(i);return l[0]!=="/"&&(l="/"+l),Kp(l,"")}return Kp(n,e)+r+s}function WT(e,t,n,r){let s=[],o=[],a=null;const i=({state:f})=>{const p=Wv(e,location),h=n.value,_=t.value;let b=0;if(f){if(n.value=p,t.value=f,a&&a===h){a=null;return}b=_?f.position-_.position:0}else r(p);s.forEach(w=>{w(n.value,h,{delta:b,type:za.pop,direction:b?b>0?ta.forward:ta.back:ta.unknown})})};function l(){a=n.value}function c(f){s.push(f);const p=()=>{const h=s.indexOf(f);h>-1&&s.splice(h,1)};return o.push(p),p}function m(){const{history:f}=window;f.state&&f.replaceState(it({},f.state,{scroll:cu()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",m)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",m,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Yp(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?cu():null}}function KT(e){const{history:t,location:n}=window,r={value:Wv(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,c,m){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:qT()+e+l;try{t[m?"replaceState":"pushState"](c,"",f),s.value=c}catch(p){console.error(p),n[m?"replace":"assign"](f)}}function a(l,c){const m=it({},t.state,Yp(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});o(l,m,!0),r.value=l}function i(l,c){const m=it({},s.value,t.state,{forward:l,scroll:cu()});o(m.current,m,!0);const d=it({},Yp(r.value,l,null),{position:m.position+1},c);o(l,d,!1),r.value=l}return{location:r,state:s,push:i,replace:a}}function GT(e){e=NT(e);const t=KT(e),n=WT(e,t.state,t.location,t.replace);function r(o,a=!0){a||n.pauseListeners(),history.go(o)}const s=it({location:"",base:e,go:r,createHref:VT.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function ZT(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),GT(e)}function YT(e){return typeof e=="string"||e&&typeof e=="object"}function Kv(e){return typeof e=="string"||typeof e=="symbol"}const Or={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Gv=Symbol("");var Jp;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Jp||(Jp={}));function uo(e,t){return it(new Error,{type:e,[Gv]:!0},t)}function mr(e,t){return e instanceof Error&&Gv in e&&(t==null||!!(e.type&t))}const Xp="[^/]+?",JT={sensitive:!1,strict:!1,start:!0,end:!0},XT=/[.+*?^${}()[\]/\\]/g;function QT(e,t){const n=it({},JT,t),r=[];let s=n.start?"^":"";const o=[];for(const c of e){const m=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function tO(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const nO={type:0,value:""},rO=/[a-zA-Z0-9_]/;function sO(e){if(!e)return[[]];if(e==="/")return[[nO]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,r=n;const s=[];let o;function a(){o&&s.push(o),o=[]}let i=0,l,c="",m="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:m,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;i{a(C)}:ea}function a(m){if(Kv(m)){const d=r.get(m);d&&(r.delete(m),n.splice(n.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=n.indexOf(m);d>-1&&(n.splice(d,1),m.record.name&&r.delete(m.record.name),m.children.forEach(a),m.alias.forEach(a))}}function i(){return n}function l(m){let d=0;for(;d=0&&(m.record.path!==n[d].record.path||!Zv(m,n[d]));)d++;n.splice(d,0,m),m.record.name&&!th(m)&&r.set(m.record.name,m)}function c(m,d){let f,p={},h,_;if("name"in m&&m.name){if(f=r.get(m.name),!f)throw uo(1,{location:m});_=f.record.name,p=it(eh(d.params,f.keys.filter(C=>!C.optional).map(C=>C.name)),m.params&&eh(m.params,f.keys.map(C=>C.name))),h=f.stringify(p)}else if("path"in m)h=m.path,f=n.find(C=>C.re.test(h)),f&&(p=f.parse(h),_=f.record.name);else{if(f=d.name?r.get(d.name):n.find(C=>C.re.test(d.path)),!f)throw uo(1,{location:m,currentLocation:d});_=f.record.name,p=it({},d.params,m.params),h=f.stringify(p)}const b=[];let w=f;for(;w;)b.unshift(w.record),w=w.parent;return{name:_,path:h,params:p,matched:b,meta:uO(b)}}return e.forEach(m=>o(m)),{addRoute:o,resolve:c,removeRoute:a,getRoutes:i,getRecordMatcher:s}}function eh(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function iO(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:lO(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function lO(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function th(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uO(e){return e.reduce((t,n)=>it(t,n.meta),{})}function nh(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Zv(e,t){return t.children.some(n=>n===e||Zv(e,n))}const Yv=/#/g,cO=/&/g,dO=/\//g,mO=/=/g,fO=/\?/g,Jv=/\+/g,pO=/%5B/g,hO=/%5D/g,Xv=/%5E/g,_O=/%60/g,Qv=/%7B/g,gO=/%7C/g,e1=/%7D/g,yO=/%20/g;function bm(e){return encodeURI(""+e).replace(gO,"|").replace(pO,"[").replace(hO,"]")}function vO(e){return bm(e).replace(Qv,"{").replace(e1,"}").replace(Xv,"^")}function Jc(e){return bm(e).replace(Jv,"%2B").replace(yO,"+").replace(Yv,"%23").replace(cO,"%26").replace(_O,"`").replace(Qv,"{").replace(e1,"}").replace(Xv,"^")}function bO(e){return Jc(e).replace(mO,"%3D")}function zO(e){return bm(e).replace(Yv,"%23").replace(fO,"%3F")}function CO(e){return e==null?"":zO(e).replace(dO,"%2F")}function wl(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function wO(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Jc(o)):[r&&Jc(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function kO(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Gn(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const xO=Symbol(""),sh=Symbol(""),zm=Symbol(""),t1=Symbol(""),Xc=Symbol("");function To(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Lr(e,t,n,r,s){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,i)=>{const l=d=>{d===!1?i(uo(4,{from:n,to:t})):d instanceof Error?i(d):YT(d)?i(uo(2,{from:t,to:d})):(o&&r.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},c=e.call(r&&r.instances[s],t,n,l);let m=Promise.resolve(c);e.length<3&&(m=m.then(l)),m.catch(d=>i(d))})}function Wu(e,t,n,r){const s=[];for(const o of e)for(const a in o.components){let i=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(EO(i)){const c=(i.__vccOpts||i)[t];c&&s.push(Lr(c,n,r,o,a))}else{let l=i();s.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const m=OT(c)?c.default:c;o.components[a]=m;const f=(m.__vccOpts||m)[t];return f&&Lr(f,n,r,o,a)()}))}}return s}function EO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function oh(e){const t=qn(zm),n=qn(t1),r=Nt(()=>t.resolve(vn(e.to))),s=Nt(()=>{const{matched:l}=r.value,{length:c}=l,m=l[c-1],d=n.matched;if(!m||!d.length)return-1;const f=d.findIndex(lo.bind(null,m));if(f>-1)return f;const p=ah(l[c-2]);return c>1&&ah(m)===p&&d[d.length-1].path!==p?d.findIndex(lo.bind(null,l[c-2])):f}),o=Nt(()=>s.value>-1&&TO(n.params,r.value.params)),a=Nt(()=>s.value>-1&&s.value===n.matched.length-1&&qv(n.params,r.value.params));function i(l={}){return AO(l)?t[vn(e.replace)?"replace":"push"](vn(e.to)).catch(ea):Promise.resolve()}return{route:r,href:Nt(()=>r.value.href),isActive:o,isExactActive:a,navigate:i}}const SO=zr({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"}},useLink:oh,setup(e,{slots:t}){const n=ho(oh(e)),{options:r}=qn(zm),s=Nt(()=>({[ih(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[ih(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:tr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),$O=SO;function AO(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function TO(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Gn(s)||s.length!==r.length||r.some((o,a)=>o!==s[a]))return!1}return!0}function ah(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ih=(e,t,n)=>e??t??n,OO=zr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qn(Xc),s=Nt(()=>e.route||r.value),o=qn(sh,0),a=Nt(()=>{let c=vn(o);const{matched:m}=s.value;let d;for(;(d=m[c])&&!d.components;)c++;return c}),i=Nt(()=>s.value.matched[a.value]);Ko(sh,Nt(()=>a.value+1)),Ko(xO,i),Ko(Xc,s);const l=Xt();return en(()=>[l.value,i.value,e.name],([c,m,d],[f,p,h])=>{m&&(m.instances[d]=c,p&&p!==m&&c&&c===f&&(m.leaveGuards.size||(m.leaveGuards=p.leaveGuards),m.updateGuards.size||(m.updateGuards=p.updateGuards))),c&&m&&(!p||!lo(m,p)||!f)&&(m.enterCallbacks[d]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,m=e.name,d=i.value,f=d&&d.components[m];if(!f)return lh(n.default,{Component:f,route:c});const p=d.props[m],h=p?p===!0?c.params:typeof p=="function"?p(c):p:null,b=tr(f,it({},h,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[m]=null)},ref:l}));return lh(n.default,{Component:b,route:c})||b}}});function lh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const DO=OO;function PO(e){const t=aO(e.routes,e),n=e.parseQuery||wO,r=e.stringifyQuery||rh,s=e.history,o=To(),a=To(),i=To(),l=C_(Or);let c=Or;Ls&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const m=ju.bind(null,j=>""+j),d=ju.bind(null,CO),f=ju.bind(null,wl);function p(j,ue){let se,ve;return Kv(j)?(se=t.getRecordMatcher(j),ve=ue):ve=j,t.addRoute(ve,se)}function h(j){const ue=t.getRecordMatcher(j);ue&&t.removeRoute(ue)}function _(){return t.getRoutes().map(j=>j.record)}function b(j){return!!t.getRecordMatcher(j)}function w(j,ue){if(ue=it({},ue||l.value),typeof j=="string"){const I=qu(n,j,ue.path),G=t.resolve({path:I.path},ue),Y=s.createHref(I.fullPath);return it(I,G,{params:f(G.params),hash:wl(I.hash),redirectedFrom:void 0,href:Y})}let se;if("path"in j)se=it({},j,{path:qu(n,j.path,ue.path).path});else{const I=it({},j.params);for(const G in I)I[G]==null&&delete I[G];se=it({},j,{params:d(I)}),ue.params=d(ue.params)}const ve=t.resolve(se,ue),Be=j.hash||"";ve.params=m(f(ve.params));const T=IT(r,it({},j,{hash:vO(Be),path:ve.path})),O=s.createHref(T);return it({fullPath:T,hash:Be,query:r===rh?kO(j.query):j.query||{}},ve,{redirectedFrom:void 0,href:O})}function C(j){return typeof j=="string"?qu(n,j,l.value.path):it({},j)}function z(j,ue){if(c!==j)return uo(8,{from:ue,to:j})}function v(j){return D(j)}function S(j){return v(it(C(j),{replace:!0}))}function A(j){const ue=j.matched[j.matched.length-1];if(ue&&ue.redirect){const{redirect:se}=ue;let ve=typeof se=="function"?se(j):se;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=C(ve):{path:ve},ve.params={}),it({query:j.query,hash:j.hash,params:"path"in ve?{}:j.params},ve)}}function D(j,ue){const se=c=w(j),ve=l.value,Be=j.state,T=j.force,O=j.replace===!0,I=A(se);if(I)return D(it(C(I),{state:typeof I=="object"?it({},Be,I.state):Be,force:T,replace:O}),ue||se);const G=se;G.redirectedFrom=ue;let Y;return!T&&FT(r,ve,se)&&(Y=uo(16,{to:G,from:ve}),Ge(ve,ve,!0,!1)),(Y?Promise.resolve(Y):V(G,ve)).catch(X=>mr(X)?mr(X,2)?X:at(X):ae(X,G,ve)).then(X=>{if(X){if(mr(X,2))return D(it({replace:O},C(X.to),{state:typeof X.to=="object"?it({},Be,X.to.state):Be,force:T}),ue||G)}else X=W(G,ve,!0,O,Be);return Z(G,ve,X),X})}function R(j,ue){const se=z(j,ue);return se?Promise.reject(se):Promise.resolve()}function P(j){const ue=pt.values().next().value;return ue&&typeof ue.runWithContext=="function"?ue.runWithContext(j):j()}function V(j,ue){let se;const[ve,Be,T]=IO(j,ue);se=Wu(ve.reverse(),"beforeRouteLeave",j,ue);for(const I of ve)I.leaveGuards.forEach(G=>{se.push(Lr(G,j,ue))});const O=R.bind(null,j,ue);return se.push(O),Ne(se).then(()=>{se=[];for(const I of o.list())se.push(Lr(I,j,ue));return se.push(O),Ne(se)}).then(()=>{se=Wu(Be,"beforeRouteUpdate",j,ue);for(const I of Be)I.updateGuards.forEach(G=>{se.push(Lr(G,j,ue))});return se.push(O),Ne(se)}).then(()=>{se=[];for(const I of T)if(I.beforeEnter)if(Gn(I.beforeEnter))for(const G of I.beforeEnter)se.push(Lr(G,j,ue));else se.push(Lr(I.beforeEnter,j,ue));return se.push(O),Ne(se)}).then(()=>(j.matched.forEach(I=>I.enterCallbacks={}),se=Wu(T,"beforeRouteEnter",j,ue),se.push(O),Ne(se))).then(()=>{se=[];for(const I of a.list())se.push(Lr(I,j,ue));return se.push(O),Ne(se)}).catch(I=>mr(I,8)?I:Promise.reject(I))}function Z(j,ue,se){i.list().forEach(ve=>P(()=>ve(j,ue,se)))}function W(j,ue,se,ve,Be){const T=z(j,ue);if(T)return T;const O=ue===Or,I=Ls?history.state:{};se&&(ve||O?s.replace(j.fullPath,it({scroll:O&&I&&I.scroll},Be)):s.push(j.fullPath,Be)),l.value=j,Ge(j,ue,se,O),at()}let B;function Q(){B||(B=s.listen((j,ue,se)=>{if(!ht.listening)return;const ve=w(j),Be=A(ve);if(Be){D(it(Be,{replace:!0}),ve).catch(ea);return}c=ve;const T=l.value;Ls&&UT(Zp(T.fullPath,se.delta),cu()),V(ve,T).catch(O=>mr(O,12)?O:mr(O,2)?(D(O.to,ve).then(I=>{mr(I,20)&&!se.delta&&se.type===za.pop&&s.go(-1,!1)}).catch(ea),Promise.reject()):(se.delta&&s.go(-se.delta,!1),ae(O,ve,T))).then(O=>{O=O||W(ve,T,!1),O&&(se.delta&&!mr(O,8)?s.go(-se.delta,!1):se.type===za.pop&&mr(O,20)&&s.go(-1,!1)),Z(ve,T,O)}).catch(ea)}))}let fe=To(),K=To(),re;function ae(j,ue,se){at(j);const ve=K.list();return ve.length?ve.forEach(Be=>Be(j,ue,se)):console.error(j),Promise.reject(j)}function Fe(){return re&&l.value!==Or?Promise.resolve():new Promise((j,ue)=>{fe.add([j,ue])})}function at(j){return re||(re=!j,Q(),fe.list().forEach(([ue,se])=>j?se(j):ue()),fe.reset()),j}function Ge(j,ue,se,ve){const{scrollBehavior:Be}=e;if(!Ls||!Be)return Promise.resolve();const T=!se&&jT(Zp(j.fullPath,0))||(ve||!se)&&history.state&&history.state.scroll||null;return Ea().then(()=>Be(j,ue,T)).then(O=>O&&BT(O)).catch(O=>ae(O,j,ue))}const je=j=>s.go(j);let ct;const pt=new Set,ht={currentRoute:l,listening:!0,addRoute:p,removeRoute:h,hasRoute:b,getRoutes:_,resolve:w,options:e,push:v,replace:S,go:je,back:()=>je(-1),forward:()=>je(1),beforeEach:o.add,beforeResolve:a.add,afterEach:i.add,onError:K.add,isReady:Fe,install(j){const ue=this;j.component("RouterLink",$O),j.component("RouterView",DO),j.config.globalProperties.$router=ue,Object.defineProperty(j.config.globalProperties,"$route",{enumerable:!0,get:()=>vn(l)}),Ls&&!ct&&l.value===Or&&(ct=!0,v(s.location).catch(Be=>{}));const se={};for(const Be in Or)Object.defineProperty(se,Be,{get:()=>l.value[Be],enumerable:!0});j.provide(zm,ue),j.provide(t1,Ed(se)),j.provide(Xc,l);const ve=j.unmount;pt.add(j),j.unmount=function(){pt.delete(j),pt.size<1&&(c=Or,B&&B(),B=null,l.value=Or,ct=!1,re=!1),ve()}}};function Ne(j){return j.reduce((ue,se)=>ue.then(()=>P(se)),Promise.resolve())}return ht}function IO(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;alo(c,i))?r.push(i):n.push(i));const l=e.matched[a];l&&(t.matched.find(c=>lo(c,l))||s.push(l))}return[n,r,s]}const FO={name:"PageAbout",computed:{config(){return this.$store.state.config},library(){return this.$store.state.library}},methods:{showUpdateDialog(){this.$store.commit(wa,!0)}}},RO={class:"fd-page"},LO={class:"section"},NO={class:"container"},MO={class:"columns is-centered"},VO={class:"column is-four-fifths has-text-centered-mobile"},HO=["textContent"],BO={class:"section"},UO={class:"container"},jO={class:"columns is-centered"},qO={class:"column is-four-fifths"},WO={class:"content"},KO={class:"level is-mobile"},GO={class:"level-left"},ZO={class:"level-item"},YO=["textContent"],JO={class:"level-right"},XO={key:0},QO=["textContent"],e3={key:1},t3=["textContent"],n3={class:"table"},r3=["textContent"],s3=["textContent"],o3=["textContent"],a3=["textContent"],i3=["textContent"],l3=["textContent"],u3=["textContent"],c3=["textContent"],d3=["textContent"],m3={class:"has-text-right"},f3=["textContent"],p3=["textContent"],h3=["textContent"],_3={class:"has-text-right"},g3=["textContent"],y3=["textContent"],v3={class:"section"},b3={class:"container"},z3={class:"columns is-centered"},C3={class:"column is-four-fifths"},w3={class:"content has-text-centered-mobile"},k3=["textContent"],x3=["textContent"],E3=u("a",{href:"https://bulma.io"},"Bulma",-1),S3=u("a",{href:"https://pictogrammers.com/library/mdi/"},"Material Design Icons",-1),$3=u("a",{href:"https://vuejs.org/"},"Vue.js",-1),A3=u("a",{href:"https://github.com/mzabriskie/axios"},"axios",-1),T3=["textContent"];function O3(e,t,n,r,s,o){const a=E("i18n-t");return k(),$("div",RO,[u("section",LO,[u("div",NO,[u("div",MO,[u("div",VO,[u("h1",{class:"title is-4",textContent:g(o.config.library_name)},null,8,HO)])])])]),u("section",BO,[u("div",UO,[u("div",jO,[u("div",qO,[u("div",WO,[u("nav",KO,[u("div",GO,[u("div",ZO,[u("h2",{class:"title is-5",textContent:g(e.$t("page.about.library"))},null,8,YO)])]),u("div",JO,[o.library.updating?(k(),$("div",XO,[u("a",{class:"button is-small is-loading",textContent:g(e.$t("page.about.update"))},null,8,QO)])):(k(),$("div",e3,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=i=>o.showUpdateDialog()),textContent:g(e.$t("page.about.update"))},null,8,t3)]))])]),u("table",n3,[u("tbody",null,[u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.artists"))},null,8,r3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.artists))},null,8,s3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.albums"))},null,8,o3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.albums))},null,8,a3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.tracks"))},null,8,i3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.songs))},null,8,l3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.total-playtime"))},null,8,u3),u("td",{class:"has-text-right",textContent:g(e.$filters.durationInDays(o.library.db_playtime*1e3))},null,8,c3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.updated"))},null,8,d3),u("td",m3,[u("span",{textContent:g(e.$t("page.about.updated-on",{time:e.$filters.timeFromNow(o.library.updated_at)}))},null,8,f3),nt(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.updated_at))},null,8,p3),nt(") ")])]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.uptime"))},null,8,h3),u("td",_3,[u("span",{textContent:g(e.$filters.timeFromNow(o.library.started_at,!0))},null,8,g3),nt(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.started_at))},null,8,y3),nt(") ")])])])])])])])])]),u("section",v3,[u("div",b3,[u("div",z3,[u("div",C3,[u("div",w3,[u("p",{class:"is-size-7",textContent:g(e.$t("page.about.version",{version:o.config.version}))},null,8,k3),u("p",{class:"is-size-7",textContent:g(e.$t("page.about.compiled-with",{options:o.config.buildoptions.join(", ")}))},null,8,x3),y(a,{tag:"p",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:x(()=>[E3]),mdi:x(()=>[S3]),vuejs:x(()=>[$3]),axios:x(()=>[A3]),others:x(()=>[u("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:g(e.$t("page.about.more"))},null,8,T3)]),_:1})])])])])])])}const D3=te(FO,[["render",O3]]),P3={},I3={class:"hero is-light is-bold"},F3={class:"hero-body"},R3={class:"container"},L3={class:"columns is-centered"},N3={class:"column is-four-fifths"},M3={class:"columns is-flex-direction-row-reverse"},V3={class:"column fd-has-cover"},H3={class:"column m-auto is-three-fifths has-text-centered-mobile"},B3={class:"section pt-0"},U3={class:"container"},j3={class:"columns is-centered"},q3={class:"column is-four-fifths"};function W3(e,t){return k(),$(Ce,null,[u("section",I3,[u("div",F3,[u("div",R3,[u("div",L3,[u("div",N3,[u("div",M3,[u("div",V3,[ot(e.$slots,"heading-right")]),u("div",H3,[ot(e.$slots,"heading-left")])])])])])])]),u("section",B3,[u("div",U3,[u("div",j3,[u("div",q3,[ot(e.$slots,"content"),ot(e.$slots,"footer")])])])])],64)}const du=te(P3,[["render",W3]]);var n1={exports:{}},K3=[{value:"#B0171F",name:"indian red"},{value:"#DC143C",css:!0,name:"crimson"},{value:"#FFB6C1",css:!0,name:"lightpink"},{value:"#FFAEB9",name:"lightpink 1"},{value:"#EEA2AD",name:"lightpink 2"},{value:"#CD8C95",name:"lightpink 3"},{value:"#8B5F65",name:"lightpink 4"},{value:"#FFC0CB",css:!0,name:"pink"},{value:"#FFB5C5",name:"pink 1"},{value:"#EEA9B8",name:"pink 2"},{value:"#CD919E",name:"pink 3"},{value:"#8B636C",name:"pink 4"},{value:"#DB7093",css:!0,name:"palevioletred"},{value:"#FF82AB",name:"palevioletred 1"},{value:"#EE799F",name:"palevioletred 2"},{value:"#CD6889",name:"palevioletred 3"},{value:"#8B475D",name:"palevioletred 4"},{value:"#FFF0F5",name:"lavenderblush 1"},{value:"#FFF0F5",css:!0,name:"lavenderblush"},{value:"#EEE0E5",name:"lavenderblush 2"},{value:"#CDC1C5",name:"lavenderblush 3"},{value:"#8B8386",name:"lavenderblush 4"},{value:"#FF3E96",name:"violetred 1"},{value:"#EE3A8C",name:"violetred 2"},{value:"#CD3278",name:"violetred 3"},{value:"#8B2252",name:"violetred 4"},{value:"#FF69B4",css:!0,name:"hotpink"},{value:"#FF6EB4",name:"hotpink 1"},{value:"#EE6AA7",name:"hotpink 2"},{value:"#CD6090",name:"hotpink 3"},{value:"#8B3A62",name:"hotpink 4"},{value:"#872657",name:"raspberry"},{value:"#FF1493",name:"deeppink 1"},{value:"#FF1493",css:!0,name:"deeppink"},{value:"#EE1289",name:"deeppink 2"},{value:"#CD1076",name:"deeppink 3"},{value:"#8B0A50",name:"deeppink 4"},{value:"#FF34B3",name:"maroon 1"},{value:"#EE30A7",name:"maroon 2"},{value:"#CD2990",name:"maroon 3"},{value:"#8B1C62",name:"maroon 4"},{value:"#C71585",css:!0,name:"mediumvioletred"},{value:"#D02090",name:"violetred"},{value:"#DA70D6",css:!0,name:"orchid"},{value:"#FF83FA",name:"orchid 1"},{value:"#EE7AE9",name:"orchid 2"},{value:"#CD69C9",name:"orchid 3"},{value:"#8B4789",name:"orchid 4"},{value:"#D8BFD8",css:!0,name:"thistle"},{value:"#FFE1FF",name:"thistle 1"},{value:"#EED2EE",name:"thistle 2"},{value:"#CDB5CD",name:"thistle 3"},{value:"#8B7B8B",name:"thistle 4"},{value:"#FFBBFF",name:"plum 1"},{value:"#EEAEEE",name:"plum 2"},{value:"#CD96CD",name:"plum 3"},{value:"#8B668B",name:"plum 4"},{value:"#DDA0DD",css:!0,name:"plum"},{value:"#EE82EE",css:!0,name:"violet"},{value:"#FF00FF",vga:!0,name:"magenta"},{value:"#FF00FF",vga:!0,css:!0,name:"fuchsia"},{value:"#EE00EE",name:"magenta 2"},{value:"#CD00CD",name:"magenta 3"},{value:"#8B008B",name:"magenta 4"},{value:"#8B008B",css:!0,name:"darkmagenta"},{value:"#800080",vga:!0,css:!0,name:"purple"},{value:"#BA55D3",css:!0,name:"mediumorchid"},{value:"#E066FF",name:"mediumorchid 1"},{value:"#D15FEE",name:"mediumorchid 2"},{value:"#B452CD",name:"mediumorchid 3"},{value:"#7A378B",name:"mediumorchid 4"},{value:"#9400D3",css:!0,name:"darkviolet"},{value:"#9932CC",css:!0,name:"darkorchid"},{value:"#BF3EFF",name:"darkorchid 1"},{value:"#B23AEE",name:"darkorchid 2"},{value:"#9A32CD",name:"darkorchid 3"},{value:"#68228B",name:"darkorchid 4"},{value:"#4B0082",css:!0,name:"indigo"},{value:"#8A2BE2",css:!0,name:"blueviolet"},{value:"#9B30FF",name:"purple 1"},{value:"#912CEE",name:"purple 2"},{value:"#7D26CD",name:"purple 3"},{value:"#551A8B",name:"purple 4"},{value:"#9370DB",css:!0,name:"mediumpurple"},{value:"#AB82FF",name:"mediumpurple 1"},{value:"#9F79EE",name:"mediumpurple 2"},{value:"#8968CD",name:"mediumpurple 3"},{value:"#5D478B",name:"mediumpurple 4"},{value:"#483D8B",css:!0,name:"darkslateblue"},{value:"#8470FF",name:"lightslateblue"},{value:"#7B68EE",css:!0,name:"mediumslateblue"},{value:"#6A5ACD",css:!0,name:"slateblue"},{value:"#836FFF",name:"slateblue 1"},{value:"#7A67EE",name:"slateblue 2"},{value:"#6959CD",name:"slateblue 3"},{value:"#473C8B",name:"slateblue 4"},{value:"#F8F8FF",css:!0,name:"ghostwhite"},{value:"#E6E6FA",css:!0,name:"lavender"},{value:"#0000FF",vga:!0,css:!0,name:"blue"},{value:"#0000EE",name:"blue 2"},{value:"#0000CD",name:"blue 3"},{value:"#0000CD",css:!0,name:"mediumblue"},{value:"#00008B",name:"blue 4"},{value:"#00008B",css:!0,name:"darkblue"},{value:"#000080",vga:!0,css:!0,name:"navy"},{value:"#191970",css:!0,name:"midnightblue"},{value:"#3D59AB",name:"cobalt"},{value:"#4169E1",css:!0,name:"royalblue"},{value:"#4876FF",name:"royalblue 1"},{value:"#436EEE",name:"royalblue 2"},{value:"#3A5FCD",name:"royalblue 3"},{value:"#27408B",name:"royalblue 4"},{value:"#6495ED",css:!0,name:"cornflowerblue"},{value:"#B0C4DE",css:!0,name:"lightsteelblue"},{value:"#CAE1FF",name:"lightsteelblue 1"},{value:"#BCD2EE",name:"lightsteelblue 2"},{value:"#A2B5CD",name:"lightsteelblue 3"},{value:"#6E7B8B",name:"lightsteelblue 4"},{value:"#778899",css:!0,name:"lightslategray"},{value:"#708090",css:!0,name:"slategray"},{value:"#C6E2FF",name:"slategray 1"},{value:"#B9D3EE",name:"slategray 2"},{value:"#9FB6CD",name:"slategray 3"},{value:"#6C7B8B",name:"slategray 4"},{value:"#1E90FF",name:"dodgerblue 1"},{value:"#1E90FF",css:!0,name:"dodgerblue"},{value:"#1C86EE",name:"dodgerblue 2"},{value:"#1874CD",name:"dodgerblue 3"},{value:"#104E8B",name:"dodgerblue 4"},{value:"#F0F8FF",css:!0,name:"aliceblue"},{value:"#4682B4",css:!0,name:"steelblue"},{value:"#63B8FF",name:"steelblue 1"},{value:"#5CACEE",name:"steelblue 2"},{value:"#4F94CD",name:"steelblue 3"},{value:"#36648B",name:"steelblue 4"},{value:"#87CEFA",css:!0,name:"lightskyblue"},{value:"#B0E2FF",name:"lightskyblue 1"},{value:"#A4D3EE",name:"lightskyblue 2"},{value:"#8DB6CD",name:"lightskyblue 3"},{value:"#607B8B",name:"lightskyblue 4"},{value:"#87CEFF",name:"skyblue 1"},{value:"#7EC0EE",name:"skyblue 2"},{value:"#6CA6CD",name:"skyblue 3"},{value:"#4A708B",name:"skyblue 4"},{value:"#87CEEB",css:!0,name:"skyblue"},{value:"#00BFFF",name:"deepskyblue 1"},{value:"#00BFFF",css:!0,name:"deepskyblue"},{value:"#00B2EE",name:"deepskyblue 2"},{value:"#009ACD",name:"deepskyblue 3"},{value:"#00688B",name:"deepskyblue 4"},{value:"#33A1C9",name:"peacock"},{value:"#ADD8E6",css:!0,name:"lightblue"},{value:"#BFEFFF",name:"lightblue 1"},{value:"#B2DFEE",name:"lightblue 2"},{value:"#9AC0CD",name:"lightblue 3"},{value:"#68838B",name:"lightblue 4"},{value:"#B0E0E6",css:!0,name:"powderblue"},{value:"#98F5FF",name:"cadetblue 1"},{value:"#8EE5EE",name:"cadetblue 2"},{value:"#7AC5CD",name:"cadetblue 3"},{value:"#53868B",name:"cadetblue 4"},{value:"#00F5FF",name:"turquoise 1"},{value:"#00E5EE",name:"turquoise 2"},{value:"#00C5CD",name:"turquoise 3"},{value:"#00868B",name:"turquoise 4"},{value:"#5F9EA0",css:!0,name:"cadetblue"},{value:"#00CED1",css:!0,name:"darkturquoise"},{value:"#F0FFFF",name:"azure 1"},{value:"#F0FFFF",css:!0,name:"azure"},{value:"#E0EEEE",name:"azure 2"},{value:"#C1CDCD",name:"azure 3"},{value:"#838B8B",name:"azure 4"},{value:"#E0FFFF",name:"lightcyan 1"},{value:"#E0FFFF",css:!0,name:"lightcyan"},{value:"#D1EEEE",name:"lightcyan 2"},{value:"#B4CDCD",name:"lightcyan 3"},{value:"#7A8B8B",name:"lightcyan 4"},{value:"#BBFFFF",name:"paleturquoise 1"},{value:"#AEEEEE",name:"paleturquoise 2"},{value:"#AEEEEE",css:!0,name:"paleturquoise"},{value:"#96CDCD",name:"paleturquoise 3"},{value:"#668B8B",name:"paleturquoise 4"},{value:"#2F4F4F",css:!0,name:"darkslategray"},{value:"#97FFFF",name:"darkslategray 1"},{value:"#8DEEEE",name:"darkslategray 2"},{value:"#79CDCD",name:"darkslategray 3"},{value:"#528B8B",name:"darkslategray 4"},{value:"#00FFFF",name:"cyan"},{value:"#00FFFF",css:!0,name:"aqua"},{value:"#00EEEE",name:"cyan 2"},{value:"#00CDCD",name:"cyan 3"},{value:"#008B8B",name:"cyan 4"},{value:"#008B8B",css:!0,name:"darkcyan"},{value:"#008080",vga:!0,css:!0,name:"teal"},{value:"#48D1CC",css:!0,name:"mediumturquoise"},{value:"#20B2AA",css:!0,name:"lightseagreen"},{value:"#03A89E",name:"manganeseblue"},{value:"#40E0D0",css:!0,name:"turquoise"},{value:"#808A87",name:"coldgrey"},{value:"#00C78C",name:"turquoiseblue"},{value:"#7FFFD4",name:"aquamarine 1"},{value:"#7FFFD4",css:!0,name:"aquamarine"},{value:"#76EEC6",name:"aquamarine 2"},{value:"#66CDAA",name:"aquamarine 3"},{value:"#66CDAA",css:!0,name:"mediumaquamarine"},{value:"#458B74",name:"aquamarine 4"},{value:"#00FA9A",css:!0,name:"mediumspringgreen"},{value:"#F5FFFA",css:!0,name:"mintcream"},{value:"#00FF7F",css:!0,name:"springgreen"},{value:"#00EE76",name:"springgreen 1"},{value:"#00CD66",name:"springgreen 2"},{value:"#008B45",name:"springgreen 3"},{value:"#3CB371",css:!0,name:"mediumseagreen"},{value:"#54FF9F",name:"seagreen 1"},{value:"#4EEE94",name:"seagreen 2"},{value:"#43CD80",name:"seagreen 3"},{value:"#2E8B57",name:"seagreen 4"},{value:"#2E8B57",css:!0,name:"seagreen"},{value:"#00C957",name:"emeraldgreen"},{value:"#BDFCC9",name:"mint"},{value:"#3D9140",name:"cobaltgreen"},{value:"#F0FFF0",name:"honeydew 1"},{value:"#F0FFF0",css:!0,name:"honeydew"},{value:"#E0EEE0",name:"honeydew 2"},{value:"#C1CDC1",name:"honeydew 3"},{value:"#838B83",name:"honeydew 4"},{value:"#8FBC8F",css:!0,name:"darkseagreen"},{value:"#C1FFC1",name:"darkseagreen 1"},{value:"#B4EEB4",name:"darkseagreen 2"},{value:"#9BCD9B",name:"darkseagreen 3"},{value:"#698B69",name:"darkseagreen 4"},{value:"#98FB98",css:!0,name:"palegreen"},{value:"#9AFF9A",name:"palegreen 1"},{value:"#90EE90",name:"palegreen 2"},{value:"#90EE90",css:!0,name:"lightgreen"},{value:"#7CCD7C",name:"palegreen 3"},{value:"#548B54",name:"palegreen 4"},{value:"#32CD32",css:!0,name:"limegreen"},{value:"#228B22",css:!0,name:"forestgreen"},{value:"#00FF00",vga:!0,name:"green 1"},{value:"#00FF00",vga:!0,css:!0,name:"lime"},{value:"#00EE00",name:"green 2"},{value:"#00CD00",name:"green 3"},{value:"#008B00",name:"green 4"},{value:"#008000",vga:!0,css:!0,name:"green"},{value:"#006400",css:!0,name:"darkgreen"},{value:"#308014",name:"sapgreen"},{value:"#7CFC00",css:!0,name:"lawngreen"},{value:"#7FFF00",name:"chartreuse 1"},{value:"#7FFF00",css:!0,name:"chartreuse"},{value:"#76EE00",name:"chartreuse 2"},{value:"#66CD00",name:"chartreuse 3"},{value:"#458B00",name:"chartreuse 4"},{value:"#ADFF2F",css:!0,name:"greenyellow"},{value:"#CAFF70",name:"darkolivegreen 1"},{value:"#BCEE68",name:"darkolivegreen 2"},{value:"#A2CD5A",name:"darkolivegreen 3"},{value:"#6E8B3D",name:"darkolivegreen 4"},{value:"#556B2F",css:!0,name:"darkolivegreen"},{value:"#6B8E23",css:!0,name:"olivedrab"},{value:"#C0FF3E",name:"olivedrab 1"},{value:"#B3EE3A",name:"olivedrab 2"},{value:"#9ACD32",name:"olivedrab 3"},{value:"#9ACD32",css:!0,name:"yellowgreen"},{value:"#698B22",name:"olivedrab 4"},{value:"#FFFFF0",name:"ivory 1"},{value:"#FFFFF0",css:!0,name:"ivory"},{value:"#EEEEE0",name:"ivory 2"},{value:"#CDCDC1",name:"ivory 3"},{value:"#8B8B83",name:"ivory 4"},{value:"#F5F5DC",css:!0,name:"beige"},{value:"#FFFFE0",name:"lightyellow 1"},{value:"#FFFFE0",css:!0,name:"lightyellow"},{value:"#EEEED1",name:"lightyellow 2"},{value:"#CDCDB4",name:"lightyellow 3"},{value:"#8B8B7A",name:"lightyellow 4"},{value:"#FAFAD2",css:!0,name:"lightgoldenrodyellow"},{value:"#FFFF00",vga:!0,name:"yellow 1"},{value:"#FFFF00",vga:!0,css:!0,name:"yellow"},{value:"#EEEE00",name:"yellow 2"},{value:"#CDCD00",name:"yellow 3"},{value:"#8B8B00",name:"yellow 4"},{value:"#808069",name:"warmgrey"},{value:"#808000",vga:!0,css:!0,name:"olive"},{value:"#BDB76B",css:!0,name:"darkkhaki"},{value:"#FFF68F",name:"khaki 1"},{value:"#EEE685",name:"khaki 2"},{value:"#CDC673",name:"khaki 3"},{value:"#8B864E",name:"khaki 4"},{value:"#F0E68C",css:!0,name:"khaki"},{value:"#EEE8AA",css:!0,name:"palegoldenrod"},{value:"#FFFACD",name:"lemonchiffon 1"},{value:"#FFFACD",css:!0,name:"lemonchiffon"},{value:"#EEE9BF",name:"lemonchiffon 2"},{value:"#CDC9A5",name:"lemonchiffon 3"},{value:"#8B8970",name:"lemonchiffon 4"},{value:"#FFEC8B",name:"lightgoldenrod 1"},{value:"#EEDC82",name:"lightgoldenrod 2"},{value:"#CDBE70",name:"lightgoldenrod 3"},{value:"#8B814C",name:"lightgoldenrod 4"},{value:"#E3CF57",name:"banana"},{value:"#FFD700",name:"gold 1"},{value:"#FFD700",css:!0,name:"gold"},{value:"#EEC900",name:"gold 2"},{value:"#CDAD00",name:"gold 3"},{value:"#8B7500",name:"gold 4"},{value:"#FFF8DC",name:"cornsilk 1"},{value:"#FFF8DC",css:!0,name:"cornsilk"},{value:"#EEE8CD",name:"cornsilk 2"},{value:"#CDC8B1",name:"cornsilk 3"},{value:"#8B8878",name:"cornsilk 4"},{value:"#DAA520",css:!0,name:"goldenrod"},{value:"#FFC125",name:"goldenrod 1"},{value:"#EEB422",name:"goldenrod 2"},{value:"#CD9B1D",name:"goldenrod 3"},{value:"#8B6914",name:"goldenrod 4"},{value:"#B8860B",css:!0,name:"darkgoldenrod"},{value:"#FFB90F",name:"darkgoldenrod 1"},{value:"#EEAD0E",name:"darkgoldenrod 2"},{value:"#CD950C",name:"darkgoldenrod 3"},{value:"#8B6508",name:"darkgoldenrod 4"},{value:"#FFA500",name:"orange 1"},{value:"#FF8000",css:!0,name:"orange"},{value:"#EE9A00",name:"orange 2"},{value:"#CD8500",name:"orange 3"},{value:"#8B5A00",name:"orange 4"},{value:"#FFFAF0",css:!0,name:"floralwhite"},{value:"#FDF5E6",css:!0,name:"oldlace"},{value:"#F5DEB3",css:!0,name:"wheat"},{value:"#FFE7BA",name:"wheat 1"},{value:"#EED8AE",name:"wheat 2"},{value:"#CDBA96",name:"wheat 3"},{value:"#8B7E66",name:"wheat 4"},{value:"#FFE4B5",css:!0,name:"moccasin"},{value:"#FFEFD5",css:!0,name:"papayawhip"},{value:"#FFEBCD",css:!0,name:"blanchedalmond"},{value:"#FFDEAD",name:"navajowhite 1"},{value:"#FFDEAD",css:!0,name:"navajowhite"},{value:"#EECFA1",name:"navajowhite 2"},{value:"#CDB38B",name:"navajowhite 3"},{value:"#8B795E",name:"navajowhite 4"},{value:"#FCE6C9",name:"eggshell"},{value:"#D2B48C",css:!0,name:"tan"},{value:"#9C661F",name:"brick"},{value:"#FF9912",name:"cadmiumyellow"},{value:"#FAEBD7",css:!0,name:"antiquewhite"},{value:"#FFEFDB",name:"antiquewhite 1"},{value:"#EEDFCC",name:"antiquewhite 2"},{value:"#CDC0B0",name:"antiquewhite 3"},{value:"#8B8378",name:"antiquewhite 4"},{value:"#DEB887",css:!0,name:"burlywood"},{value:"#FFD39B",name:"burlywood 1"},{value:"#EEC591",name:"burlywood 2"},{value:"#CDAA7D",name:"burlywood 3"},{value:"#8B7355",name:"burlywood 4"},{value:"#FFE4C4",name:"bisque 1"},{value:"#FFE4C4",css:!0,name:"bisque"},{value:"#EED5B7",name:"bisque 2"},{value:"#CDB79E",name:"bisque 3"},{value:"#8B7D6B",name:"bisque 4"},{value:"#E3A869",name:"melon"},{value:"#ED9121",name:"carrot"},{value:"#FF8C00",css:!0,name:"darkorange"},{value:"#FF7F00",name:"darkorange 1"},{value:"#EE7600",name:"darkorange 2"},{value:"#CD6600",name:"darkorange 3"},{value:"#8B4500",name:"darkorange 4"},{value:"#FFA54F",name:"tan 1"},{value:"#EE9A49",name:"tan 2"},{value:"#CD853F",name:"tan 3"},{value:"#CD853F",css:!0,name:"peru"},{value:"#8B5A2B",name:"tan 4"},{value:"#FAF0E6",css:!0,name:"linen"},{value:"#FFDAB9",name:"peachpuff 1"},{value:"#FFDAB9",css:!0,name:"peachpuff"},{value:"#EECBAD",name:"peachpuff 2"},{value:"#CDAF95",name:"peachpuff 3"},{value:"#8B7765",name:"peachpuff 4"},{value:"#FFF5EE",name:"seashell 1"},{value:"#FFF5EE",css:!0,name:"seashell"},{value:"#EEE5DE",name:"seashell 2"},{value:"#CDC5BF",name:"seashell 3"},{value:"#8B8682",name:"seashell 4"},{value:"#F4A460",css:!0,name:"sandybrown"},{value:"#C76114",name:"rawsienna"},{value:"#D2691E",css:!0,name:"chocolate"},{value:"#FF7F24",name:"chocolate 1"},{value:"#EE7621",name:"chocolate 2"},{value:"#CD661D",name:"chocolate 3"},{value:"#8B4513",name:"chocolate 4"},{value:"#8B4513",css:!0,name:"saddlebrown"},{value:"#292421",name:"ivoryblack"},{value:"#FF7D40",name:"flesh"},{value:"#FF6103",name:"cadmiumorange"},{value:"#8A360F",name:"burntsienna"},{value:"#A0522D",css:!0,name:"sienna"},{value:"#FF8247",name:"sienna 1"},{value:"#EE7942",name:"sienna 2"},{value:"#CD6839",name:"sienna 3"},{value:"#8B4726",name:"sienna 4"},{value:"#FFA07A",name:"lightsalmon 1"},{value:"#FFA07A",css:!0,name:"lightsalmon"},{value:"#EE9572",name:"lightsalmon 2"},{value:"#CD8162",name:"lightsalmon 3"},{value:"#8B5742",name:"lightsalmon 4"},{value:"#FF7F50",css:!0,name:"coral"},{value:"#FF4500",name:"orangered 1"},{value:"#FF4500",css:!0,name:"orangered"},{value:"#EE4000",name:"orangered 2"},{value:"#CD3700",name:"orangered 3"},{value:"#8B2500",name:"orangered 4"},{value:"#5E2612",name:"sepia"},{value:"#E9967A",css:!0,name:"darksalmon"},{value:"#FF8C69",name:"salmon 1"},{value:"#EE8262",name:"salmon 2"},{value:"#CD7054",name:"salmon 3"},{value:"#8B4C39",name:"salmon 4"},{value:"#FF7256",name:"coral 1"},{value:"#EE6A50",name:"coral 2"},{value:"#CD5B45",name:"coral 3"},{value:"#8B3E2F",name:"coral 4"},{value:"#8A3324",name:"burntumber"},{value:"#FF6347",name:"tomato 1"},{value:"#FF6347",css:!0,name:"tomato"},{value:"#EE5C42",name:"tomato 2"},{value:"#CD4F39",name:"tomato 3"},{value:"#8B3626",name:"tomato 4"},{value:"#FA8072",css:!0,name:"salmon"},{value:"#FFE4E1",name:"mistyrose 1"},{value:"#FFE4E1",css:!0,name:"mistyrose"},{value:"#EED5D2",name:"mistyrose 2"},{value:"#CDB7B5",name:"mistyrose 3"},{value:"#8B7D7B",name:"mistyrose 4"},{value:"#FFFAFA",name:"snow 1"},{value:"#FFFAFA",css:!0,name:"snow"},{value:"#EEE9E9",name:"snow 2"},{value:"#CDC9C9",name:"snow 3"},{value:"#8B8989",name:"snow 4"},{value:"#BC8F8F",css:!0,name:"rosybrown"},{value:"#FFC1C1",name:"rosybrown 1"},{value:"#EEB4B4",name:"rosybrown 2"},{value:"#CD9B9B",name:"rosybrown 3"},{value:"#8B6969",name:"rosybrown 4"},{value:"#F08080",css:!0,name:"lightcoral"},{value:"#CD5C5C",css:!0,name:"indianred"},{value:"#FF6A6A",name:"indianred 1"},{value:"#EE6363",name:"indianred 2"},{value:"#8B3A3A",name:"indianred 4"},{value:"#CD5555",name:"indianred 3"},{value:"#A52A2A",css:!0,name:"brown"},{value:"#FF4040",name:"brown 1"},{value:"#EE3B3B",name:"brown 2"},{value:"#CD3333",name:"brown 3"},{value:"#8B2323",name:"brown 4"},{value:"#B22222",css:!0,name:"firebrick"},{value:"#FF3030",name:"firebrick 1"},{value:"#EE2C2C",name:"firebrick 2"},{value:"#CD2626",name:"firebrick 3"},{value:"#8B1A1A",name:"firebrick 4"},{value:"#FF0000",vga:!0,name:"red 1"},{value:"#FF0000",vga:!0,css:!0,name:"red"},{value:"#EE0000",name:"red 2"},{value:"#CD0000",name:"red 3"},{value:"#8B0000",name:"red 4"},{value:"#8B0000",css:!0,name:"darkred"},{value:"#800000",vga:!0,css:!0,name:"maroon"},{value:"#8E388E",name:"sgi beet"},{value:"#7171C6",name:"sgi slateblue"},{value:"#7D9EC0",name:"sgi lightblue"},{value:"#388E8E",name:"sgi teal"},{value:"#71C671",name:"sgi chartreuse"},{value:"#8E8E38",name:"sgi olivedrab"},{value:"#C5C1AA",name:"sgi brightgray"},{value:"#C67171",name:"sgi salmon"},{value:"#555555",name:"sgi darkgray"},{value:"#1E1E1E",name:"sgi gray 12"},{value:"#282828",name:"sgi gray 16"},{value:"#515151",name:"sgi gray 32"},{value:"#5B5B5B",name:"sgi gray 36"},{value:"#848484",name:"sgi gray 52"},{value:"#8E8E8E",name:"sgi gray 56"},{value:"#AAAAAA",name:"sgi lightgray"},{value:"#B7B7B7",name:"sgi gray 72"},{value:"#C1C1C1",name:"sgi gray 76"},{value:"#EAEAEA",name:"sgi gray 92"},{value:"#F4F4F4",name:"sgi gray 96"},{value:"#FFFFFF",vga:!0,css:!0,name:"white"},{value:"#F5F5F5",name:"white smoke"},{value:"#F5F5F5",name:"gray 96"},{value:"#DCDCDC",css:!0,name:"gainsboro"},{value:"#D3D3D3",css:!0,name:"lightgrey"},{value:"#C0C0C0",vga:!0,css:!0,name:"silver"},{value:"#A9A9A9",css:!0,name:"darkgray"},{value:"#808080",vga:!0,css:!0,name:"gray"},{value:"#696969",css:!0,name:"dimgray"},{value:"#696969",name:"gray 42"},{value:"#000000",vga:!0,css:!0,name:"black"},{value:"#FCFCFC",name:"gray 99"},{value:"#FAFAFA",name:"gray 98"},{value:"#F7F7F7",name:"gray 97"},{value:"#F2F2F2",name:"gray 95"},{value:"#F0F0F0",name:"gray 94"},{value:"#EDEDED",name:"gray 93"},{value:"#EBEBEB",name:"gray 92"},{value:"#E8E8E8",name:"gray 91"},{value:"#E5E5E5",name:"gray 90"},{value:"#E3E3E3",name:"gray 89"},{value:"#E0E0E0",name:"gray 88"},{value:"#DEDEDE",name:"gray 87"},{value:"#DBDBDB",name:"gray 86"},{value:"#D9D9D9",name:"gray 85"},{value:"#D6D6D6",name:"gray 84"},{value:"#D4D4D4",name:"gray 83"},{value:"#D1D1D1",name:"gray 82"},{value:"#CFCFCF",name:"gray 81"},{value:"#CCCCCC",name:"gray 80"},{value:"#C9C9C9",name:"gray 79"},{value:"#C7C7C7",name:"gray 78"},{value:"#C4C4C4",name:"gray 77"},{value:"#C2C2C2",name:"gray 76"},{value:"#BFBFBF",name:"gray 75"},{value:"#BDBDBD",name:"gray 74"},{value:"#BABABA",name:"gray 73"},{value:"#B8B8B8",name:"gray 72"},{value:"#B5B5B5",name:"gray 71"},{value:"#B3B3B3",name:"gray 70"},{value:"#B0B0B0",name:"gray 69"},{value:"#ADADAD",name:"gray 68"},{value:"#ABABAB",name:"gray 67"},{value:"#A8A8A8",name:"gray 66"},{value:"#A6A6A6",name:"gray 65"},{value:"#A3A3A3",name:"gray 64"},{value:"#A1A1A1",name:"gray 63"},{value:"#9E9E9E",name:"gray 62"},{value:"#9C9C9C",name:"gray 61"},{value:"#999999",name:"gray 60"},{value:"#969696",name:"gray 59"},{value:"#949494",name:"gray 58"},{value:"#919191",name:"gray 57"},{value:"#8F8F8F",name:"gray 56"},{value:"#8C8C8C",name:"gray 55"},{value:"#8A8A8A",name:"gray 54"},{value:"#878787",name:"gray 53"},{value:"#858585",name:"gray 52"},{value:"#828282",name:"gray 51"},{value:"#7F7F7F",name:"gray 50"},{value:"#7D7D7D",name:"gray 49"},{value:"#7A7A7A",name:"gray 48"},{value:"#787878",name:"gray 47"},{value:"#757575",name:"gray 46"},{value:"#737373",name:"gray 45"},{value:"#707070",name:"gray 44"},{value:"#6E6E6E",name:"gray 43"},{value:"#666666",name:"gray 40"},{value:"#636363",name:"gray 39"},{value:"#616161",name:"gray 38"},{value:"#5E5E5E",name:"gray 37"},{value:"#5C5C5C",name:"gray 36"},{value:"#595959",name:"gray 35"},{value:"#575757",name:"gray 34"},{value:"#545454",name:"gray 33"},{value:"#525252",name:"gray 32"},{value:"#4F4F4F",name:"gray 31"},{value:"#4D4D4D",name:"gray 30"},{value:"#4A4A4A",name:"gray 29"},{value:"#474747",name:"gray 28"},{value:"#454545",name:"gray 27"},{value:"#424242",name:"gray 26"},{value:"#404040",name:"gray 25"},{value:"#3D3D3D",name:"gray 24"},{value:"#3B3B3B",name:"gray 23"},{value:"#383838",name:"gray 22"},{value:"#363636",name:"gray 21"},{value:"#333333",name:"gray 20"},{value:"#303030",name:"gray 19"},{value:"#2E2E2E",name:"gray 18"},{value:"#2B2B2B",name:"gray 17"},{value:"#292929",name:"gray 16"},{value:"#262626",name:"gray 15"},{value:"#242424",name:"gray 14"},{value:"#212121",name:"gray 13"},{value:"#1F1F1F",name:"gray 12"},{value:"#1C1C1C",name:"gray 11"},{value:"#1A1A1A",name:"gray 10"},{value:"#171717",name:"gray 9"},{value:"#141414",name:"gray 8"},{value:"#121212",name:"gray 7"},{value:"#0F0F0F",name:"gray 6"},{value:"#0D0D0D",name:"gray 5"},{value:"#0A0A0A",name:"gray 4"},{value:"#080808",name:"gray 3"},{value:"#050505",name:"gray 2"},{value:"#030303",name:"gray 1"},{value:"#F5F5F5",css:!0,name:"whitesmoke"}];(function(e){var t=K3,n=t.filter(function(s){return!!s.css}),r=t.filter(function(s){return!!s.vga});e.exports=function(s){var o=e.exports.get(s);return o&&o.value},e.exports.get=function(s){return s=s||"",s=s.trim().toLowerCase(),t.filter(function(o){return o.name.toLowerCase()===s}).pop()},e.exports.all=e.exports.get.all=function(){return t},e.exports.get.css=function(s){return s?(s=s||"",s=s.trim().toLowerCase(),n.filter(function(o){return o.name.toLowerCase()===s}).pop()):n},e.exports.get.vga=function(s){return s?(s=s||"",s=s.trim().toLowerCase(),r.filter(function(o){return o.name.toLowerCase()===s}).pop()):r}})(n1);var G3=n1.exports,Z3=1/0,Y3="[object Symbol]",J3=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r1="\\ud800-\\udfff",X3="\\u0300-\\u036f\\ufe20-\\ufe23",Q3="\\u20d0-\\u20f0",s1="\\u2700-\\u27bf",o1="a-z\\xdf-\\xf6\\xf8-\\xff",e6="\\xac\\xb1\\xd7\\xf7",t6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",n6="\\u2000-\\u206f",r6=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a1="A-Z\\xc0-\\xd6\\xd8-\\xde",s6="\\ufe0e\\ufe0f",i1=e6+t6+n6+r6,l1="['’]",uh="["+i1+"]",o6="["+X3+Q3+"]",u1="\\d+",a6="["+s1+"]",c1="["+o1+"]",d1="[^"+r1+i1+u1+s1+o1+a1+"]",i6="\\ud83c[\\udffb-\\udfff]",l6="(?:"+o6+"|"+i6+")",u6="[^"+r1+"]",m1="(?:\\ud83c[\\udde6-\\uddff]){2}",f1="[\\ud800-\\udbff][\\udc00-\\udfff]",Ns="["+a1+"]",c6="\\u200d",ch="(?:"+c1+"|"+d1+")",d6="(?:"+Ns+"|"+d1+")",dh="(?:"+l1+"(?:d|ll|m|re|s|t|ve))?",mh="(?:"+l1+"(?:D|LL|M|RE|S|T|VE))?",p1=l6+"?",h1="["+s6+"]?",m6="(?:"+c6+"(?:"+[u6,m1,f1].join("|")+")"+h1+p1+")*",f6=h1+p1+m6,p6="(?:"+[a6,m1,f1].join("|")+")"+f6,h6=RegExp([Ns+"?"+c1+"+"+dh+"(?="+[uh,Ns,"$"].join("|")+")",d6+"+"+mh+"(?="+[uh,Ns+ch,"$"].join("|")+")",Ns+"?"+ch+"+"+dh,Ns+"+"+mh,u1,p6].join("|"),"g"),_6=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,g6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,y6=typeof self=="object"&&self&&self.Object===Object&&self,v6=g6||y6||Function("return this")();function b6(e){return e.match(J3)||[]}function z6(e){return _6.test(e)}function C6(e){return e.match(h6)||[]}var w6=Object.prototype,k6=w6.toString,fh=v6.Symbol,ph=fh?fh.prototype:void 0,hh=ph?ph.toString:void 0;function x6(e){if(typeof e=="string")return e;if(S6(e))return hh?hh.call(e):"";var t=e+"";return t=="0"&&1/e==-Z3?"-0":t}function E6(e){return!!e&&typeof e=="object"}function S6(e){return typeof e=="symbol"||E6(e)&&k6.call(e)==Y3}function $6(e){return e==null?"":x6(e)}function A6(e,t,n){return e=$6(e),t=n?void 0:t,t===void 0?z6(e)?C6(e):b6(e):e.match(t)||[]}var T6=A6,O6=1/0,D6="[object Symbol]",P6=/^\s+/,Cm="\\ud800-\\udfff",_1="\\u0300-\\u036f\\ufe20-\\ufe23",g1="\\u20d0-\\u20f0",y1="\\ufe0e\\ufe0f",I6="["+Cm+"]",Qc="["+_1+g1+"]",ed="\\ud83c[\\udffb-\\udfff]",F6="(?:"+Qc+"|"+ed+")",v1="[^"+Cm+"]",b1="(?:\\ud83c[\\udde6-\\uddff]){2}",z1="[\\ud800-\\udbff][\\udc00-\\udfff]",C1="\\u200d",w1=F6+"?",k1="["+y1+"]?",R6="(?:"+C1+"(?:"+[v1,b1,z1].join("|")+")"+k1+w1+")*",L6=k1+w1+R6,N6="(?:"+[v1+Qc+"?",Qc,b1,z1,I6].join("|")+")",M6=RegExp(ed+"(?="+ed+")|"+N6+L6,"g"),V6=RegExp("["+C1+Cm+_1+g1+y1+"]"),H6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,B6=typeof self=="object"&&self&&self.Object===Object&&self,U6=H6||B6||Function("return this")();function j6(e){return e.split("")}function q6(e,t,n,r){for(var s=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function Z6(e){return V6.test(e)}function _h(e){return Z6(e)?Y6(e):j6(e)}function Y6(e){return e.match(M6)||[]}var J6=Object.prototype,X6=J6.toString,gh=U6.Symbol,yh=gh?gh.prototype:void 0,vh=yh?yh.toString:void 0;function Q6(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r=r?e:Q6(e,t,n)}function t4(e){return!!e&&typeof e=="object"}function n4(e){return typeof e=="symbol"||t4(e)&&X6.call(e)==D6}function r4(e){return e==null?"":x1(e)}function s4(e,t,n){if(e=r4(e),e&&(n||t===void 0))return e.replace(P6,"");if(!e||!(t=x1(t)))return e;var r=_h(e),s=G6(r,_h(t));return e4(r,s).join("")}var o4=s4,td=1/0,a4=9007199254740991,i4=17976931348623157e292,bh=NaN,l4="[object Symbol]",u4=/^\s+|\s+$/g,c4=/^[-+]0x[0-9a-f]+$/i,d4=/^0b[01]+$/i,m4=/^0o[0-7]+$/i,wm="\\ud800-\\udfff",E1="\\u0300-\\u036f\\ufe20-\\ufe23",S1="\\u20d0-\\u20f0",$1="\\ufe0e\\ufe0f",f4="["+wm+"]",nd="["+E1+S1+"]",rd="\\ud83c[\\udffb-\\udfff]",p4="(?:"+nd+"|"+rd+")",A1="[^"+wm+"]",T1="(?:\\ud83c[\\udde6-\\uddff]){2}",O1="[\\ud800-\\udbff][\\udc00-\\udfff]",D1="\\u200d",P1=p4+"?",I1="["+$1+"]?",h4="(?:"+D1+"(?:"+[A1,T1,O1].join("|")+")"+I1+P1+")*",_4=I1+P1+h4,g4="(?:"+[A1+nd+"?",nd,T1,O1,f4].join("|")+")",sd=RegExp(rd+"(?="+rd+")|"+g4+_4,"g"),y4=RegExp("["+D1+wm+E1+S1+$1+"]"),v4=parseInt,b4=typeof cn=="object"&&cn&&cn.Object===Object&&cn,z4=typeof self=="object"&&self&&self.Object===Object&&self,C4=b4||z4||Function("return this")(),w4=x4("length");function k4(e){return e.split("")}function x4(e){return function(t){return t==null?void 0:t[e]}}function km(e){return y4.test(e)}function F1(e){return km(e)?S4(e):w4(e)}function E4(e){return km(e)?$4(e):k4(e)}function S4(e){for(var t=sd.lastIndex=0;sd.test(e);)t++;return t}function $4(e){return e.match(sd)||[]}var A4=Object.prototype,T4=A4.toString,zh=C4.Symbol,O4=Math.ceil,D4=Math.floor,Ch=zh?zh.prototype:void 0,wh=Ch?Ch.toString:void 0;function kh(e,t){var n="";if(!e||t<1||t>a4)return n;do t%2&&(n+=e),t=D4(t/2),t&&(e+=e);while(t);return n}function P4(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r=r?e:P4(e,t,n)}function F4(e,t){t=t===void 0?" ":R1(t);var n=t.length;if(n<2)return n?kh(t,e):t;var r=kh(t,O4(e/F1(t)));return km(t)?I4(E4(r),0,e).join(""):r.slice(0,e)}function xh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function R4(e){return!!e&&typeof e=="object"}function L1(e){return typeof e=="symbol"||R4(e)&&T4.call(e)==l4}function L4(e){if(!e)return e===0?e:0;if(e=M4(e),e===td||e===-td){var t=e<0?-1:1;return t*i4}return e===e?e:0}function N4(e){var t=L4(e),n=t%1;return t===t?n?t-n:t:0}function M4(e){if(typeof e=="number")return e;if(L1(e))return bh;if(xh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(u4,"");var n=d4.test(e);return n||m4.test(e)?v4(e.slice(2),n?2:8):c4.test(e)?bh:+e}function V4(e){return e==null?"":R1(e)}function H4(e,t,n){e=V4(e),t=N4(t);var r=t?F1(e):0;return t&&r{const s=(e+(r||"")).toString().includes("%");if(typeof e=="string"?[e,t,n,r]=e.match(/(0?\.?\d{1,3})%?\b/g).map(Number):r!==void 0&&(r=parseFloat(r)),typeof e!="number"||typeof t!="number"||typeof n!="number"||e>255||t>255||n>255)throw new TypeError("Expected three numbers below 256");if(typeof r=="number"){if(!s&&r>=0&&r<=1)r=Math.round(255*r);else if(s&&r>=0&&r<=100)r=Math.round(255*r/100);else throw new TypeError(`Expected alpha value (${r}) as a fraction or percentage`);r=(r|256).toString(16).slice(1)}else r="";return(n|t<<8|e<<16|1<<24).toString(16).slice(1)+r};const Ca="a-f\\d",j4=`#?[${Ca}]{3}[${Ca}]?`,q4=`#?[${Ca}]{6}([${Ca}]{2})?`,W4=new RegExp(`[^#${Ca}]`,"gi"),K4=new RegExp(`^${j4}$|^${q4}$`,"i");var G4=(e,t={})=>{if(typeof e!="string"||W4.test(e)||!K4.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const r=Number.parseInt(e,16),s=r>>16,o=r>>8&255,a=r&255,i=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[s,o,a,i];if(t.format==="css"){const l=i===1?"":` / ${Number((i*100).toFixed(2))}%`;return`rgb(${s} ${o} ${a}${l})`}return{red:s,green:o,blue:a,alpha:i}},Z4=G3,Y4=T6,J4=o4,X4=B4,Q4=U4,N1=G4;const Ku=.75,Gu=.25,Zu=16777215,e5=49979693;var t5=function(e){return"#"+s5(String(JSON.stringify(e)))};function n5(e){var t=Y4(e),n=[];return t.forEach(function(r){var s=Z4(r);s&&n.push(N1(J4(s,"#"),{format:"array"}))}),n}function r5(e){var t=[0,0,0];return e.forEach(function(n){for(var r=0;r<3;r++)t[r]+=n[r]}),[t[0]/e.length,t[1]/e.length,t[2]/e.length]}function s5(e){var t,n=n5(e);n.length>0&&(t=r5(n));var r=1,s=0,o=1;if(e.length>0)for(var a=0;as&&(s=e[a].charCodeAt(0)),o=parseInt(Zu/s),r=(r+e[a].charCodeAt(0)*o*e5)%Zu;var i=(r*e.length%Zu).toString(16);i=X4(i,6,i);var l=N1(i,{format:"array"});return t?Q4(Gu*l[0]+Ku*t[0],Gu*l[1]+Ku*t[1],Gu*l[2]+Ku*t[2]):i}const o5=Pa(t5);function a5(e){const t=e.replace(/#/,""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),s=parseInt(t.substr(4,2),16);return[.299*n,.587*r,.114*s].reduce((a,i)=>a+i)/255>.5}function i5(e){return a5(e)?"#000000":"#ffffff"}function l5(e){const t=' '+e.caption+" ";return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(t)}function u5(e,t,n){const r=o5(t),s=i5(r),o={width:n.width,height:n.height,textColor:s,backgroundColor:r,caption:e,fontFamily:n.font_family,fontSize:n.font_size,fontWeight:n.font_weight};return l5(o)}const c5={name:"CoverArtwork",props:["artist","album","artwork_url","maxwidth","maxheight"],emits:["click"],data(){return{width:600,height:600,font_family:"sans-serif",font_size:200,font_weight:600,lazy_lifecycle:{error:e=>{e.src=this.dataURI()}}}},computed:{artwork_url_with_size(){return this.maxwidth>0&&this.maxheight>0?M.artwork_url_append_size_params(this.artwork_url,this.maxwidth,this.maxheight):M.artwork_url_append_size_params(this.artwork_url)},alt_text(){return this.artist+" - "+this.album},caption(){return this.album?this.album.substring(0,2):this.artist?this.artist.substring(0,2):""}},methods:{dataURI(){return u5(this.caption,this.alt_text,{width:this.width,height:this.height,font_family:this.font_family,font_size:this.font_size,font_weight:this.font_weight})}}};function d5(e,t,n,r,s,o){const a=Rd("lazy");return k(),$("figure",null,[bt(u("img",{onClick:t[0]||(t[0]=i=>e.$emit("click"))},null,512),[[a,{src:o.artwork_url_with_size,lifecycle:s.lazy_lifecycle}]])])}const Fn=te(c5,[["render",d5]]),{t:Yu,locale:xm}=su.global,M1="GROUP_KEY_NONE";function V1(){return{compareFn:null,groupKeyFn:e=>M1}}function Rn(e,t=!1,n="_"){return{compareFn:t?null:(r,s)=>{const o=r[e]||n,a=s[e]||n;return o.localeCompare(a,xm.value)},groupKeyFn:r=>{const s=(r[e]||n).charAt(0);return s.match(new RegExp("\\p{Letter}","gu"))?s.toUpperCase():s.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"}}}function Em(e,{direction:t="asc",defaultValue:n=0}){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o-a;return t==="asc"?i:i*-1},groupKeyFn:r=>{const s=r[e]||n;return Math.floor(s/10)}}}function kl(e,{direction:t="asc",defaultValue:n="0000"}){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o.localeCompare(a,xm.value);return t==="asc"?i:i*-1},groupKeyFn:r=>(r[e]||n).substring(0,4)}}function m5(e,t="0000"){return{compareFn:(n,r)=>{const s=n[e]||t;return(r[e]||t).localeCompare(s,xm.value)},groupKeyFn:n=>{const r=n[e];if(!r)return t;const s=new Date().getTime()-new Date(r).getTime();return s<864e5?Yu("group-by-list.today"):s<6048e5?Yu("group-by-list.last-week"):s<2592e6?Yu("group-by-list.last-month"):r.substring(0,4)}}}class ge{constructor({items:t=[],total:n=0,offset:r=0,limit:s=-1}={}){this.items=t,this.total=n,this.offset=r,this.limit=s,this.count=t.length,this.indexList=[],this.group(V1())}get(){return this.itemsByGroup}isEmpty(){return!this.items||this.items.length<=0}group(t,n=[]){const r=n?this.items.filter(o=>n.every(a=>a(o))):this.items;this.count=r.length;let s=t.compareFn?[...r].sort(t.compareFn):r;this.indexList=[...new Set(s.map(t.groupKeyFn))],this.itemsByGroup=s.reduce((o,a)=>{const i=t.groupKeyFn(a);return o[i]=[...o[i]||[],a],o},{})}[Symbol.iterator](){let t=-1,n=-1;return{next:()=>{if(this.isEmpty())return{done:!0};if(t>=this.indexList.length)return{done:!0};if(t<0&&(++t,n=0,this.indexList[t]!==M1))return{value:{groupKey:this.indexList[t],itemId:this.indexList[t],isItem:!1,item:{}},done:!1};let r=this.indexList[t],s=this.itemsByGroup[r];if(n0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},c=function(f,p){var h=new XMLHttpRequest,_=function(b,w){function C(A){b&&b(A),p&&p(null,A)}function z(){w&&w(h),p&&p(h,null)}var v=f.type||"GET";if(h.open(v,l(f.url,f.params)),r&&h.setRequestHeader("Authorization","Bearer "+r),h.onreadystatechange=function(){if(h.readyState===4){var A=null;try{A=h.responseText?JSON.parse(h.responseText):""}catch(D){console.error(D)}h.status>=200&&h.status<300?C(A):z()}},v==="GET")h.send(null);else{var S=null;f.postData&&(f.contentType==="image/jpeg"?(S=f.postData,h.setRequestHeader("Content-Type",f.contentType)):(S=JSON.stringify(f.postData),h.setRequestHeader("Content-Type","application/json"))),h.send(S)}};return p?(_(),null):a(_,function(){h.abort()})},m=function(f,p,h,_){var b={},w=null;typeof p=="object"?(b=p,w=h):typeof p=="function"&&(w=p);var C=f.type||"GET";return C!=="GET"&&f.postData&&!_?f.postData=i(f.postData,b):f.params=i(f.params,b),c(f,w)},d=function(){};return d.prototype={constructor:t},d.prototype.getGeneric=function(f,p){var h={url:f};return m(h,p)},d.prototype.getMe=function(f,p){var h={url:n+"/me"};return m(h,f,p)},d.prototype.getMySavedTracks=function(f,p){var h={url:n+"/me/tracks"};return m(h,f,p)},d.prototype.addToMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedAlbums=function(f,p){var h={url:n+"/me/albums"};return m(h,f,p)},d.prototype.addToMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMyTopArtists=function(f,p){var h={url:n+"/me/top/artists"};return m(h,f,p)},d.prototype.getMyTopTracks=function(f,p){var h={url:n+"/me/top/tracks"};return m(h,f,p)},d.prototype.getMyRecentlyPlayedTracks=function(f,p){var h={url:n+"/me/player/recently-played"};return m(h,f,p)},d.prototype.followUsers=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.followArtists=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.followPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return m(_,p,h)},d.prototype.unfollowUsers=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.unfollowArtists=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.unfollowPlaylist=function(f,p){var h={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return m(h,p)},d.prototype.isFollowingUsers=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.isFollowingArtists=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.areFollowingPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return m(_,h)},d.prototype.getFollowedArtists=function(f,p){var h={url:n+"/me/following",type:"GET",params:{type:"artist"}};return m(h,f,p)},d.prototype.getUser=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)};return m(_,p,h)},d.prototype.getUserPlaylists=function(f,p,h){var _;return typeof f=="string"?_={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(_={url:n+"/me/playlists"},h=p,p=f),m(_,p,h)},d.prototype.getPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f};return m(_,p,h)},d.prototype.getPlaylistTracks=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks"};return m(_,p,h)},d.prototype.getPlaylistCoverImage=function(f,p){var h={url:n+"/playlists/"+f+"/images"};return m(h,p)},d.prototype.createPlaylist=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return m(_,p,h)},d.prototype.changePlaylistDetails=function(f,p,h){var _={url:n+"/playlists/"+f,type:"PUT",postData:p};return m(_,p,h)},d.prototype.addTracksToPlaylist=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return m(b,h,_,!0)},d.prototype.replaceTracksInPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return m(_,{},h)},d.prototype.reorderTracksInPlaylist=function(f,p,h,_,b){var w={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return m(w,_,b)},d.prototype.removeTracksFromPlaylist=function(f,p,h){var _=p.map(function(w){return typeof w=="string"?{uri:w}:w}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:_}};return m(b,{},h)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,_){var b=p.map(function(C){return typeof C=="string"?{uri:C}:C}),w={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:h}};return m(w,{},_)},d.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return m(b,{},_)},d.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var _={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return m(_,{},h)},d.prototype.getAlbum=function(f,p,h){var _={url:n+"/albums/"+f};return m(_,p,h)},d.prototype.getAlbumTracks=function(f,p,h){var _={url:n+"/albums/"+f+"/tracks"};return m(_,p,h)},d.prototype.getAlbums=function(f,p,h){var _={url:n+"/albums/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getTrack=function(f,p,h){var _={};return _.url=n+"/tracks/"+f,m(_,p,h)},d.prototype.getTracks=function(f,p,h){var _={url:n+"/tracks/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtist=function(f,p,h){var _={url:n+"/artists/"+f};return m(_,p,h)},d.prototype.getArtists=function(f,p,h){var _={url:n+"/artists/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtistAlbums=function(f,p,h){var _={url:n+"/artists/"+f+"/albums"};return m(_,p,h)},d.prototype.getArtistTopTracks=function(f,p,h,_){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return m(b,h,_)},d.prototype.getArtistRelatedArtists=function(f,p,h){var _={url:n+"/artists/"+f+"/related-artists"};return m(_,p,h)},d.prototype.getFeaturedPlaylists=function(f,p){var h={url:n+"/browse/featured-playlists"};return m(h,f,p)},d.prototype.getNewReleases=function(f,p){var h={url:n+"/browse/new-releases"};return m(h,f,p)},d.prototype.getCategories=function(f,p){var h={url:n+"/browse/categories"};return m(h,f,p)},d.prototype.getCategory=function(f,p,h){var _={url:n+"/browse/categories/"+f};return m(_,p,h)},d.prototype.getCategoryPlaylists=function(f,p,h){var _={url:n+"/browse/categories/"+f+"/playlists"};return m(_,p,h)},d.prototype.search=function(f,p,h,_){var b={url:n+"/search/",params:{q:f,type:p.join(",")}};return m(b,h,_)},d.prototype.searchAlbums=function(f,p,h){return this.search(f,["album"],p,h)},d.prototype.searchArtists=function(f,p,h){return this.search(f,["artist"],p,h)},d.prototype.searchTracks=function(f,p,h){return this.search(f,["track"],p,h)},d.prototype.searchPlaylists=function(f,p,h){return this.search(f,["playlist"],p,h)},d.prototype.searchShows=function(f,p,h){return this.search(f,["show"],p,h)},d.prototype.searchEpisodes=function(f,p,h){return this.search(f,["episode"],p,h)},d.prototype.getAudioFeaturesForTrack=function(f,p){var h={};return h.url=n+"/audio-features/"+f,m(h,{},p)},d.prototype.getAudioFeaturesForTracks=function(f,p){var h={url:n+"/audio-features",params:{ids:f}};return m(h,{},p)},d.prototype.getAudioAnalysisForTrack=function(f,p){var h={};return h.url=n+"/audio-analysis/"+f,m(h,{},p)},d.prototype.getRecommendations=function(f,p){var h={url:n+"/recommendations"};return m(h,f,p)},d.prototype.getAvailableGenreSeeds=function(f){var p={url:n+"/recommendations/available-genre-seeds"};return m(p,{},f)},d.prototype.getMyDevices=function(f){var p={url:n+"/me/player/devices"};return m(p,{},f)},d.prototype.getMyCurrentPlaybackState=function(f,p){var h={url:n+"/me/player"};return m(h,f,p)},d.prototype.getMyCurrentPlayingTrack=function(f,p){var h={url:n+"/me/player/currently-playing"};return m(h,f,p)},d.prototype.transferMyPlayback=function(f,p,h){var _=p||{};_.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:_};return m(b,p,h)},d.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={};["context_uri","uris","offset","position_ms"].forEach(function(C){C in f&&(_[C]=f[C])});var b={type:"PUT",url:n+"/me/player/play",params:h,postData:_},w=typeof f=="function"?f:{};return m(b,w,p)},d.prototype.queue=function(f,p,h){p=p||{};var _="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:_};return m(b,p,h)},d.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"PUT",url:n+"/me/player/pause",params:h};return m(_,f,p)},d.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/next",params:h};return m(_,f,p)},d.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/previous",params:h};return m(_,f,p)},d.prototype.seek=function(f,p,h){p=p||{};var _={position_ms:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:_};return m(b,p,h)},d.prototype.setRepeat=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:_};return m(b,p,h)},d.prototype.setVolume=function(f,p,h){p=p||{};var _={volume_percent:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:_};return m(b,p,h)},d.prototype.setShuffle=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:_};return m(b,p,h)},d.prototype.getShow=function(f,p,h){var _={};return _.url=n+"/shows/"+f,m(_,p,h)},d.prototype.getShows=function(f,p,h){var _={url:n+"/shows/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedShows=function(f,p){var h={url:n+"/me/shows"};return m(h,f,p)},d.prototype.addToMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedShows=function(f,p,h){var _={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getShowEpisodes=function(f,p,h){var _={url:n+"/shows/"+f+"/episodes"};return m(_,p,h)},d.prototype.getEpisode=function(f,p,h){var _={};return _.url=n+"/episodes/"+f,m(_,p,h)},d.prototype.getEpisodes=function(f,p,h){var _={url:n+"/episodes/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getAccessToken=function(){return r},d.prototype.setAccessToken=function(f){r=f},d.prototype.setPromiseImplementation=function(f){var p=!1;try{var h=new f(function(_){_()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(_){console.error(_)}if(p)s=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();e.exports=t})(H1);var f5=H1.exports;const Yn=Pa(f5),p5={name:"ModalDialogTrack",props:["show","track"],emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{track(){if(this.track&&this.track.data_kind==="spotify"){const e=new Yn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{play_track(){this.$emit("close"),M.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.track.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.track.album_id}}):this.track.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.track.album_id}}):this.$router.push({name:"music-album",params:{id:this.track.album_id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.track.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.track.genre},query:{media_kind:this.track.media_kind}})},open_spotify_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}})},open_spotify_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}})},mark_new(){M.library_track_update(this.track.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){M.library_track_update(this.track.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})}}},h5={key:0,class:"modal is-active"},_5={class:"modal-content fd-modal-card"},g5={class:"card"},y5={class:"card-content"},v5=["textContent"],b5=["textContent"],z5={key:0,class:"buttons"},C5=["textContent"],w5=["textContent"],k5={class:"content is-small"},x5=["textContent"],E5=["textContent"],S5={key:0},$5=["textContent"],A5=["textContent"],T5={key:1},O5=["textContent"],D5=["textContent"],P5={key:2},I5=["textContent"],F5=["textContent"],R5={key:3},L5=["textContent"],N5=["textContent"],M5={key:4},V5=["textContent"],H5=["textContent"],B5=["textContent"],U5=["textContent"],j5=["textContent"],q5=["textContent"],W5=["textContent"],K5=["textContent"],G5=["textContent"],Z5={class:"title is-6"},Y5=["textContent"],J5={key:0,class:"has-text-weight-normal"},X5=["textContent"],Q5=["textContent"],eD=["textContent"],tD={class:"title is-6"},nD=["textContent"],rD=["textContent"],sD=["textContent"],oD=["textContent"],aD=["textContent"],iD=["textContent"],lD=["textContent"],uD=["textContent"],cD={key:5},dD=["textContent"],mD=["textContent"],fD={class:"card-footer"},pD=["textContent"],hD=["textContent"],_D=["textContent"];function gD(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",h5,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",_5,[u("div",g5,[u("div",y5,[u("p",{class:"title is-4",textContent:g(n.track.title)},null,8,v5),u("p",{class:"subtitle",textContent:g(n.track.artist)},null,8,b5),n.track.media_kind==="podcast"?(k(),$("div",z5,[n.track.play_count>0?(k(),$("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...i)=>o.mark_new&&o.mark_new(...i)),textContent:g(e.$t("dialog.track.mark-as-new"))},null,8,C5)):H("",!0),n.track.play_count===0?(k(),$("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...i)=>o.mark_played&&o.mark_played(...i)),textContent:g(e.$t("dialog.track.mark-as-played"))},null,8,w5)):H("",!0)])):H("",!0),u("div",k5,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,x5),u("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.track.album)},null,8,E5)]),n.track.album_artist&&n.track.media_kind!=="audiobook"?(k(),$("p",S5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,$5),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.track.album_artist)},null,8,A5)])):H("",!0),n.track.composer?(k(),$("p",T5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,O5),u("span",{class:"title is-6",textContent:g(n.track.composer)},null,8,D5)])):H("",!0),n.track.date_released?(k(),$("p",P5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,I5),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.track.date_released))},null,8,F5)])):n.track.year>0?(k(),$("p",R5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,L5),u("span",{class:"title is-6",textContent:g(n.track.year)},null,8,N5)])):H("",!0),n.track.genre?(k(),$("p",M5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,V5),u("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.track.genre)},null,8,H5)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,B5),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,U5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,j5),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.length_ms))},null,8,q5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,W5),u("span",{class:"title is-6",textContent:g(n.track.path)},null,8,K5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,G5),u("span",Z5,[u("span",{textContent:g([e.$t("media.kind."+n.track.media_kind),e.$t("data.kind."+n.track.data_kind)].join(" - "))},null,8,Y5),n.track.data_kind==="spotify"?(k(),$("span",J5,[nt(" ("),u("a",{onClick:t[6]||(t[6]=(...i)=>o.open_spotify_artist&&o.open_spotify_artist(...i)),textContent:g(e.$t("dialog.track.spotify-artist"))},null,8,X5),nt(", "),u("a",{onClick:t[7]||(t[7]=(...i)=>o.open_spotify_album&&o.open_spotify_album(...i)),textContent:g(e.$t("dialog.track.spotify-album"))},null,8,Q5),nt(") ")])):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,eD),u("span",tD,[u("span",{textContent:g(n.track.type)},null,8,nD),n.track.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.track.samplerate}))},null,8,rD)):H("",!0),n.track.channels?(k(),$("span",{key:1,textContent:g(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.track.channels)}))},null,8,sD)):H("",!0),n.track.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.track.bitrate}))},null,8,oD)):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,aD),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.track.time_added))},null,8,iD)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,lD),u("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.track.rating/10)}))},null,8,uD)]),n.track.comment?(k(),$("p",cD,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,dD),u("span",{class:"title is-6",textContent:g(n.track.comment)},null,8,mD)])):H("",!0)])]),u("footer",fD,[u("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add"))},null,8,pD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[9]||(t[9]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add-next"))},null,8,hD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[10]||(t[10]=(...i)=>o.play_track&&o.play_track(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.play"))},null,8,_D)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[11]||(t[11]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const yD=te(p5,[["render",gD]]),vD={name:"ProgressBar",props:["max","value"],computed:{width(){return this.value>0&&this.max>0?parseInt(this.value*100/this.max):0},width_percent(){return this.width+"%"}}};function bD(e,t,n,r,s,o){return o.width>0?(k(),$("div",{key:0,class:"progress-bar",style:lr({width:o.width_percent})},null,4)):H("",!0)}const zD=te(vD,[["render",bD]]),CD={name:"ListTracks",components:{ModalDialogTrack:yD,ProgressBar:zD},props:["tracks","uris","expression","show_progress","show_icon"],emits:["play-count-changed"],data(){return{show_details_modal:!1,selected_track:{}}},methods:{play_track(e){this.uris?M.player_play_uri(this.uris,!1,this.tracks.items.indexOf(e)):this.expression?M.player_play_expression(this.expression,!1,this.tracks.items.indexOf(e)):M.player_play_uri(e.uri,!1)},open_dialog(e){this.selected_track=e,this.show_details_modal=!0}}},wD={key:0,class:"mt-6 mb-5 py-2"},kD=["id","textContent"],xD=["onClick"],ED={key:0,class:"media-left is-clickable"},SD={class:"media-content is-clickable is-clipped"},$D=["textContent"],AD=["textContent"],TD=["textContent"],OD={class:"media-right"},DD=["onClick"];function PD(e,t,n,r,s,o){const a=E("mdicon"),i=E("progress-bar"),l=E("modal-dialog-track");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.tracks,c=>(k(),$(Ce,{key:c.itemId},[c.isItem?(k(),$("div",{key:1,class:Ee(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:m=>o.play_track(c.item)},[n.show_icon?(k(),$("figure",ED,[y(a,{class:"icon",name:"file-outline",size:"16"})])):H("",!0),u("div",SD,[u("h1",{class:Ee(["title is-6",{"has-text-grey":c.item.media_kind==="podcast"&&c.item.play_count>0}]),textContent:g(c.item.title)},null,10,$D),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.artist)},null,8,AD),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.album)},null,8,TD),n.show_progress?(k(),me(i,{key:0,max:c.item.length_ms,value:c.item.seek_ms},null,8,["max","value"])):H("",!0)]),u("div",OD,[u("a",{onClick:rt(m=>o.open_dialog(c.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,DD)])],10,xD)):(k(),$("div",wD,[u("span",{id:"index_"+c.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(c.groupKey)},null,8,kD)]))],64))),128)),(k(),me(Jr,{to:"#app"},[y(l,{show:s.show_details_modal,track:s.selected_track,onClose:t[0]||(t[0]=c=>s.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=c=>e.$emit("play-count-changed"))},null,8,["show","track"])]))],64)}const Cn=te(CD,[["render",PD]]),ID={name:"ModalDialogAlbum",components:{CoverArtwork:Fn},props:["show","album","media_kind","new_tracks"],emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return M.artwork_url_append_size_params(this.album.artwork_url)},media_kind_resolved(){return this.media_kind?this.media_kind:this.album.media_kind}},methods:{play(){this.$emit("close"),M.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.album.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.album.id}}):this.$router.push({name:"music-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},mark_played(){M.library_album_track_update(this.album.id,{play_count:"played"}).then(({data:e})=>{this.$emit("play-count-changed"),this.$emit("close")})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},FD={key:0,class:"modal is-active"},RD={class:"modal-content fd-modal-card"},LD={class:"card"},ND={class:"card-content"},MD={class:"title is-4"},VD=["textContent"],HD={key:0,class:"buttons"},BD=["textContent"],UD=["textContent"],jD={class:"content is-small"},qD={key:0},WD=["textContent"],KD=["textContent"],GD={key:1},ZD=["textContent"],YD=["textContent"],JD={key:2},XD=["textContent"],QD=["textContent"],eP=["textContent"],tP=["textContent"],nP=["textContent"],rP=["textContent"],sP=["textContent"],oP=["textContent"],aP=["textContent"],iP=["textContent"],lP={class:"card-footer"},uP=["textContent"],cP=["textContent"],dP=["textContent"];function mP(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",FD,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",RD,[u("div",LD,[u("div",ND,[y(a,{artwork_url:n.album.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["artwork_url","artist","album"]),u("p",MD,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>o.open_album&&o.open_album(...l)),textContent:g(n.album.name)},null,8,VD)]),o.media_kind_resolved==="podcast"?(k(),$("div",HD,[u("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>o.mark_played&&o.mark_played(...l)),textContent:g(e.$t("dialog.album.mark-as-played"))},null,8,BD),n.album.data_kind==="url"?(k(),$("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:g(e.$t("dialog.album.remove-podcast"))},null,8,UD)):H("",!0)])):H("",!0),u("div",jD,[n.album.artist?(k(),$("p",qD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,WD),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>o.open_artist&&o.open_artist(...l)),textContent:g(n.album.artist)},null,8,KD)])):H("",!0),n.album.date_released?(k(),$("p",GD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,ZD),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.date_released))},null,8,YD)])):n.album.year>0?(k(),$("p",JD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,XD),u("span",{class:"title is-6",textContent:g(n.album.year)},null,8,QD)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,eP),u("span",{class:"title is-6",textContent:g(n.album.track_count)},null,8,tP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,nP),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.album.length_ms))},null,8,rP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,sP),u("span",{class:"title is-6",textContent:g([e.$t("media.kind."+n.album.media_kind),e.$t("data.kind."+n.album.data_kind)].join(" - "))},null,8,oP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,aP),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.album.time_added))},null,8,iP)])])]),u("footer",lP,[u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>o.queue_add&&o.queue_add(...l))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add"))},null,8,uP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>o.queue_add_next&&o.queue_add_next(...l))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add-next"))},null,8,cP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>o.play&&o.play(...l))},[y(i,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.play"))},null,8,dP)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):H("",!0)]),_:1})])}const mu=te(ID,[["render",mP]]),ui={load(e){return Promise.all([M.library_album(e.params.id),M.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data)}},fP={name:"PageAlbum",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){ui.load(e).then(r=>{n(s=>ui.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ui.load(e).then(s=>{ui.set(r,s),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ge}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){M.player_play_uri(this.album.uri,!0)}}},pP={class:"fd-page"},hP=["textContent"],_P={class:"subtitle is-6 has-text-link has-text-weight-normal"},gP=["textContent"],yP={class:"buttons fd-is-centered-mobile mt-5"},vP=["textContent"],bP=["textContent"];function zP(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("content-with-hero");return k(),$("div",pP,[y(m,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,hP),u("h2",_P,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>o.open_artist&&o.open_artist(...d)),textContent:g(s.album.artist)},null,8,gP)]),u("div",yP,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.album.shuffle"))},null,8,vP)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.album.track-count",{count:s.album.track_count}))},null,8,bP),y(l,{tracks:s.tracks,uris:s.album.uri},null,8,["tracks","uris"]),y(c,{show:s.show_details_modal,album:s.album,onClose:t[4]||(t[4]=d=>s.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const CP=te(fP,[["render",zP]]),wP={name:"ListItemTrackSpotify",props:["track","position","context_uri"],methods:{play(){this.track.is_playable&&M.player_play_uri(this.context_uri,!1,this.position)}}},kP={class:"media is-align-items-center"},xP=["textContent"],EP=["textContent"],SP={key:0,class:"subtitle is-7"},$P=["textContent"],AP=["textContent"],TP={class:"media-right"};function OP(e,t,n,r,s,o){return k(),$("div",kP,[u("div",{class:Ee(["media-content is-clipped",{"is-clickable":n.track.is_playable,"fd-is-not-allowed":!n.track.is_playable}]),onClick:t[0]||(t[0]=(...a)=>o.play&&o.play(...a))},[u("h1",{class:Ee(["title is-6",{"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.name)},null,10,xP),u("h2",{class:Ee(["subtitle is-7",{"has-text-grey":n.track.is_playable,"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.artists[0].name)},null,10,EP),n.track.is_playable?H("",!0):(k(),$("h2",SP,[nt(" ("),u("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,$P),n.track.restrictions&&n.track.restrictions.reason?(k(),$("span",{key:0,textContent:g(e.$t("list.spotify.restriction-reason",{reason:n.track.restrictions.reason}))},null,8,AP)):H("",!0),nt(") ")]))],2),u("div",TP,[ot(e.$slots,"actions")])])}const Sm=te(wP,[["render",OP]]),DP={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:Fn},props:["show","album"],emits:["close"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{play(){this.$emit("close"),M.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},PP={key:0,class:"modal is-active"},IP={class:"modal-content fd-modal-card"},FP={class:"card"},RP={class:"card-content"},LP={class:"title is-4"},NP=["textContent"],MP={class:"content is-small"},VP=["textContent"],HP=["textContent"],BP=["textContent"],UP=["textContent"],jP=["textContent"],qP=["textContent"],WP={class:"card-footer"},KP=["textContent"],GP=["textContent"],ZP=["textContent"];function YP(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",PP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",IP,[u("div",FP,[u("div",RP,[y(a,{artwork_url:o.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:o.artwork_loaded,onError:o.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),u("p",LP,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>o.open_album&&o.open_album(...l)),textContent:g(n.album.name)},null,8,NP)]),u("div",MP,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,VP),u("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>o.open_artist&&o.open_artist(...l)),textContent:g(n.album.artists[0].name)},null,8,HP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,BP),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,UP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,jP),u("span",{class:"title is-6",textContent:g(n.album.album_type)},null,8,qP)])])]),u("footer",WP,[u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>o.queue_add&&o.queue_add(...l))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add"))},null,8,KP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>o.queue_add_next&&o.queue_add_next(...l))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add-next"))},null,8,GP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>o.play&&o.play(...l))},[y(i,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.play"))},null,8,ZP)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Na=te(DP,[["render",YP]]),JP={name:"ModalDialogTrackSpotify",props:["show","track","album"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})}}},XP={key:0,class:"modal is-active"},QP={class:"modal-content fd-modal-card"},eI={class:"card"},tI={class:"card-content"},nI=["textContent"],rI=["textContent"],sI={class:"content is-small"},oI=["textContent"],aI=["textContent"],iI=["textContent"],lI=["textContent"],uI=["textContent"],cI=["textContent"],dI=["textContent"],mI=["textContent"],fI=["textContent"],pI=["textContent"],hI=["textContent"],_I=["textContent"],gI={class:"card-footer"},yI=["textContent"],vI=["textContent"],bI=["textContent"];function zI(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",XP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",QP,[u("div",eI,[u("div",tI,[u("p",{class:"title is-4",textContent:g(n.track.name)},null,8,nI),u("p",{class:"subtitle",textContent:g(n.track.artists[0].name)},null,8,rI),u("div",sI,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,oI),u("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.album.name)},null,8,aI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,iI),u("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.album.artists[0].name)},null,8,lI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,uI),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,cI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,dI),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,mI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,fI),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.duration_ms))},null,8,pI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,hI),u("span",{class:"title is-6",textContent:g(n.track.uri)},null,8,_I)])])]),u("footer",gI,[u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add"))},null,8,yI)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add-next"))},null,8,vI)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.play"))},null,8,bI)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const $m=te(JP,[["render",zI]]),ci={load(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),t.getAlbum(e.params.id,{market:Ue.state.spotify.webapi_country})},set(e,t){e.album=t}},CI={name:"PageAlbumSpotify",components:{ContentWithHero:du,CoverArtwork:Fn,ListItemTrackSpotify:Sm,ModalDialogAlbumSpotify:Na,ModalDialogTrackSpotify:$m},beforeRouteEnter(e,t,n){ci.load(e).then(r=>{n(s=>ci.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ci.load(e).then(s=>{ci.set(r,s),n()})},data(){return{album:{artists:[{}],tracks:{}},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,M.player_play_uri(this.album.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},wI={class:"fd-page"},kI=["textContent"],xI={class:"subtitle is-6 has-text-link has-text-weight-normal"},EI=["textContent"],SI={class:"buttons fd-is-centered-mobile mt-5"},$I=["textContent"],AI=["textContent"],TI=["onClick"];function OI(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-item-track-spotify"),c=E("modal-dialog-track-spotify"),m=E("modal-dialog-album-spotify"),d=E("content-with-hero");return k(),$("div",wI,[y(d,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,kI),u("h2",xI,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...f)=>o.open_artist&&o.open_artist(...f)),textContent:g(s.album.artists[0].name)},null,8,EI)]),u("div",SI,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.album.shuffle"))},null,8,$I)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>s.show_album_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:o.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=f=>s.show_album_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.spotify.album.track-count",{count:s.album.tracks.total}))},null,8,AI),(k(!0),$(Ce,null,lt(s.album.tracks.items,(f,p)=>(k(),me(l,{key:f.id,track:f,position:p,context_uri:s.album.uri},{actions:x(()=>[u("a",{onClick:rt(h=>o.open_track_dialog(f),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,TI)]),_:2},1032,["track","position","context_uri"]))),128)),y(c,{show:s.show_track_details_modal,track:s.selected_track,album:s.album,onClose:t[4]||(t[4]=f=>s.show_track_details_modal=!1)},null,8,["show","track","album"]),y(m,{show:s.show_album_details_modal,album:s.album,onClose:t[5]||(t[5]=f=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const DI=te(CI,[["render",OI]]),PI={name:"ContentWithHeading",data(){return{options_visible:!1}},computed:{icon_name(){return this.options_visible?"chevron-up":"chevron-down"},position(){return{hash:this.options_visible?"#top":"#app"}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options_ref))},methods:{onElementObserved(e){e.forEach(({target:t,isIntersecting:n})=>{this.options_visible=n})},visibilityChanged(e){this.options_visible=e}}},II={class:"section"},FI={class:"container"},RI={class:"columns is-centered"},LI={class:"column is-four-fifths"},NI={key:0},MI={ref:"options_ref",style:{height:"1px"}},VI={class:"buttons is-centered mt-4 mb-2"},HI={id:"top",class:"level is-clipped"},BI={class:"level-left is-flex-shrink-1"},UI={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},jI={class:"level-right has-text-centered-mobile"},qI={class:"mt-4"};function WI(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",II,[u("div",FI,[u("div",RI,[u("div",LI,[e.$slots.options?(k(),$("section",NI,[u("div",MI,null,512),ot(e.$slots,"options"),u("nav",VI,[y(i,{class:"button is-small is-white",to:o.position},{default:x(()=>[y(a,{class:"icon is-small",name:o.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):H("",!0),u("div",{class:Ee({"fd-content-with-option":e.$slots.options})},[u("nav",HI,[u("div",BI,[u("div",UI,[u("div",null,[ot(e.$slots,"heading-left")])])]),u("div",jI,[ot(e.$slots,"heading-right")])]),ot(e.$slots,"content"),u("div",qI,[ot(e.$slots,"footer")])],2)])])])])}const Qe=te(PI,[["render",WI]]),KI={name:"ControlDropdown",props:["value","options"],emits:["update:value"],data(){return{is_active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{onClickOutside(e){this.is_active=!1},select(e){this.is_active=!1,this.$emit("update:value",e.id)}}},GI={class:"dropdown-trigger"},ZI=["textContent"],YI={id:"dropdown",class:"dropdown-menu",role:"menu"},JI={class:"dropdown-content"},XI=["onClick","textContent"];function QI(e,t,n,r,s,o){const a=E("mdicon"),i=Rd("click-away");return bt((k(),$("div",{class:Ee(["dropdown",{"is-active":s.is_active}])},[u("div",GI,[u("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>s.is_active=!s.is_active)},[u("span",{textContent:g(o.option.name)},null,8,ZI),y(a,{class:"icon",name:"chevron-down",size:"16"})])]),u("div",YI,[u("div",JI,[(k(!0),$(Ce,null,lt(n.options,l=>(k(),$("a",{key:l.id,class:Ee(["dropdown-item",{"is-active":n.value===l.id}]),onClick:c=>o.select(l),textContent:g(l.name)},null,10,XI))),128))])])],2)),[[i,o.onClickOutside]])}const xs=te(KI,[["render",QI]]),eF={name:"IndexButtonList",props:["index"]},tF={class:"buttons is-centered mb-4 fd-is-square"};function nF(e,t,n,r,s,o){const a=E("router-link");return k(),$("section",null,[u("nav",tF,[(k(!0),$(Ce,null,lt(n.index,i=>(k(),me(a,{key:i,class:"button is-small",to:"#index_"+i},{default:x(()=>[nt(g(i),1)]),_:2},1032,["to"]))),128))])])}const Jn=te(eF,[["render",nF]]),rF={name:"ListAlbums",components:{CoverArtwork:Fn,ModalDialog:dm,ModalDialogAlbum:mu},props:["albums","media_kind","hide_group_title"],emits:["play-count-changed","podcast-deleted"],data(){return{show_details_modal:!1,selected_album:{},show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value},media_kind_resolved(){return this.media_kind?this.media_kind:this.selected_album.media_kind}},methods:{open_album(e){this.selected_album=e,this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:e.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:e.id}}):this.$router.push({name:"music-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},open_remove_podcast_dialog(){M.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:e})=>{M.library_track_playlists(e.items[0].id).then(({data:t})=>{this.rss_playlist_to_remove=t.items.filter(n=>n.type==="rss")[0],this.show_remove_podcast_modal=!0,this.show_details_modal=!1})})},play_count_changed(){this.$emit("play-count-changed")},remove_podcast(){this.show_remove_podcast_modal=!1,M.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},sF={key:0,class:"mt-6 mb-5 py-2"},oF=["id","textContent"],aF=["onClick"],iF={key:0,class:"media-left"},lF={class:"media-content is-clickable is-clipped"},uF=["textContent"],cF={class:"subtitle is-7 has-text-grey"},dF=["textContent"],mF=["textContent"],fF={class:"media-right"},pF=["onClick"],hF=["textContent"],_F={class:"is-size-7"},gF=["textContent"],yF=["textContent"];function vF(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon"),l=E("modal-dialog-album"),c=E("modal-dialog");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.albums,m=>(k(),$(Ce,{key:m.itemId},[!m.isItem&&!n.hide_group_title?(k(),$("div",sF,[u("span",{id:"index_"+m.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(m.groupKey)},null,8,oF)])):m.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:d=>o.open_album(m.item)},[o.is_visible_artwork?(k(),$("div",iF,[y(a,{artwork_url:m.item.artwork_url,artist:m.item.artist,album:m.item.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):H("",!0),u("div",lF,[u("div",null,[u("h1",{class:"title is-6",textContent:g(m.item.name)},null,8,uF),u("h2",cF,[u("b",{textContent:g(m.item.artist)},null,8,dF)]),m.item.date_released&&m.item.media_kind==="music"?(k(),$("h2",{key:0,class:"subtitle is-7 has-text-grey has-text-weight-normal",textContent:g(e.$filters.date(m.item.date_released))},null,8,mF)):H("",!0)])]),u("div",fF,[u("a",{onClick:rt(d=>o.open_dialog(m.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,pF)])],8,aF)):H("",!0)],64))),128)),(k(),me(Jr,{to:"#app"},[y(l,{show:s.show_details_modal,album:s.selected_album,media_kind:n.media_kind,onRemovePodcast:t[0]||(t[0]=m=>o.open_remove_podcast_dialog()),onPlayCountChanged:t[1]||(t[1]=m=>o.play_count_changed()),onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","album","media_kind"]),y(c,{show:s.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[3]||(t[3]=m=>s.show_remove_podcast_modal=!1),onDelete:o.remove_podcast},{"modal-content":x(()=>[u("p",{textContent:g(e.$t("list.albums.info-1"))},null,8,hF),u("p",_F,[nt(" ("),u("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,gF),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,yF),nt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]))],64)}const cr=te(rF,[["render",vF]]),bF={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},zF={class:"section fd-tabs-section"},CF={class:"container"},wF={class:"columns is-centered"},kF={class:"column is-four-fifths"},xF={class:"tabs is-centered is-small"},EF=["onClick","onKeypress"],SF=["textContent"],$F=["onClick","onKeypress"],AF=["textContent"],TF=["onClick","onKeypress"],OF=["textContent"],DF=["onClick","onKeypress"],PF=["textContent"],IF=["onClick","onKeypress"],FF=["textContent"],RF=["onClick","onKeypress"],LF=["textContent"];function NF(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",zF,[u("div",CF,[u("div",wF,[u("div",kF,[u("div",xF,[u("ul",null,[y(i,{to:{name:"music"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"history",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.history"))},null,8,SF)],40,EF)],2)]),_:1}),y(i,{to:{name:"music-artists"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"account-music",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.artists"))},null,8,AF)],40,$F)],2)]),_:1}),y(i,{to:{name:"music-albums"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"album",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.albums"))},null,8,OF)],40,TF)],2)]),_:1}),y(i,{to:{name:"music-genres"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"speaker",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.genres"))},null,8,PF)],40,DF)],2)]),_:1}),y(i,{to:{name:"music-composers"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.composers"))},null,8,FF)],40,IF)],2)]),_:1}),o.spotify_enabled?(k(),me(i,{key:0,to:{name:"music-spotify"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"spotify",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.spotify"))},null,8,LF)],40,RF)],2)]),_:1})):H("",!0)])])])])])])}const dr=te(bF,[["render",NF]]),di={load(e){return M.library_albums("music")},set(e,t){e.albums_list=new ge(t.data)}},MF={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListAlbums:cr,TabsMusic:dr},beforeRouteEnter(e,t,n){di.load(e).then(r=>{n(s=>di.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums_list.isEmpty()){n();return}const r=this;di.load(e).then(s=>{di.set(r,s),n()})},data(){return{albums_list:new ge,groupby_options:[{id:1,name:this.$t("page.albums.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.albums.sort-by.recently-added"),options:kl("time_added",{direction:"desc"})},{id:3,name:this.$t("page.albums.sort-by.recently-released"),options:kl("date_released",{direction:"desc"})}]}},computed:{albums(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.albums_list.group(e.options,[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"]),this.albums_list},selected_groupby_option_id:{get(){return this.$store.state.albums_sort},set(e){this.$store.commit(n_,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Ol,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_d,e)}}}},VF={class:"fd-page-with-tabs"},HF={class:"columns"},BF={class:"column"},UF=["textContent"],jF={class:"field"},qF={class:"control"},WF=["textContent"],KF=["textContent"],GF={key:0,class:"field"},ZF={class:"control"},YF=["textContent"],JF=["textContent"],XF={class:"column"},QF=["textContent"],eR=["textContent"],tR=["textContent"];function nR(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("control-dropdown"),c=E("list-albums"),m=E("content-with-heading");return k(),$("div",VF,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.albums.indexList},null,8,["index"]),u("div",HF,[u("div",BF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,UF),u("div",jF,[u("div",qF,[bt(u("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>o.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ar,o.hide_singles]]),u("label",{for:"switchHideSingles",textContent:g(e.$t("page.albums.hide-singles"))},null,8,WF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,KF)]),o.spotify_enabled?(k(),$("div",GF,[u("div",ZF,[bt(u("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>o.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ar,o.hide_spotify]]),u("label",{for:"switchHideSpotify",textContent:g(e.$t("page.albums.hide-spotify"))},null,8,YF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,JF)])):H("",!0)]),u("div",XF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort-by.title"))},null,8,QF),y(l,{value:o.selected_groupby_option_id,"onUpdate:value":t[2]||(t[2]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.albums.title"))},null,8,eR),u("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:o.albums.count}))},null,8,tR)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{albums:o.albums},null,8,["albums"])]),_:1})])}const rR=te(MF,[["render",nR]]),sR={name:"ModalDialogArtist",props:["show","artist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.artist.id}})}}},oR={key:0,class:"modal is-active"},aR={class:"modal-content fd-modal-card"},iR={class:"card"},lR={class:"card-content"},uR={class:"title is-4"},cR=["textContent"],dR={class:"content is-small"},mR=["textContent"],fR=["textContent"],pR=["textContent"],hR=["textContent"],_R=["textContent"],gR=["textContent"],yR=["textContent"],vR=["textContent"],bR={class:"card-footer"},zR=["textContent"],CR=["textContent"],wR=["textContent"];function kR(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",oR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",aR,[u("div",iR,[u("div",lR,[u("p",uR,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.artist.name)},null,8,cR)]),u("div",dR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,mR),u("span",{class:"title is-6",textContent:g(n.artist.album_count)},null,8,fR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,pR),u("span",{class:"title is-6",textContent:g(n.artist.track_count)},null,8,hR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,_R),u("span",{class:"title is-6",textContent:g(e.$t("data.kind."+n.artist.data_kind))},null,8,gR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,yR),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.artist.time_added))},null,8,vR)])])]),u("footer",bR,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add"))},null,8,zR)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add-next"))},null,8,CR)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.play"))},null,8,wR)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const fu=te(sR,[["render",kR]]),mi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new ge(t[1].data)}},xR={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:xs,ListAlbums:cr,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){mi.load(e).then(r=>{n(s=>mi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;mi.load(e).then(s=>{mi.set(r,s),n()})},data(){return{artist:{},albums_list:new ge,groupby_options:[{id:1,name:this.$t("page.artist.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.artist.sort-by.release-date"),options:kl("date_released",{direction:"asc"})}],show_artist_details_modal:!1}},computed:{albums(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.albums_list.group(e.options),this.albums_list},selected_groupby_option_id:{get(){return this.$store.state.artist_albums_sort},set(e){this.$store.commit(e_,e)}}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){M.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!0)}}},ER={class:"fd-page"},SR={class:"columns"},$R={class:"column"},AR=["textContent"],TR=["textContent"],OR={class:"buttons is-centered"},DR=["textContent"],PR={class:"heading has-text-centered-mobile"},IR=["textContent"],FR=u("span",null," | ",-1),RR=["textContent"];function LR(e,t,n,r,s,o){const a=E("control-dropdown"),i=E("mdicon"),l=E("list-albums"),c=E("modal-dialog-artist"),m=E("content-with-heading");return k(),$("div",ER,[y(m,null,{options:x(()=>[u("div",SR,[u("div",$R,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,AR),y(a,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,TR)]),"heading-right":x(()=>[u("div",OR,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=d=>s.show_artist_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...d)=>o.play&&o.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,DR)])])]),content:x(()=>[u("p",PR,[u("span",{textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,IR),FR,u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...d)=>o.open_tracks&&o.open_tracks(...d)),textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,RR)]),y(l,{albums:o.albums,hide_group_title:!0},null,8,["albums"]),y(c,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[4]||(t[4]=d=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const NR=te(xR,[["render",LR]]),MR={name:"ListItemAlbumSpotify",props:["album"]},VR={class:"media is-align-items-center"},HR={key:0,class:"media-left is-clickable"},BR={class:"media-content is-clickable is-clipped"},UR=["textContent"],jR={class:"subtitle is-7 has-text-grey"},qR=["textContent"],WR=["textContent"],KR={class:"media-right"};function GR(e,t,n,r,s,o){return k(),$("div",VR,[e.$slots.artwork?(k(),$("div",HR,[ot(e.$slots,"artwork")])):H("",!0),u("div",BR,[u("h1",{class:"title is-6",textContent:g(n.album.name)},null,8,UR),u("h2",jR,[u("b",{textContent:g(n.album.artists[0].name)},null,8,qR)]),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-normal",textContent:g([n.album.album_type,e.$filters.date(n.album.release_date)].join(", "))},null,8,WR)]),u("div",KR,[ot(e.$slots,"actions")])])}const pu=te(MR,[["render",GR]]),ZR={name:"ModalDialogArtistSpotify",props:["show","artist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.artist.id}})}}},YR={key:0,class:"modal is-active"},JR={class:"modal-content fd-modal-card"},XR={class:"card"},QR={class:"card-content"},eL={class:"title is-4"},tL=["textContent"],nL={class:"content is-small"},rL=["textContent"],sL=["textContent"],oL=["textContent"],aL=["textContent"],iL={class:"card-footer"},lL=["textContent"],uL=["textContent"],cL=["textContent"];function dL(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",YR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",JR,[u("div",XR,[u("div",QR,[u("p",eL,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.artist.name)},null,8,tL)]),u("div",nL,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,rL),u("span",{class:"title is-6",textContent:g([n.artist.popularity,n.artist.followers.total].join(" / "))},null,8,sL)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,oL),u("span",{class:"title is-6",textContent:g(n.artist.genres.join(", "))},null,8,aL)])])]),u("footer",iL,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add"))},null,8,lL)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add-next"))},null,8,uL)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.play"))},null,8,cL)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const B1=te(ZR,[["render",dL]]);function mL(e){return e.scrollHeight}function fL(e){return e.scrollWidth}function pL(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function hL(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const _L=u("div",{class:"loading"},"Loading...",-1),gL=u("div",{class:"no-more"},"No more.",-1),yL=u("div",{class:"no-results"},"No results.",-1),vL=u("div",{class:"error"},"Error.",-1),Am=zr({__name:"VueEternalLoading",props:{load:{required:!0,type:Function},isInitial:{required:!1,type:Boolean,default:!0},position:{required:!1,type:String,default:"default"},container:{required:!1,type:Object,default:null},margin:{required:!1,type:String,default:void 0}},emits:["update:isInitial"],setup(e,{emit:t}){const n=e,r=Xt();let s=Xt("loading"),o=Xt(n.isInitial),a=0;function i(){Ea(()=>{var z,v;n.position==="top"?pL((z=n.container)!=null?z:document.documentElement,a):n.position==="left"&&hL((v=n.container)!=null?v:document.documentElement,a)})}function l(z,v){return z===0?o.value?(m(),"no-results"):(c(),"no-more"):z!==void 0&&v!==void 0&&z{var v,S;z.isIntersecting&&(n.position==="top"?a=mL((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(a=fL((S=n.container)!=null?S:document.documentElement)),_(),n.load({loaded:l,noMore:c,noResults:m,error:d},{isFirstLoad:o.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let C;return typeof IntersectionObserver<"u"&&R_(()=>{C&&_(),C=w(),b()},{flush:"post"}),en(()=>n.isInitial,z=>{z&&f()}),en(o,z=>{z||t("update:isInitial",!1)}),(z,v)=>(k(),$("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[vn(s)==="loading"?ot(z.$slots,"loading",Fo(Vs({key:0},{isFirstLoad:vn(o)})),()=>[_L]):vn(s)==="no-more"?ot(z.$slots,"no-more",Fo(Vs({key:1},{retry:p})),()=>[gL]):vn(s)==="no-results"?ot(z.$slots,"no-results",Fo(Vs({key:2},{retry:p})),()=>[yL]):vn(s)==="error"?ot(z.$slots,"error",Fo(Vs({key:3},{retry:p})),()=>[vL]):H("",!0)],512))}}),od=50,fi={load:function(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{limit:od,offset:0,include_groups:"album,single",market:Ue.state.spotify.webapi_country})])},set(e,t){e.artist=t[0],e.albums=[],e.total=0,e.offset=0,e.append_albums(t[1])}},bL={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Na,ModalDialogArtistSpotify:B1,VueEternalLoading:Am},beforeRouteEnter(e,t,n){fi.load(e).then(r=>{n(s=>fi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;fi.load(e).then(s=>{fi.set(r,s),n()})},data(){return{artist:{},albums:[],total:0,offset:0,show_details_modal:!1,selected_album:{},show_artist_details_modal:!1}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{load_next({loaded:e}){const t=new Yn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{limit:od,offset:this.offset,include_groups:"album,single"}).then(n=>{this.append_albums(n),e(n.items.length,od)})},append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},play(){this.show_details_modal=!1,M.player_play_uri(this.artist.uri,!0)},open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},zL={class:"fd-page"},CL=["textContent"],wL={class:"buttons is-centered"},kL=["textContent"],xL=["textContent"],EL=["onClick"];function SL(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-item-album-spotify"),c=E("VueEternalLoading"),m=E("modal-dialog-album-spotify"),d=E("modal-dialog-artist-spotify"),f=E("content-with-heading");return k(),$("div",zL,[y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,CL)]),"heading-right":x(()=>[u("div",wL,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=p=>s.show_artist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...p)=>o.play&&o.play(...p))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.artist.shuffle"))},null,8,kL)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:s.total}))},null,8,xL),(k(!0),$(Ce,null,lt(s.albums,p=>(k(),me(l,{key:p.id,album:p,onClick:h=>o.open_album(p)},Ta({actions:x(()=>[u("a",{onClick:rt(h=>o.open_dialog(p),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,EL)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(p),artist:p.artist,album:p.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),s.offset[nt(" . ")]),_:1},8,["load"])):H("",!0),y(m,{show:s.show_details_modal,album:s.selected_album,onClose:t[2]||(t[2]=p=>s.show_details_modal=!1)},null,8,["show","album"]),y(d,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[3]||(t[3]=p=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const $L=te(bL,[["render",SL]]),pi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},AL={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListTracks:Cn,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){pi.load(e).then(r=>{n(s=>pi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;pi.load(e).then(s=>{pi.set(r,s),n()})},data(){return{artist:{},groupby_options:[{id:1,name:this.$t("page.artist.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.artist.sort-by.rating"),options:Em("rating",{direction:"desc"})}],show_artist_details_modal:!1,tracks_list:new ge}},computed:{selected_groupby_option_id:{get(){return this.$store.state.artist_tracks_sort},set(e){this.$store.commit(t_,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list},track_uris(){return this.tracks_list.items.map(e=>e.uri).join(",")}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){M.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(","),!0)}}},TL={class:"fd-page"},OL={class:"columns"},DL={class:"column"},PL=["textContent"],IL=["textContent"],FL={class:"buttons is-centered"},RL=["textContent"],LL={class:"heading has-text-centered-mobile"},NL=["textContent"],ML=u("span",null," | ",-1),VL=["textContent"];function HL(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-artist"),d=E("content-with-heading");return k(),$("div",TL,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",OL,[u("div",DL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,PL),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,IL)]),"heading-right":x(()=>[u("div",FL,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_artist_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,RL)])])]),content:x(()=>[u("p",LL,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_artist&&o.open_artist(...f)),textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,NL),ML,u("span",{textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,VL)]),y(c,{tracks:o.tracks,uris:o.track_uris},null,8,["tracks","uris"]),y(m,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[4]||(t[4]=f=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const BL=te(AL,[["render",HL]]),UL={name:"ListArtists",components:{ModalDialogArtist:fu},props:["artists","hide_group_title"],data(){return{show_details_modal:!1,selected_artist:{}}},methods:{open_artist(e){this.selected_artist=e;const t=e.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:t,params:{id:e.id}})},open_dialog(e){this.selected_artist=e,this.show_details_modal=!0}}},jL={key:0,class:"mt-6 mb-5 py-2"},qL={class:"media-content is-clipped"},WL=["id","textContent"],KL=["onClick"],GL={class:"media-content is-clickable is-clipped"},ZL=["textContent"],YL={class:"media-right"},JL=["onClick"];function XL(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-artist");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.artists,l=>(k(),$(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",jL,[u("div",qL,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,WL)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_artist(l.item)},[u("div",GL,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,ZL)]),u("div",YL,[u("a",{onClick:rt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,JL)])],8,KL)):H("",!0)],64))),128)),(k(),me(Jr,{to:"#app"},[y(i,{artist:s.selected_artist,show:s.show_details_modal,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["artist","show"])]))],64)}const Tm=te(UL,[["render",XL]]),hi={load(e){return M.library_artists("music")},set(e,t){e.artists_list=new ge(t.data)}},QL={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListArtists:Tm,TabsMusic:dr},beforeRouteEnter(e,t,n){hi.load(e).then(r=>{n(s=>hi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.artists_list.isEmpty()){n();return}const r=this;hi.load(e).then(s=>{hi.set(r,s),n()})},data(){return{artists_list:new ge,groupby_options:[{id:1,name:this.$t("page.artists.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.artists.sort-by.recently-added"),options:kl("time_added",{direction:"desc"})}]}},computed:{artists(){if(!this.artists_list)return[];const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.artists_list.group(e.options,[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"]),this.artists_list},selected_groupby_option_id:{get(){return this.$store.state.artists_sort},set(e){this.$store.commit(Qh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Ol,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_d,e)}}}},eN={class:"fd-page-with-tabs"},tN={class:"columns"},nN={class:"column"},rN=["textContent"],sN={class:"field"},oN={class:"control"},aN=["textContent"],iN=["textContent"],lN={key:0,class:"field"},uN={class:"control"},cN=["textContent"],dN=["textContent"],mN={class:"column"},fN=["textContent"],pN=["textContent"],hN=["textContent"];function _N(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("control-dropdown"),c=E("list-artists"),m=E("content-with-heading");return k(),$("div",eN,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"]),u("div",tN,[u("div",nN,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,rN),u("div",sN,[u("div",oN,[bt(u("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>o.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ar,o.hide_singles]]),u("label",{for:"switchHideSingles",textContent:g(e.$t("page.artists.hide-singles"))},null,8,aN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,iN)]),o.spotify_enabled?(k(),$("div",lN,[u("div",uN,[bt(u("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>o.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ar,o.hide_spotify]]),u("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artists.hide-spotify"))},null,8,cN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,dN)])):H("",!0)]),u("div",mN,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort-by.title"))},null,8,fN),y(l,{value:o.selected_groupby_option_id,"onUpdate:value":t[2]||(t[2]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.artists.title"))},null,8,pN),u("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:o.artists.count}))},null,8,hN)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{artists:o.artists},null,8,["artists"])]),_:1})])}const gN=te(QL,[["render",_N]]),_i={load(e){return Promise.all([M.library_album(e.params.id),M.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data)}},yN={name:"PageAudiobooksAlbum",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){_i.load(e).then(r=>{n(s=>_i.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;_i.load(e).then(s=>{_i.set(r,s),n()})},data(){return{album:{},tracks:new ge,show_album_details_modal:!1}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){M.player_play_uri(this.album.uri,!1)}}},vN={class:"fd-page"},bN=["textContent"],zN={class:"subtitle is-6 has-text-link has-text-weight-normal"},CN=["textContent"],wN={class:"buttons fd-is-centered-mobile mt-5"},kN=["textContent"],xN=["textContent"];function EN(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("content-with-hero");return k(),$("div",vN,[y(m,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,bN),u("h2",zN,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>o.open_artist&&o.open_artist(...d)),textContent:g(s.album.artist)},null,8,CN)]),u("div",wN,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.album.play"))},null,8,kN)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>s.show_album_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>s.show_album_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.audiobooks.album.track-count",{count:s.album.track_count}))},null,8,xN),y(l,{tracks:s.tracks,uris:s.album.uri},null,8,["tracks","uris"]),y(c,{show:s.show_album_details_modal,album:s.album,media_kind:"audiobook",onClose:t[4]||(t[4]=d=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const SN=te(yN,[["render",EN]]),$N={name:"TabsAudiobooks"},AN={class:"section fd-tabs-section"},TN={class:"container"},ON={class:"columns is-centered"},DN={class:"column is-four-fifths"},PN={class:"tabs is-centered is-small"},IN=["onClick","onKeypress"],FN=["textContent"],RN=["onClick","onKeypress"],LN=["textContent"],NN=["onClick","onKeypress"],MN=["textContent"];function VN(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",AN,[u("div",TN,[u("div",ON,[u("div",DN,[u("div",PN,[u("ul",null,[y(i,{to:{name:"audiobooks-artists"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"account-music",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.authors"))},null,8,FN)],40,IN)],2)]),_:1}),y(i,{to:{name:"audiobooks-albums"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"album",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,LN)],40,RN)],2)]),_:1}),y(i,{to:{name:"audiobooks-genres"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"speaker",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.genres"))},null,8,MN)],40,NN)],2)]),_:1})])])])])])])}const Om=te($N,[["render",VN]]),gi={load(e){return M.library_albums("audiobook")},set(e,t){e.albums=new ge(t.data),e.albums.group(Rn("name_sort",!0))}},HN={name:"PageAudiobooksAlbums",components:{TabsAudiobooks:Om,ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:cr},beforeRouteEnter(e,t,n){gi.load(e).then(r=>{n(s=>gi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums.isEmpty()){n();return}const r=this;gi.load(e).then(s=>{gi.set(r,s),n()})},data(){return{albums:new ge}}},BN={class:"fd-page-with-tabs"},UN=["textContent"],jN=["textContent"];function qN(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-albums"),c=E("content-with-heading");return k(),$("div",BN,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.albums.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.albums.title"))},null,8,UN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:s.albums.count}))},null,8,jN)]),content:x(()=>[y(l,{albums:s.albums},null,8,["albums"])]),_:1})])}const WN=te(HN,[["render",qN]]),yi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new ge(t[1].data)}},KN={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:cr,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){yi.load(e).then(r=>{n(s=>yi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums.isEmpty()){n();return}const r=this;yi.load(e).then(s=>{yi.set(r,s),n()})},data(){return{artist:{},albums:new ge,show_artist_details_modal:!1}},methods:{play(){M.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!1)}}},GN={class:"fd-page"},ZN=["textContent"],YN={class:"buttons is-centered"},JN=["textContent"],XN=["textContent"];function QN(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-albums"),l=E("modal-dialog-artist"),c=E("content-with-heading");return k(),$("div",GN,[y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,ZN)]),"heading-right":x(()=>[u("div",YN,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_artist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.artist.play"))},null,8,JN)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.audiobooks.artist.album-count",{count:s.artist.album_count}))},null,8,XN),y(i,{albums:s.albums},null,8,["albums"]),y(l,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[2]||(t[2]=m=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const eM=te(KN,[["render",QN]]),vi={load(e){return M.library_artists("audiobook")},set(e,t){e.artists_list=new ge(t.data)}},tM={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,TabsAudiobooks:Om,IndexButtonList:Jn,ListArtists:Tm},beforeRouteEnter(e,t,n){vi.load(e).then(r=>{n(s=>vi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.artists_list.isEmpty()){n();return}const r=this;vi.load(e).then(s=>{vi.set(r,s),n()})},data(){return{artists_list:new ge}},computed:{artists(){return this.artists_list?(this.artists_list.group(Rn("name_sort",!0)),this.artists_list):[]}}},nM={class:"fd-page-with-tabs"},rM=["textContent"],sM=["textContent"];function oM(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-artists"),c=E("content-with-heading");return k(),$("div",nM,[y(a),y(c,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.artists.title"))},null,8,rM),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,sM)]),"heading-right":x(()=>[]),content:x(()=>[y(l,{artists:o.artists},null,8,["artists"])]),_:1})])}const aM=te(tM,[["render",oM]]),iM={name:"ModalDialogGenre",props:["genre","media_kind","show"],emits:["close"],computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`}},methods:{play(){this.$emit("close"),M.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),M.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),M.queue_expression_add_next(this.expression)},open_genre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})}}},lM={key:0,class:"modal is-active"},uM={class:"modal-content fd-modal-card"},cM={class:"card"},dM={class:"card-content"},mM={class:"title is-4"},fM=["textContent"],pM={class:"content is-small"},hM=["textContent"],_M=["textContent"],gM=["textContent"],yM=["textContent"],vM=["textContent"],bM=["textContent"],zM={class:"card-footer"},CM=["textContent"],wM=["textContent"],kM=["textContent"];function xM(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",lM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",uM,[u("div",cM,[u("div",dM,[u("p",mM,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.genre.name)},null,8,fM)]),u("div",pM,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,hM),u("span",{class:"title is-6",textContent:g(n.genre.album_count)},null,8,_M)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,gM),u("span",{class:"title is-6",textContent:g(n.genre.track_count)},null,8,yM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,vM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.genre.length_ms))},null,8,bM)])])]),u("footer",zM,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add"))},null,8,CM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add-next"))},null,8,wM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.play"))},null,8,kM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Dm=te(iM,[["render",xM]]),EM={name:"ListGenres",components:{ModalDialogGenre:Dm},props:["genres","hide_group_title","media_kind"],data(){return{show_details_modal:!1,selected_genre:{}}},methods:{open_genre(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_genre=e,this.show_details_modal=!0}}},SM={key:0,class:"mt-6 mb-5 py-2"},$M={class:"media-content is-clipped"},AM=["id","textContent"],TM=["onClick"],OM={class:"media-content is-clickable is-clipped"},DM=["textContent"],PM={class:"media-right"},IM=["onClick"];function FM(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-genre");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.genres,l=>(k(),$(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",SM,[u("div",$M,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,AM)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_genre(l.item)},[u("div",OM,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,DM)]),u("div",PM,[u("a",{onClick:rt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,IM)])],8,TM)):H("",!0)],64))),128)),(k(),me(Jr,{to:"#app"},[y(i,{show:s.show_details_modal,genre:s.selected_genre,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","genre","media_kind"])]))],64)}const U1=te(EM,[["render",FM]]),bi={load(e){return M.library_genres("audiobook")},set(e,t){e.genres=t.data,e.genres=new ge(t.data),e.genres.group(Rn("name_sort"))}},RM={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:U1,TabsAudiobooks:Om},beforeRouteEnter(e,t,n){bi.load(e).then(r=>{n(s=>bi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;bi.load(e).then(s=>{bi.set(r,s),n()})},data(){return{genres:new ge}}},LM={class:"fd-page-with-tabs"},NM=["textContent"],MM=["textContent"];function VM(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-genres"),c=E("content-with-heading");return k(),$("div",LM,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.genres.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,NM),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,MM)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"audiobook"},null,8,["genres"])]),_:1})])}const HM=te(RM,[["render",VM]]),BM={name:"ModalDialogComposer",props:["show","composer"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_expression('composer is "'+this.composer.name+'" and media_kind is music',!1)},queue_add(){this.$emit("close"),M.queue_expression_add('composer is "'+this.composer.name+'" and media_kind is music')},queue_add_next(){this.$emit("close"),M.queue_expression_add_next('composer is "'+this.composer.name+'" and media_kind is music')},open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},open_tracks(){this.show_details_modal=!1,this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})}}},UM={key:0,class:"modal is-active"},jM={class:"modal-content fd-modal-card"},qM={class:"card"},WM={class:"card-content"},KM={class:"title is-4"},GM=["textContent"],ZM=["textContent"],YM=["textContent"],JM=["textContent"],XM=["textContent"],QM=["textContent"],e7=["textContent"],t7={class:"card-footer"},n7=["textContent"],r7=["textContent"],s7=["textContent"];function o7(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",UM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",jM,[u("div",qM,[u("div",WM,[u("p",KM,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_albums&&o.open_albums(...i)),textContent:g(n.composer.name)},null,8,GM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,ZM),u("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...i)=>o.open_albums&&o.open_albums(...i)),textContent:g(n.composer.album_count)},null,8,YM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,JM),u("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...i)=>o.open_tracks&&o.open_tracks(...i)),textContent:g(n.composer.track_count)},null,8,XM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,QM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.composer.length_ms))},null,8,e7)])]),u("footer",t7,[u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add"))},null,8,n7)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add-next"))},null,8,r7)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.play"))},null,8,s7)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Pm=te(BM,[["render",o7]]),zi={load(e){return Promise.all([M.library_composer(e.params.name),M.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums_list=new ge(t[1].data.albums)}},a7={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:cr,ModalDialogComposer:Pm},beforeRouteEnter(e,t,n){zi.load(e).then(r=>{n(s=>zi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;zi.load(e).then(s=>{zi.set(r,s),n()})},data(){return{composer:{},albums_list:new ge,show_composer_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){M.player_play_expression('composer is "'+this.composer.name+'" and media_kind is music',!0)}}},i7={class:"fd-page"},l7=["textContent"],u7={class:"buttons is-centered"},c7=["textContent"],d7={class:"heading has-text-centered-mobile"},m7=["textContent"],f7=u("span",null," | ",-1),p7=["textContent"];function h7(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-albums"),l=E("modal-dialog-composer"),c=E("content-with-heading");return k(),$("div",i7,[y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.composer.name)},null,8,l7)]),"heading-right":x(()=>[u("div",u7,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_composer_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,c7)])])]),content:x(()=>[u("p",d7,[u("span",{textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,m7),f7,u("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>o.open_tracks&&o.open_tracks(...m)),textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,p7)]),y(i,{albums:s.albums_list,hide_group_title:!0},null,8,["albums"]),y(l,{show:s.show_composer_details_modal,composer:s.composer,onClose:t[3]||(t[3]=m=>s.show_composer_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const _7=te(a7,[["render",h7]]),Ci={load(e){return Promise.all([M.library_composer(e.params.name),M.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},g7={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListTracks:Cn,ModalDialogComposer:Pm},beforeRouteEnter(e,t,n){Ci.load(e).then(r=>{n(s=>Ci.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ci.load(e).then(s=>{Ci.set(r,s),n()})},data(){return{groupby_options:[{id:1,name:this.$t("page.composer.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.composer.sort-by.rating"),options:Em("rating",{direction:"desc"})}],composer:{},show_composer_details_modal:!1,tracks_list:new ge}},computed:{expression(){return'composer is "'+this.composer.name+'" and media_kind is music'},selected_groupby_option_id:{get(){return this.$store.state.composer_tracks_sort},set(e){this.$store.commit(Jh,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){M.player_play_expression(this.expression,!0)}}},y7={class:"fd-page"},v7={class:"columns"},b7={class:"column"},z7=["textContent"],C7=["textContent"],w7={class:"buttons is-centered"},k7=["textContent"],x7={class:"heading has-text-centered-mobile"},E7=["textContent"],S7=u("span",null," | ",-1),$7=["textContent"];function A7(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-composer"),d=E("content-with-heading");return k(),$("div",y7,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",v7,[u("div",b7,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,z7),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.composer.name)},null,8,C7)]),"heading-right":x(()=>[u("div",w7,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_composer_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,k7)])])]),content:x(()=>[u("p",x7,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_albums&&o.open_albums(...f)),textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,E7),S7,u("span",{textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,$7)]),y(c,{tracks:o.tracks,expression:o.expression},null,8,["tracks","expression"]),y(m,{show:s.show_composer_details_modal,composer:s.composer,onClose:t[4]||(t[4]=f=>s.show_composer_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const T7=te(g7,[["render",A7]]),O7={name:"ListComposers",components:{ModalDialogComposer:Pm},props:["composers","media_kind","hide_group_title"],data(){return{show_details_modal:!1,selected_composer:{}}},methods:{open_composer(e){this.selected_composer=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_composer=e,this.show_details_modal=!0}}},D7={key:0,class:"mt-6 mb-5 py-2"},P7={class:"media-content is-clipped"},I7=["id","textContent"],F7=["onClick"],R7={class:"media-content is-clickable is-clipped"},L7=["textContent"],N7={class:"media-right"},M7=["onClick"];function V7(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-composer");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.composers,l=>(k(),$(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",D7,[u("div",P7,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,I7)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_composer(l.item)},[u("div",R7,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,L7)]),u("div",N7,[u("a",{onClick:rt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,M7)])],8,F7)):H("",!0)],64))),128)),(k(),me(Jr,{to:"#app"},[y(i,{show:s.show_details_modal,composer:s.selected_composer,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","composer","media_kind"])]))],64)}const j1=te(O7,[["render",V7]]),wi={load(e){return M.library_composers("music")},set(e,t){e.composers=new ge(t.data),e.composers.group(Rn("name_sort"))}},H7={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListComposers:j1,TabsMusic:dr},beforeRouteEnter(e,t,n){wi.load(e).then(r=>{n(s=>wi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.composers.isEmpty()){n();return}const r=this;wi.load(e).then(s=>{wi.set(r,s),n()})},data(){return{composers:new ge}}},B7={class:"fd-page-with-tabs"},U7=["textContent"],j7=["textContent"];function q7(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("list-composers"),c=E("content-with-heading");return k(),$("div",B7,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.composers.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.composers.title"))},null,8,U7),u("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:s.composers.total}))},null,8,j7)]),content:x(()=>[y(l,{composers:s.composers},null,8,["composers"])]),_:1})])}const W7=te(H7,[["render",q7]]),K7={name:"ModalDialogDirectory",props:["show","directory"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_expression('path starts with "'+this.directory+'" order by path asc',!1)},queue_add(){this.$emit("close"),M.queue_expression_add('path starts with "'+this.directory+'" order by path asc')},queue_add_next(){this.$emit("close"),M.queue_expression_add_next('path starts with "'+this.directory+'" order by path asc')}}},G7={key:0,class:"modal is-active"},Z7={class:"modal-content fd-modal-card"},Y7={class:"card"},J7={class:"card-content"},X7=["textContent"],Q7={class:"card-footer"},e9=["textContent"],t9=["textContent"],n9=["textContent"];function r9(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",G7,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",Z7,[u("div",Y7,[u("div",J7,[u("p",{class:"title is-4",textContent:g(n.directory)},null,8,X7)]),u("footer",Q7,[u("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add"))},null,8,e9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add-next"))},null,8,t9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.play"))},null,8,n9)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const q1=te(K7,[["render",r9]]),s9={name:"ListDirectories",components:{ModalDialogDirectory:q1},props:["directories"],data(){return{show_details_modal:!1,selected_directory:""}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory(){this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))===""||this.$store.state.config.directories.includes(this.current_directory)?this.$router.push({name:"files"}):this.$router.push({name:"files",query:{directory:this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))}})},open_directory(e){this.$router.push({name:"files",query:{directory:e.path}})},open_dialog(e){this.selected_directory=e.path,this.show_details_modal=!0}}},o9={class:"media-left is-clickable"},a9=u("div",{class:"media-content is-clickable is-clipped"},[u("h1",{class:"title is-6"},"..")],-1),i9={class:"media-right"},l9=["onClick"],u9={class:"media-left is-clickable"},c9={class:"media-content is-clickable is-clipped"},d9=["textContent"],m9=["textContent"],f9={class:"media-right"},p9=["onClick"];function h9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-directory");return k(),$(Ce,null,[e.$route.query.directory?(k(),$("div",{key:0,class:"media is-align-items-center",onClick:t[0]||(t[0]=l=>o.open_parent_directory())},[u("figure",o9,[y(a,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),a9,u("div",i9,[ot(e.$slots,"actions")])])):H("",!0),(k(!0),$(Ce,null,lt(n.directories,l=>(k(),$("div",{key:l.path,class:"media is-align-items-center",onClick:c=>o.open_directory(l)},[u("figure",u9,[y(a,{class:"icon",name:"folder",size:"16"})]),u("div",c9,[u("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,d9),u("h2",{class:"subtitle is-7 has-text-grey-light",textContent:g(l.path)},null,8,m9)]),u("div",f9,[u("a",{onClick:rt(c=>o.open_dialog(l),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,p9)])],8,l9))),128)),(k(),me(Jr,{to:"#app"},[y(i,{show:s.show_details_modal,directory:s.selected_directory,onClose:t[1]||(t[1]=l=>s.show_details_modal=!1)},null,8,["show","directory"])]))],64)}const _9=te(s9,[["render",h9]]),g9={name:"ModalDialogPlaylist",props:["show","playlist","uris"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.uris?this.uris:this.playlist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.uris?this.uris:this.playlist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.uris?this.uris:this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.playlist.id}})}}},y9={key:0,class:"modal is-active"},v9={class:"modal-content fd-modal-card"},b9={class:"card"},z9={class:"card-content"},C9={class:"title is-4"},w9=["textContent"],k9={class:"content is-small"},x9=["textContent"],E9=["textContent"],S9=["textContent"],$9=["textContent"],A9={key:0},T9=["textContent"],O9=["textContent"],D9={key:0,class:"card-footer"},P9=["textContent"],I9=["textContent"],F9=["textContent"];function R9(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",y9,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",v9,[u("div",b9,[u("div",z9,[u("p",C9,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_playlist&&o.open_playlist(...i)),textContent:g(n.playlist.name)},null,8,w9)]),u("div",k9,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,x9),u("span",{class:"title is-6",textContent:g(n.playlist.path)},null,8,E9)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,S9),u("span",{class:"title is-6",textContent:g(e.$t("playlist.type."+n.playlist.type))},null,8,$9)]),n.playlist.folder?H("",!0):(k(),$("p",A9,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.track-count"))},null,8,T9),u("span",{class:"title is-6",textContent:g(n.playlist.item_count)},null,8,O9)]))])]),n.playlist.folder?H("",!0):(k(),$("footer",D9,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add"))},null,8,P9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add-next"))},null,8,I9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.play"))},null,8,F9)])]))])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const W1=te(g9,[["render",R9]]),L9={name:"ListPlaylists",components:{ModalDialogPlaylist:W1},props:["playlists"],data(){return{show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist(e){e.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:e.id}}):this.$router.push({name:"playlist",params:{id:e.id}})},open_dialog(e){this.selected_playlist=e,this.show_details_modal=!0},icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"}}},N9=["onClick"],M9={class:"media-left is-clickable"},V9={class:"media-content is-clickable is-clipped"},H9=["textContent"],B9={class:"media-right"},U9=["onClick"];function j9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-playlist");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.playlists,l=>(k(),$("div",{key:l.itemId,class:"media is-align-items-center",onClick:c=>o.open_playlist(l.item)},[u("figure",M9,[y(a,{class:"icon",name:o.icon_name(l.item),size:"16"},null,8,["name"])]),u("div",V9,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,H9)]),u("div",B9,[u("a",{onClick:rt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,U9)])],8,N9))),128)),(k(),me(Jr,{to:"#app"},[y(i,{show:s.show_details_modal,playlist:s.selected_playlist,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","playlist"])]))],64)}const Im=te(L9,[["render",j9]]),ki={load(e){return e.query.directory?M.library_files(e.query.directory):Promise.resolve()},set(e,t){t?(e.dirs=t.data.directories,e.playlists=new ge(t.data.playlists),e.tracks=new ge(t.data.tracks)):(e.dirs=e.$store.state.config.directories.map(n=>({path:n})),e.playlists=new ge,e.tracks=new ge)}},q9={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:_9,ListPlaylists:Im,ListTracks:Cn,ModalDialogDirectory:q1},beforeRouteEnter(e,t,n){ki.load(e).then(r=>{n(s=>ki.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ki.load(e).then(s=>{ki.set(r,s),n()})},data(){return{dirs:[],playlists:new ge,tracks:new ge,show_details_modal:!1}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"},play_expression(){return'path starts with "'+this.current_directory+'" order by path asc'}},methods:{play(){M.player_play_expression(this.play_expression,!1)}}},W9={class:"fd-page"},K9=["textContent"],G9=["textContent"],Z9={class:"buttons is-centered"},Y9=["textContent"];function J9(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-directories"),l=E("list-playlists"),c=E("list-tracks"),m=E("modal-dialog-directory"),d=E("content-with-heading");return k(),$("div",W9,[y(d,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.files.title"))},null,8,K9),u("p",{class:"title is-7 has-text-grey",textContent:g(o.current_directory)},null,8,G9)]),"heading-right":x(()=>[u("div",Z9,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.files.play"))},null,8,Y9)])])]),content:x(()=>[y(i,{directories:s.dirs},null,8,["directories"]),y(l,{playlists:s.playlists},null,8,["playlists"]),y(c,{tracks:s.tracks,expression:o.play_expression,show_icon:!0},null,8,["tracks","expression"]),y(m,{show:s.show_details_modal,directory:o.current_directory,onClose:t[2]||(t[2]=f=>s.show_details_modal=!1)},null,8,["show","directory"])]),_:1})])}const X9=te(q9,[["render",J9]]),xi={load(e){return Promise.all([M.library_genre(e.params.name,e.query.media_kind),M.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.albums_list=new ge(t[1].data.albums),e.albums_list.group(Rn("name_sort",!0))}},Q9={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:cr,ModalDialogGenre:Dm},beforeRouteEnter(e,t,n){xi.load(e).then(r=>{n(s=>xi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums_list.isEmpty()){n();return}const r=this;xi.load(e).then(s=>{xi.set(r,s),n()})},data(){return{genre:{},albums_list:new ge,media_kind:this.$route.query.media_kind,show_genre_details_modal:!1}},methods:{open_tracks(){this.show_details_modal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){M.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},eV={class:"fd-page"},tV=["textContent"],nV={class:"buttons is-centered"},rV=["textContent"],sV={class:"heading has-text-centered-mobile"},oV=["textContent"],aV=u("span",null," | ",-1),iV=["textContent"];function lV(e,t,n,r,s,o){const a=E("index-button-list"),i=E("mdicon"),l=E("list-albums"),c=E("modal-dialog-genre"),m=E("content-with-heading");return k(),$("div",eV,[y(m,null,{options:x(()=>[y(a,{index:s.albums_list.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.genre.name)},null,8,tV)]),"heading-right":x(()=>[u("div",nV,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>s.show_genre_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,rV)])])]),content:x(()=>[u("p",sV,[u("span",{textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,oV),aV,u("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>o.open_tracks&&o.open_tracks(...d)),textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,iV)]),y(l,{albums:s.albums_list},null,8,["albums"]),y(c,{genre:s.genre,media_kind:s.media_kind,show:s.show_genre_details_modal,onClose:t[3]||(t[3]=d=>s.show_genre_details_modal=!1)},null,8,["genre","media_kind","show"])]),_:1})])}const uV=te(Q9,[["render",lV]]),Ei={load(e){return Promise.all([M.library_genre(e.params.name,e.query.media_kind),M.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},cV={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListTracks:Cn,ModalDialogGenre:Dm},beforeRouteEnter(e,t,n){Ei.load(e).then(r=>{n(s=>Ei.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.tracks_list.isEmpty()){n();return}const r=this;Ei.load(e).then(s=>{Ei.set(r,s),n()})},data(){return{genre:{},groupby_options:[{id:1,name:this.$t("page.genre.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.genre.sort-by.rating"),options:Em("rating",{direction:"desc"})}],media_kind:this.$route.query.media_kind,show_genre_details_modal:!1,tracks_list:new ge}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_groupby_option_id:{get(){return this.$store.state.genre_tracks_sort},set(e){this.$store.commit(Xh,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_genre(){this.show_details_modal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){M.player_play_expression(this.expression,!0)}}},dV={class:"fd-page"},mV={class:"columns"},fV={class:"column"},pV=["textContent"],hV=["textContent"],_V={class:"buttons is-centered"},gV=["textContent"],yV={class:"heading has-text-centered-mobile"},vV=["textContent"],bV=u("span",null," | ",-1),zV=["textContent"];function CV(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-genre"),d=E("content-with-heading");return k(),$("div",dV,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",mV,[u("div",fV,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort-by.title"))},null,8,pV),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.genre.name)},null,8,hV)]),"heading-right":x(()=>[u("div",_V,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_genre_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,gV)])])]),content:x(()=>[u("p",yV,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_genre&&o.open_genre(...f)),textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,vV),bV,u("span",{textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,zV)]),y(c,{tracks:o.tracks,expression:o.expression},null,8,["tracks","expression"]),y(m,{show:s.show_genre_details_modal,genre:s.genre,media_kind:s.media_kind,onClose:t[4]||(t[4]=f=>s.show_genre_details_modal=!1)},null,8,["show","genre","media_kind"])]),_:1})])}const wV=te(cV,[["render",CV]]),Si={load(e){return M.library_genres("music")},set(e,t){e.genres=t.data,e.genres=new ge(t.data),e.genres.group(Rn("name_sort"))}},kV={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:U1,TabsMusic:dr},beforeRouteEnter(e,t,n){Si.load(e).then(r=>{n(s=>Si.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Si.load(e).then(s=>{Si.set(r,s),n()})},data(){return{genres:new ge}}},xV={class:"fd-page-with-tabs"},EV=["textContent"],SV=["textContent"];function $V(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("list-genres"),c=E("content-with-heading");return k(),$("div",xV,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.genres.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,EV),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,SV)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"music"},null,8,["genres"])]),_:1})])}const AV=te(kV,[["render",$V]]),$i={load(e){return Promise.all([M.search({type:"album",expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3}),M.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3})])},set(e,t){e.recently_added=new ge(t[0].data.albums),e.recently_played=new ge(t[1].data.tracks)}},TV={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:cr,ListTracks:Cn,TabsMusic:dr},beforeRouteEnter(e,t,n){$i.load(e).then(r=>{n(s=>$i.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;$i.load(e).then(s=>{$i.set(r,s),n()})},data(){return{recently_added:[],recently_played:{items:[]},selected_track:{},show_track_details_modal:!1}}},OV={class:"fd-page-with-tabs"},DV=["textContent"],PV={class:"level"},IV={class:"level-item"},FV=["textContent"],RV={class:"level"},LV={class:"level-item"};function NV(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("router-link"),c=E("content-with-heading"),m=E("list-tracks");return k(),$("div",OV,[y(a),y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,DV)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),footer:x(()=>[u("nav",PV,[u("p",IV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:x(()=>[nt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,FV)]),content:x(()=>[y(m,{tracks:s.recently_played},null,8,["tracks"])]),footer:x(()=>[u("nav",RV,[u("p",LV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:x(()=>[nt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const MV=te(TV,[["render",NV]]),VV={name:"ListItemPlaylistSpotify",props:["playlist"],methods:{open_playlist(){this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},HV={class:"media is-align-items-center"},BV=["textContent"],UV=["textContent"],jV={class:"media-right"};function qV(e,t,n,r,s,o){return k(),$("div",HV,[u("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...a)=>o.open_playlist&&o.open_playlist(...a))},[u("h1",{class:"title is-6",textContent:g(n.playlist.name)},null,8,BV),u("h2",{class:"subtitle is-7",textContent:g(n.playlist.owner.display_name)},null,8,UV)]),u("div",jV,[ot(e.$slots,"actions")])])}const Fm=te(VV,[["render",qV]]),WV={name:"ModalDialogPlaylistSpotify",props:["show","playlist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.playlist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.playlist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},KV={key:0,class:"modal is-active"},GV={class:"modal-content fd-modal-card"},ZV={class:"card"},YV={class:"card-content"},JV={class:"title is-4"},XV=["textContent"],QV={class:"content is-small"},eH=["textContent"],tH=["textContent"],nH=["textContent"],rH=["textContent"],sH=["textContent"],oH=["textContent"],aH={class:"card-footer"},iH=["textContent"],lH=["textContent"],uH=["textContent"];function cH(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",KV,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",GV,[u("div",ZV,[u("div",YV,[u("p",JV,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_playlist&&o.open_playlist(...i)),textContent:g(n.playlist.name)},null,8,XV)]),u("div",QV,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,eH),u("span",{class:"title is-6",textContent:g(n.playlist.owner.display_name)},null,8,tH)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,nH),u("span",{class:"title is-6",textContent:g(n.playlist.tracks.total)},null,8,rH)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,sH),u("span",{class:"title is-6",textContent:g(n.playlist.uri)},null,8,oH)])])]),u("footer",aH,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add"))},null,8,iH)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add-next"))},null,8,lH)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.play"))},null,8,uH)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const hu=te(WV,[["render",cH]]),Ai={load(e){if(Ue.state.spotify_new_releases.length>0&&Ue.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getNewReleases({country:Ue.state.spotify.webapi_country,limit:50}),t.getFeaturedPlaylists({country:Ue.state.spotify.webapi_country,limit:50})])},set(e,t){t&&(Ue.commit(fd,t[0].albums.items),Ue.commit(pd,t[1].playlists.items))}},dH={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ListItemPlaylistSpotify:Fm,ModalDialogAlbumSpotify:Na,ModalDialogPlaylistSpotify:hu,TabsMusic:dr},beforeRouteEnter(e,t,n){Ai.load(e).then(r=>{n(s=>Ai.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ai.load(e).then(s=>{Ai.set(r,s),n()})},data(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists(){return this.$store.state.spotify_featured_playlists.slice(0,3)},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},mH={class:"fd-page-with-tabs"},fH=["textContent"],pH=["onClick"],hH={class:"level"},_H={class:"level-item"},gH=["textContent"],yH=["onClick"],vH={class:"level"},bH={class:"level-item"};function zH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("cover-artwork"),l=E("mdicon"),c=E("list-item-album-spotify"),m=E("modal-dialog-album-spotify"),d=E("router-link"),f=E("content-with-heading"),p=E("list-item-playlist-spotify"),h=E("modal-dialog-playlist-spotify");return k(),$("div",mH,[y(a),y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,fH)]),content:x(()=>[(k(!0),$(Ce,null,lt(o.new_releases,_=>(k(),me(c,{key:_.id,album:_,onClick:b=>o.open_album(_)},Ta({actions:x(()=>[u("a",{onClick:rt(b=>o.open_album_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,pH)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(_),artist:_.artist,album:_.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:s.show_album_details_modal,album:s.selected_album,onClose:t[0]||(t[0]=_=>s.show_album_details_modal=!1)},null,8,["show","album"])]),footer:x(()=>[u("nav",hH,[u("p",_H,[y(d,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:x(()=>[nt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,gH)]),content:x(()=>[(k(!0),$(Ce,null,lt(o.featured_playlists,_=>(k(),me(p,{key:_.id,playlist:_},{actions:x(()=>[u("a",{onClick:rt(b=>o.open_playlist_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,yH)]),_:2},1032,["playlist"]))),128)),y(h,{show:s.show_playlist_details_modal,playlist:s.selected_playlist,onClose:t[1]||(t[1]=_=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),footer:x(()=>[u("nav",vH,[u("p",bH,[y(d,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:x(()=>[nt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const CH=te(dH,[["render",zH]]),Ti={load(e){if(Ue.state.spotify_new_releases.length>0)return Promise.resolve();const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),t.getNewReleases({country:Ue.state.spotify.webapi_country,limit:50})},set(e,t){t&&Ue.commit(fd,t.albums.items)}},wH={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Na,TabsMusic:dr},beforeRouteEnter(e,t,n){Ti.load(e).then(r=>{n(s=>Ti.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ti.load(e).then(s=>{Ti.set(r,s),n()})},data(){return{show_album_details_modal:!1,selected_album:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},kH={class:"fd-page-with-tabs"},xH=["textContent"],EH=["onClick"];function SH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("cover-artwork"),l=E("mdicon"),c=E("list-item-album-spotify"),m=E("modal-dialog-album-spotify"),d=E("content-with-heading");return k(),$("div",kH,[y(a),y(d,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,xH)]),content:x(()=>[(k(!0),$(Ce,null,lt(o.new_releases,f=>(k(),me(c,{key:f.id,album:f,onClick:p=>o.open_album(f)},Ta({actions:x(()=>[u("a",{onClick:rt(p=>o.open_album_dialog(f),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,EH)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(f),artist:f.artist,album:f.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:s.show_album_details_modal,album:s.selected_album,onClose:t[0]||(t[0]=f=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const $H=te(wH,[["render",SH]]),Oi={load(e){if(Ue.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Yn;t.setAccessToken(Ue.state.spotify.webapi_token),t.getFeaturedPlaylists({country:Ue.state.spotify.webapi_country,limit:50})},set(e,t){t&&Ue.commit(pd,t.playlists.items)}},AH={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListItemPlaylistSpotify:Fm,ModalDialogPlaylistSpotify:hu,TabsMusic:dr},beforeRouteEnter(e,t,n){Oi.load(e).then(r=>{n(s=>Oi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Oi.load(e).then(s=>{Oi.set(r,s),n()})},data(){return{show_playlist_details_modal:!1,selected_playlist:{}}},computed:{featured_playlists(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0}}},TH={class:"fd-page-with-tabs"},OH=["textContent"],DH=["onClick"];function PH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("mdicon"),l=E("list-item-playlist-spotify"),c=E("modal-dialog-playlist-spotify"),m=E("content-with-heading");return k(),$("div",TH,[y(a),y(m,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,OH)]),content:x(()=>[(k(!0),$(Ce,null,lt(o.featured_playlists,d=>(k(),me(l,{key:d.id,playlist:d},{actions:x(()=>[u("a",{onClick:rt(f=>o.open_playlist_dialog(d),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,DH)]),_:2},1032,["playlist"]))),128)),y(c,{show:s.show_playlist_details_modal,playlist:s.selected_playlist,onClose:t[0]||(t[0]=d=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const IH=te(AH,[["render",PH]]),Di={load(e){const t=Ue.getters.settings_option_recently_added_limit;return M.search({type:"album",expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t})},set(e,t){e.recently_added=new ge(t.data.albums),e.recently_added.group(m5("time_added",{direction:"desc"}))}},FH={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,TabsMusic:dr,ListAlbums:cr},beforeRouteEnter(e,t,n){Di.load(e).then(r=>{n(s=>Di.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.recently_added.isEmpty()){n();return}const r=this;Di.load(e).then(s=>{Di.set(r,s),n()})},data(){return{recently_added:new ge}}},RH={class:"fd-page-with-tabs"},LH=["textContent"];function NH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("content-with-heading");return k(),$("div",RH,[y(a),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,LH)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),_:1})])}const MH=te(FH,[["render",NH]]),Pi={load(e){return M.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set(e,t){e.recently_played=new ge(t.data.tracks)}},VH={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,TabsMusic:dr,ListTracks:Cn},beforeRouteEnter(e,t,n){Pi.load(e).then(r=>{n(s=>Pi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Pi.load(e).then(s=>{Pi.set(r,s),n()})},data(){return{recently_played:{}}}},HH={class:"fd-page-with-tabs"},BH=["textContent"];function UH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-tracks"),l=E("content-with-heading");return k(),$("div",HH,[y(a),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,BH)]),content:x(()=>[y(i,{tracks:s.recently_played},null,8,["tracks"])]),_:1})])}const jH=te(VH,[["render",UH]]),qH={name:"LyricsPane",data(){return this.lastIndex=0,this.scrollTimer=null,this.lastItemId=-1,{scroll:{},autoScroll:!0}},computed:{is_playing(){return this.player.state==="play"},is_sync(){return this.lyricsArr.length&&this.lyricsArr[0].length>1},lyricIndex(){const e=this.player.item_progress_ms/1e3,t=this.lyricsArr;if(t.length&&t[0].length===1)return 0;if((this.player.item_id!=this.lastItemId||this.lastIndexe)&&this.resetPosCache(),this.lastIndexe)return this.lastIndex;if(this.lastIndexe)return this.lastIndex+1;let n,r=0,s=t.length-1;for(;r<=s&&(n=(s+r)/2|0,!(t[n][1]<=e&&t.length>n+1&&t[n+1][1]>e));)t[n][1]{let o=r;return r+=(s.length+1)*t,{delay:o,text:s}})}},watch:{lyricIndex(){this.autoScroll&&this._scrollToElement(),this.lastIndex=this.lyricIndex}},methods:{resetPosCache(){this.lastItemId=this.player.item_id,this.lastIndex=0},startedScroll(e){if(!e.screenX||e.screenX==0||!e.screenY||e.screenY==0)return;this.autoScroll=!1,this.scrollTimer&&clearTimeout(this.scrollTimer);let t=this;this.scrollTimer=setTimeout(function(){t.autoScroll=!0},5e3)},_scrollToElement(){let e=this.$refs.lyricsWrapper,t=e.children[0].children[this.lyricIndex],n=e.offsetHeight>>1;if(!this.lyricsArr||!t)return;let r=e.scrollTop,s=t.offsetTop-n;e.scrollBy({top:s-r,left:0,behavior:"smooth"})}}},WH=e=>(T_("data-v-4a6bcca9"),e=e(),O_(),e),KH=WH(()=>u("div",{class:"lyrics-overlay"},null,-1)),GH={class:"lyrics"},ZH={key:0};function YH(e,t,n,r,s,o){return k(),$(Ce,null,[KH,u("div",{ref:"lyricsWrapper",class:"lyrics-wrapper",onTouchstart:t[0]||(t[0]=a=>s.autoScroll=!1),onTouchend:t[1]||(t[1]=a=>s.autoScroll=!0),onScrollPassive:t[2]||(t[2]=(...a)=>o.startedScroll&&o.startedScroll(...a)),onWheelPassive:t[3]||(t[3]=(...a)=>o.startedScroll&&o.startedScroll(...a))},[u("div",GH,[(k(!0),$(Ce,null,lt(o.lyricsArr,(a,i)=>(k(),$("div",{key:a,class:Ee(i==o.lyricIndex&&o.is_sync&&"gradient")},[i==o.lyricIndex&&o.is_sync&&o.is_playing?(k(),$("ul",ZH,[(k(!0),$(Ce,null,lt(o.splitLyric,l=>(k(),$("li",{key:l.delay,style:lr({animationDuration:l.delay+"s"})},g(l.text),5))),128))])):H("",!0),i!=o.lyricIndex||!o.is_sync||!o.is_playing?(k(),$(Ce,{key:1},[nt(g(a[0]),1)],64)):H("",!0)],2))),128))])],544)],64)}const JH=te(qH,[["render",YH],["__scopeId","data-v-4a6bcca9"]]),XH={name:"ModalDialogQueueItem",props:["show","item"],emits:["close"],data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"){const e=new Yn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{remove(){this.$emit("close"),M.queue_remove(this.item.id)},play(){this.$emit("close"),M.player_play({item_id:this.item.id})},open_album(){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.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{media_kind:this.item.media_kind}})},open_spotify_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}})},open_spotify_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}})}}},QH={key:0,class:"modal is-active"},eB={class:"modal-content fd-modal-card"},tB={class:"card"},nB={class:"card-content"},rB=["textContent"],sB=["textContent"],oB={class:"content is-small"},aB=["textContent"],iB=["textContent"],lB=["textContent"],uB={key:0},cB=["textContent"],dB=["textContent"],mB=["textContent"],fB={key:1},pB=["textContent"],hB=["textContent"],_B={key:2},gB=["textContent"],yB=["textContent"],vB={key:3},bB=["textContent"],zB=["textContent"],CB=["textContent"],wB=["textContent"],kB=["textContent"],xB=["textContent"],EB=["textContent"],SB=["textContent"],$B=["textContent"],AB={class:"title is-6"},TB=["textContent"],OB={key:0,class:"has-text-weight-normal"},DB=["textContent"],PB=["textContent"],IB=["textContent"],FB={class:"title is-6"},RB=["textContent"],LB=["textContent"],NB=["textContent"],MB=["textContent"],VB={class:"card-footer"},HB=["textContent"],BB=["textContent"];function UB(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",QH,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",eB,[u("div",tB,[u("div",nB,[u("p",{class:"title is-4",textContent:g(n.item.title)},null,8,rB),u("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,sB),u("div",oB,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album"))},null,8,aB),n.item.album_id?(k(),$("a",{key:0,class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.item.album)},null,8,iB)):(k(),$("span",{key:1,class:"title is-6",textContent:g(n.item.album)},null,8,lB))]),n.item.album_artist?(k(),$("p",uB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album-artist"))},null,8,cB),n.item.album_artist_id?(k(),$("a",{key:0,class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...i)=>o.open_album_artist&&o.open_album_artist(...i)),textContent:g(n.item.album_artist)},null,8,dB)):(k(),$("span",{key:1,class:"title is-6",textContent:g(n.item.album_artist)},null,8,mB))])):H("",!0),n.item.composer?(k(),$("p",fB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.composer"))},null,8,pB),u("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,hB)])):H("",!0),n.item.year>0?(k(),$("p",_B,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.year"))},null,8,gB),u("span",{class:"title is-6",textContent:g(n.item.year)},null,8,yB)])):H("",!0),n.item.genre?(k(),$("p",vB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.genre"))},null,8,bB),u("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.item.genre)},null,8,zB)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.position"))},null,8,CB),u("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,wB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.duration"))},null,8,kB),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,xB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.path"))},null,8,EB),u("span",{class:"title is-6",textContent:g(n.item.path)},null,8,SB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.type"))},null,8,$B),u("span",AB,[u("span",{textContent:g([e.$t("media.kind."+n.item.media_kind),e.$t("data.kind."+n.item.data_kind)].join(" - "))},null,8,TB),n.item.data_kind==="spotify"?(k(),$("span",OB,[nt(" ("),u("a",{onClick:t[4]||(t[4]=(...i)=>o.open_spotify_artist&&o.open_spotify_artist(...i)),textContent:g(e.$t("dialog.queue-item.spotify-artist"))},null,8,DB),nt(", "),u("a",{onClick:t[5]||(t[5]=(...i)=>o.open_spotify_album&&o.open_spotify_album(...i)),textContent:g(e.$t("dialog.queue-item.spotify-album"))},null,8,PB),nt(") ")])):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.quality"))},null,8,IB),u("span",FB,[u("span",{textContent:g(n.item.type)},null,8,RB),n.item.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,LB)):H("",!0),n.item.channels?(k(),$("span",{key:1,textContent:g(e.$t("dialog.queue-item.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,NB)):H("",!0),n.item.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,MB)):H("",!0)])])])]),u("footer",VB,[u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...i)=>o.remove&&o.remove(...i))},[y(a,{class:"icon",name:"delete",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.remove"))},null,8,HB)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.play"))},null,8,BB)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const K1=te(XH,[["render",UB]]),Dr=1e3,jB={name:"PageNowPlaying",components:{ControlSlider:Zd,CoverArtwork:Fn,LyricsPane:JH,ModalDialogQueueItem:K1},data(){return{cursor:Zl,INTERVAL:Dr,interval_id:0,is_dragged:!1,selected_item:{},show_details_modal:!1}},computed:{is_live(){return this.track.length_ms===0},lyrics_visible(){return this.$store.getters.lyrics_pane},player(){return this.$store.state.player},track(){return this.$store.getters.now_playing},track_progress:{get(){return Math.floor(this.player.item_progress_ms/Dr)},set(e){this.player.item_progress_ms=e*Dr}},track_progress_max(){return this.is_live?1:Math.floor(this.track.length_ms/Dr)},track_elapsed_time(){return this.$filters.durationInHours(this.track_progress*Dr)},track_total_time(){return this.is_live?this.$t("page.now-playing.live"):this.$filters.durationInHours(this.track.length_ms)},settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing},settings_option_show_composer_for_genre(){return this.$store.getters.settings_option_show_composer_for_genre},composer(){return this.settings_option_show_composer_now_playing&&(!this.settings_option_show_composer_for_genre||this.track.genre&&this.settings_option_show_composer_for_genre.toLowerCase().split(",").findIndex(e=>this.track.genre.toLowerCase().indexOf(e.trim())>=0)>=0)?this.track.composer:null},settings_option_show_filepath_now_playing(){return this.$store.getters.settings_option_show_filepath_now_playing},filepath(){return this.settings_option_show_filepath_now_playing?this.track.path:null}},watch:{player(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Dr))}},created(){M.player_status().then(({data:e})=>{this.$store.commit(md,e),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Dr))})},unmounted(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},methods:{tick(){this.is_dragged||(this.track_progress+=1)},start_dragging(){this.is_dragged=!0},end_dragging(){this.is_dragged=!1},seek(){this.is_live||M.player_seek_to_pos(this.track_progress*Dr)},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},qB={class:"hero is-fullheight"},WB={key:0,class:"hero-body"},KB={class:"container has-text-centered",style:{"max-width":"500px"}},GB={class:"is-flex is-justify-content-space-between"},ZB=["textContent"],YB=["textContent"],JB=["textContent"],XB=["textContent"],QB=["textContent"],eU=["textContent"],tU=["textContent"],nU={key:1,class:"hero-body"},rU={class:"container has-text-centered"},sU=["textContent"],oU=["textContent"];function aU(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("lyrics-pane"),l=E("control-slider"),c=E("modal-dialog-queue-item");return k(),$("div",qB,[o.track.id>0?(k(),$("div",WB,[u("div",KB,[y(a,{artwork_url:o.track.artwork_url,artist:o.track.artist,album:o.track.album,class:"is-clickable fd-has-shadow fd-cover-big-image",onClick:t[0]||(t[0]=m=>o.open_dialog(o.track))},null,8,["artwork_url","artist","album"]),o.lyrics_visible?(k(),me(i,{key:0})):H("",!0),y(l,{value:o.track_progress,"onUpdate:value":t[1]||(t[1]=m=>o.track_progress=m),class:"mt-5",disabled:o.is_live,max:o.track_progress_max,cursor:s.cursor,onChange:o.seek,onMousedown:o.start_dragging,onMouseup:o.end_dragging},null,8,["value","disabled","max","cursor","onChange","onMousedown","onMouseup"]),u("div",GB,[u("p",{class:"subtitle is-7",textContent:g(o.track_elapsed_time)},null,8,ZB),u("p",{class:"subtitle is-7",textContent:g(o.track_total_time)},null,8,YB)]),u("p",{class:"title is-5",textContent:g(o.track.title)},null,8,JB),u("p",{class:"title is-6",textContent:g(o.track.artist)},null,8,XB),o.composer?(k(),$("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:g(o.composer)},null,8,QB)):H("",!0),o.track.album?(k(),$("p",{key:2,class:"subtitle is-6",textContent:g(o.track.album)},null,8,eU)):H("",!0),o.filepath?(k(),$("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:g(o.filepath)},null,8,tU)):H("",!0)])])):(k(),$("div",nU,[u("div",rU,[u("p",{class:"title is-5",textContent:g(e.$t("page.now-playing.title"))},null,8,sU),u("p",{class:"subtitle",textContent:g(e.$t("page.now-playing.info"))},null,8,oU)])])),y(c,{show:s.show_details_modal,item:s.selected_item,onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","item"])])}const iU=te(jB,[["render",aU]]),Ii={load(e){return Promise.all([M.library_playlist(e.params.id),M.library_playlist_folder(e.params.id)])},set(e,t){e.playlist=t[0].data,e.playlists_list=new ge(t[1].data)}},lU={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:Im},beforeRouteEnter(e,t,n){Ii.load(e).then(r=>{n(s=>Ii.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ii.load(e).then(s=>{Ii.set(r,s),n()})},data(){return{playlist:{},playlists_list:new ge}},computed:{has_playlists(){return Object.keys(this.playlists_list.itemsByGroup).length>0},playlists(){return this.playlists_list.group(V1(),[e=>e.folder||this.radio_playlists||e.stream_count===0||e.item_count>e.stream_count]),this.playlists_list},radio_playlists(){return this.$store.state.config.radio_playlists}}},uU={class:"fd-page"},cU=["textContent"],dU=["textContent"];function mU(e,t,n,r,s,o){const a=E("list-playlists"),i=E("content-with-heading");return k(),$("div",uU,[y(i,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.playlist.id===0?e.$t("page.playlists.title"):s.playlist.name)},null,8,cU),u("p",{class:"heading",textContent:g(e.$t("page.playlists.count",{count:o.playlists.count}))},null,8,dU)]),content:x(()=>[o.has_playlists?(k(),me(a,{key:0,playlists:o.playlists},null,8,["playlists"])):H("",!0)]),_:1})])}const fU=te(lU,[["render",mU]]),Fi={load(e){return Promise.all([M.library_playlist(e.params.id),M.library_playlist_tracks(e.params.id)])},set(e,t){e.playlist=t[0].data,e.tracks=new ge(t[1].data)}},pU={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:Cn,ModalDialogPlaylist:W1},beforeRouteEnter(e,t,n){Fi.load(e).then(r=>{n(s=>Fi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Fi.load(e).then(s=>{Fi.set(r,s),n()})},data(){return{playlist:{},tracks:new ge,show_playlist_details_modal:!1}},computed:{uris(){return this.playlist.random?this.tracks.map(e=>e.uri).join(","):this.playlist.uri}},methods:{play(){M.player_play_uri(this.uris,!0)}}},hU={class:"fd-page"},_U=["textContent"],gU={class:"buttons is-centered"},yU=["textContent"],vU=["textContent"];function bU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-tracks"),l=E("modal-dialog-playlist"),c=E("content-with-heading");return k(),$("div",hU,[y(c,null,{"heading-left":x(()=>[u("div",{class:"title is-4",textContent:g(s.playlist.name)},null,8,_U)]),"heading-right":x(()=>[u("div",gU,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_playlist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.playlist.shuffle"))},null,8,yU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.playlist.track-count",{count:s.tracks.count}))},null,8,vU),y(i,{tracks:s.tracks,uris:o.uris},null,8,["tracks","uris"]),y(l,{show:s.show_playlist_details_modal,playlist:s.playlist,uris:o.uris,onClose:t[2]||(t[2]=m=>s.show_playlist_details_modal=!1)},null,8,["show","playlist","uris"])]),_:1})])}const zU=te(pU,[["render",bU]]),ad=50,Ri={load:function(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getPlaylist(e.params.id),t.getPlaylistTracks(e.params.id,{limit:ad,offset:0,market:Ue.state.spotify.webapi_country})])},set(e,t){e.playlist=t[0],e.tracks=[],e.total=0,e.offset=0,e.append_tracks(t[1])}},CU={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListItemTrackSpotify:Sm,ModalDialogPlaylistSpotify:hu,ModalDialogTrackSpotify:$m,VueEternalLoading:Am},beforeRouteEnter(e,t,n){Ri.load(e).then(r=>{n(s=>Ri.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ri.load(e).then(s=>{Ri.set(r,s),n()})},data(){return{playlist:{tracks:{}},tracks:[],total:0,offset:0,show_track_details_modal:!1,selected_track:{},show_playlist_details_modal:!1}},methods:{load_next({loaded:e}){const t=new Yn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getPlaylistTracks(this.playlist.id,{limit:ad,offset:this.offset,market:Ue.state.spotify.webapi_country}).then(n=>{this.append_tracks(n),e(n.items.length,ad)})},append_tracks(e){let t=Math.max(-1,...this.tracks.map(n=>n.position).filter(n=>n));e.items.forEach(n=>{const r=n.track;r&&(r.is_playable&&(r.position=++t),this.tracks.push(r))}),this.total=e.total,this.offset+=e.limit},play(){this.show_details_modal=!1,M.player_play_uri(this.playlist.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},wU={class:"fd-page"},kU=["textContent"],xU={class:"buttons is-centered"},EU=["textContent"],SU=["textContent"],$U=["onClick"];function AU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-item-track-spotify"),l=E("VueEternalLoading"),c=E("modal-dialog-track-spotify"),m=E("modal-dialog-playlist-spotify"),d=E("content-with-heading");return k(),$("div",wU,[y(d,null,{"heading-left":x(()=>[u("div",{class:"title is-4",textContent:g(s.playlist.name)},null,8,kU)]),"heading-right":x(()=>[u("div",xU,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>s.show_playlist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.playlist.shuffle"))},null,8,EU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.playlist.count",{count:s.playlist.tracks.total}))},null,8,SU),(k(!0),$(Ce,null,lt(s.tracks,f=>(k(),me(i,{key:f.id,track:f,position:f.position,context_uri:s.playlist.uri},{actions:x(()=>[u("a",{onClick:rt(p=>o.open_track_dialog(f),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,$U)]),_:2},1032,["track","position","context_uri"]))),128)),s.offset[nt(" . ")]),_:1},8,["load"])):H("",!0),y(c,{show:s.show_track_details_modal,track:s.selected_track,album:s.selected_track.album,onClose:t[2]||(t[2]=f=>s.show_track_details_modal=!1)},null,8,["show","track","album"]),y(m,{show:s.show_playlist_details_modal,playlist:s.playlist,onClose:t[3]||(t[3]=f=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const TU=te(CU,[["render",AU]]),Li={load(e){return Promise.all([M.library_album(e.params.id),M.library_podcast_episodes(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data.tracks)}},OU={name:"PagePodcast",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialog:dm,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){Li.load(e).then(r=>{n(s=>Li.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Li.load(e).then(s=>{Li.set(r,s),n()})},data(){return{album:{},rss_playlist_to_remove:{},show_details_modal:!1,show_remove_podcast_modal:!1,tracks:new ge}},computed:{new_tracks(){return this.tracks.items.filter(e=>e.play_count===0).length}},methods:{open_remove_podcast_dialog(){M.library_track_playlists(this.tracks.items[0].id).then(({data:e})=>{[this.rss_playlist_to_remove]=e.items.filter(t=>t.type==="rss"),this.show_remove_podcast_modal=!0,this.show_details_modal=!1})},play(){M.player_play_uri(this.album.uri,!1)},reload_tracks(){M.library_podcast_episodes(this.album.id).then(({data:e})=>{this.tracks=new ge(e.tracks)})},remove_podcast(){this.show_remove_podcast_modal=!1,M.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({name:"podcasts"})})}}},DU={class:"fd-page"},PU=["textContent"],IU=u("h2",{class:"subtitle is-6 has-text-weight-normal"}," ",-1),FU={class:"buttons fd-is-centered-mobile mt-5"},RU=["textContent"],LU=["textContent"],NU=["textContent"],MU={class:"is-size-7"},VU=["textContent"],HU=["textContent"];function BU(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("modal-dialog"),d=E("content-with-hero");return k(),$("div",DU,[y(d,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,PU),IU,u("div",FU,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[0]||(t[0]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.podcast.play"))},null,8,RU)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[2]||(t[2]=f=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.podcast.track-count",{count:s.album.track_count}))},null,8,LU),y(l,{tracks:s.tracks,show_progress:!0,onPlayCountChanged:o.reload_tracks},null,8,["tracks","onPlayCountChanged"]),y(c,{show:s.show_details_modal,album:s.album,media_kind:"podcast",new_tracks:o.new_tracks,onClose:t[3]||(t[3]=f=>s.show_details_modal=!1),onPlayCountChanged:o.reload_tracks,onRemovePodcast:o.open_remove_podcast_dialog},null,8,["show","album","new_tracks","onPlayCountChanged","onRemovePodcast"]),y(m,{show:s.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[4]||(t[4]=f=>s.show_remove_podcast_modal=!1),onDelete:o.remove_podcast},{"modal-content":x(()=>[u("p",{textContent:g(e.$t("page.podcast.remove-info-1"))},null,8,NU),u("p",MU,[nt(" ("),u("span",{textContent:g(e.$t("page.podcast.remove-info-2"))},null,8,VU),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,HU),nt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]),_:1})])}const UU=te(OU,[["render",BU]]),jU={name:"ModalDialogAddRss",props:["show"],emits:["close","podcast-added"],data(){return{url:"",loading:!1}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,M.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})}}},qU={key:0,class:"modal is-active"},WU={class:"modal-content fd-modal-card"},KU={class:"card"},GU={class:"card-content"},ZU=["textContent"],YU={class:"field"},JU={class:"control is-expanded has-icons-left"},XU=["placeholder","disabled"],QU=["textContent"],ej={key:0,class:"card-footer"},tj={class:"card-footer-item button is-loading"},nj=["textContent"],rj={key:1,class:"card-footer is-clipped"},sj=["textContent"],oj=["textContent"];function aj(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",qU,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",WU,[u("div",KU,[u("div",GU,[u("p",{class:"title is-4",textContent:g(e.$t("dialog.add.rss.title"))},null,8,ZU),u("form",{onSubmit:t[2]||(t[2]=rt((...i)=>o.add_stream&&o.add_stream(...i),["prevent"]))},[u("div",YU,[u("p",JU,[bt(u("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=i=>s.url=i),class:"input is-shadowless",type:"text",placeholder:e.$t("dialog.add.rss.placeholder"),disabled:s.loading},null,8,XU),[[fn,s.url]]),y(a,{class:"icon is-left",name:"rss",size:"16"})]),u("p",{class:"help",textContent:g(e.$t("dialog.add.rss.help"))},null,8,QU)])],32)]),s.loading?(k(),$("footer",ej,[u("a",tj,[y(a,{class:"icon",name:"web",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.processing"))},null,8,nj)])])):(k(),$("footer",rj,[u("a",{class:"card-footer-item has-text-danger",onClick:t[3]||(t[3]=i=>e.$emit("close"))},[y(a,{class:"icon",name:"cancel",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.cancel"))},null,8,sj)]),u("a",{class:"card-footer-item has-background-info has-text-white has-text-weight-bold",onClick:t[4]||(t[4]=(...i)=>o.add_stream&&o.add_stream(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.add"))},null,8,oj)])]))])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const ij=te(jU,[["render",aj]]),Ni={load(e){return Promise.all([M.library_albums("podcast"),M.library_podcasts_new_episodes()])},set(e,t){e.albums=new ge(t[0].data),e.new_episodes=new ge(t[1].data.tracks)}},lj={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListTracks:Cn,ListAlbums:cr,ModalDialogAddRss:ij},beforeRouteEnter(e,t,n){Ni.load(e).then(r=>{n(s=>Ni.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ni.load(e).then(s=>{Ni.set(r,s),n()})},data(){return{albums:[],new_episodes:{items:[]},show_url_modal:!1}},computed:{rss(){return this.$store.state.rss_count}},methods:{mark_all_played(){this.new_episodes.items.forEach(e=>{M.library_track_update(e.id,{play_count:"increment"})}),this.new_episodes.items={}},open_add_podcast_dialog(e){this.show_url_modal=!0},reload_new_episodes(){M.library_podcasts_new_episodes().then(({data:e})=>{this.new_episodes=new ge(e.tracks)})},reload_podcasts(){M.library_albums("podcast").then(({data:e})=>{this.albums=new ge(e),this.reload_new_episodes()})},update_rss(){this.$store.commit(gd,"rss"),this.$store.commit(wa,!0)}}},uj={class:"fd-page"},cj=["textContent"],dj={class:"buttons is-centered"},mj=["textContent"],fj=["textContent"],pj=["textContent"],hj={class:"buttons is-centered"},_j=["textContent"],gj=["textContent"];function yj(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-tracks"),l=E("content-with-heading"),c=E("list-albums"),m=E("modal-dialog-add-rss");return k(),$("div",uj,[s.new_episodes.items.length>0?(k(),me(l,{key:0},{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.new-episodes"))},null,8,cj)]),"heading-right":x(()=>[u("div",dj,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=(...d)=>o.mark_all_played&&o.mark_all_played(...d))},[y(a,{class:"icon",name:"pencil",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.mark-all-played"))},null,8,mj)])])]),content:x(()=>[y(i,{tracks:s.new_episodes,show_progress:!0,onPlayCountChanged:o.reload_new_episodes},null,8,["tracks","onPlayCountChanged"])]),_:1})):H("",!0),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.title"))},null,8,fj),u("p",{class:"heading",textContent:g(e.$t("page.podcasts.count",{count:s.albums.total}))},null,8,pj)]),"heading-right":x(()=>[u("div",hj,[o.rss.tracks>0?(k(),$("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...d)=>o.update_rss&&o.update_rss(...d))},[y(a,{class:"icon",name:"refresh",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.update"))},null,8,_j)])):H("",!0),u("a",{class:"button is-small",onClick:t[2]||(t[2]=(...d)=>o.open_add_podcast_dialog&&o.open_add_podcast_dialog(...d))},[y(a,{class:"icon",name:"rss",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.add"))},null,8,gj)])])]),content:x(()=>[y(c,{albums:s.albums,onPlayCountChanged:t[3]||(t[3]=d=>o.reload_new_episodes()),onPodcastDeleted:t[4]||(t[4]=d=>o.reload_podcasts())},null,8,["albums"]),y(m,{show:s.show_url_modal,onClose:t[5]||(t[5]=d=>s.show_url_modal=!1),onPodcastAdded:t[6]||(t[6]=d=>o.reload_podcasts())},null,8,["show"])]),_:1})])}const vj=te(lj,[["render",yj]]);var G1={exports:{}};/**! + */const Ls=typeof window<"u";function OT(e){return e.__esModule||e[Symbol.toStringTag]==="Module"}const it=Object.assign;function ju(e,t){const n={};for(const r in t){const s=t[r];n[r]=Gn(s)?s.map(e):e(s)}return n}const ea=()=>{},Gn=Array.isArray,DT=/\/$/,PT=e=>e.replace(DT,"");function qu(e,t,n="/"){let r,s={},o="",a="";const i=t.indexOf("#");let l=t.indexOf("?");return i=0&&(l=-1),l>-1&&(r=t.slice(0,l),o=t.slice(l+1,i>-1?i:t.length),s=e(o)),i>-1&&(r=r||t.slice(0,i),a=t.slice(i,t.length)),r=LT(r??t,n),{fullPath:r+(o&&"?")+o+a,path:r,query:s,hash:a}}function IT(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Kp(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function FT(e,t,n){const r=t.matched.length-1,s=n.matched.length-1;return r>-1&&r===s&&lo(t.matched[r],n.matched[s])&&qv(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function lo(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function qv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!RT(e[n],t[n]))return!1;return!0}function RT(e,t){return Gn(e)?Gp(e,t):Gn(t)?Gp(t,e):e===t}function Gp(e,t){return Gn(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e.length===1&&e[0]===t}function LT(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),r=e.split("/"),s=r[r.length-1];(s===".."||s===".")&&r.push("");let o=n.length-1,a,i;for(a=0;a1&&o--;else break;return n.slice(0,o).join("/")+"/"+r.slice(a-(a===r.length?1:0)).join("/")}var za;(function(e){e.pop="pop",e.push="push"})(za||(za={}));var ta;(function(e){e.back="back",e.forward="forward",e.unknown=""})(ta||(ta={}));function NT(e){if(!e)if(Ls){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),PT(e)}const MT=/^[^#]+#/;function VT(e,t){return e.replace(MT,"#")+t}function HT(e,t){const n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}const cu=()=>({left:window.pageXOffset,top:window.pageYOffset});function BT(e){let t;if("el"in e){const n=e.el,r=typeof n=="string"&&n.startsWith("#"),s=typeof n=="string"?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!s)return;t=HT(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.pageXOffset,t.top!=null?t.top:window.pageYOffset)}function Zp(e,t){return(history.state?history.state.position-t:-1)+e}const Yc=new Map;function UT(e,t){Yc.set(e,t)}function jT(e){const t=Yc.get(e);return Yc.delete(e),t}let qT=()=>location.protocol+"//"+location.host;function Wv(e,t){const{pathname:n,search:r,hash:s}=t,o=e.indexOf("#");if(o>-1){let i=s.includes(e.slice(o))?e.slice(o).length:1,l=s.slice(i);return l[0]!=="/"&&(l="/"+l),Kp(l,"")}return Kp(n,e)+r+s}function WT(e,t,n,r){let s=[],o=[],a=null;const i=({state:f})=>{const p=Wv(e,location),h=n.value,_=t.value;let b=0;if(f){if(n.value=p,t.value=f,a&&a===h){a=null;return}b=_?f.position-_.position:0}else r(p);s.forEach(w=>{w(n.value,h,{delta:b,type:za.pop,direction:b?b>0?ta.forward:ta.back:ta.unknown})})};function l(){a=n.value}function c(f){s.push(f);const p=()=>{const h=s.indexOf(f);h>-1&&s.splice(h,1)};return o.push(p),p}function m(){const{history:f}=window;f.state&&f.replaceState(it({},f.state,{scroll:cu()}),"")}function d(){for(const f of o)f();o=[],window.removeEventListener("popstate",i),window.removeEventListener("beforeunload",m)}return window.addEventListener("popstate",i),window.addEventListener("beforeunload",m,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function Yp(e,t,n,r=!1,s=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:s?cu():null}}function KT(e){const{history:t,location:n}=window,r={value:Wv(e,n)},s={value:t.state};s.value||o(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function o(l,c,m){const d=e.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?e:e.slice(d))+l:qT()+e+l;try{t[m?"replaceState":"pushState"](c,"",f),s.value=c}catch(p){console.error(p),n[m?"replace":"assign"](f)}}function a(l,c){const m=it({},t.state,Yp(s.value.back,l,s.value.forward,!0),c,{position:s.value.position});o(l,m,!0),r.value=l}function i(l,c){const m=it({},s.value,t.state,{forward:l,scroll:cu()});o(m.current,m,!0);const d=it({},Yp(r.value,l,null),{position:m.position+1},c);o(l,d,!1),r.value=l}return{location:r,state:s,push:i,replace:a}}function GT(e){e=NT(e);const t=KT(e),n=WT(e,t.state,t.location,t.replace);function r(o,a=!0){a||n.pauseListeners(),history.go(o)}const s=it({location:"",base:e,go:r,createHref:VT.bind(null,e)},t,n);return Object.defineProperty(s,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(s,"state",{enumerable:!0,get:()=>t.state.value}),s}function ZT(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),GT(e)}function YT(e){return typeof e=="string"||e&&typeof e=="object"}function Kv(e){return typeof e=="string"||typeof e=="symbol"}const Or={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0},Gv=Symbol("");var Jp;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(Jp||(Jp={}));function uo(e,t){return it(new Error,{type:e,[Gv]:!0},t)}function mr(e,t){return e instanceof Error&&Gv in e&&(t==null||!!(e.type&t))}const Xp="[^/]+?",JT={sensitive:!1,strict:!1,start:!0,end:!0},XT=/[.+*?^${}()[\]/\\]/g;function QT(e,t){const n=it({},JT,t),r=[];let s=n.start?"^":"";const o=[];for(const c of e){const m=c.length?[]:[90];n.strict&&!c.length&&(s+="/");for(let d=0;dt.length?t.length===1&&t[0]===80?1:-1:0}function tO(e,t){let n=0;const r=e.score,s=t.score;for(;n0&&t[t.length-1]<0}const nO={type:0,value:""},rO=/[a-zA-Z0-9_]/;function sO(e){if(!e)return[[]];if(e==="/")return[[nO]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(p){throw new Error(`ERR (${n})/"${c}": ${p}`)}let n=0,r=n;const s=[];let o;function a(){o&&s.push(o),o=[]}let i=0,l,c="",m="";function d(){c&&(n===0?o.push({type:0,value:c}):n===1||n===2||n===3?(o.length>1&&(l==="*"||l==="+")&&t(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),o.push({type:1,value:c,regexp:m,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):t("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;i{a(C)}:ea}function a(m){if(Kv(m)){const d=r.get(m);d&&(r.delete(m),n.splice(n.indexOf(d),1),d.children.forEach(a),d.alias.forEach(a))}else{const d=n.indexOf(m);d>-1&&(n.splice(d,1),m.record.name&&r.delete(m.record.name),m.children.forEach(a),m.alias.forEach(a))}}function i(){return n}function l(m){let d=0;for(;d=0&&(m.record.path!==n[d].record.path||!Zv(m,n[d]));)d++;n.splice(d,0,m),m.record.name&&!th(m)&&r.set(m.record.name,m)}function c(m,d){let f,p={},h,_;if("name"in m&&m.name){if(f=r.get(m.name),!f)throw uo(1,{location:m});_=f.record.name,p=it(eh(d.params,f.keys.filter(C=>!C.optional).map(C=>C.name)),m.params&&eh(m.params,f.keys.map(C=>C.name))),h=f.stringify(p)}else if("path"in m)h=m.path,f=n.find(C=>C.re.test(h)),f&&(p=f.parse(h),_=f.record.name);else{if(f=d.name?r.get(d.name):n.find(C=>C.re.test(d.path)),!f)throw uo(1,{location:m,currentLocation:d});_=f.record.name,p=it({},d.params,m.params),h=f.stringify(p)}const b=[];let w=f;for(;w;)b.unshift(w.record),w=w.parent;return{name:_,path:h,params:p,matched:b,meta:uO(b)}}return e.forEach(m=>o(m)),{addRoute:o,resolve:c,removeRoute:a,getRoutes:i,getRecordMatcher:s}}function eh(e,t){const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}function iO(e){return{path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:void 0,beforeEnter:e.beforeEnter,props:lO(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}}}function lO(e){const t={},n=e.props||!1;if("component"in e)t.default=n;else for(const r in e.components)t[r]=typeof n=="object"?n[r]:n;return t}function th(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function uO(e){return e.reduce((t,n)=>it(t,n.meta),{})}function nh(e,t){const n={};for(const r in e)n[r]=r in t?t[r]:e[r];return n}function Zv(e,t){return t.children.some(n=>n===e||Zv(e,n))}const Yv=/#/g,cO=/&/g,dO=/\//g,mO=/=/g,fO=/\?/g,Jv=/\+/g,pO=/%5B/g,hO=/%5D/g,Xv=/%5E/g,_O=/%60/g,Qv=/%7B/g,gO=/%7C/g,e1=/%7D/g,yO=/%20/g;function bm(e){return encodeURI(""+e).replace(gO,"|").replace(pO,"[").replace(hO,"]")}function vO(e){return bm(e).replace(Qv,"{").replace(e1,"}").replace(Xv,"^")}function Jc(e){return bm(e).replace(Jv,"%2B").replace(yO,"+").replace(Yv,"%23").replace(cO,"%26").replace(_O,"`").replace(Qv,"{").replace(e1,"}").replace(Xv,"^")}function bO(e){return Jc(e).replace(mO,"%3D")}function zO(e){return bm(e).replace(Yv,"%23").replace(fO,"%3F")}function CO(e){return e==null?"":zO(e).replace(dO,"%2F")}function wl(e){try{return decodeURIComponent(""+e)}catch{}return""+e}function wO(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let s=0;so&&Jc(o)):[r&&Jc(r)]).forEach(o=>{o!==void 0&&(t+=(t.length?"&":"")+n,o!=null&&(t+="="+o))})}return t}function kO(e){const t={};for(const n in e){const r=e[n];r!==void 0&&(t[n]=Gn(r)?r.map(s=>s==null?null:""+s):r==null?r:""+r)}return t}const xO=Symbol(""),sh=Symbol(""),zm=Symbol(""),t1=Symbol(""),Xc=Symbol("");function To(){let e=[];function t(r){return e.push(r),()=>{const s=e.indexOf(r);s>-1&&e.splice(s,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function Lr(e,t,n,r,s){const o=r&&(r.enterCallbacks[s]=r.enterCallbacks[s]||[]);return()=>new Promise((a,i)=>{const l=d=>{d===!1?i(uo(4,{from:n,to:t})):d instanceof Error?i(d):YT(d)?i(uo(2,{from:t,to:d})):(o&&r.enterCallbacks[s]===o&&typeof d=="function"&&o.push(d),a())},c=e.call(r&&r.instances[s],t,n,l);let m=Promise.resolve(c);e.length<3&&(m=m.then(l)),m.catch(d=>i(d))})}function Wu(e,t,n,r){const s=[];for(const o of e)for(const a in o.components){let i=o.components[a];if(!(t!=="beforeRouteEnter"&&!o.instances[a]))if(EO(i)){const c=(i.__vccOpts||i)[t];c&&s.push(Lr(c,n,r,o,a))}else{let l=i();s.push(()=>l.then(c=>{if(!c)return Promise.reject(new Error(`Couldn't resolve component "${a}" at "${o.path}"`));const m=OT(c)?c.default:c;o.components[a]=m;const f=(m.__vccOpts||m)[t];return f&&Lr(f,n,r,o,a)()}))}}return s}function EO(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function oh(e){const t=qn(zm),n=qn(t1),r=Nt(()=>t.resolve(vn(e.to))),s=Nt(()=>{const{matched:l}=r.value,{length:c}=l,m=l[c-1],d=n.matched;if(!m||!d.length)return-1;const f=d.findIndex(lo.bind(null,m));if(f>-1)return f;const p=ah(l[c-2]);return c>1&&ah(m)===p&&d[d.length-1].path!==p?d.findIndex(lo.bind(null,l[c-2])):f}),o=Nt(()=>s.value>-1&&TO(n.params,r.value.params)),a=Nt(()=>s.value>-1&&s.value===n.matched.length-1&&qv(n.params,r.value.params));function i(l={}){return AO(l)?t[vn(e.replace)?"replace":"push"](vn(e.to)).catch(ea):Promise.resolve()}return{route:r,href:Nt(()=>r.value.href),isActive:o,isExactActive:a,navigate:i}}const SO=zr({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"}},useLink:oh,setup(e,{slots:t}){const n=ho(oh(e)),{options:r}=qn(zm),s=Nt(()=>({[ih(e.activeClass,r.linkActiveClass,"router-link-active")]:n.isActive,[ih(e.exactActiveClass,r.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const o=t.default&&t.default(n);return e.custom?o:tr("a",{"aria-current":n.isExactActive?e.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:s.value},o)}}}),$O=SO;function AO(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function TO(e,t){for(const n in t){const r=t[n],s=e[n];if(typeof r=="string"){if(r!==s)return!1}else if(!Gn(s)||s.length!==r.length||r.some((o,a)=>o!==s[a]))return!1}return!0}function ah(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const ih=(e,t,n)=>e??t??n,OO=zr({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:n}){const r=qn(Xc),s=Nt(()=>e.route||r.value),o=qn(sh,0),a=Nt(()=>{let c=vn(o);const{matched:m}=s.value;let d;for(;(d=m[c])&&!d.components;)c++;return c}),i=Nt(()=>s.value.matched[a.value]);Ko(sh,Nt(()=>a.value+1)),Ko(xO,i),Ko(Xc,s);const l=Xt();return en(()=>[l.value,i.value,e.name],([c,m,d],[f,p,h])=>{m&&(m.instances[d]=c,p&&p!==m&&c&&c===f&&(m.leaveGuards.size||(m.leaveGuards=p.leaveGuards),m.updateGuards.size||(m.updateGuards=p.updateGuards))),c&&m&&(!p||!lo(m,p)||!f)&&(m.enterCallbacks[d]||[]).forEach(_=>_(c))},{flush:"post"}),()=>{const c=s.value,m=e.name,d=i.value,f=d&&d.components[m];if(!f)return lh(n.default,{Component:f,route:c});const p=d.props[m],h=p?p===!0?c.params:typeof p=="function"?p(c):p:null,b=tr(f,it({},h,t,{onVnodeUnmounted:w=>{w.component.isUnmounted&&(d.instances[m]=null)},ref:l}));return lh(n.default,{Component:b,route:c})||b}}});function lh(e,t){if(!e)return null;const n=e(t);return n.length===1?n[0]:n}const DO=OO;function PO(e){const t=aO(e.routes,e),n=e.parseQuery||wO,r=e.stringifyQuery||rh,s=e.history,o=To(),a=To(),i=To(),l=C_(Or);let c=Or;Ls&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const m=ju.bind(null,j=>""+j),d=ju.bind(null,CO),f=ju.bind(null,wl);function p(j,ue){let se,ve;return Kv(j)?(se=t.getRecordMatcher(j),ve=ue):ve=j,t.addRoute(ve,se)}function h(j){const ue=t.getRecordMatcher(j);ue&&t.removeRoute(ue)}function _(){return t.getRoutes().map(j=>j.record)}function b(j){return!!t.getRecordMatcher(j)}function w(j,ue){if(ue=it({},ue||l.value),typeof j=="string"){const I=qu(n,j,ue.path),G=t.resolve({path:I.path},ue),Y=s.createHref(I.fullPath);return it(I,G,{params:f(G.params),hash:wl(I.hash),redirectedFrom:void 0,href:Y})}let se;if("path"in j)se=it({},j,{path:qu(n,j.path,ue.path).path});else{const I=it({},j.params);for(const G in I)I[G]==null&&delete I[G];se=it({},j,{params:d(I)}),ue.params=d(ue.params)}const ve=t.resolve(se,ue),Be=j.hash||"";ve.params=m(f(ve.params));const T=IT(r,it({},j,{hash:vO(Be),path:ve.path})),O=s.createHref(T);return it({fullPath:T,hash:Be,query:r===rh?kO(j.query):j.query||{}},ve,{redirectedFrom:void 0,href:O})}function C(j){return typeof j=="string"?qu(n,j,l.value.path):it({},j)}function z(j,ue){if(c!==j)return uo(8,{from:ue,to:j})}function v(j){return D(j)}function S(j){return v(it(C(j),{replace:!0}))}function A(j){const ue=j.matched[j.matched.length-1];if(ue&&ue.redirect){const{redirect:se}=ue;let ve=typeof se=="function"?se(j):se;return typeof ve=="string"&&(ve=ve.includes("?")||ve.includes("#")?ve=C(ve):{path:ve},ve.params={}),it({query:j.query,hash:j.hash,params:"path"in ve?{}:j.params},ve)}}function D(j,ue){const se=c=w(j),ve=l.value,Be=j.state,T=j.force,O=j.replace===!0,I=A(se);if(I)return D(it(C(I),{state:typeof I=="object"?it({},Be,I.state):Be,force:T,replace:O}),ue||se);const G=se;G.redirectedFrom=ue;let Y;return!T&&FT(r,ve,se)&&(Y=uo(16,{to:G,from:ve}),Ge(ve,ve,!0,!1)),(Y?Promise.resolve(Y):V(G,ve)).catch(X=>mr(X)?mr(X,2)?X:at(X):ae(X,G,ve)).then(X=>{if(X){if(mr(X,2))return D(it({replace:O},C(X.to),{state:typeof X.to=="object"?it({},Be,X.to.state):Be,force:T}),ue||G)}else X=W(G,ve,!0,O,Be);return Z(G,ve,X),X})}function R(j,ue){const se=z(j,ue);return se?Promise.reject(se):Promise.resolve()}function P(j){const ue=pt.values().next().value;return ue&&typeof ue.runWithContext=="function"?ue.runWithContext(j):j()}function V(j,ue){let se;const[ve,Be,T]=IO(j,ue);se=Wu(ve.reverse(),"beforeRouteLeave",j,ue);for(const I of ve)I.leaveGuards.forEach(G=>{se.push(Lr(G,j,ue))});const O=R.bind(null,j,ue);return se.push(O),Ne(se).then(()=>{se=[];for(const I of o.list())se.push(Lr(I,j,ue));return se.push(O),Ne(se)}).then(()=>{se=Wu(Be,"beforeRouteUpdate",j,ue);for(const I of Be)I.updateGuards.forEach(G=>{se.push(Lr(G,j,ue))});return se.push(O),Ne(se)}).then(()=>{se=[];for(const I of T)if(I.beforeEnter)if(Gn(I.beforeEnter))for(const G of I.beforeEnter)se.push(Lr(G,j,ue));else se.push(Lr(I.beforeEnter,j,ue));return se.push(O),Ne(se)}).then(()=>(j.matched.forEach(I=>I.enterCallbacks={}),se=Wu(T,"beforeRouteEnter",j,ue),se.push(O),Ne(se))).then(()=>{se=[];for(const I of a.list())se.push(Lr(I,j,ue));return se.push(O),Ne(se)}).catch(I=>mr(I,8)?I:Promise.reject(I))}function Z(j,ue,se){i.list().forEach(ve=>P(()=>ve(j,ue,se)))}function W(j,ue,se,ve,Be){const T=z(j,ue);if(T)return T;const O=ue===Or,I=Ls?history.state:{};se&&(ve||O?s.replace(j.fullPath,it({scroll:O&&I&&I.scroll},Be)):s.push(j.fullPath,Be)),l.value=j,Ge(j,ue,se,O),at()}let B;function Q(){B||(B=s.listen((j,ue,se)=>{if(!ht.listening)return;const ve=w(j),Be=A(ve);if(Be){D(it(Be,{replace:!0}),ve).catch(ea);return}c=ve;const T=l.value;Ls&&UT(Zp(T.fullPath,se.delta),cu()),V(ve,T).catch(O=>mr(O,12)?O:mr(O,2)?(D(O.to,ve).then(I=>{mr(I,20)&&!se.delta&&se.type===za.pop&&s.go(-1,!1)}).catch(ea),Promise.reject()):(se.delta&&s.go(-se.delta,!1),ae(O,ve,T))).then(O=>{O=O||W(ve,T,!1),O&&(se.delta&&!mr(O,8)?s.go(-se.delta,!1):se.type===za.pop&&mr(O,20)&&s.go(-1,!1)),Z(ve,T,O)}).catch(ea)}))}let fe=To(),K=To(),re;function ae(j,ue,se){at(j);const ve=K.list();return ve.length?ve.forEach(Be=>Be(j,ue,se)):console.error(j),Promise.reject(j)}function Fe(){return re&&l.value!==Or?Promise.resolve():new Promise((j,ue)=>{fe.add([j,ue])})}function at(j){return re||(re=!j,Q(),fe.list().forEach(([ue,se])=>j?se(j):ue()),fe.reset()),j}function Ge(j,ue,se,ve){const{scrollBehavior:Be}=e;if(!Ls||!Be)return Promise.resolve();const T=!se&&jT(Zp(j.fullPath,0))||(ve||!se)&&history.state&&history.state.scroll||null;return Ea().then(()=>Be(j,ue,T)).then(O=>O&&BT(O)).catch(O=>ae(O,j,ue))}const je=j=>s.go(j);let ct;const pt=new Set,ht={currentRoute:l,listening:!0,addRoute:p,removeRoute:h,hasRoute:b,getRoutes:_,resolve:w,options:e,push:v,replace:S,go:je,back:()=>je(-1),forward:()=>je(1),beforeEach:o.add,beforeResolve:a.add,afterEach:i.add,onError:K.add,isReady:Fe,install(j){const ue=this;j.component("RouterLink",$O),j.component("RouterView",DO),j.config.globalProperties.$router=ue,Object.defineProperty(j.config.globalProperties,"$route",{enumerable:!0,get:()=>vn(l)}),Ls&&!ct&&l.value===Or&&(ct=!0,v(s.location).catch(Be=>{}));const se={};for(const Be in Or)Object.defineProperty(se,Be,{get:()=>l.value[Be],enumerable:!0});j.provide(zm,ue),j.provide(t1,Ed(se)),j.provide(Xc,l);const ve=j.unmount;pt.add(j),j.unmount=function(){pt.delete(j),pt.size<1&&(c=Or,B&&B(),B=null,l.value=Or,ct=!1,re=!1),ve()}}};function Ne(j){return j.reduce((ue,se)=>ue.then(()=>P(se)),Promise.resolve())}return ht}function IO(e,t){const n=[],r=[],s=[],o=Math.max(t.matched.length,e.matched.length);for(let a=0;alo(c,i))?r.push(i):n.push(i));const l=e.matched[a];l&&(t.matched.find(c=>lo(c,l))||s.push(l))}return[n,r,s]}const FO={name:"PageAbout",computed:{config(){return this.$store.state.config},library(){return this.$store.state.library}},methods:{showUpdateDialog(){this.$store.commit(wa,!0)}}},RO={class:"fd-page"},LO={class:"section"},NO={class:"container"},MO={class:"columns is-centered"},VO={class:"column is-four-fifths has-text-centered-mobile"},HO=["textContent"],BO={class:"section"},UO={class:"container"},jO={class:"columns is-centered"},qO={class:"column is-four-fifths"},WO={class:"content"},KO={class:"level is-mobile"},GO={class:"level-left"},ZO={class:"level-item"},YO=["textContent"],JO={class:"level-right"},XO={key:0},QO=["textContent"],e3={key:1},t3=["textContent"],n3={class:"table"},r3=["textContent"],s3=["textContent"],o3=["textContent"],a3=["textContent"],i3=["textContent"],l3=["textContent"],u3=["textContent"],c3=["textContent"],d3=["textContent"],m3={class:"has-text-right"},f3=["textContent"],p3=["textContent"],h3=["textContent"],_3={class:"has-text-right"},g3=["textContent"],y3=["textContent"],v3={class:"section"},b3={class:"container"},z3={class:"columns is-centered"},C3={class:"column is-four-fifths"},w3={class:"content has-text-centered-mobile"},k3=["textContent"],x3=["textContent"],E3=u("a",{href:"https://bulma.io"},"Bulma",-1),S3=u("a",{href:"https://pictogrammers.com/library/mdi/"},"Material Design Icons",-1),$3=u("a",{href:"https://vuejs.org/"},"Vue.js",-1),A3=u("a",{href:"https://github.com/mzabriskie/axios"},"axios",-1),T3=["textContent"];function O3(e,t,n,r,s,o){const a=E("i18n-t");return k(),$("div",RO,[u("section",LO,[u("div",NO,[u("div",MO,[u("div",VO,[u("h1",{class:"title is-4",textContent:g(o.config.library_name)},null,8,HO)])])])]),u("section",BO,[u("div",UO,[u("div",jO,[u("div",qO,[u("div",WO,[u("nav",KO,[u("div",GO,[u("div",ZO,[u("h2",{class:"title is-5",textContent:g(e.$t("page.about.library"))},null,8,YO)])]),u("div",JO,[o.library.updating?(k(),$("div",XO,[u("a",{class:"button is-small is-loading",textContent:g(e.$t("page.about.update"))},null,8,QO)])):(k(),$("div",e3,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=i=>o.showUpdateDialog()),textContent:g(e.$t("page.about.update"))},null,8,t3)]))])]),u("table",n3,[u("tbody",null,[u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.artists"))},null,8,r3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.artists))},null,8,s3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.albums"))},null,8,o3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.albums))},null,8,a3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.tracks"))},null,8,i3),u("td",{class:"has-text-right",textContent:g(e.$filters.number(o.library.songs))},null,8,l3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.total-playtime"))},null,8,u3),u("td",{class:"has-text-right",textContent:g(e.$filters.durationInDays(o.library.db_playtime*1e3))},null,8,c3)]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.updated"))},null,8,d3),u("td",m3,[u("span",{textContent:g(e.$t("page.about.updated-on",{time:e.$filters.timeFromNow(o.library.updated_at)}))},null,8,f3),nt(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.updated_at))},null,8,p3),nt(") ")])]),u("tr",null,[u("th",{class:"has-text-left",textContent:g(e.$t("page.about.uptime"))},null,8,h3),u("td",_3,[u("span",{textContent:g(e.$filters.timeFromNow(o.library.started_at,!0))},null,8,g3),nt(" ("),u("span",{class:"has-text-grey",textContent:g(e.$filters.datetime(o.library.started_at))},null,8,y3),nt(") ")])])])])])])])])]),u("section",v3,[u("div",b3,[u("div",z3,[u("div",C3,[u("div",w3,[u("p",{class:"is-size-7",textContent:g(e.$t("page.about.version",{version:o.config.version}))},null,8,k3),u("p",{class:"is-size-7",textContent:g(e.$t("page.about.compiled-with",{options:o.config.buildoptions.join(", ")}))},null,8,x3),y(a,{tag:"p",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:x(()=>[E3]),mdi:x(()=>[S3]),vuejs:x(()=>[$3]),axios:x(()=>[A3]),others:x(()=>[u("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:g(e.$t("page.about.more"))},null,8,T3)]),_:1})])])])])])])}const D3=te(FO,[["render",O3]]),P3={},I3={class:"hero is-light is-bold"},F3={class:"hero-body"},R3={class:"container"},L3={class:"columns is-centered"},N3={class:"column is-four-fifths"},M3={class:"columns is-flex-direction-row-reverse"},V3={class:"column fd-has-cover"},H3={class:"column m-auto is-three-fifths has-text-centered-mobile"},B3={class:"section pt-0"},U3={class:"container"},j3={class:"columns is-centered"},q3={class:"column is-four-fifths"};function W3(e,t){return k(),$(Ce,null,[u("section",I3,[u("div",F3,[u("div",R3,[u("div",L3,[u("div",N3,[u("div",M3,[u("div",V3,[ot(e.$slots,"heading-right")]),u("div",H3,[ot(e.$slots,"heading-left")])])])])])])]),u("section",B3,[u("div",U3,[u("div",j3,[u("div",q3,[ot(e.$slots,"content"),ot(e.$slots,"footer")])])])])],64)}const du=te(P3,[["render",W3]]);var n1={exports:{}},K3=[{value:"#B0171F",name:"indian red"},{value:"#DC143C",css:!0,name:"crimson"},{value:"#FFB6C1",css:!0,name:"lightpink"},{value:"#FFAEB9",name:"lightpink 1"},{value:"#EEA2AD",name:"lightpink 2"},{value:"#CD8C95",name:"lightpink 3"},{value:"#8B5F65",name:"lightpink 4"},{value:"#FFC0CB",css:!0,name:"pink"},{value:"#FFB5C5",name:"pink 1"},{value:"#EEA9B8",name:"pink 2"},{value:"#CD919E",name:"pink 3"},{value:"#8B636C",name:"pink 4"},{value:"#DB7093",css:!0,name:"palevioletred"},{value:"#FF82AB",name:"palevioletred 1"},{value:"#EE799F",name:"palevioletred 2"},{value:"#CD6889",name:"palevioletred 3"},{value:"#8B475D",name:"palevioletred 4"},{value:"#FFF0F5",name:"lavenderblush 1"},{value:"#FFF0F5",css:!0,name:"lavenderblush"},{value:"#EEE0E5",name:"lavenderblush 2"},{value:"#CDC1C5",name:"lavenderblush 3"},{value:"#8B8386",name:"lavenderblush 4"},{value:"#FF3E96",name:"violetred 1"},{value:"#EE3A8C",name:"violetred 2"},{value:"#CD3278",name:"violetred 3"},{value:"#8B2252",name:"violetred 4"},{value:"#FF69B4",css:!0,name:"hotpink"},{value:"#FF6EB4",name:"hotpink 1"},{value:"#EE6AA7",name:"hotpink 2"},{value:"#CD6090",name:"hotpink 3"},{value:"#8B3A62",name:"hotpink 4"},{value:"#872657",name:"raspberry"},{value:"#FF1493",name:"deeppink 1"},{value:"#FF1493",css:!0,name:"deeppink"},{value:"#EE1289",name:"deeppink 2"},{value:"#CD1076",name:"deeppink 3"},{value:"#8B0A50",name:"deeppink 4"},{value:"#FF34B3",name:"maroon 1"},{value:"#EE30A7",name:"maroon 2"},{value:"#CD2990",name:"maroon 3"},{value:"#8B1C62",name:"maroon 4"},{value:"#C71585",css:!0,name:"mediumvioletred"},{value:"#D02090",name:"violetred"},{value:"#DA70D6",css:!0,name:"orchid"},{value:"#FF83FA",name:"orchid 1"},{value:"#EE7AE9",name:"orchid 2"},{value:"#CD69C9",name:"orchid 3"},{value:"#8B4789",name:"orchid 4"},{value:"#D8BFD8",css:!0,name:"thistle"},{value:"#FFE1FF",name:"thistle 1"},{value:"#EED2EE",name:"thistle 2"},{value:"#CDB5CD",name:"thistle 3"},{value:"#8B7B8B",name:"thistle 4"},{value:"#FFBBFF",name:"plum 1"},{value:"#EEAEEE",name:"plum 2"},{value:"#CD96CD",name:"plum 3"},{value:"#8B668B",name:"plum 4"},{value:"#DDA0DD",css:!0,name:"plum"},{value:"#EE82EE",css:!0,name:"violet"},{value:"#FF00FF",vga:!0,name:"magenta"},{value:"#FF00FF",vga:!0,css:!0,name:"fuchsia"},{value:"#EE00EE",name:"magenta 2"},{value:"#CD00CD",name:"magenta 3"},{value:"#8B008B",name:"magenta 4"},{value:"#8B008B",css:!0,name:"darkmagenta"},{value:"#800080",vga:!0,css:!0,name:"purple"},{value:"#BA55D3",css:!0,name:"mediumorchid"},{value:"#E066FF",name:"mediumorchid 1"},{value:"#D15FEE",name:"mediumorchid 2"},{value:"#B452CD",name:"mediumorchid 3"},{value:"#7A378B",name:"mediumorchid 4"},{value:"#9400D3",css:!0,name:"darkviolet"},{value:"#9932CC",css:!0,name:"darkorchid"},{value:"#BF3EFF",name:"darkorchid 1"},{value:"#B23AEE",name:"darkorchid 2"},{value:"#9A32CD",name:"darkorchid 3"},{value:"#68228B",name:"darkorchid 4"},{value:"#4B0082",css:!0,name:"indigo"},{value:"#8A2BE2",css:!0,name:"blueviolet"},{value:"#9B30FF",name:"purple 1"},{value:"#912CEE",name:"purple 2"},{value:"#7D26CD",name:"purple 3"},{value:"#551A8B",name:"purple 4"},{value:"#9370DB",css:!0,name:"mediumpurple"},{value:"#AB82FF",name:"mediumpurple 1"},{value:"#9F79EE",name:"mediumpurple 2"},{value:"#8968CD",name:"mediumpurple 3"},{value:"#5D478B",name:"mediumpurple 4"},{value:"#483D8B",css:!0,name:"darkslateblue"},{value:"#8470FF",name:"lightslateblue"},{value:"#7B68EE",css:!0,name:"mediumslateblue"},{value:"#6A5ACD",css:!0,name:"slateblue"},{value:"#836FFF",name:"slateblue 1"},{value:"#7A67EE",name:"slateblue 2"},{value:"#6959CD",name:"slateblue 3"},{value:"#473C8B",name:"slateblue 4"},{value:"#F8F8FF",css:!0,name:"ghostwhite"},{value:"#E6E6FA",css:!0,name:"lavender"},{value:"#0000FF",vga:!0,css:!0,name:"blue"},{value:"#0000EE",name:"blue 2"},{value:"#0000CD",name:"blue 3"},{value:"#0000CD",css:!0,name:"mediumblue"},{value:"#00008B",name:"blue 4"},{value:"#00008B",css:!0,name:"darkblue"},{value:"#000080",vga:!0,css:!0,name:"navy"},{value:"#191970",css:!0,name:"midnightblue"},{value:"#3D59AB",name:"cobalt"},{value:"#4169E1",css:!0,name:"royalblue"},{value:"#4876FF",name:"royalblue 1"},{value:"#436EEE",name:"royalblue 2"},{value:"#3A5FCD",name:"royalblue 3"},{value:"#27408B",name:"royalblue 4"},{value:"#6495ED",css:!0,name:"cornflowerblue"},{value:"#B0C4DE",css:!0,name:"lightsteelblue"},{value:"#CAE1FF",name:"lightsteelblue 1"},{value:"#BCD2EE",name:"lightsteelblue 2"},{value:"#A2B5CD",name:"lightsteelblue 3"},{value:"#6E7B8B",name:"lightsteelblue 4"},{value:"#778899",css:!0,name:"lightslategray"},{value:"#708090",css:!0,name:"slategray"},{value:"#C6E2FF",name:"slategray 1"},{value:"#B9D3EE",name:"slategray 2"},{value:"#9FB6CD",name:"slategray 3"},{value:"#6C7B8B",name:"slategray 4"},{value:"#1E90FF",name:"dodgerblue 1"},{value:"#1E90FF",css:!0,name:"dodgerblue"},{value:"#1C86EE",name:"dodgerblue 2"},{value:"#1874CD",name:"dodgerblue 3"},{value:"#104E8B",name:"dodgerblue 4"},{value:"#F0F8FF",css:!0,name:"aliceblue"},{value:"#4682B4",css:!0,name:"steelblue"},{value:"#63B8FF",name:"steelblue 1"},{value:"#5CACEE",name:"steelblue 2"},{value:"#4F94CD",name:"steelblue 3"},{value:"#36648B",name:"steelblue 4"},{value:"#87CEFA",css:!0,name:"lightskyblue"},{value:"#B0E2FF",name:"lightskyblue 1"},{value:"#A4D3EE",name:"lightskyblue 2"},{value:"#8DB6CD",name:"lightskyblue 3"},{value:"#607B8B",name:"lightskyblue 4"},{value:"#87CEFF",name:"skyblue 1"},{value:"#7EC0EE",name:"skyblue 2"},{value:"#6CA6CD",name:"skyblue 3"},{value:"#4A708B",name:"skyblue 4"},{value:"#87CEEB",css:!0,name:"skyblue"},{value:"#00BFFF",name:"deepskyblue 1"},{value:"#00BFFF",css:!0,name:"deepskyblue"},{value:"#00B2EE",name:"deepskyblue 2"},{value:"#009ACD",name:"deepskyblue 3"},{value:"#00688B",name:"deepskyblue 4"},{value:"#33A1C9",name:"peacock"},{value:"#ADD8E6",css:!0,name:"lightblue"},{value:"#BFEFFF",name:"lightblue 1"},{value:"#B2DFEE",name:"lightblue 2"},{value:"#9AC0CD",name:"lightblue 3"},{value:"#68838B",name:"lightblue 4"},{value:"#B0E0E6",css:!0,name:"powderblue"},{value:"#98F5FF",name:"cadetblue 1"},{value:"#8EE5EE",name:"cadetblue 2"},{value:"#7AC5CD",name:"cadetblue 3"},{value:"#53868B",name:"cadetblue 4"},{value:"#00F5FF",name:"turquoise 1"},{value:"#00E5EE",name:"turquoise 2"},{value:"#00C5CD",name:"turquoise 3"},{value:"#00868B",name:"turquoise 4"},{value:"#5F9EA0",css:!0,name:"cadetblue"},{value:"#00CED1",css:!0,name:"darkturquoise"},{value:"#F0FFFF",name:"azure 1"},{value:"#F0FFFF",css:!0,name:"azure"},{value:"#E0EEEE",name:"azure 2"},{value:"#C1CDCD",name:"azure 3"},{value:"#838B8B",name:"azure 4"},{value:"#E0FFFF",name:"lightcyan 1"},{value:"#E0FFFF",css:!0,name:"lightcyan"},{value:"#D1EEEE",name:"lightcyan 2"},{value:"#B4CDCD",name:"lightcyan 3"},{value:"#7A8B8B",name:"lightcyan 4"},{value:"#BBFFFF",name:"paleturquoise 1"},{value:"#AEEEEE",name:"paleturquoise 2"},{value:"#AEEEEE",css:!0,name:"paleturquoise"},{value:"#96CDCD",name:"paleturquoise 3"},{value:"#668B8B",name:"paleturquoise 4"},{value:"#2F4F4F",css:!0,name:"darkslategray"},{value:"#97FFFF",name:"darkslategray 1"},{value:"#8DEEEE",name:"darkslategray 2"},{value:"#79CDCD",name:"darkslategray 3"},{value:"#528B8B",name:"darkslategray 4"},{value:"#00FFFF",name:"cyan"},{value:"#00FFFF",css:!0,name:"aqua"},{value:"#00EEEE",name:"cyan 2"},{value:"#00CDCD",name:"cyan 3"},{value:"#008B8B",name:"cyan 4"},{value:"#008B8B",css:!0,name:"darkcyan"},{value:"#008080",vga:!0,css:!0,name:"teal"},{value:"#48D1CC",css:!0,name:"mediumturquoise"},{value:"#20B2AA",css:!0,name:"lightseagreen"},{value:"#03A89E",name:"manganeseblue"},{value:"#40E0D0",css:!0,name:"turquoise"},{value:"#808A87",name:"coldgrey"},{value:"#00C78C",name:"turquoiseblue"},{value:"#7FFFD4",name:"aquamarine 1"},{value:"#7FFFD4",css:!0,name:"aquamarine"},{value:"#76EEC6",name:"aquamarine 2"},{value:"#66CDAA",name:"aquamarine 3"},{value:"#66CDAA",css:!0,name:"mediumaquamarine"},{value:"#458B74",name:"aquamarine 4"},{value:"#00FA9A",css:!0,name:"mediumspringgreen"},{value:"#F5FFFA",css:!0,name:"mintcream"},{value:"#00FF7F",css:!0,name:"springgreen"},{value:"#00EE76",name:"springgreen 1"},{value:"#00CD66",name:"springgreen 2"},{value:"#008B45",name:"springgreen 3"},{value:"#3CB371",css:!0,name:"mediumseagreen"},{value:"#54FF9F",name:"seagreen 1"},{value:"#4EEE94",name:"seagreen 2"},{value:"#43CD80",name:"seagreen 3"},{value:"#2E8B57",name:"seagreen 4"},{value:"#2E8B57",css:!0,name:"seagreen"},{value:"#00C957",name:"emeraldgreen"},{value:"#BDFCC9",name:"mint"},{value:"#3D9140",name:"cobaltgreen"},{value:"#F0FFF0",name:"honeydew 1"},{value:"#F0FFF0",css:!0,name:"honeydew"},{value:"#E0EEE0",name:"honeydew 2"},{value:"#C1CDC1",name:"honeydew 3"},{value:"#838B83",name:"honeydew 4"},{value:"#8FBC8F",css:!0,name:"darkseagreen"},{value:"#C1FFC1",name:"darkseagreen 1"},{value:"#B4EEB4",name:"darkseagreen 2"},{value:"#9BCD9B",name:"darkseagreen 3"},{value:"#698B69",name:"darkseagreen 4"},{value:"#98FB98",css:!0,name:"palegreen"},{value:"#9AFF9A",name:"palegreen 1"},{value:"#90EE90",name:"palegreen 2"},{value:"#90EE90",css:!0,name:"lightgreen"},{value:"#7CCD7C",name:"palegreen 3"},{value:"#548B54",name:"palegreen 4"},{value:"#32CD32",css:!0,name:"limegreen"},{value:"#228B22",css:!0,name:"forestgreen"},{value:"#00FF00",vga:!0,name:"green 1"},{value:"#00FF00",vga:!0,css:!0,name:"lime"},{value:"#00EE00",name:"green 2"},{value:"#00CD00",name:"green 3"},{value:"#008B00",name:"green 4"},{value:"#008000",vga:!0,css:!0,name:"green"},{value:"#006400",css:!0,name:"darkgreen"},{value:"#308014",name:"sapgreen"},{value:"#7CFC00",css:!0,name:"lawngreen"},{value:"#7FFF00",name:"chartreuse 1"},{value:"#7FFF00",css:!0,name:"chartreuse"},{value:"#76EE00",name:"chartreuse 2"},{value:"#66CD00",name:"chartreuse 3"},{value:"#458B00",name:"chartreuse 4"},{value:"#ADFF2F",css:!0,name:"greenyellow"},{value:"#CAFF70",name:"darkolivegreen 1"},{value:"#BCEE68",name:"darkolivegreen 2"},{value:"#A2CD5A",name:"darkolivegreen 3"},{value:"#6E8B3D",name:"darkolivegreen 4"},{value:"#556B2F",css:!0,name:"darkolivegreen"},{value:"#6B8E23",css:!0,name:"olivedrab"},{value:"#C0FF3E",name:"olivedrab 1"},{value:"#B3EE3A",name:"olivedrab 2"},{value:"#9ACD32",name:"olivedrab 3"},{value:"#9ACD32",css:!0,name:"yellowgreen"},{value:"#698B22",name:"olivedrab 4"},{value:"#FFFFF0",name:"ivory 1"},{value:"#FFFFF0",css:!0,name:"ivory"},{value:"#EEEEE0",name:"ivory 2"},{value:"#CDCDC1",name:"ivory 3"},{value:"#8B8B83",name:"ivory 4"},{value:"#F5F5DC",css:!0,name:"beige"},{value:"#FFFFE0",name:"lightyellow 1"},{value:"#FFFFE0",css:!0,name:"lightyellow"},{value:"#EEEED1",name:"lightyellow 2"},{value:"#CDCDB4",name:"lightyellow 3"},{value:"#8B8B7A",name:"lightyellow 4"},{value:"#FAFAD2",css:!0,name:"lightgoldenrodyellow"},{value:"#FFFF00",vga:!0,name:"yellow 1"},{value:"#FFFF00",vga:!0,css:!0,name:"yellow"},{value:"#EEEE00",name:"yellow 2"},{value:"#CDCD00",name:"yellow 3"},{value:"#8B8B00",name:"yellow 4"},{value:"#808069",name:"warmgrey"},{value:"#808000",vga:!0,css:!0,name:"olive"},{value:"#BDB76B",css:!0,name:"darkkhaki"},{value:"#FFF68F",name:"khaki 1"},{value:"#EEE685",name:"khaki 2"},{value:"#CDC673",name:"khaki 3"},{value:"#8B864E",name:"khaki 4"},{value:"#F0E68C",css:!0,name:"khaki"},{value:"#EEE8AA",css:!0,name:"palegoldenrod"},{value:"#FFFACD",name:"lemonchiffon 1"},{value:"#FFFACD",css:!0,name:"lemonchiffon"},{value:"#EEE9BF",name:"lemonchiffon 2"},{value:"#CDC9A5",name:"lemonchiffon 3"},{value:"#8B8970",name:"lemonchiffon 4"},{value:"#FFEC8B",name:"lightgoldenrod 1"},{value:"#EEDC82",name:"lightgoldenrod 2"},{value:"#CDBE70",name:"lightgoldenrod 3"},{value:"#8B814C",name:"lightgoldenrod 4"},{value:"#E3CF57",name:"banana"},{value:"#FFD700",name:"gold 1"},{value:"#FFD700",css:!0,name:"gold"},{value:"#EEC900",name:"gold 2"},{value:"#CDAD00",name:"gold 3"},{value:"#8B7500",name:"gold 4"},{value:"#FFF8DC",name:"cornsilk 1"},{value:"#FFF8DC",css:!0,name:"cornsilk"},{value:"#EEE8CD",name:"cornsilk 2"},{value:"#CDC8B1",name:"cornsilk 3"},{value:"#8B8878",name:"cornsilk 4"},{value:"#DAA520",css:!0,name:"goldenrod"},{value:"#FFC125",name:"goldenrod 1"},{value:"#EEB422",name:"goldenrod 2"},{value:"#CD9B1D",name:"goldenrod 3"},{value:"#8B6914",name:"goldenrod 4"},{value:"#B8860B",css:!0,name:"darkgoldenrod"},{value:"#FFB90F",name:"darkgoldenrod 1"},{value:"#EEAD0E",name:"darkgoldenrod 2"},{value:"#CD950C",name:"darkgoldenrod 3"},{value:"#8B6508",name:"darkgoldenrod 4"},{value:"#FFA500",name:"orange 1"},{value:"#FF8000",css:!0,name:"orange"},{value:"#EE9A00",name:"orange 2"},{value:"#CD8500",name:"orange 3"},{value:"#8B5A00",name:"orange 4"},{value:"#FFFAF0",css:!0,name:"floralwhite"},{value:"#FDF5E6",css:!0,name:"oldlace"},{value:"#F5DEB3",css:!0,name:"wheat"},{value:"#FFE7BA",name:"wheat 1"},{value:"#EED8AE",name:"wheat 2"},{value:"#CDBA96",name:"wheat 3"},{value:"#8B7E66",name:"wheat 4"},{value:"#FFE4B5",css:!0,name:"moccasin"},{value:"#FFEFD5",css:!0,name:"papayawhip"},{value:"#FFEBCD",css:!0,name:"blanchedalmond"},{value:"#FFDEAD",name:"navajowhite 1"},{value:"#FFDEAD",css:!0,name:"navajowhite"},{value:"#EECFA1",name:"navajowhite 2"},{value:"#CDB38B",name:"navajowhite 3"},{value:"#8B795E",name:"navajowhite 4"},{value:"#FCE6C9",name:"eggshell"},{value:"#D2B48C",css:!0,name:"tan"},{value:"#9C661F",name:"brick"},{value:"#FF9912",name:"cadmiumyellow"},{value:"#FAEBD7",css:!0,name:"antiquewhite"},{value:"#FFEFDB",name:"antiquewhite 1"},{value:"#EEDFCC",name:"antiquewhite 2"},{value:"#CDC0B0",name:"antiquewhite 3"},{value:"#8B8378",name:"antiquewhite 4"},{value:"#DEB887",css:!0,name:"burlywood"},{value:"#FFD39B",name:"burlywood 1"},{value:"#EEC591",name:"burlywood 2"},{value:"#CDAA7D",name:"burlywood 3"},{value:"#8B7355",name:"burlywood 4"},{value:"#FFE4C4",name:"bisque 1"},{value:"#FFE4C4",css:!0,name:"bisque"},{value:"#EED5B7",name:"bisque 2"},{value:"#CDB79E",name:"bisque 3"},{value:"#8B7D6B",name:"bisque 4"},{value:"#E3A869",name:"melon"},{value:"#ED9121",name:"carrot"},{value:"#FF8C00",css:!0,name:"darkorange"},{value:"#FF7F00",name:"darkorange 1"},{value:"#EE7600",name:"darkorange 2"},{value:"#CD6600",name:"darkorange 3"},{value:"#8B4500",name:"darkorange 4"},{value:"#FFA54F",name:"tan 1"},{value:"#EE9A49",name:"tan 2"},{value:"#CD853F",name:"tan 3"},{value:"#CD853F",css:!0,name:"peru"},{value:"#8B5A2B",name:"tan 4"},{value:"#FAF0E6",css:!0,name:"linen"},{value:"#FFDAB9",name:"peachpuff 1"},{value:"#FFDAB9",css:!0,name:"peachpuff"},{value:"#EECBAD",name:"peachpuff 2"},{value:"#CDAF95",name:"peachpuff 3"},{value:"#8B7765",name:"peachpuff 4"},{value:"#FFF5EE",name:"seashell 1"},{value:"#FFF5EE",css:!0,name:"seashell"},{value:"#EEE5DE",name:"seashell 2"},{value:"#CDC5BF",name:"seashell 3"},{value:"#8B8682",name:"seashell 4"},{value:"#F4A460",css:!0,name:"sandybrown"},{value:"#C76114",name:"rawsienna"},{value:"#D2691E",css:!0,name:"chocolate"},{value:"#FF7F24",name:"chocolate 1"},{value:"#EE7621",name:"chocolate 2"},{value:"#CD661D",name:"chocolate 3"},{value:"#8B4513",name:"chocolate 4"},{value:"#8B4513",css:!0,name:"saddlebrown"},{value:"#292421",name:"ivoryblack"},{value:"#FF7D40",name:"flesh"},{value:"#FF6103",name:"cadmiumorange"},{value:"#8A360F",name:"burntsienna"},{value:"#A0522D",css:!0,name:"sienna"},{value:"#FF8247",name:"sienna 1"},{value:"#EE7942",name:"sienna 2"},{value:"#CD6839",name:"sienna 3"},{value:"#8B4726",name:"sienna 4"},{value:"#FFA07A",name:"lightsalmon 1"},{value:"#FFA07A",css:!0,name:"lightsalmon"},{value:"#EE9572",name:"lightsalmon 2"},{value:"#CD8162",name:"lightsalmon 3"},{value:"#8B5742",name:"lightsalmon 4"},{value:"#FF7F50",css:!0,name:"coral"},{value:"#FF4500",name:"orangered 1"},{value:"#FF4500",css:!0,name:"orangered"},{value:"#EE4000",name:"orangered 2"},{value:"#CD3700",name:"orangered 3"},{value:"#8B2500",name:"orangered 4"},{value:"#5E2612",name:"sepia"},{value:"#E9967A",css:!0,name:"darksalmon"},{value:"#FF8C69",name:"salmon 1"},{value:"#EE8262",name:"salmon 2"},{value:"#CD7054",name:"salmon 3"},{value:"#8B4C39",name:"salmon 4"},{value:"#FF7256",name:"coral 1"},{value:"#EE6A50",name:"coral 2"},{value:"#CD5B45",name:"coral 3"},{value:"#8B3E2F",name:"coral 4"},{value:"#8A3324",name:"burntumber"},{value:"#FF6347",name:"tomato 1"},{value:"#FF6347",css:!0,name:"tomato"},{value:"#EE5C42",name:"tomato 2"},{value:"#CD4F39",name:"tomato 3"},{value:"#8B3626",name:"tomato 4"},{value:"#FA8072",css:!0,name:"salmon"},{value:"#FFE4E1",name:"mistyrose 1"},{value:"#FFE4E1",css:!0,name:"mistyrose"},{value:"#EED5D2",name:"mistyrose 2"},{value:"#CDB7B5",name:"mistyrose 3"},{value:"#8B7D7B",name:"mistyrose 4"},{value:"#FFFAFA",name:"snow 1"},{value:"#FFFAFA",css:!0,name:"snow"},{value:"#EEE9E9",name:"snow 2"},{value:"#CDC9C9",name:"snow 3"},{value:"#8B8989",name:"snow 4"},{value:"#BC8F8F",css:!0,name:"rosybrown"},{value:"#FFC1C1",name:"rosybrown 1"},{value:"#EEB4B4",name:"rosybrown 2"},{value:"#CD9B9B",name:"rosybrown 3"},{value:"#8B6969",name:"rosybrown 4"},{value:"#F08080",css:!0,name:"lightcoral"},{value:"#CD5C5C",css:!0,name:"indianred"},{value:"#FF6A6A",name:"indianred 1"},{value:"#EE6363",name:"indianred 2"},{value:"#8B3A3A",name:"indianred 4"},{value:"#CD5555",name:"indianred 3"},{value:"#A52A2A",css:!0,name:"brown"},{value:"#FF4040",name:"brown 1"},{value:"#EE3B3B",name:"brown 2"},{value:"#CD3333",name:"brown 3"},{value:"#8B2323",name:"brown 4"},{value:"#B22222",css:!0,name:"firebrick"},{value:"#FF3030",name:"firebrick 1"},{value:"#EE2C2C",name:"firebrick 2"},{value:"#CD2626",name:"firebrick 3"},{value:"#8B1A1A",name:"firebrick 4"},{value:"#FF0000",vga:!0,name:"red 1"},{value:"#FF0000",vga:!0,css:!0,name:"red"},{value:"#EE0000",name:"red 2"},{value:"#CD0000",name:"red 3"},{value:"#8B0000",name:"red 4"},{value:"#8B0000",css:!0,name:"darkred"},{value:"#800000",vga:!0,css:!0,name:"maroon"},{value:"#8E388E",name:"sgi beet"},{value:"#7171C6",name:"sgi slateblue"},{value:"#7D9EC0",name:"sgi lightblue"},{value:"#388E8E",name:"sgi teal"},{value:"#71C671",name:"sgi chartreuse"},{value:"#8E8E38",name:"sgi olivedrab"},{value:"#C5C1AA",name:"sgi brightgray"},{value:"#C67171",name:"sgi salmon"},{value:"#555555",name:"sgi darkgray"},{value:"#1E1E1E",name:"sgi gray 12"},{value:"#282828",name:"sgi gray 16"},{value:"#515151",name:"sgi gray 32"},{value:"#5B5B5B",name:"sgi gray 36"},{value:"#848484",name:"sgi gray 52"},{value:"#8E8E8E",name:"sgi gray 56"},{value:"#AAAAAA",name:"sgi lightgray"},{value:"#B7B7B7",name:"sgi gray 72"},{value:"#C1C1C1",name:"sgi gray 76"},{value:"#EAEAEA",name:"sgi gray 92"},{value:"#F4F4F4",name:"sgi gray 96"},{value:"#FFFFFF",vga:!0,css:!0,name:"white"},{value:"#F5F5F5",name:"white smoke"},{value:"#F5F5F5",name:"gray 96"},{value:"#DCDCDC",css:!0,name:"gainsboro"},{value:"#D3D3D3",css:!0,name:"lightgrey"},{value:"#C0C0C0",vga:!0,css:!0,name:"silver"},{value:"#A9A9A9",css:!0,name:"darkgray"},{value:"#808080",vga:!0,css:!0,name:"gray"},{value:"#696969",css:!0,name:"dimgray"},{value:"#696969",name:"gray 42"},{value:"#000000",vga:!0,css:!0,name:"black"},{value:"#FCFCFC",name:"gray 99"},{value:"#FAFAFA",name:"gray 98"},{value:"#F7F7F7",name:"gray 97"},{value:"#F2F2F2",name:"gray 95"},{value:"#F0F0F0",name:"gray 94"},{value:"#EDEDED",name:"gray 93"},{value:"#EBEBEB",name:"gray 92"},{value:"#E8E8E8",name:"gray 91"},{value:"#E5E5E5",name:"gray 90"},{value:"#E3E3E3",name:"gray 89"},{value:"#E0E0E0",name:"gray 88"},{value:"#DEDEDE",name:"gray 87"},{value:"#DBDBDB",name:"gray 86"},{value:"#D9D9D9",name:"gray 85"},{value:"#D6D6D6",name:"gray 84"},{value:"#D4D4D4",name:"gray 83"},{value:"#D1D1D1",name:"gray 82"},{value:"#CFCFCF",name:"gray 81"},{value:"#CCCCCC",name:"gray 80"},{value:"#C9C9C9",name:"gray 79"},{value:"#C7C7C7",name:"gray 78"},{value:"#C4C4C4",name:"gray 77"},{value:"#C2C2C2",name:"gray 76"},{value:"#BFBFBF",name:"gray 75"},{value:"#BDBDBD",name:"gray 74"},{value:"#BABABA",name:"gray 73"},{value:"#B8B8B8",name:"gray 72"},{value:"#B5B5B5",name:"gray 71"},{value:"#B3B3B3",name:"gray 70"},{value:"#B0B0B0",name:"gray 69"},{value:"#ADADAD",name:"gray 68"},{value:"#ABABAB",name:"gray 67"},{value:"#A8A8A8",name:"gray 66"},{value:"#A6A6A6",name:"gray 65"},{value:"#A3A3A3",name:"gray 64"},{value:"#A1A1A1",name:"gray 63"},{value:"#9E9E9E",name:"gray 62"},{value:"#9C9C9C",name:"gray 61"},{value:"#999999",name:"gray 60"},{value:"#969696",name:"gray 59"},{value:"#949494",name:"gray 58"},{value:"#919191",name:"gray 57"},{value:"#8F8F8F",name:"gray 56"},{value:"#8C8C8C",name:"gray 55"},{value:"#8A8A8A",name:"gray 54"},{value:"#878787",name:"gray 53"},{value:"#858585",name:"gray 52"},{value:"#828282",name:"gray 51"},{value:"#7F7F7F",name:"gray 50"},{value:"#7D7D7D",name:"gray 49"},{value:"#7A7A7A",name:"gray 48"},{value:"#787878",name:"gray 47"},{value:"#757575",name:"gray 46"},{value:"#737373",name:"gray 45"},{value:"#707070",name:"gray 44"},{value:"#6E6E6E",name:"gray 43"},{value:"#666666",name:"gray 40"},{value:"#636363",name:"gray 39"},{value:"#616161",name:"gray 38"},{value:"#5E5E5E",name:"gray 37"},{value:"#5C5C5C",name:"gray 36"},{value:"#595959",name:"gray 35"},{value:"#575757",name:"gray 34"},{value:"#545454",name:"gray 33"},{value:"#525252",name:"gray 32"},{value:"#4F4F4F",name:"gray 31"},{value:"#4D4D4D",name:"gray 30"},{value:"#4A4A4A",name:"gray 29"},{value:"#474747",name:"gray 28"},{value:"#454545",name:"gray 27"},{value:"#424242",name:"gray 26"},{value:"#404040",name:"gray 25"},{value:"#3D3D3D",name:"gray 24"},{value:"#3B3B3B",name:"gray 23"},{value:"#383838",name:"gray 22"},{value:"#363636",name:"gray 21"},{value:"#333333",name:"gray 20"},{value:"#303030",name:"gray 19"},{value:"#2E2E2E",name:"gray 18"},{value:"#2B2B2B",name:"gray 17"},{value:"#292929",name:"gray 16"},{value:"#262626",name:"gray 15"},{value:"#242424",name:"gray 14"},{value:"#212121",name:"gray 13"},{value:"#1F1F1F",name:"gray 12"},{value:"#1C1C1C",name:"gray 11"},{value:"#1A1A1A",name:"gray 10"},{value:"#171717",name:"gray 9"},{value:"#141414",name:"gray 8"},{value:"#121212",name:"gray 7"},{value:"#0F0F0F",name:"gray 6"},{value:"#0D0D0D",name:"gray 5"},{value:"#0A0A0A",name:"gray 4"},{value:"#080808",name:"gray 3"},{value:"#050505",name:"gray 2"},{value:"#030303",name:"gray 1"},{value:"#F5F5F5",css:!0,name:"whitesmoke"}];(function(e){var t=K3,n=t.filter(function(s){return!!s.css}),r=t.filter(function(s){return!!s.vga});e.exports=function(s){var o=e.exports.get(s);return o&&o.value},e.exports.get=function(s){return s=s||"",s=s.trim().toLowerCase(),t.filter(function(o){return o.name.toLowerCase()===s}).pop()},e.exports.all=e.exports.get.all=function(){return t},e.exports.get.css=function(s){return s?(s=s||"",s=s.trim().toLowerCase(),n.filter(function(o){return o.name.toLowerCase()===s}).pop()):n},e.exports.get.vga=function(s){return s?(s=s||"",s=s.trim().toLowerCase(),r.filter(function(o){return o.name.toLowerCase()===s}).pop()):r}})(n1);var G3=n1.exports,Z3=1/0,Y3="[object Symbol]",J3=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,r1="\\ud800-\\udfff",X3="\\u0300-\\u036f\\ufe20-\\ufe23",Q3="\\u20d0-\\u20f0",s1="\\u2700-\\u27bf",o1="a-z\\xdf-\\xf6\\xf8-\\xff",e6="\\xac\\xb1\\xd7\\xf7",t6="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",n6="\\u2000-\\u206f",r6=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",a1="A-Z\\xc0-\\xd6\\xd8-\\xde",s6="\\ufe0e\\ufe0f",i1=e6+t6+n6+r6,l1="['’]",uh="["+i1+"]",o6="["+X3+Q3+"]",u1="\\d+",a6="["+s1+"]",c1="["+o1+"]",d1="[^"+r1+i1+u1+s1+o1+a1+"]",i6="\\ud83c[\\udffb-\\udfff]",l6="(?:"+o6+"|"+i6+")",u6="[^"+r1+"]",m1="(?:\\ud83c[\\udde6-\\uddff]){2}",f1="[\\ud800-\\udbff][\\udc00-\\udfff]",Ns="["+a1+"]",c6="\\u200d",ch="(?:"+c1+"|"+d1+")",d6="(?:"+Ns+"|"+d1+")",dh="(?:"+l1+"(?:d|ll|m|re|s|t|ve))?",mh="(?:"+l1+"(?:D|LL|M|RE|S|T|VE))?",p1=l6+"?",h1="["+s6+"]?",m6="(?:"+c6+"(?:"+[u6,m1,f1].join("|")+")"+h1+p1+")*",f6=h1+p1+m6,p6="(?:"+[a6,m1,f1].join("|")+")"+f6,h6=RegExp([Ns+"?"+c1+"+"+dh+"(?="+[uh,Ns,"$"].join("|")+")",d6+"+"+mh+"(?="+[uh,Ns+ch,"$"].join("|")+")",Ns+"?"+ch+"+"+dh,Ns+"+"+mh,u1,p6].join("|"),"g"),_6=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,g6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,y6=typeof self=="object"&&self&&self.Object===Object&&self,v6=g6||y6||Function("return this")();function b6(e){return e.match(J3)||[]}function z6(e){return _6.test(e)}function C6(e){return e.match(h6)||[]}var w6=Object.prototype,k6=w6.toString,fh=v6.Symbol,ph=fh?fh.prototype:void 0,hh=ph?ph.toString:void 0;function x6(e){if(typeof e=="string")return e;if(S6(e))return hh?hh.call(e):"";var t=e+"";return t=="0"&&1/e==-Z3?"-0":t}function E6(e){return!!e&&typeof e=="object"}function S6(e){return typeof e=="symbol"||E6(e)&&k6.call(e)==Y3}function $6(e){return e==null?"":x6(e)}function A6(e,t,n){return e=$6(e),t=n?void 0:t,t===void 0?z6(e)?C6(e):b6(e):e.match(t)||[]}var T6=A6,O6=1/0,D6="[object Symbol]",P6=/^\s+/,Cm="\\ud800-\\udfff",_1="\\u0300-\\u036f\\ufe20-\\ufe23",g1="\\u20d0-\\u20f0",y1="\\ufe0e\\ufe0f",I6="["+Cm+"]",Qc="["+_1+g1+"]",ed="\\ud83c[\\udffb-\\udfff]",F6="(?:"+Qc+"|"+ed+")",v1="[^"+Cm+"]",b1="(?:\\ud83c[\\udde6-\\uddff]){2}",z1="[\\ud800-\\udbff][\\udc00-\\udfff]",C1="\\u200d",w1=F6+"?",k1="["+y1+"]?",R6="(?:"+C1+"(?:"+[v1,b1,z1].join("|")+")"+k1+w1+")*",L6=k1+w1+R6,N6="(?:"+[v1+Qc+"?",Qc,b1,z1,I6].join("|")+")",M6=RegExp(ed+"(?="+ed+")|"+N6+L6,"g"),V6=RegExp("["+C1+Cm+_1+g1+y1+"]"),H6=typeof cn=="object"&&cn&&cn.Object===Object&&cn,B6=typeof self=="object"&&self&&self.Object===Object&&self,U6=H6||B6||Function("return this")();function j6(e){return e.split("")}function q6(e,t,n,r){for(var s=e.length,o=n+(r?1:-1);r?o--:++o-1;);return n}function Z6(e){return V6.test(e)}function _h(e){return Z6(e)?Y6(e):j6(e)}function Y6(e){return e.match(M6)||[]}var J6=Object.prototype,X6=J6.toString,gh=U6.Symbol,yh=gh?gh.prototype:void 0,vh=yh?yh.toString:void 0;function Q6(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r=r?e:Q6(e,t,n)}function t4(e){return!!e&&typeof e=="object"}function n4(e){return typeof e=="symbol"||t4(e)&&X6.call(e)==D6}function r4(e){return e==null?"":x1(e)}function s4(e,t,n){if(e=r4(e),e&&(n||t===void 0))return e.replace(P6,"");if(!e||!(t=x1(t)))return e;var r=_h(e),s=G6(r,_h(t));return e4(r,s).join("")}var o4=s4,td=1/0,a4=9007199254740991,i4=17976931348623157e292,bh=NaN,l4="[object Symbol]",u4=/^\s+|\s+$/g,c4=/^[-+]0x[0-9a-f]+$/i,d4=/^0b[01]+$/i,m4=/^0o[0-7]+$/i,wm="\\ud800-\\udfff",E1="\\u0300-\\u036f\\ufe20-\\ufe23",S1="\\u20d0-\\u20f0",$1="\\ufe0e\\ufe0f",f4="["+wm+"]",nd="["+E1+S1+"]",rd="\\ud83c[\\udffb-\\udfff]",p4="(?:"+nd+"|"+rd+")",A1="[^"+wm+"]",T1="(?:\\ud83c[\\udde6-\\uddff]){2}",O1="[\\ud800-\\udbff][\\udc00-\\udfff]",D1="\\u200d",P1=p4+"?",I1="["+$1+"]?",h4="(?:"+D1+"(?:"+[A1,T1,O1].join("|")+")"+I1+P1+")*",_4=I1+P1+h4,g4="(?:"+[A1+nd+"?",nd,T1,O1,f4].join("|")+")",sd=RegExp(rd+"(?="+rd+")|"+g4+_4,"g"),y4=RegExp("["+D1+wm+E1+S1+$1+"]"),v4=parseInt,b4=typeof cn=="object"&&cn&&cn.Object===Object&&cn,z4=typeof self=="object"&&self&&self.Object===Object&&self,C4=b4||z4||Function("return this")(),w4=x4("length");function k4(e){return e.split("")}function x4(e){return function(t){return t==null?void 0:t[e]}}function km(e){return y4.test(e)}function F1(e){return km(e)?S4(e):w4(e)}function E4(e){return km(e)?$4(e):k4(e)}function S4(e){for(var t=sd.lastIndex=0;sd.test(e);)t++;return t}function $4(e){return e.match(sd)||[]}var A4=Object.prototype,T4=A4.toString,zh=C4.Symbol,O4=Math.ceil,D4=Math.floor,Ch=zh?zh.prototype:void 0,wh=Ch?Ch.toString:void 0;function kh(e,t){var n="";if(!e||t<1||t>a4)return n;do t%2&&(n+=e),t=D4(t/2),t&&(e+=e);while(t);return n}function P4(e,t,n){var r=-1,s=e.length;t<0&&(t=-t>s?0:s+t),n=n>s?s:n,n<0&&(n+=s),s=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(s);++r=r?e:P4(e,t,n)}function F4(e,t){t=t===void 0?" ":R1(t);var n=t.length;if(n<2)return n?kh(t,e):t;var r=kh(t,O4(e/F1(t)));return km(t)?I4(E4(r),0,e).join(""):r.slice(0,e)}function xh(e){var t=typeof e;return!!e&&(t=="object"||t=="function")}function R4(e){return!!e&&typeof e=="object"}function L1(e){return typeof e=="symbol"||R4(e)&&T4.call(e)==l4}function L4(e){if(!e)return e===0?e:0;if(e=M4(e),e===td||e===-td){var t=e<0?-1:1;return t*i4}return e===e?e:0}function N4(e){var t=L4(e),n=t%1;return t===t?n?t-n:t:0}function M4(e){if(typeof e=="number")return e;if(L1(e))return bh;if(xh(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=xh(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=e.replace(u4,"");var n=d4.test(e);return n||m4.test(e)?v4(e.slice(2),n?2:8):c4.test(e)?bh:+e}function V4(e){return e==null?"":R1(e)}function H4(e,t,n){e=V4(e),t=N4(t);var r=t?F1(e):0;return t&&r{const s=(e+(r||"")).toString().includes("%");if(typeof e=="string"?[e,t,n,r]=e.match(/(0?\.?\d{1,3})%?\b/g).map(Number):r!==void 0&&(r=parseFloat(r)),typeof e!="number"||typeof t!="number"||typeof n!="number"||e>255||t>255||n>255)throw new TypeError("Expected three numbers below 256");if(typeof r=="number"){if(!s&&r>=0&&r<=1)r=Math.round(255*r);else if(s&&r>=0&&r<=100)r=Math.round(255*r/100);else throw new TypeError(`Expected alpha value (${r}) as a fraction or percentage`);r=(r|256).toString(16).slice(1)}else r="";return(n|t<<8|e<<16|1<<24).toString(16).slice(1)+r};const Ca="a-f\\d",j4=`#?[${Ca}]{3}[${Ca}]?`,q4=`#?[${Ca}]{6}([${Ca}]{2})?`,W4=new RegExp(`[^#${Ca}]`,"gi"),K4=new RegExp(`^${j4}$|^${q4}$`,"i");var G4=(e,t={})=>{if(typeof e!="string"||W4.test(e)||!K4.test(e))throw new TypeError("Expected a valid hex string");e=e.replace(/^#/,"");let n=1;e.length===8&&(n=Number.parseInt(e.slice(6,8),16)/255,e=e.slice(0,6)),e.length===4&&(n=Number.parseInt(e.slice(3,4).repeat(2),16)/255,e=e.slice(0,3)),e.length===3&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]);const r=Number.parseInt(e,16),s=r>>16,o=r>>8&255,a=r&255,i=typeof t.alpha=="number"?t.alpha:n;if(t.format==="array")return[s,o,a,i];if(t.format==="css"){const l=i===1?"":` / ${Number((i*100).toFixed(2))}%`;return`rgb(${s} ${o} ${a}${l})`}return{red:s,green:o,blue:a,alpha:i}},Z4=G3,Y4=T6,J4=o4,X4=B4,Q4=U4,N1=G4;const Ku=.75,Gu=.25,Zu=16777215,e5=49979693;var t5=function(e){return"#"+s5(String(JSON.stringify(e)))};function n5(e){var t=Y4(e),n=[];return t.forEach(function(r){var s=Z4(r);s&&n.push(N1(J4(s,"#"),{format:"array"}))}),n}function r5(e){var t=[0,0,0];return e.forEach(function(n){for(var r=0;r<3;r++)t[r]+=n[r]}),[t[0]/e.length,t[1]/e.length,t[2]/e.length]}function s5(e){var t,n=n5(e);n.length>0&&(t=r5(n));var r=1,s=0,o=1;if(e.length>0)for(var a=0;as&&(s=e[a].charCodeAt(0)),o=parseInt(Zu/s),r=(r+e[a].charCodeAt(0)*o*e5)%Zu;var i=(r*e.length%Zu).toString(16);i=X4(i,6,i);var l=N1(i,{format:"array"});return t?Q4(Gu*l[0]+Ku*t[0],Gu*l[1]+Ku*t[1],Gu*l[2]+Ku*t[2]):i}const o5=Pa(t5);function a5(e){const t=e.replace(/#/,""),n=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),s=parseInt(t.substr(4,2),16);return[.299*n,.587*r,.114*s].reduce((a,i)=>a+i)/255>.5}function i5(e){return a5(e)?"#000000":"#ffffff"}function l5(e){const t=' '+e.caption+" ";return"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(t)}function u5(e,t,n){const r=o5(t),s=i5(r),o={width:n.width,height:n.height,textColor:s,backgroundColor:r,caption:e,fontFamily:n.font_family,fontSize:n.font_size,fontWeight:n.font_weight};return l5(o)}const c5={name:"CoverArtwork",props:["artist","album","artwork_url","maxwidth","maxheight"],emits:["click"],data(){return{width:600,height:600,font_family:"sans-serif",font_size:200,font_weight:600,lazy_lifecycle:{error:e=>{e.src=this.dataURI()}}}},computed:{artwork_url_with_size(){return this.maxwidth>0&&this.maxheight>0?M.artwork_url_append_size_params(this.artwork_url,this.maxwidth,this.maxheight):M.artwork_url_append_size_params(this.artwork_url)},alt_text(){return this.artist+" - "+this.album},caption(){return this.album?this.album.substring(0,2):this.artist?this.artist.substring(0,2):""}},methods:{dataURI(){return u5(this.caption,this.alt_text,{width:this.width,height:this.height,font_family:this.font_family,font_size:this.font_size,font_weight:this.font_weight})}}};function d5(e,t,n,r,s,o){const a=Rd("lazy");return k(),$("figure",null,[bt(u("img",{onClick:t[0]||(t[0]=i=>e.$emit("click"))},null,512),[[a,{src:o.artwork_url_with_size,lifecycle:s.lazy_lifecycle}]])])}const Fn=te(c5,[["render",d5]]),{t:Yu,locale:xm}=su.global,M1="GROUP_KEY_NONE";function V1(){return{compareFn:null,groupKeyFn:e=>M1}}function Rn(e,t=!1,n="_"){return{compareFn:t?null:(r,s)=>{const o=r[e]||n,a=s[e]||n;return o.localeCompare(a,xm.value)},groupKeyFn:r=>{const s=(r[e]||n).charAt(0);return s.match(new RegExp("\\p{Letter}","gu"))?s.toUpperCase():s.match(new RegExp("\\p{Number}","gu"))?"#":"⌘"}}}function Em(e,{direction:t="asc",defaultValue:n=0}){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o-a;return t==="asc"?i:i*-1},groupKeyFn:r=>{const s=r[e]||n;return Math.floor(s/10)}}}function kl(e,{direction:t="asc",defaultValue:n="0000"}){return{compareFn:(r,s)=>{const o=r[e]||n,a=s[e]||n,i=o.localeCompare(a,xm.value);return t==="asc"?i:i*-1},groupKeyFn:r=>(r[e]||n).substring(0,4)}}function m5(e,t="0000"){return{compareFn:(n,r)=>{const s=n[e]||t;return(r[e]||t).localeCompare(s,xm.value)},groupKeyFn:n=>{const r=n[e];if(!r)return t;const s=new Date().getTime()-new Date(r).getTime();return s<864e5?Yu("group-by-list.today"):s<6048e5?Yu("group-by-list.last-week"):s<2592e6?Yu("group-by-list.last-month"):r.substring(0,4)}}}class ge{constructor({items:t=[],total:n=0,offset:r=0,limit:s=-1}={}){this.items=t,this.total=n,this.offset=r,this.limit=s,this.count=t.length,this.indexList=[],this.group(V1())}get(){return this.itemsByGroup}isEmpty(){return!this.items||this.items.length<=0}group(t,n=[]){const r=n?this.items.filter(o=>n.every(a=>a(o))):this.items;this.count=r.length;let s=t.compareFn?[...r].sort(t.compareFn):r;this.indexList=[...new Set(s.map(t.groupKeyFn))],this.itemsByGroup=s.reduce((o,a)=>{const i=t.groupKeyFn(a);return o[i]=[...o[i]||[],a],o},{})}[Symbol.iterator](){let t=-1,n=-1;return{next:()=>{if(this.isEmpty())return{done:!0};if(t>=this.indexList.length)return{done:!0};if(t<0&&(++t,n=0,this.indexList[t]!==M1))return{value:{groupKey:this.indexList[t],itemId:this.indexList[t],isItem:!1,item:{}},done:!1};let r=this.indexList[t],s=this.itemsByGroup[r];if(n0&&(h=h.substring(0,h.length-1),f=f+"?"+h),f},c=function(f,p){var h=new XMLHttpRequest,_=function(b,w){function C(A){b&&b(A),p&&p(null,A)}function z(){w&&w(h),p&&p(h,null)}var v=f.type||"GET";if(h.open(v,l(f.url,f.params)),r&&h.setRequestHeader("Authorization","Bearer "+r),h.onreadystatechange=function(){if(h.readyState===4){var A=null;try{A=h.responseText?JSON.parse(h.responseText):""}catch(D){console.error(D)}h.status>=200&&h.status<300?C(A):z()}},v==="GET")h.send(null);else{var S=null;f.postData&&(f.contentType==="image/jpeg"?(S=f.postData,h.setRequestHeader("Content-Type",f.contentType)):(S=JSON.stringify(f.postData),h.setRequestHeader("Content-Type","application/json"))),h.send(S)}};return p?(_(),null):a(_,function(){h.abort()})},m=function(f,p,h,_){var b={},w=null;typeof p=="object"?(b=p,w=h):typeof p=="function"&&(w=p);var C=f.type||"GET";return C!=="GET"&&f.postData&&!_?f.postData=i(f.postData,b):f.params=i(f.params,b),c(f,w)},d=function(){};return d.prototype={constructor:t},d.prototype.getGeneric=function(f,p){var h={url:f};return m(h,p)},d.prototype.getMe=function(f,p){var h={url:n+"/me"};return m(h,f,p)},d.prototype.getMySavedTracks=function(f,p){var h={url:n+"/me/tracks"};return m(h,f,p)},d.prototype.addToMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedTracks=function(f,p,h){var _={url:n+"/me/tracks/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedAlbums=function(f,p){var h={url:n+"/me/albums"};return m(h,f,p)},d.prototype.addToMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedAlbums=function(f,p,h){var _={url:n+"/me/albums/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMyTopArtists=function(f,p){var h={url:n+"/me/top/artists"};return m(h,f,p)},d.prototype.getMyTopTracks=function(f,p){var h={url:n+"/me/top/tracks"};return m(h,f,p)},d.prototype.getMyRecentlyPlayedTracks=function(f,p){var h={url:n+"/me/player/recently-played"};return m(h,f,p)},d.prototype.followUsers=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.followArtists=function(f,p){var h={url:n+"/me/following/",type:"PUT",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.followPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers",type:"PUT",postData:{}};return m(_,p,h)},d.prototype.unfollowUsers=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.unfollowArtists=function(f,p){var h={url:n+"/me/following/",type:"DELETE",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.unfollowPlaylist=function(f,p){var h={url:n+"/playlists/"+f+"/followers",type:"DELETE"};return m(h,p)},d.prototype.isFollowingUsers=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"user"}};return m(h,p)},d.prototype.isFollowingArtists=function(f,p){var h={url:n+"/me/following/contains",type:"GET",params:{ids:f.join(","),type:"artist"}};return m(h,p)},d.prototype.areFollowingPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/followers/contains",type:"GET",params:{ids:p.join(",")}};return m(_,h)},d.prototype.getFollowedArtists=function(f,p){var h={url:n+"/me/following",type:"GET",params:{type:"artist"}};return m(h,f,p)},d.prototype.getUser=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)};return m(_,p,h)},d.prototype.getUserPlaylists=function(f,p,h){var _;return typeof f=="string"?_={url:n+"/users/"+encodeURIComponent(f)+"/playlists"}:(_={url:n+"/me/playlists"},h=p,p=f),m(_,p,h)},d.prototype.getPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f};return m(_,p,h)},d.prototype.getPlaylistTracks=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks"};return m(_,p,h)},d.prototype.getPlaylistCoverImage=function(f,p){var h={url:n+"/playlists/"+f+"/images"};return m(h,p)},d.prototype.createPlaylist=function(f,p,h){var _={url:n+"/users/"+encodeURIComponent(f)+"/playlists",type:"POST",postData:p};return m(_,p,h)},d.prototype.changePlaylistDetails=function(f,p,h){var _={url:n+"/playlists/"+f,type:"PUT",postData:p};return m(_,p,h)},d.prototype.addTracksToPlaylist=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"POST",postData:{uris:p}};return m(b,h,_,!0)},d.prototype.replaceTracksInPlaylist=function(f,p,h){var _={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{uris:p}};return m(_,{},h)},d.prototype.reorderTracksInPlaylist=function(f,p,h,_,b){var w={url:n+"/playlists/"+f+"/tracks",type:"PUT",postData:{range_start:p,insert_before:h}};return m(w,_,b)},d.prototype.removeTracksFromPlaylist=function(f,p,h){var _=p.map(function(w){return typeof w=="string"?{uri:w}:w}),b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:_}};return m(b,{},h)},d.prototype.removeTracksFromPlaylistWithSnapshotId=function(f,p,h,_){var b=p.map(function(C){return typeof C=="string"?{uri:C}:C}),w={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{tracks:b,snapshot_id:h}};return m(w,{},_)},d.prototype.removeTracksFromPlaylistInPositions=function(f,p,h,_){var b={url:n+"/playlists/"+f+"/tracks",type:"DELETE",postData:{positions:p,snapshot_id:h}};return m(b,{},_)},d.prototype.uploadCustomPlaylistCoverImage=function(f,p,h){var _={url:n+"/playlists/"+f+"/images",type:"PUT",postData:p.replace(/^data:image\/jpeg;base64,/,""),contentType:"image/jpeg"};return m(_,{},h)},d.prototype.getAlbum=function(f,p,h){var _={url:n+"/albums/"+f};return m(_,p,h)},d.prototype.getAlbumTracks=function(f,p,h){var _={url:n+"/albums/"+f+"/tracks"};return m(_,p,h)},d.prototype.getAlbums=function(f,p,h){var _={url:n+"/albums/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getTrack=function(f,p,h){var _={};return _.url=n+"/tracks/"+f,m(_,p,h)},d.prototype.getTracks=function(f,p,h){var _={url:n+"/tracks/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtist=function(f,p,h){var _={url:n+"/artists/"+f};return m(_,p,h)},d.prototype.getArtists=function(f,p,h){var _={url:n+"/artists/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getArtistAlbums=function(f,p,h){var _={url:n+"/artists/"+f+"/albums"};return m(_,p,h)},d.prototype.getArtistTopTracks=function(f,p,h,_){var b={url:n+"/artists/"+f+"/top-tracks",params:{country:p}};return m(b,h,_)},d.prototype.getArtistRelatedArtists=function(f,p,h){var _={url:n+"/artists/"+f+"/related-artists"};return m(_,p,h)},d.prototype.getFeaturedPlaylists=function(f,p){var h={url:n+"/browse/featured-playlists"};return m(h,f,p)},d.prototype.getNewReleases=function(f,p){var h={url:n+"/browse/new-releases"};return m(h,f,p)},d.prototype.getCategories=function(f,p){var h={url:n+"/browse/categories"};return m(h,f,p)},d.prototype.getCategory=function(f,p,h){var _={url:n+"/browse/categories/"+f};return m(_,p,h)},d.prototype.getCategoryPlaylists=function(f,p,h){var _={url:n+"/browse/categories/"+f+"/playlists"};return m(_,p,h)},d.prototype.search=function(f,p,h,_){var b={url:n+"/search/",params:{q:f,type:p.join(",")}};return m(b,h,_)},d.prototype.searchAlbums=function(f,p,h){return this.search(f,["album"],p,h)},d.prototype.searchArtists=function(f,p,h){return this.search(f,["artist"],p,h)},d.prototype.searchTracks=function(f,p,h){return this.search(f,["track"],p,h)},d.prototype.searchPlaylists=function(f,p,h){return this.search(f,["playlist"],p,h)},d.prototype.searchShows=function(f,p,h){return this.search(f,["show"],p,h)},d.prototype.searchEpisodes=function(f,p,h){return this.search(f,["episode"],p,h)},d.prototype.getAudioFeaturesForTrack=function(f,p){var h={};return h.url=n+"/audio-features/"+f,m(h,{},p)},d.prototype.getAudioFeaturesForTracks=function(f,p){var h={url:n+"/audio-features",params:{ids:f}};return m(h,{},p)},d.prototype.getAudioAnalysisForTrack=function(f,p){var h={};return h.url=n+"/audio-analysis/"+f,m(h,{},p)},d.prototype.getRecommendations=function(f,p){var h={url:n+"/recommendations"};return m(h,f,p)},d.prototype.getAvailableGenreSeeds=function(f){var p={url:n+"/recommendations/available-genre-seeds"};return m(p,{},f)},d.prototype.getMyDevices=function(f){var p={url:n+"/me/player/devices"};return m(p,{},f)},d.prototype.getMyCurrentPlaybackState=function(f,p){var h={url:n+"/me/player"};return m(h,f,p)},d.prototype.getMyCurrentPlayingTrack=function(f,p){var h={url:n+"/me/player/currently-playing"};return m(h,f,p)},d.prototype.transferMyPlayback=function(f,p,h){var _=p||{};_.device_ids=f;var b={type:"PUT",url:n+"/me/player",postData:_};return m(b,p,h)},d.prototype.play=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={};["context_uri","uris","offset","position_ms"].forEach(function(C){C in f&&(_[C]=f[C])});var b={type:"PUT",url:n+"/me/player/play",params:h,postData:_},w=typeof f=="function"?f:{};return m(b,w,p)},d.prototype.queue=function(f,p,h){p=p||{};var _="device_id"in p?{uri:f,device_id:p.device_id}:{uri:f},b={type:"POST",url:n+"/me/player/queue",params:_};return m(b,p,h)},d.prototype.pause=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"PUT",url:n+"/me/player/pause",params:h};return m(_,f,p)},d.prototype.skipToNext=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/next",params:h};return m(_,f,p)},d.prototype.skipToPrevious=function(f,p){f=f||{};var h="device_id"in f?{device_id:f.device_id}:null,_={type:"POST",url:n+"/me/player/previous",params:h};return m(_,f,p)},d.prototype.seek=function(f,p,h){p=p||{};var _={position_ms:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/seek",params:_};return m(b,p,h)},d.prototype.setRepeat=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/repeat",params:_};return m(b,p,h)},d.prototype.setVolume=function(f,p,h){p=p||{};var _={volume_percent:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/volume",params:_};return m(b,p,h)},d.prototype.setShuffle=function(f,p,h){p=p||{};var _={state:f};"device_id"in p&&(_.device_id=p.device_id);var b={type:"PUT",url:n+"/me/player/shuffle",params:_};return m(b,p,h)},d.prototype.getShow=function(f,p,h){var _={};return _.url=n+"/shows/"+f,m(_,p,h)},d.prototype.getShows=function(f,p,h){var _={url:n+"/shows/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getMySavedShows=function(f,p){var h={url:n+"/me/shows"};return m(h,f,p)},d.prototype.addToMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"PUT",postData:f};return m(_,p,h)},d.prototype.removeFromMySavedShows=function(f,p,h){var _={url:n+"/me/shows",type:"DELETE",postData:f};return m(_,p,h)},d.prototype.containsMySavedShows=function(f,p,h){var _={url:n+"/me/shows/contains",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getShowEpisodes=function(f,p,h){var _={url:n+"/shows/"+f+"/episodes"};return m(_,p,h)},d.prototype.getEpisode=function(f,p,h){var _={};return _.url=n+"/episodes/"+f,m(_,p,h)},d.prototype.getEpisodes=function(f,p,h){var _={url:n+"/episodes/",params:{ids:f.join(",")}};return m(_,p,h)},d.prototype.getAccessToken=function(){return r},d.prototype.setAccessToken=function(f){r=f},d.prototype.setPromiseImplementation=function(f){var p=!1;try{var h=new f(function(_){_()});typeof h.then=="function"&&typeof h.catch=="function"&&(p=!0)}catch(_){console.error(_)}if(p)s=f;else throw new Error("Unsupported implementation of Promises/A+")},d}();e.exports=t})(H1);var f5=H1.exports;const Yn=Pa(f5),p5={name:"ModalDialogTrack",props:["show","track"],emits:["close","play-count-changed"],data(){return{spotify_track:{}}},watch:{track(){if(this.track&&this.track.data_kind==="spotify"){const e=new Yn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.track.path.slice(this.track.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{play_track(){this.$emit("close"),M.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.track.media_kind==="podcast"?this.$router.push({name:"podcast",params:{id:this.track.album_id}}):this.track.media_kind==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.track.album_id}}):this.$router.push({name:"music-album",params:{id:this.track.album_id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.track.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.track.genre},query:{media_kind:this.track.media_kind}})},open_spotify_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}})},open_spotify_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}})},mark_new(){M.library_track_update(this.track.id,{play_count:"reset"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})},mark_played(){M.library_track_update(this.track.id,{play_count:"increment"}).then(()=>{this.$emit("play-count-changed"),this.$emit("close")})}}},h5={key:0,class:"modal is-active"},_5={class:"modal-content fd-modal-card"},g5={class:"card"},y5={class:"card-content"},v5=["textContent"],b5=["textContent"],z5={key:0,class:"buttons"},C5=["textContent"],w5=["textContent"],k5={class:"content is-small"},x5=["textContent"],E5=["textContent"],S5={key:0},$5=["textContent"],A5=["textContent"],T5={key:1},O5=["textContent"],D5=["textContent"],P5={key:2},I5=["textContent"],F5=["textContent"],R5={key:3},L5=["textContent"],N5=["textContent"],M5={key:4},V5=["textContent"],H5=["textContent"],B5=["textContent"],U5=["textContent"],j5=["textContent"],q5=["textContent"],W5=["textContent"],K5=["textContent"],G5=["textContent"],Z5={class:"title is-6"},Y5=["textContent"],J5={key:0,class:"has-text-weight-normal"},X5=["textContent"],Q5=["textContent"],eD=["textContent"],tD={class:"title is-6"},nD=["textContent"],rD=["textContent"],sD=["textContent"],oD=["textContent"],aD=["textContent"],iD=["textContent"],lD=["textContent"],uD=["textContent"],cD={key:5},dD=["textContent"],mD=["textContent"],fD={class:"card-footer"},pD=["textContent"],hD=["textContent"],_D=["textContent"];function gD(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",h5,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",_5,[u("div",g5,[u("div",y5,[u("p",{class:"title is-4",textContent:g(n.track.title)},null,8,v5),u("p",{class:"subtitle",textContent:g(n.track.artist)},null,8,b5),n.track.media_kind==="podcast"?(k(),$("div",z5,[n.track.play_count>0?(k(),$("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...i)=>o.mark_new&&o.mark_new(...i)),textContent:g(e.$t("dialog.track.mark-as-new"))},null,8,C5)):H("",!0),n.track.play_count===0?(k(),$("a",{key:1,class:"button is-small",onClick:t[2]||(t[2]=(...i)=>o.mark_played&&o.mark_played(...i)),textContent:g(e.$t("dialog.track.mark-as-played"))},null,8,w5)):H("",!0)])):H("",!0),u("div",k5,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album"))},null,8,x5),u("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.track.album)},null,8,E5)]),n.track.album_artist&&n.track.media_kind!=="audiobook"?(k(),$("p",S5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.album-artist"))},null,8,$5),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.track.album_artist)},null,8,A5)])):H("",!0),n.track.composer?(k(),$("p",T5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.composer"))},null,8,O5),u("span",{class:"title is-6",textContent:g(n.track.composer)},null,8,D5)])):H("",!0),n.track.date_released?(k(),$("p",P5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.release-date"))},null,8,I5),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.track.date_released))},null,8,F5)])):n.track.year>0?(k(),$("p",R5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.year"))},null,8,L5),u("span",{class:"title is-6",textContent:g(n.track.year)},null,8,N5)])):H("",!0),n.track.genre?(k(),$("p",M5,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.genre"))},null,8,V5),u("a",{class:"title is-6 has-text-link",onClick:t[5]||(t[5]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.track.genre)},null,8,H5)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.position"))},null,8,B5),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,U5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.duration"))},null,8,j5),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.length_ms))},null,8,q5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.path"))},null,8,W5),u("span",{class:"title is-6",textContent:g(n.track.path)},null,8,K5)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.type"))},null,8,G5),u("span",Z5,[u("span",{textContent:g([e.$t("media.kind."+n.track.media_kind),e.$t("data.kind."+n.track.data_kind)].join(" - "))},null,8,Y5),n.track.data_kind==="spotify"?(k(),$("span",J5,[nt(" ("),u("a",{onClick:t[6]||(t[6]=(...i)=>o.open_spotify_artist&&o.open_spotify_artist(...i)),textContent:g(e.$t("dialog.track.spotify-artist"))},null,8,X5),nt(", "),u("a",{onClick:t[7]||(t[7]=(...i)=>o.open_spotify_album&&o.open_spotify_album(...i)),textContent:g(e.$t("dialog.track.spotify-album"))},null,8,Q5),nt(") ")])):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.quality"))},null,8,eD),u("span",tD,[u("span",{textContent:g(n.track.type)},null,8,nD),n.track.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.track.samplerate",{rate:n.track.samplerate}))},null,8,rD)):H("",!0),n.track.channels?(k(),$("span",{key:1,textContent:g(e.$t("dialog.track.channels",{channels:e.$filters.channels(n.track.channels)}))},null,8,sD)):H("",!0),n.track.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.track.bitrate",{rate:n.track.bitrate}))},null,8,oD)):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.added-on"))},null,8,aD),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.track.time_added))},null,8,iD)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.rating"))},null,8,lD),u("span",{class:"title is-6",textContent:g(e.$t("dialog.track.rating-value",{rating:Math.floor(n.track.rating/10)}))},null,8,uD)]),n.track.comment?(k(),$("p",cD,[u("span",{class:"heading",textContent:g(e.$t("dialog.track.comment"))},null,8,dD),u("span",{class:"title is-6",textContent:g(n.track.comment)},null,8,mD)])):H("",!0)])]),u("footer",fD,[u("a",{class:"card-footer-item has-text-dark",onClick:t[8]||(t[8]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add"))},null,8,pD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[9]||(t[9]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.add-next"))},null,8,hD)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[10]||(t[10]=(...i)=>o.play_track&&o.play_track(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.track.play"))},null,8,_D)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[11]||(t[11]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const yD=te(p5,[["render",gD]]),vD={name:"ProgressBar",props:["max","value"],computed:{width(){return this.value>0&&this.max>0?parseInt(this.value*100/this.max):0},width_percent(){return this.width+"%"}}};function bD(e,t,n,r,s,o){return o.width>0?(k(),$("div",{key:0,class:"progress-bar",style:lr({width:o.width_percent})},null,4)):H("",!0)}const zD=te(vD,[["render",bD]]),CD={name:"ListTracks",components:{ModalDialogTrack:yD,ProgressBar:zD},props:["tracks","uris","expression","show_progress","show_icon"],emits:["play-count-changed"],data(){return{show_details_modal:!1,selected_track:{}}},methods:{play_track(e){this.uris?M.player_play_uri(this.uris,!1,this.tracks.items.indexOf(e)):this.expression?M.player_play_expression(this.expression,!1,this.tracks.items.indexOf(e)):M.player_play_uri(e.uri,!1)},open_dialog(e){this.selected_track=e,this.show_details_modal=!0}}},wD={key:0,class:"mt-6 mb-5 py-2"},kD=["id","textContent"],xD=["onClick"],ED={key:0,class:"media-left is-clickable"},SD={class:"media-content is-clickable is-clipped"},$D=["textContent"],AD=["textContent"],TD=["textContent"],OD={class:"media-right"},DD=["onClick"];function PD(e,t,n,r,s,o){const a=E("mdicon"),i=E("progress-bar"),l=E("modal-dialog-track");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.tracks,c=>(k(),$(Ce,{key:c.itemId},[c.isItem?(k(),$("div",{key:1,class:Ee(["media is-align-items-center",{"with-progress":n.show_progress}]),onClick:m=>o.play_track(c.item)},[n.show_icon?(k(),$("figure",ED,[y(a,{class:"icon",name:"file-outline",size:"16"})])):H("",!0),u("div",SD,[u("h1",{class:Ee(["title is-6",{"has-text-grey":c.item.media_kind==="podcast"&&c.item.play_count>0}]),textContent:g(c.item.title)},null,10,$D),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.artist)},null,8,AD),u("h2",{class:"subtitle is-7 has-text-grey",textContent:g(c.item.album)},null,8,TD),n.show_progress?(k(),me(i,{key:0,max:c.item.length_ms,value:c.item.seek_ms},null,8,["max","value"])):H("",!0)]),u("div",OD,[u("a",{onClick:rt(m=>o.open_dialog(c.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,DD)])],10,xD)):(k(),$("div",wD,[u("span",{id:"index_"+c.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(c.groupKey)},null,8,kD)]))],64))),128)),(k(),me(Jr,{to:"#app"},[y(l,{show:s.show_details_modal,track:s.selected_track,onClose:t[0]||(t[0]=c=>s.show_details_modal=!1),onPlayCountChanged:t[1]||(t[1]=c=>e.$emit("play-count-changed"))},null,8,["show","track"])]))],64)}const Cn=te(CD,[["render",PD]]),ID={name:"ModalDialogAlbum",components:{CoverArtwork:Fn},props:["show","album","media_kind","new_tracks"],emits:["close","remove-podcast","play-count-changed"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return M.artwork_url_append_size_params(this.album.artwork_url)},media_kind_resolved(){return this.media_kind?this.media_kind:this.album.media_kind}},methods:{play(){this.$emit("close"),M.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:this.album.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:this.album.id}}):this.$router.push({name:"music-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}}):this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},mark_played(){M.library_album_track_update(this.album.id,{play_count:"played"}).then(({data:e})=>{this.$emit("play-count-changed"),this.$emit("close")})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},FD={key:0,class:"modal is-active"},RD={class:"modal-content fd-modal-card"},LD={class:"card"},ND={class:"card-content"},MD={class:"title is-4"},VD=["textContent"],HD={key:0,class:"buttons"},BD=["textContent"],UD=["textContent"],jD={class:"content is-small"},qD={key:0},WD=["textContent"],KD=["textContent"],GD={key:1},ZD=["textContent"],YD=["textContent"],JD={key:2},XD=["textContent"],QD=["textContent"],eP=["textContent"],tP=["textContent"],nP=["textContent"],rP=["textContent"],sP=["textContent"],oP=["textContent"],aP=["textContent"],iP=["textContent"],lP={class:"card-footer"},uP=["textContent"],cP=["textContent"],dP=["textContent"];function mP(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",FD,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",RD,[u("div",LD,[u("div",ND,[y(a,{artwork_url:n.album.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5"},null,8,["artwork_url","artist","album"]),u("p",MD,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>o.open_album&&o.open_album(...l)),textContent:g(n.album.name)},null,8,VD)]),o.media_kind_resolved==="podcast"?(k(),$("div",HD,[u("a",{class:"button is-small",onClick:t[2]||(t[2]=(...l)=>o.mark_played&&o.mark_played(...l)),textContent:g(e.$t("dialog.album.mark-as-played"))},null,8,BD),n.album.data_kind==="url"?(k(),$("a",{key:0,class:"button is-small",onClick:t[3]||(t[3]=l=>e.$emit("remove-podcast")),textContent:g(e.$t("dialog.album.remove-podcast"))},null,8,UD)):H("",!0)])):H("",!0),u("div",jD,[n.album.artist?(k(),$("p",qD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.artist"))},null,8,WD),u("a",{class:"title is-6 has-text-link",onClick:t[4]||(t[4]=(...l)=>o.open_artist&&o.open_artist(...l)),textContent:g(n.album.artist)},null,8,KD)])):H("",!0),n.album.date_released?(k(),$("p",GD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.release-date"))},null,8,ZD),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.date_released))},null,8,YD)])):n.album.year>0?(k(),$("p",JD,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.year"))},null,8,XD),u("span",{class:"title is-6",textContent:g(n.album.year)},null,8,QD)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.tracks"))},null,8,eP),u("span",{class:"title is-6",textContent:g(n.album.track_count)},null,8,tP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.duration"))},null,8,nP),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.album.length_ms))},null,8,rP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.type"))},null,8,sP),u("span",{class:"title is-6",textContent:g([e.$t("media.kind."+n.album.media_kind),e.$t("data.kind."+n.album.data_kind)].join(" - "))},null,8,oP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.album.added-on"))},null,8,aP),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.album.time_added))},null,8,iP)])])]),u("footer",lP,[u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>o.queue_add&&o.queue_add(...l))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add"))},null,8,uP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...l)=>o.queue_add_next&&o.queue_add_next(...l))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.add-next"))},null,8,cP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...l)=>o.play&&o.play(...l))},[y(i,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.album.play"))},null,8,dP)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=l=>e.$emit("close"))})])):H("",!0)]),_:1})])}const mu=te(ID,[["render",mP]]),ui={load(e){return Promise.all([M.library_album(e.params.id),M.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data)}},fP={name:"PageAlbum",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){ui.load(e).then(r=>{n(s=>ui.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ui.load(e).then(s=>{ui.set(r,s),n()})},data(){return{album:{},show_details_modal:!1,tracks:new ge}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.album.artist_id}})},play(){M.player_play_uri(this.album.uri,!0)}}},pP={class:"fd-page"},hP=["textContent"],_P={class:"subtitle is-6 has-text-link has-text-weight-normal"},gP=["textContent"],yP={class:"buttons fd-is-centered-mobile mt-5"},vP=["textContent"],bP=["textContent"];function zP(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("content-with-hero");return k(),$("div",pP,[y(m,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,hP),u("h2",_P,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>o.open_artist&&o.open_artist(...d)),textContent:g(s.album.artist)},null,8,gP)]),u("div",yP,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.album.shuffle"))},null,8,vP)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.album.track-count",{count:s.album.track_count}))},null,8,bP),y(l,{tracks:s.tracks,uris:s.album.uri},null,8,["tracks","uris"]),y(c,{show:s.show_details_modal,album:s.album,onClose:t[4]||(t[4]=d=>s.show_details_modal=!1)},null,8,["show","album"])]),_:1})])}const CP=te(fP,[["render",zP]]),wP={name:"ListItemTrackSpotify",props:["track","position","context_uri"],methods:{play(){this.track.is_playable&&M.player_play_uri(this.context_uri,!1,this.position)}}},kP={class:"media is-align-items-center"},xP=["textContent"],EP=["textContent"],SP={key:0,class:"subtitle is-7"},$P=["textContent"],AP=["textContent"],TP={class:"media-right"};function OP(e,t,n,r,s,o){return k(),$("div",kP,[u("div",{class:Ee(["media-content is-clipped",{"is-clickable":n.track.is_playable,"fd-is-not-allowed":!n.track.is_playable}]),onClick:t[0]||(t[0]=(...a)=>o.play&&o.play(...a))},[u("h1",{class:Ee(["title is-6",{"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.name)},null,10,xP),u("h2",{class:Ee(["subtitle is-7",{"has-text-grey":n.track.is_playable,"has-text-grey-light":!n.track.is_playable}]),textContent:g(n.track.artists[0].name)},null,10,EP),n.track.is_playable?H("",!0):(k(),$("h2",SP,[nt(" ("),u("span",{textContent:g(e.$t("list.spotify.not-playable-track"))},null,8,$P),n.track.restrictions&&n.track.restrictions.reason?(k(),$("span",{key:0,textContent:g(e.$t("list.spotify.restriction-reason",{reason:n.track.restrictions.reason}))},null,8,AP)):H("",!0),nt(") ")]))],2),u("div",TP,[ot(e.$slots,"actions")])])}const Sm=te(wP,[["render",OP]]),DP={name:"ModalDialogAlbumSpotify",components:{CoverArtwork:Fn},props:["show","album"],emits:["close"],data(){return{artwork_visible:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{play(){this.$emit("close"),M.player_play_uri(this.album.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.album.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.album.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},artwork_loaded(){this.artwork_visible=!0},artwork_error(){this.artwork_visible=!1}}},PP={key:0,class:"modal is-active"},IP={class:"modal-content fd-modal-card"},FP={class:"card"},RP={class:"card-content"},LP={class:"title is-4"},NP=["textContent"],MP={class:"content is-small"},VP=["textContent"],HP=["textContent"],BP=["textContent"],UP=["textContent"],jP=["textContent"],qP=["textContent"],WP={class:"card-footer"},KP=["textContent"],GP=["textContent"],ZP=["textContent"];function YP(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",PP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=l=>e.$emit("close"))}),u("div",IP,[u("div",FP,[u("div",RP,[y(a,{artwork_url:o.artwork_url,artist:n.album.artist,album:n.album.name,class:"fd-has-shadow fd-cover fd-cover-normal-image mb-5",onLoad:o.artwork_loaded,onError:o.artwork_error},null,8,["artwork_url","artist","album","onLoad","onError"]),u("p",LP,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...l)=>o.open_album&&o.open_album(...l)),textContent:g(n.album.name)},null,8,NP)]),u("div",MP,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.album-artist"))},null,8,VP),u("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...l)=>o.open_artist&&o.open_artist(...l)),textContent:g(n.album.artists[0].name)},null,8,HP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.release-date"))},null,8,BP),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,UP)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.album.type"))},null,8,jP),u("span",{class:"title is-6",textContent:g(n.album.album_type)},null,8,qP)])])]),u("footer",WP,[u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...l)=>o.queue_add&&o.queue_add(...l))},[y(i,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add"))},null,8,KP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...l)=>o.queue_add_next&&o.queue_add_next(...l))},[y(i,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.add-next"))},null,8,GP)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...l)=>o.play&&o.play(...l))},[y(i,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.album.play"))},null,8,ZP)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=l=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Na=te(DP,[["render",YP]]),JP={name:"ModalDialogTrackSpotify",props:["show","track","album"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.track.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.track.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.track.uri)},open_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.album.id}})},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})}}},XP={key:0,class:"modal is-active"},QP={class:"modal-content fd-modal-card"},eI={class:"card"},tI={class:"card-content"},nI=["textContent"],rI=["textContent"],sI={class:"content is-small"},oI=["textContent"],aI=["textContent"],iI=["textContent"],lI=["textContent"],uI=["textContent"],cI=["textContent"],dI=["textContent"],mI=["textContent"],fI=["textContent"],pI=["textContent"],hI=["textContent"],_I=["textContent"],gI={class:"card-footer"},yI=["textContent"],vI=["textContent"],bI=["textContent"];function zI(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",XP,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",QP,[u("div",eI,[u("div",tI,[u("p",{class:"title is-4",textContent:g(n.track.name)},null,8,nI),u("p",{class:"subtitle",textContent:g(n.track.artists[0].name)},null,8,rI),u("div",sI,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album"))},null,8,oI),u("a",{class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.album.name)},null,8,aI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.album-artist"))},null,8,iI),u("a",{class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.album.artists[0].name)},null,8,lI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.release-date"))},null,8,uI),u("span",{class:"title is-6",textContent:g(e.$filters.date(n.album.release_date))},null,8,cI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.position"))},null,8,dI),u("span",{class:"title is-6",textContent:g([n.track.disc_number,n.track.track_number].join(" / "))},null,8,mI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.duration"))},null,8,fI),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.track.duration_ms))},null,8,pI)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.track.path"))},null,8,hI),u("span",{class:"title is-6",textContent:g(n.track.uri)},null,8,_I)])])]),u("footer",gI,[u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add"))},null,8,yI)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.add-next"))},null,8,vI)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.track.play"))},null,8,bI)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[6]||(t[6]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const $m=te(JP,[["render",zI]]),ci={load(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),t.getAlbum(e.params.id,{market:Ue.state.spotify.webapi_country})},set(e,t){e.album=t}},CI={name:"PageAlbumSpotify",components:{ContentWithHero:du,CoverArtwork:Fn,ListItemTrackSpotify:Sm,ModalDialogAlbumSpotify:Na,ModalDialogTrackSpotify:$m},beforeRouteEnter(e,t,n){ci.load(e).then(r=>{n(s=>ci.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ci.load(e).then(s=>{ci.set(r,s),n()})},data(){return{album:{artists:[{}],tracks:{}},show_track_details_modal:!1,selected_track:{},show_album_details_modal:!1}},computed:{artwork_url(){return this.album.images&&this.album.images.length>0?this.album.images[0].url:""}},methods:{open_artist(){this.$router.push({name:"music-spotify-artist",params:{id:this.album.artists[0].id}})},play(){this.show_details_modal=!1,M.player_play_uri(this.album.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},wI={class:"fd-page"},kI=["textContent"],xI={class:"subtitle is-6 has-text-link has-text-weight-normal"},EI=["textContent"],SI={class:"buttons fd-is-centered-mobile mt-5"},$I=["textContent"],AI=["textContent"],TI=["onClick"];function OI(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-item-track-spotify"),c=E("modal-dialog-track-spotify"),m=E("modal-dialog-album-spotify"),d=E("content-with-hero");return k(),$("div",wI,[y(d,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,kI),u("h2",xI,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...f)=>o.open_artist&&o.open_artist(...f)),textContent:g(s.album.artists[0].name)},null,8,EI)]),u("div",SI,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.album.shuffle"))},null,8,$I)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=f=>s.show_album_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:o.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=f=>s.show_album_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.spotify.album.track-count",{count:s.album.tracks.total}))},null,8,AI),(k(!0),$(Ce,null,lt(s.album.tracks.items,(f,p)=>(k(),me(l,{key:f.id,track:f,position:p,context_uri:s.album.uri},{actions:x(()=>[u("a",{onClick:rt(h=>o.open_track_dialog(f),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,TI)]),_:2},1032,["track","position","context_uri"]))),128)),y(c,{show:s.show_track_details_modal,track:s.selected_track,album:s.album,onClose:t[4]||(t[4]=f=>s.show_track_details_modal=!1)},null,8,["show","track","album"]),y(m,{show:s.show_album_details_modal,album:s.album,onClose:t[5]||(t[5]=f=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const DI=te(CI,[["render",OI]]),PI={name:"ContentWithHeading",data(){return{options_visible:!1}},computed:{icon_name(){return this.options_visible?"chevron-up":"chevron-down"},position(){return{hash:this.options_visible?"#top":"#app"}}},mounted(){this.$slots.options&&(this.observer=new IntersectionObserver(this.onElementObserved,{rootMargin:"-82px 0px 0px 0px",threshold:1}),this.observer.observe(this.$refs.options_ref))},methods:{onElementObserved(e){e.forEach(({target:t,isIntersecting:n})=>{this.options_visible=n})},visibilityChanged(e){this.options_visible=e}}},II={class:"section"},FI={class:"container"},RI={class:"columns is-centered"},LI={class:"column is-four-fifths"},NI={key:0},MI={ref:"options_ref",style:{height:"1px"}},VI={class:"buttons is-centered mt-4 mb-2"},HI={id:"top",class:"level is-clipped"},BI={class:"level-left is-flex-shrink-1"},UI={class:"level-item is-flex-shrink-1 has-text-centered-mobile"},jI={class:"level-right has-text-centered-mobile"},qI={class:"mt-4"};function WI(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",II,[u("div",FI,[u("div",RI,[u("div",LI,[e.$slots.options?(k(),$("section",NI,[u("div",MI,null,512),ot(e.$slots,"options"),u("nav",VI,[y(i,{class:"button is-small is-white",to:o.position},{default:x(()=>[y(a,{class:"icon is-small",name:o.icon_name,size:"16"},null,8,["name"])]),_:1},8,["to"])])])):H("",!0),u("div",{class:Ee({"fd-content-with-option":e.$slots.options})},[u("nav",HI,[u("div",BI,[u("div",UI,[u("div",null,[ot(e.$slots,"heading-left")])])]),u("div",jI,[ot(e.$slots,"heading-right")])]),ot(e.$slots,"content"),u("div",qI,[ot(e.$slots,"footer")])],2)])])])])}const Qe=te(PI,[["render",WI]]),KI={name:"ControlDropdown",props:["value","options"],emits:["update:value"],data(){return{is_active:!1}},computed:{option:{get(){return this.options.find(e=>e.id===this.value)}}},methods:{onClickOutside(e){this.is_active=!1},select(e){this.is_active=!1,this.$emit("update:value",e.id)}}},GI={class:"dropdown-trigger"},ZI=["textContent"],YI={id:"dropdown",class:"dropdown-menu",role:"menu"},JI={class:"dropdown-content"},XI=["onClick","textContent"];function QI(e,t,n,r,s,o){const a=E("mdicon"),i=Rd("click-away");return bt((k(),$("div",{class:Ee(["dropdown",{"is-active":s.is_active}])},[u("div",GI,[u("button",{class:"button","aria-haspopup":"true","aria-controls":"dropdown",onClick:t[0]||(t[0]=l=>s.is_active=!s.is_active)},[u("span",{textContent:g(o.option.name)},null,8,ZI),y(a,{class:"icon",name:"chevron-down",size:"16"})])]),u("div",YI,[u("div",JI,[(k(!0),$(Ce,null,lt(n.options,l=>(k(),$("a",{key:l.id,class:Ee(["dropdown-item",{"is-active":n.value===l.id}]),onClick:c=>o.select(l),textContent:g(l.name)},null,10,XI))),128))])])],2)),[[i,o.onClickOutside]])}const xs=te(KI,[["render",QI]]),eF={name:"IndexButtonList",props:["index"]},tF={class:"buttons is-centered mb-4 fd-is-square"};function nF(e,t,n,r,s,o){const a=E("router-link");return k(),$("section",null,[u("nav",tF,[(k(!0),$(Ce,null,lt(n.index,i=>(k(),me(a,{key:i,class:"button is-small",to:"#index_"+i},{default:x(()=>[nt(g(i),1)]),_:2},1032,["to"]))),128))])])}const Jn=te(eF,[["render",nF]]),rF={name:"ListAlbums",components:{CoverArtwork:Fn,ModalDialog:dm,ModalDialogAlbum:mu},props:["albums","media_kind","hide_group_title"],emits:["play-count-changed","podcast-deleted"],data(){return{show_details_modal:!1,selected_album:{},show_remove_podcast_modal:!1,rss_playlist_to_remove:{}}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value},media_kind_resolved(){return this.media_kind?this.media_kind:this.selected_album.media_kind}},methods:{open_album(e){this.selected_album=e,this.media_kind_resolved==="podcast"?this.$router.push({name:"podcast",params:{id:e.id}}):this.media_kind_resolved==="audiobook"?this.$router.push({name:"audiobooks-album",params:{id:e.id}}):this.$router.push({name:"music-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},open_remove_podcast_dialog(){M.library_album_tracks(this.selected_album.id,{limit:1}).then(({data:e})=>{M.library_track_playlists(e.items[0].id).then(({data:t})=>{this.rss_playlist_to_remove=t.items.filter(n=>n.type==="rss")[0],this.show_remove_podcast_modal=!0,this.show_details_modal=!1})})},play_count_changed(){this.$emit("play-count-changed")},remove_podcast(){this.show_remove_podcast_modal=!1,M.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$emit("podcast-deleted")})}}},sF={key:0,class:"mt-6 mb-5 py-2"},oF=["id","textContent"],aF=["onClick"],iF={key:0,class:"media-left"},lF={class:"media-content is-clickable is-clipped"},uF=["textContent"],cF={class:"subtitle is-7 has-text-grey"},dF=["textContent"],mF=["textContent"],fF={class:"media-right"},pF=["onClick"],hF=["textContent"],_F={class:"is-size-7"},gF=["textContent"],yF=["textContent"];function vF(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("mdicon"),l=E("modal-dialog-album"),c=E("modal-dialog");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.albums,m=>(k(),$(Ce,{key:m.itemId},[!m.isItem&&!n.hide_group_title?(k(),$("div",sF,[u("span",{id:"index_"+m.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(m.groupKey)},null,8,oF)])):m.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:d=>o.open_album(m.item)},[o.is_visible_artwork?(k(),$("div",iF,[y(a,{artwork_url:m.item.artwork_url,artist:m.item.artist,album:m.item.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image"},null,8,["artwork_url","artist","album"])])):H("",!0),u("div",lF,[u("div",null,[u("h1",{class:"title is-6",textContent:g(m.item.name)},null,8,uF),u("h2",cF,[u("b",{textContent:g(m.item.artist)},null,8,dF)]),m.item.date_released&&m.item.media_kind==="music"?(k(),$("h2",{key:0,class:"subtitle is-7 has-text-grey has-text-weight-normal",textContent:g(e.$filters.date(m.item.date_released))},null,8,mF)):H("",!0)])]),u("div",fF,[u("a",{onClick:rt(d=>o.open_dialog(m.item),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,pF)])],8,aF)):H("",!0)],64))),128)),(k(),me(Jr,{to:"#app"},[y(l,{show:s.show_details_modal,album:s.selected_album,media_kind:n.media_kind,onRemovePodcast:t[0]||(t[0]=m=>o.open_remove_podcast_dialog()),onPlayCountChanged:t[1]||(t[1]=m=>o.play_count_changed()),onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","album","media_kind"]),y(c,{show:s.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[3]||(t[3]=m=>s.show_remove_podcast_modal=!1),onDelete:o.remove_podcast},{"modal-content":x(()=>[u("p",{textContent:g(e.$t("list.albums.info-1"))},null,8,hF),u("p",_F,[nt(" ("),u("span",{textContent:g(e.$t("list.albums.info-2"))},null,8,gF),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,yF),nt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]))],64)}const cr=te(rF,[["render",vF]]),bF={name:"TabsMusic",computed:{spotify_enabled(){return this.$store.state.spotify.webapi_token_valid}}},zF={class:"section fd-tabs-section"},CF={class:"container"},wF={class:"columns is-centered"},kF={class:"column is-four-fifths"},xF={class:"tabs is-centered is-small"},EF=["onClick","onKeypress"],SF=["textContent"],$F=["onClick","onKeypress"],AF=["textContent"],TF=["onClick","onKeypress"],OF=["textContent"],DF=["onClick","onKeypress"],PF=["textContent"],IF=["onClick","onKeypress"],FF=["textContent"],RF=["onClick","onKeypress"],LF=["textContent"];function NF(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",zF,[u("div",CF,[u("div",wF,[u("div",kF,[u("div",xF,[u("ul",null,[y(i,{to:{name:"music-history"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"history",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.history"))},null,8,SF)],40,EF)],2)]),_:1}),y(i,{to:{name:"music-artists"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"account-music",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.artists"))},null,8,AF)],40,$F)],2)]),_:1}),y(i,{to:{name:"music-albums"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"album",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.albums"))},null,8,OF)],40,TF)],2)]),_:1}),y(i,{to:{name:"music-genres"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"speaker",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.genres"))},null,8,PF)],40,DF)],2)]),_:1}),y(i,{to:{name:"music-composers"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"book-open-page-variant",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.composers"))},null,8,FF)],40,IF)],2)]),_:1}),o.spotify_enabled?(k(),me(i,{key:0,to:{name:"music-spotify"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"spotify",size:"16"}),u("span",{textContent:g(e.$t("page.music.tabs.spotify"))},null,8,LF)],40,RF)],2)]),_:1})):H("",!0)])])])])])])}const dr=te(bF,[["render",NF]]),di={load(e){return M.library_albums("music")},set(e,t){e.albums_list=new ge(t.data)}},MF={name:"PageAlbums",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListAlbums:cr,TabsMusic:dr},beforeRouteEnter(e,t,n){di.load(e).then(r=>{n(s=>di.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums_list.isEmpty()){n();return}const r=this;di.load(e).then(s=>{di.set(r,s),n()})},data(){return{albums_list:new ge,groupby_options:[{id:1,name:this.$t("page.albums.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.albums.sort-by.recently-added"),options:kl("time_added",{direction:"desc"})},{id:3,name:this.$t("page.albums.sort-by.recently-released"),options:kl("date_released",{direction:"desc"})}]}},computed:{albums(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.albums_list.group(e.options,[t=>!this.hide_singles||t.track_count>2,t=>!this.hide_spotify||t.data_kind!=="spotify"]),this.albums_list},selected_groupby_option_id:{get(){return this.$store.state.albums_sort},set(e){this.$store.commit(n_,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Ol,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_d,e)}}}},VF={class:"fd-page-with-tabs"},HF={class:"columns"},BF={class:"column"},UF=["textContent"],jF={class:"field"},qF={class:"control"},WF=["textContent"],KF=["textContent"],GF={key:0,class:"field"},ZF={class:"control"},YF=["textContent"],JF=["textContent"],XF={class:"column"},QF=["textContent"],eR=["textContent"],tR=["textContent"];function nR(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("control-dropdown"),c=E("list-albums"),m=E("content-with-heading");return k(),$("div",VF,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.albums.indexList},null,8,["index"]),u("div",HF,[u("div",BF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.filter"))},null,8,UF),u("div",jF,[u("div",qF,[bt(u("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>o.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ar,o.hide_singles]]),u("label",{for:"switchHideSingles",textContent:g(e.$t("page.albums.hide-singles"))},null,8,WF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-singles-help"))},null,8,KF)]),o.spotify_enabled?(k(),$("div",GF,[u("div",ZF,[bt(u("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>o.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ar,o.hide_spotify]]),u("label",{for:"switchHideSpotify",textContent:g(e.$t("page.albums.hide-spotify"))},null,8,YF)]),u("p",{class:"help",textContent:g(e.$t("page.albums.hide-spotify-help"))},null,8,JF)])):H("",!0)]),u("div",XF,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.albums.sort-by.title"))},null,8,QF),y(l,{value:o.selected_groupby_option_id,"onUpdate:value":t[2]||(t[2]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.albums.title"))},null,8,eR),u("p",{class:"heading",textContent:g(e.$t("page.albums.count",{count:o.albums.count}))},null,8,tR)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{albums:o.albums},null,8,["albums"])]),_:1})])}const rR=te(MF,[["render",nR]]),sR={name:"ModalDialogArtist",props:["show","artist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-artist",params:{id:this.artist.id}})}}},oR={key:0,class:"modal is-active"},aR={class:"modal-content fd-modal-card"},iR={class:"card"},lR={class:"card-content"},uR={class:"title is-4"},cR=["textContent"],dR={class:"content is-small"},mR=["textContent"],fR=["textContent"],pR=["textContent"],hR=["textContent"],_R=["textContent"],gR=["textContent"],yR=["textContent"],vR=["textContent"],bR={class:"card-footer"},zR=["textContent"],CR=["textContent"],wR=["textContent"];function kR(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",oR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",aR,[u("div",iR,[u("div",lR,[u("p",uR,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.artist.name)},null,8,cR)]),u("div",dR,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.albums"))},null,8,mR),u("span",{class:"title is-6",textContent:g(n.artist.album_count)},null,8,fR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.tracks"))},null,8,pR),u("span",{class:"title is-6",textContent:g(n.artist.track_count)},null,8,hR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.type"))},null,8,_R),u("span",{class:"title is-6",textContent:g(e.$t("data.kind."+n.artist.data_kind))},null,8,gR)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.artist.added-on"))},null,8,yR),u("span",{class:"title is-6",textContent:g(e.$filters.datetime(n.artist.time_added))},null,8,vR)])])]),u("footer",bR,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add"))},null,8,zR)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.add-next"))},null,8,CR)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.artist.play"))},null,8,wR)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const fu=te(sR,[["render",kR]]),mi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums_list=new ge(t[1].data)}},xR={name:"PageArtist",components:{ContentWithHeading:Qe,ControlDropdown:xs,ListAlbums:cr,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){mi.load(e).then(r=>{n(s=>mi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;mi.load(e).then(s=>{mi.set(r,s),n()})},data(){return{artist:{},albums_list:new ge,groupby_options:[{id:1,name:this.$t("page.artist.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.artist.sort-by.release-date"),options:kl("date_released",{direction:"asc"})}],show_artist_details_modal:!1}},computed:{albums(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.albums_list.group(e.options),this.albums_list},selected_groupby_option_id:{get(){return this.$store.state.artist_albums_sort},set(e){this.$store.commit(e_,e)}}},methods:{open_tracks(){this.$router.push({name:"music-artist-tracks",params:{id:this.artist.id}})},play(){M.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!0)}}},ER={class:"fd-page"},SR={class:"columns"},$R={class:"column"},AR=["textContent"],TR=["textContent"],OR={class:"buttons is-centered"},DR=["textContent"],PR={class:"heading has-text-centered-mobile"},IR=["textContent"],FR=u("span",null," | ",-1),RR=["textContent"];function LR(e,t,n,r,s,o){const a=E("control-dropdown"),i=E("mdicon"),l=E("list-albums"),c=E("modal-dialog-artist"),m=E("content-with-heading");return k(),$("div",ER,[y(m,null,{options:x(()=>[u("div",SR,[u("div",$R,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,AR),y(a,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,TR)]),"heading-right":x(()=>[u("div",OR,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=d=>s.show_artist_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...d)=>o.play&&o.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,DR)])])]),content:x(()=>[u("p",PR,[u("span",{textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,IR),FR,u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...d)=>o.open_tracks&&o.open_tracks(...d)),textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,RR)]),y(l,{albums:o.albums,hide_group_title:!0},null,8,["albums"]),y(c,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[4]||(t[4]=d=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const NR=te(xR,[["render",LR]]),MR={name:"ListItemAlbumSpotify",props:["album"]},VR={class:"media is-align-items-center"},HR={key:0,class:"media-left is-clickable"},BR={class:"media-content is-clickable is-clipped"},UR=["textContent"],jR={class:"subtitle is-7 has-text-grey"},qR=["textContent"],WR=["textContent"],KR={class:"media-right"};function GR(e,t,n,r,s,o){return k(),$("div",VR,[e.$slots.artwork?(k(),$("div",HR,[ot(e.$slots,"artwork")])):H("",!0),u("div",BR,[u("h1",{class:"title is-6",textContent:g(n.album.name)},null,8,UR),u("h2",jR,[u("b",{textContent:g(n.album.artists[0].name)},null,8,qR)]),u("h2",{class:"subtitle is-7 has-text-grey has-text-weight-normal",textContent:g([n.album.album_type,e.$filters.date(n.album.release_date)].join(", "))},null,8,WR)]),u("div",KR,[ot(e.$slots,"actions")])])}const pu=te(MR,[["render",GR]]),ZR={name:"ModalDialogArtistSpotify",props:["show","artist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.artist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.artist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.artist.uri)},open_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.artist.id}})}}},YR={key:0,class:"modal is-active"},JR={class:"modal-content fd-modal-card"},XR={class:"card"},QR={class:"card-content"},eL={class:"title is-4"},tL=["textContent"],nL={class:"content is-small"},rL=["textContent"],sL=["textContent"],oL=["textContent"],aL=["textContent"],iL={class:"card-footer"},lL=["textContent"],uL=["textContent"],cL=["textContent"];function dL(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",YR,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",JR,[u("div",XR,[u("div",QR,[u("p",eL,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_artist&&o.open_artist(...i)),textContent:g(n.artist.name)},null,8,tL)]),u("div",nL,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.popularity"))},null,8,rL),u("span",{class:"title is-6",textContent:g([n.artist.popularity,n.artist.followers.total].join(" / "))},null,8,sL)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.artist.genres"))},null,8,oL),u("span",{class:"title is-6",textContent:g(n.artist.genres.join(", "))},null,8,aL)])])]),u("footer",iL,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add"))},null,8,lL)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.add-next"))},null,8,uL)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.artist.play"))},null,8,cL)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const B1=te(ZR,[["render",dL]]);function mL(e){return e.scrollHeight}function fL(e){return e.scrollWidth}function pL(e,t){e.scrollTop=e.scrollHeight-t+e.scrollTop}function hL(e,t){e.scrollLeft=e.scrollWidth-t+e.scrollLeft}const _L=u("div",{class:"loading"},"Loading...",-1),gL=u("div",{class:"no-more"},"No more.",-1),yL=u("div",{class:"no-results"},"No results.",-1),vL=u("div",{class:"error"},"Error.",-1),Am=zr({__name:"VueEternalLoading",props:{load:{required:!0,type:Function},isInitial:{required:!1,type:Boolean,default:!0},position:{required:!1,type:String,default:"default"},container:{required:!1,type:Object,default:null},margin:{required:!1,type:String,default:void 0}},emits:["update:isInitial"],setup(e,{emit:t}){const n=e,r=Xt();let s=Xt("loading"),o=Xt(n.isInitial),a=0;function i(){Ea(()=>{var z,v;n.position==="top"?pL((z=n.container)!=null?z:document.documentElement,a):n.position==="left"&&hL((v=n.container)!=null?v:document.documentElement,a)})}function l(z,v){return z===0?o.value?(m(),"no-results"):(c(),"no-more"):z!==void 0&&v!==void 0&&z{var v,S;z.isIntersecting&&(n.position==="top"?a=mL((v=n.container)!=null?v:document.documentElement):n.position==="left"&&(a=fL((S=n.container)!=null?S:document.documentElement)),_(),n.load({loaded:l,noMore:c,noResults:m,error:d},{isFirstLoad:o.value}))},{root:n.container,threshold:0,rootMargin:n.margin})}let C;return typeof IntersectionObserver<"u"&&R_(()=>{C&&_(),C=w(),b()},{flush:"post"}),en(()=>n.isInitial,z=>{z&&f()}),en(o,z=>{z||t("update:isInitial",!1)}),(z,v)=>(k(),$("div",{class:"vue-eternal-loading",ref_key:"rootRef",ref:r},[vn(s)==="loading"?ot(z.$slots,"loading",Fo(Vs({key:0},{isFirstLoad:vn(o)})),()=>[_L]):vn(s)==="no-more"?ot(z.$slots,"no-more",Fo(Vs({key:1},{retry:p})),()=>[gL]):vn(s)==="no-results"?ot(z.$slots,"no-results",Fo(Vs({key:2},{retry:p})),()=>[yL]):vn(s)==="error"?ot(z.$slots,"error",Fo(Vs({key:3},{retry:p})),()=>[vL]):H("",!0)],512))}}),od=50,fi={load:function(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getArtist(e.params.id),t.getArtistAlbums(e.params.id,{limit:od,offset:0,include_groups:"album,single",market:Ue.state.spotify.webapi_country})])},set(e,t){e.artist=t[0],e.albums=[],e.total=0,e.offset=0,e.append_albums(t[1])}},bL={name:"PageArtistSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Na,ModalDialogArtistSpotify:B1,VueEternalLoading:Am},beforeRouteEnter(e,t,n){fi.load(e).then(r=>{n(s=>fi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;fi.load(e).then(s=>{fi.set(r,s),n()})},data(){return{artist:{},albums:[],total:0,offset:0,show_details_modal:!1,selected_album:{},show_artist_details_modal:!1}},computed:{is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{load_next({loaded:e}){const t=new Yn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getArtistAlbums(this.artist.id,{limit:od,offset:this.offset,include_groups:"album,single"}).then(n=>{this.append_albums(n),e(n.items.length,od)})},append_albums(e){this.albums=this.albums.concat(e.items),this.total=e.total,this.offset+=e.limit},play(){this.show_details_modal=!1,M.player_play_uri(this.artist.uri,!0)},open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_dialog(e){this.selected_album=e,this.show_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},zL={class:"fd-page"},CL=["textContent"],wL={class:"buttons is-centered"},kL=["textContent"],xL=["textContent"],EL=["onClick"];function SL(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-item-album-spotify"),c=E("VueEternalLoading"),m=E("modal-dialog-album-spotify"),d=E("modal-dialog-artist-spotify"),f=E("content-with-heading");return k(),$("div",zL,[y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,CL)]),"heading-right":x(()=>[u("div",wL,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=p=>s.show_artist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...p)=>o.play&&o.play(...p))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.artist.shuffle"))},null,8,kL)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.artist.album-count",{count:s.total}))},null,8,xL),(k(!0),$(Ce,null,lt(s.albums,p=>(k(),me(l,{key:p.id,album:p,onClick:h=>o.open_album(p)},Ta({actions:x(()=>[u("a",{onClick:rt(h=>o.open_dialog(p),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,EL)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(p),artist:p.artist,album:p.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),s.offset[nt(" . ")]),_:1},8,["load"])):H("",!0),y(m,{show:s.show_details_modal,album:s.selected_album,onClose:t[2]||(t[2]=p=>s.show_details_modal=!1)},null,8,["show","album"]),y(d,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[3]||(t[3]=p=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const $L=te(bL,[["render",SL]]),pi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_tracks(e.params.id)])},set(e,t){e.artist=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},AL={name:"PageArtistTracks",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListTracks:Cn,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){pi.load(e).then(r=>{n(s=>pi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;pi.load(e).then(s=>{pi.set(r,s),n()})},data(){return{artist:{},groupby_options:[{id:1,name:this.$t("page.artist.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.artist.sort-by.rating"),options:Em("rating",{direction:"desc"})}],show_artist_details_modal:!1,tracks_list:new ge}},computed:{selected_groupby_option_id:{get(){return this.$store.state.artist_tracks_sort},set(e){this.$store.commit(t_,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list},track_uris(){return this.tracks_list.items.map(e=>e.uri).join(",")}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"music-artist",params:{id:this.artist.id}})},play(){M.player_play_uri(this.tracks_list.items.map(e=>e.uri).join(","),!0)}}},TL={class:"fd-page"},OL={class:"columns"},DL={class:"column"},PL=["textContent"],IL=["textContent"],FL={class:"buttons is-centered"},RL=["textContent"],LL={class:"heading has-text-centered-mobile"},NL=["textContent"],ML=u("span",null," | ",-1),VL=["textContent"];function HL(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-artist"),d=E("content-with-heading");return k(),$("div",TL,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",OL,[u("div",DL,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,PL),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,IL)]),"heading-right":x(()=>[u("div",FL,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_artist_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.artist.shuffle"))},null,8,RL)])])]),content:x(()=>[u("p",LL,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_artist&&o.open_artist(...f)),textContent:g(e.$t("page.artist.album-count",{count:s.artist.album_count}))},null,8,NL),ML,u("span",{textContent:g(e.$t("page.artist.track-count",{count:s.artist.track_count}))},null,8,VL)]),y(c,{tracks:o.tracks,uris:o.track_uris},null,8,["tracks","uris"]),y(m,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[4]||(t[4]=f=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const BL=te(AL,[["render",HL]]),UL={name:"ListArtists",components:{ModalDialogArtist:fu},props:["artists","hide_group_title"],data(){return{show_details_modal:!1,selected_artist:{}}},methods:{open_artist(e){this.selected_artist=e;const t=e.media_kind==="audiobook"?"audiobooks-artist":"music-artist";this.$router.push({name:t,params:{id:e.id}})},open_dialog(e){this.selected_artist=e,this.show_details_modal=!0}}},jL={key:0,class:"mt-6 mb-5 py-2"},qL={class:"media-content is-clipped"},WL=["id","textContent"],KL=["onClick"],GL={class:"media-content is-clickable is-clipped"},ZL=["textContent"],YL={class:"media-right"},JL=["onClick"];function XL(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-artist");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.artists,l=>(k(),$(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",jL,[u("div",qL,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,WL)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_artist(l.item)},[u("div",GL,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,ZL)]),u("div",YL,[u("a",{onClick:rt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,JL)])],8,KL)):H("",!0)],64))),128)),(k(),me(Jr,{to:"#app"},[y(i,{artist:s.selected_artist,show:s.show_details_modal,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["artist","show"])]))],64)}const Tm=te(UL,[["render",XL]]),hi={load(e){return M.library_artists("music")},set(e,t){e.artists_list=new ge(t.data)}},QL={name:"PageArtists",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListArtists:Tm,TabsMusic:dr},beforeRouteEnter(e,t,n){hi.load(e).then(r=>{n(s=>hi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.artists_list.isEmpty()){n();return}const r=this;hi.load(e).then(s=>{hi.set(r,s),n()})},data(){return{artists_list:new ge,groupby_options:[{id:1,name:this.$t("page.artists.sort-by.name"),options:Rn("name_sort",!0)},{id:2,name:this.$t("page.artists.sort-by.recently-added"),options:kl("time_added",{direction:"desc"})}]}},computed:{artists(){if(!this.artists_list)return[];const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.artists_list.group(e.options,[t=>!this.hide_singles||t.track_count>t.album_count*2,t=>!this.hide_spotify||t.data_kind!=="spotify"]),this.artists_list},selected_groupby_option_id:{get(){return this.$store.state.artists_sort},set(e){this.$store.commit(Qh,e)}},spotify_enabled(){return this.$store.state.spotify.webapi_token_valid},hide_singles:{get(){return this.$store.state.hide_singles},set(e){this.$store.commit(Ol,e)}},hide_spotify:{get(){return this.$store.state.hide_spotify},set(e){this.$store.commit(_d,e)}}}},eN={class:"fd-page-with-tabs"},tN={class:"columns"},nN={class:"column"},rN=["textContent"],sN={class:"field"},oN={class:"control"},aN=["textContent"],iN=["textContent"],lN={key:0,class:"field"},uN={class:"control"},cN=["textContent"],dN=["textContent"],mN={class:"column"},fN=["textContent"],pN=["textContent"],hN=["textContent"];function _N(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("control-dropdown"),c=E("list-artists"),m=E("content-with-heading");return k(),$("div",eN,[y(a),y(m,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"]),u("div",tN,[u("div",nN,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.filter"))},null,8,rN),u("div",sN,[u("div",oN,[bt(u("input",{id:"switchHideSingles","onUpdate:modelValue":t[0]||(t[0]=d=>o.hide_singles=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ar,o.hide_singles]]),u("label",{for:"switchHideSingles",textContent:g(e.$t("page.artists.hide-singles"))},null,8,aN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-singles-help"))},null,8,iN)]),o.spotify_enabled?(k(),$("div",lN,[u("div",uN,[bt(u("input",{id:"switchHideSpotify","onUpdate:modelValue":t[1]||(t[1]=d=>o.hide_spotify=d),type:"checkbox",class:"switch is-rounded"},null,512),[[ar,o.hide_spotify]]),u("label",{for:"switchHideSpotify",textContent:g(e.$t("page.artists.hide-spotify"))},null,8,cN)]),u("p",{class:"help",textContent:g(e.$t("page.artists.hide-spotify-help"))},null,8,dN)])):H("",!0)]),u("div",mN,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artists.sort-by.title"))},null,8,fN),y(l,{value:o.selected_groupby_option_id,"onUpdate:value":t[2]||(t[2]=d=>o.selected_groupby_option_id=d),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.artists.title"))},null,8,pN),u("p",{class:"heading",textContent:g(e.$t("page.artists.count",{count:o.artists.count}))},null,8,hN)]),"heading-right":x(()=>[]),content:x(()=>[y(c,{artists:o.artists},null,8,["artists"])]),_:1})])}const gN=te(QL,[["render",_N]]),_i={load(e){return Promise.all([M.library_album(e.params.id),M.library_album_tracks(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data)}},yN={name:"PageAudiobooksAlbum",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){_i.load(e).then(r=>{n(s=>_i.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;_i.load(e).then(s=>{_i.set(r,s),n()})},data(){return{album:{},tracks:new ge,show_album_details_modal:!1}},methods:{open_artist(){this.show_details_modal=!1,this.$router.push({name:"audiobooks-artist",params:{id:this.album.artist_id}})},play(){M.player_play_uri(this.album.uri,!1)}}},vN={class:"fd-page"},bN=["textContent"],zN={class:"subtitle is-6 has-text-link has-text-weight-normal"},CN=["textContent"],wN={class:"buttons fd-is-centered-mobile mt-5"},kN=["textContent"],xN=["textContent"];function EN(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("content-with-hero");return k(),$("div",vN,[y(m,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,bN),u("h2",zN,[u("a",{class:"has-text-link",onClick:t[0]||(t[0]=(...d)=>o.open_artist&&o.open_artist(...d)),textContent:g(s.album.artist)},null,8,CN)]),u("div",wN,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.album.play"))},null,8,kN)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[2]||(t[2]=d=>s.show_album_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[3]||(t[3]=d=>s.show_album_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.audiobooks.album.track-count",{count:s.album.track_count}))},null,8,xN),y(l,{tracks:s.tracks,uris:s.album.uri},null,8,["tracks","uris"]),y(c,{show:s.show_album_details_modal,album:s.album,media_kind:"audiobook",onClose:t[4]||(t[4]=d=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const SN=te(yN,[["render",EN]]),$N={name:"TabsAudiobooks"},AN={class:"section fd-tabs-section"},TN={class:"container"},ON={class:"columns is-centered"},DN={class:"column is-four-fifths"},PN={class:"tabs is-centered is-small"},IN=["onClick","onKeypress"],FN=["textContent"],RN=["onClick","onKeypress"],LN=["textContent"],NN=["onClick","onKeypress"],MN=["textContent"];function VN(e,t,n,r,s,o){const a=E("mdicon"),i=E("router-link");return k(),$("section",AN,[u("div",TN,[u("div",ON,[u("div",DN,[u("div",PN,[u("ul",null,[y(i,{to:{name:"audiobooks-artists"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"account-music",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.authors"))},null,8,FN)],40,IN)],2)]),_:1}),y(i,{to:{name:"audiobooks-albums"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"album",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.audiobooks"))},null,8,LN)],40,RN)],2)]),_:1}),y(i,{to:{name:"audiobooks-genres"},custom:""},{default:x(({navigate:l,isActive:c})=>[u("li",{class:Ee({"is-active":c})},[u("a",{onClick:l,onKeypress:an(l,["enter"])},[y(a,{class:"icon is-small",name:"speaker",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.tabs.genres"))},null,8,MN)],40,NN)],2)]),_:1})])])])])])])}const Om=te($N,[["render",VN]]),gi={load(e){return M.library_albums("audiobook")},set(e,t){e.albums=new ge(t.data),e.albums.group(Rn("name_sort",!0))}},HN={name:"PageAudiobooksAlbums",components:{TabsAudiobooks:Om,ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:cr},beforeRouteEnter(e,t,n){gi.load(e).then(r=>{n(s=>gi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums.isEmpty()){n();return}const r=this;gi.load(e).then(s=>{gi.set(r,s),n()})},data(){return{albums:new ge}}},BN={class:"fd-page-with-tabs"},UN=["textContent"],jN=["textContent"];function qN(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-albums"),c=E("content-with-heading");return k(),$("div",BN,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.albums.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.albums.title"))},null,8,UN),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.albums.count",{count:s.albums.count}))},null,8,jN)]),content:x(()=>[y(l,{albums:s.albums},null,8,["albums"])]),_:1})])}const WN=te(HN,[["render",qN]]),yi={load(e){return Promise.all([M.library_artist(e.params.id),M.library_artist_albums(e.params.id)])},set(e,t){e.artist=t[0].data,e.albums=new ge(t[1].data)}},KN={name:"PageAudiobooksArtist",components:{ContentWithHeading:Qe,ListAlbums:cr,ModalDialogArtist:fu},beforeRouteEnter(e,t,n){yi.load(e).then(r=>{n(s=>yi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums.isEmpty()){n();return}const r=this;yi.load(e).then(s=>{yi.set(r,s),n()})},data(){return{artist:{},albums:new ge,show_artist_details_modal:!1}},methods:{play(){M.player_play_uri(this.albums.items.map(e=>e.uri).join(","),!1)}}},GN={class:"fd-page"},ZN=["textContent"],YN={class:"buttons is-centered"},JN=["textContent"],XN=["textContent"];function QN(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-albums"),l=E("modal-dialog-artist"),c=E("content-with-heading");return k(),$("div",GN,[y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.artist.name)},null,8,ZN)]),"heading-right":x(()=>[u("div",YN,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_artist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.audiobooks.artist.play"))},null,8,JN)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.audiobooks.artist.album-count",{count:s.artist.album_count}))},null,8,XN),y(i,{albums:s.albums},null,8,["albums"]),y(l,{show:s.show_artist_details_modal,artist:s.artist,onClose:t[2]||(t[2]=m=>s.show_artist_details_modal=!1)},null,8,["show","artist"])]),_:1})])}const eM=te(KN,[["render",QN]]),vi={load(e){return M.library_artists("audiobook")},set(e,t){e.artists_list=new ge(t.data)}},tM={name:"PageAudiobooksArtists",components:{ContentWithHeading:Qe,TabsAudiobooks:Om,IndexButtonList:Jn,ListArtists:Tm},beforeRouteEnter(e,t,n){vi.load(e).then(r=>{n(s=>vi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.artists_list.isEmpty()){n();return}const r=this;vi.load(e).then(s=>{vi.set(r,s),n()})},data(){return{artists_list:new ge}},computed:{artists(){return this.artists_list?(this.artists_list.group(Rn("name_sort",!0)),this.artists_list):[]}}},nM={class:"fd-page-with-tabs"},rM=["textContent"],sM=["textContent"];function oM(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-artists"),c=E("content-with-heading");return k(),$("div",nM,[y(a),y(c,null,{options:x(()=>[y(i,{index:o.artists.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.audiobooks.artists.title"))},null,8,rM),u("p",{class:"heading",textContent:g(e.$t("page.audiobooks.artists.count",{count:o.artists.count}))},null,8,sM)]),"heading-right":x(()=>[]),content:x(()=>[y(l,{artists:o.artists},null,8,["artists"])]),_:1})])}const aM=te(tM,[["render",oM]]),iM={name:"ModalDialogGenre",props:["genre","media_kind","show"],emits:["close"],computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`}},methods:{play(){this.$emit("close"),M.player_play_expression(this.expression,!1)},queue_add(){this.$emit("close"),M.queue_expression_add(this.expression)},queue_add_next(){this.$emit("close"),M.queue_expression_add_next(this.expression)},open_genre(){this.$emit("close"),this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})}}},lM={key:0,class:"modal is-active"},uM={class:"modal-content fd-modal-card"},cM={class:"card"},dM={class:"card-content"},mM={class:"title is-4"},fM=["textContent"],pM={class:"content is-small"},hM=["textContent"],_M=["textContent"],gM=["textContent"],yM=["textContent"],vM=["textContent"],bM=["textContent"],zM={class:"card-footer"},CM=["textContent"],wM=["textContent"],kM=["textContent"];function xM(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",lM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",uM,[u("div",cM,[u("div",dM,[u("p",mM,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.genre.name)},null,8,fM)]),u("div",pM,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.albums"))},null,8,hM),u("span",{class:"title is-6",textContent:g(n.genre.album_count)},null,8,_M)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.tracks"))},null,8,gM),u("span",{class:"title is-6",textContent:g(n.genre.track_count)},null,8,yM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.genre.duration"))},null,8,vM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.genre.length_ms))},null,8,bM)])])]),u("footer",zM,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add"))},null,8,CM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.add-next"))},null,8,wM)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.genre.play"))},null,8,kM)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Dm=te(iM,[["render",xM]]),EM={name:"ListGenres",components:{ModalDialogGenre:Dm},props:["genres","hide_group_title","media_kind"],data(){return{show_details_modal:!1,selected_genre:{}}},methods:{open_genre(e){this.$router.push({name:"genre-albums",params:{name:e.name},query:{media_kind:this.media_kind}})},open_dialog(e){this.selected_genre=e,this.show_details_modal=!0}}},SM={key:0,class:"mt-6 mb-5 py-2"},$M={class:"media-content is-clipped"},AM=["id","textContent"],TM=["onClick"],OM={class:"media-content is-clickable is-clipped"},DM=["textContent"],PM={class:"media-right"},IM=["onClick"];function FM(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-genre");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.genres,l=>(k(),$(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",SM,[u("div",$M,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,AM)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_genre(l.item)},[u("div",OM,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,DM)]),u("div",PM,[u("a",{onClick:rt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,IM)])],8,TM)):H("",!0)],64))),128)),(k(),me(Jr,{to:"#app"},[y(i,{show:s.show_details_modal,genre:s.selected_genre,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","genre","media_kind"])]))],64)}const U1=te(EM,[["render",FM]]),bi={load(e){return M.library_genres("audiobook")},set(e,t){e.genres=t.data,e.genres=new ge(t.data),e.genres.group(Rn("name_sort"))}},RM={name:"PageAudiobooksGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:U1,TabsAudiobooks:Om},beforeRouteEnter(e,t,n){bi.load(e).then(r=>{n(s=>bi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;bi.load(e).then(s=>{bi.set(r,s),n()})},data(){return{genres:new ge}}},LM={class:"fd-page-with-tabs"},NM=["textContent"],MM=["textContent"];function VM(e,t,n,r,s,o){const a=E("tabs-audiobooks"),i=E("index-button-list"),l=E("list-genres"),c=E("content-with-heading");return k(),$("div",LM,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.genres.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,NM),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,MM)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"audiobook"},null,8,["genres"])]),_:1})])}const HM=te(RM,[["render",VM]]),BM={name:"ModalDialogComposer",props:["show","composer"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_expression('composer is "'+this.composer.name+'" and media_kind is music',!1)},queue_add(){this.$emit("close"),M.queue_expression_add('composer is "'+this.composer.name+'" and media_kind is music')},queue_add_next(){this.$emit("close"),M.queue_expression_add_next('composer is "'+this.composer.name+'" and media_kind is music')},open_albums(){this.$emit("close"),this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},open_tracks(){this.show_details_modal=!1,this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})}}},UM={key:0,class:"modal is-active"},jM={class:"modal-content fd-modal-card"},qM={class:"card"},WM={class:"card-content"},KM={class:"title is-4"},GM=["textContent"],ZM=["textContent"],YM=["textContent"],JM=["textContent"],XM=["textContent"],QM=["textContent"],e7=["textContent"],t7={class:"card-footer"},n7=["textContent"],r7=["textContent"],s7=["textContent"];function o7(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",UM,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",jM,[u("div",qM,[u("div",WM,[u("p",KM,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_albums&&o.open_albums(...i)),textContent:g(n.composer.name)},null,8,GM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.albums"))},null,8,ZM),u("a",{class:"has-text-link is-6",onClick:t[2]||(t[2]=(...i)=>o.open_albums&&o.open_albums(...i)),textContent:g(n.composer.album_count)},null,8,YM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.tracks"))},null,8,JM),u("a",{class:"has-text-link is-6",onClick:t[3]||(t[3]=(...i)=>o.open_tracks&&o.open_tracks(...i)),textContent:g(n.composer.track_count)},null,8,XM)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.composer.duration"))},null,8,QM),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.composer.length_ms))},null,8,e7)])]),u("footer",t7,[u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add"))},null,8,n7)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[5]||(t[5]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.add-next"))},null,8,r7)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.composer.play"))},null,8,s7)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[7]||(t[7]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const Pm=te(BM,[["render",o7]]),zi={load(e){return Promise.all([M.library_composer(e.params.name),M.library_composer_albums(e.params.name)])},set(e,t){e.composer=t[0].data,e.albums_list=new ge(t[1].data.albums)}},a7={name:"PageComposerAlbums",components:{ContentWithHeading:Qe,ListAlbums:cr,ModalDialogComposer:Pm},beforeRouteEnter(e,t,n){zi.load(e).then(r=>{n(s=>zi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;zi.load(e).then(s=>{zi.set(r,s),n()})},data(){return{composer:{},albums_list:new ge,show_composer_details_modal:!1}},methods:{open_tracks(){this.$router.push({name:"music-composer-tracks",params:{name:this.composer.name}})},play(){M.player_play_expression('composer is "'+this.composer.name+'" and media_kind is music',!0)}}},i7={class:"fd-page"},l7=["textContent"],u7={class:"buttons is-centered"},c7=["textContent"],d7={class:"heading has-text-centered-mobile"},m7=["textContent"],f7=u("span",null," | ",-1),p7=["textContent"];function h7(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-albums"),l=E("modal-dialog-composer"),c=E("content-with-heading");return k(),$("div",i7,[y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.composer.name)},null,8,l7)]),"heading-right":x(()=>[u("div",u7,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_composer_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,c7)])])]),content:x(()=>[u("p",d7,[u("span",{textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,m7),f7,u("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...m)=>o.open_tracks&&o.open_tracks(...m)),textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,p7)]),y(i,{albums:s.albums_list,hide_group_title:!0},null,8,["albums"]),y(l,{show:s.show_composer_details_modal,composer:s.composer,onClose:t[3]||(t[3]=m=>s.show_composer_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const _7=te(a7,[["render",h7]]),Ci={load(e){return Promise.all([M.library_composer(e.params.name),M.library_composer_tracks(e.params.name)])},set(e,t){e.composer=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},g7={name:"PageComposerTracks",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListTracks:Cn,ModalDialogComposer:Pm},beforeRouteEnter(e,t,n){Ci.load(e).then(r=>{n(s=>Ci.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ci.load(e).then(s=>{Ci.set(r,s),n()})},data(){return{groupby_options:[{id:1,name:this.$t("page.composer.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.composer.sort-by.rating"),options:Em("rating",{direction:"desc"})}],composer:{},show_composer_details_modal:!1,tracks_list:new ge}},computed:{expression(){return'composer is "'+this.composer.name+'" and media_kind is music'},selected_groupby_option_id:{get(){return this.$store.state.composer_tracks_sort},set(e){this.$store.commit(Jh,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_albums(){this.show_details_modal=!1,this.$router.push({name:"music-composer-albums",params:{name:this.composer.name}})},play(){M.player_play_expression(this.expression,!0)}}},y7={class:"fd-page"},v7={class:"columns"},b7={class:"column"},z7=["textContent"],C7=["textContent"],w7={class:"buttons is-centered"},k7=["textContent"],x7={class:"heading has-text-centered-mobile"},E7=["textContent"],S7=u("span",null," | ",-1),$7=["textContent"];function A7(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-composer"),d=E("content-with-heading");return k(),$("div",y7,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",v7,[u("div",b7,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.artist.sort-by.title"))},null,8,z7),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.composer.name)},null,8,C7)]),"heading-right":x(()=>[u("div",w7,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_composer_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.composer.shuffle"))},null,8,k7)])])]),content:x(()=>[u("p",x7,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_albums&&o.open_albums(...f)),textContent:g(e.$t("page.composer.album-count",{count:s.composer.album_count}))},null,8,E7),S7,u("span",{textContent:g(e.$t("page.composer.track-count",{count:s.composer.track_count}))},null,8,$7)]),y(c,{tracks:o.tracks,expression:o.expression},null,8,["tracks","expression"]),y(m,{show:s.show_composer_details_modal,composer:s.composer,onClose:t[4]||(t[4]=f=>s.show_composer_details_modal=!1)},null,8,["show","composer"])]),_:1})])}const T7=te(g7,[["render",A7]]),O7={name:"ListComposers",components:{ModalDialogComposer:Pm},props:["composers","media_kind","hide_group_title"],data(){return{show_details_modal:!1,selected_composer:{}}},methods:{open_composer(e){this.selected_composer=e,this.$router.push({name:"music-composer-albums",params:{name:e.name}})},open_dialog(e){this.selected_composer=e,this.show_details_modal=!0}}},D7={key:0,class:"mt-6 mb-5 py-2"},P7={class:"media-content is-clipped"},I7=["id","textContent"],F7=["onClick"],R7={class:"media-content is-clickable is-clipped"},L7=["textContent"],N7={class:"media-right"},M7=["onClick"];function V7(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-composer");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.composers,l=>(k(),$(Ce,{key:l.itemId},[!l.isItem&&!n.hide_group_title?(k(),$("div",D7,[u("div",P7,[u("span",{id:"index_"+l.groupKey,class:"tag is-info is-light is-small has-text-weight-bold",textContent:g(l.groupKey)},null,8,I7)])])):l.isItem?(k(),$("div",{key:1,class:"media is-align-items-center",onClick:c=>o.open_composer(l.item)},[u("div",R7,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,L7)]),u("div",N7,[u("a",{onClick:rt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,M7)])],8,F7)):H("",!0)],64))),128)),(k(),me(Jr,{to:"#app"},[y(i,{show:s.show_details_modal,composer:s.selected_composer,media_kind:n.media_kind,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","composer","media_kind"])]))],64)}const j1=te(O7,[["render",V7]]),wi={load(e){return M.library_composers("music")},set(e,t){e.composers=new ge(t.data),e.composers.group(Rn("name_sort"))}},H7={name:"PageComposers",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListComposers:j1,TabsMusic:dr},beforeRouteEnter(e,t,n){wi.load(e).then(r=>{n(s=>wi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.composers.isEmpty()){n();return}const r=this;wi.load(e).then(s=>{wi.set(r,s),n()})},data(){return{composers:new ge}}},B7={class:"fd-page-with-tabs"},U7=["textContent"],j7=["textContent"];function q7(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("list-composers"),c=E("content-with-heading");return k(),$("div",B7,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.composers.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.composers.title"))},null,8,U7),u("p",{class:"heading",textContent:g(e.$t("page.composers.count",{count:s.composers.total}))},null,8,j7)]),content:x(()=>[y(l,{composers:s.composers},null,8,["composers"])]),_:1})])}const W7=te(H7,[["render",q7]]),K7={name:"ModalDialogDirectory",props:["show","directory"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_expression('path starts with "'+this.directory+'" order by path asc',!1)},queue_add(){this.$emit("close"),M.queue_expression_add('path starts with "'+this.directory+'" order by path asc')},queue_add_next(){this.$emit("close"),M.queue_expression_add_next('path starts with "'+this.directory+'" order by path asc')}}},G7={key:0,class:"modal is-active"},Z7={class:"modal-content fd-modal-card"},Y7={class:"card"},J7={class:"card-content"},X7=["textContent"],Q7={class:"card-footer"},e9=["textContent"],t9=["textContent"],n9=["textContent"];function r9(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",G7,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",Z7,[u("div",Y7,[u("div",J7,[u("p",{class:"title is-4",textContent:g(n.directory)},null,8,X7)]),u("footer",Q7,[u("a",{class:"card-footer-item has-text-dark",onClick:t[1]||(t[1]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add"))},null,8,e9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.add-next"))},null,8,t9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.directory.play"))},null,8,n9)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[4]||(t[4]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const q1=te(K7,[["render",r9]]),s9={name:"ListDirectories",components:{ModalDialogDirectory:q1},props:["directories"],data(){return{show_details_modal:!1,selected_directory:""}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"}},methods:{open_parent_directory(){this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))===""||this.$store.state.config.directories.includes(this.current_directory)?this.$router.push({name:"files"}):this.$router.push({name:"files",query:{directory:this.current_directory.slice(0,this.current_directory.lastIndexOf("/"))}})},open_directory(e){this.$router.push({name:"files",query:{directory:e.path}})},open_dialog(e){this.selected_directory=e.path,this.show_details_modal=!0}}},o9={class:"media-left is-clickable"},a9=u("div",{class:"media-content is-clickable is-clipped"},[u("h1",{class:"title is-6"},"..")],-1),i9={class:"media-right"},l9=["onClick"],u9={class:"media-left is-clickable"},c9={class:"media-content is-clickable is-clipped"},d9=["textContent"],m9=["textContent"],f9={class:"media-right"},p9=["onClick"];function h9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-directory");return k(),$(Ce,null,[e.$route.query.directory?(k(),$("div",{key:0,class:"media is-align-items-center",onClick:t[0]||(t[0]=l=>o.open_parent_directory())},[u("figure",o9,[y(a,{class:"icon",name:"subdirectory-arrow-left",size:"16"})]),a9,u("div",i9,[ot(e.$slots,"actions")])])):H("",!0),(k(!0),$(Ce,null,lt(n.directories,l=>(k(),$("div",{key:l.path,class:"media is-align-items-center",onClick:c=>o.open_directory(l)},[u("figure",u9,[y(a,{class:"icon",name:"folder",size:"16"})]),u("div",c9,[u("h1",{class:"title is-6",textContent:g(l.path.substring(l.path.lastIndexOf("/")+1))},null,8,d9),u("h2",{class:"subtitle is-7 has-text-grey-light",textContent:g(l.path)},null,8,m9)]),u("div",f9,[u("a",{onClick:rt(c=>o.open_dialog(l),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,p9)])],8,l9))),128)),(k(),me(Jr,{to:"#app"},[y(i,{show:s.show_details_modal,directory:s.selected_directory,onClose:t[1]||(t[1]=l=>s.show_details_modal=!1)},null,8,["show","directory"])]))],64)}const _9=te(s9,[["render",h9]]),g9={name:"ModalDialogPlaylist",props:["show","playlist","uris"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.uris?this.uris:this.playlist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.uris?this.uris:this.playlist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.uris?this.uris:this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist",params:{id:this.playlist.id}})}}},y9={key:0,class:"modal is-active"},v9={class:"modal-content fd-modal-card"},b9={class:"card"},z9={class:"card-content"},C9={class:"title is-4"},w9=["textContent"],k9={class:"content is-small"},x9=["textContent"],E9=["textContent"],S9=["textContent"],$9=["textContent"],A9={key:0},T9=["textContent"],O9=["textContent"],D9={key:0,class:"card-footer"},P9=["textContent"],I9=["textContent"],F9=["textContent"];function R9(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",y9,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",v9,[u("div",b9,[u("div",z9,[u("p",C9,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_playlist&&o.open_playlist(...i)),textContent:g(n.playlist.name)},null,8,w9)]),u("div",k9,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.path"))},null,8,x9),u("span",{class:"title is-6",textContent:g(n.playlist.path)},null,8,E9)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.type"))},null,8,S9),u("span",{class:"title is-6",textContent:g(e.$t("playlist.type."+n.playlist.type))},null,8,$9)]),n.playlist.folder?H("",!0):(k(),$("p",A9,[u("span",{class:"heading",textContent:g(e.$t("dialog.playlist.track-count"))},null,8,T9),u("span",{class:"title is-6",textContent:g(n.playlist.item_count)},null,8,O9)]))])]),n.playlist.folder?H("",!0):(k(),$("footer",D9,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add"))},null,8,P9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.add-next"))},null,8,I9)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.playlist.play"))},null,8,F9)])]))])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const W1=te(g9,[["render",R9]]),L9={name:"ListPlaylists",components:{ModalDialogPlaylist:W1},props:["playlists"],data(){return{show_details_modal:!1,selected_playlist:{}}},methods:{open_playlist(e){e.type==="folder"?this.$router.push({name:"playlist-folder",params:{id:e.id}}):this.$router.push({name:"playlist",params:{id:e.id}})},open_dialog(e){this.selected_playlist=e,this.show_details_modal=!0},icon_name(e){return e.type==="folder"?"folder":e.type==="rss"?"rss":"music-box-multiple"}}},N9=["onClick"],M9={class:"media-left is-clickable"},V9={class:"media-content is-clickable is-clipped"},H9=["textContent"],B9={class:"media-right"},U9=["onClick"];function j9(e,t,n,r,s,o){const a=E("mdicon"),i=E("modal-dialog-playlist");return k(),$(Ce,null,[(k(!0),$(Ce,null,lt(n.playlists,l=>(k(),$("div",{key:l.itemId,class:"media is-align-items-center",onClick:c=>o.open_playlist(l.item)},[u("figure",M9,[y(a,{class:"icon",name:o.icon_name(l.item),size:"16"},null,8,["name"])]),u("div",V9,[u("h1",{class:"title is-6",textContent:g(l.item.name)},null,8,H9)]),u("div",B9,[u("a",{onClick:rt(c=>o.open_dialog(l.item),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,U9)])],8,N9))),128)),(k(),me(Jr,{to:"#app"},[y(i,{show:s.show_details_modal,playlist:s.selected_playlist,onClose:t[0]||(t[0]=l=>s.show_details_modal=!1)},null,8,["show","playlist"])]))],64)}const Im=te(L9,[["render",j9]]),ki={load(e){return e.query.directory?M.library_files(e.query.directory):Promise.resolve()},set(e,t){t?(e.dirs=t.data.directories,e.playlists=new ge(t.data.playlists),e.tracks=new ge(t.data.tracks)):(e.dirs=e.$store.state.config.directories.map(n=>({path:n})),e.playlists=new ge,e.tracks=new ge)}},q9={name:"PageFiles",components:{ContentWithHeading:Qe,ListDirectories:_9,ListPlaylists:Im,ListTracks:Cn,ModalDialogDirectory:q1},beforeRouteEnter(e,t,n){ki.load(e).then(r=>{n(s=>ki.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;ki.load(e).then(s=>{ki.set(r,s),n()})},data(){return{dirs:[],playlists:new ge,tracks:new ge,show_details_modal:!1}},computed:{current_directory(){return this.$route.query&&this.$route.query.directory?this.$route.query.directory:"/"},play_expression(){return'path starts with "'+this.current_directory+'" order by path asc'}},methods:{play(){M.player_play_expression(this.play_expression,!1)}}},W9={class:"fd-page"},K9=["textContent"],G9=["textContent"],Z9={class:"buttons is-centered"},Y9=["textContent"];function J9(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-directories"),l=E("list-playlists"),c=E("list-tracks"),m=E("modal-dialog-directory"),d=E("content-with-heading");return k(),$("div",W9,[y(d,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.files.title"))},null,8,K9),u("p",{class:"title is-7 has-text-grey",textContent:g(o.current_directory)},null,8,G9)]),"heading-right":x(()=>[u("div",Z9,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.files.play"))},null,8,Y9)])])]),content:x(()=>[y(i,{directories:s.dirs},null,8,["directories"]),y(l,{playlists:s.playlists},null,8,["playlists"]),y(c,{tracks:s.tracks,expression:o.play_expression,show_icon:!0},null,8,["tracks","expression"]),y(m,{show:s.show_details_modal,directory:o.current_directory,onClose:t[2]||(t[2]=f=>s.show_details_modal=!1)},null,8,["show","directory"])]),_:1})])}const X9=te(q9,[["render",J9]]),xi={load(e){return Promise.all([M.library_genre(e.params.name,e.query.media_kind),M.library_genre_albums(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.albums_list=new ge(t[1].data.albums),e.albums_list.group(Rn("name_sort",!0))}},Q9={name:"PageGenreAlbums",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListAlbums:cr,ModalDialogGenre:Dm},beforeRouteEnter(e,t,n){xi.load(e).then(r=>{n(s=>xi.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.albums_list.isEmpty()){n();return}const r=this;xi.load(e).then(s=>{xi.set(r,s),n()})},data(){return{genre:{},albums_list:new ge,media_kind:this.$route.query.media_kind,show_genre_details_modal:!1}},methods:{open_tracks(){this.show_details_modal=!1,this.$router.push({name:"genre-tracks",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){M.player_play_expression(`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`,!0)}}},eV={class:"fd-page"},tV=["textContent"],nV={class:"buttons is-centered"},rV=["textContent"],sV={class:"heading has-text-centered-mobile"},oV=["textContent"],aV=u("span",null," | ",-1),iV=["textContent"];function lV(e,t,n,r,s,o){const a=E("index-button-list"),i=E("mdicon"),l=E("list-albums"),c=E("modal-dialog-genre"),m=E("content-with-heading");return k(),$("div",eV,[y(m,null,{options:x(()=>[y(a,{index:s.albums_list.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.genre.name)},null,8,tV)]),"heading-right":x(()=>[u("div",nV,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=d=>s.show_genre_details_modal=!0)},[y(i,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...d)=>o.play&&o.play(...d))},[y(i,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,rV)])])]),content:x(()=>[u("p",sV,[u("span",{textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,oV),aV,u("a",{class:"has-text-link",onClick:t[2]||(t[2]=(...d)=>o.open_tracks&&o.open_tracks(...d)),textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,iV)]),y(l,{albums:s.albums_list},null,8,["albums"]),y(c,{genre:s.genre,media_kind:s.media_kind,show:s.show_genre_details_modal,onClose:t[3]||(t[3]=d=>s.show_genre_details_modal=!1)},null,8,["genre","media_kind","show"])]),_:1})])}const uV=te(Q9,[["render",lV]]),Ei={load(e){return Promise.all([M.library_genre(e.params.name,e.query.media_kind),M.library_genre_tracks(e.params.name,e.query.media_kind)])},set(e,t){e.genre=t[0].data,e.tracks_list=new ge(t[1].data.tracks)}},cV={name:"PageGenreTracks",components:{ContentWithHeading:Qe,ControlDropdown:xs,IndexButtonList:Jn,ListTracks:Cn,ModalDialogGenre:Dm},beforeRouteEnter(e,t,n){Ei.load(e).then(r=>{n(s=>Ei.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.tracks_list.isEmpty()){n();return}const r=this;Ei.load(e).then(s=>{Ei.set(r,s),n()})},data(){return{genre:{},groupby_options:[{id:1,name:this.$t("page.genre.sort-by.name"),options:Rn("title_sort")},{id:2,name:this.$t("page.genre.sort-by.rating"),options:Em("rating",{direction:"desc"})}],media_kind:this.$route.query.media_kind,show_genre_details_modal:!1,tracks_list:new ge}},computed:{expression(){return`genre is "${this.genre.name}" and media_kind is ${this.media_kind}`},selected_groupby_option_id:{get(){return this.$store.state.genre_tracks_sort},set(e){this.$store.commit(Xh,e)}},tracks(){const e=this.groupby_options.find(t=>t.id===this.selected_groupby_option_id);return this.tracks_list.group(e.options),this.tracks_list}},methods:{open_genre(){this.show_details_modal=!1,this.$router.push({name:"genre-albums",params:{name:this.genre.name},query:{media_kind:this.media_kind}})},play(){M.player_play_expression(this.expression,!0)}}},dV={class:"fd-page"},mV={class:"columns"},fV={class:"column"},pV=["textContent"],hV=["textContent"],_V={class:"buttons is-centered"},gV=["textContent"],yV={class:"heading has-text-centered-mobile"},vV=["textContent"],bV=u("span",null," | ",-1),zV=["textContent"];function CV(e,t,n,r,s,o){const a=E("index-button-list"),i=E("control-dropdown"),l=E("mdicon"),c=E("list-tracks"),m=E("modal-dialog-genre"),d=E("content-with-heading");return k(),$("div",dV,[y(d,null,{options:x(()=>[y(a,{index:o.tracks.indexList},null,8,["index"]),u("div",mV,[u("div",fV,[u("p",{class:"heading mb-5",textContent:g(e.$t("page.genre.sort-by.title"))},null,8,pV),y(i,{value:o.selected_groupby_option_id,"onUpdate:value":t[0]||(t[0]=f=>o.selected_groupby_option_id=f),options:s.groupby_options},null,8,["value","options"])])])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.genre.name)},null,8,hV)]),"heading-right":x(()=>[u("div",_V,[u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_genre_details_modal=!0)},[y(l,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[2]||(t[2]=(...f)=>o.play&&o.play(...f))},[y(l,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.genre.shuffle"))},null,8,gV)])])]),content:x(()=>[u("p",yV,[u("a",{class:"has-text-link",onClick:t[3]||(t[3]=(...f)=>o.open_genre&&o.open_genre(...f)),textContent:g(e.$t("page.genre.album-count",{count:s.genre.album_count}))},null,8,vV),bV,u("span",{textContent:g(e.$t("page.genre.track-count",{count:s.genre.track_count}))},null,8,zV)]),y(c,{tracks:o.tracks,expression:o.expression},null,8,["tracks","expression"]),y(m,{show:s.show_genre_details_modal,genre:s.genre,media_kind:s.media_kind,onClose:t[4]||(t[4]=f=>s.show_genre_details_modal=!1)},null,8,["show","genre","media_kind"])]),_:1})])}const wV=te(cV,[["render",CV]]),Si={load(e){return M.library_genres("music")},set(e,t){e.genres=t.data,e.genres=new ge(t.data),e.genres.group(Rn("name_sort"))}},kV={name:"PageGenres",components:{ContentWithHeading:Qe,IndexButtonList:Jn,ListGenres:U1,TabsMusic:dr},beforeRouteEnter(e,t,n){Si.load(e).then(r=>{n(s=>Si.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Si.load(e).then(s=>{Si.set(r,s),n()})},data(){return{genres:new ge}}},xV={class:"fd-page-with-tabs"},EV=["textContent"],SV=["textContent"];function $V(e,t,n,r,s,o){const a=E("tabs-music"),i=E("index-button-list"),l=E("list-genres"),c=E("content-with-heading");return k(),$("div",xV,[y(a),y(c,null,{options:x(()=>[y(i,{index:s.genres.indexList},null,8,["index"])]),"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.genres.title"))},null,8,EV),u("p",{class:"heading",textContent:g(e.$t("page.genres.count",{count:s.genres.total}))},null,8,SV)]),content:x(()=>[y(l,{genres:s.genres,media_kind:"music"},null,8,["genres"])]),_:1})])}const AV=te(kV,[["render",$V]]),$i={load(e){return Promise.all([M.search({type:"album",expression:"time_added after 8 weeks ago and media_kind is music having track_count > 3 order by time_added desc",limit:3}),M.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:3})])},set(e,t){e.recently_added=new ge(t[0].data.albums),e.recently_played=new ge(t[1].data.tracks)}},TV={name:"PageMusic",components:{ContentWithHeading:Qe,ListAlbums:cr,ListTracks:Cn,TabsMusic:dr},beforeRouteEnter(e,t,n){$i.load(e).then(r=>{n(s=>$i.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;$i.load(e).then(s=>{$i.set(r,s),n()})},data(){return{recently_added:[],recently_played:{items:[]},selected_track:{},show_track_details_modal:!1}}},OV={class:"fd-page-with-tabs"},DV=["textContent"],PV={class:"level"},IV={class:"level-item"},FV=["textContent"],RV={class:"level"},LV={class:"level-item"};function NV(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("router-link"),c=E("content-with-heading"),m=E("list-tracks");return k(),$("div",OV,[y(a),y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,DV)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),footer:x(()=>[u("nav",PV,[u("p",IV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-added"}},{default:x(()=>[nt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1}),y(c,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,FV)]),content:x(()=>[y(m,{tracks:s.recently_played},null,8,["tracks"])]),footer:x(()=>[u("nav",RV,[u("p",LV,[y(l,{class:"button is-light is-small is-rounded",to:{name:"music-recently-played"}},{default:x(()=>[nt(g(e.$t("page.music.show-more")),1)]),_:1})])])]),_:1})])}const MV=te(TV,[["render",NV]]),VV={name:"ListItemPlaylistSpotify",props:["playlist"],methods:{open_playlist(){this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},HV={class:"media is-align-items-center"},BV=["textContent"],UV=["textContent"],jV={class:"media-right"};function qV(e,t,n,r,s,o){return k(),$("div",HV,[u("div",{class:"media-content is-clickable is-clipped",onClick:t[0]||(t[0]=(...a)=>o.open_playlist&&o.open_playlist(...a))},[u("h1",{class:"title is-6",textContent:g(n.playlist.name)},null,8,BV),u("h2",{class:"subtitle is-7",textContent:g(n.playlist.owner.display_name)},null,8,UV)]),u("div",jV,[ot(e.$slots,"actions")])])}const Fm=te(VV,[["render",qV]]),WV={name:"ModalDialogPlaylistSpotify",props:["show","playlist"],emits:["close"],methods:{play(){this.$emit("close"),M.player_play_uri(this.playlist.uri,!1)},queue_add(){this.$emit("close"),M.queue_add(this.playlist.uri)},queue_add_next(){this.$emit("close"),M.queue_add_next(this.playlist.uri)},open_playlist(){this.$emit("close"),this.$router.push({name:"playlist-spotify",params:{id:this.playlist.id}})}}},KV={key:0,class:"modal is-active"},GV={class:"modal-content fd-modal-card"},ZV={class:"card"},YV={class:"card-content"},JV={class:"title is-4"},XV=["textContent"],QV={class:"content is-small"},eH=["textContent"],tH=["textContent"],nH=["textContent"],rH=["textContent"],sH=["textContent"],oH=["textContent"],aH={class:"card-footer"},iH=["textContent"],lH=["textContent"],uH=["textContent"];function cH(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",KV,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",GV,[u("div",ZV,[u("div",YV,[u("p",JV,[u("a",{class:"has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_playlist&&o.open_playlist(...i)),textContent:g(n.playlist.name)},null,8,XV)]),u("div",QV,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.owner"))},null,8,eH),u("span",{class:"title is-6",textContent:g(n.playlist.owner.display_name)},null,8,tH)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.tracks"))},null,8,nH),u("span",{class:"title is-6",textContent:g(n.playlist.tracks.total)},null,8,rH)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.spotify.playlist.path"))},null,8,sH),u("span",{class:"title is-6",textContent:g(n.playlist.uri)},null,8,oH)])])]),u("footer",aH,[u("a",{class:"card-footer-item has-text-dark",onClick:t[2]||(t[2]=(...i)=>o.queue_add&&o.queue_add(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add"))},null,8,iH)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[3]||(t[3]=(...i)=>o.queue_add_next&&o.queue_add_next(...i))},[y(a,{class:"icon",name:"playlist-play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.add-next"))},null,8,lH)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[4]||(t[4]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.spotify.playlist.play"))},null,8,uH)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const hu=te(WV,[["render",cH]]),Ai={load(e){if(Ue.state.spotify_new_releases.length>0&&Ue.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getNewReleases({country:Ue.state.spotify.webapi_country,limit:50}),t.getFeaturedPlaylists({country:Ue.state.spotify.webapi_country,limit:50})])},set(e,t){t&&(Ue.commit(fd,t[0].albums.items),Ue.commit(pd,t[1].playlists.items))}},dH={name:"PageMusicSpotify",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ListItemPlaylistSpotify:Fm,ModalDialogAlbumSpotify:Na,ModalDialogPlaylistSpotify:hu,TabsMusic:dr},beforeRouteEnter(e,t,n){Ai.load(e).then(r=>{n(s=>Ai.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ai.load(e).then(s=>{Ai.set(r,s),n()})},data(){return{show_album_details_modal:!1,selected_album:{},show_playlist_details_modal:!1,selected_playlist:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases.slice(0,3)},featured_playlists(){return this.$store.state.spotify_featured_playlists.slice(0,3)},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},mH={class:"fd-page-with-tabs"},fH=["textContent"],pH=["onClick"],hH={class:"level"},_H={class:"level-item"},gH=["textContent"],yH=["onClick"],vH={class:"level"},bH={class:"level-item"};function zH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("cover-artwork"),l=E("mdicon"),c=E("list-item-album-spotify"),m=E("modal-dialog-album-spotify"),d=E("router-link"),f=E("content-with-heading"),p=E("list-item-playlist-spotify"),h=E("modal-dialog-playlist-spotify");return k(),$("div",mH,[y(a),y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,fH)]),content:x(()=>[(k(!0),$(Ce,null,lt(o.new_releases,_=>(k(),me(c,{key:_.id,album:_,onClick:b=>o.open_album(_)},Ta({actions:x(()=>[u("a",{onClick:rt(b=>o.open_album_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,pH)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(_),artist:_.artist,album:_.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:s.show_album_details_modal,album:s.selected_album,onClose:t[0]||(t[0]=_=>s.show_album_details_modal=!1)},null,8,["show","album"])]),footer:x(()=>[u("nav",hH,[u("p",_H,[y(d,{to:{name:"music-spotify-new-releases"},class:"button is-light is-small is-rounded"},{default:x(()=>[nt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1}),y(f,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,gH)]),content:x(()=>[(k(!0),$(Ce,null,lt(o.featured_playlists,_=>(k(),me(p,{key:_.id,playlist:_},{actions:x(()=>[u("a",{onClick:rt(b=>o.open_playlist_dialog(_),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,yH)]),_:2},1032,["playlist"]))),128)),y(h,{show:s.show_playlist_details_modal,playlist:s.selected_playlist,onClose:t[1]||(t[1]=_=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),footer:x(()=>[u("nav",vH,[u("p",bH,[y(d,{to:{name:"music-spotify-featured-playlists"},class:"button is-light is-small is-rounded"},{default:x(()=>[nt(g(e.$t("page.spotify.music.show-more")),1)]),_:1})])])]),_:1})])}const CH=te(dH,[["render",zH]]),Ti={load(e){if(Ue.state.spotify_new_releases.length>0)return Promise.resolve();const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),t.getNewReleases({country:Ue.state.spotify.webapi_country,limit:50})},set(e,t){t&&Ue.commit(fd,t.albums.items)}},wH={name:"PageMusicSpotifyNewReleases",components:{ContentWithHeading:Qe,CoverArtwork:Fn,ListItemAlbumSpotify:pu,ModalDialogAlbumSpotify:Na,TabsMusic:dr},beforeRouteEnter(e,t,n){Ti.load(e).then(r=>{n(s=>Ti.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ti.load(e).then(s=>{Ti.set(r,s),n()})},data(){return{show_album_details_modal:!1,selected_album:{}}},computed:{new_releases(){return this.$store.state.spotify_new_releases},is_visible_artwork(){return this.$store.getters.settings_option("webinterface","show_cover_artwork_in_album_lists").value}},methods:{open_album(e){this.$router.push({name:"music-spotify-album",params:{id:e.id}})},open_album_dialog(e){this.selected_album=e,this.show_album_details_modal=!0},artwork_url(e){return e.images&&e.images.length>0?e.images[0].url:""}}},kH={class:"fd-page-with-tabs"},xH=["textContent"],EH=["onClick"];function SH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("cover-artwork"),l=E("mdicon"),c=E("list-item-album-spotify"),m=E("modal-dialog-album-spotify"),d=E("content-with-heading");return k(),$("div",kH,[y(a),y(d,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.new-releases"))},null,8,xH)]),content:x(()=>[(k(!0),$(Ce,null,lt(o.new_releases,f=>(k(),me(c,{key:f.id,album:f,onClick:p=>o.open_album(f)},Ta({actions:x(()=>[u("a",{onClick:rt(p=>o.open_album_dialog(f),["prevent","stop"])},[y(l,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,EH)]),_:2},[o.is_visible_artwork?{name:"artwork",fn:x(()=>[y(i,{artwork_url:o.artwork_url(f),artist:f.artist,album:f.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-small-image",maxwidth:64,maxheight:64},null,8,["artwork_url","artist","album"])]),key:"0"}:void 0]),1032,["album","onClick"]))),128)),y(m,{show:s.show_album_details_modal,album:s.selected_album,onClose:t[0]||(t[0]=f=>s.show_album_details_modal=!1)},null,8,["show","album"])]),_:1})])}const $H=te(wH,[["render",SH]]),Oi={load(e){if(Ue.state.spotify_featured_playlists.length>0)return Promise.resolve();const t=new Yn;t.setAccessToken(Ue.state.spotify.webapi_token),t.getFeaturedPlaylists({country:Ue.state.spotify.webapi_country,limit:50})},set(e,t){t&&Ue.commit(pd,t.playlists.items)}},AH={name:"PageMusicSpotifyFeaturedPlaylists",components:{ContentWithHeading:Qe,ListItemPlaylistSpotify:Fm,ModalDialogPlaylistSpotify:hu,TabsMusic:dr},beforeRouteEnter(e,t,n){Oi.load(e).then(r=>{n(s=>Oi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Oi.load(e).then(s=>{Oi.set(r,s),n()})},data(){return{show_playlist_details_modal:!1,selected_playlist:{}}},computed:{featured_playlists(){return this.$store.state.spotify_featured_playlists}},methods:{open_playlist_dialog(e){this.selected_playlist=e,this.show_playlist_details_modal=!0}}},TH={class:"fd-page-with-tabs"},OH=["textContent"],DH=["onClick"];function PH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("mdicon"),l=E("list-item-playlist-spotify"),c=E("modal-dialog-playlist-spotify"),m=E("content-with-heading");return k(),$("div",TH,[y(a),y(m,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.spotify.music.featured-playlists"))},null,8,OH)]),content:x(()=>[(k(!0),$(Ce,null,lt(o.featured_playlists,d=>(k(),me(l,{key:d.id,playlist:d},{actions:x(()=>[u("a",{onClick:rt(f=>o.open_playlist_dialog(d),["prevent","stop"])},[y(i,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,DH)]),_:2},1032,["playlist"]))),128)),y(c,{show:s.show_playlist_details_modal,playlist:s.selected_playlist,onClose:t[0]||(t[0]=d=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const IH=te(AH,[["render",PH]]),Di={load(e){const t=Ue.getters.settings_option_recently_added_limit;return M.search({type:"album",expression:"media_kind is music having track_count > 3 order by time_added desc",limit:t})},set(e,t){e.recently_added=new ge(t.data.albums),e.recently_added.group(m5("time_added",{direction:"desc"}))}},FH={name:"PageMusicRecentlyAdded",components:{ContentWithHeading:Qe,TabsMusic:dr,ListAlbums:cr},beforeRouteEnter(e,t,n){Di.load(e).then(r=>{n(s=>Di.set(s,r))})},beforeRouteUpdate(e,t,n){if(!this.recently_added.isEmpty()){n();return}const r=this;Di.load(e).then(s=>{Di.set(r,s),n()})},data(){return{recently_added:new ge}}},RH={class:"fd-page-with-tabs"},LH=["textContent"];function NH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-albums"),l=E("content-with-heading");return k(),$("div",RH,[y(a),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-added.title"))},null,8,LH)]),content:x(()=>[y(i,{albums:s.recently_added},null,8,["albums"])]),_:1})])}const MH=te(FH,[["render",NH]]),Pi={load(e){return M.search({type:"track",expression:"time_played after 8 weeks ago and media_kind is music order by time_played desc",limit:50})},set(e,t){e.recently_played=new ge(t.data.tracks)}},VH={name:"PageMusicRecentlyPlayed",components:{ContentWithHeading:Qe,TabsMusic:dr,ListTracks:Cn},beforeRouteEnter(e,t,n){Pi.load(e).then(r=>{n(s=>Pi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Pi.load(e).then(s=>{Pi.set(r,s),n()})},data(){return{recently_played:{}}}},HH={class:"fd-page-with-tabs"},BH=["textContent"];function UH(e,t,n,r,s,o){const a=E("tabs-music"),i=E("list-tracks"),l=E("content-with-heading");return k(),$("div",HH,[y(a),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.music.recently-played.title"))},null,8,BH)]),content:x(()=>[y(i,{tracks:s.recently_played},null,8,["tracks"])]),_:1})])}const jH=te(VH,[["render",UH]]),qH={name:"LyricsPane",data(){return this.lastIndex=0,this.scrollTimer=null,this.lastItemId=-1,{scroll:{},autoScroll:!0}},computed:{is_playing(){return this.player.state==="play"},is_sync(){return this.lyricsArr.length&&this.lyricsArr[0].length>1},lyricIndex(){const e=this.player.item_progress_ms/1e3,t=this.lyricsArr;if(t.length&&t[0].length===1)return 0;if((this.player.item_id!=this.lastItemId||this.lastIndexe)&&this.resetPosCache(),this.lastIndexe)return this.lastIndex;if(this.lastIndexe)return this.lastIndex+1;let n,r=0,s=t.length-1;for(;r<=s&&(n=(s+r)/2|0,!(t[n][1]<=e&&t.length>n+1&&t[n+1][1]>e));)t[n][1]{let o=r;return r+=(s.length+1)*t,{delay:o,text:s}})}},watch:{lyricIndex(){this.autoScroll&&this._scrollToElement(),this.lastIndex=this.lyricIndex}},methods:{resetPosCache(){this.lastItemId=this.player.item_id,this.lastIndex=0},startedScroll(e){if(!e.screenX||e.screenX==0||!e.screenY||e.screenY==0)return;this.autoScroll=!1,this.scrollTimer&&clearTimeout(this.scrollTimer);let t=this;this.scrollTimer=setTimeout(function(){t.autoScroll=!0},5e3)},_scrollToElement(){let e=this.$refs.lyricsWrapper,t=e.children[0].children[this.lyricIndex],n=e.offsetHeight>>1;if(!this.lyricsArr||!t)return;let r=e.scrollTop,s=t.offsetTop-n;e.scrollBy({top:s-r,left:0,behavior:"smooth"})}}},WH=e=>(T_("data-v-4a6bcca9"),e=e(),O_(),e),KH=WH(()=>u("div",{class:"lyrics-overlay"},null,-1)),GH={class:"lyrics"},ZH={key:0};function YH(e,t,n,r,s,o){return k(),$(Ce,null,[KH,u("div",{ref:"lyricsWrapper",class:"lyrics-wrapper",onTouchstart:t[0]||(t[0]=a=>s.autoScroll=!1),onTouchend:t[1]||(t[1]=a=>s.autoScroll=!0),onScrollPassive:t[2]||(t[2]=(...a)=>o.startedScroll&&o.startedScroll(...a)),onWheelPassive:t[3]||(t[3]=(...a)=>o.startedScroll&&o.startedScroll(...a))},[u("div",GH,[(k(!0),$(Ce,null,lt(o.lyricsArr,(a,i)=>(k(),$("div",{key:a,class:Ee(i==o.lyricIndex&&o.is_sync&&"gradient")},[i==o.lyricIndex&&o.is_sync&&o.is_playing?(k(),$("ul",ZH,[(k(!0),$(Ce,null,lt(o.splitLyric,l=>(k(),$("li",{key:l.delay,style:lr({animationDuration:l.delay+"s"})},g(l.text),5))),128))])):H("",!0),i!=o.lyricIndex||!o.is_sync||!o.is_playing?(k(),$(Ce,{key:1},[nt(g(a[0]),1)],64)):H("",!0)],2))),128))])],544)],64)}const JH=te(qH,[["render",YH],["__scopeId","data-v-4a6bcca9"]]),XH={name:"ModalDialogQueueItem",props:["show","item"],emits:["close"],data(){return{spotify_track:{}}},watch:{item(){if(this.item&&this.item.data_kind==="spotify"){const e=new Yn;e.setAccessToken(this.$store.state.spotify.webapi_token),e.getTrack(this.item.path.slice(this.item.path.lastIndexOf(":")+1)).then(t=>{this.spotify_track=t})}else this.spotify_track={}}},methods:{remove(){this.$emit("close"),M.queue_remove(this.item.id)},play(){this.$emit("close"),M.player_play({item_id:this.item.id})},open_album(){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.$router.push({name:"music-album",params:{id:this.item.album_id}})},open_album_artist(){this.$router.push({name:"music-artist",params:{id:this.item.album_artist_id}})},open_genre(){this.$router.push({name:"genre-albums",params:{name:this.item.genre},query:{media_kind:this.item.media_kind}})},open_spotify_artist(){this.$emit("close"),this.$router.push({name:"music-spotify-artist",params:{id:this.spotify_track.artists[0].id}})},open_spotify_album(){this.$emit("close"),this.$router.push({name:"music-spotify-album",params:{id:this.spotify_track.album.id}})}}},QH={key:0,class:"modal is-active"},eB={class:"modal-content fd-modal-card"},tB={class:"card"},nB={class:"card-content"},rB=["textContent"],sB=["textContent"],oB={class:"content is-small"},aB=["textContent"],iB=["textContent"],lB=["textContent"],uB={key:0},cB=["textContent"],dB=["textContent"],mB=["textContent"],fB={key:1},pB=["textContent"],hB=["textContent"],_B={key:2},gB=["textContent"],yB=["textContent"],vB={key:3},bB=["textContent"],zB=["textContent"],CB=["textContent"],wB=["textContent"],kB=["textContent"],xB=["textContent"],EB=["textContent"],SB=["textContent"],$B=["textContent"],AB={class:"title is-6"},TB=["textContent"],OB={key:0,class:"has-text-weight-normal"},DB=["textContent"],PB=["textContent"],IB=["textContent"],FB={class:"title is-6"},RB=["textContent"],LB=["textContent"],NB=["textContent"],MB=["textContent"],VB={class:"card-footer"},HB=["textContent"],BB=["textContent"];function UB(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",QH,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",eB,[u("div",tB,[u("div",nB,[u("p",{class:"title is-4",textContent:g(n.item.title)},null,8,rB),u("p",{class:"subtitle",textContent:g(n.item.artist)},null,8,sB),u("div",oB,[u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album"))},null,8,aB),n.item.album_id?(k(),$("a",{key:0,class:"title is-6 has-text-link",onClick:t[1]||(t[1]=(...i)=>o.open_album&&o.open_album(...i)),textContent:g(n.item.album)},null,8,iB)):(k(),$("span",{key:1,class:"title is-6",textContent:g(n.item.album)},null,8,lB))]),n.item.album_artist?(k(),$("p",uB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.album-artist"))},null,8,cB),n.item.album_artist_id?(k(),$("a",{key:0,class:"title is-6 has-text-link",onClick:t[2]||(t[2]=(...i)=>o.open_album_artist&&o.open_album_artist(...i)),textContent:g(n.item.album_artist)},null,8,dB)):(k(),$("span",{key:1,class:"title is-6",textContent:g(n.item.album_artist)},null,8,mB))])):H("",!0),n.item.composer?(k(),$("p",fB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.composer"))},null,8,pB),u("span",{class:"title is-6",textContent:g(n.item.composer)},null,8,hB)])):H("",!0),n.item.year>0?(k(),$("p",_B,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.year"))},null,8,gB),u("span",{class:"title is-6",textContent:g(n.item.year)},null,8,yB)])):H("",!0),n.item.genre?(k(),$("p",vB,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.genre"))},null,8,bB),u("a",{class:"title is-6 has-text-link",onClick:t[3]||(t[3]=(...i)=>o.open_genre&&o.open_genre(...i)),textContent:g(n.item.genre)},null,8,zB)])):H("",!0),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.position"))},null,8,CB),u("span",{class:"title is-6",textContent:g([n.item.disc_number,n.item.track_number].join(" / "))},null,8,wB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.duration"))},null,8,kB),u("span",{class:"title is-6",textContent:g(e.$filters.durationInHours(n.item.length_ms))},null,8,xB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.path"))},null,8,EB),u("span",{class:"title is-6",textContent:g(n.item.path)},null,8,SB)]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.type"))},null,8,$B),u("span",AB,[u("span",{textContent:g([e.$t("media.kind."+n.item.media_kind),e.$t("data.kind."+n.item.data_kind)].join(" - "))},null,8,TB),n.item.data_kind==="spotify"?(k(),$("span",OB,[nt(" ("),u("a",{onClick:t[4]||(t[4]=(...i)=>o.open_spotify_artist&&o.open_spotify_artist(...i)),textContent:g(e.$t("dialog.queue-item.spotify-artist"))},null,8,DB),nt(", "),u("a",{onClick:t[5]||(t[5]=(...i)=>o.open_spotify_album&&o.open_spotify_album(...i)),textContent:g(e.$t("dialog.queue-item.spotify-album"))},null,8,PB),nt(") ")])):H("",!0)])]),u("p",null,[u("span",{class:"heading",textContent:g(e.$t("dialog.queue-item.quality"))},null,8,IB),u("span",FB,[u("span",{textContent:g(n.item.type)},null,8,RB),n.item.samplerate?(k(),$("span",{key:0,textContent:g(e.$t("dialog.queue-item.samplerate",{rate:n.item.samplerate}))},null,8,LB)):H("",!0),n.item.channels?(k(),$("span",{key:1,textContent:g(e.$t("dialog.queue-item.channels",{channels:e.$filters.channels(n.item.channels)}))},null,8,NB)):H("",!0),n.item.bitrate?(k(),$("span",{key:2,textContent:g(e.$t("dialog.queue-item.bitrate",{rate:n.item.bitrate}))},null,8,MB)):H("",!0)])])])]),u("footer",VB,[u("a",{class:"card-footer-item has-text-dark",onClick:t[6]||(t[6]=(...i)=>o.remove&&o.remove(...i))},[y(a,{class:"icon",name:"delete",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.remove"))},null,8,HB)]),u("a",{class:"card-footer-item has-text-dark",onClick:t[7]||(t[7]=(...i)=>o.play&&o.play(...i))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.queue-item.play"))},null,8,BB)])])])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[8]||(t[8]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const K1=te(XH,[["render",UB]]),Dr=1e3,jB={name:"PageNowPlaying",components:{ControlSlider:Zd,CoverArtwork:Fn,LyricsPane:JH,ModalDialogQueueItem:K1},data(){return{cursor:Zl,INTERVAL:Dr,interval_id:0,is_dragged:!1,selected_item:{},show_details_modal:!1}},computed:{is_live(){return this.track.length_ms===0},lyrics_visible(){return this.$store.getters.lyrics_pane},player(){return this.$store.state.player},track(){return this.$store.getters.now_playing},track_progress:{get(){return Math.floor(this.player.item_progress_ms/Dr)},set(e){this.player.item_progress_ms=e*Dr}},track_progress_max(){return this.is_live?1:Math.floor(this.track.length_ms/Dr)},track_elapsed_time(){return this.$filters.durationInHours(this.track_progress*Dr)},track_total_time(){return this.is_live?this.$t("page.now-playing.live"):this.$filters.durationInHours(this.track.length_ms)},settings_option_show_composer_now_playing(){return this.$store.getters.settings_option_show_composer_now_playing},settings_option_show_composer_for_genre(){return this.$store.getters.settings_option_show_composer_for_genre},composer(){return this.settings_option_show_composer_now_playing&&(!this.settings_option_show_composer_for_genre||this.track.genre&&this.settings_option_show_composer_for_genre.toLowerCase().split(",").findIndex(e=>this.track.genre.toLowerCase().indexOf(e.trim())>=0)>=0)?this.track.composer:null},settings_option_show_filepath_now_playing(){return this.$store.getters.settings_option_show_filepath_now_playing},filepath(){return this.settings_option_show_filepath_now_playing?this.track.path:null}},watch:{player(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Dr))}},created(){M.player_status().then(({data:e})=>{this.$store.commit(md,e),this.player.state==="play"&&(this.interval_id=window.setInterval(this.tick,Dr))})},unmounted(){this.interval_id>0&&(window.clearTimeout(this.interval_id),this.interval_id=0)},methods:{tick(){this.is_dragged||(this.track_progress+=1)},start_dragging(){this.is_dragged=!0},end_dragging(){this.is_dragged=!1},seek(){this.is_live||M.player_seek_to_pos(this.track_progress*Dr)},open_dialog(e){this.selected_item=e,this.show_details_modal=!0}}},qB={class:"hero is-fullheight"},WB={key:0,class:"hero-body"},KB={class:"container has-text-centered",style:{"max-width":"500px"}},GB={class:"is-flex is-justify-content-space-between"},ZB=["textContent"],YB=["textContent"],JB=["textContent"],XB=["textContent"],QB=["textContent"],eU=["textContent"],tU=["textContent"],nU={key:1,class:"hero-body"},rU={class:"container has-text-centered"},sU=["textContent"],oU=["textContent"];function aU(e,t,n,r,s,o){const a=E("cover-artwork"),i=E("lyrics-pane"),l=E("control-slider"),c=E("modal-dialog-queue-item");return k(),$("div",qB,[o.track.id>0?(k(),$("div",WB,[u("div",KB,[y(a,{artwork_url:o.track.artwork_url,artist:o.track.artist,album:o.track.album,class:"is-clickable fd-has-shadow fd-cover-big-image",onClick:t[0]||(t[0]=m=>o.open_dialog(o.track))},null,8,["artwork_url","artist","album"]),o.lyrics_visible?(k(),me(i,{key:0})):H("",!0),y(l,{value:o.track_progress,"onUpdate:value":t[1]||(t[1]=m=>o.track_progress=m),class:"mt-5",disabled:o.is_live,max:o.track_progress_max,cursor:s.cursor,onChange:o.seek,onMousedown:o.start_dragging,onMouseup:o.end_dragging},null,8,["value","disabled","max","cursor","onChange","onMousedown","onMouseup"]),u("div",GB,[u("p",{class:"subtitle is-7",textContent:g(o.track_elapsed_time)},null,8,ZB),u("p",{class:"subtitle is-7",textContent:g(o.track_total_time)},null,8,YB)]),u("p",{class:"title is-5",textContent:g(o.track.title)},null,8,JB),u("p",{class:"title is-6",textContent:g(o.track.artist)},null,8,XB),o.composer?(k(),$("p",{key:1,class:"subtitle is-6 has-text-grey has-text-weight-bold",textContent:g(o.composer)},null,8,QB)):H("",!0),o.track.album?(k(),$("p",{key:2,class:"subtitle is-6",textContent:g(o.track.album)},null,8,eU)):H("",!0),o.filepath?(k(),$("p",{key:3,class:"subtitle is-6 has-text-grey",textContent:g(o.filepath)},null,8,tU)):H("",!0)])])):(k(),$("div",nU,[u("div",rU,[u("p",{class:"title is-5",textContent:g(e.$t("page.now-playing.title"))},null,8,sU),u("p",{class:"subtitle",textContent:g(e.$t("page.now-playing.info"))},null,8,oU)])])),y(c,{show:s.show_details_modal,item:s.selected_item,onClose:t[2]||(t[2]=m=>s.show_details_modal=!1)},null,8,["show","item"])])}const iU=te(jB,[["render",aU]]),Ii={load(e){return Promise.all([M.library_playlist(e.params.id),M.library_playlist_folder(e.params.id)])},set(e,t){e.playlist=t[0].data,e.playlists_list=new ge(t[1].data)}},lU={name:"PagePlaylistFolder",components:{ContentWithHeading:Qe,ListPlaylists:Im},beforeRouteEnter(e,t,n){Ii.load(e).then(r=>{n(s=>Ii.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ii.load(e).then(s=>{Ii.set(r,s),n()})},data(){return{playlist:{},playlists_list:new ge}},computed:{has_playlists(){return Object.keys(this.playlists_list.itemsByGroup).length>0},playlists(){return this.playlists_list.group(V1(),[e=>e.folder||this.radio_playlists||e.stream_count===0||e.item_count>e.stream_count]),this.playlists_list},radio_playlists(){return this.$store.state.config.radio_playlists}}},uU={class:"fd-page"},cU=["textContent"],dU=["textContent"];function mU(e,t,n,r,s,o){const a=E("list-playlists"),i=E("content-with-heading");return k(),$("div",uU,[y(i,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(s.playlist.id===0?e.$t("page.playlists.title"):s.playlist.name)},null,8,cU),u("p",{class:"heading",textContent:g(e.$t("page.playlists.count",{count:o.playlists.count}))},null,8,dU)]),content:x(()=>[o.has_playlists?(k(),me(a,{key:0,playlists:o.playlists},null,8,["playlists"])):H("",!0)]),_:1})])}const fU=te(lU,[["render",mU]]),Fi={load(e){return Promise.all([M.library_playlist(e.params.id),M.library_playlist_tracks(e.params.id)])},set(e,t){e.playlist=t[0].data,e.tracks=new ge(t[1].data)}},pU={name:"PagePlaylistTracks",components:{ContentWithHeading:Qe,ListTracks:Cn,ModalDialogPlaylist:W1},beforeRouteEnter(e,t,n){Fi.load(e).then(r=>{n(s=>Fi.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Fi.load(e).then(s=>{Fi.set(r,s),n()})},data(){return{playlist:{},tracks:new ge,show_playlist_details_modal:!1}},computed:{uris(){return this.playlist.random?this.tracks.map(e=>e.uri).join(","):this.playlist.uri}},methods:{play(){M.player_play_uri(this.uris,!0)}}},hU={class:"fd-page"},_U=["textContent"],gU={class:"buttons is-centered"},yU=["textContent"],vU=["textContent"];function bU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-tracks"),l=E("modal-dialog-playlist"),c=E("content-with-heading");return k(),$("div",hU,[y(c,null,{"heading-left":x(()=>[u("div",{class:"title is-4",textContent:g(s.playlist.name)},null,8,_U)]),"heading-right":x(()=>[u("div",gU,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=m=>s.show_playlist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...m)=>o.play&&o.play(...m))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.playlist.shuffle"))},null,8,yU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.playlist.track-count",{count:s.tracks.count}))},null,8,vU),y(i,{tracks:s.tracks,uris:o.uris},null,8,["tracks","uris"]),y(l,{show:s.show_playlist_details_modal,playlist:s.playlist,uris:o.uris,onClose:t[2]||(t[2]=m=>s.show_playlist_details_modal=!1)},null,8,["show","playlist","uris"])]),_:1})])}const zU=te(pU,[["render",bU]]),ad=50,Ri={load:function(e){const t=new Yn;return t.setAccessToken(Ue.state.spotify.webapi_token),Promise.all([t.getPlaylist(e.params.id),t.getPlaylistTracks(e.params.id,{limit:ad,offset:0,market:Ue.state.spotify.webapi_country})])},set(e,t){e.playlist=t[0],e.tracks=[],e.total=0,e.offset=0,e.append_tracks(t[1])}},CU={name:"PagePlaylistTracksSpotify",components:{ContentWithHeading:Qe,ListItemTrackSpotify:Sm,ModalDialogPlaylistSpotify:hu,ModalDialogTrackSpotify:$m,VueEternalLoading:Am},beforeRouteEnter(e,t,n){Ri.load(e).then(r=>{n(s=>Ri.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ri.load(e).then(s=>{Ri.set(r,s),n()})},data(){return{playlist:{tracks:{}},tracks:[],total:0,offset:0,show_track_details_modal:!1,selected_track:{},show_playlist_details_modal:!1}},methods:{load_next({loaded:e}){const t=new Yn;t.setAccessToken(this.$store.state.spotify.webapi_token),t.getPlaylistTracks(this.playlist.id,{limit:ad,offset:this.offset,market:Ue.state.spotify.webapi_country}).then(n=>{this.append_tracks(n),e(n.items.length,ad)})},append_tracks(e){let t=Math.max(-1,...this.tracks.map(n=>n.position).filter(n=>n));e.items.forEach(n=>{const r=n.track;r&&(r.is_playable&&(r.position=++t),this.tracks.push(r))}),this.total=e.total,this.offset+=e.limit},play(){this.show_details_modal=!1,M.player_play_uri(this.playlist.uri,!0)},open_track_dialog(e){this.selected_track=e,this.show_track_details_modal=!0}}},wU={class:"fd-page"},kU=["textContent"],xU={class:"buttons is-centered"},EU=["textContent"],SU=["textContent"],$U=["onClick"];function AU(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-item-track-spotify"),l=E("VueEternalLoading"),c=E("modal-dialog-track-spotify"),m=E("modal-dialog-playlist-spotify"),d=E("content-with-heading");return k(),$("div",wU,[y(d,null,{"heading-left":x(()=>[u("div",{class:"title is-4",textContent:g(s.playlist.name)},null,8,kU)]),"heading-right":x(()=>[u("div",xU,[u("a",{class:"button is-small is-light is-rounded",onClick:t[0]||(t[0]=f=>s.show_playlist_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})]),u("a",{class:"button is-small is-dark is-rounded",onClick:t[1]||(t[1]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"shuffle",size:"16"}),u("span",{textContent:g(e.$t("page.spotify.playlist.shuffle"))},null,8,EU)])])]),content:x(()=>[u("p",{class:"heading has-text-centered-mobile",textContent:g(e.$t("page.spotify.playlist.count",{count:s.playlist.tracks.total}))},null,8,SU),(k(!0),$(Ce,null,lt(s.tracks,f=>(k(),me(i,{key:f.id,track:f,position:f.position,context_uri:s.playlist.uri},{actions:x(()=>[u("a",{onClick:rt(p=>o.open_track_dialog(f),["prevent","stop"])},[y(a,{class:"icon has-text-dark",name:"dots-vertical",size:"16"})],8,$U)]),_:2},1032,["track","position","context_uri"]))),128)),s.offset[nt(" . ")]),_:1},8,["load"])):H("",!0),y(c,{show:s.show_track_details_modal,track:s.selected_track,album:s.selected_track.album,onClose:t[2]||(t[2]=f=>s.show_track_details_modal=!1)},null,8,["show","track","album"]),y(m,{show:s.show_playlist_details_modal,playlist:s.playlist,onClose:t[3]||(t[3]=f=>s.show_playlist_details_modal=!1)},null,8,["show","playlist"])]),_:1})])}const TU=te(CU,[["render",AU]]),Li={load(e){return Promise.all([M.library_album(e.params.id),M.library_podcast_episodes(e.params.id)])},set(e,t){e.album=t[0].data,e.tracks=new ge(t[1].data.tracks)}},OU={name:"PagePodcast",components:{ContentWithHero:du,CoverArtwork:Fn,ListTracks:Cn,ModalDialog:dm,ModalDialogAlbum:mu},beforeRouteEnter(e,t,n){Li.load(e).then(r=>{n(s=>Li.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Li.load(e).then(s=>{Li.set(r,s),n()})},data(){return{album:{},rss_playlist_to_remove:{},show_details_modal:!1,show_remove_podcast_modal:!1,tracks:new ge}},computed:{new_tracks(){return this.tracks.items.filter(e=>e.play_count===0).length}},methods:{open_remove_podcast_dialog(){M.library_track_playlists(this.tracks.items[0].id).then(({data:e})=>{[this.rss_playlist_to_remove]=e.items.filter(t=>t.type==="rss"),this.show_remove_podcast_modal=!0,this.show_details_modal=!1})},play(){M.player_play_uri(this.album.uri,!1)},reload_tracks(){M.library_podcast_episodes(this.album.id).then(({data:e})=>{this.tracks=new ge(e.tracks)})},remove_podcast(){this.show_remove_podcast_modal=!1,M.library_playlist_delete(this.rss_playlist_to_remove.id).then(()=>{this.$router.replace({name:"podcasts"})})}}},DU={class:"fd-page"},PU=["textContent"],IU=u("h2",{class:"subtitle is-6 has-text-weight-normal"}," ",-1),FU={class:"buttons fd-is-centered-mobile mt-5"},RU=["textContent"],LU=["textContent"],NU=["textContent"],MU={class:"is-size-7"},VU=["textContent"],HU=["textContent"];function BU(e,t,n,r,s,o){const a=E("mdicon"),i=E("cover-artwork"),l=E("list-tracks"),c=E("modal-dialog-album"),m=E("modal-dialog"),d=E("content-with-hero");return k(),$("div",DU,[y(d,null,{"heading-left":x(()=>[u("h1",{class:"title is-5",textContent:g(s.album.name)},null,8,PU),IU,u("div",FU,[u("a",{class:"button is-small is-dark is-rounded",onClick:t[0]||(t[0]=(...f)=>o.play&&o.play(...f))},[y(a,{class:"icon",name:"play",size:"16"}),u("span",{textContent:g(e.$t("page.podcast.play"))},null,8,RU)]),u("a",{class:"button is-small is-light is-rounded",onClick:t[1]||(t[1]=f=>s.show_details_modal=!0)},[y(a,{class:"icon",name:"dots-horizontal",size:"16"})])])]),"heading-right":x(()=>[y(i,{artwork_url:s.album.artwork_url,artist:s.album.artist,album:s.album.name,class:"is-clickable fd-has-shadow fd-cover fd-cover-medium-image",onClick:t[2]||(t[2]=f=>s.show_details_modal=!0)},null,8,["artwork_url","artist","album"])]),content:x(()=>[u("p",{class:"heading is-7 has-text-centered-mobile mt-5",textContent:g(e.$t("page.podcast.track-count",{count:s.album.track_count}))},null,8,LU),y(l,{tracks:s.tracks,show_progress:!0,onPlayCountChanged:o.reload_tracks},null,8,["tracks","onPlayCountChanged"]),y(c,{show:s.show_details_modal,album:s.album,media_kind:"podcast",new_tracks:o.new_tracks,onClose:t[3]||(t[3]=f=>s.show_details_modal=!1),onPlayCountChanged:o.reload_tracks,onRemovePodcast:o.open_remove_podcast_dialog},null,8,["show","album","new_tracks","onPlayCountChanged","onRemovePodcast"]),y(m,{show:s.show_remove_podcast_modal,title:e.$t("page.podcast.remove-podcast"),delete_action:e.$t("page.podcast.remove"),onClose:t[4]||(t[4]=f=>s.show_remove_podcast_modal=!1),onDelete:o.remove_podcast},{"modal-content":x(()=>[u("p",{textContent:g(e.$t("page.podcast.remove-info-1"))},null,8,NU),u("p",MU,[nt(" ("),u("span",{textContent:g(e.$t("page.podcast.remove-info-2"))},null,8,VU),u("b",{textContent:g(s.rss_playlist_to_remove.name)},null,8,HU),nt(") ")])]),_:1},8,["show","title","delete_action","onDelete"])]),_:1})])}const UU=te(OU,[["render",BU]]),jU={name:"ModalDialogAddRss",props:["show"],emits:["close","podcast-added"],data(){return{url:"",loading:!1}},watch:{show(){this.show&&(this.loading=!1,setTimeout(()=>{this.$refs.url_field.focus()},10))}},methods:{add_stream(){this.loading=!0,M.library_add(this.url).then(()=>{this.$emit("close"),this.$emit("podcast-added"),this.url=""}).catch(()=>{this.loading=!1})}}},qU={key:0,class:"modal is-active"},WU={class:"modal-content fd-modal-card"},KU={class:"card"},GU={class:"card-content"},ZU=["textContent"],YU={class:"field"},JU={class:"control is-expanded has-icons-left"},XU=["placeholder","disabled"],QU=["textContent"],ej={key:0,class:"card-footer"},tj={class:"card-footer-item button is-loading"},nj=["textContent"],rj={key:1,class:"card-footer is-clipped"},sj=["textContent"],oj=["textContent"];function aj(e,t,n,r,s,o){const a=E("mdicon");return k(),$("div",null,[y(Ft,{name:"fade"},{default:x(()=>[n.show?(k(),$("div",qU,[u("div",{class:"modal-background",onClick:t[0]||(t[0]=i=>e.$emit("close"))}),u("div",WU,[u("div",KU,[u("div",GU,[u("p",{class:"title is-4",textContent:g(e.$t("dialog.add.rss.title"))},null,8,ZU),u("form",{onSubmit:t[2]||(t[2]=rt((...i)=>o.add_stream&&o.add_stream(...i),["prevent"]))},[u("div",YU,[u("p",JU,[bt(u("input",{ref:"url_field","onUpdate:modelValue":t[1]||(t[1]=i=>s.url=i),class:"input is-shadowless",type:"text",placeholder:e.$t("dialog.add.rss.placeholder"),disabled:s.loading},null,8,XU),[[fn,s.url]]),y(a,{class:"icon is-left",name:"rss",size:"16"})]),u("p",{class:"help",textContent:g(e.$t("dialog.add.rss.help"))},null,8,QU)])],32)]),s.loading?(k(),$("footer",ej,[u("a",tj,[y(a,{class:"icon",name:"web",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.processing"))},null,8,nj)])])):(k(),$("footer",rj,[u("a",{class:"card-footer-item has-text-danger",onClick:t[3]||(t[3]=i=>e.$emit("close"))},[y(a,{class:"icon",name:"cancel",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.cancel"))},null,8,sj)]),u("a",{class:"card-footer-item has-background-info has-text-white has-text-weight-bold",onClick:t[4]||(t[4]=(...i)=>o.add_stream&&o.add_stream(...i))},[y(a,{class:"icon",name:"playlist-plus",size:"16"}),u("span",{class:"is-size-7",textContent:g(e.$t("dialog.add.rss.add"))},null,8,oj)])]))])]),u("button",{class:"modal-close is-large","aria-label":"close",onClick:t[5]||(t[5]=i=>e.$emit("close"))})])):H("",!0)]),_:1})])}const ij=te(jU,[["render",aj]]),Ni={load(e){return Promise.all([M.library_albums("podcast"),M.library_podcasts_new_episodes()])},set(e,t){e.albums=new ge(t[0].data),e.new_episodes=new ge(t[1].data.tracks)}},lj={name:"PagePodcasts",components:{ContentWithHeading:Qe,ListTracks:Cn,ListAlbums:cr,ModalDialogAddRss:ij},beforeRouteEnter(e,t,n){Ni.load(e).then(r=>{n(s=>Ni.set(s,r))})},beforeRouteUpdate(e,t,n){const r=this;Ni.load(e).then(s=>{Ni.set(r,s),n()})},data(){return{albums:[],new_episodes:{items:[]},show_url_modal:!1}},computed:{rss(){return this.$store.state.rss_count}},methods:{mark_all_played(){this.new_episodes.items.forEach(e=>{M.library_track_update(e.id,{play_count:"increment"})}),this.new_episodes.items={}},open_add_podcast_dialog(e){this.show_url_modal=!0},reload_new_episodes(){M.library_podcasts_new_episodes().then(({data:e})=>{this.new_episodes=new ge(e.tracks)})},reload_podcasts(){M.library_albums("podcast").then(({data:e})=>{this.albums=new ge(e),this.reload_new_episodes()})},update_rss(){this.$store.commit(gd,"rss"),this.$store.commit(wa,!0)}}},uj={class:"fd-page"},cj=["textContent"],dj={class:"buttons is-centered"},mj=["textContent"],fj=["textContent"],pj=["textContent"],hj={class:"buttons is-centered"},_j=["textContent"],gj=["textContent"];function yj(e,t,n,r,s,o){const a=E("mdicon"),i=E("list-tracks"),l=E("content-with-heading"),c=E("list-albums"),m=E("modal-dialog-add-rss");return k(),$("div",uj,[s.new_episodes.items.length>0?(k(),me(l,{key:0},{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.new-episodes"))},null,8,cj)]),"heading-right":x(()=>[u("div",dj,[u("a",{class:"button is-small",onClick:t[0]||(t[0]=(...d)=>o.mark_all_played&&o.mark_all_played(...d))},[y(a,{class:"icon",name:"pencil",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.mark-all-played"))},null,8,mj)])])]),content:x(()=>[y(i,{tracks:s.new_episodes,show_progress:!0,onPlayCountChanged:o.reload_new_episodes},null,8,["tracks","onPlayCountChanged"])]),_:1})):H("",!0),y(l,null,{"heading-left":x(()=>[u("p",{class:"title is-4",textContent:g(e.$t("page.podcasts.title"))},null,8,fj),u("p",{class:"heading",textContent:g(e.$t("page.podcasts.count",{count:s.albums.total}))},null,8,pj)]),"heading-right":x(()=>[u("div",hj,[o.rss.tracks>0?(k(),$("a",{key:0,class:"button is-small",onClick:t[1]||(t[1]=(...d)=>o.update_rss&&o.update_rss(...d))},[y(a,{class:"icon",name:"refresh",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.update"))},null,8,_j)])):H("",!0),u("a",{class:"button is-small",onClick:t[2]||(t[2]=(...d)=>o.open_add_podcast_dialog&&o.open_add_podcast_dialog(...d))},[y(a,{class:"icon",name:"rss",size:"16"}),u("span",{textContent:g(e.$t("page.podcasts.add"))},null,8,gj)])])]),content:x(()=>[y(c,{albums:s.albums,onPlayCountChanged:t[3]||(t[3]=d=>o.reload_new_episodes()),onPodcastDeleted:t[4]||(t[4]=d=>o.reload_podcasts())},null,8,["albums"]),y(m,{show:s.show_url_modal,onClose:t[5]||(t[5]=d=>s.show_url_modal=!1),onPodcastAdded:t[6]||(t[6]=d=>o.reload_podcasts())},null,8,["show"])]),_:1})])}const vj=te(lj,[["render",yj]]);var G1={exports:{}};/**! * Sortable 1.14.0 * @author RubaXa * @author owenm