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

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

/*
逛商品赢红包
可能会403 请使用代理
cron:1 1 1 1 *
*/
const $ = new Env('逛商品赢红包')
var il='jsjiami.com.v7';const i11ii1=iii1II;function iii1II(_0x885974,_0x2ed136){const _0x29416c=Iii11l();return iii1II=function(_0x4c1e3f,_0x53a349){_0x4c1e3f=_0x4c1e3f-0xbd;let _0x4a0264=_0x29416c[_0x4c1e3f];if(iii1II['vjNUGj']===undefined){var _0x3307ad=function(_0x169d8f){const _0x5d89b2='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5c2cc1='',_0x4e414a='';for(let _0x268afa=0x0,_0x36e81a,_0x83a0e7,_0x3b7607=0x0;_0x83a0e7=_0x169d8f['charAt'](_0x3b7607++);~_0x83a0e7&&(_0x36e81a=_0x268afa%0x4?_0x36e81a*0x40+_0x83a0e7:_0x83a0e7,_0x268afa++%0x4)?_0x5c2cc1+=String['fromCharCode'](0xff&_0x36e81a>>(-0x2*_0x268afa&0x6)):0x0){_0x83a0e7=_0x5d89b2['indexOf'](_0x83a0e7);}for(let _0x761bed=0x0,_0x336438=_0x5c2cc1['length'];_0x761bed<_0x336438;_0x761bed++){_0x4e414a+='%'+('00'+_0x5c2cc1['charCodeAt'](_0x761bed)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4e414a);};const _0x352e7a=function(_0x42ad11,_0x5f5262){let _0x1c3f8c=[],_0x581259=0x0,_0x1041fc,_0x439dec='';_0x42ad11=_0x3307ad(_0x42ad11);let _0x551499;for(_0x551499=0x0;_0x551499<0x100;_0x551499++){_0x1c3f8c[_0x551499]=_0x551499;}for(_0x551499=0x0;_0x551499<0x100;_0x551499++){_0x581259=(_0x581259+_0x1c3f8c[_0x551499]+_0x5f5262['charCodeAt'](_0x551499%_0x5f5262['length']))%0x100,_0x1041fc=_0x1c3f8c[_0x551499],_0x1c3f8c[_0x551499]=_0x1c3f8c[_0x581259],_0x1c3f8c[_0x581259]=_0x1041fc;}_0x551499=0x0,_0x581259=0x0;for(let _0x262f38=0x0;_0x262f38<_0x42ad11['length'];_0x262f38++){_0x551499=(_0x551499+0x1)%0x100,_0x581259=(_0x581259+_0x1c3f8c[_0x551499])%0x100,_0x1041fc=_0x1c3f8c[_0x551499],_0x1c3f8c[_0x551499]=_0x1c3f8c[_0x581259],_0x1c3f8c[_0x581259]=_0x1041fc,_0x439dec+=String['fromCharCode'](_0x42ad11['charCodeAt'](_0x262f38)^_0x1c3f8c[(_0x1c3f8c[_0x551499]+_0x1c3f8c[_0x581259])%0x100]);}return _0x439dec;};iii1II['hinrZs']=_0x352e7a,_0x885974=arguments,iii1II['vjNUGj']=!![];}const _0x4b132f=_0x29416c[0x0],_0x4831f9=_0x4c1e3f+_0x4b132f,_0x275668=_0x885974[_0x4831f9];return!_0x275668?(iii1II['DqodyL']===undefined&&(iii1II['DqodyL']=!![]),_0x4a0264=iii1II['hinrZs'](_0x4a0264,_0x53a349),_0x885974[_0x4831f9]=_0x4a0264):_0x4a0264=_0x275668,_0x4a0264;},iii1II(_0x885974,_0x2ed136);}function Iii11l(){const ii1ill=(function(){return[...[il,'tVYBjNgrsJSyjQniEamWgIi.UtcKEoCmIV.MvBh7==','zLDsWPtcHcS','W7fAWQpdHWi','nCk2W4aYW4e','nJj8neDHhd4DW5Hv','W6VcOmksWQLBWOpdQx/dH8o5W4W','qhRdOCkqW64','xSkWWQtdTxVcOWZdIbZcUKBdR8kmW41VWQrbW7ThW78PWQxcUJ9Zr8oNW7q6W6BdJ8oq','yg4PEW','WOpcP8o+BW','x8kmW4hdMYq','WRBcQvykqSkzW7fIuqHQ','5PY+6ycO6l+X','6lAV5yYs5Pso5PsT','fmoRW7ZdNW','DvfcWPxcHde','D8kwW7RdPb54lmkoeCkpB1ddV8kXcCk7khVdRW','aaVcL8opn0n9eCkxWPCWW6/cMcRdI8kbbCkZm0hcQSkwW6LzjN5mWOCBWPxcQXJdGbmnW4ZdKmoDqmk4y8o/W7hdILtcLwZdRXKvdmkBamkwjCoIemoqtCkcWPVdH8ocxr99C8kRW67cM8oxiv9LxW','W75hB8oDW7e','WRBcSCoaCCkT','z2tcUCo5W6ddM1/dVc3dUSowfeGO','CLhcJvVcGq','W43cPSkSWRPw','wSk3WQ1A','WRTzW4JdLxv9W4FcQSoh','dG17mmosu8oBWRhcGa','ECkZlWS3','WQdcPviix8kiW6XF','E00ZW79U','rCk1WO1FBW','WQbKlv9llHnw','E8kMbcW7da','tWu6jCknsmkgWQVdJguA','wxBcOa','WPzXfq','zLDbWP3cMtSWtL3cSsa','x8kMWOlcLSk1','WPVdGKOUcfy','amk3W6RdPa','qgddKSk4W7vTWR3cIa','4P+fW4xOH7tMNyNOVRJOOjZPG4BLIB3KUy/PLPVORiVcSq','WOmOW74VWRBdIMHoW6hcHG','DG7cG8kW','smkmW6hdKX4','WOhdG1aBfqJdV3dcGqtdNCkAWOVcSwmzCWq2q8kgmxn4W74VW7tdPCouzHyhWQFcOmoDWPZdNCkRW5FcSJRcTsz/bbVcPwNdNW','e8oQW7VdLmkuWOrXAmkCW63dLbbmW6pdQCkVWPymda','WOjyjG','W54Ty23dKXy8hmk7wJLD','cSkuW649W6m','CXxcVmoirCkAaszMtZSijmkDW6/dJurovfFcVSkdW4mNWP1X','W55uWQeZWPa','kcfFW7zX','W68YF2hdHa','W4PHWR4sjG','zMa5yW','W5jUWQqgWRNcGG','W7SdqmkmWPBdS1BdQq','jSkxmej2dSoiW6GcW48SkYpdISoxmt0gW63dS8okWQbUW7DYxSo2WR3cU0FcUmocma','W5/cHSkznXa','4P64W6BOHO3MNlFOVjlOO7dPGj3LIAZKU4FPL6lOR4VdVa','WRZcTviTva','WPfkowtdTa','ga3cISofitCZu8kc','W71uWQWuWRy','WOjTaahdGq','WPTTasldNSoeDwFcMmkFnmoMW5ry','WRZdPSorW7CnW5xdK1/dMmoIW64V','fCkNmW','WQzoqbL8pcJdLNzUWOHAWRWw','W4nMWQeg','WRrVBZrG','W5DjvmobW7Tf','WOaSW7GnWRtdLKDgW7a','w3dcS3hcN2rVpmkVWOufitS','kSkujW','W5hdNe/cHW','W4DxWOm4WQq','WPLnff7dPCk2','W4hcImkHea0','W5FdObZdMq','g8oHW6VdLCkmWPnG','g8kGW7ZdSZNcOHNcI2pdRbpcTq','WQjfW4xdIMG','W51jz8ofW44','x8ktW5vsBKhcO0m3qmoAy8oSomorW6RdSCotaSoe','y0elW5H7WQ5E','imkdW68QW7m','W4O2F2RdIqaMgW','aCkfW5qZW7VcHGrC','W53cHHzCuGBdQc/cQGxdUCoBWRC','WQH5pvPzjbTarmkPivLFW4e','44ga5O6P56sd44kF6k+Y5yEG6iYT5y6TW6nsvmk9WRpcRa','W4RdTbldN0ldG8kytmolWOzPWO7dVmoa','W6nRWPW','cX/dJmoCvW','gmkSiSouW4e','qslcNmoVzCkVntXkCHe2dCkG','4P+4j+AFOUIcJ+AUV+EINUwNQ+EqO8kx','W5v0WRSBWRVcNSkcqmozW6PpW5NdQW8','AuemW6mVWRPp','DNZdMSk6W5DPWQtcHmo0WRyZW6lcSG','a8kGECoEW6SkW7ZcH8k/W5f+dW/dV8k8tmkGhSkBWQlcOmoUkq0ZW4TgW6JcRSkQW5pdQCoIxmodWP7cLKTFW5O6W6pdIdZcSCoErG','W6ukeuKTEM3cSYSGWOHkWRSbj8kS','WO9ouq9o','omkdbmoVW6a','C8kBW63dVWHM','WOXelmk0WPFdU3tcVSoOuKldVCo8nq'],...(function(){return[...['WRFcUuiivCkoW7f5wHLKjSkQW5u','dCkgomoXW4ddVG','cfCI','WQddUColW6OwW4FcJG','W4vwWPqDoCk1W6vkWQH0fXpdMhXes1dcKf1EWQS','WRi9W58','sSkQWOBcICkRWQZcLSkTkMlcG8kOW7ndWRCSWOddRMW','gSkNoCoTW4LdW7lcHSoRW44auvu','bqZcHa','dXX+omooumobWP7cL39f','W6VcSmkvWQLtWOm','gSk9j8oPW4PlW4VcJSoWW4uXvKdcQG','5OIV5lMa77Y556QA5Ro3','hqZcHSoB','W7r2WP/dVWrqiwaFAcS','jCkflL9R','CgVdGW','WP3cVwNcHvv3','WPX5k0fWkXTa','wgRcOa','wSkMWQa','WQvLkq','koAkTUs7UE++KW','WRLuvW58psldH3X3WO9bWR8w','emopW5npyepcVqKluCoSB8oTlSo9W64','a8obW6hdTSkN','WPWwW4vizCkDW5rFWOHJca','W47dObJdIa','WPNcH0BcIKu','WPNcL8ojwb0TW6ldOfJcOIu','W7HTWRG9WP8','WPtcVg0','W4v6A8oIW6W','WONcNCoAqa','bWJdNq','WPdcISoHtSkH','W4CwpLRdPCk0WRK9W6pcQSo5BSk8WQBcHbSUcmoWCSkGW5XF','r8ouACkGWPFcVSoNWRdcMM/dHSkS','WQJcO0y','bmkRW5VdHcS','WRXkW4JdM1rgW5tcPSowoCkuWQC','zMFdHCkJW5vRWRNcI8oI','BeBdG8kcW54','dGXQoSozr8obWOxcNg5lbCoTfW','WOvwla','tSk9WR1Mfe/dRMRdQqBcU0O6WPpcKSoq','bCkxp8oYW4S','W6BcVmkg','W4XrWOqtjCkNW6vbWR52bqi','W7GfESkKWQG','xJJcMa','uSkQWRDDqgRdQG','WQ7cS8oLBSkv','WOJdVuxdGbldJmozySkyWO07WOdcQa','E0WYdefoW7RdRtXVW6G','D2tcUCoS','yxNcPSoMW74','W7ymv8kb','uXqgwGldNCkhFG','WPzRecRdL8o1FxRcK8kid8oZW5XQW4JdMSoeW7VdRvXE','W5ddNeBcJSoYWOKeWPWirvGTW5BdTW','WPuGW7q','W4zIWQWAWRpcHa','W61+WQxdRdi','WPTCl0BdO8kS','gqVdLSo8rW','AwRcPa','CxqVqr9hoa','FveBW4H/WRPih2pdU8kkW7tdU8kA','W6PmWPGimSkeW7qFWPLUeGi','AxJcSW','WR7dJdtdU0tdUSknjHBdISoeCWLB','ESkzW53dVJC','Amk4WRnava','hmkMn8oVW5XwW7lcRSo3W5mQwe/cQ8o1r8k6Bmko','WQPLi0nslWjmrCkZkvrtW4m','W6BcVmkgWOvoWP8','wfhdH8kGW68','WO7dKLaNcvxcUthcSWddLCoaWPpdRa','W4NOR47MSiNLK6pLUjJdUa','zgnUWOxcMG','y8kkW6ddNLjkoCkTb8kqqfVdVSkZhSkM','BM45DHvrjaKXW6rRrCo6EG','W6P8WO8','pCo7uxrKtCof','WRtcVKJcNfS','FK80cK5wW53dJq9FW5m','FePLw0y','yGdcHmkIWQdcLq','bSoxWPmcmrVcHKa6yCodyq','WR5UW5JdV1O','pbr2CXi','FwFdG8k6W4G2W7/dGSo6WQGzWQlcQ8kgWORcS3fHWOn+W4jJWQr6hh0whCoOr05aWPKetmksW7FdTrNcIG8AWRO3rSoJvZ/cTrJcJ3hdPmow','u8kGWQm','WRP/lvbBoqv3t8kQdKPwW5C','jSkeneDWaW','qG/cRSoesq','W6mFwSkOW5BdLvldUfCsWP7dLSkaytxdPG','W5XqWPmy','WR7dGfmfeW','WQTxiqNdLq','WRddIJpdLe/dTCkh','W43cLSk1','W5Dzu8obW7nfWPJcVSkwWO1HW7GJdG','W4ldTSouC8khW5yFbq','W4vmWPe','hSkql8oWW4JdPa','omo0wh1HsCoauKhdJSo6WP/cSq'],...(function(){return['WOLResJdNmozA1dcK8kCg8o1W51o','WRZdKcpdTW','gHRcLmoEnH0HD8kjWOmW','5P2p6yc+6l6c','W48SF2ddGrSLcSkCqbftaW0','A8kSbd0','5y+65lU25OIk5AAC','ASkSdtq4hCkeDKVdMmoAWQpcQW','W5ddSwpcKmoV','WP1onSkLWONdUNpcNSoPwMS','WQLeW4xdLG','CNBdG8kjW5rJWRVcHmo+WO4rW6dcS8on','WPiNvCk0W4JdTmo/qGG','x+ISLoAWNUwMQoI2ISkQ4PYZW7y','WPTGomk8WRO','WOFcHeSJfHO','v3iOCd5cmc8','grH9oa','W6hdJcJdLg0','WRVdLJtdSuZdOCkonW','W5JdPqFdTum','WPC+vG','CHRcICkNWQZcGCkjW6yPW5ClWO7cGSkg','WOBcGCoz','W5XZWRWcWQ/dISoacSohW6XSW5tdVq3dUa/dHKVcKLKkW5FdQG','W4tdKKlcIG','FeeCW4n1WR0','8kAkJ2u','ygRcOmoO','W4P+bCkOW6O','W4JdSJ/dLMm','WRTviJNdVa','W4jZfCkKW73dIa','FSknW7VdTWLxpCk3b8kFC0pdTmkla8kNn1tdP8kYW6q','prP0wWrOW4JdKbfBW58','t8k/WOTHqG','w8kyW5i','bHtdNq','WQb5aLXziXG','erzU','BLtcKgtcUa','tSk3WPBcKSk1WRlcJ8kjn2xcPmkUW7bl','BqdcJq','yHJcRmoy','i8kza8oTW7a','wmkQWQP7ya','a0GQxtxdPCkNvatcJSkDr38','WRPIiunoiXHcA8k+g1feW41HAW','W6/cQ8kv','zLDhWONcJIW3','y1CF','WOxcTmoUu8o3W747pItcL2lcMJNcHZ9c','zCkSbW','W4PlWPCsnmkpW7m','yu4nW7DFW7RdJZ/dLq','uZtcI8oLB8kY','Av4rW5S2W6LFkgddOmkkW7ldUSofq18l','WR7cGKyrgW','W5ddHhlcQ8ox','W7RcKmknbG0JW7iFWQZdTCkfW4NdRSkx','W58khxFdP8k3WOzD','W7OCWPNcLIucWPBcISohkmkyWPVdIa','eY5EW5zk','AahcICkOWRZcLSkFW4C','WPTCpe/dVSk8WRLBW5/cQCo0','W53dLLZcISoSWPu','BW5Vgg3cNCoO5BYN5AA/44oX5lMF5lIO6ls85y2z','CwxcP8oSW7JdVutdUINdVCo1','joIVVoAYLUwMUoI2QCkE4P63WRxMLQlLKzNLUitMLiJMJyC','u8k6WQzpt1ldQNddQqNcIfiWWQVcJ8orzXb7W64c','ECkHbYKZ','W4v/WR0gWQ8','cmk6lCovWPbKW6FcJCoHW4Wfu07cQCoIwG','W4rcWQxdKr0','WPVcVgFcTfb2W7ZdKCk9W4ldM39bWPe','WPNcO8oKAmkJW5S/','WOmFe8kCWQzCWQhcTSk9WO1f','FSkxW74','W6eyqmkdWOBdPeddIfCjWRNdImklFq','WO1/gZ/dVCoFAMpcGSkcfCoP','DxNcRCobWRNdVeRdTYFdUmowfeyGaJa','xCoHW4xdJIFcRIhcTW','eCoGWQ5kyMldOgpdPq8','dmkmmCo8','WOi7W7ugW67dU01nW7dcI1/cQ8kSWPXxna','beCXwYJdMq','ybZcMCkTWQ7cNmkxW5eIW5qKWP3cI8kq','WO/cM8onwGa8W7/dNq','WPxcPCoJCSkTW5i','tCkvW4vyBfZcVxq8q8oVEmoLlG','vY/cI8o+yCkipX5k','WP9MbG','W6VdKZldILy','ymkDW67dTXvSk8kgdmkAAq','hCkPW5dcSmoMWPtcLmkVdYxcGmkbW7H6WPyRWOZdKZ3dUmkRW4y5WRRcGCo0WOLq','WP0GW68LWPxdMefk','gmoLW7xdGW','WPVdKKadcuy','W7RcKmkmjGC0W6q','W5DMWRWrWRq','daTWeCkjDSotWRxcNhvSg8oMcW5/','W6ectSkf','zSkxW4ZdPHDTkSkma8kpyW','WOJdLfaccvW','hSktlmo1W4BdQCooWQlcKfxdPCoOWRP1W7yVW4u8f8oPt1hdNdVdMSooWPVdN8okWOflomkC','WOHDpwFdQa'];}())];}())];}());Iii11l=function(){return ii1ill;};return Iii11l();};(function(lllI1I,lillI1,IlIlii,i1l1i1,liil11,iiillI,l1l111){return lllI1I=lllI1I>>0x2,iiillI='hs',l1l111='hs',function(l1iIII,llI1I1,IlIlil,lIli1I,II1il){const liil1I=iii1II;lIli1I='tfi',iiillI=lIli1I+iiillI,II1il='up',l1l111+=II1il,iiillI=IlIlil(iiillI),l1l111=IlIlil(l1l111),IlIlil=0x0;const lllI11=l1iIII();while(!![]&&--i1l1i1+llI1I1){try{lIli1I=-parseInt(liil1I(0x14b,'!c*Y'))/0x1*(parseInt(liil1I(0xf9,'WiQ^'))/0x2)+parseInt(liil1I(0x17c,'[PB@'))/0x3+parseInt(liil1I(0xfc,'DaUu'))/0x4+parseInt(liil1I(0x10e,'9*1#'))/0x5+-parseInt(liil1I(0x145,'*yl#'))/0x6*(-parseInt(liil1I(0x15b,'OW#9'))/0x7)+-parseInt(liil1I(0x1d1,'5VOL'))/0x8+-parseInt(liil1I(0x1ba,'8gh&'))/0x9*(-parseInt(liil1I(0xdd,'NI*h'))/0xa);}catch(I1lIll){lIli1I=IlIlil;}finally{II1il=lllI11[iiillI]();if(lllI1I<=i1l1i1)IlIlil?liil11?lIli1I=II1il:liil11=II1il:IlIlil=II1il;else{if(IlIlil==liil11['replace'](/[rKgMUBYCWyJENSQnItVh=]/g,'')){if(lIli1I===llI1I1){lllI11['un'+iiillI](II1il);break;}lllI11[l1l111](II1il);}}}}}(IlIlii,lillI1,function(I1lIli,II1ii,IIIIII,lillII,ii1ilI,lI1ll1,iIiI1){return II1ii='\x73\x70\x6c\x69\x74',I1lIli=arguments[0x0],I1lIli=I1lIli[II1ii](''),IIIIII=`\x72\x65\x76\x65\x72\x73\x65`,I1lIli=I1lIli[IIIIII]('\x76'),lillII=`\x6a\x6f\x69\x6e`,(0x173a3d,I1lIli[lillII](''));});}(0x2f4,0x61ef4,Iii11l,0xbf),Iii11l)&&(il=0x9e9);const jdCookie=require(i11ii1(0x161,'0YY#')),notify=require('./utils/Rebels_sendJDNotify'),common=require(i11ii1(0xc7,'!c*Y')),{H5st}=require(i11ii1(0x1fb,'DaUu')),isNotify=![];let cookie='',activityId=i11ii1(0x16d,'qLVv'),workflowId=i11ii1(0x17f,'olAy'),pageId=i11ii1(0xf7,'9*1#');const cookiesArr=Object[i11ii1(0x19e,'olAy')](jdCookie)[i11ii1(0xe5,'z9GY')](iIli1l=>jdCookie[iIli1l])[i11ii1(0x1af,'[P2C')](i1i1II=>i1i1II);!cookiesArr[0x0]&&($[i11ii1(0x1a6,'JbFE')]($[i11ii1(0x1c7,'&D)8')],i11ii1(0x1d3,'*yl#')),process[i11ii1(0x18f,'0YY#')](0x1));!(async()=>{const IlIliI=i11ii1,liiIIl={'lTFjG':function(iil1iI,IlIllI){return iil1iI<IlIllI;},'RRCvq':function(il1i1I,lI1li1){return il1i1I+lI1li1;}};notify[IlIliI(0xfb,'NI04')]({'title':$[IlIliI(0x16f,'g4Xb')]});for(let iI11II=0x0;liiIIl['lTFjG'](iI11II,cookiesArr['length']);iI11II++){if(IlIliI(0x1e0,'g!y[')===IlIliI(0x12e,'08om')){$[IlIliI(0x1ca,'[8aN')]=liiIIl[IlIliI(0x16b,'&D)8')](iI11II,0x1),cookie=cookiesArr[iI11II],common[IlIliI(0x1c0,'0blX')](cookie),$['UserName']=decodeURIComponent(common[IlIliI(0x11a,'a[st')](cookie,IlIliI(0x1c5,'!c*Y'))),$[IlIliI(0xd6,'0YY#')]=notify[IlIliI(0x11e,'Z0uP')]($[IlIliI(0x12c,'O0sa')],$[IlIliI(0x1f5,'yYXG')]),$['nickName']='',console[IlIliI(0xf6,'jo]n')](IlIliI(0x151,'NI*h')+$['index']+'】'+($[IlIliI(0x16e,'0blX')]||$[IlIliI(0x19f,'a[st')])+IlIliI(0x1e6,'8gh&')),$['UA']=common[IlIliI(0x13c,'0YY#')]($[IlIliI(0x11f,'[PB@')]),$[IlIliI(0x1f7,'0YY#')]=common['genRandomString'](0x5a,IlIliI(0x1a9,'wINZ'))[IlIliI(0x175,'cA3x')](),$['fp']=common['genRandomString'](0x20,IlIliI(0x1de,'tBu*')),await Main(),common[IlIliI(0x152,'z9GY')]();if($['runEnd'])break;await $['wait'](0x3e8);}else lilii[IlIliI(0x114,'9*1#')]['completionFlag']=!![];}isNotify&&notify['getMessage']()&&await notify['push']();})()[i11ii1(0x172,'[P2C')](ilil1i=>$[i11ii1(0xef,'8gh&')](ilil1i))['finally'](()=>$['done']());async function Main(){const l1iII1=i11ii1,IlIIi={'oxImw':l1iII1(0x112,'NI*h'),'cwYUI':'boolean','xfKfp':'Amshb','ISdfj':l1iII1(0x198,'1ZHU'),'JRNdi':function(illlII){return illlII();}},IiI1l=await common[l1iII1(0xf1,'5VOL')](cookie);if(!IiI1l&&typeof IiI1l===IlIIi[l1iII1(0x149,'iTNT')]){console['log'](l1iII1(0x185,'4%dk'));return;}try{if(IlIIi['xfKfp']!==l1iII1(0x1ac,'3I48'))II1lii['log'](lIIii1['msg']),[IlIIi[l1iII1(0x1a8,'V&b&')]][l1iII1(0x162,'^ruk')](IiI1i=>I1iIi1['msg'][l1iII1(0x196,'yYXG')](IiI1i))&&(lliil1[l1iII1(0x197,'9*1#')]=!![]);else{const llll1=IlIIi[l1iII1(0x1b7,'[P2C')][l1iII1(0xe4,'jMDx')]('|');let lil11l=0x0;while(!![]){switch(llll1[lil11l++]){case'0':await $['wait'](0x3e8);continue;case'1':if($[l1iII1(0xe3,'!c*Y')])return;continue;case'2':$['redhot']=![];continue;case'3':await doTask();continue;case'4':await IlIIi['JRNdi'](lottery);continue;case'5':await $['wait'](0x3e8);continue;}break;}}}catch(i1i1Il){console[l1iII1(0x136,'1ZHU')](l1iII1(0x1a0,'4%dk')+i1i1Il);}}async function doTask(){const iiill1=i11ii1,I1lIl1={'tKyxA':function(lil11i,IlIIl){return lil11i!==IlIIl;},'ohoJK':iiill1(0x18a,'OW#9'),'yNduk':function(lI1liI,i1i1Ii){return lI1liI===i1i1Ii;},'ZQWpU':function(lllii,iI11Ii){return lllii(iI11Ii);},'pQXyq':function(iIII1l,lllil){return iIII1l*lllil;},'xsrJx':'luban_executeWorkflow','MtXMC':function(iI11Il,iIII1i){return iI11Il(iIII1i);},'VcwRx':function(iil1i1,il1i11){return iil1i1===il1i11;},'BwWjo':iiill1(0x1a7,'3I48'),'oyHSg':function(IlIll1,IlIII){return IlIll1===IlIII;},'pvVeK':iiill1(0x1c4,'[P2C'),'fkYOm':function(ilil1l,illlIi){return ilil1l(illlIi);}};console[iiill1(0x15c,'cA3x')]('开始做任务领红包'),$['qryH5BabelFloors']='',await sendRequest(iiill1(0x157,'g!y['));if($[iiill1(0x142,'FqTn')]){if(I1lIl1[iiill1(0x11d,'JbFE')](I1lIl1['ohoJK'],iiill1(0x1c6,'4%dk')))lIIiii[iiill1(0x111,'45GH')][iiill1(0x168,'DaUu')]?I1l1II['log']('抽中:'+IIli1I[iiill1(0x1f1,'jo]n')][iiill1(0x15d,'tELj')]['4'][0x0][iiill1(0x1d0,'V&b&')]+I1i11I[iiill1(0x1ec,'1ZHU')][iiill1(0xce,'1ZHU')]['4'][0x0]['prizeName']):llIliI['log'](iiill1(0x1ef,'tELj'));else{let IiI1I=$['qryH5BabelFloors'][iiill1(0x17d,'8gh&')][iiill1(0x1da,'[P2C')]||[];for(let illlIl of IiI1I){const i11ill=illlIl[iiill1(0x16a,'08om')][iiill1(0x1c1,'$!8t')]||0x0,IIIIIi=illlIl[iiill1(0x18c,'z9GY')]||![],IIIIIl=illlIl[iiill1(0x13f,'8gh&')][iiill1(0x169,'wINZ')]||'',I1lIil=illlIl[iiill1(0x116,'9*1#')],IIIl1i=illlIl[iiill1(0x1cc,'DaUu')];$[iiill1(0x10a,'OW#9')]=illlIl[iiill1(0x138,'qLVv')],console[iiill1(0x143,'9*1#')]('['+$[iiill1(0xea,'oyx0')]+']\x20'+I1lIil+'/'+IIIl1i);if(!IIIIIi){if(I1lIl1['yNduk'](iiill1(0x103,'wINZ'),iiill1(0x1a3,'cA3x')))lili1[iiill1(0x129,'wKDS')]=!![];else{if(i11ill===0x9&&IIIIIl==='shoppingActivity'){const IIIl1l=illlIl[iiill1(0x133,'DaUu')]['waitDuration']||0x0;$[iiill1(0xed,'g!y[')]=illlIl['encryptAssignmentId']||'',$[iiill1(0x123,'&D)8')]=illlIl[iiill1(0x1d5,'jo]n')][iiill1(0x13e,'yYXG')][0x0][iiill1(0x1d7,'g!y[')]||'',$['action']=0x1,await I1lIl1[iiill1(0x137,'$!8t')](sendRequest,'luban_executeWorkflow'),await $[iiill1(0x1bd,'[P2C')](I1lIl1[iiill1(0xf3,'hvrm')](IIIl1l,0x3e8)),$['action']=0x0,await I1lIl1[iiill1(0x13b,'g!y[')](sendRequest,I1lIl1[iiill1(0x1b8,'08om')]);}else{if(i11ill===0x9&&IIIIIl===iiill1(0x1ee,'g!y[')){const lllll=illlIl[iiill1(0x1f3,'a[st')][iiill1(0x15e,'08om')]||0x0;$[iiill1(0x188,'cA3x')]=illlIl[iiill1(0x1e9,'qLVv')]||'',$[iiill1(0x178,'!c*Y')]='1',$[iiill1(0x102,'v3NZ')]=0x1,await sendRequest(iiill1(0x1e7,'DW4F')),await $[iiill1(0x1a2,'NI04')](lllll*0x3e8),$['action']=0x0,await I1lIl1[iiill1(0x182,'cA3x')](sendRequest,I1lIl1[iiill1(0x1b5,'!c*Y')]);}else{if(I1lIl1[iiill1(0x1b2,'4%dk')](i11ill,0x8)&&IIIIIl===I1lIl1[iiill1(0x18b,'FqTn')]){const i11ili=illlIl[iiill1(0x1d5,'jo]n')][iiill1(0xcb,'[8aN')]||0x0,iil1l1=illlIl[iiill1(0x1d5,'jo]n')][iiill1(0x1c9,'olAy')]||[];$['encryptAssignmentId']=illlIl[iiill1(0x1a5,'g4Xb')]||'',$[iiill1(0x1dc,'a[st')]=I1lIil;for(let lllli of iil1l1){if(I1lIl1[iiill1(0xca,'olAy')](I1lIl1['pvVeK'],iiill1(0xc3,'OW#9'))){if($['completionCnt']>=IIIl1i)break;const iiili1=lllli['status'];if(iiili1!=0x2){const ill11i=iiill1(0xd8,'&D)8')['split']('|');let lllill=0x0;while(!![]){switch(ill11i[lllill++]){case'0':$[iiill1(0x1ea,'g!y[')]++;continue;case'1':$[iiill1(0x1d6,'jMDx')]=lllli[iiill1(0xfe,'WiQ^')];continue;case'2':await $[iiill1(0x128,'iTNT')](i11ili*0x3e8);continue;case'3':await sendRequest(iiill1(0x154,'0YY#'));continue;case'4':$[iiill1(0x12f,'O0sa')]=0x1;continue;case'5':await I1lIl1['fkYOm'](sendRequest,I1lIl1['xsrJx']);continue;case'6':$[iiill1(0x146,'wINZ')]=0x0;continue;}break;}}if($[iiill1(0x197,'9*1#')])break;}else lI1Il1[iiill1(0xd2,'8gh&')]('❓'+lilIi1+'\x20'+IiilII['stringify'](IliI1I));}}}}}}if($[iiill1(0x170,'5VOL')])break;}}}}async function lottery(){const lIli1i=i11ii1,I1lIiI={'QISBl':lIli1i(0xf4,'cA3x'),'ZuruW':function(lllili,IliiiI){return lllili!==IliiiI;},'xXfxt':function(Ill11,liiIII){return Ill11-liiIII;},'kcGmZ':lIli1i(0x17b,'V&b&'),'yUtHe':function(li1i11,iI11I1){return li1i11(iI11I1);},'jSiAL':lIli1i(0x130,'cA3x')};$['qryH5BabelFloors']='',await sendRequest(I1lIiI[lIli1i(0x107,'08om')]);if($['qryH5BabelFloors']&&$[lIli1i(0x173,'1ZHU')][lIli1i(0x1fa,'tBu*')]){let il1i1l=$['qryH5BabelFloors'][lIli1i(0xf5,'[PB@')];if(il1i1l['chances']!==undefined&&I1lIiI[lIli1i(0x1df,'tBu*')](il1i1l[lIli1i(0x1f0,'45GH')],undefined)){let IlIlll=I1lIiI[lIli1i(0x1ab,'*yl#')](il1i1l[lIli1i(0x144,'DW4F')],il1i1l[lIli1i(0x105,'DW4F')]);console[lIli1i(0xcf,'!c*Y')](lIli1i(0x115,'a[st')+IlIlll+'次');for(let IIIl1I=0x0;IIIl1I<IlIlll;IIIl1I++){I1lIiI[lIli1i(0xd7,'FqTn')](I1lIiI[lIli1i(0x1cb,'OW#9')],'Fvdsi')?($[lIli1i(0x1e1,'cA3x')]=0x2,await I1lIiI[lIli1i(0xcd,'a[st')](sendRequest,I1lIiI[lIli1i(0x1aa,'[P2C')]),await $[lIli1i(0xbe,'&D)8')](0xbb8)):lI1Iil['subCode']==='0'&&(lilIil[lIli1i(0xc0,'k&9R')]['successRewards']?lilIii['log']('['+i1ill1[lIli1i(0x165,'NI04')]+']'+iIIl1l['msg']+lIli1i(0x1f9,'z9GY')+llIli1[lIli1i(0x16c,'cA3x')]['successRewards']['4'][0x0][lIli1i(0x1cf,'3I48')]+iliIII[lIli1i(0x183,'5Ak*')][lIli1i(0x1d4,'&D)8')]['4'][0x0]['prizeName']):iIIl1i[lIli1i(0x134,'jMDx')]('['+I1lllI[lIli1i(0x113,'3I48')]+']'+ill111[lIli1i(0x1eb,'45GH')]));}}}}async function handleResponse(IlIlli,il1i1i){const IIIII1=i11ii1,lil111={'uEyPJ':'未通过','bbnqt':'itemId','XMYhJ':IIIII1(0x104,'tELj'),'Wwwnu':function(i11ilI,ii1ii1){return i11ilI===ii1ii1;},'zzIqN':'luban_executeWorkflow','ZthSy':function(llllI,lllil1){return llllI===lllil1;},'srQmd':'fSHvx','UiVZU':function(iil1il,ilil1I){return iil1il===ilil1I;},'aTLNy':function(i11il1,ii1iiI){return i11il1!==ii1iiI;},'FTJOl':'giJUr','uiKTt':IIIII1(0xd1,'^ruk'),'kmMrD':function(lllilI,ilil11){return lllilI!==ilil11;},'EoHzg':IIIII1(0x155,'9*1#')};try{switch(IlIlli){case lil111[IIIII1(0x121,'&D)8')]:if(lil111[IIIII1(0x106,'5VOL')](il1i1i[IIIII1(0x110,'oyx0')],'0')&&il1i1i[IIIII1(0x135,'yYXG')])$[IIIII1(0x15f,'z9GY')]=il1i1i[IIIII1(0x13d,'NI*h')]['102983671']['providerData'][IIIII1(0xdc,'tELj')];else il1i1i['errorMessage']?console[IIIII1(0x1f6,'$!8t')](il1i1i['errorMessage']):console[IIIII1(0xd2,'8gh&')]('❓'+IlIlli+'\x20'+JSON[IIIII1(0x191,'1ZHU')](il1i1i));break;case lil111[IIIII1(0x195,'0YY#')]:if(lil111['ZthSy']($[IIIII1(0x1bf,'OW#9')],0x0))IIIII1(0x12d,'&D)8')!==lil111['srQmd']?lil111[IIIII1(0x148,'Z0uP')](il1i1i[IIIII1(0x171,'4%dk')],'0')&&(il1i1i[IIIII1(0x118,'JbFE')][IIIII1(0x125,'NI04')]?console[IIIII1(0xf6,'jo]n')]('['+$[IIIII1(0x1d2,'yYXG')]+']'+il1i1i[IIIII1(0x199,'$!8t')]+',抽中:'+il1i1i['rewardsInfo'][IIIII1(0x10f,'08om')]['4'][0x0][IIIII1(0x122,'oyx0')]+il1i1i['rewardsInfo'][IIIII1(0x125,'NI04')]['4'][0x0][IIIII1(0x190,'[8aN')]):console['log']('['+$[IIIII1(0x1b9,'08om')]+']'+il1i1i['msg'])):(llIllI[IIIII1(0x100,'0YY#')]('['+I1ilI1[IIIII1(0x1b9,'08om')]+']'+iillll[IIIII1(0xc5,'jMDx')]),[lil111[IIIII1(0x1fc,'g4Xb')]][IIIII1(0xda,'z9GY')](IIIl11=>l1lIlI['msg'][IIIII1(0x1b0,'tELj')](IIIl11))&&(IiiIl1[IIIII1(0xe1,'[P2C')]=!![]));else{if(lil111[IIIII1(0xec,'0YY#')]($[IIIII1(0x164,'NI*h')],0x1))console[IIIII1(0xc2,'yXXl')]('['+$['assignmentName']+']'+il1i1i['msg']),[lil111[IIIII1(0xfd,'[8aN')]]['some'](I1lIi1=>il1i1i[IIIII1(0x1c2,'v3NZ')][IIIII1(0x14e,'NI04')](I1lIi1))&&($[IIIII1(0x1e4,'^ruk')]=!![]);else{if(lil111['Wwwnu']($[IIIII1(0x187,'hvrm')],0x2))lil111[IIIII1(0x17e,'a[st')](il1i1i[IIIII1(0xe6,'[PB@')],'0')&&(lil111[IIIII1(0x1be,'tBu*')](lil111[IIIII1(0x18d,'$!8t')],lil111['FTJOl'])?(ll1ll['body']['completionFlag']=!![],delete Illl11[IIIII1(0x1c3,'iTNT')][IIIII1(0x1f4,'yXXl')],delete ii1lI['body'][lil111[IIIII1(0x1f2,'v3NZ')]]):il1i1i[IIIII1(0x19b,'hvrm')]['successRewards']?console['log']('抽中:'+il1i1i[IIIII1(0x14f,'!c*Y')][IIIII1(0x101,'yYXG')]['4'][0x0][IIIII1(0x193,'5Ak*')]+il1i1i[IIIII1(0x131,'WiQ^')][IIIII1(0x1d8,'wINZ')]['4'][0x0]['prizeName']):console[IIIII1(0xc9,'5Ak*')]('抽中:空气'));else il1i1i[IIIII1(0x126,'k&9R')]?(console[IIIII1(0xd5,'wINZ')](il1i1i[IIIII1(0x1eb,'45GH')]),[IIIII1(0x184,'hvrm')][IIIII1(0x174,'tELj')](lil11I=>il1i1i[IIIII1(0xe9,'z9GY')]['includes'](lil11I))&&($[IIIII1(0x179,'hvrm')]=!![])):lil111[IIIII1(0xbf,'yXXl')](lil111['uiKTt'],lil111[IIIII1(0x194,'wKDS')])?lilIll[IIIII1(0x1f8,'yYXG')]('['+l1i111['assignmentName']+']'+iliII1[IIIII1(0x1e5,'NI*h')]+',抽中:'+II11I1[IIIII1(0x131,'WiQ^')][IIIII1(0x1e3,'5Ak*')]['4'][0x0]['discount']+Iii11I['rewardsInfo']['successRewards']['4'][0x0][IIIII1(0x1b6,'45GH')]):console[IIIII1(0x134,'jMDx')]('❓'+IlIlli+'\x20'+JSON[IIIII1(0xcc,'a[st')](il1i1i));}}break;}}catch(iIiIi){lil111[IIIII1(0xe2,'jo]n')](lil111[IIIII1(0x1ce,'V&b&')],IIIII1(0x19c,'qLVv'))?i1l1l1[IIIII1(0x19a,'08om')](IIIII1(0x1b3,'FqTn')+IlI1I):console['log'](IIIII1(0x1d9,'[P2C')+IlIlli+IIIII1(0xf2,'!c*Y')+(iIiIi[IIIII1(0x15a,'FqTn')]||iIiIi));}}async function sendRequest(iiilil){const I1lIlI=i11ii1,iil1li={'CQctz':I1lIlI(0x159,'yXXl'),'LjpOC':I1lIlI(0x13a,'wINZ'),'GuMzj':'35fa0','LmBXg':'qryH5BabelFloors','haDhP':I1lIlI(0xde,'08om'),'jhYDK':function(ii1iil,lllI1l){return ii1iil===lllI1l;},'WyWlL':'Sialx','BQMOk':'BuGLc','wIKYt':'keep-alive','qxuts':I1lIlI(0x177,'^ruk'),'xysFd':I1lIlI(0x189,'45GH'),'CWgXO':I1lIlI(0x109,'8gh&'),'dLvUc':function(i11iii,llI1Ii){return i11iii===llI1Ii;},'PLUAP':I1lIlI(0xe8,'DW4F'),'DIUiJ':'BttAv','NbmYV':I1lIlI(0xf0,'a[st')};if($[I1lIlI(0x19d,'5VOL')])return;let lillIl='',iIiIl=null,iiilii=null,li1i1i=iil1li[I1lIlI(0xc1,'[P2C')],IlIli1={},illIiI={};switch(iiilil){case I1lIlI(0xd0,'0YY#'):illIiI={'appId':iil1li[I1lIlI(0x18e,'8gh&')],'functionId':iil1li[I1lIlI(0xf8,'yXXl')],'appid':I1lIlI(0x150,'iTNT'),'body':{'activityId':activityId,'pageId':pageId,'queryFloorsParam':{'floorParams':{0x62367f7:{}},'type':0x2}},'version':I1lIlI(0x1e8,'jo]n'),'t':!![]},IlIli1=await H5st['getH5st'](illIiI),lillIl=I1lIlI(0x1a4,'5VOL'),iiilii=IlIli1['paramsData'];break;case iil1li[I1lIlI(0xeb,'cA3x')]:illIiI={'appId':I1lIlI(0xfa,'WiQ^'),'functionId':I1lIlI(0x163,'0blX'),'appid':'newtry','body':{'workflowId':workflowId,'action':$['action'],'encAid':$['encryptAssignmentId'],'itemId':$['advId']},'version':I1lIlI(0x124,'O0sa'),'t':!![]};if(iil1li[I1lIlI(0xd4,'tELj')]($[I1lIlI(0x167,'FqTn')],0x0))illIiI[I1lIlI(0xc4,'k&9R')][I1lIlI(0xee,'yYXG')]=!![];else{if($[I1lIlI(0x176,'5VOL')]===0x1)delete illIiI[I1lIlI(0x180,'[PB@')][I1lIlI(0x1e2,'JbFE')];else $[I1lIlI(0x1ed,'8gh&')]===0x2&&(iil1li['jhYDK'](I1lIlI(0x132,'0YY#'),I1lIlI(0x192,'9*1#'))?(illIiI['body'][I1lIlI(0xdf,'iTNT')]=!![],delete illIiI[I1lIlI(0x119,'[8aN')]['encAid'],delete illIiI['body']['itemId']):lI1Ill[I1lIlI(0x139,'NI04')]('['+lI1Ili['assignmentName']+']'+IliilI[I1lIlI(0x141,'wKDS')]));}IlIli1=await H5st[I1lIlI(0x1db,'wKDS')](illIiI),lillIl=I1lIlI(0xff,'a[st'),iiilii=IlIli1[I1lIlI(0x1a1,'0blX')];break;default:console[I1lIlI(0x1f8,'yYXG')]('❌\x20未知请求\x20'+iiilil);return;}const lI1lli={};iIiIl&&Object[I1lIlI(0x10d,'^ruk')](iIiIl,lI1lli);iiilii&&(iil1li['WyWlL']===iil1li[I1lIlI(0x158,'jo]n')]?delete ll1li[I1lIlI(0x186,'g4Xb')][iil1li['CQctz']]:Object['assign'](iiilii,lI1lli));const Ill1l={'url':lillIl,'method':li1i1i,'headers':{'Accept':I1lIlI(0x1b1,'v3NZ'),'Accept-Encoding':I1lIlI(0x147,'wKDS'),'Accept-Language':I1lIlI(0x1dd,'g!y['),'Connection':iil1li[I1lIlI(0x17a,'jo]n')],'Content-Type':iil1li[I1lIlI(0x156,'[P2C')],'Cookie':cookie,'Origin':I1lIlI(0x127,'[P2C'),'Referer':iil1li[I1lIlI(0x1b4,'5Ak*')],'User-Agent':$['UA']},'params':iiilii,'data':iIiIl,'timeout':0x7530};li1i1i===iil1li[I1lIlI(0x14d,'*yl#')]&&(iil1li[I1lIlI(0xc6,'FqTn')](I1lIlI(0x1ad,'DW4F'),I1lIlI(0x117,'iTNT'))?(delete Ill1l[I1lIlI(0x120,'1ZHU')],delete Ill1l['headers'][iil1li['PLUAP']]):Illl1l['subCode']==='0'&&(IiiIli['rewardsInfo'][I1lIlI(0x1bc,'tBu*')]?llIlii[I1lIlI(0x1bb,'g!y[')]('抽中:'+llIlil['rewardsInfo'][I1lIlI(0x14a,'4%dk')]['4'][0x0][I1lIlI(0x166,'k&9R')]+IIlil['rewardsInfo'][I1lIlI(0xe7,'wKDS')]['4'][0x0]['prizeName']):ilI1lI[I1lIlI(0x143,'9*1#')]('抽中:空气')));const llI1Il=0x1;let ii1iii=0x0,i11iil=null,Ill1i=![];while(ii1iii<llI1Il){ii1iii>0x0&&await $[I1lIlI(0x181,'FqTn')](0x3e8);const lI1lll=await common[I1lIlI(0x140,'hvrm')](Ill1l);if(!lI1lll['success']){if(iil1li['DIUiJ']===iil1li['NbmYV'])iIIIIi[I1lIlI(0x10c,'DW4F')](iii1I1[I1lIlI(0xd3,'DW4F')]);else{i11iil=I1lIlI(0x12a,'NI*h')+iiilil+I1lIlI(0x11c,'^ruk')+lI1lll[I1lIlI(0xdb,'z9GY')],ii1iii++;continue;}}if(!lI1lll[I1lIlI(0x1ae,'[PB@')]){i11iil='🚫\x20'+iiilil+I1lIlI(0x153,'z9GY'),ii1iii++;continue;}await handleResponse(iiilil,lI1lll[I1lIlI(0x12b,'z9GY')]),Ill1i=![];break;}ii1iii>=llI1Il&&(console['log'](i11iil),Ill1i&&($[I1lIlI(0x108,'oyx0')]=!![],$[I1lIlI(0x1cd,'wKDS')]&&$[I1lIlI(0x1c8,'g4Xb')][I1lIlI(0xe0,'0blX')](i11iil)));}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) }