const a2_0x1e1fc6=a2_0x25d2;(function(_0x36c4e6,_0x13a202){const _0x530b97=a2_0x25d2,_0x2a3a88=_0x36c4e6();while(!![]){try{const _0x4b1d41=parseInt(_0x530b97(0x65))/0x1+-parseInt(_0x530b97(0x79))/0x2*(parseInt(_0x530b97(0x64))/0x3)+-parseInt(_0x530b97(0x77))/0x4*(parseInt(_0x530b97(0x8b))/0x5)+-parseInt(_0x530b97(0x89))/0x6*(-parseInt(_0x530b97(0x69))/0x7)+parseInt(_0x530b97(0x7c))/0x8+parseInt(_0x530b97(0x6c))/0x9*(parseInt(_0x530b97(0x6d))/0xa)+parseInt(_0x530b97(0x67))/0xb*(-parseInt(_0x530b97(0x73))/0xc);if(_0x4b1d41===_0x13a202)break;else _0x2a3a88['push'](_0x2a3a88['shift']());}catch(_0x3f8ea8){_0x2a3a88['push'](_0x2a3a88['shift']());}}}(a2_0x4cd7,0x61862));const ALARM_NAME='licenseCheckAlarm',LICENSE_API_URL=a2_0x1e1fc6(0x76),EXTENSION_ID=0xd,APPLICANTS_STORAGE_KEY=a2_0x1e1fc6(0x8a),ACCOUNT_STORAGE_KEY='saved_accounts',DEVICE_ID_KEY='device_uuid';async function getOrCreateDeviceId(){const _0x3d3833=a2_0x1e1fc6,_0x5e1203=await chrome[_0x3d3833(0x66)][_0x3d3833(0x7a)][_0x3d3833(0x84)](DEVICE_ID_KEY);let _0x17c9de=_0x5e1203[DEVICE_ID_KEY];return!_0x17c9de&&(_0x17c9de=crypto[_0x3d3833(0x72)](),await chrome[_0x3d3833(0x66)][_0x3d3833(0x7a)][_0x3d3833(0x7d)]({[DEVICE_ID_KEY]:_0x17c9de})),_0x17c9de;}chrome[a2_0x1e1fc6(0x66)]['session'][a2_0x1e1fc6(0x75)]({'accessLevel':a2_0x1e1fc6(0x70)});async function fetchLicenseStatus(_0x12bd59){const _0x40d5da=a2_0x1e1fc6,_0x43f1af=await getOrCreateDeviceId();if(!_0x12bd59)return await chrome[_0x40d5da(0x66)][_0x40d5da(0x7a)][_0x40d5da(0x7d)]({'licenseStatus':'INACTIVE','lastCheck':Date[_0x40d5da(0x8e)]()}),await chrome['storage'][_0x40d5da(0x81)][_0x40d5da(0x7e)](),{'status':'INACTIVE'};try{const _0x469195=await fetch(LICENSE_API_URL,{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x40d5da(0x8d)]({'key':_0x12bd59,'extensao_id':EXTENSION_ID,'device_id':_0x43f1af})}),_0x704773=await _0x469195[_0x40d5da(0x6f)](),_0x3e313d=_0x704773['status']||_0x40d5da(0x88);return _0x3e313d===_0x40d5da(0x82)?(await chrome[_0x40d5da(0x66)][_0x40d5da(0x7a)][_0x40d5da(0x7d)]({'licenseStatus':'VALID','lastCheck':Date[_0x40d5da(0x8e)](),'expiryDate':_0x704773['data_expiracao'],[ACCOUNT_STORAGE_KEY]:_0x704773[_0x40d5da(0x87)]||[],[APPLICANTS_STORAGE_KEY]:_0x704773[_0x40d5da(0x80)]||[]}),await chrome['storage'][_0x40d5da(0x81)][_0x40d5da(0x7d)]({'access_token':_0x704773[_0x40d5da(0x7b)],'user_id':_0x704773['user_id'],'licenseKey_sessao':_0x12bd59}),console['log'](_0x40d5da(0x6e))):(await chrome['storage']['local'][_0x40d5da(0x7d)]({'licenseStatus':_0x3e313d,'lastCheck':Date[_0x40d5da(0x8e)]()}),await chrome['storage'][_0x40d5da(0x81)][_0x40d5da(0x7e)]()),{'status':_0x3e313d,'token':_0x704773[_0x40d5da(0x7b)]};}catch(_0x17a382){return console[_0x40d5da(0x8c)](_0x40d5da(0x6a),_0x17a382),{'status':'ERROR'};}}chrome[a2_0x1e1fc6(0x6b)][a2_0x1e1fc6(0x83)][a2_0x1e1fc6(0x68)]((_0x2cd1a6,_0x4e39a1,_0x80c94d)=>{const _0x648b01=a2_0x1e1fc6;if(_0x2cd1a6[_0x648b01(0x71)]===_0x648b01(0x74))return chrome[_0x648b01(0x66)][_0x648b01(0x7a)]['get']([_0x648b01(0x7f)],async _0x3a0eba=>{const _0x2dbe71=_0x648b01,_0x922918=await fetchLicenseStatus(_0x3a0eba[_0x2dbe71(0x7f)]);_0x80c94d(_0x922918);}),!![];}),chrome['runtime'][a2_0x1e1fc6(0x78)][a2_0x1e1fc6(0x68)](()=>{const _0x43da42=a2_0x1e1fc6;chrome['alarms'][_0x43da42(0x85)](ALARM_NAME,{'periodInMinutes':0x3c}),startInitialCheck();}),chrome[a2_0x1e1fc6(0x6b)]['onStartup'][a2_0x1e1fc6(0x68)](startInitialCheck),chrome[a2_0x1e1fc6(0x86)]['onAlarm'][a2_0x1e1fc6(0x68)](startInitialCheck);function startInitialCheck(){const _0x33237a=a2_0x1e1fc6;chrome['storage'][_0x33237a(0x7a)][_0x33237a(0x84)]('licenseKey',_0x365647=>{if(_0x365647['licenseKey'])fetchLicenseStatus(_0x365647['licenseKey']);});}function a2_0x4cd7(){const _0x3d6ebc=['action','randomUUID','12dhzcgd','requestLicenseCheck','setAccessLevel','https://advence.com.ao/api/check_license.php','7468whHesa','onInstalled','2YllKfz','local','access_token','1662344QEolKx','set','clear','licenseKey','requerentes','session','VALID','onMessage','get','create','alarms','contas_de_login','ERROR','3258HiYduv','vfs_applicants_v2','365UyvpcZ','error','stringify','now','695757EaDNfT','551521SQkweE','storage','12252405MlBBsy','addListener','8631Hqaoml','VFS\x20ADVENCE:\x20Erro\x20API:','runtime','140490tGoMmO','290FjJMSQ','VFS\x20ADVENCE:\x20Token\x20renovado\x20com\x20sucesso.','json','TRUSTED_AND_UNTRUSTED_CONTEXTS'];a2_0x4cd7=function(){return _0x3d6ebc;};return a2_0x4cd7();}function a2_0x25d2(_0x17ed05,_0x43d5d3){_0x17ed05=_0x17ed05-0x64;const _0x4cd7d4=a2_0x4cd7();let _0x25d24d=_0x4cd7d4[_0x17ed05];return _0x25d24d;}startInitialCheck();