forked from WLZJ/KR
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jd_drawShopGift.js
20 lines (15 loc) · 36.9 KB
/
jd_drawShopGift.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
活动名称:店铺关注有礼
环境变量:jd_drawShopGift_argv // 活动参数,格式:”<shopId(店铺id)>_<venderId(店主id)>“
jd_drawShopGift_Notify // 是否推送通知(true/false),默认不推送
注:运行频繁会403限制IP
cron:1 1 1 1 *
============Quantumultx===============
[task_local]
#店铺关注有礼
1 1 1 1 * jd_daily.js, tag=店铺关注有礼, enabled=true
*/
const $ = new Env('店铺关注有礼')
var version_='jsjiami.com.v7';const l11Il1ll=Ilii111I;(function(liiiiIi,i1IlIilI,ili1llI,i1iI1iI1,iiiIl1II,l1lilIII,ill1IIi){return liiiiIi=liiiiIi>>0x7,l1lilIII='hs',ill1IIi='hs',function(I1ilili,I11iIIIi,I1i1IlIi,IIIl1iII,Il11IllI){const lIIII=Ilii111I;IIIl1iII='tfi',l1lilIII=IIIl1iII+l1lilIII,Il11IllI='up',ill1IIi+=Il11IllI,l1lilIII=I1i1IlIi(l1lilIII),ill1IIi=I1i1IlIi(ill1IIi),I1i1IlIi=0x0;const I1Iii1l=I1ilili();while(!![]&&--i1iI1iI1+I11iIIIi){try{IIIl1iII=parseInt(lIIII(0x234,'F*N5'))/0x1*(parseInt(lIIII(0x241,'uFH9'))/0x2)+parseInt(lIIII(0x147,'krr1'))/0x3+-parseInt(lIIII(0x1c7,'b[lV'))/0x4+-parseInt(lIIII(0x188,'6Q7T'))/0x5+-parseInt(lIIII(0x13c,'wnJM'))/0x6*(parseInt(lIIII(0x259,'W7*x'))/0x7)+parseInt(lIIII(0x22c,')q^i'))/0x8*(parseInt(lIIII(0x159,'JnY0'))/0x9)+parseInt(lIIII(0x13f,'&#nq'))/0xa;}catch(iI1i1Ill){IIIl1iII=I1i1IlIi;}finally{Il11IllI=I1Iii1l[l1lilIII]();if(liiiiIi<=i1iI1iI1)I1i1IlIi?iiiIl1II?IIIl1iII=Il11IllI:iiiIl1II=Il11IllI:I1i1IlIi=Il11IllI;else{if(I1i1IlIi==iiiIl1II['replace'](/[eSpRIMyOVbQLCPkxTAgqw=]/g,'')){if(IIIl1iII===I11iIIIi){I1Iii1l['un'+l1lilIII](Il11IllI);break;}I1Iii1l[ill1IIi](Il11IllI);}}}}}(ili1llI,i1IlIilI,function(i1llIi1,l1iiI1II,l1Ii11lI,l11li1i,llIIiIII,Iillilli,IillI1II){return l1iiI1II='\x73\x70\x6c\x69\x74',i1llIi1=arguments[0x0],i1llIi1=i1llIi1[l1iiI1II](''),l1Ii11lI=`\x72\x65\x76\x65\x72\x73\x65`,i1llIi1=i1llIi1[l1Ii11lI]('\x76'),l11li1i=`\x6a\x6f\x69\x6e`,(0x13b9ac,i1llIi1[l11li1i](''));});}(0x6200,0xd5ad6,ili11lli,0xc6),ili11lli)&&(version_=ili11lli);const I11Il=require('./jdCookie'),iIIIiIil=require(l11Il1ll(0x264,'lBWw')),ilIllIli=require(l11Il1ll(0x214,'2Jii')),iilliliI=require(l11Il1ll(0x24d,'k(c9')),I1ll11Il=process[l11Il1ll(0x14e,'C3^V')][l11Il1ll(0x1b0,'%zRm')]||'',i1iliI1=process[l11Il1ll(0x14e,'C3^V')][l11Il1ll(0x16f,'0W&l')]===l11Il1ll(0x158,'[fA!'),ili1111l=process['env']['JD_SIGN_KRAPI']||'';let llIl1I='';const llI1iiIl=Object[l11Il1ll(0x190,'2lSV')](I11Il)[l11Il1ll(0x177,'[fA!')](IIllIIli=>I11Il[IIllIIli])[l11Il1ll(0x24c,'6Q7T')](ii1IlII=>ii1IlII);!llI1iiIl[0x0]&&($[l11Il1ll(0x20f,'hL1a')]($['name'],'【提示】请先获取Cookie'),process[l11Il1ll(0x24e,'haVW')](0x1));!(async()=>{const I1ii1Il=l11Il1ll,I1l1I1li={'aUSWA':I1ii1Il(0x253,'puhf'),'wtEMJ':'⚠\x20请填写格式正确的环境变量','oLAQx':I1ii1Il(0x164,'L@vE'),'qBWEz':function(i1IIli1i,i1iiII){return i1IIli1i(i1iiII);},'vCToA':'pt_pin','lvhUt':function(lIiIlilI){return lIiIlilI();},'brRVs':function(Ilii1lil,iil1lIlI){return Ilii1lil===iil1lIlI;},'KOLFR':function(illII1ii,IlIll){return illII1ii+IlIll;}};if(!I1ll11Il){console['log'](I1ii1Il(0x1f2,'&#nq'));return;}try{const iIl1iIi1=I1ll11Il[I1ii1Il(0x216,'P$oK')]('_');$['shopId']=iIl1iIi1[0x0],$[I1ii1Il(0x193,'DxR2')]=iIl1iIi1[0x1];}catch{console['log'](I1l1I1li['wtEMJ']);return;}finally{if(!$['shopId']||!$['venderId']){if('Efoim'===I1l1I1li[I1ii1Il(0x23c,'GgN9')]){console['log'](I1l1I1li[I1ii1Il(0x223,'krr1')]);return;}else{l1iIll1i[I1ii1Il(0x166,'krr1')]('京东没有返回数据!'),i1ilI11i[I1ii1Il(0x1db,'wZWI')][I1ii1Il(0x138,'2lSV')](I1l1I1li[I1ii1Il(0x1d8,'XKlN')]);return;}}}iIIIiIil[I1ii1Il(0x251,'wnJM')]({'title':$[I1ii1Il(0x18a,'JnY0')]}),console[I1ii1Il(0x1f5,'[fA!')]('店铺地址:https://shop.m.jd.com/?shopId='+$[I1ii1Il(0x1b1,'iy6#')]+I1ii1Il(0x1c5,'SsRi')+$[I1ii1Il(0x209,'krr1')]);for(let lil1I1lI=0x0;lil1I1lI<llI1iiIl[I1ii1Il(0x231,'%zRm')];lil1I1lI++){$[I1ii1Il(0x1c8,'6Q7T')]=lil1I1lI+0x1,llIl1I=llI1iiIl[lil1I1lI],$[I1ii1Il(0x248,')q^i')]=I1l1I1li[I1ii1Il(0x179,'L]z&')](decodeURIComponent,ilIllIli['getCookieValue'](llIl1I,I1l1I1li[I1ii1Il(0x262,'GgN9')])),$['UA']=ilIllIli[I1ii1Il(0x23d,'%zRm')]($['UserName']),$['message']=iIIIiIil[I1ii1Il(0x150,'XKlN')]($['index'],$['UserName']),$[I1ii1Il(0x1d0,'haVW')]='',console[I1ii1Il(0x153,'2Y2b')]('\x0a******开始【京东账号'+$[I1ii1Il(0x1df,'$*]2')]+'】'+($['nickName']||$[I1ii1Il(0x257,'U]Ly')])+I1ii1Il(0x217,'SsRi')),await I1l1I1li['lvhUt'](iIIlili1);if($[I1ii1Il(0x1e1,'1KXR')])break;await $[I1ii1Il(0x1b5,'&#nq')](0x3e8);}if(i1iliI1&&iIIIiIil['getMessage']()){if(I1l1I1li[I1ii1Il(0x17e,'wnJM')]('vObHT','KcnYv')){il1IlIII['log'](I1l1I1li[I1ii1Il(0x201,'F*N5')]);return;}else iIIIiIil['updateContent'](I1l1I1li[I1ii1Il(0x1bc,'fjS5')](iIIIiIil[I1ii1Il(0x199,'P$oK')],I1ii1Il(0x1a5,'6Q7T')+$[I1ii1Il(0x15a,'$*]2')]+I1ii1Il(0x146,'tNo6')+$[I1ii1Il(0x209,'krr1')])),await iIIIiIil[I1ii1Il(0x219,'U]Ly')]();}})()[l11Il1ll(0x194,'XKlN')](l11iIl1=>$[l11Il1ll(0x1ec,'hL1a')](l11iIl1))['finally'](()=>$['done']());async function iIIlili1(){const Iil11ll=l11Il1ll,illIIlil={'bNkRN':Iil11ll(0x233,'U]Ly'),'kKKrZ':'❌\x20账号无效','mFNRs':function(IIilIIIl,ili1liII){return IIilIIIl===ili1liII;},'GThsq':Iil11ll(0x140,'iy6#'),'yZfev':function(lllIl1i1,l1iiiIii){return lllIl1i1+l1iiiIii;},'DHTAQ':Iil11ll(0x237,'2Y2b'),'TqRfG':function(IiIill){return IiIill();},'WQWIX':function(liliIIll,iIi1I111){return liliIIll!==iIi1I111;},'uWfOO':Iil11ll(0x1aa,'haVW'),'ChiSg':Iil11ll(0x22a,'$*]2'),'UCRnJ':Iil11ll(0x1a7,'uFH9'),'VxWOw':Iil11ll(0x1de,'kFvl'),'ReWUZ':Iil11ll(0x17f,'k(c9'),'bByRo':Iil11ll(0x1e3,'0W&l'),'bBARd':function(iiiiII1l,I1liI1){return iiiiII1l===I1liI1;},'bqWyx':Iil11ll(0x240,'Lje6'),'TwCau':function(lll11I1,i1I111ll,i11IIIlI){return lll11I1(i1I111ll,i11IIIlI);},'IasoP':function(llil1Iii,i1lll1Il){return llil1Iii(i1lll1Il);},'YcFnQ':function(Iii1Ilii,lI1lilI1){return Iii1Ilii<=lI1lilI1;},'KFNjk':function(iIIiiii1,l11II1){return iIIiiii1-l11II1;},'mYYfA':function(i1lIIlli,I1IIIlii){return i1lIIlli!==I1IIIlii;},'fzSrD':'FDhvp','VVlbJ':'402','vlktI':Iil11ll(0x13b,'LZZ2'),'LFtYo':Iil11ll(0x15f,')q^i'),'YJpYG':Iil11ll(0x187,'[fA!'),'gdabK':'ZbWHj'};$[Iil11ll(0x238,'W7*x')]=![],await illIIlil[Iil11ll(0x1af,'o[u3')](I11lI1II);if($['skipRun'])return;try{if(illIIlil[Iil11ll(0x15b,'Lje6')](illIIlil[Iil11ll(0x19f,')*ys')],illIIlil[Iil11ll(0x249,'v8fV')]))l1iiIIII[Iil11ll(0x1d3,'o[u3')]=l1li1I1l;else{const iII1lIIl=await illIIlil['TqRfG'](l11I11i);if(!iII1lIIl){console['log'](Iil11ll(0x156,'9r^%')),$[Iil11ll(0x1c3,')q^i')][Iil11ll(0x168,'wnJM')](illIIlil[Iil11ll(0x25f,'6Q7T')]);return;}const il1I1il1=iII1lIIl?.[Iil11ll(0x1c4,'fjS5')]?.[Iil11ll(0x1e4,'k(c9')];if(il1I1il1)illIIlil[Iil11ll(0x137,'haVW')](illIIlil['UCRnJ'],illIIlil[Iil11ll(0x17a,'&#nq')])?$[Iil11ll(0x148,'wZWI')]=il1I1il1:(i1ll1il1[Iil11ll(0x1cd,'2Jii')](li11llII[Iil11ll(0x22e,'L]z&')],illIIlil[Iil11ll(0x175,'%zRm')]),lII11ll[Iil11ll(0x1ea,'U]Ly')](0x1));else{console[Iil11ll(0x255,'iy6#')](Iil11ll(0x1e9,'SsRi')),$[Iil11ll(0x1b8,')*ys')][Iil11ll(0x1cb,')q^i')](illIIlil[Iil11ll(0x210,')q^i')]);return;}if(iII1lIIl[Iil11ll(0x204,'uFH9')]['followed']){if(illIIlil[Iil11ll(0x163,'XKlN')]('rkMlD',Iil11ll(0x173,'&#nq'))){console[Iil11ll(0x192,'1^&n')](illIIlil['bByRo']);const iI11li=await illIIlil['TqRfG'](IlI11I1I);if(illIIlil['bBARd'](iI11li[Iil11ll(0x1d6,'aW@G')],illIIlil[Iil11ll(0x20d,'v8fV')]))console[Iil11ll(0x160,')q^i')](iI11li[Iil11ll(0x14d,'&#nq')]);else{if('IEpAi'!==Iil11ll(0x1a9,'v8fV'))console[Iil11ll(0x21f,'haVW')](JSON[Iil11ll(0x1e5,'v8fV')](iI11li));else try{iI1i1l=i1iIilll[Iil11ll(0x239,'krr1')](li1Ilii),I11ill1[Iil11ll(0x198,'L@vE')]==='0'&&(lil1IiIl[Iil11ll(0x1f5,'[fA!')](illIIlil[Iil11ll(0x15c,'hL1a')]),llii111I['message'][Iil11ll(0x168,'wnJM')]('账号无效'),lii1IlI1[Iil11ll(0x13a,'GgN9')]=!![]);}catch{ilIlII1I[Iil11ll(0x1c0,'lBWw')](Iil11ll(0x16c,'hL1a')),lI1l1IiI[Iil11ll(0x18e,'1^&n')]=!![];}}}else iiIIiliI=i1lIlli1['parse'](IlIIllI1),illIIlil[Iil11ll(0x20c,'1KXR')](lill1iII['islogin'],'0')&&(IilllIl1[Iil11ll(0x15d,'tNo6')](Iil11ll(0x20b,'U]Ly')),ilil1iIl[Iil11ll(0x1e6,'C3^V')]['fix'](illIIlil['GThsq']),l1lilIll[Iil11ll(0x22b,'L]z&')]=!![]);}const iI1I1iiI=illIIlil[Iil11ll(0x18b,'b[lV')](il1liIli,iII1lIIl,il1I1il1),lliIlIIi=await illIIlil[Iil11ll(0x1a0,'RY[V')](iiIl1IiI,iI1I1iiI);if(lliIlIIi['result'][Iil11ll(0x174,'alU%')]===illIIlil['bqWyx']){const I1iilIl=lliIlIIi[Iil11ll(0x208,'1KXR')]['giftDesc'];switch(lliIlIIi['result'][Iil11ll(0x1ac,')*ys')]){case Iil11ll(0x180,'lBWw'):const illi1ilI=JSON[Iil11ll(0x19b,'&#nq')](JSON[Iil11ll(0x24f,'aW@G')](lliIlIIi[Iil11ll(0x1e7,'b[lV')][Iil11ll(0x178,'krr1')]));for(let lIIillll=0x0;illIIlil['YcFnQ'](lIIillll,illIIlil['KFNjk'](illi1ilI[Iil11ll(0x195,'2Jii')],0x1));lIIillll++){if(illIIlil[Iil11ll(0x236,'tNo6')](illIIlil[Iil11ll(0x23f,'alU%')],illIIlil['fzSrD'])){iIilllii['log']('⚠\x20请填写格式正确的环境变量');return;}else{const IlII1Iii=illIIlil[Iil11ll(0x17c,')*ys')](illi1ilI[lIIillll]['redWord'],illi1ilI[lIIillll][Iil11ll(0x1f4,'LZZ2')]);console[Iil11ll(0x246,'D(zI')](Iil11ll(0x141,'XKlN')+IlII1Iii),$[Iil11ll(0x1c2,'uFH9')]['insert'](IlII1Iii);}}break;case illIIlil[Iil11ll(0x1ff,'aW@G')]:console['log'](I1iilIl);for(let llII1I1l of['抢完']){if(illIIlil[Iil11ll(0x25e,'[fA!')]===illIIlil[Iil11ll(0x1f8,'wZWI')]){if(I1iilIl[Iil11ll(0x176,'haVW')](llII1I1l)){$[Iil11ll(0x186,'JnY0')]=!![],$[Iil11ll(0x222,'&#nq')][Iil11ll(0x229,'o[u3')](I1iilIl);break;}}else{const iilll=illIIlil[Iil11ll(0x1cf,'tNo6')](IiII1l11[iIllIi11][Iil11ll(0x1ae,'9r^%')],iliiIi1I[lillliI1]['rearWord']);I1IIil1[Iil11ll(0x153,'2Y2b')]('🎉\x20'+iilll),iili1ill[Iil11ll(0x155,'[fA!')][Iil11ll(0x260,'2Y2b')](iilll);}}break;default:console[Iil11ll(0x220,'&#nq')](lliIlIIi),$[Iil11ll(0x261,'alU%')][Iil11ll(0x171,'W7*x')](illIIlil[Iil11ll(0x16b,'XKlN')]);break;}}else illIIlil['bBARd'](lliIlIIi[Iil11ll(0x1f6,'[fA!')][Iil11ll(0x228,'DxR2')],illIIlil[Iil11ll(0x226,'o[u3')])?illIIlil[Iil11ll(0x21d,'aW@G')](illIIlil[Iil11ll(0x1a4,'%zRm')],illIIlil[Iil11ll(0x21c,'krr1')])?(console[Iil11ll(0x246,'D(zI')](lliIlIIi[Iil11ll(0x227,'SsRi')][Iil11ll(0x1a8,'k(c9')]),$['message'][Iil11ll(0x143,'D(zI')](lliIlIIi[Iil11ll(0x1fd,'haVW')][Iil11ll(0x250,'o[u3')])):l1Iii1ii={'giftType':illIIlil[Iil11ll(0x191,'%zRm')],'follow':0x0,'shopId':iIl1I1i[Iil11ll(0x19a,'W7*x')],'activityId':l1iiIl,'sourceRpc':Iil11ll(0x20e,'b[lV'),'venderId':i1ilil[Iil11ll(0x263,'LZZ2')]}:(console['log'](JSON[Iil11ll(0x24b,'0W&l')](lliIlIIi)),$[Iil11ll(0x25b,'kFvl')][Iil11ll(0x1bd,'fjS5')](Iil11ll(0x1ce,'P$oK')));}}catch(i1I1il1){console[Iil11ll(0x19e,'fjS5')](i1I1il1);}}async function l11I11i(){const lIiIlIi=l11Il1ll,li1Il1ll={'mRyFs':function(il1Illi1,ii1iiIl1){return il1Illi1+ii1iiIl1;},'EhmTb':function(IIl1il11,i1iI1i1){return IIl1il11+i1iI1i1;},'QTyJt':lIiIlIi(0x225,'LZZ2'),'pZvCD':function(lIiiiilI,ii1I1li){return lIiiiilI*ii1I1li;},'TlqTj':function(I1li1II,li1llii1){return I1li1II-li1llii1;},'RRbyj':lIiIlIi(0x182,'2Y2b'),'IjLBt':function(lliIiilI,liIl1I11,IIlIlIiI){return lliIiilI(liIl1I11,IIlIlIiI);},'GRMkU':lIiIlIi(0x207,'VE7U'),'SqFfU':'shop_app_home_home'},I1I11liI=li1Il1ll['mRyFs'](li1Il1ll[lIiIlIi(0x1a2,'DxR2')](li1Il1ll[lIiIlIi(0x14a,'2Y2b')],Math[lIiIlIi(0x1a6,'ckh9')](li1Il1ll[lIiIlIi(0x136,'ckh9')](Math[lIiIlIi(0x25d,'puhf')](),li1Il1ll[lIiIlIi(0x1ca,'LZZ2')](0x2710,0x1869f)))),0x1869f),IlIil11l=li1Il1ll[lIiIlIi(0x151,'C3^V')](li1Il1ll[lIiIlIi(0x149,'aW@G')]+Math[lIiIlIi(0x202,'$*]2')](li1Il1ll[lIiIlIi(0x23e,'9r^%')](Math[lIiIlIi(0x196,'alU%')](),li1Il1ll[lIiIlIi(0x1d1,'Lje6')](0x2710,0x1869f))),0x1869f),I1iIIlI1=await li1Il1ll[lIiIlIi(0x1da,'GgN9')](Iii1ll1l,lIiIlIi(0x212,'VE7U'),{'shopId':$['shopId'],'source':li1Il1ll['GRMkU'],'latWs':I1I11liI,'lngWs':IlIil11l,'displayWidth':'1170.000000','sourceRpc':li1Il1ll[lIiIlIi(0x235,'$*]2')],'lng':IlIil11l,'lat':I1I11liI,'venderId':$[lIiIlIi(0x15e,'k(c9')]});return I1iIIlI1;}function Ilii111I(_0x2d3656,_0x3c5461){const _0x46651b=ili11lli();return Ilii111I=function(_0x1656af,_0x1edc28){_0x1656af=_0x1656af-0x133;let _0x3f439d=_0x46651b[_0x1656af];if(Ilii111I['dWGhXc']===undefined){var _0x34e7aa=function(_0x2d83aa){const _0x247383='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x12872b='',_0x25f30f='';for(let _0x3c253a=0x0,_0x250aae,_0x3304e2,_0x34af06=0x0;_0x3304e2=_0x2d83aa['charAt'](_0x34af06++);~_0x3304e2&&(_0x250aae=_0x3c253a%0x4?_0x250aae*0x40+_0x3304e2:_0x3304e2,_0x3c253a++%0x4)?_0x12872b+=String['fromCharCode'](0xff&_0x250aae>>(-0x2*_0x3c253a&0x6)):0x0){_0x3304e2=_0x247383['indexOf'](_0x3304e2);}for(let _0x4e854d=0x0,_0x567882=_0x12872b['length'];_0x4e854d<_0x567882;_0x4e854d++){_0x25f30f+='%'+('00'+_0x12872b['charCodeAt'](_0x4e854d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x25f30f);};const _0x37a037=function(_0x8ee86f,_0xb6842d){let _0x51113e=[],_0x12d0a0=0x0,_0x439d0c,_0x5bfc50='';_0x8ee86f=_0x34e7aa(_0x8ee86f);let _0x14b54f;for(_0x14b54f=0x0;_0x14b54f<0x100;_0x14b54f++){_0x51113e[_0x14b54f]=_0x14b54f;}for(_0x14b54f=0x0;_0x14b54f<0x100;_0x14b54f++){_0x12d0a0=(_0x12d0a0+_0x51113e[_0x14b54f]+_0xb6842d['charCodeAt'](_0x14b54f%_0xb6842d['length']))%0x100,_0x439d0c=_0x51113e[_0x14b54f],_0x51113e[_0x14b54f]=_0x51113e[_0x12d0a0],_0x51113e[_0x12d0a0]=_0x439d0c;}_0x14b54f=0x0,_0x12d0a0=0x0;for(let _0x191ee6=0x0;_0x191ee6<_0x8ee86f['length'];_0x191ee6++){_0x14b54f=(_0x14b54f+0x1)%0x100,_0x12d0a0=(_0x12d0a0+_0x51113e[_0x14b54f])%0x100,_0x439d0c=_0x51113e[_0x14b54f],_0x51113e[_0x14b54f]=_0x51113e[_0x12d0a0],_0x51113e[_0x12d0a0]=_0x439d0c,_0x5bfc50+=String['fromCharCode'](_0x8ee86f['charCodeAt'](_0x191ee6)^_0x51113e[(_0x51113e[_0x14b54f]+_0x51113e[_0x12d0a0])%0x100]);}return _0x5bfc50;};Ilii111I['vWvXpd']=_0x37a037,_0x2d3656=arguments,Ilii111I['dWGhXc']=!![];}const _0x2863be=_0x46651b[0x0],_0x1ea805=_0x1656af+_0x2863be,_0x52ffe4=_0x2d3656[_0x1ea805];return!_0x52ffe4?(Ilii111I['xEHgFf']===undefined&&(Ilii111I['xEHgFf']=!![]),_0x3f439d=Ilii111I['vWvXpd'](_0x3f439d,_0x1edc28),_0x2d3656[_0x1ea805]=_0x3f439d):_0x3f439d=_0x52ffe4,_0x3f439d;},Ilii111I(_0x2d3656,_0x3c5461);}async function IlI11I1I(){const l11il=l11Il1ll,I1111l={'GAmOp':function(IlII1l11,liiii1I,Il1lili1){return IlII1l11(liiii1I,Il1lili1);},'dRRvg':l11il(0x1c1,'krr1'),'jsUDa':l11il(0x22d,'0W&l'),'QctUA':l11il(0x213,'wnJM')},liIIIi1l=await I1111l[l11il(0x135,'%zRm')](Iii1ll1l,I1111l[l11il(0x1d7,'puhf')],{'follow':I1111l['jsUDa'],'shopId':$['shopId'],'award':I1111l[l11il(0x1a1,'0W&l')],'sourceRpc':I1111l[l11il(0x16a,'krr1')]});return liIIIi1l;}function ili11lli(){const li11i1I=(function(){return[...[version_,'bLjTskjiSSIaqmVOiwy.SpcbCoQxmPp.RgvOA7eM==','p0VdNbFdPW','W6JcOmk8','htBcUa','W6T9AfBdOq','W5Sfbmoub8kw','oSo1hqXjWRlcP153WPq','W5TzA2RdLmkD','5lM/5lIf5RkK5PYF6l695zQE5PEn5O+5qW','WRhdPmo/W6DoW5VcQq','W7hcNwO8r8kLW7pcSWu','oJdcLCkjW60','WQZdRSo7W7i','WRldRSoKW6r5','tujP','g0zTt0FdUq','pSo/WPtcOSoNWQhcSmkRaCkjW7NcUKy','44gK5OYs56Ar44cf6kYN5yEd6iYA5y6UdSknW5dcJSk/DG','W4HxW5tcIgNdMmk2W4pcTKGq','WObOq3a8','W6XOW4X5BG','wmoUW7i','W5f8dmoHWQfArG','of7dQYNdIa','wWKKjaNdNG','WRPhW5TzW5O','WRCVftpdOq','eezTFxi','rZW1iJ8','WQ/dO8oqW50Y','WQGMWOGMWP0d','aCk3W4xdOCoNW4iN','WQ0GWPFcNrz1','vCkVW5S','W5zGW4fFW4Danq','cdFcG8kyW7G','WQ/dNmkF','imovWP8Xda','WPddNJ8/FmkmW5dcOW','vhPOW4JdQW','fhK+WRO','lYxcI8ktW6ytW4qWW5i','fNeMWQ8Viq','WOmoW43dNCoaW7WGn8o6W5nJW5pcT8k8tx3cS8oobuq','zmolode','h8kDWQzKmSk0rsLy','W5ryDgpdICkEACobvh4','Bmk+WOmcW4FcNG','W67dICogWQHqAG','5lIU5lQ65Rca5P+K6l+25zUg5PEv5O6ega','WR56W71GW4a','WRddN3y','W6FcGxGSuCkzW5tcSatcK8odjSk5W4n+W6m','iCkXW45MWP7dQSoahq','p8o0WPyOk2i','WPaUuCkMWRHHzqZcImkB','4P6qWPdOTlFLJAtML7dMLka','hmkyaw5VW4u3','WRhdPSoXW7LpW5RcTq','W7ddH8opWOLnDq','WRCJWPVcRc0','m3aJWOGT','r8oPW7hcHXldJW','WQtdVmoWW5WxWQlcGG','WQ4Gaa3dMa','wgpdUfikDv3cHW','jSoLW4RdR8k5W7tdSCkph8kXWPtcUhxcS8oMW6VdTJFdTYhcUhqJ','B8kLW7hdUCoP','rCkWW69HW5u','wZiMcGS','mgjUz0m','EXBcUsmD','vSoIbGZdTG','kSo1WOe','B8kIWQZcRCkx','WQSiprldI10I','F03dK2mc','pCoIW5LvWPBcGCkZW7GXlhy','juJdVJddHW','W7/dUmkej8ovW7tdLwRdMG5xW4He','yaWLmwtdHLNdTSo5W6xdKmkkW58M','6lE65y2h5PEX5PEB','8jc9Nmoz','wSkkW6/dSSoS','WQxdMSka','aSkwg21CW5C8','uezKW5/dIq','WQDhW7bXs1pcV8okW6lcOG','Fa/cQgJcMCkFENJcJmklWOuoWPi','dsGXvmk/q8k/WPZdGse','pSk7WRz0nG','F8otW7VcQbq','e0j3sq','AvxdLw4a','pK11','pmkDW4K','WPCgWOSMfW','xmkNWPZcTSkQWRu','nmkHW4BcNai','W6DyW60','qSoOW6u','WRldVSozW7rg','WQWQWOpcQWvGW4e'],...(function(){return[...['5lQB5lM65RoI5P2O6l6V5zMY5PEl5O66WO0','W4foW4W','WRu9WOxcVq','WPJcOgldGhRdUqzOW4HsW68','WQbXAMyGja','WRLgW69FW7u','tCkZW4DBW7u','W61EW7i','W5TeW4xdJmolW60DoG','5P+V552i5Asm5zkm6Ak05yY754Il5Ooh772H6kYq5P2F552K5Ps45BY2','WQNdGJ0','ra4SetldIa','W5rYc8o1WPzDyqa','uSktWRFcHCkT','BNvre8kT','zmk0WOGuWOpcMmk6W5mOlG','jfddVG','W6hdJSoEgHBdKmkgW7BcUHRdJ1VcU8kftJhdOGZdI8oRWPqxjSkOyCorgtSeEmo4W5JcJSkfhgJdVKZcTWDCWPSVWOZdNrZcQJKXf8oFE8oCWO7dMmkGmGFcPc9aW65EWRddULhcQb9QuCkAW4ZdHCkoFeCXEmokWPKuCuGHySkXiNT+W7hcVKhdQa','ACk4WPu','Emk7W6pdUCkn','gvZdRq/dRa','C8ktWO3cJSkX','5lQk5lUK5P6b5yQi5zUh6l615zIx56M75PwS5O+b','FmoBisNOR5hMSOFLP5xOTjtVVj/ORiBMOzRMNRpNVA7OTORPHyNORzS','o8o3gWjG','nJxcPSkEW7OvW5OfW4pcUmkxWPVdJxCxW4JcPSodFeNcTLC','rbiXcbxdI8osWRldLq','W4r+hq','jSoYxcHhWQVcLXXzWQhcOsCcvmkOWQ4VnmoTWPtdJCoWWP4ztSkXWQvAnvNcUSocW7GQc8oUgCk2WQxcGCkNWQzQWRNdTZOYANdcOCoMkCkkWPlcLwGjW6CcW4BcGJ5vW6bid8oxWQ/dOIrL','ivvFAHa','WQ/dTSoVW4mzWRlcPcalW48','fw1OEN0','AmoDmINdM0lcHKu','WQWUWOa','kvpdQZ/dJmooo1NcNmkNWQu2WQZcUq/dU8oZWO7cTCky','WRpdJCobW5jM','buzfssm','W4HFnuZdQmofv8omcLxdGdldR8kkkSouW5NdTZC','h8o8v8o5WQ8','W5JdSshcHsxdVW','BCkJWR8YW50','5RAw5yQj5lQM5A+W5z6g5OQj5BAM6Aoy6l2s','oSo6WPW','sMFdOLC','h8k2WRBdJa','eSolgcfh','iSoLWOy','sSoMW7BcGW','W5JdOtZcTsFdRW','WOD/W4tdQfy','rI1YW6n6zCk0nmosWQehW6Wq','dCkzWQrHnCkWttTiWPXYWQZdGmoezrbkWRqfgSoNkCoLgqfwuCoLWRvPomoNrG','W4tdTt/cLq','vfHHrCoh','WQGmjXy','pWVcJCk9W5W','WQq0A38VuLW','u8k6WP4','j8o5WOaR','m2TxAwi','WRSWzq','kSo/hWrdWRFcRvu','xmk0WO3cTmk2','W7lcR0Dmvhy','WRVdUmoTW4SzWQG','WQP1A2iG','qMbsfCkNW5dcIG','WP0bWOezj8krWQa','W5f/cSoHWRPl','i19GDte','6lEX5y6O5PEI5Pwh','juJdGq','WQFcP8os','e8oXv8otWPy','FZZcKt7cOW','nIlcRmk+W6K','gCoYhdre','WR92yG','eeDIsNG','EUoaIow7NEMqOEwDUUwCK+ocKbhdL8kdnCoUFdS+W446sSkVWQNdIJ3cMK3dPJ4+omoPFCktAb7cUSotW7C1','BsdcOa8R','yCkRW43dHSol','W4ToW4FdHmobW6Gqo8oMW54','EhTzW7tdIW','t8oFpqZdVW','wgDme8kUW57cJCo6nG','aCopv8oOWPRdJCogFG','WP54W4TI','rqmNnHtdNSoF','W6zgsMNdOq','huDCtehdSmoiWRRcQX/cSLdcLCktWObyDmkmmxO','WQ/dMh7dO1Km','gbWVtmkp','r8o0W67cJqFdKSoF','rsNcKdJcNvZcMZ3cIW','jf97CG','WPiOWRxdLJK','z3HKW73dGG','c8odqSoVWRJdHCoh','amkgWRm','zINcVbm4ncm','zL7cMSk1W4ldMmo9','WOdcH8o5u8kZ','WQ3cOCon'],...(function(){return['gSoljIvP','EgpdM2Cl','zmkLW4S','lLddTtBdGSoDewpcLSk0','vmkLW4/dM8oSW5yB','WQJdIcK+u8kkW5G','WRNcRCogymknWRu','WO8weSopd8khu8kVW6/dNa','EvRcLa','nbGBeSkbzfSSCSo0W5eWWRC','gxyUWR4Y','W7/cULLhsx1oW4pdSCobWRtcGq1FW6xcH8k4ASkzW5tdVZFdHSoaiZxcVSkyW5/dUmk9jSkx','EMRdP2if','WQpdHci','5RsU5yQD5lU+5A6D5z645OQ75BwH6AcB6l2c','W7pcUu4','5P+u556l5REu5yUf54U05Oo+77+y6k2i5PYT552J5Pw85BYU','W7HRW7n6wq','B8oAmI7dOeFcJLm','WRP7W4LcW4C','eXq6WRddR8kJWOCVWQSV','W5nuBgBdKmkawCoDBNK','u0H9W7ldImkz','WRqaWQRcTYS','a8kzWQbom8k3sq','W6BdTmoZWPTf','xSkaWQRcGmkF','WQxdTSoK','WPejgcddRq','as42tSkOtCkU','WP4wWOxcLJFcUCkKW6NdI28YWQa','fxDIqMS','e8kOi3rn','WRP3yxmr','5PYe5P+J6k205yIg5Rwu5yQV5l+15Okm5OI05BwY6AoT5y6C6l2U5AA25yUj','o1ldIcxcKqO','D3rnW6BdTW','5BAU57QE5yAk5Rcs6k2T5BUJ6zgx772A5OUm6kkB5yYX5yAV5PgP5l2n','W4XcW5/dGCoyW7yGj8oCW5K','uLL8W67dISkkWQmHWRe','nmkwW4ZcQrayWPC','CKPruCoEjG','W7hdJ8ogWOnXBmox','5P6d5P6f6k6v5yQr5Rwq5yMk5l+a5Okj5OQD5Bst6AcS5y2S6l265AEv5yQ8','eCk6W4jG','qqmTbr7dNSoYWRa','sSkxW6TSW50t','ggW+WQS5ACkUvSocWOCSWRmRoNVdMxXgWRddQSkiCmkCqmkTmYv7WQCHWPrPhSkKWQxdTx3dGSk6iCoYcxHLWQ/cVG','WRxdJcG+vW','WRddMmkrcsJdJmkn','uunmW47dVq','mCk2W7NcNZC','4PUZhUIVPEwfJUwVJUs6U+w+RoILH+EyL+EmO+wGG+wmP+MfV+wrNowgIEI8VoIGR+IgGoAFHa','WRWhtua5','xgpdT0q4AgBcHW','WQ0GWPC','WRmQWOpcRqHZ','FSkVW4ldVSkYW6xdJmkc','gICUsCka','ouVdIqFcLGddPCoZa8okW6hdLZNcK8kj','mrtcUmknW4C','zSkaWQ3cVmkN','W6pcTSkP','C8owiJddGLi','u8ktWR7cGSko','oSk/WRHVfG','pCoLW51uWP3cI8k+W7GKjvm','WOGsWQNdTra','WRv1ANKB','hCk/ohnR','s8kLW4/dNCoHW4u','EKCpBmotpbHYBmoSWOWpW7iZzCkvW7VcIWtcTLOUfmoxW4CHWPFdPmo5amoMhu3cKMVdPhrDWO/dUSkyzCoZW7Khj3NcK2xcVHSqWRfPWP/dLc3cVvRdUqxdJSk3sCkiAJZdI0pcNsu','WO8IjbldGW','DexcG8oOW6pdHCo8W60','o0ldLrxcKXO','pLRdTZ7dImoyc28','WQXGW41uW7O','4PY4W6lOTO3LJ6pMLldML4m','jghdQdlcJa','q1XzW77dNa','C0DnvmoTmXSVECouW5GtWQPDpSoCW7dcGuBcIW','s8klW6S','WPFdIa0yAa','W6ldGcJcVaq','CLdcH8kwW7JdGSoJW5xdQSoQW7RcPSkSWRhcOrddMmoZWO8NW44maW','Fmk5WOiuW7hcMmkMW4Obi1xdU8oDaCkYW47cISk6W6JcIa','WRddPu9EtN1BW57dT8oaW7xdHbeXW73cNCkIkmkr','Amk4WOSqW7RcKmkIW5y7','WO0EWOmenG','WOnkxCklqCoikW','W5NdVd3cGbBdQH5AW61uW6LxlJ/cU0CArCk0W58','bmk3W5H8','WPafrK0v','oZtcJq','l1VdUdJdPG','aCkVWPPFlW','rNldOKyCptVdJfldRaqTW4dcJLBdQx/cTHVdKqrdWOJdL8kbWQehvmkyrfOLFCo1WO9hW71zW4bnWPZcSG','BCoCnG','p1f1','b8kQW4rKWPNdRW','pLTHDtxcLqW'];}())];}())];}());ili11lli=function(){return li11i1I;};return ili11lli();};function il1liIli(Ii1111iI,IIiI111i){const i1IiiIIl=l11Il1ll,Ii1lI11l={'HjsNT':'shop_app_home_window'};let I1llIlll;if(Ii1111iI[i1IiiIIl(0x17d,'JnY0')][i1IiiIIl(0x215,'wnJM')])I1llIlll={'giftType':'vip','follow':0x0,'shopId':$['shopId'],'activityId':IIiI111i,'sourceRpc':i1IiiIIl(0x218,'JnY0'),'venderId':$[i1IiiIIl(0x1f7,'lBWw')]};else Ii1111iI[i1IiiIIl(0x1d4,'v8fV')]['giftsToast']&&(I1llIlll={'follow':0x0,'shopId':$[i1IiiIIl(0x258,'2lSV')],'activityId':IIiI111i,'sourceRpc':Ii1lI11l['HjsNT'],'venderId':$[i1IiiIIl(0x162,'W7*x')]});return I1llIlll;}async function iiIl1IiI(){const Il1iil1=l11Il1ll,Illii1l={'JgLbQ':function(liiIl111,ll1lI1l){return liiIl111(ll1lI1l);},'BwuBW':function(illIlIlI,lililIll){return illIlIlI||lililIll;},'lTMHn':function(lI1IIlI,iIl1Il1I){return lI1IIlI===iIl1Il1I;},'TPcOw':function(Ii1lilil,Illillll){return Ii1lilil!==Illillll;},'tWjqF':'mwgjj','OZIRC':Il1iil1(0x1dc,'F*N5'),'bTajX':Il1iil1(0x205,'b[lV')};return new Promise(lllilIIi=>{const il1iIiI1=Il1iil1;$[il1iIiI1(0x1ad,'Lje6')]({'url':'https://api.m.jd.com/client.action?g_ty=ls&g_tk=518274330','body':'functionId=drawShopGift&body={\x22follow\x22:0,\x22shopId\x22:\x22'+$[il1iIiI1(0x221,'U]Ly')]+il1iIiI1(0x256,')q^i')+$['activityId']+'\x22,\x22sourceRpc\x22:\x22shop_app_home_window\x22,\x22venderId\x22:\x22'+$['venderId']+il1iIiI1(0x167,'D(zI'),'headers':{'Host':Illii1l['OZIRC'],'content-type':il1iIiI1(0x189,'aW@G'),'accept':il1iIiI1(0x1fc,'alU%'),'user-agent':$['UA'],'accept-language':Illii1l[il1iIiI1(0x1dd,'%zRm')],'Cookie':llIl1I}},(ll1IlI1,lllIiI1,i11li1I1)=>{const iIll11il=il1iIiI1,l1ili1ll={'ylntI':function(i11l1,iIli1I1l){return Illii1l['JgLbQ'](i11l1,iIli1I1l);},'cZtGT':function(iI1ll1I,iIlIII){const i1lII=Ilii111I;return Illii1l[i1lII(0x20a,'Lje6')](iI1ll1I,iIlIII);}};try{ll1IlI1?console['log'](String(ll1IlI1)):(i11li1I1=JSON['parse'](i11li1I1),i11li1I1&&i11li1I1[iIll11il(0x14b,'%zRm')]&&Illii1l['lTMHn'](JSON['stringify'](i11li1I1[iIll11il(0x24a,'6Q7T')]),'{}')&&console['log'](JSON[iIll11il(0x1ab,'L@vE')](i11li1I1)));}catch(Ii1I11i1){Illii1l[iIll11il(0x23b,'Lje6')](Illii1l[iIll11il(0x1b2,'wZWI')],iIll11il(0x13d,'krr1'))?l1ili1ll[iIll11il(0x197,'$*]2')](iI1IlIIl,l1ili1ll[iIll11il(0x18d,'0W&l')](IiIi1i11,{})):(console[iIll11il(0x246,'D(zI')](i11li1I1),$['logErr'](Ii1I11i1,lllIiI1));}finally{lllilIIi(Illii1l['BwuBW'](i11li1I1,{}));}});});}async function Iii1ll1l(iIiIlilI,I1Il1iI){const lIl1l11l=l11Il1ll,lIIl1II1={'VGaFx':function(lll1Iil,llilI){return lll1Iil!==llilI;},'uOZoO':function(ii1iiil1,iII1i1II){return ii1iiil1(iII1i1II);},'kXOOD':function(IlllI1i1,liilllli,ilIIl1Ii){return IlllI1i1(liilllli,ilIIl1Ii);},'PmEvm':function(II1liIli,I111li11){return II1liIli===I111li11;},'cHcHz':'OaxxZ','qkjXm':lIl1l11l(0x134,'9r^%')},l11I1ii1=await lIIl1II1[lIl1l11l(0x1f3,'1^&n')](iilliliI,iIiIlilI,I1Il1iI);if(ili1111l){if(lIIl1II1[lIl1l11l(0x254,'Lje6')](lIIl1II1[lIl1l11l(0x133,'hL1a')],lIIl1II1[lIl1l11l(0x145,'v8fV')])){const Il1I1Il1=IIl11lI1['split']('_');ll1iIi11['shopId']=Il1I1Il1[0x0],iIl1liIl['venderId']=Il1I1Il1[0x1];}else $[lIl1l11l(0x1e8,'puhf')]=l11I1ii1?.[lIl1l11l(0x185,'2Y2b')]?.['convertUrl']||'';}else $['signStr']=l11I1ii1?.['body']||'';return!$['signStr']&&console[lIl1l11l(0x1a3,'$*]2')]('接口获取失败,跳过'),new Promise(iiil11i1=>{const iiii1l1=lIl1l11l,ili1li={'sCwzz':function(IilllII1,IlIllIIl){return lIIl1II1['VGaFx'](IilllII1,IlIllIIl);},'pnBIY':function(iIi1Ill,iiiIilii){return lIIl1II1['uOZoO'](iIi1Ill,iiiIilii);},'FUjzf':function(lIIlli1,Ii1lIi1){const iilll1il=Ilii111I;return lIIl1II1[iilll1il(0x1d5,'[fA!')](lIIlli1,Ii1lIi1);},'YfjPQ':function(l11iliIi,l1i1lii1){return l11iliIi||l1i1lii1;}};$[iiii1l1(0x18c,'GgN9')](IIllIli1(iIiIlilI,I1Il1iI,$[iiii1l1(0x25c,'L]z&')]),(i1IiiIll,lli1lill,l1iIi11l)=>{const i1I11i11=iiii1l1;try{ili1li['sCwzz']('lmIWp',i1I11i11(0x14c,'LZZ2'))?i1IiiIll?console['log'](ili1li[i1I11i11(0x1f0,'v8fV')](String,i1IiiIll)):(l1iIi11l=JSON[i1I11i11(0x1ee,')q^i')](l1iIi11l),l1iIi11l&&l1iIi11l[i1I11i11(0x181,'LZZ2')]&&JSON[i1I11i11(0x170,'9r^%')](l1iIi11l['data'])==='{}'&&console['log'](JSON['stringify'](l1iIi11l))):l1l1Illi[i1I11i11(0x230,'v8fV')](ill1lIII(illiIl11));}catch(II1111ii){console[i1I11i11(0x243,'uFH9')](l1iIi11l),$[i1I11i11(0x242,'[fA!')](II1111ii,lli1lill);}finally{ili1li[i1I11i11(0x1b7,'v8fV')](iiil11i1,ili1li['YfjPQ'](l1iIi11l,{}));}});});}function IIllIli1(l1Il11I,i1iIlIi,iIil1i1i){const lIiI1IiI=l11Il1ll,iil1i111={'CdxbE':function(l1Ii1lI,lIiIiiI){return l1Ii1lI(lIiIiiI);},'GZDBh':'api.m.jd.com','dlvse':lIiI1IiI(0x1c9,'2Jii'),'fLmki':lIiI1IiI(0x172,'DxR2')};return{'url':lIiI1IiI(0x1ed,'6Q7T')+l1Il11I+'&body='+iil1i111['CdxbE'](encodeURIComponent,JSON[lIiI1IiI(0x1b4,'RY[V')](i1iIlIi)),'body':iIil1i1i,'headers':{'Host':iil1i111[lIiI1IiI(0x21a,'1^&n')],'content-type':iil1i111['dlvse'],'accept':lIiI1IiI(0x184,'lBWw'),'user-agent':$['UA'],'accept-language':iil1i111['fLmki'],'Cookie':llIl1I}};}function I11lI1II(){const I1IliII1=l11Il1ll,llilll1={'lBJne':function(lli1ili,IIl1IIl){return lli1ili!==IIl1IIl;},'SvlLA':I1IliII1(0x211,'JnY0'),'Tfzbp':I1IliII1(0x206,'GgN9'),'VeMQd':function(lIli1I1,II1Ilii){return lIli1I1===II1Ilii;},'PwUzI':I1IliII1(0x247,'2lSV'),'mEAwO':'mKoLd','sgRbe':function(l1iii1Il,lliI1Il1){return l1iii1Il(lliI1Il1);},'jRnOb':function(lIi1illI,lI1illli){return lIi1illI===lI1illli;},'xveBY':I1IliII1(0x25a,'iy6#'),'EeWMn':I1IliII1(0x19c,'1^&n'),'NQiAa':I1IliII1(0x154,'L]z&'),'mNYnc':'xygjT','ONAix':function(lII11lI){return lII11lI();},'YUTky':I1IliII1(0x1e0,'LZZ2'),'crVsi':I1IliII1(0x1cc,'VE7U'),'FQWEO':I1IliII1(0x1e2,'v8fV'),'lFGUP':I1IliII1(0x16e,'DxR2'),'cJSZa':I1IliII1(0x1f9,'1KXR')};return new Promise(async Iili1il1=>{const ll11iIiI=I1IliII1,I1llIl1l={'hEFEF':llilll1[ll11iIiI(0x1fb,'XKlN')],'ihdKU':llilll1['crVsi']};if(llilll1[ll11iIiI(0x1be,'DxR2')]===llilll1[ll11iIiI(0x1fe,'XKlN')])iI1Ill1l={'follow':0x0,'shopId':IililIII[ll11iIiI(0x161,'9r^%')],'activityId':I1illi11,'sourceRpc':'shop_app_home_window','venderId':iI1lIiIl[ll11iIiI(0x1eb,'9r^%')]};else{const iilIlIIl={'url':ll11iIiI(0x21e,'LZZ2'),'headers':{'Accept':ll11iIiI(0x224,'L]z&'),'Accept-Encoding':'gzip,\x20deflate,\x20br','Accept-Language':ll11iIiI(0x17b,'o[u3'),'Connection':ll11iIiI(0x165,'wnJM'),'Cookie':llIl1I,'Host':llilll1[ll11iIiI(0x142,'uFH9')],'User-Agent':$['UA']}};$[ll11iIiI(0x21b,'0W&l')](iilIlIIl,(liii11,IIiIl11i,IliIiIIl)=>{const l1iIIlii=ll11iIiI;try{if(llilll1['lBJne'](llilll1['SvlLA'],llilll1[l1iIIlii(0x245,'0W&l')])){if(liii11)llilll1[l1iIIlii(0x1bf,'LZZ2')](llilll1[l1iIIlii(0x139,'XKlN')],llilll1[l1iIIlii(0x1fa,'0W&l')])?iI11I11[l1iIIlii(0x23a,'9r^%')](li11II1,lli111ii):(console[l1iIIlii(0x18f,'XKlN')](llilll1['sgRbe'](String,liii11)),console[l1iIIlii(0x1d9,'alU%')]($['name']+l1iIIlii(0x16d,'DxR2')));else{if(IliIiIIl)try{IliIiIIl=JSON[l1iIIlii(0x22f,'L]z&')](IliIiIIl),llilll1['jRnOb'](IliIiIIl[l1iIIlii(0x1b3,'2Y2b')],'0')&&(console['log'](llilll1['xveBY']),$[l1iIIlii(0x1ba,'ckh9')][l1iIIlii(0x152,'tNo6')](llilll1['EeWMn']),$[l1iIIlii(0x1ef,'D(zI')]=!![]);}catch{if(llilll1[l1iIIlii(0x265,'uFH9')](llilll1[l1iIIlii(0x183,'DxR2')],l1iIIlii(0x169,'lBWw')))console[l1iIIlii(0x1c6,'VE7U')]('京东服务器返回空数据'),$[l1iIIlii(0x1bb,'VE7U')]=!![];else{iilllllI[l1iIIlii(0x1b9,'aW@G')](I1llIl1l[l1iIIlii(0x1f1,'C3^V')]),III1iIil['message'][l1iIIlii(0x1cb,')q^i')](I1llIl1l[l1iIIlii(0x14f,'P$oK')]);return;}}else console[l1iIIlii(0x19d,'1KXR')]('京东服务器返回空数据'),$[l1iIIlii(0x144,'kFvl')]=!![];}}else IllIiI1I[l1iIIlii(0x1d9,'alU%')](ilI1l1ll['stringify'](il1lli1i));}catch(iIlIl1li){$[l1iIIlii(0x242,'[fA!')](iIlIl1li,IIiIl11i);}finally{llilll1[l1iIIlii(0x203,'kFvl')](llilll1[l1iIIlii(0x1b6,'F*N5')],llilll1['mNYnc'])?(Ili1111[l1iIIlii(0x157,'k(c9')](I1IIil1I),ll1ilii1[l1iIIlii(0x252,'puhf')](llliI1I1,II11Ilil)):llilll1['ONAix'](Iili1il1);}});}});}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) }