LavaPack.loadBundle([["/home/runner/work/metamask-extension/metamask-extension/ui/store/background-connection.ts",{"../../shared/constants/messages":"/home/runner/work/metamask-extension/metamask-extension/shared/constants/messages.ts","../../shared/lib/trace":"/home/runner/work/metamask-extension/metamask-extension/shared/lib/trace.ts"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.generateActionId=void 0,n.setBackgroundConnection=async function(e){a=e,c.clear(),u=!1},n.submitRequestToBackground=i,n.subscribeToMessengerEvent=async function(e,t){const n=t,s=Symbol("messengerEventSubscription");let o=c.get(e);if(o)o.callbacks.set(s,n);else{u||(a.onNotification(m),u=!0);const t=i("messengerSubscribe",[e]);o={callbacks:new Map([[s,n]]),subscribePromise:t},c.set(e,o),t.catch(()=>{c.delete(e)})}return await o.subscribePromise,async()=>{const t=c.get(e);if(!t)return;!t.callbacks.delete(s)||t.callbacks.size>0||(c.delete(e),await i("messengerUnsubscribe",[e]))}};var s=e("../../shared/constants/messages"),o=e("../../shared/lib/trace");const r="Background connection is not set. Please initialize the background connection before making requests.";let a;function i(e,t){if(!a)return console.warn(r),Promise.resolve();const n=(0,o.getSerializedTraceContext)(),s=n?[...t??[],{_traceContext:n}]:t??[];return a[e](...s)}n.generateActionId=()=>Date.now()+Math.random();const c=new Map;let u=!1;function m(e){if(e.method!==s.MESSENGER_SUBSCRIPTION_NOTIFICATION||!e.params)return;const[t,n]=e.params,o=c.get(t);if(o)for(const e of o.callbacks.values())try{e(n)}catch(e){console.error(e)}}}}},{package:"$root$",file:"ui/store/background-connection.ts"}],["/home/runner/work/metamask-extension/metamask-extension/ui/store/store.ts",{"../ducks":"/home/runner/work/metamask-extension/metamask-extension/ui/ducks/index.js","@reduxjs/toolkit":"/home/runner/work/metamask-extension/metamask-extension/node_modules/@reduxjs/toolkit/dist/index.js","react-redux":"/home/runner/work/metamask-extension/metamask-extension/node_modules/react-redux/lib/index.js","remote-redux-devtools":"/home/runner/work/metamask-extension/metamask-extension/node_modules/browserify/lib/_empty.js"},function(){with(this.scopeTerminator)with(this.globalThis)return function(){"use strict";return function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e){const t=[];null;return(0,o.configureStore)({reducer:r.default,middleware:e=>e({serializableCheck:!1,immutableCheck:!1}),devTools:!1,enhancers:t,preloadedState:e})},n.useAppSelector=void 0;var s=e("react-redux"),o=e("@reduxjs/toolkit"),r=(a(e("remote-redux-devtools")),a(e("../ducks")));function a(e){return e&&e.__esModule?e:{default:e}}n.useAppSelector=s.useSelector}}},{package:"$root$",file:"ui/store/store.ts"}]],[],{});