window.addEventListener("message",async e=>{if(e.data&&"SUNO_OFFLINE_TOKEN"===e.data.type)if(e.data.token)try{await chrome.runtime.sendMessage({action:"setToken",data:{token:e.data.token}})}catch(e){}else e.data.error}),chrome.runtime.onMessage.addListener((e,a,t)=>"ping"===e.action?(t({pong:!0,url:window.location.href}),!0):"tokenExtracted"===e.action?(t({success:!0}),!0):void 0);