You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

14 lines
20 KiB

/*
太太乐餐饮服务 微信小程序
==========
青龙变量
==========
export ttlaccount='' 手机号码#密码 ,多账号@隔开
export ttldh='' 兑换类型,@分割 633=10元手机话费(仅电信用户) 631=30元手机话费(仅移动用户) 62=5元手机话费(仅联通用户) 61=2元手机话费(仅联通用户)
==========
[task_local]
0 8-20 * * * task ttl.js
(日常跑一次就行,兑换时可以多跑几次,8-9点会签到分享,其他时间只兑换)
*/
const x=j;(function(q,X){const I=j,o=q();while(!![]){try{const i=parseInt(I(0x1ec))/0x1*(parseInt(I(0x1cd))/0x2)+-parseInt(I(0x14a))/0x3*(-parseInt(I(0x188))/0x4)+parseInt(I(0x163))/0x5+-parseInt(I(0x1b7))/0x6*(parseInt(I(0x143))/0x7)+-parseInt(I(0x19d))/0x8+parseInt(I(0x15d))/0x9*(parseInt(I(0x154))/0xa)+-parseInt(I(0x18c))/0xb*(parseInt(I(0x1a5))/0xc);if(i===X)break;else o['push'](o['shift']());}catch(A){o['push'](o['shift']());}}}(y,0x21ef5));const $=new Env(x(0x13e));var request=require(x(0x1d5));const notify=$['isNode']()?require('./sendNotify'):'';let status;status=(status=$[x(0x174)](x(0x17a))||'1')>0x1?''+status:'';const hour=new Date(new Date()[x(0x1ac)]()+new Date()[x(0x1a0)]()*0x3c*0x3e8+0x8*0x3c*0x3c*0x3e8)[x(0x1b4)](),minute=new Date(new Date()[x(0x1ac)]()+new Date()[x(0x1a0)]()*0x3c*0x3e8+0x8*0x3c*0x3c*0x3e8)['getMinutes']();let giftAmount,giftNames,giftPrice,date,ttlaccounts='',ttlaccountArr=[],ttldhs='',ttldhArr=[],ttlaccount=$[x(0x15c)]()?process[x(0x1dd)]['ttlaccount']?process[x(0x1dd)]['ttlaccount']:'':$[x(0x19b)](x(0x14f))?$['getdata'](x(0x14f)):'';const ttldh=$[x(0x15c)]()?process['env'][x(0x1c5)]?process[x(0x1dd)]['ttldh']:'':$[x(0x19b)](x(0x1c5))?$[x(0x19b)]('ttldh'):'';let stockPrice=0x0,stockAmount2,stockName='',message='',ttlhds='';const logs=0x0,host=x(0x137);var hours=new Date()['getHours'](),s=new Date()[x(0x192)](),timestamp=Math['round'](new Date()[x(0x1ac)]()/0x3e8)[x(0x1f2)]();function j(q,X){const o=y();return j=function(i,A){i=i-0x132;let v=o[i];return v;},j(q,X);}!(async()=>{const w=x;if(typeof $request!=='undefined'){}else{if(!await checkEnv())return;console[w(0x1a8)]('共'+ttlaccountArr[w(0x1dc)]+'个cookie'),giftAmount={},giftNames={},giftPrice={},await ttl_gift();for(let q=0x0;q<ttlaccountArr['length'];q++){user_pwd=ttlaccountArr[q][w(0x1a4)]('#'),user=user_pwd[0x0],pwd=user_pwd[0x1],giftId=ttldhArr[q],stockAmount2=giftAmount[giftId],stockName=giftNames[giftId],stockPrice=giftPrice[giftId],$[w(0x13c)]='',$[w(0x13f)]=q+0x1,console[w(0x1a8)]('\x0a开始【太太乐'+$[w(0x13f)]+'】'),await ttl_login(),await $[w(0x161)](0x3e8),hour>0x7&&hour<0xa&&(await sign(),await $[w(0x161)](0x7d0),await blog()),await $['wait'](0x3e8),await my();}}})()[x(0x19e)](q=>$['logErr'](q))[x(0x1e3)](()=>$[x(0x1b9)]());async function checkEnv(){const F=x;if(ttlaccount)for(let q of ttlaccount[F(0x1a4)]('@')){if(q)ttlaccountArr['push'](q);}else return console[F(0x1a8)](F(0x1df)),![];if(ttldh)for(let X of ttldh[F(0x1a4)]('@')){if(X)ttldhArr['push'](X);}else return console[F(0x1a8)](F(0x179)),![];return!![];}function ttlck(){const H=x;if($request[H(0x180)][H(0x198)](H(0x1c3))>-0x1){const q=$request['body'][H(0x1d4)];if(q)$[H(0x16c)](q,H(0x173)+status);$['log'](q),$[H(0x186)]($[H(0x145)],'',H(0x13e)+(''+q)+H(0x1d7));}}function y(){const yr=['string','exec','setValueForKey','statusCode','A35D575F-C004-4717-AABC-ED9D1979C3FA','status','setdata','http://www.ttljf.com/ttl_site/chargeApi.do','Mozilla/5.0\x20(iPhone;\x20CPU\x20iPhone\x20OS\x2014_3\x20like\x20Mac\x20OS\x20X)\x20AppleWebKit/605.1.15\x20(KHTML,\x20like\x20Gecko)\x20Mobile/15E148\x20MicroMessenger/8.0.14(0x18000e2f)\x20NetType/4G\x20Language/zh_CN','media-url','floor','body','\x20id:\x20','ttlhd','getval','stack',',\x20错误!','getMonth','get','未设置兑换商品代码:ttldh','ttlstatus','logSeparator','valueForKey','application/json,\x20text/plain,\x20*/*','then','open-url','url','积分达到兑换标准,尝试开始兑换','POST','user','cron','isNeedRewrite','msg','method=charge&userId=','5780VbrkTj','logErr','isArray','cookieJar','253Cjqegk','headers','&platform=android','lodash_get','getjson','\x20API请求失败,请检查网路重试','getMinutes','concat','\x20积分:','==============📣系统通知📣==============','mediaUrl','loaddata','indexOf','gzip,compress,br,deflate','startTime','getdata','resolve','1606872gZCArZ','catch','existsSync','getTimezoneOffset','\x20积分\x20','gifts','Content-Length','split','63708JPJQOa','\x0a签到任务:','getFullYear','log','setval','application/x-www-form-urlencoded','\x20结果:','getTime','write','lodash_set',',\x20积分:\u3000','map','replace','*/*','box.dat','getHours','stringify','&loginToken=','455418yexReP','&password=','done','call','openUrl','.$1','put','userName','push','parse','登录信息\x20','tough-cookie','user/api/my','object','ttldh','@chavy_boxjs_userCfgs.httpapi','isQuanX','ckjar','stockAmount','user/api/sign/today','http://','www.ttljf.com','14914alvamK','initGotEnv','join','isSurge','undefined','logs','readFileSync','token','request','setCookieSync','数据获取成功!','price','GET','timeout','code','length','env','post','未找到ttlaccount','userId','application/json','dataFile','finally','redirect','isMute',',\x20库存:\x20','/v1/scripting/evaluate',',\x20开始!','assign','XMLHttpRequest','isMuteLog','11nkFqVr','mobile','writedata','integral','reduce','read','toString','服务器访问数据为空,请检查自身设备网络情况','设置当天积分缓存成功!','data','\x20库存:','substr','fetch','giftId','0000','https://www.ttljf.com/ttl_chefHub/','toObj','http','cwd','设置兑换','message','got','太太乐','index','null','path','trim','14jhsLmb','getScript','name',')\x20\x0a【登录信息】\x20','opts','mthd=login&username=','http://www.ttljf.com/ttl_site/user.do','375Mxbpjc','Cookie','cktough','isLoon','请勿随意在BoxJs输入框修改内容\x0a建议通过脚本去获取cookie','ttlaccount','Content-Type','getSeconds','giftName','Common/share/A35D575F-C004-4717-AABC-ED9D1979C3FA/blog','10RYxhJH','loginToken','set-cookie','test','writeFileSync','slice',',\x20结束!\x20🕛\x20','http://www.ttljf.com/ttl_site/giftApi.do?mthd=searchGift&giftCategoryId=7&pageNo=1&pageSize=8','isNode','834210EDFDJU','send','getDate','token:','wait','请求失败','1292135EdjGqC','blog','abs'];y=function(){return yr;};return y();}async function ttl_gift(){const n=x;let q=n(0x15b),X=populateUrlObject(q);await httpRequest(n(0x178),X);if(!httpResult||httpResult[n(0x169)]!=0xc8)return;let o=JSON['parse'](httpResult[n(0x171)]);if(!o)return;const i=o[n(0x1a2)];let A='';for(let v of i){const M=parseInt(v[n(0x1c9)]),W=v[n(0x152)],b=v[n(0x135)],R=parseInt(v[n(0x1d8)]);A+=W+n(0x172)+b+n(0x1e6)+M+n(0x1af)+R+'\x0a',giftAmount[b]=M,giftNames[b]=W,giftPrice[b]=R;}$['log'](''+A);}async function ttl_login(){const l=x;let q=l(0x149),X=l(0x148)+user+l(0x1b8)+pwd+l(0x18e),o=populateUrlObject(q,X);await httpRequest(l(0x1de),o);if(!httpResult||httpResult[l(0x169)]!=0xc8)return;let i=JSON[l(0x1c0)](httpResult['body']);if(!i)return;if(i[l(0x1db)]===l(0x136))$['token']=i['user'][l(0x155)],$[l(0x1e0)]=i['user'][l(0x1e0)],$[l(0x1be)]=i[l(0x183)][l(0x1be)],$['integral']=i[l(0x183)][l(0x1ef)],console[l(0x1a8)](l(0x160)+$[l(0x1d4)]+l(0x194)+$[l(0x1ef)]),$[l(0x16c)]($[l(0x1ef)],date+'_'+user),console[l(0x1a8)](l(0x1f4)),mobile=i[l(0x183)][l(0x1ed)],console[l(0x1a8)](l(0x1c1)+i['message']),message+='\x0a【账号】\x20'+$[l(0x1be)]+'('+mobile+l(0x146)+i[l(0x13c)]+'\x20\x0a【积分】\x20'+$[l(0x1ef)];else $[l(0x1a8)]('登录失败\x20:'+i[l(0x13c)]);}async function blog(){return new Promise(q=>{const u=j;body={'id':u(0x16a),'type':u(0x164)},request[u(0x1bd)](ttl(u(0x153),body),function(X,o,i){const h=u;try{X&&(console[h(0x1a8)](''+JSON[h(0x1b5)](err)),console['log']($[h(0x145)]+h(0x191)));data=JSON['parse'](i);if(data[h(0x1db)]==0x0)console[h(0x1a8)]('\x0a分享任务:'+data['message']);else data[h(0x1db)]!=0x0&&console[h(0x1a8)]('\x0a分享任务:'+data['message']);}catch(A){$['logErr'](A,resp);}finally{q(data);}});});}async function sign(){return new Promise(q=>{const C=j;request[C(0x1bd)](ttl(C(0x1ca),''),function(X,o,i){const K=C;try{X&&(console[K(0x1a8)](''+JSON[K(0x1b5)](err)),console[K(0x1a8)]($['name']+K(0x191)));data=JSON[K(0x1c0)](i);if(data[K(0x1db)]==0x0)console[K(0x1a8)](K(0x1a6)+data['message']);else data[K(0x1db)]!=0x0&&console[K(0x1a8)]('\x0a签到任务:'+data[K(0x13c)]);}catch(A){$[K(0x189)](A,resp);}finally{q(data);}});});}async function my(){const B=x;let q='https://www.ttljf.com/ttl_chefHub/user/api/my',X=populateUrlObject(q);await httpRequest(B(0x178),X);if(!httpResult||httpResult[B(0x169)]!=0xc8)return;let o=JSON[B(0x1c0)](httpResult[B(0x171)]);if(!o)return;if(o[B(0x1db)]==0x0){let i=o[B(0x1f5)][B(0x1ef)];console['log']('用户:'+o[B(0x1f5)][B(0x1be)]+B(0x1a1)+i);if(i>=stockPrice&&stockAmount2>0x0)console[B(0x1a8)](B(0x181)+stockName),await ttl_dh(),$[B(0x16c)]($['integral']-stockPrice,date+'_'+user);else console[B(0x1a8)](B(0x13b)+stockName+B(0x132)+stockAmount2);}}async function ttl_dh(){const T=x;let q=T(0x16d),X=T(0x187)+$[T(0x1e0)]+T(0x1b6)+$[T(0x1d4)]+'&mobile='+user+'&giftId='+giftId,o=populateUrlObject(q,X);await httpRequest(T(0x1de),o);if(!httpResult||httpResult[T(0x169)]!=0xc8)return;let i=JSON[T(0x1c0)](httpResult[T(0x171)]);if(!i)return;console[T(0x1a8)](''+JSON[T(0x1b5)](i));if(i['code']==0x0)console[T(0x1a8)]('兑换商品\x20'+stockName+'\x20兑换结果:'+i[T(0x13c)]+'🎉');else $['log']('【兑换商品】\x20'+stockName+'\x20:'+i[T(0x13c)]);if($[T(0x15c)]())await notify['sendNotify']($[T(0x145)],'兑换商品\x20'+stockName+T(0x1ab)+i[T(0x13c)]+'🎉');}function ttl(q,X){const d=x;return{'url':''+host+q,'body':''+X,'headers':{'Host':d(0x1cc),'Accept':d(0x17d),'content-type':'application/json','token':$[d(0x1d4)],'X-Requested-With':d(0x1ea),'Accept-Encoding':d(0x199),'User-Agent':d(0x16e),'Referer':'https://servicewechat.com/wxe9aa8f1c4a77ddf5/17/page-frame.html'}};}function populateUrlObject(q,X=''){const S=x;let o=q[S(0x1b1)]('//','/')['split']('/')[0x1],i={'url':q,'headers':{'Host':o,'Accept':S(0x17d),'content-type':S(0x1e1),'token':$['token'],'X-Requested-With':S(0x1ea),'Accept-Encoding':'gzip,compress,br,deflate','User-Agent':S(0x16e),'Referer':'https://servicewechat.com/wxe9aa8f1c4a77ddf5/17/page-frame.html'}};if(X)i['body']=X;return i;}async function httpRequest(q,X){return httpResult=null,new Promise(o=>{$[q](X,async(i,A,v)=>{const c=j;try{i?(console['log'](q+c(0x162)),console['log'](JSON['stringify'](i)),$[c(0x189)](i)):httpResult=A;}catch(M){$['logErr'](M,A);}finally{o();}});});}function SafeGet(q){const E=x;try{if(typeof JSON[E(0x1c0)](q)==E(0x1c4))return!![];else console[E(0x1a8)](q);}catch(X){return console[E(0x1a8)](X),console[E(0x1a8)](E(0x1f3)),![];}}function jsonParse(q){const P=x;if(typeof q==P(0x166))try{return JSON[P(0x1c0)](q);}catch(X){return console[P(0x1a8)](X),$[P(0x186)]($[P(0x145)],'',P(0x14e)),[];}}function Env(q,X){const m=x;class o{constructor(i){this['env']=i;}[m(0x15e)](i,A=m(0x1d9)){const D=m;i=D(0x166)==typeof i?{'url':i}:i;let v=this[D(0x178)];return D(0x182)===A&&(v=this[D(0x1de)]),new Promise((M,W)=>{const N=D;v[N(0x1ba)](this,i,(b,R,f)=>{b?W(b):M(R);});});}[m(0x178)](i){const g=m;return this[g(0x15e)]['call'](this[g(0x1dd)],i);}[m(0x1de)](i){const U=m;return this[U(0x15e)][U(0x1ba)](this[U(0x1dd)],i,U(0x182));}}return new class{constructor(i,A){const Q=m;this[Q(0x145)]=i,this[Q(0x139)]=new o(this),this['data']=null,this[Q(0x1e2)]=Q(0x1b3),this[Q(0x1d2)]=[],this['isMute']=!0x1,this[Q(0x185)]=!0x1,this[Q(0x17b)]='\x0a',this[Q(0x19a)]=new Date()[Q(0x1ac)](),Object['assign'](this,A),this[Q(0x1a8)]('','🔔'+this[Q(0x145)]+Q(0x1e8));}['isNode'](){const p=m;return p(0x1d1)!=typeof module&&!!module['exports'];}[m(0x1c7)](){const e=m;return e(0x1d1)!=typeof $task;}[m(0x1d0)](){const O=m;return O(0x1d1)!=typeof $httpClient&&O(0x1d1)==typeof $loon;}[m(0x14d)](){const z=m;return z(0x1d1)!=typeof $loon;}[m(0x138)](i,A=null){const G=m;try{return JSON[G(0x1c0)](i);}catch{return A;}}['toStr'](i,A=null){const V=m;try{return JSON[V(0x1b5)](i);}catch{return A;}}[m(0x190)](A,v){const t=m;let M=v;const W=this[t(0x19b)](A);if(W)try{M=JSON[t(0x1c0)](this[t(0x19b)](A));}catch{}return M;}['setjson'](i,A){const J=m;try{return this[J(0x16c)](JSON['stringify'](i),A);}catch{return!0x1;}}[m(0x144)](i){return new Promise(A=>{this['get']({'url':i},(v,M,W)=>A(W));});}['runScript'](i,A){const y0=m;return new Promise(v=>{const L=j;let M=this[L(0x19b)](L(0x1c6));M=M?M[L(0x1b1)](/\n/g,'')[L(0x142)]():M;let W=this[L(0x19b)]('@chavy_boxjs_userCfgs.httpapi_timeout');W=W?0x1*W:0x14,W=A&&A[L(0x1da)]?A[L(0x1da)]:W;const [b,R]=M[L(0x1a4)]('@'),f={'url':L(0x1cb)+R+L(0x1e7),'body':{'script_text':i,'mock_type':L(0x184),'timeout':W},'headers':{'X-Key':b,'Accept':L(0x1b2)}};this[L(0x1de)](f,(Z,Y,k)=>v(k));})[y0(0x19e)](v=>this[y0(0x189)](v));}[m(0x197)](){const y1=m;if(!this[y1(0x15c)]())return{};{this['fs']=this['fs']?this['fs']:require('fs'),this[y1(0x141)]=this[y1(0x141)]?this[y1(0x141)]:require(y1(0x141));const A=this['path'][y1(0x19c)](this[y1(0x1e2)]),v=this['path'][y1(0x19c)](process[y1(0x13a)](),this['dataFile']),M=this['fs'][y1(0x19f)](A),W=!M&&this['fs'][y1(0x19f)](v);if(!M&&!W)return{};{const b=M?A:v;try{return JSON['parse'](this['fs'][y1(0x1d3)](b));}catch(R){return{};}}}}[m(0x1ee)](){const y2=m;if(this['isNode']()){this['fs']=this['fs']?this['fs']:require('fs'),this['path']=this[y2(0x141)]?this['path']:require('path');const A=this[y2(0x141)][y2(0x19c)](this[y2(0x1e2)]),v=this[y2(0x141)]['resolve'](process[y2(0x13a)](),this[y2(0x1e2)]),M=this['fs'][y2(0x19f)](A),W=!M&&this['fs'][y2(0x19f)](v),b=JSON[y2(0x1b5)](this[y2(0x1f5)]);M?this['fs'][y2(0x158)](A,b):W?this['fs'][y2(0x158)](v,b):this['fs'][y2(0x158)](A,b);}}[m(0x18f)](A,v,M){const y3=m,W=v[y3(0x1b1)](/\[(\d+)\]/g,y3(0x1bc))[y3(0x1a4)]('.');let b=A;for(const R of W)if(b=Object(b)[R],void 0x0===b)return M;return b;}['lodash_set'](i,A,v){const y4=m;return Object(i)!==i?i:(Array[y4(0x18a)](A)||(A=A[y4(0x1f2)]()['match'](/[^.[\]]+/g)||[]),A[y4(0x159)](0x0,-0x1)[y4(0x1f0)]((M,W,b)=>Object(M[W])===M[W]?M[W]:M[W]=Math[y4(0x165)](A[b+0x1])>>0x0==+A[b+0x1]?[]:{},i)[A[A[y4(0x1dc)]-0x1]]=v,i);}[m(0x19b)](A){const y5=m;let v=this['getval'](A);if(/^@/[y5(0x157)](A)){const [,M,W]=/^@(.*?)\.(.*?)$/[y5(0x167)](A),b=M?this[y5(0x174)](M):'';if(b)try{const R=JSON[y5(0x1c0)](b);v=R?this['lodash_get'](R,W,''):v;}catch(f){v='';}}return v;}[m(0x16c)](A,v){const y6=m;let M=!0x1;if(/^@/[y6(0x157)](v)){const [,W,b]=/^@(.*?)\.(.*?)$/[y6(0x167)](v),R=this[y6(0x174)](W),f=W?y6(0x140)===R?null:R||'{}':'{}';try{const a=JSON[y6(0x1c0)](f);this[y6(0x1ae)](a,b,A),M=this[y6(0x1a9)](JSON[y6(0x1b5)](a),W);}catch(Z){const Y={};this[y6(0x1ae)](Y,b,A),M=this[y6(0x1a9)](JSON[y6(0x1b5)](Y),W);}}else M=this[y6(0x1a9)](A,v);return M;}[m(0x174)](i){const y7=m;return this[y7(0x1d0)]()||this[y7(0x14d)]()?$persistentStore[y7(0x1f1)](i):this[y7(0x1c7)]()?$prefs[y7(0x17c)](i):this[y7(0x15c)]()?(this[y7(0x1f5)]=this[y7(0x197)](),this[y7(0x1f5)][i]):this[y7(0x1f5)]&&this[y7(0x1f5)][i]||null;}[m(0x1a9)](i,A){const y8=m;return this[y8(0x1d0)]()||this['isLoon']()?$persistentStore[y8(0x1ad)](i,A):this[y8(0x1c7)]()?$prefs[y8(0x168)](i,A):this['isNode']()?(this[y8(0x1f5)]=this[y8(0x197)](),this[y8(0x1f5)][A]=i,this[y8(0x1ee)](),!0x0):this[y8(0x1f5)]&&this[y8(0x1f5)][A]||null;}[m(0x1ce)](i){const y9=m;this[y9(0x13d)]=this['got']?this[y9(0x13d)]:require(y9(0x13d)),this[y9(0x14c)]=this[y9(0x14c)]?this['cktough']:require(y9(0x1c2)),this[y9(0x1c8)]=this[y9(0x1c8)]?this[y9(0x1c8)]:new this['cktough']['CookieJar'](),i&&(i[y9(0x18d)]=i[y9(0x18d)]?i['headers']:{},void 0x0===i[y9(0x18d)][y9(0x14b)]&&void 0x0===i[y9(0x18b)]&&(i[y9(0x18b)]=this[y9(0x1c8)]));}['get'](i,A=()=>{}){const yy=m;i[yy(0x18d)]&&(delete i[yy(0x18d)][yy(0x150)],delete i[yy(0x18d)][yy(0x1a3)]),this['isSurge']()||this[yy(0x14d)]()?(this[yy(0x1d0)]()&&this[yy(0x185)]&&(i[yy(0x18d)]=i[yy(0x18d)]||{},Object[yy(0x1e9)](i[yy(0x18d)],{'X-Surge-Skip-Scripting':!0x1})),$httpClient[yy(0x178)](i,(v,M,W)=>{const yj=yy;!v&&M&&(M[yj(0x171)]=W,M['statusCode']=M[yj(0x16b)]),A(v,M,W);})):this[yy(0x1c7)]()?(this['isNeedRewrite']&&(i['opts']=i['opts']||{},Object[yy(0x1e9)](i[yy(0x147)],{'hints':!0x1})),$task[yy(0x134)](i)[yy(0x17e)](v=>{const {statusCode:M,statusCode:W,headers:b,body:R}=v;A(null,{'status':M,'statusCode':W,'headers':b,'body':R},R);},v=>A(v))):this['isNode']()&&(this[yy(0x1ce)](i),this['got'](i)['on'](yy(0x1e4),(v,M)=>{const yq=yy;try{if(v[yq(0x18d)]['set-cookie']){const W=v['headers'][yq(0x156)][yq(0x1b0)](this['cktough'][yq(0x14b)][yq(0x1c0)])['toString']();W&&this[yq(0x1c8)][yq(0x1d6)](W,null),M[yq(0x18b)]=this[yq(0x1c8)];}}catch(b){this['logErr'](b);}})[yy(0x17e)](v=>{const {statusCode:M,statusCode:W,headers:b,body:R}=v;A(null,{'status':M,'statusCode':W,'headers':b,'body':R},R);},v=>{const yX=yy,{message:M,response:W}=v;A(M,W,W&&W[yX(0x171)]);}));}[m(0x1de)](A,v=()=>{}){const yo=m;if(A[yo(0x171)]&&A[yo(0x18d)]&&!A[yo(0x18d)]['Content-Type']&&(A[yo(0x18d)][yo(0x150)]=yo(0x1aa)),A[yo(0x18d)]&&delete A[yo(0x18d)][yo(0x1a3)],this[yo(0x1d0)]()||this['isLoon']())this[yo(0x1d0)]()&&this['isNeedRewrite']&&(A[yo(0x18d)]=A[yo(0x18d)]||{},Object[yo(0x1e9)](A[yo(0x18d)],{'X-Surge-Skip-Scripting':!0x1})),$httpClient[yo(0x1de)](A,(M,W,b)=>{const yi=yo;!M&&W&&(W['body']=b,W[yi(0x169)]=W['status']),v(M,W,b);});else{if(this[yo(0x1c7)]())A['method']=yo(0x182),this[yo(0x185)]&&(A['opts']=A[yo(0x147)]||{},Object[yo(0x1e9)](A['opts'],{'hints':!0x1})),$task[yo(0x134)](A)[yo(0x17e)](M=>{const {statusCode:W,statusCode:b,headers:R,body:f}=M;v(null,{'status':W,'statusCode':b,'headers':R,'body':f},f);},M=>v(M));else{if(this[yo(0x15c)]()){this[yo(0x1ce)](A);const {url:M,...W}=A;this['got']['post'](M,W)[yo(0x17e)](b=>{const {statusCode:R,statusCode:f,headers:a,body:Z}=b;v(null,{'status':R,'statusCode':f,'headers':a,'body':Z},Z);},b=>{const yA=yo,{message:R,response:f}=b;v(R,f,f&&f[yA(0x171)]);});}}}}['time'](i){const yv=m;let A={'M+':new Date()[yv(0x177)]()+0x1,'d+':new Date()[yv(0x15f)](),'H+':new Date()['getHours'](),'m+':new Date()[yv(0x192)](),'s+':new Date()[yv(0x151)](),'q+':Math[yv(0x170)]((new Date()[yv(0x177)]()+0x3)/0x3),'S':new Date()['getMilliseconds']()};/(y+)/[yv(0x157)](i)&&(i=i['replace'](RegExp['$1'],(new Date()[yv(0x1a7)]()+'')[yv(0x133)](0x4-RegExp['$1']['length'])));for(let v in A)new RegExp('('+v+')')['test'](i)&&(i=i[yv(0x1b1)](RegExp['$1'],0x1==RegExp['$1']['length']?A[v]:('00'+A[v])[yv(0x133)]((''+A[v])[yv(0x1dc)])));return i;}[m(0x186)](A=q,v='',M='',W){const yW=m,b=R=>{const yM=j;if(!R)return R;if('string'==typeof R)return this[yM(0x14d)]()?R:this[yM(0x1c7)]()?{'open-url':R}:this[yM(0x1d0)]()?{'url':R}:void 0x0;if(yM(0x1c4)==typeof R){if(this[yM(0x14d)]()){let f=R[yM(0x1bb)]||R[yM(0x180)]||R[yM(0x17f)],a=R[yM(0x196)]||R[yM(0x16f)];return{'openUrl':f,'mediaUrl':a};}if(this[yM(0x1c7)]()){let Z=R[yM(0x17f)]||R[yM(0x180)]||R[yM(0x1bb)],Y=R[yM(0x16f)]||R[yM(0x196)];return{'open-url':Z,'media-url':Y};}if(this[yM(0x1d0)]()){let k=R['url']||R[yM(0x1bb)]||R['open-url'];return{'url':k};}}};if(this[yW(0x1e5)]||(this[yW(0x1d0)]()||this[yW(0x14d)]()?$notification[yW(0x1de)](A,v,M,b(W)):this[yW(0x1c7)]()&&$notify(A,v,M,b(W))),!this[yW(0x1eb)]){let R=['',yW(0x195)];R[yW(0x1bf)](A),v&&R['push'](v),M&&R[yW(0x1bf)](M),console[yW(0x1a8)](R[yW(0x1cf)]('\x0a')),this['logs']=this[yW(0x1d2)][yW(0x193)](R);}}[m(0x1a8)](...i){const yb=m;i[yb(0x1dc)]>0x0&&(this[yb(0x1d2)]=[...this[yb(0x1d2)],...i]),console[yb(0x1a8)](i['join'](this[yb(0x17b)]));}[m(0x189)](i,A){const yR=m,v=!this[yR(0x1d0)]()&&!this[yR(0x1c7)]()&&!this[yR(0x14d)]();v?this['log']('','❗️'+this[yR(0x145)]+yR(0x176),i[yR(0x175)]):this[yR(0x1a8)]('','❗️'+this[yR(0x145)]+',\x20错误!',i);}['wait'](i){return new Promise(A=>setTimeout(A,i));}[m(0x1b9)](i={}){const yf=m,A=new Date()['getTime'](),v=(A-this['startTime'])/0x3e8;this[yf(0x1a8)]('','🔔'+this[yf(0x145)]+yf(0x15a)+v+'\x20秒'),this[yf(0x1a8)](),(this[yf(0x1d0)]()||this[yf(0x1c7)]()||this[yf(0x14d)]())&&$done(i);}}(q,X);}