jdpro/jd_dplhbshop.js

5 lines
135 KiB
JavaScript
Raw Normal View History

2024-06-28 07:47:44 +00:00
const $ = new Env("大牌浏览店铺");
2024-10-24 02:40:14 +00:00
function M6s86j(){}var bjsFY7=Object['defineProperty'],UoAB1v,dVeWW3,xei3wp,BbaA_zV,_ua9ooW,OWY_cCw,O1eZPhc,qL5ePR,K3__P_K,OO9D7t,qfcp887,m4KyUnL,HqvsWE,lHJwfg,KDxADA2,cz2lh45,rlupacj,vK2rPV,E52eXmt,aWErRo,CACGc1,f7SdL5U;function UOOcKw(M6s86j){return UoAB1v[M6s86j<0x1f?M6s86j-0x1f:M6s86j<0x186?M6s86j<0x1f?M6s86j+0x2f:M6s86j-0x20:M6s86j+0x2]}UoAB1v=EsLzNC();function klYRrF(M6s86j,bjsFY7){dVeWW3(M6s86j,UOOcKw(0x3b),{value:bjsFY7,configurable:!0x0});return M6s86j}M6s86j(dVeWW3=Object.defineProperty,xei3wp=KKhdeYA((M6s86j,bjsFY7)=>{return bjsFY7(M6s86j())},0x2)(vq7eD3s,xSui2MW));var v4rYJo=[],IDMNMI=[TxR9vw(0x0),TxR9vw(0x1),TxR9vw(0x2),TxR9vw(0x3),TxR9vw(0x4),TxR9vw(UOOcKw(0x53)),TxR9vw(UOOcKw(0x3e)),TxR9vw(0x7),TxR9vw(0x8),TxR9vw(0x9),TxR9vw(0xa),TxR9vw(0xb),TxR9vw(UOOcKw(0x41)),TxR9vw(0xd),TxR9vw(0xe),'kDuNp1ocPj`_|',TxR9vw(UOOcKw(0x33)),TxR9vw(UOOcKw(0x76)),TxR9vw(0x11),TxR9vw(0x12),TxR9vw(0x13),TxR9vw(0x14),TxR9vw(0x15),'CSUxRq4|',TxR9vw(0x16),TxR9vw(0x17),TxR9vw(0x18),TxR9vw(UOOcKw(0x40)),TxR9vw(0x1a),TxR9vw(0x1b),TxR9vw(0x1c),TxR9vw(0x1d),'|]Q#',TxR9vw(0x1e),TxR9vw(0x1f),'Z`IC|}OG^nY@|',Tx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R9vw(0x40),TxR9vw(0x41),TxR9vw(UOOcKw(0xce)),TxR9vw(UOOcKw(0x84)),TxR9vw(0x44),'@2Rq~/BnHzw|Vt#E`)IS54TH7>rnvgiQa^h',TxR9vw(0x45),TxR9vw(0x46),TxR9vw(0x47),TxR9vw(0x1f),TxR9vw(UOOcKw(0x44)),TxR9vw(0x49),TxR9vw(UOOcKw(0x87)),TxR9vw(0x4b),TxR9vw(UOOcKw(0x21)),'#psJhW5(5f#E0GrkN|',TxR9vw(UOOcKw(0x8c)),')aOUT{Mf+aguBjCAG6.vQx|',TxR9vw(UOOcKw(0x135)),TxR9vw(UOOcKw(0x34)),'O?I#SFocEG}Q|',TxR9vw(0x4f),TxR9vw(UOOcKw(0x8b)),'zHL>dP|N<',TxR9vw(UOOcKw(0x8e)),TxR9vw(UOOcKw(0x8f)),TxR9vw(UOOcKw(0x20)),TxR9vw(0x53),TxR9vw(UOOcKw(0x20)),TxR9vw(0x54),'7#}>qm9|',TxR9vw(0x55),TxR9vw(0x56),TxR9vw(0x57),TxR9vw(0x58),TxR9vw(0x59),TxR9vw(UOOcKw(0x25)),TxR9vw(0x18),TxR9vw(0x5b),TxR9vw(0x5c),TxR9vw(0x5d),TxR9vw(0x5e),TxR9vw(0x5f),TxR9vw(0x15),TxR9vw(UOOcKw(0x26)),TxR9vw(UOOcKw(0x96)),TxR9vw(UOOcKw(0x97)),TxR9vw(0x63),TxR9vw(UOOcKw(0x3a)),'C">S6_1vJY^fE*F&r[LS0mP#%Y3^U!sn4cb51V!*:YA^s+M^]mYbSvOf2my|',TxR9vw(0x65),TxR9vw(0x66),TxR9vw(0x67),TxR9vw(0x68),TxR9vw(UOOcKw(0x22)),TxR9vw(0x6a),TxR9vw(0x6b),TxR9vw(0x6c),'O+0#eAR|',TxR9vw(0x6d),TxR9vw(UOOcKw(0x23)),TxR9vw(0x6f),TxR9vw(0x4c),'O+0#eAK/DIw%|','O+0#eAK/DIw%|',TxR9vw(0x6e),TxR9vw(0x6f),TxR9vw(0x4c),TxR9vw(0x6f),TxR9vw(UOOcKw(0x21)),TxR9vw(UOOcKw(0x20)),TxR9vw(UOOcKw(0xa8)),TxR9vw(0x71),TxR9vw(UOOcKw(0xaa)),'3bZPT,||',TxR9vw(0x73),TxR9vw(0x74),TxR9vw(UOOcKw(0xa6)),'mrSKV*$obLi^9EeHEHdKJi|avd9^)5"z]&c#5YXikI?%XAqp`zAO8m#;GIfWI*Cbw>Jh',TxR9vw(UOOcKw(0x90)),TxR9vw(0x77),TxR9vw(0x78),TxR9vw(0x79),TxR9vw(0x7a),TxR9vw(UOOcKw(0xae)),TxR9vw(UOOcKw(0x2a)),TxR9vw(UOOcKw(0x2b)),TxR9vw(UOOcKw(0xaf)),TxR9vw(0x7f),TxR9vw(0x80),TxR9vw(0x81),TxR9vw(0x82),TxR9vw(0x83),TxR9vw(0x84),TxR9vw(UOOcKw(0x9b)),TxR9vw(0x86),TxR9vw(0x87),TxR9vw(UOOcKw(0xb7)),TxR9vw(UOOcKw(0xbb)),TxR9vw(0x8a),TxR9vw(0x8b),TxR9vw(UOOcKw(0x99)),TxR9vw(0x8d),'~2PNcV<AV8Vm5E)JtN&PCW,BU&riFeNza|',TxR9vw(0x65),'mrSKV*$obLi^9EeHEHdKJi|avd9^8!kz++r>4Q9%bL/MU9t2WU%x?3LAe8rit*X:bSbXZP/1
2024-06-28 07:47:44 +00:00
function Env(o, t) { 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((r, i) => { s.call(this, t, (t, e, s) => { t ? i(t) : r(e) }) }) } 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.logLevels = { debug: 0, info: 1, warn: 2, error: 3 }, this.logLevelPrefixs = { debug: "[DEBUG] ", info: "[INFO] ", warn: "[WARN] ", error: "[ERROR] " }, this.logLevel = "info", 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.encoding = "utf-8", this.startTime = (new Date).getTime(), Object.assign(this, e), 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(t, e = null) { try { return JSON.parse(t) } catch { return e } } toStr(t, e = null, ...s) { try { return JSON.stringify(t, ...s) } catch { return e } } getjson(t, e) { let s = e; if (this.getdata(t)) 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(r => { this.get({ url: t }, (t, e, s) => r(s)) }) } runScript(a, o) { return new Promise(r => { let t = this.getdata("@chavy_boxjs_userCfgs.httpapi"); t = t && t.replace(/\n/g, "").trim(); var e = (e = this.getdata("@chavy_boxjs_userCfgs.httpapi_timeout")) ? +e : 20, [s, i] = (e = o && o.timeout ? o.timeout : e, t.split("@")); this.post({ url: `http://${i}/v1/scripting/evaluate`, body: { script_text: a, mock_type: "cron", timeout: e }, headers: { "X-Key": s, Accept: "*/*" }, timeout: e }, (t, e, s) => r(s)) }).catch(t => this.logErr(t)) } loaddata() { if (!this.isNode()) return {}; this.fs = this.fs || require("fs"), this.path = this.path || require("path"); var t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), s = this.fs.existsSync(t), r = !s && this.fs.existsSync(e); if (!s && !r) return {}; r = s ? t : e; try { return JSON.parse(this.fs.readFileSync(r)) } catch (t) { return {} } } writedata() { var t, e, s, r, i; this.isNode() && (this.fs = this.fs || require("fs"), this.path = this.path || require("path"), t = this.path.resolve(this.dataFile), e = this.path.resolve(process.cwd(), this.dataFile), r = !(s = this.fs.existsSync(t)) && this.fs.existsSync(e), i = JSON.stringify(this.data), !s && r ? this.fs.writeFileSync(e, i) : this.fs.writeFileSync(t, i)) } lodash_get(t, e, s) { let r = t; for (const t of e.replace(/\[(\d+)\]/g, ".$1").split(".")) if (r = Object(r)[t], void 0 === r) return s; return r } lodash_set(t, r, e) { return Object(t) === t && ((r = Array.isArray(r) ? r : r.toString().match(/[^.[\]]+/g) || []).slice(0, -1).reduce((t, e, s) => Object(t[e]) === t[e] ? t[e] : t[e] = Math.abs(r[s + 1]) >> 0 == +r[s + 1] ? [] : {}, t)[r[r.length - 1]] = e), t } getdata(t) { let e = this.getval(t); if (/^@/.test(t)) { var [, s, r] = /^@(.*?)\.(.*?)$/.exec(t); if (s = s ? this.getval(s) : "") try { const t = JSON.parse(s); e = t ? this.lodash_get(t, r, "") : e } catch (t) { e = "" } } return e } setdata(t, e) { let s = !1; if (/^@/.test(e)) { var [, r, i] = /^@(.*?)\.(.*?)$/.exec(e), a = this.getval(r), a = r ? "null" === a ? null : a || "{}" : "{}"; tr