import{Xn as e,qt as t}from"./vendor-C4JLrdLj.js";import{it as n}from"./vendor-quasar-BMuYn1t2.js";import{Bn as r,Bt as i,Hn as a,K as o,Mi as s,Ni as c,Vt as l,X as u,b as d,x as f,y as p}from"./ws-JRT2XE7Y.js";import{Ct as m,wt as h}from"./smart-playlist-store-DUBQztY1.js";import{t as g}from"./Events-Bl5q4sx7.js";t(),c(),f(),h(),l(),o(),r();var _=n(async()=>{if(u())return;console.debug(`[boot] Client Listeners`);let t=a(),n=p();s()===`darwin`&&(document.body.classList.add(`window-glass`),document.documentElement.classList.add(`window-glass`)),e(()=>n.debug?.mklite,e=>{globalThis.__MKLITE_DEBUG=!!e},{immediate:!0}),i();let r=new Set;window.addEventListener(`blur`,()=>{if(d(`visual.pauseAnimatedOnBlur`)){let e=document.querySelectorAll(`.animated-artwork-video`);for(let t of e)t.paused||(t.pause(),r.add(t))}document.body.setAttribute(`window-blurred`,`true`),t.windowFocusState=`blurred`}),window.addEventListener(`focus`,()=>{for(let e of r)e.play(),r.delete(e);document.body.removeAttribute(`window-blurred`),t.windowFocusState=`focused`}),window.addEventListener(`beforeunload`,()=>{g()}),m(n.general.keybindings)});export{_ as default};