(function(){"use strict";const a="bga-god-assistant-user-script-bridge-response",i="bga-god-assistant-user-script-bridge-request";(S=>{const n=(r,t,s,d,u)=>{const c=`bga-god-assistant-user-script-bridge-${Date.now().toString()}`;return new Promise(E=>{window.addEventListener(a,function h(m){const e=m.detail;c===(e==null?void 0:e.messageId)&&r===(e==null?void 0:e.apiPath)&&(window.removeEventListener(a,h),E(e==null?void 0:e.data))}),window.dispatchEvent(new CustomEvent(i,{detail:{messageId:c,apiPath:r,arg1:t,arg2:s,arg3:d,arg4:u}}))})},o=r=>({get:async t=>{const s=`storage.${r}.get`;return n(s,t)},set:async t=>{const s=`storage.${r}.set`;return n(s,t)},remove:async t=>{const s=`storage.${r}.remove`;return n(s,t)},clear:async()=>{const t=`storage.${r}.clear`;return n(t)}}),g={storage:{local:o("local"),sync:o("sync")},callMethodByPath:n};window.$chrome=g})()})();
