faker3/jd_video_shua.js
2024-07-03 19:51:03 +08:00

15 lines
34 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_video_threads // 控制并发线程数正整数默认1最大3
jd_video_notify // 是否推送通知true/false默认不推送
jd_video_pinFilter // 账号pin过滤多个用@进行分割
自行定时,多次运行
*/
const $ = new Env('逛视频刷视频')
const _0x255265=_0x4a77;function _0x3ce2(){const _0x323cb9=['W6n6WRm','W7L8WRdcPCksW6/cR8obA8oCWRRdGX0H','W6pcOMRdT158W57dR2DIW5JcTSoIWRJcUq','W5ZXIkkYW6dOVihOO5hNU7pMNi7cHa','W6/dJb1R','W6NcLK0V','bvtdN8oxESokW5pdHW','5yEZ5OYW54+N6yAh5OQM5yMA77295RIB6lEC5OYf542g5Bg95l+G5yYi5O+i542i','WQBdNhhcMq','6yAB5BQPWOmw5Og06yER5BMH','n8oMmG','WOtcUCowWQe','44o36lEW5y2f','WQ7cV8orW6HswXinWP7dOc51W6LaW5pcUcySwv/dUapdVa','WOhdGmoWW7FdOmoaW7jBW4hdKG','W4eLbcldL8kXbmkj','W4GJW6jHWOfBFfxdTCkJWPS','8kkQUmoW','W6bSo33cUCkJoaBcQ2FcUmoZW54MWQhdOcjfbCoGzCoFra','pLj2WOVdKmo3W7nFWPuzW5q8a2tcM8kCfmoYWOi','bYeP','WP/cGwm','5QYo5Q+i5OYO54235AAy6lAb','W6hcRHtdGhJcIWxcQSoGWQ7cNmodWOe','kmoDW4PFdfueDa','WQhcV8kgrCkbWRJcICkc','W6asW45BWOTZvM8','W6HWWQdcImoiW5tcUq','W4RdLmo7W49YCc99WO3dLqu','W7xcTHNcNa','WQRcPmkgsCkWWQm','WPJdHmoWW6/dKSotW7y','WQdcPCkrsq','5O2h546d5AEN6lE+uW','WRGxjCoPWOhcNfukhLtdN1aycrOgW5RdKfXQbCkMWQRdTSk7rG','WPNdJSoK','WPlcNxCVWRlcLa','W67dIYboyCkXpSo+WReRbfNdOCoU','F2FdP8ofq3JcT8kTW4hcGW','imkMi8kcWO0IWR0wWQCXhSkHpq','WOJdJ8k4o0NdH8kGEYOfAGmFErfMWPdcS8k3C3j1W73dKCoQW5a','WOFcMCkH','5OMk55In54+L6yEH5l266AgIbMi','rSkQWR/dHIldR0GSWPP8zWRcL8kLbXnGyhhdSSk0','W5q7mZpdMCkne8kLaCkWWOe4WO/dGgZcL8kWW7/dSchdJSo9he17WO8','f0JcH8oEW6v6zCkP','W6xdVSos','W67ORjhMS7dLPy7OTOxdUokFL8oG5PEK5zgU5BMp5PEZ5OYw','hfddK8ohFmogW5pdJCocDSofW47dLmo0bCkpWP8Oj3tdJW','WO7dH8kUp0VdVmkgrtab','5yA2W7ZcR+ITQ+wEM8o1W4n/WPNMIRdNMyqF6zgi5yY+5lUY5P6J556x','W5pcLCo+W4uv','WRtcQ8kCwa','WRdcTJ3cTmk0W68','rSkBbq','kejNWRZdM8owW6HFWReeW5q','mI/cQCkq','WQldGfORW5z/C2JdGhlcSMy','h0bdWPS','k8o8jLG','W64iW5O','hN3cSWNdHmkyhSos','W7NcKCosW7xcUW','f8k0wdq7W73cHummkNNcRq0','lLrGWPddJSok','WOJdJ8k4o0NdH8kGzZm/Ds8hBZvOWPRcSW','WROOFZ0','pmoSixvrWO1tmeJcSSkl','W5q7mZpdMCkne8k5gmkkWPiuWRNdHa','w8oRWPKU','WQFdK3m','WP1vWR3cLmoqEXfPlvOO','rq8z','pL7dGq','5y+Z6ywr5B+Q5zgP54MY5OcOaHurW74Ts3pcHZ3dVa','W4BdNdjXW63dG29/WOGjkSk0WOC','6ycV6kEl6AkE6Aw46Ako5Asx6lsgyq','lConW41ZpuGpyZ51aa','r8oXWO0dWRzB','WRVcVIe','wmoBW4NdVSkAWPdcImkXdtKDWRVdTa','nCkggbxcTWhdJHdcVmk6W5n9sJPNWOKZp1GXka9RBSkDsCoRcwpdQtxdNGBcH8oPq8oOW5VcVmoQE8kODh/dVfBdKSkJnwldP8koxJddImoBFmoqW4eXW7hcSmk3W79vpgyNW7HEnmoBWPxdJCo1WOireSkHW4dcOmoei8orgCkYW7hcM8o9WQ3cM8oeyCk9xNLWWPvpobmVWQeDdhxcMCo8WO/cTCoDW6/dTctdNCoMW5hdLmkecNrVE8oQrSk7WOBcHsxdUYRdPSk+W7uWFSkPb0iTENVdTeFcKeGfW6ldMeipqKxcLmoJFsXCWRPym8orsCo6W5BdTCkLW5RdGXxcSMWQdK9nW7FcIq','u8oVdwHNWOhdKwS0b1pcTa7cT8o8bH8S','eK5kWPS','hmo5W67cM0dcUbuYWOTOqWhcLq','iSoCW41gpabppHj2dSoOWO8uWRPRW4FcSZhdISog','WRKFkmo4','WRGxjCoPWOhcNfush13dJfaceWa2W5pdMKbh','56+V5yUP5Awg6lECfW','j8kVWP3cGWyAWO0','WRL0WOFcO8olwtjzgM8IWOFdTSotpmoxWR3cJCoFWOC0','iZFcTCknedhdMCoKWO4','WPNdG8kOg1tdVCkTvGKtEG','omoDW5DZiv4','rSkUWRFdHW','b0HkWPTDyeeLW4VdICkTW6NcLv51WOH0WPrdCe/cU8o+zIRcOLXGW6C0s2nM','WQNcKSoQWRZdOI0AW6C','W6mxW41EWQf/u37dNCkCWRWaWOGYfCkZsGJcKdddICkYc8k0WQddUSoeqmkhWQvDW63dLq','W6L8WRJcTmkyW5u','gCkUW5H1WQi','huraWPLgwG','c8olsa','WPNdG8kOeKFdU8kNvZaHBta8BXD6WPtcUCkR','W67ORONMSipLPR3OT4VdTokEQ3u','fLlcKmos','5BAN6k20576c6lsf6l6K6l656kk15B+b5yM+6lAK5yYp','m8o9iubqW4utBwtcSCkft8o3WQtdKx7dLSkWW7FcPCkI','WQaZWRa','WPqmimkn','5lI+6ywo5BIt5y2C5lMy5ywa5O+M54+p6yse','6ygr6kwU6AcO6AAG6Ac65Asl6lwfsG','r8kvgG','WQpcLCov','hsCQjSo/W71UWP5CW5HFWRVdUCkhBdhcMumeBI/dRsaJb8ktW7xcOCoDWRlcQCosrConW7S','WQVcVSkbxmkXW63dGSoiW4pcHSk3W4dcMMVcNcWHcbVcVCoMdSkydCkjW48qW47cI0BcHIPBW6S','W6pdRwFdT8oPWQqzW5FdVY7cTmkgWQ8','W6/cGKONg8o3WOT2','WQKYWQe','pCoGlq','ESo+F8ow','W6ldPCoxW7v4wavh','amobw3qlcmkRCgBdJSoK','s8kbWPVdJq','c8keWPFcSSohW5ddRCkUma','y8o3jW','WQf4WOBcOSo2Dd1Xa2yfWQVdTSoro8oTWPdcJmovWOC','kejNWRhcNmoxW7m','WRGxjCoPWOhcHLiXifddI3GidIygW5RdKh5damkpWPtdVSkRuwhcJSomeGvPW6K','W7BcKZi','5PYc55Q05B6p','imkXjq','W6mkW5jhWQzO','W45sEW','WRRcSdy','W6T5pwNcUq','8k24G8kz','gmkPW5TYW7aAcXWz','WPBcGhi','5yIs6kwa6Ao46i665B6F','rCkFgmoJfSkGcd/dJ3Kjq8o6W6uSWPhdSJhcPmorea','WRFcNgqyoW','qLVdJCouWPi','pKxdLSouW549W4Xo','6lAU5y+V6l6i5RUPW7dcUuW','W5b2WOi','C2ZdQq','WQ/cPCks','WRT+WOu','e3lcPaq','5OQZ55Uw54+N6yAh5l+V6Agys8oA','pmkKWO/cMHynWPZdOq','WRKwDa','WOxcO8obWQ3dMLmTiW','gY88iSo9W5XpWPT4W5G','WQFcQ8kbtq','WQi4WRldIMtcGCkA','WRBdTe/cLsldLq','r8oZgMrlWQBdL00','umkpWPu','kejNWRxdImoqW6jEWOG2W4myoK7cI8kfgmo+WPG','WQWlmSoLWQ3cU1mW','W6FcVMddL181','W6DHWQdcSmkoWP3dOSkTFCoZWRFcGJn4W5BdRmoCW4OKWObj','WP8cn8k4W4mDW6GEWRBdRfKjACkztq','ntVcS8kmkIZdP8o1','pvj9WRZdH8oa','5lUH5AA35Bsy5yMX5A2i6kEV6AkU','cdKniSoIW4TnWPzJW5zo','5ysw77+g6ys95BU35lY66Ao0W4pcSG','WRhdH0G','W7VcSCoCnSohWP8B','A8komWtcVd3dObtcSCk5W5jqAwvmWPmfiq','WQdcP0mi5P+y5yMBBbRcOG','iSkIW5K','WQBdQ03cMJ8','WQi4WRldHYpcGmkbW4NcOXtdNa','wwrH','6yoa55Yy5O646yg6ACkPxa','WPBcNhyPWQC','W4FcL8ozW6xdTCoKW55M','W4NdUCohWRddSfa6AshcK8o5W7/dP08Lka','WOFcK8kOWPicbq','W4nqCXzUna','WPqmkSklW6uvW7ub','WRlcVIxcOq','wxGuoSowW79gWRm','DSklbqBcGtddQb4','hmkaWPZcOSogW7BdM8k+eIO8WQBdVX3dLgH6W5lcI8kmW4/dMCkDW7ldNdJdImk1A0yuzgS','WQZcO2ldGv0wW6y','x8kbWOhdKq','lmoOper3WPzrjW','WQ0rjCoP','oCkVWOlcKrCb','WQi4WRldJJdcHSklW4JcMIBdI0CDptNcRdhdHha','5OYs54Yn5As06lEDbW','Ab7cKG','bCkiWP7dQSoOW6eB','5lIi55oW5B+g5yAgte3dOa','54YN6yEI5PYZ6kY55As56ls7W5G','pmobW51tihictH1JemkfWPDjWQrGWOtcTsZdR8klv8kQW73cM18','tmkUWQ7dGW','jfJdGSk2W5KatCk6WPmsCCkbqmoLW6e','W57INlRdVa','5yAu5OY/54226ywt5AwG6lEx5AEF6lAEWRu','bwBcVIddN8ky','W77cMeS6','W7T0jM7cRW','WQhdKMhcNq','W5jCBGjTm1FcTGpcQG','xmkBfmoZemkScdu','WRBcKNC','W6FdTCoqW5fErbjdWQVdOa','W7tdGHm','tmkveCoJb8kQdd4','W6ZdV8od','W7jYtZC','f0Hw','wgjO','WQ7dNhZcNs4gW7JdNWhcPMTlW6RcH2BcLmk/j8odFHBdQatdSG','a8kgWOS','WPmcmmkj','W5vCDrDukx7cSG','WR5/WOhcQ8oSwdPf','4PQfWQBORP7LHyxLRPlKUOddOgeefUEoLowHMowoU+MeNEwsOUwhQUI+QoIGHEIeQoACR++/Ha','W7L8WRdcPCksWORcV8oNEmoHWR/dI3m+WOK','tmkFcCopCCk2eq','WQtcR8kbymkTWRdcHmkjW7hcGSk/WPRcGJy','sCoXWOuQWQfiuq','WRFdM1SVW41s','W64cW5nvWRX0','WQXiW5DwWOTZxwhdNCkw','W6mKW5FdTmkQbw1odwyUWRldNq','4P2nW4RMNyBNNPFORklMSjVcPq','eCkOxG','k1hdJmoj','hsCQjSo/W6DPWRL7W6zuWR/dSCkwDd/cK0m','5Rsp5yQL5ywQ5yYnW4egyMPYzUACUUs7OoMDM+MdKEMGK37PGPC','oCkLWOS','qMrRWOVcLg5bFu0NxSkOvSkXbaZdQmoCzSo6','rmkGWR0','WQpdSKxcLItdOflcTSorWQpcSmoYWQbMqCkLWOH8DmkQyCkmvdLivSkpW7ZcJ0uEAZFcOSoR','gSkiWORcPSoeW5FdUSk7nIO','WQm0WQRdTJtcGa','562/5yUA5OM85yUTW695','WQ7cUCks','5yws572/WRhcJSoECUADKUwkLW','eCons1qwmSkMxuxdMmo0DYnxamo6W7a6W4G4W4KkWOTdzmoA','54+S6yEH5P2a6k2F5AAS6lw3W7m','WQirjG','W73dGWi','WOJdJ8k4o0NdH8kGzZm/Es8PFq','5yIF6ksj6Agl5AAt6lwvW5e','W75DWRxcT316W6BdMW','WPzKz2pcHmo9smonoSkAWRuzWONdGG','WReGFJVdSSoYxhZcJ2tcLa','ofhdKCoC','r8oXWO0','W7BcQNRdSvK','W4X6WRRcTmkyW4NcUCkVsmo6WQ7dIq','cmkCWOVcRSoQW4VdMSk/','AaNcLmkmWQ1HWPfcW6tcPHWmWQK','xmo/WOmY','6lAZ5yY85PEU5PEA','W6DsWQtcUMvTW4FdIuFcRW','u8ksgWHjsmo0C0ZdJmoKudS','44c75O2o56Eq44gx6kYZ5ywH6i6i5y++B8kSFX0NW58','WOhcI3uZWRdcIsi','WP/dJSoQW7i','ymkDWOlcVWqUWQK','W6pcRbNcVcjY','BCkfcW','emofrKuTe8kPzW','W7BcPgRdTW','xcH3imkK','5y2a6ywT54Ig5Oon57Mq5PYiy8klcIbUWQFcIuG8WPO','gvvAWO5bcaTUW7RdMmkNWQZcNqrxWOm3WPj8FaC','4P+mWRdOHR7MNRdOV6VOOBVPGkBLIjlKUyRPLPZORQmA','rSoPdwG','WQxcQJlcO8k0W65t','5P2L6k2Y5l+96Acb5Ask6lssoG','cCofqLq','WQqAhSo6WOFcSfi6l1/dH2CehbC','WP8aiv49Fs7dQKRdTG','566z5yUM5AAd6lEHW4i','jt/cRSk9ddFdPCoIWRhdJu0','WPhdGmo3W70','WPldHmo3W5NdGCogW7XDW7NdKSkN','kSo8mejAWQXimgZcR8klnCo1W4xdMxdcNCkWW6W'];_0x3ce2=function(){return _0x323cb9;};return _0x3ce2();}(function(_0x298848,_0x4231ed){const _0x14583b=_0x4a77,_0x4edd32=_0x298848();while(!![]){try{const _0x12052d=parseInt(_0x14583b(0x231,'tfwo'))/0x1*(parseInt(_0x14583b(0x30c,'@h3$'))/0x2)+parseInt(_0x14583b(0x237,'Z2y)'))/0x3+parseInt(_0x14583b(0x2a7,'hoqU'))/0x4+parseInt(_0x14583b(0x23f,'Xu3a'))/0x5*(-parseInt(_0x14583b(0x292,'D*ZG'))/0x6)+parseInt(_0x14583b(0x29e,'5JXj'))/0x7+-parseInt(_0x14583b(0x26a,'eqCT'))/0x8*(-parseInt(_0x14583b(0x30f,'9jT!'))/0x9)+-parseInt(_0x14583b(0x2b3,'sjSd'))/0xa*(parseInt(_0x14583b(0x230,'kv!Q'))/0xb);if(_0x12052d===_0x4231ed)break;else _0x4edd32['push'](_0x4edd32['shift']());}catch(_0x26b56f){_0x4edd32['push'](_0x4edd32['shift']());}}}(_0x3ce2,0xcd3d9));const jdCookie=require(_0x255265(0x219,'otPM')),notify=require('./utils/Rebels_sendJDNotify'),common=require(_0x255265(0x260,'y1R^')),{H5st}=require(_0x255265(0x307,'7eer'));let taskThreads=process['env']['jd_video_threads']||'1';const runInterval=process[_0x255265(0x2fc,'z]IG')]['jd_video__interval']||_0x255265(0x295,'tfwo'),isNotify=(process[_0x255265(0x22c,'fm2F')][_0x255265(0x24c,']e[F')]||process[_0x255265(0x2be,'fHAj')]['jd_video_Notify'])==='true',pinFilter=(process[_0x255265(0x281,'y1R^')][_0x255265(0x2fe,'F9Mg')]||'')[_0x255265(0x301,'eqCT')]('@'),randomApi=process[_0x255265(0x2dc,'5JXj')][_0x255265(0x26f,'y1R^')]||'http://rsign.257999.xyz/rsign',maxThreads=0x3;let cookiesArr=Object['keys'](jdCookie)[_0x255265(0x2a2,'(c09')](_0x4d3192=>jdCookie[_0x4d3192])[_0x255265(0x225,'fHAj')](_0x39f60a=>_0x39f60a);!cookiesArr[0x0]&&($[_0x255265(0x227,'YW1W')]($[_0x255265(0x28d,'lNwW')],_0x255265(0x23c,'BTmH')),process['exit'](0x1));!(async()=>{const _0x3d983e=_0x255265;notify[_0x3d983e(0x2ef,'eqCT')]({'title':$[_0x3d983e(0x24b,'s&zF')]}),await Main(),isNotify&&notify[_0x3d983e(0x206,'y1R^')]()&&await notify[_0x3d983e(0x298,'BTmH')]();})()[_0x255265(0x234,'9jT!')](_0x4236ed=>$[_0x255265(0x2a1,'BTmH')](_0x4236ed))['finally'](()=>$[_0x255265(0x270,'MxqH')]());function _0x4a77(_0x4a52e8,_0x593f5a){const _0x3ce200=_0x3ce2();return _0x4a77=function(_0x4a77be,_0x39065f){_0x4a77be=_0x4a77be-0x1f4;let _0x58720f=_0x3ce200[_0x4a77be];if(_0x4a77['ndhCyK']===undefined){var _0x3a60d8=function(_0x39f60a){const _0x4236ed='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x3e45b5='',_0xc3f54a='';for(let _0x4fc6a0=0x0,_0x32a6e9,_0x44d27f,_0x4746dd=0x0;_0x44d27f=_0x39f60a['charAt'](_0x4746dd++);~_0x44d27f&&(_0x32a6e9=_0x4fc6a0%0x4?_0x32a6e9*0x40+_0x44d27f:_0x44d27f,_0x4fc6a0++%0x4)?_0x3e45b5+=String['fromCharCode'](0xff&_0x32a6e9>>(-0x2*_0x4fc6a0&0x6)):0x0){_0x44d27f=_0x4236ed['indexOf'](_0x44d27f);}for(let _0x442224=0x0,_0x1a60c2=_0x3e45b5['length'];_0x442224<_0x1a60c2;_0x442224++){_0xc3f54a+='%'+('00'+_0x3e45b5['charCodeAt'](_0x442224)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xc3f54a);};const _0x4d3192=function(_0x634da3,_0x12e21d){let _0x5c74f4=[],_0x1a3697=0x0,_0x41e448,_0x192c45='';_0x634da3=_0x3a60d8(_0x634da3);let _0x20e8b4;for(_0x20e8b4=0x0;_0x20e8b4<0x100;_0x20e8b4++){_0x5c74f4[_0x20e8b4]=_0x20e8b4;}for(_0x20e8b4=0x0;_0x20e8b4<0x100;_0x20e8b4++){_0x1a3697=(_0x1a3697+_0x5c74f4[_0x20e8b4]+_0x12e21d['charCodeAt'](_0x20e8b4%_0x12e21d['length']))%0x100,_0x41e448=_0x5c74f4[_0x20e8b4],_0x5c74f4[_0x20e8b4]=_0x5c74f4[_0x1a3697],_0x5c74f4[_0x1a3697]=_0x41e448;}_0x20e8b4=0x0,_0x1a3697=0x0;for(let _0x1d2609=0x0;_0x1d2609<_0x634da3['length'];_0x1d2609++){_0x20e8b4=(_0x20e8b4+0x1)%0x100,_0x1a3697=(_0x1a3697+_0x5c74f4[_0x20e8b4])%0x100,_0x41e448=_0x5c74f4[_0x20e8b4],_0x5c74f4[_0x20e8b4]=_0x5c74f4[_0x1a3697],_0x5c74f4[_0x1a3697]=_0x41e448,_0x192c45+=String['fromCharCode'](_0x634da3['charCodeAt'](_0x1d2609)^_0x5c74f4[(_0x5c74f4[_0x20e8b4]+_0x5c74f4[_0x1a3697])%0x100]);}return _0x192c45;};_0x4a77['XHVuLw']=_0x4d3192,_0x4a52e8=arguments,_0x4a77['ndhCyK']=!![];}const _0x512df2=_0x3ce200[0x0],_0x3fad61=_0x4a77be+_0x512df2,_0x54bbf0=_0x4a52e8[_0x3fad61];return!_0x54bbf0?(_0x4a77['ABEZNU']===undefined&&(_0x4a77['ABEZNU']=!![]),_0x58720f=_0x4a77['XHVuLw'](_0x58720f,_0x39065f),_0x4a52e8[_0x3fad61]=_0x58720f):_0x58720f=_0x54bbf0,_0x58720f;},_0x4a77(_0x4a52e8,_0x593f5a);}async function Main(){const _0x238557=_0x255265;try{try{const _0xc3f54a=parseInt(taskThreads);_0xc3f54a>0x0&&_0xc3f54a!==0x1&&(taskThreads=_0xc3f54a);}catch{taskThreads=0x1;}taskThreads=Math[_0x238557(0x303,'WEGs')](taskThreads,maxThreads),$[_0x238557(0x259,'CA^^')]=null;if(runInterval)try{const _0x4fc6a0=parseInt(runInterval);_0x4fc6a0>=0x0&&($['waitTime']=_0x4fc6a0);}catch{console[_0x238557(0x267,'@h3$')]('⚠\x20自定义运行间隔时长设置错误');}console[_0x238557(0x25d,'Trso')](_0x238557(0x279,'Px[V')+$[_0x238557(0x2ca,']gjg')]+_0x238557(0x29d,'BTmH')),console['log'](_0x238557(0x21f,'WEGs')),console[_0x238557(0x2f1,'@5Yx')]('并发线程:\x20['+taskThreads+']'),console[_0x238557(0x28f,'otPM')](_0x238557(0x2ff,'5JXj')+(process[_0x238557(0x299,'V]!8')][_0x238557(0x263,'otPM')]?''+process['env'][_0x238557(0x29a,'y^T9')]:_0x238557(0x228,'y^T9'))+']'),console[_0x238557(0x2c2,'LGfh')]('间隔时长:\x20['+$[_0x238557(0x210,'SpBZ')]/0x3e8+'秒]运行间隔时长'),console[_0x238557(0x253,'w7d&')](_0x238557(0x1f8,'h$dI')+common['getProxyStatus']()+']'),console[_0x238557(0x2d8,'(c09')](_0x238557(0x304,')PPa')+(isNotify?'开启':'关闭')+']'),console[_0x238557(0x276,'L0*B')](_0x238557(0x2e2,'tfwo')+pinFilter[_0x238557(0x23e,'L0*B')](',\x20')+']'),console['log'](_0x238557(0x24d,'SpBZ')+$[_0x238557(0x2b1,'hoqU')]+_0x238557(0x245,'sjSd')),console[_0x238557(0x2e5,'YW1W')]('');if(!randomApi){console[_0x238557(0x2e6,'y^T9')](_0x238557(0x212,'D*ZG'));return;}$['needRemoveCookieIndex']=[],await common[_0x238557(0x30a,'YE%N')](taskThreads,cookiesArr,taskFnc),$[_0x238557(0x2f6,'YE%N')]=![],$[_0x238557(0x2f8,'X2Vz')]=![];$[_0x238557(0x2ad,'y^T9')][_0x238557(0x218,'otPM')]>0x0&&(cookiesArr=cookiesArr[_0x238557(0x2b5,'w7d&')]((_0x32a6e9,_0x44d27f)=>!$[_0x238557(0x2de,'LGfh')][_0x238557(0x211,'y^T9')](_0x44d27f+0x1)),$[_0x238557(0x27e,'hoqU')]=[]);const _0x3e45b5=notify['getMessage']();_0x3e45b5&&console[_0x238557(0x268,'5JXj')](_0x238557(0x256,'(c09')+_0x3e45b5['replace'](//g,_0x238557(0x1fd,'o66W')));}catch(_0x4746dd){console[_0x238557(0x268,'5JXj')](_0x238557(0x247,'y1R^')+_0x4746dd);}}async function taskFnc(_0x442224,_0x1a60c2){const _0x2eb3eb=_0x255265;if($[_0x2eb3eb(0x1ff,'QBEH')])return{'runEnd':!![]};const _0x634da3=decodeURIComponent(common['getCookieValue'](_0x442224,'pt_pin'));function _0x12e21d(_0xb30c05,_0x5ffa9e){const _0x226086=_0x2eb3eb;if(_0xb30c05[_0x226086(0x313,'Xu3a')]<=0x4)return _0xb30c05;else{const _0x3c9df5=_0xb30c05[_0x226086(0x201,'tfwo')](0x0,0x2),_0x50ea92=_0xb30c05['slice'](-0x2),_0x294a02=Math[_0x226086(0x289,'LGfh')](_0x5ffa9e-_0x3c9df5[_0x226086(0x2b7,'lNwW')]-_0x50ea92['length'],0x0),_0x389335='*'['repeat'](_0x294a02);return _0x3c9df5+_0x389335+_0x50ea92;}}const _0x5c74f4=decodeURIComponent(_0x634da3),_0x1a3697=_0x12e21d(_0x5c74f4,0x6),_0x41e448=_0x2eb3eb(0x25f,'7eer')+_0x1a60c2+'】'+_0x1a3697+'',_0x192c45=notify[_0x2eb3eb(0x217,'z]IG')](_0x1a60c2,_0x634da3);if(pinFilter[_0x2eb3eb(0x308,'h$dI')]>0x0&&(pinFilter[_0x2eb3eb(0x2e9,'Xu3a')](_0x634da3)||pinFilter[_0x2eb3eb(0x2e9,'Xu3a')](encodeURIComponent(_0x634da3)))){_0x192c45[_0x2eb3eb(0x2c9,'Trso')](_0x2eb3eb(0x2bc,'Xu3a')),console[_0x2eb3eb(0x207,'fm2F')](_0x192c45['getInlineContent']()),$['needRemoveCookieIndex'][_0x2eb3eb(0x28b,'Px[V')](_0x1a60c2);return;}const _0x20e8b4=await common[_0x2eb3eb(0x215,'YW1W')](_0x442224);if(!_0x20e8b4&&typeof _0x20e8b4===_0x2eb3eb(0x216,'BTmH')){console[_0x2eb3eb(0x2c2,'LGfh')](_0x41e448+'账号无效'),_0x192c45[_0x2eb3eb(0x20b,'lNwW')](_0x2eb3eb(0x239,'9jT!')),$[_0x2eb3eb(0x283,'CA^^')][_0x2eb3eb(0x28e,'Trso')](_0x1a60c2);return;}const _0x1d2609=common['genUA'](_0x634da3);let _0xdc5838=![],_0x324d7e=![],_0x2f70bd=![],_0x277a9e=!![],_0x7980b1,_0x419e65,_0x3815fc,_0x2cb37a,_0x41ac90,_0x2f713f,_0x578dbe;_0x7980b1='',await _0x35777b(_0x2eb3eb(0x229,'s&zF')),await $[_0x2eb3eb(0x2a9,']e[F')](parseInt($[_0x2eb3eb(0x242,'s&zF')]*0x1+0x1f4,0xa));if($[_0x2eb3eb(0x2f4,'9jT!')]||_0xdc5838)return;if(_0x7980b1){let {popAlertInfo:_0x19c070}=_0x7980b1;if(_0x19c070){let {hbAmount:_0x488e4e,defaultPopAlertToast:_0x50087d}=_0x19c070;console[_0x2eb3eb(0x267,'@h3$')](''+_0x41e448+_0x50087d+':\x20'+_0x488e4e+'元');}if(_0x7980b1?.[_0x2eb3eb(0x20d,'V]!8')]?.[_0x2eb3eb(0x261,'L0*B')])_0x324d7e=!![],console[_0x2eb3eb(0x22b,']e[F')](_0x41e448+_0x2eb3eb(0x2f9,'BTmH'));else{if(!_0x324d7e){let _0x24a043=0x0;while(_0x277a9e&&_0x24a043<0x14&&!_0xdc5838){_0x419e65='',await $[_0x2eb3eb(0x257,'fm2F')](parseInt($[_0x2eb3eb(0x311,'Trso')]*0x1+0x1f4,0xa)),await _0x35777b(_0x2eb3eb(0x221,'WEGs')),await $[_0x2eb3eb(0x287,'YW1W')](parseInt($[_0x2eb3eb(0x2f7,'Px[V')]*0x1+0x1f4,0xa));if(_0x419e65){let {hasNext:_0x13c075,rewardValue:_0x264d9c,goldCoinAmount:_0x4bbc6c}=_0x419e65;_0x264d9c?console[_0x2eb3eb(0x241,'F9Mg')](_0x41e448+_0x2eb3eb(0x2dd,'D*ZG')+_0x264d9c+_0x2eb3eb(0x25c,'E]08')+_0x4bbc6c):console[_0x2eb3eb(0x220,'Xu3a')](_0x41e448+'刷视频没有获得金币'),_0x277a9e=_0x13c075;}_0x24a043++;}}}if(!_0x277a9e){await _0x35777b(_0x2eb3eb(0x2d2,']e[F')),await $[_0x2eb3eb(0x2cd,'@5Yx')](parseInt($[_0x2eb3eb(0x30d,'F9Mg')]*0x1+0x1f4,0xa));_0x578dbe>0x3e8?(await _0x35777b('videoRedPacketHomePage_exchangeCash'),await $[_0x2eb3eb(0x238,'BTmH')](parseInt($['waitTime']*0x1+0x1f4,0xa))):console['log'](_0x41e448+'还需'+(0x3e8-_0x578dbe)+_0x2eb3eb(0x2c0,']gjg'));_0x3815fc='',await _0x35777b(_0x2eb3eb(0x21e,'@h3$')),await $['wait'](parseInt($[_0x2eb3eb(0x204,'LGfh')]*0x1+0x1f4,0xa));if(_0x3815fc){_0x41ac90=parseFloat(_0x3815fc?.['cashBalanceFloor']?.[_0x2eb3eb(0x309,'SpBZ')]||0x0);let _0x473b97=_0x3815fc?.[_0x2eb3eb(0x2fa,'@h3$')]?.[_0x2eb3eb(0x2d9,'tfwo')]||[];_0x473b97=_0x473b97[_0x2eb3eb(0x288,'(c09')](_0x4c46e4=>_0x4c46e4[_0x2eb3eb(0x262,'kv!Q')]===0x0&&parseFloat(_0x4c46e4[_0x2eb3eb(0x2ae,'Px[V')])<=_0x41ac90)[_0x2eb3eb(0x200,'$!9E')](function(_0x1b87d3,_0x46c0fd){const _0x272e0c=_0x2eb3eb;return parseFloat(_0x46c0fd[_0x272e0c(0x2ae,'Px[V')])-parseFloat(_0x1b87d3['amountStr']);});for(let _0x29482d of _0x473b97){if(_0x2f70bd)break;_0x2cb37a=_0x29482d,await _0x35777b(_0x2eb3eb(0x297,'kv!Q')),await $['wait'](parseInt($[_0x2eb3eb(0x242,'s&zF')]*0x1+0xdac,0xa));}}}}if($[_0x2eb3eb(0x240,'MxqH')])return{'runEnd':!![]};await $['wait'](parseInt($[_0x2eb3eb(0x210,'SpBZ')]*0x1+0x1f4,0xa));async function _0x3dc679(_0x1d0d75,_0x5c98c1){const _0x17db81=_0x2eb3eb;try{let _0x109cef;switch(_0x1d0d75){case _0x17db81(0x275,']e[F'):_0x5c98c1[_0x17db81(0x2bb,'KIt]')]==='0'?_0x5c98c1[_0x17db81(0x26b,'E]08')]==='0'?_0x7980b1=_0x5c98c1[_0x17db81(0x250,'L0*B')]:(_0x109cef=common['getErrorMsg'](_0x5c98c1),console[_0x17db81(0x2f1,'@5Yx')](_0x41e448+_0x17db81(0x2c1,'E]08')+_0x5c98c1['busiCode']+']'+_0x109cef),_0xdc5838=!![]):(_0x109cef=common['getErrorMsg'](_0x5c98c1),console[_0x17db81(0x2d7,'SpBZ')](_0x41e448+_0x17db81(0x29f,'WEGs')+_0x5c98c1[_0x17db81(0x248,'D*ZG')]+']'+_0x109cef),_0xdc5838=!![]);break;case'videoHb_sign':_0x5c98c1[_0x17db81(0x25e,'7eer')]==='0'?_0x5c98c1[_0x17db81(0x26d,'otPM')]==='0'?(_0x109cef=_0x5c98c1?.[_0x17db81(0x2e7,'QBEH')]?.['rewardMsg']?.[_0x17db81(0x2c3,'B%Al')]?.[_0x17db81(0x2df,')PPa')](/(余额到账[\d\.]+[元]*)/)?.[0x1]||'',console[_0x17db81(0x2b8,'s&zF')](_0x41e448+_0x17db81(0x226,'F9Mg')+_0x109cef)):(_0x109cef=common['getErrorMsg'](_0x5c98c1),console[_0x17db81(0x241,'F9Mg')](_0x41e448+_0x17db81(0x24e,'7eer')+_0x5c98c1[_0x17db81(0x280,'KIt]')]+']'+_0x109cef)):(_0x109cef=common[_0x17db81(0x302,'fHAj')](_0x5c98c1),console[_0x17db81(0x27c,'h$dI')](_0x41e448+_0x17db81(0x2ab,'MxqH')+_0x5c98c1['code']+']'+_0x109cef));break;case _0x17db81(0x223,'eqCT'):_0x5c98c1['code']==='0'?_0x5c98c1[_0x17db81(0x26c,'YW1W')]==='0'?console[_0x17db81(0x209,'y1R^')](_0x41e448+_0x17db81(0x25a,'kv!Q')):(_0x109cef=common['getErrorMsg'](_0x5c98c1),console[_0x17db81(0x233,'BTmH')](_0x41e448+'兑换现金失败['+_0x5c98c1[_0x17db81(0x2c7,'$!9E')]+']'+_0x109cef)):(_0x109cef=common['getErrorMsg'](_0x5c98c1),console[_0x17db81(0x207,'fm2F')](_0x41e448+_0x17db81(0x1fe,'fHAj')+_0x5c98c1['code']+']'+_0x109cef));break;case _0x17db81(0x294,'o66W'):_0x5c98c1['code']==='0'?_0x5c98c1['busiCode']==='0'?_0x3815fc=_0x5c98c1['data']:(_0x109cef=common[_0x17db81(0x2cc,'s&zF')](_0x5c98c1),console[_0x17db81(0x241,'F9Mg')](_0x41e448+_0x17db81(0x1f9,'jxEg')+_0x5c98c1[_0x17db81(0x2cb,'y1R^')]+']'+_0x109cef)):(_0x109cef=common['getErrorMsg'](_0x5c98c1),console[_0x17db81(0x29c,'x!dy')](_0x41e448+_0x17db81(0x22a,'Z2y)')+_0x5c98c1[_0x17db81(0x273,'YW1W')]+']'+_0x109cef));break;case'videoHbGoldCoin_done':_0x5c98c1[_0x17db81(0x243,'9jT!')]==='0'?_0x5c98c1[_0x17db81(0x2f0,'D*ZG')]==='0'?_0x419e65=_0x5c98c1['data']:(_0x109cef=common[_0x17db81(0x296,'Trso')](_0x5c98c1),console['log'](_0x41e448+'刷视频失败['+_0x5c98c1[_0x17db81(0x2f3,']e[F')]+']'+_0x109cef)):(_0x109cef=common[_0x17db81(0x251,'L0*B')](_0x5c98c1),console['log'](_0x41e448+_0x17db81(0x22e,'hoqU')+_0x5c98c1[_0x17db81(0x2bf,'YE%N')]+']'+_0x109cef),_0x109cef?.[_0x17db81(0x22f,'jxEg')](_0x17db81(0x2d4,'hoqU'))&&(_0xdc5838=!![]));break;case _0x17db81(0x22d,'o66W'):_0x5c98c1['code']==='0'?_0x5c98c1[_0x17db81(0x2eb,'7eer')]==='0'?(_0x41ac90-=parseFloat(_0x5c98c1?.[_0x17db81(0x258,'$!9E')]?.[_0x17db81(0x2d6,'otPM')]),console[_0x17db81(0x222,'hoqU')](_0x41e448+'成功提现['+_0x5c98c1?.[_0x17db81(0x1fb,'hoqU')]?.['amount']+_0x17db81(0x285,'L0*B'))):(_0x109cef=common[_0x17db81(0x2af,'o66W')](_0x5c98c1),console[_0x17db81(0x2c8,'fHAj')](_0x41e448+_0x17db81(0x274,'jxEg')+_0x5c98c1['busiCode']+']'+_0x109cef),_0x109cef?.[_0x17db81(0x290,'QBEH')](_0x17db81(0x269,'D5h%'))&&(_0x2f70bd=!![])):(_0x109cef=common[_0x17db81(0x24f,'Px[V')](_0x5c98c1),console[_0x17db81(0x28f,'otPM')](_0x41e448+_0x17db81(0x1f5,'V]!8')+_0x5c98c1[_0x17db81(0x312,']e[F')]+']'+_0x109cef));break;case _0x17db81(0x30e,'D5h%'):_0x5c98c1[_0x17db81(0x2a6,'lNwW')]==='0'?_0x5c98c1[_0x17db81(0x236,'D5h%')]==='0'?(_0x2f713f=_0x5c98c1?.[_0x17db81(0x25b,'V]!8')]?.[_0x17db81(0x310,'@5Yx')]||0x0,_0x578dbe=_0x5c98c1?.['data']?.['goldCoin']||0x0,console[_0x17db81(0x20c,'WEGs')](_0x41e448+_0x17db81(0x27d,'Trso')+_0x2f713f+_0x17db81(0x2fb,'Xu3a')+_0x578dbe+'金币'),_0x192c45[_0x17db81(0x271,'YW1W')](_0x17db81(0x2e8,'kv!Q')+_0x5c98c1?.['data']?.['cash']+'元,金币余额:\x20'+_0x5c98c1?.[_0x17db81(0x232,'Z2y)')]?.[_0x17db81(0x208,'LGfh')]+'金币')):(_0x109cef=common[_0x17db81(0x28a,'X2Vz')](_0x5c98c1),console['log'](_0x41e448+_0x17db81(0x24a,'y1R^')+_0x5c98c1[_0x17db81(0x2e1,'Z2y)')]+']'+_0x109cef)):(_0x109cef=common[_0x17db81(0x2a0,'E]08')](_0x5c98c1),console[_0x17db81(0x205,')PPa')](_0x41e448+'查询余额失败['+_0x5c98c1[_0x17db81(0x202,'V]!8')]+']'+_0x109cef));break;}}catch(_0x2a6af7){console[_0x17db81(0x268,'5JXj')]('❌\x20未能正确处理\x20'+_0x1d0d75+'\x20请求响应\x20'+(_0x2a6af7[_0x17db81(0x272,'L0*B')]||_0x2a6af7));}}async function _0x35777b(_0xb5b195){const _0x4b3771=_0x2eb3eb;if($[_0x4b3771(0x2b0,'E]08')])return;let _0x5a6fec='',_0x1b6eff=null,_0x2d4a1f=null,_0x4268c2=_0x4b3771(0x20a,'SpBZ'),_0x331fe8={},_0x314644={},_0x49bc97={};switch(_0xb5b195){case _0x4b3771(0x27f,'kv!Q'):_0x5a6fec=_0x4b3771(0x2c5,'YW1W'),_0x331fe8={},_0x2d4a1f={'functionId':_0x4b3771(0x27b,'o66W')},_0x1b6eff=common[_0x4b3771(0x252,'Trso')](await getSign(_0x4b3771(0x1fa,'E]08'),_0x331fe8));break;case'videoHb_sign':_0x49bc97={'appId':_0x4b3771(0x2b6,'BTmH'),'functionId':_0x4b3771(0x28c,'z]IG'),'appid':_0x4b3771(0x1fc,'x!dy'),'clientVersion':common[_0x4b3771(0x2b9,'o66W')](),'client':'wh5','body':{},'version':_0x4b3771(0x21c,'D*ZG'),'ua':_0x1d2609,'t':!![]},_0x314644=await H5st['getH5st'](_0x49bc97),_0x5a6fec=_0x4b3771(0x2bd,'Trso'),_0x1b6eff=_0x314644[_0x4b3771(0x23a,'jxEg')];break;case _0x4b3771(0x2c4,'@h3$'):_0x49bc97={'appId':_0x4b3771(0x286,'h$dI'),'functionId':'videoRedPacketHomePage_exchangeCash','appid':'video-redbag-h5','clientVersion':common[_0x4b3771(0x1f4,'fHAj')](),'client':_0x4b3771(0x2cf,']gjg'),'body':{},'version':_0x4b3771(0x29b,'lNwW'),'ua':_0x1d2609,'t':!![]},_0x314644=await H5st[_0x4b3771(0x2ee,'fHAj')](_0x49bc97),_0x5a6fec=_0x4b3771(0x246,'lNwW'),_0x1b6eff=_0x314644[_0x4b3771(0x2ec,'@h3$')];break;case'videoHbCw_homePage':_0x49bc97={'appId':_0x4b3771(0x244,'@h3$'),'functionId':_0x4b3771(0x2a5,'D*ZG'),'appid':_0x4b3771(0x255,'9jT!'),'clientVersion':common[_0x4b3771(0x2f2,'X2Vz')](),'client':_0x4b3771(0x2ea,']e[F'),'body':{},'version':_0x4b3771(0x1f6,'Z2y)'),'ua':_0x1d2609,'t':!![]},_0x314644=await H5st[_0x4b3771(0x2d1,'X2Vz')](_0x49bc97),_0x5a6fec=_0x4b3771(0x2f5,'w7d&'),_0x1b6eff=_0x314644[_0x4b3771(0x224,'D5h%')];break;case'videoHbGoldCoin_done':_0x5a6fec='https://api.m.jd.com/client.action',_0x331fe8={'contentId':_0x4b3771(0x2db,'BTmH'),'jsLabel':_0x4b3771(0x2a4,'F9Mg'),'playType':_0x4b3771(0x2e4,'Px[V')},_0x2d4a1f={'functionId':_0x4b3771(0x2d0,'y^T9')},_0x1b6eff=common[_0x4b3771(0x266,'X2Vz')](await getSign(_0x4b3771(0x2aa,']e[F'),_0x331fe8));break;case _0x4b3771(0x254,'w7d&'):_0x49bc97={'appId':_0x4b3771(0x2e0,'KIt]'),'functionId':'videoHbCw_doCw','appid':_0x4b3771(0x213,'w7d&'),'clientVersion':common['getLatestAppVersion'](),'client':_0x4b3771(0x300,'Xu3a'),'body':{'bizTraceId':_0x2cb37a['bizTraceId'],'amount':_0x2cb37a[_0x4b3771(0x2ce,'D5h%')]},'version':_0x4b3771(0x2d3,'V]!8'),'ua':_0x1d2609,'t':!![]},_0x314644=await H5st[_0x4b3771(0x26e,'w7d&')](_0x49bc97),_0x5a6fec=_0x4b3771(0x2a8,'E]08'),_0x1b6eff=_0x314644[_0x4b3771(0x284,'o66W')];break;case _0x4b3771(0x2b2,'lNwW'):_0x49bc97={'appId':_0x4b3771(0x291,'sjSd'),'functionId':'videoRedPacketHomePage_queryMoney','appid':'video-redbag-h5','clientVersion':common['getLatestAppVersion'](),'client':'wh5','body':{'activitySource':'1','realClient':_0x4b3771(0x20e,'D5h%')},'version':_0x4b3771(0x2d5,']gjg'),'ua':_0x1d2609,'t':!![]},_0x314644=await H5st[_0x4b3771(0x214,'LGfh')](_0x49bc97),_0x5a6fec='https://api.m.jd.com/',_0x1b6eff=_0x314644[_0x4b3771(0x203,'SpBZ')];break;default:console['log'](_0x4b3771(0x21b,'F9Mg')+_0xb5b195);return;}const _0x5662f1={};_0x1b6eff&&Object[_0x4b3771(0x293,'X2Vz')](_0x1b6eff,_0x5662f1);_0x2d4a1f&&Object[_0x4b3771(0x277,'5JXj')](_0x2d4a1f,_0x5662f1);const _0x5e410d={'url':_0x5a6fec,'method':_0x4268c2,'headers':{'origin':_0x4b3771(0x265,'tfwo'),'Referer':'https://pro.m.jd.com/mall/active/8WYa8CGWvkB5b3EC9TcyAbAobeo/index.html','User-Agent':_0x1d2609,'Cookie':_0x442224,'content-type':'application/x-www-form-urlencoded','accept':_0x4b3771(0x2b4,'otPM')},'params':_0x2d4a1f,'data':_0x1b6eff,'timeout':0x7530};_0x4268c2===_0x4b3771(0x2e3,'jxEg')&&(delete _0x5e410d[_0x4b3771(0x30b,'(c09')],delete _0x5e410d['headers'][_0x4b3771(0x235,'w7d&')]);const _0x38e89f=0x1;let _0xb2bf67=0x0,_0x4b9999=null;while(_0xb2bf67<_0x38e89f){_0xb2bf67>0x0&&await $[_0x4b3771(0x21d,'Z2y)')](0x3e8);const _0x44ea13=await common[_0x4b3771(0x23d,'5JXj')](_0x5e410d);if(!_0x44ea13[_0x4b3771(0x249,'(c09')]){_0x4b9999=_0x4b3771(0x2da,'E]08')+_0xb5b195+_0x4b3771(0x2ba,']e[F')+_0x44ea13[_0x4b3771(0x305,'5JXj')],_0xb2bf67++;continue;}if(!_0x44ea13[_0x4b3771(0x20f,'YE%N')]){_0x4b9999=_0x4b3771(0x264,'QBEH')+_0xb5b195+_0x4b3771(0x282,'B%Al'),_0xb2bf67++;continue;}await _0x3dc679(_0xb5b195,_0x44ea13['data']);break;}_0xb2bf67>=_0x38e89f&&console['log'](_0x4b9999);}}async function getSign(_0x34ce7d,_0x30c18b){const _0x43d7bd=_0x255265,_0x273efa=await common[_0x43d7bd(0x2ac,'Xu3a')]({'url':randomApi,'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON['stringify']({'fn':_0x34ce7d,'body':_0x30c18b}),'proxy':null,'debug':![],'timeout':0x7530}),_0x455467=_0x273efa[_0x43d7bd(0x2ed,'YW1W')];if(_0x455467&&_0x455467['body'])return _0x455467['body'];else console[_0x43d7bd(0x305,'5JXj')]('未获取到数据,检测网络是否正常');}
// 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)}