jdpro/jd_water_new.js

8 lines
108 KiB
JavaScript
Raw Normal View History

2024-10-10 08:27:13 +00:00
/*
15 1 29 2 * jd_water_new.js
*/
const $ = new Env('新农场浇水');
2024-12-11 08:47:54 +00:00
var xKNKfH,GFxlX5d,IqH_wd,lj9rMXS,TyPWCv,hpWPlGK,xYGFhvj,mfzvab,jO9y4B,XFfMY48,zfnbjM;const B55OA9=[0x0,0x1,0x8,0xff,"length","undefined",0x3f,0x6,"fromCodePoint",0x7,0xc,"push",0x58,0x5b,0x1fff,0xd,0xe,0x2000000,0x4000000,0x2,0x3,!0x1,0x73,0x74,0x75,0x77,0x7c,0x7f,0x7d,0x7e,0x80,0x83,0x81,0x9a,0x9c,0xaa,0xab,!0x0,0xac,0xae,0xa9,0xad,0xc8," ",0xc6,"UA",0xca,0xdd,0xdf,0xe1,0x5,"\u3011",0xef,0x4,"\n",0x107,0x108,0x10e,0x64,0x113,0x11a,0x11b,0x11c,0x118,0xa,0x122,null,"\u6B21",0x12b,"\u6D47\u6C34",0x130,0x131,0x132,0x1f4,"1",0x100,0x16d,0x16e,0x16f,0x170,0x172,0x174,0x87,0x8b,0x82,0x84,0x185,0x186,0x176,0x177,0x1b1,0x1b5,0x1ab,0x1bd,0x1c3,0x1c5,0x1c6,0x3e8,0x1c7,0xd2,0x97,0x1dd,"Q",".",0x1e2,0x1e3,0x1e7,";",0x1fe,0x76,0x1ee,0x1ef,"fn",0x1f0,0x1f1,"ua",0x204,0x208,"2",0x21f,0x220,0x223,0x227,0x228,"fg",0x22f,0x188,0x1fd,0x7530,0x27e,0x24b,0x24c,0x24d,0x24e,0x24f,0x250,0x251,0x252,0x28d,0x281,0x284,0x285,0x286,0x287,0x288,0x289,0x28a,0x209,0x2a8,0x29c,0x29d,0x293,0x29e,0x29f,0x2710];function Dc9hbM(xKNKfH){var GFxlX5d=")tBVLQHIehWNOMT]Ga7io05s|D\"=<}F#r$f1w.gx>9bA[nS*Cz+`,6dUP@4mcZXvK;Yl&!Rk(/u2jE:3y_{~q?^J%8p",IqH_wd,lj9rMXS,TyPWCv,hpWPlGK,xYGFhvj,mfzvab,jO9y4B;r8HNPX(IqH_wd=""+(xKNKfH||""),lj9rMXS=IqH_wd.length,TyPWCv=[],hpWPlGK=B55OA9[0x0],xYGFhvj=B55OA9[0x0],mfzvab=-B55OA9[0x1]);for(jO9y4B=B55OA9[0x0];jO9y4B<lj9rMXS;jO9y4B++){var XFfMY48=GFxlX5d.indexOf(IqH_wd[jO9y4B]);if(XFfMY48===-B55OA9[0x1])continue;if(mfzvab<B55OA9[0x0]){mfzvab=XFfMY48}else{r8HNPX(mfzvab+=XFfMY48*B55OA9[0xd],hpWPlGK|=mfzvab<<xYGFhvj,xYGFhvj+=(mfzvab&B55OA9[0xe])>B55OA9[0xc]?B55OA9[0xf]:B55OA9[0x10]);do{r8HNPX(TyPWCv.push(hpWPlGK&B55OA9[0x3]),hpWPlGK>>=B55OA9[0x2],xYGFhvj-=B55OA9[0x2])}while(xYGFhvj>B55OA9[0x9]);mfzvab=-B55OA9[0x1]}}if(mfzvab>-B55OA9[0x1]){TyPWCv.push((hpWPlGK|mfzvab<<xYGFhvj)&B55OA9[0x3])}return dJJZ5I(TyPWCv)}function WkMGKRj(IqH_wd){if(typeof xKNKfH[IqH_wd]===B55OA9[0x5]){return xKNKfH[IqH_wd]=Dc9hbM(GFxlX5d[IqH_wd])}return xKNKfH[IqH_wd]}r8HNPX(xKNKfH={},GFxlX5d=["1]/`Q_,4f@EP`gl7uCFUDg\"FFYSX+Dm9lHQ+IuN9u;Xv@L","OA>d11SSthT{Ec\"we&OW","@>#zKwA!5K10H_#a","xoDF#ZnIfvlmvTs}So>/FZ#Iy]Y7]+valCkh#:47c;eofQODpC2Q","/;oEm3)R`iFa%V","dVR<Gu4Sc;q6QCLA3XhHD,HK1@6",">Hk<6{@t","~Ha`t(hDL","rCJzS.#IAXE7G=VAtv:zL6:S@;5`Z|W\"U@V","#H.Ir1<^OTMot","[s(/K3Y4}0!Yi\"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C]$oXKHK]2u)]h#8X+=`PoS+c.","]Sb2n{YHV","~mLUv43IiKV(Y!#axsK/zEe,{h+P0CT","uXZW3uAMh4vS7.ggwhXLk+WRHWPrUg2\"/X!\"pnNt","ld5Iejq^WT>,`RL|dCshlXItO;2l4ZXFR;)dF,IDHi5aH_>i#}d,u+n@mox","XCnWpga6QM>","s`QUKwRFlc!zZc.#HsJ/}","5rJzTCU}jmhM0(!D3<d#&S=ijX(y@Gs1zn*d0,Leg4$!Omq<_)","Hd`uH_.1Y@900()s]vG=Q6+Fqh54x\"Vw~T8`/_1ia77FJgxDNzb}%@)","b&i}$&TKSP0UI{Rgm.{rmE:,F7o!#~w#ZkV","pPi}1?l`9aqr2T@9~``}hcj7&KuzUTk|.]T,:w[B","FcQ+/!FwVcV=8LCxldxdV6!swh%O/CS\"x@H$a","]vh`q+#1Jol75_o=z\"Y`Zq%>fv&yQcq5=A.I","b&*zw*R4Do","~V\"2;SpOT7bm;|ExDrQW`4:>d4Fas+#sB79dD~%uh;?6xRbg7kFh[veSS6,","9@[}$zuS!M#W`gbD#cxhe_s9me5{#B","!.q6..OKe45VQcK|I7eFk39tXN@EF\"l#2fA}_!@*zv.jPC5<n&<Ex/;t","Dci(/X)","Vu2ep:TKCYxXt","uo5#^jc4:m37h(ms*f5I
2024-10-10 08:27:13 +00:00
function Env(o, e) { class s { constructor(e) { this.env = e } send(e, t = "GET") { e = "string" == typeof e ? { url: e } : e; let s = this.get; return "POST" === t && (s = this.post), new Promise((i, r) => { s.call(this, e, (e, t, s) => { e ? r(e) : i(t) }) }) } get(e) { return this.send.call(this.env, e) } post(e) { return this.send.call(this.env, e, "POST") } } return new class { constructor(e, t) { this.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", this.name = e, this.http = new s(this), this.data = null, this.dataFile = "box.dat", this.logs = [], this.isMute = !1, this.isNeedRewrite = !1, this.logSeparator = "\n", this.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, t), this.log("", `🔔${this.name}, 开始!`) } getEnv() { return "undefined" != typeof $environment && $environment["surge-version"] ? "Surge" : "undefined" != typeof $environment && $environment["stash-version"] ? "Stash" : "undefined" != typeof module && module.exports ? "Node.js" : "undefined" != typeof $task ? "Quantumult X" : "undefined" != typeof $loon ? "Loon" : "undefined" != typeof $rocket ? "Shadowrocket" : void 0 } isNode() { return "Node.js" === this.getEnv() } isQuanX() { return "Quantumult X" === this.getEnv() } isSurge() { return "Surge" === this.getEnv() } isLoon() { return "Loon" === this.getEnv() } isShadowrocket() { return "Shadowrocket" === this.getEnv() } isStash() { return "Stash" === this.getEnv() } toObj(e, t = null) { try { return JSON.parse(e) } catch { return t } } toStr(e, t = null, ...s) { try { return JSON.stringify(e, ...s) } catch { return t } } getjson(e, t) { let s = t; if (this.getdata(e)) try { s = JSON.parse(this.getdata(e)) } catch { } return s } setjson(e, t) { try { return this.setdata(JSON.stringify(e), t) } catch { return !1 } } getScript(e) { return new Promise(i => { this.get({ url: e }, (e, t, s) => i(s)) }) } runScript(a, o) { return new Promise(i => { let e = this.getdata("@chavy_boxjs_userCfgs.httpapi"); e = e && e.replace(/\n/g, "").trim(); var t = (t = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +t : 20, [s, r] = (t = o && o.timeout ? o.timeout : t, e.split("@")); this.post({ url: `http://${r}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: t }, headers: { "X-Key": s, Accept: "*/*" }, timeout: t }, (e, t, s) => i(s)) }).catch(e => this.logErr(e)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var e = this.path.resolve(this.dataFile), t = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(e), i = !s && this.fs.existsSync(t); if (!s && !i) return {}; i = s ? e : t; try { return JSON.parse(this.fs.readFileSync(i)) } catch (e) { return {} } } writedata() { var e, t, s, i, r; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), e = this.path.resolve(this.dataFile), t = this.path.resolve(process.cwd(), this.dataFile), i = !(s = this.fs.existsSync(e)) && this.fs.existsSync(t), r = JSON.stringify(this.data), !s && i ? this.fs.writeFileSync(t, r) : this.fs.writeFileSync(e, r)) } lodash_get(e, t, s) { let i = e; for (const e of t.replace(/\[(\d+)\]/g, ".$1").split(".")) if (i = Object(i)[e], void 0 === i) return s; return i } lodash_set(e, i, t) { return Object(e) === e && ((i = Array.isArray(i) ? i : i.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((e, t, s) => Object(e[t]) === e[t] ? e[t] : e[t] = Math.abs(i[s + 1]) >> 0 == +i[s + 1] ? [] : {}, e)[i[i.length - 1]] = t), e } getdata(e) { let t = this.getval(e); if (/^@/.test(e)) { var [, s, i] = /^@(.*?)\.(.*?)$/.exec(e), s = s ? this.getval(s) : ""; if (s) try { const e = JSON.parse(s); t = e ? this.lodash_get(e, i, "") : t } catch (e) { t = "" } } return t } setdata(e, t) { let s = !1; if (/^@/.test(t)) { var [, i, r] = /^@(.*?)\.(.*?)$/.exec(t), a = this.getval(i), a = i ? "null" === a ? null : a || "{}" : "{}";