jdpro/jd_jbpanDraw.js

6 lines
118 KiB
JavaScript
Raw Normal View History

2024-01-27 11:40:17 +00:00
/*
55 1 * * * jd_jbpanDraw.js
*/
const $ = new Env('京保大转盘');
2024-01-27 12:35:30 +00:00
function _0x47ac(){const _0x122be0=['\x64\x38\x6f\x4e\x57\x34\x75','\x69\x53\x6f\x71\x57\x52\x74\x64\x49\x4d\x47\x54\x6a\x53\x6f\x77\x45\x74\x5a\x64\x54\x6d\x6b\x66','\x66\x38\x6f\x4e\x57\x37\x52\x64\x47\x38\x6b\x30','\x79\x32\x43\x48\x67\x43\x6f\x6e','\x35\x7a\x77\x70\x36\x79\x6f\x4e\x35\x52\x63\x73\x35\x50\x32\x2b\x37\x37\x59\x30','\x57\x34\x62\x42\x41\x63\x56\x64\x4d\x71','\x76\x30\x44\x4a','\x72\x53\x6f\x45\x57\x35\x43\x2b\x57\x4f\x43\x47\x41\x72\x79\x72\x57\x37\x79','\x57\x4f\x78\x63\x54\x43\x6f\x61\x76\x4c\x75\x68','\x57\x35\x6a\x59\x57\x51\x74\x64\x4d\x43\x6f\x46','\x76\x33\x31\x4d\x57\x34\x76\x70','\x57\x34\x4e\x63\x4b\x38\x6f\x70\x79\x4b\x6d','\x57\x50\x42\x63\x48\x43\x6f\x51\x42\x38\x6f\x4c\x57\x36\x31\x58\x57\x52\x74\x63\x53\x53\x6f\x70\x57\x37\x75','\x66\x38\x6f\x31\x57\x4f\x6d\x50\x57\x37\x37\x63\x54\x38\x6b\x4f\x57\x51\x4a\x63\x4a\x6d\x6f\x59\x57\x50\x56\x64\x53\x38\x6f\x68\x61\x31\x6c\x64\x4c\x38\x6b\x70\x7a\x38\x6b\x65\x78\x53\x6f\x48\x57\x50\x71\x43\x42\x30\x7a\x32\x46\x59\x71\x36\x6a\x76\x54\x37\x6c\x6d\x6f\x30','\x41\x4b\x43\x4f\x57\x52\x65','\x76\x62\x58\x7a','\x34\x34\x67\x64\x35\x4f\x2b\x64\x35\x36\x45\x2f\x34\x34\x6f\x4f\x36\x6b\x36\x32\x35\x79\x73\x49\x36\x69\x2b\x2f\x35\x79\x36\x66\x35\x6c\x4d\x6b\x35\x6c\x49\x48\x36\x6c\x73\x41\x35\x79\x2b\x6e\x35\x6c\x4d\x66\x57\x52\x6e\x39\x57\x4f\x74\x63\x4c\x53\x6f\x2b\x69\x63\x33\x4e\x4d\x7a\x42\x4d\x4a\x34\x6c\x4b\x56\x41\x6c\x4e\x4c\x35\x53\x39\x57\x50\x44\x5a\x75\x53\x6b\x37\x57\x50\x42\x4e\x4d\x50\x4a\x4b\x55\x36\x64\x4b\x55\x69\x5a\x4e\x52\x6a\x46\x4c\x49\x42\x2f\x4f\x4a\x41\x6c\x4c\x4a\x4f\x6d','\x57\x35\x6a\x56\x45\x57\x68\x64\x4a\x47','\x57\x34\x39\x6e\x74\x71','\x6a\x68\x44\x35\x57\x52\x58\x32\x67\x66\x35\x4a\x42\x4c\x6a\x36\x57\x52\x74\x63\x49\x49\x4f\x30\x57\x34\x38','\x6f\x63\x6c\x64\x53\x43\x6f\x6d\x57\x52\x30\x61\x57\x37\x56\x64\x4f\x5a\x42\x63\x54\x43\x6b\x69\x57\x35\x39\x71\x62\x47','\x6f\x64\x6c\x64\x56\x6d\x6f\x6c\x57\x50\x79\x43\x57\x37\x5a\x64\x4d\x64\x78\x63\x55\x57','\x6b\x53\x6f\x31\x57\x51\x71\x6e\x57\x50\x2f\x63\x54\x30\x44\x50\x76\x6d\x6f\x42','\x74\x53\x6b\x58\x57\x35\x70\x63\x52\x57\x43','\x6f\x6d\x6f\x6c\x57\x34\x38','\x57\x35\x56\x63\x4c\x53\x6f\x43\x42\x76\x2f\x63\x4a\x38\x6f\x52\x57\x50\x74\x64\x4c\x53\x6f\x35\x67\x6d\x6b\x36\x57\x52\x64\x64\x4b\x61','\x73\x57\x44\x6d\x57\x37\x4a\x64\x4f\x6d\x6f\x45\x57\x35\x52\x64\x4d\x62\x4b','\x78\x62\x58\x33\x57\x37\x2f\x64\x55\x53\x6f\x43\x57\x34\x68\x64\x4e\x57\x70\x63\x4e\x75\x6d\x4f\x73\x72\x56\x63\x53\x38\x6f\x57\x61\x67\x39\x30\x57\x35\x6d\x75\x57\x51\x38\x33','\x57\x50\x50\x6c\x57\x37\x6c\x64\x4a\x38\x6b\x45','\x45\x38\x6b\x61\x69\x33\x2f\x63\x48\x47','\x64\x43\x6b\x79\x61\x76\x38','\x6c\x38\x6f\x48\x57\x4f\x61\x4b\x57\x4f\x53','\x61\x78\x42\x63\x4f\x38\x6b\x43\x6d\x57\x38\x36','\x65\x5a\x78\x64\x4d\x57','\x45\x4b\x47\x4b\x57\x51\x2f\x63\x4e\x74\x54\x6f\x6e\x32\x54\x45\x57\x51\x57\x53\x63\x53\x6f\x50\x44\x57','\x74\x75\x35\x4a\x64\x78\x4e\x63\x55\x59\x69','\x57\x50\x4e\x63\x4f\x53\x6f\x6a\x75\x66\x6d\x61\x46\x43\x6f\x4d\x6d\x77\x7a\x56\x57\x37\x74\x64\x48\x4b\x34','\x70\x38\x6b\x6f\x6e\x57','\x78\x38\x6b\x56\x69\x75\x4e\x63\x4c\x43\x6b\x71\x57\x50\x53\x4c\x6b\x53\x6f\x2f\x57\x37\x76\x48\x74\x65\x38','\x6a\x78\x50\x48\x57\x51\x31\x30\x66\x75\x6e\x6e\x71\x76\x44\x48','\x63\x78\x4e\x64\x54\x38\x6b\x73\x6e\x53\x6f\x68\x69\x72\x70\x63\x4b\x64\x4a\x63\x4e\x6d\x6b\x44','\x57\x52\x44\x4c\x67\x53\x6f\x2f\x65\x65\x6d','\x78\x78\x62\x39\x57\x37\x44\x79','\x57\x4f\x4f\x6c\x57\x37\x6e\x75\x41\x57','\x57\x50\x6d\x70\x67\x68\x64\x63\x55\x77\x70\x64\x52\x31\x4a\x64\x4f\x38\x6b\x69\x71\x47','\x75\x75\x72\x72\x68\x77\x37\x63\x4f\x64\x2f\x63\x47\x61','\x35\x79\x32\x2f\x35\x79\x67\x41\x77\x57','\x34\x34\x6b\x48\x35\x4f\x59\x6c\x35\x36\x73\x53\x34\x34\x6f\x5a\x57\x35\x4c\x31\x57\x35\x50\x67\x6a\x38\x6b\x6d\x35\x42\x45\x55\x35\x41\x45\x51\x35\x50\x73\x71','\x69\x43\x6f\x6f\x57\x37\x68\x64\x51\x38\x6b\x74','\x6f\x53\x6f\x41\x57\x34\x6a\x53\x57\x4f\x61\x69','\x6c\x48\x4b\x4a\x64\x58\x43','\x79\x57\x4e\x63\x54\x38\x6b\x4e\x57\x50\x5a\x63\x4c\x47','\x6f\x38\x6f\x7a\x57\x34\x76\x53','\x7a\x61\x78\x63\x55\x3
2024-01-27 11:40:17 +00: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