import"./chunks/modulepreload-polyfill-B5Qt9EMX.js";document.getElementById("btn-toggle-panel").addEventListener("click",async()=>{try{if((await chrome.runtime.sendMessage({type:"ping-sidepanel"}))?.pong){window.close();return}}catch{}try{const[e]=await chrome.tabs.query({active:!0,currentWindow:!0});e?.id&&await chrome.sidePanel.open({tabId:e.id})}catch(e){console.warn("[popup] Failed to open side panel:",e)}window.close()});document.getElementById("btn-settings").addEventListener("click",()=>{chrome.runtime.openOptionsPage(),window.close()});
