-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathjd_cacheIsvToken.js
19 lines (12 loc) · 16.9 KB
/
jd_cacheIsvToken.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/*
缓存IsvToken
如果你的网络环境不佳,你可以使用此脚本提前缓存,默认缓存到本地,支持配置代理和自定义缓存等
每次运行都会覆盖本地缓存请勿频繁运行,若非必要则不建议定时运行此脚本,否则请保持运行间隔在25分钟以上
#### 自定义缓存文件路径
export JD_ISV_TOKEN_CUSTOM_CACHE="" # 绝对路径,建议以 token.json 命名,此文件默认存储在仓库 `utils/cache` 目录下
1 1 1 1 * jd_cacheIsvToken.js
*/
const $ = new Env('缓存IsvToken')
var iil='jsjiami.com.v7';const l1l1I1=iii1II;(function(Ii1iI1,lilIli,Iliili,Iliill,IIII11,i1illi,i1illl){return Ii1iI1=Ii1iI1>>0x7,i1illi='hs',i1illl='hs',function(I1llil,I1llii,lilIll,l1i111,iliII1){const iIIl11=iii1II;l1i111='tfi',i1illi=l1i111+i1illi,iliII1='up',i1illl+=iliII1,i1illi=lilIll(i1illi),i1illl=lilIll(i1illl),lilIll=0x0;const II11I1=I1llil();while(!![]&&--Iliill+I1llii){try{l1i111=-parseInt(iIIl11(0x133,'l*Qg'))/0x1*(parseInt(iIIl11(0x12f,'[4aW'))/0x2)+-parseInt(iIIl11(0xf5,'PKjA'))/0x3+parseInt(iIIl11(0xf0,'hYe0'))/0x4*(parseInt(iIIl11(0xfb,'h[Wi'))/0x5)+parseInt(iIIl11(0x121,'@Gl3'))/0x6+-parseInt(iIIl11(0xf2,'3ExO'))/0x7+-parseInt(iIIl11(0xf3,'Gbi('))/0x8*(parseInt(iIIl11(0x101,'x6I0'))/0x9)+parseInt(iIIl11(0xec,'hYe0'))/0xa;}catch(Iii11I){l1i111=lilIll;}finally{iliII1=II11I1[i1illi]();if(Ii1iI1<=Iliill)lilIll?IIII11?l1i111=iliII1:IIII11=iliII1:lilIll=iliII1;else{if(lilIll==IIII11['replace'](/[fHLPlphgFdWXqSATGbQnJt=]/g,'')){if(l1i111===I1llii){II11I1['un'+i1illi](iliII1);break;}II11I1[i1illl](iliII1);}}}}}(Iliili,lilIli,function(Iil1II,iIIl1I,I1iIli,lI1Ill,lI1Ili,IliilI,i1II1){return iIIl1I='\x73\x70\x6c\x69\x74',Iil1II=arguments[0x0],Iil1II=Iil1II[iIIl1I](''),I1iIli=`\x72\x65\x76\x65\x72\x73\x65`,Iil1II=Iil1II[I1iIli]('\x76'),lI1Ill=`\x6a\x6f\x69\x6e`,(0x15596a,Iil1II[lI1Ill](''));});}(0x6080,0x5654b,Iii11l,0xc3),Iii11l)&&(iil=l1l1I1(0x122,'4]I9'));function iii1II(_0xded2d3,_0x4fe458){const _0x5ada33=Iii11l();return iii1II=function(_0x32d34e,_0x1f3144){_0x32d34e=_0x32d34e-0xe0;let _0xfdf3f9=_0x5ada33[_0x32d34e];if(iii1II['PZHogx']===undefined){var _0x2cf517=function(_0x4ad89a){const _0x5ac491='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d9325='',_0x20a7e0='';for(let _0x4c3e1c=0x0,_0x5414f4,_0x151801,_0x1e1614=0x0;_0x151801=_0x4ad89a['charAt'](_0x1e1614++);~_0x151801&&(_0x5414f4=_0x4c3e1c%0x4?_0x5414f4*0x40+_0x151801:_0x151801,_0x4c3e1c++%0x4)?_0x5d9325+=String['fromCharCode'](0xff&_0x5414f4>>(-0x2*_0x4c3e1c&0x6)):0x0){_0x151801=_0x5ac491['indexOf'](_0x151801);}for(let _0x59c730=0x0,_0xaf2a22=_0x5d9325['length'];_0x59c730<_0xaf2a22;_0x59c730++){_0x20a7e0+='%'+('00'+_0x5d9325['charCodeAt'](_0x59c730)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x20a7e0);};const _0x288ae0=function(_0x1b1065,_0x572188){let _0x5b4cda=[],_0x141917=0x0,_0x1d4093,_0x258126='';_0x1b1065=_0x2cf517(_0x1b1065);let _0x5b8d66;for(_0x5b8d66=0x0;_0x5b8d66<0x100;_0x5b8d66++){_0x5b4cda[_0x5b8d66]=_0x5b8d66;}for(_0x5b8d66=0x0;_0x5b8d66<0x100;_0x5b8d66++){_0x141917=(_0x141917+_0x5b4cda[_0x5b8d66]+_0x572188['charCodeAt'](_0x5b8d66%_0x572188['length']))%0x100,_0x1d4093=_0x5b4cda[_0x5b8d66],_0x5b4cda[_0x5b8d66]=_0x5b4cda[_0x141917],_0x5b4cda[_0x141917]=_0x1d4093;}_0x5b8d66=0x0,_0x141917=0x0;for(let _0x36551b=0x0;_0x36551b<_0x1b1065['length'];_0x36551b++){_0x5b8d66=(_0x5b8d66+0x1)%0x100,_0x141917=(_0x141917+_0x5b4cda[_0x5b8d66])%0x100,_0x1d4093=_0x5b4cda[_0x5b8d66],_0x5b4cda[_0x5b8d66]=_0x5b4cda[_0x141917],_0x5b4cda[_0x141917]=_0x1d4093,_0x258126+=String['fromCharCode'](_0x1b1065['charCodeAt'](_0x36551b)^_0x5b4cda[(_0x5b4cda[_0x5b8d66]+_0x5b4cda[_0x141917])%0x100]);}return _0x258126;};iii1II['IfqojH']=_0x288ae0,_0xded2d3=arguments,iii1II['PZHogx']=!![];}const _0x30f99a=_0x5ada33[0x0],_0x46e873=_0x32d34e+_0x30f99a,_0x16913a=_0xded2d3[_0x46e873];return!_0x16913a?(iii1II['jEtqRQ']===undefined&&(iii1II['jEtqRQ']=!![]),_0xfdf3f9=iii1II['IfqojH'](_0xfdf3f9,_0x1f3144),_0xded2d3[_0x46e873]=_0xfdf3f9):_0xfdf3f9=_0x16913a,_0xfdf3f9;},iii1II(_0xded2d3,_0x4fe458);}function Iii11l(){const llIllI=(function(){return[...[iil,'gfjsTjiaLAhmHni.tcpoWGmL.lQXvP7lbqFLSbJd==','WQLzr2RdSG/dJCkRWRRdPv4UWPBcSmknlutcRSoltuVcG8kYW5tcN2rr','AWycW5PuW5G','WO17hwOLteOL','W5lcQMtdRa','4P+gnUIfO+AETUI/VEIHVEMdP+wkVEs5HUMxL+IVKCkV','WPdcJSkxv8ouWPuHqbFdNNlcGmoS','gSkUbSk9cG','WQldS0S','WP4uW4L5jCostCojW5i4','W5NdIcxdUse','utqRsKldTMS','iSkKf8kMeSoEWQm','W6hdGW5rp0G','WPWemG','ec9xWOW','fSo4qa','EapcImo3W7xdRCoCW6z/mtddMX/dUG','gCopW7fmW4G','W7ebW4VcOXSBwSkzW7NdHtXrEvrhdCkeWQddTbBdK8oMW4VcVH7dJSo9EGJdRG','WPyhoG83','FqhcHSo2WQhcNCkOWOvzjW','572c5AYZ5A265QY+','E3/cJrFcNI7dNb4VlLdcHmoH','awHYhHZdIuDIcSoYhq','kmoMzdBdNeRcHG','zSkMWQ04WRrsW4u4DSo2WRxdGSkN','zMBdGvpdGhBcNeKnoN7cISo0WPaUECkgqmolybWjWPG','W6L3dCo5rq','44k65O+X56Ef44gq6k6X5yEz6i6+5y2mW6C2c8kqWRdcRq','WPyuhM9xWOJdPhtdQW','dSoAW5H6W74'],...(function(){return[...['W7zTW7BcMdGVW7VcKqO','W5NcHX5d','oGlcKmk/WPxdUCo6W6RdMmk3WPDLomkiB2RdM8otEwy','umomWRldIqXNEG','WQZIN43cKa','4P+TWPFNVRlLRl3LP53OTOu','g8oQWRWgW6FdO8kdca','WOhcNSkEbg8','FqGcW5S','W5dcPeRdQbNdKHboWReqyCk1dSkQmNBcM8ordmkkdfBcLtmgWROOWPbSW7RdUmoGtCoM','WO/cHCkpiepcGW','utq9','jcBdKW','W4XiWOC','WOT7kxia','WPtdS2/dGXa','WQVcIv3cP8kd','lYZdGgtdHNxcHa86cx3cG8oTWOy','W71mWOhcV8kkW4Os','W6iow2O','W6NcM3ZdNIy','jcZdMKddNxi','WQtdTZ88wa','WOWFdKLa','zGSkw0u','hSkvWPvdW48','W4K9W6r9ca','WQRcJCkvW4j8W6hcK+w8V+wNREobGUs6UEs7NUI3VUwmLW','aSoNW6xdPmo/','W7FWUioOWOBOVRJOOPdNUBZMNQtcMa','W7alW5tcMSkX','W5dcLSkhEGe','W5hcON3dJmkk'],...(function(){return['WRFdRf/dIYW','WRrNhW','WRhcIw3cN8k8u8odsI/cSrpdISkOW5FdUSkkWOxcG8k/WORdNc3dJCkRWRBdN8kxr0yC','W6BcOKFdSCk+','W4fIWR/cGCkV','W4tdTSk+q8kKW6b1jmooarlcVmkJ','WO/dHH4ICWHSW6hcHCoOWQ7cGCkmW4S','W6xcLSkdsXLeCW','WRacd152WOBdONG','W5tdPcj9ySkWtq','WQ4XWQJcMcKw','44k85OYL56E144ot6k6Z5yEe6i6v5yYYkmojW5PWW7iI','W5pcUv3dUSk9','W4n2WPVcJSkoW5y','FmonWOP0W6bRFZO','WQqiW4amgmkHWRKvrNq','WQZdVv/cJJZdVdpcQselWQu','WPCflMr0','W6i4W5nZpmkUsGK','WPfEo8o/jCoKWP3dQa','pa7cHCkyc8olwq','oGrBWRv+','cSksW4FcK08J','rgyjW48VW5ldJmosW67dOrpcTG','WRC6WRxcMIK9W7ZcPJzoba','572Y5A+E5AYl5Q2D','W4ina8oYo8ooWRpdQYrDoW','W43dMmog','WO1qW5hcSmkElNv7wcW','isOixxyaWRRdIra5W7G'];}())];}())];}());Iii11l=function(){return llIllI;};return Iii11l();};const IlI1l=require(l1l1I1(0x138,'FZr!')),lilIil=require(l1l1I1(0xf6,'3ExO')),i1l11=require(l1l1I1(0x13a,'7efl')),i1l1li=require(l1l1I1(0xfd,'ogBj'));let i1ilii='',iIIII1='';const i1l1ll=Object['keys'](IlI1l)['map'](li1I1=>IlI1l[li1I1])[l1l1I1(0x129,'to$o')](i1ilil=>i1ilil);!i1l1ll[0x0]&&($['msg']($['name'],l1l1I1(0x127,')9wL')),process[l1l1I1(0xea,'l*Qg')](0x1));!(async()=>{const I1iIll=l1l1I1,lilIii={'mitEX':I1iIll(0x135,'TtM0'),'gVqEd':I1iIll(0xf8,'ur*t'),'XewBy':'https://lzkj-isv.isvjd.com','Joawy':'https://lzkj-isv.isvjcloud.com','StoNl':I1iIll(0x104,'ws2z'),'QKBFL':function(iIIl1l,llIli1){return iIIl1l<llIli1;},'SfzIV':function(iliIII,iIIl1i){return iliIII===iIIl1i;},'ElTez':I1iIll(0x131,'l*Qg'),'DIbRt':I1iIll(0x109,'TOES'),'QKMMD':function(I1lllI,ill111){return I1lllI+ill111;},'NPjFD':function(Iliil1,i1III){return Iliil1(i1III);},'QVOpk':function(Ii1iIi){return Ii1iIi();},'ABKwJ':I1iIll(0x128,'1KCj'),'CTNFl':I1iIll(0x117,'TtM0'),'Yaddt':I1iIll(0xff,'v#h[')};$['baseUrlList']=[I1iIll(0x11e,'y0E]'),lilIii[I1iIll(0x11a,'3h@l')],lilIii[I1iIll(0xe2,'S@fn')],lilIii[I1iIll(0x119,'FZr!')],I1iIll(0xee,'mjJ8')],i1l11['config']({'title':$[I1iIll(0x13d,'1KCj')]});for(let iliIIl=0x0;lilIii[I1iIll(0x10f,'ws2z')](iliIIl,i1l1ll[I1iIll(0x126,'h[Wi')]);iliIIl++){if(lilIii['SfzIV'](lilIii[I1iIll(0x115,'v#h[')],lilIii['DIbRt']))II11Ii[I1iIll(0x137,'8F4N')](lilIii[I1iIll(0x102,'DKPM')]),II11Il[I1iIll(0xf4,'zr&D')]['fix'](lilIii[I1iIll(0x11b,'1KCj')]);else{$[I1iIll(0x10a,'wh&f')]=lilIii[I1iIll(0x120,'uFgT')](iliIIl,0x1),i1ilii=i1l1ll[iliIIl],iIIII1=i1l1ll[iliIIl],lilIil[I1iIll(0xf9,'D@(m')](iIIII1),$['UserName']=lilIii[I1iIll(0xed,'PKjA')](decodeURIComponent,lilIil[I1iIll(0x10c,'3ExO')](i1ilii,I1iIll(0x132,'k)To'))),$[I1iIll(0x123,'3h@l')]=i1l11[I1iIll(0x105,'DKPM')]($[I1iIll(0xe5,'VN3F')],$[I1iIll(0x13c,'TOES')]),$[I1iIll(0x12e,'v#h[')]='',console[I1iIll(0x11d,'TOES')](I1iIll(0x116,'@!Xo')+$[I1iIll(0x112,'D@(m')]+'】'+($['nickName']||$[I1iIll(0x124,'D@(m')])+I1iIll(0xfe,'k)To')),await lilIii[I1iIll(0x113,'Gbi(')](I1iIiI),lilIil[I1iIll(0x134,'h[Wi')]();if($['outFlag']||$[I1iIll(0xe8,'Oba!')])break;}}const i1ill1=i1l11[I1iIll(0x12b,'N9tK')]();i1ill1&&(lilIii['SfzIV'](lilIii[I1iIll(0x111,'4]I9')],lilIii['CTNFl'])?(lilIl1['msg'](i1l1ii[I1iIll(0xfc,'w]dg')],lilIii['gVqEd']),i1l1[I1iIll(0x10e,'7efl')](0x1)):console[I1iIll(0xe3,'u[AY')](I1iIll(0x118,'wh&f')+i1ill1[I1iIll(0xe7,'S@fn')](/:/g,lilIii['Yaddt'])));})()[l1l1I1(0xf7,'(517')](ill11I=>$['logErr'](ill11I))[l1l1I1(0xe6,'Gbi(')](()=>$[l1l1I1(0x103,'XR8I')]());async function I1iIiI(){const I1lliI=l1l1I1,Iliiil={'ZiNxl':I1lliI(0x100,'8F4N'),'YECpr':I1lliI(0x11c,'wh&f'),'rtDHL':I1lliI(0xf1,'%W%#')};try{if(Iliiil[I1lliI(0xfa,'PKjA')]===Iliiil['YECpr']){const li1Il=$[I1lliI(0x136,'[4aW')][Math[I1lliI(0xef,'y$@v')](Math[I1lliI(0x13b,'XR8I')]()*$[I1lliI(0x12c,'u[AY')][I1lliI(0x110,'3ExO')])],li1Ii=await i1l1li(iIIII1,li1Il,![]);li1Ii?(console[I1lliI(0x107,'3ExO')](Iliiil[I1lliI(0x12d,'D@(m')]),$[I1lliI(0x10d,'uFgT')][I1lliI(0x106,'Gbi(')](Iliiil[I1lliI(0x10b,'y0E]')])):(console[I1lliI(0xeb,'mbVn')](Iliiil[I1lliI(0x114,'TRXm')]),$[I1lliI(0x130,'%W%#')]['fix'](Iliiil['ZiNxl']));}else II1Il[I1lliI(0xe9,'y$@v')](Iliiil['ZiNxl']),lilIlI[I1lliI(0x125,'1usQ')][I1lliI(0x108,'ur*t')](Iliiil[I1lliI(0x11f,'1KCj')]);}catch(i1illI){console[I1lliI(0x107,'3ExO')](I1lliI(0xe0,'(517')+i1illI);}}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)}