/* 8.5-8.12 畅快嗨一夏 大牌嘉年华 不会自动运行,请在有水的时候运行 //export jd_opencard_draw="3" //抽奖次数 3 //export jd_opencard_break="true" //IP限制后继续执行(true/false) cron "1 1 1 1 *" script-path=jd_opencard_0805.js */ const $ = new Env('8.5-8.12 畅快嗨一夏 大牌嘉年华') const _0x4a0d39=_0x1a00;(function(_0x129c4a,_0x2ff5da){const _0x318d1d=_0x1a00,_0x33b20e=_0x129c4a();while(!![]){try{const _0xfc0b4f=-parseInt(_0x318d1d(0x10f))/0x1*(parseInt(_0x318d1d(0x14a))/0x2)+-parseInt(_0x318d1d(0x1af))/0x3*(parseInt(_0x318d1d(0x171))/0x4)+parseInt(_0x318d1d(0x15a))/0x5*(-parseInt(_0x318d1d(0xd3))/0x6)+parseInt(_0x318d1d(0xe0))/0x7+-parseInt(_0x318d1d(0x125))/0x8+parseInt(_0x318d1d(0x141))/0x9*(-parseInt(_0x318d1d(0x19c))/0xa)+-parseInt(_0x318d1d(0x195))/0xb*(-parseInt(_0x318d1d(0xfe))/0xc);if(_0xfc0b4f===_0x2ff5da)break;else _0x33b20e['push'](_0x33b20e['shift']());}catch(_0x3a277e){_0x33b20e['push'](_0x33b20e['shift']());}}}(_0x1684,0x32e5c));const jdCookie=require('./jdCookie'),notify=require(_0x4a0d39(0x190)),opencard_draw=process[_0x4a0d39(0xd5)][_0x4a0d39(0x12e)]||0x3,hotbreak=process[_0x4a0d39(0xd5)][_0x4a0d39(0x192)]===_0x4a0d39(0x1a3),isNotify=process[_0x4a0d39(0xd5)]['jd_opencard_notify']==='true',common=require(_0x4a0d39(0x1ab)),getToken=require(_0x4a0d39(0x16e)),{lzdz1_savePrize}=require(_0x4a0d39(0x103));common['getProxyStatus']()==='关闭'?$[_0x4a0d39(0x1b6)]=0x3e8:$[_0x4a0d39(0x1b6)]=0x0;function _0x1a00(_0x3924f7,_0x4ba4f1){const _0x16845a=_0x1684();return _0x1a00=function(_0x1a006b,_0x52af03){_0x1a006b=_0x1a006b-0xc5;let _0x5b6784=_0x16845a[_0x1a006b];return _0x5b6784;},_0x1a00(_0x3924f7,_0x4ba4f1);}let domains=_0x4a0d39(0x19f),cookie='',activityCookie='',originCookie='';function _0x1684(){const _0x4ab07a=['authorCode','\x0a******开始【京东账号','openName','startTime','isEnd','缺少必要参数,请重新运行','9PhPiXN','done','application/json','taskInfo','\x20🐶',']店铺开卡失败,跳过执行~','index','wdsrvo','drawError','8NpZhnS','==========','非法操作','/customer/getMyCidPing','beans','finally','drawStop','中奖通知','LZ_TOKEN_KEY=','activityVo','未全部开卡','开始时间:','hasEnd','\x20请求失败\x20➜\x20无响应数据','unsetCookie','https://lzdz1-isv.isvjcloud.com/dingzhi/joinCommon/activity/activity?activityId=','21575rWiUuw','status','获取不到[actorUuid]退出执行,请重新执行','getCk\x20➜\x20','次,共有','venderId=','/common/accessLogWithAD','actorInfo','wait','代理开关:\x20[','joinVenderId','error','assistState','result','activityName','logErr','activityUrl','activityId=','allOpenCard','nickName','./utils/Rebels_Token.js','💨\x20空气','min','8tckfxo','&dzActivityType=0&adSource=&pin=','/dingzhi/joinCommon/saveAddress','activityContent','助力码:','Content-Type','getCk\x20➜\x20无响应数据','\x20结束,下次早点来吧~','任务完成','hasGetBasicInfo','cross-site','✅\x20助力成功',']运行间隔时长','object','prize','\x0a当前已邀请','appendContent','msg','addressId','log','settingInfo','test','priceInfo','Pin','******\x0a','Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2013_2_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Version/13.0.3\x20Mobile/15E148\x20Safari/604.1\x20Edg/87.0.4280.88','/dingzhi/joinCommon/assist','活动将在\x20','value','活动ID:','some','./utils/Rebels_sendJDNotify','变量开启状态==========','jd_opencard_break','IP被限制(493)\x0a','->\x20','22POwBDC','UserName','【提示】请先获取Cookie','🎉\x20','加入[','keep-alive','sendNotify','1307690cYkutt','hotFlag','openVenderId','https://lzdz1-isv.isvjcloud.com','已设置抽奖','变量状态结束==========','🗑️\x20专享价','true','includes','venderId','IP限制后继续执行:\x20[','活动已于\x20','\x0a结束时间:','toUrl','已助力其他人~','./utils/Rebels_jdCommon.js','shareUuid','outFlag','secretPin','88377WjdCKy',',已成功自动登记收货地址\x0a\x0a','catch','startDraw','skipRun','drawType','LZ_TOKEN_VALUE=','waitTime','/dingzhi/joinCommon/taskRecord','🗑️\x20优惠券','data','&pin=','/dingzhi/joinCommon/taskInfo','drawContent','\x20🎟️','now','getCookieValue','&taskValue=','&shareUuid=','抽奖次数:\x20[','activity','success','246sqmrBi','setCookie','env','activityType','map','LZ_TOKEN_VALUE','不是新会员','活动名称:#','join','opencard_list','LZ_AES_PIN=','人,金币','score','125041SaabJp','errorMessage','&token=','match','已经全部开卡','taskBeans','🎉\x20恭喜获得实物,奖品名称:','taskRecord','accessLogWithAD','http://code.257999.xyz/jd_joinCommon_opencard530.json','您来的太早了,活动尚未开始','getProxyStatus','获得:','张卡,还需开','开卡类活动不会自动运行,请自行测试是否有水','accessLog','filter','&code=99&pin=','recordCount','获取用户信息失败,请重新运行','taskScore','pt_pin','未关注','zh-CN,zh;q=0.9','活动已经结束了,下次早点来吧~','https://lzdz1-isv.isvjcloud.com/','stringify','time','GET','drawState','5145204KDkAKL','\x0a抽中\x20','/m/unite/dzlh0001/?activityId=','joinShopMember','undefined','./utils/Rebels_savePrize.js','未开始','taskType','未全部开卡和关注','不存在','init','getMyCidPing','name','/dingzhi/joinCommon/activityContent','config','已经助力过了哟~','LZ_TOKEN_KEY','73648IJfijy','抽奖获得:\x20','d7f9a6f2fda541b08ce9c4a793a6d6bd','https://img10.360buyimg.com/imgzone/jfs/t1/7020/27/13511/6142/5c5138d8E4df2e764/5a1216a3a5043c5d.png','drawName','body','endTime','Token','create','exit','needJoinMember','\x20请求失败\x20➜\x20','activityEnd','activityId','LZ_AES_PIN','XMLHttpRequest','actorUuid','openCardInfo','openUrl','length','keys','assistCount','45816VqVCgk','活动已结束或不存在','\x0a抽中实物\x20','&nick=','&venderId=','后面的号都会助力\x20->\x20','zh-cn','getResponseCookie','nickname','jd_opencard_draw','&uuid=','【京东账号','document','&subType=app&adSource=','assist','&taskType=','doTask','gzip,\x20deflate,\x20br','push','getUrlParameter','request','\x20🧧'];_0x1684=function(){return _0x4ab07a;};return _0x1684();}const cookiesArr=Object[_0x4a0d39(0x123)](jdCookie)[_0x4a0d39(0xd7)](_0x1fb79e=>jdCookie[_0x1fb79e])[_0x4a0d39(0xf0)](_0x4144e1=>_0x4144e1);!cookiesArr[0x0]&&($[_0x4a0d39(0x182)]($[_0x4a0d39(0x10a)],_0x4a0d39(0x197)),process[_0x4a0d39(0x118)](0x1));!(async()=>{const _0x4ff576=_0x4a0d39;authorCodeList=await getAuthorCodeList(_0x4ff576(0xe9));if(authorCodeList)$[_0x4ff576(0x13b)]=authorCodeList[random(0x0,authorCodeList['length'])];else{let _0x20e061=[''];$[_0x4ff576(0x13b)]=_0x20e061[random(0x0,_0x20e061[_0x4ff576(0x122)])];}console[_0x4ff576(0x184)](_0x4ff576(0x14b)+$['name']+_0x4ff576(0x191)),console['log'](_0x4ff576(0xee)),console[_0x4ff576(0x184)](_0x4ff576(0x163)+common[_0x4ff576(0xeb)]()+']'),console[_0x4ff576(0x184)]('间隔时长:\x20['+($[_0x4ff576(0x1b6)]===0x0?'无':$[_0x4ff576(0x1b6)]/0x3e8+'秒')+_0x4ff576(0x17d)),console[_0x4ff576(0x184)](_0x4ff576(0xd0)+opencard_draw+'次]'),console[_0x4ff576(0x184)](_0x4ff576(0x1a6)+(hotbreak?'开启':'关闭')+']'),console[_0x4ff576(0x184)]('=========='+$[_0x4ff576(0x10a)]+_0x4ff576(0x1a1)),$[_0x4ff576(0x11c)]=_0x4ff576(0x111),$[_0x4ff576(0x16a)]=_0x4ff576(0x159)+$[_0x4ff576(0x11c)],$[_0x4ff576(0x1ac)]=$[_0x4ff576(0x13b)],notify[_0x4ff576(0x10c)]({'title':$['name']});for(let _0x5c0ed4=0x0;_0x5c0ed4$[_0x4a0d39(0x169)](_0x1e10a5))[_0x4a0d39(0x14f)](()=>$[_0x4a0d39(0x142)]());async function run(){const _0xb2c0c8=_0x4a0d39;try{$['skipRun']=![],$[_0xb2c0c8(0x156)]=![],$[_0xb2c0c8(0x150)]=![],$[_0xb2c0c8(0x115)]=0x0,$[_0xb2c0c8(0x116)]='',$[_0xb2c0c8(0x188)]='',$[_0xb2c0c8(0x1a5)]=='',$[_0xb2c0c8(0x116)]=await getToken(cookie,domains);if($['Token']==''){console[_0xb2c0c8(0x184)](_0xb2c0c8(0x140));return;}await getCk();if(activityCookie==''){console[_0xb2c0c8(0x184)](_0xb2c0c8(0x140));return;}if($[_0xb2c0c8(0x11b)]===!![])return;if($[_0xb2c0c8(0x1ad)]){console[_0xb2c0c8(0x184)](_0xb2c0c8(0x193));return;}await takePostRequest('init');if($[_0xb2c0c8(0x1a5)]==''){console[_0xb2c0c8(0x184)](_0xb2c0c8(0x140));return;}await $[_0xb2c0c8(0x162)](parseInt($[_0xb2c0c8(0x1b6)]*0x1+0x64,0xa)),await takePostRequest(_0xb2c0c8(0x109));if(!$[_0xb2c0c8(0x188)]){console['log'](_0xb2c0c8(0xf3));return;}await $[_0xb2c0c8(0x162)](parseInt($[_0xb2c0c8(0x1b6)]*0x1+0x64,0xa)),await takePostRequest(_0xb2c0c8(0xe8)),await $['wait'](parseInt($['waitTime']*0x1+0x64,0xa)),await takePostRequest('activityContent');if($['hotFlag'])return;if(!$[_0xb2c0c8(0x11f)]){console[_0xb2c0c8(0x184)](_0xb2c0c8(0x15c));return;}if($[_0xb2c0c8(0x156)]===!![]||Date[_0xb2c0c8(0xcc)]()>$[_0xb2c0c8(0x115)]){$[_0xb2c0c8(0x11b)]=!![],console[_0xb2c0c8(0x184)](_0xb2c0c8(0xf8));return;}if(!$[_0xb2c0c8(0x17a)]){$[_0xb2c0c8(0x17a)]=!![];const _0x138914=$[_0xb2c0c8(0xfb)]('yyyy-MM-dd\x20HH:mm',$['startTime']),_0xaf2437=$['time']('yyyy-MM-dd\x20HH:mm',$[_0xb2c0c8(0x115)]);console['log'](($[_0xb2c0c8(0x168)]&&_0xb2c0c8(0xda)+$['activityName']+'\x0a')+_0xb2c0c8(0x18e)+$['activityId']),console[_0xb2c0c8(0x184)](_0xb2c0c8(0x155)+_0x138914+_0xb2c0c8(0x1a8)+_0xaf2437+_0xb2c0c8(0x180)+$[_0xb2c0c8(0x124)]+_0xb2c0c8(0xde)+$['score']+'枚\x0a');const _0xbed695=Date[_0xb2c0c8(0xcc)]();if($[_0xb2c0c8(0x13e)]&&_0xbed695<$[_0xb2c0c8(0x13e)]){console[_0xb2c0c8(0x184)](_0xb2c0c8(0x18c)+_0x138914+'\x20开始,晚点再来吧~'),$[_0xb2c0c8(0x11b)]=!![];return;}if($[_0xb2c0c8(0x115)]&&_0xbed695>$[_0xb2c0c8(0x115)]){console['log'](_0xb2c0c8(0x1a7)+_0xaf2437+_0xb2c0c8(0x178)),$[_0xb2c0c8(0x11b)]=!![];return;}}console[_0xb2c0c8(0x184)](_0xb2c0c8(0x175)+$[_0xb2c0c8(0x11f)]),$['openList']=[],$[_0xb2c0c8(0x16c)]=![],await takePostRequest('taskInfo'),await $[_0xb2c0c8(0x162)](parseInt($[_0xb2c0c8(0x1b6)]*0x1+0x64,0xa));if($[_0xb2c0c8(0x144)])for(let _0x4b24f2 in $['taskInfo']){switch(_0x4b24f2){case'1':$[_0xb2c0c8(0xdc)]=$[_0xb2c0c8(0x144)][_0x4b24f2][_0xb2c0c8(0x185)];break;}}await takePostRequest(_0xb2c0c8(0xe7));if($[_0xb2c0c8(0xe7)])for(let _0x1ac852 in $['taskRecord']){if(_0x1ac852=='1')continue;let _0x4852c1=$[_0xb2c0c8(0xe7)][_0x1ac852];if(_0x4852c1?.[_0xb2c0c8(0xf2)]>0x0)continue;if(_0x4852c1?.[_0xb2c0c8(0xe5)]===0x0&&_0x4852c1?.[_0xb2c0c8(0xf4)]===0x0)continue;switch(_0x1ac852){case'20':case'23':case'24':$[_0xb2c0c8(0x105)]=$[_0xb2c0c8(0xe7)][_0x1ac852]?.[_0xb2c0c8(0x105)],await takePostRequest(_0xb2c0c8(0x135)),await $[_0xb2c0c8(0x162)](parseInt($[_0xb2c0c8(0x1b6)]*0x1+0x64,0xa));break;}}await $[_0xb2c0c8(0x162)](0x1f4),await takePostRequest(_0xb2c0c8(0x133)),await $[_0xb2c0c8(0x162)](parseInt($[_0xb2c0c8(0x1b6)]*0x1+0x64,0xa));if($[_0xb2c0c8(0x133)]?.['openCardInfo']?.['openAll']!=!![]){let _0x2881a5=$[_0xb2c0c8(0x133)]?.[_0xb2c0c8(0x120)]?.[_0xb2c0c8(0x19e)]||[];console[_0xb2c0c8(0x184)]('共有'+$[_0xb2c0c8(0xdc)][_0xb2c0c8(0x122)]+_0xb2c0c8(0xed)+($[_0xb2c0c8(0xdc)][_0xb2c0c8(0x122)]-_0x2881a5[_0xb2c0c8(0x122)])+'张卡');for(let _0x5693ff of $[_0xb2c0c8(0xdc)]){$['openUrl']=_0x5693ff[_0xb2c0c8(0x1a9)],$[_0xb2c0c8(0x13d)]=_0x5693ff['name'],$[_0xb2c0c8(0x164)]=common[_0xb2c0c8(0x138)]($[_0xb2c0c8(0x121)],_0xb2c0c8(0x1a5));(!$[_0xb2c0c8(0x121)]||!/^\d+$/[_0xb2c0c8(0x186)]($[_0xb2c0c8(0x164)]))&&($[_0xb2c0c8(0x164)]=_0x5693ff[_0xb2c0c8(0x18d)]||_0x5693ff['venderId']);if(_0x2881a5[_0xb2c0c8(0x1a4)](Number(_0x5693ff[_0xb2c0c8(0x18d)])))continue;const _0x331b34=await common[_0xb2c0c8(0x101)]($[_0xb2c0c8(0x164)]);if(_0x331b34)console['log'](_0xb2c0c8(0x199)+$[_0xb2c0c8(0x13d)]+']店铺会员成功'),await $[_0xb2c0c8(0x162)](parseInt($['waitTime']*0x1+0x64,0xa));else{console['log']('['+$['openName']+_0xb2c0c8(0x146));return;}await $[_0xb2c0c8(0x162)](parseInt($[_0xb2c0c8(0x1b6)]*0x1+0x64,0xa));}await takePostRequest('assist'),await $[_0xb2c0c8(0x162)](parseInt($[_0xb2c0c8(0x1b6)]*0x1+0x64,0xa));}if(opencard_draw&&!$[_0xb2c0c8(0x150)]){await takePostRequest(_0xb2c0c8(0x174));let _0x13289c=parseInt($[_0xb2c0c8(0xdf)]/0x64),_0x1500cc=Math[_0xb2c0c8(0x170)](opencard_draw,_0x13289c);$[_0xb2c0c8(0x17f)]=[],console['log'](_0xb2c0c8(0x1a0)+opencard_draw+_0xb2c0c8(0x15e)+_0x13289c+'次抽奖,可抽奖'+_0x1500cc+'次');for(m=0x1;_0x1500cc--;m++){await takePostRequest(_0xb2c0c8(0x1b2));if(Number(_0x1500cc)<=0x0)break;if(m>=0xa){console[_0xb2c0c8(0x184)]('抽奖太多次,多余的次数请再执行脚本');break;}await $[_0xb2c0c8(0x162)](parseInt($[_0xb2c0c8(0x1b6)]*0x1+0x7d0,0xa));}$[_0xb2c0c8(0x17f)][_0xb2c0c8(0x122)]&&console[_0xb2c0c8(0x184)](_0xb2c0c8(0x110)+$[_0xb2c0c8(0x17f)][_0xb2c0c8(0xdb)](',\x20')+'\x0a');}if($[_0xb2c0c8(0x1ad)]){console[_0xb2c0c8(0x184)](_0xb2c0c8(0x193));return;}$[_0xb2c0c8(0x147)]==0x1&&($[_0xb2c0c8(0x1ac)]=$['actorUuid'],console[_0xb2c0c8(0x184)](_0xb2c0c8(0x12a)+$[_0xb2c0c8(0x1ac)]));if($[_0xb2c0c8(0x147)]%0x5==0x0)await $['wait'](parseInt($[_0xb2c0c8(0x1b6)]*0xf+0x1388,0xa));}catch(_0x1787d1){console[_0xb2c0c8(0x184)](_0x1787d1);}}async function takePostRequest(_0x4ef913){const _0x40f54e=_0x4a0d39;if($[_0x40f54e(0x1ad)])return;let _0x4fc240='',_0x53ff9c=null,_0x21c2f6=null,_0x4c79b3=null,_0xa14961='POST';switch(_0x4ef913){case _0x40f54e(0x108):_0x4fc240=domains+'/dingzhi/taskact/common/init',_0x53ff9c=_0x40f54e(0x16b)+$[_0x40f54e(0x11c)]+_0x40f54e(0x172);break;case _0x40f54e(0x109):_0x4fc240=domains+_0x40f54e(0x14d),_0x53ff9c=_0x40f54e(0x16b)+$[_0x40f54e(0x11c)]+_0x40f54e(0xe2)+$[_0x40f54e(0x116)]+'&fromType=APP_shopGift&userId='+$['venderId']+_0x40f54e(0xc8);break;case _0x40f54e(0xe8):_0x4fc240=domains+_0x40f54e(0x160);let _0xfb6ab5=domains+_0x40f54e(0x100)+$['activityId']+_0x40f54e(0x129)+$['venderId']+_0x40f54e(0xcf)+$[_0x40f54e(0x1ac)];_0x53ff9c=_0x40f54e(0x15f)+$[_0x40f54e(0x1a5)]+_0x40f54e(0xf1)+encodeURIComponent($[_0x40f54e(0x188)])+'&activityId='+$['activityId']+'&pageUrl='+encodeURIComponent(_0xfb6ab5)+_0x40f54e(0x132);break;case _0x40f54e(0x174):_0x4fc240=domains+_0x40f54e(0x10b),_0x53ff9c=_0x40f54e(0x16b)+$[_0x40f54e(0x11c)]+'&pin='+encodeURIComponent($[_0x40f54e(0x188)])+'&pinImg='+encodeURIComponent(_0x40f54e(0x112))+_0x40f54e(0x128)+encodeURIComponent($[_0x40f54e(0x12d)])+'&shareUuid='+$[_0x40f54e(0x1ac)];break;case'taskInfo':_0x4fc240=domains+_0x40f54e(0xc9),_0x53ff9c=_0x40f54e(0x16b)+$[_0x40f54e(0x11c)]+'&pin='+encodeURIComponent($['Pin']);break;case _0x40f54e(0x133):_0x4fc240=domains+_0x40f54e(0x18b),_0x53ff9c=_0x40f54e(0x16b)+$[_0x40f54e(0x11c)]+'&pin='+encodeURIComponent($[_0x40f54e(0x188)])+_0x40f54e(0x12f)+$['actorUuid']+_0x40f54e(0xcf)+$[_0x40f54e(0x1ac)];break;case _0x40f54e(0xe7):_0x4fc240=domains+_0x40f54e(0xc5),_0x53ff9c=_0x40f54e(0x16b)+$[_0x40f54e(0x11c)]+'&pin='+encodeURIComponent($[_0x40f54e(0x188)])+_0x40f54e(0x12f)+$[_0x40f54e(0x11f)]+_0x40f54e(0x134);break;case _0x40f54e(0x135):_0x4fc240=domains+'/dingzhi/joinCommon/doTask',_0x53ff9c='activityId='+$['activityId']+'&uuid='+$['actorUuid']+_0x40f54e(0xc8)+encodeURIComponent($['Pin'])+_0x40f54e(0x134)+$[_0x40f54e(0x105)]+_0x40f54e(0xce);break;case _0x40f54e(0x1b2):_0x4fc240=domains+'/dingzhi/joinCommon/startDraw',_0x53ff9c=_0x40f54e(0x16b)+$[_0x40f54e(0x11c)]+_0x40f54e(0x12f)+$[_0x40f54e(0x11f)]+_0x40f54e(0xc8)+encodeURIComponent($['Pin']);break;default:console[_0x40f54e(0x184)]('错误'+_0x4ef913);}const _0x25b66e={'url':_0x4fc240,'method':_0xa14961,'headers':{'Accept':_0x40f54e(0x143),'Accept-Encoding':_0x40f54e(0x136),'Accept-Language':_0x40f54e(0x12b),'Connection':'keep-alive','Content-Type':'application/x-www-form-urlencoded','Cookie':activityCookie['trim'](),'User-Agent':$['UA'],'X-Requested-With':_0x40f54e(0x11e),'Origin':_0x40f54e(0xf9),'Referer':domains},'data':_0x53ff9c,'timeout':0x4e20};_0xa14961===_0x40f54e(0xfc)&&(delete _0x25b66e[_0x40f54e(0x114)],delete _0x25b66e['headers'][_0x40f54e(0x176)]);const _0x481b06=0x5;let _0x5096a4=0x0,_0x2c4495=null,_0x5f129f=![];while(_0x5096a4<_0x481b06){_0x5096a4>0x0&&await $[_0x40f54e(0x162)](0x3e8);const _0x29ee42=await common[_0x40f54e(0x139)](_0x25b66e);if(!_0x29ee42[_0x40f54e(0xd2)]){_0x2c4495=_0x4ef913+_0x40f54e(0x11a)+_0x29ee42['error'],_0x5096a4++;_0x29ee42[_0x40f54e(0x15b)]&&([0x193,0x1ed]['includes'](_0x29ee42[_0x40f54e(0x15b)])&&(_0x5f129f=!![]));continue;}if([_0x40f54e(0xef),_0x40f54e(0xe8)][_0x40f54e(0x1a4)](_0x4ef913))break;if(!_0x29ee42[_0x40f54e(0xc7)]){_0x2c4495=_0x4ef913+_0x40f54e(0x157),_0x5096a4++;continue;}const _0x565d6f=common[_0x40f54e(0x12c)](_0x29ee42,activityCookie);let _0x193c37='';switch(_0x4ef913){case'getMyCidPing':_0x193c37=common[_0x40f54e(0xcd)](_0x565d6f,'LZ_AES_PIN');_0x193c37?$[_0x40f54e(0x11d)]=_0x193c37:(console[_0x40f54e(0x184)]('获取\x20LZ_AES_PIN\x20失败!'),$[_0x40f54e(0x1b3)]=!![]);break;}[_0x40f54e(0x109),_0x40f54e(0x144),_0x40f54e(0x1b2)][_0x40f54e(0x1a4)](_0x4ef913)&&(activityCookie=_0x565d6f);_0x193c37=common['getCookieValue'](activityCookie,_0x40f54e(0x11d));!_0x193c37&&$['LZ_AES_PIN']&&(activityCookie+=_0x40f54e(0xdd)+$[_0x40f54e(0x11d)]+';\x20');const _0xcde04e=common[_0x40f54e(0xcd)](activityCookie,_0x40f54e(0x10e));!_0xcde04e&&$[_0x40f54e(0x10e)]&&(activityCookie+=_0x40f54e(0x152)+$[_0x40f54e(0x10e)]+';\x20');const _0x4a944a=common[_0x40f54e(0xcd)](activityCookie,_0x40f54e(0xd8));!_0x4a944a&&$[_0x40f54e(0xd8)]&&(activityCookie+=_0x40f54e(0x1b5)+$[_0x40f54e(0xd8)]+';\x20');await handleResponse(_0x4ef913,_0x29ee42[_0x40f54e(0xc7)]),_0x5f129f=![];break;}_0x5096a4>=_0x481b06&&(console[_0x40f54e(0x184)](_0x2c4495),_0x5f129f&&![_0x40f54e(0x109),'taskInfo','accessLogWithAD',_0x40f54e(0xef)][_0x40f54e(0x1a4)](_0x4ef913)&&(!hotbreak&&($[_0x40f54e(0x1ad)]=!![])));}async function handleResponse(_0x5874dd,_0x57efae){const _0x2f4b76=_0x4a0d39;try{switch(_0x5874dd){case _0x2f4b76(0x108):if(typeof _0x57efae==_0x2f4b76(0x17e)){if(_0x57efae[_0x2f4b76(0x167)]&&_0x57efae[_0x2f4b76(0x167)]===!![])$['shopId']=_0x57efae[_0x2f4b76(0xc7)]?.['shopId'],$[_0x2f4b76(0x1a5)]=_0x57efae['data']?.[_0x2f4b76(0x1a5)],$[_0x2f4b76(0x13e)]=_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x13e)],$[_0x2f4b76(0x115)]=_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x115)],$[_0x2f4b76(0xd6)]=_0x57efae['data']?.['activityType'];else _0x57efae[_0x2f4b76(0xe1)]?console['log'](''+(_0x57efae[_0x2f4b76(0xe1)]||'')):console[_0x2f4b76(0x184)](''+_0x57efae);}else console['log'](''+_0x57efae);break;case _0x2f4b76(0x109):if(typeof _0x57efae=='object'){if(_0x57efae[_0x2f4b76(0x167)]&&_0x57efae['result']===!![]){if(_0x57efae[_0x2f4b76(0xc7)]&&typeof _0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x1ae)]!=_0x2f4b76(0x102))$[_0x2f4b76(0x188)]=_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x1ae)];if(_0x57efae[_0x2f4b76(0xc7)]&&typeof _0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x12d)]!=_0x2f4b76(0x102))$['nickname']=_0x57efae[_0x2f4b76(0xc7)]?.['nickname'];}else _0x57efae[_0x2f4b76(0xe1)]?console[_0x2f4b76(0x184)](''+(_0x57efae[_0x2f4b76(0xe1)]||'')):console[_0x2f4b76(0x184)](''+_0x57efae);}else console[_0x2f4b76(0x184)](''+_0x57efae);break;case _0x2f4b76(0x174):if(typeof _0x57efae=='object'){if(_0x57efae['result']&&_0x57efae[_0x2f4b76(0x167)]===!![])$[_0x2f4b76(0x168)]=_0x57efae[_0x2f4b76(0xc7)]?.['activityName']||'',$[_0x2f4b76(0x115)]=_0x57efae['data']?.[_0x2f4b76(0x115)]||_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x153)]&&_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x153)]?.[_0x2f4b76(0x115)]||_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0xd1)]?.[_0x2f4b76(0x115)]||0x0,$['hasEnd']=_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x13f)]||![],$[_0x2f4b76(0xdf)]=_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x161)]?.[_0x2f4b76(0xdf)]||0x0,$[_0x2f4b76(0x11f)]=_0x57efae['data']?.[_0x2f4b76(0x161)]?.['uuid']||'',$[_0x2f4b76(0x124)]=_0x57efae['data']?.[_0x2f4b76(0x161)]?.[_0x2f4b76(0x124)]||0x0;else _0x57efae[_0x2f4b76(0xe1)]?console[_0x2f4b76(0x184)](''+(_0x57efae['errorMessage']||'')):console[_0x2f4b76(0x184)](''+_0x57efae);}else console[_0x2f4b76(0x184)](''+_0x57efae);break;case _0x2f4b76(0x133):if(typeof _0x57efae=='object'){if(_0x57efae[_0x2f4b76(0x167)]&&_0x57efae[_0x2f4b76(0x167)]===!![]){$[_0x2f4b76(0x133)]=_0x57efae[_0x2f4b76(0xc7)];if($[_0x2f4b76(0x133)]){$[_0x2f4b76(0x133)]?.[_0x2f4b76(0x120)]?.['hasNewOpen']&&console[_0x2f4b76(0x184)]('开卡获得了'+($[_0x2f4b76(0x133)]?.['openCardInfo']?.[_0x2f4b76(0x14e)]||0x0)+'京豆');if($[_0x2f4b76(0x133)]?.[_0x2f4b76(0x120)]?.['openAll']==!![]){console[_0x2f4b76(0x184)](_0x2f4b76(0xe4));switch($[_0x2f4b76(0x133)]?.[_0x2f4b76(0x166)]){case'':case undefined:case 0x0:break;case 0x1:console[_0x2f4b76(0x184)](_0x2f4b76(0x17c));break;case 0x2:case 0xa:console[_0x2f4b76(0x184)](_0x2f4b76(0x10d));break;case 0x3:case 0xb:console[_0x2f4b76(0x184)](_0x2f4b76(0x1aa));break;case 0x14:console[_0x2f4b76(0x184)](_0x2f4b76(0x154));break;case 0x15:console['log'](_0x2f4b76(0x106));break;case 0x16:console[_0x2f4b76(0x184)](_0x2f4b76(0xd9));break;case 0x4d:console['log'](_0x2f4b76(0xf6));break;case 0x58:console[_0x2f4b76(0x184)]('未加入会员并关注店铺');break;case 0x63:console[_0x2f4b76(0x184)]('未加入会员');break;default:console[_0x2f4b76(0x184)]('未知助力返回码');break;}return;}}}else _0x57efae[_0x2f4b76(0xe1)]?console['log'](''+(_0x57efae[_0x2f4b76(0xe1)]||'')):console[_0x2f4b76(0x184)](''+_0x57efae);}else console[_0x2f4b76(0x184)](''+_0x57efae);break;case _0x2f4b76(0xe7):if(typeof _0x57efae==_0x2f4b76(0x17e)){if(_0x57efae['result']&&_0x57efae['result']===!![])$[_0x2f4b76(0xe7)]=_0x57efae[_0x2f4b76(0xc7)];else _0x57efae['errorMessage']?console[_0x2f4b76(0x184)](''+(_0x57efae['errorMessage']||'')):console['log'](''+_0x57efae);}else console[_0x2f4b76(0x184)](''+_0x57efae);break;case _0x2f4b76(0x144):if(typeof _0x57efae==_0x2f4b76(0x17e)){if(_0x57efae[_0x2f4b76(0x167)]&&_0x57efae[_0x2f4b76(0x167)]===!![])$[_0x2f4b76(0x144)]=_0x57efae[_0x2f4b76(0xc7)];else _0x57efae[_0x2f4b76(0xe1)]?console[_0x2f4b76(0x184)](''+(_0x57efae[_0x2f4b76(0xe1)]||'')):console[_0x2f4b76(0x184)](''+_0x57efae);}else console[_0x2f4b76(0x184)](''+_0x57efae);break;case'doTask':if(typeof _0x57efae==_0x2f4b76(0x17e)){if(_0x57efae[_0x2f4b76(0x167)]&&_0x57efae[_0x2f4b76(0x167)]===!![]){let _0x3437aa=_0x2f4b76(0x179);_0x57efae?.[_0x2f4b76(0xc7)]?.['beans']>0x0&&(_0x3437aa+=','+(_0x57efae?.[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x14e)]||0x0)+'京豆'),_0x57efae?.['data']?.[_0x2f4b76(0xdf)]>0x0&&(_0x3437aa+=','+(_0x57efae?.[_0x2f4b76(0xc7)]?.[_0x2f4b76(0xdf)]||0x0)+'金币'),console['log'](_0x3437aa);}else _0x57efae[_0x2f4b76(0xe1)]?console[_0x2f4b76(0x184)](''+(_0x57efae['errorMessage']||'')):console['log'](''+_0x57efae);}else console[_0x2f4b76(0x184)](''+_0x57efae);break;case _0x2f4b76(0x1b2):if(typeof _0x57efae==_0x2f4b76(0x17e)){if(_0x57efae[_0x2f4b76(0x167)]&&_0x57efae[_0x2f4b76(0x167)]===!![]){if(_0x57efae['data']?.[_0x2f4b76(0x148)]?.[_0x2f4b76(0xfd)]){const _0x133615=_0x57efae[_0x2f4b76(0xc7)]?.[_0x2f4b76(0x148)];if(_0x133615)switch(_0x133615[_0x2f4b76(0x1b4)]){case 0x6:$[_0x2f4b76(0x17f)][_0x2f4b76(0x137)]('🎉\x20'+_0x133615['drawName']+_0x2f4b76(0x145));break;case 0x7:const _0x392024=domains+_0x2f4b76(0x173),_0x34198f=_0x133615[_0x2f4b76(0x183)],_0x1d7514=_0x133615[_0x2f4b76(0x113)];$[_0x2f4b76(0x17f)]['push'](_0x2f4b76(0xe6)+_0x1d7514);const _0x4b0581={'baseUrl':domains,'saveAddressurl':_0x392024,'uuid':$[_0x2f4b76(0x11f)],'cookie':activityCookie,'ua':$['UA'],'activityId':$['activityId'],'activityType':0x63,'venderId':$[_0x2f4b76(0x1a5)],'secretPin':$[_0x2f4b76(0x188)],'prizeName':_0x1d7514,'itemsId':_0x34198f,'activityUrl':$[_0x2f4b76(0x16a)]},_0x3edec0=await lzdz1_savePrize(_0x4b0581);_0x3edec0&&await notify['sendNotify']($[_0x2f4b76(0x10a)]+_0x2f4b76(0x151),_0x2f4b76(0x130)+$[_0x2f4b76(0x147)]+'】'+$['nickName']+_0x2f4b76(0x127)+_0x1d7514+_0x2f4b76(0x1b0)+$[_0x2f4b76(0x16a)]);break;case 0x8:$[_0x2f4b76(0x17f)][_0x2f4b76(0x137)](_0x2f4b76(0x1a2));break;case 0x9:$[_0x2f4b76(0x17f)][_0x2f4b76(0x137)]('🗑️\x20'+_0x133615[_0x2f4b76(0x113)]+_0x2f4b76(0xcb));break;case 0xd:case 0xe:case 0xf:$[_0x2f4b76(0x17f)][_0x2f4b76(0x137)]('🎉\x20恭喜获得'+_0x133615[_0x2f4b76(0x113)]+'\x20🎁'),await notify[_0x2f4b76(0x19b)]($[_0x2f4b76(0x10a)]+_0x2f4b76(0x151),_0x2f4b76(0x130)+$[_0x2f4b76(0x147)]+'】'+$[_0x2f4b76(0x16d)]+_0x2f4b76(0xff)+_0x133615[_0x2f4b76(0x113)]+'\x0a\x0a'+$[_0x2f4b76(0x16a)]);break;case 0x10:$[_0x2f4b76(0x17f)][_0x2f4b76(0x137)](_0x2f4b76(0x198)+_0x133615[_0x2f4b76(0x187)]+_0x2f4b76(0x13a));break;default:_0x133615[_0x2f4b76(0x113)][_0x2f4b76(0x1a4)]('券')?$[_0x2f4b76(0x17f)][_0x2f4b76(0x137)](_0x2f4b76(0xc6)):$['prize'][_0x2f4b76(0x137)](_0x2f4b76(0xec)+_0x133615[_0x2f4b76(0x113)]);break;}}else $[_0x2f4b76(0x17f)][_0x2f4b76(0x137)](_0x2f4b76(0x16f));}else _0x57efae[_0x2f4b76(0xe1)]&&($[_0x2f4b76(0x149)]=_0x57efae[_0x2f4b76(0xe1)],['上限','不足','超过',_0x2f4b76(0x14c),'明天'][_0x2f4b76(0x18f)](_0xf18132=>$[_0x2f4b76(0x149)][_0x2f4b76(0x1a4)](_0xf18132))&&($[_0x2f4b76(0x150)]=!![],$['prize'][_0x2f4b76(0x137)]($[_0x2f4b76(0x149)])),[_0x2f4b76(0x104),'结束',_0x2f4b76(0x107),'不在'][_0x2f4b76(0x18f)](_0x4b169f=>$[_0x2f4b76(0x149)][_0x2f4b76(0x1a4)](_0x4b169f))&&($[_0x2f4b76(0x11b)]=!![]),['会员','开卡'][_0x2f4b76(0x18f)](_0x5ffdd=>$[_0x2f4b76(0x149)][_0x2f4b76(0x1a4)](_0x5ffdd))&&($[_0x2f4b76(0x119)]=!![],$[_0x2f4b76(0x17f)][_0x2f4b76(0x137)]($['drawError'])),!['火爆','擦肩','缓存','数据忙'][_0x2f4b76(0x18f)](_0x2bb03a=>$[_0x2f4b76(0x149)]['includes'](_0x2bb03a))&&!$[_0x2f4b76(0x150)]&&!$[_0x2f4b76(0x119)]&&$[_0x2f4b76(0x17f)][_0x2f4b76(0x137)]($[_0x2f4b76(0x149)]||''));}else console['log']('❓'+_0x5874dd+'\x20'+JSON[_0x2f4b76(0xfa)](_0x57efae));break;case'accessLogWithAD':case _0x2f4b76(0xca):break;default:console[_0x2f4b76(0x184)](_0x5874dd+_0x2f4b76(0x194)+_0x57efae);}typeof _0x57efae==_0x2f4b76(0x17e)&&(_0x57efae[_0x2f4b76(0xe1)]&&(_0x57efae['errorMessage']['indexOf']('火爆')>-0x1&&($[_0x2f4b76(0x19d)]=!![])));}catch(_0x20d803){console[_0x2f4b76(0x184)](_0x20d803);}}async function getCk(){const _0x3522af=_0x4a0d39;$[_0x3522af(0x1b3)]=!![];const _0x390fa9={'url':$[_0x3522af(0x16a)],'method':_0x3522af(0xfc),'headers':{'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7','Accept-Encoding':_0x3522af(0x136),'Accept-Language':_0x3522af(0xf7),'Connection':_0x3522af(0x19a),'Sec-Fetch-Dest':_0x3522af(0x131),'Sec-Fetch-Mode':'navigate','Sec-Fetch-Site':_0x3522af(0x17b),'Referer':domains,'User-Agent':$['UA']},'timeout':0x7530},_0x434367=0x3;let _0x5afd7f=0x0,_0x520948=null,_0x54115f=![];while(_0x5afd7f<_0x434367){_0x5afd7f>0x0&&await $[_0x3522af(0x162)](0x3e8);const _0x405062=await common[_0x3522af(0x139)](_0x390fa9);if(!_0x405062['success']){_0x520948=_0x3522af(0x15d)+_0x405062[_0x3522af(0x165)],_0x5afd7f++;_0x405062[_0x3522af(0x15b)]&&([0x193,0x1ed]['includes'](_0x405062['status'])&&(_0x54115f=!![]));continue;}if(!_0x405062[_0x3522af(0xc7)]){_0x520948=_0x3522af(0x177),_0x5afd7f++;continue;}_0x405062['data']['match'](/(活动已经结束)/)&&_0x405062[_0x3522af(0xc7)][_0x3522af(0xe3)](/(活动已经结束)/)[0x1]&&($[_0x3522af(0x11b)]=!![],console[_0x3522af(0x184)](_0x3522af(0x126)));_0x405062['data'][_0x3522af(0xe3)](/(活动未开始)/)&&_0x405062[_0x3522af(0xc7)][_0x3522af(0xe3)](/(活动未开始)/)[0x1]&&($[_0x3522af(0x11b)]=!![],console[_0x3522af(0x184)](_0x3522af(0xea)));activityCookie=common[_0x3522af(0x12c)](_0x405062);let _0x43ebde='',_0x2bf34e='';_0x43ebde=common[_0x3522af(0xcd)](activityCookie,_0x3522af(0x10e)),_0x2bf34e=common[_0x3522af(0xcd)](activityCookie,_0x3522af(0xd8));_0x43ebde&&($[_0x3522af(0x10e)]=_0x43ebde);_0x2bf34e&&($['LZ_TOKEN_VALUE']=_0x2bf34e);$['skipRun']=![];break;}_0x5afd7f>=_0x434367&&(console[_0x3522af(0x184)](_0x520948),_0x54115f&&(!hotbreak&&($[_0x3522af(0x1ad)]=!![])));}async function getAuthorCodeList(_0x34478d){const _0x351714=_0x4a0d39,_0x4b1d6f=await common[_0x351714(0x139)]({'url':_0x34478d,'method':_0x351714(0xfc),'headers':{'User-Agent':_0x351714(0x18a)},'proxy':null,'debug':![],'timeout':0x7530}),_0x380b96=_0x4b1d6f[_0x351714(0xc7)];return _0x380b96;}function random(_0x44d404,_0x1ebd0e){return Math['floor'](Math['random']()*(_0x1ebd0e-_0x44d404))+_0x44d404;} // 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) }