-
Notifications
You must be signed in to change notification settings - Fork 6
/
ele_tjcs.js
14 lines (11 loc) · 23.7 KB
/
ele_tjcs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
* @平行绳 飞机频道:https://t.me/tigerorrose
* 变量:elmck: 必填,账号cookie,短信登录面板项目地址:https://github.com/funaihui/eleWeb
* cron 0 0 11 * * *
* 2023.6.26 更新:首次发布;
* 2023.7.7 更新:添加延时,增加 cookie 失效验证
*/
const $ = new Env('枫叶_饿了么特级厨师');
function _0x3433(){const _0x5ea3f6=['NdLtZ','bIEds','srnYy','mYssF','\x0a******\x20#','aiGJA','{\x5c\x22actId\x5c\x22:\x5c\x2220230117134129770153614517\x5c\x22,\x5c\x22bizScene\x5c\x22:\x5c\x22XIAODANGJIA\x5c\x22,\x5c\x22desc\x5c\x22:\x5c\x22玩特级厨师挑战赛\x5c\x22}','KIUBz','hgsOc','KSvAZ','USmVR','账号的\x20id\x20为','localId','*********','账号失效!请重新登录!!!😭','call','dzCUE','ret','eHcGn','140jlAcFu','fACDI','WwbAs','aQnDB','length','3113lMuiHP','1798458tlTftM','Uvwto','wSnEr','2A22C0239QW1FOL3UUQY7U','AAVLL','while\x20(true)\x20{}','input','ziBnK','pcvTR','GiCzo','rQuUV','183800RYGGfC','WnxJZ','test','userName','eynQS','./common.js','AqvCn','hxsym','discountInfo','防止挤爆了,延时\x201\x20秒','uJExt','89873AxlbYv','3524535QypRqO','gger','string','254MZxDEx','kvKuW','ELE_CARME','exit','action','amount','env','amiTZ','LScIG','180dHtZkh','dXvcs','ecABv','1630KUxwNX','chain','wnuJB','mtop.koubei.interactioncenter.platform.right.lottery','FsspV','1220752vyHYck','JlTVG','KNbVl','20230505143809276394718532','stateObject','ZqrhP','gghqW','特级厨师闯关成功。获得:','SPzTb','sQKDY','cBWZz','vmHqP','IWoeT','LYoii','log','xXBmw','mtop.ele.me','vXaTC','8rPynML','elmck','NhNZp','vntaP','AejRf','RLvTK','apply','sACij','CEsSL','ELIwQ','zLFDR','khMWK','QcTKn','init','aSAgY','lcYqe','CQAbF','data','FgJog','aZeWp','YgPlT','20230421102945045949799658','debu','values','JpiVD','kMCOE','yyLRL','PLyCL','wtrMl','DhXyR','sNccI','iSbET','NYKvg','YSlXV','ylppU','constructor','encryptMobile','lIJnd','WEEzB','xVOkh','Rysiv','qmlJn','meWLz','nrvyO','hkgib','FFCez','apniu','TZTwS','xXPEU','zGLVR','vOUjX','function\x20*\x5c(\x20*\x5c)','78lyPYgp','cBCNQ','48310dcVDgp','sendRightList','乐园币'];_0x3433=function(){return _0x5ea3f6;};return _0x3433();}const _0x17b572=_0x2aa0;(function(_0x580df0,_0x3eb94f){const _0x1b5f0d=_0x2aa0,_0x2feba7=_0x580df0();while(!![]){try{const _0x4a1c71=parseInt(_0x1b5f0d(0x1a1))/(0x2257+-0x53+-0x2203)*(parseInt(_0x1b5f0d(0x195))/(0x644+-0x1*0x2135+0x1af3))+-parseInt(_0x1b5f0d(0x17b))/(-0xf16+-0x181b+0x304*0xd)+parseInt(_0x1b5f0d(0x175))/(0x593*-0x7+0x1814+-0xef5*-0x1)*(parseInt(_0x1b5f0d(0x186))/(-0x7a6+-0x5*-0x58b+-0x1*0x140c))+-parseInt(_0x1b5f0d(0x15d))/(0x5*-0x512+0x1c3b+-0x2db)*(-parseInt(_0x1b5f0d(0x191))/(-0x187b+0x773*-0x2+-0x8*-0x4ed))+parseInt(_0x1b5f0d(0x1b8))/(-0xbd*0xd+0x16ec+-0xd4b)*(-parseInt(_0x1b5f0d(0x192))/(0x1b38+0xd13*-0x1+-0xe1c))+-parseInt(_0x1b5f0d(0x15f))/(0x1b23*-0x1+-0x1c25+0x3752)*(parseInt(_0x1b5f0d(0x17a))/(0x16*0x1ba+-0x112d+0x1*-0x14c4))+-parseInt(_0x1b5f0d(0x19e))/(0x245+-0x1*-0x695+-0x2*0x467)*(-parseInt(_0x1b5f0d(0x1a6))/(0x27*0xc2+-0x1f07*0x1+0x186));if(_0x4a1c71===_0x3eb94f)break;else _0x2feba7['push'](_0x2feba7['shift']());}catch(_0xfeeaef){_0x2feba7['push'](_0x2feba7['shift']());}}}(_0x3433,-0x11eda5+-0x1*-0xe5807+0x1*0xe6e31));function _0x2aa0(_0x5cc8a6,_0x2cd6a2){const _0x39f706=_0x3433();return _0x2aa0=function(_0x5f07bf,_0x56f864){_0x5f07bf=_0x5f07bf-(0xcb5*0x1+0x1*-0xa73+-0xfa);let _0x2ecbc5=_0x39f706[_0x5f07bf];return _0x2ecbc5;},_0x2aa0(_0x5cc8a6,_0x2cd6a2);}const {validateCarmeWithType:_0x30a8a3,commonRequest:_0x46161b,getCookies:_0x210594,getUserInfoWithX:_0x152c2f,wait:_0x1a2f0c,getCoordinates}=require(_0x17b572(0x18b)),_0x20a517=process[_0x17b572(0x19b)][_0x17b572(0x197)],_0x2bec0b=0x124f+0x3b*-0x89+0xd47;function _0x40ab69(_0x403f82){const _0x1ddfcb=_0x17b572,_0x220564={'haSOw':function(_0x51598d,_0x3806aa){return _0x51598d===_0x3806aa;}};return _0x220564['haSOw'](Object[_0x1ddfcb(0x1cf)](_0x403f82)[_0x1ddfcb(0x179)],0x1d01+-0x1*0x2545+0x844);}async function _0x154fb2(_0x4e0ae7,_0x1a1aac,_0x1037cb,_0xfadcbd){const _0x1f3076=_0x17b572,_0x1f0608={'amiTZ':function(_0x5011be,_0x44bc00){return _0x5011be(_0x44bc00);},'YSlXV':'XIAODANGJIA','KIUBz':_0x1f3076(0x1cd),'IYZBg':_0x1f3076(0x168),'ziBnK':_0x1f3076(0x17e),'MrGMm':_0x1f3076(0x1a4),'pEEHf':_0x1f3076(0x1b6),'hxsym':function(_0x3b009f,_0x4fab6c){return _0x3b009f+_0x4fab6c;},'JkIUr':_0x1f3076(0x1ad),'RHQCl':function(_0x2d86d4,_0xf58bda){return _0x2d86d4!==_0xf58bda;},'fACDI':function(_0xe6859c,_0xc99f74,_0x14ab5e,_0x2ea14c,_0x4f74d5){return _0xe6859c(_0xc99f74,_0x14ab5e,_0x2ea14c,_0x4f74d5);},'sacdn':function(_0x52bb20,_0x21bc62){return _0x52bb20!==_0x21bc62;},'vXaTC':function(_0x21512d,_0x22a89d){return _0x21512d===_0x22a89d;},'bIEds':_0x1f3076(0x177),'aRSnA':_0x1f3076(0x14f)},_0x5a2323={'bizScene':_0x1f0608[_0x1f3076(0x14a)],'actId':'20230117134129770153614517','uniqueId':'','latitude':_0x1037cb,'longitude':_0xfadcbd,'cityId':'2','bizCode':_0x1f0608['YSlXV'],'collectionId':_0x1f0608[_0x1f3076(0x169)],'componentId':_0x1f3076(0x1a9),'extParams':_0x1f0608['IYZBg'],'asac':_0x1f0608[_0x1f3076(0x182)]};let _0x3b644c=_0x1f0608['MrGMm'];try{const _0x4ec97d=await _0x46161b(_0x4e0ae7,JSON['stringify'](_0x5a2323),_0x3b644c,_0x2bec0b,_0x1f0608['pEEHf'],process[_0x1f3076(0x19b)]['x5sec']);if(_0x40ab69(_0x4ec97d[_0x1f3076(0x1c9)][_0x1f3076(0x1c9)]))return console['log'](_0x4ec97d[_0x1f3076(0x173)][-0x9db+-0x2614+-0x6d9*-0x7]),![];else{const _0x4b8af4=_0x4ec97d[_0x1f3076(0x1c9)][_0x1f3076(0x1c9)][_0x1f3076(0x160)][-0x1044+-0x21f3+0x3237][_0x1f3076(0x18e)][_0x1f3076(0x19a)];return console[_0x1f3076(0x1b4)](_0x1f0608[_0x1f3076(0x18d)](_0x1f0608['JkIUr'],_0x4b8af4),_0x1f3076(0x161)),_0x4b8af4&&_0x1f0608['RHQCl'](_0x4b8af4,-0xf5*0x3+-0x3*-0x572+-0xd76)&&await _0x1f0608[_0x1f3076(0x176)](_0x154fb2,_0x4e0ae7,_0x1a1aac,_0x1037cb,_0xfadcbd),await _0x1a2f0c(0x16de+-0x6fb*-0x4+0x1*-0x32c9),_0x1f0608['sacdn'](_0x4b8af4,0x21ba+0x1*-0x821+-0x54*0x4e);}}catch(_0x3efe31){if(_0x1f0608[_0x1f3076(0x1b7)](_0x1f0608[_0x1f3076(0x163)],_0x1f0608['aRSnA']))LIgLlk[_0x1f3076(0x19c)](_0x5af00a,-0x1aa*-0x9+-0x1*0xe5+0x203*-0x7);else return![];}}async function _0x3ca360(){const _0x10cdc4=_0x17b572,_0x2f5dba={'AqvCn':function(_0x5af7cd,_0x3ad740){return _0x5af7cd(_0x3ad740);},'LYoii':function(_0x3b50b4,_0x212657){return _0x3b50b4!==_0x212657;},'zLFDR':'function\x20*\x5c(\x20*\x5c)','aQnDB':'\x5c+\x5c+\x20*(?:[a-zA-Z_$][0-9a-zA-Z_$]*)','nrvyO':function(_0x5dc4f3,_0xd74b27){return _0x5dc4f3===_0xd74b27;},'dzCUE':_0x10cdc4(0x155),'VXwFW':function(_0x27eef5,_0x43c3d3){return _0x27eef5!==_0x43c3d3;},'PLyCL':_0x10cdc4(0x1c4),'aZeWp':_0x10cdc4(0x165),'RRRXn':'mloRt','cBWZz':'init','NhNZp':function(_0x14a451,_0x44d303){return _0x14a451+_0x44d303;},'EUoQy':_0x10cdc4(0x1a2),'iSbET':function(_0x46fdc9){return _0x46fdc9();},'aSAgY':function(_0x3344ef,_0x131f95,_0x56edb5){return _0x3344ef(_0x131f95,_0x56edb5);},'HXVxX':function(_0x5d4601,_0x3a514b){return _0x5d4601(_0x3a514b);},'NYKvg':_0x10cdc4(0x1b9),'dXvcs':function(_0x295c96,_0x30b4d3){return _0x295c96<_0x30b4d3;},'aiGJA':_0x10cdc4(0x170),'CEsSL':_0x10cdc4(0x166),'eynQS':function(_0x26ba42,_0x37a8b0){return _0x26ba42+_0x37a8b0;},'AejRf':_0x10cdc4(0x16d),'IWoeT':function(_0xc83cde,_0x3d0b98,_0x5b41e0,_0x82e28c,_0xe57944){return _0xc83cde(_0x3d0b98,_0x5b41e0,_0x82e28c,_0xe57944);},'sNccI':_0x10cdc4(0x18f)},_0x582cfd=(function(){const _0x59c481=_0x10cdc4,_0x1734f3={'rQuUV':function(_0x41f3de,_0x49f47a){const _0x34d27a=_0x2aa0;return _0x2f5dba[_0x34d27a(0x1b3)](_0x41f3de,_0x49f47a);},'Uvwto':_0x59c481(0x184),'sACij':_0x2f5dba[_0x59c481(0x1c2)],'IOOtm':_0x2f5dba[_0x59c481(0x178)],'izAmT':function(_0x1757ca,_0x59b6fa){const _0x3f3355=_0x59c481;return _0x2f5dba[_0x3f3355(0x154)](_0x1757ca,_0x59b6fa);},'cBCNQ':_0x2f5dba[_0x59c481(0x172)]};if(_0x2f5dba['VXwFW'](_0x2f5dba[_0x59c481(0x1d3)],_0x2f5dba['PLyCL'])){if(_0x502423)return _0x506421;else iXQsXk[_0x59c481(0x18c)](_0x33c3cc,0x603*-0x3+-0x2c*-0xc4+-0xfa7);}else{let _0x513e0f=!![];return function(_0x22fc64,_0x2678c7){const _0x58d2a4=_0x59c481,_0x567180={'SPzTb':function(_0x65c16,_0x31eb60){const _0x26f105=_0x2aa0;return _0x1734f3[_0x26f105(0x185)](_0x65c16,_0x31eb60);},'ELIwQ':_0x1734f3[_0x58d2a4(0x17c)],'yyLRL':_0x1734f3[_0x58d2a4(0x1bf)],'hgsOc':_0x1734f3['IOOtm'],'RJCqK':_0x58d2a4(0x1c5),'kvKuW':function(_0x49c1d4){return _0x49c1d4();}};if(_0x1734f3['izAmT'](_0x1734f3[_0x58d2a4(0x15e)],_0x1734f3['cBCNQ'])){const _0x44050f=_0x513e0f?function(){const _0x592e45=_0x58d2a4;if(_0x567180[_0x592e45(0x1ae)](_0x592e45(0x190),_0x567180[_0x592e45(0x1c1)])){if(_0x2678c7){const _0x5a82ee=_0x2678c7['apply'](_0x22fc64,arguments);return _0x2678c7=null,_0x5a82ee;}}else{const _0xa5ec2b=_0x9c0ca9?function(){const _0x359679=_0x592e45;if(_0x4bbebe){const _0x4a6b2b=_0x47ad82[_0x359679(0x1be)](_0x182648,arguments);return _0x5cc20e=null,_0x4a6b2b;}}:function(){};return _0xd167b8=![],_0xa5ec2b;}}:function(){};return _0x513e0f=![],_0x44050f;}else{const _0x1d9070={'YgPlT':keSqlO[_0x58d2a4(0x1d2)],'xXBmw':keSqlO[_0x58d2a4(0x16a)],'eBdkc':function(_0x5121e5,_0xf53bdc){return _0x5121e5(_0xf53bdc);},'JpiVD':keSqlO['RJCqK'],'zGLVR':function(_0x3b9e59,_0x1dffa1){return _0x3b9e59+_0x1dffa1;},'wtrMl':'chain','CQAbF':function(_0xa2c146,_0x206970){return _0xa2c146+_0x206970;},'xXPEU':_0x58d2a4(0x181),'Rysiv':function(_0x18ff16,_0xe3c35e){return _0x18ff16(_0xe3c35e);},'ehsYu':function(_0x573016){const _0x31ccaf=_0x58d2a4;return keSqlO[_0x31ccaf(0x196)](_0x573016);}};_0x59fe96(this,function(){const _0x5302a8=_0x58d2a4,_0x3b1205=new _0x36204c(_0x1d9070[_0x5302a8(0x1cc)]),_0xfa6faf=new _0x3a55d5(_0x1d9070[_0x5302a8(0x1b5)],'i'),_0x154292=_0x1d9070['eBdkc'](_0x154881,_0x1d9070[_0x5302a8(0x1d0)]);!_0x3b1205[_0x5302a8(0x188)](_0x1d9070[_0x5302a8(0x15a)](_0x154292,_0x1d9070[_0x5302a8(0x1d4)]))||!_0xfa6faf[_0x5302a8(0x188)](_0x1d9070[_0x5302a8(0x1c8)](_0x154292,_0x1d9070[_0x5302a8(0x159)]))?_0x1d9070[_0x5302a8(0x151)](_0x154292,'0'):_0x1d9070['ehsYu'](_0x44b581);})();}};}}());(function(){const _0x51be0f=_0x10cdc4,_0xd76d11={'LScIG':_0x2f5dba[_0x51be0f(0x1cb)],'FsspV':_0x2f5dba['RRRXn'],'moNaR':_0x2f5dba['aQnDB'],'KSvAZ':function(_0x3c2c7e,_0x2c9ee1){const _0x4580da=_0x51be0f;return _0x2f5dba[_0x4580da(0x18c)](_0x3c2c7e,_0x2c9ee1);},'DhXyR':_0x2f5dba[_0x51be0f(0x1b0)],'YPDDg':function(_0x278d92,_0x25d1cc){const _0x5b794e=_0x51be0f;return _0x2f5dba[_0x5b794e(0x1ba)](_0x278d92,_0x25d1cc);},'lcYqe':_0x2f5dba['EUoQy'],'wSnEr':_0x51be0f(0x181),'AAVLL':function(_0x38acaa){const _0x4b5bc3=_0x51be0f;return _0x2f5dba[_0x4b5bc3(0x148)](_0x38acaa);}};_0x582cfd(this,function(){const _0xc205de=_0x51be0f;if(_0xd76d11[_0xc205de(0x19d)]===_0xd76d11[_0xc205de(0x1a5)])return![];else{const _0xbb295d=new RegExp(_0xc205de(0x15c)),_0x5c16bc=new RegExp(_0xd76d11['moNaR'],'i'),_0x5bdd57=_0xd76d11[_0xc205de(0x16b)](_0x4ee99e,_0xd76d11[_0xc205de(0x1d5)]);!_0xbb295d[_0xc205de(0x188)](_0xd76d11['YPDDg'](_0x5bdd57,_0xd76d11[_0xc205de(0x1c7)]))||!_0x5c16bc[_0xc205de(0x188)](_0xd76d11['YPDDg'](_0x5bdd57,_0xd76d11[_0xc205de(0x17d)]))?_0xd76d11['KSvAZ'](_0x5bdd57,'0'):_0xd76d11[_0xc205de(0x17f)](_0x4ee99e);}})();}()),await _0x2f5dba[_0x10cdc4(0x1c6)](_0x30a8a3,_0x20a517,0x7ad+0x864*0x2+-0x1874);const _0x26db4f=_0x2f5dba['HXVxX'](_0x210594,_0x2f5dba[_0x10cdc4(0x149)]),{latitude:_0x386378,longitude:_0x43eb6b}=await _0x2f5dba['iSbET'](getCoordinates);for(let _0xdbcbdb=0x1189+0x11c9+-0x2352;_0x2f5dba[_0x10cdc4(0x19f)](_0xdbcbdb,_0x26db4f[_0x10cdc4(0x179)]);_0xdbcbdb++){let _0x275692=_0x26db4f[_0xdbcbdb],_0x11e529=await _0x2f5dba['aSAgY'](_0x152c2f,_0x275692,_0x2bec0b);if(_0x11e529&&_0x11e529[-0x1a88+0x6b0+0x13d8]){console[_0x10cdc4(0x1b4)]('第',_0x2f5dba[_0x10cdc4(0x1ba)](_0xdbcbdb,-0x7*-0x2b9+0x2bb*0xa+-0x7ba*0x6),_0x2f5dba[_0x10cdc4(0x167)]);continue;}if(!_0x11e529||!_0x11e529[_0x10cdc4(0x189)])continue;const _0x49c1ba=_0x11e529[_0x10cdc4(0x16e)];let _0x54bf25=_0x11e529[_0x10cdc4(0x14d)];console['log'](_0x2f5dba['NhNZp'](_0x2f5dba[_0x10cdc4(0x1c0)],_0x2f5dba[_0x10cdc4(0x18a)](_0xdbcbdb,-0x387+0x1*0x1bbe+-0x1836)),_0x54bf25,_0x10cdc4(0x16f)),console[_0x10cdc4(0x1b4)](_0x2f5dba[_0x10cdc4(0x1bc)],_0x49c1ba),await _0x2f5dba[_0x10cdc4(0x1b2)](_0x154fb2,_0x275692,'',_0x386378,_0x43eb6b),console['log'](_0x2f5dba[_0x10cdc4(0x1d6)]),await _0x1a2f0c(-0x10a1+-0x2*0xb50+-0x32*-0xc9);}process[_0x10cdc4(0x198)](-0x705+-0xa9a+0x119f);}_0x3ca360();function _0x4ee99e(_0xd3cfc4){const _0x2f8993=_0x17b572,_0x46a36d={'vmHqP':function(_0xd125ff,_0x1c08f0){return _0xd125ff+_0x1c08f0;},'CsNLj':_0x2f8993(0x1ce),'lIJnd':_0x2f8993(0x1aa),'srnYy':function(_0x5d0ef4,_0x45b533){return _0x5d0ef4===_0x45b533;},'vOUjX':'counter','wnuJB':_0x2f8993(0x1bb),'TZTwS':_0x2f8993(0x162),'eHcGn':function(_0x518e3f,_0x1ac2a7){return _0x518e3f===_0x1ac2a7;},'gghqW':_0x2f8993(0x1a8),'khMWK':_0x2f8993(0x180),'apniu':function(_0x271370,_0x34120a){return _0x271370!==_0x34120a;},'qmlJn':function(_0x195727,_0x1e3a39){return _0x195727+_0x1e3a39;},'cBDSA':function(_0x5405a7,_0x5e7f82){return _0x5405a7/_0x5e7f82;},'FFCez':'length','meWLz':function(_0x46d4f8,_0x96fbc2){return _0x46d4f8%_0x96fbc2;},'JlTVG':function(_0xed3f3c,_0x1ed05f){return _0xed3f3c+_0x1ed05f;},'FgJog':_0x2f8993(0x193),'sQKDY':_0x2f8993(0x199),'ylppU':function(_0x34e2cf,_0x3ce4a9){return _0x34e2cf(_0x3ce4a9);},'kMCOE':_0x2f8993(0x1ab),'pcvTR':_0x2f8993(0x187),'elsuv':function(_0x289aeb,_0x2f57ae){return _0x289aeb(_0x2f57ae);}};function _0x36cd2b(_0x47ece4){const _0xe7a4ed=_0x2f8993,_0x36fdba={'RInoW':function(_0x34cbcc,_0x3cea18){return _0x34cbcc(_0x3cea18);},'USmVR':function(_0x5f3567,_0x3bf201){const _0x571fb6=_0x2aa0;return _0x46a36d[_0x571fb6(0x164)](_0x5f3567,_0x3bf201);},'RLvTK':_0xe7a4ed(0x150),'TclOA':_0x46a36d[_0xe7a4ed(0x15b)]};if(_0x46a36d[_0xe7a4ed(0x1a3)]===_0x46a36d[_0xe7a4ed(0x158)])(function(){return![];}['constructor'](_0x46a36d[_0xe7a4ed(0x1b1)](_0x46a36d['CsNLj'],_0xe7a4ed(0x193)))['apply'](_0x46a36d[_0xe7a4ed(0x14e)]));else{if(_0x46a36d[_0xe7a4ed(0x174)](typeof _0x47ece4,_0xe7a4ed(0x194))){if(_0x46a36d[_0xe7a4ed(0x1ac)]!==_0x46a36d['gghqW'])_0x352adb();else return function(_0x4d33fe){}[_0xe7a4ed(0x14c)](_0x46a36d[_0xe7a4ed(0x1c3)])[_0xe7a4ed(0x1be)](_0x46a36d[_0xe7a4ed(0x15b)]);}else{if(_0x46a36d[_0xe7a4ed(0x157)](_0x46a36d[_0xe7a4ed(0x152)]('',_0x46a36d['cBDSA'](_0x47ece4,_0x47ece4))[_0x46a36d[_0xe7a4ed(0x156)]],0xa87+0x17*0x2b+-0xe63)||_0x46a36d[_0xe7a4ed(0x153)](_0x47ece4,0x2176+-0x2354+-0xf9*-0x2)===-0x14b8+-0xaf8+0x1fb0)(function(){return!![];}[_0xe7a4ed(0x14c)](_0x46a36d[_0xe7a4ed(0x1a7)](_0xe7a4ed(0x1ce),_0x46a36d[_0xe7a4ed(0x1ca)]))[_0xe7a4ed(0x171)](_0x46a36d[_0xe7a4ed(0x1af)]));else{if(_0x46a36d[_0xe7a4ed(0x174)](_0xe7a4ed(0x1a0),'ecABv'))(function(){const _0x2d7c4f=_0xe7a4ed;if(_0x36fdba[_0x2d7c4f(0x16c)](_0x36fdba[_0x2d7c4f(0x1bd)],_0x36fdba['RLvTK']))return![];else _0x36fdba['RInoW'](_0x360a50,'0');}[_0xe7a4ed(0x14c)](_0x46a36d['JlTVG'](_0x46a36d['CsNLj'],_0x46a36d['FgJog']))[_0xe7a4ed(0x1be)](_0x46a36d['lIJnd']));else return function(_0x2a4945){}[_0xe7a4ed(0x14c)](_0xe7a4ed(0x180))['apply'](_0x36fdba['TclOA']);}}_0x46a36d[_0xe7a4ed(0x14b)](_0x36cd2b,++_0x47ece4);}}try{if(_0x46a36d[_0x2f8993(0x1d1)]!==_0x46a36d[_0x2f8993(0x183)]){if(_0xd3cfc4)return _0x36cd2b;else _0x46a36d['elsuv'](_0x36cd2b,-0x8e7+-0x11a5+0x1*0x1a8c);}else return _0x46a36d[_0x2f8993(0x174)](_0x20d03a['values'](_0x562440)[_0x2f8993(0x179)],0xcc1+-0x732+-0x58f);}catch(_0x1a91f2){}}
// 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) }