"use strict";(self.webpackChunkpasswords_webextension=self.webpackChunkpasswords_webextension||[]).push([[2650],{8962:(e,t,a)=>{a.d(t,{Z:()=>s});class s{async execute(e,t){console.trace("controller.execute() not implemented")}}},4931:(e,t,a)=>{a.r(t),a.d(t,{default:()=>d});var s=a(8962),i=a(8838),o=a(4194);class d extends s.Z{async execute(e,t){if("desktop"===(await i.Z.getBrowserInfo()).device){let t=await this.getTabId(e);this.tabToWindow(t)}t.setPayload({success:!0})}async tabToWindow(e){let t=i.Z.getBrowserApi(),a=await t.windows.getLastFocused({populate:!0}),s=Math.floor(a.left+a.width-374-25),o=Math.floor(a.top+74);if(1===a.tabs.length&&a.tabs[0].id===e)return void await t.windows.update(d.id,{top:o,left:s,width:374,height:402,focused:!0,drawAttention:!0});let d=await t.windows.create({type:"panel",tabId:e,top:o,left:s,width:374,height:402});i.Z.isCompatible(i.Z.PLATFORM_FIREFOX)&&await t.windows.update(d.id,{top:o,left:s})}async getTabId(e){let t=e.getPayload();if(null===t||!t.hasOwnProperty("url"))return o.Z.get("id");let a=await i.Z.getBrowserApi().tabs.query({url:t.url});return 0===a.length?o.Z.get("id"):a[0].id}}}}]);