import{$ as u,z as v,A as k,m as l,b as y,B as _,D as E,E as I,_ as i,t as D,F as N}from"./app-JmgyQoR0.js";import{b as V,h as n,t as d,F as m,G as A,i as p,N as B,a5 as L,M as b,z as o,H as f,l as C,d as c,u as P}from"./vue-y3KLWBaS.js";function R(){navigator.serviceWorker.addEventListener("message",e=>{var a;if(e.data.type==="order"){if(e.data.loginId!==((a=u)==null?void 0:a.id))return v(e.data.loginId).then(r=>{if(r)return k(r.token,e.data.url)});switch(e.data.order){case"post":return y(e.data.options);case"push":return l.currentRoute.value.path===e.data.url?window.scroll({top:0,behavior:"smooth"}):l.push(e.data.url);default:return}}})}const T={key:1,id:"devTicker"},w=P("span",null,"DEV BUILD",-1),F=[w],z=V({__name:"common",setup(e){const a=c(()=>i(()=>import("./stream-indicator-HmTWV_UG.js"),__vite__mapDeps([0,1,2,3,4]))),r=c(()=>i(()=>import("./upload-c0UQO7j3.js"),__vite__mapDeps([5,1,2,3,6]))),h=!1,g=t=>{u.mutingNotificationTypes.includes(t.type)||(document.visibilityState==="visible"&&(_.send("readNotification",{id:t.id}),D(c(()=>i(()=>import("./MkNotificationToast-KRbd3KzX.js"),__vite__mapDeps([7,2,8,9,1,3,10,11,12]))),{notification:t},{},"closed")),N("notification"))};return u&&(_.useChannel("main",null,"UI").on("notification",g),"serviceWorker"in navigator&&R()),(t,O)=>(n(),d(m,null,[(n(!0),d(m,null,A(o(E),s=>(n(),p(b(s.component),B({key:s.id},s.props,L(s.events)),null,16))),128)),o(I).length>0?(n(),p(o(r),{key:0})):f("",!0),C(o(a)),o(h)?(n(),d("div",T,F)):f("",!0)],64))}});export{z as _};
function __vite__mapDeps(indexes) {
  if (!__vite__mapDeps.viteFileDeps) {
    __vite__mapDeps.viteFileDeps = ["stream-indicator-HmTWV_UG.js","app-JmgyQoR0.js","vue-y3KLWBaS.js","app-9iivmIpH.css","stream-indicator-cUN_bP-J.css","upload-c0UQO7j3.js","upload-LfT4psyB.css","MkNotificationToast-KRbd3KzX.js","MkNotification-CZxoNE6o.js","MkReactionIcon.vue_vue_type_script_setup_true_lang-MnLL2GJr.js","get-note-summary-7eDLQp-L.js","MkNotification-fdSCcfTW.css","MkNotificationToast-ZNcXPFJQ.css"]
  }
  return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}