"use strict";(self.webpackChunkdami=self.webpackChunkdami||[]).push([[6249],{46249:(t,a,i)=>{i.r(a),i.d(a,{default:()=>c});var e=i(93150),s=i.n(e),d=i(31263),r=i(31791);const c=async function(t){try{const a={data:"",nextBlockId:this.getBlockConnections(t.id)};if(this.activeTab.id)return await s().tabs.update(this.activeTab.id,{active:!0}),a;const[i]=await s().tabs.query({active:!0,url:"*://*/*"});if(!i?.url.startsWith("http")){const t=new Error("invalid-active-tab");throw t.data={url:i.url},t}return this.activeTab={...this.activeTab,frameId:0,id:i.id,url:i.url},this.windowId=i.windowId,this.settings.debugMode&&(await(0,r.xq)(i.id,this.activeTab.id),this.debugAttached=!0),this.preloadScripts.length>0&&(this.engine.isMV2?await this._sendMessageToTab({isPreloadScripts:!0,label:"javascript-code",data:{scripts:this.preloadScripts}}):await(0,r.SR)({scripts:this.preloadScripts,frameSelector:this.frameSelector,target:{tabId:this.activeTab.id,frameIds:[this.activeTab.frameId||0]}})),await s().tabs.update(i.id,{active:!0}),await s().windows.update(i.windowId,{focused:!0}),await(0,d._v)(200),a}catch(t){throw console.error(t),t.data=t.data||{},t}}}}]);