faker3/jd_opencard_0725.js
2024-07-25 18:28:37 +08:00

15 lines
35 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
环境变量:
export jd_opencard_draw="3" //抽奖次数 3
export jd_opencard_notify="true" // 是否推送
cron:1 1 1 1 *
*/
const $ = new Env('7.25-8.9 潮电星搭子大屏享赛事')
const _0x1fd2bb=_0x4c54;(function(_0x58e7d7,_0x3c6efa){const _0x1caec3=_0x4c54,_0x394ee8=_0x58e7d7();while(!![]){try{const _0x4efd85=-parseInt(_0x1caec3(0x2bb,'rSOp'))/0x1+parseInt(_0x1caec3(0x2bc,'AMP1'))/0x2+parseInt(_0x1caec3(0x1f0,'[^rF'))/0x3*(-parseInt(_0x1caec3(0x1de,'rNpO'))/0x4)+parseInt(_0x1caec3(0x1bb,'38s&'))/0x5+parseInt(_0x1caec3(0x1ae,'K8YD'))/0x6*(parseInt(_0x1caec3(0x277,'4@(R'))/0x7)+parseInt(_0x1caec3(0x200,'Sv*O'))/0x8*(-parseInt(_0x1caec3(0x18f,'zv37'))/0x9)+parseInt(_0x1caec3(0x1a4,'y0)P'))/0xa;if(_0x4efd85===_0x3c6efa)break;else _0x394ee8['push'](_0x394ee8['shift']());}catch(_0x3c12d5){_0x394ee8['push'](_0x394ee8['shift']());}}}(_0x19be,0x9ee4c));const notify=require(_0x1fd2bb(0x24c,'IT5H')),jdCookie=require('./jdCookie'),getToken=require(_0x1fd2bb(0x1f2,'1n#8')),common=require('./utils/Rebels_jdCommon'),isNotify=process['env'][_0x1fd2bb(0x237,'XH8a')]===_0x1fd2bb(0x2cb,'y0)P'),opencard_draw=process[_0x1fd2bb(0x234,'1n#8')]['jd_opencard_draw']||0x5;let domains='https://szxyun-rc.isvjcloud.com',cookie='';function _0x4c54(_0x56e75c,_0x3356b8){const _0x19be34=_0x19be();return _0x4c54=function(_0x4c54ca,_0x1d449d){_0x4c54ca=_0x4c54ca-0x18e;let _0x365484=_0x19be34[_0x4c54ca];if(_0x4c54['GYmkFi']===undefined){var _0x372c0e=function(_0x4e353c){const _0x177666='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x394c90='',_0x1bb5b3='';for(let _0x514e21=0x0,_0x1071da,_0x40ebdb,_0x4acbd0=0x0;_0x40ebdb=_0x4e353c['charAt'](_0x4acbd0++);~_0x40ebdb&&(_0x1071da=_0x514e21%0x4?_0x1071da*0x40+_0x40ebdb:_0x40ebdb,_0x514e21++%0x4)?_0x394c90+=String['fromCharCode'](0xff&_0x1071da>>(-0x2*_0x514e21&0x6)):0x0){_0x40ebdb=_0x177666['indexOf'](_0x40ebdb);}for(let _0x153a3b=0x0,_0x5c1be2=_0x394c90['length'];_0x153a3b<_0x5c1be2;_0x153a3b++){_0x1bb5b3+='%'+('00'+_0x394c90['charCodeAt'](_0x153a3b)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1bb5b3);};const _0x9a6c56=function(_0x173865,_0x4d8976){let _0x1b3280=[],_0x128e07=0x0,_0x4c7f11,_0x3edcc1='';_0x173865=_0x372c0e(_0x173865);let _0x1e0d0f;for(_0x1e0d0f=0x0;_0x1e0d0f<0x100;_0x1e0d0f++){_0x1b3280[_0x1e0d0f]=_0x1e0d0f;}for(_0x1e0d0f=0x0;_0x1e0d0f<0x100;_0x1e0d0f++){_0x128e07=(_0x128e07+_0x1b3280[_0x1e0d0f]+_0x4d8976['charCodeAt'](_0x1e0d0f%_0x4d8976['length']))%0x100,_0x4c7f11=_0x1b3280[_0x1e0d0f],_0x1b3280[_0x1e0d0f]=_0x1b3280[_0x128e07],_0x1b3280[_0x128e07]=_0x4c7f11;}_0x1e0d0f=0x0,_0x128e07=0x0;for(let _0x19c8de=0x0;_0x19c8de<_0x173865['length'];_0x19c8de++){_0x1e0d0f=(_0x1e0d0f+0x1)%0x100,_0x128e07=(_0x128e07+_0x1b3280[_0x1e0d0f])%0x100,_0x4c7f11=_0x1b3280[_0x1e0d0f],_0x1b3280[_0x1e0d0f]=_0x1b3280[_0x128e07],_0x1b3280[_0x128e07]=_0x4c7f11,_0x3edcc1+=String['fromCharCode'](_0x173865['charCodeAt'](_0x19c8de)^_0x1b3280[(_0x1b3280[_0x1e0d0f]+_0x1b3280[_0x128e07])%0x100]);}return _0x3edcc1;};_0x4c54['OqzSwt']=_0x9a6c56,_0x56e75c=arguments,_0x4c54['GYmkFi']=!![];}const _0x8a986b=_0x19be34[0x0],_0x544e8b=_0x4c54ca+_0x8a986b,_0x17bcf1=_0x56e75c[_0x544e8b];return!_0x17bcf1?(_0x4c54['eZUcoq']===undefined&&(_0x4c54['eZUcoq']=!![]),_0x365484=_0x4c54['OqzSwt'](_0x365484,_0x1d449d),_0x56e75c[_0x544e8b]=_0x365484):_0x365484=_0x17bcf1,_0x365484;},_0x4c54(_0x56e75c,_0x3356b8);}function _0x19be(){const _0xf32730=['W6BcS8oVWPf6xW','WOxcGc3dNv1oWRm','ps5qW4hcS2ldKmo6fW','umkTcCokW7jOnmo5','WOnQW6xdIaynW51qtW','hIXP','h8oEW4P7qSkjW6e','cCkmyg0','rComW7y','WPtdQ0xcLq','WPJcLZFdLfK','hCkcFwlcTva','WOBdVSkMBG','fSodW6O','DmosWRTRcG','W58HgtmXWOKC','WOVdSCk2ASob','WOtcOeldI0RcVYm','W6aTzCkU','WQBdOCkvWO8','5A2c5PsP5yIx5yUq5BE16l2X5yIx6zMz5yI4','g2NdKSkxACkfDIBdNq','5lUL5A695z22','BCooWRf9gSoTW7S/','o2/dLCkObW','BSkgW5S','o8k/W5hdI8kmW4m','oSogbSoByuldG8oifW','WOGizwP8W6FdRmkT','oEISL+AZREwKJ+I3ICoH4P6SWQC','qCkkWQm+','WRxcQmkwDSojmYhdTrtcTq','a8keD2FcJ0iTtG','BSoUWO3cHSoDW7BdQKrDnmop','W74JyCkLnxO/','WQBdHCoVW6ZdPceS','5OMd5AwH5QYZ5PwrWRdcJSoc','b8kcFwlcIeC','44os5lQ15lQ06lsU5y6S','WOdcQ0ldNvNcRa','WPrUW6xdQG','oCohfmob','WQ3dICoYW77dQsOW','B8ofWRDHqSoOW7iLf8oZ','kCoDi8oH','WP3dQ0JcNLNcHa','5A+Z5OIl5lMi5yMbDW','WPhdQ8kGzSoxW7JcRdRdKW','WQRdG8oOW7BdSYmaWO8','BCoirW','6Ago5y2w5B+45y6l5OIn5yQw5yIT5AAE5yIaWQZdHW','WP8Ry1BcNW','WPCrAxzCW70','WRxdOSkfdmkNWQJdQa','l8oxjmoOWPSd','WOlcOeG','W5myW5yCW7hcLK4','5lUl5AAi6ykl55+E','W5RdS8okiNhcQG','5yYW6ysQ54UO5OkV57UV5P22W6VdLNrCW4O','jJ9oW5JcJNhdMmoOg8kd','WO7cOf/dRwO','eSojW6ZdVSohW5Hv','W4WiW4SQW77cLq','5PYD55+P5AwR5zcp776C','5lM46Aoh5y6i5PE/6i2y5y695AEU6lEq77Y96k2i6ysl5PA96lYU6koN','W6O+CwVcRvZcIG','BSkbW4zk','W7dcIw8','WRhdTmkPhCk0WQRdRh4','WP9uzKJdVmolW5ddVq','W4VdPConiW','lXHkkhi','5B2x5yUT5BsG6ykr6k6yWRm','d3tdMSkowmkenW','tsVcGW','CmonamotWRz/p8kqEW','WQVdR8kxdCkJWPRdUhZdIq','gghdMSkqamoxycZdICkeWP8YW7H4cCkdWOm','mCk5W5O','hmolW4fYy8kt','W6y4AW','WPVdOu/cL2tcIa','Ec/cISoMuY5La8k4B1e+','W5nhmYerWRBdG8kDpSk7W4vF','amkiz3/cOeqL','WPBdTfhcNhNcG1OCW6HWdG/dHmkaWRTHW4ZdPJH3WRBdI8kZW4CqWQ5brgVdIIXEuG','W7hcSCo3W4O','WOFcVCoLuSo7qG','WOTzyutdVSoTW7BdTSkqv8ki','WQ3dRSkCWR5YuSot','WOugbsu/WOSy','8j+8SflMG5FLLytOJQ/LV4hLRAJNIAScpEwNU+wtTowsH+ENSo+9RW','fNxdL8kfva','WQv8W5XDkwKlW57dPCkDWQ7cRtRdJCkS','W6pcTCoVWPLLvI8','ASkiW4boWQxcPq','WO1cCuldR8oDW6O','WOXcFgtdPmok','W4VcHbxcGG','qCo6W5xcQsLwl3GNWPG','rSkeWQmKWR9Buq','owJdKSkxdhG','8yEWT8oY56M15RkT','o2JdJ8k6','yN9yWRZdImoOjqK','W4q5WQdcVv1wWOztEmonW5f5Fq','CSkCW48a','WRD3WOpcM8oTfG','WRVdR8kvWO8','oCkcF2NcRW','WORcU8o/xmo5tW','8yMyRmow','EmkdW5TxWPRcPa','5yMI5yw85BI/6zoY5l2b5zgD5OMl5yIG','WRnJFelcMKBcTSo8','WQhdS8kNWOHPwSoxWQm','WO7dSmk1','W6VcMqVcGKu','WOOFCa','W57cMHy5WRVcJdJcMN0BqXuNWOa','Fb4DW7NdPN7cRG','W7NcKmkS','pmkAhtjU','iCkkWP5qWQid','WONcKJ/dNfHNWRFcHIW','WRr8W4zSpNCsW5S','l8oDlq','DSobWRX1amoK','W5JdS0tcKNpdJ04gW6HWdM/dNSkwWROGWPpcRI1GWQS','W6m1E8kJihTO','WOTeD1pdNmoH','tIZcISoyhSobnWVdP8kqWRS/W48','nCkAWO9lWOiP','WP7dQKlcNgxcHf4B','W594W7tdQqPnW4nxq8ovW7bprrtcLHXkWPfsW6xcKSkk','W6BdRCos','W6RcQCoOWPbTsdK','kHLj','57+k5BcE5B2u6ksk5y6R5Pss77666k+o6yEN5Psk6l2o6kgm','EoAlVUs4O+wVQ+EiHCk/','6ykD55Y15OYZ6yo5nHOh','gSkmFxG','bSkiBq','WO1dyeJdPmojW7ddV8kc','WP9aC1pdRSoGW7JdTmkE','DSk2dCokW5K','W77cTComW5KVdCkaWONdGSocWRFdQWa','WOtcIJK','xCo6W7lcSGTDc3a7','WQZdSSkzWP1EtCoeWQFdGW','WRZdOCklWOe','W7JcH3ZcOq','WOVdGfhdKr82W5q9W7D/pLb/','WR7cSSklCmoVjq','W4VdV8oxjxpcVbu','5P2z5RwW6kw65zw55zk5','5B+W5AEe5PwN6zw/772Z','WQxdS8kF','zmk9gmorW4PS','5A635PEJ5PYi5REN6ksv5zwd5zg4','rhHpWQFdQmoUiqPi','5P+h5BYE5AwO','gCkwWQboW4JdR2rSh8kFW48rjq','WOSrzW','W4NcJqStWQW','ySoitMK6xW','WOi8Ev/cM8otWQq','WOX9W5FcLcD5','uSoYvSo/W5jUW4W','xSkLW7S','BCkzW5KgxN0MW68UW5hcUrf/','WPVdQmkyc8kJWQhdUtJdUCo2xL4','amoCW4zVCG','WQFdSmkDWOr4xSoeWQZdRSo6WO7dJGa','WOm2Bq','q3C+r1/cR8kTW71mW6nkmW','WPldSmk7yConW6ZdTW','WRvMWPlcK8oVfG','5Rgw5P6n5yQi5yMR5QYX5PAq5lQ9fG','W5FdV8oz','E8koWP5aWPDJbgyAnbBdMM/cLa0Yq8k8EW','W5RdPCoki2JcVwrMAMy','5lIbWRZNPzhLIy3LJ6JMIBlLPBeZ','44cM5OY756EW44gB6kY85ywG6i+u5y+csmkXutSBBq','smkXfSorW5bLomkZW7ldJCkEkXhcNCkjw8kCefldT8kDWQRcNc5rb8kEDCoKWRRdNI1YArGlxayJjs9ZxYeYW5raWQe1W6tcRZCmW6ygFSoJWRSLW57dMI/cLg5tW4eBWRvyWQ3dTMnoW5zOW61OzSoWeCkVWOxcS8kAWQWXEmoeFmkkW7xdMI8tvCoeWPtdGSoIW6mAW58QsvJdLmkCaZhcNhKvWRBdNCovfsHwwZjeWO3cQHrDWPyXFColWQzIyLe7W7PTW6BdMmonxL9tW73cHSk5WOrsWOzXWOKWmrKcWPtdTW','WPpdPvxcKq','WOtdQ0ZcLq','fIj6fa','WPjyDq','W5pcV8oWWP1I','WOu2AghcM8oe','W7a+EKpcTL0','CCkcEG','W6OTFmkQ','g8olW5zM','5REm5yIS5zcS56sa77YkW4m','WQrWWPxcKG','n8kyWO9bWPW','WQdcVmkrDq','jdva','W4lORAJMSPdLPl7OTPZcV+kDMxZMLyRLKjBLUz7MLilMJl0','bCoaW4z6ECk0W71CmX7cOcuLWORdOfBcVSkEW5H7WQNdTCoRW61+WPBcJa','W6pcSCoVWPK','WQxdICo/W7tdIYCKWO4','W6BcS8oVWPf6uYG9peXz','WOnNW77dUYag','WP9uzKJdVmolW4/dLG','f8ojW77dQCodW41d','kXnDpMSLWRy','WO3cPexdMq','qGNdKfSExSkWfG','ACkXcW','4PYrW7BMNPFNNzRORj7MS7pcPq','dxRdNCkeq8kA','WQhcRSkhBmoQlGxdSX4','5lUM55oy5B2S5yElWOyPaG','W58EW5egW6BcLh/cJCoEW44L','WOaBDfvnW73dSSkPc8kt','WPPwA2ZdQ8ow','W6m1s8kKjwW','8yc3PU+4NqhKVPlMGy7LIQe','iJvf','g3RdH8kb','W7hcG3VcSWrEWPi','W5pcQ8oIpCkkWQ/cGIxdSmk0WROH','5BAn57Uu5yIA5yM76l+R5lMX5zoBnW','fCoaW4TbFSkwW6G','bIj9hG','sCkuWR3cO8kwW61jgYVdV8oI','kN7dImk7fhK','W5NcQ1tcHhNcJeHhW5n6aKxdGSkaWOTBWO/cRsL8','WRNdPmkcfSkWWQO','WQFdJ8o7','WP9/W7tdPqOdW4rDDCowW7DZqq','a03dM0uD','WOzQW7/dRWWqW79D','qSoMW77cRG','pSotdSoD','WPCmAwjn','W7q0yfK','5P2355YZ5yIu5yIK6lY95zMV56ke','wSkeWQ0','CaWpW7JdO1FcQKqF','772H6kYA5OMF5yQK5y265Agi5yEz5zYB5z6mwmkf','WRtdOSo0WPDuuG0J','AmopWRu','aSkBCx7cLuOTtG','iHnAlgmUWQa','WPddVSk8A8owW7i','oCoDdSohywxcMq','WRLGWPxcICo4fdO','W4BORkNMS5pLK7BLUjKh','W5q+EeJcRf0','bSolW4fXCSkjW4rD','5AYr5PwC5yU35yI15BEo5RUi','WPnGW7xdRG','jCoDe8oDCgtdKW','WQrXWRNcISoWhq','WO/dUSkHFmoyW7JcOa','W4GZWOiICs9X5B6/5AwC44oS5lMV5lUu6lwO5y2F','h8olW7JcPsHxdq','5OUh5AE66iY65BYnWPJcIG','5P+D5yES6yoj5B+W5y2X','wmkkWQCV','WP7cPfJdJa','WOtcVhldL0/cVq','WOpcQLJdLNJcScLKqSkynqlcRvm','fvBdNKSDDG','bmkdCgNcUq','W67cK2BcHqTD','WOBcSexdVKFcUse','WQ/dJ8oYW7O','lmocl8oHWROzWRm','B8kiW4W','5Rw15yUY5BEq57M75P6cEW','kmoxWPygW57dTWpdHCowqmopWOZcQW','W6lNUlBMNihMLzJPL4JVVlm','e+AnSUIJO+w8VUwMUUAuT+MxHo++Nq','WP9/W43cMt5X','jCoDaa','iSofk8o9WOSLWR7cMfq','yHmbW73dHxZcQKC2W5XSW4O','CCkbW50Awa','WRldQmovWOL1','jZrgW43cPq','aIX+','mmkVW77dKmknW5tdL1r0','WOiWza','W5RdS8okiNhcQNfg','d27dGmki','WQVdSSkvhmkJWRZdVG','fSojW6pdVCowW4i','WQNdO8kmWOnTwG','BSkgW5STt24','sCoQW6pcQtfxjx0','ySojWRX4hmoHW5a5da','WPldQLC','WPNcSeldKa','rmoAWO8','WR7cUCk9CCowjaZdUrhcOKpdTLddQtG6fJ8','g8opW7NdS8ouW48','WPnsyvldQ8ojW7W','W57WKQcK','v8kiWR4JWR1n','W6tcV8o/WP0','WOBcTvtdLN7cQIO','D8ouWRnJg8oDW7CHba','WO1FC1pdR8o7W6ZdSmkF','rrqfW6/dQwO','4P+rjEwjJ+wjOEAkIEwlRa','W4VcNGWnWQBcJG','W688EmkUl21oWRzVyfSbcq','WOKaaJ8OWOK','h8kizxNcPfa0','nCkqW6iHxSk5WQ57umkM','4P26W4VMN6dOGRFMRQJNOyBLPAFNKjiR','eLZdHLyoyCkNfmocvwa','zSkiW4Gj','5Q+15OMG5AA0mUwnIEAlVowKTa','WO7dSmkME8oCW63cVa','BCkDp8o7WOyhWQZdMMpdMSkKAmksW5HVWRnRCeK6WQJcKqySEv3cMW','iSorpSoMWPKoWPBcKq','o1feWQdcRtpdGq','8kQnSmoB5Ogp5zwO6i+75B+M5A6w54IAD+wKRUwrLowqKUEKGE+9Uq','W7W5zSkol20','lCotj8oQ','WPDetupdUmolW7JdSG','WO4UA17cNSoGWRG5ha','WQddTmkmWPOHemkzWQVdNSoYWOlcK0ztWRtcK0rVq8kwdcZcJ8oeAduNwb7dUmoazNmIfa','WOWmgdm','WPdcGqxcHuGTWPe5W4XNh2zhpKKhWOuqn39lW4K0','WObQWO3cN8o3','uCkoWR4jWQrhch1UWOHFpaDT','mWvlp1Wn','5Q+i5OM45AwN','xmoxW7upWOJcItTacq','W5pcMqC','eSkEWQLaW4e','D8ofWRX1iCoMW6OLb8oV','W73cHxZcQrnCWQnLWQPmWOK','hLRdGuWzy8kw','kCoDka','WQzRW4L/hNCPW5ddPq','aCkcCW','W7xcSCo1WPXJvW','u8kzWRGLWRK','WQBdQCkBWOfvxSoBWQ0','W6qWz0W'];_0x19be=function(){return _0xf32730;};return _0x19be();}const cookiesArr=Object[_0x1fd2bb(0x1ce,'[6HN')](jdCookie)[_0x1fd2bb(0x2df,'AMP1')](_0x9a6c56=>jdCookie[_0x9a6c56])[_0x1fd2bb(0x217,'rNpO')](_0x4e353c=>_0x4e353c);!cookiesArr[0x0]&&($[_0x1fd2bb(0x1a9,'zE7e')]($[_0x1fd2bb(0x213,'iFAH')],_0x1fd2bb(0x1c3,'iFAH')),process['exit'](0x1));!(async()=>{const _0x2b03fa=_0x1fd2bb;console[_0x2b03fa(0x19f,'eW!C')](_0x2b03fa(0x25d,'K8YD')+$[_0x2b03fa(0x27b,'zE7e')]+'变量开启状态====='),console[_0x2b03fa(0x1c8,'jh^B')](_0x2b03fa(0x1e3,'2NCb')+common[_0x2b03fa(0x2e0,'*Cr[')]()+']'),console[_0x2b03fa(0x1af,'AMP1')](_0x2b03fa(0x28c,'jh^B')+opencard_draw+'次]'),console[_0x2b03fa(0x201,'Mlh%')](_0x2b03fa(0x198,'Sv*O')+(isNotify?'开启':'关闭')+']'),console[_0x2b03fa(0x263,'tl%%')](_0x2b03fa(0x2e3,'wo@O')+$[_0x2b03fa(0x251,'IT5H')]+_0x2b03fa(0x2a3,'eW!C')),authorCodeList=await getAuthorCodeList(_0x2b03fa(0x254,'zE7e')),$[_0x2b03fa(0x22a,'I9R5')]=![];if(authorCodeList)$['myCodeRun']=!![],$[_0x2b03fa(0x287,'XH8a')]=authorCodeList[random(0x0,authorCodeList[_0x2b03fa(0x2ba,'1n#8')])];else{}$[_0x2b03fa(0x2c8,'(p&z')]=_0x2b03fa(0x246,'Mlh%'),$[_0x2b03fa(0x232,'m[DQ')]=_0x2b03fa(0x1d5,'[6HN'),$['activityUrl']='https://szxyun-rc.isvjcloud.com/pagec/unionOpenKGJ240228/index.html',$[_0x2b03fa(0x23f,'jh^B')]=$[_0x2b03fa(0x1c1,'rlVG')],notify[_0x2b03fa(0x1b1,'wo@O')]({'title':$['name']});for(let _0x177666=0x0;_0x177666<cookiesArr[_0x2b03fa(0x22f,'[^rF')];_0x177666++){$['index']=_0x177666+0x1,cookie=cookiesArr[_0x177666],common[_0x2b03fa(0x26c,'&1W0')](cookie),$['UserName']=decodeURIComponent(common[_0x2b03fa(0x258,'iFAH')](cookie,_0x2b03fa(0x20d,'UNJ('))),$['UA']=common[_0x2b03fa(0x2a5,'@H*B')]($[_0x2b03fa(0x26b,'2NCb')]),$[_0x2b03fa(0x2e1,'wHE^')]=notify[_0x2b03fa(0x2d4,'UNJ(')]($[_0x2b03fa(0x228,'rnR(')],$[_0x2b03fa(0x2d1,'%qR*')]),$[_0x2b03fa(0x1d7,'X4hc')]='',console[_0x2b03fa(0x195,'6MLQ')](_0x2b03fa(0x20f,'8ZXk')+$[_0x2b03fa(0x218,'tl%%')]+'】'+($[_0x2b03fa(0x288,'tl%%')]||$['UserName'])+_0x2b03fa(0x24e,'wHE^')),await Main(),common[_0x2b03fa(0x2c1,'jh^B')]();if($[_0x2b03fa(0x2ce,'rSOp')])break;await $['wait'](parseInt(Math[_0x2b03fa(0x242,'*Cr[')]()*0x5dc+0x7d0,0xa));}isNotify&&notify[_0x2b03fa(0x1e5,'AMP1')]()&&(notify[_0x2b03fa(0x243,'v#xk')]('\x0a'),await notify[_0x2b03fa(0x22d,'zv37')]());})()[_0x1fd2bb(0x1d1,'sm&9')](_0x394c90=>$[_0x1fd2bb(0x231,'t#k5')](_0x394c90))[_0x1fd2bb(0x292,'X4hc')](()=>$[_0x1fd2bb(0x21b,'X4hc')]());async function Main(){const _0x2b42fe=_0x1fd2bb;try{$[_0x2b42fe(0x1ee,'[6HN')]=0x0,$['is_break']=![],$[_0x2b42fe(0x1c9,'Sv*O')]='',$['Tokens']='',$[_0x2b42fe(0x2de,'y0)P')]=await getToken(cookie,domains);if($[_0x2b42fe(0x2d6,'tl%%')]==''){console[_0x2b42fe(0x1fd,'iFAH')](_0x2b42fe(0x196,'&1W0')),$['message'][_0x2b42fe(0x2b9,'lpzM')]('TOKEN获取失败~');return;}await $['wait'](parseInt(Math[_0x2b42fe(0x264,'Sv*O')]()*0x1f4+0x1f4,0xa)),await sendRequest(_0x2b42fe(0x1a0,'m[DQ'));if($[_0x2b42fe(0x208,'lpzM')]){$[_0x2b42fe(0x2d9,'(p&z')]='',await sendRequest(_0x2b42fe(0x1b3,'a#o2'));if($[_0x2b42fe(0x2ca,'jh^B')])return;if($[_0x2b42fe(0x23b,'iFAH')]){$[_0x2b42fe(0x2b0,'6MLQ')]===0x1&&(console[_0x2b42fe(0x223,'dsLt')](''+($[_0x2b42fe(0x25f,'6*Ob')]&&_0x2b42fe(0x1cf,'1n#8')+$[_0x2b42fe(0x1e4,'wzIB')])),console[_0x2b42fe(0x19f,'eW!C')](_0x2b42fe(0x1a8,'&1W0')+$[_0x2b42fe(0x283,'dsLt')]+_0x2b42fe(0x220,'eW!C')+$[_0x2b42fe(0x2c2,'zE7e')]+_0x2b42fe(0x221,'(p&z')+$['overTime']+'\x0a'));console[_0x2b42fe(0x2ac,'6*Ob')](_0x2b42fe(0x2b1,'Mlh%')+$[_0x2b42fe(0x29c,'AMP1')]+_0x2b42fe(0x1c2,'rlVG')+$[_0x2b42fe(0x1bc,'U*PZ')]+'次\x0a助力码\x20'+$['joinId']);for(let _0x514e21 in $['active'][_0x2b42fe(0x1ca,'iD^8')]){let _0x1071da=$['active']['jobMap'][_0x514e21];_0x1071da[_0x2b42fe(0x2c7,'Sv*O')]=_0x1071da['details'][_0x2b42fe(0x282,'I9R5')](_0x153a3b=>_0x153a3b[_0x2b42fe(0x255,'4@(R')]===null);let _0x40ebdb=_0x1071da[_0x2b42fe(0x1e6,'jh^B')]||0x1,_0x4acbd0=_0x1071da[_0x2b42fe(0x233,'Mlh%')]||0x0;for(let _0x5c1be2=_0x4acbd0;_0x5c1be2<_0x40ebdb;_0x5c1be2++){$[_0x2b42fe(0x19a,'tl%%')]=_0x514e21,$[_0x2b42fe(0x1ef,'38s&')]=_0x1071da,await sendRequest(_0x2b42fe(0x270,'K8YD'));}}$[_0x2b42fe(0x1f5,'&1W0')]=$['active']['bindCardInfo']||[];let _0x1bb5b3=$[_0x2b42fe(0x1b6,'t#k5')]['filter'](_0x173865=>!_0x173865[_0x2b42fe(0x2cc,'m[DQ')])||[];console[_0x2b42fe(0x1df,'2NCb')]('共有'+$[_0x2b42fe(0x1b9,'zE7e')][_0x2b42fe(0x29e,'IT5H')]+'张卡,还需开'+_0x1bb5b3['length']+'张卡');for(let _0x4d8976 of _0x1bb5b3){$[_0x2b42fe(0x23d,'@H*B')]=_0x4d8976[_0x2b42fe(0x26e,'[6HN')],$['venderId']=common[_0x2b42fe(0x2c6,'8ZXk')]($[_0x2b42fe(0x1b4,'#l]Z')],'venderId');(!$[_0x2b42fe(0x21c,'IT5H')]||!/^\d+$/[_0x2b42fe(0x1fb,'lpzM')]($[_0x2b42fe(0x2e6,'8ZXk')]))&&($[_0x2b42fe(0x1f7,'&1W0')]=_0x4d8976[_0x2b42fe(0x2bf,'Sv*O')]);const _0x1b3280=await common[_0x2b42fe(0x216,'@H*B')]($[_0x2b42fe(0x209,'[6HN')]);if(_0x1b3280)console[_0x2b42fe(0x1bf,'rlVG')](_0x2b42fe(0x2da,'8ZXk')),await $[_0x2b42fe(0x1f9,'dsLt')](parseInt(Math[_0x2b42fe(0x242,'*Cr[')]()*0x3e8+0x3e8,0xa));else{console[_0x2b42fe(0x2b7,'I9R5')]('有店铺开卡失败,跳过执行~');break;}}if(opencard_draw){await sendRequest(_0x2b42fe(0x2a2,'rlVG')),await $['wait'](parseInt(Math[_0x2b42fe(0x222,'a#o2')]()*0x1f4+0x1f4,0xa));let _0x128e07=parseInt($[_0x2b42fe(0x1a6,'rlVG')]/0x1),_0x4c7f11=Math[_0x2b42fe(0x22b,'iD^8')](opencard_draw,_0x128e07);$[_0x2b42fe(0x29b,'iD^8')]=[],console[_0x2b42fe(0x1f4,'X4hc')]('已设置抽奖'+opencard_draw+'次,共有'+_0x128e07+_0x2b42fe(0x24a,'XH8a')+_0x4c7f11+'次');for(m=0x1;_0x4c7f11--;m++){await sendRequest(_0x2b42fe(0x20c,'dsLt'));if(Number(_0x4c7f11)<=0x0)break;if($[_0x2b42fe(0x2ad,'y7]Z')])break;await $[_0x2b42fe(0x214,'@H*B')](parseInt(Math[_0x2b42fe(0x2e8,'Mlh%')]()*0x3e8+0x3e8,0xa));}$[_0x2b42fe(0x280,'rSOp')]['length']&&console[_0x2b42fe(0x2dd,'U*PZ')](_0x2b42fe(0x211,'[^rF')+$[_0x2b42fe(0x1f6,'rNpO')][_0x2b42fe(0x1f8,'m[DQ')](',\x20')+'\x0a');}if($[_0x2b42fe(0x252,'jh^B')]||$[_0x2b42fe(0x2a7,'wzIB')])return;await sendRequest('share');if($['myCodeRun'])for(let _0x3edcc1=0x0;_0x3edcc1<authorCodeList[_0x2b42fe(0x2b8,'[6HN')];_0x3edcc1++){$[_0x2b42fe(0x215,'@H*B')]=authorCodeList[_0x3edcc1],await sendRequest(_0x2b42fe(0x194,'Sv*O')),await $[_0x2b42fe(0x199,'tl%%')](parseInt(Math[_0x2b42fe(0x204,'U*PZ')]()*0x190+0x190,0xa));}$[_0x2b42fe(0x2c5,'zv37')]==0x1&&($['shareUuid']=$['joinId'],console['log']('后面的号都会助力\x20->\x20'+$[_0x2b42fe(0x2b5,'y7]Z')])),await $[_0x2b42fe(0x2ab,'(p&z')](parseInt(Math['random']()*0x3e8+0x3e8,0xa));}else console['log'](_0x2b42fe(0x2a9,'IT5H'));}}catch(_0x1e0d0f){console[_0x2b42fe(0x2e7,'IT5H')](_0x1e0d0f[_0x2b42fe(0x29d,'y7]Z')]);}}async function handleResponse(_0x19c8de,_0x362ebc){const _0x29c465=_0x1fd2bb;try{switch(_0x19c8de){case'userLogin':if(_0x362ebc['code']===_0x29c465(0x193,'XH8a')&&_0x362ebc['success']===!![])$['Tokens']=_0x362ebc[_0x29c465(0x267,'lpzM')];else _0x362ebc[_0x29c465(0x1b2,'iD^8')]?console[_0x29c465(0x299,'wo@O')](''+(_0x362ebc[_0x29c465(0x1db,'[^rF')]||'')):console[_0x29c465(0x2e7,'IT5H')](''+_0x362ebc);break;case _0x29c465(0x1aa,'2NCb'):if(_0x362ebc[_0x29c465(0x20b,'&1W0')]==='200'&&_0x362ebc['success']===!![])$[_0x29c465(0x2c0,'4Ld3')]=_0x362ebc[_0x29c465(0x1ea,'zv37')],$['activeTitle']=$[_0x29c465(0x238,'[^rF')][_0x29c465(0x1da,'jh^B')][_0x29c465(0x248,'rNpO')],$[_0x29c465(0x23e,'Mlh%')]=$[_0x29c465(0x1f1,'rSOp')][_0x29c465(0x22c,'rlVG')][_0x29c465(0x25b,'K8YD')],$['endTime']=$['active'][_0x29c465(0x22c,'rlVG')]['endTime'],$[_0x29c465(0x284,'AMP1')]=$[_0x29c465(0x230,'zE7e')]['activeVO'][_0x29c465(0x202,'tl%%')],$[_0x29c465(0x28d,'tl%%')]=$[_0x29c465(0x244,'4@(R')][_0x29c465(0x18e,'jh^B')]['joinId']||'',$[_0x29c465(0x2cd,'iFAH')]=$[_0x29c465(0x268,'Sv*O')][_0x29c465(0x2e4,'sm&9')][_0x29c465(0x28a,'v#xk')]||0x0,$[_0x29c465(0x1cb,'lpzM')]=$[_0x29c465(0x190,'sm&9')]['userVO'][_0x29c465(0x273,'tl%%')]||0x0,$[_0x29c465(0x205,'dsLt')]=$[_0x29c465(0x1bd,'UNJ(')][_0x29c465(0x259,'6MLQ')][_0x29c465(0x2b2,'zv37')]||0x0,$[_0x29c465(0x1bd,'UNJ(')][_0x29c465(0x225,'wHE^')][_0x29c465(0x2d7,'4Ld3')]>0x0&&console[_0x29c465(0x1ba,'iD^8')](_0x29c465(0x29a,'zE7e')+$[_0x29c465(0x1b3,'a#o2')]['showBeanList'][_0x29c465(0x21d,'t#k5')](_0x2b3ace=>(_0x2b3ace['sendNum']||0x0)+'京豆')['join'](',\x20'));else _0x362ebc[_0x29c465(0x2c3,'4@(R')]?($[_0x29c465(0x27d,'zv37')]=_0x362ebc[_0x29c465(0x239,'jh^B')],console[_0x29c465(0x2b7,'I9R5')](''+($[_0x29c465(0x262,'8ZXk')]||'')),[_0x29c465(0x1ad,'a#o2'),'结束',_0x29c465(0x27e,'eW!C'),'不在'][_0x29c465(0x2d5,'zE7e')](_0x3c34a8=>$[_0x29c465(0x1a1,'zE7e')][_0x29c465(0x191,'1n#8')](_0x3c34a8))&&($['runEnd']=!![],$[_0x29c465(0x2e1,'wHE^')]['fix'](_0x29c465(0x21e,'rnR(')))):console[_0x29c465(0x2b7,'I9R5')]('❓'+_0x19c8de+'\x20'+JSON['stringify'](_0x362ebc));break;case _0x29c465(0x261,'IT5H'):if(_0x362ebc['code']===_0x29c465(0x2e2,'X4hc')&&_0x362ebc['success']===!![]){let {val:val='',awardName:awardName=''}=_0x362ebc[_0x29c465(0x26f,'tl%%')],_0x474b42=[];if(awardName)_0x474b42[_0x29c465(0x2af,'rlVG')](awardName);if(val)_0x474b42[_0x29c465(0x291,'dsLt')](val+_0x29c465(0x25a,'@H*B'));console[_0x29c465(0x1e9,'rnR(')](_0x29c465(0x296,'zv37')+$[_0x29c465(0x29f,'@H*B')]+_0x29c465(0x236,'(p&z')+_0x474b42[_0x29c465(0x294,'IT5H')](','));}else _0x362ebc[_0x29c465(0x260,'rNpO')]?console[_0x29c465(0x19f,'eW!C')](''+(_0x362ebc[_0x29c465(0x279,'@H*B')]||'')):console[_0x29c465(0x25c,'y0)P')]('❓'+_0x19c8de+'\x20'+JSON[_0x29c465(0x2b4,'r@b#')](_0x362ebc));break;case _0x29c465(0x24b,'U*PZ'):if(_0x362ebc['code']===_0x29c465(0x1cc,'IT5H')&&_0x362ebc['success']===!![]){if(_0x362ebc[_0x29c465(0x1dd,'@H*B')]!=null)switch(_0x362ebc[_0x29c465(0x267,'lpzM')][_0x29c465(0x253,'iD^8')]){case 0x0:$[_0x29c465(0x276,'Mlh%')][_0x29c465(0x235,'@H*B')]('未知奖品:'+_0x362ebc['data'][_0x29c465(0x1fe,'wHE^')]);break;case 0x1:$[_0x29c465(0x1b8,'[6HN')][_0x29c465(0x235,'@H*B')]('🎉\x20'+_0x362ebc[_0x29c465(0x1d6,'Sv*O')][_0x29c465(0x2e5,'eW!C')]+_0x29c465(0x23a,'jh^B')),$[_0x29c465(0x206,'UNJ(')]['insert'](_0x362ebc[_0x29c465(0x274,'U*PZ')][_0x29c465(0x1fe,'wHE^')]+'🐶');break;case 0x2:$[_0x29c465(0x1f6,'rNpO')][_0x29c465(0x2d3,'t#k5')](_0x29c465(0x1e8,'jh^B'));break;case 0x3:$[_0x29c465(0x272,'eW!C')]['push'](_0x29c465(0x24f,'sm&9')+_0x362ebc[_0x29c465(0x290,'&1W0')]['awardName']),$[_0x29c465(0x269,'eW!C')][_0x29c465(0x28f,'@H*B')](_0x29c465(0x2c4,'r@b#')+_0x362ebc['data']['awardName']),await notify[_0x29c465(0x25e,'Mlh%')]($[_0x29c465(0x27a,'v#xk')]+_0x29c465(0x2a1,'4Ld3'),_0x29c465(0x28e,'8ZXk')+$[_0x29c465(0x278,'U*PZ')]+'】'+$[_0x29c465(0x266,'zE7e')]+_0x29c465(0x197,'38s&')+_0x362ebc[_0x29c465(0x1cd,'v#xk')][_0x29c465(0x19c,'jh^B')]+_0x29c465(0x1ff,'tl%%')+$[_0x29c465(0x1d8,'Sv*O')]);break;default:$[_0x29c465(0x1fa,'AMP1')][_0x29c465(0x1d0,'UNJ(')](_0x29c465(0x2a8,'%qR*')+_0x362ebc[_0x29c465(0x26f,'tl%%')][_0x29c465(0x224,'IT5H')]+'-'+_0x362ebc['data']['awardType']);break;}else $['prize']['push'](_0x29c465(0x2cf,'U*PZ'));}else _0x362ebc[_0x29c465(0x28b,'X4hc')]?($[_0x29c465(0x1b0,'*Cr[')][_0x29c465(0x2d0,'rSOp')](''+(_0x362ebc[_0x29c465(0x29d,'y7]Z')]||'')),['开卡']['some'](_0x3c49b2=>_0x362ebc['message']['includes'](_0x3c49b2))&&($[_0x29c465(0x2dc,'zE7e')]=!![]),['结束'][_0x29c465(0x1c6,'1n#8')](_0x1a88c0=>_0x362ebc[_0x29c465(0x1dc,'6MLQ')][_0x29c465(0x27f,'Mlh%')](_0x1a88c0))&&($[_0x29c465(0x219,'6*Ob')]=!![])):console[_0x29c465(0x281,'t#k5')]('❓'+_0x19c8de+'\x20'+JSON[_0x29c465(0x26a,'rnR(')](_0x362ebc));break;case _0x29c465(0x19d,'2NCb'):if(_0x362ebc[_0x29c465(0x23c,'Sv*O')]===_0x29c465(0x2b3,'zv37')&&_0x362ebc[_0x29c465(0x2c9,'jh^B')]===!![]){let _0x10d5b6=_0x362ebc[_0x29c465(0x249,'t#k5')][_0x29c465(0x2a4,'rnR(')]||0x0;switch(_0x10d5b6){case'':case undefined:case 0x0:break;case 0x1:console[_0x29c465(0x26d,'38s&')](_0x29c465(0x241,'UNJ('));break;case 0x2:console[_0x29c465(0x263,'tl%%')](_0x29c465(0x1ed,'zv37'));break;case 0x3:case 0xc:console[_0x29c465(0x1af,'AMP1')](_0x29c465(0x1be,'1n#8'));break;case 0x4:console[_0x29c465(0x275,'[^rF')](_0x29c465(0x27c,'rlVG'));break;case 0x5:console['log'](_0x29c465(0x20a,'eW!C'));break;case 0x7:console[_0x29c465(0x275,'[^rF')](_0x29c465(0x212,'1n#8'));break;case 0x24:console[_0x29c465(0x299,'wo@O')](_0x29c465(0x1a7,'rNpO'));break;case 0x25:console['log'](_0x29c465(0x1ab,'rnR('));break;default:console['log'](_0x29c465(0x1fc,'I9R5'));break;}}else _0x362ebc[_0x29c465(0x1eb,'6*Ob')]?console['log'](''+(_0x362ebc[_0x29c465(0x2a0,'wzIB')]||'')):console['log']('❓'+_0x19c8de+'\x20'+JSON['stringify'](_0x362ebc));break;case'myshare':if(_0x362ebc[_0x29c465(0x271,'1n#8')]==='200'&&_0x362ebc['success']===!![]){}else{if(_0x362ebc['message']){}else{}}break;}}catch(_0x49123b){console[_0x29c465(0x25c,'y0)P')](_0x29c465(0x247,'iFAH')+_0x19c8de+_0x29c465(0x207,'4Ld3')+(_0x49123b[_0x29c465(0x2bd,'tl%%')]||_0x49123b));}}async function sendRequest(_0x247990){const _0x338421=_0x1fd2bb;if($[_0x338421(0x250,'v#xk')])return;let _0x70f864='',_0x17c45a=null,_0x362ef8=null,_0x43c66d='POST',_0x11ec30={},_0x528ebe={};switch(_0x247990){case _0x338421(0x1e2,'XH8a'):_0x528ebe={'shopId':$[_0x338421(0x1d9,'&1W0')],'token':$[_0x338421(0x257,'UNJ(')],'source':'01'},_0x70f864=domains+'/webc/login/userLogin',_0x17c45a=JSON[_0x338421(0x297,'U*PZ')](_0x528ebe);break;case _0x338421(0x1f3,'y7]Z'):_0x528ebe={'activeId':$[_0x338421(0x298,'X4hc')],'shareId':$['shareUuid']||null},_0x70f864=domains+_0x338421(0x192,'&1W0'),_0x17c45a=JSON[_0x338421(0x19b,'jh^B')](_0x528ebe);break;case _0x338421(0x1d3,'rnR('):_0x528ebe={'activeId':$[_0x338421(0x24d,'IT5H')],'jobForm':$[_0x338421(0x1a2,'zE7e')][_0x338421(0x2aa,'lpzM')],'jobDetail':$[_0x338421(0x1d2,'XH8a')][_0x338421(0x203,'6MLQ')][_0x338421(0x229,'38s&')]()['config']||0x1,'joinId':$['joinId']},_0x70f864=domains+_0x338421(0x1c0,'sm&9'),_0x17c45a=JSON[_0x338421(0x1ac,'%qR*')](_0x528ebe);break;case'lottery':_0x528ebe={'activeId':$['activeId'],'joinId':$['joinId'],'lotteryForm':0x0},_0x70f864=domains+_0x338421(0x256,'y0)P'),_0x17c45a=JSON['stringify'](_0x528ebe);break;case _0x338421(0x226,'t#k5'):_0x528ebe={'activeId':$['activeId'],'joinId':$[_0x338421(0x1a5,'XH8a')],'shareId':$['shareUuid']},_0x70f864=domains+_0x338421(0x2e9,'1n#8'),_0x17c45a=JSON[_0x338421(0x297,'U*PZ')](_0x528ebe);break;case _0x338421(0x2ea,'v#xk'):_0x528ebe={'activeId':$[_0x338421(0x2ae,'jh^B')],'joinId':$[_0x338421(0x295,'1n#8')],'shareId':$[_0x338421(0x1e7,'v#xk')]},_0x70f864=domains+'/webc/unionOpen/share',_0x17c45a=JSON[_0x338421(0x2b4,'r@b#')](_0x528ebe);break;default:console['log'](_0x338421(0x1e0,'I9R5')+_0x247990);return;}const _0x5a0491={'url':_0x70f864,'method':_0x43c66d,'headers':{'Accept':_0x338421(0x2be,'1n#8'),'Accept-Encoding':_0x338421(0x2b6,'zv37'),'Accept-Language':_0x338421(0x227,'zE7e'),'Connection':_0x338421(0x293,'Mlh%'),'Content-Type':'application/json;charset=UTF-8','jd-fast-token':$[_0x338421(0x240,'wHE^')]||null,'Host':'szxyun-rc.isvjcloud.com','Cookie':cookie,'Referer':domains,'Origin':domains,'User-Agent':$['UA']},'data':_0x17c45a,'timeout':0x4e20};_0x43c66d===_0x338421(0x1b5,'(p&z')&&(delete _0x5a0491[_0x338421(0x1c5,'1n#8')],delete _0x5a0491[_0x338421(0x2a6,'[^rF')][_0x338421(0x1b7,'y7]Z')]);const _0x492d3a=0x1;let _0x1384f9=0x0,_0x2e163a=null,_0x11b7c3=![];while(_0x1384f9<_0x492d3a){_0x1384f9>0x0&&await $[_0x338421(0x286,'iFAH')](0x3e8);const _0x33b4f2=await common['request'](_0x5a0491);if(!_0x33b4f2[_0x338421(0x22e,'y7]Z')]){_0x2e163a=_0x338421(0x2d8,'y7]Z')+_0x247990+_0x338421(0x285,'(p&z')+_0x33b4f2[_0x338421(0x265,'iFAH')],_0x1384f9++;continue;}if(!_0x33b4f2[_0x338421(0x1c7,'38s&')]){_0x2e163a='🚫\x20'+_0x247990+_0x338421(0x1d4,'U*PZ'),_0x1384f9++;continue;}handleResponse(_0x247990,_0x33b4f2[_0x338421(0x1a3,'6*Ob')]),_0x11b7c3=![];break;}_0x1384f9>=_0x492d3a&&(console['log'](_0x2e163a),_0x11b7c3&&($[_0x338421(0x21a,'@H*B')]=!![],$[_0x338421(0x2bd,'tl%%')]&&$[_0x338421(0x20e,'U*PZ')]['fix'](_0x2e163a)));}async function getAuthorCodeList(_0x225531){const _0x3686a5=_0x1fd2bb,_0x56a434=await common[_0x3686a5(0x245,'tl%%')]({'url':_0x225531,'method':'GET','headers':{'User-Agent':_0x3686a5(0x1c4,'2NCb')},'proxy':null,'debug':![],'timeout':0x7530}),_0x59b5e4=_0x56a434['data'];return _0x59b5e4;}function random(_0x13da89,_0x26a1cc){const _0x4805d9=_0x1fd2bb;return Math['floor'](Math[_0x4805d9(0x1e1,'zv37')]()*(_0x26a1cc-_0x13da89))+_0x13da89;}
// 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) }