faker3/jd_bean_home.js
2024-06-28 15:38:28 +08:00

14 lines
31 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.

/*
升级赚京豆
活动入口京东APP首页-京东秒杀
cron:1 1 1 1 *
*/
const $ = new Env('升级赚京豆')
var il='jsjiami.com.v7';function Iii11l(){const illlI1=(function(){return[...[il,'kGHjUsCHGjSxhibaylWmNbixC.GdtcfomR.v7frq==','WPxcImkzdCoEvqpdLmkhmYtcRmkDW7Pjhq','psuMBYNdSCopWQCdpCkvbNVcVmkZWPZcNCknW5G','WQSgW7DhW7ldSmo/WRC','W5H7Cmkahhq+W6m','WQdcGti','W4/cL8k6WP0','WPSOrSk2gwO','W70EW4ddV28','pbC/vsq','W5OZC8oYbCkKemoiW5NdQSoUdtZdPt0i','W5ldIGe','p8o+W5xdUSkqCSkAWOPgW60W','zZqz','W7/cOfuGlCo/sca','u8ouocjhnmkPW7ZcR8kh','WRrjua','nfZdOKHw','W4hdNXGSaSkcW5rsesO3W4S','sCojpCkByG','WQFdVspdV8kNWQqpWQRdSCkip8k7W6dcLSk/W60','wmkFWRv9WQJdVSkLofVcSW','WQpdV8k1W40','WR3cUSofW7arWOpcV8oEE0rgwCoNW4hcUdVdO1m3va','rwftj388yvBcT8kRnaW','5BYc5yQJ562I57If77YI','W5a1EG','WPZdKbCvBq','W6pdTSkfWRajW77dT8kBtvO','77+L5yYo57Qp5B2fvG','W5ddGCkjW44atmkaW7G','WPBdOcrkW7FdPG','mmoqW745W4BcU8oB5B2z5AEJ44oi5lQd5lQn6lso5y63','DNtcNCoDC8o5WRNcLSk4WOeIWOfujCoAoq','WQ/dU0RcJGe','5A2z5OUE5lMk5yIH5Awt6lACWRW','WO8GrSkZgMSK','W5G7ACo3','k8odW4W','WR8rDYjw','W7qyW7i','qCkIW5JcLbX3','q8kFoSoyxq1Yv8oHoSkLEhO3W5XI','xhyshM0','W5NdGSknf8oJwapcKmkzpZxcVq','pCkbta','W78sW6hdMr1CWRZdG8kZWPvsedVcGW','F8o9xKbW','WRK1W6G','WQ7cIZtdSmktuKC','W7SwW4/dKd8','EvVcQGRcJHaM','dIhcH33dOmk6xmoW','W60tW4pdUxK','WQNdV8kSW4K','WR3dVmkZW4hcPG','WOVORihMSOZLKlhLUlWz','bIhcINldRmk+umo7W7L7W7ZdHXaBtmkX','WQyqW68kWQy','W4tdNW0ky8kqW5m','W4HgW540WQqf','ds3cL2xdJ8k8va','W7RdSqnDmW','WPBdQI0','uCk4iCozsa','ocuZtrZdPmozWR87fCkwaG','W6nHW5iUWRe','W4tdNW0on8kxW4jkkqi0W4/cGSkXCvddJSkCW4i','776J57U76AI95yg/77+k','W5tdJ8kD','lXXQWP0','W4FcMCkP','lmkFFgrI','W4RdIG1qda','fSkyFNTcfmkNW7dcKa','WQ3dUYO','W5JdImkcdCoEvWxcLmkGjqlcQmkiW7O','D1hcRa','cCkdAW','W4JdLSozyGNcIfW','EtOqWRhdUmoj','iCofW5m','tCkxj8oJEWD9xa','WRddV8kOW5G','ECkhWPBcPSo/','WPtdG0NcQaq','r8k1W5/cHG','aUISUUAZTowqV+w7Ota','eCkEBmo9WPjDWOX5FmkOnSoYmmkTF0W8','iH/cPvldUG','5AY35OQ35lIx5yUy77676i6o5B+N','E8kUW4hcKZq','a8kiWOz+WR/dICky','W5hdMXCMoCko'],...(function(){return[...['fCkEy3fjamk9','WR7dSedcJWexW7GaWRpdNa','ksiEEHK','kmkJyvTf','fCoyW5TWW58','W7VdOCoeW7qlW5xdO8oEwvnleSoMWPZcJtxcQxm3vmkxW547','WPBcI8oqW4CA','566i5BYr5lQ25yI65Pst6zA+5lMdW6RcJmof','W6yiECoVfG','FSoxmxKVW6ewja','77YC5y2457Mb5BY5nG','lSofW5b5','W6WAW5JdLwtcQelcOSocW5ddNI8+WR0','W78FFmorpW','8yg4RMO','y8kfW4fOW7qLW6XcyvZcN0tdShrSWRhdLwj+W5CzeCkjlG8Yda','WOWAW7aEWQ8','mhtdTq','WRVdOYhdGSkp','DmoDnZu','twbg','W4VdG8kvW6mb','WRVdSfxcRsqmW4KsWRtdTMnIuCo9vmkTWO/dNNK','uN/dKI/cLSk6zSo7W7HmW64','C8ojmqDzW5pcUb8','W77dRmktW4hcG8oCzW','W6ldU8kdWRbBWOJdM8kgu25NoG','WQ7dTe/cHsOv','WRRdVe3cLsak','sCkzWRf9WONdNCkul03cTgZdVKyMW6RcPG','WRG7W78','WRldTYJdTCkaWO0lWRldH8khgCk6W6VcVSkZW70','5y+H5ycA5lQP5yQc772s','W6KAW43dUf/cPLRcOmoRW6/dJdC','W7ngECo3nZ5dW5TxWR0oWPBcOmoJxG','eCo5WO7dHe0LE8ogW6pdIY7cOG','W47dGCkwW7Ga','77YX5A+05OUR5Ooj5yw6776d','W5hdJXChomkh','WQRdTe3cIce','5OMW6zs35yoy','77YC5AcI5yUJ57QB6AQ25ykk77+m','q8kVW5xcLHb2hmkNWPlcS1tdPLjEWOtcOG','WP/dTZHcW7hdG8oSWQhcKfBcU8or','fcFcKhFdGSkzvmo0W4q','W4JdHaPCbG','8yQBV8k4','WQ3dKGS6','pIeMqG','rSkSW4lcKW','y0dcLCofEG','vr3cMMJcQSoRsa','mY8H','yxBcJmos','W6FcJSo1W5/cVq','WRNcOCow','W59vW4mIWR0EgSkyW4BcIq','W5u0ECoZpW','pCkIzfrD','y8kaf0BcLCklWRyk','tmkBWRH6WOG','A0Wzm1KtWPqsW6rsWRvK','yMxcL8oeySoDWPNcJSk5','WPJdOcTdW5FdR8o6WRNcR17cR8oa','4P+uv+AEV+IbQoASKEEHLEwNKEEsQ8oa','WRVdP07cLJeq','yZWhWRJdRG','ctTCWRBcQa','B8kjWRfHWQldSmkCpa','dSkjFCogW4G','W4JdLmkLW6entq','l2/dOeDnWRveWQHl','cuJdIq','W6WAW5JdNJ7cTf0','77Yb57Ig6AMV5yo/776Y','sx1flxu','t8kuWQD2WPJdKSkEnKpcSuO','vCoWh8ky','WRu3W6WXWReoW6X5iCoI','WPKAidCbW6RdV2ZdHgdcVSkb','W6VdMmopzci','WQ7dSSkSW7tcQG','wrNcJ20','j8ktrmobW7q','kColW4b9','mmknx8olv8o3cCoaaeK','WO/cLSoyu8kacKBcPCk8bI7cPSkFW6WUEu5pW6JcQrBdOhZdRdKtWOr0WQRdV8kbW6VdNmoEEG','EmoFiu0fW68vja','W5q8BSo9dG','DMpcMCohy8og','qSksav/cKSkeWR0aW4m','t2zvdMeqyW','W4ldIGKNomkhW6rwmZCHW5hcOa','n8k5rSouva','vLRcSXlcLW'],...(function(){return['kWdcTwddTG','WQdcHGFdUmkv','CNBcKCoh','vNjniwK','W5ZdLCkddSodutxcLCkX','uxRcVetdHmkOuSo9','CmkeW7hcTZa','W7VcUmodW5JcQG','WQtdLGWOt8oSWQy','W4TvW4uI','6lsq5yYe5PAs5Pw8','56+S5BY25lMr5yQW5PAE6zAq5lIuW6dcKti','nIlcVCoDCmo2WP3cJW','w8kwauFcUSknWR4','kEITQ+AXSowKMoI0SCoG4PYRya','W64nW57dUxNcIKZcUmouW6FdMcy','AdmFWQFdLSoq','5AYb5OUj5lMu5yIq77+c6i+m5B6c','tmkBx1FcTq','qCkximoD','z8oFo2yLW7ujihSNW7ldKa','kaZdSLBdUf0dWPldV8oEjSoQ','z8kMW5dcKte','WP3dOd5LWRBdVCo9','WQ3dUYRdNSkxWRm','xHFcN2K','a8kay31E','aqT5WQBcSG','4PYwyoIfIoACJ+I+MoIJIEMdREwlPos7SEMvPEISINW','W43cRI/dQCodzgtdSmooWQa','aZ3cLKxdJCk+x8oW','jGJdKCkDCNVcJSkkW6lcSG','W4NdLSoeDHZcHW','WOxORytMS6JLPkdOTy3dJ+kEPCoU5PwF5zor5BMG5PA45O2M','AY7cOb4AW6nMWRLQpmoYvG','5BYj5yIn5lU+6lgL772s','W4pcGSk6WOZdMWmNW6ZdICoKt1RcGMSrW4P1k8kDuspcJa4/W5jzBw4mW7VdQ8k6gqG','fcyvCdHcuLZcP8kTjca','5lMu5yQv5yQM6kcR6i2N5y675AwV6lECWP4','jXj5','WPtdPcDi','WOpcIsZdT8k6','4P6EaoACGUECKUITSEAZLCk0','eJ3cILpdGmk/','fCklyCoO','W5FdGSkchSoduq','WQZdGq00xa','l8opW5vYW5m8W7i','56YS5B2P5lU35yQZ5PEA6zsm5lUJWRJdH8of','WRSwoIOlW6RdNZJdOhW','Emo5iNqu','AmoNeCk2Fq','nI81','W5FcPJBdJmoX','WQVdU8k3W4NcVa','W4nBW5y','77Y25Bsi6lYk57U+566s5yQH77+R','sSkkW4BcLaa','W4ldGCkYW6er','WPRdGmo9W4ZdJN5cWO7dVmo9','oMKoWOpdK8o1W4tdKq','aJH7WR3cNa','W6ZdRcfWjW','wmkFWRv9WRJdSmkcmMtcSvZdPq','4P6nWRtMNAFOGABMROBNOQ/LPARNK4lcGG','5P++6k+C5AE66lwbW6W','WPvLFa','WOSSsCk8mMGjW6PJDW','W4JcHmkRWP3dNfW','WRZdR8kBWOBdUJPwW6H6s2O','W7b/EmoRnq','uSoVmW17','W5VdJ8kuW6untCkBW7ldG8kOW63dLaFcHq','uCkxj8oxsWD4xmoC','iSkBsmobxCoQlG','WOJcLCovs8kpatJcQ8kqiYxcKq','iCkkCgrCW7hcNdFdI8kR','W73cP2ytoW','aSknCCoHW5S','yLem','W7ZcSmoTW6NcRq','6lse5yY65Pww5PA6','xSk0aLlcRG','qmkIW5NcNHbXqG','776h5BAn6l2Y57M756215yU377YZ','WQtdQ8kZW7/cS8oHymkj','WRJcQ8ocW7mdW57dTq','W5xdHCkjW6ifrmkl','CvZcKSohEvZcO8kRW7xcSG','W4VdLmkiW7GkrmkhW7VdJW','WQWsW7f1','5BYE5yUN56+957Q7776h'];}())];}())];}());Iii11l=function(){return illlI1;};return Iii11l();};const lllil1=iii1II;if(function(lllli,iiili1,ill11i,lllill,ill11l,I1lIiI,lllili){return lllli=lllli>>0x6,I1lIiI='hs',lllili='hs',function(IliiiI,Ill11,liiIII,li1i11,iI11I1){const llllI=iii1II;li1i11='tfi',I1lIiI=li1i11+I1lIiI,iI11I1='up',lllili+=iI11I1,I1lIiI=liiIII(I1lIiI),lllili=liiIII(lllili),liiIII=0x0;const il1i1l=IliiiI();while(!![]&&--lllill+Ill11){try{li1i11=parseInt(llllI(0x139,'LGEc'))/0x1*(parseInt(llllI(0x172,'9ru7'))/0x2)+-parseInt(llllI(0x200,'IL(R'))/0x3+-parseInt(llllI(0x169,'n(*v'))/0x4*(-parseInt(llllI(0x209,'VZ0['))/0x5)+parseInt(llllI(0x18c,'#CnT'))/0x6*(parseInt(llllI(0x152,'KktA'))/0x7)+-parseInt(llllI(0x178,'QnF8'))/0x8*(-parseInt(llllI(0x1ff,'4K!E'))/0x9)+parseInt(llllI(0x179,'pZzv'))/0xa*(-parseInt(llllI(0x1fd,'wcTH'))/0xb)+-parseInt(llllI(0x197,'urcl'))/0xc*(-parseInt(llllI(0x14c,'MiIL'))/0xd);}catch(IlIlll){li1i11=liiIII;}finally{iI11I1=il1i1l[I1lIiI]();if(lllli<=lllill)liiIII?ill11l?li1i11=iI11I1:ill11l=iI11I1:liiIII=iI11I1;else{if(liiIII==ill11l['replace'](/[NdykUbHxGqRhlrStWCf=]/g,'')){if(li1i11===Ill11){il1i1l['un'+I1lIiI](iI11I1);break;}il1i1l[lllili](iI11I1);}}}}}(ill11i,iiili1,function(IIIl1I,iil1ii,IlIlli,il1i1i,lil111,i11ilI,ii1ii1){return iil1ii='\x73\x70\x6c\x69\x74',IIIl1I=arguments[0x0],IIIl1I=IIIl1I[iil1ii](''),IlIlli=`\x72\x65\x76\x65\x72\x73\x65`,IIIl1I=IIIl1I[IlIlli]('\x76'),il1i1i=`\x6a\x6f\x69\x6e`,(0x16e7e3,IIIl1I[il1i1i](''));});}(0x2f00,0x4a550,Iii11l,0xbe),Iii11l){}const jdCookie=require('./jdCookie'),notify=require(lllil1(0x1f5,'%cZk')),common=require(lllil1(0x1eb,'IL(R')),{H5st}=require(lllil1(0x189,'QnF8')),isNotify=![];let cookie='';const cookiesArr=Object['keys'](jdCookie)[lllil1(0x1b8,'S[DG')](Iiili=>jdCookie[Iiili])['filter'](IilIli=>IilIli);!cookiesArr[0x0]&&($[lllil1(0x1fa,'KktA')]($[lllil1(0x1be,'4K!E')],'【提示】请先获取Cookie'),process[lllil1(0x1de,'VZ0[')](0x1));!(async()=>{const iil1il=lllil1,li1={'lMzhk':iil1il(0x12c,'q##m')};notify[iil1il(0x1b1,'VZ0[')]({'title':$[iil1il(0x155,'@%ac')]});for(let illIl1=0x0;illIl1<cookiesArr[iil1il(0x1a7,'@%ac')];illIl1++){$['index']=illIl1+0x1,cookie=cookiesArr[illIl1],common['setCookie'](cookie),$['UserName']=decodeURIComponent(common[iil1il(0x1f2,'yr06')](cookie,iil1il(0x22c,'*EJp'))),$['UA']=common['genUA']($[iil1il(0x221,'DjFi')]),$['message']=notify[iil1il(0x171,'AU2Y')]($[iil1il(0x119,'KktA')],$[iil1il(0x196,'X9BR')]),$[iil1il(0x1bc,'wcTH')]='',console[iil1il(0x1c7,'@%ac')](iil1il(0x1a8,'^HVK')+$[iil1il(0x21f,'6ZoK')]+'】'+($[iil1il(0x1ef,'@IFl')]||$[iil1il(0x22a,'^HVK')])+'******\x0a'),await Main(),common[iil1il(0x11a,'^HVK')]();if($[iil1il(0x20c,'V2W%')])break;await $['wait'](0x3e8);}isNotify&&notify['getMessage']()&&(li1['lMzhk']===iil1il(0x1bf,'4K!E')?(lilIii[iil1il(0x1b0,'50n7')](iil1il(0x1ab,'IL(R')+i1ill1['errorMessage']),iIIl1l[iil1il(0x222,'^HVK')]=!![]):(notify[iil1il(0x12a,'V2W%')]('\x0a'),await notify['push']()));})()['catch'](IilIll=>$[lllil1(0x145,'a1So')](IilIll))[lllil1(0x1ac,'#CnT')](()=>$['done']());async function Main(){const ilil1I=lllil1,lI11Ii={'IspvN':function(l11i1i,lI11I1){return l11i1i===lI11I1;},'XrolB':ilil1I(0x180,'VZ0['),'sbLYQ':function(l1il11){return l1il11();},'XCQSK':function(IiI1,liI,illIli){return IiI1(liI,illIli);},'PsiYl':ilil1I(0x1c1,'wcTH'),'nRmJt':function(l11i1l,lIII11){return l11i1l!==lIII11;},'JvgZo':'JBLsy'},Iiill=await common[ilil1I(0x1b6,'50n7')](cookie);if(!Iiill&&lI11Ii[ilil1I(0x1d0,'urcl')](typeof Iiill,lI11Ii[ilil1I(0x1ea,'%cZk')])){console[ilil1I(0x1d3,'a1So')](ilil1I(0x137,'DjFi'));return;}try{$[ilil1I(0x1b7,'U*^F')]=![],await lI11Ii[ilil1I(0x1e8,'W95V')](doTask);if($[ilil1I(0x190,'yr06')])return;await $[ilil1I(0x1db,'4K!E')](lI11Ii['XCQSK'](parseInt,Math['random']()*0x3e8+0x3e8,0xa)),await sendRequest(lI11Ii['PsiYl']);}catch(IiilI){if(lI11Ii['nRmJt'](lI11Ii[ilil1I(0x148,'wMai')],lI11Ii[ilil1I(0x160,'S1e1')])){let liIi1=I1lll1[ilil1I(0x136,'4i&f')][ilil1I(0x212,'wcTH')][ilil1I(0x1bb,'q##m')]||0x0,lI11II=i1IIi[ilil1I(0x18e,'AU2Y')][ilil1I(0x175,'*EJp')]||0x0;IIII1I[ilil1I(0x1cf,'AU2Y')]('当前京豆:'+liIi1+ilil1I(0x165,'^HVK')+lI11II+'\x20天');let l1llI1=Iii111[ilil1I(0x187,'S8Q!')]['curScene'][ilil1I(0x227,'GN4^')]||0x0,llIIll=l1l1II['data']['curScene'][ilil1I(0x163,'4K!E')]||0x0,IillIi=Iil1I1['data']['curScene'][ilil1I(0x205,'a1So')][ilil1I(0x224,'LGEc')]||0x0,lii=IillIi-l1llI1,IllI1i=Ii1iII[ilil1I(0x1ce,'wMai')]['curScene'][ilil1I(0x1a9,'LGEc')]['beanNum']||0x0;l1i11I[ilil1I(0x18d,'#k8B')](ilil1I(0x188,'%cZk')+llIIll+ilil1I(0x1cc,'4i&f')+l1llI1+ilil1I(0x1a5,'#CnT')+IllI1i+'\x20京豆');}else console['log']('❌\x20脚本运行遇到了错误\x0a'+IiilI);}}async function doTask(){const i11il1=lllil1,i11I1l={'qiBXc':function(lil,IllI1l){return lil!==IllI1l;},'caZEM':'EFkJB','WtVAX':function(i11I1i,IillIl){return i11I1i===IillIl;},'hgymy':'yngnH','pPfrg':'GuPEA','XNhFq':function(llliil,liIl1){return llliil*liIl1;},'bxcHk':function(II1lll,II1lli,ii1I1I){return II1lll(II1lli,ii1I1I);},'WavJW':function(IiIl,IiIi){return IiIl+IiIi;},'DTehQ':function(iI1ll1,IlI1Il){return iI1ll1(IlI1Il);},'kdUMr':i11il1(0x19d,'^HVK'),'EkfcD':function(l1il1l,liIil){return l1il1l(liIil);}};$['beanTaskList']='',await sendRequest(i11il1(0x1c9,'W95V'));if($[i11il1(0x207,'yr06')]){if(i11I1l[i11il1(0x17d,'9ru7')]('EFkJB',i11I1l[i11il1(0x1ba,'50n7')]))IlI1l['log'](i11il1(0x138,'fA$v'));else{$[i11il1(0x1a6,'*EJp')]=![];let liIii=$[i11il1(0x16c,'^HVK')][i11il1(0x128,'DjFi')][i11il1(0x202,'GN4^')](II1ll1=>II1ll1[i11il1(0x127,'LGEc')]!=0x2)||[];for(let IlI1Ii of liIii){for(let i11I1I of IlI1Ii['subTaskVOS']||[]){if(i11I1l[i11il1(0x17a,'X9BR')](i11I1l[i11il1(0x228,'n(*v')],i11I1l[i11il1(0x173,')qsg')]))I1l1II['outFlag']=!![],IIli1I[i11il1(0x135,'#vWJ')]&&I1l1I1['message'][i11il1(0x1ae,'%cZk')](I1i111);else{let ll1=Math['floor'](i11I1l[i11il1(0x220,'urcl')](Math[i11il1(0x201,'GN4^')](),0x7d0))+0x3e8;await $['wait'](ll1),console['log'](i11il1(0x206,'W95V')+i11I1I[i11il1(0x17b,'8PfI')]+i11il1(0x20f,'pZzv')+IlI1Ii[i11il1(0x1fb,'*EJp')]+i11il1(0x20b,'h^kC')+IlI1Ii[i11il1(0x1e6,'urcl')]),$[i11il1(0x1d1,'gCt5')]=i11I1I[i11il1(0x176,'JgJ$')]||'',IlI1Ii[i11il1(0x141,'@IFl')]==0x0?($['actionType']=0x0,await sendRequest(i11il1(0x1e7,'GN4^')),await $[i11il1(0x11b,'S1e1')](i11I1l['bxcHk'](parseInt,i11I1l['WavJW'](i11I1l[i11il1(0x1f6,'S[DG')](Math['random'](),0x5dc),0x7d0),0xa))):($[i11il1(0x15e,'rUnL')]=0x1,await i11I1l[i11il1(0x1c6,'gCt5')](sendRequest,i11I1l['kdUMr']),await $[i11il1(0x12f,'LGEc')](i11I1l['bxcHk'](parseInt,Math['random']()*0x5dc+0x1388,0xa)),$['actionType']=0x0,await i11I1l[i11il1(0x143,'VZ0[')](sendRequest,i11il1(0x14a,'Kc!8')),await $['wait'](parseInt(i11I1l['XNhFq'](Math[i11il1(0x1d8,'n(*v')](),0x5dc)+0x7d0,0xa)));}}}if($[i11il1(0x1da,'JgJ$')])await doTask();}}}function iii1II(_0x20026b,_0x3a05bf){const _0x2240f2=Iii11l();return iii1II=function(_0x589456,_0x11564d){_0x589456=_0x589456-0x116;let _0x57bbaa=_0x2240f2[_0x589456];if(iii1II['LmIXdI']===undefined){var _0x96dab=function(_0x5ea7fa){const _0x4e74aa='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2a6e2b='',_0x300942='';for(let _0x132b3a=0x0,_0x20abd2,_0x4ccacd,_0xa4861a=0x0;_0x4ccacd=_0x5ea7fa['charAt'](_0xa4861a++);~_0x4ccacd&&(_0x20abd2=_0x132b3a%0x4?_0x20abd2*0x40+_0x4ccacd:_0x4ccacd,_0x132b3a++%0x4)?_0x2a6e2b+=String['fromCharCode'](0xff&_0x20abd2>>(-0x2*_0x132b3a&0x6)):0x0){_0x4ccacd=_0x4e74aa['indexOf'](_0x4ccacd);}for(let _0x5b505f=0x0,_0x16beb3=_0x2a6e2b['length'];_0x5b505f<_0x16beb3;_0x5b505f++){_0x300942+='%'+('00'+_0x2a6e2b['charCodeAt'](_0x5b505f)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x300942);};const _0x4eb718=function(_0x55ed52,_0x5a4a33){let _0x478c74=[],_0x245b5d=0x0,_0x3b884a,_0x5009f5='';_0x55ed52=_0x96dab(_0x55ed52);let _0xed39ad;for(_0xed39ad=0x0;_0xed39ad<0x100;_0xed39ad++){_0x478c74[_0xed39ad]=_0xed39ad;}for(_0xed39ad=0x0;_0xed39ad<0x100;_0xed39ad++){_0x245b5d=(_0x245b5d+_0x478c74[_0xed39ad]+_0x5a4a33['charCodeAt'](_0xed39ad%_0x5a4a33['length']))%0x100,_0x3b884a=_0x478c74[_0xed39ad],_0x478c74[_0xed39ad]=_0x478c74[_0x245b5d],_0x478c74[_0x245b5d]=_0x3b884a;}_0xed39ad=0x0,_0x245b5d=0x0;for(let _0x6bbd06=0x0;_0x6bbd06<_0x55ed52['length'];_0x6bbd06++){_0xed39ad=(_0xed39ad+0x1)%0x100,_0x245b5d=(_0x245b5d+_0x478c74[_0xed39ad])%0x100,_0x3b884a=_0x478c74[_0xed39ad],_0x478c74[_0xed39ad]=_0x478c74[_0x245b5d],_0x478c74[_0x245b5d]=_0x3b884a,_0x5009f5+=String['fromCharCode'](_0x55ed52['charCodeAt'](_0x6bbd06)^_0x478c74[(_0x478c74[_0xed39ad]+_0x478c74[_0x245b5d])%0x100]);}return _0x5009f5;};iii1II['iqqtnG']=_0x4eb718,_0x20026b=arguments,iii1II['LmIXdI']=!![];}const _0x196cd6=_0x2240f2[0x0],_0x552831=_0x589456+_0x196cd6,_0x5296ed=_0x20026b[_0x552831];return!_0x5296ed?(iii1II['fITqGP']===undefined&&(iii1II['fITqGP']=!![]),_0x57bbaa=iii1II['iqqtnG'](_0x57bbaa,_0x11564d),_0x20026b[_0x552831]=_0x57bbaa):_0x57bbaa=_0x5296ed,_0x57bbaa;},iii1II(_0x20026b,_0x3a05bf);}async function handleResponse(iI1llI,llliii){const ii1iiI=lllil1,IllI11={'hGpfu':function(l1llIi,II1llI){return l1llIi===II1llI;},'xKPvB':function(i11I11,l1llIl){return i11I11!==l1llIl;},'UchNC':'zaHpu','GUvDU':'beanDoTask','QwALJ':function(ii1I1l,ii1I1i){return ii1I1l!==ii1I1i;},'snkoD':ii1iiI(0x1dd,'GN4^'),'rDwRx':function(llI,llliI){return llI===llliI;},'Vylfg':ii1iiI(0x19c,'a1So'),'LUcma':ii1iiI(0x116,'h^kC')};try{switch(iI1llI){case ii1iiI(0x19a,'V2W%'):if(IllI11[ii1iiI(0x199,'1bxK')](llliii[ii1iiI(0x159,'8PfI')],'0')&&llliii[ii1iiI(0x120,'h^kC')])ii1iiI(0x133,'VZ0[')!==ii1iiI(0x16b,'gCt5')?(i1ilii[ii1iiI(0x125,'@IFl')]=!![],iIIII1[ii1iiI(0x21d,'IL(R')](ii1iiI(0x1e2,'QnF8')+(i1l1ll[ii1iiI(0x217,'VZ0[')]['score']||'0')+ii1iiI(0x20e,'wcTH'))):$[ii1iiI(0x225,'@%ac')]=llliii[ii1iiI(0x1ad,'6ZoK')];else llliii['errorMessage']?IllI11['xKPvB'](IllI11[ii1iiI(0x1a3,'#vWJ')],ii1iiI(0x167,'*EJp'))?i1l1l1['log'](ii1iiI(0x149,'W95V')+IlI1I):(console[ii1iiI(0x1d6,'urcl')]('任务列表获取失败,'+llliii[ii1iiI(0x13c,'yr06')]),$[ii1iiI(0x20a,'*EJp')]=!![]):IllI11[ii1iiI(0x17f,'DjFi')]('FNPkB','FRAKs')?IllI11[ii1iiI(0x166,'VZ0[')](I1iIil[ii1iiI(0x11c,'S[DG')],0x1)?IiilIl['log'](ii1iiI(0x1ed,'a1So')):(iii1Ii['has_done']=!![],iii1Il['log'](ii1iiI(0x13e,'9ru7')+(lI1IiI['data']['score']||'0')+'成长值')):(console[ii1iiI(0x1a2,'6ZoK')]('❓'+iI1llI+'\x20'+JSON[ii1iiI(0x22d,'1bxK')](llliii)),$[ii1iiI(0x130,'KktA')]=!![]);break;case IllI11['GUvDU']:if(IllI11[ii1iiI(0x15f,'@IFl')](llliii[ii1iiI(0x146,'h^kC')],'0')&&llliii[ii1iiI(0x136,'4i&f')])IllI11['QwALJ'](IllI11[ii1iiI(0x1aa,'GN4^')],'HVhIA')?(iii1I1[ii1iiI(0x1d9,'%cZk')](ii1iiI(0x153,'4i&f')+II1Ii[ii1iiI(0x1a0,'KktA')]),i1ii[ii1iiI(0x20d,'GN4^')]=!![]):$[ii1iiI(0x185,'MiIL')]===0x1?'vzYYC'!=='PDXUU'?console[ii1iiI(0x154,'wMai')](ii1iiI(0x15d,'urcl')):l1l1I1[ii1iiI(0x17c,'MoNI')](ii1iiI(0x16d,'a1So')+I1iIll+ii1iiI(0x1c0,'AU2Y')+(I1lliI['message']||llIllI)):($['has_done']=!![],console[ii1iiI(0x164,'4i&f')]('完成任务,获得'+(llliii[ii1iiI(0x122,'%cZk')]['score']||'0')+'成长值'));else{if(llliii[ii1iiI(0x211,'@%ac')])console[ii1iiI(0x1b5,'swG&')]('完成任务失败,'+llliii[ii1iiI(0x223,'MoNI')]),$[ii1iiI(0x213,'gCt5')]=!![];else{if(IllI11[ii1iiI(0x1c2,'S[DG')](ii1iiI(0x16a,'wMai'),'JObdL')){IiilI1[ii1iiI(0x1d5,'q##m')](ii1iiI(0x17e,'VZ0['));return;}else console[ii1iiI(0x1d5,'q##m')]('❓'+iI1llI+'\x20'+JSON[ii1iiI(0x186,'*EJp')](llliii)),$[ii1iiI(0x134,'9ru7')]=!![];}}break;case IllI11['Vylfg']:if(llliii[ii1iiI(0x1f1,'%cZk')]==='0'&&llliii[ii1iiI(0x215,'#vWJ')]){let l1lIiI=llliii[ii1iiI(0x19e,'4K!E')]['totalBean'][ii1iiI(0x15c,'%cZk')]||0x0,llliiI=llliii['data'][ii1iiI(0x1d4,'QnF8')]||0x0;console[ii1iiI(0x193,'gCt5')](ii1iiI(0x150,'W95V')+l1lIiI+ii1iiI(0x181,'yr06')+llliiI+'\x20天');let IilIiI=llliii[ii1iiI(0x21b,'LGEc')][ii1iiI(0x18b,'S8Q!')][ii1iiI(0x1c4,'4i&f')]||0x0,i1i1I1=llliii[ii1iiI(0x1f9,'pZzv')][ii1iiI(0x14b,'wcTH')]['level']||0x0,IlII1=llliii[ii1iiI(0x122,'%cZk')][ii1iiI(0x1fe,'pZzv')]['sceneLevelConfig'][ii1iiI(0x131,'QnF8')]||0x0,IiI11=IlII1-IilIiI,lli=llliii[ii1iiI(0x120,'h^kC')][ii1iiI(0x182,'4K!E')][ii1iiI(0x203,'^HVK')][ii1iiI(0x1b9,'#k8B')]||0x0;console[ii1iiI(0x204,'S[DG')](ii1iiI(0x1a1,'swG&')+i1i1I1+ii1iiI(0x118,'RK*#')+IilIiI+ii1iiI(0x1f0,'MiIL')+lli+'\x20京豆');}else llliii['code']===IllI11[ii1iiI(0x1ca,'4i&f')]?console[ii1iiI(0x161,'W95V')]('查询失败,'+llliii[ii1iiI(0x13a,'DjFi')]):console[ii1iiI(0x1cd,'*EJp')]('❓'+iI1llI+'\x20'+JSON[ii1iiI(0x1d2,'urcl')](llliii));break;}}catch(liIlI){IllI11[ii1iiI(0x121,'8PfI')](ii1iiI(0x1c8,'JgJ$'),ii1iiI(0x1dc,'RK*#'))?I1llii[ii1iiI(0x1f7,'1bxK')](ii1iiI(0x16e,'q##m')+lilIll[ii1iiI(0x1d7,'fA$v')]):console['log'](ii1iiI(0x226,'50n7')+iI1llI+ii1iiI(0x1df,'VZ0[')+(liIlI['message']||liIlI));}}async function sendRequest(llli1){const lllilI=lllil1,iIli1i={'AvDSZ':function(iIII1I,ilil1i){return iIII1I||ilil1i;},'kXKwp':'abcdef0123456789','VHsPa':lllilI(0x19a,'V2W%'),'fWmvl':lllilI(0x21a,'W95V'),'RHyBF':lllilI(0x124,'QnF8'),'MRKRD':'4-50950-50957','MOmIi':lllilI(0x151,'AU2Y'),'ilmXz':'8f011','CEaGx':'4.7','NkeuJ':lllilI(0x1b2,'JgJ$'),'BFBJu':function(IlIIi,IiI1l){return IlIIi!==IiI1l;},'Ogyig':lllilI(0x21c,'9ru7'),'KHQvX':lllilI(0x22b,'8PfI'),'YcwaA':'*/*','lhRfH':lllilI(0x11d,'rUnL'),'ZRdyQ':function(illlII,iIII11){return illlII<iIII11;},'hfskI':function(IiI1i,llll1){return IiI1i>llll1;},'sFLoI':lllilI(0x1e1,'wcTH'),'wIlDA':function(lil11l,i1i1Il,I1lIl1){return lil11l(i1i1Il,I1lIl1);},'DKdyP':function(lil11i,IlIIl){return lil11i>=IlIIl;}};if($[lllilI(0x158,'wcTH')])return;let iI1lii='',IilIii=null,iI1lil=null,l1lIi1='POST',iIli1l={},i1i1II={};switch(llli1){case lllilI(0x1b4,'QnF8'):i1i1II={'appId':'8f011','functionId':iIli1i['VHsPa'],'appid':'ld','clientVersion':common[lllilI(0x1fc,'GN4^')](),'client':iIli1i[lllilI(0x218,'LGEc')],'body':{'beanVersion':0x1,'newList':'1','imei':randomString(0x28),'prstate':'0','aid':'','idfa':'','op_type':0x1,'app_info':iIli1i[lllilI(0x1b3,'MoNI')],'location_info':iIli1i['MRKRD']},'version':'4.7','ua':$['UA'],'t':!![]},iIli1l=await H5st[lllilI(0x1c3,'V2W%')](i1i1II),iI1lii=iIli1i['MOmIi'],IilIii=iIli1l['paramsData'];break;case'beanDoTask':i1i1II={'appId':iIli1i[lllilI(0x11f,'4K!E')],'functionId':lllilI(0x170,'#CnT'),'appid':lllilI(0x208,')qsg'),'clientVersion':common[lllilI(0x18a,'W95V')](),'client':iIli1i[lllilI(0x12b,'swG&')],'body':{'actionType':$[lllilI(0x123,'swG&')],'taskToken':$['token']},'version':iIli1i[lllilI(0x1ec,'IL(R')],'ua':$['UA'],'t':!![]},iIli1l=await H5st[lllilI(0x117,'yr06')](i1i1II),iI1lii=iIli1i['MOmIi'],IilIii=iIli1l['paramsData'];break;case iIli1i[lllilI(0x11e,'fA$v')]:i1i1II={'appId':lllilI(0x1af,'rUnL'),'functionId':lllilI(0x192,'6ZoK'),'appid':'signed_wh5_ihub','clientVersion':common[lllilI(0x1cb,'V2W%')](),'client':iIli1i[lllilI(0x191,'W95V')],'body':{},'version':iIli1i[lllilI(0x1f3,'6ZoK')],'ua':$['UA'],'t':!![]},iIli1l=await H5st[lllilI(0x144,'@%ac')](i1i1II),iI1lii=iIli1i[lllilI(0x1e9,'urcl')],IilIii=iIli1l[lllilI(0x21e,'4i&f')];break;default:console[lllilI(0x195,'n(*v')](lllilI(0x157,'FKdM')+llli1);return;}const liiIIl={};IilIii&&(iIli1i[lllilI(0x229,'wMai')](lllilI(0x1f8,'a1So'),iIli1i[lllilI(0x156,'#k8B')])?IilIii={...IilIii,...liiIIl}:ilI1ll[lllilI(0x184,'*EJp')]['fix'](Iillii));iI1lil&&(lllilI(0x162,'Kc!8')!==iIli1i[lllilI(0x12d,'wcTH')]?IlI1i1={...l1lIl1,...IiiIlI}:iI1lil={...iI1lil,...liiIIl});const iil1iI={'url':iI1lii,'method':l1lIi1,'headers':{'Cookie':cookie,'Accept':iIli1i[lllilI(0x1e3,'VZ0[')],'User-Agent':$['UA'],'Accept-Language':lllilI(0x13f,'DjFi'),'Accept-Encoding':lllilI(0x1e0,'8PfI'),'Referer':lllilI(0x19f,'IL(R')},'params':iI1lil,'data':IilIii,'timeout':0x7530};l1lIi1===lllilI(0x16f,'FKdM')&&(delete iil1iI[lllilI(0x140,'JgJ$')],delete iil1iI[lllilI(0x219,'h^kC')][iIli1i[lllilI(0x12e,'#k8B')]]);const IlIllI=0x1;let il1i1I=0x0,lI1li1=null,iI11II=![];while(iIli1i[lllilI(0x1ee,'6ZoK')](il1i1I,IlIllI)){if(iIli1i[lllilI(0x126,'6ZoK')](il1i1I,0x0)){if(lllilI(0x1e1,'wcTH')===iIli1i['sFLoI'])await $[lllilI(0x1db,'4K!E')](0x3e8);else{ll1i1=iIli1i['AvDSZ'](IIli1i,0x20);let iIII1l=iIli1i[lllilI(0x19b,'S1e1')],lllil=iIII1l[lllilI(0x14d,'fA$v')],iI11Il='';for(I1iIi1=0x0;lliil1<IIllI;lliilI++)iI11Il+=iIII1l[lllilI(0x13d,'n(*v')](lili1[lllilI(0x147,'urcl')](ll1l1[lllilI(0x18f,'#CnT')]()*lllil));return iI11Il;}}const lllii=await common['request'](iil1iI);if(!lllii[lllilI(0x177,'swG&')]){lI1li1=lllilI(0x214,'S[DG')+llli1+lllilI(0x13b,'U*^F')+lllii[lllilI(0x15b,'#vWJ')],il1i1I++;continue;}if(!lllii['data']){lI1li1=lllilI(0x1f4,'@%ac')+llli1+lllilI(0x14e,'fA$v'),il1i1I++;continue;}iIli1i['wIlDA'](handleResponse,llli1,lllii[lllilI(0x216,'W95V')]),iI11II=![];break;}iIli1i['DKdyP'](il1i1I,IlIllI)&&(console['log'](lI1li1),iI11II&&($[lllilI(0x129,'KktA')]=!![],$[lllilI(0x1c5,'wcTH')]&&$[lllilI(0x183,'IL(R')][lllilI(0x198,'FKdM')](lI1li1)));}function randomString(iIII1i){const ilil11=lllil1,iil1i1={'BSpYA':function(ilil1l,illlIi){return ilil1l<illlIi;}};iIII1i=iIII1i||0x20;let il1i11=ilil11(0x210,'VZ0['),IlIll1=il1i11[ilil11(0x15a,'QnF8')],IlIII='';for(i=0x0;iil1i1[ilil11(0x174,'pZzv')](i,iIII1i);i++)IlIII+=il1i11['charAt'](Math[ilil11(0x1bd,'yr06')](Math[ilil11(0x1e5,'V2W%')]()*IlIll1));return IlIII;}var version_ = 'jsjiami.com.v7';
// 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) }