/*
活动名称：大牌联合浏览豆专用
环境变量：jd_dplh_viewShop_ids // 活动ID 多个用, @ 换行分割
        jd_dplh_viewShop_threads // 控制并发线程数（正整数），默认1，最大10，尽量使用默认值，否则请开启代理运行
        jd_dplh_viewShop_interval // 自定义运行间隔时长（整数，单位毫秒），默认1000
        jd_dplh_viewShop_notify // 是否推送通知（true/false），默认不推送
        jd_dplh_viewShop_pinFilter // 账号pin过滤，多个用@进行分割
        jd_dplh_viewShop_testing // 是否开启测水功能（true/false），默认关闭，谨慎开启，黑号以及浏览过也会计算次数
        jd_dplh_viewShop_nowater // 连续多少无豆个跳过当前活动，默认20

高并发脚本，谨慎使用并发
活动限制IP严重，建议使用代理

cron:1 1 1 1 *

*/

const $ = new Env('大牌联合浏览豆专用')
const _0x4a8727=_0x59df;(function(_0x994814,_0x446484){const _0x38b779=_0x59df,_0xd582c=_0x994814();while(!![]){try{const _0x2b3f77=-parseInt(_0x38b779(0x9a,'[F$C'))/0x1*(-parseInt(_0x38b779(0x121,'!%X['))/0x2)+parseInt(_0x38b779(0x82,'[6E$'))/0x3+parseInt(_0x38b779(0x13a,'rTcv'))/0x4+-parseInt(_0x38b779(0x74,'M!f)'))/0x5*(parseInt(_0x38b779(0xea,'!O@5'))/0x6)+-parseInt(_0x38b779(0x128,'!%X['))/0x7+parseInt(_0x38b779(0x142,'20pB'))/0x8+-parseInt(_0x38b779(0x11e,'ak)$'))/0x9*(parseInt(_0x38b779(0x67,'3P5&'))/0xa);if(_0x2b3f77===_0x446484)break;else _0xd582c['push'](_0xd582c['shift']());}catch(_0x53a9b7){_0xd582c['push'](_0xd582c['shift']());}}}(_0x290e,0x48ea2));const jdCookie=require('./jdCookie'),common=require(_0x4a8727(0x6b,'phz3')),notify=require('./utils/Rebels_sendJDNotify'),getToken=require(_0x4a8727(0x90,'l%aB')),CryptoJS=require(_0x4a8727(0x132,'ak)$')),dplhIdList=(process['env'][_0x4a8727(0x10e,'#45&')]||'')[_0x4a8727(0xfc,'#ER]')](/[,@\n]+/g)[_0x4a8727(0x145,'IkfK')](_0xecd2c5=>_0xecd2c5[_0x4a8727(0xe5,'3P5&')]())[_0x4a8727(0xa9,'gAG2')](Boolean);let taskThreads=process[_0x4a8727(0xf6,'aQRg')][_0x4a8727(0x143,'K$e)')]||'1';function _0x290e(){const _0x229a79=['W7atvmon','BSokW68','5y6I6ysX54QT5Ogo57IM5P6sWOGnpKVcL8kgWRiRcau','W5jYBw0phqVdQmkzWQdcKKiE','lrqP','WODfWOFdOquCW6T+','8jw+QSkl5yAq6k6BWPG','WR1uW7KtWPms','W6OBtSokcxn7W6zUAWhcG8k8WPO9W6tdMG','W6/dH8kNB8o4hXvx','WPNdJMrpW6RdJG8vW5bUEmo6WRVdMmo9FCkSlmo7mCktWQb8WPKPjmkAbH/dQtJcVvrIW5/dPK3dSSkUWRxcQ8o6E8ktWPXZ','mmkqWRX1vbdcRmkQrCooWRGHWRq','W6dcRaWMyhZdSmoqWPZcK8odtCkRtxxcU8oKW4rLASoHWPOjqa','W7T9jNpcVSk1ax3dV2hcOKbica','oCoxWPG','amoNWQ8','WQ8XWPi','4P+EW7tMNzNNNydORRhMSRJcHG','sqFdI8kAfCk7','W7hdGHa','WR1TnCony1a4uW','v8k+WQjKW5VdSmkGW4O','5RAP5yM85Psd5O+l','W4VLU6xLJ5JNU53NQllMLQBdTmkzWRK','WRxdQHjAW4tcVsq','g8oaWO7cG8kzamodWPviWOxdIwRdSh7dHmossthcJrdcPuBcKG','aCoRWQnfW7FdTCkAW6JcISodpaldGsBdSmot','FmkDW7K','W50uWQadjhb7','4PQZWPpOHB/LRy7KUPlOVQ7OO5/PL6lPMOJML4hPLARORl/NVA7PLl7ORAm','FCkBW7a','W6VdKSk8CSocerfuvG','usr6','WQ4fAa','b8ooFdNdLSkkW7a','WRC+W5Dpjci','fCkRW6NdNmk8W6xdNW','WOFcMZ5qWR/cI1qHW4ShyCoeWRq','x8kAv8oFlsG','qCkAsCouocmo','FSowW6BcP8k6gCo2','WQ/cMXa','W7FdSh0lt8k/WQZdGmkRFq','W5rLtMpdUa','amkTWQS','W5b+u14','W7pdHGT+W4FcTW','mSkvW53cLCo+WODIvXpdU8oXnSoT','FunSW70qW4vsW5SsWOW5W6W','B8ojWOO','b0T5W7a','aCkRWR88W6WXW4WpW7ldHde+n8kzW7u','WQu3WO0','WObLgSoDnW','WReRWPVdT1Tl','j8ocWOLJzua','W73dPCoar8ozACkQnmoWBCkJwW','W6xcTrRdKrlcK8olwq','p8opsGNcPa5L','WP5Sq8oF','krKRWQ1vWPHdW7GcWQW','a8ozW7VcP8oSW7JcTbO','e2rOWOycC8olWRurWPJcHmk0WO7dJSogAX3cQhqj','m8olxWW','x8kqxG','D+ITNEAXQEwsOow5LvW','W7LQifdcO8kFdwddN3tcPfe','6k+M5RAD5yMf5y2j6icZ5Bwe57Qd5P2r77256lwj6l265BYU5yUZ5Rs/5yQK44g7','wCkaWPW','WOXKuSojcILQh3pdPfuBWQetuq','W6eBuConbw4','jbu4','W7VcHZaMCCoVxa','cCklEcZcKmk+W4y','W7TGmI/dRSoh','o8oAW6y','5y+l6yw85B6v5zo754MT5Og/WQ4RiqOOWRW9gSkXEW','imouW6Hz','WRFdOZy','W6FcUCkB','W4ZcK8kO','eSkBEIVcKmk/W4y','DmktW6OG','WRhcMu5cmgW','6ygo552t5O2a6ycwkHpcRq','b8kNWRu8','W5LJve3dQf4','W4BcLCkJofpdKW','gSkJWQa6W6arW4q','qYFdMmkXsmorW41Sy2FcK8o3W7nJeG','WQtcLKL3CIJcR8kmx8oqx8kAiSoBW54jWPa','WQBcMGeYvSoE','CSodW6xcUmkYhCoYyNvyE8kUALtdOYH1q0mGWQZdVqGEcCkagSk2rCo9W6G','wCkkWPxcKmkeba','W65yW7xdNSkGAmkMr8kzWOrwvuy','nmobwgDA','DCoAW7NcOmk+da','WQjfW6uDWOKDW6RcNv0','WPnJvmoslcvGha','sJBdM8knu8oBW4jSs2VcICkrW6uOcSkoWO94icmqEqr6eXhdVSkkWOyJW48CsW','d09JW7y5WR4','gdumWPa','5RwU5Rgw5yI66icaw8oZWQ4','W6ywumoZe3n7','WOZcT8oKW5G','WPLkWO3dUsqrW6nO','wcNdHSke','pSozWOf5','W6DpW7xdH8kLo8o9eq','WQrHbCozx1uJEmo+dCo8W5xdPCosrCk7WOaSWOmEW7rGWOy','oa8SWQW','WQ4TWPi','5BsX6k2s572o6lE06l6z6l+y6kkh5B665yM06lAA5y+j','iH4aWQbtWP1FW549WQeoW6WVrwNdV3PLqgZcJSkjW4f+bmkf','W4BcOcVdRHldIJtdPr7cQSoOvg4','W7v2mvpcPmk2dwa','B8oeW7a','6ygG55Ew5y+z5Ps/W4/dRCoU','5lQ055kS5BYR5ysEW7TCtq','WQNcHWmwumoj','W7hdImkTD8ozeH1b','WPj5q8ookNSQqftdPeGpWQ8zuwZcJbPbWQS7cSkOWPVcRqGKrmkUlSo2W6LuW6mGW4JdQG','amk3W7i','vmkFWOVcM8kzd8orW45ZWO/dHsddTN7dTmow','W6nuW6y','wmoYwW3dKmkFW5n/W7zrW79WW7pcPg1YbCkNl8oGW4ZdL8k7W5S','W7n9W4DvlY9Ata','W71EW6ZdLSkKAG','sIP0WOy','4P+EW7tMNzNOGzJMRkxNOPtLPQlNKlOa','WO5iB8kJ','W7pdSSoxwmkgrCkJlSo1Aq','W4zPv08','5P296k215AAd6lsn','W5ddG3e','W6PvW7C','WQm+W4fucIG','aKL5W7G7WR96tmkeW6KhhCof','WRlORkpMSlhLPPtOTApdMUkCUHW','44kx6lwu5y+k','WQFcHGe','lmomWONdRmkHW58+trtdImozcCoyk20AF8kmW49nWPDXWOehBuDJ','W67dVSoxx8o4tmkGnW','tcpdHCk0EW','mSoexq','W7b3nq','xSkmxG','eSo8WR5H','WR1EW7a','W44roSo0eIL0vZPRW4niaW','W5pcSsRdOG','WRn8pXdcT8kGb33dMdRcQvb3faD0oCosqNzeW4JdPGlcUdFcKCoaWPldV8ozn8k0WRzBWOS','W7f9WOaew3qXwCoFrX3dT8oI','WPFcUCoQ','qmkxvSoifsKycG','CSoaW6BcVCk8ea','xSkVu8ocW45kW4ed','lX8RWPrrWP5pW7GyWRWkW68jxG','6lAg5yYl6lYi5RQOdmkbW7q','uCkoWO/cLG','WQDRoCorwL0Uva','WPLaFmkS','W5JdU8oeWPC','56wsW6/OVRROOyBPLyBPMzdMLPNPLP8','WQyWWOm','gmoxW7u','cCksCIZcKa','W7z8jG','jHSYWQe','WRjldSkauYHWW7vzwtRcGa','W6VdP8oEqCoF','cXuWWQ9kWPq','W4JdQCkDtW','WQmB5lQm5BMn6k245BYb5zo95Rw15RoY5yM36ioe','W4RcMt/dRtlcJSowBKv6B8kMiSkb','omknWPa','W4pcOIVdPG','W7eBwmoom3r6W59nDbVcHmkWWRK6','z8oAW7JcSCkicSoYE2W','W69TmvZcTmkHgW','W7LYnsxdOq','WRi4W4fv','WQGPW61zhsPHx8oDqbpdJ8oycKLBy3ZdMmo4WPddSdddRSog','W7f5iG','W6RdSSoctCokua','j8obW55DW6xcJq','oCouW6Xi','dmkxFJJcPSkLW5PatH/dMCoiW6z5wW','xCkLB8okW4TcW4WVgfBcNSk8AmkbWQVcMSo0WQPVBa','h8k2WR4MW6S5W4SQW74','W6/dH8kNBW','WQVcRJrFbmoRW6xcHmoFja','6lEL5y6P5Psv5PE6','yCogW7VcKCk1gG','gNBcMCoya8kjWPqP','CCorW6K3efu','WQtcTXdcKclcMmocbbK7kSkMzCogzSoCW5hdIqlcUmo+WPbpz8oWWRGUW6NcOmo+uaK','W75YnsC','W4tdN2CLW6ldMa','W7z8dvVcOCk+aeZdMNZcPKnUeWfQjCo9x2zzW4JcSa','kCky5lMP5yMYWRi','eUITOEAXHUwLMoI2HCot4PYNaoAvOowtTEw4JUAvT+ApJG','W7ZdT1ygsCk6WRddPSkuCgFcJSoZWRtdStJdNarEBdNcQSobWQm','W6nEW6/dKmkIAq','vX07WQD8W6u3ySkdW78ylSoK','hmkvxCoYnIKfpCopxh03W5JcRCoeW7ZdQeDKW5ldR8kvW651qg4gW7rPWQTdhYJcSJZdQCog','aSoVWQnT','W6aaWQbeW5rnWRFcOuVdIKVcK8kF','W5muWQG','W40EWQiom3O','WQ4TzGNdOmoKugFdHwpcMNnf','B8odWOpdGCk6W54','4P2CW5lOHOtMNA3OVzFOOi7PGlVLI4VKURlPLAFOR6Te','WRFdJmkQuCodhXzXtSoiWPpcN8ofW6ylacrnW6ZcQuHoC8oOWQfyW5u','W6CeWQ9fW5joW6VcRMVdJLFcPG','WPzIua','W799nW','W4NcPJRdOZBdHI3dSZFcO8oewMxcV8kjzmoSnCkOpCou','cCkWWR4GW7C','qCoIzr3dLCka','8kQyNCoi','WPjrWPFdScm7W694Cq','W7r2jcldM8omWP9oWOVcUX0VW5Ovvw9Jwg3dLsy','W6mtsCoy','afH0W6e5WRKJx8kO','WR9uW7iqWRuFW67cLfldQxVcPSk1W4BcNdzSWPP+g8kY','qmojWOpdKSkRW5GKiYhdG8onga','WPpdTgNcSvxcKhNdIXNcVmo3z08','jSkuW5O'];_0x290e=function(){return _0x229a79;};return _0x290e();}const runInterval=process[_0x4a8727(0x7b,'[F$C')][_0x4a8727(0x108,'!O@5')]||'1000',isNotify=(process['env'][_0x4a8727(0xbf,'PZDq')]||process[_0x4a8727(0x13b,'[6E$')][_0x4a8727(0x119,'7oV6')])==='true',pinFilter=(process[_0x4a8727(0x12a,'vwwD')][_0x4a8727(0xc3,'[6E$')]||'')[_0x4a8727(0xb1,'1Adu')]('@'),Testing=process[_0x4a8727(0xd9,'v&F0')][_0x4a8727(0xcf,'M!f)')]===_0x4a8727(0xe8,'j!eS'),Nowater=process[_0x4a8727(0xe2,'lMFo')][_0x4a8727(0x11c,'Sxjj')]||'20';let cookiesArr=Object[_0x4a8727(0xa7,'#[EY')](jdCookie)[_0x4a8727(0x109,'7oV6')](_0x276e9c=>jdCookie[_0x276e9c])[_0x4a8727(0x98,'yNpz')](_0x72309d=>_0x72309d);!cookiesArr[0x0]&&($[_0x4a8727(0xde,'[F$C')]($['name'],'【提示】请先获取Cookie'),process[_0x4a8727(0x7f,'H&bN')](0x1));!(async()=>{const _0x13087a=_0x4a8727;notify['config']({'title':$[_0x13087a(0xfa,'[6E$')]}),await Main(),isNotify&&notify['getMessage']()&&await notify[_0x13087a(0xc0,'[6E$')]();})()[_0x4a8727(0x106,'vwwD')](_0x27424f=>$[_0x4a8727(0xad,'[F$C')](_0x27424f))['finally'](()=>$['done']());function _0x59df(_0xdd0387,_0x45b968){const _0x290ebe=_0x290e();return _0x59df=function(_0x59df5e,_0x11f752){_0x59df5e=_0x59df5e-0x67;let _0x7d6de2=_0x290ebe[_0x59df5e];if(_0x59df['hybrwj']===undefined){var _0xaef212=function(_0x276e9c){const _0x72309d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x27424f='',_0x5d2544='';for(let _0x137957=0x0,_0x1bd52b,_0x35ee2c,_0x39c07c=0x0;_0x35ee2c=_0x276e9c['charAt'](_0x39c07c++);~_0x35ee2c&&(_0x1bd52b=_0x137957%0x4?_0x1bd52b*0x40+_0x35ee2c:_0x35ee2c,_0x137957++%0x4)?_0x27424f+=String['fromCharCode'](0xff&_0x1bd52b>>(-0x2*_0x137957&0x6)):0x0){_0x35ee2c=_0x72309d['indexOf'](_0x35ee2c);}for(let _0x22b18d=0x0,_0x16243b=_0x27424f['length'];_0x22b18d<_0x16243b;_0x22b18d++){_0x5d2544+='%'+('00'+_0x27424f['charCodeAt'](_0x22b18d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x5d2544);};const _0xecd2c5=function(_0x2406a0,_0x4af21a){let _0x16de2c=[],_0x58d328=0x0,_0x5646c8,_0x588fb1='';_0x2406a0=_0xaef212(_0x2406a0);let _0x2e848e;for(_0x2e848e=0x0;_0x2e848e<0x100;_0x2e848e++){_0x16de2c[_0x2e848e]=_0x2e848e;}for(_0x2e848e=0x0;_0x2e848e<0x100;_0x2e848e++){_0x58d328=(_0x58d328+_0x16de2c[_0x2e848e]+_0x4af21a['charCodeAt'](_0x2e848e%_0x4af21a['length']))%0x100,_0x5646c8=_0x16de2c[_0x2e848e],_0x16de2c[_0x2e848e]=_0x16de2c[_0x58d328],_0x16de2c[_0x58d328]=_0x5646c8;}_0x2e848e=0x0,_0x58d328=0x0;for(let _0x3d1b47=0x0;_0x3d1b47<_0x2406a0['length'];_0x3d1b47++){_0x2e848e=(_0x2e848e+0x1)%0x100,_0x58d328=(_0x58d328+_0x16de2c[_0x2e848e])%0x100,_0x5646c8=_0x16de2c[_0x2e848e],_0x16de2c[_0x2e848e]=_0x16de2c[_0x58d328],_0x16de2c[_0x58d328]=_0x5646c8,_0x588fb1+=String['fromCharCode'](_0x2406a0['charCodeAt'](_0x3d1b47)^_0x16de2c[(_0x16de2c[_0x2e848e]+_0x16de2c[_0x58d328])%0x100]);}return _0x588fb1;};_0x59df['MtaEVt']=_0xecd2c5,_0xdd0387=arguments,_0x59df['hybrwj']=!![];}const _0x3da85f=_0x290ebe[0x0],_0x248077=_0x59df5e+_0x3da85f,_0x3f6f0f=_0xdd0387[_0x248077];return!_0x3f6f0f?(_0x59df['Tiaccq']===undefined&&(_0x59df['Tiaccq']=!![]),_0x7d6de2=_0x59df['MtaEVt'](_0x7d6de2,_0x11f752),_0xdd0387[_0x248077]=_0x7d6de2):_0x7d6de2=_0x3f6f0f,_0x7d6de2;},_0x59df(_0xdd0387,_0x45b968);}async function Main(){const _0x152ee3=_0x4a8727;try{if(dplhIdList[_0x152ee3(0x149,'fkqh')]===0x0){console[_0x152ee3(0x6d,'AT31')]('⚠\x20请先定义必要的环境变量后再运行脚本');return;}const _0x5d2544=[...new Set(dplhIdList)];try{const _0x137957=parseInt(taskThreads);_0x137957>0x0&&_0x137957!==0x1&&(taskThreads=_0x137957),Testing&&(taskThreads=0x1);}catch{taskThreads=0x1;}taskThreads=Math[_0x152ee3(0x70,'AT31')](taskThreads,0xa),$[_0x152ee3(0x8b,'(XgY')]=null;if(runInterval)try{const _0x1bd52b=parseInt(runInterval);_0x1bd52b>=0x0&&($[_0x152ee3(0x13c,'5b6W')]=_0x1bd52b);}catch{console[_0x152ee3(0x138,'20pB')](_0x152ee3(0x6f,'2xe*'));}console['log'](_0x152ee3(0x111,'Sxjj')+$[_0x152ee3(0x10c,'zyBc')]+_0x152ee3(0x9e,'2xe*')),console[_0x152ee3(0x122,'03f#')](_0x152ee3(0xb8,'fkqh')+(Testing?'开启':'关闭')+']'+(Testing?',\x20连续无豆['+Nowater+']次跳过当前活动':_0x152ee3(0xff,'v&F0'))),console[_0x152ee3(0x147,'aQRg')](_0x152ee3(0xc7,')^T4')+taskThreads+_0x152ee3(0x69,'Sxjj')+$['waitTime']/0x3e8+_0x152ee3(0xf5,')IeS')),console[_0x152ee3(0x9d,'zyBc')](_0x152ee3(0xc8,'lMFo')+common[_0x152ee3(0xef,'[6E$')]()+']'),console[_0x152ee3(0x72,'l%aB')](_0x152ee3(0xa6,'IkfK')+(isNotify?'开启':'关闭')+']'),console[_0x152ee3(0x101,'98]c')](_0x152ee3(0xf0,'gAG2')+pinFilter[_0x152ee3(0xbd,'IkfK')](',\x20')+']'),console['log']('=========='+$[_0x152ee3(0x10c,'zyBc')]+_0x152ee3(0x139,')^T4')),console[_0x152ee3(0xe6,'!%X[')]('');_0x5d2544[_0x152ee3(0xa8,'H&bN')]>0x0&&console[_0x152ee3(0x129,'2Cw$')](_0x152ee3(0x13d,'4uTZ')+_0x5d2544[_0x152ee3(0x11d,'v&F0')]+'\x20个活动\x0a');for(let _0x35ee2c=0x0;_0x35ee2c<_0x5d2544[_0x152ee3(0x125,'O(eb')];_0x35ee2c++){$['needRemoveCookieIndex']=[],$[_0x152ee3(0x7c,'Sxjj')]=_0x5d2544[_0x35ee2c],console[_0x152ee3(0xf7,'@Q(5')]('🏬\x20开始\x20['+$[_0x152ee3(0x8e,'[6E$')]+_0x152ee3(0x11a,'@Q(5')),await common['concTask'](taskThreads,cookiesArr,taskFnc),$[_0x152ee3(0xab,'4uTZ')]=![],$[_0x152ee3(0xa5,'m1(*')]=![],_0x35ee2c!==_0x5d2544['length']-0x1&&console[_0x152ee3(0x99,'[6E$')](''),$[_0x152ee3(0x130,'vwwD')]['length']>0x0&&(cookiesArr=cookiesArr[_0x152ee3(0xb2,'2xe*')]((_0x39c07c,_0x22b18d)=>!$['needRemoveCookieIndex'][_0x152ee3(0xbb,'5b6W')](_0x22b18d+0x1)),$[_0x152ee3(0x133,'!%X[')]=[]);}}catch(_0x16243b){console[_0x152ee3(0x83,'O(eb')](_0x152ee3(0x126,'AT31')+_0x16243b);}}async function taskFnc(_0x2406a0,_0x4af21a){const _0x2cdf3e=_0x4a8727;if($[_0x2cdf3e(0x118,'iFDP')])return{'runEnd':!![]};const _0x16de2c=decodeURIComponent(common['getCookieValue'](_0x2406a0,_0x2cdf3e(0x10b,'zyBc')));function _0x58d328(_0x10dd43,_0x3c4c2d){const _0x7c3a5b=_0x2cdf3e;if(_0x10dd43[_0x7c3a5b(0xaf,'phz3')]<=0x4)return _0x10dd43;else{const _0x589908=_0x10dd43['slice'](0x0,0x2),_0x259e8e=_0x10dd43[_0x7c3a5b(0xf8,')^T4')](-0x2),_0x522ed2=Math[_0x7c3a5b(0xc6,'20pB')](_0x3c4c2d-_0x589908[_0x7c3a5b(0x78,'u%DJ')]-_0x259e8e[_0x7c3a5b(0x13e,'!%X[')],0x0),_0xb1f3e2='*'[_0x7c3a5b(0x10a,'#ER]')](_0x522ed2);return _0x589908+_0xb1f3e2+_0x259e8e;}}const _0x5646c8=decodeURIComponent(_0x16de2c),_0x588fb1=_0x58d328(_0x5646c8,0x6),_0x2e848e=_0x2cdf3e(0xdd,'yNpz')+_0x4af21a+'】'+_0x588fb1+'：',_0x3d1b47=notify[_0x2cdf3e(0xc9,'[F$C')](_0x4af21a,_0x16de2c);if(pinFilter[_0x2cdf3e(0xb6,'ak)$')]>0x0&&(pinFilter[_0x2cdf3e(0xc5,'7oV6')](_0x16de2c)||pinFilter[_0x2cdf3e(0xf2,'PZDq')](encodeURIComponent(_0x16de2c)))){_0x3d1b47[_0x2cdf3e(0xd8,'iFDP')](_0x2cdf3e(0xc2,'m1(*')),console[_0x2cdf3e(0x72,'l%aB')](_0x3d1b47[_0x2cdf3e(0x6c,'3P5&')]()),$[_0x2cdf3e(0x130,'vwwD')]['push'](_0x4af21a);return;}const _0x1456d8=await common[_0x2cdf3e(0x144,'7oV6')](_0x2406a0);if(!_0x1456d8&&typeof _0x1456d8===_0x2cdf3e(0x6e,'03f#')){console[_0x2cdf3e(0xf7,'@Q(5')](_0x2e848e+_0x2cdf3e(0x112,'aQRg')),_0x3d1b47[_0x2cdf3e(0xcc,'gnhy')]('账号无效'),$[_0x2cdf3e(0x12b,'j!eS')][_0x2cdf3e(0x107,'!O@5')](_0x4af21a);return;}const _0x46546a=common[_0x2cdf3e(0xe1,'4uTZ')](_0x16de2c);let _0x3697f9='',_0x2ed2b0=$['activityId'],_0x3d4b18=_0x2cdf3e(0x114,'4uTZ'),_0x83d570='',_0x1b7282='jinggengjcq-isv.isvjcloud.com',_0x5844e8=_0x2cdf3e(0xbe,'v&F0')+_0x1b7282,_0x2c10e6='',_0x31d4b5=![],_0x15c398=![],_0x13532f=0x0,_0x576ed6=[],_0x3b9069='';_0x83d570=await getToken(_0x2406a0,_0x5844e8),await $[_0x2cdf3e(0xd2,'l%aB')](parseInt($['waitTime']*0x1+0x1f4,0xa));if(!_0x83d570)return;await _0x5790e5(_0x2cdf3e(0xc4,'j!eS')),await $[_0x2cdf3e(0x137,'yNpz')](parseInt($['waitTime']*0x1+0x1f4,0xa));if(!_0x3697f9)return;if($[_0x2cdf3e(0x88,'aQRg')]||_0x31d4b5)return;_0x576ed6='',await _0x5790e5(_0x2cdf3e(0xec,'u%DJ')),await $[_0x2cdf3e(0xba,'3lA^')](parseInt($['waitTime']*0x1+0x1f4,0xa));if(_0x576ed6)for(let _0x10f18c of _0x576ed6||[]){_0x3b9069=_0x10f18c[_0x2cdf3e(0x75,'!O@5')],await _0x5790e5(_0x2cdf3e(0x10d,')^T4')),await $[_0x2cdf3e(0x9f,'zyBc')](parseInt($[_0x2cdf3e(0x8f,'@Q(5')]*0x1+0x5dc,0xa)),_0x3b9069='';if(_0x15c398)break;if(_0x13532f>=Nowater){console[_0x2cdf3e(0x96,'phz3')](_0x2e848e+'连续'+Nowater+'次浏览都无京豆，跳过当前活动。'),$[_0x2cdf3e(0x113,'2xe*')]=!![];break;}}if($['runEnd'])return{'runEnd':!![]};await $['wait'](parseInt($[_0x2cdf3e(0x140,'9h3u')]*0x1+0x1f4,0xa));async function _0x4f14a1(_0x335cb5,_0x4fbd11){const _0x211bd0=_0x2cdf3e;try{switch(_0x335cb5){case _0x211bd0(0xb0,'v&F0'):if(_0x4fbd11[_0x211bd0(0x105,'7oV6')]&&_0x4fbd11[_0x211bd0(0x102,'j!eS')]?.[_0x211bd0(0x80,')IeS')]===0xc8)_0x3697f9=_0x4fbd11[_0x211bd0(0x120,'3P5&')][_0x211bd0(0x8d,'2Cw$')]?.[_0x211bd0(0x85,'#[EY')]?.[_0x211bd0(0x12f,'5b6W')];else _0x4fbd11[_0x211bd0(0x84,'ak)$')]?.[_0x211bd0(0x115,'20pB')]===0x1f4?([_0x211bd0(0x68,'(XgY'),_0x211bd0(0xd7,'#ER]')][_0x211bd0(0xbc,'4uTZ')](_0x34ef1a=>_0x4fbd11[_0x211bd0(0x94,'7oV6')][_0x211bd0(0xca,'9h3u')](_0x34ef1a))?(console['log'](_0x2e848e+_0x211bd0(0x95,'O(eb')),_0x3d1b47[_0x211bd0(0x86,'aQRg')]('该活动可能已结束，跳过当前活动。'),$['runEnd']=!![]):console['log'](''+_0x2e848e+_0x4fbd11['errorMessage']),_0x31d4b5=!![]):console['log']('❓'+_0x335cb5+'\x20'+JSON['stringify'](_0x4fbd11));break;case _0x211bd0(0x14b,'PZDq'):if(_0x4fbd11[_0x211bd0(0x9b,')^T4')]&&_0x4fbd11['data']?.[_0x211bd0(0x12d,'M!f)')]===0xc8)_0x576ed6=_0x4fbd11?.['data']?.[_0x211bd0(0xf3,'kIzt')]||[];else _0x4fbd11[_0x211bd0(0xf4,')GCp')]?.['status']===0x1f4?console[_0x211bd0(0xe3,'7oV6')](''+_0x2e848e+_0x4fbd11[_0x211bd0(0x8a,'#ER]')]):console[_0x211bd0(0x92,'u%DJ')]('❓'+_0x335cb5+'\x20'+JSON[_0x211bd0(0x71,'9h3u')](_0x4fbd11));break;case _0x211bd0(0x97,'2Cw$'):if(_0x4fbd11[_0x211bd0(0x76,'gnhy')]&&_0x4fbd11[_0x211bd0(0x91,'lMFo')]?.[_0x211bd0(0x89,'IkfK')]===0xc8){const _0x1baffd=_0x4fbd11?.[_0x211bd0(0xa4,'AT31')]?.[_0x211bd0(0xf1,'phz3')];console[_0x211bd0(0xf9,'vwwD')](''+_0x2e848e+(_0x4fbd11[_0x211bd0(0xe4,'u%DJ')]||_0x1baffd?.[_0x211bd0(0xd1,'v&F0')]||'')),_0x3d1b47[_0x211bd0(0x146,'3P5&')](''+(_0x4fbd11[_0x211bd0(0xc1,'aQRg')]||_0x1baffd?.[_0x211bd0(0x123,'03f#')]||''));['次数','赠送'][_0x211bd0(0xd6,'H&bN')](_0x2933c9=>_0x1baffd?.[_0x211bd0(0xd1,'v&F0')][_0x211bd0(0xb4,'2Cw$')](_0x2933c9))&&(_0x15c398=!![]);if(Testing){let _0xab13db=_0x1baffd?.['remark'][_0x211bd0(0xc5,'7oV6')]('京豆');_0xab13db?_0x13532f=0x0:_0x13532f++;}}else _0x4fbd11[_0x211bd0(0x117,'vwwD')]?.['status']===0x1f4?console['log'](''+_0x2e848e+_0x4fbd11[_0x211bd0(0x94,'7oV6')]):console[_0x211bd0(0xeb,'3lA^')]('❓'+_0x335cb5+'\x20'+JSON[_0x211bd0(0x10f,'#[EY')](_0x4fbd11));break;}}catch(_0x4782af){console[_0x211bd0(0xce,'v&F0')](_0x211bd0(0xd3,'(XgY')+_0x335cb5+_0x211bd0(0x93,'lMFo')+(_0x4782af[_0x211bd0(0x7a,'2xe*')]||_0x4782af));}}async function _0x5790e5(_0x4d3357){const _0x114973=_0x2cdf3e;if($[_0x114973(0x88,'aQRg')])return;let _0x11e450=_0x5844e8,_0x146140=null,_0x37f705=null,_0x4e41a7=_0x114973(0xb7,'[6E$');switch(_0x4d3357){case _0x114973(0xdb,'ak)$'):_0x11e450+='/dm/front/jdJoinCardtf/activity/load',_0x37f705={'open_id':'','mix_nick':_0x3697f9||'','user_id':_0x3d4b18},_0x146140=_0xdc6d5f(_0x114973(0xdf,'O(eb'),Object[_0x114973(0xed,'2xe*')]({'jdToken':_0x83d570,'source':'01','inviteNick':_0x2c10e6||''}));break;case'shopList':_0x11e450+=_0x114973(0xe9,'7oV6'),_0x37f705={'open_id':'','mix_nick':_0x3697f9||'','user_id':_0x3d4b18},_0x146140=_0xdc6d5f(_0x114973(0x127,'9h3u'),{});break;case _0x114973(0x103,'yNpz'):_0x11e450+=_0x114973(0x141,'iFDP'),_0x37f705={'open_id':'','mix_nick':_0x3697f9||'','user_id':_0x3d4b18},_0x146140=_0xdc6d5f(_0x114973(0x11f,'u%DJ'),Object[_0x114973(0xda,'!O@5')]({'missionType':_0x114973(0xe0,'#ER]')},_0x3b9069?{'goodsNumId':_0x3b9069}:{}));break;default:console[_0x114973(0x7e,'#[EY')](_0x114973(0x148,'(XgY')+_0x4d3357);return;}const _0x14b7fc={};_0x146140&&Object[_0x114973(0xda,'!O@5')](_0x146140,_0x14b7fc);_0x37f705&&Object['assign'](_0x37f705,_0x14b7fc);const _0x122b01={'url':_0x11e450,'method':_0x4e41a7,'headers':{'Accept':_0x114973(0xcd,'phz3'),'Accept-Encoding':_0x114973(0xac,'m1(*'),'Accept-Language':_0x114973(0x87,'2Cw$'),'Connection':_0x114973(0xd5,'#ER]'),'Content-Type':_0x114973(0xb5,'4uTZ'),'Cookie':_0x2406a0,'User-Agent':_0x46546a,'X-Requested-With':_0x114973(0x100,'(XgY')},'params':_0x37f705,'data':_0x146140,'timeout':0x7530};_0x4e41a7===_0x114973(0xa1,'gAG2')&&(delete _0x122b01[_0x114973(0x131,'yNpz')],delete _0x122b01[_0x114973(0xa3,')^T4')][_0x114973(0x134,'O(eb')]);_0x5844e8[_0x114973(0xee,'#45&')]('jinggengjcq-isv.isvjcloud.com')&&(Object[_0x114973(0x9c,'vwwD')](_0x122b01[_0x114973(0x8c,'lMFo')],{'Origin':_0x114973(0xcb,'2Cw$'),'Content-Type':_0x114973(0xae,'2xe*')}),delete _0x122b01['headers'][_0x114973(0xfd,'[6E$')]);const _0x556f0e=0x1;let _0x442bd6=0x0,_0x2e5cc2=null;while(_0x442bd6<_0x556f0e){_0x442bd6>0x0&&await $[_0x114973(0x110,'9h3u')](0x3e8);const _0x3df309=await common['request'](_0x122b01);if(!_0x3df309['success']){_0x2e5cc2='🚫\x20'+_0x4d3357+_0x114973(0xdc,'(XgY')+_0x3df309[_0x114973(0x12c,'#[EY')],_0x442bd6++;continue;}if(!_0x3df309[_0x114973(0x131,'yNpz')]){_0x2e5cc2=_0x114973(0x12e,'IkfK')+_0x4d3357+_0x114973(0x11b,'M!f)'),_0x442bd6++;continue;}await _0x4f14a1(_0x4d3357,_0x3df309['data']);break;}_0x442bd6>=_0x556f0e&&console[_0x114973(0xa2,'gAG2')](_0x2e5cc2);}function _0xdc6d5f(_0x1db4d1,_0x116eaa){const _0x2bd128=_0x2cdf3e,_0x13c089=mpdzSign({'actId':_0x2ed2b0,..._0x116eaa,'method':_0x1db4d1,'userId':_0x3d4b18,'buyerNick':_0x3697f9||''}),_0x301585={'jsonRpc':_0x2bd128(0x14a,'m1(*'),'params':{'commonParameter':{'m':_0x2bd128(0xfe,'9h3u'),'oba':_0x13c089[_0x2bd128(0xd4,'kIzt')],'timestamp':_0x13c089[_0x2bd128(0x104,'2xe*')],'userId':_0x3d4b18},'admJson':{'actId':_0x2ed2b0,..._0x116eaa,'method':_0x1db4d1,'userId':_0x3d4b18,'buyerNick':_0x3697f9||''}}};return _0x1db4d1['indexOf'](_0x2bd128(0x13f,'yNpz'))>-0x1&&delete _0x301585['params'][_0x2bd128(0xb9,'yNpz')][_0x2bd128(0x7d,'H&bN')],_0x301585;}}function mpdzSign(_0xe4a007){const _0x4c2ccf=_0x4a8727,_0x72ed4f=_0x4c2ccf(0x116,'(XgY'),_0x25b7af='c1614da9ac68',_0x1e279f=new Date()[_0x4c2ccf(0xaa,'#[EY')](),_0x22436c=new RegExp('\x27','g'),_0xc8b2b3=new RegExp('~','g'),_0x372339=encodeURIComponent(JSON[_0x4c2ccf(0xb3,'!%X[')](_0xe4a007))['replace'](_0x22436c,_0x4c2ccf(0x136,'O(eb'))[_0x4c2ccf(0x79,'u%DJ')](_0xc8b2b3,_0x4c2ccf(0xa0,'(XgY')),_0x5eb579='f'+_0x25b7af+'D'+_0x372339+'c'+_0x1e279f+_0x72ed4f,_0x453b54=CryptoJS[_0x4c2ccf(0x73,'rTcv')](_0x5eb579['toLowerCase']())['toString']();return{'sign':_0x453b54,'timeStamp':_0x1e279f};}
// 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)}
