faker3/jd_beanSign.js
2024-06-29 17:05:17 +08:00

15 lines
25 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
活动名称:领京豆签到
环境变量jd_beanSign_interval // 自定义运行间隔时长整数单位毫秒默认1500
jd_beanSign_notify // 是否推送通知true/false默认不推送
jd_beanSign_pinFilter // 账号pin过滤多个用@进行分割
cron:15 0,16 * * *
*/
const $ = new Env('领京豆签到')
const _0xe9705b=_0x3fe0;function _0x3fe0(_0x6bd70b,_0x133225){const _0x3b7afb=_0x3b7a();return _0x3fe0=function(_0x3fe0e1,_0x5af6f0){_0x3fe0e1=_0x3fe0e1-0x117;let _0x31c00c=_0x3b7afb[_0x3fe0e1];if(_0x3fe0['VGmfOA']===undefined){var _0xb360dd=function(_0xcbe79c){const _0x42e759='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1abf9b='',_0x3eaabc='';for(let _0x2b0244=0x0,_0x3237d9,_0x4b0c04,_0x4d201e=0x0;_0x4b0c04=_0xcbe79c['charAt'](_0x4d201e++);~_0x4b0c04&&(_0x3237d9=_0x2b0244%0x4?_0x3237d9*0x40+_0x4b0c04:_0x4b0c04,_0x2b0244++%0x4)?_0x1abf9b+=String['fromCharCode'](0xff&_0x3237d9>>(-0x2*_0x2b0244&0x6)):0x0){_0x4b0c04=_0x42e759['indexOf'](_0x4b0c04);}for(let _0x37f5cf=0x0,_0x9b69a0=_0x1abf9b['length'];_0x37f5cf<_0x9b69a0;_0x37f5cf++){_0x3eaabc+='%'+('00'+_0x1abf9b['charCodeAt'](_0x37f5cf)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3eaabc);};const _0x45a0e6=function(_0x3c3719,_0x1afca9){let _0xf82c70=[],_0x72b1ab=0x0,_0x21e591,_0xd01254='';_0x3c3719=_0xb360dd(_0x3c3719);let _0x3b6674;for(_0x3b6674=0x0;_0x3b6674<0x100;_0x3b6674++){_0xf82c70[_0x3b6674]=_0x3b6674;}for(_0x3b6674=0x0;_0x3b6674<0x100;_0x3b6674++){_0x72b1ab=(_0x72b1ab+_0xf82c70[_0x3b6674]+_0x1afca9['charCodeAt'](_0x3b6674%_0x1afca9['length']))%0x100,_0x21e591=_0xf82c70[_0x3b6674],_0xf82c70[_0x3b6674]=_0xf82c70[_0x72b1ab],_0xf82c70[_0x72b1ab]=_0x21e591;}_0x3b6674=0x0,_0x72b1ab=0x0;for(let _0x443bd4=0x0;_0x443bd4<_0x3c3719['length'];_0x443bd4++){_0x3b6674=(_0x3b6674+0x1)%0x100,_0x72b1ab=(_0x72b1ab+_0xf82c70[_0x3b6674])%0x100,_0x21e591=_0xf82c70[_0x3b6674],_0xf82c70[_0x3b6674]=_0xf82c70[_0x72b1ab],_0xf82c70[_0x72b1ab]=_0x21e591,_0xd01254+=String['fromCharCode'](_0x3c3719['charCodeAt'](_0x443bd4)^_0xf82c70[(_0xf82c70[_0x3b6674]+_0xf82c70[_0x72b1ab])%0x100]);}return _0xd01254;};_0x3fe0['fIIlZt']=_0x45a0e6,_0x6bd70b=arguments,_0x3fe0['VGmfOA']=!![];}const _0x5c0172=_0x3b7afb[0x0],_0x349a07=_0x3fe0e1+_0x5c0172,_0x47c44b=_0x6bd70b[_0x349a07];return!_0x47c44b?(_0x3fe0['NgrIwZ']===undefined&&(_0x3fe0['NgrIwZ']=!![]),_0x31c00c=_0x3fe0['fIIlZt'](_0x31c00c,_0x5af6f0),_0x6bd70b[_0x349a07]=_0x31c00c):_0x31c00c=_0x47c44b,_0x31c00c;},_0x3fe0(_0x6bd70b,_0x133225);}(function(_0x21ea36,_0x337af1){const _0x24f753=_0x3fe0,_0x13f6dc=_0x21ea36();while(!![]){try{const _0x2e3bb1=parseInt(_0x24f753(0x14e,'USNi'))/0x1*(parseInt(_0x24f753(0x18c,'N1@*'))/0x2)+parseInt(_0x24f753(0x1b5,'Am]f'))/0x3*(parseInt(_0x24f753(0x169,'n$g3'))/0x4)+parseInt(_0x24f753(0x168,'CN86'))/0x5+parseInt(_0x24f753(0x124,'&h1I'))/0x6*(-parseInt(_0x24f753(0x14d,'B@hR'))/0x7)+parseInt(_0x24f753(0x11e,'&h1I'))/0x8+parseInt(_0x24f753(0x188,'3MEL'))/0x9*(-parseInt(_0x24f753(0x11b,'A6jK'))/0xa)+-parseInt(_0x24f753(0x17b,'Am]f'))/0xb;if(_0x2e3bb1===_0x337af1)break;else _0x13f6dc['push'](_0x13f6dc['shift']());}catch(_0x4d253f){_0x13f6dc['push'](_0x13f6dc['shift']());}}}(_0x3b7a,0xc3479));const jdCookie=require(_0xe9705b(0x13b,'xFc]')),notify=require('./utils/Rebels_sendJDNotify'),common=require(_0xe9705b(0x164,'pe]O')),{H5st}=require(_0xe9705b(0x1ad,'79Lw'));function _0x3b7a(){const _0x3236be=['ECkuW6CBWPRcLq','wcqelbfx','q0foW4NdP8kXca','v0L1EHTnoNpcMmkdW7LHWOC','5lMU6lcHkVcMGOa','z8kWWQ4m','lGtdPCoDAmoXWPa','W4NcQCkKW6qlW6ldNrn9','FSoXjG','emodmG','aYNcRmobWPxcHa','4P2gWRVMNitOGkZMR7hNOk7LPyJNKRtcGG','fY/dVW','gmkAtmoO','rmkyDmoxB1iTW684WQVdJW','WRzgWOSkqNjDWOZcO8ojWPddVq','bwhdMCkZW6JdKx/cTSk9WOpdOa','W6VdJJi','WR8GbcW','FmkvW7m','W6xdHdtcRs0eWPxdPb8','W6RcIKykk3PQWQ3dPW','e8kvvW','bSkxW7lcGZOP','WQOtFHxdHrSafZSiWRfQW6rUoCo0WPxcJSkwWOJdMY/cMgKJlSkosmoXFCo/gLm8d8kCsmoxlsviuGX0WOFcNmkTWQKNWRquamoYWR1LbColWPFcNwJdNSoPyKPNBYRdOw9xW4FcKCkDWOhdTCkezXKCW6/dM8kHW6xdOhPpW5NcHmkAW43dPCkpsmkZjrjdWQFdSKpdGc3dS8kwk8k3imoMW6aXFmoRW7ZdNHDXgZNdI0tcVuBdMcpdQhC7WOqJf2GKyeRdPcNcUZ53Dmo/qaRcGHdcQCkrjCooaq/cMCoeWR93EmougxiotcRdKSoyWOuxtmofi8olW5lcGq8eqINdGSklWQv3dSo5W4OyuCk1WP/cPmk9qCkxWOz3W790qwpdS8oXBIzVW6JcLGFdR8k+WP1QpXDcW53dRrbGj8oKW5Kvf3BdUWhcUCoiCMv5oaW5eXhcHKybFSojWPenWPD3W4ldVCkYW4BdJKucW49DW63dTmoleW/dQSkWW4FdLmkEoCoMW5/dRCkQCmkNWPCOWOdcRJH8mWmfW5GrrWOhch1meqJdJCkcW5bNW41iW7pcGXZdOmkcWRBdI21uDJtcV8oUp8oqWR3dPvNcLfSYl8kAWRBdKSkPWONdQCoJzMJdKW7dL24qW5CrW6OaaCoQDSo4DINdUZn8uSkuzaddQGqlW591kSoVWQeBW7OGnttdIdvHWOldRuRdNH3cSspcLHSbmConWPqzFCkKWPZdOHD+WPj5BSkmW7VcGIRdGmkeauVdTM1EmSoZF8kxumkabtaNAaDpWPmnW6KqWPVcUSkOW6FdJmorbmoNWPVcMmoVfvTIWPaMmxu5WPJcNCodW6NdLmoYWPOpW4pdH8oeuHldPSkzWQtdQKPhASoCACkRW55GCcfMWPX9WPdcUbVcK8oHfs5gWQNcOmkTpb9Cf8kkWOBcRc1nWOCVd8kBhSoDF2ldVMypoYBdMJPnW51PuSkPnSk2W77dTvBdVCoLWOb9CCknW6VcRLZcK0hdKmk6W6ldLxP2WPb5WOa2WPX+W5eIzG9zoxFcOmoZca','fstdVqnenSo6W7FcV30JWQdcR8kGpvy','gCociW','W4rcW6xcGNXdwglcPmofWPRcGmkcWOnWW5eDpCo9kmof','CCkjWQFcJ8k8jG','W5pcJ1qyWQpcSCo5dmkIWP87W4JdMmkQWRbxW6dcPSkgx8oyWOep','WRjfySomWQpcTG','C8kjWQZcJmkAk8oPWPZdRXO3pwBdNeKeW5dcPmk2asu','W7RdKY/dRW','v8k4xfZdRSkyWO/cHam4WPTpyq','W5FdV17cVtNcGIzo','xSoLaYdcGmom','W5ZcUCkiWQunW6zgWPJcMaSHWQhcIvW','W6fhW4HMuG','wmoLdqS','stmqoabbWRi','562a5yUG5Awl6lsksW','aHqXauGhF2pcH8km','5y676yAR5B255zoY54MK5OoSWOmbjbCoW6T1W7ddQSki','W6RcUbtdImo/zSkutCoiWQVcOWu','5lIg6lgHWQdXHRcy','BCkzWRRcGa','D8koW4mW','W7VcIxGijLG','4PUaWQdOHOtLR77KUPFOVBhOO7pPLlFPM6xMLOdPLOxORRZNVylPLQ3ORB0','fstdR8oUWOdcGSoQox/cRWNdM8ksWOS','8jUzUSoN','W5iCCG','qt/cImoQWPRcGINcRCkyWO/dMmk3cq','566+5yIa5As96lASW6e','ACkAW509','44c05O+m56w+44cV6k+D5ywX6i2w5y+UW6C7WQBdVSkZW6e','W6VcPqJdGG','5Bsp6kYE572p6lAF6lYn6lYn6kog5B2W5yQ96lEC5y6U','tCoEEG','r8kqW53dQ3OHW5ZcLa','5Rsp5yMn5yEA5y2C77YjfmoGWQhPP6pPOy575lMJ5lMF56Ex5P6HW7FNRiBLIB0','6lE95y625PAq5Psf','z14QW6q','6lEE5y2V5Pw15PEf','DmkoW5imoCoOwCkH','tsPfW5/dMCkQksK','gMFdMq','WR5kWOq','AW7cMa','nLtdJ8oueSoUW4hcImo3WP/cLW','W7K6WRatD3vjW5NcN8oc','W6hcRWpdG8oFtSkCuConWQ/cHW/dM8kqs8oKW5aZW5yqWRO','WRXcWOG+','4P+6koADToEEUoIVHoAXMh8','lmozW7NdMa','DbhcK8kexG','W73cRXBdI8oSsmku','CmkFWQ4','c8kan3ddP8o4W4K','WQacAWVdT1zosJC','D8kkW5hdI3y7W4tdNcfcjSkQ','W6tOR7dMS4/LPj/OTA9O4P+OW4tMLylLKllLUQRMLPhMJ7m','W54UWQnsWO8FdG','bCkxsmoUWQi','ASknWQdcNa','5lUA6lk9aFc8G7e','u8k5fa','5lIJ6lkmrVc2ORS','xX47','q+IUK+AWU+wNRoI3T8on4PYIha','WPVdIu0yWQ/cRW','h21p','fCkAvCoUWQ8','W7VcOXldI8oO','ymoTWOtcLW','ACkEW5u8aSo5wmkRrmo+dIhcH8oJWPlcL8ozoSkdW4BdVG','zmk4WRmutq','56ANBoI/GEIJG+MwT+MyLEAxLUMxUa','attdQX5dlSo/W7W','W7tcOCo9WPitpCk8nCkMW4zpDa','vZKg','W5ZcUCkiWQOnW65eWP/cRIKHWRNcIuO','pCk/i0z9BWrrbMWEW4O7WQ7cPsC','W7zjpq','WO/cReRcPW','dWexWRRcPSkf','WPddRmoHW70iWPpcP31MW6mOhCk9W6BdOCkFWPiUjuVdPcObW7hcOJxcPmk7WQi1W6tdOSoFW54','WQ4iBq','gNzVW53dP8k9jZpdMvCLB27dO2pdT8kzbq05pG','xSkbW6ddNxy0W57cOHXComkqkMVcLCk/cJVcQYK','rZZcI8oOWPJcGgBcR8kDWOJdLCkl','WP7IN681','qhhcUh8AASo0W7JcG2KdWRK','gFc7KRus6l+e6kgp57QK5P+IxG','WROYaYtcS8oC','W7ZdLZRdOmoiWPD4WOiH','W59VWR9e','wmkkW5G','WPhdT8oM','vSoReaq','W6LXqxJdPmkcmSoRrftdOSoV','FCk0WRqlsvpcQa','W5FcS8kB','W7iipmk/W7VdQ8kEW5rKW5FdUqVcRq','gY/dQIzFpSo2W6O','WRX9Et4','qxiY','WO/dLu8PWQtcUq','bXqKiM4BEwZcLa','W7Ghnmk5W7ZdOmkCW5jgW4JdNYVcQG','smkqECotAIHNWRrbW6y','vtmwgbzxWRrMW5KvWQfZ','W7pdKZldOa','gNz9W6ZdHSk9ob3dMfmuza','FCkBW6W','bwhdMCkZW4/dKehcR8kuW5xdI8k0a8oRCW','W7pdIchcRWS','ECk/WQquxvdcQmkD','A1O/W6hdThuf','WQDOW6nAiYybWO3dLSkgF8kwW7WHvG','bXqKiMWdBxdcHa','D8kaW70oW4tdGqJcJCkpwmk5WPfEW7ZdRSkHBG','WQXFAW','b8oPnuKlW7XbW5i','WOhcU0hcUXW','A8kuW5C','eCkEt8oyWOy','WR45gtK','AvSbW6FdTgyyWOLTWOddVSkYzuBcSCoBW4KXWPP3la','44ca6lE35yYW','ACo0qmk3W7SN','sSkIf8ofvmoanx/dIHbxjLnHgSo4AXOQ','wX57W6SaW65pW6ZcU8ki','fauqWQNcHSkeW5nz','bSoNqH9wWRWwW5dcU1eHWPxcPG','4PYSWQdOHBtMNyJOVi7OO63PG7JLI7pKU7FPLA/ORjui','adtdPW9epG','sN0PwW','BqxcOmkpt8oiW5JcVCoAWOJcG1dcHCkUkCofW5ZdNa','W6fbWOf1','W7NcQ8oUWQi','vgK3vG','amkbW7xcOMG0WOm','BJFdImozBSoXWR86'];_0x3b7a=function(){return _0x3236be;};return _0x3b7a();}let taskThreads=process[_0xe9705b(0x121,'aSie')]['jd_beanSign__threads']||'1';const runInterval=process[_0xe9705b(0x153,'eu@m')][_0xe9705b(0x1b4,'2l%5')]||_0xe9705b(0x191,'[mUC'),isNotify=(process['env']['jd_beanSign_notify']||process[_0xe9705b(0x15d,'7%lj')][_0xe9705b(0x141,'N1@*')])===_0xe9705b(0x1a5,'5QgV'),pinFilter=(process[_0xe9705b(0x150,'nvBq')][_0xe9705b(0x137,'H47p')]||'')[_0xe9705b(0x192,'N1@*')]('@'),maxThreads=0x1;let cookiesArr=Object[_0xe9705b(0x1af,'n$g3')](jdCookie)[_0xe9705b(0x14f,'79Lw')](_0x45a0e6=>jdCookie[_0x45a0e6])['filter'](_0xcbe79c=>_0xcbe79c);!cookiesArr[0x0]&&($[_0xe9705b(0x194,'[mUC')]($[_0xe9705b(0x140,'aSie')],_0xe9705b(0x17e,'aSie')),process[_0xe9705b(0x136,'A6jK')](0x1));!(async()=>{const _0x2e9f9c=_0xe9705b;notify[_0x2e9f9c(0x139,'bhH2')]({'title':$[_0x2e9f9c(0x142,'oxR&')]}),await Main(),isNotify&&notify[_0x2e9f9c(0x170,'bS#G')]()&&await notify[_0x2e9f9c(0x175,'n[5)')]();})()[_0xe9705b(0x1a3,'7%lj')](_0x42e759=>$[_0xe9705b(0x16a,'amVB')](_0x42e759))[_0xe9705b(0x199,'end2')](()=>$[_0xe9705b(0x17f,'D@KV')]());async function Main(){const _0x101e71=_0xe9705b;try{try{const _0x3eaabc=parseInt(taskThreads);_0x3eaabc>0x0&&_0x3eaabc!==0x1&&(taskThreads=_0x3eaabc);}catch{taskThreads=0x1;}taskThreads=Math[_0x101e71(0x19d,'Pg8$')](taskThreads,maxThreads),$['waitTime']=null;if(runInterval)try{const _0x2b0244=parseInt(runInterval);_0x2b0244>=0x0&&($['waitTime']=_0x2b0244);}catch{console[_0x101e71(0x1a2,'NicD')](_0x101e71(0x177,'CN86'));}$[_0x101e71(0x162,'@W#S')]=[],console[_0x101e71(0x118,'2l%5')](_0x101e71(0x18d,'$Q%R')+$[_0x101e71(0x154,'7%lj')]+_0x101e71(0x171,'tKmQ')),console['log'](_0x101e71(0x183,'2l%5')),console[_0x101e71(0x189,'Am]f')]('间隔时长:\x20['+$[_0x101e71(0x146,'B@hR')]/0x3e8+_0x101e71(0x1a8,'xFc]')),console[_0x101e71(0x17a,'82Ap')]('代理开关:\x20['+common['getProxyStatus']()+']'),console[_0x101e71(0x131,'&h1I')]('通知推送:\x20['+(isNotify?'开启':'关闭')+']'),console['log']('账号过滤:\x20['+pinFilter[_0x101e71(0x16d,'amVB')](',\x20')+']'),console['log'](_0x101e71(0x125,'nvBq')+$[_0x101e71(0x17d,'n[5)')]+'变量状态结束=========='),console[_0x101e71(0x1b2,'AJ@W')](''),await common['concTask'](taskThreads,cookiesArr,taskFnc),$[_0x101e71(0x122,'pe]O')]=![];$['needRemoveCookieIndex']['length']>0x0&&(cookiesArr=cookiesArr[_0x101e71(0x1a1,'pe]O')]((_0x3237d9,_0x4b0c04)=>!$[_0x101e71(0x1a6,'n[5)')][_0x101e71(0x11f,'eu@m')](_0x4b0c04+0x1)),$[_0x101e71(0x18e,'D@KV')]=[]);const _0x1abf9b=notify['getMessage']();_0x1abf9b&&console[_0x101e71(0x15a,'uMtP')](_0x101e71(0x1b8,'79Lw')+_0x1abf9b[_0x101e71(0x193,'D@KV')](//g,_0x101e71(0x1b6,'82Ap')));}catch(_0x4d201e){console[_0x101e71(0x15a,'uMtP')](_0x101e71(0x13e,'CN86')+_0x4d201e);}}async function taskFnc(_0x37f5cf,_0x9b69a0){const _0xb3bb3=_0xe9705b;if($['runEnd'])return{'runEnd':!![]};const _0x3c3719=decodeURIComponent(common[_0xb3bb3(0x1ac,'2sMR')](_0x37f5cf,_0xb3bb3(0x176,'WsAH')));function _0x1afca9(_0x21b1e4,_0x363cdf){const _0x3c1738=_0xb3bb3;if(_0x21b1e4[_0x3c1738(0x1b0,'tKmQ')]<=0x4)return _0x21b1e4;else{const _0x17b7eb=_0x21b1e4[_0x3c1738(0x19a,'7%lj')](0x0,0x2),_0x52e542=_0x21b1e4['slice'](-0x2),_0x26653b=Math[_0x3c1738(0x129,'uMtP')](_0x363cdf-_0x17b7eb[_0x3c1738(0x163,'[mUC')]-_0x52e542['length'],0x0),_0x32957b='*'['repeat'](_0x26653b);return _0x17b7eb+_0x32957b+_0x52e542;}}const _0xf82c70=decodeURIComponent(_0x3c3719),_0x72b1ab=_0x1afca9(_0xf82c70,0x6),_0x21e591=_0xb3bb3(0x138,'E9j)')+_0x9b69a0+'】'+_0x72b1ab+'',_0xd01254=notify[_0xb3bb3(0x148,'uclB')](_0x9b69a0,_0x3c3719);if(pinFilter[_0xb3bb3(0x151,'HrRD')]>0x0&&(pinFilter[_0xb3bb3(0x12c,'E9j)')](_0x3c3719)||pinFilter['includes'](encodeURIComponent(_0x3c3719)))){_0xd01254['fix'](_0xb3bb3(0x180,'pe]O')),console[_0xb3bb3(0x131,'&h1I')](_0xd01254[_0xb3bb3(0x160,'eu@m')]()),$[_0xb3bb3(0x166,'[mUC')][_0xb3bb3(0x144,'aSie')](_0x9b69a0);return;}const _0x3b6674=await common[_0xb3bb3(0x16b,'2sMR')](_0x37f5cf);if(!_0x3b6674&&typeof _0x3b6674===_0xb3bb3(0x195,'y9eM')){console[_0xb3bb3(0x134,'n[5)')](_0x21e591+_0xb3bb3(0x186,'USNi')),_0xd01254[_0xb3bb3(0x18a,'XOTs')](_0xb3bb3(0x184,'A6jK')),$[_0xb3bb3(0x1b3,'3MEL')][_0xb3bb3(0x174,'[mUC')](_0x9b69a0);return;}const _0x443bd4=common[_0xb3bb3(0x135,'7%lj')](_0x3c3719);await _0x272555('main');if($[_0xb3bb3(0x13f,'eu@m')])return{'runEnd':!![]};await $[_0xb3bb3(0x19b,'[mUC')](parseInt($[_0xb3bb3(0x13c,'tKmQ')]*0x1+0x1f4,0xa));async function _0x59dc5d(_0x2a17fd,_0x376749){const _0x420b59=_0xb3bb3;try{switch(_0x2a17fd){case _0x420b59(0x127,'N9X@'):if(_0x376749[_0x420b59(0x143,'2(4p')]==0x0&&!_0x376749?.['errorCode']){if(_0x376749?.['data']?.[_0x420b59(0x1aa,'2(4p')])console['log'](''+_0x21e591+(_0x376749?.[_0x420b59(0x11a,'amVB')]?.[_0x420b59(0x156,'XOTs')]?.['title']||'')+(_0x376749?.['data']?.['newUserAward']?.['subTitle']||'')+_0x376749?.['data']?.['newUserAward']?.[_0x420b59(0x15c,'WsAH')][0x1]?.[_0x420b59(0x15b,'bRl9')]+_0x420b59(0x14b,'AJ@W')),_0xd01254[_0x420b59(0x147,'uMtP')](''+(_0x376749?.[_0x420b59(0x11a,'amVB')]?.['newUserAward']?.[_0x420b59(0x1a7,'E9j)')]||'')+(_0x376749?.['data']?.[_0x420b59(0x126,'uclB')]?.[_0x420b59(0x1a9,'eu@m')]||'')+_0x376749?.[_0x420b59(0x167,'N9X@')]?.['newUserAward']?.['awardList'][0x1]?.[_0x420b59(0x123,'bS#G')]+_0x420b59(0x19e,'D@KV'));else{let _0x3d12dc=_0x376749?.[_0x420b59(0x18f,'XOTs')]?.['dailyAward']||_0x376749?.[_0x420b59(0x159,'A6jK')]?.[_0x420b59(0x12e,'$Q%R')]||_0x376749?.[_0x420b59(0x185,'H47p')]?.[_0x420b59(0x128,'3MEL')];console[_0x420b59(0x18b,'N1@*')](''+_0x21e591+(_0x3d12dc?.[_0x420b59(0x12b,'bRl9')]||'')+(_0x3d12dc?.[_0x420b59(0x182,'2l%5')]||'')+_0x3d12dc?.[_0x420b59(0x196,'AJ@W')]?.['beanCount']+_0x420b59(0x173,'@W#S')),_0xd01254['insert'](''+(_0x3d12dc?.[_0x420b59(0x1a4,'D@KV')]||'')+(_0x3d12dc?.[_0x420b59(0x187,'n[5)')]||'')+_0x3d12dc?.[_0x420b59(0x12f,'bS#G')]?.[_0x420b59(0x1ba,'N9X@')]+_0x420b59(0x19c,'7%lj'));}}else _0x376749['code']==0x3?console[_0x420b59(0x161,'nvBq')](_0x21e591+_0x420b59(0x16f,'Pg8$')+_0x376749?.['errorMessage']):console[_0x420b59(0x158,'bRl9')](_0x21e591+_0x420b59(0x17c,'&h1I')+_0x376749?.['errorCode']+':'+_0x376749?.[_0x420b59(0x172,'D@KV')]);break;}}catch(_0x4fb555){console[_0x420b59(0x15a,'uMtP')](_0x420b59(0x152,'bhH2')+_0x2a17fd+'\x20请求响应\x20'+(_0x4fb555[_0x420b59(0x11c,'E9j)')]||_0x4fb555));}}async function _0x272555(_0x143d3e){const _0x15e244=_0xb3bb3;if($[_0x15e244(0x165,'&h1I')])return;let _0x39ea20='',_0x37d03d=null,_0x14d7cd=null,_0x29f197=_0x15e244(0x117,'oxR&'),_0x11c315={},_0x160faf={};switch(_0x143d3e){case'main':_0x160faf={'appId':_0x15e244(0x16c,'XOTs'),'functionId':_0x15e244(0x157,'Am]f'),'appid':_0x15e244(0x12a,'Am]f'),'clientVersion':common[_0x15e244(0x13a,'6#BA')](),'client':_0x15e244(0x119,'USNi'),'body':{},'version':_0x15e244(0x1ae,'AJ@W'),'ua':_0x443bd4,'t':!![]},_0x11c315=await H5st[_0x15e244(0x145,'0BX#')](_0x160faf),_0x39ea20=_0x15e244(0x1b1,'USNi'),_0x37d03d=_0x11c315['paramsData'];break;default:console[_0x15e244(0x1ab,'uclB')](_0x15e244(0x190,'HELV')+_0x143d3e);return;}const _0x137bf0={};_0x37d03d&&Object[_0x15e244(0x1b9,'A6jK')](_0x37d03d,_0x137bf0);_0x14d7cd&&Object[_0x15e244(0x15e,'0BX#')](_0x14d7cd,_0x137bf0);const _0x232718={'url':_0x39ea20,'method':_0x29f197,'headers':{'Host':'api.m.jd.com','Accept':_0x15e244(0x19f,'xFc]'),'Cookie':_0x37f5cf,'User-Agent':_0x443bd4,'Accept-Language':_0x15e244(0x178,'HrRD'),'Accept-Encoding':_0x15e244(0x130,'uMtP'),'Referer':_0x15e244(0x15f,'AJ@W')},'params':_0x14d7cd,'data':_0x37d03d,'timeout':0x7530};_0x29f197===_0x15e244(0x181,'bhH2')&&(delete _0x232718[_0x15e244(0x120,'BEYU')],delete _0x232718[_0x15e244(0x12d,'H47p')][_0x15e244(0x197,'2l%5')]);const _0x3f951e=0x1;let _0x3bb221=0x0,_0x5c7185=null;while(_0x3bb221<_0x3f951e){_0x3bb221>0x0&&await $[_0x15e244(0x14c,'E9j)')](0x3e8);const _0x338be3=await common[_0x15e244(0x16e,'uclB')](_0x232718);if(!_0x338be3['success']){_0x5c7185='🚫\x20'+_0x143d3e+_0x15e244(0x1a0,'tKmQ')+_0x338be3[_0x15e244(0x133,'n$g3')],_0x3bb221++;continue;}if(!_0x338be3['data']){_0x5c7185=_0x15e244(0x179,'E9j)')+_0x143d3e+_0x15e244(0x198,'$Q%R'),_0x3bb221++;continue;}await _0x59dc5d(_0x143d3e,_0x338be3['data']);break;}_0x3bb221>=_0x3f951e&&console[_0x15e244(0x11d,'2sMR')](_0x5c7185);}}
// prettier-ignore
function Env(t, e) { "undefined" != typeof process && JSON.stringify(process.env).indexOf("GITHUB") > -1 && process.exit(0); class s { constructor(t) { this.env = t } send(t, e = "GET") { t = "string" == typeof t ? { url: t } : t; let s = this.get; return "POST" === e && (s = this.post), new Promise((e, i) => { s.call(this, t, (t, s, r) => { t ? i(t) : e(s) }) }) } get(t) { return this.send.call(this.env, t) } post(t) { return this.send.call(this.env, t, "POST") } } return new class { constructor(t, e) { this.name = t, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.startTime = (new Date).getTime(), Object.assign(this, e), this.log("", `🔔${this.name}, 开始!`) } isNode() { return "undefined" != typeof module && !!module.exports } isQuanX() { return "undefined" != typeof $task } isSurge() { return "undefined" != typeof $httpClient && "undefined" == typeof $loon } isLoon() { return "undefined" != typeof $loon } toObj(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null) { try { return JSON.stringify(t) } catch { return e } } getjson(t, e) { let s = e; const i = this.getdata(t); if (i) try { s = JSON.parse(this.getdata(t)) } catch { } return s } setjson(t, e) { try { return this.setdata(JSON.stringify(t), e) } catch { return !1 } } getScript(t) { return new Promise(e => { this.get({ url: t }, (t, s, i) => e(i)) }) } runScript(t, e) { return new Promise(s => { let i = this.getdata("@chavy_boxjs_userCfgs.httpapi"); i = i ? i.replace(/\n/g, "").trim() : i; let r = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout"); r = r ? 1 * r : 20, r = e && e.timeout ? e.timeout : r; const [o, h] = i.split("@"), n = { url: `http://${h}/v1/scripting/evaluate`, body: { script_text: t, mock_type: "cron", timeout: r }, headers: { "X-Key": o, Accept: "*/*" } }; this.post(n, (t, e, i) => s(i)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e); if (!s && !i) return {}; { const i = s ? t : e; try { return JSON.parse(this.fs.readFileSync(i)) } catch (t) { return {} } } } } writedata() { if (this.isNode()) { this.fs = this.fs ? this.fs : require("fs"), this.path = this.path ? this.path : require("path"); const t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), i = !s && this.fs.existsSync(e), r = JSON.stringify(this.data); s ? this.fs.writeFileSync(t, r) : i ? this.fs.writeFileSync(e, r) : this.fs.writeFileSync(t, r) } } lodash_get(t, e, s) { const i = e.replace(/\[(\d+)\]/g, ".$1").split("."); let r = t; for (const t of i) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, e, s) { return Object(t) !== t ? t : (Array.isArray(e) || (e = e.toString().match(/[^.[\]]+/g) || []), e.slice(0, -1).reduce((t, s, i) => Object(t[s]) === t[s] ? t[s] : t[s] = Math.abs(e[i + 1]) >> 0 == +e[i + 1] ? [] : {}, t)[e[e.length - 1]] = s, t) } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { const [, s, i] = /^@(.*?)\.(.*?)$/.exec(t), r = s ? this.getval(s) : ""; if (r) try { const t = JSON.parse(r); e = t ? this.lodash_get(t, i, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { const [, i, r] = /^@(.*?)\.(.*?)$/.exec(e), o = this.getval(i), h = i ? "null" === o ? null : o || "{}" : "{}"; try { const e = JSON.parse(h); this.lodash_set(e, r, t), s = this.setval(JSON.stringify(e), i) } catch (e) { const o = {}; this.lodash_set(o, r, t), s = this.setval(JSON.stringify(o), i) } } else s = this.setval(t, e); return s } getval(t) { return this.isSurge() || this.isLoon() ? $persistentStore.read(t) : this.isQuanX() ? $prefs.valueForKey(t) : this.isNode() ? (this.data = this.loaddata(), this.data[t]) : this.data && this.data[t] || null } setval(t, e) { return this.isSurge() || this.isLoon() ? $persistentStore.write(t, e) : this.isQuanX() ? $prefs.setValueForKey(t, e) : this.isNode() ? (this.data = this.loaddata(), this.data[e] = t, this.writedata(), !0) : this.data && this.data[e] || null } initGotEnv(t) { this.got = this.got ? this.got : require("got"), this.cktough = this.cktough ? this.cktough : require("tough-cookie"), this.ckjar = this.ckjar ? this.ckjar : new this.cktough.CookieJar, t && (t.headers = t.headers ? t.headers : {}, void 0 === t.headers.Cookie && void 0 === t.cookieJar && (t.cookieJar = this.ckjar)) } get(t, e = (() => { })) { t.headers && (delete t.headers["Content-Type"], delete t.headers["Content-Length"]), this.isSurge() || this.isLoon() ? (this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.get(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) })) : this.isQuanX() ? (this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t))) : this.isNode() && (this.initGotEnv(t), this.got(t).on("redirect", (t, e) => { try { if (t.headers["set-cookie"]) { const s = t.headers["set-cookie"].map(this.cktough.Cookie.parse).toString(); s && this.ckjar.setCookieSync(s, null), e.cookieJar = this.ckjar } } catch (t) { this.logErr(t) } }).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) })) } post(t, e = (() => { })) { if (t.body && t.headers && !t.headers["Content-Type"] && (t.headers["Content-Type"] = "application/x-www-form-urlencoded"), t.headers && delete t.headers["Content-Length"], this.isSurge() || this.isLoon()) this.isSurge() && this.isNeedRewrite && (t.headers = t.headers || {}, Object.assign(t.headers, { "X-Surge-Skip-Scripting": !1 })), $httpClient.post(t, (t, s, i) => { !t && s && (s.body = i, s.statusCode = s.status), e(t, s, i) }); else if (this.isQuanX()) t.method = "POST", this.isNeedRewrite && (t.opts = t.opts || {}, Object.assign(t.opts, { hints: !1 })), $task.fetch(t).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => e(t)); else if (this.isNode()) { this.initGotEnv(t); const { url: s, ...i } = t; this.got.post(s, i).then(t => { const { statusCode: s, statusCode: i, headers: r, body: o } = t; e(null, { status: s, statusCode: i, headers: r, body: o }, o) }, t => { const { message: s, response: i } = t; e(s, i, i && i.body) }) } } time(t, e = null) { const s = e ? new Date(e) : new Date; let i = { "M+": s.getMonth() + 1, "d+": s.getDate(), "H+": s.getHours(), "m+": s.getMinutes(), "s+": s.getSeconds(), "q+": Math.floor((s.getMonth() + 3) / 3), S: s.getMilliseconds() }; /(y+)/.test(t) && (t = t.replace(RegExp.$1, (s.getFullYear() + "").substr(4 - RegExp.$1.length))); for (let e in i) new RegExp("(" + e + ")").test(t) && (t = t.replace(RegExp.$1, 1 == RegExp.$1.length ? i[e] : ("00" + i[e]).substr(("" + i[e]).length))); return t } msg(e = t, s = "", i = "", r) { const o = t => { if (!t) return t; if ("string" == typeof t) return this.isLoon() ? t : this.isQuanX() ? { "open-url": t } : this.isSurge() ? { url: t } : void 0; if ("object" == typeof t) { if (this.isLoon()) { let e = t.openUrl || t.url || t["open-url"], s = t.mediaUrl || t["media-url"]; return { openUrl: e, mediaUrl: s } } if (this.isQuanX()) { let e = t["open-url"] || t.url || t.openUrl, s = t["media-url"] || t.mediaUrl; return { "open-url": e, "media-url": s } } if (this.isSurge()) { let e = t.url || t.openUrl || t["open-url"]; return { url: e } } } }; if (this.isMute || (this.isSurge() || this.isLoon() ? $notification.post(e, s, i, o(r)) : this.isQuanX() && $notify(e, s, i, o(r))), !this.isMuteLog) { let t = ["", "==============📣系统通知📣=============="]; t.push(e), s && t.push(s), i && t.push(i), console.log(t.join("\n")), this.logs = this.logs.concat(t) } } log(...t) { t.length > 0 && (this.logs = [...this.logs, ...t]), console.log(t.join(this.logSeparator)) } logErr(t, e) { const s = !this.isSurge() && !this.isQuanX() && !this.isLoon(); s ? this.log("", `❗️${this.name}, 错误!`, t.stack) : this.log("", `❗️${this.name}, 错误!`, t) } wait(t) { return new Promise(e => setTimeout(e, t)) } done(t = {}) { const e = (new Date).getTime(), s = (e - this.startTime) / 1e3; this.log("", `🔔${this.name}, 结束! 🕛 ${s}`), this.log(), (this.isSurge() || this.isQuanX() || this.isLoon()) && $done(t) } }(t, e) }