2023-08-28 13:29:15 +08:00
|
|
|
|
var version_='jsjiami.com.v7';const iliIilII=I111l1i;(function(I1liliI1,I1IlIlI,lillilii,ilIIilI,I1illil1,iiiIii,iliii){return I1liliI1=I1liliI1>>0x3,iiiIii='hs',iliii='hs',function(ii1l1iii,iI1II1I1,liIiiiI,i1Il1ill,i1iIi1l){const IlIliiil=I111l1i;i1Il1ill='tfi',iiiIii=i1Il1ill+iiiIii,i1iIi1l='up',iliii+=i1iIi1l,iiiIii=liIiiiI(iiiIii),iliii=liIiiiI(iliii),liIiiiI=0x0;const lIIl1i1l=ii1l1iii();while(!![]&&--ilIIilI+iI1II1I1){try{i1Il1ill=-parseInt(IlIliiil(0x366,'4q!('))/0x1*(parseInt(IlIliiil(0x332,'^]H7'))/0x2)+parseInt(IlIliiil(0x201,'C4F!'))/0x3*(parseInt(IlIliiil(0x364,'C4F!'))/0x4)+-parseInt(IlIliiil(0x174,'gEnA'))/0x5*(-parseInt(IlIliiil(0x14f,'ghC['))/0x6)+parseInt(IlIliiil(0xe0,'yiWN'))/0x7*(parseInt(IlIliiil(0x232,'e*]('))/0x8)+parseInt(IlIliiil(0x2cf,'gf*i'))/0x9*(parseInt(IlIliiil(0x1d9,'Nz5A'))/0xa)+parseInt(IlIliiil(0x16e,'aY6w'))/0xb*(-parseInt(IlIliiil(0x10e,'3gTx'))/0xc)+parseInt(IlIliiil(0x31d,'3gTx'))/0xd*(-parseInt(IlIliiil(0x328,'ce7@'))/0xe);}catch(Ii11l11I){i1Il1ill=liIiiiI;}finally{i1iIi1l=lIIl1i1l[iiiIii]();if(I1liliI1<=ilIIilI)liIiiiI?I1illil1?i1Il1ill=i1iIi1l:I1illil1=i1iIi1l:liIiiiI=i1iIi1l;else{if(liIiiiI==I1illil1['replace'](/[FhwUrAdpxeVXqWMJOLu=]/g,'')){if(i1Il1ill===iI1II1I1){lIIl1i1l['un'+iiiIii](i1iIi1l);break;}lIIl1i1l[iliii](i1iIi1l);}}}}}(lillilii,I1IlIlI,function(l1ilIlil,ilI1IlIi,iliiIIll,iI1i11lI,ii11Illi,IiI1I111,ll1i1IiI){return ilI1IlIi='\x73\x70\x6c\x69\x74',l1ilIlil=arguments[0x0],l1ilIlil=l1ilIlil[ilI1IlIi](''),iliiIIll=`\x72\x65\x76\x65\x72\x73\x65`,l1ilIlil=l1ilIlil[iliiIIll]('\x76'),iI1i11lI=`\x6a\x6f\x69\x6e`,(0x13b7ca,l1ilIlil[iI1i11lI](''));});}(0x620,0xe6449,I1i11llI,0xc6),I1i11llI)&&(version_=I1i11llI);let iI11lI1=[],I11Iliil='',i1lli1il=![],iiiilI1,i1iilil1='',II1lili=[],li1='',liIii1Ii='',IlIl1ill={},iIII1ll=![];const llllilll=$['isNode']()?process[iliIilII(0x2e5,'4q!(')][iliIilII(0x275,'gEnA')]?process['env']['retainWater']:0x64:$[iliIilII(0x124,'lk&2')](iliIilII(0x132,'8@bK'))?$[iliIilII(0x26a,'gEnA')]('retainWater'):0x64;let lliiIII1=!![],liiIllI1=![];const lIlIil1=iliIilII(0x1d8,')hor'),IIli1I='openjd://virtual?params=%7B%20%22category%22:%20%22jump%22,%20%22des%22:%20%22m%22,%20%22url%22:%20%22https://h5.m.jd.com/babelDiy/Zeus/3KSjXqQabiTuD1cJ28QskrpWoBKT/index.html%22%20%7D',ilI11Il=require(iliIilII(0xe7,'7%tj')),i111IiII=require(iliIilII(0x30e,'d#FH')),llIIliII=require(iliIilII(0x134,'IoiE'));let l111iIiI=Iliii1lI(0x28),l1lIiiiI=Iliii1lI(0xa,iliIilII(0x11a,'IoiE')),l111IIii=Iliii1lI(0x20,iliIilII(0xdf,'ce7@')),II1lIIl=Iliii1lI(0x2,iliIilII(0x30f,'Nz5A'))+'-'+Iliii1lI(0x4,iliIilII(0xea,'gf*i'))+'-'+Iliii1lI(0x4,iliIilII(0x2e9,'1cA]'))+'-'+Iliii1lI(0x5,iliIilII(0x250,'Ow&Q')),ili11lIl=iliIilII(0x2be,'OnqH')+Math[iliIilII(0x2a8,'H93e')](Math[iliIilII(0x343,'Nz5A')]()*0x383+0x64),i1lIlI='29.503'+Math[iliIilII(0x1a7,'ihi4')](Math[iliIilII(0x311,'lk&2')]()*0x383+0x64),l1iI1llI='',I1I1llii=new Date()['getHours'](),li11liI=!![];const li1li1l1=require('fs');let l1iIIll1=![],iliIi1iI='./Fruit_ShareCache.json',ilIIiI1I=li1li1l1['existsSync'](iliIi1iI),Iliii1=[];ilIIiI1I&&(console[iliIilII(0x164,'1cA]')](iliIilII(0x1c6,'h9sa')),Iliii1=li1li1l1[iliIilII(0x296,'UWye')](iliIi1iI,iliIilII(0x1c7,'&SpX')),Iliii1&&(Iliii1=Iliii1['toString'](),Iliii1=JSON['parse'](Iliii1)));let l1IIIili=0x0,IIlIIIli=![];!(async()=>{const ii1l1IlI=iliIilII,IIillIiI={'XVheV':function(il1li11,I1lIiil){return il1li11(I1lIiil);},'BXaOt':function(illlIII,Ii1I1Ii){return illlIII===Ii1I1Ii;},'duTGi':ii1l1IlI(0x333,'e*]('),'sWNOP':function(l11I1i11,il1IIil1){return l11I1i11+il1IIil1;},'kakyo':ii1l1IlI(0x120,'gf*i'),'WZKDA':function(IlllIlI,l1l1iili){return IlllIlI==l1l1iili;},'JYoGi':function(ilil1li){return ilil1li();},'gDzcX':ii1l1IlI(0x22c,'^NB$'),'lYsXJ':ii1l1IlI(0x2e1,'ghC['),'vEXmf':'uItrS','ATaGu':ii1l1IlI(0x203,'!$$%'),'DibUr':function(ii11I1Ii,IIi1iIII){return ii11I1Ii<IIi1iIII;},'HUfCK':ii1l1IlI(0x25a,'KEBt'),'gJsBj':'mTnBx','wPxBS':'yxZLB','AzsHa':ii1l1IlI(0x277,')CIL'),'gKpWl':function(l1liiii,I1IIl1lI){return l1liiii===I1IIl1lI;},'eDgVa':function(i1liii1I,IIi1i1i){return i1liii1I===IIi1i1i
|
2023-08-25 03:59:57 +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
|