(function(){"use strict";function l(){["close","fetch","XMLHttpRequest","importScripts"].forEach(e=>{self[e]&&Object.defineProperty(self,e,{value:()=>{throw new Error("Security Error: worker api is disabled.")},configurable:!1,writable:!1})})}function n(e){return Object.assign(Object.create(null),e)}const u=["self","globalThis","Worker","SharedWorker","postMessage","onmessage","indexedDB","location","navigator","origin","console","setTimeout","setInterval"];function a(e,r,o){if(r.includes("Function(")||r.includes("eval(")||r.includes(".constructor"))throw new Error("Function or eval or constructor is not allowed");const s=[],c=[];return e=n(e||{}),Object.keys(e).forEach(t=>{(o||typeof e[t]!="function")&&(s.push(t),c.push(e[t]))}),u.forEach(t=>{e[t]===void 0&&(s.push(t),c.push(null))}),new Function(...s,'"use strict"; return ('+r+");")(...c)}l();const i=self.postMessage;self.onmessage=function(e){const r=e.data,o=r.payload||n({}),s=(Array.isArray(o.code)?o.code:[o.code]).map(c=>{const t=n(o.ctx);try{return{returns:a(t,c,!1),ctx:t}}catch(f){return console.error("Failed to evaluate code: "+f),{returns:void 0,ctx:t}}});i(n({requestId:r.requestId,result:s}))},i(n({type:typeof a=="function"?"worker_ready":"worker_error"}))})();
