import{n as e}from"./rolldown-runtime-DAXXjFlN.js";import{An as t,Fn as n,Fr as r,Mn as i,Nn as a,Pn as o,Sr as s,Vn as c,Wr as l,ar as u,dn as d,gr as f,jn as p,vr as m,xr as h,zn as g}from"./vendor-Dnfj1twE.js";import{Ht as _,ao as v,ia as y,io as b,nn as x,oo as S,ra as C,so as w,vr as T,yr as E}from"./ws-Dl8XkIy4.js";import{D,k as O}from"./auth-tS4c9ju3.js";import{n as k,t as A}from"./CTooltip-DrlRH-Bh.js";import{_ as j,b as M,v as N,y as P}from"./AMPlaybackActions-Vw0z-V-k.js";import{a as F,c as I,i as L,n as R,o as z,r as B,s as V,t as H}from"./AMTime-D_MJSk4R.js";var U,W,G,K,q=e((()=>{k(),d(),_(),v(),D(),C(),M(),N(),R(),E(),z(),L(),V(),U={class:`popover-artwork`},W={class:`player-info`},G={class:`playback-timeline`},K=c({__name:`AMPLCD`,setup(e){let c=x(),d=y(),_=r(!0),v=p(()=>y().player),S=p(()=>!!v.value.currentArtworkUrlHiRes),{isIdle:C}=I(),{elementRef:w,showContextMenu:E}=O(),D=r(!1),k=r(null),M=r({}),N=r(!1);return p(()=>d.nowPlayingItemMediaItem?.attributes?.artwork?d.nowPlayingItemMediaItem?.attributes?.artwork:{url:v.value.currentArtworkUrlHiRes}),f(D,e=>{if(e&&k.value){let e=k.value.getBoundingClientRect();M.value={position:`fixed`,left:`${e.left+e.width/2}px`,top:`${e.top-10}px`}}}),(e,r)=>{let f=A;return u(),n(`div`,{class:h([`player`,{"glass-lcd":l(c).components.AMPLCD.Style===`glass`,"lcd-idle":l(C)}]),ref_key:`elementRef`,ref:w},[i(`div`,{class:`player-artwork`,onClick:r[0]||=(...e)=>l(E)&&l(E)(...e),"data-show-context-menu":``,onMouseenter:r[1]||=e=>D.value=!0,onMouseleave:r[2]||=e=>D.value=!1,ref_key:`artworkEl`,ref:k},[g(F,{ref:`artwork`,class:`no-shadow no-radius`,artwork:l(d).nowPlayingArtwork,loading:`eager`,"artwork-type":`list-item`,"no-shadow":``},null,8,[`artwork`]),_.value?(u(),a(f,{key:0,"fit-content":``},{default:m(()=>[i(`div`,U,[g(F,{ref:`artwork`,class:`no-shadow`,artwork:l(d).nowPlayingArtwork,loading:`eager`,"artwork-type":`list-item`,"no-shadow":``},null,8,[`artwork`])])]),_:1})):o(``,!0)],544),(u(),a(t,{to:`body`},[D.value&&k.value&&S.value&&!l(C)?(u(),n(`div`,{key:0,class:`artwork-hover-preview`,style:s(M.value)},[(u(),a(T,{classes:`hover-artwork no-shadow`,loading:`eager`,key:v.value.currentArtworkUrlHiRes,"desired-height":200,"desired-width":200,url:v.value.currentArtworkUrlHiRes},null,8,[`url`]))],4)):o(``,!0)])),i(`div`,W,[i(`div`,{class:h([`lcd-info`,{blurred:N.value}])},[g(P,{class:`metadata-small`})],2),i(`div`,G,[i(`div`,{class:h([`time-codes`,{lifted:N.value}])},[i(`div`,null,[g(H,{type:`current`})]),i(`div`,null,[g(H,{type:`duration`})])],2),i(`div`,{class:`playback-bar`,onMouseenter:r[3]||=e=>N.value=!0,onMouseleave:r[4]||=e=>N.value=!1},[g(j,{class:`mavericks`})],32)]),i(`button`,{class:`menu-btn`,onClick:r[5]||=(...e)=>l(E)&&l(E)(...e),"data-show-context-menu":``},[g(b,{name:`menu-dots`})])]),g(B,{visible:l(C)},null,8,[`visible`])],2)}}})})),J=e((()=>{})),Y,X=e((()=>{q(),q(),J(),w(),Y=S(K,[[`__scopeId`,`data-v-2442d63e`]])}));export{X as n,Y as t};