From 051498861eb99c884b8ab2ffebb92c1b17bdb81e Mon Sep 17 00:00:00 2001 From: Alain Nussbaumer Date: Fri, 6 Jun 2025 21:57:02 +0200 Subject: [PATCH] [web] Remove linting rule --- htdocs/assets/index.js | 2 +- web-src/eslint.config.js | 1 - web-src/src/lib/SVGRenderer.js | 4 ++-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/assets/index.js b/htdocs/assets/index.js index 7799180a..17943b12 100644 --- a/htdocs/assets/index.js +++ b/htdocs/assets/index.js @@ -67,7 +67,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins * vue-router v4.5.1 * (c) 2025 Eduardo San Martin Morote * @license MIT - */const no=typeof document<"u";function eS(t){return typeof t=="object"||"displayName"in t||"props"in t||"__vccOpts"in t}function IR(t){return t.__esModule||t[Symbol.toStringTag]==="Module"||t.default&&eS(t.default)}const ye=Object.assign;function Qd(t,e){const n={};for(const s in e){const i=e[s];n[s]=xs(i)?i.map(t):t(i)}return n}const Sa=()=>{},xs=Array.isArray,nS=/#/g,xR=/&/g,NR=/\//g,PR=/=/g,DR=/\?/g,sS=/\+/g,MR=/%5B/g,LR=/%5D/g,iS=/%5E/g,RR=/%60/g,rS=/%7B/g,$R=/%7C/g,oS=/%7D/g,FR=/%20/g;function em(t){return encodeURI(""+t).replace($R,"|").replace(MR,"[").replace(LR,"]")}function VR(t){return em(t).replace(rS,"{").replace(oS,"}").replace(iS,"^")}function gh(t){return em(t).replace(sS,"%2B").replace(FR,"+").replace(nS,"%23").replace(xR,"%26").replace(RR,"`").replace(rS,"{").replace(oS,"}").replace(iS,"^")}function HR(t){return gh(t).replace(PR,"%3D")}function UR(t){return em(t).replace(nS,"%23").replace(DR,"%3F")}function jR(t){return t==null?"":UR(t).replace(NR,"%2F")}function Ya(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const BR=/\/$/,WR=t=>t.replace(BR,"");function tf(t,e,n="/"){let s,i={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(s=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),i=t(r)),a>-1&&(s=s||e.slice(0,a),o=e.slice(a,e.length)),s=qR(s??e,n),{fullPath:s+(r&&"?")+r+o,path:s,query:i,hash:Ya(o)}}function GR(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Qy(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function KR(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&Io(e.matched[s],n.matched[i])&&aS(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Io(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function aS(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!zR(t[n],e[n]))return!1;return!0}function zR(t,e){return xs(t)?tb(t,e):xs(e)?tb(e,t):t===e}function tb(t,e){return xs(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function qR(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let r=n.length-1,o,a;for(o=0;o1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(o).join("/")}const Di={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Za;(function(t){t.pop="pop",t.push="push"})(Za||(Za={}));var Ea;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Ea||(Ea={}));function XR(t){if(!t)if(no){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),WR(t)}const YR=/^[^#]+#/;function ZR(t,e){return t.replace(YR,"#")+e}function JR(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const ld=()=>({left:window.scrollX,top:window.scrollY});function QR(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=JR(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function eb(t,e){return(history.state?history.state.position-e:-1)+t}const yh=new Map;function t4(t,e){yh.set(t,e)}function e4(t){const e=yh.get(t);return yh.delete(t),e}let n4=()=>location.protocol+"//"+location.host;function lS(t,e){const{pathname:n,search:s,hash:i}=e,r=t.indexOf("#");if(r>-1){let a=i.includes(t.slice(r))?t.slice(r).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),Qy(l,"")}return Qy(n,t)+s+i}function s4(t,e,n,s){let i=[],r=[],o=null;const a=({state:f})=>{const h=lS(t,location),p=n.value,m=e.value;let b=0;if(f){if(n.value=h,e.value=f,o&&o===p){o=null;return}b=m?f.position-m.position:0}else s(h);i.forEach(y=>{y(n.value,p,{delta:b,type:Za.pop,direction:b?b>0?Ea.forward:Ea.back:Ea.unknown})})};function l(){o=n.value}function c(f){i.push(f);const h=()=>{const p=i.indexOf(f);p>-1&&i.splice(p,1)};return r.push(h),h}function u(){const{history:f}=window;f.state&&f.replaceState(ye({},f.state,{scroll:ld()}),"")}function d(){for(const f of r)f();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function nb(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?ld():null}}function i4(t){const{history:e,location:n}=window,s={value:lS(t,n)},i={value:e.state};i.value||r(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:n4()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),i.value=c}catch(h){console.error(h),n[u?"replace":"assign"](f)}}function o(l,c){const u=ye({},e.state,nb(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});r(l,u,!0),s.value=l}function a(l,c){const u=ye({},i.value,e.state,{forward:l,scroll:ld()});r(u.current,u,!0);const d=ye({},nb(s.value,l,null),{position:u.position+1},c);r(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:o}}function r4(t){t=XR(t);const e=i4(t),n=s4(t,e.state,e.location,e.replace);function s(r,o=!0){o||n.pauseListeners(),history.go(r)}const i=ye({location:"",base:t,go:s,createHref:ZR.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function o4(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),r4(t)}function a4(t){return typeof t=="string"||t&&typeof t=="object"}function cS(t){return typeof t=="string"||typeof t=="symbol"}const uS=Symbol("");var sb;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(sb||(sb={}));function xo(t,e){return ye(new Error,{type:t,[uS]:!0},e)}function ni(t,e){return t instanceof Error&&uS in t&&(e==null||!!(t.type&e))}const ib="[^/]+?",l4={sensitive:!1,strict:!1,start:!0,end:!0},c4=/[.+*?^${}()[\]/\\]/g;function u4(t,e){const n=ye({},l4,e),s=[];let i=n.start?"^":"";const r=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function dS(t,e){let n=0;const s=t.score,i=e.score;for(;n0&&e[e.length-1]<0}const f4={type:0,value:""},h4=/[a-zA-Z0-9_]/;function p4(t){if(!t)return[[]];if(t==="/")return[[f4]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=0,s=n;const i=[];let r;function o(){r&&i.push(r),r=[]}let a=0,l,c="",u="";function d(){c&&(n===0?r.push({type:0,value:c}):n===1||n===2||n===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a{o(g)}:Sa}function o(d){if(cS(d)){const f=s.get(d);f&&(s.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&s.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=v4(d,n);n.splice(f,0,d),d.record.name&&!lb(d)&&s.set(d.record.name,d)}function c(d,f){let h,p={},m,b;if("name"in d&&d.name){if(h=s.get(d.name),!h)throw xo(1,{location:d});b=h.record.name,p=ye(ob(f.params,h.keys.filter(g=>!g.optional).concat(h.parent?h.parent.keys.filter(g=>g.optional):[]).map(g=>g.name)),d.params&&ob(d.params,h.keys.map(g=>g.name))),m=h.stringify(p)}else if(d.path!=null)m=d.path,h=n.find(g=>g.re.test(m)),h&&(p=h.parse(m),b=h.record.name);else{if(h=f.name?s.get(f.name):n.find(g=>g.re.test(f.path)),!h)throw xo(1,{location:d,currentLocation:f});b=h.record.name,p=ye({},f.params,d.params),m=h.stringify(p)}const y=[];let _=h;for(;_;)y.unshift(_.record),_=_.parent;return{name:b,path:m,params:p,matched:y,meta:b4(y)}}t.forEach(d=>r(d));function u(){n.length=0,s.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:i}}function ob(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function ab(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:y4(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function y4(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const s in t.components)e[s]=typeof n=="object"?n[s]:n;return e}function lb(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function b4(t){return t.reduce((e,n)=>ye(e,n.meta),{})}function cb(t,e){const n={};for(const s in t)n[s]=s in e?e[s]:t[s];return n}function v4(t,e){let n=0,s=e.length;for(;n!==s;){const r=n+s>>1;dS(t,e[r])<0?s=r:n=r+1}const i=_4(t);return i&&(s=e.lastIndexOf(i,s-1)),s}function _4(t){let e=t;for(;e=e.parent;)if(fS(e)&&dS(t,e)===0)return e}function fS({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function S4(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;ir&&gh(r)):[s&&gh(s)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function E4(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=xs(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const w4=Symbol(""),db=Symbol(""),nm=Symbol(""),hS=Symbol(""),bh=Symbol("");function Jo(){let t=[];function e(s){return t.push(s),()=>{const i=t.indexOf(s);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Bi(t,e,n,s,i,r=o=>o()){const o=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((a,l)=>{const c=f=>{f===!1?l(xo(4,{from:n,to:e})):f instanceof Error?l(f):a4(f)?l(xo(2,{from:e,to:f})):(o&&s.enterCallbacks[i]===o&&typeof f=="function"&&o.push(f),a())},u=r(()=>t.call(s&&s.instances[i],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(f=>l(f))})}function ef(t,e,n,s,i=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(eS(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Bi(u,n,s,o,a,i))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=IR(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const h=(d.__vccOpts||d)[e];return h&&Bi(h,n,s,o,a,i)()}))}}return r}function fb(t){const e=as(nm),n=as(hS),s=tn(()=>{const l=Fn(t.to);return e.resolve(l)}),i=tn(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Io.bind(null,u));if(f>-1)return f;const h=hb(l[c-2]);return c>1&&hb(u)===h&&d[d.length-1].path!==h?d.findIndex(Io.bind(null,l[c-2])):f}),r=tn(()=>i.value>-1&&O4(n.params,s.value.params)),o=tn(()=>i.value>-1&&i.value===n.matched.length-1&&aS(n.params,s.value.params));function a(l={}){if(A4(l)){const c=e[Fn(t.replace)?"replace":"push"](Fn(t.to)).catch(Sa);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:tn(()=>s.value.href),isActive:r,isExactActive:o,navigate:a}}function k4(t){return t.length===1?t[0]:t}const T4=ki({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:fb,setup(t,{slots:e}){const n=Do(fb(t)),{options:s}=as(nm),i=tn(()=>({[pb(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[pb(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&k4(e.default(n));return t.custom?r:Us("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),C4=T4;function A4(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function O4(t,e){for(const n in e){const s=e[n],i=t[n];if(typeof s=="string"){if(s!==i)return!1}else if(!xs(i)||i.length!==s.length||s.some((r,o)=>r!==i[o]))return!1}return!0}function hb(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const pb=(t,e,n)=>t??e??n,I4=ki({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=as(bh),i=tn(()=>t.route||s.value),r=as(db,0),o=tn(()=>{let c=Fn(r);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=tn(()=>i.value.matched[o.value]);ma(db,tn(()=>o.value+1)),ma(w4,a),ma(bh,i);const l=os();return Xn(()=>[l.value,a.value,t.name],([c,u,d],[f,h,p])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Io(u,h)||!f)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,d=a.value,f=d&&d.components[u];if(!f)return mb(n.default,{Component:f,route:c});const h=d.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,b=Us(f,ye({},p,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return mb(n.default,{Component:b,route:c})||b}}});function mb(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const x4=I4;function N4(t){const e=g4(t.routes,t),n=t.parseQuery||S4,s=t.stringifyQuery||ub,i=t.history,r=Jo(),o=Jo(),a=Jo(),l=mu(Di);let c=Di;no&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Qd.bind(null,X=>""+X),d=Qd.bind(null,jR),f=Qd.bind(null,Ya);function h(X,dt){let ct,bt;return cS(X)?(ct=e.getRecordMatcher(X),bt=dt):bt=X,e.addRoute(bt,ct)}function p(X){const dt=e.getRecordMatcher(X);dt&&e.removeRoute(dt)}function m(){return e.getRoutes().map(X=>X.record)}function b(X){return!!e.getRecordMatcher(X)}function y(X,dt){if(dt=ye({},dt||l.value),typeof X=="string"){const N=tf(n,X,dt.path),W=e.resolve({path:N.path},dt),st=i.createHref(N.fullPath);return ye(N,W,{params:f(W.params),hash:Ya(N.hash),redirectedFrom:void 0,href:st})}let ct;if(X.path!=null)ct=ye({},X,{path:tf(n,X.path,dt.path).path});else{const N=ye({},X.params);for(const W in N)N[W]==null&&delete N[W];ct=ye({},X,{params:d(N)}),dt.params=d(dt.params)}const bt=e.resolve(ct,dt),Ht=X.hash||"";bt.params=u(f(bt.params));const Xt=GR(s,ye({},X,{hash:VR(Ht),path:bt.path})),A=i.createHref(Xt);return ye({fullPath:Xt,hash:Ht,query:s===ub?E4(X.query):X.query||{}},bt,{redirectedFrom:void 0,href:A})}function _(X){return typeof X=="string"?tf(n,X,l.value.path):ye({},X)}function g(X,dt){if(c!==X)return xo(8,{from:dt,to:X})}function v(X){return x(X)}function S(X){return v(ye(_(X),{replace:!0}))}function k(X){const dt=X.matched[X.matched.length-1];if(dt&&dt.redirect){const{redirect:ct}=dt;let bt=typeof ct=="function"?ct(X):ct;return typeof bt=="string"&&(bt=bt.includes("?")||bt.includes("#")?bt=_(bt):{path:bt},bt.params={}),ye({query:X.query,hash:X.hash,params:bt.path!=null?{}:X.params},bt)}}function x(X,dt){const ct=c=y(X),bt=l.value,Ht=X.state,Xt=X.force,A=X.replace===!0,N=k(ct);if(N)return x(ye(_(N),{state:typeof N=="object"?ye({},Ht,N.state):Ht,force:Xt,replace:A}),dt||ct);const W=ct;W.redirectedFrom=dt;let st;return!Xt&&KR(s,bt,ct)&&(st=xo(16,{to:W,from:bt}),Vt(bt,bt,!0,!1)),(st?Promise.resolve(st):D(W,bt)).catch(J=>ni(J)?ni(J,2)?J:qt(J):at(J,W,bt)).then(J=>{if(J){if(ni(J,2))return x(ye({replace:A},_(J.to),{state:typeof J.to=="object"?ye({},Ht,J.to.state):Ht,force:Xt}),dt||W)}else J=$(W,bt,!0,A,Ht);return j(W,bt,J),J})}function M(X,dt){const ct=g(X,dt);return ct?Promise.reject(ct):Promise.resolve()}function T(X){const dt=ve.values().next().value;return dt&&typeof dt.runWithContext=="function"?dt.runWithContext(X):X()}function D(X,dt){let ct;const[bt,Ht,Xt]=P4(X,dt);ct=ef(bt.reverse(),"beforeRouteLeave",X,dt);for(const N of bt)N.leaveGuards.forEach(W=>{ct.push(Bi(W,X,dt))});const A=M.bind(null,X,dt);return ct.push(A),Wt(ct).then(()=>{ct=[];for(const N of r.list())ct.push(Bi(N,X,dt));return ct.push(A),Wt(ct)}).then(()=>{ct=ef(Ht,"beforeRouteUpdate",X,dt);for(const N of Ht)N.updateGuards.forEach(W=>{ct.push(Bi(W,X,dt))});return ct.push(A),Wt(ct)}).then(()=>{ct=[];for(const N of Xt)if(N.beforeEnter)if(xs(N.beforeEnter))for(const W of N.beforeEnter)ct.push(Bi(W,X,dt));else ct.push(Bi(N.beforeEnter,X,dt));return ct.push(A),Wt(ct)}).then(()=>(X.matched.forEach(N=>N.enterCallbacks={}),ct=ef(Xt,"beforeRouteEnter",X,dt,T),ct.push(A),Wt(ct))).then(()=>{ct=[];for(const N of o.list())ct.push(Bi(N,X,dt));return ct.push(A),Wt(ct)}).catch(N=>ni(N,8)?N:Promise.reject(N))}function j(X,dt,ct){a.list().forEach(bt=>T(()=>bt(X,dt,ct)))}function $(X,dt,ct,bt,Ht){const Xt=g(X,dt);if(Xt)return Xt;const A=dt===Di,N=no?history.state:{};ct&&(bt||A?i.replace(X.fullPath,ye({scroll:A&&N&&N.scroll},Ht)):i.push(X.fullPath,Ht)),l.value=X,Vt(X,dt,ct,A),qt()}let U;function Y(){U||(U=i.listen((X,dt,ct)=>{if(!Se.listening)return;const bt=y(X),Ht=k(bt);if(Ht){x(ye(Ht,{replace:!0,force:!0}),bt).catch(Sa);return}c=bt;const Xt=l.value;no&&t4(eb(Xt.fullPath,ct.delta),ld()),D(bt,Xt).catch(A=>ni(A,12)?A:ni(A,2)?(x(ye(_(A.to),{force:!0}),bt).then(N=>{ni(N,20)&&!ct.delta&&ct.type===Za.pop&&i.go(-1,!1)}).catch(Sa),Promise.reject()):(ct.delta&&i.go(-ct.delta,!1),at(A,bt,Xt))).then(A=>{A=A||$(bt,Xt,!1),A&&(ct.delta&&!ni(A,8)?i.go(-ct.delta,!1):ct.type===Za.pop&&ni(A,20)&&i.go(-1,!1)),j(bt,Xt,A)}).catch(Sa)}))}let ot=Jo(),K=Jo(),Q;function at(X,dt,ct){qt(X);const bt=K.list();return bt.length?bt.forEach(Ht=>Ht(X,dt,ct)):console.error(X),Promise.reject(X)}function wt(){return Q&&l.value!==Di?Promise.resolve():new Promise((X,dt)=>{ot.add([X,dt])})}function qt(X){return Q||(Q=!X,Y(),ot.list().forEach(([dt,ct])=>X?ct(X):dt()),ot.reset()),X}function Vt(X,dt,ct,bt){const{scrollBehavior:Ht}=t;if(!no||!Ht)return Promise.resolve();const Xt=!ct&&e4(eb(X.fullPath,0))||(bt||!ct)&&history.state&&history.state.scroll||null;return $r().then(()=>Ht(X,dt,Xt)).then(A=>A&&QR(A)).catch(A=>at(A,X,dt))}const Bt=X=>i.go(X);let ge;const ve=new Set,Se={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:m,resolve:y,options:t,push:v,replace:S,go:Bt,back:()=>Bt(-1),forward:()=>Bt(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:K.add,isReady:wt,install(X){const dt=this;X.component("RouterLink",C4),X.component("RouterView",x4),X.config.globalProperties.$router=dt,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Fn(l)}),no&&!ge&&l.value===Di&&(ge=!0,v(i.location).catch(Ht=>{}));const ct={};for(const Ht in Di)Object.defineProperty(ct,Ht,{get:()=>l.value[Ht],enumerable:!0});X.provide(nm,dt),X.provide(hS,Mh(ct)),X.provide(bh,l);const bt=X.unmount;ve.add(X),X.unmount=function(){ve.delete(X),ve.size<1&&(c=Di,U&&U(),U=null,l.value=Di,ge=!1,Q=!1),bt()}}};function Wt(X){return X.reduce((dt,ct)=>dt.then(()=>T(ct)),Promise.resolve())}return Se}function P4(t,e){const n=[],s=[],i=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oIo(c,a))?s.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>Io(c,l))||i.push(l))}return[n,s,i]}const D4={name:"ContentWithHeading",data(){return{hidden:!0}},computed:{icon(){return this.hidden?"chevron-down":"chevron-up"}}},M4={class:"container"},L4={class:"columns is-centered"},R4={class:"column is-four-fifths"},$4={key:0,class:"my-2"},F4={class:"buttons is-centered"},V4={class:"level is-clipped"},H4={class:"level-left"},U4={class:"level-item has-text-centered-mobile"},j4={key:0,class:"level-right is-flex-shrink-1 has-text-centered-mobile"},B4={class:"buttons"},W4={key:0,class:"is-flex is-justify-content-center mt-4"};function G4(t,e,n,s,i,r){const o=w("mdicon");return O(),F("section",{class:Gt(["section",{"pt-0":t.$slots.options}])},[P("div",M4,[P("div",L4,[P("div",R4,[t.$slots.options?(O(),F("div",$4,[P("div",{class:Gt([{"is-hidden":i.hidden},"mt-4"])},[le(t.$slots,"options")],2),P("div",F4,[P("button",{class:"button is-small",onClick:e[0]||(e[0]=a=>i.hidden=!i.hidden)},[E(o,{class:"icon",name:r.icon,size:"16"},null,8,["name"])])])])):_t("",!0),P("div",null,[P("nav",V4,[P("div",H4,[P("div",U4,[P("div",null,[le(t.$slots,"heading")])])]),t.$slots.actions?(O(),F("div",j4,[P("div",B4,[le(t.$slots,"actions")])])):_t("",!0)]),le(t.$slots,"content"),t.$slots.footer?(O(),F("div",W4,[le(t.$slots,"footer")])):_t("",!0)])])])])],2)}const ie=nt(D4,[["render",G4]]),K4={name:"ControlButton",props:{button:{required:!0,type:Object}}},z4=["disabled"],q4=["textContent"],X4=["textContent"];function Y4(t,e,n,s,i,r){const o=w("mdicon");return O(),F("button",{class:"button is-small is-rounded",disabled:n.button.disabled,onClick:e[0]||(e[0]=(...a)=>n.button.handler&&n.button.handler(...a))},[n.button.icon?(O(),yt(o,{key:0,class:"icon",name:n.button.icon,size:"16"},null,8,["name"])):_t("",!0),n.button.key?(O(),F("span",{key:1,textContent:et(t.$t(n.button.key))},null,8,q4)):_t("",!0),n.button.title?(O(),F("span",{key:2,textContent:et(n.button.title)},null,8,X4)):_t("",!0)],8,z4)}const cn=nt(K4,[["render",Y4]]),Z4={name:"PaneTitle",props:{content:{required:!0,type:Object}}},J4=["textContent"],Q4={class:"is-size-7 is-uppercase"},t$=["onClick","textContent"],e$=["textContent"],n$={key:2};function s$(t,e,n,s,i,r){return O(),F(it,null,[n.content.title?(O(),F("div",{key:0,class:"title is-4",textContent:et(n.content.title)},null,8,J4)):_t("",!0),P("div",Q4,[(O(!0),F(it,null,de(n.content.subtitle,(o,a)=>(O(),F(it,{key:a},[o.handler?(O(),F("a",{key:0,onClick:o.handler,textContent:et(t.$t(o.key,{count:t.$n(o.count)},o.count))},null,8,t$)):(O(),F("span",{key:1,textContent:et(t.$t(o.key,{count:t.$n(o.count)},o.count))},null,8,e$)),a!==n.content.subtitle.length-1?(O(),F("span",n$," | ")):_t("",!0)],64))),128))])],64)}const re=nt(Z4,[["render",s$]]),i$={name:"PageAbout",components:{ContentWithHeading:ie,ControlButton:cn,PaneTitle:re},setup(){return{configurationStore:Fo(),libraryStore:Lu(),uiStore:Zn()}},computed:{properties(){return[{key:"property.name",value:this.configurationStore.library_name},{key:"property.artists",value:this.$n(this.libraryStore.artists)},{key:"property.albums",value:this.$n(this.libraryStore.albums)},{key:"property.tracks",value:this.$n(this.libraryStore.songs)},{key:"property.playtime",value:this.$formatters.toDuration(this.libraryStore.db_playtime)},{alternate:this.$formatters.toDateTime(this.libraryStore.updated_at),key:"property.updated",value:this.$formatters.toRelativeDuration(this.libraryStore.updated_at)},{alternate:this.$formatters.toDateTime(this.libraryStore.started_at),key:"property.uptime",value:this.$formatters.toDurationToNow(this.libraryStore.started_at)}]}},methods:{openUpdateDialog(){this.uiStore.showUpdateDialog=!0}}},r$=["textContent"],o$={class:"media-right"},a$=["textContent"],l$=["textContent"],c$=["textContent"],u$=["textContent"],d$=["textContent"];function f$(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("i18n-t"),c=w("content-with-heading");return O(),yt(c,null,{heading:R(()=>[E(o,{content:{title:t.$t("page.about.library")}},null,8,["content"])]),actions:R(()=>[E(a,{button:{handler:r.openUpdateDialog,icon:"refresh",key:"page.about.update"},class:Gt({"is-loading":s.libraryStore.updating}),disabled:s.libraryStore.updating},null,8,["button","class","disabled"])]),content:R(()=>[(O(!0),F(it,null,de(r.properties,u=>(O(),F("div",{key:u.key,class:"media is-align-items-center mb-0"},[P("div",{class:"media-content has-text-weight-bold",textContent:et(t.$t(u.key))},null,8,r$),P("div",o$,[P("span",{textContent:et(u.value)},null,8,a$),u.alternate?(O(),F("span",{key:0,class:"has-text-grey",textContent:et(` (${u.alternate})`)},null,8,l$)):_t("",!0)])]))),128)),P("div",{class:"is-size-7 mt-6",textContent:et(t.$t("page.about.version",{version:s.configurationStore.version}))},null,8,c$),P("div",{class:"is-size-7",textContent:et(t.$t("page.about.compiled-with",{options:s.configurationStore.buildoptions.join(", ")}))},null,8,u$),E(l,{tag:"div",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:R(()=>e[0]||(e[0]=[P("a",{href:"https://bulma.io"},"Bulma",-1)])),mdi:R(()=>e[1]||(e[1]=[P("a",{href:"https://pictogrammers.com/library/mdi/"}," Material Design Icons ",-1)])),vuejs:R(()=>e[2]||(e[2]=[P("a",{href:"https://vuejs.org/"},"Vue.js",-1)])),axios:R(()=>e[3]||(e[3]=[P("a",{href:"https://github.com/axios/axios"},"axios",-1)])),others:R(()=>[P("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:et(t.$t("page.about.more"))},null,8,d$)]),_:1})]),_:1})}const h$=nt(i$,[["render",f$]]),p$={name:"ContentWithHero"},m$={class:"section"},g$={class:"container"},y$={class:"columns is-centered"},b$={class:"column is-four-fifths"},v$={class:"columns is-flex-direction-row-reverse"},_$={class:"column is-flex has-image"},S$={class:"column m-auto is-three-fifths has-text-centered-mobile"},E$={class:"section pt-0"},w$={class:"container"},k$={class:"columns is-centered"},T$={class:"column is-four-fifths"};function C$(t,e,n,s,i,r){return O(),F(it,null,[P("section",m$,[P("div",g$,[P("div",y$,[P("div",b$,[P("div",v$,[P("div",_$,[le(t.$slots,"image",{},void 0,!0)]),P("div",S$,[le(t.$slots,"heading",{},void 0,!0)])])])])])]),P("section",E$,[P("div",w$,[P("div",k$,[P("div",T$,[le(t.$slots,"content",{},void 0,!0),le(t.$slots,"footer",{},void 0,!0)])])])])],64)}const cd=nt(p$,[["render",C$],["__scopeId","data-v-971a160a"]]),A$=t=>{let e=0;for(const n of t)e=n.charCodeAt(0)+((e<<5)-e);return(e&16777215).toString(16)},O$=t=>[.2126,.7152,.0722].reduce((e,n,s)=>e+ +`0x${t.slice(s*2,s*2+2)}`*n,0)/255,I$=t=>{const e=A$(t.alternate);let n="#FFFFFF";O$(e)>.5&&(n="#000000");const s=`{},xs=Array.isArray,nS=/#/g,xR=/&/g,NR=/\//g,PR=/=/g,DR=/\?/g,sS=/\+/g,MR=/%5B/g,LR=/%5D/g,iS=/%5E/g,RR=/%60/g,rS=/%7B/g,$R=/%7C/g,oS=/%7D/g,FR=/%20/g;function em(t){return encodeURI(""+t).replace($R,"|").replace(MR,"[").replace(LR,"]")}function VR(t){return em(t).replace(rS,"{").replace(oS,"}").replace(iS,"^")}function gh(t){return em(t).replace(sS,"%2B").replace(FR,"+").replace(nS,"%23").replace(xR,"%26").replace(RR,"`").replace(rS,"{").replace(oS,"}").replace(iS,"^")}function HR(t){return gh(t).replace(PR,"%3D")}function UR(t){return em(t).replace(nS,"%23").replace(DR,"%3F")}function jR(t){return t==null?"":UR(t).replace(NR,"%2F")}function Ya(t){try{return decodeURIComponent(""+t)}catch{}return""+t}const BR=/\/$/,WR=t=>t.replace(BR,"");function tf(t,e,n="/"){let s,i={},r="",o="";const a=e.indexOf("#");let l=e.indexOf("?");return a=0&&(l=-1),l>-1&&(s=e.slice(0,l),r=e.slice(l+1,a>-1?a:e.length),i=t(r)),a>-1&&(s=s||e.slice(0,a),o=e.slice(a,e.length)),s=qR(s??e,n),{fullPath:s+(r&&"?")+r+o,path:s,query:i,hash:Ya(o)}}function GR(t,e){const n=e.query?t(e.query):"";return e.path+(n&&"?")+n+(e.hash||"")}function Qy(t,e){return!e||!t.toLowerCase().startsWith(e.toLowerCase())?t:t.slice(e.length)||"/"}function KR(t,e,n){const s=e.matched.length-1,i=n.matched.length-1;return s>-1&&s===i&&Io(e.matched[s],n.matched[i])&&aS(e.params,n.params)&&t(e.query)===t(n.query)&&e.hash===n.hash}function Io(t,e){return(t.aliasOf||t)===(e.aliasOf||e)}function aS(t,e){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(!zR(t[n],e[n]))return!1;return!0}function zR(t,e){return xs(t)?tb(t,e):xs(e)?tb(e,t):t===e}function tb(t,e){return xs(e)?t.length===e.length&&t.every((n,s)=>n===e[s]):t.length===1&&t[0]===e}function qR(t,e){if(t.startsWith("/"))return t;if(!t)return e;const n=e.split("/"),s=t.split("/"),i=s[s.length-1];(i===".."||i===".")&&s.push("");let r=n.length-1,o,a;for(o=0;o1&&r--;else break;return n.slice(0,r).join("/")+"/"+s.slice(o).join("/")}const Di={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var Za;(function(t){t.pop="pop",t.push="push"})(Za||(Za={}));var Ea;(function(t){t.back="back",t.forward="forward",t.unknown=""})(Ea||(Ea={}));function XR(t){if(!t)if(no){const e=document.querySelector("base");t=e&&e.getAttribute("href")||"/",t=t.replace(/^\w+:\/\/[^\/]+/,"")}else t="/";return t[0]!=="/"&&t[0]!=="#"&&(t="/"+t),WR(t)}const YR=/^[^#]+#/;function ZR(t,e){return t.replace(YR,"#")+e}function JR(t,e){const n=document.documentElement.getBoundingClientRect(),s=t.getBoundingClientRect();return{behavior:e.behavior,left:s.left-n.left-(e.left||0),top:s.top-n.top-(e.top||0)}}const ld=()=>({left:window.scrollX,top:window.scrollY});function QR(t){let e;if("el"in t){const n=t.el,s=typeof n=="string"&&n.startsWith("#"),i=typeof n=="string"?s?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;e=JR(i,t)}else e=t;"scrollBehavior"in document.documentElement.style?window.scrollTo(e):window.scrollTo(e.left!=null?e.left:window.scrollX,e.top!=null?e.top:window.scrollY)}function eb(t,e){return(history.state?history.state.position-e:-1)+t}const yh=new Map;function t4(t,e){yh.set(t,e)}function e4(t){const e=yh.get(t);return yh.delete(t),e}let n4=()=>location.protocol+"//"+location.host;function lS(t,e){const{pathname:n,search:s,hash:i}=e,r=t.indexOf("#");if(r>-1){let a=i.includes(t.slice(r))?t.slice(r).length:1,l=i.slice(a);return l[0]!=="/"&&(l="/"+l),Qy(l,"")}return Qy(n,t)+s+i}function s4(t,e,n,s){let i=[],r=[],o=null;const a=({state:f})=>{const h=lS(t,location),p=n.value,m=e.value;let b=0;if(f){if(n.value=h,e.value=f,o&&o===p){o=null;return}b=m?f.position-m.position:0}else s(h);i.forEach(y=>{y(n.value,p,{delta:b,type:Za.pop,direction:b?b>0?Ea.forward:Ea.back:Ea.unknown})})};function l(){o=n.value}function c(f){i.push(f);const h=()=>{const p=i.indexOf(f);p>-1&&i.splice(p,1)};return r.push(h),h}function u(){const{history:f}=window;f.state&&f.replaceState(ye({},f.state,{scroll:ld()}),"")}function d(){for(const f of r)f();r=[],window.removeEventListener("popstate",a),window.removeEventListener("beforeunload",u)}return window.addEventListener("popstate",a),window.addEventListener("beforeunload",u,{passive:!0}),{pauseListeners:l,listen:c,destroy:d}}function nb(t,e,n,s=!1,i=!1){return{back:t,current:e,forward:n,replaced:s,position:window.history.length,scroll:i?ld():null}}function i4(t){const{history:e,location:n}=window,s={value:lS(t,n)},i={value:e.state};i.value||r(s.value,{back:null,current:s.value,forward:null,position:e.length-1,replaced:!0,scroll:null},!0);function r(l,c,u){const d=t.indexOf("#"),f=d>-1?(n.host&&document.querySelector("base")?t:t.slice(d))+l:n4()+t+l;try{e[u?"replaceState":"pushState"](c,"",f),i.value=c}catch(h){console.error(h),n[u?"replace":"assign"](f)}}function o(l,c){const u=ye({},e.state,nb(i.value.back,l,i.value.forward,!0),c,{position:i.value.position});r(l,u,!0),s.value=l}function a(l,c){const u=ye({},i.value,e.state,{forward:l,scroll:ld()});r(u.current,u,!0);const d=ye({},nb(s.value,l,null),{position:u.position+1},c);r(l,d,!1),s.value=l}return{location:s,state:i,push:a,replace:o}}function r4(t){t=XR(t);const e=i4(t),n=s4(t,e.state,e.location,e.replace);function s(r,o=!0){o||n.pauseListeners(),history.go(r)}const i=ye({location:"",base:t,go:s,createHref:ZR.bind(null,t)},e,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>e.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>e.state.value}),i}function o4(t){return t=location.host?t||location.pathname+location.search:"",t.includes("#")||(t+="#"),r4(t)}function a4(t){return typeof t=="string"||t&&typeof t=="object"}function cS(t){return typeof t=="string"||typeof t=="symbol"}const uS=Symbol("");var sb;(function(t){t[t.aborted=4]="aborted",t[t.cancelled=8]="cancelled",t[t.duplicated=16]="duplicated"})(sb||(sb={}));function xo(t,e){return ye(new Error,{type:t,[uS]:!0},e)}function ni(t,e){return t instanceof Error&&uS in t&&(e==null||!!(t.type&e))}const ib="[^/]+?",l4={sensitive:!1,strict:!1,start:!0,end:!0},c4=/[.+*?^${}()[\]/\\]/g;function u4(t,e){const n=ye({},l4,e),s=[];let i=n.start?"^":"";const r=[];for(const c of t){const u=c.length?[]:[90];n.strict&&!c.length&&(i+="/");for(let d=0;de.length?e.length===1&&e[0]===80?1:-1:0}function dS(t,e){let n=0;const s=t.score,i=e.score;for(;n0&&e[e.length-1]<0}const f4={type:0,value:""},h4=/[a-zA-Z0-9_]/;function p4(t){if(!t)return[[]];if(t==="/")return[[f4]];if(!t.startsWith("/"))throw new Error(`Invalid path "${t}"`);function e(h){throw new Error(`ERR (${n})/"${c}": ${h}`)}let n=0,s=n;const i=[];let r;function o(){r&&i.push(r),r=[]}let a=0,l,c="",u="";function d(){c&&(n===0?r.push({type:0,value:c}):n===1||n===2||n===3?(r.length>1&&(l==="*"||l==="+")&&e(`A repeatable param (${c}) must be alone in its segment. eg: '/:ids+.`),r.push({type:1,value:c,regexp:u,repeatable:l==="*"||l==="+",optional:l==="*"||l==="?"})):e("Invalid state to consume buffer"),c="")}function f(){c+=l}for(;a{o(g)}:Sa}function o(d){if(cS(d)){const f=s.get(d);f&&(s.delete(d),n.splice(n.indexOf(f),1),f.children.forEach(o),f.alias.forEach(o))}else{const f=n.indexOf(d);f>-1&&(n.splice(f,1),d.record.name&&s.delete(d.record.name),d.children.forEach(o),d.alias.forEach(o))}}function a(){return n}function l(d){const f=v4(d,n);n.splice(f,0,d),d.record.name&&!lb(d)&&s.set(d.record.name,d)}function c(d,f){let h,p={},m,b;if("name"in d&&d.name){if(h=s.get(d.name),!h)throw xo(1,{location:d});b=h.record.name,p=ye(ob(f.params,h.keys.filter(g=>!g.optional).concat(h.parent?h.parent.keys.filter(g=>g.optional):[]).map(g=>g.name)),d.params&&ob(d.params,h.keys.map(g=>g.name))),m=h.stringify(p)}else if(d.path!=null)m=d.path,h=n.find(g=>g.re.test(m)),h&&(p=h.parse(m),b=h.record.name);else{if(h=f.name?s.get(f.name):n.find(g=>g.re.test(f.path)),!h)throw xo(1,{location:d,currentLocation:f});b=h.record.name,p=ye({},f.params,d.params),m=h.stringify(p)}const y=[];let _=h;for(;_;)y.unshift(_.record),_=_.parent;return{name:b,path:m,params:p,matched:y,meta:b4(y)}}t.forEach(d=>r(d));function u(){n.length=0,s.clear()}return{addRoute:r,resolve:c,removeRoute:o,clearRoutes:u,getRoutes:a,getRecordMatcher:i}}function ob(t,e){const n={};for(const s of e)s in t&&(n[s]=t[s]);return n}function ab(t){const e={path:t.path,redirect:t.redirect,name:t.name,meta:t.meta||{},aliasOf:t.aliasOf,beforeEnter:t.beforeEnter,props:y4(t),children:t.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in t?t.components||null:t.component&&{default:t.component}};return Object.defineProperty(e,"mods",{value:{}}),e}function y4(t){const e={},n=t.props||!1;if("component"in t)e.default=n;else for(const s in t.components)e[s]=typeof n=="object"?n[s]:n;return e}function lb(t){for(;t;){if(t.record.aliasOf)return!0;t=t.parent}return!1}function b4(t){return t.reduce((e,n)=>ye(e,n.meta),{})}function cb(t,e){const n={};for(const s in t)n[s]=s in e?e[s]:t[s];return n}function v4(t,e){let n=0,s=e.length;for(;n!==s;){const r=n+s>>1;dS(t,e[r])<0?s=r:n=r+1}const i=_4(t);return i&&(s=e.lastIndexOf(i,s-1)),s}function _4(t){let e=t;for(;e=e.parent;)if(fS(e)&&dS(t,e)===0)return e}function fS({record:t}){return!!(t.name||t.components&&Object.keys(t.components).length||t.redirect)}function S4(t){const e={};if(t===""||t==="?")return e;const s=(t[0]==="?"?t.slice(1):t).split("&");for(let i=0;ir&&gh(r)):[s&&gh(s)]).forEach(r=>{r!==void 0&&(e+=(e.length?"&":"")+n,r!=null&&(e+="="+r))})}return e}function E4(t){const e={};for(const n in t){const s=t[n];s!==void 0&&(e[n]=xs(s)?s.map(i=>i==null?null:""+i):s==null?s:""+s)}return e}const w4=Symbol(""),db=Symbol(""),nm=Symbol(""),hS=Symbol(""),bh=Symbol("");function Jo(){let t=[];function e(s){return t.push(s),()=>{const i=t.indexOf(s);i>-1&&t.splice(i,1)}}function n(){t=[]}return{add:e,list:()=>t.slice(),reset:n}}function Bi(t,e,n,s,i,r=o=>o()){const o=s&&(s.enterCallbacks[i]=s.enterCallbacks[i]||[]);return()=>new Promise((a,l)=>{const c=f=>{f===!1?l(xo(4,{from:n,to:e})):f instanceof Error?l(f):a4(f)?l(xo(2,{from:e,to:f})):(o&&s.enterCallbacks[i]===o&&typeof f=="function"&&o.push(f),a())},u=r(()=>t.call(s&&s.instances[i],e,n,c));let d=Promise.resolve(u);t.length<3&&(d=d.then(c)),d.catch(f=>l(f))})}function ef(t,e,n,s,i=r=>r()){const r=[];for(const o of t)for(const a in o.components){let l=o.components[a];if(!(e!=="beforeRouteEnter"&&!o.instances[a]))if(eS(l)){const u=(l.__vccOpts||l)[e];u&&r.push(Bi(u,n,s,o,a,i))}else{let c=l();r.push(()=>c.then(u=>{if(!u)throw new Error(`Couldn't resolve component "${a}" at "${o.path}"`);const d=IR(u)?u.default:u;o.mods[a]=u,o.components[a]=d;const h=(d.__vccOpts||d)[e];return h&&Bi(h,n,s,o,a,i)()}))}}return r}function fb(t){const e=as(nm),n=as(hS),s=tn(()=>{const l=Fn(t.to);return e.resolve(l)}),i=tn(()=>{const{matched:l}=s.value,{length:c}=l,u=l[c-1],d=n.matched;if(!u||!d.length)return-1;const f=d.findIndex(Io.bind(null,u));if(f>-1)return f;const h=hb(l[c-2]);return c>1&&hb(u)===h&&d[d.length-1].path!==h?d.findIndex(Io.bind(null,l[c-2])):f}),r=tn(()=>i.value>-1&&O4(n.params,s.value.params)),o=tn(()=>i.value>-1&&i.value===n.matched.length-1&&aS(n.params,s.value.params));function a(l={}){if(A4(l)){const c=e[Fn(t.replace)?"replace":"push"](Fn(t.to)).catch(Sa);return t.viewTransition&&typeof document<"u"&&"startViewTransition"in document&&document.startViewTransition(()=>c),c}return Promise.resolve()}return{route:s,href:tn(()=>s.value.href),isActive:r,isExactActive:o,navigate:a}}function k4(t){return t.length===1?t[0]:t}const T4=ki({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"},viewTransition:Boolean},useLink:fb,setup(t,{slots:e}){const n=Do(fb(t)),{options:s}=as(nm),i=tn(()=>({[pb(t.activeClass,s.linkActiveClass,"router-link-active")]:n.isActive,[pb(t.exactActiveClass,s.linkExactActiveClass,"router-link-exact-active")]:n.isExactActive}));return()=>{const r=e.default&&k4(e.default(n));return t.custom?r:Us("a",{"aria-current":n.isExactActive?t.ariaCurrentValue:null,href:n.href,onClick:n.navigate,class:i.value},r)}}}),C4=T4;function A4(t){if(!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)&&!t.defaultPrevented&&!(t.button!==void 0&&t.button!==0)){if(t.currentTarget&&t.currentTarget.getAttribute){const e=t.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(e))return}return t.preventDefault&&t.preventDefault(),!0}}function O4(t,e){for(const n in e){const s=e[n],i=t[n];if(typeof s=="string"){if(s!==i)return!1}else if(!xs(i)||i.length!==s.length||s.some((r,o)=>r!==i[o]))return!1}return!0}function hb(t){return t?t.aliasOf?t.aliasOf.path:t.path:""}const pb=(t,e,n)=>t??e??n,I4=ki({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(t,{attrs:e,slots:n}){const s=as(bh),i=tn(()=>t.route||s.value),r=as(db,0),o=tn(()=>{let c=Fn(r);const{matched:u}=i.value;let d;for(;(d=u[c])&&!d.components;)c++;return c}),a=tn(()=>i.value.matched[o.value]);ma(db,tn(()=>o.value+1)),ma(w4,a),ma(bh,i);const l=os();return Xn(()=>[l.value,a.value,t.name],([c,u,d],[f,h,p])=>{u&&(u.instances[d]=c,h&&h!==u&&c&&c===f&&(u.leaveGuards.size||(u.leaveGuards=h.leaveGuards),u.updateGuards.size||(u.updateGuards=h.updateGuards))),c&&u&&(!h||!Io(u,h)||!f)&&(u.enterCallbacks[d]||[]).forEach(m=>m(c))},{flush:"post"}),()=>{const c=i.value,u=t.name,d=a.value,f=d&&d.components[u];if(!f)return mb(n.default,{Component:f,route:c});const h=d.props[u],p=h?h===!0?c.params:typeof h=="function"?h(c):h:null,b=Us(f,ye({},p,e,{onVnodeUnmounted:y=>{y.component.isUnmounted&&(d.instances[u]=null)},ref:l}));return mb(n.default,{Component:b,route:c})||b}}});function mb(t,e){if(!t)return null;const n=t(e);return n.length===1?n[0]:n}const x4=I4;function N4(t){const e=g4(t.routes,t),n=t.parseQuery||S4,s=t.stringifyQuery||ub,i=t.history,r=Jo(),o=Jo(),a=Jo(),l=mu(Di);let c=Di;no&&t.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const u=Qd.bind(null,X=>""+X),d=Qd.bind(null,jR),f=Qd.bind(null,Ya);function h(X,dt){let ct,bt;return cS(X)?(ct=e.getRecordMatcher(X),bt=dt):bt=X,e.addRoute(bt,ct)}function p(X){const dt=e.getRecordMatcher(X);dt&&e.removeRoute(dt)}function m(){return e.getRoutes().map(X=>X.record)}function b(X){return!!e.getRecordMatcher(X)}function y(X,dt){if(dt=ye({},dt||l.value),typeof X=="string"){const N=tf(n,X,dt.path),W=e.resolve({path:N.path},dt),st=i.createHref(N.fullPath);return ye(N,W,{params:f(W.params),hash:Ya(N.hash),redirectedFrom:void 0,href:st})}let ct;if(X.path!=null)ct=ye({},X,{path:tf(n,X.path,dt.path).path});else{const N=ye({},X.params);for(const W in N)N[W]==null&&delete N[W];ct=ye({},X,{params:d(N)}),dt.params=d(dt.params)}const bt=e.resolve(ct,dt),Ht=X.hash||"";bt.params=u(f(bt.params));const Xt=GR(s,ye({},X,{hash:VR(Ht),path:bt.path})),A=i.createHref(Xt);return ye({fullPath:Xt,hash:Ht,query:s===ub?E4(X.query):X.query||{}},bt,{redirectedFrom:void 0,href:A})}function _(X){return typeof X=="string"?tf(n,X,l.value.path):ye({},X)}function g(X,dt){if(c!==X)return xo(8,{from:dt,to:X})}function v(X){return x(X)}function S(X){return v(ye(_(X),{replace:!0}))}function k(X){const dt=X.matched[X.matched.length-1];if(dt&&dt.redirect){const{redirect:ct}=dt;let bt=typeof ct=="function"?ct(X):ct;return typeof bt=="string"&&(bt=bt.includes("?")||bt.includes("#")?bt=_(bt):{path:bt},bt.params={}),ye({query:X.query,hash:X.hash,params:bt.path!=null?{}:X.params},bt)}}function x(X,dt){const ct=c=y(X),bt=l.value,Ht=X.state,Xt=X.force,A=X.replace===!0,N=k(ct);if(N)return x(ye(_(N),{state:typeof N=="object"?ye({},Ht,N.state):Ht,force:Xt,replace:A}),dt||ct);const W=ct;W.redirectedFrom=dt;let st;return!Xt&&KR(s,bt,ct)&&(st=xo(16,{to:W,from:bt}),Vt(bt,bt,!0,!1)),(st?Promise.resolve(st):D(W,bt)).catch(J=>ni(J)?ni(J,2)?J:qt(J):at(J,W,bt)).then(J=>{if(J){if(ni(J,2))return x(ye({replace:A},_(J.to),{state:typeof J.to=="object"?ye({},Ht,J.to.state):Ht,force:Xt}),dt||W)}else J=$(W,bt,!0,A,Ht);return j(W,bt,J),J})}function M(X,dt){const ct=g(X,dt);return ct?Promise.reject(ct):Promise.resolve()}function T(X){const dt=ve.values().next().value;return dt&&typeof dt.runWithContext=="function"?dt.runWithContext(X):X()}function D(X,dt){let ct;const[bt,Ht,Xt]=P4(X,dt);ct=ef(bt.reverse(),"beforeRouteLeave",X,dt);for(const N of bt)N.leaveGuards.forEach(W=>{ct.push(Bi(W,X,dt))});const A=M.bind(null,X,dt);return ct.push(A),Wt(ct).then(()=>{ct=[];for(const N of r.list())ct.push(Bi(N,X,dt));return ct.push(A),Wt(ct)}).then(()=>{ct=ef(Ht,"beforeRouteUpdate",X,dt);for(const N of Ht)N.updateGuards.forEach(W=>{ct.push(Bi(W,X,dt))});return ct.push(A),Wt(ct)}).then(()=>{ct=[];for(const N of Xt)if(N.beforeEnter)if(xs(N.beforeEnter))for(const W of N.beforeEnter)ct.push(Bi(W,X,dt));else ct.push(Bi(N.beforeEnter,X,dt));return ct.push(A),Wt(ct)}).then(()=>(X.matched.forEach(N=>N.enterCallbacks={}),ct=ef(Xt,"beforeRouteEnter",X,dt,T),ct.push(A),Wt(ct))).then(()=>{ct=[];for(const N of o.list())ct.push(Bi(N,X,dt));return ct.push(A),Wt(ct)}).catch(N=>ni(N,8)?N:Promise.reject(N))}function j(X,dt,ct){a.list().forEach(bt=>T(()=>bt(X,dt,ct)))}function $(X,dt,ct,bt,Ht){const Xt=g(X,dt);if(Xt)return Xt;const A=dt===Di,N=no?history.state:{};ct&&(bt||A?i.replace(X.fullPath,ye({scroll:A&&N&&N.scroll},Ht)):i.push(X.fullPath,Ht)),l.value=X,Vt(X,dt,ct,A),qt()}let U;function Y(){U||(U=i.listen((X,dt,ct)=>{if(!Se.listening)return;const bt=y(X),Ht=k(bt);if(Ht){x(ye(Ht,{replace:!0,force:!0}),bt).catch(Sa);return}c=bt;const Xt=l.value;no&&t4(eb(Xt.fullPath,ct.delta),ld()),D(bt,Xt).catch(A=>ni(A,12)?A:ni(A,2)?(x(ye(_(A.to),{force:!0}),bt).then(N=>{ni(N,20)&&!ct.delta&&ct.type===Za.pop&&i.go(-1,!1)}).catch(Sa),Promise.reject()):(ct.delta&&i.go(-ct.delta,!1),at(A,bt,Xt))).then(A=>{A=A||$(bt,Xt,!1),A&&(ct.delta&&!ni(A,8)?i.go(-ct.delta,!1):ct.type===Za.pop&&ni(A,20)&&i.go(-1,!1)),j(bt,Xt,A)}).catch(Sa)}))}let ot=Jo(),K=Jo(),Q;function at(X,dt,ct){qt(X);const bt=K.list();return bt.length?bt.forEach(Ht=>Ht(X,dt,ct)):console.error(X),Promise.reject(X)}function wt(){return Q&&l.value!==Di?Promise.resolve():new Promise((X,dt)=>{ot.add([X,dt])})}function qt(X){return Q||(Q=!X,Y(),ot.list().forEach(([dt,ct])=>X?ct(X):dt()),ot.reset()),X}function Vt(X,dt,ct,bt){const{scrollBehavior:Ht}=t;if(!no||!Ht)return Promise.resolve();const Xt=!ct&&e4(eb(X.fullPath,0))||(bt||!ct)&&history.state&&history.state.scroll||null;return $r().then(()=>Ht(X,dt,Xt)).then(A=>A&&QR(A)).catch(A=>at(A,X,dt))}const Bt=X=>i.go(X);let ge;const ve=new Set,Se={currentRoute:l,listening:!0,addRoute:h,removeRoute:p,clearRoutes:e.clearRoutes,hasRoute:b,getRoutes:m,resolve:y,options:t,push:v,replace:S,go:Bt,back:()=>Bt(-1),forward:()=>Bt(1),beforeEach:r.add,beforeResolve:o.add,afterEach:a.add,onError:K.add,isReady:wt,install(X){const dt=this;X.component("RouterLink",C4),X.component("RouterView",x4),X.config.globalProperties.$router=dt,Object.defineProperty(X.config.globalProperties,"$route",{enumerable:!0,get:()=>Fn(l)}),no&&!ge&&l.value===Di&&(ge=!0,v(i.location).catch(Ht=>{}));const ct={};for(const Ht in Di)Object.defineProperty(ct,Ht,{get:()=>l.value[Ht],enumerable:!0});X.provide(nm,dt),X.provide(hS,Mh(ct)),X.provide(bh,l);const bt=X.unmount;ve.add(X),X.unmount=function(){ve.delete(X),ve.size<1&&(c=Di,U&&U(),U=null,l.value=Di,ge=!1,Q=!1),bt()}}};function Wt(X){return X.reduce((dt,ct)=>dt.then(()=>T(ct)),Promise.resolve())}return Se}function P4(t,e){const n=[],s=[],i=[],r=Math.max(e.matched.length,t.matched.length);for(let o=0;oIo(c,a))?s.push(a):n.push(a));const l=t.matched[o];l&&(e.matched.find(c=>Io(c,l))||i.push(l))}return[n,s,i]}const D4={name:"ContentWithHeading",data(){return{hidden:!0}},computed:{icon(){return this.hidden?"chevron-down":"chevron-up"}}},M4={class:"container"},L4={class:"columns is-centered"},R4={class:"column is-four-fifths"},$4={key:0,class:"my-2"},F4={class:"buttons is-centered"},V4={class:"level is-clipped"},H4={class:"level-left"},U4={class:"level-item has-text-centered-mobile"},j4={key:0,class:"level-right is-flex-shrink-1 has-text-centered-mobile"},B4={class:"buttons"},W4={key:0,class:"is-flex is-justify-content-center mt-4"};function G4(t,e,n,s,i,r){const o=w("mdicon");return O(),F("section",{class:Gt(["section",{"pt-0":t.$slots.options}])},[P("div",M4,[P("div",L4,[P("div",R4,[t.$slots.options?(O(),F("div",$4,[P("div",{class:Gt([{"is-hidden":i.hidden},"mt-4"])},[le(t.$slots,"options")],2),P("div",F4,[P("button",{class:"button is-small",onClick:e[0]||(e[0]=a=>i.hidden=!i.hidden)},[E(o,{class:"icon",name:r.icon,size:"16"},null,8,["name"])])])])):_t("",!0),P("div",null,[P("nav",V4,[P("div",H4,[P("div",U4,[P("div",null,[le(t.$slots,"heading")])])]),t.$slots.actions?(O(),F("div",j4,[P("div",B4,[le(t.$slots,"actions")])])):_t("",!0)]),le(t.$slots,"content"),t.$slots.footer?(O(),F("div",W4,[le(t.$slots,"footer")])):_t("",!0)])])])])],2)}const ie=nt(D4,[["render",G4]]),K4={name:"ControlButton",props:{button:{required:!0,type:Object}}},z4=["disabled"],q4=["textContent"],X4=["textContent"];function Y4(t,e,n,s,i,r){const o=w("mdicon");return O(),F("button",{class:"button is-small is-rounded",disabled:n.button.disabled,onClick:e[0]||(e[0]=(...a)=>n.button.handler&&n.button.handler(...a))},[n.button.icon?(O(),yt(o,{key:0,class:"icon",name:n.button.icon,size:"16"},null,8,["name"])):_t("",!0),n.button.key?(O(),F("span",{key:1,textContent:et(t.$t(n.button.key))},null,8,q4)):_t("",!0),n.button.title?(O(),F("span",{key:2,textContent:et(n.button.title)},null,8,X4)):_t("",!0)],8,z4)}const cn=nt(K4,[["render",Y4]]),Z4={name:"PaneTitle",props:{content:{required:!0,type:Object}}},J4=["textContent"],Q4={class:"is-size-7 is-uppercase"},t$=["onClick","textContent"],e$=["textContent"],n$={key:2};function s$(t,e,n,s,i,r){return O(),F(it,null,[n.content.title?(O(),F("div",{key:0,class:"title is-4",textContent:et(n.content.title)},null,8,J4)):_t("",!0),P("div",Q4,[(O(!0),F(it,null,de(n.content.subtitle,(o,a)=>(O(),F(it,{key:a},[o.handler?(O(),F("a",{key:0,onClick:o.handler,textContent:et(t.$t(o.key,{count:t.$n(o.count)},o.count))},null,8,t$)):(O(),F("span",{key:1,textContent:et(t.$t(o.key,{count:t.$n(o.count)},o.count))},null,8,e$)),a!==n.content.subtitle.length-1?(O(),F("span",n$," | ")):_t("",!0)],64))),128))])],64)}const re=nt(Z4,[["render",s$]]),i$={name:"PageAbout",components:{ContentWithHeading:ie,ControlButton:cn,PaneTitle:re},setup(){return{configurationStore:Fo(),libraryStore:Lu(),uiStore:Zn()}},computed:{properties(){return[{key:"property.name",value:this.configurationStore.library_name},{key:"property.artists",value:this.$n(this.libraryStore.artists)},{key:"property.albums",value:this.$n(this.libraryStore.albums)},{key:"property.tracks",value:this.$n(this.libraryStore.songs)},{key:"property.playtime",value:this.$formatters.toDuration(this.libraryStore.db_playtime)},{alternate:this.$formatters.toDateTime(this.libraryStore.updated_at),key:"property.updated",value:this.$formatters.toRelativeDuration(this.libraryStore.updated_at)},{alternate:this.$formatters.toDateTime(this.libraryStore.started_at),key:"property.uptime",value:this.$formatters.toDurationToNow(this.libraryStore.started_at)}]}},methods:{openUpdateDialog(){this.uiStore.showUpdateDialog=!0}}},r$=["textContent"],o$={class:"media-right"},a$=["textContent"],l$=["textContent"],c$=["textContent"],u$=["textContent"],d$=["textContent"];function f$(t,e,n,s,i,r){const o=w("pane-title"),a=w("control-button"),l=w("i18n-t"),c=w("content-with-heading");return O(),yt(c,null,{heading:R(()=>[E(o,{content:{title:t.$t("page.about.library")}},null,8,["content"])]),actions:R(()=>[E(a,{button:{handler:r.openUpdateDialog,icon:"refresh",key:"page.about.update"},class:Gt({"is-loading":s.libraryStore.updating}),disabled:s.libraryStore.updating},null,8,["button","class","disabled"])]),content:R(()=>[(O(!0),F(it,null,de(r.properties,u=>(O(),F("div",{key:u.key,class:"media is-align-items-center mb-0"},[P("div",{class:"media-content has-text-weight-bold",textContent:et(t.$t(u.key))},null,8,r$),P("div",o$,[P("span",{textContent:et(u.value)},null,8,a$),u.alternate?(O(),F("span",{key:0,class:"has-text-grey",textContent:et(` (${u.alternate})`)},null,8,l$)):_t("",!0)])]))),128)),P("div",{class:"is-size-7 mt-6",textContent:et(t.$t("page.about.version",{version:s.configurationStore.version}))},null,8,c$),P("div",{class:"is-size-7",textContent:et(t.$t("page.about.compiled-with",{options:s.configurationStore.buildoptions.join(", ")}))},null,8,u$),E(l,{tag:"div",class:"is-size-7",keypath:"page.about.built-with",scope:"global"},{bulma:R(()=>e[0]||(e[0]=[P("a",{href:"https://bulma.io"},"Bulma",-1)])),mdi:R(()=>e[1]||(e[1]=[P("a",{href:"https://pictogrammers.com/library/mdi/"}," Material Design Icons ",-1)])),vuejs:R(()=>e[2]||(e[2]=[P("a",{href:"https://vuejs.org/"},"Vue.js",-1)])),axios:R(()=>e[3]||(e[3]=[P("a",{href:"https://github.com/axios/axios"},"axios",-1)])),others:R(()=>[P("a",{href:"https://github.com/owntone/owntone-server/network/dependencies",textContent:et(t.$t("page.about.more"))},null,8,d$)]),_:1})]),_:1})}const h$=nt(i$,[["render",f$]]),p$={name:"ContentWithHero"},m$={class:"section"},g$={class:"container"},y$={class:"columns is-centered"},b$={class:"column is-four-fifths"},v$={class:"columns is-flex-direction-row-reverse"},_$={class:"column is-flex has-image"},S$={class:"column m-auto is-three-fifths has-text-centered-mobile"},E$={class:"section pt-0"},w$={class:"container"},k$={class:"columns is-centered"},T$={class:"column is-four-fifths"};function C$(t,e,n,s,i,r){return O(),F(it,null,[P("section",m$,[P("div",g$,[P("div",y$,[P("div",b$,[P("div",v$,[P("div",_$,[le(t.$slots,"image",{},void 0,!0)]),P("div",S$,[le(t.$slots,"heading",{},void 0,!0)])])])])])]),P("section",E$,[P("div",w$,[P("div",k$,[P("div",T$,[le(t.$slots,"content",{},void 0,!0),le(t.$slots,"footer",{},void 0,!0)])])])])],64)}const cd=nt(p$,[["render",C$],["__scopeId","data-v-971a160a"]]),A$=t=>{let e=0;for(const n of t)e=n.charCodeAt(0)+e*31;return(e%16777215).toString(16).padStart(6,"0")},O$=t=>[.2126,.7152,.0722].reduce((e,n,s)=>e+ +`0x${t.slice(s*2,s*2+2)}`*n,0)/255,I$=t=>{const e=A$(t.alternate);let n="#FFFFFF";O$(e)>.5&&(n="#000000");const s=` diff --git a/web-src/eslint.config.js b/web-src/eslint.config.js index b9dce328..15bcffb5 100644 --- a/web-src/eslint.config.js +++ b/web-src/eslint.config.js @@ -14,7 +14,6 @@ export default [ camelcase: 'off', 'id-length': 'off', 'max-lines-per-function': 'off', - 'no-bitwise': 'off', 'no-magic-numbers': 'off', 'one-var': 'off', 'sort-keys': 'off' diff --git a/web-src/src/lib/SVGRenderer.js b/web-src/src/lib/SVGRenderer.js index 2815573f..52018a5a 100644 --- a/web-src/src/lib/SVGRenderer.js +++ b/web-src/src/lib/SVGRenderer.js @@ -1,9 +1,9 @@ const toColor = (string) => { let hash = 0 for (const char of string) { - hash = char.charCodeAt(0) + ((hash << 5) - hash) + hash = char.charCodeAt(0) + hash * 0x1f } - return (hash & 0x00ffffff).toString(16) + return (hash % 0xffffff).toString(16).padStart(6, '0') } const luminance = (color) =>