import{n as e}from"./rolldown-runtime-DAXXjFlN.js";import{$n as t,Ar as n,Cr as r,Dn as i,En as a,Fn as o,Fr as s,Kn as c,Lt as l,Mn as u,Nn as d,Nr as f,On as p,Pn as m,R as h,Rn as g,Rr as _,Rt as v,Sr as y,Vn as b,Wr as x,Xn as S,Yn as C,ar as w,cr as T,dn as E,er as D,gr as O,hn as ee,hr as k,ir as A,jn as j,mn as M,nr as N,or as P,rr as F,sr as te,ur as I,vr as L,wn as R,xn as z,xr as B,yr as V,z as H,zn as U}from"./vendor-6bGPahzI.js";import{M as ne,a as re,d as W,g as ie,i as G,j as ae,r as oe,u as se,v as ce}from"./vendor-vue-DqH63YZy.js";import{At as le,E as ue,Et as de,Ft as fe,Ht as pe,It as me,Lt as he,Mt as ge,Nt as _e,Pt as ve,Rt as ye,S as be,T as xe,Tt as Se,Ut as Ce,Vt as K,Wt as we,X as Te,Y as Ee,a as De,at as Oe,c as ke,ct as Ae,d as je,dt as Me,f as Ne,ft as Pe,g as Fe,h as Ie,i as Le,it as Re,jt as ze,kt as Be,l as Ve,lt as He,n as Ue,nt as We,ot as Ge,p as Ke,r as qe,rt as Je,st as Ye,tt as Xe,u as Ze,ut as Qe,x as $e}from"./vendor-quasar-Bl8FKFQs.js";import{$a as et,$n as tt,Cr as nt,Da as q,Di as rt,Ei as it,Fi as at,Fn as ot,Ha as st,In as ct,Ki as J,Li as lt,Mt as ut,Na as dt,Nt as Y,O as ft,Oa as X,Pa as pt,Pt as Z,Qn as mt,Ti as ht,Ua as gt,Va as _t,_r as vt,ar as yt,ci as bt,cr as xt,eo as St,er as Ct,fr as Q,g as wt,h as Tt,hn as Et,hr as Dt,ir as Ot,jt as kt,k as At,ki as jt,kr as Mt,li as Nt,nr as Pt,or as Ft,pn as It,qi as Lt,qt as Rt,tr as zt,ur as $,wn as Bt,wr as Vt,xr as Ht,zi as Ut,zr as Wt}from"./ws-BfVPV0ME.js";import{a as Gt,c as Kt,d as qt,g as Jt,m as Yt,u as Xt}from"./client-api-DGgiwyPh.js";import{a as Zt,o as Qt}from"./useNotifications-DKQR3Y1H.js";import{a as $t,i as en}from"./uiLogic-CQLv0k29.js";import{c as tn,f as nn,l as rn,p as an}from"./index-BfA-u3L9.js";import{n as on,t as sn}from"./LyricsComposable-DUCF-VtM.js";import{$n as cn,A as ln,Jn as un,Kn as dn,Qn as fn,Qt as pn,U as mn,W as hn,Yn as gn,b as _n,bn as vn,ct as yn,et as bn,fn as xn,fr as Sn,j as Cn,k as wn,n as Tn,nn as En,nt as Dn,pn as On,pr as kn,q as An,qn as jn,st as Mn,t as Nn,tn as Pn,x as Fn,yn as In}from"./auth-WD4QDKIv.js";import{a as Ln,r as Rn}from"./useLyricPrecisionTick-Cuc-PWwe.js";import{n as zn,t as Bn}from"./vLyricProgress-CszW8Tta.js";import{a as Vn,n as Hn}from"./src-DXAM5xrS.js";import{a as Un,c as Wn,d as Gn,f as Kn,h as qn,i as Jn,l as Yn,m as Xn,o as Zn,p as Qn,r as $n,s as er,t as tr,u as nr}from"./AMQueue-Y-MBawbu.js";import{n as rr,t as ir}from"./party-store-CwCL_55f.js";import{r as ar,t as or}from"./useScrollPerfMode-rSY4bytT.js";import{r as sr,t as cr}from"./AMSidebar-uSgVZ9_3.js";import{n as lr,t as ur}from"./MoreBtn-Ce1x55q0.js";import{S as dr,_ as fr,b as pr,d as mr,f as hr,l as gr,m as _r,n as vr,p as yr,t as br,u as xr,v as Sr,x as Cr,y as wr}from"./AMPlaybackActions-DE3IQYo9.js";import{d as Tr,f as Er,n as Dr,t as Or}from"./PlaybackSpeedButton-BQ_cdbJF.js";import{n as kr,t as Ar}from"./AMProgressWidget-BnNUgeKq.js";import{i as jr,n as Mr,r as Nr,t as Pr}from"./QueueButton-BwAUAUXa.js";import{a as Fr,n as Ir,o as Lr,t as Rr}from"./AMTime-HID728jd.js";import{a as zr,c as Br,i as Vr,l as Hr,r as Ur,t as Wr}from"./LCDPlayerGlass-Dqi7i3bE.js";import{n as Gr,t as Kr}from"./MainMenuButton-COBoACPc.js";import{n as qr,t as Jr}from"./AMPLCD-C4iMq0Av.js";import{A as Yr,D as Xr,E as Zr,O as Qr,a as $r,i as ei,j as ti,k as ni,n as ri,r as ii,t as ai}from"./RightDrawerContent-DCmacvyC.js";import{n as oi,t as si}from"./LiquidGlassSurfaceMod-DgZ_jOwt.js";var ci,li=e((()=>{E(),Yn(),ci=b({__name:`ImmersiveLyricView`,props:{lyricArc:{type:Boolean}},emits:[`has-lyrics`,`no-lyrics-found`,`instrumental`],setup(e,{emit:t}){let n=t;return(t,r)=>(w(),d(Wn,{"show-no-lyrics-found-text":!1,onNoLyricsFound:r[0]||=e=>n(`no-lyrics-found`),onHasLyrics:r[1]||=e=>n(`has-lyrics`),onInstrumental:r[2]||=e=>n(`instrumental`),"is-immersive":``,"lyric-arc":e.lyricArc},null,8,[`lyric-arc`]))}})})),ui,di=e((()=>{li(),li(),ui=ci})),fi,pi=e((()=>{fi=`struct Globals {
  iResolution: vec2f,
  _pad0: vec2f,
};

@group(0) @binding(0) var<uniform> globals: Globals;
@group(0) @binding(1) var iChannel0: texture_2d<f32>;
@group(0) @binding(2) var iChannel0Sampler: sampler;

fn FsrEasuCF(p: vec2f) -> vec3f {
  return textureSample(iChannel0, iChannel0Sampler, p).rgb;
}

fn FsrEasuCon(
  con0: ptr<function, vec4f>,
  con1: ptr<function, vec4f>,
  con2: ptr<function, vec4f>,
  con3: ptr<function, vec4f>,
  inputViewportInPixels: vec2f,
  inputSizeInPixels: vec2f,
  outputSizeInPixels: vec2f,
) {
  *con0 = vec4f(
    inputViewportInPixels.x / outputSizeInPixels.x,
    inputViewportInPixels.y / outputSizeInPixels.y,
    0.5 * inputViewportInPixels.x / outputSizeInPixels.x - 0.5,
    0.5 * inputViewportInPixels.y / outputSizeInPixels.y - 0.5,
  );
  *con1 = vec4f(1.0, 1.0, 1.0, -1.0) / inputSizeInPixels.xyxy;
  *con2 = vec4f(-1.0, 2.0, 1.0, 2.0) / inputSizeInPixels.xyxy;
  *con3 = vec4f(0.0, 4.0, 0.0, 0.0) / inputSizeInPixels.xyxy;
}

fn FsrEasuTapF(
  aC: ptr<function, vec3f>,
  aW: ptr<function, f32>,
  off: vec2f,
  dir: vec2f,
  len: vec2f,
  lob: f32,
  clp: f32,
  c: vec3f,
) {
  var v = vec2f(dot(off, dir), dot(off, vec2f(-dir.y, dir.x)));
  v *= len;
  let d2 = min(dot(v, v), clp);

  var wB = 0.4 * d2 - 1.0;
  var wA = lob * d2 - 1.0;
  wB *= wB;
  wA *= wA;
  wB = 1.5625 * wB - 0.5625;
  let w = wB * wA;

  *aC += c * w;
  *aW += w;
}

fn FsrEasuSetF(
  dir: ptr<function, vec2f>,
  len: ptr<function, f32>,
  w: f32,
  lA: f32,
  lB: f32,
  lC: f32,
  lD: f32,
  lE: f32,
) {
  let lenXBase = max(abs(lD - lC), abs(lC - lB));
  let dirX = lD - lB;
  (*dir).x += dirX * w;
  var lenX = clamp(abs(dirX) / lenXBase, 0.0, 1.0);
  lenX *= lenX;
  *len += lenX * w;

  let lenYBase = max(abs(lE - lC), abs(lC - lA));
  let dirY = lE - lA;
  (*dir).y += dirY * w;
  var lenY = clamp(abs(dirY) / lenYBase, 0.0, 1.0);
  lenY *= lenY;
  *len += lenY * w;
}

fn FsrEasuF(
  ip: vec2f,
  con0: vec4f,
  con1: vec4f,
  con2: vec4f,
  con3: vec4f,
) -> vec3f {
  var pp = ip * con0.xy + con0.zw;
  let fp = floor(pp);
  pp -= fp;

  let p0 = fp * con1.xy + con1.zw;
  let p1 = p0 + con2.xy;
  let p2 = p0 + con2.zw;
  let p3 = p0 + con3.xy;

  let off = vec4f(-0.5, 0.5, -0.5, 0.5) * con1.xxyy;

  let bC = FsrEasuCF(p0 + off.xw);
  let bL = bC.g + 0.5 * (bC.r + bC.b);
  let cC = FsrEasuCF(p0 + off.yw);
  let cL = cC.g + 0.5 * (cC.r + cC.b);
  let iC = FsrEasuCF(p1 + off.xw);
  let iL = iC.g + 0.5 * (iC.r + iC.b);
  let jC = FsrEasuCF(p1 + off.yw);
  let jL = jC.g + 0.5 * (jC.r + jC.b);
  let fC = FsrEasuCF(p1 + off.yz);
  let fL = fC.g + 0.5 * (fC.r + fC.b);
  let eC = FsrEasuCF(p1 + off.xz);
  let eL = eC.g + 0.5 * (eC.r + eC.b);
  let kC = FsrEasuCF(p2 + off.xw);
  let kL = kC.g + 0.5 * (kC.r + kC.b);
  let lC = FsrEasuCF(p2 + off.yw);
  let lL = lC.g + 0.5 * (lC.r + lC.b);
  let hC = FsrEasuCF(p2 + off.yz);
  let hL = hC.g + 0.5 * (hC.r + hC.b);
  let gC = FsrEasuCF(p2 + off.xz);
  let gL = gC.g + 0.5 * (gC.r + gC.b);
  let oC = FsrEasuCF(p3 + off.yz);
  let oL = oC.g + 0.5 * (oC.r + oC.b);
  let nC = FsrEasuCF(p3 + off.xz);
  let nL = nC.g + 0.5 * (nC.r + nC.b);

  var dir = vec2f(0.0, 0.0);
  var len = 0.0;

  FsrEasuSetF(&dir, &len, (1.0 - pp.x) * (1.0 - pp.y), bL, eL, fL, gL, jL);
  FsrEasuSetF(&dir, &len, pp.x * (1.0 - pp.y), cL, fL, gL, hL, kL);
  FsrEasuSetF(&dir, &len, (1.0 - pp.x) * pp.y, fL, iL, jL, kL, nL);
  FsrEasuSetF(&dir, &len, pp.x * pp.y, gL, jL, kL, lL, oL);

  var dirR = dot(dir, dir);
  let zro = dirR < (1.0 / 32768.0);
  if (zro) {
    dirR = 1.0;
    dir = vec2f(1.0, 0.0);
  } else {
    dirR = inverseSqrt(dirR);
    dir *= dirR;
  }

  len *= 0.5;
  len *= len;

  let stretch = dot(dir, dir) / max(abs(dir.x), abs(dir.y));
  let len2 = vec2f(1.0 + (stretch - 1.0) * len, 1.0 - 0.5 * len);
  let lob = 0.5 - 0.29 * len;
  let clp = 1.0 / lob;

  let min4 = min(min(fC, gC), min(jC, kC));
  let max4 = max(max(fC, gC), max(jC, kC));

  var aC = vec3f(0.0, 0.0, 0.0);
  var aW = 0.0;

  FsrEasuTapF(&aC, &aW, vec2f(0.0, -1.0) - pp, dir, len2, lob, clp, bC);
  FsrEasuTapF(&aC, &aW, vec2f(1.0, -1.0) - pp, dir, len2, lob, clp, cC);
  FsrEasuTapF(&aC, &aW, vec2f(-1.0, 1.0) - pp, dir, len2, lob, clp, iC);
  FsrEasuTapF(&aC, &aW, vec2f(0.0, 1.0) - pp, dir, len2, lob, clp, jC);
  FsrEasuTapF(&aC, &aW, vec2f(0.0, 0.0) - pp, dir, len2, lob, clp, fC);
  FsrEasuTapF(&aC, &aW, vec2f(-1.0, 0.0) - pp, dir, len2, lob, clp, eC);
  FsrEasuTapF(&aC, &aW, vec2f(1.0, 1.0) - pp, dir, len2, lob, clp, kC);
  FsrEasuTapF(&aC, &aW, vec2f(2.0, 1.0) - pp, dir, len2, lob, clp, lC);
  FsrEasuTapF(&aC, &aW, vec2f(2.0, 0.0) - pp, dir, len2, lob, clp, hC);
  FsrEasuTapF(&aC, &aW, vec2f(1.0, 0.0) - pp, dir, len2, lob, clp, gC);
  FsrEasuTapF(&aC, &aW, vec2f(1.0, 2.0) - pp, dir, len2, lob, clp, oC);
  FsrEasuTapF(&aC, &aW, vec2f(0.0, 2.0) - pp, dir, len2, lob, clp, nC);

  return min(max4, max(min4, aC / aW));
}

struct FragmentInput {
  @builtin(position) fragCoord: vec4f,
};

struct FragmentOutput {
  @location(0) color: vec4f,
};

@fragment
fn main(input: FragmentInput) -> FragmentOutput {
  var con0 = vec4f(0.0);
  var con1 = vec4f(0.0);
  var con2 = vec4f(0.0);
  var con3 = vec4f(0.0);

  let dims = textureDimensions(iChannel0);
  let renderSize = vec2f(f32(dims.x), f32(dims.y));

  FsrEasuCon(&con0, &con1, &con2, &con3, renderSize, renderSize, globals.iResolution);

  let c = FsrEasuF(input.fragCoord.xy, con0, con1, con2, con3);

  var output: FragmentOutput;
  output.color = vec4f(c, 1.0);
  return output;
}
`})),mi,hi=e((()=>{mi=`const FSR_RCAS_LIMIT: f32 = 0.25 - (1.0 / 16.0);

struct Globals {
  iResolution: vec2f,
  sharpness: f32,
  _pad0: f32,
};

@group(0) @binding(0) var<uniform> globals: Globals;
@group(0) @binding(1) var iChannel0: texture_2d<f32>;
@group(0) @binding(2) var iChannel0Sampler: sampler;

fn FsrRcasLoadF(p: vec2f) -> vec4f {
  return textureSample(iChannel0, iChannel0Sampler, p / globals.iResolution.xy);
}

fn FsrRcasCon(sharpness: f32) -> f32 {
  return exp2(-sharpness);
}

fn FsrRcasF(ip: vec2f, con: f32) -> vec3f {
  let sp = vec2f(ip);
  let b = FsrRcasLoadF(sp + vec2f(0.0, -1.0)).rgb;
  let d = FsrRcasLoadF(sp + vec2f(-1.0, 0.0)).rgb;
  let e = FsrRcasLoadF(sp).rgb;
  let f = FsrRcasLoadF(sp + vec2f(1.0, 0.0)).rgb;
  let h = FsrRcasLoadF(sp + vec2f(0.0, 1.0)).rgb;

  let bL = b.g + 0.5 * (b.b + b.r);
  let dL = d.g + 0.5 * (d.b + d.r);
  let eL = e.g + 0.5 * (e.b + e.r);
  let fL = f.g + 0.5 * (f.b + f.r);
  let hL = h.g + 0.5 * (h.b + h.r);

  let mn4 = min(b, min(f, h));
  let mx4 = max(b, max(f, h));

  let peakC = vec2f(1.0, -4.0);
  let hitMin = mn4 / (4.0 * mx4);
  let hitMax = (peakC.x - mx4) / (4.0 * mn4 + peakC.y);
  let lobeRGB = max(-hitMin, hitMax);

  var lobe = max(
    -FSR_RCAS_LIMIT,
    min(max(lobeRGB.r, max(lobeRGB.g, lobeRGB.b)), 0.0),
  ) * con;

  return (lobe * (b + d + h + f) + e) / (4.0 * lobe + 1.0);
}

struct FragmentInput {
  @builtin(position) fragCoord: vec4f,
};

struct FragmentOutput {
  @location(0) color: vec4f,
};

@fragment
fn main(input: FragmentInput) -> FragmentOutput {
  let con = FsrRcasCon(globals.sharpness);
  let col = FsrRcasF(input.fragCoord.xy, con);

  var output: FragmentOutput;
  output.color = vec4f(col, 1.0);
  return output;
}
`})),gi,_i=e((()=>{gi=`struct VertexInput {
  @location(0) position: vec3f,
  @location(1) uv: vec2f,
};

struct VertexOutput {
  @builtin(position) position: vec4f,
  @location(0) vUv: vec2f,
};

@vertex
fn main(input: VertexInput) -> VertexOutput {
  var output: VertexOutput;
  output.vUv = input.uv;
  output.position = vec4f(input.position, 1.0);
  return output;
}
`}));function vi(){let e=navigator;return!!e?.gpu&&typeof e.gpu.requestAdapter==`function`}async function yi(){if(Ei)return Ei;let e=navigator;return Ei=(async()=>{let t=await e.gpu.requestAdapter();if(!t)throw Error(`No WebGPU adapter is available.`);let n=await t.requestDevice();return n?.lost?.then?.(()=>{Ei=null}),n})(),Ei.catch(()=>{Ei=null}),Ei}function bi(e){return Number.isFinite(e)?Math.max(0,Math.min(1,e)):.5}function xi(e){return 2*(1-bi(e))}async function Si(e,t={}){let n=navigator;if(!n?.gpu)throw Error(`WebGPU is not available in this browser.`);let r=t.device??await yi(),i=e.getContext(`webgpu`);if(!i)throw Error(`Failed to create WebGPU context for FSR upscale.`);let a=n.gpu.getPreferredCanvasFormat(),o=`rgba8unorm`,s=bi(t.sharpness??.5),c=!1,l=null,u=null,d=null,f=null,p=null,m=r.createSampler({magFilter:`linear`,minFilter:`linear`,addressModeU:`clamp-to-edge`,addressModeV:`clamp-to-edge`}),h=r.createBuffer({size:Ti.byteLength,usage:(wi?.VERTEX??32)|(wi?.COPY_DST??8)});r.queue.writeBuffer(h,0,Ti);let g=r.createBuffer({size:16,usage:(wi?.UNIFORM??64)|(wi?.COPY_DST??8)}),_=r.createBuffer({size:16,usage:(wi?.UNIFORM??64)|(wi?.COPY_DST??8)}),v={module:r.createShaderModule({code:gi}),entryPoint:`main`,buffers:[{arrayStride:20,attributes:[{shaderLocation:0,offset:0,format:`float32x3`},{shaderLocation:1,offset:12,format:`float32x2`}]}]},y=r.createRenderPipeline({layout:`auto`,vertex:v,fragment:{module:r.createShaderModule({code:fi}),entryPoint:`main`,targets:[{format:o}]},primitive:{topology:`triangle-list`}}),b=r.createRenderPipeline({layout:`auto`,vertex:v,fragment:{module:r.createShaderModule({code:mi}),entryPoint:`main`,targets:[{format:a}]},primitive:{topology:`triangle-list`}});function x(){i.configure({device:r,format:a,alphaMode:`premultiplied`})}function S(){return{w:Math.max(1,e.width),h:Math.max(1,e.height)}}function C(){let{w:e,h:t}=S();u?.destroy(),u=r.createTexture({size:[e,t],format:o,usage:(Ci?.TEXTURE_BINDING??4)|(Ci?.RENDER_ATTACHMENT??16)}),d=u.createView(),p=r.createBindGroup({layout:b.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:_}},{binding:1,resource:d},{binding:2,resource:m}]}),l&&(f=r.createBindGroup({layout:y.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:g}},{binding:1,resource:l.createView()},{binding:2,resource:m}]}))}async function w(e){if(c)return;let t=0,n=0;if(e instanceof HTMLImageElement?((!e.complete||e.naturalWidth===0)&&await new Promise((t,n)=>{e.onload=()=>t(),e.onerror=()=>n(Error(`Failed to decode source image for FSR upscale.`))}),t=e.naturalWidth,n=e.naturalHeight):(e instanceof HTMLCanvasElement,t=e.width,n=e.height),t<=0||n<=0)throw Error(`Source image has zero dimensions.`);l?.destroy(),l=r.createTexture({size:[t,n],format:o,usage:(Ci?.TEXTURE_BINDING??4)|(Ci?.COPY_DST??2)|(Ci?.RENDER_ATTACHMENT??16)}),r.queue.copyExternalImageToTexture({source:e},{texture:l},[t,n]),u&&(f=r.createBindGroup({layout:y.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:g}},{binding:1,resource:l.createView()},{binding:2,resource:m}]}))}function T(e){s=bi(e)}function E(){c||(x(),C())}function D(){let{w:e,h:t}=S();r.queue.writeBuffer(g,0,new Float32Array([e,t,0,0])),r.queue.writeBuffer(_,0,new Float32Array([e,t,xi(s),0]))}function O(){if(c||!l||!u||!f||!p)return;D();let e=r.createCommandEncoder(),t=e.beginRenderPass({colorAttachments:[{view:d,clearValue:{r:0,g:0,b:0,a:1},loadOp:`clear`,storeOp:`store`}]});t.setPipeline(y),t.setBindGroup(0,f),t.setVertexBuffer(0,h),t.draw(6),t.end();let n=e.beginRenderPass({colorAttachments:[{view:i.getCurrentTexture().createView(),clearValue:{r:0,g:0,b:0,a:1},loadOp:`clear`,storeOp:`store`}]});n.setPipeline(b),n.setBindGroup(0,p),n.setVertexBuffer(0,h),n.draw(6),n.end(),r.queue.submit([e.finish()])}function ee(){if(!c){c=!0,l?.destroy(),u?.destroy(),h?.destroy(),g?.destroy(),_?.destroy(),l=null,u=null,d=null,f=null,p=null;try{i.unconfigure()}catch{}}}return x(),C(),{setSource:w,setSharpness:T,resize:E,render:O,dispose:ee,hasSource:()=>!!l}}var Ci,wi,Ti,Ei,Di=e((()=>{pi(),hi(),_i(),Ci=globalThis.GPUTextureUsage,wi=globalThis.GPUBufferUsage,Ti=new Float32Array([-1,-1,0,0,1,1,-1,0,1,1,1,1,0,1,0,-1,-1,0,0,1,1,1,0,1,0,-1,1,0,0,0]),Ei=null})),Oi,ki=e((()=>{E(),At(),Di(),un(),Bt(),Oi=b({__name:`ImmersiveArtworkFSR`,props:{artworkUrl:{},placeholderUrl:{default:null},sharpness:{default:.5},bgColor:{default:null},sourceAspect:{default:void 0},objectFit:{default:`cover`}},emits:[`fallback`,`loaded`],setup(e,{emit:t}){let n=e,r=t,i=s(),a=s(),c=s(),l=_(null),d=s(!1),f=s(!1),p=s(!1),m=s(!1),h,g=j(()=>!!n.placeholderUrl),v=gn(),b=null,x=null,S=0,C=!1,T=null;function E(e,t){return T||=document.createElement(`canvas`),T.width=Math.max(1,e),T.height=Math.max(1,t),T}function D(){T&&(T.width=0,T.height=0)}let ee=j(()=>{let e={"--bgColor":n.bgColor?`#${n.bgColor}`:`transparent`};return n.placeholderUrl&&!d.value&&(e.backgroundImage=`url("${n.placeholderUrl}")`,e.backgroundSize=`cover`,e.backgroundPosition=`center`),e});function k(){let e=a.value,t=i.value;if(!e||!t)return!1;let n=Math.min(2.5,Math.max(1,window.devicePixelRatio||1)),r=Math.max(1,Math.round(t.clientWidth*n)),o=Math.max(1,Math.round(t.clientHeight*n));return e.width!==r||e.height!==o?(e.width=r,e.height=o,!0):!1}function A(){let e=n.sourceAspect;if(e&&Number.isFinite(e)&&e>0)return e;let t=a.value;return!t||t.width<=0||t.height<=0?null:t.width/t.height}function M(e){let t=A();if(!t)return e;let r=e.width,i=e.height;if(r<=0||i<=0)return e;let a=r/i;if(Math.abs(a-t)/t<.005)return e;if(n.objectFit===`contain`){let n,o;a>t?(n=r,o=Math.round(r/t)):(o=i,n=Math.round(i*t));let s=E(n,o),c=s.getContext(`2d`);if(!c)return e;let l=Math.round((n-r)/2),u=Math.round((o-i)/2);return c.drawImage(e,l,u,r,i),s}let o=0,s=0,c=r,l=i;a>t?(c=Math.round(i*t),o=Math.round((r-c)/2)):(l=Math.round(r/t),s=Math.round((i-l)/2));let u=E(c,l),d=u.getContext(`2d`);return d?(d.drawImage(e,o,s,c,l,0,0,c,l),u):e}async function P(e){try{let t=await ft({url:e,variant:`hero`}),n=t?.imageHero??t?.image;if(n)return await createImageBitmap(n)}catch(e){console.warn(`[FSR] cache fetch failed, falling through to direct fetch`,e)}try{let t=e.includes(`{w}`)||e.includes(`%7Bw%7D`)?It(e,2400,2400,`ss`,`jpg`):e,n=await fetch(t,{credentials:`omit`});if(!n.ok)return null;let r=await n.blob();return await createImageBitmap(r)}catch(e){return console.warn(`[FSR] direct fetch failed`,e),null}}function te(){let e=a.value,t=c.value;if(!e||!t||!d.value||e.width===0||e.height===0)return!1;try{(t.width!==e.width||t.height!==e.height)&&(t.width=e.width,t.height=e.height);let n=t.getContext(`2d`);return n?(n.clearRect(0,0,t.width,t.height),n.drawImage(e,0,0),!0):!1}catch{return!1}}function I(e){te()?(p.value=!1,m.value=!0,f.value=!0):d.value=!1,z(e)}function L(){f.value&&(p.value=!0,requestAnimationFrame(()=>{requestAnimationFrame(()=>{f.value=!1})}),h&&clearTimeout(h),h=setTimeout(()=>{m.value=!1,h=void 0;let e=c.value;e&&(e.width=0,e.height=0)},650))}async function z(e){if(!l.value){console.warn(`[FSR] loadAndRender called before upscaler ready`);return}let t=++S,n=await P(e);if(C||t!==S){n?.close();return}if(!n){console.warn(`[FSR] no bitmap for url, falling back`,e),r(`fallback`,`load-failed`);return}try{k();let e=M(n);if(await l.value.setSource(e),C||t!==S){n.close();return}l.value.resize(),l.value.render(),d.value=!0,L();let i=e.width,o=e.height;console.info(`[FSR] rendered ${i}x${o} (src ${n.width}x${n.height}) -> ${a.value?.width}x${a.value?.height}`),r(`loaded`)}catch(e){console.error(`[FSR] setSource/render failed`,e),r(`fallback`,`render-failed`)}finally{D(),x?.close(),x=n}}return O(()=>n.artworkUrl,e=>{e&&I(e)}),O(()=>n.sharpness,e=>{l.value&&(l.value.setSharpness(e),l.value.hasSource()&&l.value.render())}),O(()=>v.fsrRenderEpoch,()=>{!l.value||!n.artworkUrl||I(n.artworkUrl)}),N(async()=>{if(!(!a.value||!i.value)){k();try{l.value=await Si(a.value,{sharpness:n.sharpness})}catch(e){console.warn(`[FSR] init failed, requesting fallback`,e),r(`fallback`,`init-failed`);return}if(C){l.value.dispose(),l.value=null;return}b=new ResizeObserver(()=>{l.value&&k()&&(l.value.resize(),x?(async()=>{try{if(!l.value)return;let e=M(x);await l.value.setSource(e),l.value.render()}catch(e){console.warn(`[FSR] resize re-crop failed`,e)}finally{D()}})():l.value.hasSource()&&l.value.render())}),b.observe(i.value),n.artworkUrl&&z(n.artworkUrl)}}),F(()=>{C=!0,h&&=(clearTimeout(h),void 0),b?.disconnect(),b=null,l.value?.dispose(),l.value=null,x?.close(),x=null,D(),T=null}),(e,t)=>(w(),o(`div`,{ref_key:`wrapper`,ref:i,class:B([`immersive-artwork-fsr`,{rendered:d.value,swapping:f.value,"fade-active":p.value||!g.value}]),style:y(ee.value)},[V(u(`canvas`,{ref_key:`snapshotCanvas`,ref:c,class:`fsr-snapshot`},null,512),[[R,m.value]]),u(`canvas`,{ref_key:`canvas`,ref:a,class:`fsr-canvas`},null,512)],6))}})})),Ai=e((()=>{})),ji,Mi=e((()=>{ki(),ki(),Ai(),X(),ji=q(Oi,[[`__scopeId`,`data-v-5660e3ef`]])}));function Ni(e,t){let n=[t.value?.attributes?.releaseDate,e.player.nowPlayingItem?.attributes?.releaseDate,e.player.nowPlayingItem?.releaseDate];for(let e of n){if(!e)continue;let t=parseInt(String(e).slice(0,4),10);if(Number.isFinite(t))return t}return null}function Pi(e={}){let t=it(),n=En(),r=s(!1),i=j(()=>{let e=t.nowPlayingArtwork;if(e?.url)return e.url.includes(`{w}`)||e.url.includes(`%7Bw%7D`)?e.url:Et(e,3e3,3e3,`ss`)});O(i,()=>{r.value=!1});let a=j(()=>{let e=Y(`visual.immersive.fsrUpscale.sharpness`);return typeof e==`number`?e:.5});return{useFsr:j(()=>{if(r.value||!Y(`visual.immersive.fsrUpscale.enabled`))return!1;if(!vi())return console.info(`[FSR] WebGPU not available, skipping`),!1;if(e.animatedArtworkVideoUrl?.value||!i.value)return!1;if(Y(`visual.immersive.fsrUpscale.forceAlways`))return console.info(`[FSR] activated (forceAlways)`),!0;let a=Ni(t,n),o=Y(`visual.immersive.fsrUpscale.thresholdYear`)??2010;if(a===null)return console.info(`[FSR] no release date for current track; enable "Apply to All Tracks" to upscale anyway`),!1;let s=a<o;return s&&console.info(`[FSR] activated (release year ${a} < threshold ${o})`),s}),fsrSharpness:a,fsrArtworkUrl:i,fsrFallback:r,handleFallback:()=>{r.value=!0}}}var Fi=e((()=>{Z(),Di(),Pn(),ht(),Bt(),E()})),Ii,Li,Ri,zi,Bi,Vi,Hi,Ui,Wi,Gi,Ki,qi,Ji,Yi,Xi,Zi=e((()=>{pe(),Pe(),Qe(),Ae(),Ge(),ue(),We(),E(),Z(),qn(),Qn(),Rn(),Bn(),fn(),ht(),Gn(),sn(),Ii={key:0,class:`loading-symbol-container`},Li={class:`loading-symbol`},Ri=[`lrc-count`,`data-lyric-slot`,`util-lyric-index`,`util-mod-2`],zi={key:0,class:`lyric-line-item`},Bi={key:0,class:`one-word`},Vi={key:1,class:`lyrics-credits`},Hi={key:0},Ui={class:`q-pt-md`},Wi={key:1},Gi={key:1,class:`text-center q-pt-xl text-h2 text-bold`},Ki=50,qi=.5,Ji=4,Yi=1,Xi=b({__name:`LyricViewFocus`,props:{offsetY:{default:128},noSingLyrics:{type:Boolean,default:!1},simpleLyricStyle:{type:Boolean,default:!1},isImmersive:{type:Boolean,default:!1},zoomScale:{default:1},showNoLyricsFoundText:{type:Boolean,default:!0},type:{default:`lyrics`}},emits:[`has-lyrics`,`no-lyrics-found`,`has-active-line`],setup(e,{emit:t}){let n=t,a=s(!0),l=it(),{isHidden:f}=cn(c(`windowContext`,null)??void 0),{sourceInfo:p,getLyrics:h,hasLyrics:v,lyricsList:b,songWriters:S,userLyricsVariations:C,selectedVariationIndex:T,selectUserLyricsVariation:E,hasMultipleVariations:D}=on({props:e});O(v,e=>{if(e){n(`has-lyrics`);return}console.log(`no lyrics`),n(`no-lyrics-found`)});let k=s(),{getCurrentTime:A,currentTimeSlowRef:P,subscribeFrameTick:I}=Ln(),R=0,z=j(()=>(f.value||(R=P.value-(window.airplayActive?2.25:0)-Y(`lyrics.timeOffset`)),R)),H=_(0),ne=0,re=j(()=>l.player.nowPlayingItem),W=_([]);function ie(){return(window.airplayActive?2.25:0)+Y(`lyrics.timeOffset`)}let G=null;function ae(e,t,n){return{...e,lineEnd:e.end,end:t,slot:n}}function oe(e){let t=-1;for(let n of e)n>t&&(t=n);let n=t+1;if(n<Ji)return n;for(let t=0;t<Ji;t++)if(!e.has(t))return t;return Ji-1}function se(e){let t=b.value;if(!t.length)return G=null,[];let n=[];for(let r=0;r<t.length;r++){let i=t[r];e>=i.start&&e<=i.end&&n.push(i)}if(!G){if(n.length===0)return[];n.sort((e,t)=>e.start-t.start);let e=n[n.length-1].end;return G={members:n.map((t,n)=>ae(t,e,n%Ji)),groupEnd:e},G.members}let r=[];for(let t of G.members)e<=(t.lineEnd??t.end)+qi&&r.push(t);let i=new Set(r.map(e=>e.index)),a=[];for(let e=0;e<n.length;e++){let t=n[e];i.has(t.index)||a.push(t)}if(r.length===0&&a.length===0)return G=null,[];if(a.length===0&&r.length===G.members.length)return G.members;let o=0;for(let e of r){let t=e.lineEnd??e.end;t>o&&(o=t)}for(let e of a)e.end>o&&(o=e.end);let s=new Set(ue.value);for(let e of r)typeof e.slot==`number`&&s.add(e.slot);let c=[];for(let e of r)c.push(e);for(let e of a){let t=oe(s);s.add(t),c.push(ae(e,o,t))}return c.sort((e,t)=>e.start-t.start),G={members:c,groupEnd:o},G.members}function ce(){if(!G)return;let e=G.members;if(e.length===0)return;let t=!1;for(let n=0;n<e.length;n++){let r=e[n];r.slot!==n&&(e[n]={...r,slot:n},t=!0)}t&&(G={members:e.slice(),groupEnd:G.groupEnd},W.value=G.members)}let le=s(0),ue=s(new Set),de=j(()=>W.value.length+le.value);O(()=>de.value>0,e=>n(`has-active-line`,e));function fe(e){let t=e.dataset?.lyricSlot;if(t==null)return null;let n=Number(t);return Number.isFinite(n)?n:null}function pe(e){let t=fe(e);if(t===null)return;le.value+=1;let n=new Set(ue.value);n.add(t),ue.value=n}function me(e){let t=fe(e);if(t!==null){if(le.value=Math.max(0,le.value-1),ue.value.has(t)){let e=new Set(ue.value);e.delete(t),ue.value=e}ce()}}function he(e){let t=fe(e);if(t!==null&&(le.value=Math.max(0,le.value-1),ue.value.has(t))){let e=new Set(ue.value);e.delete(t),ue.value=e}}function ge(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n].index!==t[n].index)return!1;return!0}function _e(e){let t=se(e);t!==W.value&&(ge(W.value,t)||(W.value=t))}let ve=-1,ye=I(e=>{if(f.value)return;let t=e-ie(),n=performance.now();n-ne>=Ki&&(ne=n,H.value=t),ve!==-1&&Math.abs(t-ve)>Yi&&(G=null),ve=t,_e(t)});O(b,()=>{G=null,W.value=[],_e(A()-ie())});let be=j(()=>{let e=de.value;return e>=3?`25vh`:e>=2?`50vh`:`100vh`});O(re,e=>{Se(e)}),N(async()=>{await Se(re.value),_e(A()-ie())}),F(()=>{ye(),W.value=[],G=null});async function Se(e){if(!e?.attributes){v.value=!1,a.value=!1;return}try{await h(e),a.value=!1;let t=b.value.findIndex(e=>e.start<=z.value&&e.end>=z.value);t===-1&&(t=0),_e(A()-ie())}catch(e){console.log(e)}}function Ce(e,t){return!0}function we(e){return!0}return(e,t)=>(w(),d(ee,{class:`sing-focus-lyrics`,ref_key:`scrollArea`,ref:k,style:y({"--lyric-count":x(de)}),name:`lyric_fade`,tag:`div`,onBeforeLeave:pe,onAfterLeave:me,onLeaveCancelled:he},{default:L(()=>[x(a)?(w(),o(`div`,Ii,[u(`div`,Li,[U(K,{name:`svguse:cider-assets/cider-icons/icons.svg#big-lyrics`,class:`tab-icon`,size:`4em`})])])):(w(),o(i,{key:1},[x(v)?(w(!0),o(i,{key:0},te(x(W),e=>V((w(),o(`div`,{class:B([`lyric-line-container`,{"has-multiple-lyrics":x(de)>1,"position-0":(e.slot??0)===0,"position-1":(e.slot??0)===1,"position-2":(e.slot??0)===2,"position-3":(e.slot??0)===3}]),"lrc-count":x(de),"data-lyric-slot":e.slot??0,"util-lyric-index":e.index,"util-mod-2":e.index%2==0,style:y({height:x(be),"--height":x(be),"--lyric-duration":(e.lineEnd??e.end)-e.start+`s`,"--util-mod-2":e.index%2==0?1:-1}),key:e.index},[Ce(e.start,e.end)?(w(),o(`div`,zi,[(w(),d(nr,{active:Ce(e.start,e.end),"has-passed":we(e.start),lyric:e,key:e.index},{default:L(()=>[e.isCredit?(w(),o(`div`,Vi,[e.text==``?m(``,!0):(w(),o(`div`,Hi,[t[0]||=u(`b`,null,`Written by:`,-1),t[1]||=g(),t[2]||=u(`br`,null,null,-1),u(`span`,null,r(e.text),1)])),u(`div`,Ui,[t[3]||=u(`b`,null,`Sourced From:`,-1),t[4]||=g(),t[5]||=u(`br`,null,null,-1),x(p).provider===`User`&&x(D)()?(w(),d(xe,{key:0,flat:``,dense:``,"no-caps":``,label:x(p).contributorName||`User`,class:`variation-selector-focus`},{default:L(()=>[U(Oe,{dense:``},{default:L(()=>[(w(!0),o(i,null,te(x(C),(e,t)=>V((w(),d(Ye,{key:e.id,clickable:``,onClick:e=>x(E)(t),active:x(T)===t},{default:L(()=>[U(He,null,{default:L(()=>[U(Me,null,{default:L(()=>[g(r(e.contributorName||`Unknown`),1)]),_:2},1024),U(Me,{caption:``},{default:L(()=>[g(r(e.syncType)+` sync · `+r(e.language||`Unknown`),1)]),_:2},1024)]),_:2},1024),x(T)===t?(w(),d(He,{key:0,side:``},{default:L(()=>[U(K,{name:`check`,color:`primary`})]),_:1})):m(``,!0)]),_:2},1032,[`onClick`,`active`])),[[Xe]])),128))]),_:1})]),_:1},8,[`label`])):(w(),o(`span`,Wi,r(x(p).provider===`User`&&x(p).contributorName?x(p).contributorName:x(p).provider.charAt(0).toUpperCase()+x(p).provider.slice(1)),1))])])):(w(),o(i,{key:0},[(e.words?.length??0)>0?(w(!0),o(i,{key:0},te(e.words,(e,t)=>(w(),o(i,{key:t},[(e.words?.length??0)>0&&!e.isBackground?(w(),o(`div`,Bi,[(w(!0),o(i,null,te(e.words,(e,t)=>(w(),d(Kn,{key:t,word:e,active:Ce(e.start,e.end),"current-time":x(H)},null,8,[`word`,`active`,`current-time`]))),128))])):(w(),d(Kn,{key:1,word:e,active:Ce(e.start,e.end),"current-time":x(H),"force-fancy":``},null,8,[`word`,`active`,`current-time`]))],64))),128)):(w(),d(M,{key:1,name:`simple_shrink`},{default:L(()=>[e.empty&&Ce(e.start,e.end)?(w(),d(Xn,{key:0,start:e?.start,end:e?.end},null,8,[`start`,`end`])):(w(),o(i,{key:1},[g(r(e.text),1)],64))]),_:2},1024))],64))]),_:2},1032,[`active`,`has-passed`,`lyric`]))])):m(``,!0)],14,Ri)),[[x(zn),{start:e.start,end:e.lineEnd??e.end}]])),128)):(w(),o(`div`,Gi,` No lyrics found `))],64))]),_:1},8,[`style`]))}})})),Qi=e((()=>{})),$i,ea=e((()=>{Zi(),Zi(),Qi(),X(),$i=q(Xi,[[`__scopeId`,`data-v-7b556e4d`]])})),ta,na,ra=e((()=>{E(),Z(),ea(),Hr(),ht(),ta={class:`content-container`},na=b({__name:`SolariumLyricDisplay`,setup(e){z(e=>({ad1fc05e:x(i)}));let t=it(),n=Rt(),r=j(()=>t.artworkCSSColors),i=j(()=>`28px`),a=s(!1),c=e=>{a.value=e},l=()=>{n.components.ImmersiveSolarium.LyricsType=`full`};return(e,t)=>(w(),o(`div`,{class:B([`compact-lyrics`,{"is-inactive":!x(a)}])},[u(`div`,{class:`lg-wrapper`,style:y(x(r)),onClick:l},[U(Br,{interactive:!1,blur:6,"always-render":``},{default:L(()=>[t[0]||=u(`div`,{class:`lg-tint`},null,-1),u(`div`,ta,[U($i,{type:`single-line`,"is-immersive":``,"show-no-lyrics-found-text":!1,onHasActiveLine:c})])]),_:1})],4)],2))}})})),ia=e((()=>{})),aa,oa=e((()=>{ra(),ra(),ia(),X(),aa=q(na,[[`__scopeId`,`data-v-3ec5737a`]])})),sa,ca,la,ua=e((()=>{Re(),pe(),We(),E(),On(),Lt(),$(),gt(),ht(),Z(),sa={class:`flex flex-gap-1`},ca=70,la=b({__name:`SolariumLyricsButton`,setup(e){let n=Q(),r=it(),i=j(()=>r.artworkCSSColors),a=Rt(),o=j(()=>a.components.ImmersiveSolarium.LyricsType),c=s(),l=s(),f=j(()=>n.isRightDrawerView(`lyrics`)),p=j(()=>{if(i.value)return{...i.value,background:`color-mix(in srgb, var(--bgColor) 50%, transparent 50%)`,color:`var(--textColor1, white)`,transition:`background 0.3s ease, color 0.3s ease`,boxShadow:`inset 0 0 0 1px color-mix(in srgb, var(--textColor2) 20%, rgba(255, 255, 255, 0.1)), inset 0 2px 5px rgba(255, 255, 255, 0.22), inset 0 -2px 6px rgba(0, 0, 0, 0.35), inset 0 0 14px rgba(255, 255, 255, 0.08), 0 6px 6px rgba(0, 0, 0, 0.2), 0 0 20px rgba(0, 0, 0, 0.1)`,backdropFilter:`backdrop-filter: blur(10px)`,borderRadius:`50px`}}),m=null,h=null,g=null;function _(){g&&=(window.removeEventListener(`mousemove`,g),null),h=null}function v(){m&&(h=m.getBoundingClientRect(),l.value?.show(),!g&&(g=e=>{if(!h)return;let t=e.clientX-h.left,n=e.clientY-h.top;Math.sqrt(t*t+n*n)>ca&&(l.value?.hide(),_())},window.addEventListener(`mousemove`,g,{passive:!0})))}N(()=>{m=c.value?.$el??c.value,m?.addEventListener(`pointerenter`,v,{passive:!0})}),t(()=>{m?.removeEventListener(`pointerenter`,v),m=null,_()});let b=e=>{let t=o.value;if(a.components.ImmersiveSolarium.LyricsType=e,!n.rightDrawerOpen){n.invokeRightDrawerView(`lyrics`);return}if(n.rightDrawerOpen&&t==o.value){n.closeRightDrawerView();return}},S=e=>o.value===e&&n.isRightDrawerView(`lyrics`),C=()=>{n.invokeRightDrawerView(`lyrics`)};return(e,t)=>(w(),d(xn,{class:`lyrics-button`,active:x(f),title:x(_t)(`term.lyrics`),"native-title":``,onTouchstart:t[2]||=e=>x(l)?.show(),onClick:C,ref_key:`target`,ref:c},{menu:L(()=>[U(Je,{anchor:`top middle`,self:`bottom middle`,class:`solarium-menu`,ref_key:`menu`,ref:l,offset:[0,10],style:y(x(p))},{default:L(()=>[u(`div`,sa,[V((w(),d(xn,{title:x(_t)(`term.lyrics`),onClick:t[0]||=e=>b(`full`),class:B([{"bg-primary text-white":S(`full`)},`lyrics-popup-button`])},{default:L(()=>[U(J,{name:`full-lyrics`})]),_:1},8,[`title`,`class`])),[[Xe]]),V((w(),d(xn,{title:`Compact Lyrics`,onClick:t[1]||=e=>b(`compact`),class:B([{"bg-primary text-white":S(`compact`)},`lyrics-popup-button`])},{default:L(()=>[U(J,{name:`hud-lyrics`})]),_:1},8,[`class`])),[[Xe]])])]),_:1},8,[`style`])]),default:L(()=>[U(K,{name:`svguse:cider-assets/cider-icons/icons.svg#lyrics`,class:`tab-icon`,size:`20px`})]),_:1},8,[`active`,`title`]))}})})),da=e((()=>{})),fa,pa=e((()=>{ua(),ua(),da(),X(),fa=q(la,[[`__scopeId`,`data-v-97fc1b70`]])})),ma,ha,ga,_a=e((()=>{E(),Z(),On(),Hr(),Lt(),$(),ht(),Ur(),Mr(),oa(),pa(),ma={class:`solarium-container`},ha={class:`content-container`},ga=b({__name:`SolariumPlayer`,setup(e,{expose:t}){let n=it(),r=Rt(),i=Q(),a=j(()=>n.artworkCSSColors),l=c(`openBrowser`),f=s(),p=()=>{f.value&&f.value.animate([{transform:`translateY(0) scale(1)`},{transform:`translateY(-20px) scale(1.05) scaleY(1.2)`},{transform:`translateY(0) scale(1)`}],{duration:300,easing:`ease-out`})},h=()=>{f.value&&f.value.animate([{transform:`translateY(0) scale(1)`},{transform:`translateY(20px) scale(0.95) scaleY(0.8)`},{transform:`translateY(0) scale(1)`}],{duration:400,delay:160,easing:`cubic-bezier(0.175, 0.885, 0.32, 1.275)`})};return t({popupAnimation:p,popdownAnimation:h}),(e,t)=>(w(),o(`div`,ma,[U(M,{name:`compact_lyric_fade`,onBeforeEnter:p,onBeforeLeave:h},{default:L(()=>[x(r).components.ImmersiveSolarium.LyricsType==`compact`&&x(i).isRightDrawerView(`lyrics`)?(w(),d(aa,{key:0})):m(``,!0)]),_:1}),u(`div`,{class:`lg-wrapper`,style:y(x(a)),ref_key:`player_wrapper`,ref:f},[U(Br,{interactive:!1,blur:6,"always-render":``},{default:L(()=>[t[0]||=u(`div`,{class:`lg-tint`},null,-1),u(`div`,ha,[U(Wr,{"no-artwork":``,compact:``,"compact-volume":``,"flat-exempt":``},{end_before:L(()=>[U(Pr),U(fa),U(xn,{title:`Browser`,"native-title":``,onClick:x(l)},{default:L(()=>[U(J,{name:`browser`})]),_:1},8,[`onClick`])]),_:1})])]),_:1})],4)]))}})})),va=e((()=>{})),ya,ba=e((()=>{_a(),_a(),va(),X(),ya=q(ga,[[`__scopeId`,`data-v-202589df`]])})),xa,Sa=e((()=>{E(),Z(),rt(),xa=b({__name:`MojavePlayer`,props:{noArtwork:{type:Boolean}},setup(e){let t=jt(),n=Rt(),r=j(()=>{switch(n.components.MojaveLayouts.PlayerType){default:case`default`:return t.getComponent(`BottomPlayer`);case`glass`:case`glass-compact`:return t.getComponent(`BottomPlayerCompact`)}}),i=j(()=>n.components.MojaveLayouts.PlayerType==`glass-compact`);return F(()=>{console.log(`unmounting MojavePlayer`)}),(t,a)=>(w(),d(I(x(r)),{compact:x(i),"no-artwork":e.noArtwork,"player-type":x(n).components.MojaveLayouts.PlayerType},{end_before:L(()=>[T(t.$slots,`end_before`)]),end_after:L(()=>[T(t.$slots,`end_after`)]),_:3},8,[`compact`,`no-artwork`,`player-type`]))}})})),Ca,wa=e((()=>{Sa(),Sa(),Ca=xa})),Ta,Ea,Da,Oa,ka,Aa=e((()=>{Un(),pe(),E(),ti(),Ut(),Mt(),wn(),Tt(),gt(),jn(),Ta={class:`threed-artwork`},Ea={key:0,class:`queued-item-overlay`},Da={class:`threed-queue-item_info marquee-group`},Oa={class:`title`},ka=b({__name:`ThreeDQueueItem`,props:{item:{type:Object,required:!0},index:{type:Number,required:!0}},setup(e){let t=wt(),n=s(!1),i=e,a=j(()=>{let e=i.item?.item?.id,n=t.nowPlayingItem?.id;return e&&n&&e===n}),{elementRef:c,showContextMenu:l}=ln({item:{...i.item.item,href:Wt(i.item.item)},opts:{slots:{singleSelectTop:[at(_t(`action.removeFromQueue`),()=>t.removeFromQueue(i.index)),at(_t(`action.moveToTop`),()=>t.moveQueueItemAbsolute(i.index,t.queuePosition+1))]}}});async function f(){await t.jumpToQueuePosition(i.index)}return(t,i)=>{let s=Jn;return w(),o(`div`,{class:`threed-queue-item_container`,ref_key:`elementRef`,ref:c},[u(`div`,{class:B([`threed-queue-item`,{"active-item":a.value}]),onMouseenter:i[0]||=e=>n.value=!0,onMouseleave:i[1]||=e=>n.value=!1},[u(`div`,Ta,[U(M,{name:`generic-fade`},{default:L(()=>[n.value&&!a.value?(w(),o(`div`,Ea,[u(`div`,{class:`play-btn`,role:`button`,onClick:f},[U(K,{name:`ion-ios-play`})])])):m(``,!0)]),_:1}),U(dn,{class:`no-shadow`,artwork:e.item.item?.attributes?.artwork,"desired-height":600,"desired-width":600},null,8,[`artwork`])])],34),u(`div`,Da,[u(`div`,Oa,[a.value?(w(),d(Yr,{key:0,class:`playing-indicator`})):m(``,!0),U(s,{class:`title-text`},{default:L(()=>[g(r(e.item.item?.attributes?.name),1)]),_:1})]),U(s,{class:`artist`},{default:L(()=>[g(r(e.item.item?.attributes?.artistName),1)]),_:1})])],512)}}})})),ja=e((()=>{})),Ma,Na=e((()=>{Aa(),Aa(),ja(),X(),Ma=q(ka,[[`__scopeId`,`data-v-c5cfa9be`]])})),Pa,Fa,Ia,La,Ra=e((()=>{E(),ae(),Ee(),Z(),Tt(),Na(),Pa=[`initial-slide`,`breakpoints`,`effect`],Fa=50,Ia=100,La={__name:`ThreeDQueue`,setup(e){let n=s(!1),r;function a(){r&&clearTimeout(r),n.value=!0,r=setTimeout(()=>{n.value=!1,A&&T.value<b.value.length&&A.slideTo(T.value,500,!1)},1e3*5)}N(()=>{window.addEventListener(`mousemove`,a,{passive:!0}),window.addEventListener(`touchmove`,a,{passive:!0})}),t(()=>{window.removeEventListener(`mousemove`,a),window.removeEventListener(`touchmove`,a),r&&clearTimeout(r)});let c=Te(),{queue:l,queuePosition:u,isStationMode:d,autoplayEnabled:f,nowPlayingItem:p,queueId:h}=ne(wt()),g=s(null);j(()=>f.value);let _,v=[],y=s(!0),b=s([]),x=s(Fa),C=j(()=>{try{return(Array.isArray(l.value)?l.value:[]).map((e,t)=>{let n=e?.track;return!n||!n.id?null:{id:n.id,index:t,track:n,source:e?.source||`user`}}).filter(e=>e!==null)}catch(e){return console.warn(`[ThreeDQueue] Failed to get queue items`,e),[]}}),T=j(()=>{let e=Number(u.value??0);return Number.isFinite(e)?Math.floor(e):0}),E=j(()=>C.value);function D(){let e=E.value;if(e.length===0){b.value=[],x.value=0;return}e.length<x.value&&(x.value=e.length),b.value=e.slice(0,x.value),g.value=p.value}let ee=j(()=>Y(`components.ThreeDQueue.Style`)===`3d`?`coverflow`:``);function k(e){y.value=e}let A,M=s();function P(e){let[t]=e.detail;A=t,console.log(A),A&&T.value<b.value.length&&setTimeout(()=>{A.slideTo(T.value,0,!1)},100)}O(()=>T.value,async(e,t)=>{e!==t&&(e>=b.value.length-10&&await G(e),A&&e<b.value.length&&A.slideTo(e,500,!1))});function F(e){A?.slideTo(e,500,!1)}let I=j(()=>c.screen.width/c.screen.height),L=j(()=>I.value>2.2),R=j(()=>c.screen.height<600),z=j(()=>{let e=R.value?2:1;return L.value?(console.log(`ultrawide`,I.value,e),{640:{slidesPerView:3*e,spaceBetween:0},1940:{slidesPerView:4*e,spaceBetween:0},3200:{slidesPerView:6*e,spaceBetween:0}}):(console.log(`normal screen`,I.value),{640:{slidesPerView:3*e,spaceBetween:0}})}),B=s(0);async function V(e){B.value=e.activeIndex,a(),b.value.length<E.value.length&&e.activeIndex>=b.value.length-10&&await G(e.activeIndex)}let H=!1,re=null;function W(e){let t=e.deltaY||e.wheelDelta||-e.detail,n=Math.abs(t);if(t%1,k(!1),v.push(n),v.length>5&&n>=100){v.shift();let e=v.every(e=>e===v[0]);_&&clearTimeout(_),_=setTimeout(()=>{},1e3),e&&((t>0?1:-1)>0?A?.slidePrev():A?.slideNext())}else{if(H)return;Math.abs(t)>3&&((t>0?1:-1)>0?A?.slidePrev():A?.slideNext(),H=!0,re&&clearTimeout(re),re=setTimeout(()=>{H=!1},Ia))}_&&clearTimeout(_),_=setTimeout(()=>{},5e3)}N(()=>{D()}),t(()=>{r&&clearTimeout(r),_&&clearTimeout(_),re&&clearTimeout(re)});let ie=j(()=>`bp-${L.value}-${R.value}`);async function G(e){let t=E.value;if(t.length>x.value&&e>=x.value-10){let e=t.slice(x.value,x.value+Fa);e.length>0&&(b.value.push(...e),x.value+=e.length,await S(),A?.update(),A?.slideTo(A.activeIndex,0,!1))}}return O(()=>l.value,()=>{D(),S(()=>{A&&T.value<b.value.length&&A.slideTo(T.value,300,!1)})},{deep:!0}),O(()=>h.value,()=>{D(),S(()=>{A?.update()})}),O(b,()=>{S(()=>{A?.update()})},{deep:!0}),O(()=>p.value,e=>{g.value=e}),(e,t)=>(w(),o(`div`,null,[b.value.length>0?(w(),o(`swiper-container`,{"initial-slide":T.value,onSwiperinit:P,keyboard:`true`,breakpoints:z.value,style:{padding:`0px`},effect:ee.value,"coverflow-effect-slide-shadows":`false`,"centered-slides":`true`,"coverflow-effect-scale":`0.9`,"coverflow-effect-rotate":`30`,onSlidechange:V,onWheelPassive:W,ref_key:`swiperRef`,ref:M,key:ie.value},[(w(!0),o(i,null,te(b.value,(e,t)=>(w(),o(`swiper-slide`,{key:`slide-${e.id}-${t}`,style:{width:`auto`}},[U(Ma,{item:{item:e.track},index:e.index,onClick:t=>F(e.index)},null,8,[`item`,`index`,`onClick`])]))),128))],40,Pa)):m(``,!0)]))}}})),za,Ba,Va=e((()=>{Qe(),Pe(),Ae(),E(),Pt(),jn(),za={class:`history-artwork`},Ba=b({__name:`PageHistoryContentItem`,props:{item:{}},setup(e){let t=e,n=j(()=>/\/(artist|profile)\//.test(t.item.path??``));function i(){t.item.path&&Ot().push(t.item.path)}return(t,a)=>(w(),d(Ye,{class:`history-item`,clickable:``,onClick:i},{default:L(()=>[e.item.artwork?(w(),d(He,{key:0,side:``,class:`history-item-media`},{default:L(()=>[u(`div`,za,[U(dn,{classes:n.value?`round`:`rounded`,artwork:e.item.artwork,"desired-height":80,"desired-width":80},null,8,[`classes`,`artwork`])])]),_:1})):m(``,!0),U(He,{class:`history-item-body`},{default:L(()=>[U(Me,{class:`history-item-title`,lines:`1`},{default:L(()=>[g(r(e.item.title),1)]),_:1}),e.item.type?(w(),d(Me,{key:0,caption:``,lines:`1`,class:`history-item-type`},{default:L(()=>[g(r(e.item.type),1)]),_:1})):m(``,!0)]),_:1})]),_:1}))}})})),Ha=e((()=>{})),Ua,Wa=e((()=>{Va(),Va(),Ha(),X(),Ua=q(Ba,[[`__scopeId`,`data-v-c2a75f14`]])})),Ga,Ka,qa,Ja,Ya,Xa,Za=e((()=>{me(),Ge(),E(),$(),ht(),Wa(),Ga={class:`row history-panel-header`},Ka={class:`col flex items-center`},qa={class:`shelf-title`},Ja={class:`col-auto flex flex-center`},Ya={class:`history-panel-content`},Xa=b({__name:`PageHistoryContent`,props:{width:{},maxHeight:{}},setup(e){let t=Q(),n=it(),a=j(()=>t.appMetaList.slice().reverse()),s=e,c=j(()=>({"min-width":s.width??`0`,"max-height":s.maxHeight??`100%`,"--nowPlaying-bgColor":n.artworkCSSColors?.[`--bgColor`]}));return(e,n)=>(w(),o(`div`,{class:`history-panel`,style:y(c.value)},[u(`div`,Ga,[u(`div`,Ka,[u(`div`,qa,r(e.$lz(`Recently Viewed`,`term.recentlyViewed`)),1)]),u(`div`,Ja,[U(fe,{label:e.$i(`term.clearAll`),flat:``,dense:``,"no-caps":``,onClick:x(t).clearAppMeta},null,8,[`label`,`onClick`])])]),u(`div`,Ya,[U(Oe,null,{default:L(()=>[(w(!0),o(i,null,te(a.value,(e,t)=>(w(),d(Ua,{key:t,item:e},null,8,[`item`]))),128))]),_:1})])],4))}})})),Qa=e((()=>{})),$a,eo=e((()=>{Za(),Za(),Qa(),X(),$a=q(Xa,[[`__scopeId`,`data-v-6c513c3b`]])})),to,no,ro=e((()=>{Fe(),ye(),E(),bt(),Lt(),eo(),to={class:`nav-flipper`},no=b({__name:`NavFlipper`,setup(e){let t=Nt(),n=j(()=>t.currentRouterReference?.canGoBack??!0),r=j(()=>t.currentRouterReference?.canGoForward??!0);return(e,i)=>(w(),o(`div`,to,[V((w(),o(`button`,{class:B({"nav-inert":!n.value}),onClick:i[0]||=e=>x(t).goBack()},[U(J,{name:`chevron-left`}),U(Ie,{"context-menu":``,class:`page-history-menu`},{default:L(()=>[U($a,{"max-height":`80vh`,width:`284px`})]),_:1})],2)),[[he]]),i[2]||=u(`div`,{class:`flipper-divider`},null,-1),V((w(),o(`button`,{class:B({"nav-inert":!r.value}),onClick:i[1]||=e=>x(t).goForward()},[U(J,{name:`chevron-right`})],2)),[[he]])]))}})})),io=e((()=>{})),ao,oo=e((()=>{ro(),ro(),io(),X(),ao=q(no,[[`__scopeId`,`data-v-836feb18`]])})),so,co=e((()=>{E(),bt(),On(),Lt(),so=b({__name:`NewTabButton`,setup(e){let t=Nt();return(e,n)=>(w(),d(xn,{onClick:n[0]||=e=>x(t).openTab(),title:e.$lz(`New Tab`,`action.openNewTab`),"native-title":``},{default:L(()=>[U(J,{name:`plus`})]),_:1},8,[`title`]))}})})),lo,uo=e((()=>{co(),co(),lo=so})),fo,po,mo,ho,go,_o=e((()=>{kn(),E(),Ut(),nt(),bt(),Lt(),fo=[`title`],po=[`textContent`],mo={key:1,class:`tab-text loading`},ho={class:`tab-action`},go=b({__name:`PodTab`,props:{tab:{},isDragging:{type:Boolean},isDragOver:{type:Boolean}},emits:[`dragstart`,`dragover`,`drop`,`dragend`],setup(e,{emit:t}){let{elementRef:n}=Vt(lt(({actionItem:e,menuSeperator:t,cascadeItem:n})=>()=>[e(`Close Tab`,()=>{l.closeTab(i.tab.id)}),t(),n(`Developer`,[e(`Copy Path`,()=>{navigator.clipboard.writeText(i.tab.path)})],{icon:`command`})])),i=e,c=t,l=Nt(),d=e=>{e.dataTransfer&&(e.dataTransfer.effectAllowed=`move`,e.dataTransfer.setData(`text/plain`,i.tab.id)),c(`dragstart`,i.tab.id)},f=e=>{e.preventDefault(),e.dataTransfer&&(e.dataTransfer.dropEffect=`move`),c(`dragover`,i.tab.id)},p=e=>{e.preventDefault(),c(`drop`,i.tab.id)},m=()=>{c(`dragend`)},h=j(()=>i.tab.title?i.tab.title:i.tab.path);s(null);let g=s(null),_=s(null),v=()=>{if(!g.value)return;let e=document.createElement(`div`);e.style.cssText=`position: absolute; visibility: hidden; white-space: nowrap; font-size: 14px; padding: 0 1em;`,e.textContent=h.value,document.body.appendChild(e);let t=e.offsetWidth+32+8;document.body.removeChild(e),_.value=Math.max(120,Math.min(240,t))};O(h,()=>{S(()=>{v()})},{immediate:!0}),N(()=>{v()});let b=j(()=>_.value===null?{}:{width:`${_.value}px`});return(t,i)=>{let s=Sn;return w(),o(`div`,{class:B([`pod-tab`,{active:x(l).currentTab===e.tab.id,dragging:e.isDragging,"drag-over":e.isDragOver}]),style:y(x(b)),draggable:`true`,onClick:i[1]||=t=>x(l).currentTab=e.tab.id,onMouseupCapture:i[2]||=a(t=>x(l).closeTab(e.tab.id),[`middle`,`stop`,`prevent`]),onDragstart:d,onDragover:f,onDrop:p,onDragend:m,ref_key:`elementRef`,ref:n,title:x(h)},[x(h)===`...`?(w(),o(`div`,mo,[U(s,{size:`1em`})])):(w(),o(`div`,{key:0,ref_key:`tabTextRef`,ref:g,class:`tab-text`,textContent:r(x(h))},null,8,po)),u(`div`,ho,[u(`button`,{onClick:i[0]||=a(t=>x(l).closeTab(e.tab.id),[`stop`,`prevent`]),class:`close-btn`},[U(J,{size:`.85rem`,name:`close`})])])],46,fo)}}})})),vo=e((()=>{})),yo,bo=e((()=>{_o(),_o(),vo(),X(),yo=q(go,[[`__scopeId`,`data-v-bc27d521`]])})),xo,So,Co,wo,To,Eo=e((()=>{me(),E(),bt(),bo(),Lt(),G(),xo={key:0,class:`pod-tabs-container`},So={class:`tabs-inner`},Co={class:`pod-tab-content`},wo={key:0,class:`overflow-add-button`},To=b({__name:`PodTabs`,setup(e){let t=s(!1),n=s(!1),r=Nt(),a=s(null),c=s(null),l=s(null),f=k(`addTabBtn`),p=W(f,{threshold:.1}),h=s(!1),g=e=>{a.value&&(e.preventDefault(),a.value.scrollLeft+=e.deltaY*2.5)},_=()=>{if(!a.value)return;let e=a.value.querySelector(`.pod-tab.active`);e&&e.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`center`})};O(()=>r.currentTab,()=>{S(()=>{_()})});function v(){let e=a.value;if(!e){t.value=!1,n.value=!1;return}let r=e.scrollLeft,i=e.scrollWidth-e.clientWidth;t.value=r>2,n.value=i-r>2}function y(){v()}N(()=>{window.addEventListener(`keydown`,E),S(()=>{v(),a.value&&(a.value.addEventListener(`scroll`,y),window.addEventListener(`resize`,v))})}),F(()=>{window.removeEventListener(`keydown`,E),a.value&&(a.value.removeEventListener(`scroll`,y),window.removeEventListener(`resize`,v))});let b=e=>{c.value=e},C=e=>{l.value=e},T=e=>{c.value&&c.value!==e&&r.reorderTabs(c.value,e),c.value=null,l.value=null};function E(e){e.ctrlKey&&e.shiftKey&&e.key===`Tab`?(e.preventDefault(),r.activatePreviousTab()):e.ctrlKey&&e.key===`Tab`&&(e.preventDefault(),r.activateNextTab()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`t`&&(e.preventDefault(),r.openTab()),(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`w`&&(e.preventDefault(),r.closeTab(r.currentTab))}return(e,t)=>x(r).activeTabs.length>1?(w(),o(`div`,xo,[u(`div`,{ref_key:`tabsContainer`,ref:a,class:B([`pod-tabs`,{"solo-tab":x(r).activeTabs.length===1}]),onWheel:g},[u(`div`,So,[u(`div`,Co,[(w(!0),o(i,null,te(x(r).activeTabs,e=>(w(),d(yo,{key:e.id,tab:e,"is-dragging":c.value===e.id,"is-drag-over":l.value===e.id,onDragstart:b,onDragover:C,onDrop:T,onDragend:t[0]||=()=>{c.value=null,l.value=null}},null,8,[`tab`,`is-dragging`,`is-drag-over`]))),128)),h.value?(w(),d(fe,{key:`add-tab-btn`,round:``,size:`sm`,class:`add-tab-btn`,onClick:t[1]||=e=>x(r).openTab(),ref_key:`addTabBtn`,ref:f},{default:L(()=>[U(J,{name:`plus`})]),_:1},512)):m(``,!0)])])],34),h.value?V((w(),o(`div`,wo,[U(fe,{key:`add-tab-btn`,round:``,size:`sm`,class:`add-tab-btn`,onClick:t[2]||=e=>x(r).openTab()},{default:L(()=>[U(J,{name:`plus`})]),_:1})],512)),[[R,!x(p)]]):m(``,!0)])):m(``,!0)}})})),Do=e((()=>{})),Oo,ko=e((()=>{Eo(),Eo(),Do(),X(),Oo=q(To,[[`__scopeId`,`data-v-eb0241c8`]])})),Ao,jo=e((()=>{E(),$(),On(),Lt(),Ao=b({__name:`SidebarToggleButton`,setup(e){let t=Q(),n=j({get(){return t.leftDrawerIsOverlay?t.leftDrawerOverlayOpened:t.leftDrawerOpen},set(e){t.leftDrawerIsOverlay?t.leftDrawerOverlayOpened=e:t.leftDrawerOpen=e}});function r(){t.wishCompactSidebar=!t.wishCompactSidebar}return(e,t)=>(w(),d(xn,{onClick:t[0]||=e=>n.value=!x(n),onDragenter:t[1]||=e=>n.value=!0,onContextmenu:a(r,[`prevent`,`stop`])},{default:L(()=>[x(n)?(w(),d(J,{key:0,name:`sidebar-opened`})):(w(),d(J,{key:1,name:`sidebar-closed`}))]),_:1}))}})})),Mo=e((()=>{})),No,Po=e((()=>{jo(),jo(),Mo(),X(),No=q(Ao,[[`__scopeId`,`data-v-a74e8adf`]])}));function Fo(){return[]}var Io=e((()=>{})),Lo,Ro,zo,Bo,Vo=e((()=>{E(),qt(),Z(),Io(),$(),yt(),bt(),Hn(),Er(),Lo={class:`pod-tab-view`},Ro=100,zo=1e4,Bo=b({__name:`PodTabView`,props:{tab:{}},setup(e){let n=Nt(),r=k(`podRouter`),i=Q(),a=Rt(),s=Ft(),c=!0,l=!1,u=e,f=j(()=>{if(!a.visual.viewTransitions)return;let e=Gt();return Jt(e)?`macos-page`:Yt(e)||i.platform===`win32`?`windows-page`:`macos-page`}),h=j(()=>n.activeTabs.find(e=>e.id===u.tab.id)),g=j(()=>n.currentTab===u.tab.id);function _(){r.value&&n.currentTab==h.value?.id&&(n.currentRouterReference=r.value)}O(()=>n.currentTab,e=>{S(()=>{_()})},{immediate:!0}),O(r,(e,t)=>{e?_():t&&n.currentRouterReference===t&&(n.currentRouterReference=void 0)}),O(()=>n.currentRouterReference,e=>{e??S(()=>_())}),t(()=>{n.currentRouterReference===r.value&&(n.currentRouterReference=void 0)});let v=[`[data-infer-title]`,`.ns-cqbounds .apple-heading`,`.ns-cqbounds h1`,`.ns-cqbounds .library-toolbar h3`,`.ns-cqbounds .title`,`.ns-cqbounds .artist-text`,`.ns-cqbounds .shelf-title`],y=null;function b(){let e=r.value?.$el?.nextElementSibling;if(!e)return``;for(let t of v){let n=e.querySelector(t);if(n?.textContent)return n.textContent}return``}function T(){y!==null&&(clearTimeout(y),y=null),l=!1}function E(){if(!h.value||l)return;l=!0,h.value.title=`...`;let e=performance.now()+zo,t=()=>{if(y=null,!c||!h.value){T();return}let n=b();if(n){h.value.title=n,T();return}if(performance.now()>=e){h.value.title=h.value.path,T();return}y=setTimeout(t,Ro)};t()}function D(){S(()=>E())}function ee(e){n.currentTab===h.value?.id&&(console.warn(`[pod-router] no route matched`,e,`— recovering to the new-tab page`),n.recoverNavigation({toFallback:!0}))}let A=[`Browse`,`ListenNow`,`Radio`,`LibrarySongs`,`LibraryArtists`,`LibraryAlbums`,`RecentlyAdded`,`Home`];return P(`pod-tab--is-current-tab`,g),P(`pod-tab--this-tab`,h),N(()=>{r.value&&n.currentRouterReference==null&&_(),S(()=>E())}),F(()=>{c=!1,T()}),(e,t)=>(w(),o(`div`,Lo,[U(Tr,null,{default:L(()=>[x(h)?(w(),d(x(Vn),{key:0,routes:x(Fo)(),history:`memory`,modelValue:x(h).path,"onUpdate:modelValue":t[5]||=e=>x(h).path=e,ref_key:`podRouter`,ref:r,onRouteChange:D,onRouteNotFound:ee},{default:L(({Component:e,props:n,route:r})=>[U(M,{name:x(f),mode:`out-in`,onBeforeLeave:t[0]||=e=>x(s).begin(),onBeforeEnter:t[1]||=e=>x(s).begin(),onAfterEnter:t[2]||=()=>{x(s).end(),D()},onLeaveCancelled:t[3]||=e=>x(s).end(),onEnterCancelled:t[4]||=e=>x(s).end()},{default:L(()=>[(w(),d(p,{include:A,exclude:`Playlist`},[(w(),d(I(e),C(n,{class:`pod-router-view`,key:r.path}),null,16))],1024))]),_:2},1032,[`name`])]),_:1},8,[`routes`,`modelValue`])):m(``,!0)]),_:1})]))}})})),Ho=e((()=>{})),Uo,Wo=e((()=>{Vo(),Vo(),Ho(),X(),Uo=q(Bo,[[`__scopeId`,`data-v-643c25ee`]])})),Go,Ko=e((()=>{E(),Z(),$(),ht(),ni(),yn(),Go=b({__name:`ChromeArtworkBlurMap`,setup(e){let t=it(),n=s(new Image),r=new Image;r.crossOrigin=`anonymous`;let i=kt(),a=Q(),c=j(()=>a.windowIsHidden?`hidden`:a.windowFocusState===`blurred`&&i.visual.sweetener.immersive_lower_fps_on_blur?`blurred`:`active`),l=j(()=>i.visual.sweetener.immersiveBGStyle),u=s(``);function f(){console.log(`image tag loaded`),n.value=r}let p=j(()=>l.value==`lite`?`saturate(${i.visual.sweetener.immersive_bg_filter.saturate}%) contrast(${i.visual.sweetener.immersive_bg_filter.contrast}%)`:`saturate(${i.visual.sweetener.immersive_bg_filter.saturate}%) contrast(${i.visual.sweetener.immersive_bg_filter.contrast}%) brightness(${i.visual.sweetener.immersive_bg_filter.brightness}%)`),h=j(()=>({brightness:i.visual.sweetener.immersive_bg_filter.brightness,blur:i.visual.sweetener.immersive_bg_filter.blur,saturate:100,contrast:100})),g=j(()=>i.visual.sweetener.immersive_bg_fps);return O(()=>t.player.currentArtworkUrlHiRes||t.player.currentArtworkUrl||``,e=>{if(!e){u.value=``,n.value=void 0;return}u.value=e,n.value=void 0,r.onload=f,r.src=e},{immediate:!0}),(e,t)=>x(a).windowIsHidden?m(``,!0):(w(),o(`div`,{key:0,class:`blurmap-container`,style:y({"--filter":p.value})},[l.value=="default"?(w(),d(Mn,{key:0,image:n.value,"max-framerate":g.value,"visibility-tier":c.value},null,8,[`image`,`max-framerate`,`visibility-tier`])):m(``,!0),l.value==`lite`?(w(),d(M,{key:1,name:`bgfade`},{default:L(()=>[(w(),d(Qr,{key:u.value,"artwork-url":u.value,"filter-settings":h.value,"no-mask":``},null,8,[`artwork-url`,`filter-settings`]))]),_:1})):m(``,!0)],4))}})})),qo=e((()=>{})),Jo,Yo=e((()=>{Ko(),Ko(),qo(),X(),Jo=q(Go,[[`__scopeId`,`data-v-3995cd20`]])})),Xo=e((()=>{}));function Zo(e,t){return w(),o(`div`,$o)}var Qo,$o,es,ts=e((()=>{E(),Xo(),X(),Qo={},$o={class:`page-viewport-glaze`},es=q(Qo,[[`render`,Zo],[`__scopeId`,`data-v-5988f6aa`]])})),ns=e((()=>{})),rs,is,as=e((()=>{E(),$(),Z(),ns(),X(),rs={__name:`AdaptiveColorBackground`,setup(e){let t=Q(),n=Rt(),r=j(()=>n.visual.adaptiveColorPercent*.01);return(e,n)=>(w(),d(M,{name:`fade`},{default:L(()=>[(w(),o(`div`,{id:`adaptive-bg-container`,key:x(t).surfaceColor},[u(`div`,{id:`adaptive-bg`,style:y({backgroundColor:x(t).surfaceColor,opacity:r.value})},null,4)]))]),_:1}))}},is=q(rs,[[`__scopeId`,`data-v-d6e10edb`]])})),os,ss,cs=e((()=>{E(),bt(),or(),os=[`currnet-route`],ss=b({__name:`AppScrollBounds`,setup(e){let t=s(),n=Nt(),{markScrolling:r}=ar(),i=j(()=>n.activeTabs.find(e=>e.id===n.currentTab)),a=0,c=()=>{if(!t.value||!i.value)return;let e=n.currentPath;e&&(i.value.scrollPositions||(i.value.scrollPositions={}),i.value.scrollPositions[e]=a)},l=null,d=null,f=null,p=0,m=-1,h=()=>{l?.disconnect(),l=null,d?.disconnect(),d=null,f!==null&&(clearTimeout(f),f=null)},g=()=>{let e=t.value;e&&(e.scrollTop=p,a=e.scrollTop,m=e.scrollTop,e.scrollHeight-e.clientHeight>=p&&h())},_=()=>{if(!t.value||!i.value)return;h();let e=n.currentPath;i.value.scrollPositions||(i.value.scrollPositions={});let r=i.value.scrollPositions[e];if(r===void 0){t.value.scrollTop=0,a=0;return}p=r,g();let o=t.value;o.scrollHeight-o.clientHeight<p&&(l=new ResizeObserver(g),l.observe(o),d=new MutationObserver(g),d.observe(o,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),f=setTimeout(h,4e3))},v=e=>{let t=e.currentTarget;t&&(a=t.scrollTop),r(),(l||d)&&t&&t.scrollTop!==m&&h()},y=()=>{c()};return O(()=>n.currentPath,(e,r)=>{!t.value||!e||e===r||(r&&i.value&&(i.value.scrollPositions||(i.value.scrollPositions={}),i.value.scrollPositions[r]=a),n.consumeNavigationType()===`push`?(h(),t.value.scrollTop=0,a=0):S(()=>_()))}),O(()=>n.currentTab,(e,r)=>{if(!t.value||e===r)return;let i=n.activeTabs.find(e=>e.id===r);if(i){let e=i.path;e&&(i.scrollPositions||={},i.scrollPositions[e]=a)}S(()=>{_()})}),N(()=>{n.activeTabs.forEach(e=>{e.scrollPositions||={}}),t.value&&(t.value.addEventListener(`scroll`,v,{passive:!0}),t.value.addEventListener(`scrollend`,y,{passive:!0}))}),F(()=>{t.value&&(t.value.removeEventListener(`scroll`,v),t.value.removeEventListener(`scrollend`,y)),h(),c()}),(e,r)=>(w(),o(`div`,{id:`app-scroll-bounds`,"currnet-route":x(n).currentPath,ref_key:`AppScrollBounds`,ref:t},[r[0]||=u(`div`,{"layer-pagebg-scroll":``},null,-1),T(e.$slots,`default`,{},void 0,!0)],8,os))}})})),ls=e((()=>{})),us,ds=e((()=>{cs(),cs(),ls(),X(),us=q(ss,[[`__scopeId`,`data-v-9131fa47`]])})),fs,ps=e((()=>{me(),de(),ge(),le(),ve(),we(),E(),Ut(),nt(),Tn(),pn(),fs=b({__name:`LoginButton`,setup(e){let t=s(!1),r=s(``),{showContextMenu:a}=Vt(lt(({actionItem:e,$i:n})=>[e(n(`action.sidebar.signIn.with`).replace(`{account}`,n(`term.apple`)),()=>l()),e(n(`action.sidebar.signIn.with`).replace(`{account}`,n(`term.userToken`)),()=>t.value=!0)])),c=()=>{Nn(r.value)},l=()=>{Nn()};return(e,s)=>(w(),o(i,null,[U(fe,{onClick:x(a),class:`full-width`,color:`primary`,icon:`apple`,label:e.$i(`action.sidebar.signIn`).replace(`{account}`,e.$i(`term.appleMusic`))},null,8,[`onClick`,`label`]),U(Ce,{modelValue:x(t),"onUpdate:modelValue":s[2]||=e=>n(t)?t.value=e:null},{default:L(()=>[U(_e,null,{default:L(()=>[U(ze,null,{default:L(()=>[U(Se,{modelValue:x(r),"onUpdate:modelValue":s[0]||=e=>n(r)?r.value=e:null,type:`password`,label:e.$i(`term.userToken`)},null,8,[`modelValue`,`label`])]),_:1}),U(Be,{align:`right`},{default:L(()=>[U(fe,{label:e.$i(`dialog.cancel`),color:`primary`,onClick:s[1]||=e=>t.value=!1},null,8,[`label`]),U(fe,{label:e.$i(`menu.signIn`),color:`primary`,onClick:c},null,8,[`label`])]),_:1})]),_:1})]),_:1},8,[`modelValue`])],64))}})})),ms,hs=e((()=>{ps(),ps(),ms=fs})),gs,_s,vs,ys,bs,xs,Ss,Cs,ws,Ts,Es,Ds,Os,ks=e((()=>{E(),bt(),ae(),vn(),Z(),ct(),Gr(),Pt(),$(),mt(),Bt(),l(),gs={key:0,class:`profile-background`},_s={style:{width:`0`,height:`0`,position:`absolute`},"aria-hidden":`true`,focusable:`false`},vs=[`src`],ys={class:`profile-artwork`},bs=[`src`],xs={class:`profile-info`},Ss={key:0,class:`title-with-badges`},Cs={class:`title-text profile-name`},ws={class:`ellipsis`},Ts={key:1,class:`title-with-badges`},Es={class:`ellipsis`},Ds={key:0,class:`profile-mainmenu`},Os=b({__name:`SidebarProfile`,setup(e){z(e=>({ab84ada0:x(c),v29f9ff72:x(g)}));let t=tt(),n=Rt(),i=Nt(),c=s(`var(--musicKeyColor)`),l=s(`var(--musicKeyColor)`),d=j(()=>{let e=n.components.SidebarProfile.CustomArtworkPath;return e&&typeof e==`string`&&!e.startsWith(`file://`)?e:t.profile?.attributes?.artwork?It(t.profile?.attributes?.artwork.url,64,64):In});O(d,async e=>{if(e&&e!==`data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20width='100%25'%20height='100%25'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20xmlns:serif='http://www.serif.com/'%20style='fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;'%3e%3crect%20x='0'%20y='0'%20width='1024'%20height='1024'%20style='fill:rgb(110,110,110);'/%3e%3cg%20transform='matrix(6.05996,0,0,6.05996,189.003,209)'%3e%3cpath%20d='M93.161,0.071C59.66,-1.043%2032.22,11.314%2032.22,11.314L32.2,74.023C28.789,72.669%2024.641,72.348%2020.428,73.372C11.345,75.579%205.397,83.192%207.143,90.379C8.889,97.566%2017.667,101.604%2026.749,99.398C35.313,97.317%2041.087,90.429%2040.256,83.626L40.256,36.771C40.256,36.771%2059.66,29.987%2084.829,28.286L84.829,63.135C81.455,61.843%2077.386,61.55%2073.25,62.555C64.167,64.761%2058.219,72.374%2059.965,79.562C61.71,86.749%2070.488,90.786%2079.571,88.58C87.502,86.653%2093.042,80.603%2093.158,74.316L93.161,74.32L93.161,0.071Z'%20style='fill-opacity:0.16;fill-rule:nonzero;'/%3e%3c/g%3e%3c/svg%3e`)try{let t=new Image;t.crossOrigin=`Anonymous`,t.src=e,t.onload=async()=>{try{let{quantized:e}=await ot(t),n=e.map(e=>v({r:e.r,g:e.g,b:e.b})).sort((e,t)=>t.toHsl().s-e.toHsl().s);if(n.length>0)if(c.value=n[0].toHexString(),n.length>=2){let e=n[0].toHexString();l.value=`
                radial-gradient(circle at top left, ${e}, transparent 70%),
                radial-gradient(circle at bottom right, ${n[1].toHexString()}, transparent 70%),
                radial-gradient(circle at center, ${n[2]?n[2].toHexString():e} 20%, transparent 80%),
                ${v(n[0]).darken(30).toHexString()}
              `}else l.value=n[0].toHexString();else c.value=`var(--musicKeyColor)`,l.value=`var(--musicKeyColor)`}catch(e){console.error(`Failed to extract colors`,e),c.value=`var(--musicKeyColor)`,l.value=`var(--musicKeyColor)`}}}catch(e){console.error(`Failed to load image for color extraction`,e),c.value=`var(--musicKeyColor)`,l.value=`var(--musicKeyColor)`}else c.value=`var(--musicKeyColor)`,l.value=`var(--musicKeyColor)`},{immediate:!0});let f=j(()=>i.currentPath.startsWith(`/am/home`));function p(){Ot().push(`/am/home`)}let{compactSidebar:h}=ne(Q()),g=j(()=>n.components.CompactSidebar.size===`small`?`36px`:`48px`),_=j(()=>t.profile),y=j(()=>{if(n.components.SidebarProfile.NameVisible)return n.components.SidebarProfile.CustomName?n.components.SidebarProfile.CustomName:_.value?.attributes?.name}),b=j(()=>{if(!n.components.SidebarProfile.HandleVisible)return;if(n.components.SidebarProfile.CustomHandle)return n.components.SidebarProfile.CustomHandle;let e=_.value?.attributes?.handle,t=y.value;if(!(e&&t&&e.toLowerCase()===t.toLowerCase()))return e}),S=j(()=>n.components.SidebarProfile.HasMainMenu);return(e,t)=>(w(),o(`div`,{class:B([`profile-tab`,{"mini-profile":x(h)}])},[u(`div`,{class:B([`profile-btn`,{active:x(f)}]),onClick:a(p,[`self`])},[x(f)&&!x(h)?(w(),o(`div`,gs,[(w(),o(`svg`,_s,[...t[0]||=[u(`filter`,{id:`profile-turbulence`},[u(`feTurbulence`,{type:`fractalNoise`,baseFrequency:`0.05`,numOctaves:`3`,result:`noise`}),u(`feDisplacementMap`,{in:`SourceGraphic`,in2:`noise`,scale:`20`})],-1)]])),u(`img`,{src:x(d)},null,8,vs)])):m(``,!0),u(`div`,ys,[u(`img`,{src:x(d)},null,8,bs)]),V(u(`div`,xs,[x(y)?(w(),o(`div`,Ss,[u(`div`,Cs,[u(`div`,ws,r(x(y)),1)])])):m(``,!0),x(b)?(w(),o(`div`,Ts,[u(`div`,{class:B([`title-text`,{"profile-handle":x(y),"profile-name":!x(y)}])},[u(`div`,Es,r(x(b)),1)],2)])):m(``,!0)],512),[[R,!x(h)]])],2),x(S)?(w(),o(`div`,Ds,[U(Kr)])):m(``,!0)],2))}})})),As=e((()=>{})),js,Ms=e((()=>{ks(),ks(),As(),X(),js=q(Os,[[`__scopeId`,`data-v-772cf016`]])})),Ns,Ps,Fs=e((()=>{E(),G(),Z(),Ns={class:`scrollbar-track`},Ps=b({__name:`OverlayScrollbar`,props:{element:{}},setup(e){let t=Rt(),n=s(null),{pressed:r}=ce({target:n}),i=e,a=s(100),c=s(0),l=s(!0),d=s(0);function f(){l.value&&(a.value=i.element.clientHeight/i.element.scrollHeight*100,c.value=i.element.scrollTop/i.element.scrollHeight*100,d.value=i.element.clientHeight)}function p(e){let t=(e.clientY-n.value.getBoundingClientRect().top-a.value/2)/n.value.clientHeight*i.element.scrollHeight;i.element.scrollTo(0,t),c.value=i.element.scrollTop/i.element.scrollHeight*100}function h(e){if(!r.value)return;let t=(e.clientY-n.value.getBoundingClientRect().top-a.value/2)/n.value.clientHeight*i.element.scrollHeight;i.element.scrollTo(0,t),c.value=i.element.scrollTop/i.element.scrollHeight*100}let g=s(!1);function _(){g.value=!0}function v(){g.value=!1}O(()=>r.value,e=>{l.value=!e});let b=new ResizeObserver(f),S=new MutationObserver(f);return N(()=>{if(t.visual.scrollbarType==`native`)return;let e=i.element;e.addEventListener(`scroll`,f),e.addEventListener(`resize`,f),e.addEventListener(`mouseover`,_),e.addEventListener(`mouseleave`,v),e.classList.add(`no-scrollbar`),S.observe(e,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),b.observe(e),a.value=i.element.clientHeight/i.element.scrollHeight*100,c.value=i.element.scrollTop/i.element.scrollHeight*100}),F(()=>{let e=i.element;e.removeEventListener(`scroll`,f),e.removeEventListener(`resize`,f),e.removeEventListener(`mouseover`,_),e.removeEventListener(`mouseleave`,v),S.disconnect(),b.unobserve(e)}),O(()=>t.visual.scrollbarType,()=>{let e=i.element;t.visual.scrollbarType==="default"?e.classList.add(`no-scrollbar`):e.classList.remove(`no-scrollbar`)},{immediate:!0}),(e,i)=>x(a)<100&&x(t).visual.scrollbarType=="default"?(w(),o(`div`,{key:0,class:B([`scrollbar-container`,{"not-visible":!x(g),"is-active":x(r)}]),ref_key:`ScrollContainer`,ref:n,onMousemove:h,onMousedown:p,style:y({height:x(d)+`px`})},[u(`div`,Ns,[u(`div`,{class:`scrollbar-thumb`,style:y({height:x(a)+`%`,top:x(c)+`%`})},null,4)])],38)):m(``,!0)}})})),Is=e((()=>{})),Ls,Rs=e((()=>{Fs(),Fs(),Is(),X(),Ls=q(Ps,[[`__scopeId`,`data-v-6614a548`]])})),zs,Bs=e((()=>{me(),E(),Ut(),nt(),rt(),On(),Lt(),zs=b({__name:`ProviderSwitcher`,props:{as:{}},setup(e){let t=jt(),{showContextMenu:n}=Vt(lt(({actionItem:e})=>()=>[e(`Apple Music`,()=>{t.provider=`applemusic`},{enabled:t.provider!==`applemusic`,icon:`apple-music`}),e(`My Music`,()=>{t.provider=`local-music`},{enabled:t.provider!==`local-music`,icon:`media-library`})])),r=j(()=>{switch(t.provider){case`applemusic`:return`apple-music-note`;case`local-music`:return`media-library`;default:return`media-library`}});return(t,i)=>e.as==`chrome-button`?(w(),d(xn,{key:0,onMousedown:a(x(n),[`left`])},{default:L(()=>[U(J,{name:x(r)},null,8,[`name`])]),_:1},8,[`onMousedown`])):(w(),d(fe,{key:1,round:``,dense:``,onMousedown:a(x(n),[`left`]),class:`provider-button`},{default:L(()=>[U(J,{name:x(r)},null,8,[`name`])]),_:1},8,[`onMousedown`]))}})})),Vs=e((()=>{})),Hs,Us=e((()=>{Bs(),Bs(),Vs(),X(),Hs=q(zs,[[`__scopeId`,`data-v-03dce0c1`]])})),Ws,Gs,Ks,qs,Js,Ys,Xs,Zs,Qs=e((()=>{E(),Z(),hs(),mt(),Ct(),rt(),$(),sr(),Ms(),Rs(),Us(),Ws={class:`cider-sidebar`},Gs={key:0,class:`osx-gap window-drag`},Ks={key:1,class:`win-gap window-drag`},qs={key:2,class:`sidebar-widget search-widget`},Js={key:0},Ys={key:1,class:`sidebar-login q-mb-md`},Xs={key:0},Zs=b({__name:`Sidebar`,props:{searchBar:{type:Boolean}},setup(e){let t=Q(),n=tt();zt();let r=jt(),a=s();Rt();let c=j(()=>!1);return N(()=>{}),(s,l)=>(w(),o(`div`,Ws,[x(t).getWindowControlsSide()==`left`&&x(t).isIfLayout&&!x(t).hasTitleBar?(w(),o(`div`,Gs)):(w(),o(`div`,Ks)),!x(t).compactSidebar&&e.searchBar?(w(),o(`div`,qs,[(w(),d(I(x(r).getComponent(`SearchBar`)),{"results-position":`left`,label:s.$i(`term.search`)},null,8,[`label`])),x(c)?(w(),d(Hs,{key:0})):m(``,!0)])):m(``,!0),x(r).provider===`applemusic`?(w(),o(i,{key:3},[u(`div`,{class:B([`sidebar-scroll-content no-scrollbar`,{compact:x(t).compactSidebar}]),ref_key:`ScrollContent`,ref:a},[x(t).sidebarType==`am-sidebar`?(w(),o(i,{key:0},[x(Y)(`ui.mainMenuPosition`)===`left`&&x(t).leftDrawerOpen&&s.$q.screen.xs?(w(),o(`br`,Js)):m(``,!0),x(n).isAuthorized?m(``,!0):(w(),o(`div`,Ys,[U(ms,{sidebar:``})])),U(cr),x(a)?(w(),d(Ls,{key:2,element:x(a)},null,8,[`element`])):m(``,!0)],64)):m(``,!0)],2),x(Y)(`components.SidebarProfile.Enabled`)?(w(),o(`div`,Xs,[U(js)])):m(``,!0)],64)):(w(),d(I(x(r).getComponent(`Sidebar`)),{key:4}))]))}})})),$s=e((()=>{})),ec,tc=e((()=>{Qs(),Qs(),$s(),X(),ec=q(Zs,[[`__scopeId`,`data-v-1be5b023`]])})),nc=e((()=>{})),rc,ic,ac,oc=e((()=>{E(),Z(),nc(),X(),rc=500,ic={__name:`AppBlurMap`,props:{inline:{type:Boolean,default:!1}},setup(e){let t=s(null),n=kt(),r=null,i=new Image,a=!1,c=0,l=0,u=0;i.addEventListener(`load`,()=>{a=!0,i.src}),O(n,e=>{e&&(a=!0)});function d(){if(a){i.src!=Y(`visual.backgroundBlurMap.src`)&&(i.src=Y(`visual.backgroundBlurMap.src`));let e=t.value.getContext(`2d`),n=window.screen.height,r=window.screen.width,o=window.innerWidth,s=window.innerHeight;t.value.width=o,t.value.height=s,e.fillStyle=`black`,e.fillRect(0,0,t.value.width,t.value.height);function d(t=1){let a=i.width/i.height,o=r/n,s=a>o?n:r/a,c=a>o?n*a:r,l=(r-c)/2,u=(n-s)/2,d=(c-r)/2;e.drawImage(i,l+(r+d)*t-window.screenX,u-Math.abs(window.screenY),c,s)}e.filter=`blur(${Y(`visual.backgroundBlurMap.filter.blur`)}px) saturate(${Y(`visual.backgroundBlurMap.filter.saturate`)}%) contrast(${Y(`visual.backgroundBlurMap.filter.contrast`)}%) brightness(${Y(`visual.backgroundBlurMap.filter.brightness`)}%)`,d(-1),d(0),d(1),c=window.screenX,l=window.screenY,Date.now()-u>=rc&&(u=Date.now(),a=!1)}if((c!==window.screenX||l!==window.screenY)&&(a=!0),document.hidden){r=null;return}r=requestAnimationFrame(d)}function f(){a=!0}let p=null;function m(){document.hidden||r===null&&(a=!0,d())}return N(()=>{a=!0,d(),window.addEventListener(`resize`,f),p=()=>m(),document.addEventListener(`visibilitychange`,p)}),F(()=>{r!==null&&cancelAnimationFrame(r),window.removeEventListener(`resize`,f),p&&document.removeEventListener(`visibilitychange`,p),p=null}),(n,r)=>(w(),o(`canvas`,{id:`appBlurMap`,class:B({inline:e.inline}),ref_key:`canvas`,ref:t},null,2))}},ac=q(ic,[[`__scopeId`,`data-v-a75f8cf2`]])}));function sc(e){let n=null,r=0,i=0,a=null,o=t=>Math.min(e.max,Math.max(e.min,t));function s(t){if(n===null||t.pointerId!==n)return;t.preventDefault();let a=o(i+e.sign*(t.clientX-r));a!==e.getWidth()&&e.setWidth(a)}function c(){if(n===null)return;let t=n;if(n=null,window.removeEventListener(`pointermove`,s),window.removeEventListener(`pointerup`,l),window.removeEventListener(`pointercancel`,l),a){try{a.hasPointerCapture?.(t)&&a.releasePointerCapture(t)}catch{}a=null}e.onEnd()}function l(e){n===null||e.pointerId!==n||c()}function u(t){if(t.button!==0||n!==null)return;t.preventDefault(),n=t.pointerId,r=t.clientX,i=o(e.getWidth()),e.getWidth()!==i&&e.setWidth(i),e.onBegin(),window.addEventListener(`pointermove`,s,{passive:!1}),window.addEventListener(`pointerup`,l),window.addEventListener(`pointercancel`,l);let c=t.currentTarget;if(c){a=c;try{c.setPointerCapture(t.pointerId)}catch{a=null}}}return t(c),{onPointerDown:u}}var cc=e((()=>{E()})),lc,uc,dc,fc,pc,mc,hc,gc,_c,vc,yc,bc,xc,Sc,Cc,wc,Tc,Ec,Dc,Oc,kc,Ac,jc,Mc,Nc,Pc,Fc,Ic=e((()=>{Ge(),Ke(),je(),Ve(),E(),Wo(),bt(),G(),Ee(),Z(),Yo(),ts(),ri(),rn(),as(),ds(),tc(),oc(),ei(),cc(),Ut(),nt(),Ht(),en(),$(),lc=[`library-visible`,`top-player`,`left-drawer`,`right-drawer`,`right-drawer-type`,`data-framework`,`data-layout-type`,`data-drawer-resizing`,`sugar-color-scheme`,`sugar-enabled`,`data-window-control-side`],uc={class:`ns-toolbar`},dc={key:0,class:`ns-sidebar ns-sidebar--left`},fc=[`viewport-should-be-rounded`,`data-corner-cut`],pc={class:`ns-toolbar_inline`},mc={class:`ns-qlayout`},hc={class:`right-drawer-overlay_window`},gc={key:0,class:`right-drawer-overlay dummy`},_c={class:`ns-amplcd-shelf`},vc={class:`ns-bottom-inline-bounds`},yc={class:`ns-bottom-toolbar`},bc={key:3,class:`top-blurmap`},xc=24,Sc=.5,Cc=150,wc=24,Tc=3,Ec=48,Dc=.85,Oc=`cubic-bezier(0.33, 1, 0.68, 1)`,kc=190,Ac=360,jc=200,Mc=500,Nc=600,Pc=!0,Fc=b({__name:`ShellLayout`,props:{container:{type:Boolean},noTitleBar:{type:Boolean},layoutType:{}},setup(e){let n=Te(),r=Q(),a=Rt(),{leftDrawer:c,rightDrawer:l,leftOverlay:f}=$r(),p=ie(`sugar:shell-updates-enabled`,!0),h=ie(`sugar:coloring-scheme`,`default`),g=e,_=j(()=>Y(`components.MojaveLayouts.FloatingPlayer`)?Y(`components.MojaveLayouts.FloatingPlayerPadding`)??8:0),v=j(()=>{switch(Y(`components.MojaveLayouts.PlayerType`)){case`default`:return 98;case`glass`:return 85;default:return 74}}),b=s(r.leftDrawerOpen),C=s(r.browserRightDrawerOpen),E=s(),ee=s(),k=s(null),P=s(`left`),I=s(!1),z=s(!1);function H(e){let t=window.devicePixelRatio||1;return Math.round(e*t)/t}let ne,W,G,ae=0;function oe(e,t){b.value=e,C.value=t}function ce(){G?.cancel(),G=void 0}function le(e,t,n){let r=ee.value;if(!r||e===null||t<=0)return;let i=Math.abs(e-t);if(i<wc)return;let{durationMs:a}=ii(n);if(a<=0)return;ce();let o=Math.min(Tc,i/Ec);G=r.animate([{filter:`blur(${o}px)`},{filter:`blur(0px)`}],{duration:a*Dc,easing:Oc})}function ue(){ce();let e=E.value,t=e?H(e.getBoundingClientRect().width):0;t>0&&(k.value=t);let n=Je.width.value,r=Je.height.value;return n>0&&r>0&&(Ye.width=n,Ye.height=r,z.value=!0),++ae}function de(e,t){ne&&clearTimeout(ne);let{durationMs:n}=ii(t);ne=setTimeout(()=>{if(e!==ae)return;z.value=!1;let n=k.value;if(n===null)return;let r=H(qe.value?.getBoundingClientRect().width??0);r<=0||Math.abs(r-n)<Sc||(k.value=r,le(n,r,t))},n+xc)}async function fe(e,t,n){P.value=n;let r=qe.value;if(!r){let n=ue();e(),de(n,t);return}let i=getComputedStyle(r),a=i.marginLeft,o=i.marginRight,s=ue(),c=k.value;r.style.transition=`none`,e(),await S();let l=H(r.getBoundingClientRect().width);if(s!==ae){r.style.transition=``;return}r.style.marginLeft=a,r.style.marginRight=o,r.offsetWidth,r.style.transition=``,r.style.marginLeft=``,r.style.marginRight=``,l>0&&(k.value=l),le(c,l,t),de(s,t)}function pe(e,t){fe(()=>oe(e,t),e&&!b.value||t&&!C.value?`enter`:`leave`,e===b.value?`left`:`right`)}let me=s();re(me,()=>{r.leftDrawerOverlayOpened&&=!1});function he(){return r.getPlayerPosition()==1&&!n.screen.lt.sm}let ge=j(()=>r.getWindowControlsSide());function _e(e){return Math.min(Mc,Math.max(jc,e))}function ve(e){return r.compactSidebar?a.components.CompactSidebar.size==`small`?ge.value==`left`?90:60:80:Math.min(Ac,Math.max(kc,e))}let ye=j(()=>_e(r.rightDrawerWidth)),be=j(()=>ve(r.leftDrawerWidth)),xe=s(),Se=s(),Ce=s(null),K=0,we=null,Ee=null,De=!1;function Ae(e){K+=1,!(K>1)&&(I.value=!0,ne&&=(clearTimeout(ne),void 0),P.value=e,ue(),xe.value&&(xe.value.dataset.drawerResizing=`true`),document.body.style.userSelect=`none`,document.body.style.cursor=`col-resize`)}function je(){we===null&&Ee===null||(De=!0,we!==null&&(r.leftDrawerWidth=we),Ee!==null&&(r.rightDrawerWidth=Ee),we=null,Ee=null,S(()=>{De=!1}))}function Me(){if(K>0&&--K,K>0)return;I.value=!1,W&&=(clearTimeout(W),void 0),je(),Ce.value=null;let e=k.value,t=H(qe.value?.getBoundingClientRect().width??0);z.value=!1,t>0&&(e===null||Math.abs(t-e)>=Sc)&&(k.value=t,le(e,t,`enter`)),xe.value&&delete xe.value.dataset.drawerResizing,Se.value?.style.removeProperty(`--leftSidebarWidth`),Se.value?.style.removeProperty(`--rightSidebarWidth`),document.body.style.userSelect=``,document.body.style.cursor=``}function Pe(){W&&clearTimeout(W),W=setTimeout(()=>{if(!I.value)return;let e=qe.value,t=H(e?.getBoundingClientRect().width??0);t>0&&(k.value=t),Ce.value!==null&&(Ce.value=Ee===null?ye.value:_e(Ee))},Cc)}function Fe(){we=r.leftDrawerWidth,Se.value?.style.setProperty(`--leftSidebarWidth`,be.value+`px`),Ae(`right`)}function Ie(){Ee=r.rightDrawerWidth,Se.value?.style.setProperty(`--rightSidebarWidth`,ye.value+`px`),Ce.value=ye.value,Ae(`left`)}let{onPointerDown:Le}=sc({min:kc,max:Ac,sign:1,getWidth:()=>we??r.leftDrawerWidth,setWidth:e=>{if(K===0){r.leftDrawerWidth=e;return}e!==we&&(we=e,Se.value?.style.setProperty(`--leftSidebarWidth`,ve(e)+`px`),Pe())},onBegin:Fe,onEnd:Me}),{onPointerDown:Re}=sc({min:jc,max:Mc,sign:-1,getWidth:()=>Ee??r.rightDrawerWidth,setWidth:e=>{if(K===0){r.rightDrawerWidth=e;return}e!==Ee&&(Ee=e,Se.value?.style.setProperty(`--rightSidebarWidth`,_e(e)+`px`),Pe())},onBegin:Ie,onEnd:Me});function ze(e){e==`left`?r.leftDrawerWidth=240:r.rightDrawerWidth=240}let Be=s(r.bootRevealed?`done`:`pending`),Ve=j(()=>{if(Be.value===`pending`)return`boot-reveal-pending`;if(Be.value===`running`)return`boot-reveal-running`}),He,Ue=O(()=>r.bootRevealed,e=>{e&&(Be.value=`running`,He&&clearTimeout(He),He=setTimeout(()=>{Be.value=`done`},Nc),Ue())},{immediate:!1});F(()=>{He&&clearTimeout(He)});let We=j(()=>a.visual.forceViewportRounding||r.hasTitleBar?!0:g.layoutType==`maverick-if`?!1:ge.value==`left`),Ge=j(()=>r.platform===`win32`&&a.visual.forceViewportRounding&&ge.value===`right`&&!r.hasTitleBar&&r.appMode===`browser`&&!r.rightDrawerOpen&&g.layoutType===`mojave-if`),Ke=j(()=>!!g.layoutType.includes(`-if`)),qe=s(),Je=se(qe),Ye={width:0,height:0},Xe={width:j(()=>z.value?Ye.width:Je.width.value),height:j(()=>z.value?Ye.height:Je.height.value)},Qe=j(()=>!!(a.visual.overlayDrawer||n.screen.width<850)),$e=j(()=>r.leftDrawerIsOverlay),et=s();re(et,()=>{Qe.value&&r.rightDrawerOpen&&r.closeRightDrawerView()},{ignore:[`.chrome-button`]});let tt=Vt(lt(({actionItem:e})=>[e(`Reset Width`,()=>{ze(`left`)})])),nt=Vt(lt(({actionItem:e})=>[e(`Reset Width`,()=>{ze(`right`)})])),q=Nt();return O([()=>r.leftDrawerOpen,()=>r.browserRightDrawerOpen],([e,t],[n,r])=>{e===n&&t===r||pe(e,t)}),O([be,ye],([e],[t])=>{De||I.value||fe(()=>{},`enter`,e===t?`left`:`right`)}),O(Je.width,e=>{z.value||k.value!==null&&(e<=0||Math.abs(e-k.value)<Sc||(k.value=H(e),P.value=`left`))}),t(()=>{Me(),ne&&clearTimeout(ne),W&&clearTimeout(W),ce()}),N(()=>{Dt(`shell:vue:onMounted`)}),A(()=>{Dt(`shell:vue:onUpdated`)}),D(()=>{Dt(`shell:vue:onBeforeUpdate`)}),(t,n)=>(w(),o(i,null,[u(`div`,{class:B([`new-shell`,x(Ve)]),ref_key:`shellRootRef`,ref:xe,id:`app-viewport`,"library-visible":x(b),"top-player":he(),"left-drawer":x(b),"right-drawer":x(C),"right-drawer-type":x(r).rightDrawerType,style:y({"--adaptiveColorPercent":x(a).visual.adaptiveColorPercent/100,"--leftSidebarWidth":x(be)+`px`,"--rightSidebarWidth":x(ye)+`px`,"--viewportRadius":x(a).visual.forceViewportRounding?`8px`:`12pt`,"--floating-toolbar-extra":x(_)+`px`,"--mojave-player-lane":x(v)+`px`,position:e.container?`absolute`:`fixed`}),"data-framework":x(r).winChromeType,"data-layout-type":e.layoutType,"data-has-search-on-sidebar":Pc,"data-drawer-resizing":x(I)||void 0,"sugar-color-scheme":x(h),"sugar-enabled":x(p),"data-window-control-side":x(r).getWindowControlsSide()},[u(`div`,{class:B([`new-shell-content`,{"og-mavericks":e.layoutType==`maverick`}])},[u(`div`,uc,[T(t.$slots,`ns_toolbar`,{},void 0,!0),x(a).visual.titleBarStyle==`winui`&&!e.noTitleBar?(w(),d(tn,{key:0})):m(``,!0),T(t.$slots,`toolbar`,{},void 0,!0)]),u(`div`,{class:`ns-split-view`,ref_key:`splitViewRef`,ref:Se},[U(M,{name:x(c)},{default:L(()=>[x($e)?m(``,!0):V((w(),o(`div`,dc,[U(Oe,null,{default:L(()=>[U(ec,{"search-bar":Pc})]),_:1}),u(`div`,{class:`left-drawer-resize-handle`,onPointerdown:n[0]||=(...e)=>x(Le)&&x(Le)(...e),onContextmenu:n[1]||=(...e)=>x(tt).showContextMenu&&x(tt).showContextMenu(...e)},null,32)],512)),[[R,x(b)]])]),_:1},8,[`name`]),u(`div`,{class:B([`new-shell-page-container`,{"left-drawer-opened":x(b)&&!x($e),"right-drawer-opened":x(C)&&!x(Qe),"no-margins":x(Ke),"winui-rounded":x(r).hasTitleBar&&x(b)}]),ref_key:`ViewportRef`,ref:qe,"viewport-should-be-rounded":x(We),"data-corner-cut":x(Ge)},[u(`div`,pc,[T(t.$slots,`ns_layout_top`,{},void 0,!0),T(t.$slots,`toolbar-inline`,{viewportSize:Xe,uiLeftDrawerOpen:x(b),uiRightDrawerOpen:x(C),hasOverlayRightDrawer:x(Qe)},void 0,!0)]),u(`div`,{class:B([`ns-page-content-freeze-layer`,{"is-frozen":x(k)!==null,"anchor-right":x(P)===`right`}]),ref_key:`pageContentFreezeLayer`,ref:E,style:y(x(k)===null?void 0:{"--frozenPageWidth":x(k)+`px`})},[u(`div`,mc,[u(`div`,{class:`ns-qlayout-motion`,ref_key:`pageMotionRef`,ref:ee},[U(ke,{container:``},{default:L(()=>[n[6]||=u(`div`,{"layer-pagebg":``},null,-1),n[7]||=u(`div`,{"layer-page-floating-actions":``},null,-1),U(Ze,null,{default:L(()=>[U(Ne,{class:`ns-cqbounds`},{default:L(()=>[U(us,null,{default:L(()=>[(w(!0),o(i,null,te(x(q).activeTabs,e=>V((w(),o(`div`,{key:e.id},[U(Uo,{tab:e,inactive:x(q).currentTab!=e.id},null,8,[`tab`,`inactive`])],512)),[[R,x(q).currentTab==e.id]])),128))]),_:1})]),_:1})]),_:1})]),_:1})],512)]),x(Qe)?(w(),d(M,{key:0,name:x(l)},{default:L(()=>[x(C)?(w(),o(`div`,{key:0,class:`right-drawer-overlay`,ref_key:`overlayRightDrawer`,ref:et},[u(`div`,hc,[u(`div`,{class:B([`right-drawer-content-freeze`,{"is-pinned":x(Ce)!==null}]),style:y(x(Ce)===null?void 0:{"--rightDrawerPin":x(Ce)+`px`})},[U(ai)],6),u(`div`,{class:`right-drawer-resize-handle`,onPointerdown:n[2]||=(...e)=>x(Re)&&x(Re)(...e),onContextmenu:n[3]||=(...e)=>x(nt).showContextMenu&&x(nt).showContextMenu(...e)},null,32)])],512)):m(``,!0)]),_:1},8,[`name`])):m(``,!0),x(Qe)?(w(),d(M,{key:1,name:x(l)},{default:L(()=>[x(C)?(w(),o(`div`,gc,[...n[8]||=[u(`div`,{class:`right-drawer-overlay_dummy`},[u(`div`,{class:`window_shadow`})],-1)]])):m(``,!0)]),_:1},8,[`name`])):m(``,!0)],6),u(`div`,_c,[T(t.$slots,`ns_layout_bottom`,{},void 0,!0),T(t.$slots,`amplcd-shelf`,{viewportSize:Xe},void 0,!0)]),u(`div`,vc,[T(t.$slots,`bottom-toolbar-inline`,{uiLeftDrawerOpen:x(b),uiRightDrawerOpen:x(C),hasOverlayRightDrawer:x(Qe)},void 0,!0)]),U(es)],10,fc),U(M,{name:x(l)},{default:L(()=>[x(C)&&!x(Qe)?(w(),o(`div`,{key:0,class:B([`ns-sidebar ns-sidebar--right`,{"ifSidebarPadding-top":e.layoutType.includes(`-if`),"ifSidebarPadding-bottom":e.layoutType.includes(`-if`)&&x(r).isRightDrawerView(`lyrics`)}])},[u(`div`,{class:B([`right-drawer-content-freeze`,{"is-pinned":x(Ce)!==null}]),style:y(x(Ce)===null?void 0:{"--rightDrawerPin":x(Ce)+`px`})},[U(ai)],6),u(`div`,{class:`right-drawer-resize-handle`,onPointerdown:n[4]||=(...e)=>x(Re)&&x(Re)(...e),onContextmenu:n[5]||=(...e)=>x(nt).showContextMenu&&x(nt).showContextMenu(...e)},null,32)],2)):m(``,!0)]),_:1},8,[`name`])],512),u(`div`,yc,[T(t.$slots,`ns_bottom_toolbar`,{},void 0,!0),T(t.$slots,`bottom-toolbar`,{},void 0,!0)])],2)],14,lc),x($e)?(w(),d(M,{key:0,name:x(f)},{default:L(()=>[V(u(`div`,{ref_key:`overlayLeftDrawer`,ref:me,class:B([`left-drawer-overlay`,{"left-drawer-overlay--compact":x(r).compactSidebar}])},[U(Oe,null,{default:L(()=>[U(ec,{"search-bar":x(Qe)},null,8,[`search-bar`])]),_:1})],2),[[R,x(r).leftDrawerOverlayOpened]])]),_:1},8,[`name`])):m(``,!0),x(a).visual.backgroundBlurMap.enabled?(w(),d(ac,{key:1})):m(``,!0),x(a).visual.useAdaptiveColors?(w(),d(is,{key:2})):m(``,!0),x(a).visual.sweetener.useImmersiveBG&&x(r).renderPageContent&&!e.container&&!x(xt)()&&!x($t)?(w(),o(`div`,bc,[U(Jo)])):m(``,!0)],64))}})})),Lc=e((()=>{})),Rc,zc=e((()=>{Ic(),Ic(),Lc(),X(),Rc=q(Fc,[[`__scopeId`,`data-v-f51033e9`]])})),Bc,Vc=e((()=>{E(),zc(),Bc=b({__name:`BareLayout`,props:{container:{type:Boolean},noTitleBar:{type:Boolean},layoutType:{}},setup(e){return(t,n)=>(w(),d(Rc,{container:e.container,"no-title-bar":e.noTitleBar,"layout-type":e.layoutType},{ns_toolbar:L(()=>[T(t.$slots,`ns_toolbar`)]),ns_layout_top:L(()=>[T(t.$slots,`ns_layout_top`)]),ns_layout_bottom:L(()=>[T(t.$slots,`ns_layout_bottom`)]),ns_bottom_toolbar:L(()=>[T(t.$slots,`ns_bottom_toolbar`)]),_:3},8,[`container`,`no-title-bar`,`layout-type`]))}})})),Hc,Uc=e((()=>{Vc(),Vc(),Hc=Bc})),Wc,Gc=e((()=>{E(),dr(),On(),$(),Zr(),Wc=b({__name:`CastButton`,setup(e){let t=Q(),n=Xr();return(e,r)=>(w(),d(xn,{class:`cast-button`,"native-title":``,title:e.$i(`action.cast.chromecast`),active:x(t).isRightDrawerView(`cast`)||x(n).isCasting,onClick:r[0]||=e=>x(t).invokeRightDrawerView(`cast`)},{default:L(()=>[u(`div`,{class:B([`nav-glyph`,{casting:x(n).isCasting}])},[U(Cr,{icon:`/cider-assets/cider-icons/chromecast.svg`})],2)]),_:1},8,[`title`,`active`]))}})})),Kc=e((()=>{})),qc,Jc=e((()=>{Gc(),Gc(),Kc(),X(),qc=q(Wc,[[`__scopeId`,`data-v-28621ecf`]])})),Yc=e((()=>{})),Xc,Zc,Qc,$c=e((()=>{E(),On(),mn(),h(),Yc(),X(),Xc={class:`nav-glyph`},Zc={__name:`AudioLabsButton`,setup(e){return(e,t)=>(w(),d(xn,{title:e.$i(`term.audioSettings`),"native-title":``,onClick:x(hn)},{default:L(()=>[u(`div`,Xc,[U(x(H),{type:`headphones`})])]),_:1},8,[`title`,`onClick`]))}},Qc=q(Zc,[[`__scopeId`,`data-v-ea017faf`]])})),el,tl,nl,rl,il=e((()=>{E(),Pt(),vn(),Z(),mt(),Bt(),el=[`title`],tl={class:`profile-artwork`},nl=[`src`],rl=b({__name:`HomeButton`,setup(e){let t=tt();Rt();let n=j(()=>t.profile?.attributes?.artwork?It(t.profile?.attributes?.artwork.url,64,64):In);return(e,t)=>(w(),o(`div`,{class:`profile-button`,title:e.$i(`home.title`),onClick:t[0]||=e=>x(Ot)().push(`/am/home`)},[u(`div`,tl,[u(`img`,{src:x(n)},null,8,nl)])],8,el))}})})),al=e((()=>{})),ol,sl=e((()=>{il(),il(),al(),X(),ol=q(rl,[[`__scopeId`,`data-v-5b9d785c`]])})),cl,ll,ul,dl=e((()=>{E(),Lt(),On(),mn(),gt(),ir(),cl={class:`party-button-glyph`},ll={key:1,class:`party-button-badge`},ul=b({__name:`PartyButton`,setup(e){let t=rr();return(e,n)=>(w(),d(xn,{class:`party-button`,active:x(t).inParty,title:x(st)(`Listening Party`,`party.dialog.title`),"native-title":``,onClick:n[0]||=e=>x(bn)()},{default:L(()=>[u(`div`,cl,[U(J,{name:`headphones`,size:`20px`}),x(t).inParty?(w(),o(`span`,{key:0,class:B([`party-button-dot`,x(t).connection])},null,2)):m(``,!0),x(t).isHost&&x(t).pendingCount>0?(w(),o(`span`,ll,r(x(t).pendingCount),1)):m(``,!0)])]),_:1},8,[`active`,`title`]))}})})),fl=e((()=>{})),pl,ml=e((()=>{dl(),dl(),fl(),X(),pl=q(ul,[[`__scopeId`,`data-v-316fea62`]])})),hl,gl=e((()=>{E(),Lt(),On(),mn(),$(),hl=b({__name:`SearchButton`,setup(e){let t=Q();function n(){if(t.commandCenterOpen){t.commandCenterOpen=!1;return}An()}return(e,r)=>(w(),d(xn,{"native-title":``,title:e.$i(`term.search`),active:x(t).commandCenterOpen,onClick:n},{default:L(()=>[U(J,{name:`search`})]),_:1},8,[`title`,`active`]))}})})),_l=e((()=>{})),vl,yl=e((()=>{gl(),gl(),_l(),X(),vl=q(hl,[[`__scopeId`,`data-v-145175ff`]])})),bl,xl,Sl,Cl=e((()=>{E(),bt(),dt(),pn(),bl={class:`label`},xl={class:`track`},Sl=b({__name:`LibrarySyncIndicator`,setup(e){let t=pt(),n=Nt(),i=j(()=>t.showable&&t.libraryViewActive&&n.activeTabs.length<=1),a=j(()=>_t(t.kind===`albums`?`term.album`:`term.song`,{count:t.total}).toLowerCase()),s=j(()=>t.indeterminate?t.total<=0?st(`Synchronizing your library…`,`library.sync.indeterminateUnknown`):st(`Synchronizing {count} {items}…`,`library.sync.indeterminate`,{count:t.total,items:a.value}):st(`Synchronizing {count} {items}, {remaining} remaining`,`library.sync.progress`,{count:t.total,items:a.value,remaining:t.remaining}));return(e,n)=>(w(),d(M,{name:`sync-capsule`},{default:L(()=>[i.value?(w(),o(`div`,{key:0,class:B([`library-sync-capsule`,{indeterminate:x(t).indeterminate}])},[u(`span`,bl,r(s.value),1),u(`div`,xl,[u(`div`,{class:`bar`,style:y(x(t).indeterminate?void 0:{width:`${x(t).percent}%`})},null,4)])],2)):m(``,!0)]),_:1}))}})})),wl=e((()=>{})),Tl,El=e((()=>{Cl(),Cl(),wl(),X(),Tl=q(Sl,[[`__scopeId`,`data-v-5a995a0f`]])})),Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Fl,Il,Ll=e((()=>{pe(),Qe(),Pe(),Ae(),Ge(),Fe(),E(),Zn(),Zt(),kn(),Lt(),Dl={key:0,class:`notification-pill__resting`},Ol=[`onClick`],kl={key:0,class:`notification-pill__lead`},Al={key:3,class:`notification-pill__badge notification-pill__badge--corner`},jl={class:`notification-pill__text`},Ml={class:`notification-pill__title`},Nl={key:0,class:`notification-pill__subtitle`},Pl=`nicon:`,Fl=2,Il=b({__name:`NotificationMorphic`,setup(e){let t=Qt(),{contentRef:n,measuredWidth:c,measure:l}=er(),f={info:`ion-information-circle`,success:`ion-checkmark-circle`,warning:`ion-warning`,error:`ion-close-circle`},p=j(()=>t.activeNotification),h=j(()=>p.value!==null),_=j(()=>!p.value&&t.hasPersistent),v=j(()=>h.value||_.value),b=j(()=>!p.value||p.value.working?null:p.value.icon??f[p.value.type]??f.info),C=j(()=>b.value?.startsWith(Pl)??!1),T=j(()=>b.value?C.value?b.value.slice(6):b.value:``),E=j(()=>v.value?h.value?{width:c.value===null?`auto`:`${c.value}px`}:{width:`38px`}:{}),D=s(0);O(()=>p.value?.id,()=>{D.value=t.queueCount}),O(()=>t.queueCount,e=>{e>D.value&&(D.value=e)}),O([h,()=>p.value?.title,()=>p.value?.subtitle,()=>p.value?.working],()=>{h.value&&S(l)});let ee=s(null),k=j(()=>!!p.value?.working||!!b.value),A=s(!1),N=j(()=>A.value&&k.value&&D.value>0),P=null,I=!1;function R(){let e=ee.value;if(!e){A.value=!1;return}A.value=e.scrollWidth-e.clientWidth>Fl}function z(e){e.propertyName===`width`&&e.target===ee.value&&(I=!0)}function V(e){e.propertyName!==`width`||e.target!==ee.value||(I=!1,R())}function H(e){e.propertyName===`width`&&e.target===ee.value&&(I=!1)}function ne(e){P?.disconnect(),P=null,I=!1,e&&(e.removeEventListener(`transitionrun`,z),e.removeEventListener(`transitionend`,V),e.removeEventListener(`transitioncancel`,H))}return O(ee,(e,t)=>{if(ne(t??null),!e){A.value=!1;return}e.addEventListener(`transitionrun`,z),e.addEventListener(`transitionend`,V),e.addEventListener(`transitioncancel`,H),P=new ResizeObserver(()=>{I||R()}),P.observe(e),R()},{flush:`post`}),F(()=>ne(ee.value)),(e,s)=>(w(),d(M,{name:`morphic-pill`},{default:L(()=>[v.value?(w(),o(`div`,{key:0,ref_key:`pillRef`,ref:ee,class:B([`notification-pill window-nodrag`,{"notification-pill--resting":_.value}]),style:y(E.value)},[_.value?(w(),o(`div`,Dl,[x(t).hasWorking?(w(),d(Sn,{key:0,size:`1.3em`})):(w(),d(K,{key:1,name:`ion-notifications`,size:`1.4em`})),U(Ie,{anchor:`bottom middle`,self:`top middle`},{default:L(()=>[U(Oe,{class:`notify-popup-list`,separator:``},{default:L(()=>[(w(!0),o(i,null,te(x(t).persistentList,e=>(w(),d(Ye,{key:e.id,clickable:``},{default:L(()=>[e.working?(w(),d(He,{key:0,side:``},{default:L(()=>[U(Sn)]),_:1})):(w(),d(He,{key:1,side:``},{default:L(()=>[u(`div`,{class:`dismiss-btn`,onClick:a(n=>x(t).dismiss(e.id),[`stop`])},[U(K,{name:`close`})],8,Ol)]),_:2},1024)),U(He,null,{default:L(()=>[U(Me,null,{default:L(()=>[g(r(e.title),1)]),_:2},1024),e.subtitle?(w(),d(Me,{key:0,caption:``},{default:L(()=>[g(r(e.subtitle),1)]),_:2},1024)):m(``,!0)]),_:2},1024),e.progress==null?m(``,!0):(w(),d(He,{key:2,side:``},{default:L(()=>[g(r(e.progress)+`% `,1)]),_:2},1024))]),_:2},1024))),128))]),_:1})]),_:1})])):(w(),o(`div`,{key:1,ref_key:`contentRef`,ref:n,class:`notification-pill__content`},[U(M,{name:`notif-swap`,mode:`out-in`},{default:L(()=>[(w(),o(`div`,{class:`notification-pill__inner`,key:p.value?.id??``},[k.value?(w(),o(`div`,kl,[p.value?.working?(w(),d(Sn,{key:0,size:`1.3em`,class:`notification-pill__icon`})):C.value?(w(),d(J,{key:1,name:T.value,size:`1.3em`,class:`notification-pill__icon`},null,8,[`name`])):(w(),d(K,{key:2,name:T.value,size:`1.3em`,class:`notification-pill__icon`},null,8,[`name`])),N.value?(w(),o(`span`,Al,`+`+r(D.value),1)):m(``,!0)])):m(``,!0),u(`div`,jl,[u(`span`,Ml,r(p.value?.title),1),p.value?.subtitle?(w(),o(`span`,Nl,r(p.value?.subtitle),1)):m(``,!0)]),D.value>0?(w(),o(`span`,{key:1,class:B([`notification-pill__badge`,{"notification-pill__badge--stowed":N.value}])},`+`+r(D.value),3)):m(``,!0)]))]),_:1})],512))],6)):m(``,!0)]),_:1}))}})})),Rl=e((()=>{})),zl,Bl=e((()=>{Ll(),Ll(),Rl(),X(),zl=q(Il,[[`__scopeId`,`data-v-a93657d2`]])})),Vl,Hl=e((()=>{me(),E(),mn(),$(),Vl=b({__name:`UpdateAppButton`,setup(e){let t=Q();function n(){Dn(`updates`)}return(e,r)=>x(t).updateAvailable?(w(),d(fe,{key:0,color:`primary`,icon:`ion-ios-download`,label:e.$i(`action.update`),onClick:n},null,8,[`label`])):m(``,!0)}})})),Ul,Wl=e((()=>{Hl(),Hl(),Ul=Vl})),Gl,Kl,ql,Jl,Yl,Xl,Zl=e((()=>{Fn(),De(),be(),pe(),Fe(),qe(),E(),G(),qt(),Z(),an(),et(),Jc(),$c(),Ht(),ht(),$(),ko(),sl(),jr(),ml(),Dr(),Mr(),yl(),On(),El(),Gr(),oo(),uo(),Bl(),zr(),Po(),Wl(),Gl={class:`tabs-container`},Kl={key:0,class:`chrome-top-overflow-slot`,"data-overflow-slot":``},ql={class:`overflow-items-grid`},Jl={key:2,class:`chrome-top-overflow-slot`,"data-overflow-slot":``},Yl=8,Xl=b({__name:`chrome-top`,props:{secondaryBar:{type:Boolean,default:!1},searchBar:{type:Boolean,default:!0},noControls:{type:Boolean,default:!1},excludeControls:{default:()=>[]}},setup(e){let n=Q(),r=it(),c=Rt(),l=e,f=j(()=>n.getWindowControlsSide()),p=oe(),h=oe(),g=j(()=>Y(`audio.ciderAudio.enabled`)&&Y(`audio.ciderAudio.showInToolbar`)),_=j(()=>Y(`appleMusic.home.buttonLocation`)===`top`&&Y(`ui.chromeTopWidget`)!==`am-tabs`),v=j(()=>Y(`connectivity.parties.enabled`)!==!1),y=j(()=>n.leftDrawerOpen?!Y(`components.SidebarProfile.HasMainMenu`)||!Y(`components.SidebarProfile.Enabled`):!0),b=j(()=>Y(`ui.mainMenuPosition`)===`left`),S=j(()=>l.searchBar===!1?!1:!n.sidebarSearchVisible),C=j(()=>!!(n.isIfLayout&&f.value==`left`&&!n.leftDrawerOpen||!n.isIfLayout&&f.value==`left`)),T=j(()=>vt.CustomButtons.getCustomButtonsByPosition(`chrome-top/right`)),E=j(()=>Y(`casting.chromecast.enabled`)&&(Xt(`cast:chromecast`)||St())&&!l.excludeControls.includes(`cast`)),D=j(()=>_.value||g.value),ee=j(()=>E.value||T.value.length>0||n.updateAvailable),k=j(()=>D.value||ee.value),A=s(null),P=s(!1),F=null,I=null,R=null,z=[],V=null;function H(){let e=F;if(!e||e.querySelector(`.chrome-item-enter-active, .chrome-item-leave-active`))return;let t=getComputedStyle(e),n=parseFloat(t.columnGap)||0,r=e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight);if(r<=0)return;let i=0,a=0,o=0,s=0,c=e.children;for(let e=0;e<c.length;e+=1){let t=c[e];if(!(t instanceof HTMLElement)||t.classList.contains(`tabs-container`)||t.classList.contains(`q-space`))continue;let n=t.getBoundingClientRect().width;n!==0&&(t.dataset.overflowSlot===void 0?(i+=n,a+=1):(o+=n,s+=1))}if(i+=n*Math.max(0,a-1),P.value||(V=o+n*s),V===null)return;let l=i+V;if(l+Yl<=r){P.value=!1;return}if(l<=r)return;let u=e.querySelector(`.chrome-button`),d=u?u.getBoundingClientRect().width+n:0;P.value=V>d}function ne(e){e.propertyName===`width`&&H()}function re(){let e=F;if(!e||!I)return;let t=Array.from(e.children);if(!(t.length===z.length&&t.every((e,t)=>e===z[t]))){I.disconnect(),I.observe(e);for(let e of t)I.observe(e);z=t}}return O(()=>[_.value,g.value,E.value,T.value.length,n.updateAvailable],()=>{V=null,P.value=!1}),N(()=>{F=A.value?.$el??null,F&&(I=new ResizeObserver(H),R=new MutationObserver(()=>{re(),H()}),R.observe(F,{childList:!0}),F.addEventListener(`transitionend`,ne),re(),H())}),t(()=>{F?.removeEventListener(`transitionend`,ne),I?.disconnect(),R?.disconnect(),I=null,R=null,z=[],F=null}),(t,s)=>{let l=_n;return w(),o(i,null,[U(x(p).define,null,{default:L(()=>[U(M,{name:`chrome-item`},{default:L(()=>[_.value?(w(),d(ol,{key:0})):m(``,!0)]),_:1}),U(M,{name:`chrome-item`},{default:L(()=>[g.value?(w(),d(Qc,{key:0})):m(``,!0)]),_:1})]),_:1}),U(x(h).define,null,{default:L(()=>[U(M,{name:`chrome-item`},{default:L(()=>[E.value?(w(),d(qc,{key:0})):m(``,!0)]),_:1}),(w(!0),o(i,null,te(T.value,(e,t)=>(w(),d(Vr,{key:t,button:e},null,8,[`button`]))),128)),U(Ul)]),_:1}),U(Ue,{ref_key:`toolbar`,ref:A,class:B([`text-default flex chrome-top window-drag`,{"full-w":e.secondaryBar,"window-nodrag":e.secondaryBar,"color-enabled":x(Y)(`visual.useAdaptiveColors`),"left-controls":C.value,"no-controls":x(n).hasTitleBar||x(n).isIfLayout&&f.value==`left`||e.noControls}]),onDblclick:s[0]||=a(e=>x(nn).maximizeWindow(),[`self`])},{default:L(()=>[u(`div`,Gl,[U(Oo),U(Tl)]),U(M,{name:`chrome-item`},{default:L(()=>[b.value&&!e.excludeControls.includes(`mainMenu`)&&y.value?(w(),d(Kr,{key:0})):m(``,!0)]),_:1}),U(ao),U(No),!P.value&&D.value?(w(),o(`div`,Kl,[U(x(p).reuse)])):m(``,!0),U(M,{name:`chrome-item`},{default:L(()=>[x(n).pageLoading?(w(),d(xn,{key:0},{default:L(()=>[U(Le,{size:`16px`})]),_:1})):m(``,!0)]),_:1}),U($e),U(M,{name:`chrome-item`},{default:L(()=>[S.value?(w(),d(vl,{key:0})):m(``,!0)]),_:1}),U(zl),P.value&&k.value?(w(),d(xn,{key:1,"native-title":``,title:t.$lz(`Hidden Icons`,`chromeTop.hiddenIcons`),"data-overflow-slot":``},{menu:L(()=>[U(Ie,null,{default:L(()=>[u(`div`,ql,[U(x(p).reuse),U(x(h).reuse)])]),_:1})]),default:L(()=>[U(K,{name:`fa-solid fa-chevron-down`})]),_:1},8,[`title`])):ee.value?(w(),o(`div`,Jl,[U(x(h).reuse)])):m(``,!0),U(l,null,{default:L(()=>[U(lo),e.excludeControls.includes(`lyrics`)?m(``,!0):(w(),d(Nr,{key:0})),e.excludeControls.includes(`queue`)?m(``,!0):(w(),d(Pr,{key:1})),U(M,{name:`chrome-item`},{default:L(()=>[v.value&&!e.excludeControls.includes(`party`)?(w(),d(pl,{key:0})):m(``,!0)]),_:1}),U(M,{name:`chrome-item`},{default:L(()=>[e.secondaryBar&&(x(r).player.playerType==`podcast`||x(c).audio.allowPlaybackRateChangeEverywhere)?(w(),d(Or,{key:0})):m(``,!0)]),_:1}),U(M,{name:`chrome-item`},{default:L(()=>[!b.value&&!e.excludeControls.includes(`mainMenu`)&&y.value?(w(),d(Kr,{key:0})):m(``,!0)]),_:1})]),_:1})]),_:1},8,[`class`])],64)}}})})),Ql=e((()=>{})),$l,eu=e((()=>{Zl(),Zl(),Ql(),X(),$l=q(Xl,[[`__scopeId`,`data-v-965adc75`]])})),tu,nu,ru=e((()=>{E(),Hr(),oi(),eu(),Ee(),Z(),wa(),$(),zc(),tu={key:0,class:`lg-surface`},nu=b({__name:`CalicoLayout`,props:{container:{type:Boolean},noTitleBar:{type:Boolean},layoutType:{}},setup(e){let t=Te(),n=Q(),r=j(()=>!!Y(`components.MojaveLayouts.FloatingPlayer`)),i=j(()=>Y(`components.MojaveLayouts.FloatingPlayerRadius`)??0),a=j(()=>ut()),s=j(()=>a.value===`blur`),c=j(()=>a.value===`none`),l=j(()=>a.value===`liquid-glass`),f=j(()=>{if(!r.value)return{};let e=Y(`components.MojaveLayouts.FloatingPlayerPadding`)??8,t=i.value;return{"--floatingInset":e+`px`,"--floatingRadius":t?t+`px`:void 0}}),p=j(()=>t.dark.isActive?`rgb(0 0 0 / 65%)`:`rgb(255 255 255 / 75%)`);return(t,a)=>(w(),d(Rc,{container:e.container,"no-title-bar":e.noTitleBar,"layout-type":e.layoutType},{ns_toolbar:L(()=>[T(t.$slots,`ns_toolbar`,{},void 0,!0)]),ns_layout_top:L(()=>[T(t.$slots,`ns_layout_top`,{},void 0,!0)]),ns_layout_bottom:L(()=>[T(t.$slots,`ns_layout_bottom`,{},void 0,!0)]),ns_bottom_toolbar:L(()=>[T(t.$slots,`ns_bottom_toolbar`,{},void 0,!0)]),"toolbar-inline":L(({uiLeftDrawerOpen:e,uiRightDrawerOpen:t,hasOverlayRightDrawer:r})=>[U($l,{"search-bar":x(n).compactSidebar||!e,"no-controls":t&&!r,"exclude-controls":[`searchButton`]},null,8,[`search-bar`,`no-controls`])]),"bottom-toolbar-inline":L(()=>[u(`div`,{class:B([`ns-bottom-toolbar_inline`,{"ns-bottom-toolbar_floating":x(r),"ns-bottom-toolbar_stationary":!x(r),"ns-bottom-toolbar_blur":x(s),"ns-bottom-toolbar_none":x(c)}]),style:y(x(f))},[x(l)&&!x(r)?(w(),o(`div`,tu,[U(si,{"bezel-width":32,radius:16,blur:4,"specular-alpha":0,tint:x(p),"border-bottom-left-radius":0,"border-bottom-right-radius":0,"inner-glow-feather":10,interactive:!1,"no-glow":!0},null,8,[`tint`])])):x(l)?(w(),o(`div`,{key:1,class:`lg-surface`,style:y({borderRadius:x(i)+`px`})},[U(Br,{blur:4,tint:x(p),"specular-sharpness":2,"specular-alpha":.7,"bezel-width":32,"inner-glow-feather":10,interactive:!1,radius:x(i)},null,8,[`tint`,`radius`])],4)):x(s)?(w(),o(`div`,{key:2,class:B([`blur-surface`,{"blur-surface--floating":x(r),"blur-surface--stationary":!x(r)}]),style:y(x(r)?{borderRadius:x(i)+`px`}:void 0)},null,6)):m(``,!0),U(Ca)],6)]),_:3},8,[`container`,`no-title-bar`,`layout-type`]))}})})),iu=e((()=>{})),au,ou=e((()=>{ru(),ru(),iu(),X(),au=q(nu,[[`__scopeId`,`data-v-c5216d59`]])}));function su(e,t){return t||(e=="default"?`mojave`:e==`cupertino`?`maverick`:e)}var cu=e((()=>{})),lu,uu=e((()=>{E(),eu(),Ee(),qr(),rt(),zc(),lu=b({__name:`MavericksLayout`,props:{container:{type:Boolean},noTitleBar:{type:Boolean},layoutType:{}},setup(e){let t=Te(),n=jt(),r=j(()=>n.getComponent(`TopPlayerMavericks`)),i=s(700);return(n,a)=>(w(),d(Rc,{container:e.container,"no-title-bar":e.noTitleBar,"layout-type":e.layoutType},{ns_toolbar:L(()=>[T(n.$slots,`ns_toolbar`)]),ns_layout_top:L(()=>[T(n.$slots,`ns_layout_top`)]),ns_layout_bottom:L(()=>[T(n.$slots,`ns_layout_bottom`)]),ns_bottom_toolbar:L(()=>[T(n.$slots,`ns_bottom_toolbar`)]),toolbar:L(()=>[u(`div`,null,[U(x(r),{"show-lcd":x(t).screen.width>x(i)},null,8,[`show-lcd`])])]),"toolbar-inline":L(()=>[U($l,{"secondary-bar":``,"search-bar":!1,"exclude-controls":[`mainMenu`,`lyrics`,`queue`,`searchButton`]})]),"amplcd-shelf":L(()=>[x(t).screen.width<x(i)?(w(),d(Jr,{key:0})):m(``,!0)]),_:3},8,[`container`,`no-title-bar`,`layout-type`]))}})})),du,fu=e((()=>{uu(),uu(),du=lu})),pu,mu,hu,gu,_u,vu,yu,bu,xu,Su=e((()=>{E(),Sr(),Ir(),Lr(),hr(),xr(),gt(),ht(),pu=[`aria-label`],mu={class:`mobile-mini-player__art`},hu={key:1,class:`mobile-mini-player__art-placeholder`},gu={class:`mobile-mini-player__main`},_u={class:`mobile-mini-player__title`},vu={class:`mobile-mini-player__progress-row`},yu={class:`mobile-mini-player__progress`},bu={class:`mobile-mini-player__times`},xu=b({__name:`MobileMiniPlayerBar`,setup(e){let t=it(),n=j(()=>t.nowPlayingItemMediaItem?.attributes?.name||t.player.nowPlayingItem?.attributes?.name||st(`Not Playing`,`term.notPlaying`)),i=j(()=>!!t.player.currentArtworkUrl);return(e,s)=>(w(),o(`div`,{class:`mobile-mini-player`,role:`button`,tabindex:`0`,"aria-label":x(st)(`Now Playing`,`term.nowPlaying`),style:y(x(t).artworkCSSColors)},[u(`div`,mu,[x(i)?(w(),d(Fr,{key:0,class:`no-shadow`,artwork:x(t).nowPlayingArtwork,loading:`eager`,"artwork-type":`list-item`,"no-shadow":``},null,8,[`artwork`])):(w(),o(`div`,hu))]),u(`div`,gu,[u(`div`,_u,r(x(n)),1),u(`div`,vu,[u(`div`,yu,[U(fr,{class:`mobile-mini-player__bar`,readonly:``})]),u(`div`,bu,[U(Rr,{type:`current`}),s[2]||=u(`span`,{class:`mobile-mini-player__times-sep`},`/`,-1),U(Rr,{type:`duration`})])])]),u(`div`,{class:`mobile-mini-player__controls`,onClick:s[0]||=a(()=>{},[`stop`]),onPointerdown:s[1]||=a(()=>{},[`stop`])},[U(gr),U(mr)],32)],12,pu))}})})),Cu=e((()=>{})),wu,Tu=e((()=>{Su(),Su(),Cu(),X(),wu=q(xu,[[`__scopeId`,`data-v-ad9f8ccf`]])})),Eu,Du,Ou,ku,Au,ju,Mu,Nu,Pu,Fu,Iu,Lu,Ru,zu=e((()=>{pe(),E(),$n(),pr(),kr(),_r(),Lr(),lr(),vr(),Yn(),wn(),ht(),Eu={class:`mnp-player`},Du={class:`mnp-player__content`},Ou={key:`player`,class:`mnp-player__view mnp-player__stage`},ku={key:1,class:`mnp-player__artwork-placeholder`},Au={class:`mnp-player__controls`},ju={class:`mnp-player__meta`},Mu={key:`queue`,class:`mnp-player__view mnp-player__panel`},Nu={key:`lyrics`,class:`mnp-player__view mnp-player__panel mnp-player__lyrics`},Pu={class:`mnp-player__tabs`},Fu=[`aria-label`],Iu=[`aria-label`],Lu=[`aria-label`],Ru=b({__name:`MobileNowPlayingPlayer`,setup(e){let t=[`player`,`queue`,`lyrics`],n=it(),r=s(`player`),i=s(`mnp-slide-left`),a=f({player:!0,queue:!1,lyrics:!1}),{showContextMenu:c}=Cn({}),l=j(()=>!!n.player.currentArtworkUrl);function p(e){if(e===r.value)return;let n=t.indexOf(r.value);i.value=t.indexOf(e)>n?`mnp-slide-left`:`mnp-slide-right`,a[e]=!0,r.value=e}return(e,t)=>(w(),o(`div`,Eu,[u(`div`,Du,[U(M,{name:x(i)},{default:L(()=>[V(u(`div`,Ou,[u(`div`,{class:B([`mnp-player__artwork`,{"mnp-player__artwork--paused":!x(n).player.isPlaying}])},[x(l)?(w(),d(Fr,{key:0,class:`no-shadow`,artwork:x(n).nowPlayingArtwork,loading:`eager`,"artwork-type":`list-item`,"no-shadow":``},null,8,[`artwork`])):(w(),o(`div`,ku))],2),u(`div`,Au,[u(`div`,ju,[U(wr,{class:`mnp-player__meta-text`}),U(ur,{class:`mnp-player__more`,onClick:x(c)},null,8,[`onClick`])]),U(Ar,{class:`mnp-player__progress`}),U(br,{class:`mnp-player__actions`}),U(yr,{class:`mnp-player__volume`})])],512),[[R,x(r)===`player`]])]),_:1},8,[`name`]),U(M,{name:x(i)},{default:L(()=>[x(a).queue?V((w(),o(`div`,Mu,[U(tr,{"has-tabs":!1,"select-tab":`queue`})],512)),[[R,x(r)===`queue`]]):m(``,!0)]),_:1},8,[`name`]),U(M,{name:x(i)},{default:L(()=>[x(a).lyrics?V((w(),o(`div`,Nu,[U(Wn,{"show-no-lyrics-found-text":!1})],512)),[[R,x(r)===`lyrics`]]):m(``,!0)]),_:1},8,[`name`])]),u(`div`,Pu,[u(`button`,{type:`button`,class:B([`mnp-player__tab`,{"mnp-player__tab--active":x(r)===`player`}]),"aria-label":e.$lz(`Now Playing`,`term.nowPlaying`),onClick:t[0]||=e=>p(`player`)},[U(K,{name:`svguse:cider-assets/cider-icons/icons.svg#play`,size:`22px`})],10,Fu),u(`button`,{type:`button`,class:B([`mnp-player__tab`,{"mnp-player__tab--active":x(r)===`queue`}]),"aria-label":e.$i(`term.queue`),onClick:t[1]||=e=>p(`queue`)},[U(K,{name:`svguse:cider-assets/cider-icons/icons.svg#queue-music`,size:`22px`})],10,Iu),u(`button`,{type:`button`,class:B([`mnp-player__tab`,{"mnp-player__tab--active":x(r)===`lyrics`}]),"aria-label":e.$i(`term.lyrics`),onClick:t[2]||=e=>p(`lyrics`)},[U(K,{name:`svguse:cider-assets/cider-icons/icons.svg#lyrics`,size:`20px`})],10,Lu)])]))}})})),Bu=e((()=>{})),Vu,Hu=e((()=>{zu(),zu(),Bu(),X(),Vu=q(Ru,[[`__scopeId`,`data-v-63e58ac5`]])})),Uu,Wu,Gu,Ku,qu,Ju=e((()=>{E(),Hu(),On(),ht(),h(),Uu={key:0,class:`mobile-now-playing-host`},Wu=[`aria-label`],Gu={class:`mobile-now-playing__chrome`},Ku={class:`mobile-now-playing__body`},qu=b({__name:`MobileNowPlayingSheet`,props:{modelValue:{type:Boolean}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,i=it(),a=j({get:()=>n.modelValue,set:e=>r(`update:modelValue`,e)}),c=s(!1);function l(){a.value=!1}function d(e){e.key===`Escape`&&l()}let f=[`.mobile-now-playing__close`,`.mnp-player__artwork`,`.mnp-player__controls`,`.mnp-player__tabs`,`.mnp-player__panel`,`button`,`a`,`input`,`textarea`,`[role="button"]`,`[role="slider"]`].join(`,`);function p(e){let t=e.target;t instanceof Element&&(t.closest(f)||l())}return O(()=>n.modelValue,e=>{typeof document<`u`&&(e?document.addEventListener(`keydown`,d):document.removeEventListener(`keydown`,d)),e&&(c.value=!0)}),F(()=>{typeof document<`u`&&document.removeEventListener(`keydown`,d)}),(e,t)=>x(c)?(w(),o(`div`,Uu,[U(M,{name:`mobile-np`},{default:L(()=>[V(u(`div`,{class:`mobile-now-playing`,style:y(x(i).artworkCSSColors),role:`dialog`,"aria-modal":`true`,"aria-label":e.$lz(`Now Playing`,`term.nowPlaying`),onClick:p},[u(`div`,Gu,[U(xn,{class:`mobile-now-playing__close`,onClick:l},{default:L(()=>[U(x(H),{type:`chevron-down`})]),_:1})]),u(`div`,Ku,[U(Vu)])],12,Wu),[[R,x(a)]])]),_:1})])):m(``,!0)}})})),Yu=e((()=>{})),Xu,Zu=e((()=>{Ju(),Ju(),Yu(),X(),Xu=q(qu,[[`__scopeId`,`data-v-b4adf9b9`]])})),Qu,$u,ed,td,nd=e((()=>{E(),Pt(),bt(),Lt(),pn(),Qu=[`aria-label`],$u=[`aria-selected`,`onClick`],ed={class:`mobile-tab-bar__label`},td=b({__name:`MobileTabBar`,setup(e){let t=Ot(),n=Nt(),a=[{id:`home`,path:`/am/listen-now`,match:[`/am/listen-now`,`/am/home`],icon:`home`,label:()=>_t(`home.title`)},{id:`new`,path:`/am/browse`,match:[`/am/browse`],icon:`browse`,label:()=>st(`New`,`catalog.new`)},{id:`radio`,path:`/am/radio`,match:[`/am/radio`],icon:`radio`,label:()=>_t(`term.radio`)},{id:`library`,path:`/am/library`,match:[`/am/library`],icon:`media-library`,label:()=>_t(`term.library`)},{id:`search`,path:`/am/search`,match:[`/am/search`],icon:`search`,label:()=>_t(`term.search`)}],s=j(()=>(n.currentPath||``).split(`?`)[0]||``),c=j(()=>{let e=s.value;return a.find(t=>t.match.some(t=>e===t||e.startsWith(`${t}/`)))?.id??``});function l(e){s.value===e||s.value.startsWith(`${e}/`)||t.push(e)}return(e,t)=>(w(),o(`nav`,{class:`mobile-tab-bar`,role:`tablist`,"aria-label":e.$lz(`Primary`,`term.primary`)},[(w(),o(i,null,te(a,e=>u(`button`,{key:e.id,type:`button`,class:B([`mobile-tab-bar__item`,{"mobile-tab-bar__item--active":x(c)===e.id}]),role:`tab`,"aria-selected":x(c)===e.id,onClick:t=>l(e.path)},[U(J,{class:`mobile-tab-bar__icon`,name:e.icon,size:`22px`},null,8,[`name`]),u(`span`,ed,r(e.label()),1)],10,$u)),64))],8,Qu))}})})),rd=e((()=>{})),id,ad=e((()=>{nd(),nd(),rd(),X(),id=q(td,[[`__scopeId`,`data-v-a98e63d7`]])})),od,sd,cd,ld,ud,dd,fd=e((()=>{Ke(),je(),Ve(),Ge(),E(),Wo(),bt(),G(),eu(),qt(),Z(),Tu(),Zu(),ad(),Yo(),as(),ds(),tc(),oc(),ei(),en(),mt(),$(),od={class:`mobile-shell-page`},sd={class:`mobile-shell-qlayout`},cd={class:`mobile-shell-chrome`},ld={key:2,class:`mobile-shell-top-blurmap`},ud=600,dd=b({__name:`MobileLayout`,props:{container:{type:Boolean},noTitleBar:{type:Boolean},layoutType:{}},setup(e){let t=Rt(),r=Q(),a=tt(),c=Nt(),{leftOverlay:l}=$r(),f=j(()=>r.getWindowControlsSide()===`left`),p=j(()=>!r.appIsFullscreen&&Kt()!==`darwin`&&t.visual.titleBarStyle!==`native`&&r.getWindowControlsSide()===`right`),h=s(!1),g=s();re(g,()=>{r.leftDrawerOverlayOpened&&=!1});function _(){h.value=!0}let v=s(r.bootRevealed?`done`:`pending`),b=j(()=>{if(v.value===`pending`)return`boot-reveal-pending`;if(v.value===`running`)return`boot-reveal-running`}),S,C=O(()=>r.bootRevealed,e=>{e&&(v.value=`running`,S&&clearTimeout(S),S=setTimeout(()=>{v.value=`done`},ud),C())},{immediate:!1});return F(()=>{S&&clearTimeout(S)}),(s,v)=>(w(),o(`div`,{id:`app-viewport`,class:B([`new-shell mobile-shell`,x(b)]),"data-layout-type":`mobile`,style:y({position:e.container?`absolute`:`fixed`,"--top-toolbar-margin":`52px`,"--bottom-toolbar-margin":`138px`})},[u(`div`,{class:B([`mobile-shell-top`,{"mobile-shell-top--traffic-lights":x(f),"mobile-shell-top--caption-buttons":x(p)}])},[T(s.$slots,`ns_toolbar`,{},void 0,!0),T(s.$slots,`ns_layout_top`,{},void 0,!0),U($l,{"secondary-bar":``,"search-bar":!0,"exclude-controls":[`lyrics`,`queue`,`party`]})],2),u(`div`,od,[u(`div`,sd,[U(ke,{container:``},{default:L(()=>[v[1]||=u(`div`,{"layer-pagebg":``},null,-1),v[2]||=u(`div`,{"layer-page-floating-actions":``},null,-1),U(Ze,null,{default:L(()=>[U(Ne,{class:`mobile-shell-cqbounds`},{default:L(()=>[U(us,null,{default:L(()=>[(w(!0),o(i,null,te(x(c).activeTabs,e=>V((w(),o(`div`,{key:e.id},[U(Uo,{tab:e,inactive:x(c).currentTab!=e.id},null,8,[`tab`,`inactive`])],512)),[[R,x(c).currentTab==e.id]])),128))]),_:1})]),_:1})]),_:1})]),_:1})])]),u(`div`,cd,[T(s.$slots,`ns_layout_bottom`,{},void 0,!0),T(s.$slots,`ns_bottom_toolbar`,{},void 0,!0),x(a).isAuthorized?(w(),o(`div`,{key:0,class:`mobile-shell-miniplayer`,onClick:_},[U(wu)])):m(``,!0),U(id,{class:`mobile-shell-tabs`})]),U(M,{name:x(l)},{default:L(()=>[V(u(`div`,{ref_key:`overlayLeftDrawer`,ref:g,class:`left-drawer-overlay`},[U(Oe,null,{default:L(()=>[U(ec,{"search-bar":!0})]),_:1})],512),[[R,x(r).leftDrawerOverlayOpened]])]),_:1},8,[`name`]),U(Xu,{modelValue:x(h),"onUpdate:modelValue":v[0]||=e=>n(h)?h.value=e:null},null,8,[`modelValue`]),x(t).visual.backgroundBlurMap.enabled?(w(),d(ac,{key:0})):m(``,!0),x(t).visual.useAdaptiveColors?(w(),d(is,{key:1})):m(``,!0),x(t).visual.sweetener.useImmersiveBG&&x(r).renderPageContent&&!e.container&&!x(xt)()&&!x($t)?(w(),o(`div`,ld,[U(Jo)])):m(``,!0)],6))}})})),pd=e((()=>{})),md,hd=e((()=>{fd(),fd(),pd(),X(),md=q(dd,[[`__scopeId`,`data-v-8ae2163d`]])})),gd,_d=e((()=>{E(),eu(),wa(),zc(),gd=b({__name:`MojaveLayout`,props:{container:{type:Boolean},noTitleBar:{type:Boolean},layoutType:{}},setup(e){return(t,n)=>(w(),d(Rc,{container:e.container,"no-title-bar":e.noTitleBar,"layout-type":e.layoutType},{ns_toolbar:L(()=>[T(t.$slots,`ns_toolbar`)]),ns_layout_top:L(()=>[T(t.$slots,`ns_layout_top`)]),ns_layout_bottom:L(()=>[T(t.$slots,`ns_layout_bottom`)]),ns_bottom_toolbar:L(()=>[T(t.$slots,`ns_bottom_toolbar`)]),toolbar:L(()=>[U($l)]),"bottom-toolbar":L(()=>[U(Ca)]),_:3},8,[`container`,`no-title-bar`,`layout-type`]))}})})),vd,yd=e((()=>{_d(),_d(),vd=gd})),bd,xd=e((()=>{E(),eu(),qr(),mt(),rt(),$(),zc(),bd=b({__name:`MontaraLayout`,props:{container:{type:Boolean},noTitleBar:{type:Boolean},layoutType:{}},setup(e){let t=Q(),n=tt(),r=jt(),i=j(()=>r.getComponent(`TopPlayer`)),a=j(()=>t.getWindowControlsSide()),o=j(()=>a.value==`left`?600:700);return(r,s)=>(w(),d(Rc,{container:e.container,"no-title-bar":e.noTitleBar,"layout-type":e.layoutType},{ns_toolbar:L(()=>[T(r.$slots,`ns_toolbar`)]),ns_layout_top:L(()=>[T(r.$slots,`ns_layout_top`)]),ns_layout_bottom:L(()=>[T(r.$slots,`ns_layout_bottom`)]),ns_bottom_toolbar:L(()=>[T(r.$slots,`ns_bottom_toolbar`)]),"toolbar-inline":L(({viewportSize:e,uiLeftDrawerOpen:n})=>[u(`div`,null,[U(x(i),{"show-lcd":e.width.value>x(o)},null,8,[`show-lcd`])]),U($l,{"secondary-bar":``,"search-bar":x(t).compactSidebar||!n,"exclude-controls":x(a)==`left`||x(t).hasTitleBar?[`lyrics`,`queue`,`searchButton`]:[`searchButton`]},null,8,[`search-bar`,`exclude-controls`])]),"amplcd-shelf":L(({viewportSize:e})=>[e.width.value<x(o)&&x(n).isAuthorized?(w(),d(Jr,{key:0})):m(``,!0)]),_:3},8,[`container`,`no-title-bar`,`layout-type`]))}})})),Sd,Cd=e((()=>{xd(),xd(),Sd=bd})),wd,Td=e((()=>{E(),eu(),rt(),zc(),wd=b({__name:`SosumiLayout`,props:{container:{type:Boolean},noTitleBar:{type:Boolean},layoutType:{}},setup(e){let t=jt(),n=j(()=>t.getComponent(`TopPlayer`));return(t,r)=>(w(),d(Rc,{container:e.container,"no-title-bar":e.noTitleBar,"layout-type":e.layoutType},{ns_toolbar:L(()=>[T(t.$slots,`ns_toolbar`)]),ns_layout_top:L(()=>[T(t.$slots,`ns_layout_top`)]),ns_layout_bottom:L(()=>[T(t.$slots,`ns_layout_bottom`)]),ns_bottom_toolbar:L(()=>[T(t.$slots,`ns_bottom_toolbar`)]),"toolbar-inline":L(()=>[U(x(n)),U($l,{"secondary-bar":``})]),_:3},8,[`container`,`no-title-bar`,`layout-type`]))}})})),Ed,Dd=e((()=>{Td(),Td(),Ed=wd})),Od,kd=e((()=>{E(),Z(),$(),Uc(),ou(),cu(),fu(),hd(),yd(),Cd(),Dd(),Od=b({__name:`NewShell2`,props:{container:{type:Boolean},forceLayout:{},noTitleBar:{type:Boolean}},setup(e){let t={mojave:vd,"mojave-if":au,maverick:du,"maverick-if":Sd,sosumi:Ed,mobile:md,none:Hc,"none-if":Hc},n=Rt(),r=Q(),i=e,a=j(()=>i.forceLayout?su(void 0,i.forceLayout):r.isCompact?`mobile`:su(n.visual.layoutType)),o=j(()=>t[a.value]);return O(j(()=>ut()===`none`),e=>{typeof document<`u`&&document.body&&document.body.classList.toggle(`solid-player`,e)},{immediate:!0}),F(()=>{typeof document<`u`&&document.body&&document.body.classList.remove(`solid-player`)}),(t,n)=>(w(),d(I(x(o)),{container:e.container,"no-title-bar":e.noTitleBar,"layout-type":x(a)},{ns_toolbar:L(()=>[T(t.$slots,`ns_toolbar`)]),ns_layout_top:L(()=>[T(t.$slots,`ns_layout_top`)]),ns_layout_bottom:L(()=>[T(t.$slots,`ns_layout_bottom`)]),ns_bottom_toolbar:L(()=>[T(t.$slots,`ns_bottom_toolbar`)]),_:3},8,[`container`,`no-title-bar`,`layout-type`]))}})})),Ad,jd=e((()=>{kd(),kd(),Ad=Od})),Md=e((()=>{}));function Nd(e,t){return w(),o(`div`,Fd,[...t[0]||=[u(`div`,{class:`immersive-lcd-metadata`},[u(`amp-lcd-metadata`)],-1)]])}var Pd,Fd,Id,Ld=e((()=>{E(),Md(),X(),Pd={},Fd={class:`c-metadata`},Id=q(Pd,[[`render`,Nd],[`__scopeId`,`data-v-07d47bd8`]])}));export{Ra as A,Mi as B,lo as C,$a as D,oo as E,$i as F,di as H,ea as I,Fi as L,wa as M,ya as N,eo as O,ba as P,Pi as R,ko as S,ao as T,ui as V,Jo as _,$l as a,Po as b,oc as c,Ls as d,Rs as f,as as g,is as h,jd as i,Ca as j,La as k,ec as l,ds as m,Ld as n,eu as o,us as p,Ad as r,ac as s,Id as t,tc as u,Yo as v,uo as w,Oo as x,No as y,ji as z};