"use strict";(()=>{var c="call";var a="___SYSTEM__EXTENSION___";function m(){return document.getElementById(a)}function e(o,r,s){m().dispatchEvent(new CustomEvent("message",{detail:{type:o,id:r,data:s}}))}var n=document.createElement("div");n.style.display="none";n.id=a;document.body.appendChild(n);n.addEventListener("message",function(o){let{detail:r}=o,{type:s,id:t,data:l}=r;if(s==="send"){let{type:x,data:d}=l;switch(x){case c:chrome.runtime.sendMessage(d,p=>{if(chrome.runtime.lastError){let u=chrome.runtime.lastError.message.toLowerCase();e("callback",t,{err:u})}else e("callback",t,p)});break;default:e("callback",t,{err:"not supported"})}}},!1);var L=null;})();
