Recently played tracks show up here");function at(e){var t=$o(),n=t.firstChild,r=n.nextSibling;return $(t,(()=>{var i=D(()=>!!e.thumbnail);return()=>i()&&(()=>{var o=_o();return o.addEventListener("error",s=>s.currentTarget.hidden=!0),Z(()=>e.thumbnail,s=>{oe(o,"src",s)}),o})()})(),n),$(n,()=>e.pending?"⏳ ":"",null),$(n,()=>e.title,null),$(r,()=>e.duration),Z(()=>`queue-item${e.extraClass?" "+e.extraClass:""}`,(i,o)=>{et(t,i,o)}),t}function xo(e){var t=So(),n=t.firstChild;n.firstChild;var r=n.nextSibling,i=r.firstChild,o=i.firstChild,s=o.nextSibling;s.nextSibling;var u=r.nextSibling,l=u.firstChild,f=l.firstChild,h=f.nextSibling;h.nextSibling;var d=l.nextSibling,m=d.firstChild,g=m.firstChild,y=m.nextSibling,a=y.firstChild,c=a.firstChild,p=c.nextSibling;p.nextSibling;var v=a.nextSibling,_=u.nextSibling;return _.firstChild,$(n,(()=>{var b=D(()=>!!e.currentTrack);return()=>b()?N(at,{get title(){return e.currentTrack.title},get duration(){return e.currentTrack.duration},get thumbnail(){return e.currentTrack.thumbnail},extraClass:"current"}):Eo()})(),null),$(i,()=>e.queue.length,s),$(i,(()=>{var b=D(()=>!!(e.onShuffleQueue&&e.queue.length>1));return()=>b()&&(()=>{var S=Co();return S.$$click=()=>e.onShuffleQueue?.(),S})()})(),null),$(r,N(dt,{get each(){return e.queue},children:(b,S)=>(()=>{var R=Oo();return $(R,N(at,{get title(){return b.title},get duration(){return b.duration},get thumbnail(){return b.thumbnail},get pending(){return b.pending}}),null),$(R,(()=>{var z=D(()=>!!e.onMoveQueueItem);return()=>z()&&(()=>{var se=To(),re=se.firstChild,le=re.nextSibling,De=le.nextSibling;return re.$$click=()=>e.onMoveQueueItem?.(S(),S()-1),le.$$click=()=>e.onMoveQueueItem?.(S(),S()+1),De.$$click=()=>e.onRemoveQueueItem?.(b.id),Z(()=>({e:S()===0,t:S()===e.queue.length-1}),({e:Ae,t:I},x)=>{Ae!==x?.e&&oe(re,"disabled",Ae),I!==x?.t&&oe(le,"disabled",I)}),se})()})(),null),R})()}),null),$(r,(()=>{var b=D(()=>e.queue.length===0);return()=>b()&&Ao()})(),null),$(l,()=>e.playlist.length,h),g.addEventListener("change",b=>e.onSetAutoplay?.(b.currentTarget.checked)),$(a,()=>e.skipThreshold,p),v.$$input=b=>e.onSetSkipThreshold?.(parseInt(b.currentTarget.value,10)),$(u,N(dt,{get each(){return e.playlist},children:b=>(()=>{var S=Ro(),R=S.firstChild;return $(S,N(at,{get title(){return b.title},get duration(){return b.duration},get thumbnail(){return b.thumbnail},get pending(){return b.pending}}),R),R.$$click=()=>e.onRemoveFromPlaylist?.(b.id),S})()}),null),$(u,(()=>{var b=D(()=>e.playlist.length===0);return()=>b()&&Po()})(),null),$(_,N(dt,{get each(){return e.history},children:b=>(()=>{var S=ko(),R=S.firstChild;return $(S,N(at,{get title(){return b.title},get duration(){return b.duration},get thumbnail(){return b.thumbnail},extraClass:"history"}),R),R.$$click=()=>e.onAddToPlaylist?.(b.url),S})()}),null),$(_,(()=>{var b=D(()=>e.history.length===0);return()=>b()&&Io()})(),null),Z(()=>({e:e.autoplayEnabled,t:e.playlist.length===0,a:e.skipThreshold}),({e:b,t:S,a:R},z)=>{g.checked=b,S!==z?.t&&oe(g,"disabled",S),v.value=R??""}),t}it(["input","click"]);const fr="moqbox-theme";function dr(e){const t=document.documentElement;e==="latte"?(t.setAttribute("data-theme","latte"),t.style.colorScheme="light"):e==="macchiato"?(t.setAttribute("data-theme","macchiato"),t.style.colorScheme="dark"):(t.removeAttribute("data-theme"),t.style.colorScheme="light dark"),localStorage.setItem(fr,e)}function Lo(e){return e==="macchiato"?"latte":e==="latte"?"system":"macchiato"}function hr(){return localStorage.getItem(fr)||"system"}var No=A('
moqbox
Watch videos together with friends