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

23 lines
35 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.

/*
新转赚红包提现
链接https://pro.m.jd.com/mall/active/B2Y13x641hwWfpsoRenCzfbz4jR/index.html
轮询提现变量jd_zzhb_txnum //轮询提现页数
提现间隔时间jd_zzhb_txwait //提现兑换间隔,默认 3 秒
提现上限刷新时长变量jd_zzhb_swish //是否延长提现时间默认不延长true/false 配合提现页码,上限后延长,可以延迟到期时间,最终效果可以推迟到下个月直接提现。
提现重试次数jd_zzhb_txmax_retry // 已存在状态/待发放,提现中,等最大重试次数 默认 2 次
兑换红包变量jd_zzhb_exchange // 上限后兑换红包,默认关闭
纯粹提现使用需开启代理否则403
cron:1 1 1 1 *
*/
const $ = new Env('新转赚红包提现')
var il='jsjiami.com.v7';const iIiIi=iii1II;(function(IlIlll,IIIl1I,iil1ii,IlIlli,il1i1i,lil111,i11ilI){return IlIlll=IlIlll>>0x7,lil111='hs',i11ilI='hs',function(ii1ii1,llllI,lllil1,iil1il,ilil1I){const Iliii1=iii1II;iil1il='tfi',lil111=iil1il+lil111,ilil1I='up',i11ilI+=ilil1I,lil111=lllil1(lil111),i11ilI=lllil1(i11ilI),lllil1=0x0;const i11il1=ii1ii1();while(!![]&&--IlIlli+llllI){try{iil1il=parseInt(Iliii1(0xe1,'[7Um'))/0x1+parseInt(Iliii1(0x9e,'@@n$'))/0x2+parseInt(Iliii1(0xf6,'y&ef'))/0x3+parseInt(Iliii1(0x1b2,'1i#O'))/0x4+parseInt(Iliii1(0x158,'Knpy'))/0x5*(-parseInt(Iliii1(0x170,'6EQO'))/0x6)+parseInt(Iliii1(0x19e,'Iz&['))/0x7*(-parseInt(Iliii1(0x183,'a]4]'))/0x8)+parseInt(Iliii1(0x83,'Gu1^'))/0x9;}catch(ii1iiI){iil1il=lllil1;}finally{ilil1I=i11il1[lil111]();if(IlIlll<=IlIlli)lllil1?il1i1i?iil1il=ilil1I:il1i1i=ilil1I:lllil1=ilil1I;else{if(lllil1==il1i1i['replace'](/[udgDwtpLASXBOVIWJbQFT=]/g,'')){if(iil1il===llllI){i11il1['un'+lil111](ilil1I);break;}i11il1[i11ilI](ilil1I);}}}}}(iil1ii,IIIl1I,function(lllilI,ilil11,illlI1,IIIl11,I1lIi1,liiIIi,lil11I){return ilil11='\x73\x70\x6c\x69\x74',lllilI=arguments[0x0],lllilI=lllilI[ilil11](''),illlI1=`\x72\x65\x76\x65\x72\x73\x65`,lllilI=lllilI[illlI1]('\x76'),IIIl11=`\x6a\x6f\x69\x6e`,(0x1731f0,lllilI[IIIl11](''));});}(0x6200,0x4609f,Iii11l,0xc6),Iii11l)&&(il=0xc6);const notify=require(iIiIi(0xb4,'%bPf')),jdCookie=require(iIiIi(0x123,'dC[#')),common=require(iIiIi(0xd9,'ct5L')),{H5st}=require(iIiIi(0x112,'sSZf')),isNotify=process[iIiIi(0x176,'pG8q')][iIiIi(0x159,')4XM')]===iIiIi(0x11a,'M0yN'),Swish=process[iIiIi(0xa2,'G0P^')]['jd_zzhb_swish']===iIiIi(0x1b3,'3vJo'),pagination=process[iIiIi(0x168,'1J3a')]['jd_zzhb_txnum']||'1',exchange=process[iIiIi(0x146,'1i#O')][iIiIi(0x1a5,'@@n$')]===iIiIi(0xb9,'dC[#'),pdd_wait=process[iIiIi(0x150,'^3(P')][iIiIi(0x14b,'okN1')]||'3',MAX_RETRY=process[iIiIi(0x161,'oV!Y')][iIiIi(0x119,'y&ef')]||'2',linkId=iIiIi(0xf4,'dC[#');let business=iIiIi(0x136,'@@n$'),waitTimes=parseInt(pdd_wait)*0x3e8;$[iIiIi(0x7f,'#(Ay')]=![];function iii1II(_0x2e387f,_0x39d9a7){const _0x1337d0=Iii11l();return iii1II=function(_0x4104cf,_0x212417){_0x4104cf=_0x4104cf-0x7e;let _0xf55029=_0x1337d0[_0x4104cf];if(iii1II['GFmxhF']===undefined){var _0x2cfe79=function(_0x59bc82){const _0x306a82='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5221f0='',_0x4c0d80='';for(let _0x5acc4e=0x0,_0x2d3808,_0x52ab5c,_0x162060=0x0;_0x52ab5c=_0x59bc82['charAt'](_0x162060++);~_0x52ab5c&&(_0x2d3808=_0x5acc4e%0x4?_0x2d3808*0x40+_0x52ab5c:_0x52ab5c,_0x5acc4e++%0x4)?_0x5221f0+=String['fromCharCode'](0xff&_0x2d3808>>(-0x2*_0x5acc4e&0x6)):0x0){_0x52ab5c=_0x306a82['indexOf'](_0x52ab5c);}for(let _0x39495d=0x0,_0xae073a=_0x5221f0['length'];_0x39495d<_0xae073a;_0x39495d++){_0x4c0d80+='%'+('00'+_0x5221f0['charCodeAt'](_0x39495d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4c0d80);};const _0xf6e8ae=function(_0x5f5e0e,_0x4ec73b){let _0x2b8684=[],_0x3142f3=0x0,_0x433284,_0x4f3a09='';_0x5f5e0e=_0x2cfe79(_0x5f5e0e);let _0x25994c;for(_0x25994c=0x0;_0x25994c<0x100;_0x25994c++){_0x2b8684[_0x25994c]=_0x25994c;}for(_0x25994c=0x0;_0x25994c<0x100;_0x25994c++){_0x3142f3=(_0x3142f3+_0x2b8684[_0x25994c]+_0x4ec73b['charCodeAt'](_0x25994c%_0x4ec73b['length']))%0x100,_0x433284=_0x2b8684[_0x25994c],_0x2b8684[_0x25994c]=_0x2b8684[_0x3142f3],_0x2b8684[_0x3142f3]=_0x433284;}_0x25994c=0x0,_0x3142f3=0x0;for(let _0x307b19=0x0;_0x307b19<_0x5f5e0e['length'];_0x307b19++){_0x25994c=(_0x25994c+0x1)%0x100,_0x3142f3=(_0x3142f3+_0x2b8684[_0x25994c])%0x100,_0x433284=_0x2b8684[_0x25994c],_0x2b8684[_0x25994c]=_0x2b8684[_0x3142f3],_0x2b8684[_0x3142f3]=_0x433284,_0x4f3a09+=String['fromCharCode'](_0x5f5e0e['charCodeAt'](_0x307b19)^_0x2b8684[(_0x2b8684[_0x25994c]+_0x2b8684[_0x3142f3])%0x100]);}return _0x4f3a09;};iii1II['JbcwFY']=_0xf6e8ae,_0x2e387f=arguments,iii1II['GFmxhF']=!![];}const _0x44f1b1=_0x1337d0[0x0],_0x385bc5=_0x4104cf+_0x44f1b1,_0x503356=_0x2e387f[_0x385bc5];return!_0x503356?(iii1II['qDZtzo']===undefined&&(iii1II['qDZtzo']=!![]),_0xf55029=iii1II['JbcwFY'](_0xf55029,_0x212417),_0x2e387f[_0x385bc5]=_0xf55029):_0xf55029=_0x503356,_0xf55029;},iii1II(_0x2e387f,_0x39d9a7);}let cookie='';const cookiesArr=Object['keys'](jdCookie)[iIiIi(0xc2,'txp@')](IllI1l=>jdCookie[IllI1l])[iIiIi(0x181,'M0yN')](i11I1i=>i11I1i);!cookiesArr[0x0]&&($[iIiIi(0xaa,'tx$D')]($[iIiIi(0x190,'R9Sx')],iIiIi(0xb8,'8!4%')),process[iIiIi(0x1ac,']24Z')](0x1));!(async()=>{const iil1ll=iIiIi,IillIl={'AabsP':'不兑换','dWrzf':function(llliil,liIl1){return llliil==liIl1;},'rXfIc':function(II1lll,II1lli){return II1lll+II1lli;}};console[iil1ll(0x95,'ct5L')](iil1ll(0x139,'4q[@')+pdd_wait+']\x20秒,提现重试\x20['+MAX_RETRY+iil1ll(0x105,'re#m')),console[iil1ll(0x86,'R9Sx')]('⏺️\x20提现上限后是否兑换红包:['+(exchange==!![]?'兑换':IillIl[iil1ll(0x13a,'1J3a')])+iil1ll(0xbf,'C$N@')+(IillIl['dWrzf'](Swish,!![])?'延长':'不延长')+']'),notify['config']({'title':$[iil1ll(0xd8,'y&ef')]});for(let ii1I1I=0x0;ii1I1I<cookiesArr[iil1ll(0x151,'C$N@')];ii1I1I++){$[iil1ll(0x19c,')SQo')]=IillIl['rXfIc'](ii1I1I,0x1),cookie=cookiesArr[ii1I1I],common['setCookie'](cookie),$[iil1ll(0x1c1,'1n!n')]=decodeURIComponent(common[iil1ll(0x138,'c9ce')](cookie,'pt_pin')),$['UA']=common[iil1ll(0x1af,'tx$D')]($[iil1ll(0x12d,'G0P^')]),$['message']=notify['create']($['index'],$['UserName']),$[iil1ll(0xe3,'pG8q')]='',console[iil1ll(0xc5,'1i#O')](iil1ll(0x16b,'[7Um')+$[iil1ll(0xe7,'4q[@')]+'】'+($[iil1ll(0xae,'M0yN')]||$[iil1ll(0x102,'R9Sx')])+iil1ll(0x153,'6EQO')),await Main(),common[iil1ll(0x18d,'7PI!')]();if($[iil1ll(0x177,'Gu1^')])break;await $['wait'](parseInt(IillIl[iil1ll(0x15d,'TJbp')](0x7d0,0x64),0xa));}isNotify&&notify[iil1ll(0xc0,'zK&7')]()&&(iil1ll(0xad,'x]*g')===iil1ll(0xf3,'re#m')?(notify[iil1ll(0x134,'Knpy')]('\x0a'),await notify[iil1ll(0x195,'Knpy')]()):IIII11['log'](iil1ll(0xf2,'A#&K')+i1illi['errMsg']));})()[iIiIi(0x11b,'Knpy')](IiIi=>$[iIiIi(0x10d,'8!4%')](IiIi))[iIiIi(0x18b,'okN1')](()=>$['done']());async function Main(){const iiilil=iIiIi,iI1ll1={'wpCCL':function(l1il1l,liIil){return l1il1l===liIil;},'KxLLZ':function(IllI1I,liIii){return IllI1I<liIii;},'xPDnL':function(II1ll1,IlI1Ii){return II1ll1!==IlI1Ii;},'ocDXi':iiilil(0x1ae,')SQo'),'RlxCA':function(i11I1I,l1il1i,ll1){return i11I1I(l1il1i,ll1);}};$[iiilil(0x18c,'1J3a')]=![];const IlI1Il=await common['getLoginStatus'](cookie);if(!IlI1Il&&iI1ll1[iiilil(0x17f,'dC[#')](typeof IlI1Il,iiilil(0x97,'jjC('))){console['log'](iiilil(0x132,'zK&7'));return;}try{console[iiilil(0x17d,'oV!Y')](iiilil(0x90,'3vJo')+pagination+'](建议开启代理)');for(let iI1llI=0x0;iI1ll1[iiilil(0x141,'[7Um')](iI1llI,pagination);iI1llI++){if(iI1ll1['xPDnL'](iI1ll1[iiilil(0x178,'Iz&[')],'SagUi'))Iil1II[iiilil(0xdf,']Zbw')]('❓'+iIIl1I+'\x20'+I1iIli['stringify'](lI1Ill));else{$['pageNum']=iI1llI+0x1,console[iiilil(0xb7,'[7Um')](iiilil(0xc1,'UCAf')+$['pageNum']+']\x20页'),await goWithdrawal();if($[iiilil(0xa5,'3vJo')])break;await $[iiilil(0xc6,'x]*g')](iI1ll1[iiilil(0xa0,'[7Um')](parseInt,waitTimes*0x1+0x1388,0xa));}}}catch(IllI11){console[iiilil(0x9d,'5pTE')](iiilil(0x15e,'TJbp')+IllI11);}}async function goWithdrawal(){const iil1li=iIiIi,l1llIi={'xTiRh':iil1li(0x11e,'tx$D'),'gVPOM':iil1li(0x169,'jjC('),'mZfeG':function(II1llI,i11I11){return II1llI<i11I11;},'bYUaA':'ywnLC','fqRHu':'Cumnx','JPfhp':'prizeBaseId','ztnCD':iil1li(0x189,'7PI!'),'MuugF':function(l1llIl,ii1I1l){return l1llIl===ii1I1l;},'dwZRZ':iil1li(0x15c,'^3(P'),'qryIF':'310','eCrXt':iil1li(0x188,'oV!Y'),'QMVGV':iil1li(0x110,'6EQO'),'aqznv':'apRecompenseDrawPrize','LiRjo':iil1li(0x130,'Gu1^'),'FcWhn':'已存在状态','GBBXC':function(ii1I1i,llI){return ii1I1i!==llI;},'JAhwJ':iil1li(0x80,'4q[@'),'VKXgm':iil1li(0x175,'C$N@'),'USLJl':'未绑定微信','XKBMB':iil1li(0xe0,'dC[#'),'CuBdu':function(llliI,iI1li1){return llliI!==iI1li1;},'XrhuC':'JaOyH','QkyfF':iil1li(0x1a7,'txp@'),'MsCuI':'KhTic','xoIdl':function(lllii1,liIli){return lllii1===liIli;},'ItwcE':iil1li(0xb2,'a]4]'),'DoDOk':iil1li(0x103,'8!4%'),'FGyYm':function(liIll,IilIi1,iI1liI){return liIll(IilIi1,iI1liI);}};$[iil1li(0x1b6,'Knpy')]='',await sendRequest(iil1li(0x18f,'@@n$'));if($[iil1li(0x1a0,'okN1')]){const l1lIiI=($['superRedBagList'][iil1li(0xb1,'dC[#')]||[])['filter'](llliiI=>llliiI[iil1li(0x154,'B7nc')]===0x4&&llliiI[iil1li(0x164,'@@n$')]===0x0||llliiI[iil1li(0x14d,'jGL*')]===0x2);if(l1lIiI['length']>0x0)console['log']('');for(i=0x0;l1llIi[iil1li(0x157,'txp@')](i,l1lIiI['length']);i++){if(l1llIi[iil1li(0x12e,'Knpy')]===l1llIi[iil1li(0x12a,'4q[@')])IlI1i1[iil1li(0x137,'tx$D')](l1lIl1,IiiIlI);else{const i1i1I1=l1lIiI[i];console[iil1li(0x1b7,'txp@')](iil1li(0xda,')SQo')+i1i1I1?.[iil1li(0x1b5,')SQo')]+'💰\x20['+i1i1I1['id']+']'),$[iil1li(0x96,'R9Sx')]={'prizeType':0x4,'business':business,'id':i1i1I1['id'],'poolBaseId':i1i1I1[iil1li(0xce,'txp@')],'prizeGroupId':i1i1I1[iil1li(0xe8,'zK&7')],'prizeBaseId':i1i1I1[l1llIi[iil1li(0x15a,'zK&7')]]},$[iil1li(0xa3,'G0P^')]='',await sendRequest(l1llIi['ztnCD']);if($[iil1li(0x19d,')SQo')]){if(l1llIi['MuugF'](l1llIi[iil1li(0xed,'1J3a')],iil1li(0xfb,')SQo'))){const IlII1=$[iil1li(0x1bb,'z#g[')][iil1li(0x12b,'XFHJ')],IiI11=$[iil1li(0x140,'a]4]')][iil1li(0x99,'UCAf')];if(IlII1===l1llIi[iil1li(0xa8,'jjC(')])console[iil1li(0x114,'B7nc')](iil1li(0xe2,'G0P^'));else{if(l1llIi[iil1li(0xca,'B7nc')]===l1llIi['eCrXt']){let lli=![],liIlI=0x0;const lll=MAX_RETRY;if(IiI11[iil1li(0xb3,'Gu1^')]('上限'))console[iil1li(0xc5,'1i#O')]('❌\x20提现失败当月提现额度已满'),exchange?($['apRecompenseDrawPrizeBaseParams']={'linkId':linkId,'business':business,'drawRecordId':i1i1I1['id'],'poolId':i1i1I1[l1llIi[iil1li(0x12c,'ct5L')]],'prizeGroupId':i1i1I1[iil1li(0x1a6,'Iz&[')],'prizeId':i1i1I1[l1llIi[iil1li(0x1b8,'re#m')]]},await sendRequest(l1llIi[iil1li(0x1ad,'oV!Y')])):l1llIi['LiRjo']===l1llIi[iil1li(0x165,'okN1')]?!Swish&&($[iil1li(0x122,'pG8q')]=!![]):(I1i11I[iil1li(0x94,'Knpy')]=!![],llIliI['message']&&ilI1li[iil1li(0x1bf,'okN1')][iil1li(0x179,'pG8q')](IIliI));else{if(IiI11[iil1li(0xcc,'sSZf')](l1llIi[iil1li(0xa7,'G0P^')]))console['log'](l1llIi[iil1li(0x17c,'1J3a')]),lli=!![];else{if(IiI11[iil1li(0x1b4,'1i#O')](iil1li(0x10f,'sSZf'))){if(l1llIi[iil1li(0x100,'6EQO')](l1llIi['JAhwJ'],iil1li(0x1a8,'z#g['))){console['log'](l1llIi[iil1li(0x1ab,'M0yN')]);if(!Swish)break;}else II1Ii[iil1li(0x14e,'UCAf')]=!![];}else{if(IiI11['includes'](l1llIi[iil1li(0x14f,'1i#O')])||IiI11['includes'](l1llIi[iil1li(0xde,'@@n$')])){if(l1llIi['MuugF']('qYstw','imrpO'))i1il[iil1li(0x114,'B7nc')](l1llIi[iil1li(0x12f,')SQo')]),lI1Il1=!![];else{console['log'](iil1li(0x81,'txp@'));if(!Swish)break;}}else{if(l1llIi[iil1li(0xec,'%bPf')](l1llIi[iil1li(0x187,'Ewsz')],l1llIi[iil1li(0x9b,'c9ce')])){console[iil1li(0x156,'a]4]')](iil1li(0x13c,'y&ef')+IiI11);if(!Swish)break;}else delete llIll1['data'],delete Illl1l['headers'][iil1li(0x98,'ct5L')];}}}}while(lli&&liIlI<lll){if(l1llIi['CuBdu'](l1llIi[iil1li(0x11d,')4XM')],'JeNWf')){await $[iil1li(0x129,'okN1')](0xc350),await sendRequest(iil1li(0x128,'C$N@'));const iI1lil=$['apCashWithDraw']['status'],l1lIi1=$[iil1li(0x10b,'r!Xk')]['message'];if(l1llIi['xoIdl'](iI1lil,'310'))console[iil1li(0x16a,'1J3a')](l1llIi['ItwcE']),lli=![];else l1lIi1[iil1li(0x89,'oV!Y')](l1llIi[iil1li(0x18a,'M0yN')])?liIlI++:(console[iil1li(0x17b,'4q[@')]('❌\x20重试提现失败上一笔提现还未完成'),lli=![]);}else Ii1iII[iil1li(0xba,'^3(P')](iil1li(0x118,'C$N@'));}}else i1l1lI[iil1li(0x15f,'r!Xk')](l1llIi[iil1li(0x15b,'jGL*')]),i1iliI=![];}i!==l1lIiI[iil1li(0xfc,'A#&K')]-0x1&&('nrabz'===l1llIi[iil1li(0xf8,'jGL*')]?(I1i11l[iil1li(0xfa,'z#g[')](llIlii),llIlil&&(IlI1il['outFlag']=!![],IilliI[iil1li(0x92,'y&ef')]&&iI1lli['message']['fix'](ll1iI))):await $[iil1li(0x115,'z#g[')](l1llIi['FGyYm'](parseInt,Math['random']()*0x7d0+0x1388,0xa)));}else l1l1I1['log'](iil1li(0x196,']Zbw')+I1iIll+iil1li(0x8f,'r!Xk')+(I1lliI['message']||llIllI));}}}}}async function handleResponse(IlIllI,il1i1I){const lillIl=iIiIi,lI1li1={'HuVBM':lillIl(0x11c,'4q[@'),'TAUth':lillIl(0xee,'5pTE'),'drQOK':function(iI11II,iIII1I){return iI11II===iIII1I;},'rRdjg':function(ilil1i,IlIIi){return ilil1i!==IlIIi;},'jZyPy':'RHMwP','VdyEC':'605','NeOqI':function(IiI1l,illlII){return IiI1l!==illlII;},'gWWly':'EQdVx','AIqru':lillIl(0xcb,'#(Ay'),'kngfD':function(iIII11,IiI1i){return iIII11===IiI1i;},'UkvzG':lillIl(0x93,'jGL*'),'BnDLE':lillIl(0x174,'tx$D')};try{if(lI1li1[lillIl(0xdd,')SQo')]!==lI1li1[lillIl(0x8e,'R9Sx')])II1li1['assign'](l1lIlI,IiiIl1);else switch(IlIllI){case lI1li1['TAUth']:if(il1i1I?.['code']===0x0&&lI1li1[lillIl(0x191,'6EQO')](il1i1I?.['success'],!![]))lI1li1['rRdjg'](lillIl(0x16c,'re#m'),lI1li1[lillIl(0x13b,'XFHJ')])?delete lIIiil['params']:$[lillIl(0xd2,'TJbp')]=il1i1I[lillIl(0x9f,'tx$D')];else{if(il1i1I?.[lillIl(0x117,'A#&K')]===lI1li1['VdyEC'])console['log'](lillIl(0x1a3,'Iz&[')),$[lillIl(0x145,'oV!Y')]=!![];else{if(il1i1I[lillIl(0x133,'ct5L')])lI1li1[lillIl(0x1b9,'3vJo')](lillIl(0xf1,'txp@'),lillIl(0x182,'tx$D'))?console[lillIl(0x162,'M0yN')](lillIl(0xc8,'^3(P')+il1i1I[lillIl(0x13e,'oV!Y')]):I1iIil[lillIl(0x148,'Ewsz')]=lI1Iil[lillIl(0xcd,']Zbw')];else il1i1I[lillIl(0x1be,'okN1')]?console[lillIl(0xef,'Ewsz')]('>\x20'+il1i1I[lillIl(0xfe,'1J3a')]):console[lillIl(0xfa,'z#g[')]('❓'+IlIllI+'\x20'+JSON[lillIl(0xd7,'C$N@')](il1i1I));}}break;case lillIl(0xcf,')4XM'):if(il1i1I?.['code']===0x0&&lI1li1['drQOK'](il1i1I?.[lillIl(0xdb,'okN1')],!![]))$['apCashWithDraw']=il1i1I[lillIl(0xc9,'G0P^')];else{if(il1i1I?.[lillIl(0x184,'1n!n')]===lillIl(0x193,'5pTE'))console['log'](lillIl(0xb0,'^3(P')),$[lillIl(0x122,'pG8q')]=!![];else{if(il1i1I['errMsg'])console[lillIl(0x162,'M0yN')](lillIl(0x167,'sSZf')+il1i1I[lillIl(0x1a9,'5pTE')]);else il1i1I[lillIl(0xfe,'1J3a')]?lI1li1[lillIl(0x8b,'1n!n')](lillIl(0x91,'jGL*'),lI1li1[lillIl(0x16d,'ct5L')])?console[lillIl(0x101,'tx$D')]('>\x20'+il1i1I[lillIl(0x19f,']Zbw')]):li1II++:lillIl(0xb5,'r!Xk')==='rIzKX'?console[lillIl(0x155,'k0aO')]('❓'+IlIllI+'\x20'+JSON[lillIl(0xbb,'oV!Y')](il1i1I)):iliIII['apCashWithDraw']=iIIl1i['data'];}}break;case lI1li1[lillIl(0x1aa,'#(Ay')]:if(lI1li1[lillIl(0xff,'tx$D')](il1i1I?.['code'],0x0)&&il1i1I?.['success']===!![])console[lillIl(0x143,'A#&K')]('✅\x20兑换红包成功');else{if(lI1li1['kngfD'](il1i1I?.[lillIl(0xf9,'txp@')],lillIl(0x88,'jjC(')))console[lillIl(0x111,')4XM')]('>\x20滑块验证,请尝试手动验证一次或者更换IP'),$[lillIl(0xc7,'C$N@')]=!![];else{if(il1i1I[lillIl(0x1c0,'jjC(')])console['log'](lillIl(0x9a,'3vJo')+il1i1I[lillIl(0x16e,'okN1')]);else il1i1I[lillIl(0xd1,'z#g[')]?lI1li1[lillIl(0x166,'C$N@')]===lI1li1[lillIl(0xab,'C$N@')]?i1IIi[lillIl(0x86,'R9Sx')]('❓'+IIII1I+'\x20'+Iii111[lillIl(0x14a,'jGL*')](l1l1II)):console['log']('>\x20'+il1i1I['msg']):lillIl(0x1a2,'UCAf')===lillIl(0xac,'G0P^')?(Ii1iI1[lillIl(0xd5,'8!4%')]('>\x20滑块验证,请尝试手动验证一次或者更换IP'),lilIli['txhot']=!![]):console['log']('❓'+IlIllI+'\x20'+JSON[lillIl(0xd7,'C$N@')](il1i1I));}}break;}}catch(i1i1Ii){console[lillIl(0x185,'jjC(')](lillIl(0x160,'c9ce')+IlIllI+lillIl(0x108,'c9ce')+(i1i1Ii[lillIl(0x8c,')SQo')]||i1i1Ii));}}function Iii11l(){const iiilii=(function(){return[...[il,'FjSsgjdiVawmuiF.AOcLQoJtm.vT7bBWDTIXpIwu==','EH9LWQ7cGq','d8kelSojW6K','tKOYcCou','FSk7qmoNrZJcHITPWRu','nCozkSkLkSkXW65aW5jZCtZdSX/dPG','mmkvW5ddTq','rr7cUgdcKrilWPRcUCoagSkaWQpdTcJcISoczmkgW5ZcM29IxmkuWPVcUSoRWPq3oM8I','W6RcLSkAWRvD','rr7cI23cIXK9WOFcPmohmmoDWRRcRG','W7mQomoz','oCkIpCooW5S','W7ahWQ/cMCk2WPG','jL7dQ2ZcLa','WPtdOGumW5xdQCoOBG','bmkIW5JdUCkp','iCkXsrXL','W4H7W4ldHce','EmoSW7imsG','6lAP5yYt5Psi5PAs','eMhdJ2BcSrq','b8klW73dVCkGcfFdQ8k6aG8tvq','W73cRKW','ECocW4yYywDO','WR7dM8ocWPKOqG','zttcJ8kHWOZdTCoOnmoAWPBdLCkHWO1y','4O6L77UCt+w/LEwlO+IUSoE9HEApLoEpK+MxN+MyQCoiW40','W5eagCo7dW','W6KPWRFcVCk6','4PYyW5tMJBtNJktLPBROTjJVVyS','WOqIcI/cQa','W77cTuBcNNZdKG','cSkuW6O','qwNdTrhdH8kuW7xcQCofCXvgDtq','W6ODWPddGSkG','yCkIBSotqbhcRYC','FuZcQW','WQ3dVGC','W6/cV1ZcVhS','pCoqgG','W7xcPLNcTG','tmk5WRNdS2xdHmo3g8o2cmk3W7fUWQLi','yZlcJ8klWPxdS8o3nmoAWRpdQ8k9WPrCW4SPW6tcPmkU','WPKntZ/cJCkUc1v1','W64VdSoxWOZdJ3JdVvm/jmoEfdO','WRSbuMNcMSoc','WPKnxclcHG','pZtcTSkPWQO','dCoTimkQW6W','WP8oW60','saVcPMVcJbK','W6mUjCoHWPFdK3/dKvmgi8opkYVdGCkKW5CyEa','jSoJWQz/W6JdGSkJ','W5nsWONdUSo5tCkzW73cNa','W61ZFW','thBdKq','wJaoW63cJq','v8olWR7cRSo/xYtdLmkxdYe+vG','EComWPyAWRBdMrxcGmoZWRZdISkTWRhdHq','W4xcTmkoWRjF','WO0VBrNcRG','WO8uW4/dQ8o3','C0xdQhP4','4P2npEIgLoACN+I/I+IHJEMaTUwkQEs6NoMwRoIUPYa','WPj0WPe','4P2oCEAFKEIaN+AUGoEJTowMH+ErM8kF','W77cQui','vrmP','raLxfYa','BmoFW5q1Bq','W4GIa8ohWPK','CqxcVNBcVW','l2FLPi3OTBFVVAK','W7updq','4P+DqoMhRoISQUAmTEEpP+wLKUI0No+9Hos5N+s7JoETVEApJoEoVUI/SoADKowSREAlJW','W7Woha','WQTpW7BcPmoqWRqD5B+N5Aw744gq5lIj5lQs6lwT5y6J','WOG6BhFcRq','eetdQKFcUW','W6e5i8oGWOxdGa','sqVcU3/cMryp','pCo7W58WWRpcISoiWP0','vtBcNCkeWOC','pmoeD8kJnG','W6VcPKBcSMldHG','WPldRCoxWRKl','4P2OtUAmMoEoVowNIEI1Lo+9SowgMowTK8oFhCob55MF6k275yYk','x1WS','W71iW77dKaCV','WRNcSSoldSks','xfSI','WQ3cR8k/W6uR','m8k8ca','W6G1eSoAnW','W7FcQfm','WQ/dQqm','j8oKACoasa','D0RcTa','xXuIW5LMwa','WQ7dJCovWPi3','es/dSIddSmk6W6tcPW','WQGIkt0','W70prG','vHO6W63cQCkGDmk8x084ESk7hKpcHZZdQCkYWPD+','z8k+WQhdO1q','W43cKuFcG0q','W4BcSMabobRdTmoKzeXVWQTvW54','FX8zW4vT','W6iIp8omWPRdI2m'],...(function(){return[...['W6qze8oNkW','W5lcRfafpZhdJmoIE01o','FbiyW45T','BmoEW4uKELPJWRuTW6XbWRZdHmoPDq','WPtcQCkHW4K','Amk7W50AWOK','ACkXW6uH','iKie','AYpcHIrJ','fSkoW77dSa','4P6tW5NMNO3OG5dMRlhNO4ZLPRJNKQX8','CdD/mWdcK8oWpvPSWRZdPSoAra','s8oYW7WsxW','dvnBuCka','W6DfnmkliG','g1ZdI03cTa','mmklrcT1','omkvyY9+W6XVAhJcRsJdOf1B','W6FdPSk6ySooWOutW5VdLLVdSJmM','WRlcISoa','W7C+iCoiWOtdTx/dHMuMnmoZfd3dHW','WR/cV8oSoSkoW5bdW78','aqRcNCkVWRm','W6JdSEA5NUwCGEMPT+ITTqRORBVLSO3OR57MI5pLI4ZPQ4xORP3KURJMRAFMI7lOGlVMM5NMJPrJWQu','w8kUW78CWOK','DCopW6O7CMbKWO4kW7vfWPJdJmo0zGG','WQBcO8oMlmkEW7nuW6pdPxVdKqa','tqqsW6ZcVq','k8olomkckG','CqbdWRFcN8o2','wX/cPJnr','BZCwW4PU','W6BdUeZdQa','W7RcTK7cVxK','cSkerXTK','WRJdJCoFWQuo','W6iyWPFcHSku','zSkEWOldOvi','ACkmxSowWRBdGmkGtK7dTaZcMM8','W5b5j8k9','mCoqd8kmW7xcNCoZza','omkitZTJW7a','fCkoW73dVCk8pNhdOmkwfW0Xsd4y','wWup','WPaIr2JcJq','W6PUhCkPga','FoIVLoAXRowKK+I3ICkn4P+0W5W','j8oCgCkHk8klW5XnW6r6uGldUXS','zKlcPqO','WRafW7BdKmo0','W6K4nG','W6KUiSoEWPFdGh8','W7qsu8kYWPyW','WP4+kcRcQWDQWP4','WRFcOSo8p8kCW5O','8jM7VCo3','sHlcKWrkWPO','pSklkmorW5C','4P27sUAoUoEmUowNU+I3QU+8G+AFPUE7Q+wUU+w/PEs/VUAlQEAiP+ACMowmHW','W7pcS0dcO3ZcJ3HddSkaW65oWQVcPmoAigFdIMBdKG','WR0iWQJcOL9+WOHkWOxcMmkoW5G8','W6lcRCklWRv3','WO/cTSooamkd','WPBcP8kR','bf/dSW1tjmkJWQJcHSoDDcddNCkTW4hcGCkX','WQDqfa','W7lcQvFcV3RdKtiF','W6NcSLRcLMhdKq','WQ8/hbFcRG','nmkauZ1SW6nD','uSk/WQ4','WRlcVCkAW64T','W57OR6ZMSRtLKP3LUzuC','5B+35yMg6k+S57626lY/6k2X5O6F542j6Aoa5PEO77Yupa','WQ8OwqdcMW','oCkrW5FdPYPAna','WQStstpcSW','cCkoW7NdNSkIdxm','g3ZdMG','WPVcUmkpW40tWRaQW50LxmkjW5P0sCkbySkzcSkVWOWLlaVcHa','W7mptSktWOa2dq','nhZdK1/cPX1QmCk1wahdTa','jINcRCk1WR9zra','WPOR5AwJ6lE9772l','uZRcGSkeWQu','y8ojWRSbWQhdGJpcVSojWRi','Eb1w','kCkFWOb1ptPSWPqcW4nUWPy','WRVdICofWPe','W7mjWQtdJCk7','zSkE5RQ95z636AIm6kY4WRROR6dLSlZORBVMIk7LIB3PQQdORO/KUltMR6BMIj/OGANMMyBMJ4mqW4i','WQtdVXy','WQddOsmFW6JdOmosySofjCksW6xdSmo/','C3mlcmo4','W5bZoSk3jq','W6HhgtFdI8kzW51xlaRdKJGT','WOFdSJCwW7u','W6aswmk2WQm','bgBdNKJcPWbT','WRldM8ow','zGdcJedcVq','WORdNsiWW7m','lgpdIdWR','vXuTW4zns8oulW','c0ddUXKADSk0','W4ra5RMk5z+L6AIb6k6tW4tORjhLSAdORBtMIzFLIRZPQzVORQxKUjFMRR/MIyZOGB3MMkVMJyZcNwe','oCoGt8oUDW','4PYLoEAnPUEpGoAkPowjOW','W6ztW7pdUrWVW55r','CGXBvSkfW4eBW5mkWQVdS8kaxqBdLSofuKzicdamWPpcGXNcHWO'],...(function(){return['WOXsWOWBWPK','nSotomk0W60','W40kWRS','44gy5O2u56Ap44g76k2D5yAa6iYR5y+XWOBcGhTlo8kU','jmoMx8oM','WPypW7W','W6JcS0BcUMhdKJ4kbW','8jEASSkw','W50zgSoAWRm','WPWOjtNcOq','EulMM6FLKkRLUi7PLi7MJRRNJz7dQSo0','W6JcGCkCWPDkW7BcJHJcISkT','qEw9JowKLEI+QoISVoApRUEoKs3dKq','wGSy','eMXGzW','qwNdPbxdL8ktW4/cSmouDsjrudhdJmobyCkeW4j9W4XVW48NqmkdW5ldIqlcRtm','nmorcW','fetdSWK','ubBcOgpcJa','W4ra5AAQ6lAx776x','WQxdSbqF','W4zJWPldMmoO','EYBcHsrhWPhcQb9kW6JcGvOWmWegW7FcRL4Bnq','EcLFpGBcN8ocjW','WRVcMmotta','rWuhW6tcImkUASkPC0u','CSoyWOObWR/dMsdcTSojWRVdUSk2WRBdIW','EfuUnCoQ','k8oFpq','CMJdVLzPuXtdVvJdLc9Me3eE','mmkkuW','rIhdRK7cSXf/BW','jmoRW5i','WQ/ORjpMSQRLP6VOTiRcPEkDOvNMLi3LKixLU7ZMLR/MJzu','vXRcUMxcLHydWOJcQq','oSkvW4NdSq','wtZdIf/cQX9Tm8kZrbpdTcTmW7ZdGctcRKioAcWt','5y+I5OY1546q','W7C+mSooWPpdLgK','iSkyW7PwW73cGKFcJ8o+WQRdTCkhWQa','eCkqDGXa','r8oGW7CmsG','WRpcLSoa','57Qb5AYo5OMH5P655y+Z','WPbvW6VcU8okWQ1aWQNdVapdKCoJ','4P+eWRhMJRdNJ47MIOVLIjC','vfS5dCoUWRhdKSoj','W6m3WOBdNSka','tb/cSJft','W4ZdVmo5WPHvW6OxW7e8ESkfW44','nSk9c8oJW5y','W7/cLSkbWQbkW4lcJXBcMmk4iCkR','4PYuWP7MNyBNNixORBFMSRVcTG','vGK6W6TVs8oE','W7aqC8kAWOy4dKK7o8k/dfH8sq3dSCkTDCk3lq','h1zSrSkz','W7qwiCoAbq','zWDbWP/cNSodWOZcPxZdUrldKmkeWRJdJq','u8kJWQ4','CGiEW6BcVW','wHWGW67cMW','lWpLP73OTzVVV4G','WPu0C0hcQq','j8oqzmo1xglcNxjoW6xdKmk9A1dcVYRcMSoYCKbkga','WR7dLSoAW6WzWRZdIYdcGSksaCkaEa','yCohWPdcONSopXJdPN5tW5e','lKzFv8kjW54C','WQ4wErNcIa','vaumW60','kSodpq','lmkrDbD3','FuBcOHNcPSkg','WOSAst/cLCkGfLPPW73dOCoKW6X6CWZcGmkMW4m','W70sha','WRVdMSoGWR8e','s8klW44nWOe','WRpdH8ow','WQ/cU8kPW54UWRKqW5e','kSoPW7eHW60','WQZdOGC','WODs5QYa','WQRdVmovWRym','WR7dLmoFW68FWRBcIJFcOCklhmkI','iUIUPUAYUEwqR+w5T8k6','WOKtW7xdSmoJ','zX9qoIm','WP9RWRuXWRjuW4BdHwvFCJStW5e','W7RcRvBcLg4','jmoRW5iVW5JcUG','BCknwmowWRddISo4qMtdMZtcUa','5ywN5A+etdSD55M/6kYf5yYb','FmkMW6m5WOdcICoAWOVcMLy','F8ohWQ4','p2HjjHRcL8ouE3XHWPRdSCoxqaCv','W4eVCSkR','W49pWOC','mConm8k0','ESkKWR/dUgi','CKZcQbS','4PYHtUwgMEAnRUE5MUwnToAjUUwjSq','pSkqW7VdRJfvmXldL3nVW53cMmk1vmokWRlcP8oB','tq47W4G','bCkAW7NdU8kM','lCkeiSo0W4O','xSoBWOOvWOu','4P6tWOJMJAhNJydLPB7OTiNVViZKUidKUiBNRPBMJltNJ6ROVyNMN7pLRQxMIk4','44k35OYs56sz44gX6k685ys66iYu5y2Bu0TeWRjDW4W'];}())];}())];}());Iii11l=function(){return iiilii;};return Iii11l();};async function sendRequest(lllii){const iIiIl=iIiIi,iI11Ii={'pahPP':iIiIl(0x11f,'7PI!'),'EtcKQ':iIiIl(0x113,'jjC('),'akYkW':iIiIl(0x124,'z#g['),'WgsIK':'4.7','Ehvnu':'https://api.m.jd.com/api','TYISW':iIiIl(0x197,'sSZf'),'nmTTm':iIiIl(0xfd,'jGL*'),'WehaD':'ios','oODgQ':iIiIl(0xc3,'%bPf'),'YgAVx':'8c6ae','gGGMB':'application/json,\x20text/plain,\x20*/*','EnVcn':iIiIl(0x87,'x]*g'),'CNfSs':iIiIl(0x172,'z#g['),'BRZPz':iIiIl(0x126,'C$N@'),'mIcoX':'XMLHttpRequest','gkgWf':'https://pro.m.jd.com/mall/active/3BwUqhLsJYrHP4qgAgDDJGrSVngK/index.html','kBowG':iIiIl(0x82,'oV!Y'),'lOvfv':'h5_1.0.0','BgtSJ':function(illlIl,i11ill){return illlIl===i11ill;},'Wgffd':'GET','Qpusl':function(IIIIIi,IIIIIl){return IIIIIi!==IIIIIl;},'UNkES':'TrmZz','HmwHI':'Content-Type','PWAOG':'IAQnX','MUATs':iIiIl(0x1bd,'^3(P'),'mQqSQ':iIiIl(0x10a,'sSZf'),'ajbGa':function(I1lIil,IIIl1i,liiII1){return I1lIil(IIIl1i,liiII1);},'YRKwE':function(IIIl1l,lllll){return IIIl1l!==lllll;},'VIepw':'BkhEu','uTdFC':'GrYke'};if($[iIiIl(0x8a,'oV!Y')])return;let iIII1l='',lllil=null,iI11Il=null,iIII1i=iI11Ii['EtcKQ'],iil1i1={},il1i11={};switch(lllii){case iI11Ii['akYkW']:il1i11={'appId':'f2b1d','functionId':iI11Ii['akYkW'],'appid':iIiIl(0x149,'c9ce'),'clientVersion':common[iIiIl(0x152,'okN1')](),'client':iIiIl(0xd3,')SQo'),'body':{'pageNum':$['pageNum'],'pageSize':0x3e8,'linkId':linkId,'business':business},'version':iI11Ii[iIiIl(0x1a4,'6EQO')],'ua':$['UA'],'t':!![]},iil1i1=await H5st['getH5st'](il1i11),iIII1l=iI11Ii['Ehvnu'],lllil=iil1i1['paramsData'];break;case iI11Ii['TYISW']:il1i11={'appId':'73bca','functionId':iI11Ii[iIiIl(0x198,'@@n$')],'appid':iI11Ii[iIiIl(0x120,'5pTE')],'clientVersion':common[iIiIl(0x152,'okN1')](),'client':iI11Ii['WehaD'],'body':{'linkId':linkId,'businessSource':iI11Ii['oODgQ'],'base':$['apCashWithDrawBaseParams']},'version':iIiIl(0x17e,'oV!Y'),'ua':$['UA'],'t':!![]},iil1i1=await H5st['getH5st'](il1i11),iIII1l=iI11Ii[iIiIl(0x116,'Ewsz')],lllil=iil1i1['paramsData'];break;case iIiIl(0xeb,'jjC('):il1i11={'appId':iI11Ii[iIiIl(0x85,'Iz&[')],'functionId':iIiIl(0x186,'txp@'),'appid':iI11Ii[iIiIl(0xb6,'1i#O')],'clientVersion':common['getLatestAppVersion'](),'client':iI11Ii[iIiIl(0xbe,'1n!n')],'body':$[iIiIl(0xc4,'a]4]')],'version':iI11Ii[iIiIl(0x17a,'R9Sx')],'ua':$['UA'],'t':!![]},iil1i1=await H5st['getH5st'](il1i11),iIII1l=iI11Ii[iIiIl(0xf0,'txp@')],lllil=iil1i1[iIiIl(0x9c,')4XM')];break;default:console[iIiIl(0x144,'G0P^')](iIiIl(0xe9,'1i#O')+lllii);return;}const IlIll1={};lllil&&Object[iIiIl(0x14c,'re#m')](lllil,IlIll1);iI11Il&&Object[iIiIl(0x1c2,'Iz&[')](iI11Il,IlIll1);const IlIII={'url':iIII1l,'method':iIII1i,'headers':{'Accept':iI11Ii[iIiIl(0x131,'@@n$')],'Accept-Encoding':iI11Ii[iIiIl(0x18e,'M0yN')],'Accept-Language':iI11Ii[iIiIl(0x19a,'3vJo')],'Content-Type':iI11Ii[iIiIl(0xe4,'[7Um')],'Cookie':cookie,'X-Requested-With':iI11Ii[iIiIl(0x84,'zK&7')],'Referer':iI11Ii['gkgWf'],'Origin':iI11Ii['kBowG'],'x-rp-client':iI11Ii[iIiIl(0x19b,'ct5L')],'User-Agent':$['UA']},'params':iI11Il,'data':lllil,'timeout':0x3a98,'httpsTlsOptions':[iI11Ii[iIiIl(0x1b0,'XFHJ')]][iIiIl(0x1a1,'Iz&[')](lllii)?common['useAppTls']():null};iI11Ii[iIiIl(0xd0,'pG8q')](iIII1i,iI11Ii[iIiIl(0x171,'c9ce')])&&(iI11Ii[iIiIl(0x199,'%bPf')](iIiIl(0x194,'#(Ay'),iI11Ii[iIiIl(0x163,'sSZf')])?(delete IlIII['data'],delete IlIII[iIiIl(0xaf,'x]*g')][iI11Ii['HmwHI']]):i1l11['log']('>\x20'+i1l1li[iIiIl(0x104,'G0P^')]));!iI11Il&&delete IlIII[iIiIl(0x173,'oV!Y')];const ilil1l=0x1;let illlIi=0x0,I1lIii=null,IiI1I=![];while(illlIi<ilil1l){illlIi>0x0&&(iIiIl(0xa4,'pG8q')!==iI11Ii[iIiIl(0x121,'4q[@')]?(lilIl1[iIiIl(0x8d,'Ewsz')](i1l1ii[iIiIl(0x147,'oV!Y')],iI11Ii['pahPP']),i1l1[iIiIl(0x192,'6EQO')](0x1)):await $[iIiIl(0x1bc,'A#&K')](0x3e8));const iil1l1=await common[iIiIl(0xf7,'%bPf')](IlIII);if(!iil1l1[iIiIl(0xa9,'ct5L')]){I1lIii=iIiIl(0x7e,'#(Ay')+lllii+iIiIl(0x1ba,'%bPf')+iil1l1[iIiIl(0x127,'zK&7')],illlIi++;continue;}if(!iil1l1?.[iIiIl(0x125,'y&ef')]){if(iI11Ii['MUATs']===iI11Ii['mQqSQ'])Iliil1[iIiIl(0xd5,'8!4%')](iIiIl(0xa1,'1i#O')),i1III[iIiIl(0xc7,'C$N@')]=!![];else{I1lIii=iIiIl(0xbc,'a]4]')+lllii+iIiIl(0xd6,'zK&7'),illlIi++;continue;}}iI11Ii[iIiIl(0x10c,'oV!Y')](handleResponse,lllii,iil1l1['data']),IiI1I=![];break;}illlIi>=ilil1l&&(iI11Ii[iIiIl(0x1b1,'Ewsz')](iIiIl(0x13d,'1n!n'),iI11Ii[iIiIl(0xe5,'#(Ay')])?(console[iIiIl(0x13f,'Knpy')](I1lIii),IiI1I&&(iI11Ii[iIiIl(0xbd,'okN1')](iIiIl(0x109,'^3(P'),iI11Ii[iIiIl(0x106,'tx$D')])?($[iIiIl(0xea,'M0yN')]=!![],$['message']&&$[iIiIl(0x16f,'C$N@')][iIiIl(0x180,'A#&K')](I1lIii)):IlI1iI[iIiIl(0x92,'y&ef')][iIiIl(0x135,'oV!Y')](Iillil))):II11Il[iIiIl(0x13f,'Knpy')]('✅\x20提现成功'));}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) }