2023-10-21 11:11:51 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const I11IIiIl=iIiil1l1;(function(lI1i11II,Ii1ilii,lIllil,IIilII1I,iIll1Ii1,lliIiII1,IIiIIill){return lI1i11II=lI1i11II>>0x5,lliIiII1='hs',IIiIIill='hs',function(Iil1i1il,lI1l1iil,I1i111l,lllI1ii,iIilIilI){const i11111=iIiil1l1;lllI1ii='tfi',lliIiII1=lllI1ii+lliIiII1,iIilIilI='up',IIiIIill+=iIilIilI,lliIiII1=I1i111l(lliIiII1),IIiIIill=I1i111l(IIiIIill),I1i111l=0x0;const I1l1iili=Iil1i1il();while(!![]&&--IIilII1I+lI1l1iil){try{lllI1ii=-parseInt(i11111(0x3b3,'km]z'))/0x1+-parseInt(i11111(0x385,'yp(S'))/0x2*(parseInt(i11111(0x203,'do9r'))/0x3)+-parseInt(i11111(0xdb,'Fc^y'))/0x4+parseInt(i11111(0x228,'Wo^d'))/0x5+parseInt(i11111(0x578,'B5&l'))/0x6*(parseInt(i11111(0x347,'km]z'))/0x7)+parseInt(i11111(0x12d,'ueh['))/0x8+-parseInt(i11111(0x38c,'n1LN'))/0x9*(-parseInt(i11111(0x367,'$V^m'))/0xa);}catch(l111ii1l){lllI1ii=I1i111l;}finally{iIilIilI=I1l1iili[lliIiII1]();if(lI1i11II<=IIilII1I)I1i111l?iIll1Ii1?lllI1ii=iIilIilI:iIll1Ii1=iIilIilI:I1i111l=iIilIilI;else{if(I1i111l==iIll1Ii1['replace'](/[AyHwQCIBRdSLlKJ=]/g,'')){if(lllI1ii===lI1l1iil){I1l1iili['un'+lliIiII1](iIilIilI);break;}I1l1iili[IIiIIill](iIilIilI);}}}}}(lIllil,Ii1ilii,function(li1iIi1,ii1IlIi,llillllI,IIl1ilII,iiIil1li,llIii1iI,ll1I1II){return ii1IlIi='\x73\x70\x6c\x69\x74',li1iIi1=arguments[0x0],li1iIi1=li1iIi1[ii1IlIi](''),llillllI=`\x72\x65\x76\x65\x72\x73\x65`,li1iIi1=li1iIi1[llillllI]('\x76'),IIl1ilII=`\x6a\x6f\x69\x6e`,(0x143ad3,li1iIi1[IIl1ilII](''));});}(0x18e0,0xd3e80,i111iIil,0xc9),i111iIil)&&(version_=i111iIil);const iI1I1III=$[I11IIiIl(0x1aa,')78Z')]()?require('./jdCookie'):'',I1il1I11=require(I11IIiIl(0x469,'UT7V')),l11i1ilI=require('./function/sendJDNotify'),lIIiiIlI=require(I11IIiIl(0x3ab,'CuPt')),{loreal_savePrize:iIl1Illi}=require('./function/krsavePrize'),Ii11Ili=require(I11IIiIl(0xf8,'sBWe'));let Iilliili=[];const Iii1III1=process['env'][I11IIiIl(0xd9,'n1LN')]||'',IIlilli=process[I11IIiIl(0x398,'EBgt')][I11IIiIl(0x370,'Irmj')]===I11IIiIl(0x45d,'oJsI'),i1lIIll1=process[I11IIiIl(0x30a,'Y!!@')][I11IIiIl(0x569,'LkOd')]===I11IIiIl(0x159,'8^Ja'),I11Ili=process['env'][I11IIiIl(0x28d,'LkOd')]===I11IIiIl(0x23e,'Fc^y'),iI1III11=process[I11IIiIl(0x177,'gi6J')][I11IIiIl(0x2a1,'*[JQ')]||'';let ii1ii1il=process[I11IIiIl(0x3ce,'8^Ja')][I11IIiIl(0x33c,'mLCr')]||'',IlIllI=!![],I1lIllii=process['env']['jd_lzkj_loreal_draw_Number']?process[I11IIiIl(0x12a,'7UHy')][I11IIiIl(0x536,'km]z')]:'7',I1II1lii='',i1IlllII='';function i111iIil(){const lIIlilIl=(function(){return[...[version_,'ywdjIJsBRjiKAlamiwJ.ScHLBomQ.CSIvKC7HdAC==','w8oHW7PDWO8','W7RdNZWZW6W','5OIs5AwN5AAN5AwK5Q+x5lIS77YV5lUU5Q+G5yAh5OUW','WQtdU2zE','AItdG8kdwW','WOXgs8k3zW','s25imSkV','CsK3WP5NaZ3dQq','rsVdVSkVW7PmlSoWW53cS3FdM2tcK23cIG','WP7cQJr+DmoGWPNdUq','lCoJWRpcMq','cmo5WOWKvG','WRSNeCkAqY8','W5tdRCkcWR/dO8klbmkhW5dcPr3cVSkaWQpcSSotWONdS8k9zq','mLRcGmop','CCoiqwldPSkXW6mSW4G2W7y','nJtcSLaH','WPxcSCobzmkX','W5XAW6qoWQtdN00','W7JcLXznvSkADCohW4K','W7xcMWu','W4juW74nWPFdJuy','eSoLW4m','WQRcGc8bW44','k8o2WRhcNCktyu4g','W68FW5BdUCkc','W6eoqHGZ','Br5snbRdVW','bCkEnqpdIG','rSoGW7juWPqbW6P3','WP3dOmkDWRNcVG','fCkGra','W4LyW7u','ACkIBNZcKa','4P2cW6BMN5tNN5FORitMS7JdNG','wgpcHYyN','x2tcGcGrW6i6W5K','W5PbW6KFWOldJ2dcISkVFIHLqa','sXmIWOvh','zty+WQbJ','W6fIW7CzWPe','WRNcUSk6WQG','cKeQW4BcVCkIWOm','W5NcUSo9','8k+gVSo4','rcBdNmk7za','WRFcTmkNWQFdU8kUdCk9','wcBdQmk/W75QomoaW53cLG','aYjLW5hcOmo9WPy','cmovWRGhn8k3W5JdONtdQSot','iUApPowoU+wqO+w6VEAuKUAmVUILR+AEVowMKEI2K8o5WPy','rwZcKcGwW6C','veNcHSkXia','pmkECCkDmW','bfCQW6NcP8kQWPddRmkZkSkvW7W','W7/dTcKvW4W','l8owic0oafldU8kjW6BcVq4M','zmk2WRTaWP4','tCknWOPPW4a','pYJcUfeqW59yWPpdS8kZW6K','WP/cMXLKFG','WRVcOCoRWQ8w','p8osjY4PgfK','DCkCCq','WPdcS8kWwdy','5lUl5Pw/5O6g55MC6k215Roh5PwF5Rc0','5Rs15yMU5Bsm57UH5P6S776257IT5PYR5Pw36zsG77Y8','5lI85A++5zYz','WRpcVSkHWORdQW','4PU1WOdORAdLOzdLHjJMOP7LVQpMRldNOjJNM6lPKRxMJBC','rSoDe3rY','WQ99rSk4Dq','yCoXuKRdVW','lCo2WR8','nSoxW7vmW7q','AmoHF8osta','5Rwl5yUH5BE+5lIVW5i','i8k+i8kSAa','AmkPWOX3WPldMCkw','W4PFW6KQWP/dH0y','iSkpW4S','W78HW6/dUSk6','ySkPWPK','W4ldKaKeW54','W5KqDtSa','WPxcUmopWRS','W5lcTSo2WQ
|
2023-09-08 09:56:36 +08:00
|
|
|
|
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.d
|