(()=>{"use strict";chrome.runtime.onInstalled.addListener((async()=>{await chrome.storage.local.set({hcaptcha_auto_open:!0,hcaptcha_auto_solve:!0,hcaptcha_click_delay_time:300,hcaptcha_solve_delay_time:3e3,recaptcha_auto_open:!0,recaptcha_auto_solve:!0,recaptcha_click_delay_time:300,recaptcha_solve_delay_time:1e3})}));const e=async e=>{const a=new FileReader;return new Promise((t=>{a.onloadend=()=>t(a.result),a.readAsDataURL(e)}))},a={};chrome.runtime.onMessage.addListener((function({type:t,label:s},c,o){return(async()=>{if("CLASSIFIER"===t){const a=`https://hekt.akmal.dev/${s}.ort`;try{const t=await fetch(a),s=await t.blob(),c=await e(s);o({status:t.status,base64:c})}catch(e){o({status:"error",message:e.message})}}else"KV_SET"===t?(s.tab_specific&&(s.key=`${c.tab.id}_${s.key}`),a[s.key]=s.value,o({status:"success"})):"KV_GET"===t&&(s.tab_specific&&(s.key=`${c.tab.id}_${s.key}`),o({status:"success",value:a[s.key]}))})(),!0}))})();