const{isArray:t}=Array,e=new Map,n=t=>{t.stopImmediatePropagation(),t.preventDefault()};var a=Object.freeze({__proto__:null,activate:t=>t.waitUntil(clients.claim()),fetch:t=>{const{request:a}=t;"POST"===a.method&&a.url===`${location.href}?sabayon`&&(n(t),t.respondWith(new Promise((async t=>{const n=await a.json(),s=n.join(",");e.set(s,t);for(const t of await clients.matchAll())t.postMessage(n)})).then((t=>new Response(`[${t.join(",")}]`)))))},install:()=>skipWaiting(),message:a=>{const{data:s}=a;if(t(s)&&4===s.length){const[t,o,i,r]=s,c=[t,o,i].join(","),l=e.get(c);l&&(n(a),l(r),e.delete(c))}}});for(const t in a)addEventListener(t,a[t]);