代码拉取完成,页面将自动刷新
/*
活动名称:五一出游季
cron:1 1 1 1 * jd_phone_travel.js
*/
const $ = new Env('五一出游季')
var iil='jsjiami.com.v7';function iii1II(_0x54099d,_0x3ffa84){const _0x4c9a6b=Iii11l();return iii1II=function(_0x41b52d,_0x1e2b13){_0x41b52d=_0x41b52d-0xdd;let _0x370c79=_0x4c9a6b[_0x41b52d];if(iii1II['nZJgLw']===undefined){var _0x29294e=function(_0x5046da){const _0xf005ba='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x562a2b='',_0x460846='';for(let _0x5003e2=0x0,_0x334785,_0x1b7dd4,_0x2a3054=0x0;_0x1b7dd4=_0x5046da['charAt'](_0x2a3054++);~_0x1b7dd4&&(_0x334785=_0x5003e2%0x4?_0x334785*0x40+_0x1b7dd4:_0x1b7dd4,_0x5003e2++%0x4)?_0x562a2b+=String['fromCharCode'](0xff&_0x334785>>(-0x2*_0x5003e2&0x6)):0x0){_0x1b7dd4=_0xf005ba['indexOf'](_0x1b7dd4);}for(let _0x553632=0x0,_0x4fd918=_0x562a2b['length'];_0x553632<_0x4fd918;_0x553632++){_0x460846+='%'+('00'+_0x562a2b['charCodeAt'](_0x553632)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x460846);};const _0x3c14c5=function(_0x2c7966,_0x5d403b){let _0x1549f8=[],_0xde8e9a=0x0,_0x1a081a,_0xcd2aef='';_0x2c7966=_0x29294e(_0x2c7966);let _0x45c783;for(_0x45c783=0x0;_0x45c783<0x100;_0x45c783++){_0x1549f8[_0x45c783]=_0x45c783;}for(_0x45c783=0x0;_0x45c783<0x100;_0x45c783++){_0xde8e9a=(_0xde8e9a+_0x1549f8[_0x45c783]+_0x5d403b['charCodeAt'](_0x45c783%_0x5d403b['length']))%0x100,_0x1a081a=_0x1549f8[_0x45c783],_0x1549f8[_0x45c783]=_0x1549f8[_0xde8e9a],_0x1549f8[_0xde8e9a]=_0x1a081a;}_0x45c783=0x0,_0xde8e9a=0x0;for(let _0x17a704=0x0;_0x17a704<_0x2c7966['length'];_0x17a704++){_0x45c783=(_0x45c783+0x1)%0x100,_0xde8e9a=(_0xde8e9a+_0x1549f8[_0x45c783])%0x100,_0x1a081a=_0x1549f8[_0x45c783],_0x1549f8[_0x45c783]=_0x1549f8[_0xde8e9a],_0x1549f8[_0xde8e9a]=_0x1a081a,_0xcd2aef+=String['fromCharCode'](_0x2c7966['charCodeAt'](_0x17a704)^_0x1549f8[(_0x1549f8[_0x45c783]+_0x1549f8[_0xde8e9a])%0x100]);}return _0xcd2aef;};iii1II['fdELce']=_0x3c14c5,_0x54099d=arguments,iii1II['nZJgLw']=!![];}const _0x552081=_0x4c9a6b[0x0],_0x3d5156=_0x41b52d+_0x552081,_0xb7680c=_0x54099d[_0x3d5156];return!_0xb7680c?(iii1II['ZadjPD']===undefined&&(iii1II['ZadjPD']=!![]),_0x370c79=iii1II['fdELce'](_0x370c79,_0x1e2b13),_0x54099d[_0x3d5156]=_0x370c79):_0x370c79=_0xb7680c,_0x370c79;},iii1II(_0x54099d,_0x3ffa84);}function Iii11l(){const I1l11i=(function(){return[...[iil,'XuKQjbsUjUYiIarFmLPif.VHchXoqpVmUC.vK7Jg==','WQ8iW7HVWOBdN18','DLC8WPu','fxnBqmoPsCkj','W7NdP1D+WQK','W6ddTCoDW692W6a7WPBdLmkI','5OQ35AE76i6Y5B6W77Yr','z+IVGUAWI+wqIEw7UCkD','WQPzWQ1xFa','sIlcV8oTW5lcKW','W69WWOmZWP3cPdO','DmkjWOX6uG','xCoJiq','5OQR5AEt6i2q5B2T77Ye8y6aIbRNQ5RMSQq','vtNcUq','WPTuWRrlCCow','W64JW6zdWQyzW6pdJG','xxXiW4jQW5TOW6uSAeSsW7HeFmoo','rMJdSmoQ','WRClWPRdH3i','W6GyW48gzqH5dHblySod','W7VdHt5LWOhcJuyOWPrr','W7xcQmo3dmkEq1hdR8kYW7/cMhTlWOjEcx5XWQdcLmkiWQhcPmkp','WQmtW6zlWQm','WPdOR6VMS4BLPyZOTlqw4P+LW7O','DCoAW7i','WQlcMYRdUxG','WQ0OW64','F8k+WPNdKmkc','t8kxWQv0EG','WRrqlG','i1ONWQe','W4/cLmomj8kD','W5xcI8oQomkc','WRnNWP5ugG','mSkgWP1RqSo2W4VdPde','vCo4wa','W5LYW6ayAq','wNKYWQP5','WRVcNg46W6BdIrOuWPT/xxLz','W5VdUColWOT9','ESoQWOa','W5dcMYxcQa','W6ldSSoAW5b9W5S','W73dOSohW6zYW5G3','mrZdM8k9gCksfmoqW4pdGSkVeuJcNa','pH5eWOFdLSkC','W6tdQmoFW7b9','5OUi5Aw66iY35B+w772I8kscLCo956MS5Rok','WPxdSZqzWR8dW4q','WPNdHSkrxSkptKn0zYWFW5icWOtcOsSr','qstcVCoXW7u','v8orWRefpG','qCokWQa','W5T5W70o','E8oKWPFcPxNcQG','f8oJhCkgkG','qWlcHSk4WRi','WQCBWPFdGwm','w1K/WOrOsSk+W506WRJdK0u','W5ZcMYlcMCk+WRddU8o+W4qpW7DIbSo3WPq','WO4FlSoplSo9W7W','WO9bWP9A','WO/dMSo+wca','W7tdTCovW6jaW4S9WOG','wSoNhuL+vuXkWRidCNKlWRW','smoMW4y1','W5ddSCkMW6DNWO4+rW','mHBdGCkBkCkEemomW4JdOa','5yAm5OUe5yYb5OMM5yMl','fmosW7VdQSkNDSoCWQxdL3hdVJyR','w8o7q11h','t8k2W7ivtxW','A8oyCu8','zCoXWPxcK3dcOSojxmoz','W5FcMYxcQSkK','W4hdLMS','WO3dQCkUBmoW','fCoEW7C','WRlcOt3dNMxcUKGlnCoaW6OUWP3cUGVdKG/cQa7dVLZdPYhdGHVdRmoUgbfmhM8','y1KzCJG','qG7cTSkzWRZdShK','e8oJomkeeq','CmoeWPpcU2C','FmkQW5ayDG','W4pdJge','WORcM8kvD8kZ','WPhdTG0t','WRBdVJzwWQHlEINdPmo2','W5JcNZ/cRSk4WRe','BNTjW5HQWPHOWROzz14B','WPtcImkrAa','W4/dQ8kpW5nC','W5JdVX9cWOW','WOVcS8kPESkM','W4VdLJfrWRK','emo6CqCwWRS','qCk3W7a','Cui0WP1ssmkJWOmA','W6hcRSo+','WOVdUaStWRO5W57cRmkAW54','umkoWQjtAa','WPBdImkmxSoqvaG+EsKqW5qsW4hcRcaqWOpcGgPXW6WYtSk9lSohF8oPar7cQa','y1KzCJHklSknW4VcIG','WRrcotq1nZRdTa','WORdMCo5Dri','W4NdSmkqW61WWRGTth4Z','W43dTb9MWPW','jKa9WQW','8jA7ISoj','xwBdVG','WO/dPSkTwCot','W6avELj2Ad7dT8kibNbk','w23cQmoAW7i'],...(function(){return[...['pHrn','hmoZj01tsuvk','5yse5PYL5OI95Asx','rCkQW7qyth3cR8om','tSooAgH/','i8oIW4NdLmkQ','rtNdPejo','W5xdRCkE','W5vKW60j','W7HyWOKoWR4','AmoBW7WBf8oDs3BcT8ov','WPpcMSkJFCkKW7RcMSok','BNG3WOz4','aCocW6hdSmk8yq','qCkXsWOteGDLWRG5yL8M','amkplmolqa','WQexWQhdHxO','W5NcNYlcUSkTWR7dSa','W7xdV8oDW6e','W6FdMs1nWRlcMe4','DmkHW78fBW','t8ocW6uupq','omorWRu','5REf5yIu5zo156EE77655lU65lIN6zM15yE75RM45AYD','DmogW7i','WQ/cPmknW4uukIhdKmoiv0u','WRFdGcyKWRS','qhvxW7nOWPK','D8kfWO3dLmkN','eSksiCoi','5A+/5OQN5lM05yIuWOK','W6pdRmoDW6vbW4O8','f8kaW6xcGSkMvSodWOm','gCotW5VdMSk5ymox','c+AjQEwiSa','zsxdQw1F','WQ0MW7GUeG','W6lcTmoTomkhsXS','W5JcN0jSW7i','vCk0WOhdR8kg','CCoGWPpcPwVcTSofsmo/W5NdOWFcVG','WRpdSSoxzXO','f2ypWO0/','W5ZdIg93WQ1aW68','5PYg6ic56iYG5y6I55sr5OIU6yQ+5P+85lYB5OcM776B','vvtcOa','WONdGmo5FYxcSSoZ','xNZdRCoyWRJcVCoN','D2ZdJSo3WRi','WRTnWO9w','CSoJzNbL','DfK2','amoCW6BdHCkaCmox','WPWiWRZdSN4','WQJdPmoDtJ0','ubNcVSkNWRy','4P2uWONMNR/NNOtOROxMS4af','WRBdItn+WQG','pXPA','WRXdWPyzpLDMeYXJvSorW5CSk0GYWRBdG3ldKW','swzgW5TCWOjZW6C','WRiZW7T1WRWFW7NdG8kE','A8ooCxH/nCoHW7W','wwJdQSooWQBcTCoUW6embmk/W6vLWOVcOq','WPBcHSkB','W4fPW6SjCa','ggpdIJml','eKNdTb4mde7cTG','EvuLWQ95xCk6WPu','E8koWPa','W6hdL8kqW61p','qhvxW59MWPfY','WR7cTd3dJW','W4nOW7yuF1eqWRZcSa','WR1/WRb1ea','a8o1i8kVbdPCjq','rCoUWOi2aW','W4xdTmorW6DDW54/WP0','6i2T5yYdACo6ECoRaKPT5AAy6lAH772D','5OMc5AEb6i+x5B+H77+o','FfrFWPtdI8kyjcJdIa7cTY/cVCkxamkPwCkjW4lcNW','sq7cH8kPWPG','qCkHW6qhwh7cRW','rMZcOmotW6LrWPuT','kuaK','a8kjn8oys8kOW6tcOg0','pHZdJSkAe8kpda','WPpdJ8kF','zuigtbq','W79LW4W4amosW7OS','6i2n5yY/WQDzWRNdUmkfW4em5Asq6lsB','W7j3WR4TW6PiWQpdRCkjkdRcRCol','WO/ORztMSytLPlBOT5Ov4PYDW4a','BwrkzSov','a8oJi8ky','W7ZdQmot','amkplmolqmkqW6pcP3KV','t8ogWRKBpLWI','W7VdMcTIWRdcNKa6WOW','WP7cHHZdOua','wNvoW5G','WQFcS8kaWQqIWOKJWOldQSkkmmkk','k1OU','xqFcQSorW5u','WPCDW7TMWQe','W5BcLtxcSa','ECoeyKLuomo+W63cOSo4','ix5Cuv8YyJW','hcjqW7riWRT7W6m','xhjVC8oM','yaZcNSkuWOq','zSocyG','eCo0zG','W5pcNYxcLSk4WRJdPSoH','eSoUDr4DWRxcIq'],...(function(){return['xCohWQtcJ1m','aCkNemogvq','oSo+W4VdL8kx','WOCIW4TOWRm','tbBcUmk+WRy','mHBdGCkB','5PYn6igE6i2V5y6P55wZ5OIz6yIL5P6m5l6Y5OcR77+s','n8oKW5RdUSke','kmoxvdW9','gCoVhW','WOycW50','WQ7dVJO','4P2HnoIeVEAEGoI/N+IIUUMbM+wkP+s7I+MuH+IVGxq','WPnPWO51BG','pSkCnra7ECodW4/cKCowW4RcKa','W53dSmkyW6bgWPmRuG','BfCIWPS','W5ZdSmklW7HN','WOhdHYXFWPW','FLGx','W4ZcJConh8oPk2zlqc8','uL4eydjNlSkzW4ZcKurPWQq','BCoiCxH+p8o0W6VcNmo9W5xcTmkK','ACkQWRJdICkO','WPtdNSoNFdW','xgZdQSoTWRxcU8oL','4PYXWRVOHjVMNBtOVQhOOPJPGQNLIjBKUjpPLzNOR7vr','5OUi5AEw6i+p5B6Q77Y7','WRGwWRRdGwJdIuFcRqBcR8kDWOBdMNRcOHTDW4hcTLddGxxdQg7cMCkfCWXsW7vyWPPlW6xcHSkZWPBcKSk7hSoWWQtcPr54W7/cKmksxJ/cLSosWQRdNmk0d8o9WRJdVmk+ESkjxCkjWR7cRWGpWRuIACoaBsq','xLzgW71K','W6yxW6H2WPNdKu18W47dVmokvI8','W4ldHNv0WP5sW6q','WQ4uW69cWQtdN1vR','WPFcMSkB','5REH5yM95AwJ54of54Iq5lIg772R6k+t56Ma5zkN5ysj6k6j77+P','qaJcHCkzWRJdSq','4P+1WQlMN5pOGARMRBBNOONLPydNKkq4','WP7dVI0tWQy','BCkTWOldIW','WQ0yW79AWOVdMv0','hmoRCtqyWRFcJ1ldVc90DeOpWRnZlrWqs8kNogTia8kMW4ilWOW1WPrGWROHdCootsBcHmkcsmkIqmohW73cH8oq','WQixWQddThxcLW','WQO8W6qujSoSW7y','ihjgB0C/Aa','WR7cQmobW6f6W5mHW5FdOmkOcmkAWPxcPqVdPmk6W61bW7LrWONcTSoKW6lcTCoW','W5BdOhD1WOO','WRZcNwO8W6ZdIXewWO1yFfnb','WP7dPXatWROcW6NcUSkeW48YWRud','xmksWPX3rCkRW4JdSsn+qsJcHW','rCkJWQrOBW','nfOKWQe','WO9sWOPms8omW7dcPa','WO7cPSkpAmk4','WPFdJ8kNxSorb110','W4LOWO8XWOhcSdNcQa','WQTdWPbsoG','vSkIy8ojqNPJjd7cHMxcUq','W6RcPmoTiCkFsW/dRq','dhCkWReG','n0CGWR4i','W7RdMtDoWRdcNq','WOZdICkwA8oncG','hmksiG','m+obHUA3PEwiSEwEL+wEOoocUG','DtJdJ1PphmoFW4e','aaVcJCkYWQ7dRgDGgSktW7iQha','WR1rkbWvkJldQG','WPOeW6mRcW','hSotW6ZdL8ku','W4ObpSoqdW','WODpWOW','W4JcM8kHoeFcISo0qxFcMxe','bSozW7ZdKmkMrSowWRJdO3hdTq','DSkJWOW','qxTa','WRGhWQ/dLx7cGrS','FrzlWPddVCkhpMddTa','WQ/dOJO','W4pdJgfcWO1h','ESoFBf1Ue8o/W7JcRSoX','W71bWQClWQu','ifa9WPSyW45SW5JdJCkDiSo6na','tNDoxmot','a8kjjmofumk8','W4JdMmojpmkCW5BcOCo1ee4','aZTsW5HMWPPVWRGFE0WBWRLwu8onsmk4W5pcHsbSW7W','sSoqWR8','WPmPW4H0WPm','dSo5ma','WOnuWP9lA8kcWRddU8o7WPNcI8o5WPPmdCkHW58jd8kGW5fcWPNcSIKur8o5rq/dJSo2gu3cNCogW5pdR8o/AJZcRmkhWOHTWR3cLHneWQu','tSkRW7mn','Cc7dQN9h','WPNdMCkmCCowhujJxIKqW4ai','WQpdSILAWRb9EINdGCoHfG','W67dOmooWPTkachdJmoG','WO7cHSkxAmk4','W4NdRCoyW71l','vfNdKCoPWQi','5PYf6io/6i205y2P55A05OIc6yQe5PYD5l+r5OkG','AJhdK3j8','WO/ORztMSytLK4RLUASv','BZxcK8oXW6K','r8o/quL6','5RE65yUV5zke56ES77+i5lUS5lQq6zUb5ysD5RMs5AYbW4u','gupdPW','W4OComoggq','WOJdMbGqWRm','pvKqWQiv','WRndWPW','rwBcL8oqW7DqWP4','W7H6WP4I','f0pdPdG','BmogW74ehmk/','WQRcPYddLhpdNW5kk8og'];}())];}())];}());Iii11l=function(){return I1l11i;};return Iii11l();};const il1iIl=iii1II;(function(i11ii1,IlIliI,l1iII1,iiill1,lIli1i,IIIII1,I1lIlI){return i11ii1=i11ii1>>0x7,IIIII1='hs',I1lIlI='hs',function(ii1ill,II1iI,llI1II,lIli1l,lillIi){const i1i11I=iii1II;lIli1l='tfi',IIIII1=lIli1l+IIIII1,lillIi='up',I1lIlI+=lillIi,IIIII1=llI1II(IIIII1),I1lIlI=llI1II(I1lIlI),llI1II=0x0;const illIi1=ii1ill();while(!![]&&--iiill1+II1iI){try{lIli1l=-parseInt(i1i11I(0x107,'jWf7'))/0x1+parseInt(i1i11I(0x154,'uN5)'))/0x2+parseInt(i1i11I(0x1b0,'!)*!'))/0x3+-parseInt(i1i11I(0x17d,'7u%E'))/0x4*(parseInt(i1i11I(0xdd,'n0gm'))/0x5)+parseInt(i1i11I(0xfd,'ug^3'))/0x6+-parseInt(i1i11I(0x167,'ug^3'))/0x7*(parseInt(i1i11I(0x20b,'vYeU'))/0x8)+parseInt(i1i11I(0x123,'p!&@'))/0x9*(parseInt(i1i11I(0x1cb,'KSuY'))/0xa);}catch(ii1ili){lIli1l=llI1II;}finally{lillIi=illIi1[IIIII1]();if(i11ii1<=iiill1)llI1II?lIli1i?lIli1l=lillIi:lIli1i=lillIi:llI1II=lillIi;else{if(llI1II==lIli1i['replace'](/[XJuKQCpIbVfqUhHFLrgPY=]/g,'')){if(lIli1l===II1iI){illIi1['un'+IIIII1](lillIi);break;}illIi1[I1lIlI](lillIi);}}}}}(l1iII1,IlIliI,function(liil1i,lI1lil,i1l1iI,liil1l,lI1lii,Iiili1,Iil1l1){return lI1lil='\x73\x70\x6c\x69\x74',liil1i=arguments[0x0],liil1i=liil1i[lI1lil](''),i1l1iI=`\x72\x65\x76\x65\x72\x73\x65`,liil1i=liil1i[i1l1iI]('\x76'),liil1l=`\x6a\x6f\x69\x6e`,(0x165b64,liil1i[liil1l](''));});}(0x6580,0x705c9,Iii11l,0xcd),Iii11l)&&(iil=Iii11l);const jdCookie=require('./jdCookie'),common=require(il1iIl(0x124,'[j]d')),notify=require(il1iIl(0xfb,'HSPo')),getToken=require(il1iIl(0x202,'WJ*^')),isNotify=![];let domains=il1iIl(0x1a6,'ml$4'),cookie='',activityCookie='',originCookie='';const cookiesArr=Object[il1iIl(0x176,'LC0B')](jdCookie)[il1iIl(0x1ec,'WJ*^')](illlIi=>jdCookie[illlIi])['filter'](I1lIii=>I1lIii);!cookiesArr[0x0]&&($[il1iIl(0x159,'1nhA')]($[il1iIl(0x197,'pqYk')],'【提示】请先获取Cookie'),process[il1iIl(0x1c4,'HSPo')](0x1));!(async()=>{const iii1ii=il1iIl,IiI1I={'bSKBD':iii1ii(0x128,'(mVi'),'uxUkw':iii1ii(0x151,'[j]d'),'kBvif':function(illlIl,i11ill){return illlIl===i11ill;},'HDQfV':'JCFzR','dDWSh':function(IIIIIi,IIIIIl){return IIIIIi+IIIIIl;},'WiqNI':function(I1lIil,IIIl1i){return I1lIil(IIIl1i);},'ynyGb':function(liiII1){return liiII1();}};$[iii1ii(0x12c,'dwIb')]=IiI1I[iii1ii(0x1fc,'uN5)')],$[iii1ii(0x1f0,'n0gm')]=IiI1I['uxUkw'],$['appKey']=iii1ii(0x1d2,'7FrQ'),notify['config']({'title':$[iii1ii(0x142,'Jqbb')]});for(let IIIl1l=0x0;IIIl1l<cookiesArr['length'];IIIl1l++){if(IiI1I['kBvif'](IiI1I['HDQfV'],iii1ii(0x1be,'Jqbb')))ll1li['log'](iii1ii(0xf3,'oR6[')+Illl1I+iii1ii(0x133,'XMqg')+(lliiiI[iii1ii(0xe8,'pAXi')]||lilil));else{$[iii1ii(0x165,'LC0B')]=IiI1I['dDWSh'](IIIl1l,0x1),cookie=cookiesArr[IIIl1l],originCookie=cookiesArr[IIIl1l],common['setCookie'](originCookie),$[iii1ii(0x1ff,'HSPo')]=IiI1I['WiqNI'](decodeURIComponent,common[iii1ii(0x16d,'6#9U')](cookie,iii1ii(0x14f,'(mVi'))),$['UA']=common['genUA']($['UserName']),$[iii1ii(0xee,'XMqg')]=notify[iii1ii(0x188,'Ie(O')]($['index'],$[iii1ii(0x105,'W]zT')]),$[iii1ii(0xef,'jBT9')]='',console[iii1ii(0x118,'j4wO')]('\x0a******开始【京东账号'+$[iii1ii(0x14b,'d4JB')]+'】'+($['nickName']||$['UserName'])+'******\x0a'),await IiI1I[iii1ii(0x1d5,'[A3N')](Main),common[iii1ii(0x117,'7FrQ')]();if($[iii1ii(0x1c5,'ug^3')]||$[iii1ii(0x10c,'ml$4')])break;await $['wait'](0x3e8);}}isNotify&¬ify['getMessage']()&&(notify['appendContent'](iii1ii(0x10e,'c5^(')+$['activityUrl']),await notify['push']());})()[il1iIl(0x18b,'J&Kr')](i11ili=>$[il1iIl(0x11d,'XMqg')](i11ili))[il1iIl(0xfa,'sKeq')](()=>$[il1iIl(0x15f,'P*Di')]());async function Main(){const il1iIi=il1iIl,iil1l1={'lKecN':function(lllli,iiili1,ill11i){return lllli(iiili1,ill11i);},'vivDI':function(lllill,ill11l){return lllill!==ill11l;},'VHpsw':'MjTyx','XUizZ':il1iIi(0x200,'YhSo'),'mdcbF':il1iIi(0x20c,'p!&@'),'WkpuO':il1iIi(0x189,'n0gm'),'YjlhX':function(I1lIiI,lllili){return I1lIiI===lllili;},'IYGhm':il1iIi(0x173,'c5^('),'wyYpx':il1iIi(0x1de,'Ie(O'),'aZMHj':'未能获取用户鉴权信息','FmwyY':function(IliiiI,Ill11){return IliiiI(Ill11);},'lezUz':il1iIi(0x1da,')DiD'),'VKPDB':function(liiIII,li1i11){return liiIII!==li1i11;},'xnedW':'JxXis','hwOym':il1iIi(0x134,'c5^('),'AyFld':function(iI11I1,il1i1l){return iI11I1(il1i1l);},'ULUdL':'get_task','LjrCe':'YqDeM','DcmOt':function(IlIlll,IIIl1I){return IlIlll===IIIl1I;},'dCcMq':il1iIi(0x19f,'ug^3'),'pocLf':il1iIi(0xf9,'vYeU'),'FvFuJ':il1iIi(0x17f,'z2eW'),'fKLAb':'LcLwh','bMZIX':il1iIi(0x1cd,'[j]d'),'rjTjp':'XwUJn','tOsen':function(iil1ii,IlIlli){return iil1ii(IlIlli);},'FCJYs':il1iIi(0x1a8,'!)*!')};try{$['skipRun']=![],$[il1iIi(0x102,'(mVi')]=![],$[il1iIi(0x1f9,'[j]d')]=![],$['jdToken']='';if($[il1iIi(0xf8,'Pd5@')]||$[il1iIi(0x224,'wxSc')])return;$[il1iIi(0x171,'pqYk')]=await getToken(originCookie,domains);if(!$[il1iIi(0x1d3,'7FrQ')]){if(iil1l1[il1iIi(0x19c,'oR6[')](iil1l1['VHpsw'],il1iIi(0x20f,'lfZg'))){console[il1iIi(0x211,'HSPo')](iil1l1[il1iIi(0x1f8,'oR6[')]),$['message'][il1iIi(0x175,'KS51')](iil1l1[il1iIi(0x113,'7FrQ')]);return;}else llIllI?.['prize']['length']!==0x0?(lIIil1[il1iIi(0x1b9,'oR6[')](il1iIi(0x201,'pqYk')+IIli1?.[il1iIi(0x174,'KS51')]['prize_name']+il1iIi(0x14c,'wxSc')+II1liI?.[il1iIi(0x1a9,'z2eW')][il1iIi(0x1a7,'!E5W')][il1iIi(0x1c2,'Pd5@')]),IlI1i1['is_prize']=l1lIl1[il1iIi(0x10f,'[A3N')]):IiiIlI[il1iIi(0x1e5,'Jqbb')]('抽奖获得:💨\x20空气');}await sendRequest(iil1l1[il1iIi(0x1c7,'1nhA')]);if($[il1iIi(0x1bf,'7FrQ')]||$[il1iIi(0x1e1,'pAXi')]||$[il1iIi(0x1e6,'7FrQ')])return;if(!$[il1iIi(0x106,'uN5)')]){if(iil1l1[il1iIi(0x12f,'HSPo')](iil1l1[il1iIi(0x1db,'z2eW')],il1iIi(0x18d,'ml$4')))lIIiil[il1iIi(0x195,'XMqg')](il1iIi(0xea,'9LaS')+l1lIii?.[il1iIi(0x114,'7u%E')][il1iIi(0x11e,'n0gm')]+il1iIi(0x1df,'#iGb')+I11iI1?.[il1iIi(0x196,'p!&@')][il1iIi(0x1aa,'oR6[')][il1iIi(0x1f3,'LC0B')]),l1lIil['is_prize']=IiiIli[il1iIi(0x104,'ml$4')];else{console[il1iIi(0x169,')DiD')](iil1l1[il1iIi(0x17a,'Pd5@')]),$[il1iIi(0xf6,'jBT9')][il1iIi(0x1f7,'d4JB')](iil1l1[il1iIi(0x11f,'W]zT')]);return;}}$[il1iIi(0x12b,'ml$4')]='',await iil1l1[il1iIi(0x220,'Fkx%')](sendRequest,iil1l1[il1iIi(0x12a,'[A3N')]);if($[il1iIi(0x16b,'HSPo')]||$['outFlag']||$['skipRun'])return;await $[il1iIi(0x216,'[j]d')](0x3e8);if(!$[il1iIi(0x17c,'J&Kr')]){$[il1iIi(0x1f1,'pAXi')]=!![];let i11ilI='';for(let ii1ii1 of $[il1iIi(0x120,'P*Di')][il1iIi(0x138,'7u%E')]||[]){iil1l1['VKPDB'](iil1l1['xnedW'],iil1l1['hwOym'])?i11ilI+='\x20\x20'+ii1ii1[il1iIi(0x197,'pqYk')]+'\x0a':lilIiI[il1iIi(0x222,'wxSc')](''+i1l1I['msg']);}console[il1iIi(0x218,'P*Di')](il1iIi(0x136,'[[j4')),notify[il1iIi(0xfe,'pqYk')](il1iIi(0x1c9,'ml$4'));}$['get_task']=[],await iil1l1[il1iIi(0x148,'(mVi')](sendRequest,iil1l1[il1iIi(0x22d,'wxSc')]);for(let lllil1 of $[il1iIi(0x1f5,'#iGb')]||[]){if(il1iIi(0xec,'[j]d')===iil1l1[il1iIi(0x1e7,'Pd5@')])I1llii[il1iIi(0x10d,'vcOI')](''+lilIll['msg']);else{if(lllil1[il1iIi(0x184,'6#9U')]>=lllil1['max_count'])continue;for(let ilil1I of(lllil1?.[il1iIi(0x1a2,'Jqbb')]||[])[il1iIi(0xf2,'Fkx%')](i11il1=>i11il1[il1iIi(0x22a,'6#9U')]==0x0)){iil1l1[il1iIi(0x1b6,'n0gm')](iil1l1[il1iIi(0x1bb,'W]zT')],iil1l1['dCcMq'])?($[il1iIi(0xdf,'Jqbb')]=lllil1,$['sub_task']=ilil1I,await iil1l1['FmwyY'](sendRequest,iil1l1['pocLf']),await $[il1iIi(0x152,'pAXi')](0x3e8)):Iliiii['get_task']=i1illI[il1iIi(0x1e3,'uN5)')];}}}await sendRequest('get_user_info');if($['runEnd']||$[il1iIi(0x141,'jBT9')]||$[il1iIi(0x1dd,'XMqg')])return;await $['wait'](0x3e8),$['num']=$['get_user_info']['coins'],console['log'](il1iIi(0x1b4,'#iGb')+$[il1iIi(0x18c,'XMqg')]+'次');while($[il1iIi(0x206,'P*Di')]-->0x0&&!$[il1iIi(0x1ee,'[j]d')]){iil1l1['FvFuJ']===iil1l1['fKLAb']?llIlii[il1iIi(0x230,'dwIb')](''+llIlil[il1iIi(0xe2,'!E5W')]):(await iil1l1[il1iIi(0x168,'KSuY')](sendRequest,iil1l1[il1iIi(0x1fe,'KS51')]),await $['wait'](0x3e8),$[il1iIi(0x1b3,'9LaS')]!==0x0&&(iil1l1[il1iIi(0x20a,'!E5W')](il1iIi(0x130,'pAXi'),iil1l1['rjTjp'])?(await iil1l1[il1iIi(0x103,'p!&@')](sendRequest,iil1l1['FCJYs']),await $[il1iIi(0xf5,'j4wO')](0x3e8)):iil1l1[il1iIi(0x162,'uN5)')](IiiIii,IIlll,liliI['data'])));}}catch(illlI1){console[il1iIi(0x1f2,'p!&@')](il1iIi(0x231,'[j]d')+illlI1);}}async function handleResponse(IIIl11,I1lIi1){const iii1il=il1iIl,liiIIi={'aiMer':iii1il(0x19a,'[j]d'),'JqoVv':iii1il(0x22b,'KS51'),'XehqV':iii1il(0x131,'JMxA'),'VZrzs':function(lil11I,Iliii1){return lil11I+Iliii1;},'DSUOV':function(iIiIi,iil1ll){return iIiIi!==iil1ll;},'ktCjy':iii1il(0x219,'c5^('),'OOMHy':iii1il(0x100,'d4JB'),'ejzdr':'get_user_info','cYPcm':function(iiilil,iil1li){return iiilil!==iil1li;},'PUFax':iii1il(0x1ab,'ug^3'),'PSFIR':function(lillIl,iIiIl){return lillIl===iIiIl;},'giTvi':iii1il(0xe1,'dwIb'),'MRDnq':iii1il(0x1ce,'j4wO'),'TWXKL':iii1il(0x1ac,'P*Di'),'VDQyV':iii1il(0x1f4,'#iGb'),'emTcS':iii1il(0x21f,'lfZg'),'uklVX':iii1il(0x21d,'sKeq'),'xNcWn':function(iiilii,li1i1i){return iiilii===li1i1i;},'RpMkP':'ecoUo','PnGlO':'znskD','sfSvX':'do_task','QVFzL':'MiJLB','YJGsZ':iii1il(0x1b8,'[A3N'),'xIeNv':iii1il(0x193,')DiD'),'IizLx':function(IlIli1,illIiI){return IlIli1===illIiI;},'IIDbE':'bmCPx','HWFRo':function(lI1lli,Ill1l){return lI1lli!==Ill1l;},'srnnP':function(llI1Il,ii1iii){return llI1Il===ii1iii;},'dXXaZ':iii1il(0x161,'Zl2I'),'ZywXE':iii1il(0xe7,'z2eW'),'eooaO':iii1il(0x13a,'P*Di'),'jwQSk':iii1il(0x1e9,'Fkx%')};try{if(liiIIi[iii1il(0x215,'YhSo')](liiIIi['ktCjy'],liiIIi['OOMHy']))switch(IIIl11){case liiIIi['ejzdr']:if(I1lIi1)$[iii1il(0xe5,'n0gm')]=I1lIi1;else I1lIi1[iii1il(0x209,'ml$4')]?liiIIi['cYPcm'](liiIIi['PUFax'],liiIIi[iii1il(0x1b7,'7FrQ')])?IliI1I+='\x20\x20'+lI1Iii[iii1il(0x19b,'p!&@')]+'\x0a':console['log'](''+I1lIi1[iii1il(0x125,'KS51')]):liiIIi[iii1il(0x19d,'ug^3')](liiIIi[iii1il(0x153,'Pd5@')],liiIIi[iii1il(0x135,'n0gm')])?(delete llIlll[iii1il(0x21b,'J&Kr')],delete lliii1[iii1il(0x208,'6#9U')][liiIIi[iii1il(0xf4,'pqYk')]]):($[iii1il(0x1e0,'z2eW')]=!![],console[iii1il(0x115,'(mVi')]('❓'+IIIl11+'\x20'+JSON[iii1il(0x12d,'KSuY')](I1lIi1)));break;case liiIIi[iii1il(0x112,'vYeU')]:if(I1lIi1&&I1lIi1['status']===0x0)$[iii1il(0x1b1,'JMxA')]=I1lIi1[iii1il(0x13e,'#iGb')]['access_token'],$[iii1il(0x1a4,'pqYk')]=I1lIi1[iii1il(0x1cf,'vcOI')]['token_type'];else I1lIi1[iii1il(0xe2,'!E5W')]?console['log'](''+I1lIi1['msg']):liiIIi[iii1il(0x144,'XMqg')]!==liiIIi[iii1il(0x1d8,'6LzE')]?($['skipRun']=!![],console[iii1il(0x1f2,'p!&@')]('❓'+IIIl11+'\x20'+JSON['stringify'](I1lIi1))):IIli11[iii1il(0x119,'[j]d')]('❓'+IllIII+'\x20'+ii1li[iii1il(0x214,'ug^3')](IIll1));break;case liiIIi['uklVX']:if(I1lIi1)liiIIi[iii1il(0x1e4,'n0gm')](iii1il(0x179,'Fkx%'),liiIIi[iii1il(0x15d,'d4JB')])?$[iii1il(0x223,'J&Kr')]=I1lIi1['data']:(i1lI[iii1il(0x14a,'W]zT')]=!![],IlI1l[iii1il(0x221,'n0gm')]('❓'+lilIil+'\x20'+i1l11[iii1il(0x1fb,'LC0B')](i1l1li)));else I1lIi1['msg']?console[iii1il(0x211,'HSPo')](''+I1lIi1[iii1il(0x15e,'!)*!')]):liiIIi[iii1il(0x15a,'YhSo')](liiIIi[iii1il(0x194,'Ie(O')],'znskD')?console[iii1il(0x137,'#iGb')]('❓'+IIIl11+'\x20'+JSON['stringify'](I1lIi1)):(Iiil1[iii1il(0x111,'!)*!')]=!![],iiilli[iii1il(0x13b,'uN5)')](''+l1iIIl[iii1il(0x17e,'(mVi')][iii1il(0x16c,'HSPo')]));break;case liiIIi[iii1il(0xe6,'j4wO')]:if(I1lIi1)console[iii1il(0x1ae,'pAXi')](iii1il(0x1d0,'7FrQ')+$['task'][iii1il(0x121,'lfZg')]+iii1il(0x1d4,'6#9U'));else I1lIi1[iii1il(0x159,'1nhA')]?console['log'](''+I1lIi1[iii1il(0x1a1,'Ie(O')]):liiIIi[iii1il(0x22c,'7FrQ')](liiIIi[iii1il(0x187,'n0gm')],iii1il(0x1a5,'d4JB'))?I1l1Ii[iii1il(0x15b,'[[j4')](iii1il(0x14d,')DiD')):console['log']('❓'+IIIl11+'\x20'+JSON['stringify'](I1lIi1));break;case iii1il(0x1a0,'wxSc'):if(I1lIi1)I1lIi1?.['prize'][iii1il(0x199,'J&Kr')]!==0x0?liiIIi[iii1il(0x1dc,'P*Di')](liiIIi['YJGsZ'],liiIIi[iii1il(0x232,'(mVi')])?(lilIl1[iii1il(0x11c,'dwIb')](i1l1ii['name'],'【提示】请先获取Cookie'),i1l1[iii1il(0x1ba,'LC0B')](0x1)):(console[iii1il(0x221,'n0gm')](iii1il(0x146,'n0gm')+I1lIi1?.[iii1il(0x190,'!E5W')]['prize_name']+iii1il(0x164,'9LaS')+I1lIi1?.['prize']['prize_info']['quota']),$[iii1il(0x183,'oR6[')]=I1lIi1[iii1il(0x1bd,'p!&@')]):liiIIi['IizLx'](liiIIi[iii1il(0x227,'7FrQ')],'MceOr')?['终点']['some'](II1i1=>I11iIl[iii1il(0x1fa,'YhSo')]['message'][iii1il(0x205,'JMxA')](II1i1))&&(l1l11l[iii1il(0xde,'oR6[')]=!![],IilIil[iii1il(0x14e,'c5^(')](''+l1iIi[iii1il(0x13d,'W]zT')][iii1il(0xe8,'pAXi')])):console[iii1il(0x222,'wxSc')](iii1il(0x170,'#iGb'));else{if(I1lIi1['msg'])console[iii1il(0x127,'jWf7')](''+I1lIi1['msg']);else{if(liiIIi['DSUOV'](iii1il(0x1e8,'z2eW'),iii1il(0x228,'[[j4')))console[iii1il(0x13b,'uN5)')]('❓'+IIIl11+'\x20'+JSON[iii1il(0x18a,')DiD')](I1lIi1));else{II11Ii[iii1il(0x1ca,'1nhA')](liiIIi['JqoVv']),II11Il[iii1il(0xf6,'jBT9')][iii1il(0x18e,'7FrQ')](liiIIi[iii1il(0x1c6,'Ie(O')]);return;}}}break;case'map_sign':if(I1lIi1)liiIIi[iii1il(0x1cc,'pqYk')](I1lIi1?.[iii1il(0x10a,'P*Di')][iii1il(0x16e,'WJ*^')],0x0)?liiIIi['srnnP'](liiIIi['dXXaZ'],liiIIi['ZywXE'])?I1iIi1[iii1il(0x115,'(mVi')]('第'+lliil1[iii1il(0x21c,'n0gm')]+'关打卡成功,获得:'+IIllI?.[iii1il(0x174,'KS51')][iii1il(0x212,'vcOI')]+iii1il(0x1c8,'1nhA')+lliilI?.['prize'][iii1il(0x145,'HSPo')][iii1il(0x192,'jWf7')]):console[iii1il(0x1b9,'oR6[')]('第'+I1lIi1['sign_total']+'关打卡成功,获得:'+I1lIi1?.['prize'][iii1il(0x1bc,'1nhA')]+'\x20x\x20'+I1lIi1?.[iii1il(0x1c1,'vcOI')][iii1il(0x140,'YhSo')]['quota']):console['log']('第'+I1lIi1[iii1il(0x155,'ug^3')]+iii1il(0x185,'pqYk'));else I1lIi1[iii1il(0xf0,'p!&@')]?liiIIi['eooaO']!==liiIIi[iii1il(0x229,'Fkx%')]?console[iii1il(0x1b2,'WJ*^')](''+I1lIi1['msg']):IliI11['log'](iii1il(0xe9,'wxSc')+i1ll):console['log']('❓'+IIIl11+'\x20'+JSON[iii1il(0x207,'vcOI')](I1lIi1));break;}else I1ilIl[iii1il(0x213,'KS51')][iii1il(0xff,'d4JB')]=liiIIi[iii1il(0x21a,'[[j4')](I11iII[iii1il(0x198,'dwIb')],I1ilIi[iii1il(0x16f,'HSPo')]);}catch(li1i1I){console[iii1il(0x1a3,'Zl2I')]('❌\x20未能正确处理\x20'+IIIl11+iii1il(0x147,'P*Di')+(li1i1I[iii1il(0x204,'Ie(O')]||li1i1I));}}async function sendRequest(illIii){const II11li=il1iIl,ii1il1={'Gehxj':II11li(0x186,'7FrQ'),'KBCuM':II11li(0x22f,'[[j4'),'uuJvZ':II11li(0x108,'Zl2I'),'OxjPv':II11li(0x191,'Fkx%'),'vzCXA':'map_sign','RnAhA':II11li(0x156,'Zl2I'),'yCqru':II11li(0x172,'ml$4'),'BOcZt':II11li(0xf7,'wxSc'),'bToWq':II11li(0x18f,'YhSo'),'FIIWr':II11li(0xeb,'Pd5@'),'aMdoD':function(lllI1I,lillI1){return lllI1I+lillI1;},'qZUwp':function(IlIlii,i1l1i1){return IlIlii===i1l1i1;},'OlKmi':II11li(0x1eb,'dwIb'),'wOxfg':function(liil11,iiillI,l1l111){return liil11(iiillI,l1l111);},'BUUYv':function(l1iIII,llI1I1){return l1iIII===llI1I1;},'UjOmD':II11li(0x203,'Fkx%')};if($[II11li(0x10b,'ug^3')]||$[II11li(0x1d7,'Zl2I')])return;let lI1llI=II11li(0x1a6,'ml$4'),illIil='',Ill1I=II11li(0x182,'1nhA');switch(illIii){case II11li(0x210,'jWf7'):lI1llI+=II11li(0x163,'d4JB'),illIil=II11li(0x13f,'1nhA')+$[II11li(0x13c,'JMxA')]+II11li(0x110,'Fkx%');break;case ii1il1['Gehxj']:Ill1I=ii1il1[II11li(0x225,')DiD')],lI1llI+='/'+$['act_type']+II11li(0x181,'9LaS');break;case ii1il1[II11li(0x178,'jWf7')]:Ill1I='GET',lI1llI+='/'+$[II11li(0x1f6,'Jqbb')]+'/get_task';break;case ii1il1[II11li(0x1d9,'j4wO')]:lI1llI+='/'+$['act_type']+II11li(0x150,'[[j4'),illIil='token='+$['sub_task']['token']+II11li(0xed,'jBT9');break;case II11li(0x177,')DiD'):lI1llI+='/'+$[II11li(0x1fd,'jWf7')]+II11li(0x143,'lfZg');break;case ii1il1[II11li(0x132,'[A3N')]:lI1llI+='/'+$['act_type']+II11li(0x11b,'WJ*^');break;default:console[II11li(0x15b,'[[j4')](II11li(0x1ea,'1nhA')+illIii);return;}const i11iiI={'url':lI1llI,'method':Ill1I,'headers':{'Host':ii1il1[II11li(0x126,'[[j4')],'Accept':'application/json,\x20text/plain,\x20*/*','Accept-Encoding':ii1il1[II11li(0xfc,'XMqg')],'App-Key':$['appKey'],'Accept-Language':'zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7','Content-Type':ii1il1[II11li(0x166,'Jqbb')],'Origin':ii1il1[II11li(0x157,'[[j4')],'Referer':ii1il1['FIIWr'],'User-Agent':$['UA'],'X-Requested-With':II11li(0x1ed,'uN5)')},'body':illIil,'timeout':0x7530};$[II11li(0x12e,'p!&@')]&&(i11iiI[II11li(0x11a,'Pd5@')][II11li(0xe4,'!E5W')]=ii1il1['aMdoD']($['token_type'],$['token']));ii1il1[II11li(0x1af,'ml$4')](Ill1I,ii1il1[II11li(0x109,'P*Di')])&&(delete i11iiI[II11li(0x129,'Ie(O')],delete i11iiI['headers'][II11li(0x17b,'Jqbb')]);const lIli11=await common['request'](i11iiI);if(ii1il1[II11li(0x226,'vcOI')](lIli11['status'],0xc8))ii1il1['qZUwp'](ii1il1['OlKmi'],II11li(0x1e2,'pAXi'))?lilIi['log']('🚫\x20'+l1l11I+II11li(0x20e,'XMqg')+lilIl[II11li(0x15c,'j4wO')]):ii1il1[II11li(0x139,'pqYk')](handleResponse,illIii,lIli11['data']);else{if(ii1il1[II11li(0x160,'Zl2I')](lIli11[II11li(0x149,'c5^(')],0x1a6))ii1il1['qZUwp'](II11li(0x1d6,'vYeU'),ii1il1['UjOmD'])?Iil1II[II11li(0x118,'j4wO')]('❓'+iIIl1I+'\x20'+I1iIli[II11li(0x1ef,'[[j4')](lI1Ill)):['终点'][II11li(0x101,'P*Di')](II1il=>lIli11[II11li(0x16a,'J&Kr')]['message'][II11li(0x1b5,'Ie(O')](II1il))&&($[II11li(0x180,'HSPo')]=!![],console[II11li(0x221,'n0gm')](''+lIli11['data'][II11li(0x1c3,'J&Kr')]));else{if(ii1il1[II11li(0x19e,'p!&@')](lIli11[II11li(0x122,'vcOI')],0x193))console[II11li(0x22e,'9LaS')](II11li(0xf1,'YhSo')),$[II11li(0x1d1,'HSPo')]=!![];else lIli11['status']&&console[II11li(0x137,'#iGb')](II11li(0x1ad,'Fkx%')+illIii+II11li(0x158,'LC0B')+lIli11[II11li(0xe0,'oR6[')]);}}}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)}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。