2023-12-26 03:15:42 +08:00
|
|
|
|
var iil='jsjiami.com.v7';function Iii11l(){const l1iiII=(function(){return[...[iil,'FWGtjsXjIqiHBagOdmhih.DkcIbom.Ipvlg7tDGx==','W5u7WReoz10aWR4','WOtdQb3dRNu','WONdPbLNW5G','WPFdQtzxW7Hg','htRdOLe5mfS','W5BcI0u','WQddLXTIWROcWQNdR8ohnmkwD8kPk8olW7Kf','zSoPsHG+','oCoEW7FcTwi','W4hdGK8','WOldGWldTLO','wSo3Atq6','CYnmW5VdHbFdJKbeW5uccG','W4SyWPza','W4tcObNcI18','A1FcPvFdLa','m0yW','mfWJmXeOsW','8j+0RSkm','hCkHiSo+ga','4PUJeSoWW6hcOowEHowCUowpM+MgT++8UmkBWRpdQ8oCW63cRmo0WODjeCkaWPddSCkhWRtcGcHSWONcNclcK8oIW4pdRmklW5ORiCk5tCoQdq8XW7qJWP7dG3/cQe/dL0K','z1RcSLhdKG','W5dcGMWTkCo6cdS','WR/dLCoyW5JdVr5TfeC','4P2KWPhLIyxLIj3NO5RLP5dMLAtVV73OR7RLHR7LJzBLVO7LKkdMLlhKUitOV57MTQdLI5hLK7/LH7JOVAdOOyZLKARVVBW','WRxdJNhcV8oX','q8o3WRZdTSkd','bSo7jG','oftcQeZdISosWR0','C13dSCk1ha','WPhdTYGjnq','4PQGyCoipuRLN6ZLNPNLJ4VPHOZVV6hcLwxdKr1mW5pcJMGhb8kdW5FdMmkLcvnhWP0iBCopEZZcM8k7W6BcNCkQW61rWQ57WQaKW5Kct14HW7LXW6TAW7C','e3RdLSkb','vqddOd5v','WQtcVCo5WO5msfVdLdi1','W6mTsSo8Cq','cJVcI8oUBNGrkmkEECkMW7O','tWZcOwaiaG','xmoFCZSR','z3hdICk4','hKFdVGfN','fmkMW7S+aW90xCoGW7W','WP90zreo','WRFIM7tVU4PE5B2g5yM/5Qk45RAm5yU25BEF5BY65zcf5lMW55kb772t5l+55P2d5Acy5ysj5lMn55gy5z635z6z5y2z6ywc','4PY1aUw1OUwlVEwkVEI/TEs4Ja','uoIUQoAZK+wKK+I1VE+9M3FdGUIHM+MBLowjKU+9SIpcKqJdVmk1kW88AHhcKMWQqa','WOzGW4pdN8omW6tdGwxdSmog','WOfQtW','W4VcTZu','iZFcHSo7WRy','iqrLWRzYWOBcTSoZENtcJdXcbvtdOh42ws/dKMvRA0rHW7HZamkgwSoNha','hgVcUKVdPSohWRBcH8kxWReArLipjCkQc17dMZjUrSojl1qCW53cGxfVpJ13v2RdMSoqWOVcLY/dUmkmBCkpWRiwWPOLtdtdS8oTCq7dPw3cOrldPe59r1qCW7/dL8oeWPHHp8oFWQzoW5m','W7pdSuPDgq','d2RdVtPp','aSo7nCo1bs7dQmkU','duxdHSoMWRG','WQ/dQY0','A8oizW','W5NcGCkFW5ZdJW','amkjsSo6W5K9W5xdISon','z8olBLRdUNJdMG','W5dcOrJcMgu','ioIUTUAZI+wLNoI0PSo8W6qTyW','xqf1W7ddSt7dL2HWW6mLmtKhWODPWPG','mZH2WQjr','v1pdNSkwW50','WO/dVsixcG','i8kYA8oh','W5lcGu7dQNJcQ8k2','WQ7dGWr7W6jhWR8','FWfsW6RdOKxcI03cOXz3WQ0','fu3dTW','BdalE8o8','W6KbWPXIW6S','4OYZ77UxWQVOTyhLJ73cSdGv6BQ16k6H5yYw5yIE5yUb5l+46ioi','W7tcQ33dIKtcKCkdWOa','meldMvmZAW','c8oymCk8','dhVdLYv/','kSkHa8opkW','oSo6W7VcGu8','gxRcVuJdTmkAW7W','aMFcL13dKq','WQ7dPtO','4PYveUAEM+wJMUwfSoAoS+wVOUwkQUwlO+wpUUMeSE+/H+w+M+wLUowiTUwjG+I3SUwmULz/WPC','uCoPs8krDW','rmouWOldOCkVWOK','W4ipWPq','W63cNN0VfCo0hsC','a0pdPgeC','BmobA1S','W5K1WReF','jMi5dc4','W54bWOfqW4K','4PUXCEw/L+wsGos4K+ErPownSEMfSU+9U8kKW7JdUaDmomknC1BcHmo5dNXzW78znCk3W5ZcVfRcKv3cH8o4WQpcMCovW4FdGhpdQeO','x+ITHUAWNUwNQoI0Je5yjmos','ncpcPCoIWOmf','wgpdQmkAW7y','ua53W7G','WPm3W4SnW6SG','W4udWPvtW78','vGPZW5ldKW','p8kTnmoKhCkgW6W','WQxcT8oS','E8oCyspcPCopb8kmASoVW4RcMvTcbemMW4JcLa','rmk7j8oWgsldPmk+WP3dImovW6Kvr0dcGNxdTCorW5u','4P6QWOhLH7RLP7NLSOVNURqpgmk/W6u','W7FcHgCAcCo/','WOxIM5JVUA7dV+w/U+wkO+AIToA1OUwiHow1Jow9OowtMEs4UoEtVE++U+s+OUADNowHO+weM+s7UUErL+wFHEwEHEwmGEMgMG','WOnwtcio','WO9QtcW','WOZcNMNdT0BcH8kx','WOr3W4xdN8oAW7a','CCoVBCktra','WQBORBdMSzNPHihNVRtLJyFMLAVPLA/OR7pVVypORA/OGzxNSRdLVOFLJ63OGPFOV6xOOzhLJARPPlxVVzxdMCkwCHOpWO4TWQuyW4z7fmkwoW','4PIS77M3uEs7QoEsJEwDREwFH+s7Po+9RW','y0VcKfldU8oSWPq','nSohdSk/Ca','wmoNxeZdSG','qmoaACkvwa','WQZcOmoIeW','rmoEWOS','nCkTaIm6W5ZcMJ/dHW','W4aiWQnWW64','W4CoWPDgW5q','zwZdMmktWQ/cOhi','W5RcIfxdGej8ebldLW','WOxcNCo8WQ5B','a0RdU8kdWQe','WO1QW5a','W5S9WR0','4P+PmUw+HowiSowkQowiHUw2P+I8HUwlOUAoJ+wUTowlQowiPos7QEAwM+++NoMbOEwhS++/TG','W4SoWOu','WQ/dHWCSgG','q8otzayBW7xcKYa','W6GZm8kLW58','W6ddLhr3ka','W5hdKwHEcq','d8oHW5e','qJhdVW/cU8on','keGhWRW','evBdPcqChCkL','vgBdIq','l1KyWPlcPXS','W5hdHwTipG','p8kMD8kUdq','WOFdNGNdKwfMba','fwldOK40W658da','WQddIay','WQVcPCoIWPXsvfBdMI0PWOpcQG','gSkaW5ZcS8oTW5H4WQr4WO/cNmoG','vW3dTIfiuCo+W7LozCkaW4TbvSoNj8o8aSoF','hhJdOLyPW7nhgSo8yW','WQxdNIpdOg4','W6WmWPWqDa','W6SVkmkDW4O','uCoHWOJdRCk9','k13dHCobWPVdMWb6','W5yrWPeTua','BMBdIW','tSkdBSoOgf4kwmkhCCo5sq','W50vWPbaW4KGWRq','W6W3tSobsq','4PQUdUs4GoEqP+AZUUwnK+MeVU+8VmoPnmohoa8rkSkSn8orWP5DWQqzrImnWPXlWQLAWRpcU8ksuhJcRKvzW6ThWRlcO8oBWPmrDeVdNh82W6O','xqH2W7BdRW','WOlcImoaWRS','W7GvWQLwW6y','leBdKY5j','vMddGCk+W7xcPNiQvaRcVhRcPmkbn8kWWPHmiCkaWRpcQw3dJY3cTG','BMVdOmkmW4S','W5pcILtdS2lcU8kDWRddUSkloK5gWRupp1W','z0dcH0tdOG','sMJdK8kJ','zmoYtmkwtG','nSkPm8o2','4PUdWQ7dT8
|
2023-11-01 14:45:03 +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
|